@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,346 @@
|
|
|
1
|
+
import {
|
|
2
|
+
evaluate
|
|
3
|
+
} from "./chunk-MMBQXT2G.mjs";
|
|
4
|
+
import {
|
|
5
|
+
formatText,
|
|
6
|
+
pluralize
|
|
7
|
+
} from "./chunk-MCN7UXG3.mjs";
|
|
8
|
+
import {
|
|
9
|
+
getErrorMessage
|
|
10
|
+
} from "./chunk-YYYOE2GO.mjs";
|
|
11
|
+
import {
|
|
12
|
+
error,
|
|
13
|
+
info,
|
|
14
|
+
warn
|
|
15
|
+
} from "./chunk-JMISQ4HT.mjs";
|
|
16
|
+
import {
|
|
17
|
+
__privateAdd,
|
|
18
|
+
__privateGet,
|
|
19
|
+
__privateMethod,
|
|
20
|
+
__privateSet
|
|
21
|
+
} from "./chunk-T74IXMA3.mjs";
|
|
22
|
+
|
|
23
|
+
// src/webpack/plugins.ts
|
|
24
|
+
import { assert, hasProperty, isObject } from "@metamask/utils";
|
|
25
|
+
import { bold, dim, red, yellow } from "chalk";
|
|
26
|
+
import { isBuiltin } from "module";
|
|
27
|
+
import { WebpackError } from "webpack";
|
|
28
|
+
var _spinner, _getStatsErrorMessage, getStatsErrorMessage_fn;
|
|
29
|
+
var SnapsStatsPlugin = class {
|
|
30
|
+
constructor(options = {
|
|
31
|
+
verbose: false
|
|
32
|
+
}, spinner) {
|
|
33
|
+
/**
|
|
34
|
+
* Get the error message for the given stats error.
|
|
35
|
+
*
|
|
36
|
+
* @param statsError - The stats error.
|
|
37
|
+
* @param color - The color to use for the error message.
|
|
38
|
+
* @returns The error message.
|
|
39
|
+
*/
|
|
40
|
+
__privateAdd(this, _getStatsErrorMessage);
|
|
41
|
+
/**
|
|
42
|
+
* The spinner to use for logging.
|
|
43
|
+
*/
|
|
44
|
+
__privateAdd(this, _spinner, void 0);
|
|
45
|
+
this.options = options;
|
|
46
|
+
__privateSet(this, _spinner, spinner);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Apply the plugin to the Webpack compiler.
|
|
50
|
+
*
|
|
51
|
+
* @param compiler - The Webpack compiler.
|
|
52
|
+
*/
|
|
53
|
+
apply(compiler) {
|
|
54
|
+
compiler.hooks.afterDone.tap(this.constructor.name, (stats) => {
|
|
55
|
+
if (!stats) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const { modules, time, errors, warnings } = stats.toJson();
|
|
59
|
+
assert(modules, "Modules must be defined in stats.");
|
|
60
|
+
assert(time, "Time must be defined in stats.");
|
|
61
|
+
if (errors?.length) {
|
|
62
|
+
const formattedErrors = errors.map((statsError) => __privateMethod(this, _getStatsErrorMessage, getStatsErrorMessage_fn).call(this, statsError)).join("\n\n");
|
|
63
|
+
error(
|
|
64
|
+
`Compiled ${modules.length} ${pluralize(
|
|
65
|
+
modules.length,
|
|
66
|
+
"file"
|
|
67
|
+
)} in ${time}ms with ${errors.length} ${pluralize(
|
|
68
|
+
errors.length,
|
|
69
|
+
"error"
|
|
70
|
+
)}.
|
|
71
|
+
|
|
72
|
+
${formattedErrors}
|
|
73
|
+
`,
|
|
74
|
+
__privateGet(this, _spinner)
|
|
75
|
+
);
|
|
76
|
+
__privateGet(this, _spinner)?.stop();
|
|
77
|
+
process.exitCode = 1;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (warnings?.length) {
|
|
81
|
+
const formattedWarnings = warnings.map(
|
|
82
|
+
(statsWarning) => __privateMethod(this, _getStatsErrorMessage, getStatsErrorMessage_fn).call(this, statsWarning, yellow)
|
|
83
|
+
).join("\n\n");
|
|
84
|
+
warn(
|
|
85
|
+
`Compiled ${modules.length} ${pluralize(
|
|
86
|
+
modules.length,
|
|
87
|
+
"file"
|
|
88
|
+
)} in ${time}ms with ${warnings.length} ${pluralize(
|
|
89
|
+
warnings.length,
|
|
90
|
+
"warning"
|
|
91
|
+
)}.
|
|
92
|
+
|
|
93
|
+
${formattedWarnings}
|
|
94
|
+
`,
|
|
95
|
+
__privateGet(this, _spinner)
|
|
96
|
+
);
|
|
97
|
+
} else {
|
|
98
|
+
info(
|
|
99
|
+
`Compiled ${modules.length} ${pluralize(
|
|
100
|
+
modules.length,
|
|
101
|
+
"file"
|
|
102
|
+
)} in ${time}ms.`,
|
|
103
|
+
__privateGet(this, _spinner)
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
if (compiler.watchMode) {
|
|
107
|
+
__privateGet(this, _spinner)?.succeed("Done!");
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
_spinner = new WeakMap();
|
|
113
|
+
_getStatsErrorMessage = new WeakSet();
|
|
114
|
+
getStatsErrorMessage_fn = function(statsError, color = red) {
|
|
115
|
+
const baseMessage = this.options.verbose ? getErrorMessage(statsError) : statsError.message;
|
|
116
|
+
const [first, ...rest] = baseMessage.split("\n");
|
|
117
|
+
return [
|
|
118
|
+
color(formatText(`\u2022 ${first}`, 4, 2)),
|
|
119
|
+
...rest.map((message) => formatText(color(message), 4)),
|
|
120
|
+
statsError.details && `
|
|
121
|
+
${formatText(dim(statsError.details), 6)}`
|
|
122
|
+
].filter(Boolean).join("\n");
|
|
123
|
+
};
|
|
124
|
+
var _spinner2, _safeEvaluate, safeEvaluate_fn;
|
|
125
|
+
var SnapsWatchPlugin = class {
|
|
126
|
+
constructor(options, spinner) {
|
|
127
|
+
/**
|
|
128
|
+
* Safely evaluate the bundle at the given path. If an error occurs, it will
|
|
129
|
+
* be logged to the console, rather than throwing an error.
|
|
130
|
+
*
|
|
131
|
+
* This function should never throw an error.
|
|
132
|
+
*
|
|
133
|
+
* @param bundlePath - The path to the bundle.
|
|
134
|
+
*/
|
|
135
|
+
__privateAdd(this, _safeEvaluate);
|
|
136
|
+
/**
|
|
137
|
+
* The spinner to use for logging.
|
|
138
|
+
*/
|
|
139
|
+
__privateAdd(this, _spinner2, void 0);
|
|
140
|
+
this.options = options;
|
|
141
|
+
__privateSet(this, _spinner2, spinner);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Apply the plugin to the Webpack compiler.
|
|
145
|
+
*
|
|
146
|
+
* @param compiler - The Webpack compiler.
|
|
147
|
+
*/
|
|
148
|
+
apply(compiler) {
|
|
149
|
+
compiler.hooks.invalid.tap(this.constructor.name, (file) => {
|
|
150
|
+
__privateGet(this, _spinner2)?.start();
|
|
151
|
+
info(`Changes detected in ${yellow(file)}, recompiling.`, __privateGet(this, _spinner2));
|
|
152
|
+
});
|
|
153
|
+
compiler.hooks.afterEmit.tapPromise(
|
|
154
|
+
this.constructor.name,
|
|
155
|
+
async ({ fileDependencies }) => {
|
|
156
|
+
this.options.files?.forEach(
|
|
157
|
+
fileDependencies.add.bind(fileDependencies)
|
|
158
|
+
);
|
|
159
|
+
if (this.options.bundle && this.options.evaluate) {
|
|
160
|
+
await __privateMethod(this, _safeEvaluate, safeEvaluate_fn).call(this, this.options.bundle);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
_spinner2 = new WeakMap();
|
|
167
|
+
_safeEvaluate = new WeakSet();
|
|
168
|
+
safeEvaluate_fn = async function(bundlePath) {
|
|
169
|
+
try {
|
|
170
|
+
await evaluate(bundlePath);
|
|
171
|
+
info(`Snap bundle evaluated successfully.`, __privateGet(this, _spinner2));
|
|
172
|
+
} catch (evaluateError) {
|
|
173
|
+
error(evaluateError.message, __privateGet(this, _spinner2));
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
var _source, _spinner3;
|
|
177
|
+
var SnapsBuiltInResolver = class {
|
|
178
|
+
constructor(options = {
|
|
179
|
+
ignore: []
|
|
180
|
+
}, spinner) {
|
|
181
|
+
/**
|
|
182
|
+
* The built-in modules that have been imported, but not resolved.
|
|
183
|
+
*/
|
|
184
|
+
this.unresolvedModules = /* @__PURE__ */ new Set();
|
|
185
|
+
/**
|
|
186
|
+
* The name of the resolver hook to tap into.
|
|
187
|
+
*/
|
|
188
|
+
__privateAdd(this, _source, "described-resolve");
|
|
189
|
+
/**
|
|
190
|
+
* The spinner to use for logging.
|
|
191
|
+
*/
|
|
192
|
+
__privateAdd(this, _spinner3, void 0);
|
|
193
|
+
this.options = options;
|
|
194
|
+
__privateSet(this, _spinner3, spinner);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Apply the plugin to the Webpack resolver.
|
|
198
|
+
*
|
|
199
|
+
* @param resolver - The Webpack resolver.
|
|
200
|
+
*/
|
|
201
|
+
apply(resolver) {
|
|
202
|
+
resolver.getHook(__privateGet(this, _source)).tapAsync(
|
|
203
|
+
this.constructor.name,
|
|
204
|
+
({ module: isModule, request }, _, callback) => {
|
|
205
|
+
if (!isModule || !request) {
|
|
206
|
+
return callback();
|
|
207
|
+
}
|
|
208
|
+
const baseRequest = request.split("/")[0];
|
|
209
|
+
if (isBuiltin(baseRequest) && !this.options.ignore?.includes(baseRequest)) {
|
|
210
|
+
const fallback = resolver.options.fallback.find(
|
|
211
|
+
({ name }) => name === baseRequest
|
|
212
|
+
);
|
|
213
|
+
if (fallback && !fallback.alias) {
|
|
214
|
+
this.unresolvedModules.add(baseRequest);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return callback();
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
_source = new WeakMap();
|
|
223
|
+
_spinner3 = new WeakMap();
|
|
224
|
+
var _checkBuiltIns, checkBuiltIns_fn, _isProvidePlugin, isProvidePlugin_fn, _checkBuffer, checkBuffer_fn;
|
|
225
|
+
var SnapsBundleWarningsPlugin = class {
|
|
226
|
+
constructor(options = {
|
|
227
|
+
buffer: true,
|
|
228
|
+
builtIns: true
|
|
229
|
+
}) {
|
|
230
|
+
/**
|
|
231
|
+
* Check if a built-in module is used, but not provided by Webpack's
|
|
232
|
+
* `fallback` configuration.
|
|
233
|
+
*
|
|
234
|
+
* @param compiler - The Webpack compiler.
|
|
235
|
+
*/
|
|
236
|
+
__privateAdd(this, _checkBuiltIns);
|
|
237
|
+
/**
|
|
238
|
+
* Check if the given instance is a `ProvidePlugin`. This is not guaranteed to
|
|
239
|
+
* be accurate, but it's good enough for our purposes. If we were to use
|
|
240
|
+
* `instanceof` instead, it might not work if multiple versions of Webpack are
|
|
241
|
+
* installed.
|
|
242
|
+
*
|
|
243
|
+
* @param instance - The instance to check.
|
|
244
|
+
* @returns Whether the instance is a `ProvidePlugin`, i.e., whether it's an
|
|
245
|
+
* object with the name `ProvidePlugin` and a `definitions` property.
|
|
246
|
+
*/
|
|
247
|
+
__privateAdd(this, _isProvidePlugin);
|
|
248
|
+
/**
|
|
249
|
+
* Check if the `Buffer` global is used, but not provided by Webpack's
|
|
250
|
+
* `DefinePlugin`.
|
|
251
|
+
*
|
|
252
|
+
* @param compiler - The Webpack compiler.
|
|
253
|
+
*/
|
|
254
|
+
__privateAdd(this, _checkBuffer);
|
|
255
|
+
this.options = options;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Apply the plugin to the Webpack compiler.
|
|
259
|
+
*
|
|
260
|
+
* @param compiler - The Webpack compiler.
|
|
261
|
+
*/
|
|
262
|
+
apply(compiler) {
|
|
263
|
+
if (this.options.builtIns) {
|
|
264
|
+
__privateMethod(this, _checkBuiltIns, checkBuiltIns_fn).call(this, compiler);
|
|
265
|
+
}
|
|
266
|
+
if (this.options.buffer) {
|
|
267
|
+
__privateMethod(this, _checkBuffer, checkBuffer_fn).call(this, compiler);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
_checkBuiltIns = new WeakSet();
|
|
272
|
+
checkBuiltIns_fn = function(compiler) {
|
|
273
|
+
compiler.hooks.afterCompile.tap(this.constructor.name, (compilation) => {
|
|
274
|
+
if (!this.options.builtInResolver) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
const { unresolvedModules } = this.options.builtInResolver;
|
|
278
|
+
if (unresolvedModules.size === 0) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const formattedModules = new Array(...unresolvedModules).map((name) => `\u2022 ${name}`).join("\n");
|
|
282
|
+
const webpackError = new WebpackError(
|
|
283
|
+
`The snap attempted to use one or more Node.js builtins, but no browser fallback has been provided. The MetaMask Snaps CLI does not support Node.js builtins by default. If you want to use this module, you must set ${bold(
|
|
284
|
+
"`polyfills`"
|
|
285
|
+
)} to ${bold(
|
|
286
|
+
"`true`"
|
|
287
|
+
)} or an object with the builtins to polyfill as the key and ${bold(
|
|
288
|
+
"`true`"
|
|
289
|
+
)} as the value. To disable this warning, set ${bold(
|
|
290
|
+
"`stats.builtIns`"
|
|
291
|
+
)} to ${bold(
|
|
292
|
+
"`false`"
|
|
293
|
+
)} in your snap config file, or add the module to the ${bold(
|
|
294
|
+
"`stats.builtIns.ignore`"
|
|
295
|
+
)} array.`
|
|
296
|
+
);
|
|
297
|
+
webpackError.details = formattedModules;
|
|
298
|
+
compilation.warnings.push(webpackError);
|
|
299
|
+
});
|
|
300
|
+
};
|
|
301
|
+
_isProvidePlugin = new WeakSet();
|
|
302
|
+
isProvidePlugin_fn = function(instance) {
|
|
303
|
+
return isObject(instance) && instance.constructor.name === "ProvidePlugin" && hasProperty(instance, "definitions");
|
|
304
|
+
};
|
|
305
|
+
_checkBuffer = new WeakSet();
|
|
306
|
+
checkBuffer_fn = function(compiler) {
|
|
307
|
+
const plugin = compiler.options.plugins?.find(
|
|
308
|
+
(instance) => __privateMethod(this, _isProvidePlugin, isProvidePlugin_fn).call(this, instance)
|
|
309
|
+
);
|
|
310
|
+
if (plugin) {
|
|
311
|
+
const { definitions } = plugin;
|
|
312
|
+
if (definitions.Buffer) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
compiler.hooks.compilation.tap(this.constructor.name, (compilation) => {
|
|
317
|
+
compilation.hooks.afterProcessAssets.tap(
|
|
318
|
+
this.constructor.name,
|
|
319
|
+
(assets) => {
|
|
320
|
+
const bufferAssets = Object.entries(assets).filter(([name]) => name.endsWith(".js")).filter(([, asset]) => asset.source().includes("Buffer"));
|
|
321
|
+
if (bufferAssets.length === 0) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
compilation.warnings.push(
|
|
325
|
+
new WebpackError(
|
|
326
|
+
`The snap attempted to use the Node.js Buffer global, which is not supported in the MetaMask Snaps CLI by default. To use the Buffer global, you must polyfill Buffer by setting ${bold(
|
|
327
|
+
"`buffer`"
|
|
328
|
+
)} to ${bold("`true`")} in the ${bold(
|
|
329
|
+
"`polyfills`"
|
|
330
|
+
)} config object in your snap config. To disable this warning, set ${bold(
|
|
331
|
+
"`stats.buffer`"
|
|
332
|
+
)} to ${bold("`false`")} in your snap config file.`
|
|
333
|
+
)
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
export {
|
|
341
|
+
SnapsStatsPlugin,
|
|
342
|
+
SnapsWatchPlugin,
|
|
343
|
+
SnapsBuiltInResolver,
|
|
344
|
+
SnapsBundleWarningsPlugin
|
|
345
|
+
};
|
|
346
|
+
//# sourceMappingURL=chunk-VI3ZJJYO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/webpack/plugins.ts"],"sourcesContent":["import { assert, hasProperty, isObject } from '@metamask/utils';\nimport { bold, dim, red, yellow } from 'chalk';\nimport { isBuiltin } from 'module';\nimport type { Ora } from 'ora';\nimport type {\n Compiler,\n ProvidePlugin,\n ResolvePluginInstance,\n Resolver,\n StatsError,\n WebpackPluginInstance,\n} from 'webpack';\nimport { WebpackError } from 'webpack';\n\nimport { evaluate } from '../commands/eval';\nimport { error, getErrorMessage, info, warn } from '../utils';\nimport { formatText, pluralize } from './utils';\n\nexport type SnapsStatsPluginOptions = {\n /**\n * Whether to log the verbose stats.\n */\n verbose?: boolean;\n};\n\n/**\n * A plugin that logs the stats after compilation. This is useful for logging\n * the number of files compiled, and the time taken to compile them.\n */\nexport class SnapsStatsPlugin implements WebpackPluginInstance {\n /**\n * The options for the plugin.\n */\n readonly options: SnapsStatsPluginOptions;\n\n /**\n * The spinner to use for logging.\n */\n readonly #spinner?: Ora;\n\n constructor(\n options: SnapsStatsPluginOptions = {\n verbose: false,\n },\n spinner?: Ora,\n ) {\n this.options = options;\n this.#spinner = spinner;\n }\n\n /**\n * Apply the plugin to the Webpack compiler.\n *\n * @param compiler - The Webpack compiler.\n */\n apply(compiler: Compiler) {\n compiler.hooks.afterDone.tap(this.constructor.name, (stats) => {\n if (!stats) {\n return;\n }\n\n const { modules, time, errors, warnings } = stats.toJson();\n\n assert(modules, 'Modules must be defined in stats.');\n assert(time, 'Time must be defined in stats.');\n\n if (errors?.length) {\n const formattedErrors = errors\n .map((statsError) => this.#getStatsErrorMessage(statsError))\n .join('\\n\\n');\n\n error(\n `Compiled ${modules.length} ${pluralize(\n modules.length,\n 'file',\n )} in ${time}ms with ${errors.length} ${pluralize(\n errors.length,\n 'error',\n )}.\\n\\n${formattedErrors}\\n`,\n this.#spinner,\n );\n\n this.#spinner?.stop();\n\n process.exitCode = 1;\n return;\n }\n\n if (warnings?.length) {\n const formattedWarnings = warnings\n .map((statsWarning) =>\n this.#getStatsErrorMessage(statsWarning, yellow),\n )\n .join('\\n\\n');\n\n warn(\n `Compiled ${modules.length} ${pluralize(\n modules.length,\n 'file',\n )} in ${time}ms with ${warnings.length} ${pluralize(\n warnings.length,\n 'warning',\n )}.\\n\\n${formattedWarnings}\\n`,\n this.#spinner,\n );\n } else {\n info(\n `Compiled ${modules.length} ${pluralize(\n modules.length,\n 'file',\n )} in ${time}ms.`,\n this.#spinner,\n );\n }\n\n if (compiler.watchMode) {\n // The spinner may be restarted by the watch plugin, outside of the\n // `executeSteps` flow, so we stop it here just in case.\n this.#spinner?.succeed('Done!');\n }\n });\n }\n\n /**\n * Get the error message for the given stats error.\n *\n * @param statsError - The stats error.\n * @param color - The color to use for the error message.\n * @returns The error message.\n */\n #getStatsErrorMessage(statsError: StatsError, color = red) {\n const baseMessage = this.options.verbose\n ? getErrorMessage(statsError)\n : statsError.message;\n\n const [first, ...rest] = baseMessage.split('\\n');\n\n return [\n color(formatText(`• ${first}`, 4, 2)),\n ...rest.map((message) => formatText(color(message), 4)),\n statsError.details && `\\n${formatText(dim(statsError.details), 6)}`,\n ]\n .filter(Boolean)\n .join('\\n');\n }\n}\n\n/**\n * The options for the {@link SnapsWatchPlugin}.\n */\nexport type SnapsWatchPluginOptions = {\n /**\n * The bundle path. This is the file that will be evaluated, if the `evaluate`\n * option is set.\n */\n bundle?: string;\n\n /**\n * Whether to evaluate the bundle. This only applies if the `bundle` option is\n * set.\n */\n evaluate?: boolean;\n\n /**\n * The extra files to watch.\n */\n files?: string[];\n};\n\n/**\n * A plugin that adds extra files to watch. This is useful for watching files\n * that are not imported by the entry point, such as the `snap.manifest.json`\n * file.\n */\nexport class SnapsWatchPlugin implements WebpackPluginInstance {\n /**\n * The options for the plugin.\n */\n readonly options: SnapsWatchPluginOptions;\n\n /**\n * The spinner to use for logging.\n */\n readonly #spinner?: Ora;\n\n constructor(options: SnapsWatchPluginOptions, spinner?: Ora) {\n this.options = options;\n this.#spinner = spinner;\n }\n\n /**\n * Apply the plugin to the Webpack compiler.\n *\n * @param compiler - The Webpack compiler.\n */\n apply(compiler: Compiler) {\n compiler.hooks.invalid.tap(this.constructor.name, (file) => {\n this.#spinner?.start();\n info(`Changes detected in ${yellow(file)}, recompiling.`, this.#spinner);\n });\n\n compiler.hooks.afterEmit.tapPromise(\n this.constructor.name,\n async ({ fileDependencies }) => {\n this.options.files?.forEach(\n fileDependencies.add.bind(fileDependencies),\n );\n\n if (this.options.bundle && this.options.evaluate) {\n await this.#safeEvaluate(this.options.bundle);\n }\n },\n );\n }\n\n /**\n * Safely evaluate the bundle at the given path. If an error occurs, it will\n * be logged to the console, rather than throwing an error.\n *\n * This function should never throw an error.\n *\n * @param bundlePath - The path to the bundle.\n */\n async #safeEvaluate(bundlePath: string) {\n try {\n await evaluate(bundlePath);\n info(`Snap bundle evaluated successfully.`, this.#spinner);\n } catch (evaluateError) {\n error(evaluateError.message, this.#spinner);\n }\n }\n}\n\n/**\n * The options for the {@link SnapsBuiltInResolver}.\n */\nexport type SnapsBuiltInResolverOptions = {\n /**\n * The built-in modules to ignore.\n */\n ignore?: string[];\n};\n\n/**\n * A plugin that logs a message when a built-in module is not resolved. The\n * MetaMask Snaps CLI does not support built-in modules by default, and this\n * plugin is used to warn the user when they try to import a built-in module,\n * when no fallback is configured.\n */\nexport class SnapsBuiltInResolver implements ResolvePluginInstance {\n /**\n * The built-in modules that have been imported, but not resolved.\n */\n readonly unresolvedModules = new Set<string>();\n\n /**\n * The name of the resolver hook to tap into.\n */\n readonly #source = 'described-resolve';\n\n /**\n * The options for the plugin.\n */\n readonly options: SnapsBuiltInResolverOptions;\n\n /**\n * The spinner to use for logging.\n */\n readonly #spinner?: Ora;\n\n constructor(\n options: SnapsBuiltInResolverOptions = {\n ignore: [],\n },\n spinner?: Ora,\n ) {\n this.options = options;\n this.#spinner = spinner;\n }\n\n /**\n * Apply the plugin to the Webpack resolver.\n *\n * @param resolver - The Webpack resolver.\n */\n apply(resolver: Resolver) {\n resolver\n .getHook(this.#source)\n .tapAsync(\n this.constructor.name,\n ({ module: isModule, request }, _, callback) => {\n if (!isModule || !request) {\n return callback();\n }\n\n const baseRequest = request.split('/')[0];\n if (\n isBuiltin(baseRequest) &&\n !this.options.ignore?.includes(baseRequest)\n ) {\n const fallback = resolver.options.fallback.find(\n ({ name }) => name === baseRequest,\n );\n\n if (fallback && !fallback.alias) {\n this.unresolvedModules.add(baseRequest);\n }\n }\n\n return callback();\n },\n );\n }\n}\n\n/**\n * The options for the {@link SnapsBundleWarningsPlugin}.\n */\nexport type SnapsBundleWarningsPluginOptions = {\n /**\n * The {@link SnapsBuiltInResolver} instance to use for detecting built-in\n * modules.\n */\n builtInResolver?: SnapsBuiltInResolver | false;\n\n /**\n * Whether to show warnings if built-in modules are used, but not provided by\n * Webpack's `fallback` configuration.\n */\n builtIns?: boolean;\n\n /**\n * Whether to show warnings if the `Buffer` global is used, but not provided\n * by Webpack's `DefinePlugin`.\n */\n buffer?: boolean;\n};\n\n/**\n * A plugin that logs a message when:\n *\n * - A built-in module is not resolved. The MetaMask Snaps CLI does not support\n * built-in modules by default, and this plugin is used to warn the user when\n * they try to import a built-in module, when no fallback is configured.\n * - A snap uses the `Buffer` global. The MetaMask Snaps CLI does not support\n * the `Buffer` global by default, and this plugin is used to warn the user when\n * they try to use the `Buffer` global.\n *\n * We use both a resolver and a plugin, because the resolver is used to detect\n * when a built-in module is imported, and the plugin is used to log a single\n * message when the compilation is complete. We can't do everything in a single\n * plugin, because the resolver doesn't have access to the compilation, and the\n * plugin doesn't have access to the resolver.\n */\n\nexport class SnapsBundleWarningsPlugin implements WebpackPluginInstance {\n /**\n * The options for the plugin.\n */\n readonly options: SnapsBundleWarningsPluginOptions;\n\n constructor(\n options: SnapsBundleWarningsPluginOptions = {\n buffer: true,\n builtIns: true,\n },\n ) {\n this.options = options;\n }\n\n /**\n * Apply the plugin to the Webpack compiler.\n *\n * @param compiler - The Webpack compiler.\n */\n apply(compiler: Compiler) {\n if (this.options.builtIns) {\n this.#checkBuiltIns(compiler);\n }\n\n if (this.options.buffer) {\n this.#checkBuffer(compiler);\n }\n }\n\n /**\n * Check if a built-in module is used, but not provided by Webpack's\n * `fallback` configuration.\n *\n * @param compiler - The Webpack compiler.\n */\n #checkBuiltIns(compiler: Compiler) {\n compiler.hooks.afterCompile.tap(this.constructor.name, (compilation) => {\n if (!this.options.builtInResolver) {\n return;\n }\n\n const { unresolvedModules } = this.options.builtInResolver;\n if (unresolvedModules.size === 0) {\n return;\n }\n\n const formattedModules = new Array(...unresolvedModules)\n .map((name) => `• ${name}`)\n .join('\\n');\n\n const webpackError = new WebpackError(\n `The snap attempted to use one or more Node.js builtins, but no browser fallback has been provided. The MetaMask Snaps CLI does not support Node.js builtins by default. If you want to use this module, you must set ${bold(\n '`polyfills`',\n )} to ${bold(\n '`true`',\n )} or an object with the builtins to polyfill as the key and ${bold(\n '`true`',\n )} as the value. To disable this warning, set ${bold(\n '`stats.builtIns`',\n )} to ${bold(\n '`false`',\n )} in your snap config file, or add the module to the ${bold(\n '`stats.builtIns.ignore`',\n )} array.`,\n );\n\n webpackError.details = formattedModules;\n compilation.warnings.push(webpackError);\n });\n }\n\n /**\n * Check if the given instance is a `ProvidePlugin`. This is not guaranteed to\n * be accurate, but it's good enough for our purposes. If we were to use\n * `instanceof` instead, it might not work if multiple versions of Webpack are\n * installed.\n *\n * @param instance - The instance to check.\n * @returns Whether the instance is a `ProvidePlugin`, i.e., whether it's an\n * object with the name `ProvidePlugin` and a `definitions` property.\n */\n #isProvidePlugin(instance: unknown): instance is ProvidePlugin {\n return (\n isObject(instance) &&\n instance.constructor.name === 'ProvidePlugin' &&\n hasProperty(instance, 'definitions')\n );\n }\n\n /**\n * Check if the `Buffer` global is used, but not provided by Webpack's\n * `DefinePlugin`.\n *\n * @param compiler - The Webpack compiler.\n */\n #checkBuffer(compiler: Compiler) {\n const plugin = compiler.options.plugins?.find((instance) =>\n this.#isProvidePlugin(instance),\n ) as ProvidePlugin | undefined;\n\n // If the `ProvidePlugin` is configured to provide `Buffer`, then we don't\n // need to warn the user.\n if (plugin) {\n const { definitions } = plugin;\n if (definitions.Buffer) {\n return;\n }\n }\n\n compiler.hooks.compilation.tap(this.constructor.name, (compilation) => {\n compilation.hooks.afterProcessAssets.tap(\n this.constructor.name,\n (assets) => {\n // Check if assets use `Buffer`.\n const bufferAssets = Object.entries(assets)\n .filter(([name]) => name.endsWith('.js'))\n .filter(([, asset]) => asset.source().includes('Buffer'));\n\n if (bufferAssets.length === 0) {\n return;\n }\n\n compilation.warnings.push(\n new WebpackError(\n `The snap attempted to use the Node.js Buffer global, which is not supported in the MetaMask Snaps CLI by default. To use the Buffer global, you must polyfill Buffer by setting ${bold(\n '`buffer`',\n )} to ${bold('`true`')} in the ${bold(\n '`polyfills`',\n )} config object in your snap config. To disable this warning, set ${bold(\n '`stats.buffer`',\n )} to ${bold('`false`')} in your snap config file.`,\n ),\n );\n },\n );\n });\n }\n}\n"],"mappings":"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","names":["_spinner"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildHandler
|
|
3
|
+
} from "./chunk-QH4AQR33.mjs";
|
|
4
|
+
import {
|
|
5
|
+
builders_default
|
|
6
|
+
} from "./chunk-ZOQ32RQI.mjs";
|
|
7
|
+
|
|
8
|
+
// src/commands/build/index.ts
|
|
9
|
+
var command = {
|
|
10
|
+
command: ["build", "b"],
|
|
11
|
+
desc: "Build snap from source",
|
|
12
|
+
builder: (yarg) => {
|
|
13
|
+
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");
|
|
14
|
+
},
|
|
15
|
+
handler: async (argv) => buildHandler(argv.context.config)
|
|
16
|
+
};
|
|
17
|
+
var build_default = command;
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
build_default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=chunk-VTJFPUIA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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"],"mappings":";;;;;;;;AAMA,IAAM,UAAU;AAAA,EACd,SAAS,CAAC,SAAS,GAAG;AAAA,EACtB,MAAM;AAAA,EACN,SAAS,CAAC,SAAqB;AAC7B,SACG,OAAO,QAAQ,iBAAS,IAAI,EAC5B,OAAO,QAAQ,iBAAS,IAAI,EAC5B,OAAO,YAAY,iBAAS,QAAQ,EACpC,OAAO,eAAe,iBAAS,WAAW,EAC1C,OAAO,cAAc,iBAAS,UAAU,EACxC,OAAO,OAAO,iBAAS,GAAG,EAC1B,OAAO,iBAAiB,iBAAS,aAAa,EAC9C,OAAO,qBAAqB,iBAAS,iBAAiB,EACtD,OAAO,mBAAmB,iBAAS,eAAe,EAClD,OAAO,iBAAiB,iBAAS,aAAa,EAC9C,QAAQ,iBAAiB,UAAU,EACnC,QAAQ,mBAAmB,mBAAmB;AAAA,EACnD;AAAA,EACA,SAAS,OAAO,SAAoB,aAAa,KAAK,QAAQ,MAAM;AACtE;AAGA,IAAO,gBAAQ;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkYDLKS46Rjs = require('./chunk-YDLKS46R.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkASOCIPDRjs = require('./chunk-ASOCIPDR.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk5DDAAM2Xjs = require('./chunk-5DDAAM2X.js');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk46JUPGRYjs = require('./chunk-46JUPGRY.js');
|
|
13
|
+
|
|
14
|
+
// src/commands/eval/eval.ts
|
|
15
|
+
var _node = require('@metamask/snaps-utils/node');
|
|
16
|
+
var _path = require('path');
|
|
17
|
+
var steps = [
|
|
18
|
+
{
|
|
19
|
+
name: "Checking the input file.",
|
|
20
|
+
task: async ({ input }) => {
|
|
21
|
+
if (!await _node.isFile.call(void 0, input)) {
|
|
22
|
+
const relativePath = _chunkASOCIPDRjs.getRelativePath.call(void 0, input);
|
|
23
|
+
throw new (0, _chunk46JUPGRYjs.CommandError)(
|
|
24
|
+
`Input file not found: "${relativePath}". Make sure that the "input" field in your snap config or the specified input file is correct.`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "Evaluating the snap bundle.",
|
|
31
|
+
task: async ({ input, spinner }) => {
|
|
32
|
+
await _chunkYDLKS46Rjs.evaluate.call(void 0, input);
|
|
33
|
+
spinner.succeed("Snap bundle evaluated successfully.");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
function getBundlePath(config, options) {
|
|
38
|
+
if (options.input) {
|
|
39
|
+
return _path.resolve.call(void 0, process.cwd(), options.input);
|
|
40
|
+
}
|
|
41
|
+
return _path.resolve.call(void 0, config.output.path, config.output.filename);
|
|
42
|
+
}
|
|
43
|
+
async function evaluateHandler(config, options = {}) {
|
|
44
|
+
const input = getBundlePath(config, options);
|
|
45
|
+
await _chunk5DDAAM2Xjs.executeSteps.call(void 0, steps, { input });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
exports.evaluateHandler = evaluateHandler;
|
|
51
|
+
//# sourceMappingURL=chunk-WH7GOZP7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/eval/eval.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AAcxB,IAAM,QAA4B;AAAA,EAChC;AAAA,IACE,MAAM;AAAA,IACN,MAAM,OAAO,EAAE,MAAM,MAAM;AACzB,UAAI,CAAE,MAAM,OAAO,KAAK,GAAI;AAC1B,cAAM,eAAe,gBAAgB,KAAK;AAC1C,cAAM,IAAI;AAAA,UACR,0BAA0B,YAAY;AAAA,QACxC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM,OAAO,EAAE,OAAO,QAAQ,MAAM;AAClC,YAAM,SAAS,KAAK;AACpB,cAAQ,QAAQ,qCAAqC;AAAA,IACvD;AAAA,EACF;AACF;AAaA,SAAS,cAAc,QAAyB,SAA8B;AAC5E,MAAI,QAAQ,OAAO;AACjB,WAAO,QAAQ,QAAQ,IAAI,GAAG,QAAQ,KAAK;AAAA,EAC7C;AAEA,SAAO,QAAQ,OAAO,OAAO,MAAM,OAAO,OAAO,QAAQ;AAC3D;AAUA,eAAsB,gBACpB,QACA,UAAuB,CAAC,GACT;AACf,QAAM,QAAQ,cAAc,QAAQ,OAAO;AAC3C,QAAM,aAAa,OAAO,EAAE,MAAM,CAAC;AACrC","sourcesContent":["import { isFile } from '@metamask/snaps-utils/node';\nimport { resolve } from 'path';\n\nimport type { ProcessedConfig } from '../../config';\nimport { CommandError } from '../../errors';\nimport type { Steps } from '../../utils';\nimport { executeSteps, getRelativePath } from '../../utils';\nimport { evaluate } from './implementation';\n\nexport type EvalOptions = {\n input?: string;\n};\n\nexport type EvalContext = Required<EvalOptions>;\n\nconst steps: Steps<EvalContext> = [\n {\n name: 'Checking the input file.',\n task: async ({ input }) => {\n if (!(await isFile(input))) {\n const relativePath = getRelativePath(input);\n throw new CommandError(\n `Input file not found: \"${relativePath}\". Make sure that the \"input\" field in your snap config or the specified input file is correct.`,\n );\n }\n },\n },\n {\n name: 'Evaluating the snap bundle.',\n task: async ({ input, spinner }) => {\n await evaluate(input);\n spinner.succeed('Snap bundle evaluated successfully.');\n },\n },\n];\n\n/**\n * Returns the path to the bundle, based on the config and options.\n *\n * - If `options.input` is specified, it is used as the bundle path.\n * - Otherwise, the bundle path is resolved from the config's output path and\n * filename.\n *\n * @param config - The processed config object.\n * @param options - The eval options.\n * @returns The path to the bundle.\n */\nfunction getBundlePath(config: ProcessedConfig, options: EvalOptions): string {\n if (options.input) {\n return resolve(process.cwd(), options.input);\n }\n\n return resolve(config.output.path, config.output.filename);\n}\n\n/**\n * Runs the snap in a worker, to ensure SES compatibility.\n *\n * @param config - The processed config object.\n * @param options - The eval options.\n * @returns A promise that resolves once the eval has finished.\n * @throws If the eval failed.\n */\nexport async function evaluateHandler(\n config: ProcessedConfig,\n options: EvalOptions = {},\n): Promise<void> {\n const input = getBundlePath(config, options);\n await executeSteps(steps, { input });\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkK3TSXPMEjs = require('./chunk-K3TSXPME.js');
|
|
4
|
+
|
|
5
|
+
// src/commands/watch/implementation.ts
|
|
6
|
+
var _path = require('path');
|
|
7
|
+
async function watch(config, options) {
|
|
8
|
+
const compiler = await _chunkK3TSXPMEjs.getCompiler.call(void 0, config, {
|
|
9
|
+
evaluate: config.evaluate,
|
|
10
|
+
watch: true,
|
|
11
|
+
spinner: _optionalChain([options, 'optionalAccess', _ => _.spinner])
|
|
12
|
+
});
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
compiler.watch(
|
|
15
|
+
{
|
|
16
|
+
ignored: [
|
|
17
|
+
"**/node_modules/**/*",
|
|
18
|
+
`**/${_path.basename.call(void 0, config.output.path)}/**/*`
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
(watchError) => {
|
|
22
|
+
if (watchError) {
|
|
23
|
+
reject(watchError);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
resolve(compiler.watching);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.watch = watch;
|
|
35
|
+
//# sourceMappingURL=chunk-WJNHZ4YF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/watch/implementation.ts"],"names":[],"mappings":";;;;;AAAA,SAAS,gBAAgB;AAiBzB,eAAsB,MACpB,QACA,SACA;AACA,QAAM,WAAW,MAAM,YAAY,QAAQ;AAAA,IACzC,UAAU,OAAO;AAAA,IACjB,OAAO;AAAA,IACP,SAAS,SAAS;AAAA,EACpB,CAAC;AAED,SAAO,IAAI,QAAkB,CAAC,SAAS,WAAW;AAChD,aAAS;AAAA,MACP;AAAA,QACE,SAAS;AAAA,UACP;AAAA,UACA,MAAM,SAAS,OAAO,OAAO,IAAI,CAAC;AAAA,QACpC;AAAA,MACF;AAAA,MACA,CAAC,eAAe;AACd,YAAI,YAAY;AACd,iBAAO,UAAU;AACjB;AAAA,QACF;AAEA,gBAAQ,SAAS,QAAQ;AAAA,MAC3B;AAAA,IACF;AAAA,EACF,CAAC;AACH","sourcesContent":["import { basename } from 'path';\nimport type { Watching } from 'webpack';\n\nimport type { ProcessedWebpackConfig } from '../../config';\nimport type { WebpackOptions } from '../../webpack';\nimport { getCompiler } from '../../webpack';\n\n/**\n * Build the snap bundle and watch for changes. This uses Webpack to build the\n * 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 for the first time.\n * The promise resolves with a Webpack watching instance that can be used to\n * close the watcher.\n */\nexport async function watch(\n config: ProcessedWebpackConfig,\n options?: WebpackOptions,\n) {\n const compiler = await getCompiler(config, {\n evaluate: config.evaluate,\n watch: true,\n spinner: options?.spinner,\n });\n\n return new Promise<Watching>((resolve, reject) => {\n compiler.watch(\n {\n ignored: [\n '**/node_modules/**/*',\n `**/${basename(config.output.path)}/**/*`,\n ],\n },\n (watchError) => {\n if (watchError) {\n reject(watchError);\n return;\n }\n\n resolve(compiler.watching);\n },\n );\n });\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getDefaultConfiguration
|
|
3
|
+
} from "./chunk-KKTPKAZN.mjs";
|
|
4
|
+
|
|
5
|
+
// src/webpack/compiler.ts
|
|
6
|
+
import { webpack } from "webpack";
|
|
7
|
+
async function getCompiler(config, options) {
|
|
8
|
+
const baseWebpackConfig = await getDefaultConfiguration(config, options);
|
|
9
|
+
const webpackConfig = config.customizeWebpackConfig?.(baseWebpackConfig) ?? baseWebpackConfig;
|
|
10
|
+
return webpack(webpackConfig);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
getCompiler
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-WKL7DYYW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/webpack/compiler.ts"],"sourcesContent":["import { webpack } from 'webpack';\n\nimport type { ProcessedWebpackConfig } from '../config';\nimport type { WebpackOptions } from './config';\nimport { getDefaultConfiguration } from './config';\n\n/**\n * Get a Webpack compiler for the given config.\n *\n * @param config - The config object.\n * @param options - The Webpack options.\n * @returns The Webpack compiler.\n */\nexport async function getCompiler(\n config: ProcessedWebpackConfig,\n options?: WebpackOptions,\n) {\n const baseWebpackConfig = await getDefaultConfiguration(config, options);\n const webpackConfig =\n config.customizeWebpackConfig?.(baseWebpackConfig) ?? baseWebpackConfig;\n\n return webpack(webpackConfig);\n}\n"],"mappings":";;;;;AAAA,SAAS,eAAe;AAaxB,eAAsB,YACpB,QACA,SACA;AACA,QAAM,oBAAoB,MAAM,wBAAwB,QAAQ,OAAO;AACvE,QAAM,gBACJ,OAAO,yBAAyB,iBAAiB,KAAK;AAExD,SAAO,QAAQ,aAAa;AAC9B;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
watchHandler
|
|
3
|
+
} from "./chunk-B455GFXP.mjs";
|
|
4
|
+
import {
|
|
5
|
+
builders_default
|
|
6
|
+
} from "./chunk-ZOQ32RQI.mjs";
|
|
7
|
+
|
|
8
|
+
// src/commands/watch/index.ts
|
|
9
|
+
var command = {
|
|
10
|
+
command: ["watch", "w"],
|
|
11
|
+
desc: "Build Snap on change",
|
|
12
|
+
builder: (yarg) => {
|
|
13
|
+
yarg.option("src", builders_default.src).option("eval", builders_default.eval).option("dist", builders_default.dist).option("outfileName", builders_default.outfileName).option("sourceMaps", builders_default.sourceMaps).option("stripComments", builders_default.stripComments).option("transpilationMode", builders_default.transpilationMode).option("depsToTranspile", builders_default.depsToTranspile).option("manifest", builders_default.manifest).option("writeManifest", builders_default.writeManifest).option("serve", builders_default.serve).option("root", builders_default.root).option("port", builders_default.port).implies("writeManifest", "manifest").implies("depsToTranspile", "transpilationMode");
|
|
14
|
+
},
|
|
15
|
+
handler: async (argv) => watchHandler(argv.context.config, {
|
|
16
|
+
port: argv.port
|
|
17
|
+
})
|
|
18
|
+
};
|
|
19
|
+
var watch_default = command;
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
watch_default
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-X2RPNWBJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/watch/index.ts"],"sourcesContent":["import type yargs from 'yargs';\n\nimport builders from '../../builders';\nimport type { YargsArgs } from '../../types/yargs';\nimport { watchHandler } from './watch';\n\nconst command = {\n command: ['watch', 'w'],\n desc: 'Build Snap on change',\n builder: (yarg: yargs.Argv) => {\n yarg\n .option('src', builders.src)\n .option('eval', builders.eval)\n .option('dist', builders.dist)\n .option('outfileName', builders.outfileName)\n .option('sourceMaps', builders.sourceMaps)\n .option('stripComments', builders.stripComments)\n .option('transpilationMode', builders.transpilationMode)\n .option('depsToTranspile', builders.depsToTranspile)\n .option('manifest', builders.manifest)\n .option('writeManifest', builders.writeManifest)\n .option('serve', builders.serve)\n .option('root', builders.root)\n .option('port', builders.port)\n .implies('writeManifest', 'manifest')\n .implies('depsToTranspile', 'transpilationMode');\n },\n handler: async (argv: YargsArgs) =>\n watchHandler(argv.context.config, {\n port: argv.port,\n }),\n};\n\nexport * from './implementation';\nexport default command;\n"],"mappings":";;;;;;;;AAMA,IAAM,UAAU;AAAA,EACd,SAAS,CAAC,SAAS,GAAG;AAAA,EACtB,MAAM;AAAA,EACN,SAAS,CAAC,SAAqB;AAC7B,SACG,OAAO,OAAO,iBAAS,GAAG,EAC1B,OAAO,QAAQ,iBAAS,IAAI,EAC5B,OAAO,QAAQ,iBAAS,IAAI,EAC5B,OAAO,eAAe,iBAAS,WAAW,EAC1C,OAAO,cAAc,iBAAS,UAAU,EACxC,OAAO,iBAAiB,iBAAS,aAAa,EAC9C,OAAO,qBAAqB,iBAAS,iBAAiB,EACtD,OAAO,mBAAmB,iBAAS,eAAe,EAClD,OAAO,YAAY,iBAAS,QAAQ,EACpC,OAAO,iBAAiB,iBAAS,aAAa,EAC9C,OAAO,SAAS,iBAAS,KAAK,EAC9B,OAAO,QAAQ,iBAAS,IAAI,EAC5B,OAAO,QAAQ,iBAAS,IAAI,EAC5B,QAAQ,iBAAiB,UAAU,EACnC,QAAQ,mBAAmB,mBAAmB;AAAA,EACnD;AAAA,EACA,SAAS,OAAO,SACd,aAAa,KAAK,QAAQ,QAAQ;AAAA,IAChC,MAAM,KAAK;AAAA,EACb,CAAC;AACL;AAGA,IAAO,gBAAQ;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
|
|
2
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
+
}) : x)(function(x) {
|
|
5
|
+
if (typeof require !== "undefined")
|
|
6
|
+
return require.apply(this, arguments);
|
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
+
});
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __accessCheck = (obj, member, msg) => {
|
|
14
|
+
if (!member.has(obj))
|
|
15
|
+
throw TypeError("Cannot " + msg);
|
|
16
|
+
};
|
|
17
|
+
var __privateGet = (obj, member, getter) => {
|
|
18
|
+
__accessCheck(obj, member, "read from private field");
|
|
19
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
20
|
+
};
|
|
21
|
+
var __privateAdd = (obj, member, value) => {
|
|
22
|
+
if (member.has(obj))
|
|
23
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
24
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
25
|
+
};
|
|
26
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
27
|
+
__accessCheck(obj, member, "write to private field");
|
|
28
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
29
|
+
return value;
|
|
30
|
+
};
|
|
31
|
+
var __privateMethod = (obj, member, method) => {
|
|
32
|
+
__accessCheck(obj, member, "access private method");
|
|
33
|
+
return method;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
exports.__require = __require; exports.__export = __export; exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateMethod = __privateMethod;
|
|
44
|
+
//# sourceMappingURL=chunk-X3D3MHWF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getServer
|
|
3
|
+
} from "./chunk-6VFUO2H5.mjs";
|
|
4
|
+
import {
|
|
5
|
+
info
|
|
6
|
+
} from "./chunk-JMISQ4HT.mjs";
|
|
7
|
+
|
|
8
|
+
// src/commands/serve/serve.ts
|
|
9
|
+
async function serveHandler(config, options) {
|
|
10
|
+
const server = getServer(config);
|
|
11
|
+
const { port } = await server.listen(options.port);
|
|
12
|
+
info(`The server is listening on http://localhost:${port}.`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
serveHandler
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk-X4FWMO4H.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/serve/serve.ts"],"sourcesContent":["import type { ProcessedConfig } from '../../config';\nimport { info } from '../../utils';\nimport { getServer } from '../../webpack';\n\ntype ServeOptions = {\n /**\n * The port to listen on.\n */\n port: number;\n};\n\n/**\n * Starts a local, static HTTP server on the given port with the given root\n * directory.\n *\n * @param config - The config object.\n * @param options - The options object.\n */\nexport async function serveHandler(\n config: ProcessedConfig,\n options: ServeOptions,\n): Promise<void> {\n const server = getServer(config);\n\n // If the `configPort` is `0`, the OS will choose a random port for us, so we\n // need to get the port from the server after it starts.\n const { port } = await server.listen(options.port);\n\n info(`The server is listening on http://localhost:${port}.`);\n}\n"],"mappings":";;;;;;;;AAkBA,eAAsB,aACpB,QACA,SACe;AACf,QAAM,SAAS,UAAU,MAAM;AAI/B,QAAM,EAAE,KAAK,IAAI,MAAM,OAAO,OAAO,QAAQ,IAAI;AAEjD,OAAK,+CAA+C,IAAI,GAAG;AAC7D;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";//# sourceMappingURL=chunk-Y5PQG4KA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|