create-mud 2.0.0-main-970aa105 → 2.0.0-main-2e288aa7

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/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var t=require("create-create-app"),s=require("path");var e={name:"create-mud",version:"2.0.0-main-970aa105",description:"Create a new MUD project",license:"MIT",author:"Lattice <mud@lattice.xyz>",bin:"dist/cli.js",files:["dist"],scripts:{build:"pnpm run build:js","build:js":"tsup && ./scripts/copy-templates.sh",clean:"pnpm run clean:js","clean:js":"rimraf dist",dev:"tsup --watch",prepublishOnly:"npm run clean && npm run build",test:"pnpm run test:vanilla && pnpm run test:react && pnpm run test:react-ecs && pnpm run test:phaser && pnpm run test:threejs","test:ci":"pnpm run test","test:phaser":"dist/cli.js test-project --template phaser && rimraf test-project","test:react":"dist/cli.js test-project --template react && rimraf test-project","test:react-ecs":"dist/cli.js test-project --template react-ecs && rimraf test-project","test:threejs":"dist/cli.js test-project --template threejs && rimraf test-project","test:vanilla":"dist/cli.js test-project --template vanilla && rimraf test-project"},dependencies:{"create-create-app":"git+https://github.com/holic/create-create-app#74376c59b48a04aabbe94d9cacfe9cb1cecccd63"},devDependencies:{"@types/node":"^18.15.11",tsup:"^6.7.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},gitHead:"914a1e0ae4a573d685841ca2ea921435057deb8f"};var c=(0,s.resolve)(__dirname,"..","dist","templates");(0,t.create)("create-mud",{templateRoot:c,defaultTemplate:"vanilla",defaultPackageManager:"pnpm",promptForDescription:!1,promptForAuthor:!1,promptForEmail:!1,promptForLicense:!1,promptForTemplate:!0,caveat:({answers:r,packageManager:a})=>`Done! Play in the MUD with \`cd ${r.name}\` and \`${a} run dev\``,extra:{"mud-version":{type:"input",describe:"The version of MUD packages to use, defaults to latest",default:e.version}}});
2
+ "use strict";var t=require("create-create-app"),s=require("path");var e={name:"create-mud",version:"2.0.0-main-2e288aa7",description:"Create a new MUD project",license:"MIT",author:"Lattice <mud@lattice.xyz>",bin:"dist/cli.js",files:["dist"],scripts:{build:"pnpm run build:js","build:js":"tsup && ./scripts/copy-templates.sh",clean:"pnpm run clean:js","clean:js":"rimraf dist",dev:"tsup --watch",prepublishOnly:"npm run clean && npm run build",test:"pnpm run test:vanilla && pnpm run test:react && pnpm run test:react-ecs && pnpm run test:phaser && pnpm run test:threejs","test:ci":"pnpm run test","test:phaser":"dist/cli.js test-project --template phaser && rimraf test-project","test:react":"dist/cli.js test-project --template react && rimraf test-project","test:react-ecs":"dist/cli.js test-project --template react-ecs && rimraf test-project","test:threejs":"dist/cli.js test-project --template threejs && rimraf test-project","test:vanilla":"dist/cli.js test-project --template vanilla && rimraf test-project"},dependencies:{"create-create-app":"git+https://github.com/holic/create-create-app#74376c59b48a04aabbe94d9cacfe9cb1cecccd63"},devDependencies:{"@types/node":"^18.15.11",tsup:"^6.7.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org"},gitHead:"914a1e0ae4a573d685841ca2ea921435057deb8f"};var c=(0,s.resolve)(__dirname,"..","dist","templates");(0,t.create)("create-mud",{templateRoot:c,defaultTemplate:"vanilla",defaultPackageManager:"pnpm",promptForDescription:!1,promptForAuthor:!1,promptForEmail:!1,promptForLicense:!1,promptForTemplate:!0,caveat:({answers:r,packageManager:a})=>`Done! Play in the MUD with \`cd ${r.name}\` and \`${a} run dev\``,extra:{"mud-version":{type:"input",describe:"The version of MUD packages to use, defaults to latest",default:e.version}}});
@@ -3,4 +3,4 @@ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
6
- import { Counter, CounterTableId } from "./tables/Counter.sol";
6
+ import { Counter } from "./tables/Counter.sol";
@@ -19,22 +19,12 @@ import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
21
 
22
- // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter", typeId: RESOURCE_TABLE });`
23
- ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572000000000000000000);
24
- ResourceId constant CounterTableId = _tableId;
25
-
26
- FieldLayout constant _fieldLayout = FieldLayout.wrap(
27
- 0x0004010004000000000000000000000000000000000000000000000000000000
28
- );
29
-
30
22
  library Counter {
31
- /**
32
- * @notice Get the table values' field layout.
33
- * @return _fieldLayout The field layout for the table.
34
- */
35
- function getFieldLayout() internal pure returns (FieldLayout) {
36
- return _fieldLayout;
37
- }
23
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter", typeId: RESOURCE_TABLE });`
24
+ ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572000000000000000000);
25
+
26
+ FieldLayout constant _fieldLayout =
27
+ FieldLayout.wrap(0x0004010004000000000000000000000000000000000000000000000000000000);
38
28
 
39
29
  /**
40
30
  * @notice Get the table's key schema.
@@ -6,7 +6,7 @@ import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
6
6
  import { getKeysWithValue } from "@latticexyz/world-modules/src/modules/keyswithvalue/getKeysWithValue.sol";
7
7
 
8
8
  import { IWorld } from "../src/codegen/world/IWorld.sol";
9
- import { Counter, CounterTableId } from "../src/codegen/index.sol";
9
+ import { Counter } from "../src/codegen/index.sol";
10
10
 
11
11
  contract CounterTest is MudTest {
12
12
  function testWorldExists() public {
@@ -3,4 +3,4 @@ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
6
- import { Tasks, TasksData, TasksTableId } from "./tables/Tasks.sol";
6
+ import { Tasks, TasksData } from "./tables/Tasks.sol";
@@ -19,14 +19,6 @@ import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
21
 
22
- // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Tasks", typeId: RESOURCE_TABLE });`
23
- ResourceId constant _tableId = ResourceId.wrap(0x746200000000000000000000000000005461736b730000000000000000000000);
24
- ResourceId constant TasksTableId = _tableId;
25
-
26
- FieldLayout constant _fieldLayout = FieldLayout.wrap(
27
- 0x0040020120200000000000000000000000000000000000000000000000000000
28
- );
29
-
30
22
  struct TasksData {
31
23
  uint256 createdAt;
32
24
  uint256 completedAt;
@@ -34,13 +26,11 @@ struct TasksData {
34
26
  }
35
27
 
36
28
  library Tasks {
37
- /**
38
- * @notice Get the table values' field layout.
39
- * @return _fieldLayout The field layout for the table.
40
- */
41
- function getFieldLayout() internal pure returns (FieldLayout) {
42
- return _fieldLayout;
43
- }
29
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Tasks", typeId: RESOURCE_TABLE });`
30
+ ResourceId constant _tableId = ResourceId.wrap(0x746200000000000000000000000000005461736b730000000000000000000000);
31
+
32
+ FieldLayout constant _fieldLayout =
33
+ FieldLayout.wrap(0x0040020120200000000000000000000000000000000000000000000000000000);
44
34
 
45
35
  /**
46
36
  * @notice Get the table's key schema.
@@ -3,4 +3,4 @@ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
6
- import { Counter, CounterTableId } from "./tables/Counter.sol";
6
+ import { Counter } from "./tables/Counter.sol";
@@ -19,22 +19,12 @@ import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
21
 
22
- // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter", typeId: RESOURCE_TABLE });`
23
- ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572000000000000000000);
24
- ResourceId constant CounterTableId = _tableId;
25
-
26
- FieldLayout constant _fieldLayout = FieldLayout.wrap(
27
- 0x0004010004000000000000000000000000000000000000000000000000000000
28
- );
29
-
30
22
  library Counter {
31
- /**
32
- * @notice Get the table values' field layout.
33
- * @return _fieldLayout The field layout for the table.
34
- */
35
- function getFieldLayout() internal pure returns (FieldLayout) {
36
- return _fieldLayout;
37
- }
23
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter", typeId: RESOURCE_TABLE });`
24
+ ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572000000000000000000);
25
+
26
+ FieldLayout constant _fieldLayout =
27
+ FieldLayout.wrap(0x0004010004000000000000000000000000000000000000000000000000000000);
38
28
 
39
29
  /**
40
30
  * @notice Get the table's key schema.
@@ -6,7 +6,7 @@ import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
6
6
  import { getKeysWithValue } from "@latticexyz/world-modules/src/modules/keyswithvalue/getKeysWithValue.sol";
7
7
 
8
8
  import { IWorld } from "../src/codegen/world/IWorld.sol";
9
- import { Counter, CounterTableId } from "../src/codegen/index.sol";
9
+ import { Counter } from "../src/codegen/index.sol";
10
10
 
11
11
  contract CounterTest is MudTest {
12
12
  function testWorldExists() public {
@@ -3,4 +3,4 @@ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
6
- import { Position, PositionData, PositionTableId } from "./tables/Position.sol";
6
+ import { Position, PositionData } from "./tables/Position.sol";
@@ -19,14 +19,6 @@ import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
21
 
22
- // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Position", typeId: RESOURCE_TABLE });`
23
- ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000506f736974696f6e0000000000000000);
24
- ResourceId constant PositionTableId = _tableId;
25
-
26
- FieldLayout constant _fieldLayout = FieldLayout.wrap(
27
- 0x000c030004040400000000000000000000000000000000000000000000000000
28
- );
29
-
30
22
  struct PositionData {
31
23
  int32 x;
32
24
  int32 y;
@@ -34,13 +26,11 @@ struct PositionData {
34
26
  }
35
27
 
36
28
  library Position {
37
- /**
38
- * @notice Get the table values' field layout.
39
- * @return _fieldLayout The field layout for the table.
40
- */
41
- function getFieldLayout() internal pure returns (FieldLayout) {
42
- return _fieldLayout;
43
- }
29
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Position", typeId: RESOURCE_TABLE });`
30
+ ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000506f736974696f6e0000000000000000);
31
+
32
+ FieldLayout constant _fieldLayout =
33
+ FieldLayout.wrap(0x000c030004040400000000000000000000000000000000000000000000000000);
44
34
 
45
35
  /**
46
36
  * @notice Get the table's key schema.
@@ -3,4 +3,4 @@ pragma solidity >=0.8.24;
3
3
 
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
 
6
- import { Counter, CounterTableId } from "./tables/Counter.sol";
6
+ import { Counter } from "./tables/Counter.sol";
@@ -19,22 +19,12 @@ import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol";
19
19
  import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol";
20
20
  import { ResourceId } from "@latticexyz/store/src/ResourceId.sol";
21
21
 
22
- // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter", typeId: RESOURCE_TABLE });`
23
- ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572000000000000000000);
24
- ResourceId constant CounterTableId = _tableId;
25
-
26
- FieldLayout constant _fieldLayout = FieldLayout.wrap(
27
- 0x0004010004000000000000000000000000000000000000000000000000000000
28
- );
29
-
30
22
  library Counter {
31
- /**
32
- * @notice Get the table values' field layout.
33
- * @return _fieldLayout The field layout for the table.
34
- */
35
- function getFieldLayout() internal pure returns (FieldLayout) {
36
- return _fieldLayout;
37
- }
23
+ // Hex below is the result of `WorldResourceIdLib.encode({ namespace: "", name: "Counter", typeId: RESOURCE_TABLE });`
24
+ ResourceId constant _tableId = ResourceId.wrap(0x74620000000000000000000000000000436f756e746572000000000000000000);
25
+
26
+ FieldLayout constant _fieldLayout =
27
+ FieldLayout.wrap(0x0004010004000000000000000000000000000000000000000000000000000000);
38
28
 
39
29
  /**
40
30
  * @notice Get the table's key schema.
@@ -6,7 +6,7 @@ import { MudTest } from "@latticexyz/world/test/MudTest.t.sol";
6
6
  import { getKeysWithValue } from "@latticexyz/world-modules/src/modules/keyswithvalue/getKeysWithValue.sol";
7
7
 
8
8
  import { IWorld } from "../src/codegen/world/IWorld.sol";
9
- import { Counter, CounterTableId } from "../src/codegen/index.sol";
9
+ import { Counter } from "../src/codegen/index.sol";
10
10
 
11
11
  contract CounterTest is MudTest {
12
12
  function testWorldExists() public {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mud",
3
- "version": "2.0.0-main-970aa105",
3
+ "version": "2.0.0-main-2e288aa7",
4
4
  "description": "Create a new MUD project",
5
5
  "license": "MIT",
6
6
  "author": "Lattice <mud@lattice.xyz>",