@latticexyz/cli 1.32.0 → 1.34.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/dist/commands/deploy-contracts.js +5 -2
- package/dist/commands/deploy.js +12 -6
- package/dist/commands/devnode.js +1 -8
- package/dist/commands/types.js +4 -1
- package/dist/index.js +2 -2
- package/package.json +8 -8
- package/src/commands/deploy.ts +10 -1
- package/src/commands/devnode.ts +1 -8
- package/src/utils/build.ts +4 -1
- package/src/utils/deploy.ts +1 -1
|
@@ -216354,8 +216354,11 @@ function filterAbi(abiIn = "./out", abiOut = "./abi", exclude = ["Component", "I
|
|
|
216354
216354
|
const include = ["Component", "System", "World", "LibQuery"];
|
|
216355
216355
|
const contracts = getContractsInDir(abiIn, exclude).filter((item) => include.find((i) => item.includes(i)));
|
|
216356
216356
|
console.log("Selected ABIs: ", contracts);
|
|
216357
|
-
for (const contract of contracts)
|
|
216357
|
+
for (const contract of contracts) {
|
|
216358
|
+
if (contract.includes(".t"))
|
|
216359
|
+
continue;
|
|
216358
216360
|
copyAbi(abiIn, abiOut, contract);
|
|
216361
|
+
}
|
|
216359
216362
|
console.log("Successfully moved selected ABIs to ./abi");
|
|
216360
216363
|
}
|
|
216361
216364
|
|
|
@@ -217402,7 +217405,7 @@ function deploy(deployerPrivateKey, rpc = "http://localhost:8545", worldAddress,
|
|
|
217402
217405
|
reuseComponents ? "true" : "false",
|
|
217403
217406
|
"--fork-url",
|
|
217404
217407
|
rpc,
|
|
217405
|
-
...gasPrice != null ? ["--with-gas-price", String(gasPrice)] : []
|
|
217408
|
+
...gasPrice != null ? ["--with-gas-price", String(Math.round(gasPrice))] : []
|
|
217406
217409
|
],
|
|
217407
217410
|
{ stdio: ["inherit", "pipe", "pipe"] }
|
|
217408
217411
|
);
|
package/dist/commands/deploy.js
CHANGED
|
@@ -269147,8 +269147,11 @@ function filterAbi(abiIn = "./out", abiOut = "./abi", exclude = ["Component", "I
|
|
|
269147
269147
|
const include = ["Component", "System", "World", "LibQuery"];
|
|
269148
269148
|
const contracts = getContractsInDir(abiIn, exclude).filter((item) => include.find((i) => item.includes(i)));
|
|
269149
269149
|
console.log("Selected ABIs: ", contracts);
|
|
269150
|
-
for (const contract of contracts)
|
|
269150
|
+
for (const contract of contracts) {
|
|
269151
|
+
if (contract.includes(".t"))
|
|
269152
|
+
continue;
|
|
269151
269153
|
copyAbi(abiIn, abiOut, contract);
|
|
269154
|
+
}
|
|
269152
269155
|
console.log("Successfully moved selected ABIs to ./abi");
|
|
269153
269156
|
}
|
|
269154
269157
|
|
|
@@ -270195,7 +270198,7 @@ function deploy(deployerPrivateKey, rpc = "http://localhost:8545", worldAddress,
|
|
|
270195
270198
|
reuseComponents ? "true" : "false",
|
|
270196
270199
|
"--fork-url",
|
|
270197
270200
|
rpc,
|
|
270198
|
-
...gasPrice != null ? ["--with-gas-price", String(gasPrice)] : []
|
|
270201
|
+
...gasPrice != null ? ["--with-gas-price", String(Math.round(gasPrice))] : []
|
|
270199
270202
|
],
|
|
270200
270203
|
{ stdio: ["inherit", "pipe", "pipe"] }
|
|
270201
270204
|
);
|
|
@@ -270261,7 +270264,8 @@ var builder = (yargs) => yargs.options({
|
|
|
270261
270264
|
netlifySlug: { type: "string" },
|
|
270262
270265
|
netlifyPersonalToken: { type: "string" },
|
|
270263
270266
|
codespace: { type: "boolean" },
|
|
270264
|
-
dry: { type: "boolean" }
|
|
270267
|
+
dry: { type: "boolean" },
|
|
270268
|
+
dev: { type: "boolean", default: true }
|
|
270265
270269
|
});
|
|
270266
270270
|
var handler = (args) => __async(void 0, null, function* () {
|
|
270267
270271
|
const info = yield getDeployInfo(args);
|
|
@@ -270303,7 +270307,8 @@ var getDeployInfo = (args) => __async(void 0, null, function* () {
|
|
|
270303
270307
|
wsRpc: "ws://localhost:8545",
|
|
270304
270308
|
reuseComponents: false,
|
|
270305
270309
|
deployClient: false,
|
|
270306
|
-
clientUrl: "http://localhost:3000"
|
|
270310
|
+
clientUrl: "http://localhost:3000",
|
|
270311
|
+
dev: true
|
|
270307
270312
|
};
|
|
270308
270313
|
const { default: fetch } = yield importFetch;
|
|
270309
270314
|
const answers = args.upgradeSystems && !args.world ? yield import_inquirer.default.prompt([
|
|
@@ -270447,7 +270452,8 @@ var getDeployInfo = (args) => __async(void 0, null, function* () {
|
|
|
270447
270452
|
netlifySlug: (_G = (_F = args.netlifySlug) != null ? _F : config.netlifySlug) != null ? _G : answers.netlifySlug,
|
|
270448
270453
|
netlifyPersonalToken: (_I = (_H = args.netlifyPersonalToken) != null ? _H : config.netlifyPersonalToken) != null ? _I : answers.netlifyPersonalToken,
|
|
270449
270454
|
codespace: args.codespace,
|
|
270450
|
-
dry: args.dry
|
|
270455
|
+
dry: args.dry,
|
|
270456
|
+
dev: args.dev
|
|
270451
270457
|
};
|
|
270452
270458
|
});
|
|
270453
270459
|
var deploy2 = (options) => __async(void 0, null, function* () {
|
|
@@ -270561,7 +270567,7 @@ var deploy2 = (options) => __async(void 0, null, function* () {
|
|
|
270561
270567
|
clientUrl = getCodespaceUrl(3e3);
|
|
270562
270568
|
options.rpc = getCodespaceUrl(8545);
|
|
270563
270569
|
}
|
|
270564
|
-
launcherUrl = `${clientUrl}?chainId=${options.chainId}&worldAddress=${ctx.worldAddress}&rpc=${options.rpc}&wsRpc=${options.wsRpc}&initialBlockNumber=${ctx.initialBlockNumber}&
|
|
270570
|
+
launcherUrl = `${clientUrl}?chainId=${options.chainId}&worldAddress=${ctx.worldAddress}&rpc=${options.rpc}&wsRpc=${options.wsRpc}&initialBlockNumber=${ctx.initialBlockNumber}&snapshot=&stream=&relay=&faucet=${options.dev ? "&dev=true" : ""}`;
|
|
270565
270571
|
import_openurl.default.open(launcherUrl);
|
|
270566
270572
|
}),
|
|
270567
270573
|
options: { bottomBar: 3 }
|
package/dist/commands/devnode.js
CHANGED
|
@@ -181312,14 +181312,7 @@ var handler = (argv) => __async(void 0, null, function* () {
|
|
|
181312
181312
|
console.log("Clearing devnode history");
|
|
181313
181313
|
const userHomeDir = (0, import_os3.homedir)();
|
|
181314
181314
|
(0, import_fs.rmSync)(import_path2.default.join(userHomeDir, ".foundry", "anvil", "tmp"), { recursive: true, force: true });
|
|
181315
|
-
const { child } = yield execLog("anvil", [
|
|
181316
|
-
"-b",
|
|
181317
|
-
String(blocktime),
|
|
181318
|
-
"--block-base-fee-per-gas",
|
|
181319
|
-
"0",
|
|
181320
|
-
"--gas-limit",
|
|
181321
|
-
"100000000"
|
|
181322
|
-
]);
|
|
181315
|
+
const { child } = yield execLog("anvil", ["-b", String(blocktime), "--block-base-fee-per-gas", "0"]);
|
|
181323
181316
|
process.on("SIGINT", () => {
|
|
181324
181317
|
console.log("\ngracefully shutting down from SIGINT (Crtl-C)");
|
|
181325
181318
|
child.kill();
|
package/dist/commands/types.js
CHANGED
|
@@ -180866,8 +180866,11 @@ function filterAbi(abiIn = "./out", abiOut = "./abi", exclude = ["Component", "I
|
|
|
180866
180866
|
const include = ["Component", "System", "World", "LibQuery"];
|
|
180867
180867
|
const contracts = getContractsInDir(abiIn, exclude).filter((item) => include.find((i) => item.includes(i)));
|
|
180868
180868
|
console.log("Selected ABIs: ", contracts);
|
|
180869
|
-
for (const contract of contracts)
|
|
180869
|
+
for (const contract of contracts) {
|
|
180870
|
+
if (contract.includes(".t"))
|
|
180871
|
+
continue;
|
|
180870
180872
|
copyAbi(abiIn, abiOut, contract);
|
|
180873
|
+
}
|
|
180871
180874
|
console.log("Successfully moved selected ABIs to ./abi");
|
|
180872
180875
|
}
|
|
180873
180876
|
|
package/dist/index.js
CHANGED
|
@@ -193,9 +193,9 @@ var require_build = __commonJS({
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
-
// node_modules/yargs-parser/build/index.cjs
|
|
196
|
+
// ../../node_modules/yargs-parser/build/index.cjs
|
|
197
197
|
var require_build2 = __commonJS({
|
|
198
|
-
"node_modules/yargs-parser/build/index.cjs"(exports, module2) {
|
|
198
|
+
"../../node_modules/yargs-parser/build/index.cjs"(exports, module2) {
|
|
199
199
|
"use strict";
|
|
200
200
|
var util = require("util");
|
|
201
201
|
var path = require("path");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latticexyz/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"description": "Command line interface for mud",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"typescript": "^4.6.4"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@latticexyz/services": "^1.
|
|
41
|
-
"@latticexyz/solecs": "^1.
|
|
42
|
-
"@latticexyz/std-contracts": "^1.
|
|
43
|
-
"@latticexyz/utils": "^1.
|
|
40
|
+
"@latticexyz/services": "^1.34.0",
|
|
41
|
+
"@latticexyz/solecs": "^1.34.0",
|
|
42
|
+
"@latticexyz/std-contracts": "^1.34.0",
|
|
43
|
+
"@latticexyz/utils": "^1.34.0",
|
|
44
44
|
"@typechain/ethers-v5": "^10.1.1",
|
|
45
45
|
"chalk": "^5.0.1",
|
|
46
46
|
"chokidar": "^3.5.3",
|
|
47
47
|
"clear": "^0.1.0",
|
|
48
48
|
"commander": "^9.2.0",
|
|
49
|
-
"ds-test": "https://github.com/dapphub/ds-test.git#
|
|
49
|
+
"ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084",
|
|
50
50
|
"ejs": "^3.1.8",
|
|
51
51
|
"esm": "^3.2.25",
|
|
52
52
|
"ethers": "^5.7.2",
|
|
53
53
|
"execa": "^6.1.0",
|
|
54
54
|
"figlet": "^1.5.2",
|
|
55
|
-
"forge-std": "https://github.com/foundry-rs/forge-std.git#
|
|
55
|
+
"forge-std": "https://github.com/foundry-rs/forge-std.git#f36dab24d63d1c1945a05ed375ce341d3c1a49ed",
|
|
56
56
|
"glob": "^8.0.3",
|
|
57
57
|
"inquirer": "^8.2.4",
|
|
58
58
|
"inquirer-prompt-suggest": "^0.1.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"pkg": {
|
|
71
71
|
"scripts": "build/**/*.js"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "a722415d7a91dab1cc849f1c8c877146872a0444"
|
|
74
74
|
}
|
package/src/commands/deploy.ts
CHANGED
|
@@ -10,6 +10,7 @@ import openurl from "openurl";
|
|
|
10
10
|
import ips from "inquirer-prompt-suggest";
|
|
11
11
|
import { Arguments, CommandBuilder } from "yargs";
|
|
12
12
|
import { generateAndDeploy } from "../utils";
|
|
13
|
+
|
|
13
14
|
inquirer.registerPrompt("suggest", ips);
|
|
14
15
|
|
|
15
16
|
// @dev Note: this deployment command is deprecated and will be removed in a future version. Use `mud deploy-contracts` instead.
|
|
@@ -36,6 +37,7 @@ interface Options {
|
|
|
36
37
|
netlifyPersonalToken?: string;
|
|
37
38
|
codespace?: boolean;
|
|
38
39
|
dry?: boolean;
|
|
40
|
+
dev?: boolean;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
export const command = "deploy";
|
|
@@ -57,6 +59,7 @@ export const builder: CommandBuilder<Options, Options> = (yargs) =>
|
|
|
57
59
|
netlifyPersonalToken: { type: "string" },
|
|
58
60
|
codespace: { type: "boolean" },
|
|
59
61
|
dry: { type: "boolean" },
|
|
62
|
+
dev: { type: "boolean", default: true },
|
|
60
63
|
});
|
|
61
64
|
|
|
62
65
|
export const handler = async (args: Arguments<Options>): Promise<void> => {
|
|
@@ -106,6 +109,7 @@ const getDeployInfo: (args: Arguments<Options>) => Promise<Options> = async (arg
|
|
|
106
109
|
reuseComponents: false,
|
|
107
110
|
deployClient: false,
|
|
108
111
|
clientUrl: "http://localhost:3000",
|
|
112
|
+
dev: true,
|
|
109
113
|
};
|
|
110
114
|
|
|
111
115
|
const { default: fetch } = await importFetch;
|
|
@@ -278,6 +282,7 @@ const getDeployInfo: (args: Arguments<Options>) => Promise<Options> = async (arg
|
|
|
278
282
|
netlifyPersonalToken: args.netlifyPersonalToken ?? config.netlifyPersonalToken ?? answers.netlifyPersonalToken,
|
|
279
283
|
codespace: args.codespace,
|
|
280
284
|
dry: args.dry,
|
|
285
|
+
dev: args.dev,
|
|
281
286
|
};
|
|
282
287
|
};
|
|
283
288
|
|
|
@@ -403,7 +408,11 @@ export const deploy = async (options: Options) => {
|
|
|
403
408
|
options.rpc = getCodespaceUrl(8545);
|
|
404
409
|
}
|
|
405
410
|
|
|
406
|
-
launcherUrl = `${clientUrl}?chainId=${options.chainId}&worldAddress=${ctx.worldAddress}&rpc=${
|
|
411
|
+
launcherUrl = `${clientUrl}?chainId=${options.chainId}&worldAddress=${ctx.worldAddress}&rpc=${
|
|
412
|
+
options.rpc
|
|
413
|
+
}&wsRpc=${options.wsRpc}&initialBlockNumber=${
|
|
414
|
+
ctx.initialBlockNumber
|
|
415
|
+
}&snapshot=&stream=&relay=&faucet=${options.dev ? "&dev=true" : ""}`;
|
|
407
416
|
|
|
408
417
|
openurl.open(launcherUrl);
|
|
409
418
|
},
|
package/src/commands/devnode.ts
CHANGED
|
@@ -21,14 +21,7 @@ export const handler = async (argv: Arguments<Options>): Promise<void> => {
|
|
|
21
21
|
console.log("Clearing devnode history");
|
|
22
22
|
const userHomeDir = homedir();
|
|
23
23
|
rmSync(path.join(userHomeDir, ".foundry", "anvil", "tmp"), { recursive: true, force: true });
|
|
24
|
-
const { child } = await execLog("anvil", [
|
|
25
|
-
"-b",
|
|
26
|
-
String(blocktime),
|
|
27
|
-
"--block-base-fee-per-gas",
|
|
28
|
-
"0",
|
|
29
|
-
"--gas-limit",
|
|
30
|
-
"100000000",
|
|
31
|
-
]);
|
|
24
|
+
const { child } = await execLog("anvil", ["-b", String(blocktime), "--block-base-fee-per-gas", "0"]);
|
|
32
25
|
|
|
33
26
|
process.on("SIGINT", () => {
|
|
34
27
|
console.log("\ngracefully shutting down from SIGINT (Crtl-C)");
|
package/src/utils/build.ts
CHANGED
|
@@ -38,7 +38,10 @@ export function filterAbi(abiIn = "./out", abiOut = "./abi", exclude: string[] =
|
|
|
38
38
|
console.log("Selected ABIs: ", contracts);
|
|
39
39
|
|
|
40
40
|
// Move selected ABIs to ./abi
|
|
41
|
-
for (const contract of contracts)
|
|
41
|
+
for (const contract of contracts) {
|
|
42
|
+
if (contract.includes(".t")) continue;
|
|
43
|
+
copyAbi(abiIn, abiOut, contract);
|
|
44
|
+
}
|
|
42
45
|
|
|
43
46
|
console.log("Successfully moved selected ABIs to ./abi");
|
|
44
47
|
}
|
package/src/utils/deploy.ts
CHANGED
|
@@ -51,7 +51,7 @@ export async function deploy(
|
|
|
51
51
|
reuseComponents ? "true" : "false", // Reuse components?
|
|
52
52
|
"--fork-url",
|
|
53
53
|
rpc,
|
|
54
|
-
...(gasPrice != null ? ["--with-gas-price", String(gasPrice)] : []),
|
|
54
|
+
...(gasPrice != null ? ["--with-gas-price", String(Math.round(gasPrice))] : []),
|
|
55
55
|
],
|
|
56
56
|
{ stdio: ["inherit", "pipe", "pipe"] }
|
|
57
57
|
);
|