@account-kit/plugingen 4.81.3 → 4.82.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.
@@ -4,11 +4,17 @@ export const MetaGenPhase = async (input) => {
4
4
  const { name, version } = await contract.read.pluginMetadata();
5
5
  content.push(dedent `
6
6
  meta: {
7
- name: "${name}",
8
- version: "${version}",
7
+ name: ${toTsString(name)},
8
+ version: ${toTsString(version)},
9
9
  addresses,
10
10
  }
11
11
  `);
12
12
  return input;
13
13
  };
14
+ function toTsString(v) {
15
+ return (JSON.stringify(v)
16
+ // These two are valid in JSON but can behave badly in JS source in some contexts (e.g. in template strings)
17
+ .replace(/\u2028/g, "\\u2028")
18
+ .replace(/\u2029/g, "\\u2029"));
19
+ }
14
20
  //# sourceMappingURL=meta-gen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta-gen.js","sourceRoot":"","sources":["../../../../../../src/commands/generate/phases/plugin-generator/meta-gen.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,MAAM,CAAC,MAAM,YAAY,GAAU,KAAK,EAAE,KAAK,EAAE,EAAE;IACjD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IAE/D,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;;iBAEJ,IAAI;oBACD,OAAO;;;GAGxB,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import dedent from \"dedent\";\nimport type { Phase } from \"../../types\";\n\nexport const MetaGenPhase: Phase = async (input) => {\n const { contract, content } = input;\n const { name, version } = await contract.read.pluginMetadata();\n\n content.push(dedent`\n meta: {\n name: \"${name}\",\n version: \"${version}\",\n addresses,\n }\n `);\n\n return input;\n};\n"]}
1
+ {"version":3,"file":"meta-gen.js","sourceRoot":"","sources":["../../../../../../src/commands/generate/phases/plugin-generator/meta-gen.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,MAAM,CAAC,MAAM,YAAY,GAAU,KAAK,EAAE,KAAK,EAAE,EAAE;IACjD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IAE/D,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;;gBAEL,UAAU,CAAC,IAAI,CAAC;mBACb,UAAU,CAAC,OAAO,CAAC;;;GAGnC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CACL,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QACf,4GAA4G;SAC3G,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;SAC7B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CACjC,CAAC;AACJ,CAAC","sourcesContent":["import dedent from \"dedent\";\nimport type { Phase } from \"../../types\";\n\nexport const MetaGenPhase: Phase = async (input) => {\n const { contract, content } = input;\n const { name, version } = await contract.read.pluginMetadata();\n\n content.push(dedent`\n meta: {\n name: ${toTsString(name)},\n version: ${toTsString(version)},\n addresses,\n }\n `);\n\n return input;\n};\n\nfunction toTsString(v: string) {\n return (\n JSON.stringify(v)\n // These two are valid in JSON but can behave badly in JS source in some contexts (e.g. in template strings)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\")\n );\n}\n"]}
@@ -1 +1 @@
1
- export declare const VERSION = "4.81.3";
1
+ export declare const VERSION = "4.82.0";
@@ -1,4 +1,4 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.81.3";
3
+ export const VERSION = "4.82.0";
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.81.3\";\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.82.0\";\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.81.3";
1
+ export declare const VERSION = "4.82.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@account-kit/plugingen",
3
- "version": "4.81.3",
3
+ "version": "4.82.0",
4
4
  "description": "A CLI tool that enables you to generate TS code for your ERC-6900 plugins",
5
5
  "author": "Alchemy",
6
6
  "license": "MIT",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
61
61
  "dependencies": {
62
- "@aa-sdk/core": "^4.81.3",
62
+ "@aa-sdk/core": "^4.82.0",
63
63
  "bundle-require": "^4.0.2",
64
64
  "cac": "^6.7.14",
65
65
  "change-case": "^5.4.3",
@@ -77,5 +77,5 @@
77
77
  "peerDependencies": {
78
78
  "viem": "^2.29.2"
79
79
  },
80
- "gitHead": "128999e21413325413334b54eb1c9a2e449f331a"
80
+ "gitHead": "b5a8ad1fca0353f892833cbe20e5d6a64a96b96e"
81
81
  }
@@ -7,11 +7,20 @@ export const MetaGenPhase: Phase = async (input) => {
7
7
 
8
8
  content.push(dedent`
9
9
  meta: {
10
- name: "${name}",
11
- version: "${version}",
10
+ name: ${toTsString(name)},
11
+ version: ${toTsString(version)},
12
12
  addresses,
13
13
  }
14
14
  `);
15
15
 
16
16
  return input;
17
17
  };
18
+
19
+ function toTsString(v: string) {
20
+ return (
21
+ JSON.stringify(v)
22
+ // These two are valid in JSON but can behave badly in JS source in some contexts (e.g. in template strings)
23
+ .replace(/\u2028/g, "\\u2028")
24
+ .replace(/\u2029/g, "\\u2029")
25
+ );
26
+ }
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.81.3";
3
+ export const VERSION = "4.82.0";