@latticexyz/cli 1.37.1 → 1.39.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.
@@ -138557,7 +138557,7 @@ var require_prettier = __commonJS({
138557
138557
  descriptor = defaults_1.defaultDescriptor,
138558
138558
  unknown = defaults_1.defaultUnknownHandler,
138559
138559
  invalid = defaults_1.defaultInvalidHandler,
138560
- deprecated = defaults_1.defaultDeprecatedHandler
138560
+ deprecated: deprecated2 = defaults_1.defaultDeprecatedHandler
138561
138561
  } = opts || {};
138562
138562
  this._utils = {
138563
138563
  descriptor,
@@ -138574,7 +138574,7 @@ var require_prettier = __commonJS({
138574
138574
  };
138575
138575
  this._unknownHandler = unknown;
138576
138576
  this._invalidHandler = invalid;
138577
- this._deprecatedHandler = deprecated;
138577
+ this._deprecatedHandler = deprecated2;
138578
138578
  this.cleanHistory();
138579
138579
  }
138580
138580
  cleanHistory() {
@@ -180766,6 +180766,7 @@ var create_exports = {};
180766
180766
  __export(create_exports, {
180767
180767
  builder: () => builder,
180768
180768
  command: () => command,
180769
+ deprecated: () => deprecated,
180769
180770
  desc: () => desc,
180770
180771
  handler: () => handler
180771
180772
  });
@@ -181747,26 +181748,23 @@ var source_default = chalk;
181747
181748
  // src/commands/create.ts
181748
181749
  var command = "create <name>";
181749
181750
  var desc = "Sets up a mud project into <name>. Requires yarn.";
181751
+ var deprecated = true;
181750
181752
  var builder = (yargs) => yargs.options({
181751
- template: { type: "string", desc: "Template to be used (available: [minimal])", default: "minimal" }
181753
+ template: { type: "string", desc: "Template to be used (available: [minimal, react])", default: "minimal" }
181752
181754
  }).positional("name", { type: "string", default: "mud-app" });
181753
181755
  var handler = async (argv) => {
181754
181756
  const { name, template } = argv;
181755
- console.log(source_default.yellow.bold("Creating new mud project in", name));
181756
- let result = await execLog("git", ["clone", `https://github.com/latticexyz/mud-template-${template}`, name]);
181757
+ console.log(source_default.red.bold("\u26A0\uFE0F This command will be removed soon. Use `yarn create mud` instead."));
181758
+ const result = await execLog("yarn", ["create", "mud", name, "--template", template]);
181757
181759
  if (result.exitCode != 0)
181758
181760
  process.exit(result.exitCode);
181759
- console.log(source_default.yellow.bold("Installing dependencies..."));
181760
- result = await execLog("yarn", ["--cwd", `./${name}`]);
181761
- if (result.exitCode != 0)
181762
- process.exit(result.exitCode);
181763
- console.log(source_default.yellow.bold(`Done! Run \`yarn dev\` in ${name} to get started.`));
181764
181761
  process.exit(0);
181765
181762
  };
181766
181763
  // Annotate the CommonJS export names for ESM import in node:
181767
181764
  0 && (module.exports = {
181768
181765
  builder,
181769
181766
  command,
181767
+ deprecated,
181770
181768
  desc,
181771
181769
  handler
181772
181770
  });
@@ -217958,6 +217958,9 @@ var handler = async (args) => {
217958
217958
  if (worldAddress && args.openUrl) {
217959
217959
  const url2 = new URL(args.openUrl);
217960
217960
  url2.searchParams.set("worldAddress", worldAddress);
217961
+ console.log("");
217962
+ console.log(source_default.cyan("Opening client URL to", url2.toString()));
217963
+ console.log("");
217961
217964
  import_openurl.default.open(url2.toString());
217962
217965
  }
217963
217966
  if (args.watch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/cli",
3
- "version": "1.37.1",
3
+ "version": "1.39.0",
4
4
  "description": "Command line interface for mud",
5
5
  "main": "src/index.ts",
6
6
  "license": "MIT",
@@ -39,10 +39,10 @@
39
39
  "dependencies": {
40
40
  "@improbable-eng/grpc-web": "^0.15.0",
41
41
  "@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
42
- "@latticexyz/services": "^1.37.1",
43
- "@latticexyz/solecs": "^1.37.1",
44
- "@latticexyz/std-contracts": "^1.37.1",
45
- "@latticexyz/utils": "^1.37.1",
42
+ "@latticexyz/services": "^1.39.0",
43
+ "@latticexyz/solecs": "^1.39.0",
44
+ "@latticexyz/std-contracts": "^1.39.0",
45
+ "@latticexyz/utils": "^1.39.0",
46
46
  "@typechain/ethers-v5": "^10.1.1",
47
47
  "chalk": "^5.0.1",
48
48
  "chokidar": "^3.5.3",
@@ -73,5 +73,5 @@
73
73
  "pkg": {
74
74
  "scripts": "build/**/*.js"
75
75
  },
76
- "gitHead": "338b2017aecbd30ced6944a1f49ffa7195722c7f"
76
+ "gitHead": "5787c684dd56adab543dfb7debcc79438dcaa166"
77
77
  }
@@ -10,23 +10,21 @@ type Options = {
10
10
  export const command = "create <name>";
11
11
  export const desc = "Sets up a mud project into <name>. Requires yarn.";
12
12
 
13
+ export const deprecated = true;
14
+
13
15
  export const builder: CommandBuilder<Options, Options> = (yargs) =>
14
16
  yargs
15
17
  .options({
16
- template: { type: "string", desc: "Template to be used (available: [minimal])", default: "minimal" },
18
+ template: { type: "string", desc: "Template to be used (available: [minimal, react])", default: "minimal" },
17
19
  })
18
20
  .positional("name", { type: "string", default: "mud-app" });
19
21
 
20
22
  export const handler = async (argv: Arguments<Options>): Promise<void> => {
21
23
  const { name, template } = argv;
22
- console.log(chalk.yellow.bold("Creating new mud project in", name));
23
- let result = await execLog("git", ["clone", `https://github.com/latticexyz/mud-template-${template}`, name]);
24
- if (result.exitCode != 0) process.exit(result.exitCode);
24
+ console.log(chalk.red.bold("⚠️ This command will be removed soon. Use `yarn create mud` instead."));
25
25
 
26
- console.log(chalk.yellow.bold("Installing dependencies..."));
27
- result = await execLog("yarn", ["--cwd", `./${name}`]);
26
+ const result = await execLog("yarn", ["create", "mud", name, "--template", template]);
28
27
  if (result.exitCode != 0) process.exit(result.exitCode);
29
28
 
30
- console.log(chalk.yellow.bold(`Done! Run \`yarn dev\` in ${name} to get started.`));
31
29
  process.exit(0);
32
30
  };
@@ -60,6 +60,9 @@ export const handler = async (args: Arguments<Options>): Promise<void> => {
60
60
  if (worldAddress && args.openUrl) {
61
61
  const url = new URL(args.openUrl);
62
62
  url.searchParams.set("worldAddress", worldAddress);
63
+ console.log("");
64
+ console.log(chalk.cyan("Opening client URL to", url.toString()));
65
+ console.log("");
63
66
  openurl.open(url.toString());
64
67
  }
65
68