Skip to content

Commit a94a479

Browse files
authored
rename boot.cjs to unzip.cjs (#73)
* rename boot.cjs to unzip.cjs * remove old file
1 parent d2d4c2a commit a94a479

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

scripts/create-common-bundle/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ fs.writeFileSync(`src/lib/client/adapters/common/common.zip`, out);
6060

6161
// bundle adm-zip so we can use it in the webcontainer
6262
esbuild.buildSync({
63-
entryPoints: [fileURLToPath(new URL('./boot.js', import.meta.url))],
63+
entryPoints: [fileURLToPath(new URL('./unzip.js', import.meta.url))],
6464
bundle: true,
6565
platform: 'node',
6666
minify: true,
67-
outfile: 'src/lib/client/adapters/common/boot.cjs',
67+
outfile: 'src/lib/client/adapters/common/unzip.cjs',
6868
format: 'cjs'
6969
});
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/boot.cjs
1+
/unzip.cjs
22
/common.zip

src/lib/client/adapters/common/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import zipped from './common.zip?url';
2-
import boot from './boot.cjs?url';
2+
import unzip from './unzip.cjs?url';
33

44
async function load() {
55
const result = await Promise.all([
66
fetch(zipped).then((r) => r.arrayBuffer()),
7-
fetch(boot).then((r) => r.text())
7+
fetch(unzip).then((r) => r.text())
88
]);
99

1010
return {
1111
zipped: result[0],
12-
boot: result[1]
12+
unzip: result[1]
1313
};
1414
}
1515

src/lib/client/adapters/webcontainer/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ export async function create(stubs) {
1414

1515
const common = await ready;
1616
tree['common.zip'] = file(new Uint8Array(common.zipped));
17-
tree['boot.cjs'] = file(common.boot);
17+
tree['unzip.cjs'] = file(common.unzip);
1818

1919
const vm = await WebContainer.boot();
2020
await vm.loadFiles(tree);
2121

22-
const boot = await vm.run(
22+
const unzip = await vm.run(
2323
{
2424
command: 'node',
25-
args: ['boot.cjs']
25+
args: ['unzip.cjs']
2626
},
2727
{
28-
stderr: (data) => console.error(`[boot] ${data}`)
28+
stderr: (data) => console.error(`[unzip] ${data}`)
2929
}
3030
);
3131

32-
const code = await boot.onExit;
32+
const code = await unzip.onExit;
3333

3434
if (code !== 0) {
3535
throw new Error('Failed to initialize WebContainer');

0 commit comments

Comments
 (0)