@cartesi/cli 1.4.0 → 2.0.0-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/dist/baseCommand.d.ts +2 -0
- package/dist/baseCommand.d.ts.map +1 -1
- package/dist/baseCommand.js +10 -5
- package/dist/builder/directory.d.ts +3 -0
- package/dist/builder/directory.d.ts.map +1 -0
- package/dist/builder/directory.js +37 -0
- package/dist/builder/docker.d.ts +10 -0
- package/dist/builder/docker.d.ts.map +1 -0
- package/dist/builder/docker.js +103 -0
- package/dist/builder/empty.d.ts +3 -0
- package/dist/builder/empty.d.ts.map +1 -0
- package/dist/builder/empty.js +21 -0
- package/dist/builder/index.d.ts +6 -0
- package/dist/builder/index.d.ts.map +1 -0
- package/dist/builder/index.js +5 -0
- package/dist/builder/none.d.ts +3 -0
- package/dist/builder/none.d.ts.map +1 -0
- package/dist/builder/none.js +11 -0
- package/dist/builder/tar.d.ts +3 -0
- package/dist/builder/tar.d.ts.map +1 -0
- package/dist/builder/tar.js +30 -0
- package/dist/commands/build.d.ts +3 -15
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +53 -194
- package/dist/commands/shell.d.ts +2 -1
- package/dist/commands/shell.d.ts.map +1 -1
- package/dist/commands/shell.js +41 -41
- package/dist/config.d.ts +102 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +378 -0
- package/dist/contracts.d.ts +492 -1038
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +223 -498
- package/dist/exec/cartesi-machine.d.ts +9 -0
- package/dist/exec/cartesi-machine.d.ts.map +1 -0
- package/dist/exec/cartesi-machine.js +20 -0
- package/dist/exec/crane.d.ts +15 -0
- package/dist/exec/crane.d.ts.map +1 -0
- package/dist/exec/crane.js +17 -0
- package/dist/exec/genext2fs.d.ts +28 -0
- package/dist/exec/genext2fs.d.ts.map +1 -0
- package/dist/exec/genext2fs.js +44 -0
- package/dist/exec/index.d.ts +5 -0
- package/dist/exec/index.d.ts.map +1 -0
- package/dist/exec/index.js +4 -0
- package/dist/exec/mksquashfs.d.ts +21 -0
- package/dist/exec/mksquashfs.d.ts.map +1 -0
- package/dist/exec/mksquashfs.js +45 -0
- package/dist/exec/util.d.ts +36 -0
- package/dist/exec/util.d.ts.map +1 -0
- package/dist/exec/util.js +78 -0
- package/dist/machine.d.ts +6 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/machine.js +80 -0
- package/dist/node/docker-compose-anvil.yaml +4 -3
- package/dist/node/docker-compose-bundler.yaml +1 -1
- package/dist/node/docker-compose-paymaster.yaml +1 -1
- package/oclif.manifest.json +32 -95
- package/package.json +5 -5
- package/dist/commands/send/dapp-address.d.ts +0 -9
- package/dist/commands/send/dapp-address.d.ts.map +0 -1
- package/dist/commands/send/dapp-address.js +0 -20
package/oclif.manifest.json
CHANGED
|
@@ -35,27 +35,25 @@
|
|
|
35
35
|
"build": {
|
|
36
36
|
"aliases": [],
|
|
37
37
|
"args": {},
|
|
38
|
-
"description": "Build application
|
|
38
|
+
"description": "Build application by building Cartesi machine drives, configuring a machine and booting it",
|
|
39
39
|
"examples": [
|
|
40
|
-
"<%= config.bin %> <%= command.id %>"
|
|
41
|
-
"<%= config.bin %> <%= command.id %> --from-image my-app"
|
|
40
|
+
"<%= config.bin %> <%= command.id %>"
|
|
42
41
|
],
|
|
43
42
|
"flags": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"name": "
|
|
47
|
-
"summary": "
|
|
43
|
+
"config": {
|
|
44
|
+
"char": "c",
|
|
45
|
+
"name": "config",
|
|
46
|
+
"summary": "path to the configuration file",
|
|
47
|
+
"default": "cartesi.toml",
|
|
48
48
|
"hasDynamicHelp": false,
|
|
49
49
|
"multiple": false,
|
|
50
50
|
"type": "option"
|
|
51
51
|
},
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"multiple": false,
|
|
58
|
-
"type": "option"
|
|
52
|
+
"drives-only": {
|
|
53
|
+
"name": "drives-only",
|
|
54
|
+
"summary": "only build drives",
|
|
55
|
+
"allowNo": false,
|
|
56
|
+
"type": "boolean"
|
|
59
57
|
}
|
|
60
58
|
},
|
|
61
59
|
"hasDynamicHelp": false,
|
|
@@ -326,9 +324,28 @@
|
|
|
326
324
|
"<%= config.bin %> <%= command.id %>"
|
|
327
325
|
],
|
|
328
326
|
"flags": {
|
|
327
|
+
"command": {
|
|
328
|
+
"description": "shell command to run",
|
|
329
|
+
"name": "command",
|
|
330
|
+
"summary": "shell to run",
|
|
331
|
+
"default": "/bin/sh",
|
|
332
|
+
"hasDynamicHelp": false,
|
|
333
|
+
"multiple": false,
|
|
334
|
+
"type": "option"
|
|
335
|
+
},
|
|
336
|
+
"config": {
|
|
337
|
+
"char": "c",
|
|
338
|
+
"name": "config",
|
|
339
|
+
"summary": "path to the configuration file",
|
|
340
|
+
"default": "cartesi.toml",
|
|
341
|
+
"hasDynamicHelp": false,
|
|
342
|
+
"multiple": false,
|
|
343
|
+
"type": "option"
|
|
344
|
+
},
|
|
329
345
|
"run-as-root": {
|
|
330
346
|
"description": "run as root user",
|
|
331
347
|
"name": "run-as-root",
|
|
348
|
+
"summary": "run the cartesi machine as the root user",
|
|
332
349
|
"allowNo": false,
|
|
333
350
|
"type": "boolean"
|
|
334
351
|
}
|
|
@@ -437,86 +454,6 @@
|
|
|
437
454
|
"index.js"
|
|
438
455
|
]
|
|
439
456
|
},
|
|
440
|
-
"send:dapp-address": {
|
|
441
|
-
"aliases": [],
|
|
442
|
-
"args": {},
|
|
443
|
-
"description": "Sends an input to the application with its own address.",
|
|
444
|
-
"examples": [
|
|
445
|
-
"<%= config.bin %> <%= command.id %>"
|
|
446
|
-
],
|
|
447
|
-
"flags": {
|
|
448
|
-
"dapp": {
|
|
449
|
-
"description": "the address of the DApp, defaults to the deployed DApp address if application is running.",
|
|
450
|
-
"name": "dapp",
|
|
451
|
-
"summary": "dapp address.",
|
|
452
|
-
"hasDynamicHelp": false,
|
|
453
|
-
"multiple": false,
|
|
454
|
-
"type": "option"
|
|
455
|
-
},
|
|
456
|
-
"chain-id": {
|
|
457
|
-
"char": "c",
|
|
458
|
-
"description": "The EIP-155 chain ID.",
|
|
459
|
-
"env": "CHAIN",
|
|
460
|
-
"helpGroup": "Ethereum",
|
|
461
|
-
"name": "chain-id",
|
|
462
|
-
"hasDynamicHelp": false,
|
|
463
|
-
"multiple": false,
|
|
464
|
-
"options": [
|
|
465
|
-
"31337",
|
|
466
|
-
"421614",
|
|
467
|
-
"84532",
|
|
468
|
-
"11155420",
|
|
469
|
-
"11155111",
|
|
470
|
-
"42161",
|
|
471
|
-
"8453",
|
|
472
|
-
"1",
|
|
473
|
-
"10"
|
|
474
|
-
],
|
|
475
|
-
"type": "option"
|
|
476
|
-
},
|
|
477
|
-
"rpc-url": {
|
|
478
|
-
"char": "r",
|
|
479
|
-
"description": "The RPC endpoint.",
|
|
480
|
-
"env": "ETH_RPC_URL",
|
|
481
|
-
"helpGroup": "Ethereum",
|
|
482
|
-
"name": "rpc-url",
|
|
483
|
-
"hasDynamicHelp": false,
|
|
484
|
-
"multiple": false,
|
|
485
|
-
"type": "option"
|
|
486
|
-
},
|
|
487
|
-
"mnemonic-passphrase": {
|
|
488
|
-
"description": "Use a BIP39 passphrase for the mnemonic.",
|
|
489
|
-
"helpGroup": "Wallet",
|
|
490
|
-
"name": "mnemonic-passphrase",
|
|
491
|
-
"hasDynamicHelp": false,
|
|
492
|
-
"multiple": false,
|
|
493
|
-
"type": "option"
|
|
494
|
-
},
|
|
495
|
-
"mnemonic-index": {
|
|
496
|
-
"description": "Use the private key from the given mnemonic index.",
|
|
497
|
-
"helpGroup": "Wallet",
|
|
498
|
-
"name": "mnemonic-index",
|
|
499
|
-
"default": 0,
|
|
500
|
-
"hasDynamicHelp": false,
|
|
501
|
-
"multiple": false,
|
|
502
|
-
"type": "option"
|
|
503
|
-
}
|
|
504
|
-
},
|
|
505
|
-
"hasDynamicHelp": false,
|
|
506
|
-
"hiddenAliases": [],
|
|
507
|
-
"id": "send:dapp-address",
|
|
508
|
-
"pluginAlias": "@cartesi/cli",
|
|
509
|
-
"pluginName": "@cartesi/cli",
|
|
510
|
-
"pluginType": "core",
|
|
511
|
-
"summary": "Send DApp address input to the application.",
|
|
512
|
-
"isESM": true,
|
|
513
|
-
"relativePath": [
|
|
514
|
-
"dist",
|
|
515
|
-
"commands",
|
|
516
|
-
"send",
|
|
517
|
-
"dapp-address.js"
|
|
518
|
-
]
|
|
519
|
-
},
|
|
520
457
|
"send:erc20": {
|
|
521
458
|
"aliases": [],
|
|
522
459
|
"args": {},
|
|
@@ -935,5 +872,5 @@
|
|
|
935
872
|
]
|
|
936
873
|
}
|
|
937
874
|
},
|
|
938
|
-
"version": "
|
|
875
|
+
"version": "2.0.0-alpha.0"
|
|
939
876
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cartesi/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"description": "Cartesi CLI",
|
|
5
5
|
"author": "Danilo Tuler <tuler@pobox.com>",
|
|
6
6
|
"bin": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"ora": "^8.1.0",
|
|
38
38
|
"progress-stream": "^2.0.0",
|
|
39
39
|
"semver": "^7.6.3",
|
|
40
|
+
"smol-toml": "^1.3.0",
|
|
40
41
|
"tmp": "^0.2.3",
|
|
41
42
|
"viem": "^2.21.27"
|
|
42
43
|
},
|
|
@@ -64,8 +65,8 @@
|
|
|
64
65
|
"tslib": "^2.8.0",
|
|
65
66
|
"typescript": "^5.6.3",
|
|
66
67
|
"vitest": "^2.1.3",
|
|
68
|
+
"@cartesi/devnet": "2.0.0-alpha.0",
|
|
67
69
|
"@cartesi/eslint-config": "0.0.0",
|
|
68
|
-
"@cartesi/devnet": "1.8.0",
|
|
69
70
|
"tsconfig": "0.0.0"
|
|
70
71
|
},
|
|
71
72
|
"oclif": {
|
|
@@ -93,11 +94,10 @@
|
|
|
93
94
|
"clean": "rimraf dist",
|
|
94
95
|
"codegen": "run-p codegen:wagmi",
|
|
95
96
|
"codegen:wagmi": "wagmi generate",
|
|
96
|
-
"compile": "tsc -
|
|
97
|
+
"compile": "tsc -p tsconfig.build.json",
|
|
97
98
|
"copy-files": "copyfiles -u 1 \"src/**/*.yaml\" \"src/**/*.env\" \"src/**/*.txt\" dist",
|
|
98
99
|
"lint": "eslint \"src/**/*.ts*\"",
|
|
99
100
|
"posttest": "pnpm lint",
|
|
100
|
-
"test": "vitest"
|
|
101
|
-
"test:coverage": "vitest --coverage.enabled true"
|
|
101
|
+
"test": "vitest"
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Address, PublicClient, WalletClient } from "viem";
|
|
2
|
-
import { SendBaseCommand } from "./index.js";
|
|
3
|
-
export default class SendAddress extends SendBaseCommand<typeof SendAddress> {
|
|
4
|
-
static summary: string;
|
|
5
|
-
static description: string;
|
|
6
|
-
static examples: string[];
|
|
7
|
-
send(publicClient: PublicClient, walletClient: WalletClient): Promise<Address>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=dapp-address.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dapp-address.d.ts","sourceRoot":"","sources":["../../../src/commands/send/dapp-address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAM3D,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,eAAe,CAAC,OAAO,WAAW,CAAC;IACxE,MAAM,CAAC,OAAO,SAAiD;IAE/D,MAAM,CAAC,WAAW,SAC4C;IAE9D,MAAM,CAAC,QAAQ,WAA2C;IAE7C,IAAI,CACb,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,GAC3B,OAAO,CAAC,OAAO,CAAC;CActB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { dAppAddressRelayAbi, dAppAddressRelayAddress, } from "../../contracts.js";
|
|
2
|
-
import { SendBaseCommand } from "./index.js";
|
|
3
|
-
class SendAddress extends SendBaseCommand {
|
|
4
|
-
async send(publicClient, walletClient) {
|
|
5
|
-
// get dapp address from local node, or ask
|
|
6
|
-
const address = await super.getApplicationAddress();
|
|
7
|
-
const { request } = await publicClient.simulateContract({
|
|
8
|
-
address: dAppAddressRelayAddress,
|
|
9
|
-
abi: dAppAddressRelayAbi,
|
|
10
|
-
functionName: "relayDAppAddress",
|
|
11
|
-
args: [address],
|
|
12
|
-
account: walletClient.account,
|
|
13
|
-
});
|
|
14
|
-
return walletClient.writeContract(request);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
SendAddress.summary = "Send DApp address input to the application.";
|
|
18
|
-
SendAddress.description = "Sends an input to the application with its own address.";
|
|
19
|
-
SendAddress.examples = ["<%= config.bin %> <%= command.id %>"];
|
|
20
|
-
export default SendAddress;
|