@metamask/snaps-execution-environments 3.4.2 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/dist/browserify/iframe/bundle.js +5 -5
  3. package/dist/browserify/iframe/index.html +1134 -389
  4. package/dist/browserify/node-process/bundle.js +1135 -392
  5. package/dist/browserify/node-thread/bundle.js +1135 -392
  6. package/dist/browserify/offscreen/bundle.js +5 -5
  7. package/dist/browserify/offscreen/index.html +1134 -389
  8. package/dist/browserify/worker-executor/bundle.js +1136 -393
  9. package/dist/browserify/worker-pool/bundle.js +5 -5
  10. package/dist/browserify/worker-pool/index.html +1134 -389
  11. package/dist/cjs/common/commands.js +9 -0
  12. package/dist/cjs/common/commands.js.map +1 -1
  13. package/dist/cjs/common/validation.js +13 -0
  14. package/dist/cjs/common/validation.js.map +1 -1
  15. package/dist/cjs/offscreen/index.js +2 -2
  16. package/dist/cjs/offscreen/index.js.map +1 -1
  17. package/dist/cjs/{offscreen/OffscreenSnapExecutor.js → proxy/ProxySnapExecutor.js} +25 -15
  18. package/dist/cjs/proxy/ProxySnapExecutor.js.map +1 -0
  19. package/dist/esm/common/commands.js +10 -1
  20. package/dist/esm/common/commands.js.map +1 -1
  21. package/dist/esm/common/validation.js +14 -0
  22. package/dist/esm/common/validation.js.map +1 -1
  23. package/dist/esm/offscreen/index.js +2 -2
  24. package/dist/esm/offscreen/index.js.map +1 -1
  25. package/dist/esm/{offscreen/OffscreenSnapExecutor.js → proxy/ProxySnapExecutor.js} +24 -19
  26. package/dist/esm/proxy/ProxySnapExecutor.js.map +1 -0
  27. package/dist/types/common/validation.d.ts +17 -0
  28. package/dist/types/{offscreen/OffscreenSnapExecutor.d.ts → proxy/ProxySnapExecutor.d.ts} +9 -9
  29. package/package.json +12 -12
  30. package/dist/cjs/offscreen/OffscreenSnapExecutor.js.map +0 -1
  31. package/dist/esm/offscreen/OffscreenSnapExecutor.js.map +0 -1
@@ -6,20 +6,19 @@ declare type ExecutorJob = {
6
6
  stream: WindowPostMessageStream;
7
7
  };
8
8
  /**
9
- * A snap executor using the Offscreen Documents API.
9
+ * A "proxy" snap executor that uses a level of indirection to execute snaps.
10
+ *
11
+ * Useful for multiple execution environments.
10
12
  *
11
13
  * This is not a traditional snap executor, as it does not execute snaps itself.
12
14
  * Instead, it creates an iframe window for each snap execution, and sends the
13
15
  * snap execution request to the iframe window. The iframe window is responsible
14
16
  * for executing the snap.
15
17
  *
16
- * Extensions can only have a single offscreen document, so this executor is
17
- * persisted between snap executions. The offscreen snap executor essentially
18
- * acts as a proxy between the extension and the iframe execution environment.
19
- *
20
- * @see https://developer.chrome.com/docs/extensions/reference/offscreen/
18
+ * This executor is persisted between snap executions. The executor essentially
19
+ * acts as a proxy between the client and the iframe execution environment.
21
20
  */
22
- export declare class OffscreenSnapExecutor {
21
+ export declare class ProxySnapExecutor {
23
22
  #private;
24
23
  readonly jobs: Record<string, ExecutorJob>;
25
24
  /**
@@ -27,9 +26,10 @@ export declare class OffscreenSnapExecutor {
27
26
  * constructor.
28
27
  *
29
28
  * @param stream - The stream to use for communication.
29
+ * @param frameUrl - An optional URL for the iframe to use.
30
30
  * @returns The initialized executor.
31
31
  */
32
- static initialize(stream: BasePostMessageStream): OffscreenSnapExecutor;
33
- constructor(stream: BasePostMessageStream);
32
+ static initialize(stream: BasePostMessageStream, frameUrl?: string): ProxySnapExecutor;
33
+ constructor(stream: BasePostMessageStream, frameUrl: string);
34
34
  }
35
35
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/snaps-execution-environments",
3
- "version": "3.4.2",
3
+ "version": "3.5.0",
4
4
  "description": "Snap sandbox environments for executing SES javascript",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,14 +44,14 @@
44
44
  "lint:dependencies": "depcheck"
45
45
  },
46
46
  "dependencies": {
47
- "@metamask/json-rpc-engine": "^7.3.0",
47
+ "@metamask/json-rpc-engine": "^7.3.1",
48
48
  "@metamask/object-multiplex": "^2.0.0",
49
49
  "@metamask/post-message-stream": "^7.0.0",
50
50
  "@metamask/providers": "^14.0.2",
51
51
  "@metamask/rpc-errors": "^6.1.0",
52
- "@metamask/snaps-sdk": "^1.3.0",
53
- "@metamask/snaps-utils": "^5.0.1",
54
- "@metamask/utils": "^8.2.1",
52
+ "@metamask/snaps-sdk": "^1.4.0",
53
+ "@metamask/snaps-utils": "^5.2.0",
54
+ "@metamask/utils": "^8.3.0",
55
55
  "nanoid": "^3.1.31",
56
56
  "readable-stream": "^3.6.2",
57
57
  "superstruct": "^1.0.3"
@@ -62,10 +62,10 @@
62
62
  "@babel/preset-typescript": "^7.23.2",
63
63
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
64
64
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
65
- "@lavamoat/allow-scripts": "^2.5.1",
66
- "@lavamoat/lavapack": "^5.4.1",
67
- "@lavamoat/lavatube": "^0.2.3",
68
- "@metamask/auto-changelog": "^3.4.3",
65
+ "@lavamoat/allow-scripts": "^3.0.0",
66
+ "@lavamoat/lavapack": "^6.0.2",
67
+ "@lavamoat/lavatube": "^1.0.0",
68
+ "@metamask/auto-changelog": "^3.4.4",
69
69
  "@metamask/eslint-config": "^12.1.0",
70
70
  "@metamask/eslint-config-jest": "^12.1.0",
71
71
  "@metamask/eslint-config-nodejs": "^12.1.0",
@@ -105,13 +105,13 @@
105
105
  "jest": "^29.0.2",
106
106
  "jest-environment-node": "^29.5.0",
107
107
  "jest-fetch-mock": "^3.0.3",
108
- "lavamoat": "^7.3.1",
109
- "lavamoat-browserify": "^15.9.1",
108
+ "lavamoat": "^8.0.2",
109
+ "lavamoat-browserify": "^17.0.2",
110
110
  "prettier": "^2.7.1",
111
111
  "prettier-plugin-packagejson": "^2.2.11",
112
112
  "rimraf": "^4.1.2",
113
113
  "serve-handler": "^6.1.5",
114
- "ses": "^0.18.8",
114
+ "ses": "^1.1.0",
115
115
  "terser": "^5.17.7",
116
116
  "ts-node": "^10.9.1",
117
117
  "typescript": "~4.8.4",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/offscreen/OffscreenSnapExecutor.ts"],"sourcesContent":["import type { BasePostMessageStream } from '@metamask/post-message-stream';\nimport { WindowPostMessageStream } from '@metamask/post-message-stream';\nimport { createWindow, logError } from '@metamask/snaps-utils';\nimport type { JsonRpcRequest } from '@metamask/utils';\nimport { assert } from '@metamask/utils';\n\ntype ExecutorJob = {\n id: string;\n window: Window;\n stream: WindowPostMessageStream;\n};\n\n/**\n * A snap executor using the Offscreen Documents API.\n *\n * This is not a traditional snap executor, as it does not execute snaps itself.\n * Instead, it creates an iframe window for each snap execution, and sends the\n * snap execution request to the iframe window. The iframe window is responsible\n * for executing the snap.\n *\n * Extensions can only have a single offscreen document, so this executor is\n * persisted between snap executions. The offscreen snap executor essentially\n * acts as a proxy between the extension and the iframe execution environment.\n *\n * @see https://developer.chrome.com/docs/extensions/reference/offscreen/\n */\nexport class OffscreenSnapExecutor {\n readonly #stream: BasePostMessageStream;\n\n readonly jobs: Record<string, ExecutorJob> = {};\n\n /**\n * Initialize the executor with the given stream. This is a wrapper around the\n * constructor.\n *\n * @param stream - The stream to use for communication.\n * @returns The initialized executor.\n */\n static initialize(stream: BasePostMessageStream) {\n return new OffscreenSnapExecutor(stream);\n }\n\n constructor(stream: BasePostMessageStream) {\n this.#stream = stream;\n this.#stream.on('data', this.#onData.bind(this));\n }\n\n /**\n * Handle an incoming message from the `OffscreenExecutionService`. This\n * assumes that the message contains a `jobId` property, and a JSON-RPC\n * request in the `data` property.\n *\n * @param data - The message data.\n * @param data.data - The JSON-RPC request.\n * @param data.jobId - The job ID.\n * @param data.extra - Extra data.\n * @param data.extra.frameUrl - The URL to load in the iframe.\n */\n #onData(data: {\n data: JsonRpcRequest;\n jobId: string;\n extra: { frameUrl: string };\n }) {\n const {\n jobId,\n extra: { frameUrl },\n data: request,\n } = data;\n\n if (!this.jobs[jobId]) {\n // This ensures that a job is initialized before it is used. To avoid\n // code duplication, we call the `#onData` method again, which will\n // run the rest of the logic after initialization.\n this.#initializeJob(jobId, frameUrl)\n .then(() => {\n this.#onData(data);\n })\n .catch((error) => {\n logError('[Worker] Error initializing job:', error);\n });\n\n return;\n }\n\n // This is a method specific to the `OffscreenSnapExecutor`, as the service\n // itself does not have access to the iframes directly.\n if (request.method === 'terminateJob') {\n this.#terminateJob(jobId);\n return;\n }\n\n this.jobs[jobId].stream.write(request);\n }\n\n /**\n * Create a new iframe and set up a stream to communicate with it.\n *\n * @param jobId - The job ID.\n * @param frameUrl - The URL to load in the iframe.\n */\n async #initializeJob(jobId: string, frameUrl: string): Promise<ExecutorJob> {\n const window = await createWindow(frameUrl, jobId);\n const jobStream = new WindowPostMessageStream({\n name: 'parent',\n target: 'child',\n targetWindow: window,\n targetOrigin: '*',\n });\n\n // Write messages from the iframe to the parent, wrapped with the job ID.\n jobStream.on('data', (data) => {\n this.#stream.write({ data, jobId });\n });\n\n this.jobs[jobId] = { id: jobId, window, stream: jobStream };\n return this.jobs[jobId];\n }\n\n /**\n * Terminate the job with the given ID. This will close the iframe and delete\n * the job from the internal job map.\n *\n * @param jobId - The job ID.\n */\n #terminateJob(jobId: string) {\n assert(this.jobs[jobId], `Job \"${jobId}\" not found.`);\n\n const iframe = document.getElementById(jobId);\n assert(iframe, `Iframe with ID \"${jobId}\" not found.`);\n\n iframe.remove();\n this.jobs[jobId].stream.destroy();\n delete this.jobs[jobId];\n }\n}\n"],"names":["OffscreenSnapExecutor","initialize","stream","constructor","jobs","on","onData","bind","data","jobId","extra","frameUrl","request","initializeJob","then","catch","error","logError","method","terminateJob","write","window","createWindow","jobStream","WindowPostMessageStream","name","target","targetWindow","targetOrigin","id","assert","iframe","document","getElementById","remove","destroy"],"mappings":";;;;+BA0BaA;;;eAAAA;;;mCAzB2B;4BACD;uBAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAMc,YAAY,IAAIC,0CAAuB,CAAC;QAC5CC,MAAM;QACNC,QAAQ;QACRC,cAAcN;QACdO,cAAc;IAChB;IAEA,yEAAyE;IACzEL,UAAUlB,EAAE,CAAC,QAAQ,CAACG;QACpB,yBAAA,IAAI,EAAEN,SAAOkB,KAAK,CAAC;YAAEZ;YAAMC;QAAM;IACnC;IAEA,IAAI,CAACL,IAAI,CAACK,MAAM,GAAG;QAAEoB,IAAIpB;QAAOY;QAAQnB,QAAQqB;IAAU;IAC1D,OAAO,IAAI,CAACnB,IAAI,CAACK,MAAM;AACzB;AAQA,SAAA,aAAcA,KAAa;IACzBqB,IAAAA,aAAM,EAAC,IAAI,CAAC1B,IAAI,CAACK,MAAM,EAAE,CAAC,KAAK,EAAEA,MAAM,YAAY,CAAC;IAEpD,MAAMsB,SAASC,SAASC,cAAc,CAACxB;IACvCqB,IAAAA,aAAM,EAACC,QAAQ,CAAC,gBAAgB,EAAEtB,MAAM,YAAY,CAAC;IAErDsB,OAAOG,MAAM;IACb,IAAI,CAAC9B,IAAI,CAACK,MAAM,CAACP,MAAM,CAACiC,OAAO;IAC/B,OAAO,IAAI,CAAC/B,IAAI,CAACK,MAAM;AACzB"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/offscreen/OffscreenSnapExecutor.ts"],"sourcesContent":["import type { BasePostMessageStream } from '@metamask/post-message-stream';\nimport { WindowPostMessageStream } from '@metamask/post-message-stream';\nimport { createWindow, logError } from '@metamask/snaps-utils';\nimport type { JsonRpcRequest } from '@metamask/utils';\nimport { assert } from '@metamask/utils';\n\ntype ExecutorJob = {\n id: string;\n window: Window;\n stream: WindowPostMessageStream;\n};\n\n/**\n * A snap executor using the Offscreen Documents API.\n *\n * This is not a traditional snap executor, as it does not execute snaps itself.\n * Instead, it creates an iframe window for each snap execution, and sends the\n * snap execution request to the iframe window. The iframe window is responsible\n * for executing the snap.\n *\n * Extensions can only have a single offscreen document, so this executor is\n * persisted between snap executions. The offscreen snap executor essentially\n * acts as a proxy between the extension and the iframe execution environment.\n *\n * @see https://developer.chrome.com/docs/extensions/reference/offscreen/\n */\nexport class OffscreenSnapExecutor {\n readonly #stream: BasePostMessageStream;\n\n readonly jobs: Record<string, ExecutorJob> = {};\n\n /**\n * Initialize the executor with the given stream. This is a wrapper around the\n * constructor.\n *\n * @param stream - The stream to use for communication.\n * @returns The initialized executor.\n */\n static initialize(stream: BasePostMessageStream) {\n return new OffscreenSnapExecutor(stream);\n }\n\n constructor(stream: BasePostMessageStream) {\n this.#stream = stream;\n this.#stream.on('data', this.#onData.bind(this));\n }\n\n /**\n * Handle an incoming message from the `OffscreenExecutionService`. This\n * assumes that the message contains a `jobId` property, and a JSON-RPC\n * request in the `data` property.\n *\n * @param data - The message data.\n * @param data.data - The JSON-RPC request.\n * @param data.jobId - The job ID.\n * @param data.extra - Extra data.\n * @param data.extra.frameUrl - The URL to load in the iframe.\n */\n #onData(data: {\n data: JsonRpcRequest;\n jobId: string;\n extra: { frameUrl: string };\n }) {\n const {\n jobId,\n extra: { frameUrl },\n data: request,\n } = data;\n\n if (!this.jobs[jobId]) {\n // This ensures that a job is initialized before it is used. To avoid\n // code duplication, we call the `#onData` method again, which will\n // run the rest of the logic after initialization.\n this.#initializeJob(jobId, frameUrl)\n .then(() => {\n this.#onData(data);\n })\n .catch((error) => {\n logError('[Worker] Error initializing job:', error);\n });\n\n return;\n }\n\n // This is a method specific to the `OffscreenSnapExecutor`, as the service\n // itself does not have access to the iframes directly.\n if (request.method === 'terminateJob') {\n this.#terminateJob(jobId);\n return;\n }\n\n this.jobs[jobId].stream.write(request);\n }\n\n /**\n * Create a new iframe and set up a stream to communicate with it.\n *\n * @param jobId - The job ID.\n * @param frameUrl - The URL to load in the iframe.\n */\n async #initializeJob(jobId: string, frameUrl: string): Promise<ExecutorJob> {\n const window = await createWindow(frameUrl, jobId);\n const jobStream = new WindowPostMessageStream({\n name: 'parent',\n target: 'child',\n targetWindow: window,\n targetOrigin: '*',\n });\n\n // Write messages from the iframe to the parent, wrapped with the job ID.\n jobStream.on('data', (data) => {\n this.#stream.write({ data, jobId });\n });\n\n this.jobs[jobId] = { id: jobId, window, stream: jobStream };\n return this.jobs[jobId];\n }\n\n /**\n * Terminate the job with the given ID. This will close the iframe and delete\n * the job from the internal job map.\n *\n * @param jobId - The job ID.\n */\n #terminateJob(jobId: string) {\n assert(this.jobs[jobId], `Job \"${jobId}\" not found.`);\n\n const iframe = document.getElementById(jobId);\n assert(iframe, `Iframe with ID \"${jobId}\" not found.`);\n\n iframe.remove();\n this.jobs[jobId].stream.destroy();\n delete this.jobs[jobId];\n }\n}\n"],"names":["WindowPostMessageStream","createWindow","logError","assert","OffscreenSnapExecutor","initialize","stream","constructor","jobs","on","onData","bind","data","jobId","extra","frameUrl","request","initializeJob","then","catch","error","method","terminateJob","write","window","jobStream","name","target","targetWindow","targetOrigin","id","iframe","document","getElementById","remove","destroy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAASA,uBAAuB,QAAQ,gCAAgC;AACxE,SAASC,YAAY,EAAEC,QAAQ,QAAQ,wBAAwB;AAE/D,SAASC,MAAM,QAAQ,kBAAkB;IAuB9B,uCAoBT;;;;;;;;;;GAUC,GACD,uCA0CM,8CAkBN;;;;;GAKC,GACD;AAhHF;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMC;IAKX;;;;;;GAMC,GACD,OAAOC,WAAWC,MAA6B,EAAE;QAC/C,OAAO,IAAIF,sBAAsBE;IACnC;IAEAC,YAAYD,MAA6B,CAAE;QAgB3C,iCAAA;QAoCA;;;;;GAKC,GACD,iCAAM;QAwBN,iCAAA;QAjGA,gCAAS;;mBAAT,KAAA;;QAEA,uBAASE,QAAoC,CAAC;uCActCF,SAASA;QACf,yBAAA,IAAI,EAAEA,SAAOG,EAAE,CAAC,QAAQ,0BAAA,IAAI,EAAEC,SAAAA,QAAOC,IAAI,CAAC,IAAI;I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