@latticexyz/cli 2.0.0-alpha.78 → 2.0.0-alpha.8

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 (66) hide show
  1. package/dist/{chunk-TPZUS44H.js → chunk-6V563IAZ.js} +5 -5
  2. package/dist/{chunk-O6HOO6WA.js → chunk-L4YLJHLJ.js} +1 -9
  3. package/dist/{chunk-TLEAEDUA.js → chunk-QAJBBYA2.js} +357 -224
  4. package/dist/{chunk-KPBNUPK6.js → chunk-SKNB74MT.js} +155 -159
  5. package/dist/chunk-VQTZJIFF.js +353 -0
  6. package/dist/{chunk-DO7OWTMM.js → chunk-WZFXLDPK.js} +7 -9
  7. package/dist/{chunk-XUNWAEP7.js → chunk-YL4GJLLL.js} +5345 -6628
  8. package/dist/index.d.ts +2 -4
  9. package/dist/index.js +0 -22
  10. package/dist/mud.js +311 -318
  11. package/dist/mud2.js +7 -9
  12. package/dist/render-solidity/index.d.ts +2 -3
  13. package/dist/render-solidity/index.js +3 -4
  14. package/dist/render-ts/index.d.ts +2 -3
  15. package/dist/render-ts/index.js +3 -4
  16. package/dist/utils/deprecated/index.js +2 -2
  17. package/dist/utils/index.d.ts +3 -15
  18. package/dist/utils/index.js +4 -15
  19. package/package.json +36 -37
  20. package/src/commands/deploy-v2.ts +8 -4
  21. package/src/commands/deprecated/test.ts +1 -1
  22. package/src/commands/gas-report.ts +54 -55
  23. package/src/commands/set-version.ts +39 -10
  24. package/src/commands/tablegen.ts +1 -1
  25. package/src/commands/tsgen.ts +1 -1
  26. package/src/commands/worldgen.ts +1 -2
  27. package/src/contracts/BulkUpload.sol +13 -20
  28. package/src/contracts/Deploy.sol +3 -3
  29. package/src/contracts/LibDeploy.sol +1 -1
  30. package/src/contracts/LibDeployStub.sol +1 -1
  31. package/src/index.ts +1 -15
  32. package/src/render-solidity/common.ts +4 -4
  33. package/src/render-solidity/renderTypesFromConfig.ts +1 -1
  34. package/src/render-solidity/tableOptions.ts +2 -2
  35. package/src/render-solidity/tablegen.ts +1 -1
  36. package/src/render-solidity/types.ts +1 -1
  37. package/src/render-solidity/userType.ts +1 -2
  38. package/src/render-solidity/worldgen.ts +3 -3
  39. package/src/render-ts/recsV1TableOptions.ts +2 -2
  40. package/src/render-ts/renderRecsV1Tables.ts +2 -2
  41. package/src/render-ts/tsgen.ts +1 -1
  42. package/src/render-ts/types.ts +1 -1
  43. package/src/utils/contractToInterface.ts +1 -1
  44. package/src/utils/deploy-v2.ts +79 -78
  45. package/src/utils/errors.ts +3 -23
  46. package/dist/chunk-5NC2OON2.js +0 -164
  47. package/dist/chunk-FFY7VTYB.js +0 -14358
  48. package/dist/chunk-MN3HYFJK.js +0 -442
  49. package/dist/config/index.d.ts +0 -409
  50. package/dist/config/index.js +0 -85
  51. package/dist/parseStoreConfig-8aa69ac9.d.ts +0 -377
  52. package/src/config/commonSchemas.ts +0 -34
  53. package/src/config/dynamicResolution.ts +0 -49
  54. package/src/config/index.ts +0 -24
  55. package/src/config/loadConfig.ts +0 -40
  56. package/src/config/loadStoreConfig.ts +0 -18
  57. package/src/config/parseStoreConfig.test-d.ts +0 -40
  58. package/src/config/parseStoreConfig.ts +0 -317
  59. package/src/config/validation.ts +0 -163
  60. package/src/config/world/index.ts +0 -4
  61. package/src/config/world/loadWorldConfig.test-d.ts +0 -11
  62. package/src/config/world/loadWorldConfig.ts +0 -26
  63. package/src/config/world/parseWorldConfig.ts +0 -56
  64. package/src/config/world/resolveWorldConfig.ts +0 -80
  65. package/src/config/world/userTypes.ts +0 -74
  66. package/src/utils/typeUtils.ts +0 -17
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatAndWriteTypescript,
3
3
  resolveAbiOrUserType
4
- } from "./chunk-5NC2OON2.js";
4
+ } from "./chunk-SKNB74MT.js";
5
5
 
6
6
  // src/render-ts/schemaTypesToRecsTypeStrings.ts
7
7
  var schemaTypesToRecsTypeStrings = {
@@ -224,7 +224,7 @@ function getRecsV1TableOptions(config) {
224
224
  continue;
225
225
  const staticResourceData = {
226
226
  namespace: config.namespace,
227
- fileSelector: tableData.fileSelector
227
+ name: tableData.name
228
228
  };
229
229
  tableOptions.push({
230
230
  tableName,
@@ -253,12 +253,12 @@ export function defineContractComponents(world: World) {
253
253
  `;
254
254
  }
255
255
  function renderDefineComponent(table) {
256
- const { namespace, fileSelector } = table.staticResourceData;
256
+ const { namespace, name } = table.staticResourceData;
257
257
  return `
258
258
  (() => {
259
- const tableId = new TableId("${namespace}", "${fileSelector}");
259
+ const tableId = new TableId("${namespace}", "${name}");
260
260
  return defineComponent(world, {
261
- ${table.fields.map(({ name, recsTypeString }) => `${name}: ${recsTypeString},`).join("")}
261
+ ${table.fields.map(({ name: name2, recsTypeString }) => `${name2}: ${recsTypeString},`).join("")}
262
262
  }, {
263
263
  metadata: { contractId: tableId.toHexString(), tableId: tableId.toString() },
264
264
  });
@@ -4,14 +4,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined")
11
- return require.apply(this, arguments);
12
- throw new Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
- var __commonJS = (cb, mod) => function __require2() {
7
+ var __commonJS = (cb, mod) => function __require() {
15
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
9
  };
17
10
  var __copyProps = (to, from, except, desc) => {
@@ -32,7 +25,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
25
  ));
33
26
 
34
27
  export {
35
- __require,
36
28
  __commonJS,
37
29
  __toESM
38
30
  };