@latticexyz/cli 2.0.8-not-npmignore-cache-2d3a1a18 → 2.0.8-not-npmignore-cache-17f3bce8

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/dist/mud.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import*as i from"dotenv";i.config();async function l(){let{default:r}=await import("yargs"),{default:o}=await import("chalk"),{hideBin:e}=await import("yargs/helpers"),{logError:s}=await import("./errors-MZURIB7V.js"),{commands:t}=await import("./commands-L6ZRKSMG.js");r(e(process.argv)).scriptName("mud").command(t).strict().fail((a,n)=>{console.error(o.red(a)),a.includes("Missing required argument")&&console.log(o.yellow(`Run 'pnpm mud ${process.argv[2]} --help' for a list of available and required arguments.`)),console.log(""),n!=null&&(s(n),console.log("")),process.exit(1)}).alias({h:"help"}).argv}l();
2
+ import*as i from"dotenv";i.config();async function l(){let{default:r}=await import("yargs"),{default:o}=await import("chalk"),{hideBin:e}=await import("yargs/helpers"),{logError:s}=await import("./errors-MZURIB7V.js"),{commands:t}=await import("./commands-PYQLPHGU.js");r(e(process.argv)).scriptName("mud").command(t).strict().fail((a,n)=>{console.error(o.red(a)),a.includes("Missing required argument")&&console.log(o.yellow(`Run 'pnpm mud ${process.argv[2]} --help' for a list of available and required arguments.`)),console.log(""),n!=null&&(s(n),console.log("")),process.exit(1)}).alias({h:"help"}).argv}l();
3
3
  //# sourceMappingURL=mud.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/cli",
3
- "version": "2.0.8-not-npmignore-cache-2d3a1a18",
3
+ "version": "2.0.8-not-npmignore-cache-17f3bce8",
4
4
  "description": "Command line interface for mud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,17 +44,17 @@
44
44
  "yargs": "^17.7.1",
45
45
  "zod": "^3.21.4",
46
46
  "zod-validation-error": "^1.3.0",
47
- "@latticexyz/abi-ts": "2.0.8-not-npmignore-cache-2d3a1a18",
48
- "@latticexyz/common": "2.0.8-not-npmignore-cache-2d3a1a18",
49
- "@latticexyz/config": "2.0.8-not-npmignore-cache-2d3a1a18",
50
- "@latticexyz/gas-report": "2.0.8-not-npmignore-cache-2d3a1a18",
51
- "@latticexyz/protocol-parser": "2.0.8-not-npmignore-cache-2d3a1a18",
52
- "@latticexyz/schema-type": "2.0.8-not-npmignore-cache-2d3a1a18",
53
- "@latticexyz/services": "2.0.8-not-npmignore-cache-2d3a1a18",
54
- "@latticexyz/store": "2.0.8-not-npmignore-cache-2d3a1a18",
55
- "@latticexyz/utils": "2.0.8-not-npmignore-cache-2d3a1a18",
56
- "@latticexyz/world": "2.0.8-not-npmignore-cache-2d3a1a18",
57
- "@latticexyz/world-modules": "2.0.8-not-npmignore-cache-2d3a1a18"
47
+ "@latticexyz/abi-ts": "2.0.8-not-npmignore-cache-17f3bce8",
48
+ "@latticexyz/common": "2.0.8-not-npmignore-cache-17f3bce8",
49
+ "@latticexyz/config": "2.0.8-not-npmignore-cache-17f3bce8",
50
+ "@latticexyz/gas-report": "2.0.8-not-npmignore-cache-17f3bce8",
51
+ "@latticexyz/protocol-parser": "2.0.8-not-npmignore-cache-17f3bce8",
52
+ "@latticexyz/schema-type": "2.0.8-not-npmignore-cache-17f3bce8",
53
+ "@latticexyz/services": "2.0.8-not-npmignore-cache-17f3bce8",
54
+ "@latticexyz/store": "2.0.8-not-npmignore-cache-17f3bce8",
55
+ "@latticexyz/utils": "2.0.8-not-npmignore-cache-17f3bce8",
56
+ "@latticexyz/world": "2.0.8-not-npmignore-cache-17f3bce8",
57
+ "@latticexyz/world-modules": "2.0.8-not-npmignore-cache-17f3bce8"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/debug": "^4.1.7",
package/src/verify.ts CHANGED
@@ -74,11 +74,17 @@ export async function verify({
74
74
  ),
75
75
  );
76
76
 
77
- {
78
- const cwd = "node_modules/@latticexyz/world";
79
-
77
+ // If the verifier is Sourcify, attempt to verify MUD core contracts
78
+ if (verifier === "sourcify") {
79
+ // Install subdependencies so contracts can compile
80
+ await execa("npm", ["install"], {
81
+ cwd: "node_modules/@latticexyz/store",
82
+ });
83
+ await execa("npm", ["install"], {
84
+ cwd: "node_modules/@latticexyz/world",
85
+ });
80
86
  await execa("npm", ["install"], {
81
- cwd,
87
+ cwd: "node_modules/@latticexyz/world-modules",
82
88
  });
83
89
 
84
90
  Object.entries(
@@ -98,22 +104,13 @@ export async function verify({
98
104
  }),
99
105
  },
100
106
  {
101
- profile: foundryProfile,
102
- cwd,
107
+ cwd: "node_modules/@latticexyz/world",
103
108
  },
104
109
  ).catch((error) => {
105
110
  console.error(`Error verifying world factory contract ${name}:`, error);
106
111
  }),
107
112
  ),
108
113
  );
109
- }
110
-
111
- {
112
- const cwd = "node_modules/@latticexyz/world-modules";
113
-
114
- await execa("npm", ["install"], {
115
- cwd,
116
- });
117
114
 
118
115
  modules.map(({ name, bytecode }) =>
119
116
  verifyQueue.add(() =>
@@ -130,18 +127,13 @@ export async function verify({
130
127
  }),
131
128
  },
132
129
  {
133
- profile: foundryProfile,
134
- cwd,
130
+ cwd: "node_modules/@latticexyz/world-modules",
135
131
  },
136
132
  ).catch((error) => {
137
133
  console.error(`Error verifying module contract ${name}:`, error);
138
134
  }),
139
135
  ),
140
136
  );
141
- }
142
-
143
- {
144
- const cwd = "node_modules/@latticexyz/world";
145
137
 
146
138
  // If the world was deployed as a Proxy, verify the proxy and implementation.
147
139
  if (usesProxy) {
@@ -151,8 +143,7 @@ export async function verify({
151
143
  verifyContract(
152
144
  { name: "WorldProxy", rpc, verifier, verifierUrl, address: worldAddress },
153
145
  {
154
- profile: foundryProfile,
155
- cwd,
146
+ cwd: "node_modules/@latticexyz/world",
156
147
  },
157
148
  ).catch((error) => {
158
149
  console.error(`Error verifying WorldProxy contract:`, error);
@@ -163,8 +154,7 @@ export async function verify({
163
154
  verifyContract(
164
155
  { name: "World", rpc, verifier, verifierUrl, address: implementationAddress },
165
156
  {
166
- profile: foundryProfile,
167
- cwd,
157
+ cwd: "node_modules/@latticexyz/world",
168
158
  },
169
159
  ).catch((error) => {
170
160
  console.error(`Error verifying World contract:`, error);
@@ -175,7 +165,6 @@ export async function verify({
175
165
  verifyContract(
176
166
  { name: "World", rpc, verifier, verifierUrl, address: worldAddress },
177
167
  {
178
- profile: foundryProfile,
179
168
  cwd: "node_modules/@latticexyz/world",
180
169
  },
181
170
  ).catch((error) => {