@metamask/snaps-cli 7.0.0 → 7.2.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 +22 -1
- package/README.md +1 -0
- package/dist/builders.cjs +9 -0
- package/dist/builders.cjs.map +1 -1
- package/dist/builders.d.cts +9 -0
- package/dist/builders.d.cts.map +1 -1
- package/dist/builders.d.mts +9 -0
- package/dist/builders.d.mts.map +1 -1
- package/dist/builders.mjs +9 -0
- package/dist/builders.mjs.map +1 -1
- package/dist/commands/build/build.cjs +12 -23
- package/dist/commands/build/build.cjs.map +1 -1
- package/dist/commands/build/build.d.cts +9 -0
- package/dist/commands/build/build.d.cts.map +1 -1
- package/dist/commands/build/build.d.mts +9 -0
- package/dist/commands/build/build.d.mts.map +1 -1
- package/dist/commands/build/build.mjs +11 -22
- 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.map +1 -1
- 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 +4 -2
- 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 +2 -2
- package/dist/commands/build/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/implementation.cjs +8 -4
- package/dist/commands/manifest/implementation.cjs.map +1 -1
- package/dist/commands/manifest/implementation.d.cts +2 -1
- package/dist/commands/manifest/implementation.d.cts.map +1 -1
- package/dist/commands/manifest/implementation.d.mts +2 -1
- package/dist/commands/manifest/implementation.d.mts.map +1 -1
- package/dist/commands/manifest/implementation.mjs +8 -4
- package/dist/commands/manifest/implementation.mjs.map +1 -1
- package/dist/commands/manifest/index.cjs +5 -1
- 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 +5 -1
- package/dist/commands/manifest/index.mjs.map +1 -1
- package/dist/commands/manifest/manifest.cjs +20 -4
- package/dist/commands/manifest/manifest.cjs.map +1 -1
- package/dist/commands/manifest/manifest.d.cts +1 -0
- package/dist/commands/manifest/manifest.d.cts.map +1 -1
- package/dist/commands/manifest/manifest.d.mts +1 -0
- package/dist/commands/manifest/manifest.d.mts.map +1 -1
- package/dist/commands/manifest/manifest.mjs +21 -5
- 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/watch/watch.cjs +1 -1
- package/dist/commands/watch/watch.cjs.map +1 -1
- package/dist/commands/watch/watch.mjs +1 -1
- package/dist/commands/watch/watch.mjs.map +1 -1
- package/dist/webpack/config.cjs +1 -1
- package/dist/webpack/config.cjs.map +1 -1
- package/dist/webpack/config.d.cts.map +1 -1
- package/dist/webpack/config.d.mts.map +1 -1
- package/dist/webpack/config.mjs +1 -1
- package/dist/webpack/config.mjs.map +1 -1
- package/dist/webpack/plugins.cjs +2 -2
- package/dist/webpack/plugins.cjs.map +1 -1
- package/dist/webpack/plugins.d.cts.map +1 -1
- package/dist/webpack/plugins.d.mts.map +1 -1
- package/dist/webpack/plugins.mjs +2 -2
- 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/package.json +11 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [7.2.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Validate platform version against production ([#3417](https://github.com/MetaMask/snaps/pull/3417))
|
|
15
|
+
- Detect unused permissions ([#3335](https://github.com/MetaMask/snaps/pull/3335))
|
|
16
|
+
|
|
17
|
+
## [7.1.0]
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Add `sandbox` command to run sandbox tool ([#3306](https://github.com/MetaMask/snaps/pull/3306))
|
|
22
|
+
- This command allows you to run the Snaps sandbox tool, which is useful for
|
|
23
|
+
quickly testing and debugging Snaps.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Bump `@metamask/utils` from `11.2.0` to `11.4.0` ([#3232](https://github.com/MetaMask/snaps/pull/3232))
|
|
28
|
+
|
|
10
29
|
## [7.0.0]
|
|
11
30
|
|
|
12
31
|
### Changed
|
|
@@ -350,7 +369,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
350
369
|
- The version of the package no longer needs to match the version of all other
|
|
351
370
|
MetaMask Snaps packages.
|
|
352
371
|
|
|
353
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@7.
|
|
372
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@7.2.0...HEAD
|
|
373
|
+
[7.2.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@7.1.0...@metamask/snaps-cli@7.2.0
|
|
374
|
+
[7.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@7.0.0...@metamask/snaps-cli@7.1.0
|
|
354
375
|
[7.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.7.0...@metamask/snaps-cli@7.0.0
|
|
355
376
|
[6.7.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.6.1...@metamask/snaps-cli@6.7.0
|
|
356
377
|
[6.6.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.6.0...@metamask/snaps-cli@6.6.1
|
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ Commands:
|
|
|
21
21
|
mm-snap build Build snap from source [aliases: b]
|
|
22
22
|
mm-snap eval Attempt to evaluate snap bundle in SES [aliases: e]
|
|
23
23
|
mm-snap manifest Validate the snap.manifest.json file [aliases: m]
|
|
24
|
+
mm-snap sandbox Start a sandbox server to interact with the Snap
|
|
24
25
|
mm-snap serve Locally serve Snap file(s) for testing [aliases: s]
|
|
25
26
|
mm-snap watch Build Snap on change [aliases: w]
|
|
26
27
|
|
package/dist/builders.cjs
CHANGED
|
@@ -5,12 +5,21 @@ const builders = {
|
|
|
5
5
|
describe: 'Analyze the Snap bundle',
|
|
6
6
|
type: 'boolean',
|
|
7
7
|
},
|
|
8
|
+
build: {
|
|
9
|
+
describe: 'Build the Snap bundle',
|
|
10
|
+
type: 'boolean',
|
|
11
|
+
default: true,
|
|
12
|
+
},
|
|
8
13
|
config: {
|
|
9
14
|
alias: 'c',
|
|
10
15
|
describe: 'Path to config file',
|
|
11
16
|
type: 'string',
|
|
12
17
|
normalize: true,
|
|
13
18
|
},
|
|
19
|
+
eval: {
|
|
20
|
+
describe: 'Evaluate the Snap bundle',
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
},
|
|
14
23
|
fix: {
|
|
15
24
|
describe: 'Attempt to fix snap.manifest.json',
|
|
16
25
|
type: 'boolean',
|
package/dist/builders.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.cjs","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE;QACP,QAAQ,EAAE,yBAAyB;QACnC,IAAI,EAAE,SAAS;KAChB;IAED,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,qBAAqB;QAC/B,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,GAAG,EAAE;QACH,QAAQ,EAAE,mCAAmC;QAC7C,IAAI,EAAE,SAAS;KAChB;IAED,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,8BAA8B;QACxC,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,+BAA+B;QACzC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,CAAC,GAAY,EAAE,EAAE;YACvB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KACF;CACmD,CAAC;AAEvD,kBAAe,QAAQ,CAAC","sourcesContent":["import type { Options } from 'yargs';\n\nconst builders = {\n analyze: {\n describe: 'Analyze the Snap bundle',\n type: 'boolean',\n },\n\n config: {\n alias: 'c',\n describe: 'Path to config file',\n type: 'string',\n normalize: true,\n },\n\n fix: {\n describe: 'Attempt to fix snap.manifest.json',\n type: 'boolean',\n },\n\n input: {\n alias: 'i',\n describe: 'Snap bundle file to evaluate',\n type: 'string',\n normalize: true,\n },\n\n port: {\n alias: 'p',\n describe: 'Local server port for testing',\n type: 'number',\n coerce: (arg: unknown) => {\n const port = Number.parseInt(String(arg), 10);\n if (Number.isNaN(port)) {\n throw new Error(`Invalid port: \"${String(arg)}\".`);\n }\n\n return port;\n },\n },\n} as const satisfies Record<string, Readonly<Options>>;\n\nexport default builders;\n"]}
|
|
1
|
+
{"version":3,"file":"builders.cjs","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE;QACP,QAAQ,EAAE,yBAAyB;QACnC,IAAI,EAAE,SAAS;KAChB;IAED,KAAK,EAAE;QACL,QAAQ,EAAE,uBAAuB;QACjC,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;KACd;IAED,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,qBAAqB;QAC/B,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,IAAI,EAAE;QACJ,QAAQ,EAAE,0BAA0B;QACpC,IAAI,EAAE,SAAS;KAChB;IAED,GAAG,EAAE;QACH,QAAQ,EAAE,mCAAmC;QAC7C,IAAI,EAAE,SAAS;KAChB;IAED,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,8BAA8B;QACxC,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,+BAA+B;QACzC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,CAAC,GAAY,EAAE,EAAE;YACvB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KACF;CACmD,CAAC;AAEvD,kBAAe,QAAQ,CAAC","sourcesContent":["import type { Options } from 'yargs';\n\nconst builders = {\n analyze: {\n describe: 'Analyze the Snap bundle',\n type: 'boolean',\n },\n\n build: {\n describe: 'Build the Snap bundle',\n type: 'boolean',\n default: true,\n },\n\n config: {\n alias: 'c',\n describe: 'Path to config file',\n type: 'string',\n normalize: true,\n },\n\n eval: {\n describe: 'Evaluate the Snap bundle',\n type: 'boolean',\n },\n\n fix: {\n describe: 'Attempt to fix snap.manifest.json',\n type: 'boolean',\n },\n\n input: {\n alias: 'i',\n describe: 'Snap bundle file to evaluate',\n type: 'string',\n normalize: true,\n },\n\n port: {\n alias: 'p',\n describe: 'Local server port for testing',\n type: 'number',\n coerce: (arg: unknown) => {\n const port = Number.parseInt(String(arg), 10);\n if (Number.isNaN(port)) {\n throw new Error(`Invalid port: \"${String(arg)}\".`);\n }\n\n return port;\n },\n },\n} as const satisfies Record<string, Readonly<Options>>;\n\nexport default builders;\n"]}
|
package/dist/builders.d.cts
CHANGED
|
@@ -3,12 +3,21 @@ declare const builders: {
|
|
|
3
3
|
readonly describe: "Analyze the Snap bundle";
|
|
4
4
|
readonly type: "boolean";
|
|
5
5
|
};
|
|
6
|
+
readonly build: {
|
|
7
|
+
readonly describe: "Build the Snap bundle";
|
|
8
|
+
readonly type: "boolean";
|
|
9
|
+
readonly default: true;
|
|
10
|
+
};
|
|
6
11
|
readonly config: {
|
|
7
12
|
readonly alias: "c";
|
|
8
13
|
readonly describe: "Path to config file";
|
|
9
14
|
readonly type: "string";
|
|
10
15
|
readonly normalize: true;
|
|
11
16
|
};
|
|
17
|
+
readonly eval: {
|
|
18
|
+
readonly describe: "Evaluate the Snap bundle";
|
|
19
|
+
readonly type: "boolean";
|
|
20
|
+
};
|
|
12
21
|
readonly fix: {
|
|
13
22
|
readonly describe: "Attempt to fix snap.manifest.json";
|
|
14
23
|
readonly type: "boolean";
|
package/dist/builders.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.cts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"builders.d.cts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAwCI,OAAO;;CAS6B,CAAC;AAEvD,eAAe,QAAQ,CAAC"}
|
package/dist/builders.d.mts
CHANGED
|
@@ -3,12 +3,21 @@ declare const builders: {
|
|
|
3
3
|
readonly describe: "Analyze the Snap bundle";
|
|
4
4
|
readonly type: "boolean";
|
|
5
5
|
};
|
|
6
|
+
readonly build: {
|
|
7
|
+
readonly describe: "Build the Snap bundle";
|
|
8
|
+
readonly type: "boolean";
|
|
9
|
+
readonly default: true;
|
|
10
|
+
};
|
|
6
11
|
readonly config: {
|
|
7
12
|
readonly alias: "c";
|
|
8
13
|
readonly describe: "Path to config file";
|
|
9
14
|
readonly type: "string";
|
|
10
15
|
readonly normalize: true;
|
|
11
16
|
};
|
|
17
|
+
readonly eval: {
|
|
18
|
+
readonly describe: "Evaluate the Snap bundle";
|
|
19
|
+
readonly type: "boolean";
|
|
20
|
+
};
|
|
12
21
|
readonly fix: {
|
|
13
22
|
readonly describe: "Attempt to fix snap.manifest.json";
|
|
14
23
|
readonly type: "boolean";
|
package/dist/builders.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.mts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"builders.d.mts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAwCI,OAAO;;CAS6B,CAAC;AAEvD,eAAe,QAAQ,CAAC"}
|
package/dist/builders.mjs
CHANGED
|
@@ -3,12 +3,21 @@ const builders = {
|
|
|
3
3
|
describe: 'Analyze the Snap bundle',
|
|
4
4
|
type: 'boolean',
|
|
5
5
|
},
|
|
6
|
+
build: {
|
|
7
|
+
describe: 'Build the Snap bundle',
|
|
8
|
+
type: 'boolean',
|
|
9
|
+
default: true,
|
|
10
|
+
},
|
|
6
11
|
config: {
|
|
7
12
|
alias: 'c',
|
|
8
13
|
describe: 'Path to config file',
|
|
9
14
|
type: 'string',
|
|
10
15
|
normalize: true,
|
|
11
16
|
},
|
|
17
|
+
eval: {
|
|
18
|
+
describe: 'Evaluate the Snap bundle',
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
},
|
|
12
21
|
fix: {
|
|
13
22
|
describe: 'Attempt to fix snap.manifest.json',
|
|
14
23
|
type: 'boolean',
|
package/dist/builders.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.mjs","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE;QACP,QAAQ,EAAE,yBAAyB;QACnC,IAAI,EAAE,SAAS;KAChB;IAED,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,qBAAqB;QAC/B,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,GAAG,EAAE;QACH,QAAQ,EAAE,mCAAmC;QAC7C,IAAI,EAAE,SAAS;KAChB;IAED,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,8BAA8B;QACxC,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,+BAA+B;QACzC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,CAAC,GAAY,EAAE,EAAE;YACvB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KACF;CACmD,CAAC;AAEvD,eAAe,QAAQ,CAAC","sourcesContent":["import type { Options } from 'yargs';\n\nconst builders = {\n analyze: {\n describe: 'Analyze the Snap bundle',\n type: 'boolean',\n },\n\n config: {\n alias: 'c',\n describe: 'Path to config file',\n type: 'string',\n normalize: true,\n },\n\n fix: {\n describe: 'Attempt to fix snap.manifest.json',\n type: 'boolean',\n },\n\n input: {\n alias: 'i',\n describe: 'Snap bundle file to evaluate',\n type: 'string',\n normalize: true,\n },\n\n port: {\n alias: 'p',\n describe: 'Local server port for testing',\n type: 'number',\n coerce: (arg: unknown) => {\n const port = Number.parseInt(String(arg), 10);\n if (Number.isNaN(port)) {\n throw new Error(`Invalid port: \"${String(arg)}\".`);\n }\n\n return port;\n },\n },\n} as const satisfies Record<string, Readonly<Options>>;\n\nexport default builders;\n"]}
|
|
1
|
+
{"version":3,"file":"builders.mjs","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG;IACf,OAAO,EAAE;QACP,QAAQ,EAAE,yBAAyB;QACnC,IAAI,EAAE,SAAS;KAChB;IAED,KAAK,EAAE;QACL,QAAQ,EAAE,uBAAuB;QACjC,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;KACd;IAED,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,qBAAqB;QAC/B,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,IAAI,EAAE;QACJ,QAAQ,EAAE,0BAA0B;QACpC,IAAI,EAAE,SAAS;KAChB;IAED,GAAG,EAAE;QACH,QAAQ,EAAE,mCAAmC;QAC7C,IAAI,EAAE,SAAS;KAChB;IAED,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,8BAA8B;QACxC,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,IAAI;KAChB;IAED,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,+BAA+B;QACzC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,CAAC,GAAY,EAAE,EAAE;YACvB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KACF;CACmD,CAAC;AAEvD,eAAe,QAAQ,CAAC","sourcesContent":["import type { Options } from 'yargs';\n\nconst builders = {\n analyze: {\n describe: 'Analyze the Snap bundle',\n type: 'boolean',\n },\n\n build: {\n describe: 'Build the Snap bundle',\n type: 'boolean',\n default: true,\n },\n\n config: {\n alias: 'c',\n describe: 'Path to config file',\n type: 'string',\n normalize: true,\n },\n\n eval: {\n describe: 'Evaluate the Snap bundle',\n type: 'boolean',\n },\n\n fix: {\n describe: 'Attempt to fix snap.manifest.json',\n type: 'boolean',\n },\n\n input: {\n alias: 'i',\n describe: 'Snap bundle file to evaluate',\n type: 'string',\n normalize: true,\n },\n\n port: {\n alias: 'p',\n describe: 'Local server port for testing',\n type: 'number',\n coerce: (arg: unknown) => {\n const port = Number.parseInt(String(arg), 10);\n if (Number.isNaN(port)) {\n throw new Error(`Invalid port: \"${String(arg)}\".`);\n }\n\n return port;\n },\n },\n} as const satisfies Record<string, Readonly<Options>>;\n\nexport default builders;\n"]}
|
|
@@ -1,54 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildHandler = void 0;
|
|
3
|
+
exports.buildHandler = exports.steps = void 0;
|
|
4
4
|
const node_1 = require("@metamask/snaps-utils/node");
|
|
5
5
|
const utils_1 = require("@metamask/utils");
|
|
6
|
-
const path_1 = require("path");
|
|
7
6
|
const implementation_1 = require("./implementation.cjs");
|
|
8
7
|
const utils_2 = require("./utils.cjs");
|
|
9
8
|
const errors_1 = require("../../errors.cjs");
|
|
10
9
|
const utils_3 = require("../../utils/index.cjs");
|
|
11
|
-
|
|
12
|
-
const steps = [
|
|
10
|
+
exports.steps = [
|
|
13
11
|
{
|
|
14
12
|
name: 'Checking the input file.',
|
|
13
|
+
condition: ({ build: enableBuild }) => enableBuild,
|
|
15
14
|
task: async ({ config }) => {
|
|
16
15
|
const { input } = config;
|
|
17
16
|
if (!(await (0, node_1.isFile)(input))) {
|
|
18
|
-
throw new errors_1.CommandError(`Input file not found: "${input}". Make sure that the "input" field in your
|
|
17
|
+
throw new errors_1.CommandError(`Input file not found: "${input}". Make sure that the "input" field in your Snap config is correct.`);
|
|
19
18
|
}
|
|
20
19
|
},
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
|
-
name: 'Building the
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
name: 'Building the Snap bundle.',
|
|
23
|
+
condition: ({ build: enableBuild }) => enableBuild,
|
|
24
|
+
task: async (context) => {
|
|
25
|
+
const { analyze, config, spinner } = context;
|
|
27
26
|
const compiler = await (0, implementation_1.build)(config, {
|
|
28
27
|
analyze,
|
|
29
|
-
evaluate:
|
|
28
|
+
evaluate: config.evaluate,
|
|
30
29
|
spinner,
|
|
31
30
|
});
|
|
32
31
|
if (analyze) {
|
|
33
32
|
return {
|
|
34
|
-
|
|
35
|
-
config,
|
|
36
|
-
spinner,
|
|
33
|
+
...context,
|
|
37
34
|
port: await (0, utils_2.getBundleAnalyzerPort)(compiler),
|
|
38
35
|
};
|
|
39
36
|
}
|
|
40
37
|
return undefined;
|
|
41
38
|
},
|
|
42
39
|
},
|
|
43
|
-
{
|
|
44
|
-
name: 'Evaluating the snap bundle.',
|
|
45
|
-
condition: ({ config }) => config.evaluate,
|
|
46
|
-
task: async ({ config, spinner }) => {
|
|
47
|
-
const path = (0, path_1.resolve)(process.cwd(), config.output.path, config.output.filename);
|
|
48
|
-
await (0, eval_1.evaluate)(path);
|
|
49
|
-
(0, utils_3.info)(`Snap bundle evaluated successfully.`, spinner);
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
40
|
{
|
|
53
41
|
name: 'Running analyser.',
|
|
54
42
|
condition: ({ analyze }) => analyze,
|
|
@@ -70,7 +58,8 @@ const steps = [
|
|
|
70
58
|
* @returns Nothing.
|
|
71
59
|
*/
|
|
72
60
|
async function buildHandler(config, analyze = false) {
|
|
73
|
-
return await (0, utils_3.executeSteps)(steps, {
|
|
61
|
+
return await (0, utils_3.executeSteps)(exports.steps, {
|
|
62
|
+
build: true,
|
|
74
63
|
config,
|
|
75
64
|
analyze,
|
|
76
65
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.cjs","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,2CAAyC;
|
|
1
|
+
{"version":3,"file":"build.cjs","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,2CAAyC;AAEzC,yDAAyC;AACzC,uCAAgD;AAEhD,6CAA4C;AAE5C,iDAAoD;AAUvC,QAAA,KAAK,GAAwB;IACxC;QACE,IAAI,EAAE,0BAA0B;QAChC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW;QAClD,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACzB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;YAEzB,IAAI,CAAC,CAAC,MAAM,IAAA,aAAM,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBAC3B,MAAM,IAAI,qBAAY,CACpB,0BAA0B,KAAK,qEAAqE,CACrG,CAAC;YACJ,CAAC;QACH,CAAC;KACF;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW;QAClD,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACtB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;YAE7C,MAAM,QAAQ,GAAG,MAAM,IAAA,sBAAK,EAAC,MAAM,EAAE;gBACnC,OAAO;gBACP,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO;aACR,CAAC,CAAC;YAEH,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO;oBACL,GAAG,OAAO;oBACV,IAAI,EAAE,MAAM,IAAA,6BAAqB,EAAC,QAAQ,CAAC;iBAC5C,CAAC;YACJ,CAAC;YAED,OAAO,SAAS,CAAC;QACnB,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,IAAA,cAAM,EAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;YACrC,IAAA,eAAO,EAAC,+CAA+C,IAAI,GAAG,EAAE,OAAO,CAAC,CAAC;YAEzE,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,CAAC;KACF;CACO,CAAC;AAEX;;;;;;;;;GASG;AACI,KAAK,UAAU,YAAY,CAChC,MAAuB,EACvB,OAAO,GAAG,KAAK;IAEf,OAAO,MAAM,IAAA,oBAAY,EAAC,aAAK,EAAE;QAC/B,KAAK,EAAE,IAAI;QACX,MAAM;QACN,OAAO;KACR,CAAC,CAAC;AACL,CAAC;AATD,oCASC","sourcesContent":["import { isFile } from '@metamask/snaps-utils/node';\nimport { assert } from '@metamask/utils';\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 } from '../../utils';\n\nexport type BuildContext = {\n analyze: boolean;\n build: boolean;\n config: ProcessedConfig;\n exports?: string[];\n port?: number;\n};\n\nexport const steps: Steps<BuildContext> = [\n {\n name: 'Checking the input file.',\n condition: ({ build: enableBuild }) => enableBuild,\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: enableBuild }) => enableBuild,\n task: async (context) => {\n const { analyze, config, spinner } = context;\n\n const compiler = await build(config, {\n analyze,\n evaluate: config.evaluate,\n spinner,\n });\n\n if (analyze) {\n return {\n ...context,\n port: await getBundleAnalyzerPort(compiler),\n };\n }\n\n return undefined;\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,4 +1,13 @@
|
|
|
1
1
|
import type { ProcessedConfig } from "../../config.cjs";
|
|
2
|
+
import type { Steps } from "../../utils/index.cjs";
|
|
3
|
+
export type BuildContext = {
|
|
4
|
+
analyze: boolean;
|
|
5
|
+
build: boolean;
|
|
6
|
+
config: ProcessedConfig;
|
|
7
|
+
exports?: string[];
|
|
8
|
+
port?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const steps: Steps<BuildContext>;
|
|
2
11
|
/**
|
|
3
12
|
* Build all files in the given source directory to the given destination
|
|
4
13
|
* directory.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.cts","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.cts","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAqB;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,8BAAoB;AAGzC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,YAAY,CA8C5B,CAAC;AAEX;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,UAAQ,GACd,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { ProcessedConfig } from "../../config.mjs";
|
|
2
|
+
import type { Steps } from "../../utils/index.mjs";
|
|
3
|
+
export type BuildContext = {
|
|
4
|
+
analyze: boolean;
|
|
5
|
+
build: boolean;
|
|
6
|
+
config: ProcessedConfig;
|
|
7
|
+
exports?: string[];
|
|
8
|
+
port?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const steps: Steps<BuildContext>;
|
|
2
11
|
/**
|
|
3
12
|
* Build all files in the given source directory to the given destination
|
|
4
13
|
* directory.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.mts","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.mts","sourceRoot":"","sources":["../../../src/commands/build/build.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAqB;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,8BAAoB;AAGzC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,YAAY,CA8C5B,CAAC;AAEX;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,UAAQ,GACd,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
|
@@ -1,51 +1,39 @@
|
|
|
1
1
|
import { isFile } from "@metamask/snaps-utils/node";
|
|
2
2
|
import { assert } from "@metamask/utils";
|
|
3
|
-
import { resolve as pathResolve } from "path";
|
|
4
3
|
import { build } from "./implementation.mjs";
|
|
5
4
|
import { getBundleAnalyzerPort } from "./utils.mjs";
|
|
6
5
|
import { CommandError } from "../../errors.mjs";
|
|
7
|
-
import { success, executeSteps
|
|
8
|
-
|
|
9
|
-
const steps = [
|
|
6
|
+
import { success, executeSteps } from "../../utils/index.mjs";
|
|
7
|
+
export const steps = [
|
|
10
8
|
{
|
|
11
9
|
name: 'Checking the input file.',
|
|
10
|
+
condition: ({ build: enableBuild }) => enableBuild,
|
|
12
11
|
task: async ({ config }) => {
|
|
13
12
|
const { input } = config;
|
|
14
13
|
if (!(await isFile(input))) {
|
|
15
|
-
throw new CommandError(`Input file not found: "${input}". Make sure that the "input" field in your
|
|
14
|
+
throw new CommandError(`Input file not found: "${input}". Make sure that the "input" field in your Snap config is correct.`);
|
|
16
15
|
}
|
|
17
16
|
},
|
|
18
17
|
},
|
|
19
18
|
{
|
|
20
|
-
name: 'Building the
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
name: 'Building the Snap bundle.',
|
|
20
|
+
condition: ({ build: enableBuild }) => enableBuild,
|
|
21
|
+
task: async (context) => {
|
|
22
|
+
const { analyze, config, spinner } = context;
|
|
24
23
|
const compiler = await build(config, {
|
|
25
24
|
analyze,
|
|
26
|
-
evaluate:
|
|
25
|
+
evaluate: config.evaluate,
|
|
27
26
|
spinner,
|
|
28
27
|
});
|
|
29
28
|
if (analyze) {
|
|
30
29
|
return {
|
|
31
|
-
|
|
32
|
-
config,
|
|
33
|
-
spinner,
|
|
30
|
+
...context,
|
|
34
31
|
port: await getBundleAnalyzerPort(compiler),
|
|
35
32
|
};
|
|
36
33
|
}
|
|
37
34
|
return undefined;
|
|
38
35
|
},
|
|
39
36
|
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Evaluating the snap bundle.',
|
|
42
|
-
condition: ({ config }) => config.evaluate,
|
|
43
|
-
task: async ({ config, spinner }) => {
|
|
44
|
-
const path = pathResolve(process.cwd(), config.output.path, config.output.filename);
|
|
45
|
-
await evaluate(path);
|
|
46
|
-
info(`Snap bundle evaluated successfully.`, spinner);
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
37
|
{
|
|
50
38
|
name: 'Running analyser.',
|
|
51
39
|
condition: ({ analyze }) => analyze,
|
|
@@ -68,6 +56,7 @@ const steps = [
|
|
|
68
56
|
*/
|
|
69
57
|
export async function buildHandler(config, analyze = false) {
|
|
70
58
|
return await executeSteps(steps, {
|
|
59
|
+
build: true,
|
|
71
60
|
config,
|
|
72
61
|
analyze,
|
|
73
62
|
});
|
|
@@ -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;
|
|
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;AAEzC,OAAO,EAAE,KAAK,EAAE,6BAAyB;AACzC,OAAO,EAAE,qBAAqB,EAAE,oBAAgB;AAEhD,OAAO,EAAE,YAAY,EAAE,yBAAqB;AAE5C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,8BAAoB;AAUpD,MAAM,CAAC,MAAM,KAAK,GAAwB;IACxC;QACE,IAAI,EAAE,0BAA0B;QAChC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW;QAClD,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,WAAW,EAAE,EAAE,EAAE,CAAC,WAAW;QAClD,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACtB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;YAE7C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE;gBACnC,OAAO;gBACP,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO;aACR,CAAC,CAAC;YAEH,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO;oBACL,GAAG,OAAO;oBACV,IAAI,EAAE,MAAM,qBAAqB,CAAC,QAAQ,CAAC;iBAC5C,CAAC;YACJ,CAAC;YAED,OAAO,SAAS,CAAC;QACnB,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';\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 } from '../../utils';\n\nexport type BuildContext = {\n analyze: boolean;\n build: boolean;\n config: ProcessedConfig;\n exports?: string[];\n port?: number;\n};\n\nexport const steps: Steps<BuildContext> = [\n {\n name: 'Checking the input file.',\n condition: ({ build: enableBuild }) => enableBuild,\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: enableBuild }) => enableBuild,\n task: async (context) => {\n const { analyze, config, spinner } = context;\n\n const compiler = await build(config, {\n analyze,\n evaluate: config.evaluate,\n spinner,\n });\n\n if (analyze) {\n return {\n ...context,\n port: await getBundleAnalyzerPort(compiler),\n };\n }\n\n return undefined;\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,
|
|
1
|
+
{"version":3,"file":"implementation.cjs","sourceRoot":"","sources":["../../../src/commands/build/implementation.ts"],"names":[],"mappings":";;;AAIA,qDAA4C;AAE5C;;;;;;GAMG;AACI,KAAK,UAAU,KAAK,CAAC,MAAuB,EAAE,OAAwB;IAC3E,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;AAnBD,sBAmBC","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(config: ProcessedConfig, options?: WebpackOptions) {\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 +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,eAAe,EAAE,yBAAqB;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,gCAAsB;AAGpD;;;;;;GAMG;AACH,wBAAsB,KAAK,
|
|
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,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,qBAmB5E"}
|
|
@@ -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,eAAe,EAAE,yBAAqB;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,gCAAsB;AAGpD;;;;;;GAMG;AACH,wBAAsB,KAAK,
|
|
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,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,qBAmB5E"}
|
|
@@ -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,
|
|
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,CAAC,MAAuB,EAAE,OAAwB;IAC3E,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(config: ProcessedConfig, options?: WebpackOptions) {\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,17 +17,19 @@ 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
|
+
exports.steps = void 0;
|
|
20
21
|
const build_1 = require("./build.cjs");
|
|
21
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
|
-
yarg
|
|
27
|
-
.option('analyze', builders_1.default.analyze);
|
|
27
|
+
yarg.option('analyze', builders_1.default.analyze);
|
|
28
28
|
},
|
|
29
29
|
handler: async (argv) => (0, build_1.buildHandler)(argv.context.config, argv.analyze),
|
|
30
30
|
};
|
|
31
31
|
__exportStar(require("./implementation.cjs"), exports);
|
|
32
|
+
var build_2 = require("./build.cjs");
|
|
33
|
+
Object.defineProperty(exports, "steps", { enumerable: true, get: function () { return build_2.steps; } });
|
|
32
34
|
exports.default = command;
|
|
33
35
|
//# 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,CAAC,MAAM,CAAC,SAAS,EAAE,kBAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,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.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;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;
|
|
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;oBAGJ,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;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,gCAA0B;AAEnD,QAAA,MAAM,OAAO;;;oBAGK,MAAM,IAAI;
|
|
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;oBAGJ,SAAS;CAEhC,CAAC;AAEF,qCAAiC;AACjC,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,eAAe,OAAO,CAAC"}
|
|
@@ -4,11 +4,11 @@ const command = {
|
|
|
4
4
|
command: ['build', 'b'],
|
|
5
5
|
desc: 'Build snap from source',
|
|
6
6
|
builder: (yarg) => {
|
|
7
|
-
yarg
|
|
8
|
-
.option('analyze', builders.analyze);
|
|
7
|
+
yarg.option('analyze', builders.analyze);
|
|
9
8
|
},
|
|
10
9
|
handler: async (argv) => buildHandler(argv.context.config, argv.analyze),
|
|
11
10
|
};
|
|
12
11
|
export * from "./implementation.mjs";
|
|
12
|
+
export { steps } from "./build.mjs";
|
|
13
13
|
export default command;
|
|
14
14
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3C,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.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"]}
|
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"]}
|