@metamask/snaps-cli 5.1.1 → 6.0.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 +8 -1
- package/dist/builders.js +10 -0
- package/dist/builders.js.map +1 -0
- package/dist/builders.mjs +10 -0
- package/dist/builders.mjs.map +1 -0
- package/dist/chunk-25SLEORF.mjs +28 -0
- package/dist/chunk-25SLEORF.mjs.map +1 -0
- package/dist/chunk-2QVYYMUD.js +365 -0
- package/dist/chunk-2QVYYMUD.js.map +1 -0
- package/dist/{esm/webpack/config.js → chunk-3LNPS7AX.js} +182 -156
- package/dist/chunk-3LNPS7AX.js.map +1 -0
- package/dist/chunk-46JUPGRY.js +22 -0
- package/dist/chunk-46JUPGRY.js.map +1 -0
- package/dist/chunk-4NHBPMKT.js +54 -0
- package/dist/chunk-4NHBPMKT.js.map +1 -0
- package/dist/chunk-4OKAI7AP.js +52 -0
- package/dist/chunk-4OKAI7AP.js.map +1 -0
- package/dist/chunk-5DDAAM2X.js +41 -0
- package/dist/chunk-5DDAAM2X.js.map +1 -0
- package/dist/chunk-5DSV76XV.mjs +10 -0
- package/dist/chunk-5DSV76XV.mjs.map +1 -0
- package/dist/chunk-5JPLNWCO.js +24 -0
- package/dist/chunk-5JPLNWCO.js.map +1 -0
- package/dist/chunk-5VAZH7L7.js +64 -0
- package/dist/chunk-5VAZH7L7.js.map +1 -0
- package/dist/chunk-5YUHRLH6.js +22 -0
- package/dist/chunk-5YUHRLH6.js.map +1 -0
- package/dist/chunk-6IF2UBYA.mjs +13 -0
- package/dist/chunk-6IF2UBYA.mjs.map +1 -0
- package/dist/chunk-6NJAXMSB.js +135 -0
- package/dist/chunk-6NJAXMSB.js.map +1 -0
- package/dist/chunk-6VFUO2H5.mjs +124 -0
- package/dist/chunk-6VFUO2H5.mjs.map +1 -0
- package/dist/chunk-7SN4Y44H.js +287 -0
- package/dist/chunk-7SN4Y44H.js.map +1 -0
- package/dist/chunk-ASOCIPDR.js +10 -0
- package/dist/chunk-ASOCIPDR.js.map +1 -0
- package/dist/chunk-B455GFXP.mjs +54 -0
- package/dist/chunk-B455GFXP.mjs.map +1 -0
- package/dist/chunk-DWS4BJTE.mjs +64 -0
- package/dist/chunk-DWS4BJTE.mjs.map +1 -0
- package/dist/chunk-EQRMXKXY.js +346 -0
- package/dist/chunk-EQRMXKXY.js.map +1 -0
- package/dist/chunk-EXGQAOQS.js +64 -0
- package/dist/chunk-EXGQAOQS.js.map +1 -0
- package/dist/chunk-EXJCMAUI.mjs +23 -0
- package/dist/chunk-EXJCMAUI.mjs.map +1 -0
- package/dist/chunk-FPG4GBXZ.js +30 -0
- package/dist/chunk-FPG4GBXZ.js.map +1 -0
- package/dist/chunk-FYTQTDZU.mjs +52 -0
- package/dist/chunk-FYTQTDZU.mjs.map +1 -0
- package/dist/chunk-G3IYVYVR.js +31 -0
- package/dist/chunk-G3IYVYVR.js.map +1 -0
- package/dist/chunk-GC7BNDLY.js +23 -0
- package/dist/chunk-GC7BNDLY.js.map +1 -0
- package/dist/chunk-GKG7TO7T.js +28 -0
- package/dist/chunk-GKG7TO7T.js.map +1 -0
- package/dist/chunk-GU2KH52B.mjs +53 -0
- package/dist/chunk-GU2KH52B.mjs.map +1 -0
- package/dist/chunk-GUXDSKV4.mjs +51 -0
- package/dist/chunk-GUXDSKV4.mjs.map +1 -0
- package/dist/chunk-HGYXRW5B.js +50 -0
- package/dist/chunk-HGYXRW5B.js.map +1 -0
- package/dist/chunk-HJ4276TR.mjs +41 -0
- package/dist/chunk-HJ4276TR.mjs.map +1 -0
- package/dist/chunk-HNLMKJBX.js +30 -0
- package/dist/chunk-HNLMKJBX.js.map +1 -0
- package/dist/chunk-IJYBCHVM.js +32 -0
- package/dist/chunk-IJYBCHVM.js.map +1 -0
- package/dist/chunk-IQTGFRWK.js +18 -0
- package/dist/chunk-IQTGFRWK.js.map +1 -0
- package/dist/chunk-IYAFFTJU.js +23 -0
- package/dist/chunk-IYAFFTJU.js.map +1 -0
- package/dist/chunk-JMISQ4HT.mjs +31 -0
- package/dist/chunk-JMISQ4HT.mjs.map +1 -0
- package/dist/chunk-K3TSXPME.js +16 -0
- package/dist/chunk-K3TSXPME.js.map +1 -0
- package/dist/{cjs/webpack/config.js → chunk-KKTPKAZN.mjs} +181 -153
- package/dist/chunk-KKTPKAZN.mjs.map +1 -0
- package/dist/chunk-KZFWI73A.js +28 -0
- package/dist/chunk-KZFWI73A.js.map +1 -0
- package/dist/chunk-L5TMG6BQ.js +37 -0
- package/dist/chunk-L5TMG6BQ.js.map +1 -0
- package/dist/chunk-MCN7UXG3.mjs +287 -0
- package/dist/chunk-MCN7UXG3.mjs.map +1 -0
- package/dist/chunk-MIV2UFTA.js +13 -0
- package/dist/chunk-MIV2UFTA.js.map +1 -0
- package/dist/chunk-MMBQXT2G.mjs +30 -0
- package/dist/chunk-MMBQXT2G.mjs.map +1 -0
- package/dist/chunk-NO53G7NT.js +61 -0
- package/dist/chunk-NO53G7NT.js.map +1 -0
- package/dist/chunk-O2QUFUOY.js +53 -0
- package/dist/chunk-O2QUFUOY.js.map +1 -0
- package/dist/chunk-OF4BF57X.mjs +22 -0
- package/dist/chunk-OF4BF57X.mjs.map +1 -0
- package/dist/chunk-OVCYXVWI.mjs +1 -0
- package/dist/chunk-OVCYXVWI.mjs.map +1 -0
- package/dist/chunk-PDNDGMB2.mjs +365 -0
- package/dist/chunk-PDNDGMB2.mjs.map +1 -0
- package/dist/chunk-QCP4QKMQ.mjs +24 -0
- package/dist/chunk-QCP4QKMQ.mjs.map +1 -0
- package/dist/chunk-QH4AQR33.mjs +61 -0
- package/dist/chunk-QH4AQR33.mjs.map +1 -0
- package/dist/chunk-S5ERYB6I.mjs +64 -0
- package/dist/chunk-S5ERYB6I.mjs.map +1 -0
- package/dist/chunk-SAEZHRJJ.mjs +23 -0
- package/dist/chunk-SAEZHRJJ.mjs.map +1 -0
- package/dist/chunk-T3KPXUAU.js +24 -0
- package/dist/chunk-T3KPXUAU.js.map +1 -0
- package/dist/chunk-T74IXMA3.mjs +50 -0
- package/dist/chunk-T74IXMA3.mjs.map +1 -0
- package/dist/chunk-TLTTWAEI.mjs +37 -0
- package/dist/chunk-TLTTWAEI.mjs.map +1 -0
- package/dist/chunk-TX4BG5GS.mjs +50 -0
- package/dist/chunk-TX4BG5GS.mjs.map +1 -0
- package/dist/chunk-UA5FEKKH.mjs +30 -0
- package/dist/chunk-UA5FEKKH.mjs.map +1 -0
- package/dist/chunk-UBWM7UOC.mjs +32 -0
- package/dist/chunk-UBWM7UOC.mjs.map +1 -0
- package/dist/chunk-USFFVX52.mjs +35 -0
- package/dist/chunk-USFFVX52.mjs.map +1 -0
- package/dist/chunk-V5Q5HRXB.mjs +30 -0
- package/dist/chunk-V5Q5HRXB.mjs.map +1 -0
- package/dist/chunk-VI3ZJJYO.mjs +346 -0
- package/dist/chunk-VI3ZJJYO.mjs.map +1 -0
- package/dist/chunk-VTJFPUIA.mjs +22 -0
- package/dist/chunk-VTJFPUIA.mjs.map +1 -0
- package/dist/chunk-WH7GOZP7.js +51 -0
- package/dist/chunk-WH7GOZP7.js.map +1 -0
- package/dist/chunk-WJNHZ4YF.js +35 -0
- package/dist/chunk-WJNHZ4YF.js.map +1 -0
- package/dist/chunk-WKL7DYYW.mjs +16 -0
- package/dist/chunk-WKL7DYYW.mjs.map +1 -0
- package/dist/chunk-X2RPNWBJ.mjs +24 -0
- package/dist/chunk-X2RPNWBJ.mjs.map +1 -0
- package/dist/chunk-X3D3MHWF.js +44 -0
- package/dist/chunk-X3D3MHWF.js.map +1 -0
- package/dist/chunk-X4FWMO4H.mjs +18 -0
- package/dist/chunk-X4FWMO4H.mjs.map +1 -0
- package/dist/chunk-Y5PQG4KA.js +1 -0
- package/dist/chunk-Y5PQG4KA.js.map +1 -0
- package/dist/chunk-YDLKS46R.js +30 -0
- package/dist/chunk-YDLKS46R.js.map +1 -0
- package/dist/chunk-YURDB35F.js +124 -0
- package/dist/chunk-YURDB35F.js.map +1 -0
- package/dist/chunk-YYYOE2GO.mjs +32 -0
- package/dist/chunk-YYYOE2GO.mjs.map +1 -0
- package/dist/chunk-ZOQ32RQI.mjs +135 -0
- package/dist/chunk-ZOQ32RQI.mjs.map +1 -0
- package/dist/cli.js +21 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +21 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/commands/build/build.js +29 -0
- package/dist/commands/build/build.js.map +1 -0
- package/dist/commands/build/build.mjs +29 -0
- package/dist/commands/build/build.mjs.map +1 -0
- package/dist/commands/build/implementation.js +28 -0
- package/dist/commands/build/implementation.js.map +1 -0
- package/dist/commands/build/implementation.mjs +28 -0
- package/dist/commands/build/implementation.mjs.map +1 -0
- package/dist/commands/build/index.js +33 -0
- package/dist/commands/build/index.js.map +1 -0
- package/dist/commands/build/index.mjs +33 -0
- package/dist/commands/build/index.mjs.map +1 -0
- package/dist/commands/eval/eval.js +18 -0
- package/dist/commands/eval/eval.js.map +1 -0
- package/dist/commands/eval/eval.mjs +18 -0
- package/dist/commands/eval/eval.mjs.map +1 -0
- package/dist/commands/eval/implementation.js +9 -0
- package/dist/commands/eval/implementation.js.map +1 -0
- package/dist/commands/eval/implementation.mjs +9 -0
- package/dist/commands/eval/implementation.mjs.map +1 -0
- package/dist/commands/eval/index.js +22 -0
- package/dist/commands/eval/index.js.map +1 -0
- package/dist/commands/eval/index.mjs +22 -0
- package/dist/commands/eval/index.mjs.map +1 -0
- package/dist/commands/index.js +39 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/index.mjs +39 -0
- package/dist/commands/index.mjs.map +1 -0
- package/dist/commands/manifest/implementation.js +17 -0
- package/dist/commands/manifest/implementation.js.map +1 -0
- package/dist/commands/manifest/implementation.mjs +17 -0
- package/dist/commands/manifest/implementation.mjs.map +1 -0
- package/dist/commands/manifest/index.js +22 -0
- package/dist/commands/manifest/index.js.map +1 -0
- package/dist/commands/manifest/index.mjs +22 -0
- package/dist/commands/manifest/index.mjs.map +1 -0
- package/dist/commands/manifest/manifest.js +18 -0
- package/dist/commands/manifest/manifest.js.map +1 -0
- package/dist/commands/manifest/manifest.mjs +18 -0
- package/dist/commands/manifest/manifest.mjs.map +1 -0
- package/dist/commands/serve/index.js +29 -0
- package/dist/commands/serve/index.js.map +1 -0
- package/dist/commands/serve/index.mjs +29 -0
- package/dist/commands/serve/index.mjs.map +1 -0
- package/dist/commands/serve/serve.js +28 -0
- package/dist/commands/serve/serve.js.map +1 -0
- package/dist/commands/serve/serve.mjs +28 -0
- package/dist/commands/serve/serve.mjs.map +1 -0
- package/dist/commands/watch/implementation.js +28 -0
- package/dist/commands/watch/implementation.js.map +1 -0
- package/dist/commands/watch/implementation.mjs +28 -0
- package/dist/commands/watch/implementation.mjs.map +1 -0
- package/dist/commands/watch/index.js +33 -0
- package/dist/commands/watch/index.js.map +1 -0
- package/dist/commands/watch/index.mjs +33 -0
- package/dist/commands/watch/index.mjs.map +1 -0
- package/dist/commands/watch/watch.js +29 -0
- package/dist/commands/watch/watch.js.map +1 -0
- package/dist/commands/watch/watch.mjs +29 -0
- package/dist/commands/watch/watch.mjs.map +1 -0
- package/dist/config.js +36 -0
- package/dist/config.js.map +1 -0
- package/dist/config.mjs +36 -0
- package/dist/config.mjs.map +1 -0
- package/dist/errors.js +12 -0
- package/dist/errors.js.map +1 -0
- package/dist/errors.mjs +12 -0
- package/dist/errors.mjs.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +43 -0
- package/dist/index.mjs.map +1 -0
- package/dist/main.js +49 -0
- package/dist/main.js.map +1 -0
- package/dist/main.mjs +49 -0
- package/dist/main.mjs.map +1 -0
- package/dist/structs.js +8 -0
- package/dist/structs.js.map +1 -0
- package/dist/structs.mjs +8 -0
- package/dist/structs.mjs.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/commands/eval/implementation.d.ts +1 -1
- package/dist/types/config.d.ts +2 -2
- package/dist/types/structs.d.ts +20 -0
- package/dist/types/webpack/loaders/function.d.ts +34 -0
- package/dist/types/webpack/loaders/index.d.ts +3 -0
- package/dist/types/webpack/utils.d.ts +13 -11
- package/dist/types/yargs.d.js +1 -0
- package/dist/types/yargs.d.js.map +1 -0
- package/dist/types/yargs.d.mjs +2 -0
- package/dist/types/yargs.d.mjs.map +1 -0
- package/dist/utils/cli.js +14 -0
- package/dist/utils/cli.js.map +1 -0
- package/dist/utils/cli.mjs +14 -0
- package/dist/utils/cli.mjs.map +1 -0
- package/dist/utils/errors.js +11 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/errors.mjs +11 -0
- package/dist/utils/errors.mjs.map +1 -0
- package/dist/utils/index.js +47 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +47 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils/legacy.js +13 -0
- package/dist/utils/legacy.js.map +1 -0
- package/dist/utils/legacy.mjs +13 -0
- package/dist/utils/legacy.mjs.map +1 -0
- package/dist/utils/logging.js +12 -0
- package/dist/utils/logging.js.map +1 -0
- package/dist/utils/logging.mjs +12 -0
- package/dist/utils/logging.mjs.map +1 -0
- package/dist/utils/path.js +8 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/path.mjs +8 -0
- package/dist/utils/path.mjs.map +1 -0
- package/dist/utils/steps.js +11 -0
- package/dist/utils/steps.js.map +1 -0
- package/dist/utils/steps.mjs +11 -0
- package/dist/utils/steps.mjs.map +1 -0
- package/dist/webpack/compiler.js +25 -0
- package/dist/webpack/compiler.js.map +1 -0
- package/dist/webpack/compiler.mjs +25 -0
- package/dist/webpack/compiler.mjs.map +1 -0
- package/dist/webpack/config.js +24 -0
- package/dist/webpack/config.js.map +1 -0
- package/dist/webpack/config.mjs +24 -0
- package/dist/webpack/config.mjs.map +1 -0
- package/dist/webpack/index.js +44 -0
- package/dist/webpack/index.js.map +1 -0
- package/dist/webpack/index.mjs +44 -0
- package/dist/webpack/index.mjs.map +1 -0
- package/dist/webpack/loaders/browserify.js +19 -0
- package/dist/webpack/loaders/browserify.js.map +1 -0
- package/dist/webpack/loaders/browserify.mjs +19 -0
- package/dist/webpack/loaders/browserify.mjs.map +1 -0
- package/dist/webpack/loaders/function.js +10 -0
- package/dist/webpack/loaders/function.js.map +1 -0
- package/dist/webpack/loaders/function.mjs +10 -0
- package/dist/webpack/loaders/function.mjs.map +1 -0
- package/dist/webpack/loaders/index.js +25 -0
- package/dist/webpack/loaders/index.js.map +1 -0
- package/dist/webpack/loaders/index.mjs +25 -0
- package/dist/webpack/loaders/index.mjs.map +1 -0
- package/dist/webpack/loaders/wasm.js +16 -0
- package/dist/webpack/loaders/wasm.js.map +1 -0
- package/dist/webpack/loaders/wasm.mjs +16 -0
- package/dist/webpack/loaders/wasm.mjs.map +1 -0
- package/dist/webpack/plugins.js +29 -0
- package/dist/webpack/plugins.js.map +1 -0
- package/dist/webpack/plugins.mjs +29 -0
- package/dist/webpack/plugins.mjs.map +1 -0
- package/dist/webpack/server.js +10 -0
- package/dist/webpack/server.js.map +1 -0
- package/dist/webpack/server.mjs +10 -0
- package/dist/webpack/server.mjs.map +1 -0
- package/dist/webpack/utils.js +37 -0
- package/dist/webpack/utils.js.map +1 -0
- package/dist/webpack/utils.mjs +37 -0
- package/dist/webpack/utils.mjs.map +1 -0
- package/package.json +21 -21
- package/.browserslistrc +0 -3
- package/dist/cjs/builders.js +0 -148
- package/dist/cjs/builders.js.map +0 -1
- package/dist/cjs/cli.js +0 -68
- package/dist/cjs/cli.js.map +0 -1
- package/dist/cjs/commands/build/build.js +0 -54
- package/dist/cjs/commands/build/build.js.map +0 -1
- package/dist/cjs/commands/build/implementation.js +0 -31
- package/dist/cjs/commands/build/implementation.js.map +0 -1
- package/dist/cjs/commands/build/index.js +0 -45
- package/dist/cjs/commands/build/index.js.map +0 -1
- package/dist/cjs/commands/eval/eval.js +0 -57
- package/dist/cjs/commands/eval/eval.js.map +0 -1
- package/dist/cjs/commands/eval/implementation.js +0 -27
- package/dist/cjs/commands/eval/implementation.js.map +0 -1
- package/dist/cjs/commands/eval/index.js +0 -50
- package/dist/cjs/commands/eval/index.js.map +0 -1
- package/dist/cjs/commands/index.js +0 -30
- package/dist/cjs/commands/index.js.map +0 -1
- package/dist/cjs/commands/manifest/implementation.js +0 -34
- package/dist/cjs/commands/manifest/implementation.js.map +0 -1
- package/dist/cjs/commands/manifest/index.js +0 -50
- package/dist/cjs/commands/manifest/index.js.map +0 -1
- package/dist/cjs/commands/manifest/manifest.js +0 -55
- package/dist/cjs/commands/manifest/manifest.js.map +0 -1
- package/dist/cjs/commands/serve/index.js +0 -33
- package/dist/cjs/commands/serve/index.js.map +0 -1
- package/dist/cjs/commands/serve/serve.js +0 -21
- package/dist/cjs/commands/serve/serve.js.map +0 -1
- package/dist/cjs/commands/watch/implementation.js +0 -35
- package/dist/cjs/commands/watch/implementation.js.map +0 -1
- package/dist/cjs/commands/watch/index.js +0 -47
- package/dist/cjs/commands/watch/index.js.map +0 -1
- package/dist/cjs/commands/watch/watch.js +0 -51
- package/dist/cjs/commands/watch/watch.js.map +0 -1
- package/dist/cjs/config.js +0 -320
- package/dist/cjs/config.js.map +0 -1
- package/dist/cjs/errors.js +0 -37
- package/dist/cjs/errors.js.map +0 -1
- package/dist/cjs/index.js +0 -77
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/main.js +0 -19
- package/dist/cjs/main.js.map +0 -1
- package/dist/cjs/utils/cli.js +0 -61
- package/dist/cjs/utils/cli.js.map +0 -1
- package/dist/cjs/utils/errors.js +0 -42
- package/dist/cjs/utils/errors.js.map +0 -1
- package/dist/cjs/utils/index.js +0 -25
- package/dist/cjs/utils/index.js.map +0 -1
- package/dist/cjs/utils/legacy.js +0 -48
- package/dist/cjs/utils/legacy.js.map +0 -1
- package/dist/cjs/utils/logging.js +0 -46
- package/dist/cjs/utils/logging.js.map +0 -1
- package/dist/cjs/utils/path.js +0 -16
- package/dist/cjs/utils/path.js.map +0 -1
- package/dist/cjs/utils/steps.js +0 -52
- package/dist/cjs/utils/steps.js.map +0 -1
- package/dist/cjs/webpack/compiler.js +0 -19
- package/dist/cjs/webpack/compiler.js.map +0 -1
- package/dist/cjs/webpack/config.js.map +0 -1
- package/dist/cjs/webpack/index.js +0 -23
- package/dist/cjs/webpack/index.js.map +0 -1
- package/dist/cjs/webpack/loaders/browserify.js +0 -97
- package/dist/cjs/webpack/loaders/browserify.js.map +0 -1
- package/dist/cjs/webpack/loaders/wasm.js +0 -92
- package/dist/cjs/webpack/loaders/wasm.js.map +0 -1
- package/dist/cjs/webpack/plugins.js +0 -341
- package/dist/cjs/webpack/plugins.js.map +0 -1
- package/dist/cjs/webpack/server.js +0 -139
- package/dist/cjs/webpack/server.js.map +0 -1
- package/dist/cjs/webpack/utils.js +0 -254
- package/dist/cjs/webpack/utils.js.map +0 -1
- package/dist/esm/builders.js +0 -130
- package/dist/esm/builders.js.map +0 -1
- package/dist/esm/cli.js +0 -56
- package/dist/esm/cli.js.map +0 -1
- package/dist/esm/commands/build/build.js +0 -51
- package/dist/esm/commands/build/build.js.map +0 -1
- package/dist/esm/commands/build/implementation.js +0 -27
- package/dist/esm/commands/build/implementation.js.map +0 -1
- package/dist/esm/commands/build/index.js +0 -17
- package/dist/esm/commands/build/index.js.map +0 -1
- package/dist/esm/commands/eval/eval.js +0 -54
- package/dist/esm/commands/eval/eval.js.map +0 -1
- package/dist/esm/commands/eval/implementation.js +0 -24
- package/dist/esm/commands/eval/implementation.js.map +0 -1
- package/dist/esm/commands/eval/index.js +0 -22
- package/dist/esm/commands/eval/index.js.map +0 -1
- package/dist/esm/commands/index.js +0 -15
- package/dist/esm/commands/index.js.map +0 -1
- package/dist/esm/commands/manifest/implementation.js +0 -33
- package/dist/esm/commands/manifest/implementation.js.map +0 -1
- package/dist/esm/commands/manifest/index.js +0 -22
- package/dist/esm/commands/manifest/index.js.map +0 -1
- package/dist/esm/commands/manifest/manifest.js +0 -52
- package/dist/esm/commands/manifest/manifest.js.map +0 -1
- package/dist/esm/commands/serve/index.js +0 -18
- package/dist/esm/commands/serve/index.js.map +0 -1
- package/dist/esm/commands/serve/serve.js +0 -17
- package/dist/esm/commands/serve/serve.js.map +0 -1
- package/dist/esm/commands/watch/implementation.js +0 -34
- package/dist/esm/commands/watch/implementation.js.map +0 -1
- package/dist/esm/commands/watch/index.js +0 -19
- package/dist/esm/commands/watch/index.js.map +0 -1
- package/dist/esm/commands/watch/watch.js +0 -50
- package/dist/esm/commands/watch/watch.js.map +0 -1
- package/dist/esm/config.js +0 -324
- package/dist/esm/config.js.map +0 -1
- package/dist/esm/errors.js +0 -30
- package/dist/esm/errors.js.map +0 -1
- package/dist/esm/index.js +0 -6
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/main.js +0 -10
- package/dist/esm/main.js.map +0 -1
- package/dist/esm/utils/cli.js +0 -43
- package/dist/esm/utils/cli.js.map +0 -1
- package/dist/esm/utils/errors.js +0 -43
- package/dist/esm/utils/errors.js.map +0 -1
- package/dist/esm/utils/index.js +0 -8
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/esm/utils/legacy.js +0 -47
- package/dist/esm/utils/legacy.js.map +0 -1
- package/dist/esm/utils/logging.js +0 -40
- package/dist/esm/utils/logging.js.map +0 -1
- package/dist/esm/utils/path.js +0 -13
- package/dist/esm/utils/path.js.map +0 -1
- package/dist/esm/utils/steps.js +0 -43
- package/dist/esm/utils/steps.js.map +0 -1
- package/dist/esm/webpack/compiler.js +0 -15
- package/dist/esm/webpack/compiler.js.map +0 -1
- package/dist/esm/webpack/config.js.map +0 -1
- package/dist/esm/webpack/index.js +0 -6
- package/dist/esm/webpack/index.js.map +0 -1
- package/dist/esm/webpack/loaders/browserify.js +0 -82
- package/dist/esm/webpack/loaders/browserify.js.map +0 -1
- package/dist/esm/webpack/loaders/wasm.js +0 -87
- package/dist/esm/webpack/loaders/wasm.js.map +0 -1
- package/dist/esm/webpack/plugins.js +0 -344
- package/dist/esm/webpack/plugins.js.map +0 -1
- package/dist/esm/webpack/server.js +0 -133
- package/dist/esm/webpack/server.js.map +0 -1
- package/dist/esm/webpack/utils.js +0 -285
- package/dist/esm/webpack/utils.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk7SN4Y44Hjs = require('../chunk-7SN4Y44H.js');
|
|
13
|
+
require('../chunk-GKG7TO7T.js');
|
|
14
|
+
require('../chunk-5VAZH7L7.js');
|
|
15
|
+
require('../chunk-O2QUFUOY.js');
|
|
16
|
+
require('../chunk-L5TMG6BQ.js');
|
|
17
|
+
require('../chunk-HNLMKJBX.js');
|
|
18
|
+
require('../chunk-ASOCIPDR.js');
|
|
19
|
+
require('../chunk-5DDAAM2X.js');
|
|
20
|
+
require('../chunk-IJYBCHVM.js');
|
|
21
|
+
require('../chunk-G3IYVYVR.js');
|
|
22
|
+
require('../chunk-6NJAXMSB.js');
|
|
23
|
+
require('../chunk-46JUPGRY.js');
|
|
24
|
+
require('../chunk-X3D3MHWF.js');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
exports.BROWSERSLIST_FILE = _chunk7SN4Y44Hjs.BROWSERSLIST_FILE; exports.WEBPACK_FALLBACKS = _chunk7SN4Y44Hjs.WEBPACK_FALLBACKS; exports.formatText = _chunk7SN4Y44Hjs.formatText; exports.getBrowserslistTargets = _chunk7SN4Y44Hjs.getBrowserslistTargets; exports.getDefaultLoader = _chunk7SN4Y44Hjs.getDefaultLoader; exports.getDevTool = _chunk7SN4Y44Hjs.getDevTool; exports.getEnvironmentVariables = _chunk7SN4Y44Hjs.getEnvironmentVariables; exports.getFallbacks = _chunk7SN4Y44Hjs.getFallbacks; exports.getProgressHandler = _chunk7SN4Y44Hjs.getProgressHandler; exports.pluralize = _chunk7SN4Y44Hjs.pluralize;
|
|
37
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BROWSERSLIST_FILE,
|
|
3
|
+
WEBPACK_FALLBACKS,
|
|
4
|
+
formatText,
|
|
5
|
+
getBrowserslistTargets,
|
|
6
|
+
getDefaultLoader,
|
|
7
|
+
getDevTool,
|
|
8
|
+
getEnvironmentVariables,
|
|
9
|
+
getFallbacks,
|
|
10
|
+
getProgressHandler,
|
|
11
|
+
pluralize
|
|
12
|
+
} from "../chunk-MCN7UXG3.mjs";
|
|
13
|
+
import "../chunk-UBWM7UOC.mjs";
|
|
14
|
+
import "../chunk-DWS4BJTE.mjs";
|
|
15
|
+
import "../chunk-GU2KH52B.mjs";
|
|
16
|
+
import "../chunk-TLTTWAEI.mjs";
|
|
17
|
+
import "../chunk-V5Q5HRXB.mjs";
|
|
18
|
+
import "../chunk-5DSV76XV.mjs";
|
|
19
|
+
import "../chunk-HJ4276TR.mjs";
|
|
20
|
+
import "../chunk-YYYOE2GO.mjs";
|
|
21
|
+
import "../chunk-JMISQ4HT.mjs";
|
|
22
|
+
import "../chunk-ZOQ32RQI.mjs";
|
|
23
|
+
import "../chunk-OF4BF57X.mjs";
|
|
24
|
+
import "../chunk-T74IXMA3.mjs";
|
|
25
|
+
export {
|
|
26
|
+
BROWSERSLIST_FILE,
|
|
27
|
+
WEBPACK_FALLBACKS,
|
|
28
|
+
formatText,
|
|
29
|
+
getBrowserslistTargets,
|
|
30
|
+
getDefaultLoader,
|
|
31
|
+
getDevTool,
|
|
32
|
+
getEnvironmentVariables,
|
|
33
|
+
getFallbacks,
|
|
34
|
+
getProgressHandler,
|
|
35
|
+
pluralize
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/snaps-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "A CLI for developing MetaMask Snaps.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,28 +8,28 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"sideEffects": false,
|
|
11
|
-
"
|
|
12
|
-
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.mjs",
|
|
14
|
+
"require": "./dist/index.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"module": "./dist/index.mjs",
|
|
13
21
|
"types": "./dist/types/index.d.ts",
|
|
14
22
|
"bin": {
|
|
15
|
-
"mm-snap": "./dist/
|
|
23
|
+
"mm-snap": "./dist/main.js"
|
|
16
24
|
},
|
|
17
25
|
"files": [
|
|
18
|
-
"dist
|
|
19
|
-
"dist/esm/**",
|
|
20
|
-
"dist/types/**",
|
|
21
|
-
".browserslistrc"
|
|
26
|
+
"dist"
|
|
22
27
|
],
|
|
23
28
|
"scripts": {
|
|
24
|
-
"build": "yarn build:
|
|
25
|
-
"build:source": "yarn build:esm && yarn build:cjs",
|
|
29
|
+
"build": "tsup --clean && yarn build:types && yarn build:chmod && yarn build:readme",
|
|
26
30
|
"build:types": "tsc --project tsconfig.build.json",
|
|
27
|
-
"build:
|
|
28
|
-
"build:cjs": "swc src --out-dir dist/cjs --config-file ../../.swcrc.build.json --config module.type=commonjs",
|
|
29
|
-
"build:post-tsc": "yarn build:chmod && yarn build:readme",
|
|
30
|
-
"build:chmod": "chmod +x ./dist/esm/main.js && chmod +x ./dist/cjs/main.js",
|
|
31
|
+
"build:chmod": "chmod +x ./dist/main.mjs && chmod +x ./dist/main.js",
|
|
31
32
|
"build:readme": "node ./scripts/updateReadme.js",
|
|
32
|
-
"build:clean": "yarn clean && yarn build",
|
|
33
33
|
"build:watch": "tsc-watch --onSuccess 'yarn build:chmod'",
|
|
34
34
|
"clean": "rimraf '*.tsbuildinfo' 'dist'",
|
|
35
35
|
"test": "jest --runInBand && yarn posttest",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
|
|
44
44
|
"publish:preview": "yarn npm publish --tag preview",
|
|
45
45
|
"lint:ci": "yarn lint",
|
|
46
|
-
"lint:dependencies": "depcheck"
|
|
46
|
+
"lint:dependencies": "depcheck",
|
|
47
|
+
"build:ci": "tsup --clean"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@babel/core": "^7.23.2",
|
|
@@ -54,9 +55,9 @@
|
|
|
54
55
|
"@babel/plugin-transform-runtime": "^7.13.2",
|
|
55
56
|
"@babel/preset-env": "^7.23.2",
|
|
56
57
|
"@babel/preset-typescript": "^7.23.2",
|
|
57
|
-
"@metamask/snaps-sdk": "^
|
|
58
|
-
"@metamask/snaps-utils": "^
|
|
59
|
-
"@metamask/snaps-webpack-plugin": "^
|
|
58
|
+
"@metamask/snaps-sdk": "^3.0.0",
|
|
59
|
+
"@metamask/snaps-utils": "^7.0.0",
|
|
60
|
+
"@metamask/snaps-webpack-plugin": "^4.0.0",
|
|
60
61
|
"@metamask/utils": "^8.3.0",
|
|
61
62
|
"@swc/core": "1.3.78",
|
|
62
63
|
"assert": "^2.0.0",
|
|
@@ -65,7 +66,6 @@
|
|
|
65
66
|
"browserify-zlib": "^0.2.0",
|
|
66
67
|
"buffer": "^6.0.3",
|
|
67
68
|
"chalk": "^4.1.2",
|
|
68
|
-
"chokidar": "^3.5.2",
|
|
69
69
|
"console-browserify": "^1.2.0",
|
|
70
70
|
"constants-browserify": "^1.0.0",
|
|
71
71
|
"crypto-browserify": "^3.12.0",
|
|
@@ -104,7 +104,6 @@
|
|
|
104
104
|
"@metamask/eslint-config-jest": "^12.1.0",
|
|
105
105
|
"@metamask/eslint-config-nodejs": "^12.1.0",
|
|
106
106
|
"@metamask/eslint-config-typescript": "^12.1.0",
|
|
107
|
-
"@swc/cli": "^0.1.62",
|
|
108
107
|
"@swc/jest": "^0.2.26",
|
|
109
108
|
"@types/browserify": "^12.0.37",
|
|
110
109
|
"@types/jest": "^27.5.1",
|
|
@@ -134,6 +133,7 @@
|
|
|
134
133
|
"rimraf": "^4.1.2",
|
|
135
134
|
"ts-node": "^10.9.1",
|
|
136
135
|
"tsc-watch": "^4.5.0",
|
|
136
|
+
"tsup": "^8.0.1",
|
|
137
137
|
"typescript": "~4.8.4"
|
|
138
138
|
},
|
|
139
139
|
"engines": {
|
package/.browserslistrc
DELETED
package/dist/cjs/builders.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
TranspilationModes: function() {
|
|
13
|
-
return TranspilationModes;
|
|
14
|
-
},
|
|
15
|
-
default: function() {
|
|
16
|
-
return _default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var TranspilationModes;
|
|
20
|
-
(function(TranspilationModes) {
|
|
21
|
-
TranspilationModes["LocalAndDeps"] = 'localAndDeps';
|
|
22
|
-
TranspilationModes["LocalOnly"] = 'localOnly';
|
|
23
|
-
TranspilationModes["None"] = 'none';
|
|
24
|
-
})(TranspilationModes || (TranspilationModes = {}));
|
|
25
|
-
const builders = {
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
27
|
-
config: {
|
|
28
|
-
alias: 'c',
|
|
29
|
-
describe: 'Path to config file',
|
|
30
|
-
type: 'string',
|
|
31
|
-
normalize: true
|
|
32
|
-
},
|
|
33
|
-
fix: {
|
|
34
|
-
describe: 'Attempt to fix snap.manifest.json',
|
|
35
|
-
type: 'boolean'
|
|
36
|
-
},
|
|
37
|
-
input: {
|
|
38
|
-
alias: 'i',
|
|
39
|
-
describe: 'Snap bundle file to evaluate',
|
|
40
|
-
type: 'string',
|
|
41
|
-
normalize: true
|
|
42
|
-
},
|
|
43
|
-
// Deprecated Browserify options.
|
|
44
|
-
bundle: {
|
|
45
|
-
alias: 'b',
|
|
46
|
-
describe: 'Snap bundle file',
|
|
47
|
-
type: 'string',
|
|
48
|
-
normalize: true,
|
|
49
|
-
deprecated: 'Use --input instead.'
|
|
50
|
-
},
|
|
51
|
-
dist: {
|
|
52
|
-
alias: 'd',
|
|
53
|
-
describe: 'Output directory',
|
|
54
|
-
type: 'string',
|
|
55
|
-
normalize: true,
|
|
56
|
-
deprecated: true
|
|
57
|
-
},
|
|
58
|
-
eval: {
|
|
59
|
-
alias: 'e',
|
|
60
|
-
describe: 'Attempt to evaluate Snap bundle in SES',
|
|
61
|
-
type: 'boolean',
|
|
62
|
-
deprecated: true
|
|
63
|
-
},
|
|
64
|
-
manifest: {
|
|
65
|
-
alias: 'm',
|
|
66
|
-
describe: 'Validate snap.manifest.json',
|
|
67
|
-
type: 'boolean',
|
|
68
|
-
deprecated: true
|
|
69
|
-
},
|
|
70
|
-
port: {
|
|
71
|
-
alias: 'p',
|
|
72
|
-
describe: 'Local server port for testing',
|
|
73
|
-
type: 'number',
|
|
74
|
-
coerce: (arg)=>{
|
|
75
|
-
const port = Number.parseInt(String(arg), 10);
|
|
76
|
-
if (Number.isNaN(port)) {
|
|
77
|
-
throw new Error(`Invalid port: "${String(arg)}".`);
|
|
78
|
-
}
|
|
79
|
-
return port;
|
|
80
|
-
},
|
|
81
|
-
deprecated: true
|
|
82
|
-
},
|
|
83
|
-
outfileName: {
|
|
84
|
-
alias: 'n',
|
|
85
|
-
describe: 'Output file name',
|
|
86
|
-
type: 'string',
|
|
87
|
-
deprecated: true
|
|
88
|
-
},
|
|
89
|
-
root: {
|
|
90
|
-
alias: 'r',
|
|
91
|
-
describe: 'Server root directory',
|
|
92
|
-
type: 'string',
|
|
93
|
-
normalize: true,
|
|
94
|
-
deprecated: true
|
|
95
|
-
},
|
|
96
|
-
sourceMaps: {
|
|
97
|
-
describe: 'Whether builds include sourcemaps',
|
|
98
|
-
type: 'boolean',
|
|
99
|
-
deprecated: true
|
|
100
|
-
},
|
|
101
|
-
src: {
|
|
102
|
-
alias: 's',
|
|
103
|
-
describe: 'Source file',
|
|
104
|
-
type: 'string',
|
|
105
|
-
normalize: true,
|
|
106
|
-
deprecated: true
|
|
107
|
-
},
|
|
108
|
-
stripComments: {
|
|
109
|
-
alias: 'strip',
|
|
110
|
-
describe: 'Whether to remove code comments from the build output',
|
|
111
|
-
type: 'boolean',
|
|
112
|
-
deprecated: true
|
|
113
|
-
},
|
|
114
|
-
suppressWarnings: {
|
|
115
|
-
type: 'boolean',
|
|
116
|
-
describe: 'Whether to suppress warnings',
|
|
117
|
-
deprecated: true
|
|
118
|
-
},
|
|
119
|
-
transpilationMode: {
|
|
120
|
-
type: 'string',
|
|
121
|
-
describe: 'Whether to use Babel to transpile all source code (including dependencies), local source code only, or nothing',
|
|
122
|
-
choices: Object.values(TranspilationModes),
|
|
123
|
-
deprecated: true
|
|
124
|
-
},
|
|
125
|
-
depsToTranspile: {
|
|
126
|
-
type: 'array',
|
|
127
|
-
describe: 'Transpile only the listed dependencies.',
|
|
128
|
-
deprecated: true
|
|
129
|
-
},
|
|
130
|
-
verboseErrors: {
|
|
131
|
-
type: 'boolean',
|
|
132
|
-
describe: 'Display original errors',
|
|
133
|
-
deprecated: true
|
|
134
|
-
},
|
|
135
|
-
writeManifest: {
|
|
136
|
-
describe: 'Make necessary changes to the snap manifest file',
|
|
137
|
-
type: 'boolean',
|
|
138
|
-
deprecated: true
|
|
139
|
-
},
|
|
140
|
-
serve: {
|
|
141
|
-
describe: 'Serve snap file(s) locally for testing',
|
|
142
|
-
type: 'boolean',
|
|
143
|
-
deprecated: true
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
const _default = builders;
|
|
147
|
-
|
|
148
|
-
//# sourceMappingURL=builders.js.map
|
package/dist/cjs/builders.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/builders.ts"],"sourcesContent":["import type { Options } from 'yargs';\n\nexport enum TranspilationModes {\n LocalAndDeps = 'localAndDeps',\n LocalOnly = 'localOnly',\n None = 'none',\n}\n\nconst builders: Record<string, Readonly<Options>> = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\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};\n\nexport default builders;\n"],"names":["TranspilationModes","LocalAndDeps","LocalOnly","None","builders","config","alias","describe","type","normalize","fix","input","bundle","deprecated","dist","eval","manifest","port","coerce","arg","Number","parseInt","String","isNaN","Error","outfileName","root","sourceMaps","src","stripComments","suppressWarnings","transpilationMode","choices","Object","values","depsToTranspile","verboseErrors","writeManifest","serve"],"mappings":";;;;;;;;;;;;;;IAsJA,OAAwB;eAAxB;;;IApJO;UAAKA,kBAAkB;IAAlBA,mBACVC,kBAAe;IADLD,mBAEVE,eAAY;IAFFF,mBAGVG,UAAO;GAHGH,uBAAAA;AAMZ,MAAMI,WAA8C;IAClD,gEAAgE;IAChEC,QAAQ;QACNC,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,WAAW;IACb;IAEAC,KAAK;QACHH,UAAU;QACVC,MAAM;IACR;IAEAG,OAAO;QACLL,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,WAAW;IACb;IAEA,iCAAiC;IACjCG,QAAQ;QACNN,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,WAAW;QACXI,YAAY;IACd;IAEAC,MAAM;QACJR,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,WAAW;QACXI,YAAY;IACd;IAEAE,MAAM;QACJT,OAAO;QACPC,UAAU;QACVC,MAAM;QACNK,YAAY;IACd;IAEAG,UAAU;QACRV,OAAO;QACPC,UAAU;QACVC,MAAM;QACNK,YAAY;IACd;IAEAI,MAAM;QACJX,OAAO;QACPC,UAAU;QACVC,MAAM;QACNU,QAAQ,CAACC;YACP,MAAMF,OAAOG,OAAOC,QAAQ,CAACC,OAAOH,MAAM;YAC1C,IAAIC,OAAOG,KAAK,CAACN,OAAO;gBACtB,MAAM,IAAIO,MAAM,CAAC,eAAe,EAAEF,OAAOH,KAAK,EAAE,CAAC;YACnD;YAEA,OAAOF;QACT;QACAJ,YAAY;IACd;IAEAY,aAAa;QACXnB,OAAO;QACPC,UAAU;QACVC,MAAM;QACNK,YAAY;IACd;IAEAa,MAAM;QACJpB,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,WAAW;QACXI,YAAY;IACd;IAEAc,YAAY;QACVpB,UAAU;QACVC,MAAM;QACNK,YAAY;IACd;IAEAe,KAAK;QACHtB,OAAO;QACPC,UAAU;QACVC,MAAM;QACNC,WAAW;QACXI,YAAY;IACd;IAEAgB,eAAe;QACbvB,OAAO;QACPC,UAAU;QACVC,MAAM;QACNK,YAAY;IACd;IAEAiB,kBAAkB;QAChBtB,MAAM;QACND,UAAU;QACVM,YAAY;IACd;IAEAkB,mBAAmB;QACjBvB,MAAM;QACND,UACE;QACFyB,SAASC,OAAOC,MAAM,CAAClC;QACvBa,YAAY;IACd;IAEAsB,iBAAiB;QACf3B,MAAM;QACND,UAAU;QACVM,YAAY;IACd;IAEAuB,eAAe;QACb5B,MAAM;QACND,UAAU;QACVM,YAAY;IACd;IAEAwB,eAAe;QACb9B,UAAU;QACVC,MAAM;QACNK,YAAY;IACd;IAEAyB,OAAO;QACL/B,UAAU;QACVC,MAAM;QACNK,YAAY;IACd;AACF;MAEA,WAAeT"}
|
package/dist/cjs/cli.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
checkNodeVersion: function() {
|
|
13
|
-
return checkNodeVersion;
|
|
14
|
-
},
|
|
15
|
-
cli: function() {
|
|
16
|
-
return cli;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _semver = /*#__PURE__*/ _interop_require_default(require("semver"));
|
|
20
|
-
const _yargs = /*#__PURE__*/ _interop_require_default(require("yargs"));
|
|
21
|
-
const _helpers = require("yargs/helpers");
|
|
22
|
-
const _builders = /*#__PURE__*/ _interop_require_default(require("./builders"));
|
|
23
|
-
const _config = require("./config");
|
|
24
|
-
const _utils = require("./utils");
|
|
25
|
-
function _interop_require_default(obj) {
|
|
26
|
-
return obj && obj.__esModule ? obj : {
|
|
27
|
-
default: obj
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const MINIMUM_NODE_16_VERSION = '16.17.0';
|
|
31
|
-
const MINIMUM_NODE_18_VERSION = '18.6.0';
|
|
32
|
-
function checkNodeVersion(nodeVersion = process.version.slice(1)) {
|
|
33
|
-
const majorVersion = _semver.default.major(nodeVersion);
|
|
34
|
-
const message = `Node version ${nodeVersion} is not supported. Please use Node ${MINIMUM_NODE_16_VERSION} or later.`;
|
|
35
|
-
if (majorVersion < 16) {
|
|
36
|
-
(0, _utils.error)(message);
|
|
37
|
-
// eslint-disable-next-line n/no-process-exit
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
// Node 16 and 18 have a different minimum version requirement, so we need to
|
|
41
|
-
// check for both.
|
|
42
|
-
if (majorVersion === 16 && _semver.default.lt(nodeVersion, MINIMUM_NODE_16_VERSION)) {
|
|
43
|
-
(0, _utils.error)(message);
|
|
44
|
-
// eslint-disable-next-line n/no-process-exit
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
if (majorVersion === 18 && _semver.default.lt(nodeVersion, MINIMUM_NODE_18_VERSION)) {
|
|
48
|
-
(0, _utils.error)(`Node version ${nodeVersion} is not supported. Please use Node ${MINIMUM_NODE_18_VERSION} or later.`);
|
|
49
|
-
// eslint-disable-next-line n/no-process-exit
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async function cli(argv, commands) {
|
|
54
|
-
checkNodeVersion();
|
|
55
|
-
await (0, _yargs.default)((0, _helpers.hideBin)(argv)).scriptName('mm-snap').usage('Usage: $0 <command> [options]').example('$0 build', `Build './src/index.js' as './dist/bundle.js'`).example('$0 build --config ./snap.config.build.ts', `Build './src/index.js' as './dist/bundle.js' using the config in './snap.config.build.ts'`).example('$0 manifest --fix', `Check the snap manifest, and fix any errors`).example('$0 watch --port 8000', `The snap input file for changes, and serve it on port 8000`).example('$0 serve --port 8000', `Serve the snap bundle on port 8000`).command(commands).option('config', _builders.default.config).option('verboseErrors', _builders.default.verboseErrors).option('suppressWarnings', _builders.default.suppressWarnings).strict().middleware(async (args)=>{
|
|
56
|
-
// eslint-disable-next-line require-atomic-updates
|
|
57
|
-
args.context = {
|
|
58
|
-
config: await (0, _config.getConfigByArgv)(args)
|
|
59
|
-
};
|
|
60
|
-
(0, _utils.sanitizeInputs)(args);
|
|
61
|
-
}, false).demandCommand(1, 'You must specify at least one command.').fail((message, failure)=>{
|
|
62
|
-
(0, _utils.error)((0, _utils.getYargsErrorMessage)(message, failure));
|
|
63
|
-
// eslint-disable-next-line n/no-process-exit
|
|
64
|
-
process.exit(1);
|
|
65
|
-
}).help().alias('help', 'h').parseAsync();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/cjs/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts"],"sourcesContent":["import semver from 'semver';\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\n\nimport builders from './builders';\nimport { getConfigByArgv } from './config';\nimport { error, getYargsErrorMessage, sanitizeInputs } from './utils';\n\nconst MINIMUM_NODE_16_VERSION = '16.17.0';\nconst MINIMUM_NODE_18_VERSION = '18.6.0';\n\n/**\n * Check the Node version. If the Node version is less than the minimum required\n * version, this logs an error and exits the process.\n *\n * @param nodeVersion - The Node version to check.\n */\nexport function checkNodeVersion(\n nodeVersion: string = process.version.slice(1),\n) {\n const majorVersion = semver.major(nodeVersion);\n const message = `Node version ${nodeVersion} is not supported. Please use Node ${MINIMUM_NODE_16_VERSION} or later.`;\n\n if (majorVersion < 16) {\n error(message);\n // eslint-disable-next-line n/no-process-exit\n process.exit(1);\n }\n\n // Node 16 and 18 have a different minimum version requirement, so we need to\n // check for both.\n if (majorVersion === 16 && semver.lt(nodeVersion, MINIMUM_NODE_16_VERSION)) {\n error(message);\n // eslint-disable-next-line n/no-process-exit\n process.exit(1);\n }\n\n if (majorVersion === 18 && semver.lt(nodeVersion, MINIMUM_NODE_18_VERSION)) {\n error(\n `Node version ${nodeVersion} is not supported. Please use Node ${MINIMUM_NODE_18_VERSION} or later.`,\n );\n // eslint-disable-next-line n/no-process-exit\n process.exit(1);\n }\n}\n\n/**\n * The main CLI entry point function. This processes the command line args, and\n * runs the appropriate function.\n *\n * @param argv - The raw command line arguments, i.e., `process.argv`.\n * @param commands - The list of commands to use.\n */\nexport async function cli(argv: string[], commands: any) {\n checkNodeVersion();\n\n await yargs(hideBin(argv))\n .scriptName('mm-snap')\n .usage('Usage: $0 <command> [options]')\n\n .example('$0 build', `Build './src/index.js' as './dist/bundle.js'`)\n .example(\n '$0 build --config ./snap.config.build.ts',\n `Build './src/index.js' as './dist/bundle.js' using the config in './snap.config.build.ts'`,\n )\n .example('$0 manifest --fix', `Check the snap manifest, and fix any errors`)\n .example(\n '$0 watch --port 8000',\n `The snap input file for changes, and serve it on port 8000`,\n )\n .example('$0 serve --port 8000', `Serve the snap bundle on port 8000`)\n\n .command(commands)\n\n .option('config', builders.config)\n .option('verboseErrors', builders.verboseErrors)\n .option('suppressWarnings', builders.suppressWarnings)\n\n .strict()\n\n .middleware(async (args: any) => {\n // eslint-disable-next-line require-atomic-updates\n args.context = {\n config: await getConfigByArgv(args),\n };\n\n sanitizeInputs(args);\n }, false)\n\n .demandCommand(1, 'You must specify at least one command.')\n\n .fail((message, failure) => {\n error(getYargsErrorMessage(message, failure));\n // eslint-disable-next-line n/no-process-exit\n process.exit(1);\n })\n\n .help()\n .alias('help', 'h')\n .parseAsync();\n}\n"],"names":["checkNodeVersion","cli","MINIMUM_NODE_16_VERSION","MINIMUM_NODE_18_VERSION","nodeVersion","process","version","slice","majorVersion","semver","major","message","error","exit","lt","argv","commands","yargs","hideBin","scriptName","usage","example","command","option","builders","config","verboseErrors","suppressWarnings","strict","middleware","args","context","getConfigByArgv","sanitizeInputs","demandCommand","fail","failure","getYargsErrorMessage","help","alias","parseAsync"],"mappings":";;;;;;;;;;;IAiBgBA,gBAAgB;eAAhBA;;IAoCMC,GAAG;eAAHA;;;+DArDH;8DACD;yBACM;iEAEH;wBACW;uBAC4B;;;;;;AAE5D,MAAMC,0BAA0B;AAChC,MAAMC,0BAA0B;AAQzB,SAASH,iBACdI,cAAsBC,QAAQC,OAAO,CAACC,KAAK,CAAC,EAAE;IAE9C,MAAMC,eAAeC,eAAM,CAACC,KAAK,CAACN;IAClC,MAAMO,UAAU,CAAC,aAAa,EAAEP,YAAY,mCAAmC,EAAEF,wBAAwB,UAAU,CAAC;IAEpH,IAAIM,eAAe,IAAI;QACrBI,IAAAA,YAAK,EAACD;QACN,6CAA6C;QAC7CN,QAAQQ,IAAI,CAAC;IACf;IAEA,6EAA6E;IAC7E,kBAAkB;IAClB,IAAIL,iBAAiB,MAAMC,eAAM,CAACK,EAAE,CAACV,aAAaF,0BAA0B;QAC1EU,IAAAA,YAAK,EAACD;QACN,6CAA6C;QAC7CN,QAAQQ,IAAI,CAAC;IACf;IAEA,IAAIL,iBAAiB,MAAMC,eAAM,CAACK,EAAE,CAACV,aAAaD,0BAA0B;QAC1ES,IAAAA,YAAK,EACH,CAAC,aAAa,EAAER,YAAY,mCAAmC,EAAED,wBAAwB,UAAU,CAAC;QAEtG,6CAA6C;QAC7CE,QAAQQ,IAAI,CAAC;IACf;AACF;AASO,eAAeZ,IAAIc,IAAc,EAAEC,QAAa;IACrDhB;IAEA,MAAMiB,IAAAA,cAAK,EAACC,IAAAA,gBAAO,EAACH,OACjBI,UAAU,CAAC,WACXC,KAAK,CAAC,iCAENC,OAAO,CAAC,YAAY,CAAC,4CAA4C,CAAC,EAClEA,OAAO,CACN,4CACA,CAAC,yFAAyF,CAAC,EAE5FA,OAAO,CAAC,qBAAqB,CAAC,2CAA2C,CAAC,EAC1EA,OAAO,CACN,wBACA,CAAC,0DAA0D,CAAC,EAE7DA,OAAO,CAAC,wBAAwB,CAAC,kCAAkC,CAAC,EAEpEC,OAAO,CAACN,UAERO,MAAM,CAAC,UAAUC,iBAAQ,CAACC,MAAM,EAChCF,MAAM,CAAC,iBAAiBC,iBAAQ,CAACE,aAAa,EAC9CH,MAAM,CAAC,oBAAoBC,iBAAQ,CAACG,gBAAgB,EAEpDC,MAAM,GAENC,UAAU,CAAC,OAAOC;QACjB,kDAAkD;QAClDA,KAAKC,OAAO,GAAG;YACbN,QAAQ,MAAMO,IAAAA,uBAAe,EAACF;QAChC;QAEAG,IAAAA,qBAAc,EAACH;IACjB,GAAG,OAEFI,aAAa,CAAC,GAAG,0CAEjBC,IAAI,CAAC,CAACxB,SAASyB;QACdxB,IAAAA,YAAK,EAACyB,IAAAA,2BAAoB,EAAC1B,SAASyB;QACpC,6CAA6C;QAC7C/B,QAAQQ,IAAI,CAAC;IACf,GAECyB,IAAI,GACJC,KAAK,CAAC,QAAQ,KACdC,UAAU;AACf"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "buildHandler", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return buildHandler;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _snapsutils = require("@metamask/snaps-utils");
|
|
12
|
-
const _path = require("path");
|
|
13
|
-
const _errors = require("../../errors");
|
|
14
|
-
const _utils = require("../../utils");
|
|
15
|
-
const _eval = require("../eval");
|
|
16
|
-
const _implementation = require("./implementation");
|
|
17
|
-
const steps = [
|
|
18
|
-
{
|
|
19
|
-
name: 'Checking the input file.',
|
|
20
|
-
task: async ({ config })=>{
|
|
21
|
-
const { input } = config;
|
|
22
|
-
if (!await (0, _snapsutils.isFile)(input)) {
|
|
23
|
-
throw new _errors.CommandError(`Input file not found: "${input}". Make sure that the "input" field in your snap config is correct.`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'Building the snap bundle.',
|
|
29
|
-
task: async ({ config, spinner })=>{
|
|
30
|
-
// We don't evaluate the bundle here, because it's done in a separate
|
|
31
|
-
// step.
|
|
32
|
-
return await (0, _implementation.build)(config, {
|
|
33
|
-
evaluate: false,
|
|
34
|
-
spinner
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'Evaluating the snap bundle.',
|
|
40
|
-
condition: ({ config })=>config.evaluate,
|
|
41
|
-
task: async ({ config, spinner })=>{
|
|
42
|
-
const path = (0, _path.resolve)(process.cwd(), config.output.path, config.output.filename);
|
|
43
|
-
await (0, _eval.evaluate)(path);
|
|
44
|
-
(0, _utils.info)(`Snap bundle evaluated successfully.`, spinner);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
];
|
|
48
|
-
async function buildHandler(config) {
|
|
49
|
-
return await (0, _utils.executeSteps)(steps, {
|
|
50
|
-
config
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
//# sourceMappingURL=build.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/commands/build/build.ts"],"sourcesContent":["import { isFile } from '@metamask/snaps-utils';\nimport { resolve as pathResolve } from 'path';\n\nimport type { ProcessedConfig, ProcessedWebpackConfig } from '../../config';\nimport { CommandError } from '../../errors';\nimport type { Steps } from '../../utils';\nimport { executeSteps, info } from '../../utils';\nimport { evaluate } from '../eval';\nimport { build } from './implementation';\n\ntype BuildContext = {\n config: ProcessedWebpackConfig;\n};\n\nconst steps: Steps<BuildContext> = [\n {\n name: 'Checking the input file.',\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 task: async ({ config, spinner }) => {\n // We don't evaluate the bundle here, because it's done in a separate\n // step.\n return await build(config, { evaluate: false, spinner });\n },\n },\n {\n name: 'Evaluating the snap bundle.',\n condition: ({ config }) => config.evaluate,\n task: async ({ config, spinner }) => {\n const path = pathResolve(\n process.cwd(),\n config.output.path,\n config.output.filename,\n );\n\n await evaluate(path);\n\n info(`Snap bundle evaluated successfully.`, spinner);\n },\n },\n] 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 */\nexport async function buildHandler(config: ProcessedConfig): Promise<void> {\n return await executeSteps(steps, {\n config,\n });\n}\n"],"names":["buildHandler","steps","name","task","config","input","isFile","CommandError","spinner","build","evaluate","condition","path","pathResolve","process","cwd","output","filename","info","executeSteps"],"mappings":";;;;+BA4DsBA;;;eAAAA;;;4BA5DC;sBACgB;wBAGV;uBAEM;sBACV;gCACH;AAMtB,MAAMC,QAA6B;IACjC;QACEC,MAAM;QACNC,MAAM,OAAO,EAAEC,MAAM,EAAE;YACrB,MAAM,EAAEC,KAAK,EAAE,GAAGD;YAElB,IAAI,CAAE,MAAME,IAAAA,kBAAM,EAACD,QAAS;gBAC1B,MAAM,IAAIE,oBAAY,CACpB,CAAC,uBAAuB,EAAEF,MAAM,mEAAmE,CAAC;YAExG;QACF;IACF;IACA;QACEH,MAAM;QACNC,MAAM,OAAO,EAAEC,MAAM,EAAEI,OAAO,EAAE;YAC9B,qEAAqE;YACrE,QAAQ;YACR,OAAO,MAAMC,IAAAA,qBAAK,EAACL,QAAQ;gBAAEM,UAAU;gBAAOF;YAAQ;QACxD;IACF;IACA;QACEN,MAAM;QACNS,WAAW,CAAC,EAAEP,MAAM,EAAE,GAAKA,OAAOM,QAAQ;QAC1CP,MAAM,OAAO,EAAEC,MAAM,EAAEI,OAAO,EAAE;YAC9B,MAAMI,OAAOC,IAAAA,aAAW,EACtBC,QAAQC,GAAG,IACXX,OAAOY,MAAM,CAACJ,IAAI,EAClBR,OAAOY,MAAM,CAACC,QAAQ;YAGxB,MAAMP,IAAAA,cAAQ,EAACE;YAEfM,IAAAA,WAAI,EAAC,CAAC,mCAAmC,CAAC,EAAEV;QAC9C;IACF;CACD;AAUM,eAAeR,aAAaI,MAAuB;IACxD,OAAO,MAAMe,IAAAA,mBAAY,EAAClB,OAAO;QAC/BG;IACF;AACF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "build", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return build;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _webpack = require("../../webpack");
|
|
12
|
-
async function build(config, options) {
|
|
13
|
-
const compiler = await (0, _webpack.getCompiler)(config, options);
|
|
14
|
-
return await new Promise((resolve, reject)=>{
|
|
15
|
-
compiler.run((runError)=>{
|
|
16
|
-
if (runError) {
|
|
17
|
-
reject(runError);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
compiler.close((closeError)=>{
|
|
21
|
-
if (closeError) {
|
|
22
|
-
reject(closeError);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
resolve();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=implementation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/commands/build/implementation.ts"],"sourcesContent":["import type { ProcessedWebpackConfig } from '../../config';\nimport type { WebpackOptions } from '../../webpack';\nimport { getCompiler } from '../../webpack';\n\n/**\n * Build the snap bundle. This uses Webpack to build the bundle.\n *\n * @param config - The config object.\n * @param options - The Webpack options.\n * @returns A promise that resolves when the bundle is built.\n */\nexport async function build(\n config: ProcessedWebpackConfig,\n options?: WebpackOptions,\n) {\n const compiler = await getCompiler(config, options);\n return await new Promise<void>((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();\n });\n });\n });\n}\n"],"names":["build","config","options","compiler","getCompiler","Promise","resolve","reject","run","runError","close","closeError"],"mappings":";;;;+BAWsBA;;;eAAAA;;;yBATM;AASrB,eAAeA,MACpBC,MAA8B,EAC9BC,OAAwB;IAExB,MAAMC,WAAW,MAAMC,IAAAA,oBAAW,EAACH,QAAQC;IAC3C,OAAO,MAAM,IAAIG,QAAc,CAACC,SAASC;QACvCJ,SAASK,GAAG,CAAC,CAACC;YACZ,IAAIA,UAAU;gBACZF,OAAOE;gBACP;YACF;YAEAN,SAASO,KAAK,CAAC,CAACC;gBACd,IAAIA,YAAY;oBACdJ,OAAOI;oBACP;gBACF;gBAEAL;YACF;QACF;IACF;AACF"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _default;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _builders = /*#__PURE__*/ _interop_require_default(require("../../builders"));
|
|
12
|
-
const _build = require("./build");
|
|
13
|
-
_export_star(require("./implementation"), exports);
|
|
14
|
-
function _export_star(from, to) {
|
|
15
|
-
Object.keys(from).forEach(function(k) {
|
|
16
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
17
|
-
Object.defineProperty(to, k, {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return from[k];
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
return from;
|
|
26
|
-
}
|
|
27
|
-
function _interop_require_default(obj) {
|
|
28
|
-
return obj && obj.__esModule ? obj : {
|
|
29
|
-
default: obj
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
const command = {
|
|
33
|
-
command: [
|
|
34
|
-
'build',
|
|
35
|
-
'b'
|
|
36
|
-
],
|
|
37
|
-
desc: 'Build snap from source',
|
|
38
|
-
builder: (yarg)=>{
|
|
39
|
-
yarg.option('dist', _builders.default.dist).option('eval', _builders.default.eval).option('manifest', _builders.default.manifest).option('outfileName', _builders.default.outfileName).option('sourceMaps', _builders.default.sourceMaps).option('src', _builders.default.src).option('stripComments', _builders.default.stripComments).option('transpilationMode', _builders.default.transpilationMode).option('depsToTranspile', _builders.default.depsToTranspile).option('writeManifest', _builders.default.writeManifest).implies('writeManifest', 'manifest').implies('depsToTranspile', 'transpilationMode');
|
|
40
|
-
},
|
|
41
|
-
handler: async (argv)=>(0, _build.buildHandler)(argv.context.config)
|
|
42
|
-
};
|
|
43
|
-
const _default = command;
|
|
44
|
-
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/commands/build/index.ts"],"sourcesContent":["import type yargs from 'yargs';\n\nimport builders from '../../builders';\nimport type { YargsArgs } from '../../types/yargs';\nimport { buildHandler } from './build';\n\nconst command = {\n command: ['build', 'b'],\n desc: 'Build snap from source',\n builder: (yarg: yargs.Argv) => {\n yarg\n .option('dist', builders.dist)\n .option('eval', builders.eval)\n .option('manifest', builders.manifest)\n .option('outfileName', builders.outfileName)\n .option('sourceMaps', builders.sourceMaps)\n .option('src', builders.src)\n .option('stripComments', builders.stripComments)\n .option('transpilationMode', builders.transpilationMode)\n .option('depsToTranspile', builders.depsToTranspile)\n .option('writeManifest', builders.writeManifest)\n .implies('writeManifest', 'manifest')\n .implies('depsToTranspile', 'transpilationMode');\n },\n handler: async (argv: YargsArgs) => buildHandler(argv.context.config),\n};\n\nexport * from './implementation';\nexport default command;\n"],"names":["command","desc","builder","yarg","option","builders","dist","eval","manifest","outfileName","sourceMaps","src","stripComments","transpilationMode","depsToTranspile","writeManifest","implies","handler","argv","buildHandler","context","config"],"mappings":";;;;+BA4BA;;;eAAA;;;iEA1BqB;uBAEQ;qBAuBf;;;;;;;;;;;;;;;;;;;AArBd,MAAMA,UAAU;IACdA,SAAS;QAAC;QAAS;KAAI;IACvBC,MAAM;IACNC,SAAS,CAACC;QACRA,KACGC,MAAM,CAAC,QAAQC,iBAAQ,CAACC,IAAI,EAC5BF,MAAM,CAAC,QAAQC,iBAAQ,CAACE,IAAI,EAC5BH,MAAM,CAAC,YAAYC,iBAAQ,CAACG,QAAQ,EACpCJ,MAAM,CAAC,eAAeC,iBAAQ,CAACI,WAAW,EAC1CL,MAAM,CAAC,cAAcC,iBAAQ,CAACK,UAAU,EACxCN,MAAM,CAAC,OAAOC,iBAAQ,CAACM,GAAG,EAC1BP,MAAM,CAAC,iBAAiBC,iBAAQ,CAACO,aAAa,EAC9CR,MAAM,CAAC,qBAAqBC,iBAAQ,CAACQ,iBAAiB,EACtDT,MAAM,CAAC,mBAAmBC,iBAAQ,CAACS,eAAe,EAClDV,MAAM,CAAC,iBAAiBC,iBAAQ,CAACU,aAAa,EAC9CC,OAAO,CAAC,iBAAiB,YACzBA,OAAO,CAAC,mBAAmB;IAChC;IACAC,SAAS,OAAOC,OAAoBC,IAAAA,mBAAY,EAACD,KAAKE,OAAO,CAACC,MAAM;AACtE;MAGA,WAAerB"}
|