From 90afa8191cb95ae4ba76c1fc4e8dc6416a207bf0 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Fri, 23 Aug 2024 13:37:47 +0200 Subject: [PATCH] Use Webpack for Node.js bundles --- .../node-js/NodeProcessExecutionService.ts | 2 +- .../node-js/NodeThreadExecutionService.ts | 2 +- packages/snaps-controllers/wdio.config.js | 2 +- .../lavamoat/webpack/{ => iframe}/policy.json | 68 +++-- .../lavamoat/webpack/node-process/policy.json | 238 ++++++++++++++++++ .../lavamoat/webpack/node-thread/policy.json | 238 ++++++++++++++++++ .../snaps-execution-environments/package.json | 2 +- .../wdio.config.js | 2 +- .../webpack.config.ts | 69 ++++- packages/snaps-utils/wdio.config.js | 2 +- yarn.lock | 122 +++++++-- 11 files changed, 674 insertions(+), 73 deletions(-) rename packages/snaps-execution-environments/lavamoat/webpack/{ => iframe}/policy.json (88%) create mode 100644 packages/snaps-execution-environments/lavamoat/webpack/node-process/policy.json create mode 100644 packages/snaps-execution-environments/lavamoat/webpack/node-thread/policy.json diff --git a/packages/snaps-controllers/src/services/node-js/NodeProcessExecutionService.ts b/packages/snaps-controllers/src/services/node-js/NodeProcessExecutionService.ts index 39777e2920..2a288c6857 100644 --- a/packages/snaps-controllers/src/services/node-js/NodeProcessExecutionService.ts +++ b/packages/snaps-controllers/src/services/node-js/NodeProcessExecutionService.ts @@ -13,7 +13,7 @@ export class NodeProcessExecutionService extends AbstractExecutionService { const worker = fork( require.resolve( - '@metamask/snaps-execution-environments/dist/browserify/node-process/bundle.js', + '@metamask/snaps-execution-environments/dist/webpack/node-process/bundle.js', ), { stdio: 'pipe', diff --git a/packages/snaps-controllers/src/services/node-js/NodeThreadExecutionService.ts b/packages/snaps-controllers/src/services/node-js/NodeThreadExecutionService.ts index a7912a561c..470ba1e49f 100644 --- a/packages/snaps-controllers/src/services/node-js/NodeThreadExecutionService.ts +++ b/packages/snaps-controllers/src/services/node-js/NodeThreadExecutionService.ts @@ -13,7 +13,7 @@ export class NodeThreadExecutionService extends AbstractExecutionService }> { const worker = new Worker( require.resolve( - '@metamask/snaps-execution-environments/dist/browserify/node-thread/bundle.js', + '@metamask/snaps-execution-environments/dist/webpack/node-thread/bundle.js', ), { stdout: true, diff --git a/packages/snaps-controllers/wdio.config.js b/packages/snaps-controllers/wdio.config.js index 3f159c6f0e..90b7ab8031 100644 --- a/packages/snaps-controllers/wdio.config.js +++ b/packages/snaps-controllers/wdio.config.js @@ -82,7 +82,7 @@ const config = { mount: '/', path: resolve( __dirname, - '../snaps-execution-environments/dist/browserify/iframe', + '../snaps-execution-environments/dist/webpack/iframe', ), }, diff --git a/packages/snaps-execution-environments/lavamoat/webpack/policy.json b/packages/snaps-execution-environments/lavamoat/webpack/iframe/policy.json similarity index 88% rename from packages/snaps-execution-environments/lavamoat/webpack/policy.json rename to packages/snaps-execution-environments/lavamoat/webpack/iframe/policy.json index caf0733c0b..8b96fd87b3 100644 --- a/packages/snaps-execution-environments/lavamoat/webpack/policy.json +++ b/packages/snaps-execution-environments/lavamoat/webpack/iframe/policy.json @@ -33,10 +33,25 @@ "removeEventListener": true }, "packages": { - "@metamask/utils": true, + "@metamask/post-message-stream>@metamask/utils": true, "readable-stream": true } }, + "@metamask/post-message-stream>@metamask/utils": { + "globals": { + "Buffer": true, + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/superstruct": true, + "@metamask/utils>@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "@metamask/utils>pony-cause": true, + "depcheck>semver": true, + "tsup>debug": true + } + }, "@metamask/providers": { "globals": { "console": true @@ -44,14 +59,25 @@ "packages": { "@metamask/json-rpc-engine": true, "@metamask/object-multiplex": true, + "@metamask/providers>@metamask/json-rpc-middleware-stream": true, "@metamask/providers>@metamask/safe-event-emitter": true, "@metamask/providers>is-stream": true, - "@metamask/providers>json-rpc-middleware-stream": true, "@metamask/rpc-errors": true, "eslint>fast-deep-equal": true, "readable-stream": true } }, + "@metamask/providers>@metamask/json-rpc-middleware-stream": { + "globals": { + "console.warn": true, + "setTimeout": true + }, + "packages": { + "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/utils": true, + "readable-stream": true + } + }, "@metamask/providers>@metamask/safe-event-emitter": { "globals": { "setTimeout": true @@ -69,16 +95,6 @@ "browserify>buffer>ieee754": true } }, - "@metamask/providers>json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/providers>@metamask/safe-event-emitter": true, - "readable-stream": true - } - }, "@metamask/rpc-errors": { "packages": { "@metamask/rpc-errors>fast-safe-stringify": true, @@ -87,18 +103,8 @@ }, "@metamask/snaps-sdk": { "packages": { - "@metamask/snaps-sdk>fast-xml-parser": true, - "@metamask/utils": true, - "superstruct": true - } - }, - "@metamask/snaps-sdk>fast-xml-parser": { - "globals": { - "entityName": true, - "val": true - }, - "packages": { - "@metamask/snaps-sdk>fast-xml-parser>strnum": true + "@metamask/superstruct": true, + "@metamask/utils": true } }, "@metamask/snaps-utils": { @@ -111,22 +117,19 @@ "packages": { "@metamask/rpc-errors": true, "@metamask/snaps-sdk": true, - "@metamask/utils": true, - "superstruct": true + "@metamask/superstruct": true, + "@metamask/utils": true } }, "@metamask/utils": { "globals": { - "Buffer": true, - "TextDecoder": true, "TextEncoder": true }, "packages": { + "@metamask/superstruct": true, "@metamask/utils>@noble/hashes": true, - "@metamask/utils>@scure/base": true, "@metamask/utils>pony-cause": true, "depcheck>semver": true, - "superstruct": true, "tsup>debug": true } }, @@ -195,11 +198,6 @@ "localStorage": true } }, - "superstruct": { - "globals": { - "console.warn": true - } - }, "tsup>debug": { "globals": { "console": true, diff --git a/packages/snaps-execution-environments/lavamoat/webpack/node-process/policy.json b/packages/snaps-execution-environments/lavamoat/webpack/node-process/policy.json new file mode 100644 index 0000000000..5feed35483 --- /dev/null +++ b/packages/snaps-execution-environments/lavamoat/webpack/node-process/policy.json @@ -0,0 +1,238 @@ +{ + "resources": { + "@metamask/json-rpc-engine": { + "packages": { + "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/rpc-errors": true, + "@metamask/utils": true + } + }, + "@metamask/object-multiplex": { + "globals": { + "console.warn": true + }, + "packages": { + "@metamask/object-multiplex>once": true, + "readable-stream": true + } + }, + "@metamask/object-multiplex>once": { + "packages": { + "@metamask/object-multiplex>once>wrappy": true + } + }, + "@metamask/post-message-stream": { + "builtin": { + "worker_threads.parentPort": true + }, + "globals": { + "MessageEvent.prototype": true, + "WorkerGlobalScope": true, + "addEventListener": true, + "browser": true, + "chrome": true, + "location.origin": true, + "postMessage": true, + "process.on": true, + "process.removeListener": true, + "process.send": true, + "removeEventListener": true + }, + "packages": { + "@metamask/post-message-stream>@metamask/utils": true, + "readable-stream": true + } + }, + "@metamask/post-message-stream>@metamask/utils": { + "globals": { + "Buffer": true, + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/superstruct": true, + "@metamask/utils>@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "@metamask/utils>pony-cause": true, + "depcheck>semver": true, + "tsup>debug": true + } + }, + "@metamask/providers": { + "globals": { + "console": true + }, + "packages": { + "@metamask/json-rpc-engine": true, + "@metamask/object-multiplex": true, + "@metamask/providers>@metamask/json-rpc-middleware-stream": true, + "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/providers>is-stream": true, + "@metamask/rpc-errors": true, + "eslint>fast-deep-equal": true, + "readable-stream": true + } + }, + "@metamask/providers>@metamask/json-rpc-middleware-stream": { + "globals": { + "console.warn": true, + "setTimeout": true + }, + "packages": { + "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/utils": true, + "readable-stream": true + } + }, + "@metamask/providers>@metamask/safe-event-emitter": { + "builtin": { + "events": true + }, + "globals": { + "setTimeout": true + } + }, + "@metamask/rpc-errors": { + "packages": { + "@metamask/rpc-errors>fast-safe-stringify": true, + "@metamask/utils": true + } + }, + "@metamask/snaps-sdk": { + "packages": { + "@metamask/superstruct": true, + "@metamask/utils": true + } + }, + "@metamask/snaps-utils": { + "globals": { + "URL": true, + "console.error": true, + "console.log": true, + "console.warn": true + }, + "packages": { + "@metamask/rpc-errors": true, + "@metamask/snaps-sdk": true, + "@metamask/superstruct": true, + "@metamask/utils": true + } + }, + "@metamask/utils": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/superstruct": true, + "@metamask/utils>@noble/hashes": true, + "@metamask/utils>pony-cause": true, + "depcheck>semver": true, + "tsup>debug": true + } + }, + "@metamask/utils>@noble/hashes": { + "builtin": { + "node:crypto": true + }, + "globals": { + "TextEncoder": true + } + }, + "@metamask/utils>@scure/base": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + } + }, + "@wdio/mocha-framework>mocha>supports-color": { + "builtin": { + "os.release": true, + "tty.isatty": true + }, + "globals": { + "process.env": true, + "process.platform": true + }, + "packages": { + "istanbul-lib-report>supports-color>has-flag": true + } + }, + "browserify>browser-pack>safe-buffer": { + "builtin": { + "buffer": true + } + }, + "browserify>inherits": { + "builtin": { + "util.inherits": true + } + }, + "browserify>string_decoder": { + "packages": { + "browserify>browser-pack>safe-buffer": true + } + }, + "depcheck>semver": { + "globals": { + "console.error": true, + "process": true + }, + "packages": { + "depcheck>semver>lru-cache": true + } + }, + "depcheck>semver>lru-cache": { + "packages": { + "depcheck>semver>lru-cache>yallist": true + } + }, + "istanbul-lib-report>supports-color>has-flag": { + "globals": { + "process.argv": true + } + }, + "readable-stream": { + "builtin": { + "buffer.Buffer": true, + "events.EventEmitter": true, + "stream": true, + "util": true + }, + "globals": { + "process.env.READABLE_STREAM": true, + "process.nextTick": true, + "process.stderr": true, + "process.stdout": true + }, + "packages": { + "browserify>inherits": true, + "browserify>string_decoder": true, + "readable-stream>util-deprecate": true + } + }, + "readable-stream>util-deprecate": { + "builtin": { + "util.deprecate": true + } + }, + "tsup>debug": { + "builtin": { + "tty.isatty": true, + "util.deprecate": true, + "util.format": true, + "util.inspect": true + }, + "globals": { + "console": true, + "document": true, + "localStorage": true, + "navigator": true, + "process": true + }, + "packages": { + "@wdio/mocha-framework>mocha>supports-color": true, + "tsup>debug>ms": true + } + } + } +} \ No newline at end of file diff --git a/packages/snaps-execution-environments/lavamoat/webpack/node-thread/policy.json b/packages/snaps-execution-environments/lavamoat/webpack/node-thread/policy.json new file mode 100644 index 0000000000..5feed35483 --- /dev/null +++ b/packages/snaps-execution-environments/lavamoat/webpack/node-thread/policy.json @@ -0,0 +1,238 @@ +{ + "resources": { + "@metamask/json-rpc-engine": { + "packages": { + "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/rpc-errors": true, + "@metamask/utils": true + } + }, + "@metamask/object-multiplex": { + "globals": { + "console.warn": true + }, + "packages": { + "@metamask/object-multiplex>once": true, + "readable-stream": true + } + }, + "@metamask/object-multiplex>once": { + "packages": { + "@metamask/object-multiplex>once>wrappy": true + } + }, + "@metamask/post-message-stream": { + "builtin": { + "worker_threads.parentPort": true + }, + "globals": { + "MessageEvent.prototype": true, + "WorkerGlobalScope": true, + "addEventListener": true, + "browser": true, + "chrome": true, + "location.origin": true, + "postMessage": true, + "process.on": true, + "process.removeListener": true, + "process.send": true, + "removeEventListener": true + }, + "packages": { + "@metamask/post-message-stream>@metamask/utils": true, + "readable-stream": true + } + }, + "@metamask/post-message-stream>@metamask/utils": { + "globals": { + "Buffer": true, + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/superstruct": true, + "@metamask/utils>@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "@metamask/utils>pony-cause": true, + "depcheck>semver": true, + "tsup>debug": true + } + }, + "@metamask/providers": { + "globals": { + "console": true + }, + "packages": { + "@metamask/json-rpc-engine": true, + "@metamask/object-multiplex": true, + "@metamask/providers>@metamask/json-rpc-middleware-stream": true, + "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/providers>is-stream": true, + "@metamask/rpc-errors": true, + "eslint>fast-deep-equal": true, + "readable-stream": true + } + }, + "@metamask/providers>@metamask/json-rpc-middleware-stream": { + "globals": { + "console.warn": true, + "setTimeout": true + }, + "packages": { + "@metamask/providers>@metamask/safe-event-emitter": true, + "@metamask/utils": true, + "readable-stream": true + } + }, + "@metamask/providers>@metamask/safe-event-emitter": { + "builtin": { + "events": true + }, + "globals": { + "setTimeout": true + } + }, + "@metamask/rpc-errors": { + "packages": { + "@metamask/rpc-errors>fast-safe-stringify": true, + "@metamask/utils": true + } + }, + "@metamask/snaps-sdk": { + "packages": { + "@metamask/superstruct": true, + "@metamask/utils": true + } + }, + "@metamask/snaps-utils": { + "globals": { + "URL": true, + "console.error": true, + "console.log": true, + "console.warn": true + }, + "packages": { + "@metamask/rpc-errors": true, + "@metamask/snaps-sdk": true, + "@metamask/superstruct": true, + "@metamask/utils": true + } + }, + "@metamask/utils": { + "globals": { + "TextEncoder": true + }, + "packages": { + "@metamask/superstruct": true, + "@metamask/utils>@noble/hashes": true, + "@metamask/utils>pony-cause": true, + "depcheck>semver": true, + "tsup>debug": true + } + }, + "@metamask/utils>@noble/hashes": { + "builtin": { + "node:crypto": true + }, + "globals": { + "TextEncoder": true + } + }, + "@metamask/utils>@scure/base": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + } + }, + "@wdio/mocha-framework>mocha>supports-color": { + "builtin": { + "os.release": true, + "tty.isatty": true + }, + "globals": { + "process.env": true, + "process.platform": true + }, + "packages": { + "istanbul-lib-report>supports-color>has-flag": true + } + }, + "browserify>browser-pack>safe-buffer": { + "builtin": { + "buffer": true + } + }, + "browserify>inherits": { + "builtin": { + "util.inherits": true + } + }, + "browserify>string_decoder": { + "packages": { + "browserify>browser-pack>safe-buffer": true + } + }, + "depcheck>semver": { + "globals": { + "console.error": true, + "process": true + }, + "packages": { + "depcheck>semver>lru-cache": true + } + }, + "depcheck>semver>lru-cache": { + "packages": { + "depcheck>semver>lru-cache>yallist": true + } + }, + "istanbul-lib-report>supports-color>has-flag": { + "globals": { + "process.argv": true + } + }, + "readable-stream": { + "builtin": { + "buffer.Buffer": true, + "events.EventEmitter": true, + "stream": true, + "util": true + }, + "globals": { + "process.env.READABLE_STREAM": true, + "process.nextTick": true, + "process.stderr": true, + "process.stdout": true + }, + "packages": { + "browserify>inherits": true, + "browserify>string_decoder": true, + "readable-stream>util-deprecate": true + } + }, + "readable-stream>util-deprecate": { + "builtin": { + "util.deprecate": true + } + }, + "tsup>debug": { + "builtin": { + "tty.isatty": true, + "util.deprecate": true, + "util.format": true, + "util.inspect": true + }, + "globals": { + "console": true, + "document": true, + "localStorage": true, + "navigator": true, + "process": true + }, + "packages": { + "@wdio/mocha-framework>mocha>supports-color": true, + "tsup>debug>ms": true + } + } + } +} \ No newline at end of file diff --git a/packages/snaps-execution-environments/package.json b/packages/snaps-execution-environments/package.json index 02e74703fc..82217692c4 100644 --- a/packages/snaps-execution-environments/package.json +++ b/packages/snaps-execution-environments/package.json @@ -73,7 +73,7 @@ "@lavamoat/allow-scripts": "^3.0.4", "@lavamoat/lavapack": "^6.1.1", "@lavamoat/lavatube": "^1.0.0", - "@lavamoat/webpack": "0.3.0-beta.0", + "@lavamoat/webpack": "^0.5.0-beta.0", "@metamask/auto-changelog": "^3.4.4", "@metamask/eslint-config": "^12.1.0", "@metamask/eslint-config-jest": "^12.1.0", diff --git a/packages/snaps-execution-environments/wdio.config.js b/packages/snaps-execution-environments/wdio.config.js index 00ad65ccf7..7cb97b16db 100644 --- a/packages/snaps-execution-environments/wdio.config.js +++ b/packages/snaps-execution-environments/wdio.config.js @@ -100,7 +100,7 @@ const config = { // The iframe execution service bundle. { mount: '/', - path: resolve(__dirname, './dist/browserify/iframe'), + path: resolve(__dirname, './dist/webpack/iframe'), }, // The web worker execution service bundle. diff --git a/packages/snaps-execution-environments/webpack.config.ts b/packages/snaps-execution-environments/webpack.config.ts index 29519e80a0..59ac29ca33 100644 --- a/packages/snaps-execution-environments/webpack.config.ts +++ b/packages/snaps-execution-environments/webpack.config.ts @@ -2,6 +2,7 @@ import LavaMoatPlugin from '@lavamoat/webpack'; import { readFileSync } from 'fs'; import HtmlWebpackPlugin from 'html-webpack-plugin'; +import { isBuiltin } from 'node:module'; import { resolve } from 'path'; import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'; import type { Configuration } from 'webpack'; @@ -22,7 +23,7 @@ const baseConfig: Configuration = { module: { rules: [ { - test: /\.ts$/u, + test: /\.tsx?$/u, use: { loader: 'swc-loader', options: { @@ -44,8 +45,13 @@ const baseConfig: Configuration = { ], }, resolve: { - extensions: ['.ts', '.js'], - plugins: [new TsconfigPathsPlugin()], + extensions: ['.ts', '.js', '.tsx'], + plugins: [ + new TsconfigPathsPlugin({ + configFile: resolve(__dirname, 'tsconfig.json'), + baseUrl: __dirname, + }), + ], fallback: { // eslint-disable-next-line @typescript-eslint/naming-convention child_process: false, @@ -55,14 +61,14 @@ const baseConfig: Configuration = { path: false, stream: require.resolve('stream-browserify'), tty: false, + zlib: false, + http: false, + https: false, // eslint-disable-next-line @typescript-eslint/naming-convention worker_threads: false, }, }, plugins: [ - new ProvidePlugin({ - process: 'process/browser', - }), new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false, @@ -76,10 +82,14 @@ const iframeConfig: Configuration = merge(baseConfig, { path: resolve(__dirname, 'dist/webpack/iframe'), }, plugins: [ + new ProvidePlugin({ + process: 'process/browser', + }), // You may randomly need @ts-expect-error here, depending how dependencies resolve. If semver is a smart idea, typescript for webpack config is not new LavaMoatPlugin({ // lockdown: {}, // override lockdown options here if you want generatePolicy: true, + policyLocation: resolve(__dirname, 'lavamoat/webpack/iframe'), diagnosticsVerbosity: 1, readableResourceIds: true, emitPolicySnapshot: true, // puts the result of merging policy with override that was used for the bundle alongside the bundle for human review @@ -93,5 +103,50 @@ const iframeConfig: Configuration = merge(baseConfig, { ], }); -const configs = [iframeConfig]; +const nodeThreadConfig: Configuration = merge(baseConfig, { + target: 'node', + entry: './src/node-thread/index.ts', + output: { + path: resolve(__dirname, 'dist/webpack/node-thread'), + }, + plugins: [ + // You may randomly need @ts-expect-error here, depending how dependencies resolve. If semver is a smart idea, typescript for webpack config is not + new LavaMoatPlugin({ + // lockdown: {}, // override lockdown options here if you want + generatePolicy: true, + policyLocation: resolve(__dirname, 'lavamoat/webpack/node-thread'), + isBuiltin, + inlineLockdown: ['bundle.js'], + diagnosticsVerbosity: 1, + readableResourceIds: true, + emitPolicySnapshot: true, // puts the result of merging policy with override that was used for the bundle alongside the bundle for human review + }), + ], + optimization: { + minimize: false, + }, +}); + +const nodeProcessConfig: Configuration = merge(baseConfig, { + target: 'node', + entry: './src/node-process/index.ts', + output: { + path: resolve(__dirname, 'dist/webpack/node-process'), + }, + plugins: [ + // You may randomly need @ts-expect-error here, depending how dependencies resolve. If semver is a smart idea, typescript for webpack config is not + new LavaMoatPlugin({ + // lockdown: {}, // override lockdown options here if you want + generatePolicy: true, + policyLocation: resolve(__dirname, 'lavamoat/webpack/node-process'), + isBuiltin, + inlineLockdown: ['bundle.js'], + diagnosticsVerbosity: 1, + readableResourceIds: true, + emitPolicySnapshot: true, // puts the result of merging policy with override that was used for the bundle alongside the bundle for human review + }), + ], +}); + +const configs = [iframeConfig, nodeThreadConfig, nodeProcessConfig]; export default configs; diff --git a/packages/snaps-utils/wdio.config.js b/packages/snaps-utils/wdio.config.js index 0d30f0031e..4722de7557 100644 --- a/packages/snaps-utils/wdio.config.js +++ b/packages/snaps-utils/wdio.config.js @@ -80,7 +80,7 @@ const config = { mount: '/', path: resolve( __dirname, - '../snaps-execution-environments/dist/browserify/iframe', + '../snaps-execution-environments/dist/webpack/iframe', ), }, ], diff --git a/yarn.lock b/yarn.lock index 2bd7ff6124..4e3cf48b08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -95,7 +95,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.24.6, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.24.6, @babel/generator@npm:^7.25.0, @babel/generator@npm:^7.7.2": version: 7.25.5 resolution: "@babel/generator@npm:7.25.5" dependencies: @@ -390,7 +390,18 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.15, @babel/parser@npm:^7.21.3, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.24.6, @babel/parser@npm:^7.25.0": +"@babel/parser@npm:7.25.3": + version: 7.25.3 + resolution: "@babel/parser@npm:7.25.3" + dependencies: + "@babel/types": ^7.25.2 + bin: + parser: ./bin/babel-parser.js + checksum: b55aba64214fa1d66ccd0d29f476d2e55a48586920d280f88c546f81cbbececc0e01c9d05a78d6bf206e8438b9c426caa344942c1a581eecc4d365beaab8a20e + languageName: node + linkType: hard + +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.15, @babel/parser@npm:^7.21.3, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.24.6, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": version: 7.25.4 resolution: "@babel/parser@npm:7.25.4" dependencies: @@ -1422,7 +1433,7 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.22.15, @babel/template@npm:^7.22.5, @babel/template@npm:^7.24.7, @babel/template@npm:^7.3.3": +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.22.5, @babel/template@npm:^7.24.7, @babel/template@npm:^7.25.0, @babel/template@npm:^7.3.3": version: 7.25.0 resolution: "@babel/template@npm:7.25.0" dependencies: @@ -1433,7 +1444,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:7.24.6, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.7.2": +"@babel/traverse@npm:7.24.6": version: 7.24.6 resolution: "@babel/traverse@npm:7.24.6" dependencies: @@ -1451,6 +1462,21 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:7.25.3, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.7.2": + version: 7.25.3 + resolution: "@babel/traverse@npm:7.25.3" + dependencies: + "@babel/code-frame": ^7.24.7 + "@babel/generator": ^7.25.0 + "@babel/parser": ^7.25.3 + "@babel/template": ^7.25.0 + "@babel/types": ^7.25.2 + debug: ^4.3.1 + globals: ^11.1.0 + checksum: 5661308b1357816f1d4e2813a5dd82c6053617acc08c5c95db051b8b6577d07c4446bc861c9a5e8bf294953ac8266ae13d7d9d856b6b889fc0d34c1f51abbd8c + languageName: node + linkType: hard + "@babel/types@npm:7.24.6": version: 7.24.6 resolution: "@babel/types@npm:7.24.6" @@ -1462,7 +1488,18 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.6, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.4, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": +"@babel/types@npm:7.25.2": + version: 7.25.2 + resolution: "@babel/types@npm:7.25.2" + dependencies: + "@babel/helper-string-parser": ^7.24.8 + "@babel/helper-validator-identifier": ^7.24.7 + to-fast-properties: ^2.0.0 + checksum: f73f66ba903c6f7e38f519a33d53a67d49c07e208e59ea65250362691dc546c6da7ab90ec66ee79651ef697329872f6f97eb19a6dfcacc026fd05e76a563c5d2 + languageName: node + linkType: hard + +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.6, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.4, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": version: 7.25.4 resolution: "@babel/types@npm:7.25.4" dependencies: @@ -2838,7 +2875,7 @@ __metadata: languageName: node linkType: hard -"@endo/env-options@npm:^1.1.2": +"@endo/env-options@npm:^1.1.4": version: 1.1.5 resolution: "@endo/env-options@npm:1.1.5" checksum: ce8869cf089025c8e4c28e58763ad12e03cd34384025beeaa5642a12e8645c31959221eaf7aabe7a84edc2bc7a909ddffa6343c2578901a67138dbb079f7a0ba @@ -3759,14 +3796,14 @@ __metadata: languageName: node linkType: hard -"@lavamoat/aa@npm:^4.1.0, @lavamoat/aa@npm:^4.2.0": - version: 4.2.0 - resolution: "@lavamoat/aa@npm:4.2.0" +"@lavamoat/aa@npm:^4.1.0, @lavamoat/aa@npm:^4.2.0, @lavamoat/aa@npm:^4.3.0": + version: 4.3.0 + resolution: "@lavamoat/aa@npm:4.3.0" dependencies: resolve: 1.22.8 bin: lavamoat-ls: src/cli.js - checksum: bfc21f7d3f3310c1faddbb08f69d5f4cb23b819f85aceccfa516d3e8abcc8bcd547cf5d0ecf44fe195b8d7e61cc0566ebc564e532f1250d70b57a9db18d9a983 + checksum: 41d83b512a88db71bbb3634febd5840614f1f39fa0b614499af2d6e9963180891b0350d8c38ce8d499142c9a6663711f983a3960f232f0d20f601c2a64912c30 languageName: node linkType: hard @@ -3826,18 +3863,18 @@ __metadata: languageName: node linkType: hard -"@lavamoat/webpack@npm:0.3.0-beta.0": - version: 0.3.0-beta.0 - resolution: "@lavamoat/webpack@npm:0.3.0-beta.0" +"@lavamoat/webpack@npm:^0.5.0-beta.0": + version: 0.5.0-beta.0 + resolution: "@lavamoat/webpack@npm:0.5.0-beta.0" dependencies: - "@lavamoat/aa": ^4.2.0 + "@lavamoat/aa": ^4.3.0 browser-resolve: 2.0.0 json-stable-stringify: 1.1.1 - lavamoat-core: ^15.3.0 - ses: 1.4.0 + lavamoat-core: ^16.0.0 + ses: 1.5.0 peerDependencies: webpack: ^5.80.2 - checksum: c0836b0a58d41227dc9123e5ea26d4efd65a6b0dd33569f65ce8505df24b3de19c65133eccf397efd6a7e5a2379527afd00b2416d1f22250312af6f8009a3c95 + checksum: 05ce53b6caee8076d4b0463d51ab166fe74314c60a103cca349fd0d22fa428f068e199f68eff36fc9a5817a1f79de373264cadf8ccae270ce48399ca244b3a2f languageName: node linkType: hard @@ -5704,7 +5741,7 @@ __metadata: "@lavamoat/allow-scripts": ^3.0.4 "@lavamoat/lavapack": ^6.1.1 "@lavamoat/lavatube": ^1.0.0 - "@lavamoat/webpack": 0.3.0-beta.0 + "@lavamoat/webpack": ^0.5.0-beta.0 "@metamask/auto-changelog": ^3.4.4 "@metamask/eslint-config": ^12.1.0 "@metamask/eslint-config-jest": ^12.1.0 @@ -16594,7 +16631,7 @@ __metadata: languageName: node linkType: hard -"lavamoat-core@npm:^15.2.0, lavamoat-core@npm:^15.3.0": +"lavamoat-core@npm:^15.2.0": version: 15.4.0 resolution: "lavamoat-core@npm:15.4.0" dependencies: @@ -16607,6 +16644,19 @@ __metadata: languageName: node linkType: hard +"lavamoat-core@npm:^16.0.0": + version: 16.0.0 + resolution: "lavamoat-core@npm:16.0.0" + dependencies: + "@babel/types": 7.25.2 + json-stable-stringify: 1.1.1 + lavamoat-tofu: ^8.0.0 + merge-deep: 3.0.3 + type-fest: 4.24.0 + checksum: 9ff48d843808f3af54fb6697a4d87b7815a38468dc8dd965314927116060251890b4e54b9c9f9c7d8367ef43a0e5c98a605e9dc8e5d62d035a30fa49a064e8c0 + languageName: node + linkType: hard + "lavamoat-tofu@npm:^7.2.1, lavamoat-tofu@npm:^7.3.0": version: 7.3.0 resolution: "lavamoat-tofu@npm:7.3.0" @@ -16622,6 +16672,21 @@ __metadata: languageName: node linkType: hard +"lavamoat-tofu@npm:^8.0.0": + version: 8.0.0 + resolution: "lavamoat-tofu@npm:8.0.0" + dependencies: + "@babel/parser": 7.25.3 + "@babel/traverse": 7.25.3 + "@babel/types": 7.25.2 + "@types/babel__traverse": 7.20.6 + type-fest: 4.24.0 + peerDependencies: + lavamoat-core: ">15.4.0" + checksum: b0204c96a2ad0b28d61b6d0538d670ede4e3fca2613384198d70163d2fa4927a563cbd68def7f2fc9faeea670739c664f4779954b0b2e459e881de3ea65ca5cb + languageName: node + linkType: hard + "lavamoat@npm:^8.0.4": version: 8.0.4 resolution: "lavamoat@npm:8.0.4" @@ -20704,12 +20769,12 @@ __metadata: languageName: node linkType: hard -"ses@npm:1.4.0, ses@npm:^1.1.0": - version: 1.4.0 - resolution: "ses@npm:1.4.0" +"ses@npm:1.5.0, ses@npm:^1.1.0": + version: 1.5.0 + resolution: "ses@npm:1.5.0" dependencies: - "@endo/env-options": ^1.1.2 - checksum: a0c9ac1a3b8ba9d20f2afbf8bf193c6ff08088e7ae429487c1eeeafc1ec14a58882f1ed3248aa17315c53fff78ba659157cd5bccedce91207aa7767d87a6ec53 + "@endo/env-options": ^1.1.4 + checksum: feaf07c285ab44645532fde8d679ba458fcb040512341d817c053c5b44c37d61f664c60a7b0fc8c1f0b999520888746010d89f718e1a154856ab93d1eea45b31 languageName: node linkType: hard @@ -22287,13 +22352,20 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:4.15.0, type-fest@npm:^4.2.0": +"type-fest@npm:4.15.0": version: 4.15.0 resolution: "type-fest@npm:4.15.0" checksum: 8da2b8c4556a6bbafd79c0d50b4f3ba6526942aead9c1687038980276eee72b95a1d195bc6f1408e0ebf96ebfbe9d33436b506b35ed4b68f14f8b3ff56753850 languageName: node linkType: hard +"type-fest@npm:4.24.0, type-fest@npm:^4.2.0": + version: 4.24.0 + resolution: "type-fest@npm:4.24.0" + checksum: f02e28bb12ce290f9880937b3c65d3cc4f0fdd89776b4b78d392aece0eb031c7ea9c1d6c536011c63bb8d0a6c72359336287f23f940204508a42a442c98c4d25 + languageName: node + linkType: hard + "type-fest@npm:^0.20.2": version: 0.20.2 resolution: "type-fest@npm:0.20.2"