create-mud 2.0.12-main-ecc8f658 → 2.0.12-type-resolutions-effc7ab1

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.
Files changed (25) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/templates/phaser/packages/client/package.json +1 -2
  3. package/dist/templates/phaser/packages/client/src/layers/phaser/configurePhaser.ts +0 -1
  4. package/dist/templates/phaser/packages/client/src/mud/getNetworkConfig.ts +13 -0
  5. package/dist/templates/phaser/packages/client/src/ui/hooks/usePhaserLayer.tsx +0 -1
  6. package/dist/templates/phaser/packages/client/tsconfig.json +9 -1
  7. package/dist/templates/phaser/packages/contracts/tsconfig.json +11 -1
  8. package/dist/templates/react/packages/client/src/mud/getNetworkConfig.ts +13 -0
  9. package/dist/templates/react/packages/client/tsconfig.json +9 -1
  10. package/dist/templates/react/packages/contracts/tsconfig.json +11 -1
  11. package/dist/templates/react-ecs/packages/client/src/mud/getNetworkConfig.ts +12 -0
  12. package/dist/templates/react-ecs/packages/client/tsconfig.json +9 -1
  13. package/dist/templates/react-ecs/packages/contracts/tsconfig.json +11 -1
  14. package/dist/templates/threejs/packages/client/src/mud/getNetworkConfig.ts +13 -0
  15. package/dist/templates/threejs/packages/client/tsconfig.json +9 -1
  16. package/dist/templates/threejs/packages/contracts/tsconfig.json +11 -1
  17. package/dist/templates/vanilla/packages/client/src/mud/getNetworkConfig.ts +14 -0
  18. package/dist/templates/vanilla/packages/client/tsconfig.json +10 -3
  19. package/dist/templates/vanilla/packages/contracts/tsconfig.json +11 -1
  20. package/package.json +1 -1
  21. package/dist/templates/phaser/tsconfig.json +0 -23
  22. package/dist/templates/react/tsconfig.json +0 -23
  23. package/dist/templates/react-ecs/tsconfig.json +0 -23
  24. package/dist/templates/threejs/tsconfig.json +0 -23
  25. package/dist/templates/vanilla/tsconfig.json +0 -23
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- var t=require("create-create-app"),s=require("path");var e={name:"create-mud",version:"2.0.12-main-ecc8f658",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"}};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.12-type-resolutions-effc7ab1",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"}};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}}});
@@ -22,7 +22,6 @@
22
22
  "@latticexyz/world": "{{mud-version}}",
23
23
  "contracts": "workspace:*",
24
24
  "lodash": "^4.17.21",
25
- "phaser": "3.60.0-beta.14",
26
25
  "react": "^18.2.0",
27
26
  "react-dom": "^18.2.0",
28
27
  "rxjs": "7.5.5",
@@ -33,7 +32,7 @@
33
32
  "zustand": "^4.3.8"
34
33
  },
35
34
  "devDependencies": {
36
- "@types/lodash": "^4.17.4",
35
+ "@types/lodash": "^4.14.194",
37
36
  "@types/react": "18.2.22",
38
37
  "@types/react-dom": "18.2.7",
39
38
  "@types/styled-components": "^5.1.26",
@@ -1,4 +1,3 @@
1
- import Phaser from "phaser";
2
1
  import {
3
2
  defineSceneConfig,
4
3
  AssetType,
@@ -6,6 +6,9 @@
6
6
  /*
7
7
  * By default the template just creates a temporary wallet
8
8
  * (called a burner wallet).
9
+ *
10
+ * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address
11
+ * for how to use the user's own address instead.
9
12
  */
10
13
  import { getBurnerPrivateKey } from "@latticexyz/common";
11
14
 
@@ -18,6 +21,16 @@ import worlds from "contracts/worlds.json";
18
21
 
19
22
  /*
20
23
  * The supported chains.
24
+ * By default, there are only two chains here:
25
+ *
26
+ * - mudFoundry, the chain running on anvil that pnpm dev
27
+ * starts by default. It is similar to the viem anvil chain
28
+ * (see https://viem.sh/docs/clients/test.html), but with the
29
+ * basefee set to zero to avoid transaction fees.
30
+ * - latticeTestnet, our public test network.
31
+ *
32
+ * See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
33
+ * for instructions on how to add networks.
21
34
  */
22
35
  import { supportedChains } from "./supportedChains";
23
36
 
@@ -1,4 +1,3 @@
1
- import Phaser from "phaser";
2
1
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
2
  import useResizeObserver, { ResizeHandler } from "use-resize-observer";
4
3
  import { throttle } from "lodash";
@@ -1,9 +1,17 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
2
  "compilerOptions": {
4
3
  "types": ["vite/client"],
5
4
  "target": "ESNext",
5
+ "useDefineForClassFields": true,
6
+ "module": "ESNext",
6
7
  "lib": ["ESNext", "DOM"],
8
+ "moduleResolution": "Bundler",
9
+ "strict": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "esModuleInterop": true,
13
+ "noEmit": true,
14
+ "skipLibCheck": true,
7
15
  "jsx": "react-jsx",
8
16
  "jsxImportSource": "react"
9
17
  },
@@ -1,3 +1,13 @@
1
+ // Visit https://aka.ms/tsconfig.json for all config options
1
2
  {
2
- "extends": "../../tsconfig.json"
3
+ "compilerOptions": {
4
+ "target": "ES2020",
5
+ "module": "Preserve",
6
+ "strict": true,
7
+ "resolveJsonModule": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "moduleResolution": "node"
12
+ }
3
13
  }
@@ -7,6 +7,9 @@
7
7
  /*
8
8
  * By default the template just creates a temporary wallet
9
9
  * (called a burner wallet).
10
+ *
11
+ * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address
12
+ * for how to use the user's own address instead.
10
13
  */
11
14
  import { getBurnerPrivateKey } from "@latticexyz/common";
12
15
 
@@ -19,6 +22,16 @@ import worlds from "contracts/worlds.json";
19
22
 
20
23
  /*
21
24
  * The supported chains.
25
+ * By default, there are only two chains here:
26
+ *
27
+ * - mudFoundry, the chain running on anvil that pnpm dev
28
+ * starts by default. It is similar to the viem anvil chain
29
+ * (see https://viem.sh/docs/clients/test.html), but with the
30
+ * basefee set to zero to avoid transaction fees.
31
+ * - latticeTestnet, our public test network.
32
+ *
33
+ * See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
34
+ * for instructions on how to add networks.
22
35
  */
23
36
  import { supportedChains } from "./supportedChains";
24
37
 
@@ -1,9 +1,17 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
2
  "compilerOptions": {
4
3
  "types": ["vite/client"],
5
4
  "target": "ESNext",
5
+ "useDefineForClassFields": true,
6
+ "module": "ESNext",
6
7
  "lib": ["ESNext", "DOM"],
8
+ "moduleResolution": "Bundler",
9
+ "strict": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "esModuleInterop": true,
13
+ "noEmit": true,
14
+ "skipLibCheck": true,
7
15
  "jsx": "react-jsx",
8
16
  "jsxImportSource": "react"
9
17
  },
@@ -1,3 +1,13 @@
1
+ // Visit https://aka.ms/tsconfig.json for all config options
1
2
  {
2
- "extends": "../../tsconfig.json"
3
+ "compilerOptions": {
4
+ "target": "ES2020",
5
+ "module": "Preserve",
6
+ "strict": true,
7
+ "resolveJsonModule": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "moduleResolution": "node"
12
+ }
3
13
  }
@@ -7,6 +7,9 @@
7
7
  /*
8
8
  * By default the template just creates a temporary wallet
9
9
  * (called a burner wallet).
10
+ *
11
+ * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address
12
+ * for how to use the user's own address instead.
10
13
  */
11
14
  import { getBurnerPrivateKey } from "@latticexyz/common";
12
15
 
@@ -20,6 +23,15 @@ import worlds from "contracts/worlds.json";
20
23
  /*
21
24
  * The supported chains.
22
25
  * By default, there are only two chains here:
26
+ *
27
+ * - mudFoundry, the chain running on anvil that pnpm dev
28
+ * starts by default. It is similar to the viem anvil chain
29
+ * (see https://viem.sh/docs/clients/test.html), but with the
30
+ * basefee set to zero to avoid transaction fees.
31
+ * - latticeTestnet, our public test network.
32
+ *
33
+ * See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
34
+ * for instructions on how to add networks.
23
35
  */
24
36
  import { supportedChains } from "./supportedChains";
25
37
 
@@ -1,9 +1,17 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
2
  "compilerOptions": {
4
3
  "types": ["vite/client"],
5
4
  "target": "ESNext",
5
+ "useDefineForClassFields": true,
6
+ "module": "ESNext",
6
7
  "lib": ["ESNext", "DOM"],
8
+ "moduleResolution": "Bundler",
9
+ "strict": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "esModuleInterop": true,
13
+ "noEmit": true,
14
+ "skipLibCheck": true,
7
15
  "jsx": "react-jsx",
8
16
  "jsxImportSource": "react"
9
17
  },
@@ -1,3 +1,13 @@
1
+ // Visit https://aka.ms/tsconfig.json for all config options
1
2
  {
2
- "extends": "../../tsconfig.json"
3
+ "compilerOptions": {
4
+ "target": "ES2020",
5
+ "module": "Preserve",
6
+ "strict": true,
7
+ "resolveJsonModule": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "moduleResolution": "node"
12
+ }
3
13
  }
@@ -7,6 +7,9 @@
7
7
  /*
8
8
  * By default the template just creates a temporary wallet
9
9
  * (called a burner wallet).
10
+ *
11
+ * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address
12
+ * for how to use the user's own address instead.
10
13
  */
11
14
  import { getBurnerPrivateKey } from "@latticexyz/common";
12
15
 
@@ -19,6 +22,16 @@ import worlds from "contracts/worlds.json";
19
22
 
20
23
  /*
21
24
  * The supported chains.
25
+ * By default, there are only two chains here:
26
+ *
27
+ * - mudFoundry, the chain running on anvil that pnpm dev
28
+ * starts by default. It is similar to the viem anvil chain
29
+ * (see https://viem.sh/docs/clients/test.html), but with the
30
+ * basefee set to zero to avoid transaction fees.
31
+ * - latticeTestnet, our public test network.
32
+ *
33
+ * See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
34
+ * for instructions on how to add networks.
22
35
  */
23
36
  import { supportedChains } from "./supportedChains";
24
37
 
@@ -1,9 +1,17 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
2
  "compilerOptions": {
4
3
  "types": ["vite/client"],
5
4
  "target": "ESNext",
5
+ "useDefineForClassFields": true,
6
+ "module": "ESNext",
6
7
  "lib": ["ESNext", "DOM"],
8
+ "moduleResolution": "Bundler",
9
+ "strict": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "esModuleInterop": true,
13
+ "noEmit": true,
14
+ "skipLibCheck": true,
7
15
  "jsx": "react-jsx",
8
16
  "jsxImportSource": "react"
9
17
  },
@@ -1,3 +1,13 @@
1
+ // Visit https://aka.ms/tsconfig.json for all config options
1
2
  {
2
- "extends": "../../tsconfig.json"
3
+ "compilerOptions": {
4
+ "target": "ES2020",
5
+ "module": "Preserve",
6
+ "strict": true,
7
+ "resolveJsonModule": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "moduleResolution": "node"
12
+ }
3
13
  }
@@ -1,11 +1,15 @@
1
1
  /*
2
2
  * Network specific configuration for the client.
3
3
  * By default connect to the anvil test network.
4
+ *
4
5
  */
5
6
 
6
7
  /*
7
8
  * By default the template just creates a temporary wallet
8
9
  * (called a burner wallet).
10
+ *
11
+ * See https://mud.dev/tutorials/minimal/deploy#wallet-managed-address
12
+ * for how to use the user's own address instead.
9
13
  */
10
14
  import { getBurnerPrivateKey } from "@latticexyz/common";
11
15
 
@@ -18,6 +22,16 @@ import worlds from "contracts/worlds.json";
18
22
 
19
23
  /*
20
24
  * The supported chains.
25
+ * By default, there are only two chains here:
26
+ *
27
+ * - mudFoundry, the chain running on anvil that pnpm dev
28
+ * starts by default. It is similar to the viem anvil chain
29
+ * (see https://viem.sh/docs/clients/test.html), but with the
30
+ * basefee set to zero to avoid transaction fees.
31
+ * - latticeTestnet, our public test network.
32
+ *
33
+ * See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
34
+ * for instructions on how to add networks.
21
35
  */
22
36
 
23
37
  import { supportedChains } from "./supportedChains";
@@ -1,11 +1,18 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
2
  "compilerOptions": {
4
3
  "types": ["vite/client"],
5
4
  "target": "ESNext",
5
+ "useDefineForClassFields": true,
6
+ "module": "ESNext",
6
7
  "lib": ["ESNext", "DOM"],
7
- "jsx": "react-jsx",
8
- "jsxImportSource": "react"
8
+ "moduleResolution": "Bundler",
9
+ "strict": true,
10
+ "resolveJsonModule": true,
11
+ "isolatedModules": true,
12
+ "esModuleInterop": true,
13
+ "noEmit": true,
14
+ "skipLibCheck": true,
15
+ "jsx": "react-jsx"
9
16
  },
10
17
  "include": ["src"]
11
18
  }
@@ -1,3 +1,13 @@
1
+ // Visit https://aka.ms/tsconfig.json for all config options
1
2
  {
2
- "extends": "../../tsconfig.json"
3
+ "compilerOptions": {
4
+ "target": "ES2020",
5
+ "module": "Preserve",
6
+ "strict": true,
7
+ "resolveJsonModule": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "moduleResolution": "node"
12
+ }
3
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mud",
3
- "version": "2.0.12-main-ecc8f658",
3
+ "version": "2.0.12-type-resolutions-effc7ab1",
4
4
  "description": "Create a new MUD project",
5
5
  "license": "MIT",
6
6
  "author": "Lattice <mud@lattice.xyz>",
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "esnext",
4
- "moduleResolution": "Bundler",
5
- "target": "es2021",
6
- "lib": [
7
- "ESNext",
8
- // This is temporarily added until we can unbundle JS files and only include this when we import things that use DOM APIs
9
- // TODO: fix me
10
- "DOM"
11
- ],
12
- "noEmit": true,
13
- "skipLibCheck": true,
14
- "strict": true,
15
- "declaration": true,
16
- "esModuleInterop": true,
17
- "noErrorTruncation": true,
18
- "resolveJsonModule": true,
19
- "forceConsistentCasingInFileNames": true,
20
- "sourceMap": true
21
- },
22
- "exclude": ["**/dist", "**/node_modules", "**/docs", "**/e2e"]
23
- }
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "esnext",
4
- "moduleResolution": "Bundler",
5
- "target": "es2021",
6
- "lib": [
7
- "ESNext",
8
- // This is temporarily added until we can unbundle JS files and only include this when we import things that use DOM APIs
9
- // TODO: fix me
10
- "DOM"
11
- ],
12
- "noEmit": true,
13
- "skipLibCheck": true,
14
- "strict": true,
15
- "declaration": true,
16
- "esModuleInterop": true,
17
- "noErrorTruncation": true,
18
- "resolveJsonModule": true,
19
- "forceConsistentCasingInFileNames": true,
20
- "sourceMap": true
21
- },
22
- "exclude": ["**/dist", "**/node_modules", "**/docs", "**/e2e"]
23
- }
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "esnext",
4
- "moduleResolution": "Bundler",
5
- "target": "es2021",
6
- "lib": [
7
- "ESNext",
8
- // This is temporarily added until we can unbundle JS files and only include this when we import things that use DOM APIs
9
- // TODO: fix me
10
- "DOM"
11
- ],
12
- "noEmit": true,
13
- "skipLibCheck": true,
14
- "strict": true,
15
- "declaration": true,
16
- "esModuleInterop": true,
17
- "noErrorTruncation": true,
18
- "resolveJsonModule": true,
19
- "forceConsistentCasingInFileNames": true,
20
- "sourceMap": true
21
- },
22
- "exclude": ["**/dist", "**/node_modules", "**/docs", "**/e2e"]
23
- }
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "esnext",
4
- "moduleResolution": "Bundler",
5
- "target": "es2021",
6
- "lib": [
7
- "ESNext",
8
- // This is temporarily added until we can unbundle JS files and only include this when we import things that use DOM APIs
9
- // TODO: fix me
10
- "DOM"
11
- ],
12
- "noEmit": true,
13
- "skipLibCheck": true,
14
- "strict": true,
15
- "declaration": true,
16
- "esModuleInterop": true,
17
- "noErrorTruncation": true,
18
- "resolveJsonModule": true,
19
- "forceConsistentCasingInFileNames": true,
20
- "sourceMap": true
21
- },
22
- "exclude": ["**/dist", "**/node_modules", "**/docs", "**/e2e"]
23
- }
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "esnext",
4
- "moduleResolution": "Bundler",
5
- "target": "es2021",
6
- "lib": [
7
- "ESNext",
8
- // This is temporarily added until we can unbundle JS files and only include this when we import things that use DOM APIs
9
- // TODO: fix me
10
- "DOM"
11
- ],
12
- "noEmit": true,
13
- "skipLibCheck": true,
14
- "strict": true,
15
- "declaration": true,
16
- "esModuleInterop": true,
17
- "noErrorTruncation": true,
18
- "resolveJsonModule": true,
19
- "forceConsistentCasingInFileNames": true,
20
- "sourceMap": true
21
- },
22
- "exclude": ["**/dist", "**/node_modules", "**/docs", "**/e2e"]
23
- }