@latticexyz/cli 1.41.1-alpha.41 → 1.42.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/dist/chunk-4STWSICF.js +26139 -0
- package/dist/chunk-6V563IAZ.js +283 -0
- package/dist/chunk-7KQJTK2K.js +3842 -0
- package/dist/{chunk-ATAWDHWC.js → chunk-FPG73MVN.js} +5 -1
- package/dist/{chunk-O6HOO6WA.js → chunk-L4YLJHLJ.js} +1 -9
- package/dist/{chunk-J4DJQNIC.js → chunk-SKNB74MT.js} +129 -568
- package/dist/chunk-VQTZJIFF.js +353 -0
- package/dist/chunk-WZFXLDPK.js +761 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +0 -21
- package/dist/mud.d.ts +1 -1
- package/dist/mud.js +326 -4452
- package/dist/mud2.d.ts +1 -0
- package/dist/mud2.js +25 -0
- package/dist/render-solidity/index.d.ts +171 -0
- package/dist/render-solidity/index.js +49 -0
- package/dist/render-ts/index.d.ts +26 -0
- package/dist/render-ts/index.js +14 -0
- package/dist/utils/deprecated/index.js +3 -3
- package/dist/utils/index.d.ts +13 -18
- package/dist/utils/index.js +14 -16
- package/package.json +21 -21
- package/src/commands/deploy-v2.ts +80 -64
- package/src/commands/deprecated/index.ts +22 -0
- package/src/commands/deprecated/test.ts +1 -1
- package/src/commands/gas-report.ts +54 -55
- package/src/commands/index.ts +6 -17
- package/src/commands/set-version.ts +172 -0
- package/src/commands/tablegen.ts +5 -5
- package/src/commands/test-v2.ts +71 -0
- package/src/commands/tsgen.ts +33 -0
- package/src/commands/worldgen.ts +5 -4
- package/src/contracts/BulkUpload.sol +13 -20
- package/src/contracts/Deploy.sol +3 -3
- package/src/contracts/LibDeploy.sol +1 -1
- package/src/contracts/LibDeployStub.sol +1 -1
- package/src/index.ts +1 -15
- package/src/mud.ts +4 -3
- package/src/mud2.ts +29 -0
- package/src/render-solidity/common.ts +4 -4
- package/src/render-solidity/field.ts +25 -2
- package/src/render-solidity/record.ts +14 -10
- package/src/render-solidity/renderSystemInterface.ts +4 -4
- package/src/render-solidity/renderTableIndex.ts +15 -0
- package/src/render-solidity/renderTypesFromConfig.ts +1 -1
- package/src/render-solidity/tableOptions.ts +2 -2
- package/src/render-solidity/tablegen.ts +15 -13
- package/src/render-solidity/types.ts +2 -1
- package/src/render-solidity/userType.ts +1 -2
- package/src/render-solidity/worldgen.ts +8 -9
- package/src/render-ts/index.ts +5 -0
- package/src/render-ts/recsV1TableOptions.ts +39 -0
- package/src/render-ts/renderRecsV1Tables.ts +31 -0
- package/src/render-ts/schemaTypesToRecsTypeStrings.ts +202 -0
- package/src/render-ts/tsgen.ts +12 -0
- package/src/render-ts/types.ts +13 -0
- package/src/utils/contractToInterface.ts +5 -3
- package/src/utils/deploy-v2.ts +90 -84
- package/src/utils/errors.ts +3 -34
- package/src/utils/format.ts +6 -0
- package/src/utils/formatAndWrite.ts +11 -2
- package/src/utils/foundry.ts +9 -0
- package/src/utils/index.ts +1 -0
- package/dist/chunk-O57QENJ6.js +0 -23039
- package/dist/chunk-SLIMIO4Z.js +0 -14358
- package/dist/config/index.d.ts +0 -763
- package/dist/config/index.js +0 -83
- package/src/config/commonSchemas.ts +0 -34
- package/src/config/dynamicResolution.ts +0 -49
- package/src/config/index.ts +0 -24
- package/src/config/loadConfig.ts +0 -39
- package/src/config/loadStoreConfig.ts +0 -18
- package/src/config/parseStoreConfig.test-d.ts +0 -40
- package/src/config/parseStoreConfig.ts +0 -314
- package/src/config/validation.ts +0 -163
- package/src/config/world/index.ts +0 -4
- package/src/config/world/loadWorldConfig.test-d.ts +0 -11
- package/src/config/world/loadWorldConfig.ts +0 -26
- package/src/config/world/parseWorldConfig.ts +0 -55
- package/src/config/world/resolveWorldConfig.ts +0 -80
- package/src/config/world/userTypes.ts +0 -72
- package/src/utils/typeUtils.ts +0 -17
package/src/utils/format.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from "fs";
|
|
2
2
|
import { dirname } from "path";
|
|
3
|
-
import { formatSolidity } from "./format.js";
|
|
3
|
+
import { formatSolidity, formatTypescript } from "./format.js";
|
|
4
4
|
|
|
5
|
-
export async function
|
|
5
|
+
export async function formatAndWriteSolidity(output: string, fullOutputPath: string, logPrefix: string) {
|
|
6
6
|
const formattedOutput = await formatSolidity(output);
|
|
7
7
|
|
|
8
8
|
mkdirSync(dirname(fullOutputPath), { recursive: true });
|
|
@@ -10,3 +10,12 @@ export async function formatAndWrite(output: string, fullOutputPath: string, log
|
|
|
10
10
|
writeFileSync(fullOutputPath, formattedOutput);
|
|
11
11
|
console.log(`${logPrefix}: ${fullOutputPath}`);
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
export async function formatAndWriteTypescript(output: string, fullOutputPath: string, logPrefix: string) {
|
|
15
|
+
const formattedOutput = await formatTypescript(output);
|
|
16
|
+
|
|
17
|
+
mkdirSync(dirname(fullOutputPath), { recursive: true });
|
|
18
|
+
|
|
19
|
+
writeFileSync(fullOutputPath, formattedOutput);
|
|
20
|
+
console.log(`${logPrefix}: ${fullOutputPath}`);
|
|
21
|
+
}
|
package/src/utils/foundry.ts
CHANGED
|
@@ -92,3 +92,12 @@ export async function cast(args: string[], options?: { profile?: string }): Prom
|
|
|
92
92
|
env: { FOUNDRY_PROFILE: options?.profile },
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Start an anvil chain
|
|
98
|
+
* @param args The arguments to pass to anvil
|
|
99
|
+
* @returns Stdout of the command
|
|
100
|
+
*/
|
|
101
|
+
export async function anvil(args: string[]): Promise<string> {
|
|
102
|
+
return execLog("anvil", args);
|
|
103
|
+
}
|