MCPcopy Index your code
hub / github.com/bytecodealliance/ComponentizeJS / componentizeCmd

Function componentizeCmd

src/cli.js:8–27  ·  view source on GitHub ↗
(jsSource, opts)

Source from the content-addressed store, hash-verified

6import { resolve } from 'node:path';
7
8export async function componentizeCmd(jsSource, opts) {
9 const { component } = await componentize({
10 sourcePath: jsSource,
11 witPath: resolve(opts.wit),
12 worldName: opts.worldName,
13 runtimeArgs: opts.runtimeArgs,
14 enableAot: opts.aot,
15 engine: opts.engine,
16 disableFeatures: opts.disable,
17 preview2Adapter: opts.preview2Adapter,
18 debugBindings: opts.debugBindings,
19 debugBuild: opts.useDebugBuild,
20 enableWizerLogging: opts.enableWizerLogging,
21 wizerBin: opts.wizerBin,
22 wevalBin: opts.wevalBin,
23 aotCache: opts.aotCacheDir,
24 aotMinStackSizeBytes: opts.aotMinStackSize,
25 });
26 await writeFile(opts.out, component);
27}
28
29program
30 .version('0.21.0')

Callers

nothing calls this directly

Calls 1

componentizeFunction · 0.90

Tested by

no test coverage detected