@metamask/snaps-cli 6.7.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -1
- package/README.md +12 -244
- package/dist/builders.cjs +5 -97
- package/dist/builders.cjs.map +1 -1
- package/dist/builders.d.cts +5 -94
- package/dist/builders.d.cts.map +1 -1
- package/dist/builders.d.mts +5 -94
- package/dist/builders.d.mts.map +1 -1
- package/dist/builders.mjs +5 -96
- package/dist/builders.mjs.map +1 -1
- package/dist/cli.cjs +4 -9
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts.map +1 -1
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +4 -16
- package/dist/cli.mjs.map +1 -1
- package/dist/commands/build/build.cjs +15 -11
- package/dist/commands/build/build.cjs.map +1 -1
- package/dist/commands/build/build.d.cts +8 -0
- package/dist/commands/build/build.d.cts.map +1 -1
- package/dist/commands/build/build.d.mts +8 -0
- package/dist/commands/build/build.d.mts.map +1 -1
- package/dist/commands/build/build.mjs +9 -5
- package/dist/commands/build/build.mjs.map +1 -1
- package/dist/commands/build/implementation.cjs.map +1 -1
- package/dist/commands/build/implementation.d.cts +2 -2
- package/dist/commands/build/implementation.d.cts.map +1 -1
- package/dist/commands/build/implementation.d.mts +2 -2
- package/dist/commands/build/implementation.d.mts.map +1 -1
- package/dist/commands/build/implementation.mjs.map +1 -1
- package/dist/commands/build/index.cjs +5 -14
- package/dist/commands/build/index.cjs.map +1 -1
- package/dist/commands/build/index.d.cts +1 -0
- package/dist/commands/build/index.d.cts.map +1 -1
- package/dist/commands/build/index.d.mts +1 -0
- package/dist/commands/build/index.d.mts.map +1 -1
- package/dist/commands/build/index.mjs +3 -14
- package/dist/commands/build/index.mjs.map +1 -1
- package/dist/commands/eval/__test__/webpack/bad/snap.config.cjs +0 -1
- package/dist/commands/eval/__test__/webpack/bad/snap.config.cjs.map +1 -1
- package/dist/commands/eval/__test__/webpack/bad/snap.config.d.cts.map +1 -1
- package/dist/commands/eval/__test__/webpack/bad/snap.config.d.mts.map +1 -1
- package/dist/commands/eval/__test__/webpack/bad/snap.config.mjs +0 -1
- package/dist/commands/eval/__test__/webpack/bad/snap.config.mjs.map +1 -1
- package/dist/commands/eval/__test__/webpack/good/snap.config.cjs +0 -1
- package/dist/commands/eval/__test__/webpack/good/snap.config.cjs.map +1 -1
- package/dist/commands/eval/__test__/webpack/good/snap.config.d.cts.map +1 -1
- package/dist/commands/eval/__test__/webpack/good/snap.config.d.mts.map +1 -1
- package/dist/commands/eval/__test__/webpack/good/snap.config.mjs +0 -1
- package/dist/commands/eval/__test__/webpack/good/snap.config.mjs.map +1 -1
- package/dist/commands/eval/__test__/webpack/snap.config.cjs +0 -1
- package/dist/commands/eval/__test__/webpack/snap.config.cjs.map +1 -1
- package/dist/commands/eval/__test__/webpack/snap.config.d.cts.map +1 -1
- package/dist/commands/eval/__test__/webpack/snap.config.d.mts.map +1 -1
- package/dist/commands/eval/__test__/webpack/snap.config.mjs +0 -1
- package/dist/commands/eval/__test__/webpack/snap.config.mjs.map +1 -1
- package/dist/commands/eval/eval.cjs +1 -1
- package/dist/commands/eval/eval.cjs.map +1 -1
- package/dist/commands/eval/eval.d.cts.map +1 -1
- package/dist/commands/eval/eval.d.mts.map +1 -1
- package/dist/commands/eval/eval.mjs +1 -1
- package/dist/commands/eval/eval.mjs.map +1 -1
- package/dist/commands/eval/index.cjs +1 -4
- package/dist/commands/eval/index.cjs.map +1 -1
- package/dist/commands/eval/index.d.cts.map +1 -1
- package/dist/commands/eval/index.d.mts.map +1 -1
- package/dist/commands/eval/index.mjs +1 -4
- package/dist/commands/eval/index.mjs.map +1 -1
- package/dist/commands/index.cjs +2 -0
- package/dist/commands/index.cjs.map +1 -1
- package/dist/commands/index.d.cts.map +1 -1
- package/dist/commands/index.d.mts.map +1 -1
- package/dist/commands/index.mjs +2 -0
- package/dist/commands/index.mjs.map +1 -1
- package/dist/commands/manifest/index.cjs +1 -4
- package/dist/commands/manifest/index.cjs.map +1 -1
- package/dist/commands/manifest/index.d.cts.map +1 -1
- package/dist/commands/manifest/index.d.mts.map +1 -1
- package/dist/commands/manifest/index.mjs +1 -4
- package/dist/commands/manifest/index.mjs.map +1 -1
- package/dist/commands/manifest/manifest.cjs +5 -6
- package/dist/commands/manifest/manifest.cjs.map +1 -1
- package/dist/commands/manifest/manifest.d.cts.map +1 -1
- package/dist/commands/manifest/manifest.d.mts.map +1 -1
- package/dist/commands/manifest/manifest.mjs +5 -6
- package/dist/commands/manifest/manifest.mjs.map +1 -1
- package/dist/commands/sandbox/index.cjs +17 -0
- package/dist/commands/sandbox/index.cjs.map +1 -0
- package/dist/commands/sandbox/index.d.cts +10 -0
- package/dist/commands/sandbox/index.d.cts.map +1 -0
- package/dist/commands/sandbox/index.d.mts +10 -0
- package/dist/commands/sandbox/index.d.mts.map +1 -0
- package/dist/commands/sandbox/index.mjs +12 -0
- package/dist/commands/sandbox/index.mjs.map +1 -0
- package/dist/commands/sandbox/sandbox.cjs +33 -0
- package/dist/commands/sandbox/sandbox.cjs.map +1 -0
- package/dist/commands/sandbox/sandbox.d.cts +14 -0
- package/dist/commands/sandbox/sandbox.d.cts.map +1 -0
- package/dist/commands/sandbox/sandbox.d.mts +14 -0
- package/dist/commands/sandbox/sandbox.d.mts.map +1 -0
- package/dist/commands/sandbox/sandbox.mjs +29 -0
- package/dist/commands/sandbox/sandbox.mjs.map +1 -0
- package/dist/commands/sandbox/server.cjs +27 -0
- package/dist/commands/sandbox/server.cjs.map +1 -0
- package/dist/commands/sandbox/server.d.cts +14 -0
- package/dist/commands/sandbox/server.d.cts.map +1 -0
- package/dist/commands/sandbox/server.d.mts +14 -0
- package/dist/commands/sandbox/server.d.mts.map +1 -0
- package/dist/commands/sandbox/server.mjs +25 -0
- package/dist/commands/sandbox/server.mjs.map +1 -0
- package/dist/commands/serve/index.cjs +2 -2
- package/dist/commands/serve/index.cjs.map +1 -1
- package/dist/commands/serve/index.d.cts.map +1 -1
- package/dist/commands/serve/index.d.mts.map +1 -1
- package/dist/commands/serve/index.mjs +2 -2
- package/dist/commands/serve/index.mjs.map +1 -1
- package/dist/commands/watch/implementation.cjs +2 -0
- package/dist/commands/watch/implementation.cjs.map +1 -1
- package/dist/commands/watch/implementation.d.cts +2 -2
- package/dist/commands/watch/implementation.d.cts.map +1 -1
- package/dist/commands/watch/implementation.d.mts +2 -2
- package/dist/commands/watch/implementation.d.mts.map +1 -1
- package/dist/commands/watch/implementation.mjs +2 -0
- package/dist/commands/watch/implementation.mjs.map +1 -1
- package/dist/commands/watch/index.cjs +2 -17
- package/dist/commands/watch/index.cjs.map +1 -1
- package/dist/commands/watch/index.d.cts.map +1 -1
- package/dist/commands/watch/index.d.mts.map +1 -1
- package/dist/commands/watch/index.mjs +2 -17
- package/dist/commands/watch/index.mjs.map +1 -1
- package/dist/commands/watch/watch.cjs +1 -1
- package/dist/commands/watch/watch.cjs.map +1 -1
- package/dist/commands/watch/watch.d.cts.map +1 -1
- package/dist/commands/watch/watch.d.mts.map +1 -1
- package/dist/commands/watch/watch.mjs +1 -1
- package/dist/commands/watch/watch.mjs.map +1 -1
- package/dist/config.cjs +11 -155
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +216 -314
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +216 -314
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +13 -155
- package/dist/config.mjs.map +1 -1
- package/dist/main.cjs +0 -1
- package/dist/main.cjs.map +1 -1
- package/dist/main.mjs +0 -1
- package/dist/main.mjs.map +1 -1
- package/dist/utils/index.cjs +0 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +0 -1
- package/dist/utils/index.d.cts.map +1 -1
- package/dist/utils/index.d.mts +0 -1
- package/dist/utils/index.d.mts.map +1 -1
- package/dist/utils/index.mjs +0 -1
- package/dist/utils/index.mjs.map +1 -1
- package/dist/utils/steps.cjs.map +1 -1
- package/dist/utils/steps.d.cts +1 -1
- package/dist/utils/steps.d.cts.map +1 -1
- package/dist/utils/steps.d.mts +1 -1
- package/dist/utils/steps.d.mts.map +1 -1
- package/dist/utils/steps.mjs.map +1 -1
- package/dist/webpack/compiler.cjs.map +1 -1
- package/dist/webpack/compiler.d.cts +2 -2
- package/dist/webpack/compiler.d.cts.map +1 -1
- package/dist/webpack/compiler.d.mts +2 -2
- package/dist/webpack/compiler.d.mts.map +1 -1
- package/dist/webpack/compiler.mjs.map +1 -1
- package/dist/webpack/config.cjs +1 -2
- package/dist/webpack/config.cjs.map +1 -1
- package/dist/webpack/config.d.cts +2 -2
- package/dist/webpack/config.d.cts.map +1 -1
- package/dist/webpack/config.d.mts +2 -2
- package/dist/webpack/config.d.mts.map +1 -1
- package/dist/webpack/config.mjs +1 -2
- package/dist/webpack/config.mjs.map +1 -1
- package/dist/webpack/loaders/function.cjs +7 -10
- package/dist/webpack/loaders/function.cjs.map +1 -1
- package/dist/webpack/loaders/function.d.cts +1 -0
- package/dist/webpack/loaders/function.d.cts.map +1 -1
- package/dist/webpack/loaders/function.d.mts +1 -0
- package/dist/webpack/loaders/function.d.mts.map +1 -1
- package/dist/webpack/loaders/function.mjs +6 -9
- package/dist/webpack/loaders/function.mjs.map +1 -1
- package/dist/webpack/loaders/index.cjs +1 -3
- package/dist/webpack/loaders/index.cjs.map +1 -1
- package/dist/webpack/loaders/index.d.cts +0 -1
- package/dist/webpack/loaders/index.d.cts.map +1 -1
- package/dist/webpack/loaders/index.d.mts +0 -1
- package/dist/webpack/loaders/index.d.mts.map +1 -1
- package/dist/webpack/loaders/index.mjs +0 -1
- package/dist/webpack/loaders/index.mjs.map +1 -1
- package/dist/webpack/loaders/wasm.cjs +0 -2
- package/dist/webpack/loaders/wasm.cjs.map +1 -1
- package/dist/webpack/loaders/wasm.d.cts.map +1 -1
- package/dist/webpack/loaders/wasm.d.mts.map +1 -1
- package/dist/webpack/loaders/wasm.mjs +0 -2
- package/dist/webpack/loaders/wasm.mjs.map +1 -1
- package/dist/webpack/plugins.cjs +15 -20
- package/dist/webpack/plugins.cjs.map +1 -1
- package/dist/webpack/plugins.d.cts +13 -3
- package/dist/webpack/plugins.d.cts.map +1 -1
- package/dist/webpack/plugins.d.mts +13 -3
- package/dist/webpack/plugins.d.mts.map +1 -1
- package/dist/webpack/plugins.mjs +4 -9
- package/dist/webpack/plugins.mjs.map +1 -1
- package/dist/webpack/server.cjs +83 -72
- package/dist/webpack/server.cjs.map +1 -1
- package/dist/webpack/server.d.cts +6 -1
- package/dist/webpack/server.d.cts.map +1 -1
- package/dist/webpack/server.d.mts +6 -1
- package/dist/webpack/server.d.mts.map +1 -1
- package/dist/webpack/server.mjs +63 -72
- package/dist/webpack/server.mjs.map +1 -1
- package/dist/webpack/utils.cjs +5 -21
- package/dist/webpack/utils.cjs.map +1 -1
- package/dist/webpack/utils.d.cts +6 -36
- package/dist/webpack/utils.d.cts.map +1 -1
- package/dist/webpack/utils.d.mts +6 -36
- package/dist/webpack/utils.d.mts.map +1 -1
- package/dist/webpack/utils.mjs +4 -18
- package/dist/webpack/utils.mjs.map +1 -1
- package/package.json +16 -40
- package/dist/commands/eval/__test__/browserify/bad/snap.config.cjs +0 -10
- package/dist/commands/eval/__test__/browserify/bad/snap.config.cjs.map +0 -1
- package/dist/commands/eval/__test__/browserify/bad/snap.config.d.cts +0 -4
- package/dist/commands/eval/__test__/browserify/bad/snap.config.d.cts.map +0 -1
- package/dist/commands/eval/__test__/browserify/bad/snap.config.d.mts +0 -4
- package/dist/commands/eval/__test__/browserify/bad/snap.config.d.mts.map +0 -1
- package/dist/commands/eval/__test__/browserify/bad/snap.config.mjs +0 -8
- package/dist/commands/eval/__test__/browserify/bad/snap.config.mjs.map +0 -1
- package/dist/commands/eval/__test__/browserify/good/snap.config.cjs +0 -10
- package/dist/commands/eval/__test__/browserify/good/snap.config.cjs.map +0 -1
- package/dist/commands/eval/__test__/browserify/good/snap.config.d.cts +0 -4
- package/dist/commands/eval/__test__/browserify/good/snap.config.d.cts.map +0 -1
- package/dist/commands/eval/__test__/browserify/good/snap.config.d.mts +0 -4
- package/dist/commands/eval/__test__/browserify/good/snap.config.d.mts.map +0 -1
- package/dist/commands/eval/__test__/browserify/good/snap.config.mjs +0 -8
- package/dist/commands/eval/__test__/browserify/good/snap.config.mjs.map +0 -1
- package/dist/utils/legacy.cjs +0 -53
- package/dist/utils/legacy.cjs.map +0 -1
- package/dist/utils/legacy.d.cts +0 -28
- package/dist/utils/legacy.d.cts.map +0 -1
- package/dist/utils/legacy.d.mts +0 -28
- package/dist/utils/legacy.d.mts.map +0 -1
- package/dist/utils/legacy.mjs +0 -47
- package/dist/utils/legacy.mjs.map +0 -1
- package/dist/webpack/loaders/browserify.cjs +0 -84
- package/dist/webpack/loaders/browserify.cjs.map +0 -1
- package/dist/webpack/loaders/browserify.d.cts +0 -18
- package/dist/webpack/loaders/browserify.d.cts.map +0 -1
- package/dist/webpack/loaders/browserify.d.mts +0 -18
- package/dist/webpack/loaders/browserify.d.mts.map +0 -1
- package/dist/webpack/loaders/browserify.mjs +0 -88
- package/dist/webpack/loaders/browserify.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.mjs","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,mCAAmC;AACpD,OAAO,EAAE,MAAM,EAAE,wBAAwB;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"build.mjs","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,mCAAmC;AACpD,OAAO,EAAE,MAAM,EAAE,wBAAwB;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,aAAa;AAE9C,OAAO,EAAE,KAAK,EAAE,6BAAyB;AACzC,OAAO,EAAE,qBAAqB,EAAE,oBAAgB;AAEhD,OAAO,EAAE,YAAY,EAAE,yBAAqB;AAE5C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,8BAAoB;AAC1D,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AASnC,MAAM,CAAC,MAAM,KAAK,GAAwB;IACxC;QACE,IAAI,EAAE,0BAA0B;QAChC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK;QAC/B,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACzB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;YAEzB,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBAC3B,MAAM,IAAI,YAAY,CACpB,0BAA0B,KAAK,qEAAqE,CACrG,CAAC;YACJ,CAAC;QACH,CAAC;KACF;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK;QAC/B,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;YAC/D,qEAAqE;YACrE,QAAQ;YACR,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE;gBACnC,OAAO;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO;aACR,CAAC,CAAC;YAEH,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO;oBACL,OAAO;oBACP,KAAK,EAAE,WAAW;oBAClB,MAAM;oBACN,OAAO;oBACP,IAAI,EAAE,MAAM,qBAAqB,CAAC,QAAQ,CAAC;iBAC5C,CAAC;YACJ,CAAC;YAED,OAAO,SAAS,CAAC;QACnB,CAAC;KACF;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ;QAC1D,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;YAClC,MAAM,IAAI,GAAG,WAAW,CACtB,OAAO,CAAC,GAAG,EAAE,EACb,MAAM,CAAC,MAAM,CAAC,IAAI,EAClB,MAAM,CAAC,MAAM,CAAC,QAAQ,CACvB,CAAC;YAEF,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;YAErB,IAAI,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;KACF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO;QACnC,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;YAChC,MAAM,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;YACrC,OAAO,CAAC,+CAA+C,IAAI,GAAG,EAAE,OAAO,CAAC,CAAC;YAEzE,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,CAAC;KACF;CACO,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAuB,EACvB,OAAO,GAAG,KAAK;IAEf,OAAO,MAAM,YAAY,CAAC,KAAK,EAAE;QAC/B,KAAK,EAAE,IAAI;QACX,MAAM;QACN,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { isFile } from '@metamask/snaps-utils/node';\nimport { assert } from '@metamask/utils';\nimport { resolve as pathResolve } from 'path';\n\nimport { build } from './implementation';\nimport { getBundleAnalyzerPort } from './utils';\nimport type { ProcessedConfig } from '../../config';\nimport { CommandError } from '../../errors';\nimport type { Steps } from '../../utils';\nimport { success, executeSteps, info } from '../../utils';\nimport { evaluate } from '../eval';\n\nexport type BuildContext = {\n analyze: boolean;\n build: boolean;\n config: ProcessedConfig;\n port?: number;\n};\n\nexport const steps: Steps<BuildContext> = [\n {\n name: 'Checking the input file.',\n condition: ({ build }) => build,\n task: async ({ config }) => {\n const { input } = config;\n\n if (!(await isFile(input))) {\n throw new CommandError(\n `Input file not found: \"${input}\". Make sure that the \"input\" field in your snap config is correct.`,\n );\n }\n },\n },\n {\n name: 'Building the snap bundle.',\n condition: ({ build }) => build,\n task: async ({ analyze, build: enableBuild, config, spinner }) => {\n // We don't evaluate the bundle here, because it's done in a separate\n // step.\n const compiler = await build(config, {\n analyze,\n evaluate: false,\n spinner,\n });\n\n if (analyze) {\n return {\n analyze,\n build: enableBuild,\n config,\n spinner,\n port: await getBundleAnalyzerPort(compiler),\n };\n }\n\n return undefined;\n },\n },\n {\n name: 'Evaluating the snap bundle.',\n condition: ({ build, config }) => build && config.evaluate,\n task: async ({ config, spinner }) => {\n const path = pathResolve(\n process.cwd(),\n config.output.path,\n config.output.filename,\n );\n\n await evaluate(path);\n\n info(`Snap bundle evaluated successfully.`, spinner);\n },\n },\n {\n name: 'Running analyser.',\n condition: ({ analyze }) => analyze,\n task: async ({ spinner, port }) => {\n assert(port, 'Port is not defined.');\n success(`Bundle analyzer running at http://localhost:${port}.`, spinner);\n\n spinner.stop();\n },\n },\n] as const;\n\n/**\n * Build all files in the given source directory to the given destination\n * directory.\n *\n * This creates the destination directory if it doesn't exist.\n *\n * @param config - The config object.\n * @param analyze - Whether to analyze the bundle.\n * @returns Nothing.\n */\nexport async function buildHandler(\n config: ProcessedConfig,\n analyze = false,\n): Promise<void> {\n return await executeSteps(steps, {\n build: true,\n config,\n analyze,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.cjs","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":";;;AAIA,qDAA4C;AAE5C;;;;;;GAMG;AACI,KAAK,UAAU,KAAK,CACzB,
|
|
1
|
+
{"version":3,"file":"implementation.cjs","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":";;;AAIA,qDAA4C;AAE5C;;;;;;GAMG;AACI,KAAK,UAAU,KAAK,CACzB,MAAuB,EACvB,OAAwB;IAExB,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAW,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,OAAO,CAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrD,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;YACxB,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACjB,OAAO;YACT,CAAC;YAED,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE;gBAC5B,IAAI,UAAU,EAAE,CAAC;oBACf,MAAM,CAAC,UAAU,CAAC,CAAC;oBACnB,OAAO;gBACT,CAAC;gBAED,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,sBAsBC","sourcesContent":["import type { Compiler } from 'webpack';\n\nimport type { ProcessedConfig } from '../../config';\nimport type { WebpackOptions } from '../../webpack';\nimport { getCompiler } from '../../webpack';\n\n/**\n * Build the snap bundle. This uses Webpack to build the bundle.\n *\n * @param config - The config object.\n * @param options - The Webpack options.\n * @returns A promise that resolves when the bundle is built.\n */\nexport async function build(\n config: ProcessedConfig,\n options?: WebpackOptions,\n) {\n const compiler = await getCompiler(config, options);\n return await new Promise<Compiler>((resolve, reject) => {\n compiler.run((runError) => {\n if (runError) {\n reject(runError);\n return;\n }\n\n compiler.close((closeError) => {\n if (closeError) {\n reject(closeError);\n return;\n }\n\n resolve(compiler);\n });\n });\n });\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Compiler } from "webpack";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProcessedConfig } from "../../config.cjs";
|
|
3
3
|
import type { WebpackOptions } from "../../webpack/index.cjs";
|
|
4
4
|
/**
|
|
5
5
|
* Build the snap bundle. This uses Webpack to build the bundle.
|
|
@@ -8,5 +8,5 @@ import type { WebpackOptions } from "../../webpack/index.cjs";
|
|
|
8
8
|
* @param options - The Webpack options.
|
|
9
9
|
* @returns A promise that resolves when the bundle is built.
|
|
10
10
|
*/
|
|
11
|
-
export declare function build(config:
|
|
11
|
+
export declare function build(config: ProcessedConfig, options?: WebpackOptions): Promise<Compiler>;
|
|
12
12
|
//# sourceMappingURL=implementation.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.cts","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB;AAExC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"implementation.d.cts","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAqB;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,gCAAsB;AAGpD;;;;;;GAMG;AACH,wBAAsB,KAAK,CACzB,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,cAAc,qBAoBzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Compiler } from "webpack";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProcessedConfig } from "../../config.mjs";
|
|
3
3
|
import type { WebpackOptions } from "../../webpack/index.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* Build the snap bundle. This uses Webpack to build the bundle.
|
|
@@ -8,5 +8,5 @@ import type { WebpackOptions } from "../../webpack/index.mjs";
|
|
|
8
8
|
* @param options - The Webpack options.
|
|
9
9
|
* @returns A promise that resolves when the bundle is built.
|
|
10
10
|
*/
|
|
11
|
-
export declare function build(config:
|
|
11
|
+
export declare function build(config: ProcessedConfig, options?: WebpackOptions): Promise<Compiler>;
|
|
12
12
|
//# sourceMappingURL=implementation.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.d.mts","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB;AAExC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"implementation.d.mts","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAqB;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,gCAAsB;AAGpD;;;;;;GAMG;AACH,wBAAsB,KAAK,CACzB,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,cAAc,qBAoBzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implementation.mjs","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,gCAAsB;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,
|
|
1
|
+
{"version":3,"file":"implementation.mjs","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,gCAAsB;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,MAAuB,EACvB,OAAwB;IAExB,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpD,OAAO,MAAM,IAAI,OAAO,CAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrD,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;YACxB,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACjB,OAAO;YACT,CAAC;YAED,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE;gBAC5B,IAAI,UAAU,EAAE,CAAC;oBACf,MAAM,CAAC,UAAU,CAAC,CAAC;oBACnB,OAAO;gBACT,CAAC;gBAED,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { Compiler } from 'webpack';\n\nimport type { ProcessedConfig } from '../../config';\nimport type { WebpackOptions } from '../../webpack';\nimport { getCompiler } from '../../webpack';\n\n/**\n * Build the snap bundle. This uses Webpack to build the bundle.\n *\n * @param config - The config object.\n * @param options - The Webpack options.\n * @returns A promise that resolves when the bundle is built.\n */\nexport async function build(\n config: ProcessedConfig,\n options?: WebpackOptions,\n) {\n const compiler = await getCompiler(config, options);\n return await new Promise<Compiler>((resolve, reject) => {\n compiler.run((runError) => {\n if (runError) {\n reject(runError);\n return;\n }\n\n compiler.close((closeError) => {\n if (closeError) {\n reject(closeError);\n return;\n }\n\n resolve(compiler);\n });\n });\n });\n}\n"]}
|
|
@@ -17,29 +17,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
|
|
20
|
+
exports.steps = void 0;
|
|
21
21
|
const build_1 = require("./build.cjs");
|
|
22
|
+
const builders_1 = __importDefault(require("../../builders.cjs"));
|
|
22
23
|
const command = {
|
|
23
24
|
command: ['build', 'b'],
|
|
24
25
|
desc: 'Build snap from source',
|
|
25
26
|
builder: (yarg) => {
|
|
26
27
|
yarg
|
|
27
|
-
.option('analyze', builders_1.default.analyze)
|
|
28
|
-
.option('dist', builders_1.default.dist)
|
|
29
|
-
.option('eval', builders_1.default.eval)
|
|
30
|
-
.option('manifest', builders_1.default.manifest)
|
|
31
|
-
.option('outfileName', builders_1.default.outfileName)
|
|
32
|
-
.option('sourceMaps', builders_1.default.sourceMaps)
|
|
33
|
-
.option('src', builders_1.default.src)
|
|
34
|
-
.option('stripComments', builders_1.default.stripComments)
|
|
35
|
-
.option('transpilationMode', builders_1.default.transpilationMode)
|
|
36
|
-
.option('depsToTranspile', builders_1.default.depsToTranspile)
|
|
37
|
-
.option('writeManifest', builders_1.default.writeManifest)
|
|
38
|
-
.implies('writeManifest', 'manifest')
|
|
39
|
-
.implies('depsToTranspile', 'transpilationMode');
|
|
28
|
+
.option('analyze', builders_1.default.analyze);
|
|
40
29
|
},
|
|
41
30
|
handler: async (argv) => (0, build_1.buildHandler)(argv.context.config, argv.analyze),
|
|
42
31
|
};
|
|
43
32
|
__exportStar(require("./implementation.cjs"), exports);
|
|
33
|
+
var build_2 = require("./build.cjs");
|
|
34
|
+
Object.defineProperty(exports, "steps", { enumerable: true, get: function () { return build_2.steps; } });
|
|
44
35
|
exports.default = command;
|
|
45
36
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA,uCAAuC;AACvC,kEAAsC;AAGtC,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC;IACvB,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,CAAC,IAAgB,EAAE,EAAE;QAC5B,IAAI;aACD,MAAM,CAAC,SAAS,EAAE,kBAAQ,CAAC,OAAO,CAAC,CAAA;IACxC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAe,EAAE,EAAE,CACjC,IAAA,oBAAY,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC;CAClD,CAAC;AAEF,uDAAiC;AACjC,qCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,kBAAe,OAAO,CAAC","sourcesContent":["import type yargs from 'yargs';\n\nimport { buildHandler } from './build';\nimport builders from '../../builders';\nimport type { YargsArgs } from '../../types/yargs';\n\nconst command = {\n command: ['build', 'b'],\n desc: 'Build snap from source',\n builder: (yarg: yargs.Argv) => {\n yarg\n .option('analyze', builders.analyze)\n },\n handler: async (argv: YargsArgs) =>\n buildHandler(argv.context.config, argv.analyze),\n};\n\nexport * from './implementation';\nexport { steps } from './build';\nexport default command;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;oBAIJ,SAAS;CAEhC,CAAC;AAEF,qCAAiC;AACjC,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;oBAIJ,SAAS;CAEhC,CAAC;AAEF,qCAAiC;AACjC,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,eAAe,OAAO,CAAC"}
|
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
import builders from "../../builders.mjs";
|
|
2
1
|
import { buildHandler } from "./build.mjs";
|
|
2
|
+
import builders from "../../builders.mjs";
|
|
3
3
|
const command = {
|
|
4
4
|
command: ['build', 'b'],
|
|
5
5
|
desc: 'Build snap from source',
|
|
6
6
|
builder: (yarg) => {
|
|
7
7
|
yarg
|
|
8
|
-
.option('analyze', builders.analyze)
|
|
9
|
-
.option('dist', builders.dist)
|
|
10
|
-
.option('eval', builders.eval)
|
|
11
|
-
.option('manifest', builders.manifest)
|
|
12
|
-
.option('outfileName', builders.outfileName)
|
|
13
|
-
.option('sourceMaps', builders.sourceMaps)
|
|
14
|
-
.option('src', builders.src)
|
|
15
|
-
.option('stripComments', builders.stripComments)
|
|
16
|
-
.option('transpilationMode', builders.transpilationMode)
|
|
17
|
-
.option('depsToTranspile', builders.depsToTranspile)
|
|
18
|
-
.option('writeManifest', builders.writeManifest)
|
|
19
|
-
.implies('writeManifest', 'manifest')
|
|
20
|
-
.implies('depsToTranspile', 'transpilationMode');
|
|
8
|
+
.option('analyze', builders.analyze);
|
|
21
9
|
},
|
|
22
10
|
handler: async (argv) => buildHandler(argv.context.config, argv.analyze),
|
|
23
11
|
};
|
|
24
12
|
export * from "./implementation.mjs";
|
|
13
|
+
export { steps } from "./build.mjs";
|
|
25
14
|
export default command;
|
|
26
15
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/commands/build/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,oBAAgB;AACvC,OAAO,QAAQ,2BAAuB;AAGtC,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC;IACvB,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,CAAC,IAAgB,EAAE,EAAE;QAC5B,IAAI;aACD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAe,EAAE,EAAE,CACjC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC;CAClD,CAAC;AAEF,qCAAiC;AACjC,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,eAAe,OAAO,CAAC","sourcesContent":["import type yargs from 'yargs';\n\nimport { buildHandler } from './build';\nimport builders from '../../builders';\nimport type { YargsArgs } from '../../types/yargs';\n\nconst command = {\n command: ['build', 'b'],\n desc: 'Build snap from source',\n builder: (yarg: yargs.Argv) => {\n yarg\n .option('analyze', builders.analyze)\n },\n handler: async (argv: YargsArgs) =>\n buildHandler(argv.context.config, argv.analyze),\n};\n\nexport * from './implementation';\nexport { steps } from './build';\nexport default command;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.cjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAe;IACzB,
|
|
1
|
+
{"version":3,"file":"snap.config.cjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAe;IACzB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,SAAS;KACpB;CACF,CAAC;AAEF,kBAAe,MAAM,CAAC","sourcesContent":["import type { SnapConfig } from '../../../../../config';\n\nconst config: SnapConfig = {\n input: 'src/index.ts',\n output: {\n path: __dirname,\n filename: 'eval.js',\n },\n};\n\nexport default config;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.d.cts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"snap.config.d.cts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,UAMb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"snap.config.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,UAMb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.mjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,MAAM,MAAM,GAAe;IACzB,
|
|
1
|
+
{"version":3,"file":"snap.config.mjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/bad/snap.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,MAAM,MAAM,GAAe;IACzB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE;QACN,IAAI,6BAAW;QACf,QAAQ,EAAE,SAAS;KACpB;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import type { SnapConfig } from '../../../../../config';\n\nconst config: SnapConfig = {\n input: 'src/index.ts',\n output: {\n path: __dirname,\n filename: 'eval.js',\n },\n};\n\nexport default config;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.cjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAe;IACzB,
|
|
1
|
+
{"version":3,"file":"snap.config.cjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAe;IACzB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,SAAS;KACpB;CACF,CAAC;AAEF,kBAAe,MAAM,CAAC","sourcesContent":["import type { SnapConfig } from '../../../../../config';\n\nconst config: SnapConfig = {\n input: 'src/index.ts',\n output: {\n path: __dirname,\n filename: 'eval.js',\n },\n};\n\nexport default config;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.d.cts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"snap.config.d.cts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,UAMb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"snap.config.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kCAA8B;AAExD,QAAA,MAAM,MAAM,EAAE,UAMb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.mjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,MAAM,MAAM,GAAe;IACzB,
|
|
1
|
+
{"version":3,"file":"snap.config.mjs","sourceRoot":"","sources":["../../../../../../src/commands/eval/__test__/webpack/good/snap.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA,MAAM,MAAM,GAAe;IACzB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE;QACN,IAAI,6BAAW;QACf,QAAQ,EAAE,SAAS;KACpB;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import type { SnapConfig } from '../../../../../config';\n\nconst config: SnapConfig = {\n input: 'src/index.ts',\n output: {\n path: __dirname,\n filename: 'eval.js',\n },\n};\n\nexport default config;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.cjs","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAe;IACzB,
|
|
1
|
+
{"version":3,"file":"snap.config.cjs","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAe;IACzB,KAAK,EAAE,cAAc;CACtB,CAAC;AAEF,kBAAe,MAAM,CAAC","sourcesContent":["import type { SnapConfig } from '../../../../config';\n\nconst config: SnapConfig = {\n input: 'src/index.ts',\n};\n\nexport default config;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.d.cts","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,+BAA2B;AAErD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"snap.config.d.cts","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,+BAA2B;AAErD,QAAA,MAAM,MAAM,EAAE,UAEb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.d.mts","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,+BAA2B;AAErD,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"snap.config.d.mts","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,+BAA2B;AAErD,QAAA,MAAM,MAAM,EAAE,UAEb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snap.config.mjs","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAe;IACzB,
|
|
1
|
+
{"version":3,"file":"snap.config.mjs","sourceRoot":"","sources":["../../../../../src/commands/eval/__test__/webpack/snap.config.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAe;IACzB,KAAK,EAAE,cAAc;CACtB,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import type { SnapConfig } from '../../../../config';\n\nconst config: SnapConfig = {\n input: 'src/index.ts',\n};\n\nexport default config;\n"]}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.evaluateHandler = void 0;
|
|
4
4
|
const node_1 = require("@metamask/snaps-utils/node");
|
|
5
5
|
const path_1 = require("path");
|
|
6
|
+
const implementation_1 = require("./implementation.cjs");
|
|
6
7
|
const errors_1 = require("../../errors.cjs");
|
|
7
8
|
const utils_1 = require("../../utils/index.cjs");
|
|
8
|
-
const implementation_1 = require("./implementation.cjs");
|
|
9
9
|
const steps = [
|
|
10
10
|
{
|
|
11
11
|
name: 'Checking the input file.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval.cjs","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,+BAA+B;
|
|
1
|
+
{"version":3,"file":"eval.cjs","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,+BAA+B;AAE/B,yDAA4C;AAE5C,6CAA4C;AAE5C,iDAA4D;AAQ5D,MAAM,KAAK,GAAuB;IAChC;QACE,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YACxB,IAAI,CAAC,CAAC,MAAM,IAAA,aAAM,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBAC3B,MAAM,YAAY,GAAG,IAAA,uBAAe,EAAC,KAAK,CAAC,CAAC;gBAC5C,MAAM,IAAI,qBAAY,CACpB,0BAA0B,YAAY,iGAAiG,CACxI,CAAC;YACJ,CAAC;QACH,CAAC;KACF;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;YACjC,MAAM,IAAA,yBAAQ,EAAC,KAAK,CAAC,CAAC;YACtB,OAAO,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;KACF;CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,SAAS,aAAa,CAAC,MAAuB,EAAE,OAAoB;IAClE,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,IAAA,cAAO,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,eAAe,CACnC,MAAuB,EACvB,UAAuB,EAAE;IAEzB,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,IAAA,oBAAY,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AACvC,CAAC;AAND,0CAMC","sourcesContent":["import { isFile } from '@metamask/snaps-utils/node';\nimport { resolve } from 'path';\n\nimport { evaluate } from './implementation';\nimport type { ProcessedConfig } from '../../config';\nimport { CommandError } from '../../errors';\nimport type { Steps } from '../../utils';\nimport { executeSteps, getRelativePath } from '../../utils';\n\nexport type EvalOptions = {\n input?: string;\n};\n\nexport type EvalContext = Required<EvalOptions>;\n\nconst steps: Steps<EvalContext> = [\n {\n name: 'Checking the input file.',\n task: async ({ input }) => {\n if (!(await isFile(input))) {\n const relativePath = getRelativePath(input);\n throw new CommandError(\n `Input file not found: \"${relativePath}\". Make sure that the \"input\" field in your snap config or the specified input file is correct.`,\n );\n }\n },\n },\n {\n name: 'Evaluating the snap bundle.',\n task: async ({ input, spinner }) => {\n await evaluate(input);\n spinner.succeed('Snap bundle evaluated successfully.');\n },\n },\n];\n\n/**\n * Returns the path to the bundle, based on the config and options.\n *\n * - If `options.input` is specified, it is used as the bundle path.\n * - Otherwise, the bundle path is resolved from the config's output path and\n * filename.\n *\n * @param config - The processed config object.\n * @param options - The eval options.\n * @returns The path to the bundle.\n */\nfunction getBundlePath(config: ProcessedConfig, options: EvalOptions): string {\n if (options.input) {\n return resolve(process.cwd(), options.input);\n }\n\n return resolve(config.output.path, config.output.filename);\n}\n\n/**\n * Runs the snap in a worker, to ensure SES compatibility.\n *\n * @param config - The processed config object.\n * @param options - The eval options.\n * @returns A promise that resolves once the eval has finished.\n * @throws If the eval failed.\n */\nexport async function evaluateHandler(\n config: ProcessedConfig,\n options: EvalOptions = {},\n): Promise<void> {\n const input = getBundlePath(config, options);\n await executeSteps(steps, { input });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval.d.cts","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eval.d.cts","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAqB;AAKpD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AA0ChD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval.d.mts","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eval.d.mts","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAqB;AAKpD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;AA0ChD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,eAAe,EACvB,OAAO,GAAE,WAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isFile } from "@metamask/snaps-utils/node";
|
|
2
2
|
import { resolve } from "path";
|
|
3
|
+
import { evaluate } from "./implementation.mjs";
|
|
3
4
|
import { CommandError } from "../../errors.mjs";
|
|
4
5
|
import { executeSteps, getRelativePath } from "../../utils/index.mjs";
|
|
5
|
-
import { evaluate } from "./implementation.mjs";
|
|
6
6
|
const steps = [
|
|
7
7
|
{
|
|
8
8
|
name: 'Checking the input file.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval.mjs","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,mCAAmC;AACpD,OAAO,EAAE,OAAO,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"eval.mjs","sourceRoot":"","sources":["../../../src/commands/eval/eval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,mCAAmC;AACpD,OAAO,EAAE,OAAO,EAAE,aAAa;AAE/B,OAAO,EAAE,QAAQ,EAAE,6BAAyB;AAE5C,OAAO,EAAE,YAAY,EAAE,yBAAqB;AAE5C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,8BAAoB;AAQ5D,MAAM,KAAK,GAAuB;IAChC;QACE,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YACxB,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBAC3B,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;gBAC5C,MAAM,IAAI,YAAY,CACpB,0BAA0B,YAAY,iGAAiG,CACxI,CAAC;YACJ,CAAC;QACH,CAAC;KACF;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;YACjC,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;YACtB,OAAO,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;KACF;CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,SAAS,aAAa,CAAC,MAAuB,EAAE,OAAoB;IAClE,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAuB,EACvB,UAAuB,EAAE;IAEzB,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,YAAY,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import { isFile } from '@metamask/snaps-utils/node';\nimport { resolve } from 'path';\n\nimport { evaluate } from './implementation';\nimport type { ProcessedConfig } from '../../config';\nimport { CommandError } from '../../errors';\nimport type { Steps } from '../../utils';\nimport { executeSteps, getRelativePath } from '../../utils';\n\nexport type EvalOptions = {\n input?: string;\n};\n\nexport type EvalContext = Required<EvalOptions>;\n\nconst steps: Steps<EvalContext> = [\n {\n name: 'Checking the input file.',\n task: async ({ input }) => {\n if (!(await isFile(input))) {\n const relativePath = getRelativePath(input);\n throw new CommandError(\n `Input file not found: \"${relativePath}\". Make sure that the \"input\" field in your snap config or the specified input file is correct.`,\n );\n }\n },\n },\n {\n name: 'Evaluating the snap bundle.',\n task: async ({ input, spinner }) => {\n await evaluate(input);\n spinner.succeed('Snap bundle evaluated successfully.');\n },\n },\n];\n\n/**\n * Returns the path to the bundle, based on the config and options.\n *\n * - If `options.input` is specified, it is used as the bundle path.\n * - Otherwise, the bundle path is resolved from the config's output path and\n * filename.\n *\n * @param config - The processed config object.\n * @param options - The eval options.\n * @returns The path to the bundle.\n */\nfunction getBundlePath(config: ProcessedConfig, options: EvalOptions): string {\n if (options.input) {\n return resolve(process.cwd(), options.input);\n }\n\n return resolve(config.output.path, config.output.filename);\n}\n\n/**\n * Runs the snap in a worker, to ensure SES compatibility.\n *\n * @param config - The processed config object.\n * @param options - The eval options.\n * @returns A promise that resolves once the eval has finished.\n * @throws If the eval failed.\n */\nexport async function evaluateHandler(\n config: ProcessedConfig,\n options: EvalOptions = {},\n): Promise<void> {\n const input = getBundlePath(config, options);\n await executeSteps(steps, { input });\n}\n"]}
|
|
@@ -17,15 +17,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
const builders_1 = __importDefault(require("../../builders.cjs"));
|
|
21
20
|
const eval_1 = require("./eval.cjs");
|
|
21
|
+
const builders_1 = __importDefault(require("../../builders.cjs"));
|
|
22
22
|
const command = {
|
|
23
23
|
command: ['eval', 'e'],
|
|
24
24
|
desc: 'Attempt to evaluate snap bundle in SES',
|
|
25
25
|
builder: (yarg) => {
|
|
26
|
-
// Browserify options. These are merged into the config object.
|
|
27
|
-
yarg.option('bundle', builders_1.default.bundle);
|
|
28
|
-
// Webpack options.
|
|
29
26
|
yarg.option('input', builders_1.default.input);
|
|
30
27
|
},
|
|
31
28
|
handler: async (argv) => (0, eval_1.evaluateHandler)(argv.context.config, { input: argv.input }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,qCAAyC;AACzC,kEAAsC;AAGtC,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE,wCAAwC;IAC9C,OAAO,EAAE,CAAC,IAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,kBAAQ,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAe,EAAE,EAAE,CACjC,IAAA,sBAAe,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;CAC9D,CAAC;AAEF,uDAAiC;AACjC,kBAAe,OAAO,CAAC","sourcesContent":["import type yargs from 'yargs';\n\nimport { evaluateHandler } from './eval';\nimport builders from '../../builders';\nimport type { YargsArgs } from '../../types/yargs';\n\nconst command = {\n command: ['eval', 'e'],\n desc: 'Attempt to evaluate snap bundle in SES',\n builder: (yarg: yargs.Argv) => {\n yarg.option('input', builders.input);\n },\n handler: async (argv: YargsArgs) =>\n evaluateHandler(argv.context.config, { input: argv.input }),\n};\n\nexport * from './implementation';\nexport default command;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;oBAGJ,SAAS;CAEhC,CAAC;AAEF,qCAAiC;AACjC,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;oBAGJ,SAAS;CAEhC,CAAC;AAEF,qCAAiC;AACjC,eAAe,OAAO,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import builders from "../../builders.mjs";
|
|
2
1
|
import { evaluateHandler } from "./eval.mjs";
|
|
2
|
+
import builders from "../../builders.mjs";
|
|
3
3
|
const command = {
|
|
4
4
|
command: ['eval', 'e'],
|
|
5
5
|
desc: 'Attempt to evaluate snap bundle in SES',
|
|
6
6
|
builder: (yarg) => {
|
|
7
|
-
// Browserify options. These are merged into the config object.
|
|
8
|
-
yarg.option('bundle', builders.bundle);
|
|
9
|
-
// Webpack options.
|
|
10
7
|
yarg.option('input', builders.input);
|
|
11
8
|
},
|
|
12
9
|
handler: async (argv) => evaluateHandler(argv.context.config, { input: argv.input }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/commands/eval/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,mBAAe;AACzC,OAAO,QAAQ,2BAAuB;AAGtC,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE,wCAAwC;IAC9C,OAAO,EAAE,CAAC,IAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAe,EAAE,EAAE,CACjC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;CAC9D,CAAC;AAEF,qCAAiC;AACjC,eAAe,OAAO,CAAC","sourcesContent":["import type yargs from 'yargs';\n\nimport { evaluateHandler } from './eval';\nimport builders from '../../builders';\nimport type { YargsArgs } from '../../types/yargs';\n\nconst command = {\n command: ['eval', 'e'],\n desc: 'Attempt to evaluate snap bundle in SES',\n builder: (yarg: yargs.Argv) => {\n yarg.option('input', builders.input);\n },\n handler: async (argv: YargsArgs) =>\n evaluateHandler(argv.context.config, { input: argv.input }),\n};\n\nexport * from './implementation';\nexport default command;\n"]}
|
package/dist/commands/index.cjs
CHANGED
|
@@ -6,12 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const build_1 = __importDefault(require("./build/index.cjs"));
|
|
7
7
|
const eval_1 = __importDefault(require("./eval/index.cjs"));
|
|
8
8
|
const manifest_1 = __importDefault(require("./manifest/index.cjs"));
|
|
9
|
+
const sandbox_1 = __importDefault(require("./sandbox/index.cjs"));
|
|
9
10
|
const serve_1 = __importDefault(require("./serve/index.cjs"));
|
|
10
11
|
const watch_1 = __importDefault(require("./watch/index.cjs"));
|
|
11
12
|
const commands = [
|
|
12
13
|
build_1.default,
|
|
13
14
|
eval_1.default,
|
|
14
15
|
manifest_1.default,
|
|
16
|
+
sandbox_1.default,
|
|
15
17
|
serve_1.default,
|
|
16
18
|
watch_1.default,
|
|
17
19
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;;;AAAA,8DAAmC;AACnC,4DAAqC;AACrC,oEAAyC;AACzC,8DAAmC;AACnC,8DAAmC;AAEnC,MAAM,QAAQ,GAAG;IACf,eAAY;IACZ,cAAe;IACf,kBAAe;IACf,eAAY;IACZ,eAAY;CACb,CAAC;AAEF,kBAAe,QAAQ,CAAC","sourcesContent":["import buildCommand from './build';\nimport evaluateCommand from './eval';\nimport manifestCommand from './manifest';\nimport serveCommand from './serve';\nimport watchCommand from './watch';\n\nconst commands = [\n buildCommand,\n evaluateCommand,\n manifestCommand,\n serveCommand,\n watchCommand,\n];\n\nexport default commands;\n"]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;;;AAAA,8DAAmC;AACnC,4DAAqC;AACrC,oEAAyC;AACzC,kEAAuC;AACvC,8DAAmC;AACnC,8DAAmC;AAEnC,MAAM,QAAQ,GAAG;IACf,eAAY;IACZ,cAAe;IACf,kBAAe;IACf,iBAAc;IACd,eAAY;IACZ,eAAY;CACb,CAAC;AAEF,kBAAe,QAAQ,CAAC","sourcesContent":["import buildCommand from './build';\nimport evaluateCommand from './eval';\nimport manifestCommand from './manifest';\nimport sandboxCommand from './sandbox';\nimport serveCommand from './serve';\nimport watchCommand from './watch';\n\nconst commands = [\n buildCommand,\n evaluateCommand,\n manifestCommand,\n sandboxCommand,\n serveCommand,\n watchCommand,\n];\n\nexport default commands;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";AAOA,QAAA,MAAM,QAAQ;;;;;GAOb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";AAOA,QAAA,MAAM,QAAQ;;;;;GAOb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/dist/commands/index.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import buildCommand from "./build/index.mjs";
|
|
2
2
|
import evaluateCommand from "./eval/index.mjs";
|
|
3
3
|
import manifestCommand from "./manifest/index.mjs";
|
|
4
|
+
import sandboxCommand from "./sandbox/index.mjs";
|
|
4
5
|
import serveCommand from "./serve/index.mjs";
|
|
5
6
|
import watchCommand from "./watch/index.mjs";
|
|
6
7
|
const commands = [
|
|
7
8
|
buildCommand,
|
|
8
9
|
evaluateCommand,
|
|
9
10
|
manifestCommand,
|
|
11
|
+
sandboxCommand,
|
|
10
12
|
serveCommand,
|
|
11
13
|
watchCommand,
|
|
12
14
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,0BAAgB;AACnC,OAAO,eAAe,yBAAe;AACrC,OAAO,eAAe,6BAAmB;AACzC,OAAO,YAAY,0BAAgB;AACnC,OAAO,YAAY,0BAAgB;AAEnC,MAAM,QAAQ,GAAG;IACf,YAAY;IACZ,eAAe;IACf,eAAe;IACf,YAAY;IACZ,YAAY;CACb,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import buildCommand from './build';\nimport evaluateCommand from './eval';\nimport manifestCommand from './manifest';\nimport serveCommand from './serve';\nimport watchCommand from './watch';\n\nconst commands = [\n buildCommand,\n evaluateCommand,\n manifestCommand,\n serveCommand,\n watchCommand,\n];\n\nexport default commands;\n"]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,0BAAgB;AACnC,OAAO,eAAe,yBAAe;AACrC,OAAO,eAAe,6BAAmB;AACzC,OAAO,cAAc,4BAAkB;AACvC,OAAO,YAAY,0BAAgB;AACnC,OAAO,YAAY,0BAAgB;AAEnC,MAAM,QAAQ,GAAG;IACf,YAAY;IACZ,eAAe;IACf,eAAe;IACf,cAAc;IACd,YAAY;IACZ,YAAY;CACb,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import buildCommand from './build';\nimport evaluateCommand from './eval';\nimport manifestCommand from './manifest';\nimport sandboxCommand from './sandbox';\nimport serveCommand from './serve';\nimport watchCommand from './watch';\n\nconst commands = [\n buildCommand,\n evaluateCommand,\n manifestCommand,\n sandboxCommand,\n serveCommand,\n watchCommand,\n];\n\nexport default commands;\n"]}
|
|
@@ -17,15 +17,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
const builders_1 = __importDefault(require("../../builders.cjs"));
|
|
21
20
|
const manifest_1 = require("./manifest.cjs");
|
|
21
|
+
const builders_1 = __importDefault(require("../../builders.cjs"));
|
|
22
22
|
const command = {
|
|
23
23
|
command: ['manifest', 'm'],
|
|
24
24
|
desc: 'Validate the snap.manifest.json file',
|
|
25
25
|
builder: (yarg) => {
|
|
26
|
-
// Browserify options. These are merged into the config object.
|
|
27
|
-
yarg.option('writeManifest', builders_1.default.writeManifest);
|
|
28
|
-
// Webpack options.
|
|
29
26
|
yarg.option('fix', builders_1.default.fix);
|
|
30
27
|
},
|
|
31
28
|
handler: async (argv) => (0, manifest_1.manifestHandler)(argv.context.config, { fix: argv.fix }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,6CAA6C;AAC7C,kEAAsC;AAGtC,MAAM,OAAO,GAAG;IACd,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC;IAC1B,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,CAAC,IAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAQ,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAe,EAAE,EAAE,CACjC,IAAA,0BAAe,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;CAC1D,CAAC;AAEF,uDAAiC;AACjC,kBAAe,OAAO,CAAC","sourcesContent":["import type yargs from 'yargs';\n\nimport { manifestHandler } from './manifest';\nimport builders from '../../builders';\nimport type { YargsArgs } from '../../types/yargs';\n\nconst command = {\n command: ['manifest', 'm'],\n desc: 'Validate the snap.manifest.json file',\n builder: (yarg: yargs.Argv) => {\n yarg.option('fix', builders.fix);\n },\n handler: async (argv: YargsArgs) =>\n manifestHandler(argv.context.config, { fix: argv.fix }),\n};\n\nexport * from './implementation';\nexport default command;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;oBAGJ,SAAS;CAEhC,CAAC;AAEF,qCAAiC;AACjC,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/commands/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,cAAc;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;oBAGJ,SAAS;CAEhC,CAAC;AAEF,qCAAiC;AACjC,eAAe,OAAO,CAAC"}
|