@metamask/snaps-webpack-plugin 0.36.1-flask.1 → 0.37.1-flask.1
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 +11 -1
- package/dist/cjs/plugin.js.map +1 -1
- package/dist/esm/plugin.js.map +1 -1
- package/dist/types/plugin.d.ts +2 -2
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.37.1-flask.1]
|
|
10
|
+
### Changed
|
|
11
|
+
- No changes this release.
|
|
12
|
+
|
|
13
|
+
## [0.37.0-flask.1]
|
|
14
|
+
### Changed
|
|
15
|
+
- No changes this release.
|
|
16
|
+
|
|
9
17
|
## [0.36.1-flask.1]
|
|
10
18
|
### Changed
|
|
11
19
|
- No changes this release.
|
|
@@ -176,7 +184,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
176
184
|
### Added
|
|
177
185
|
- Initial release ([#420](https://github.com/MetaMask/snaps-monorepo/pull/420))
|
|
178
186
|
|
|
179
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/v0.
|
|
187
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/v0.37.1-flask.1...HEAD
|
|
188
|
+
[0.37.1-flask.1]: https://github.com/MetaMask/snaps/compare/v0.37.0-flask.1...v0.37.1-flask.1
|
|
189
|
+
[0.37.0-flask.1]: https://github.com/MetaMask/snaps/compare/v0.36.1-flask.1...v0.37.0-flask.1
|
|
180
190
|
[0.36.1-flask.1]: https://github.com/MetaMask/snaps/compare/v0.36.0-flask.1...v0.36.1-flask.1
|
|
181
191
|
[0.36.0-flask.1]: https://github.com/MetaMask/snaps/compare/v0.35.2-flask.1...v0.36.0-flask.1
|
|
182
192
|
[0.35.2-flask.1]: https://github.com/MetaMask/snaps/compare/v0.35.1-flask.1...v0.35.2-flask.1
|
package/dist/cjs/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugin.ts"],"sourcesContent":["import {\n checkManifest,\n evalBundle,\n postProcessBundle,\n
|
|
1
|
+
{"version":3,"sources":["../../src/plugin.ts"],"sourcesContent":["import type { PostProcessOptions, SourceMap } from '@metamask/snaps-utils';\nimport {\n checkManifest,\n evalBundle,\n postProcessBundle,\n useTemporaryFile,\n} from '@metamask/snaps-utils';\nimport { assert } from '@metamask/utils';\nimport pathUtils from 'path';\nimport { promisify } from 'util';\nimport type { Compiler } from 'webpack';\nimport { WebpackError } from 'webpack';\nimport { RawSource, SourceMapSource } from 'webpack-sources';\n\nconst PLUGIN_NAME = 'SnapsWebpackPlugin';\n\ntype PluginOptions = {\n eval?: boolean;\n manifestPath?: string;\n writeManifest?: boolean;\n};\n\nexport type Options = PluginOptions &\n Omit<PostProcessOptions, 'sourceMap' | 'inputSourceMap'>;\n\nexport default class SnapsWebpackPlugin {\n public readonly options: Partial<Options>;\n\n /**\n * Construct an instance of the plugin.\n *\n * @param options - The post-process options.\n * @param options.stripComments - Whether to strip comments. Defaults to\n * `true`.\n * @param options.eval - Whether to evaluate the bundle to test SES\n * compatibility. Defaults to `true`.\n * @param options.manifestPath - The path to the manifest file. If provided,\n * the manifest will be validated. Defaults to\n * `process.cwd() + '/snap.manifest.json'`.\n * @param options.writeManifest - Whether to fix the manifest.\n * Defaults to `true`.\n */\n constructor(options?: Partial<Options>) {\n this.options = {\n eval: true,\n manifestPath: pathUtils.join(process.cwd(), 'snap.manifest.json'),\n writeManifest: true,\n ...options,\n };\n }\n\n /**\n * Apply the plugin to the Webpack compiler. Hooks into the `processAssets`\n * stage to process the bundle.\n *\n * @param compiler - The Webpack compiler.\n */\n apply(compiler: Compiler) {\n const { devtool } = compiler.options;\n\n compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {\n compilation.hooks.processAssets.tap(PLUGIN_NAME, (assets) => {\n Object.keys(assets)\n .filter((assetName) => assetName.endsWith('.js'))\n .forEach((assetName) => {\n const asset = assets[assetName];\n const processed = postProcessBundle(asset.source() as string, {\n ...this.options,\n sourceMap: Boolean(devtool),\n inputSourceMap: devtool ? (asset.map() as SourceMap) : undefined,\n });\n\n if (processed.warnings.length > 0) {\n compilation.warnings.push(\n new WebpackError(\n `${PLUGIN_NAME}: Bundle Warning: Processing of the Snap bundle completed with warnings.\\n${processed.warnings.join(\n '\\n',\n )}`,\n ),\n );\n }\n\n const replacement = processed.sourceMap\n ? new SourceMapSource(\n processed.code,\n assetName,\n processed.sourceMap,\n )\n : new RawSource(processed.code);\n\n // For some reason the type of `RawSource` is not compatible with Webpack's own\n // `Source`, but works fine when casting it to `any`.\n compilation.updateAsset(assetName, replacement as any);\n });\n });\n });\n\n compiler.hooks.afterEmit.tapPromise(PLUGIN_NAME, async (compilation) => {\n const file = compilation\n .getAssets()\n .find((asset) => asset.name.endsWith('.js'));\n\n assert(file);\n\n assert(compilation.outputOptions.path);\n const outputPath = compilation.outputOptions.path;\n\n const filePath = pathUtils.join(outputPath, file.name);\n\n const bundleFile = await promisify(compiler.outputFileSystem.readFile)(\n filePath,\n );\n assert(bundleFile);\n\n const bundleContent = bundleFile.toString();\n\n if (this.options.eval) {\n await useTemporaryFile('snaps-bundle.js', bundleContent, (path) =>\n evalBundle(path),\n );\n }\n\n if (this.options.manifestPath) {\n const { errors, warnings } = await checkManifest(\n pathUtils.dirname(this.options.manifestPath),\n this.options.writeManifest,\n bundleContent,\n );\n\n if (!this.options.writeManifest && errors.length > 0) {\n throw new Error(\n `Manifest Error: The manifest is invalid.\\n${errors.join('\\n')}`,\n );\n }\n\n if (warnings.length > 0) {\n compilation.warnings.push(\n new WebpackError(\n `${PLUGIN_NAME}: Manifest Warning: Validation of snap.manifest.json completed with warnings.\\n${warnings.join(\n '\\n',\n )}`,\n ),\n );\n }\n }\n });\n }\n}\n"],"names":["SnapsWebpackPlugin","PLUGIN_NAME","apply","compiler","devtool","options","hooks","compilation","tap","processAssets","assets","Object","keys","filter","assetName","endsWith","forEach","asset","processed","postProcessBundle","source","sourceMap","Boolean","inputSourceMap","map","undefined","warnings","length","push","WebpackError","join","replacement","SourceMapSource","code","RawSource","updateAsset","afterEmit","tapPromise","file","getAssets","find","name","assert","outputOptions","path","outputPath","filePath","pathUtils","bundleFile","promisify","outputFileSystem","readFile","bundleContent","toString","eval","useTemporaryFile","evalBundle","manifestPath","errors","checkManifest","dirname","writeManifest","Error","constructor","process","cwd"],"mappings":";;;;;;;eAyBqBA;;;4BAnBd;uBACgB;6DACD;sBACI;yBAEG;gCACc;;;;;;;;;;;;;;;;;;;AAE3C,MAAMC,cAAc;AAWL,MAAMD;IA0BnB;;;;;GAKC,GACDE,MAAMC,QAAkB,EAAE;QACxB,MAAM,EAAEC,OAAO,EAAE,GAAGD,SAASE,OAAO;QAEpCF,SAASG,KAAK,CAACC,WAAW,CAACC,GAAG,CAACP,aAAa,CAACM;YAC3CA,YAAYD,KAAK,CAACG,aAAa,CAACD,GAAG,CAACP,aAAa,CAACS;gBAChDC,OAAOC,IAAI,CAACF,QACTG,MAAM,CAAC,CAACC,YAAcA,UAAUC,QAAQ,CAAC,QACzCC,OAAO,CAAC,CAACF;oBACR,MAAMG,QAAQP,MAAM,CAACI,UAAU;oBAC/B,MAAMI,YAAYC,IAAAA,6BAAiB,EAACF,MAAMG,MAAM,IAAc;wBAC5D,GAAG,IAAI,CAACf,OAAO;wBACfgB,WAAWC,QAAQlB;wBACnBmB,gBAAgBnB,UAAWa,MAAMO,GAAG,KAAmBC;oBACzD;oBAEA,IAAIP,UAAUQ,QAAQ,CAACC,MAAM,GAAG,GAAG;wBACjCpB,YAAYmB,QAAQ,CAACE,IAAI,CACvB,IAAIC,qBAAY,CACd,CAAC,EAAE5B,YAAY,0EAA0E,EAAEiB,UAAUQ,QAAQ,CAACI,IAAI,CAChH,MACA,CAAC;oBAGT;oBA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,MAAM,IAAImC,MACR,CAAC,0CAA0C,EAAEJ,OAAO5B,IAAI,CAAC,MAAM,CAAC;gBAEpE;gBAEA,IAAIJ,SAASC,MAAM,GAAG,GAAG;oBACvBpB,YAAYmB,QAAQ,CAACE,IAAI,CACvB,IAAIC,qBAAY,CACd,CAAC,EAAE5B,YAAY,+EAA+E,EAAEyB,SAASI,IAAI,CAC3G,MACA,CAAC;gBAGT;YACF;QACF;IACF;IAtHA;;;;;;;;;;;;;GAaC,GACDiC,YAAY1D,OAA0B,CAAE;QAhBxC,uBAAgBA,WAAhB,KAAA;QAiBE,IAAI,CAACA,OAAO,GAAG;YACbiD,MAAM;YACNG,cAAcV,aAAS,CAACjB,IAAI,CAACkC,QAAQC,GAAG,IAAI;YAC5CJ,eAAe;YACf,GAAGxD,OAAO;QACZ;IACF;AAkGF"}
|
package/dist/esm/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugin.ts"],"sourcesContent":["import {\n checkManifest,\n evalBundle,\n postProcessBundle,\n
|
|
1
|
+
{"version":3,"sources":["../../src/plugin.ts"],"sourcesContent":["import type { PostProcessOptions, SourceMap } from '@metamask/snaps-utils';\nimport {\n checkManifest,\n evalBundle,\n postProcessBundle,\n useTemporaryFile,\n} from '@metamask/snaps-utils';\nimport { assert } from '@metamask/utils';\nimport pathUtils from 'path';\nimport { promisify } from 'util';\nimport type { Compiler } from 'webpack';\nimport { WebpackError } from 'webpack';\nimport { RawSource, SourceMapSource } from 'webpack-sources';\n\nconst PLUGIN_NAME = 'SnapsWebpackPlugin';\n\ntype PluginOptions = {\n eval?: boolean;\n manifestPath?: string;\n writeManifest?: boolean;\n};\n\nexport type Options = PluginOptions &\n Omit<PostProcessOptions, 'sourceMap' | 'inputSourceMap'>;\n\nexport default class SnapsWebpackPlugin {\n public readonly options: Partial<Options>;\n\n /**\n * Construct an instance of the plugin.\n *\n * @param options - The post-process options.\n * @param options.stripComments - Whether to strip comments. Defaults to\n * `true`.\n * @param options.eval - Whether to evaluate the bundle to test SES\n * compatibility. Defaults to `true`.\n * @param options.manifestPath - The path to the manifest file. If provided,\n * the manifest will be validated. Defaults to\n * `process.cwd() + '/snap.manifest.json'`.\n * @param options.writeManifest - Whether to fix the manifest.\n * Defaults to `true`.\n */\n constructor(options?: Partial<Options>) {\n this.options = {\n eval: true,\n manifestPath: pathUtils.join(process.cwd(), 'snap.manifest.json'),\n writeManifest: true,\n ...options,\n };\n }\n\n /**\n * Apply the plugin to the Webpack compiler. Hooks into the `processAssets`\n * stage to process the bundle.\n *\n * @param compiler - The Webpack compiler.\n */\n apply(compiler: Compiler) {\n const { devtool } = compiler.options;\n\n compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {\n compilation.hooks.processAssets.tap(PLUGIN_NAME, (assets) => {\n Object.keys(assets)\n .filter((assetName) => assetName.endsWith('.js'))\n .forEach((assetName) => {\n const asset = assets[assetName];\n const processed = postProcessBundle(asset.source() as string, {\n ...this.options,\n sourceMap: Boolean(devtool),\n inputSourceMap: devtool ? (asset.map() as SourceMap) : undefined,\n });\n\n if (processed.warnings.length > 0) {\n compilation.warnings.push(\n new WebpackError(\n `${PLUGIN_NAME}: Bundle Warning: Processing of the Snap bundle completed with warnings.\\n${processed.warnings.join(\n '\\n',\n )}`,\n ),\n );\n }\n\n const replacement = processed.sourceMap\n ? new SourceMapSource(\n processed.code,\n assetName,\n processed.sourceMap,\n )\n : new RawSource(processed.code);\n\n // For some reason the type of `RawSource` is not compatible with Webpack's own\n // `Source`, but works fine when casting it to `any`.\n compilation.updateAsset(assetName, replacement as any);\n });\n });\n });\n\n compiler.hooks.afterEmit.tapPromise(PLUGIN_NAME, async (compilation) => {\n const file = compilation\n .getAssets()\n .find((asset) => asset.name.endsWith('.js'));\n\n assert(file);\n\n assert(compilation.outputOptions.path);\n const outputPath = compilation.outputOptions.path;\n\n const filePath = pathUtils.join(outputPath, file.name);\n\n const bundleFile = await promisify(compiler.outputFileSystem.readFile)(\n filePath,\n );\n assert(bundleFile);\n\n const bundleContent = bundleFile.toString();\n\n if (this.options.eval) {\n await useTemporaryFile('snaps-bundle.js', bundleContent, (path) =>\n evalBundle(path),\n );\n }\n\n if (this.options.manifestPath) {\n const { errors, warnings } = await checkManifest(\n pathUtils.dirname(this.options.manifestPath),\n this.options.writeManifest,\n bundleContent,\n );\n\n if (!this.options.writeManifest && errors.length > 0) {\n throw new Error(\n `Manifest Error: The manifest is invalid.\\n${errors.join('\\n')}`,\n );\n }\n\n if (warnings.length > 0) {\n compilation.warnings.push(\n new WebpackError(\n `${PLUGIN_NAME}: Manifest Warning: Validation of snap.manifest.json completed with warnings.\\n${warnings.join(\n '\\n',\n )}`,\n ),\n );\n }\n }\n });\n }\n}\n"],"names":["checkManifest","evalBundle","postProcessBundle","useTemporaryFile","assert","pathUtils","promisify","WebpackError","RawSource","SourceMapSource","PLUGIN_NAME","SnapsWebpackPlugin","apply","compiler","devtool","options","hooks","compilation","tap","processAssets","assets","Object","keys","filter","assetName","endsWith","forEach","asset","processed","source","sourceMap","Boolean","inputSourceMap","map","undefined","warnings","length","push","join","replacement","code","updateAsset","afterEmit","tapPromise","file","getAssets","find","name","outputOptions","path","outputPath","filePath","bundleFile","outputFileSystem","readFile","bundleContent","toString","eval","manifestPath","errors","dirname","writeManifest","Error","constructor","process","cwd"],"mappings":";;;;;;;;;;;;;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,iBAAiB,EACjBC,gBAAgB,QACX,wBAAwB;AAC/B,SAASC,MAAM,QAAQ,kBAAkB;AACzC,OAAOC,eAAe,OAAO;AAC7B,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,SAAS,EAAEC,eAAe,QAAQ,kBAAkB;AAE7D,MAAMC,cAAc;AAWL,MAAMC;IA0BnB;;;;;GAKC,GACDC,MAAMC,QAAkB,EAAE;QACxB,MAAM,EAAEC,OAAO,EAAE,GAAGD,SAASE,OAAO;QAE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BAAgB,CAACC,QAAQ,EACnEH;YAEF/C,OAAOgD;YAEP,MAAMG,gBAAgBH,WAAWI,QAAQ;YAEzC,IAAI,IAAI,CAACzC,OAAO,CAAC0C,IAAI,EAAE;gBACrB,MAAMtD,iBAAiB,mBAAmBoD,eAAe,CAACN,OACxDhD,WAAWgD;YAEf;YAEA,IAAI,IAAI,CAAClC,OAAO,CAAC2C,YAAY,EAAE;gBAC7B,MAAM,EAAEC,MAAM,EAAExB,QAAQ,EAAE,GAAG,MAAMnC,cACjCK,UAAUuD,OAAO,CAAC,IAAI,CAAC7C,OAAO,CAAC2C,YAAY,GAC3C,IAAI,CAAC3C,OAAO,CAAC8C,aAAa,EAC1BN;gBAGF,IAAI,CAAC,IAAI,CAACxC,OAAO,CAAC8C,aAAa,IAAIF,OAAOvB,MAAM,GAAG,GAAG;oBACpD,MAAM,IAAI0B,MACR,CAAC,0CAA0C,EAAEH,OAAOrB,IAAI,CAAC,MAAM,CAAC;gBAEpE;gBAEA,IAAIH,SAASC,MAAM,GAAG,GAAG;oBACvBnB,YAAYkB,QAAQ,CAACE,IAAI,CACvB,IAAI9B,aACF,CAAC,EAAEG,YAAY,+EAA+E,EAAEyB,SAASG,IAAI,CAC3G,MACA,CAAC;gBAGT;YACF;QACF;IACF;IAtHA;;;;;;;;;;;;;GAaC,GACDyB,YAAYhD,OAA0B,CAAE;QAhBxC,uBAAgBA,WAAhB,KAAA;QAiBE,IAAI,CAACA,OAAO,GAAG;YACb0C,MAAM;YACNC,cAAcrD,UAAUiC,IAAI,CAAC0B,QAAQC,GAAG,IAAI;YAC5CJ,eAAe;YACf,GAAG9C,OAAO;QACZ;IACF;AAkGF;AA1HA,SAAqBJ,gCA0HpB"}
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PostProcessOptions } from '@metamask/snaps-utils';
|
|
2
|
-
import { Compiler } from 'webpack';
|
|
1
|
+
import type { PostProcessOptions } from '@metamask/snaps-utils';
|
|
2
|
+
import type { Compiler } from 'webpack';
|
|
3
3
|
declare type PluginOptions = {
|
|
4
4
|
eval?: boolean;
|
|
5
5
|
manifestPath?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/snaps-webpack-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.1-flask.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"webpack",
|
|
6
6
|
"plugin"
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"lint:ci": "yarn lint"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@metamask/snaps-utils": "^0.
|
|
42
|
+
"@metamask/snaps-utils": "^0.37.1-flask.1",
|
|
43
43
|
"@metamask/utils": "^6.0.1",
|
|
44
44
|
"webpack-sources": "^3.2.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@lavamoat/allow-scripts": "^2.3.1",
|
|
48
48
|
"@metamask/auto-changelog": "^3.1.0",
|
|
49
|
-
"@metamask/eslint-config": "^
|
|
50
|
-
"@metamask/eslint-config-jest": "^
|
|
51
|
-
"@metamask/eslint-config-nodejs": "^
|
|
52
|
-
"@metamask/eslint-config-typescript": "^
|
|
49
|
+
"@metamask/eslint-config": "^12.1.0",
|
|
50
|
+
"@metamask/eslint-config-jest": "^12.1.0",
|
|
51
|
+
"@metamask/eslint-config-nodejs": "^12.1.0",
|
|
52
|
+
"@metamask/eslint-config-typescript": "^12.1.0",
|
|
53
53
|
"@swc/cli": "^0.1.62",
|
|
54
54
|
"@swc/core": "^1.3.66",
|
|
55
55
|
"@swc/jest": "^0.2.26",
|
|
@@ -63,8 +63,9 @@
|
|
|
63
63
|
"eslint-plugin-import": "^2.26.0",
|
|
64
64
|
"eslint-plugin-jest": "^27.1.5",
|
|
65
65
|
"eslint-plugin-jsdoc": "^39.6.2",
|
|
66
|
-
"eslint-plugin-
|
|
66
|
+
"eslint-plugin-n": "^15.7.0",
|
|
67
67
|
"eslint-plugin-prettier": "^4.2.1",
|
|
68
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
68
69
|
"jest": "^29.0.2",
|
|
69
70
|
"jest-it-up": "^2.0.0",
|
|
70
71
|
"memfs": "^3.4.13",
|