@metamask/snaps-simulation 4.0.0 → 4.1.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/methods/hooks/get-snap.cjs +0 -1
- package/dist/methods/hooks/get-snap.cjs.map +1 -1
- package/dist/methods/hooks/get-snap.d.cts.map +1 -1
- package/dist/methods/hooks/get-snap.d.mts.map +1 -1
- package/dist/methods/hooks/get-snap.mjs +0 -1
- package/dist/methods/hooks/get-snap.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.1.0]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Remove `sourceCode` from `getSnap` implementation ([#3777](https://github.com/MetaMask/snaps/pull/3777))
|
|
15
|
+
|
|
10
16
|
## [4.0.0]
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -275,7 +281,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
275
281
|
|
|
276
282
|
- Initial release of `@metamask/snaps-simulation` package ([#2727](https://github.com/MetaMask/snaps/pull/2727))
|
|
277
283
|
|
|
278
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-simulation@4.
|
|
284
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-simulation@4.1.0...HEAD
|
|
285
|
+
[4.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-simulation@4.0.0...@metamask/snaps-simulation@4.1.0
|
|
279
286
|
[4.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-simulation@3.8.0...@metamask/snaps-simulation@4.0.0
|
|
280
287
|
[3.8.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-simulation@3.7.0...@metamask/snaps-simulation@3.8.0
|
|
281
288
|
[3.7.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-simulation@3.6.0...@metamask/snaps-simulation@3.7.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-snap.cjs","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAGnD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,eAAwB,IAAI;IACnE,OAAO,CAAC,OAAe,EAAQ,EAAE;QAC/B,0EAA0E;QAC1E,oDAAoD;QACpD,OAAO;YACL,EAAE,EAAE,gCAA0C;YAC9C,OAAO,EAAE,OAAwB;YACjC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,wBAAU,CAAC,OAAO;YAC1B,cAAc,EAAE,EAAE;YAClB,kBAAkB,EAAE,EAAE;YACtB,
|
|
1
|
+
{"version":3,"file":"get-snap.cjs","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":";;;AAEA,uDAAmD;AAGnD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,eAAwB,IAAI;IACnE,OAAO,CAAC,OAAe,EAAQ,EAAE;QAC/B,0EAA0E;QAC1E,oDAAoD;QACpD,OAAO;YACL,EAAE,EAAE,gCAA0C;YAC9C,OAAO,EAAE,OAAwB;YACjC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,wBAAU,CAAC,OAAO;YAC1B,cAAc,EAAE,EAAE;YAClB,kBAAkB,EAAE,EAAE;YACtB,QAAQ,EAAE;gBACR,OAAO,EAAE,OAAwB;gBACjC,YAAY,EAAE,WAAW;gBACzB,WAAW,EAAE,sCAAsC;gBACnD,UAAU,EAAE;oBACV,IAAI,EAAE,KAAK;oBACX,GAAG,EAAE,uCAAuC;iBAC7C;gBACD,MAAM,EAAE;oBACN,MAAM,EAAE,QAAQ;oBAChB,QAAQ,EAAE;wBACR,GAAG,EAAE;4BACH,QAAQ,EAAE,eAAe;4BACzB,WAAW,EAAE,4BAA4B;4BACzC,QAAQ,EAAE,4BAA4B;yBACvC;qBACF;iBACF;gBACD,kBAAkB,EAAE,EAAE;gBACtB,eAAe,EAAE,KAAK;aACvB;YACD,YAAY;SACb,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AApCD,4DAoCC","sourcesContent":["import type { SnapId } from '@metamask/snaps-sdk';\nimport type { Snap } from '@metamask/snaps-utils';\nimport { SnapStatus } from '@metamask/snaps-utils';\nimport type { SemVerVersion } from '@metamask/utils';\n\n/**\n * Get a method that gets a Snap by its ID.\n *\n * @param preinstalled - Whether the Snap is preinstalled. If `true`, the Snap\n * will be returned as a preinstalled Snap.\n * @returns A method that gets a Snap by its ID. It will always return a mock\n * Snap for simulation purposes.\n */\nexport function getGetSnapImplementation(preinstalled: boolean = true) {\n return (_snapId: string): Snap => {\n // This is a mock Snap for simulation purposes. Most of the fields are not\n // actually used, but returned for type-safety sake.\n return {\n id: 'npm:@metamask/snaps-simulation' as SnapId,\n version: '0.1.0' as SemVerVersion,\n enabled: true,\n blocked: false,\n status: SnapStatus.Running,\n versionHistory: [],\n initialPermissions: {},\n manifest: {\n version: '0.1.0' as SemVerVersion,\n proposedName: 'Test Snap',\n description: 'A test Snap for simulation purposes.',\n repository: {\n type: 'git',\n url: 'https://github.com/MetaMask/snaps.git',\n },\n source: {\n shasum: 'unused',\n location: {\n npm: {\n filePath: 'dist/index.js',\n packageName: '@metamask/snaps-simulation',\n registry: 'https://registry.npmjs.org',\n },\n },\n },\n initialPermissions: {},\n manifestVersion: '0.1',\n },\n preinstalled,\n };\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-snap.d.cts","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,8BAA8B;AAIlD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,GAAE,OAAc,aAClD,MAAM,KAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get-snap.d.cts","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,8BAA8B;AAIlD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,GAAE,OAAc,aAClD,MAAM,KAAG,IAAI,CAmC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-snap.d.mts","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,8BAA8B;AAIlD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,GAAE,OAAc,aAClD,MAAM,KAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get-snap.d.mts","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,8BAA8B;AAIlD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,GAAE,OAAc,aAClD,MAAM,KAAG,IAAI,CAmC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-snap.mjs","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,8BAA8B;AAGnD;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,eAAwB,IAAI;IACnE,OAAO,CAAC,OAAe,EAAQ,EAAE;QAC/B,0EAA0E;QAC1E,oDAAoD;QACpD,OAAO;YACL,EAAE,EAAE,gCAA0C;YAC9C,OAAO,EAAE,OAAwB;YACjC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,UAAU,CAAC,OAAO;YAC1B,cAAc,EAAE,EAAE;YAClB,kBAAkB,EAAE,EAAE;YACtB,
|
|
1
|
+
{"version":3,"file":"get-snap.mjs","sourceRoot":"","sources":["../../../src/methods/hooks/get-snap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,8BAA8B;AAGnD;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,eAAwB,IAAI;IACnE,OAAO,CAAC,OAAe,EAAQ,EAAE;QAC/B,0EAA0E;QAC1E,oDAAoD;QACpD,OAAO;YACL,EAAE,EAAE,gCAA0C;YAC9C,OAAO,EAAE,OAAwB;YACjC,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,UAAU,CAAC,OAAO;YAC1B,cAAc,EAAE,EAAE;YAClB,kBAAkB,EAAE,EAAE;YACtB,QAAQ,EAAE;gBACR,OAAO,EAAE,OAAwB;gBACjC,YAAY,EAAE,WAAW;gBACzB,WAAW,EAAE,sCAAsC;gBACnD,UAAU,EAAE;oBACV,IAAI,EAAE,KAAK;oBACX,GAAG,EAAE,uCAAuC;iBAC7C;gBACD,MAAM,EAAE;oBACN,MAAM,EAAE,QAAQ;oBAChB,QAAQ,EAAE;wBACR,GAAG,EAAE;4BACH,QAAQ,EAAE,eAAe;4BACzB,WAAW,EAAE,4BAA4B;4BACzC,QAAQ,EAAE,4BAA4B;yBACvC;qBACF;iBACF;gBACD,kBAAkB,EAAE,EAAE;gBACtB,eAAe,EAAE,KAAK;aACvB;YACD,YAAY;SACb,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type { SnapId } from '@metamask/snaps-sdk';\nimport type { Snap } from '@metamask/snaps-utils';\nimport { SnapStatus } from '@metamask/snaps-utils';\nimport type { SemVerVersion } from '@metamask/utils';\n\n/**\n * Get a method that gets a Snap by its ID.\n *\n * @param preinstalled - Whether the Snap is preinstalled. If `true`, the Snap\n * will be returned as a preinstalled Snap.\n * @returns A method that gets a Snap by its ID. It will always return a mock\n * Snap for simulation purposes.\n */\nexport function getGetSnapImplementation(preinstalled: boolean = true) {\n return (_snapId: string): Snap => {\n // This is a mock Snap for simulation purposes. Most of the fields are not\n // actually used, but returned for type-safety sake.\n return {\n id: 'npm:@metamask/snaps-simulation' as SnapId,\n version: '0.1.0' as SemVerVersion,\n enabled: true,\n blocked: false,\n status: SnapStatus.Running,\n versionHistory: [],\n initialPermissions: {},\n manifest: {\n version: '0.1.0' as SemVerVersion,\n proposedName: 'Test Snap',\n description: 'A test Snap for simulation purposes.',\n repository: {\n type: 'git',\n url: 'https://github.com/MetaMask/snaps.git',\n },\n source: {\n shasum: 'unused',\n location: {\n npm: {\n filePath: 'dist/index.js',\n packageName: '@metamask/snaps-simulation',\n registry: 'https://registry.npmjs.org',\n },\n },\n },\n initialPermissions: {},\n manifestVersion: '0.1',\n },\n preinstalled,\n };\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/snaps-simulation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"@metamask/permission-controller": "^12.2.0",
|
|
64
64
|
"@metamask/phishing-controller": "^16.1.0",
|
|
65
65
|
"@metamask/rpc-errors": "^7.0.3",
|
|
66
|
-
"@metamask/snaps-controllers": "^
|
|
67
|
-
"@metamask/snaps-execution-environments": "^
|
|
68
|
-
"@metamask/snaps-rpc-methods": "^14.
|
|
66
|
+
"@metamask/snaps-controllers": "^18.0.0",
|
|
67
|
+
"@metamask/snaps-execution-environments": "^11.0.0",
|
|
68
|
+
"@metamask/snaps-rpc-methods": "^14.3.0",
|
|
69
69
|
"@metamask/snaps-sdk": "^10.4.0",
|
|
70
|
-
"@metamask/snaps-utils": "^12.
|
|
70
|
+
"@metamask/snaps-utils": "^12.1.0",
|
|
71
71
|
"@metamask/superstruct": "^3.2.1",
|
|
72
72
|
"@metamask/utils": "^11.9.0",
|
|
73
73
|
"@reduxjs/toolkit": "^1.9.5",
|