@latticexyz/cli 1.28.1 → 1.29.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/commands/bulkupload.js +81 -41
- package/dist/commands/call-system.js +24039 -54
- package/dist/commands/create.js +113 -44
- package/dist/commands/deploy.js +95177 -425
- package/dist/commands/diamond-abi.js +2406 -50
- package/dist/commands/faucet.js +6104 -0
- package/dist/commands/hello.js +44 -16
- package/dist/commands/sync-art.js +109 -40
- package/dist/commands/system-types.js +2431 -66
- package/dist/commands/trace.js +36585 -60
- package/dist/commands/types.js +234159 -0
- package/dist/index.js +4667 -12
- package/package.json +12 -8
- package/src/commands/deploy.ts +10 -9
- package/src/commands/faucet.ts +55 -0
- package/src/commands/system-types.ts +1 -6
- package/src/commands/types.ts +46 -0
- package/src/index.ts +6 -2
- package/dist/utils.js +0 -78
|
@@ -1,45 +1,85 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
var __copyProps = (to, from, except, desc2) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __async = (__this, __arguments, generator) => {
|
|
20
|
+
return new Promise((resolve, reject) => {
|
|
21
|
+
var fulfilled = (value) => {
|
|
22
|
+
try {
|
|
23
|
+
step(generator.next(value));
|
|
24
|
+
} catch (e) {
|
|
25
|
+
reject(e);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var rejected = (value) => {
|
|
29
|
+
try {
|
|
30
|
+
step(generator.throw(value));
|
|
31
|
+
} catch (e) {
|
|
32
|
+
reject(e);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
36
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/commands/bulkupload.ts
|
|
41
|
+
var bulkupload_exports = {};
|
|
42
|
+
__export(bulkupload_exports, {
|
|
43
|
+
builder: () => builder,
|
|
44
|
+
command: () => command,
|
|
45
|
+
desc: () => desc,
|
|
46
|
+
handler: () => handler
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(bulkupload_exports);
|
|
49
|
+
var importExeca = eval('import("execa")');
|
|
50
|
+
var command = "bulkupload";
|
|
51
|
+
var desc = "Uploads the provided ECS state to the provided World";
|
|
52
|
+
var builder = (yargs) => yargs.options({
|
|
53
|
+
statePath: { type: "string", demandOption: true, desc: "Path to the ECS state to upload" },
|
|
54
|
+
worldAddress: { type: "string", demandOption: true, desc: "Contract address of the World to upload to" },
|
|
55
|
+
rpc: { type: "string", demandOption: true, desc: "JSON RPC endpoint" }
|
|
56
|
+
});
|
|
57
|
+
var handler = (argv) => __async(void 0, null, function* () {
|
|
58
|
+
const { execa } = yield importExeca;
|
|
59
|
+
const { statePath, worldAddress, rpc } = argv;
|
|
60
|
+
console.log("Uploading state at ", statePath, "to", worldAddress, "on", rpc);
|
|
61
|
+
const url = __dirname + "/../../src/contracts/BulkUpload.sol";
|
|
62
|
+
console.log("Using BulkUpload script from", url);
|
|
63
|
+
try {
|
|
64
|
+
yield execa("forge", [
|
|
65
|
+
"script",
|
|
66
|
+
"--sig",
|
|
67
|
+
'"run(string, address)"',
|
|
68
|
+
"--rpc-url",
|
|
69
|
+
rpc,
|
|
70
|
+
`${url}:BulkUpload`,
|
|
71
|
+
statePath,
|
|
72
|
+
worldAddress
|
|
73
|
+
]);
|
|
74
|
+
} catch (e) {
|
|
75
|
+
console.error(e);
|
|
76
|
+
}
|
|
77
|
+
process.exit(0);
|
|
20
78
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
console.log("Using BulkUpload script from", url);
|
|
28
|
-
try {
|
|
29
|
-
yield execa("forge", [
|
|
30
|
-
"script",
|
|
31
|
-
"--sig",
|
|
32
|
-
'"run(string, address)"',
|
|
33
|
-
"--rpc-url",
|
|
34
|
-
rpc,
|
|
35
|
-
`${url}:BulkUpload`,
|
|
36
|
-
statePath,
|
|
37
|
-
worldAddress,
|
|
38
|
-
]);
|
|
39
|
-
}
|
|
40
|
-
catch (e) {
|
|
41
|
-
console.error(e);
|
|
42
|
-
}
|
|
43
|
-
process.exit(0);
|
|
79
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
+
0 && (module.exports = {
|
|
81
|
+
builder,
|
|
82
|
+
command,
|
|
83
|
+
desc,
|
|
84
|
+
handler
|
|
44
85
|
});
|
|
45
|
-
exports.handler = handler;
|