@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
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [7.1.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add `sandbox` command to run sandbox tool ([#3306](https://github.com/MetaMask/snaps/pull/3306))
|
|
15
|
+
- This command allows you to run the Snaps sandbox tool, which is useful for
|
|
16
|
+
quickly testing and debugging Snaps.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Bump `@metamask/utils` from `11.2.0` to `11.4.0` ([#3232](https://github.com/MetaMask/snaps/pull/3232))
|
|
21
|
+
|
|
22
|
+
## [7.0.0]
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **BREAKING:** Remove deprecated Browserify configuration ([#3313](https://github.com/MetaMask/snaps/pull/3313))
|
|
27
|
+
- The Browserify bundler is no longer supported. Snaps using the Browserify
|
|
28
|
+
bundler will need to be migrated to the new configuration format based on
|
|
29
|
+
Webpack.
|
|
30
|
+
- The `bundler` option in the Snap configuration file was removed, and the CLI
|
|
31
|
+
will show an error if it's used in config.
|
|
32
|
+
- Several command line flags that were used to configure the Browserify
|
|
33
|
+
bundler were removed.
|
|
34
|
+
- Use the config file to provide these options instead.
|
|
35
|
+
- The removed options are:
|
|
36
|
+
- `--bundle`
|
|
37
|
+
- `--dist`
|
|
38
|
+
- `--eval`
|
|
39
|
+
- `--manifest`
|
|
40
|
+
- `--outfileName`
|
|
41
|
+
- `--root`
|
|
42
|
+
- `--sourceMaps`
|
|
43
|
+
- `--src`
|
|
44
|
+
- `--stripComments`
|
|
45
|
+
- `--suppressWarnings`
|
|
46
|
+
- `--transpilationMode`
|
|
47
|
+
- `--depsToTranspile`
|
|
48
|
+
- `--verboseErrors`
|
|
49
|
+
- `--writeManifest`
|
|
50
|
+
- `--serve`
|
|
51
|
+
|
|
10
52
|
## [6.7.0]
|
|
11
53
|
|
|
12
54
|
### Added
|
|
@@ -320,7 +362,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
320
362
|
- The version of the package no longer needs to match the version of all other
|
|
321
363
|
MetaMask Snaps packages.
|
|
322
364
|
|
|
323
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@
|
|
365
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@7.1.0...HEAD
|
|
366
|
+
[7.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@7.0.0...@metamask/snaps-cli@7.1.0
|
|
367
|
+
[7.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.7.0...@metamask/snaps-cli@7.0.0
|
|
324
368
|
[6.7.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.6.1...@metamask/snaps-cli@6.7.0
|
|
325
369
|
[6.6.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.6.0...@metamask/snaps-cli@6.6.1
|
|
326
370
|
[6.6.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-cli@6.5.4...@metamask/snaps-cli@6.6.0
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A CLI for developing MetaMask Snaps.
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
Use Node.js `16.0
|
|
7
|
+
Use Node.js `18.16.0` or later.
|
|
8
8
|
We recommend [nvm](https://github.com/nvm-sh/nvm) for managing Node.js versions.
|
|
9
9
|
|
|
10
10
|
Install a dev dependency in your snap project using `yarn` or `npm`:
|
|
@@ -21,26 +21,25 @@ 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
|
|
|
27
28
|
Options:
|
|
28
|
-
--version
|
|
29
|
-
-c, --config
|
|
30
|
-
|
|
31
|
-
--suppressWarnings Whether to suppress warnings [deprecated] [boolean]
|
|
32
|
-
-h, --help Show help [boolean]
|
|
29
|
+
--version Show version number [boolean]
|
|
30
|
+
-c, --config Path to config file [string]
|
|
31
|
+
-h, --help Show help [boolean]
|
|
33
32
|
|
|
34
33
|
Examples:
|
|
35
|
-
mm-snap build Build './src/index.js' as
|
|
36
|
-
|
|
37
|
-
mm-snap build --config
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
mm-snap build Build './src/index.js' as './dist/bu
|
|
35
|
+
ndle.js'
|
|
36
|
+
mm-snap build --config ./snap.config.bui Build './src/index.js' as './dist/bu
|
|
37
|
+
ld.ts ndle.js' using the config in './snap
|
|
38
|
+
.config.build.ts'
|
|
40
39
|
mm-snap manifest --fix Check the snap manifest, and fix any
|
|
41
|
-
|
|
40
|
+
errors
|
|
42
41
|
mm-snap watch --port 8000 The snap input file for changes, and
|
|
43
|
-
|
|
42
|
+
serve it on port 8000
|
|
44
43
|
mm-snap serve --port 8000 Serve the snap bundle on port 8000
|
|
45
44
|
```
|
|
46
45
|
|
|
@@ -134,7 +133,6 @@ The file should be placed in the project root directory.
|
|
|
134
133
|
|
|
135
134
|
```javascript
|
|
136
135
|
module.exports = {
|
|
137
|
-
bundler: 'webpack', // default: 'browserify'
|
|
138
136
|
input: 'src/index.js',
|
|
139
137
|
output: {
|
|
140
138
|
path: 'dist',
|
|
@@ -154,7 +152,6 @@ exports a `SnapConfig` type that can be used to type the configuration object.
|
|
|
154
152
|
import type { SnapConfig } from '@metamask/snaps-cli';
|
|
155
153
|
|
|
156
154
|
const config: SnapConfig = {
|
|
157
|
-
bundler: 'webpack', // default: 'browserify'
|
|
158
155
|
input: 'src/index.js',
|
|
159
156
|
output: {
|
|
160
157
|
path: 'dist',
|
|
@@ -171,7 +168,6 @@ The configuration file should not be published.
|
|
|
171
168
|
|
|
172
169
|
### Options
|
|
173
170
|
|
|
174
|
-
- [`bundler`](#bundler)
|
|
175
171
|
- [`input`](#input)
|
|
176
172
|
- [`output`](#output)
|
|
177
173
|
- [`output.path`](#outputpath)
|
|
@@ -191,18 +187,6 @@ The configuration file should not be published.
|
|
|
191
187
|
- [`experimental`](#experimental)
|
|
192
188
|
- [`experimental.wasm`](#experimentalwasm)
|
|
193
189
|
|
|
194
|
-
#### `bundler`
|
|
195
|
-
|
|
196
|
-
- Type: `"browserify"` | `"webpack"`
|
|
197
|
-
- Default: `"browserify"`
|
|
198
|
-
|
|
199
|
-
The bundler to use. The MetaMask Snaps CLI supports both Browserify and
|
|
200
|
-
Webpack. For backwards compatibility, Browserify is the default, but we
|
|
201
|
-
recommend using Webpack. Browserify support will be removed in the future.
|
|
202
|
-
|
|
203
|
-
This section describes the options for the Webpack bundler. For Browserify,
|
|
204
|
-
refer to the [legacy options](#legacy-options) section.
|
|
205
|
-
|
|
206
190
|
#### `input`
|
|
207
191
|
|
|
208
192
|
- Type: `string`
|
|
@@ -425,219 +409,3 @@ import program from './program.wasm';
|
|
|
425
409
|
// Program is initialised synchronously.
|
|
426
410
|
// ...
|
|
427
411
|
```
|
|
428
|
-
|
|
429
|
-
### Legacy Options
|
|
430
|
-
|
|
431
|
-
> **Warning**: Using the Browserify-based build system is deprecated, and will
|
|
432
|
-
> be removed in a future version. Please migrate to the Webpack-based build
|
|
433
|
-
> system.
|
|
434
|
-
|
|
435
|
-
- [`bundler`](#bundler)
|
|
436
|
-
- [`cliOptions`](#clioptions)
|
|
437
|
-
- [`cliOptions.bundle`](#clioptionsbundle)
|
|
438
|
-
- [`cliOptions.dist`](#clioptionsdist)
|
|
439
|
-
- [`cliOptions.eval`](#clioptionseval)
|
|
440
|
-
- [`cliOptions.manifest`](#clioptionsmanifest)
|
|
441
|
-
- [`cliOptions.outfileName`](#clioptionsoutfilename)
|
|
442
|
-
- [`cliOptions.port`](#clioptionsport)
|
|
443
|
-
- [`cliOptions.root`](#clioptionsroot)
|
|
444
|
-
- [`cliOptions.sourceMaps`](#clioptionssourcemaps)
|
|
445
|
-
- [`cliOptions.src`](#clioptionssrc)
|
|
446
|
-
- [`cliOptions.stripComments`](#clioptionsstripcomments)
|
|
447
|
-
- [`cliOptions.transpilationMode`](#clioptionstranspilationmode)
|
|
448
|
-
- [`cliOptions.depsToTranspile`](#clioptionsdepstotranspile)
|
|
449
|
-
- [`cliOptions.writeManifest`](#clioptionswritemanifest)
|
|
450
|
-
- [`cliOptions.serve`](#clioptionsserve)
|
|
451
|
-
- [`cliOptions.verboseErrors`](#clioptionsverboseerrors)
|
|
452
|
-
- [`cliOptions.suppressWarnings`](#clioptionssuppresswarnings)
|
|
453
|
-
- [`bundlerCustomizer`](#bundlercustomizer)
|
|
454
|
-
|
|
455
|
-
#### `bundler`
|
|
456
|
-
|
|
457
|
-
- Type: `"browserify"` | `"webpack"`
|
|
458
|
-
- Default: `"browserify"`
|
|
459
|
-
|
|
460
|
-
The bundler to use. The MetaMask Snaps CLI supports both Browserify and
|
|
461
|
-
Webpack. For backwards compatibility, Browserify is the default, but we
|
|
462
|
-
recommend using Webpack. Browserify support will be removed in the future.
|
|
463
|
-
|
|
464
|
-
This section describes the options for the Browserify bundler. For Webpack,
|
|
465
|
-
refer to the [options](#options) section.
|
|
466
|
-
|
|
467
|
-
#### `cliOptions`
|
|
468
|
-
|
|
469
|
-
- Type: `object`
|
|
470
|
-
|
|
471
|
-
The CLI options. These can be specified using the CLI, but can also be
|
|
472
|
-
specified in the configuration file. For example, the `--port` option can be
|
|
473
|
-
specified in the configuration file as follows:
|
|
474
|
-
|
|
475
|
-
```ts
|
|
476
|
-
export default {
|
|
477
|
-
cliOptions: {
|
|
478
|
-
port: 8081,
|
|
479
|
-
},
|
|
480
|
-
};
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
But can also be specified using the CLI:
|
|
484
|
-
|
|
485
|
-
```bash
|
|
486
|
-
$ mm-snap serve --port 8081
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
If the same option is specified in both the configuration file and the CLI,
|
|
490
|
-
the CLI option takes precedence.
|
|
491
|
-
|
|
492
|
-
##### `cliOptions.bundle`
|
|
493
|
-
|
|
494
|
-
- Type: `string`
|
|
495
|
-
- Default: `dist/bundle.js`
|
|
496
|
-
|
|
497
|
-
The path to the bundle file. This is where the bundle will be written to.
|
|
498
|
-
|
|
499
|
-
##### `cliOptions.dist`
|
|
500
|
-
|
|
501
|
-
- Type: `string`
|
|
502
|
-
- Default: `dist`
|
|
503
|
-
|
|
504
|
-
The path to the distribution directory. This is where the bundle file will be
|
|
505
|
-
written to, if the `bundle` option is not specified.
|
|
506
|
-
|
|
507
|
-
##### `cliOptions.eval`
|
|
508
|
-
|
|
509
|
-
- Type: `boolean`
|
|
510
|
-
- Default: `true`
|
|
511
|
-
|
|
512
|
-
Whether to evaluate the bundle. If `true`, the bundle will be evaluated in the
|
|
513
|
-
MetaMask Snaps runtime, to check for any compatibility issues.
|
|
514
|
-
|
|
515
|
-
##### `cliOptions.manifest`
|
|
516
|
-
|
|
517
|
-
- Type: `boolean`
|
|
518
|
-
- Default: `true`
|
|
519
|
-
|
|
520
|
-
Whether to validate the snap manifest. If `true`, the snap manifest will be
|
|
521
|
-
validated, and any errors or warnings will be shown.
|
|
522
|
-
|
|
523
|
-
##### `cliOptions.outfileName`
|
|
524
|
-
|
|
525
|
-
- Type: `string`
|
|
526
|
-
- Default: `bundle.js`
|
|
527
|
-
|
|
528
|
-
The name of the bundle file. This is used to generate the bundle file path,
|
|
529
|
-
using the `dist` option. For example, if `dist` is `dist`, and `outfileName`
|
|
530
|
-
is `bundle.js`, the bundle file path will be `dist/bundle.js`. This option is
|
|
531
|
-
ignored if the `bundle` option is specified.
|
|
532
|
-
|
|
533
|
-
##### `cliOptions.port`
|
|
534
|
-
|
|
535
|
-
- Type: `number`
|
|
536
|
-
- Default: `8081`
|
|
537
|
-
|
|
538
|
-
The port to use for the development server.
|
|
539
|
-
|
|
540
|
-
##### `cliOptions.root`
|
|
541
|
-
|
|
542
|
-
- Type: `string`
|
|
543
|
-
- Default: `.`
|
|
544
|
-
|
|
545
|
-
The root directory. This should be the directory that contains the snap
|
|
546
|
-
manifest, and the `dist` directory. This will be served by the development
|
|
547
|
-
server.
|
|
548
|
-
|
|
549
|
-
##### `cliOptions.sourceMaps`
|
|
550
|
-
|
|
551
|
-
- Type: `boolean`
|
|
552
|
-
- Default: `false`
|
|
553
|
-
|
|
554
|
-
Whether to generate source maps. If `true`, source maps will be generated for
|
|
555
|
-
the bundle.
|
|
556
|
-
|
|
557
|
-
##### `cliOptions.src`
|
|
558
|
-
|
|
559
|
-
- Type: `string`
|
|
560
|
-
- Default: `src/index.js`
|
|
561
|
-
|
|
562
|
-
The path to the entry file. This is the file that will be bundled.
|
|
563
|
-
|
|
564
|
-
##### `cliOptions.stripComments`
|
|
565
|
-
|
|
566
|
-
- Type: `boolean`
|
|
567
|
-
- Default: `true`
|
|
568
|
-
|
|
569
|
-
Whether to strip comments from the bundle. If `true`, comments will be stripped
|
|
570
|
-
from the bundle, and the bundle will be minified.
|
|
571
|
-
|
|
572
|
-
##### `cliOptions.transpilationMode`
|
|
573
|
-
|
|
574
|
-
- Type: `'localAndDeps' | 'localOnly' | 'none'`
|
|
575
|
-
- Default: `'localOnly'`
|
|
576
|
-
|
|
577
|
-
The transpilation mode to use. This determines which files will be transpiled
|
|
578
|
-
by Babel. The possible values are:
|
|
579
|
-
|
|
580
|
-
- `'localAndDeps'`: Transpile all files, including dependencies.
|
|
581
|
-
- `'localOnly'`: Transpile only local files.
|
|
582
|
-
- `'none'`: Do not transpile any files.
|
|
583
|
-
|
|
584
|
-
##### `cliOptions.depsToTranspile`
|
|
585
|
-
|
|
586
|
-
- Type: `string[]`
|
|
587
|
-
- Default: `[]`
|
|
588
|
-
|
|
589
|
-
If `transpilationMode` is `'localAndDeps'`, this option can be used to specify
|
|
590
|
-
which dependencies should be transpiled. This is useful if you want to transpile
|
|
591
|
-
a limited set of dependencies, but not all of them.
|
|
592
|
-
|
|
593
|
-
##### `cliOptions.writeManifest`
|
|
594
|
-
|
|
595
|
-
- Type: `boolean`
|
|
596
|
-
- Default: `true`
|
|
597
|
-
|
|
598
|
-
Whether to write the snap manifest. If `true`, the snap manifest will be written
|
|
599
|
-
with any changes made by the CLI, if the manifest is invalid.
|
|
600
|
-
|
|
601
|
-
##### `cliOptions.serve`
|
|
602
|
-
|
|
603
|
-
- Type: `boolean`
|
|
604
|
-
- Default: `true`
|
|
605
|
-
|
|
606
|
-
Whether to serve the snap. If `true`, the snap will be served by the development
|
|
607
|
-
server, when running `mm-snap watch`.
|
|
608
|
-
|
|
609
|
-
##### `cliOptions.suppressWarnings`
|
|
610
|
-
|
|
611
|
-
- Type: `boolean`
|
|
612
|
-
- Default: `false`
|
|
613
|
-
|
|
614
|
-
This option exists for backwards compatibility, and is ignored.
|
|
615
|
-
|
|
616
|
-
##### `cliOptions.verboseErrors`
|
|
617
|
-
|
|
618
|
-
- Type: `boolean`
|
|
619
|
-
- Default: `false`
|
|
620
|
-
|
|
621
|
-
This option exists for backwards compatibility, and is ignored.
|
|
622
|
-
|
|
623
|
-
#### `bundlerCustomizer`
|
|
624
|
-
|
|
625
|
-
- Type: `(bundler: BrowserifyObject) => void`
|
|
626
|
-
|
|
627
|
-
A function that customizes the bundler. This function is called after the
|
|
628
|
-
bundler is created, but before the bundle is written to disk. This can be used
|
|
629
|
-
to customize the bundler, for example to add plugins or transforms.
|
|
630
|
-
|
|
631
|
-
```typescript
|
|
632
|
-
import type { SnapConfig } from '@metamask/snaps-cli';
|
|
633
|
-
import type { BrowserifyObject } from 'browserify';
|
|
634
|
-
|
|
635
|
-
const config: SnapConfig = {
|
|
636
|
-
bundlerCustomizer: (bundler: BrowserifyObject) => {
|
|
637
|
-
// Add the BRFS transform to Browserify.
|
|
638
|
-
bundler.transform('brfs');
|
|
639
|
-
},
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
export default config;
|
|
643
|
-
```
|
package/dist/builders.cjs
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TranspilationModes = void 0;
|
|
4
|
-
var TranspilationModes;
|
|
5
|
-
(function (TranspilationModes) {
|
|
6
|
-
TranspilationModes["LocalAndDeps"] = "localAndDeps";
|
|
7
|
-
TranspilationModes["LocalOnly"] = "localOnly";
|
|
8
|
-
TranspilationModes["None"] = "none";
|
|
9
|
-
})(TranspilationModes || (exports.TranspilationModes = TranspilationModes = {}));
|
|
10
3
|
const builders = {
|
|
11
4
|
analyze: {
|
|
12
5
|
describe: 'Analyze the Snap bundle',
|
|
13
6
|
type: 'boolean',
|
|
14
7
|
},
|
|
8
|
+
build: {
|
|
9
|
+
describe: 'Build the Snap bundle',
|
|
10
|
+
type: 'boolean',
|
|
11
|
+
default: true,
|
|
12
|
+
},
|
|
15
13
|
config: {
|
|
16
14
|
alias: 'c',
|
|
17
15
|
describe: 'Path to config file',
|
|
@@ -28,33 +26,6 @@ const builders = {
|
|
|
28
26
|
type: 'string',
|
|
29
27
|
normalize: true,
|
|
30
28
|
},
|
|
31
|
-
// Deprecated Browserify options.
|
|
32
|
-
bundle: {
|
|
33
|
-
alias: 'b',
|
|
34
|
-
describe: 'Snap bundle file',
|
|
35
|
-
type: 'string',
|
|
36
|
-
normalize: true,
|
|
37
|
-
deprecated: 'Use --input instead.',
|
|
38
|
-
},
|
|
39
|
-
dist: {
|
|
40
|
-
alias: 'd',
|
|
41
|
-
describe: 'Output directory',
|
|
42
|
-
type: 'string',
|
|
43
|
-
normalize: true,
|
|
44
|
-
deprecated: true,
|
|
45
|
-
},
|
|
46
|
-
eval: {
|
|
47
|
-
alias: 'e',
|
|
48
|
-
describe: 'Attempt to evaluate Snap bundle in SES',
|
|
49
|
-
type: 'boolean',
|
|
50
|
-
deprecated: true,
|
|
51
|
-
},
|
|
52
|
-
manifest: {
|
|
53
|
-
alias: 'm',
|
|
54
|
-
describe: 'Validate snap.manifest.json',
|
|
55
|
-
type: 'boolean',
|
|
56
|
-
deprecated: true,
|
|
57
|
-
},
|
|
58
29
|
port: {
|
|
59
30
|
alias: 'p',
|
|
60
31
|
describe: 'Local server port for testing',
|
|
@@ -66,69 +37,6 @@ const builders = {
|
|
|
66
37
|
}
|
|
67
38
|
return port;
|
|
68
39
|
},
|
|
69
|
-
deprecated: true,
|
|
70
|
-
},
|
|
71
|
-
outfileName: {
|
|
72
|
-
alias: 'n',
|
|
73
|
-
describe: 'Output file name',
|
|
74
|
-
type: 'string',
|
|
75
|
-
deprecated: true,
|
|
76
|
-
},
|
|
77
|
-
root: {
|
|
78
|
-
alias: 'r',
|
|
79
|
-
describe: 'Server root directory',
|
|
80
|
-
type: 'string',
|
|
81
|
-
normalize: true,
|
|
82
|
-
deprecated: true,
|
|
83
|
-
},
|
|
84
|
-
sourceMaps: {
|
|
85
|
-
describe: 'Whether builds include sourcemaps',
|
|
86
|
-
type: 'boolean',
|
|
87
|
-
deprecated: true,
|
|
88
|
-
},
|
|
89
|
-
src: {
|
|
90
|
-
alias: 's',
|
|
91
|
-
describe: 'Source file',
|
|
92
|
-
type: 'string',
|
|
93
|
-
normalize: true,
|
|
94
|
-
deprecated: true,
|
|
95
|
-
},
|
|
96
|
-
stripComments: {
|
|
97
|
-
alias: 'strip',
|
|
98
|
-
describe: 'Whether to remove code comments from the build output',
|
|
99
|
-
type: 'boolean',
|
|
100
|
-
deprecated: true,
|
|
101
|
-
},
|
|
102
|
-
suppressWarnings: {
|
|
103
|
-
type: 'boolean',
|
|
104
|
-
describe: 'Whether to suppress warnings',
|
|
105
|
-
deprecated: true,
|
|
106
|
-
},
|
|
107
|
-
transpilationMode: {
|
|
108
|
-
type: 'string',
|
|
109
|
-
describe: 'Whether to use Babel to transpile all source code (including dependencies), local source code only, or nothing',
|
|
110
|
-
choices: Object.values(TranspilationModes),
|
|
111
|
-
deprecated: true,
|
|
112
|
-
},
|
|
113
|
-
depsToTranspile: {
|
|
114
|
-
type: 'array',
|
|
115
|
-
describe: 'Transpile only the listed dependencies.',
|
|
116
|
-
deprecated: true,
|
|
117
|
-
},
|
|
118
|
-
verboseErrors: {
|
|
119
|
-
type: 'boolean',
|
|
120
|
-
describe: 'Display original errors',
|
|
121
|
-
deprecated: true,
|
|
122
|
-
},
|
|
123
|
-
writeManifest: {
|
|
124
|
-
describe: 'Make necessary changes to the snap manifest file',
|
|
125
|
-
type: 'boolean',
|
|
126
|
-
deprecated: true,
|
|
127
|
-
},
|
|
128
|
-
serve: {
|
|
129
|
-
describe: 'Serve snap file(s) locally for testing',
|
|
130
|
-
type: 'boolean',
|
|
131
|
-
deprecated: true,
|
|
132
40
|
},
|
|
133
41
|
};
|
|
134
42
|
exports.default = builders;
|
package/dist/builders.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.cjs","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"
|
|
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,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 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
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export declare enum TranspilationModes {
|
|
2
|
-
LocalAndDeps = "localAndDeps",
|
|
3
|
-
LocalOnly = "localOnly",
|
|
4
|
-
None = "none"
|
|
5
|
-
}
|
|
6
1
|
declare const builders: {
|
|
7
2
|
readonly analyze: {
|
|
8
3
|
readonly describe: "Analyze the Snap bundle";
|
|
9
4
|
readonly type: "boolean";
|
|
10
5
|
};
|
|
6
|
+
readonly build: {
|
|
7
|
+
readonly describe: "Build the Snap bundle";
|
|
8
|
+
readonly type: "boolean";
|
|
9
|
+
readonly default: true;
|
|
10
|
+
};
|
|
11
11
|
readonly config: {
|
|
12
12
|
readonly alias: "c";
|
|
13
13
|
readonly describe: "Path to config file";
|
|
@@ -24,100 +24,11 @@ declare const builders: {
|
|
|
24
24
|
readonly type: "string";
|
|
25
25
|
readonly normalize: true;
|
|
26
26
|
};
|
|
27
|
-
readonly bundle: {
|
|
28
|
-
readonly alias: "b";
|
|
29
|
-
readonly describe: "Snap bundle file";
|
|
30
|
-
readonly type: "string";
|
|
31
|
-
readonly normalize: true;
|
|
32
|
-
readonly deprecated: "Use --input instead.";
|
|
33
|
-
};
|
|
34
|
-
readonly dist: {
|
|
35
|
-
readonly alias: "d";
|
|
36
|
-
readonly describe: "Output directory";
|
|
37
|
-
readonly type: "string";
|
|
38
|
-
readonly normalize: true;
|
|
39
|
-
readonly deprecated: true;
|
|
40
|
-
};
|
|
41
|
-
readonly eval: {
|
|
42
|
-
readonly alias: "e";
|
|
43
|
-
readonly describe: "Attempt to evaluate Snap bundle in SES";
|
|
44
|
-
readonly type: "boolean";
|
|
45
|
-
readonly deprecated: true;
|
|
46
|
-
};
|
|
47
|
-
readonly manifest: {
|
|
48
|
-
readonly alias: "m";
|
|
49
|
-
readonly describe: "Validate snap.manifest.json";
|
|
50
|
-
readonly type: "boolean";
|
|
51
|
-
readonly deprecated: true;
|
|
52
|
-
};
|
|
53
27
|
readonly port: {
|
|
54
28
|
readonly alias: "p";
|
|
55
29
|
readonly describe: "Local server port for testing";
|
|
56
30
|
readonly type: "number";
|
|
57
31
|
readonly coerce: (arg: unknown) => number;
|
|
58
|
-
readonly deprecated: true;
|
|
59
|
-
};
|
|
60
|
-
readonly outfileName: {
|
|
61
|
-
readonly alias: "n";
|
|
62
|
-
readonly describe: "Output file name";
|
|
63
|
-
readonly type: "string";
|
|
64
|
-
readonly deprecated: true;
|
|
65
|
-
};
|
|
66
|
-
readonly root: {
|
|
67
|
-
readonly alias: "r";
|
|
68
|
-
readonly describe: "Server root directory";
|
|
69
|
-
readonly type: "string";
|
|
70
|
-
readonly normalize: true;
|
|
71
|
-
readonly deprecated: true;
|
|
72
|
-
};
|
|
73
|
-
readonly sourceMaps: {
|
|
74
|
-
readonly describe: "Whether builds include sourcemaps";
|
|
75
|
-
readonly type: "boolean";
|
|
76
|
-
readonly deprecated: true;
|
|
77
|
-
};
|
|
78
|
-
readonly src: {
|
|
79
|
-
readonly alias: "s";
|
|
80
|
-
readonly describe: "Source file";
|
|
81
|
-
readonly type: "string";
|
|
82
|
-
readonly normalize: true;
|
|
83
|
-
readonly deprecated: true;
|
|
84
|
-
};
|
|
85
|
-
readonly stripComments: {
|
|
86
|
-
readonly alias: "strip";
|
|
87
|
-
readonly describe: "Whether to remove code comments from the build output";
|
|
88
|
-
readonly type: "boolean";
|
|
89
|
-
readonly deprecated: true;
|
|
90
|
-
};
|
|
91
|
-
readonly suppressWarnings: {
|
|
92
|
-
readonly type: "boolean";
|
|
93
|
-
readonly describe: "Whether to suppress warnings";
|
|
94
|
-
readonly deprecated: true;
|
|
95
|
-
};
|
|
96
|
-
readonly transpilationMode: {
|
|
97
|
-
readonly type: "string";
|
|
98
|
-
readonly describe: "Whether to use Babel to transpile all source code (including dependencies), local source code only, or nothing";
|
|
99
|
-
readonly choices: TranspilationModes[];
|
|
100
|
-
readonly deprecated: true;
|
|
101
|
-
};
|
|
102
|
-
readonly depsToTranspile: {
|
|
103
|
-
readonly type: "array";
|
|
104
|
-
readonly describe: "Transpile only the listed dependencies.";
|
|
105
|
-
readonly deprecated: true;
|
|
106
|
-
};
|
|
107
|
-
readonly verboseErrors: {
|
|
108
|
-
readonly type: "boolean";
|
|
109
|
-
readonly describe: "Display original errors";
|
|
110
|
-
readonly deprecated: true;
|
|
111
|
-
};
|
|
112
|
-
readonly writeManifest: {
|
|
113
|
-
readonly describe: "Make necessary changes to the snap manifest file";
|
|
114
|
-
readonly type: "boolean";
|
|
115
|
-
readonly deprecated: true;
|
|
116
|
-
};
|
|
117
|
-
readonly serve: {
|
|
118
|
-
readonly describe: "Serve snap file(s) locally for testing";
|
|
119
|
-
readonly type: "boolean";
|
|
120
|
-
readonly deprecated: true;
|
|
121
32
|
};
|
|
122
33
|
};
|
|
123
34
|
export default builders;
|
package/dist/builders.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.cts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"builders.d.cts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAmCI,OAAO;;CAS6B,CAAC;AAEvD,eAAe,QAAQ,CAAC"}
|