@latticexyz/config 2.2.18-9fa07c8489f1fbf167d0db01cd9aaa645a29c8e2 → 2.2.18-c2ad22c7feb566e1731ff16e8be291746bdffb3e
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/deprecated/node.js +1 -41
- package/dist/deprecated/node.js.map +1 -1
- package/package.json +6 -33
- package/dist/deprecated/node.cjs +0 -84
- package/dist/deprecated/node.cjs.map +0 -1
- package/dist/deprecated/node.d.cts +0 -6
- package/dist/index.cjs +0 -19
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -60
- package/dist/internal.cjs +0 -2
- package/dist/internal.cjs.map +0 -1
- package/dist/internal.d.cts +0 -2
package/dist/deprecated/node.js
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { findUp } from "find-up";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { pathToFileURL } from "url";
|
|
5
|
-
import os from "os";
|
|
6
|
-
import fs from "fs/promises";
|
|
7
|
-
import { tsImport } from "tsx/esm/api";
|
|
8
|
-
import { require as tsRequire } from "tsx/cjs/api";
|
|
9
|
-
var configFiles = ["mud.config.js", "mud.config.mjs", "mud.config.ts", "mud.config.mts"];
|
|
10
|
-
async function loadConfig(configPath) {
|
|
11
|
-
configPath = await resolveConfigPath(configPath);
|
|
12
|
-
const packageJsonPath = await findUp("package.json", { cwd: path.dirname(configPath) });
|
|
13
|
-
if (!packageJsonPath) throw new Error(`Could not find package.json for config at "${configPath}".`);
|
|
14
|
-
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
|
|
15
|
-
if (!packageJson.type || packageJson.type === "commonjs") {
|
|
16
|
-
return tsRequire(`${configPath}?update=${Date.now()}`, import.meta.url).default;
|
|
17
|
-
}
|
|
18
|
-
return (await tsImport(configPath, import.meta.url)).default;
|
|
19
|
-
}
|
|
20
|
-
async function resolveConfigPath(configPath, toFileURL) {
|
|
21
|
-
if (configPath === void 0) {
|
|
22
|
-
configPath = await getUserConfigPath();
|
|
23
|
-
} else {
|
|
24
|
-
if (!path.isAbsolute(configPath)) {
|
|
25
|
-
configPath = path.join(process.cwd(), configPath);
|
|
26
|
-
configPath = path.normalize(configPath);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return toFileURL && os.platform() === "win32" ? pathToFileURL(configPath).href : configPath;
|
|
30
|
-
}
|
|
31
|
-
async function getUserConfigPath() {
|
|
32
|
-
const tsConfigPath = await findUp(configFiles);
|
|
33
|
-
if (tsConfigPath === void 0) {
|
|
34
|
-
throw new Error("Did not find a `mud.config.ts` file. Are you inside a MUD project?");
|
|
35
|
-
}
|
|
36
|
-
return tsConfigPath;
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
loadConfig,
|
|
40
|
-
resolveConfigPath
|
|
41
|
-
};
|
|
1
|
+
import{findUp as i}from"find-up";import e from"path";import{pathToFileURL as n}from"url";import s from"os";import a from"fs/promises";import{tsImport as m}from"tsx/esm/api";import{require as f}from"tsx/cjs/api";var p=["mud.config.js","mud.config.mjs","mud.config.ts","mud.config.mts"];async function C(r){r=await u(r);let o=await i("package.json",{cwd:e.dirname(r)});if(!o)throw new Error(`Could not find package.json for config at "${r}".`);let t=JSON.parse(await a.readFile(o,"utf8"));return!t.type||t.type==="commonjs"?f(`${r}?update=${Date.now()}`,import.meta.url).default:(await m(r,import.meta.url)).default}async function u(r,o){return r===void 0?r=await d():e.isAbsolute(r)||(r=e.join(process.cwd(),r),r=e.normalize(r)),o&&s.platform()==="win32"?n(r).href:r}async function d(){let r=await i(p);if(r===void 0)throw new Error("Did not find a `mud.config.ts` file. Are you inside a MUD project?");return r}export{C as loadConfig,u as resolveConfigPath};
|
|
42
2
|
//# sourceMappingURL=node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/deprecated/node/loadConfig.ts"],"sourcesContent":["import { findUp } from \"find-up\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport os from \"os\";\nimport fs from \"fs/promises\";\nimport { tsImport } from \"tsx/esm/api\";\nimport { require as tsRequire } from \"tsx/cjs/api\";\n\n// In order of preference files are checked\n/** @deprecated */\nconst configFiles = [\"mud.config.js\", \"mud.config.mjs\", \"mud.config.ts\", \"mud.config.mts\"];\n\n/** @deprecated */\nexport async function loadConfig(configPath?: string): Promise<unknown> {\n configPath = await resolveConfigPath(configPath);\n // load nearest package.json to figure out if we need to import with ESM or CJS\n const packageJsonPath = await findUp(\"package.json\", { cwd: path.dirname(configPath) });\n if (!packageJsonPath) throw new Error(`Could not find package.json for config at \"${configPath}\".`);\n const packageJson = JSON.parse(await fs.readFile(packageJsonPath, \"utf8\"));\n // use require if cjs\n if (!packageJson.type || packageJson.type === \"commonjs\") {\n // tsRequire has an internal cache, so we need to append data to reload the config\n // this helps with things like the mud dev runner that reevalutes the config on changes\n return tsRequire(`${configPath}?update=${Date.now()}`, import.meta.url).default;\n }\n // otherwise default to esm\n // this is not cached, so we don't need to append anything to the config path\n return (await tsImport(configPath, import.meta.url)).default;\n}\n\n/** @deprecated */\nexport async function resolveConfigPath(configPath?: string, toFileURL?: boolean) {\n if (configPath === undefined) {\n configPath = await getUserConfigPath();\n } else {\n if (!path.isAbsolute(configPath)) {\n configPath = path.join(process.cwd(), configPath);\n configPath = path.normalize(configPath);\n }\n }\n\n // Add `file:///` for Windows support\n // (see https://github.com/nodejs/node/issues/31710)\n return toFileURL && os.platform() === \"win32\" ? pathToFileURL(configPath).href : configPath;\n}\n\n/** @deprecated */\nasync function getUserConfigPath() {\n const tsConfigPath = await findUp(configFiles);\n if (tsConfigPath === undefined) {\n throw new Error(\"Did not find a `mud.config.ts` file. Are you inside a MUD project?\");\n }\n return tsConfigPath;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/deprecated/node/loadConfig.ts"],"sourcesContent":["import { findUp } from \"find-up\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport os from \"os\";\nimport fs from \"fs/promises\";\nimport { tsImport } from \"tsx/esm/api\";\nimport { require as tsRequire } from \"tsx/cjs/api\";\n\n// In order of preference files are checked\n/** @deprecated */\nconst configFiles = [\"mud.config.js\", \"mud.config.mjs\", \"mud.config.ts\", \"mud.config.mts\"];\n\n/** @deprecated */\nexport async function loadConfig(configPath?: string): Promise<unknown> {\n configPath = await resolveConfigPath(configPath);\n // load nearest package.json to figure out if we need to import with ESM or CJS\n const packageJsonPath = await findUp(\"package.json\", { cwd: path.dirname(configPath) });\n if (!packageJsonPath) throw new Error(`Could not find package.json for config at \"${configPath}\".`);\n const packageJson = JSON.parse(await fs.readFile(packageJsonPath, \"utf8\"));\n // use require if cjs\n if (!packageJson.type || packageJson.type === \"commonjs\") {\n // tsRequire has an internal cache, so we need to append data to reload the config\n // this helps with things like the mud dev runner that reevalutes the config on changes\n return tsRequire(`${configPath}?update=${Date.now()}`, import.meta.url).default;\n }\n // otherwise default to esm\n // this is not cached, so we don't need to append anything to the config path\n return (await tsImport(configPath, import.meta.url)).default;\n}\n\n/** @deprecated */\nexport async function resolveConfigPath(configPath?: string, toFileURL?: boolean) {\n if (configPath === undefined) {\n configPath = await getUserConfigPath();\n } else {\n if (!path.isAbsolute(configPath)) {\n configPath = path.join(process.cwd(), configPath);\n configPath = path.normalize(configPath);\n }\n }\n\n // Add `file:///` for Windows support\n // (see https://github.com/nodejs/node/issues/31710)\n return toFileURL && os.platform() === \"win32\" ? pathToFileURL(configPath).href : configPath;\n}\n\n/** @deprecated */\nasync function getUserConfigPath() {\n const tsConfigPath = await findUp(configFiles);\n if (tsConfigPath === undefined) {\n throw new Error(\"Did not find a `mud.config.ts` file. Are you inside a MUD project?\");\n }\n return tsConfigPath;\n}\n"],"mappings":"AAAA,OAAS,UAAAA,MAAc,UACvB,OAAOC,MAAU,OACjB,OAAS,iBAAAC,MAAqB,MAC9B,OAAOC,MAAQ,KACf,OAAOC,MAAQ,cACf,OAAS,YAAAC,MAAgB,cACzB,OAAS,WAAWC,MAAiB,cAIrC,IAAMC,EAAc,CAAC,gBAAiB,iBAAkB,gBAAiB,gBAAgB,EAGzF,eAAsBC,EAAWC,EAAuC,CACtEA,EAAa,MAAMC,EAAkBD,CAAU,EAE/C,IAAME,EAAkB,MAAMX,EAAO,eAAgB,CAAE,IAAKC,EAAK,QAAQQ,CAAU,CAAE,CAAC,EACtF,GAAI,CAACE,EAAiB,MAAM,IAAI,MAAM,8CAA8CF,CAAU,IAAI,EAClG,IAAMG,EAAc,KAAK,MAAM,MAAMR,EAAG,SAASO,EAAiB,MAAM,CAAC,EAEzE,MAAI,CAACC,EAAY,MAAQA,EAAY,OAAS,WAGrCN,EAAU,GAAGG,CAAU,WAAW,KAAK,IAAI,CAAC,GAAI,YAAY,GAAG,EAAE,SAIlE,MAAMJ,EAASI,EAAY,YAAY,GAAG,GAAG,OACvD,CAGA,eAAsBC,EAAkBD,EAAqBI,EAAqB,CAChF,OAAIJ,IAAe,OACjBA,EAAa,MAAMK,EAAkB,EAEhCb,EAAK,WAAWQ,CAAU,IAC7BA,EAAaR,EAAK,KAAK,QAAQ,IAAI,EAAGQ,CAAU,EAChDA,EAAaR,EAAK,UAAUQ,CAAU,GAMnCI,GAAaV,EAAG,SAAS,IAAM,QAAUD,EAAcO,CAAU,EAAE,KAAOA,CACnF,CAGA,eAAeK,GAAoB,CACjC,IAAMC,EAAe,MAAMf,EAAOO,CAAW,EAC7C,GAAIQ,IAAiB,OACnB,MAAM,IAAI,MAAM,oEAAoE,EAEtF,OAAOA,CACT","names":["findUp","path","pathToFileURL","os","fs","tsImport","tsRequire","configFiles","loadConfig","configPath","resolveConfigPath","packageJsonPath","packageJson","toFileURL","getUserConfigPath","tsConfigPath"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latticexyz/config",
|
|
3
|
-
"version": "2.2.18-
|
|
3
|
+
"version": "2.2.18-c2ad22c7feb566e1731ff16e8be291746bdffb3e",
|
|
4
4
|
"description": "Config for Store and World",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,36 +10,9 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|
|
13
|
-
".":
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"types": "./dist/index.d.ts"
|
|
17
|
-
},
|
|
18
|
-
"require": {
|
|
19
|
-
"require": "./dist/index.cjs",
|
|
20
|
-
"types": "./dist/index.d.cts"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"./internal": {
|
|
24
|
-
"import": {
|
|
25
|
-
"import": "./dist/internal.js",
|
|
26
|
-
"types": "./dist/internal.d.ts"
|
|
27
|
-
},
|
|
28
|
-
"require": {
|
|
29
|
-
"require": "./dist/internal.cjs",
|
|
30
|
-
"types": "./dist/internal.d.cts"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"./node": {
|
|
34
|
-
"import": {
|
|
35
|
-
"import": "./dist/deprecated/node.js",
|
|
36
|
-
"types": "./dist/deprecated/node.d.ts"
|
|
37
|
-
},
|
|
38
|
-
"require": {
|
|
39
|
-
"require": "./dist/deprecated/node.cjs",
|
|
40
|
-
"types": "./dist/deprecated/node.d.cts"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
13
|
+
".": "./dist/index.js",
|
|
14
|
+
"./internal": "./dist/internal.js",
|
|
15
|
+
"./node": "./dist/deprecated/node.js"
|
|
43
16
|
},
|
|
44
17
|
"typesVersions": {
|
|
45
18
|
"*": {
|
|
@@ -61,8 +34,8 @@
|
|
|
61
34
|
"@ark/util": "0.2.2",
|
|
62
35
|
"find-up": "^6.3.0",
|
|
63
36
|
"tsx": "^4.19.1",
|
|
64
|
-
"@latticexyz/common": "2.2.18-
|
|
65
|
-
"@latticexyz/schema-type": "2.2.18-
|
|
37
|
+
"@latticexyz/common": "2.2.18-c2ad22c7feb566e1731ff16e8be291746bdffb3e",
|
|
38
|
+
"@latticexyz/schema-type": "2.2.18-c2ad22c7feb566e1731ff16e8be291746bdffb3e"
|
|
66
39
|
},
|
|
67
40
|
"devDependencies": {
|
|
68
41
|
"viem": "2.21.19"
|
package/dist/deprecated/node.cjs
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/deprecated/node/index.ts
|
|
31
|
-
var node_exports = {};
|
|
32
|
-
__export(node_exports, {
|
|
33
|
-
loadConfig: () => loadConfig,
|
|
34
|
-
resolveConfigPath: () => resolveConfigPath
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(node_exports);
|
|
37
|
-
|
|
38
|
-
// ../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.47.7_@types+node@20.17.16__jiti@1.21.6_postcss@8.5.1_ts_rihtmhm6tp3cagz6w7ivhbdyn4/node_modules/tsup/assets/cjs_shims.js
|
|
39
|
-
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
40
|
-
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
41
|
-
|
|
42
|
-
// src/deprecated/node/loadConfig.ts
|
|
43
|
-
var import_find_up = require("find-up");
|
|
44
|
-
var import_path = __toESM(require("path"), 1);
|
|
45
|
-
var import_url = require("url");
|
|
46
|
-
var import_os = __toESM(require("os"), 1);
|
|
47
|
-
var import_promises = __toESM(require("fs/promises"), 1);
|
|
48
|
-
var import_api = require("tsx/esm/api");
|
|
49
|
-
var import_api2 = require("tsx/cjs/api");
|
|
50
|
-
var configFiles = ["mud.config.js", "mud.config.mjs", "mud.config.ts", "mud.config.mts"];
|
|
51
|
-
async function loadConfig(configPath) {
|
|
52
|
-
configPath = await resolveConfigPath(configPath);
|
|
53
|
-
const packageJsonPath = await (0, import_find_up.findUp)("package.json", { cwd: import_path.default.dirname(configPath) });
|
|
54
|
-
if (!packageJsonPath) throw new Error(`Could not find package.json for config at "${configPath}".`);
|
|
55
|
-
const packageJson = JSON.parse(await import_promises.default.readFile(packageJsonPath, "utf8"));
|
|
56
|
-
if (!packageJson.type || packageJson.type === "commonjs") {
|
|
57
|
-
return (0, import_api2.require)(`${configPath}?update=${Date.now()}`, importMetaUrl).default;
|
|
58
|
-
}
|
|
59
|
-
return (await (0, import_api.tsImport)(configPath, importMetaUrl)).default;
|
|
60
|
-
}
|
|
61
|
-
async function resolveConfigPath(configPath, toFileURL) {
|
|
62
|
-
if (configPath === void 0) {
|
|
63
|
-
configPath = await getUserConfigPath();
|
|
64
|
-
} else {
|
|
65
|
-
if (!import_path.default.isAbsolute(configPath)) {
|
|
66
|
-
configPath = import_path.default.join(process.cwd(), configPath);
|
|
67
|
-
configPath = import_path.default.normalize(configPath);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return toFileURL && import_os.default.platform() === "win32" ? (0, import_url.pathToFileURL)(configPath).href : configPath;
|
|
71
|
-
}
|
|
72
|
-
async function getUserConfigPath() {
|
|
73
|
-
const tsConfigPath = await (0, import_find_up.findUp)(configFiles);
|
|
74
|
-
if (tsConfigPath === void 0) {
|
|
75
|
-
throw new Error("Did not find a `mud.config.ts` file. Are you inside a MUD project?");
|
|
76
|
-
}
|
|
77
|
-
return tsConfigPath;
|
|
78
|
-
}
|
|
79
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
-
0 && (module.exports = {
|
|
81
|
-
loadConfig,
|
|
82
|
-
resolveConfigPath
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=node.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/deprecated/node/index.ts","../../../../node_modules/.pnpm/tsup@8.3.0_@microsoft+api-extractor@7.47.7_@types+node@20.17.16__jiti@1.21.6_postcss@8.5.1_ts_rihtmhm6tp3cagz6w7ivhbdyn4/node_modules/tsup/assets/cjs_shims.js","../../src/deprecated/node/loadConfig.ts"],"sourcesContent":["export * from \"./loadConfig\";\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","import { findUp } from \"find-up\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport os from \"os\";\nimport fs from \"fs/promises\";\nimport { tsImport } from \"tsx/esm/api\";\nimport { require as tsRequire } from \"tsx/cjs/api\";\n\n// In order of preference files are checked\n/** @deprecated */\nconst configFiles = [\"mud.config.js\", \"mud.config.mjs\", \"mud.config.ts\", \"mud.config.mts\"];\n\n/** @deprecated */\nexport async function loadConfig(configPath?: string): Promise<unknown> {\n configPath = await resolveConfigPath(configPath);\n // load nearest package.json to figure out if we need to import with ESM or CJS\n const packageJsonPath = await findUp(\"package.json\", { cwd: path.dirname(configPath) });\n if (!packageJsonPath) throw new Error(`Could not find package.json for config at \"${configPath}\".`);\n const packageJson = JSON.parse(await fs.readFile(packageJsonPath, \"utf8\"));\n // use require if cjs\n if (!packageJson.type || packageJson.type === \"commonjs\") {\n // tsRequire has an internal cache, so we need to append data to reload the config\n // this helps with things like the mud dev runner that reevalutes the config on changes\n return tsRequire(`${configPath}?update=${Date.now()}`, import.meta.url).default;\n }\n // otherwise default to esm\n // this is not cached, so we don't need to append anything to the config path\n return (await tsImport(configPath, import.meta.url)).default;\n}\n\n/** @deprecated */\nexport async function resolveConfigPath(configPath?: string, toFileURL?: boolean) {\n if (configPath === undefined) {\n configPath = await getUserConfigPath();\n } else {\n if (!path.isAbsolute(configPath)) {\n configPath = path.join(process.cwd(), configPath);\n configPath = path.normalize(configPath);\n }\n }\n\n // Add `file:///` for Windows support\n // (see https://github.com/nodejs/node/issues/31710)\n return toFileURL && os.platform() === \"win32\" ? pathToFileURL(configPath).href : configPath;\n}\n\n/** @deprecated */\nasync function getUserConfigPath() {\n const tsConfigPath = await findUp(configFiles);\n if (tsConfigPath === undefined) {\n throw new Error(\"Did not find a `mud.config.ts` file. Are you inside a MUD project?\");\n }\n return tsConfigPath;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,OAClD,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEpC,IAAM,gBAAgC,iCAAiB;;;ACX9D,qBAAuB;AACvB,kBAAiB;AACjB,iBAA8B;AAC9B,gBAAe;AACf,sBAAe;AACf,iBAAyB;AACzB,IAAAA,cAAqC;AAIrC,IAAM,cAAc,CAAC,iBAAiB,kBAAkB,iBAAiB,gBAAgB;AAGzF,eAAsB,WAAW,YAAuC;AACtE,eAAa,MAAM,kBAAkB,UAAU;AAE/C,QAAM,kBAAkB,UAAM,uBAAO,gBAAgB,EAAE,KAAK,YAAAC,QAAK,QAAQ,UAAU,EAAE,CAAC;AACtF,MAAI,CAAC,gBAAiB,OAAM,IAAI,MAAM,8CAA8C,UAAU,IAAI;AAClG,QAAM,cAAc,KAAK,MAAM,MAAM,gBAAAC,QAAG,SAAS,iBAAiB,MAAM,CAAC;AAEzE,MAAI,CAAC,YAAY,QAAQ,YAAY,SAAS,YAAY;AAGxD,eAAO,YAAAC,SAAU,GAAG,UAAU,WAAW,KAAK,IAAI,CAAC,IAAI,aAAe,EAAE;AAAA,EAC1E;AAGA,UAAQ,UAAM,qBAAS,YAAY,aAAe,GAAG;AACvD;AAGA,eAAsB,kBAAkB,YAAqB,WAAqB;AAChF,MAAI,eAAe,QAAW;AAC5B,iBAAa,MAAM,kBAAkB;AAAA,EACvC,OAAO;AACL,QAAI,CAAC,YAAAF,QAAK,WAAW,UAAU,GAAG;AAChC,mBAAa,YAAAA,QAAK,KAAK,QAAQ,IAAI,GAAG,UAAU;AAChD,mBAAa,YAAAA,QAAK,UAAU,UAAU;AAAA,IACxC;AAAA,EACF;AAIA,SAAO,aAAa,UAAAG,QAAG,SAAS,MAAM,cAAU,0BAAc,UAAU,EAAE,OAAO;AACnF;AAGA,eAAe,oBAAoB;AACjC,QAAM,eAAe,UAAM,uBAAO,WAAW;AAC7C,MAAI,iBAAiB,QAAW;AAC9B,UAAM,IAAI,MAAM,oEAAoE;AAAA,EACtF;AACA,SAAO;AACT;","names":["import_api","path","fs","tsRequire","os"]}
|
package/dist/index.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/exports/index.ts
|
|
17
|
-
var exports_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(exports_exports);
|
|
19
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/exports/index.ts"],"sourcesContent":["/**\n * External exports.\n *\n * Be sure we're ready to commit to these being supported and changes made backward compatible!\n */\n\nexport type { AbiType, StaticAbiType, DynamicAbiType, Schema, Table, Tables } from \"../common\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/index.d.cts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Hex } from 'viem';
|
|
2
|
-
import { StaticAbiType, DynamicAbiType } from '@latticexyz/schema-type/internal';
|
|
3
|
-
export { DynamicAbiType, StaticAbiType } from '@latticexyz/schema-type/internal';
|
|
4
|
-
import { ResourceType } from '@latticexyz/common';
|
|
5
|
-
import { satisfy } from '@ark/util';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Common output types of a MUD config. We use these types as inputs for libraries.
|
|
9
|
-
*/
|
|
10
|
-
type AbiType = StaticAbiType | DynamicAbiType;
|
|
11
|
-
|
|
12
|
-
type Schema = {
|
|
13
|
-
readonly [fieldName: string]: {
|
|
14
|
-
/** the Solidity primitive ABI type */
|
|
15
|
-
readonly type: AbiType;
|
|
16
|
-
/** the user defined type or Solidity primitive ABI type */
|
|
17
|
-
readonly internalType: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
type Table = {
|
|
21
|
-
/**
|
|
22
|
-
* Human-readable label for this table. Used as config keys, library names, and filenames.
|
|
23
|
-
* Labels are not length constrained like resource names, but special characters should be avoided to be compatible with the filesystem, Solidity compiler, etc.
|
|
24
|
-
*/
|
|
25
|
-
readonly label: string;
|
|
26
|
-
/**
|
|
27
|
-
* Human-readable label for this table's namespace. Used for namespace config keys and directory names.
|
|
28
|
-
*/
|
|
29
|
-
readonly namespaceLabel: string;
|
|
30
|
-
/**
|
|
31
|
-
* Table type used in table's resource ID and determines how storage and events are used by this table.
|
|
32
|
-
*/
|
|
33
|
-
readonly type: satisfy<ResourceType, "table" | "offchainTable">;
|
|
34
|
-
/**
|
|
35
|
-
* Table namespace used in table's resource ID and determines access control.
|
|
36
|
-
*/
|
|
37
|
-
readonly namespace: string;
|
|
38
|
-
/**
|
|
39
|
-
* Table name used in table's resource ID.
|
|
40
|
-
*/
|
|
41
|
-
readonly name: string;
|
|
42
|
-
/**
|
|
43
|
-
* Table's resource ID.
|
|
44
|
-
*/
|
|
45
|
-
readonly tableId: Hex;
|
|
46
|
-
/**
|
|
47
|
-
* Schema definition for this table's records.
|
|
48
|
-
*/
|
|
49
|
-
readonly schema: Schema;
|
|
50
|
-
/**
|
|
51
|
-
* Primary key for records of this table. An array of zero or more schema field names.
|
|
52
|
-
* Using an empty array acts like a singleton, where only one record can exist for this table.
|
|
53
|
-
*/
|
|
54
|
-
readonly key: readonly string[];
|
|
55
|
-
};
|
|
56
|
-
type Tables = {
|
|
57
|
-
readonly [label: string]: Table;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export type { AbiType, Schema, Table, Tables };
|
package/dist/internal.cjs
DELETED
package/dist/internal.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/internal.d.cts
DELETED