@latticexyz/cli 1.32.0 → 1.33.1

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.
@@ -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
 
@@ -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
 
@@ -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}&dev=true&snapshot=&stream=&relay=&faucet=`;
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 }
@@ -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();
@@ -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.32.0",
3
+ "version": "1.33.1",
4
4
  "description": "Command line interface for mud",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
@@ -37,10 +37,10 @@
37
37
  "typescript": "^4.6.4"
38
38
  },
39
39
  "dependencies": {
40
- "@latticexyz/services": "^1.32.0",
41
- "@latticexyz/solecs": "^1.32.0",
42
- "@latticexyz/std-contracts": "^1.32.0",
43
- "@latticexyz/utils": "^1.32.0",
40
+ "@latticexyz/services": "^1.33.1",
41
+ "@latticexyz/solecs": "^1.33.1",
42
+ "@latticexyz/std-contracts": "^1.33.1",
43
+ "@latticexyz/utils": "^1.33.1",
44
44
  "@typechain/ethers-v5": "^10.1.1",
45
45
  "chalk": "^5.0.1",
46
46
  "chokidar": "^3.5.3",
@@ -70,5 +70,5 @@
70
70
  "pkg": {
71
71
  "scripts": "build/**/*.js"
72
72
  },
73
- "gitHead": "e777078fa8cf4b35b21e106b0cd11abedb4ec790"
73
+ "gitHead": "266668946da535826e1a8da29015a200bc2f2b28"
74
74
  }
@@ -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=${options.rpc}&wsRpc=${options.wsRpc}&initialBlockNumber=${ctx.initialBlockNumber}&dev=true&snapshot=&stream=&relay=&faucet=`;
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
  },
@@ -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)");
@@ -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) copyAbi(abiIn, abiOut, contract);
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/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022-present Lattice Labs Ltd.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.