@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.
Files changed (255) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +12 -244
  3. package/dist/builders.cjs +5 -97
  4. package/dist/builders.cjs.map +1 -1
  5. package/dist/builders.d.cts +5 -94
  6. package/dist/builders.d.cts.map +1 -1
  7. package/dist/builders.d.mts +5 -94
  8. package/dist/builders.d.mts.map +1 -1
  9. package/dist/builders.mjs +5 -96
  10. package/dist/builders.mjs.map +1 -1
  11. package/dist/cli.cjs +4 -9
  12. package/dist/cli.cjs.map +1 -1
  13. package/dist/cli.d.cts.map +1 -1
  14. package/dist/cli.d.mts.map +1 -1
  15. package/dist/cli.mjs +4 -16
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/commands/build/build.cjs +15 -11
  18. package/dist/commands/build/build.cjs.map +1 -1
  19. package/dist/commands/build/build.d.cts +8 -0
  20. package/dist/commands/build/build.d.cts.map +1 -1
  21. package/dist/commands/build/build.d.mts +8 -0
  22. package/dist/commands/build/build.d.mts.map +1 -1
  23. package/dist/commands/build/build.mjs +9 -5
  24. package/dist/commands/build/build.mjs.map +1 -1
  25. package/dist/commands/build/implementation.cjs.map +1 -1
  26. package/dist/commands/build/implementation.d.cts +2 -2
  27. package/dist/commands/build/implementation.d.cts.map +1 -1
  28. package/dist/commands/build/implementation.d.mts +2 -2
  29. package/dist/commands/build/implementation.d.mts.map +1 -1
  30. package/dist/commands/build/implementation.mjs.map +1 -1
  31. package/dist/commands/build/index.cjs +5 -14
  32. package/dist/commands/build/index.cjs.map +1 -1
  33. package/dist/commands/build/index.d.cts +1 -0
  34. package/dist/commands/build/index.d.cts.map +1 -1
  35. package/dist/commands/build/index.d.mts +1 -0
  36. package/dist/commands/build/index.d.mts.map +1 -1
  37. package/dist/commands/build/index.mjs +3 -14
  38. package/dist/commands/build/index.mjs.map +1 -1
  39. package/dist/commands/eval/__test__/webpack/bad/snap.config.cjs +0 -1
  40. package/dist/commands/eval/__test__/webpack/bad/snap.config.cjs.map +1 -1
  41. package/dist/commands/eval/__test__/webpack/bad/snap.config.d.cts.map +1 -1
  42. package/dist/commands/eval/__test__/webpack/bad/snap.config.d.mts.map +1 -1
  43. package/dist/commands/eval/__test__/webpack/bad/snap.config.mjs +0 -1
  44. package/dist/commands/eval/__test__/webpack/bad/snap.config.mjs.map +1 -1
  45. package/dist/commands/eval/__test__/webpack/good/snap.config.cjs +0 -1
  46. package/dist/commands/eval/__test__/webpack/good/snap.config.cjs.map +1 -1
  47. package/dist/commands/eval/__test__/webpack/good/snap.config.d.cts.map +1 -1
  48. package/dist/commands/eval/__test__/webpack/good/snap.config.d.mts.map +1 -1
  49. package/dist/commands/eval/__test__/webpack/good/snap.config.mjs +0 -1
  50. package/dist/commands/eval/__test__/webpack/good/snap.config.mjs.map +1 -1
  51. package/dist/commands/eval/__test__/webpack/snap.config.cjs +0 -1
  52. package/dist/commands/eval/__test__/webpack/snap.config.cjs.map +1 -1
  53. package/dist/commands/eval/__test__/webpack/snap.config.d.cts.map +1 -1
  54. package/dist/commands/eval/__test__/webpack/snap.config.d.mts.map +1 -1
  55. package/dist/commands/eval/__test__/webpack/snap.config.mjs +0 -1
  56. package/dist/commands/eval/__test__/webpack/snap.config.mjs.map +1 -1
  57. package/dist/commands/eval/eval.cjs +1 -1
  58. package/dist/commands/eval/eval.cjs.map +1 -1
  59. package/dist/commands/eval/eval.d.cts.map +1 -1
  60. package/dist/commands/eval/eval.d.mts.map +1 -1
  61. package/dist/commands/eval/eval.mjs +1 -1
  62. package/dist/commands/eval/eval.mjs.map +1 -1
  63. package/dist/commands/eval/index.cjs +1 -4
  64. package/dist/commands/eval/index.cjs.map +1 -1
  65. package/dist/commands/eval/index.d.cts.map +1 -1
  66. package/dist/commands/eval/index.d.mts.map +1 -1
  67. package/dist/commands/eval/index.mjs +1 -4
  68. package/dist/commands/eval/index.mjs.map +1 -1
  69. package/dist/commands/index.cjs +2 -0
  70. package/dist/commands/index.cjs.map +1 -1
  71. package/dist/commands/index.d.cts.map +1 -1
  72. package/dist/commands/index.d.mts.map +1 -1
  73. package/dist/commands/index.mjs +2 -0
  74. package/dist/commands/index.mjs.map +1 -1
  75. package/dist/commands/manifest/index.cjs +1 -4
  76. package/dist/commands/manifest/index.cjs.map +1 -1
  77. package/dist/commands/manifest/index.d.cts.map +1 -1
  78. package/dist/commands/manifest/index.d.mts.map +1 -1
  79. package/dist/commands/manifest/index.mjs +1 -4
  80. package/dist/commands/manifest/index.mjs.map +1 -1
  81. package/dist/commands/manifest/manifest.cjs +5 -6
  82. package/dist/commands/manifest/manifest.cjs.map +1 -1
  83. package/dist/commands/manifest/manifest.d.cts.map +1 -1
  84. package/dist/commands/manifest/manifest.d.mts.map +1 -1
  85. package/dist/commands/manifest/manifest.mjs +5 -6
  86. package/dist/commands/manifest/manifest.mjs.map +1 -1
  87. package/dist/commands/sandbox/index.cjs +17 -0
  88. package/dist/commands/sandbox/index.cjs.map +1 -0
  89. package/dist/commands/sandbox/index.d.cts +10 -0
  90. package/dist/commands/sandbox/index.d.cts.map +1 -0
  91. package/dist/commands/sandbox/index.d.mts +10 -0
  92. package/dist/commands/sandbox/index.d.mts.map +1 -0
  93. package/dist/commands/sandbox/index.mjs +12 -0
  94. package/dist/commands/sandbox/index.mjs.map +1 -0
  95. package/dist/commands/sandbox/sandbox.cjs +33 -0
  96. package/dist/commands/sandbox/sandbox.cjs.map +1 -0
  97. package/dist/commands/sandbox/sandbox.d.cts +14 -0
  98. package/dist/commands/sandbox/sandbox.d.cts.map +1 -0
  99. package/dist/commands/sandbox/sandbox.d.mts +14 -0
  100. package/dist/commands/sandbox/sandbox.d.mts.map +1 -0
  101. package/dist/commands/sandbox/sandbox.mjs +29 -0
  102. package/dist/commands/sandbox/sandbox.mjs.map +1 -0
  103. package/dist/commands/sandbox/server.cjs +27 -0
  104. package/dist/commands/sandbox/server.cjs.map +1 -0
  105. package/dist/commands/sandbox/server.d.cts +14 -0
  106. package/dist/commands/sandbox/server.d.cts.map +1 -0
  107. package/dist/commands/sandbox/server.d.mts +14 -0
  108. package/dist/commands/sandbox/server.d.mts.map +1 -0
  109. package/dist/commands/sandbox/server.mjs +25 -0
  110. package/dist/commands/sandbox/server.mjs.map +1 -0
  111. package/dist/commands/serve/index.cjs +2 -2
  112. package/dist/commands/serve/index.cjs.map +1 -1
  113. package/dist/commands/serve/index.d.cts.map +1 -1
  114. package/dist/commands/serve/index.d.mts.map +1 -1
  115. package/dist/commands/serve/index.mjs +2 -2
  116. package/dist/commands/serve/index.mjs.map +1 -1
  117. package/dist/commands/watch/implementation.cjs +2 -0
  118. package/dist/commands/watch/implementation.cjs.map +1 -1
  119. package/dist/commands/watch/implementation.d.cts +2 -2
  120. package/dist/commands/watch/implementation.d.cts.map +1 -1
  121. package/dist/commands/watch/implementation.d.mts +2 -2
  122. package/dist/commands/watch/implementation.d.mts.map +1 -1
  123. package/dist/commands/watch/implementation.mjs +2 -0
  124. package/dist/commands/watch/implementation.mjs.map +1 -1
  125. package/dist/commands/watch/index.cjs +2 -17
  126. package/dist/commands/watch/index.cjs.map +1 -1
  127. package/dist/commands/watch/index.d.cts.map +1 -1
  128. package/dist/commands/watch/index.d.mts.map +1 -1
  129. package/dist/commands/watch/index.mjs +2 -17
  130. package/dist/commands/watch/index.mjs.map +1 -1
  131. package/dist/commands/watch/watch.cjs +1 -1
  132. package/dist/commands/watch/watch.cjs.map +1 -1
  133. package/dist/commands/watch/watch.d.cts.map +1 -1
  134. package/dist/commands/watch/watch.d.mts.map +1 -1
  135. package/dist/commands/watch/watch.mjs +1 -1
  136. package/dist/commands/watch/watch.mjs.map +1 -1
  137. package/dist/config.cjs +11 -155
  138. package/dist/config.cjs.map +1 -1
  139. package/dist/config.d.cts +216 -314
  140. package/dist/config.d.cts.map +1 -1
  141. package/dist/config.d.mts +216 -314
  142. package/dist/config.d.mts.map +1 -1
  143. package/dist/config.mjs +13 -155
  144. package/dist/config.mjs.map +1 -1
  145. package/dist/main.cjs +0 -1
  146. package/dist/main.cjs.map +1 -1
  147. package/dist/main.mjs +0 -1
  148. package/dist/main.mjs.map +1 -1
  149. package/dist/utils/index.cjs +0 -1
  150. package/dist/utils/index.cjs.map +1 -1
  151. package/dist/utils/index.d.cts +0 -1
  152. package/dist/utils/index.d.cts.map +1 -1
  153. package/dist/utils/index.d.mts +0 -1
  154. package/dist/utils/index.d.mts.map +1 -1
  155. package/dist/utils/index.mjs +0 -1
  156. package/dist/utils/index.mjs.map +1 -1
  157. package/dist/utils/steps.cjs.map +1 -1
  158. package/dist/utils/steps.d.cts +1 -1
  159. package/dist/utils/steps.d.cts.map +1 -1
  160. package/dist/utils/steps.d.mts +1 -1
  161. package/dist/utils/steps.d.mts.map +1 -1
  162. package/dist/utils/steps.mjs.map +1 -1
  163. package/dist/webpack/compiler.cjs.map +1 -1
  164. package/dist/webpack/compiler.d.cts +2 -2
  165. package/dist/webpack/compiler.d.cts.map +1 -1
  166. package/dist/webpack/compiler.d.mts +2 -2
  167. package/dist/webpack/compiler.d.mts.map +1 -1
  168. package/dist/webpack/compiler.mjs.map +1 -1
  169. package/dist/webpack/config.cjs +1 -2
  170. package/dist/webpack/config.cjs.map +1 -1
  171. package/dist/webpack/config.d.cts +2 -2
  172. package/dist/webpack/config.d.cts.map +1 -1
  173. package/dist/webpack/config.d.mts +2 -2
  174. package/dist/webpack/config.d.mts.map +1 -1
  175. package/dist/webpack/config.mjs +1 -2
  176. package/dist/webpack/config.mjs.map +1 -1
  177. package/dist/webpack/loaders/function.cjs +7 -10
  178. package/dist/webpack/loaders/function.cjs.map +1 -1
  179. package/dist/webpack/loaders/function.d.cts +1 -0
  180. package/dist/webpack/loaders/function.d.cts.map +1 -1
  181. package/dist/webpack/loaders/function.d.mts +1 -0
  182. package/dist/webpack/loaders/function.d.mts.map +1 -1
  183. package/dist/webpack/loaders/function.mjs +6 -9
  184. package/dist/webpack/loaders/function.mjs.map +1 -1
  185. package/dist/webpack/loaders/index.cjs +1 -3
  186. package/dist/webpack/loaders/index.cjs.map +1 -1
  187. package/dist/webpack/loaders/index.d.cts +0 -1
  188. package/dist/webpack/loaders/index.d.cts.map +1 -1
  189. package/dist/webpack/loaders/index.d.mts +0 -1
  190. package/dist/webpack/loaders/index.d.mts.map +1 -1
  191. package/dist/webpack/loaders/index.mjs +0 -1
  192. package/dist/webpack/loaders/index.mjs.map +1 -1
  193. package/dist/webpack/loaders/wasm.cjs +0 -2
  194. package/dist/webpack/loaders/wasm.cjs.map +1 -1
  195. package/dist/webpack/loaders/wasm.d.cts.map +1 -1
  196. package/dist/webpack/loaders/wasm.d.mts.map +1 -1
  197. package/dist/webpack/loaders/wasm.mjs +0 -2
  198. package/dist/webpack/loaders/wasm.mjs.map +1 -1
  199. package/dist/webpack/plugins.cjs +15 -20
  200. package/dist/webpack/plugins.cjs.map +1 -1
  201. package/dist/webpack/plugins.d.cts +13 -3
  202. package/dist/webpack/plugins.d.cts.map +1 -1
  203. package/dist/webpack/plugins.d.mts +13 -3
  204. package/dist/webpack/plugins.d.mts.map +1 -1
  205. package/dist/webpack/plugins.mjs +4 -9
  206. package/dist/webpack/plugins.mjs.map +1 -1
  207. package/dist/webpack/server.cjs +83 -72
  208. package/dist/webpack/server.cjs.map +1 -1
  209. package/dist/webpack/server.d.cts +6 -1
  210. package/dist/webpack/server.d.cts.map +1 -1
  211. package/dist/webpack/server.d.mts +6 -1
  212. package/dist/webpack/server.d.mts.map +1 -1
  213. package/dist/webpack/server.mjs +63 -72
  214. package/dist/webpack/server.mjs.map +1 -1
  215. package/dist/webpack/utils.cjs +5 -21
  216. package/dist/webpack/utils.cjs.map +1 -1
  217. package/dist/webpack/utils.d.cts +6 -36
  218. package/dist/webpack/utils.d.cts.map +1 -1
  219. package/dist/webpack/utils.d.mts +6 -36
  220. package/dist/webpack/utils.d.mts.map +1 -1
  221. package/dist/webpack/utils.mjs +4 -18
  222. package/dist/webpack/utils.mjs.map +1 -1
  223. package/package.json +16 -40
  224. package/dist/commands/eval/__test__/browserify/bad/snap.config.cjs +0 -10
  225. package/dist/commands/eval/__test__/browserify/bad/snap.config.cjs.map +0 -1
  226. package/dist/commands/eval/__test__/browserify/bad/snap.config.d.cts +0 -4
  227. package/dist/commands/eval/__test__/browserify/bad/snap.config.d.cts.map +0 -1
  228. package/dist/commands/eval/__test__/browserify/bad/snap.config.d.mts +0 -4
  229. package/dist/commands/eval/__test__/browserify/bad/snap.config.d.mts.map +0 -1
  230. package/dist/commands/eval/__test__/browserify/bad/snap.config.mjs +0 -8
  231. package/dist/commands/eval/__test__/browserify/bad/snap.config.mjs.map +0 -1
  232. package/dist/commands/eval/__test__/browserify/good/snap.config.cjs +0 -10
  233. package/dist/commands/eval/__test__/browserify/good/snap.config.cjs.map +0 -1
  234. package/dist/commands/eval/__test__/browserify/good/snap.config.d.cts +0 -4
  235. package/dist/commands/eval/__test__/browserify/good/snap.config.d.cts.map +0 -1
  236. package/dist/commands/eval/__test__/browserify/good/snap.config.d.mts +0 -4
  237. package/dist/commands/eval/__test__/browserify/good/snap.config.d.mts.map +0 -1
  238. package/dist/commands/eval/__test__/browserify/good/snap.config.mjs +0 -8
  239. package/dist/commands/eval/__test__/browserify/good/snap.config.mjs.map +0 -1
  240. package/dist/utils/legacy.cjs +0 -53
  241. package/dist/utils/legacy.cjs.map +0 -1
  242. package/dist/utils/legacy.d.cts +0 -28
  243. package/dist/utils/legacy.d.cts.map +0 -1
  244. package/dist/utils/legacy.d.mts +0 -28
  245. package/dist/utils/legacy.d.mts.map +0 -1
  246. package/dist/utils/legacy.mjs +0 -47
  247. package/dist/utils/legacy.mjs.map +0 -1
  248. package/dist/webpack/loaders/browserify.cjs +0 -84
  249. package/dist/webpack/loaders/browserify.cjs.map +0 -1
  250. package/dist/webpack/loaders/browserify.d.cts +0 -18
  251. package/dist/webpack/loaders/browserify.d.cts.map +0 -1
  252. package/dist/webpack/loaders/browserify.d.mts +0 -18
  253. package/dist/webpack/loaders/browserify.d.mts.map +0 -1
  254. package/dist/webpack/loaders/browserify.mjs +0 -88
  255. 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@6.7.0...HEAD
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.0` or later.
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 Show version number [boolean]
29
- -c, --config Path to config file [string]
30
- --verboseErrors Display original errors [deprecated] [boolean]
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
- './dist/bundle.js'
37
- mm-snap build --config Build './src/index.js' as
38
- ./snap.config.build.ts './dist/bundle.js' using the config
39
- in './snap.config.build.ts'
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
- errors
40
+ errors
42
41
  mm-snap watch --port 8000 The snap input file for changes, and
43
- serve it on port 8000
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;
@@ -1 +1 @@
1
- {"version":3,"file":"builders.cjs","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"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","sourcesContent":["import type { Options } from 'yargs';\n\nexport enum TranspilationModes {\n LocalAndDeps = 'localAndDeps',\n LocalOnly = 'localOnly',\n None = 'none',\n}\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 // Deprecated Browserify options.\n bundle: {\n alias: 'b',\n describe: 'Snap bundle file',\n type: 'string',\n normalize: true,\n deprecated: 'Use --input instead.',\n },\n\n dist: {\n alias: 'd',\n describe: 'Output directory',\n type: 'string',\n normalize: true,\n deprecated: true,\n },\n\n eval: {\n alias: 'e',\n describe: 'Attempt to evaluate Snap bundle in SES',\n type: 'boolean',\n deprecated: true,\n },\n\n manifest: {\n alias: 'm',\n describe: 'Validate snap.manifest.json',\n type: 'boolean',\n deprecated: 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 deprecated: true,\n },\n\n outfileName: {\n alias: 'n',\n describe: 'Output file name',\n type: 'string',\n deprecated: true,\n },\n\n root: {\n alias: 'r',\n describe: 'Server root directory',\n type: 'string',\n normalize: true,\n deprecated: true,\n },\n\n sourceMaps: {\n describe: 'Whether builds include sourcemaps',\n type: 'boolean',\n deprecated: true,\n },\n\n src: {\n alias: 's',\n describe: 'Source file',\n type: 'string',\n normalize: true,\n deprecated: true,\n },\n\n stripComments: {\n alias: 'strip',\n describe: 'Whether to remove code comments from the build output',\n type: 'boolean',\n deprecated: true,\n },\n\n suppressWarnings: {\n type: 'boolean',\n describe: 'Whether to suppress warnings',\n deprecated: true,\n },\n\n transpilationMode: {\n type: 'string',\n describe:\n 'Whether to use Babel to transpile all source code (including dependencies), local source code only, or nothing',\n choices: Object.values(TranspilationModes),\n deprecated: true,\n },\n\n depsToTranspile: {\n type: 'array',\n describe: 'Transpile only the listed dependencies.',\n deprecated: true,\n },\n\n verboseErrors: {\n type: 'boolean',\n describe: 'Display original errors',\n deprecated: true,\n },\n\n writeManifest: {\n describe: 'Make necessary changes to the snap manifest file',\n type: 'boolean',\n deprecated: true,\n },\n\n serve: {\n describe: 'Serve snap file(s) locally for testing',\n type: 'boolean',\n deprecated: true,\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,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"]}
@@ -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;
@@ -1 +1 @@
1
- {"version":3,"file":"builders.d.cts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB;IAC5B,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,IAAI,SAAS;CACd;AAED,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA4DI,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoF6B,CAAC;AAEvD,eAAe,QAAQ,CAAC"}
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"}