(sandboxes: SandboxFileInformation[])
| 156 | } |
| 157 | |
| 158 | export async function buildSandboxMenuItemFile(sandboxes: SandboxFileInformation[]) { |
| 159 | const content = new StringBuilder(); |
| 160 | content.addLine(`function getSandboxMenuItems() {`); |
| 161 | content.addLine(`return ${JSON.stringify(sandboxes)};`); |
| 162 | content.addLine(`}`); |
| 163 | content.addLine('exports.getSandboxMenuItems = getSandboxMenuItems;'); |
| 164 | |
| 165 | await writeSandboxContent(SANDBOX_MENU_ITEMS_FILE, content.dump()); |
| 166 | } |
| 167 | |
| 168 | // Turns windows URL string ('c:\\etc\\') into URL node expects ('c:/etc/') |
| 169 | // https://github.com/sindresorhus/slash |
no test coverage detected