@latticexyz/cli 1.40.0 → 1.41.1-alpha.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.
- package/LICENSE +21 -0
- package/dist/chunk-ATAWDHWC.js +67 -0
- package/dist/{chunk-6AQ6LFVZ.js → chunk-J4DJQNIC.js} +743 -103
- package/dist/chunk-KD354QKC.js +23039 -0
- package/dist/{chunk-S3V3XX7N.js → chunk-SLIMIO4Z.js} +1 -1
- package/dist/config/index.d.ts +746 -8
- package/dist/config/index.js +63 -17
- package/dist/index.d.ts +1 -2
- package/dist/index.js +14 -10
- package/dist/mud.js +1055 -49
- package/dist/utils/deprecated/index.js +2 -2
- package/dist/utils/index.d.ts +56 -7
- package/dist/utils/index.js +17 -3
- package/package.json +16 -11
- package/src/commands/deploy-v2.ts +96 -0
- package/src/commands/deprecated/call-system.ts +1 -1
- package/src/commands/deprecated/deploy-contracts.ts +1 -1
- package/src/commands/deprecated/test.ts +9 -6
- package/src/commands/deprecated/trace.ts +1 -1
- package/src/commands/gas-report.ts +1 -1
- package/src/commands/index.ts +4 -0
- package/src/commands/tablegen.ts +4 -18
- package/src/commands/worldgen.ts +55 -0
- package/src/config/commonSchemas.ts +19 -5
- package/src/config/dynamicResolution.ts +49 -0
- package/src/config/index.ts +20 -0
- package/src/config/loadStoreConfig.ts +3 -89
- package/src/config/parseStoreConfig.test-d.ts +40 -0
- package/src/config/parseStoreConfig.ts +314 -0
- package/src/config/validation.ts +71 -0
- package/src/config/world/index.ts +4 -0
- package/src/config/world/loadWorldConfig.test-d.ts +11 -0
- package/src/config/world/loadWorldConfig.ts +26 -0
- package/src/config/world/parseWorldConfig.ts +55 -0
- package/src/config/world/resolveWorldConfig.ts +80 -0
- package/src/config/world/userTypes.ts +72 -0
- package/src/index.ts +13 -5
- package/src/mud.ts +4 -0
- package/src/render-solidity/common.ts +138 -0
- package/src/render-solidity/field.ts +137 -0
- package/src/render-solidity/index.ts +10 -0
- package/src/render-solidity/record.ts +154 -0
- package/src/render-solidity/renderSystemInterface.ts +31 -0
- package/src/render-solidity/renderTable.ts +164 -0
- package/src/render-solidity/renderTypeHelpers.ts +99 -0
- package/src/render-solidity/renderTypes.ts +19 -0
- package/src/render-solidity/renderTypesFromConfig.ts +13 -0
- package/src/render-solidity/renderWorld.ts +24 -0
- package/src/{render-table/renderTablesFromConfig.ts → render-solidity/tableOptions.ts} +45 -37
- package/src/render-solidity/tablegen.ts +33 -0
- package/src/render-solidity/types.ts +110 -0
- package/src/render-solidity/userType.ts +132 -0
- package/src/render-solidity/worldgen.ts +60 -0
- package/src/utils/contractToInterface.ts +130 -0
- package/src/utils/deploy-v2.ts +512 -0
- package/src/utils/deprecated/build.ts +1 -1
- package/src/utils/deprecated/typegen.ts +1 -1
- package/src/utils/errors.ts +12 -2
- package/src/utils/execLog.ts +22 -0
- package/src/utils/formatAndWrite.ts +12 -0
- package/src/utils/foundry.ts +94 -0
- package/src/utils/getChainId.ts +10 -0
- package/src/utils/index.ts +2 -1
- package/src/utils/typeUtils.ts +17 -0
- package/dist/chunk-B6VWCGHZ.js +0 -199
- package/dist/chunk-JKAA3WMC.js +0 -55
- package/dist/chunk-JNGSW4AP.js +0 -493
- package/dist/chunk-PJ6GS2R4.js +0 -22
- package/dist/chunk-UC3QPOON.js +0 -35
- package/dist/loadStoreConfig-37f99136.d.ts +0 -164
- package/dist/render-table/index.d.ts +0 -29
- package/dist/render-table/index.js +0 -24
- package/dist/renderTable-9e6410c5.d.ts +0 -72
- package/src/config/loadStoreConfig.test-d.ts +0 -11
- package/src/render-table/common.ts +0 -67
- package/src/render-table/field.ts +0 -132
- package/src/render-table/index.ts +0 -6
- package/src/render-table/record.ts +0 -176
- package/src/render-table/renderTable.ts +0 -109
- package/src/render-table/types.ts +0 -51
- package/src/utils/forgeConfig.ts +0 -45
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { execa, Options } from "execa";
|
|
2
|
+
import { execLog } from "./execLog.js";
|
|
3
|
+
|
|
4
|
+
export interface ForgeConfig {
|
|
5
|
+
// project
|
|
6
|
+
src: string;
|
|
7
|
+
test: string;
|
|
8
|
+
script: string;
|
|
9
|
+
out: string;
|
|
10
|
+
libs: string[];
|
|
11
|
+
eth_rpc_url: string | null;
|
|
12
|
+
|
|
13
|
+
// all unspecified keys (this interface is far from comprehensive)
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get forge config as a parsed json object.
|
|
19
|
+
*/
|
|
20
|
+
export async function getForgeConfig(profile?: string) {
|
|
21
|
+
const { stdout } = await execa("forge", ["config", "--json"], {
|
|
22
|
+
stdio: ["inherit", "pipe", "pipe"],
|
|
23
|
+
env: { FOUNDRY_PROFILE: profile },
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return JSON.parse(stdout) as ForgeConfig;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get the value of "src" from forge config.
|
|
31
|
+
* The path to the contract sources relative to the root of the project.
|
|
32
|
+
*/
|
|
33
|
+
export async function getSrcDirectory(profile?: string) {
|
|
34
|
+
return (await getForgeConfig(profile)).src;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get the value of "script" from forge config.
|
|
39
|
+
* The path to the contract sources relative to the root of the project.
|
|
40
|
+
*/
|
|
41
|
+
export async function getScriptDirectory(profile?: string) {
|
|
42
|
+
return (await getForgeConfig(profile)).script;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Get the value of "test" from forge config.
|
|
47
|
+
* The path to the test contract sources relative to the root of the project.
|
|
48
|
+
*/
|
|
49
|
+
export async function getTestDirectory(profile?: string) {
|
|
50
|
+
return (await getForgeConfig(profile)).test;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get the value of "out" from forge config.
|
|
55
|
+
* The path to put contract artifacts in, relative to the root of the project.
|
|
56
|
+
*/
|
|
57
|
+
export async function getOutDirectory(profile?: string) {
|
|
58
|
+
return (await getForgeConfig(profile)).out;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Get the value of "eth_rpc_url" from forge config, default to "http://127.0.0.1:8545"
|
|
63
|
+
* @param profile The foundry profile to use
|
|
64
|
+
* @returns The rpc url
|
|
65
|
+
*/
|
|
66
|
+
export async function getRpcUrl(profile?: string) {
|
|
67
|
+
return (await getForgeConfig(profile)).eth_rpc_url || "http://127.0.0.1:8545";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Execute a forge command
|
|
72
|
+
* @param args The arguments to pass to forge
|
|
73
|
+
* @param options { profile?: The foundry profile to use; silent?: If true, nothing will be logged to the console }
|
|
74
|
+
*/
|
|
75
|
+
export async function forge(args: string[], options?: { profile?: string; silent?: boolean }): Promise<void> {
|
|
76
|
+
const execOptions: Options<string> = {
|
|
77
|
+
env: { FOUNDRY_PROFILE: options?.profile },
|
|
78
|
+
stdout: "inherit",
|
|
79
|
+
stderr: "pipe",
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
await (options?.silent ? execa("forge", args, execOptions) : execLog("forge", args, execOptions));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Execute a cast command
|
|
87
|
+
* @param args The arguments to pass to cast
|
|
88
|
+
* @returns Stdout of the command
|
|
89
|
+
*/
|
|
90
|
+
export async function cast(args: string[], options?: { profile?: string }): Promise<string> {
|
|
91
|
+
return execLog("cast", args, {
|
|
92
|
+
env: { FOUNDRY_PROFILE: options?.profile },
|
|
93
|
+
});
|
|
94
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
|
|
3
|
+
// TODO: Use viem's getChainId
|
|
4
|
+
export async function getChainId(rpc: string) {
|
|
5
|
+
const { result: chainId } = await ethers.utils.fetchJson(
|
|
6
|
+
rpc,
|
|
7
|
+
'{ "id": 42, "jsonrpc": "2.0", "method": "eth_chainId", "params": [ ] }'
|
|
8
|
+
);
|
|
9
|
+
return Number(chainId);
|
|
10
|
+
}
|
package/src/utils/index.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbiType, StaticAbiType } from "@latticexyz/schema-type";
|
|
2
|
+
|
|
3
|
+
export type RequireKeys<T extends Record<string, unknown>, P extends string> = T & Required<Pick<T, P>>;
|
|
4
|
+
|
|
5
|
+
// This allows unions between string literals and `string` without sacrificing autocompletion.
|
|
6
|
+
// Workaround for https://github.com/Microsoft/TypeScript/issues/29729
|
|
7
|
+
export type StringForUnion = string & Record<never, never>;
|
|
8
|
+
|
|
9
|
+
export type StaticArray = `${StaticAbiType}[${number}]`;
|
|
10
|
+
// static arrays and inferred enum names get mixed together - this helper separates them
|
|
11
|
+
export type ExtractUserTypes<UnknownTypes extends StringForUnion> = Exclude<UnknownTypes, AbiType | StaticArray>;
|
|
12
|
+
|
|
13
|
+
// When type inference sees multiple uses of 1 generic, it can only guess
|
|
14
|
+
// which of those are supposed to define the generic (and it will be wrong in complex situations).
|
|
15
|
+
// This helper explicitly makes a type that's dependent on some generic,
|
|
16
|
+
// and will not be inferred as the generic's definition.
|
|
17
|
+
export type AsDependent<T> = T extends infer P ? P : never;
|
package/dist/chunk-B6VWCGHZ.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SchemaType,
|
|
3
|
-
getStaticByteLength
|
|
4
|
-
} from "./chunk-6AQ6LFVZ.js";
|
|
5
|
-
import {
|
|
6
|
-
NotESMConfigError,
|
|
7
|
-
NotInsideProjectError,
|
|
8
|
-
fromZodErrorCustom
|
|
9
|
-
} from "./chunk-JKAA3WMC.js";
|
|
10
|
-
|
|
11
|
-
// src/config/validation.ts
|
|
12
|
-
import { ZodIssueCode } from "zod";
|
|
13
|
-
function validateName(name, ctx) {
|
|
14
|
-
if (!/^\w+$/.test(name)) {
|
|
15
|
-
ctx.addIssue({
|
|
16
|
-
code: ZodIssueCode.custom,
|
|
17
|
-
message: `Name must contain only alphanumeric & underscore characters`
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function validateCapitalizedName(name, ctx) {
|
|
22
|
-
validateName(name, ctx);
|
|
23
|
-
if (!/^[A-Z]/.test(name)) {
|
|
24
|
-
ctx.addIssue({
|
|
25
|
-
code: ZodIssueCode.custom,
|
|
26
|
-
message: `Name must start with a capital letter`
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function validateUncapitalizedName(name, ctx) {
|
|
31
|
-
validateName(name, ctx);
|
|
32
|
-
if (!/^[a-z]/.test(name)) {
|
|
33
|
-
ctx.addIssue({
|
|
34
|
-
code: ZodIssueCode.custom,
|
|
35
|
-
message: `Name must start with a lowercase letter`
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function _factoryForValidateRoute(requireNonEmpty, requireSingleLevel) {
|
|
40
|
-
return (route, ctx) => {
|
|
41
|
-
if (route === "") {
|
|
42
|
-
if (requireNonEmpty) {
|
|
43
|
-
ctx.addIssue({
|
|
44
|
-
code: ZodIssueCode.custom,
|
|
45
|
-
message: `Route must not be empty`
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
if (route[0] !== "/") {
|
|
51
|
-
ctx.addIssue({
|
|
52
|
-
code: ZodIssueCode.custom,
|
|
53
|
-
message: `Route must start with "/"`
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
if (route[route.length - 1] === "/") {
|
|
57
|
-
ctx.addIssue({
|
|
58
|
-
code: ZodIssueCode.custom,
|
|
59
|
-
message: `Route must not end with "/"`
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
const parts = route.split("/");
|
|
63
|
-
if (requireSingleLevel && parts.length > 2) {
|
|
64
|
-
ctx.addIssue({
|
|
65
|
-
code: ZodIssueCode.custom,
|
|
66
|
-
message: `Route must only have one level (e.g. "/foo")`
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
for (let i = 1; i < parts.length; i++) {
|
|
70
|
-
if (parts[i] === "") {
|
|
71
|
-
ctx.addIssue({
|
|
72
|
-
code: ZodIssueCode.custom,
|
|
73
|
-
message: `Route must not contain empty route fragments (e.g. "//")`
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
if (!/^\w+$/.test(parts[i])) {
|
|
77
|
-
ctx.addIssue({
|
|
78
|
-
code: ZodIssueCode.custom,
|
|
79
|
-
message: `Route must contain only alphanumeric & underscore characters`
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
var validateRoute = _factoryForValidateRoute(true, false);
|
|
86
|
-
var validateBaseRoute = _factoryForValidateRoute(false, false);
|
|
87
|
-
var validateSingleLevelRoute = _factoryForValidateRoute(true, true);
|
|
88
|
-
|
|
89
|
-
// src/config/commonSchemas.ts
|
|
90
|
-
import { z } from "zod";
|
|
91
|
-
var ObjectName = z.string().superRefine(validateCapitalizedName);
|
|
92
|
-
var ValueName = z.string().superRefine(validateUncapitalizedName);
|
|
93
|
-
var OrdinaryRoute = z.string().superRefine(validateRoute);
|
|
94
|
-
var SingleLevelRoute = z.string().superRefine(validateSingleLevelRoute);
|
|
95
|
-
var BaseRoute = z.string().superRefine(validateBaseRoute);
|
|
96
|
-
|
|
97
|
-
// src/config/loadConfig.ts
|
|
98
|
-
import { findUp } from "find-up";
|
|
99
|
-
import path from "path";
|
|
100
|
-
var configFiles = ["mud.config.ts", "mud.config.mts"];
|
|
101
|
-
async function loadConfig(configPath) {
|
|
102
|
-
configPath = await resolveConfigPath(configPath);
|
|
103
|
-
try {
|
|
104
|
-
return (await import(configPath)).default;
|
|
105
|
-
} catch (error) {
|
|
106
|
-
if (error instanceof SyntaxError && error.message === "Cannot use import statement outside a module") {
|
|
107
|
-
throw new NotESMConfigError();
|
|
108
|
-
} else {
|
|
109
|
-
throw error;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async function resolveConfigPath(configPath) {
|
|
114
|
-
if (configPath === void 0) {
|
|
115
|
-
configPath = await getUserConfigPath();
|
|
116
|
-
} else {
|
|
117
|
-
if (!path.isAbsolute(configPath)) {
|
|
118
|
-
configPath = path.join(process.cwd(), configPath);
|
|
119
|
-
configPath = path.normalize(configPath);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return configPath;
|
|
123
|
-
}
|
|
124
|
-
async function getUserConfigPath() {
|
|
125
|
-
const tsConfigPath = await findUp(configFiles);
|
|
126
|
-
if (tsConfigPath === void 0) {
|
|
127
|
-
throw new NotInsideProjectError();
|
|
128
|
-
}
|
|
129
|
-
return tsConfigPath;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// src/config/loadStoreConfig.ts
|
|
133
|
-
import { z as z2, ZodError } from "zod";
|
|
134
|
-
var TableName = ObjectName;
|
|
135
|
-
var KeyName = ValueName;
|
|
136
|
-
var ColumnName = ValueName;
|
|
137
|
-
var PrimaryKey = z2.nativeEnum(SchemaType).refine((arg) => getStaticByteLength(arg) > 0, "Primary key must not use dynamic SchemaType");
|
|
138
|
-
var PrimaryKeys = z2.record(KeyName, PrimaryKey).default({ key: 95 /* BYTES32 */ });
|
|
139
|
-
var Schema = z2.record(ColumnName, z2.nativeEnum(SchemaType)).refine((arg) => Object.keys(arg).length > 0, "Table schema may not be empty");
|
|
140
|
-
var FullTable = z2.object({
|
|
141
|
-
route: OrdinaryRoute.default("/tables"),
|
|
142
|
-
tableIdArgument: z2.boolean().default(false),
|
|
143
|
-
storeArgument: z2.boolean().default(false),
|
|
144
|
-
primaryKeys: PrimaryKeys,
|
|
145
|
-
schema: Schema,
|
|
146
|
-
dataStruct: z2.boolean().optional()
|
|
147
|
-
}).transform((arg) => {
|
|
148
|
-
if (Object.keys(arg.schema).length === 1) {
|
|
149
|
-
arg.dataStruct ??= false;
|
|
150
|
-
} else {
|
|
151
|
-
arg.dataStruct ??= true;
|
|
152
|
-
}
|
|
153
|
-
return arg;
|
|
154
|
-
});
|
|
155
|
-
var DefaultSingleValueTable = z2.nativeEnum(SchemaType).transform((schemaType) => {
|
|
156
|
-
return FullTable.parse({
|
|
157
|
-
schema: {
|
|
158
|
-
value: schemaType
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
var StoreConfig = z2.object({
|
|
163
|
-
baseRoute: BaseRoute.default(""),
|
|
164
|
-
storeImportPath: z2.string().default("@latticexyz/store/src/"),
|
|
165
|
-
tables: z2.record(TableName, z2.union([DefaultSingleValueTable, FullTable]))
|
|
166
|
-
});
|
|
167
|
-
async function loadStoreConfig(configPath) {
|
|
168
|
-
const config = await loadConfig(configPath);
|
|
169
|
-
try {
|
|
170
|
-
return parseStoreConfig(config);
|
|
171
|
-
} catch (error) {
|
|
172
|
-
if (error instanceof ZodError) {
|
|
173
|
-
throw fromZodErrorCustom(error, "StoreConfig Validation Error");
|
|
174
|
-
} else {
|
|
175
|
-
throw error;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
async function parseStoreConfig(config) {
|
|
180
|
-
return StoreConfig.parse(config);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export {
|
|
184
|
-
validateName,
|
|
185
|
-
validateCapitalizedName,
|
|
186
|
-
validateUncapitalizedName,
|
|
187
|
-
validateRoute,
|
|
188
|
-
validateBaseRoute,
|
|
189
|
-
validateSingleLevelRoute,
|
|
190
|
-
ObjectName,
|
|
191
|
-
ValueName,
|
|
192
|
-
OrdinaryRoute,
|
|
193
|
-
SingleLevelRoute,
|
|
194
|
-
BaseRoute,
|
|
195
|
-
loadConfig,
|
|
196
|
-
StoreConfig,
|
|
197
|
-
loadStoreConfig,
|
|
198
|
-
parseStoreConfig
|
|
199
|
-
};
|
package/dist/chunk-JKAA3WMC.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// src/utils/errors.ts
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
import { ZodError } from "zod";
|
|
4
|
-
import { fromZodError, ValidationError } from "zod-validation-error";
|
|
5
|
-
function fromZodErrorCustom(error, prefix) {
|
|
6
|
-
return fromZodError(error, {
|
|
7
|
-
prefix: chalk.red(prefix),
|
|
8
|
-
prefixSeparator: "\n- ",
|
|
9
|
-
issueSeparator: "\n- "
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
var NotInsideProjectError = class extends Error {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.name = "NotInsideProjectError";
|
|
16
|
-
this.message = "You are not inside a MUD project";
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
var NotESMConfigError = class extends Error {
|
|
20
|
-
constructor() {
|
|
21
|
-
super(...arguments);
|
|
22
|
-
this.name = "NotESMConfigError";
|
|
23
|
-
this.message = "MUD config must be an ES module";
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
function logError(error) {
|
|
27
|
-
if (error instanceof ValidationError) {
|
|
28
|
-
console.log(chalk.redBright(error.message));
|
|
29
|
-
} else if (error instanceof ZodError) {
|
|
30
|
-
const validationError = fromZodError(error, {
|
|
31
|
-
prefixSeparator: "\n- ",
|
|
32
|
-
issueSeparator: "\n- "
|
|
33
|
-
});
|
|
34
|
-
console.log(chalk.redBright(validationError.message));
|
|
35
|
-
} else if (error instanceof NotInsideProjectError) {
|
|
36
|
-
console.log(chalk.red(error.message));
|
|
37
|
-
console.log("");
|
|
38
|
-
console.log(chalk.blue(`To learn more about MUD's configuration, please go to https://mud.dev/packages/cli/`));
|
|
39
|
-
} else if (error instanceof NotESMConfigError) {
|
|
40
|
-
console.log(chalk.red(error.message));
|
|
41
|
-
console.log("");
|
|
42
|
-
console.log(
|
|
43
|
-
chalk.blue(`Please name your config file \`mud.config.mts\`, or use \`type: "module"\` in package.json`)
|
|
44
|
-
);
|
|
45
|
-
} else {
|
|
46
|
-
console.log(error);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export {
|
|
51
|
-
fromZodErrorCustom,
|
|
52
|
-
NotInsideProjectError,
|
|
53
|
-
NotESMConfigError,
|
|
54
|
-
logError
|
|
55
|
-
};
|