@cartesi/cli 2.0.0-alpha.11 → 2.0.0-alpha.12
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/base.d.ts +2 -2
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +9 -13
- package/dist/builder/directory.d.ts +2 -2
- package/dist/builder/directory.d.ts.map +1 -1
- package/dist/builder/directory.js +1 -1
- package/dist/builder/docker.d.ts +1 -1
- package/dist/builder/docker.d.ts.map +1 -1
- package/dist/builder/docker.js +8 -8
- package/dist/builder/empty.d.ts +2 -2
- package/dist/builder/empty.d.ts.map +1 -1
- package/dist/builder/empty.js +1 -1
- package/dist/builder/none.d.ts +2 -2
- package/dist/builder/none.d.ts.map +1 -1
- package/dist/builder/none.js +1 -1
- package/dist/builder/tar.d.ts +2 -2
- package/dist/builder/tar.d.ts.map +1 -1
- package/dist/builder/tar.js +1 -1
- package/dist/commands/build.js +2 -2
- package/dist/commands/create.d.ts +5 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +31 -4
- package/dist/commands/deploy.d.ts +16 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +267 -8
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +3 -9
- package/dist/commands/{rollups/logs.d.ts → logs.d.ts} +2 -3
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/{rollups/logs.js → logs.js} +4 -3
- package/dist/commands/run.js +2 -2
- package/dist/commands/send/eip712.d.ts +34 -0
- package/dist/commands/send/eip712.d.ts.map +1 -0
- package/dist/commands/send/eip712.js +81 -0
- package/dist/commands/send/erc721.d.ts.map +1 -1
- package/dist/commands/send/erc721.js +1 -1
- package/dist/commands/send/generic.d.ts +2 -0
- package/dist/commands/send/generic.d.ts.map +1 -1
- package/dist/commands/send/generic.js +18 -10
- package/dist/commands/send.d.ts +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +4 -4
- package/dist/commands/shell.js +1 -1
- package/dist/commands/{rollups/start.d.ts → start.d.ts} +3 -3
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/{rollups/start.js → start.js} +24 -15
- package/dist/commands/{rollups/status.d.ts → status.d.ts} +2 -3
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/{rollups/status.js → status.js} +7 -6
- package/dist/commands/stop.d.ts +5 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/{rollups/stop.js → stop.js} +4 -3
- package/dist/compose/{rollups/default.env → default.env} +1 -0
- package/dist/compose/{rollups/docker-compose-bundler.yaml → docker-compose-bundler.yaml} +0 -6
- package/dist/compose/{rollups/docker-compose-espresso.yaml → docker-compose-espresso.yaml} +11 -20
- package/dist/compose/{rollups/docker-compose-graphql.yaml → docker-compose-graphql.yaml} +2 -2
- package/dist/compose/{rollups/docker-compose-node.yaml → docker-compose-node.yaml} +6 -1
- package/dist/compose/docker-compose-passkey-server.yaml +15 -0
- package/dist/compose/{rollups/proxy → proxy}/bundler.yaml +12 -0
- package/dist/compose/proxy/passkey-server.yaml +17 -0
- package/dist/compose/{rollups/proxy → proxy}/rollups-node.yaml +2 -2
- package/dist/config.d.ts +4 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -21
- package/dist/exec/cartesi-machine.d.ts +2 -2
- package/dist/exec/cartesi-machine.d.ts.map +1 -1
- package/dist/exec/cartesi-machine.js +1 -1
- package/dist/exec/crane.d.ts +3 -3
- package/dist/exec/crane.d.ts.map +1 -1
- package/dist/exec/crane.js +1 -1
- package/dist/exec/genext2fs.d.ts +2 -2
- package/dist/exec/genext2fs.d.ts.map +1 -1
- package/dist/exec/genext2fs.js +2 -2
- package/dist/exec/mksquashfs.d.ts +2 -2
- package/dist/exec/mksquashfs.d.ts.map +1 -1
- package/dist/exec/mksquashfs.js +2 -2
- package/dist/exec/rollups.d.ts +1 -1
- package/dist/exec/rollups.d.ts.map +1 -1
- package/dist/exec/util.d.ts +2 -2
- package/dist/exec/util.d.ts.map +1 -1
- package/dist/exec/util.js +6 -10
- package/dist/index.js +10 -4
- package/dist/machine.d.ts +1 -1
- package/dist/machine.d.ts.map +1 -1
- package/dist/prompts.d.ts +3 -3
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/template.d.ts +2 -2
- package/dist/template.d.ts.map +1 -1
- package/dist/template.js +2 -2
- package/dist/wallet.d.ts +1 -1
- package/dist/wallet.d.ts.map +1 -1
- package/dist/wallet.js +77 -93
- package/package.json +5 -6
- package/dist/commands/rollups/create.d.ts +0 -7
- package/dist/commands/rollups/create.d.ts.map +0 -1
- package/dist/commands/rollups/create.js +0 -36
- package/dist/commands/rollups/deploy.d.ts +0 -16
- package/dist/commands/rollups/deploy.d.ts.map +0 -1
- package/dist/commands/rollups/deploy.js +0 -237
- package/dist/commands/rollups/logs.d.ts.map +0 -1
- package/dist/commands/rollups/start.d.ts.map +0 -1
- package/dist/commands/rollups/status.d.ts.map +0 -1
- package/dist/commands/rollups/stop.d.ts +0 -5
- package/dist/commands/rollups/stop.d.ts.map +0 -1
- package/dist/commands/rollups.d.ts +0 -6
- package/dist/commands/rollups.d.ts.map +0 -1
- package/dist/commands/rollups.js +0 -21
- /package/dist/compose/{rollups/docker-compose-anvil.yaml → docker-compose-anvil.yaml} +0 -0
- /package/dist/compose/{rollups/docker-compose-database.yaml → docker-compose-database.yaml} +0 -0
- /package/dist/compose/{rollups/docker-compose-explorer.yaml → docker-compose-explorer.yaml} +0 -0
- /package/dist/compose/{rollups/docker-compose-node-cpus.yaml → docker-compose-node-cpus.yaml} +0 -0
- /package/dist/compose/{rollups/docker-compose-node-memory.yaml → docker-compose-node-memory.yaml} +0 -0
- /package/dist/compose/{rollups/docker-compose-paymaster.yaml → docker-compose-paymaster.yaml} +0 -0
- /package/dist/compose/{rollups/docker-compose-proxy.yaml → docker-compose-proxy.yaml} +0 -0
- /package/dist/compose/{rollups/proxy → proxy}/anvil.yaml +0 -0
- /package/dist/compose/{rollups/proxy → proxy}/espresso.yaml +0 -0
- /package/dist/compose/{rollups/proxy → proxy}/explorer-api.yaml +0 -0
- /package/dist/compose/{rollups/proxy → proxy}/explorer.yaml +0 -0
- /package/dist/compose/{rollups/proxy → proxy}/graphql.yaml +0 -0
- /package/dist/compose/{rollups/proxy → proxy}/paymaster.yaml +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
services:
|
|
2
|
+
passkey-server:
|
|
3
|
+
image: ${CARTESI_SDK_IMAGE}
|
|
4
|
+
command: ["passkey-server"]
|
|
5
|
+
healthcheck:
|
|
6
|
+
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3000/health"]
|
|
7
|
+
start_period: 10s
|
|
8
|
+
start_interval: 200ms
|
|
9
|
+
interval: 10s
|
|
10
|
+
timeout: 1s
|
|
11
|
+
retries: 5
|
|
12
|
+
|
|
13
|
+
proxy:
|
|
14
|
+
volumes:
|
|
15
|
+
- ./proxy/passkey-server.yaml:/etc/traefik/conf.d/passkey-server.yaml
|
|
@@ -3,9 +3,21 @@ http:
|
|
|
3
3
|
bundler:
|
|
4
4
|
rule: "PathPrefix(`/bundler`)"
|
|
5
5
|
middlewares:
|
|
6
|
+
- "cors"
|
|
6
7
|
- "remove-bundler-prefix"
|
|
7
8
|
service: bundler
|
|
8
9
|
middlewares:
|
|
10
|
+
cors:
|
|
11
|
+
headers:
|
|
12
|
+
accessControlAllowMethods:
|
|
13
|
+
- GET
|
|
14
|
+
- OPTIONS
|
|
15
|
+
- PUT
|
|
16
|
+
accessControlAllowHeaders: "*"
|
|
17
|
+
accessControlAllowOriginList:
|
|
18
|
+
- "*"
|
|
19
|
+
accessControlMaxAge: 100
|
|
20
|
+
addVaryHeader: true
|
|
9
21
|
remove-bundler-prefix:
|
|
10
22
|
replacePathRegex:
|
|
11
23
|
regex: "^/bundler/(.*)"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
http:
|
|
2
|
+
routers:
|
|
3
|
+
passkey-server:
|
|
4
|
+
rule: "PathPrefix(`/passkey`)"
|
|
5
|
+
middlewares:
|
|
6
|
+
- "remove-passkey-server-prefix"
|
|
7
|
+
service: passkey-server
|
|
8
|
+
middlewares:
|
|
9
|
+
remove-passkey-server-prefix:
|
|
10
|
+
replacePathRegex:
|
|
11
|
+
regex: "^/passkey/(.*)"
|
|
12
|
+
replacement: "/$1"
|
|
13
|
+
services:
|
|
14
|
+
passkey-server:
|
|
15
|
+
loadBalancer:
|
|
16
|
+
servers:
|
|
17
|
+
- url: "http://passkey-server:3000"
|
|
@@ -10,8 +10,8 @@ http:
|
|
|
10
10
|
inspect_server:
|
|
11
11
|
loadBalancer:
|
|
12
12
|
servers:
|
|
13
|
-
- url: "http://rollups-node:10012
|
|
13
|
+
- url: "http://rollups-node:10012"
|
|
14
14
|
rpc_server:
|
|
15
15
|
loadBalancer:
|
|
16
16
|
servers:
|
|
17
|
-
- url: "http://rollups-node:10011
|
|
17
|
+
- url: "http://rollups-node:10011"
|
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TomlPrimitive } from "smol-toml";
|
|
1
|
+
import { type TomlPrimitive } from "smol-toml";
|
|
2
2
|
/**
|
|
3
3
|
* Typed Errors
|
|
4
4
|
*/
|
|
@@ -29,8 +29,9 @@ export declare class RequiredFieldError extends Error {
|
|
|
29
29
|
export declare class InvalidStringArrayError extends Error {
|
|
30
30
|
constructor();
|
|
31
31
|
}
|
|
32
|
+
export declare const DEFAULT_COMPOSE_ENVIRONMENT_NAME = "cartesi-rollups";
|
|
32
33
|
export declare const DEFAULT_SDK_VERSION = "0.12.0-alpha.15";
|
|
33
|
-
export declare const DEFAULT_SDK_IMAGE = "cartesi/sdk
|
|
34
|
+
export declare const DEFAULT_SDK_IMAGE = "cartesi/sdk";
|
|
34
35
|
type DriveFormat = "ext2" | "sqfs";
|
|
35
36
|
export type ImageInfo = {
|
|
36
37
|
cmd: string[];
|
|
@@ -38,7 +39,7 @@ export type ImageInfo = {
|
|
|
38
39
|
env: string[];
|
|
39
40
|
workdir: string;
|
|
40
41
|
};
|
|
41
|
-
export type DriveResult = ImageInfo | undefined
|
|
42
|
+
export type DriveResult = ImageInfo | undefined;
|
|
42
43
|
export type DirectoryDriveConfig = {
|
|
43
44
|
builder: "directory";
|
|
44
45
|
extraSize: number;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAsB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"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"}
|
package/dist/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import bytes from "bytes";
|
|
2
|
-
import { extname } from "path";
|
|
2
|
+
import { extname } from "node:path";
|
|
3
3
|
import { parse as parseToml } from "smol-toml";
|
|
4
4
|
/**
|
|
5
5
|
* Typed Errors
|
|
@@ -54,10 +54,11 @@ export class RequiredFieldError extends Error {
|
|
|
54
54
|
}
|
|
55
55
|
export class InvalidStringArrayError extends Error {
|
|
56
56
|
constructor() {
|
|
57
|
-
super(
|
|
57
|
+
super("Invalid string array");
|
|
58
58
|
this.name = "InvalidStringArrayError";
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
export const DEFAULT_COMPOSE_ENVIRONMENT_NAME = "cartesi-rollups";
|
|
61
62
|
/**
|
|
62
63
|
* Configuration for drives of a Cartesi Machine. A drive may already exist or be built by a builder
|
|
63
64
|
*/
|
|
@@ -65,7 +66,7 @@ const DEFAULT_FORMAT = "ext2";
|
|
|
65
66
|
const DEFAULT_RAM = "128Mi";
|
|
66
67
|
const DEFAULT_RAM_IMAGE = "/usr/share/cartesi-machine/images/linux.bin";
|
|
67
68
|
export const DEFAULT_SDK_VERSION = "0.12.0-alpha.15";
|
|
68
|
-
export const DEFAULT_SDK_IMAGE =
|
|
69
|
+
export const DEFAULT_SDK_IMAGE = "cartesi/sdk";
|
|
69
70
|
export const defaultRootDriveConfig = () => ({
|
|
70
71
|
builder: "docker",
|
|
71
72
|
context: ".",
|
|
@@ -90,13 +91,13 @@ export const defaultMachineConfig = () => ({
|
|
|
90
91
|
export const defaultConfig = () => ({
|
|
91
92
|
drives: { root: defaultRootDriveConfig() },
|
|
92
93
|
machine: defaultMachineConfig(),
|
|
93
|
-
sdk: DEFAULT_SDK_IMAGE
|
|
94
|
+
sdk: `${DEFAULT_SDK_IMAGE}:${DEFAULT_SDK_VERSION}`,
|
|
94
95
|
});
|
|
95
96
|
const parseBoolean = (value, defaultValue) => {
|
|
96
97
|
if (value === undefined) {
|
|
97
98
|
return defaultValue;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
+
if (typeof value === "boolean") {
|
|
100
101
|
return value;
|
|
101
102
|
}
|
|
102
103
|
throw new InvalidBooleanValueError(value);
|
|
@@ -105,7 +106,7 @@ const parseOptionalBoolean = (value) => {
|
|
|
105
106
|
if (value === undefined) {
|
|
106
107
|
return undefined;
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
+
if (typeof value === "boolean") {
|
|
109
110
|
return value;
|
|
110
111
|
}
|
|
111
112
|
throw new InvalidBooleanValueError(value);
|
|
@@ -114,7 +115,7 @@ const parseString = (value, defaultValue) => {
|
|
|
114
115
|
if (value === undefined) {
|
|
115
116
|
return defaultValue;
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
+
if (typeof value === "string") {
|
|
118
119
|
return value;
|
|
119
120
|
}
|
|
120
121
|
throw new InvalidStringValueError(value);
|
|
@@ -123,10 +124,10 @@ const parseStringArray = (value) => {
|
|
|
123
124
|
if (value === undefined) {
|
|
124
125
|
return [];
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
+
if (typeof value === "string") {
|
|
127
128
|
return [value];
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
+
if (typeof value === "object" && Array.isArray(value)) {
|
|
130
131
|
return value.map((v) => {
|
|
131
132
|
if (typeof v === "string") {
|
|
132
133
|
return v;
|
|
@@ -140,7 +141,7 @@ const parseRequiredString = (value, key) => {
|
|
|
140
141
|
if (value === undefined) {
|
|
141
142
|
throw new RequiredFieldError(key);
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
+
if (typeof value === "string") {
|
|
144
145
|
return value;
|
|
145
146
|
}
|
|
146
147
|
throw new InvalidStringValueError(value);
|
|
@@ -149,7 +150,7 @@ const parseOptionalString = (value) => {
|
|
|
149
150
|
if (value === undefined) {
|
|
150
151
|
return undefined;
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
+
if (typeof value === "string") {
|
|
153
154
|
return value;
|
|
154
155
|
}
|
|
155
156
|
throw new InvalidStringValueError(value);
|
|
@@ -158,10 +159,10 @@ const parseOptionalStringBoolean = (value) => {
|
|
|
158
159
|
if (value === undefined) {
|
|
159
160
|
return undefined;
|
|
160
161
|
}
|
|
161
|
-
|
|
162
|
+
if (typeof value === "string") {
|
|
162
163
|
return value;
|
|
163
164
|
}
|
|
164
|
-
|
|
165
|
+
if (typeof value === "boolean") {
|
|
165
166
|
return value;
|
|
166
167
|
}
|
|
167
168
|
throw new InvalidStringValueError(value);
|
|
@@ -170,10 +171,10 @@ const parseOptionalNumber = (value) => {
|
|
|
170
171
|
if (value === undefined) {
|
|
171
172
|
return undefined;
|
|
172
173
|
}
|
|
173
|
-
|
|
174
|
+
if (typeof value === "bigint") {
|
|
174
175
|
return value;
|
|
175
176
|
}
|
|
176
|
-
|
|
177
|
+
if (typeof value === "number") {
|
|
177
178
|
return BigInt(value);
|
|
178
179
|
}
|
|
179
180
|
throw new InvalidNumberValueError(value);
|
|
@@ -182,10 +183,10 @@ const parseBytes = (value, defaultValue) => {
|
|
|
182
183
|
if (value === undefined) {
|
|
183
184
|
return defaultValue;
|
|
184
185
|
}
|
|
185
|
-
|
|
186
|
+
if (typeof value === "bigint") {
|
|
186
187
|
return Number(value);
|
|
187
188
|
}
|
|
188
|
-
|
|
189
|
+
if (typeof value === "number" || typeof value === "string") {
|
|
189
190
|
const output = bytes.parse(value);
|
|
190
191
|
if (output !== null) {
|
|
191
192
|
return output;
|
|
@@ -197,7 +198,7 @@ const parseBuilder = (value) => {
|
|
|
197
198
|
if (value === undefined) {
|
|
198
199
|
return "docker";
|
|
199
200
|
}
|
|
200
|
-
|
|
201
|
+
if (typeof value === "string") {
|
|
201
202
|
switch (value) {
|
|
202
203
|
case "directory":
|
|
203
204
|
return "directory";
|
|
@@ -217,7 +218,7 @@ const parseFormat = (value) => {
|
|
|
217
218
|
if (value === undefined) {
|
|
218
219
|
return DEFAULT_FORMAT;
|
|
219
220
|
}
|
|
220
|
-
|
|
221
|
+
if (typeof value === "string") {
|
|
221
222
|
switch (value) {
|
|
222
223
|
case "ext2":
|
|
223
224
|
return "ext2";
|
|
@@ -231,7 +232,7 @@ const parseEmptyFormat = (value) => {
|
|
|
231
232
|
if (value === undefined) {
|
|
232
233
|
return DEFAULT_FORMAT;
|
|
233
234
|
}
|
|
234
|
-
|
|
235
|
+
if (typeof value === "string") {
|
|
235
236
|
switch (value) {
|
|
236
237
|
case "ext2":
|
|
237
238
|
return "ext2";
|
|
@@ -362,7 +363,7 @@ export const parse = (str) => {
|
|
|
362
363
|
const config = {
|
|
363
364
|
drives: parseDrives(toml.drives),
|
|
364
365
|
machine: parseMachine(toml.machine),
|
|
365
|
-
sdk: parseString(toml.sdk, DEFAULT_SDK_IMAGE),
|
|
366
|
+
sdk: parseString(toml.sdk, `${DEFAULT_SDK_IMAGE}:${DEFAULT_SDK_VERSION}`),
|
|
366
367
|
};
|
|
367
368
|
return config;
|
|
368
369
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Range, SemVer } from "semver";
|
|
2
|
-
import { DockerFallbackOptions, ExecaOptionsDockerFallback } from "./util.js";
|
|
1
|
+
import { Range, type SemVer } from "semver";
|
|
2
|
+
import { type DockerFallbackOptions, type ExecaOptionsDockerFallback } from "./util.js";
|
|
3
3
|
export declare const requiredVersion: Range;
|
|
4
4
|
export declare const boot: (args: readonly string[], options: ExecaOptionsDockerFallback) => Promise<import("execa").Result<import("execa").Options & {
|
|
5
5
|
image?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesi-machine.d.ts","sourceRoot":"","sources":["../../src/exec/cartesi-machine.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"cartesi-machine.d.ts","sourceRoot":"","sources":["../../src/exec/cartesi-machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,MAAM,EAAS,MAAM,QAAQ,CAAC;AACnD,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAElC,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,eAAe,OAAuB,CAAC;AAEpD,eAAO,MAAM,IAAI,GACb,MAAM,SAAS,MAAM,EAAE,EACvB,SAAS,0BAA0B;;;GAGtC,CAAC;AAEF,eAAO,MAAM,OAAO,GAChB,UAAU,qBAAqB,KAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAgBvB,CAAC"}
|
package/dist/exec/crane.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { DockerFallbackOptions } from "./util.js";
|
|
1
|
+
import type { Stream } from "node:stream";
|
|
2
|
+
import { Range, type SemVer } from "semver";
|
|
3
|
+
import { type DockerFallbackOptions } from "./util.js";
|
|
4
4
|
export declare const requiredVersion: Range;
|
|
5
5
|
export declare const exportImage: (options: {
|
|
6
6
|
stdin: Stream | number;
|
package/dist/exec/crane.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crane.d.ts","sourceRoot":"","sources":["../../src/exec/crane.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"crane.d.ts","sourceRoot":"","sources":["../../src/exec/crane.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,KAAK,MAAM,EAAS,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,KAAK,qBAAqB,EAA2B,MAAM,WAAW,CAAC;AAEhF,eAAO,MAAM,eAAe,OAAuB,CAAC;AAEpD,eAAO,MAAM,WAAW,GACpB,SAAS;IACL,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,GAAG,qBAAqB;;;;;EAO5B,CAAC;AAEF,eAAO,MAAM,OAAO,GAChB,UAAU,qBAAqB,KAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAMvB,CAAC"}
|
package/dist/exec/crane.js
CHANGED
package/dist/exec/genext2fs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Range, SemVer } from "semver";
|
|
2
|
-
import { DockerFallbackOptions } from "./util.js";
|
|
1
|
+
import { Range, type SemVer } from "semver";
|
|
2
|
+
import { type DockerFallbackOptions } from "./util.js";
|
|
3
3
|
export declare const requiredVersion: Range;
|
|
4
4
|
export declare const empty: (options: {
|
|
5
5
|
cwd?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genext2fs.d.ts","sourceRoot":"","sources":["../../src/exec/genext2fs.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"genext2fs.d.ts","sourceRoot":"","sources":["../../src/exec/genext2fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,MAAM,EAAS,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,KAAK,qBAAqB,EAAuB,MAAM,WAAW,CAAC;AAI5E,eAAO,MAAM,eAAe,EAAE,KAA2B,CAAC;AAU1D,eAAO,MAAM,KAAK,GACd,SAAS;IACL,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB,GAAG,qBAAqB,kBAgB5B,CAAC;AAEF,eAAO,MAAM,aAAa,GACtB,SAAS;IACL,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB,GAAG,qBAAqB;;;GAS5B,CAAC;AAEF,eAAO,MAAM,OAAO,GAChB,SAAS;IACL,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB,GAAG,qBAAqB;;;GAS5B,CAAC;AAEF,eAAO,MAAM,OAAO,GAChB,UAAU,qBAAqB,KAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAevB,CAAC"}
|
package/dist/exec/genext2fs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Range, parse } from "semver";
|
|
2
2
|
import { execaDockerFallback } from "./util.js";
|
|
3
3
|
const BLOCK_SIZE = 4096; // fixed at 4k
|
|
4
4
|
export const requiredVersion = new Range("^1.5.6");
|
|
@@ -36,7 +36,7 @@ export const version = async (options) => {
|
|
|
36
36
|
if (typeof stdout === "string") {
|
|
37
37
|
const regex = /(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/;
|
|
38
38
|
const m = stdout.match(regex);
|
|
39
|
-
if (m
|
|
39
|
+
if (m?.[0]) {
|
|
40
40
|
return parse(m[0]);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Range, SemVer } from "semver";
|
|
2
|
-
import { DockerFallbackOptions } from "./util.js";
|
|
1
|
+
import { Range, type SemVer } from "semver";
|
|
2
|
+
import { type DockerFallbackOptions } from "./util.js";
|
|
3
3
|
export declare const requiredVersion: Range;
|
|
4
4
|
export declare const fromDirectory: (options: {
|
|
5
5
|
cwd?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mksquashfs.d.ts","sourceRoot":"","sources":["../../src/exec/mksquashfs.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mksquashfs.d.ts","sourceRoot":"","sources":["../../src/exec/mksquashfs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,MAAM,EAAS,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,KAAK,qBAAqB,EAAuB,MAAM,WAAW,CAAC;AAI5E,eAAO,MAAM,eAAe,EAAE,KAA2B,CAAC;AAY1D,eAAO,MAAM,aAAa,GACtB,SAAS;IACL,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB,GAAG,qBAAqB;;;GAO5B,CAAC;AAEF,eAAO,MAAM,OAAO,GAChB,SAAS;IACL,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB,GAAG,qBAAqB;;;GAY5B,CAAC;AAEF,eAAO,MAAM,OAAO,GAChB,UAAU,qBAAqB,KAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAoBvB,CAAC"}
|
package/dist/exec/mksquashfs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Range, parse } from "semver";
|
|
2
2
|
import { execaDockerFallback } from "./util.js";
|
|
3
3
|
const COMPRESSION = "lzo"; // make customizable? default is gzip
|
|
4
4
|
export const requiredVersion = new Range("^4.5.1");
|
|
@@ -32,7 +32,7 @@ export const version = async (options) => {
|
|
|
32
32
|
if (typeof stdout === "string") {
|
|
33
33
|
const regex = /(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gm;
|
|
34
34
|
const m = stdout.match(regex);
|
|
35
|
-
if (m
|
|
35
|
+
if (m?.[0]) {
|
|
36
36
|
return parse(m[0]);
|
|
37
37
|
}
|
|
38
38
|
}
|
package/dist/exec/rollups.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollups.d.ts","sourceRoot":"","sources":["../../src/exec/rollups.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"rollups.d.ts","sourceRoot":"","sources":["../../src/exec/rollups.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG1C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,IAAI,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC;CACjC,CAAC;AAUF,KAAK,aAAa,GAAG;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,cAAc,GACvB,UAAU,aAAa,KACxB,OAAO,CAAC,iBAAiB,EAAE,CAuB7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACjC,UAAU,aAAa,KACxB,OAAO,CAAC,iBAAiB,GAAG,SAAS,CASvC,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,OAAO,GAAG,SAAS,CAGzE,CAAC"}
|
package/dist/exec/util.d.ts
CHANGED
package/dist/exec/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/exec/util.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/exec/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,OAAO,EAAS,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,KAAK,gBAAgB,EAAa,MAAM,oBAAoB,CAAC;AAGtE,MAAM,MAAM,qBAAqB,GAC3B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,IAAI,CAAA;CAAE,GACpC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,qBAAqB,CAAC;AACzE,eAAO,MAAM,mBAAmB,GAC5B,SAAS,MAAM,EACf,MAAM,SAAS,MAAM,EAAE,EACvB,SAAS,0BAA0B;YAbvB,MAAM;kBAAgB,KAAK;GAmD1C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,GACrD,qBAAqB,CAAC;AAC1B,eAAO,MAAM,uBAAuB,GAChC,SAAS,MAAM,EACf,MAAM,SAAS,MAAM,EAAE,EACvB,SAAS,0BAA0B;;;;;CA6CtC,CAAC"}
|
package/dist/exec/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import os from "os";
|
|
1
|
+
import { ExecaError, execa } from "execa";
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import os from "node:os";
|
|
4
4
|
export const execaDockerFallback = async (command, args, options) => {
|
|
5
5
|
try {
|
|
6
6
|
if (options.forceDocker) {
|
|
@@ -29,9 +29,7 @@ export const execaDockerFallback = async (command, args, options) => {
|
|
|
29
29
|
];
|
|
30
30
|
return await execa("docker", ["run", ...dockerOpts, options.image, command, ...args], options);
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
console.error(`error executing '${command}'`, error);
|
|
34
|
-
}
|
|
32
|
+
console.error(`error executing '${command}'`, error);
|
|
35
33
|
}
|
|
36
34
|
throw error;
|
|
37
35
|
}
|
|
@@ -71,10 +69,8 @@ export const spawnSyncDockerFallback = (command, args, options) => {
|
|
|
71
69
|
}
|
|
72
70
|
return dockerResult;
|
|
73
71
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
throw result.error;
|
|
77
|
-
}
|
|
72
|
+
console.error(`error executing '${command}'`, result.error);
|
|
73
|
+
throw result.error;
|
|
78
74
|
}
|
|
79
75
|
return result;
|
|
80
76
|
};
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,13 @@ import { createCreateCommand } from "./commands/create.js";
|
|
|
8
8
|
import { createDeployCommand } from "./commands/deploy.js";
|
|
9
9
|
import { createDoctorCommand } from "./commands/doctor.js";
|
|
10
10
|
import { createHashCommand } from "./commands/hash.js";
|
|
11
|
-
import {
|
|
11
|
+
import { createLogsCommand } from "./commands/logs.js";
|
|
12
12
|
import { createRunCommand } from "./commands/run.js";
|
|
13
13
|
import { createSendCommand } from "./commands/send.js";
|
|
14
14
|
import { createShellCommand } from "./commands/shell.js";
|
|
15
|
+
import { createStartCommand } from "./commands/start.js";
|
|
16
|
+
import { createStatusCommand } from "./commands/status.js";
|
|
17
|
+
import { createStopCommand } from "./commands/stop.js";
|
|
15
18
|
// Use `createRequire` to import JSON in ESM
|
|
16
19
|
const require = createRequire(import.meta.url);
|
|
17
20
|
const pkg = require("../package.json");
|
|
@@ -32,13 +35,16 @@ const program = new Command()
|
|
|
32
35
|
.addCommand(createBuildCommand())
|
|
33
36
|
.addCommand(createCleanCommand())
|
|
34
37
|
.addCommand(createCreateCommand())
|
|
35
|
-
.addCommand(createDeployCommand()
|
|
38
|
+
.addCommand(createDeployCommand())
|
|
36
39
|
.addCommand(createDoctorCommand())
|
|
40
|
+
.addCommand(createLogsCommand())
|
|
37
41
|
.addCommand(createHashCommand())
|
|
38
|
-
.addCommand(createRollupsCommand())
|
|
39
42
|
.addCommand(createRunCommand(), { hidden: true })
|
|
40
43
|
.addCommand(createSendCommand())
|
|
41
|
-
.addCommand(createShellCommand())
|
|
44
|
+
.addCommand(createShellCommand())
|
|
45
|
+
.addCommand(createStartCommand())
|
|
46
|
+
.addCommand(createStatusCommand())
|
|
47
|
+
.addCommand(createStopCommand());
|
|
42
48
|
// Global error handling
|
|
43
49
|
process.on("uncaughtException", (err) => {
|
|
44
50
|
if (process.env.NODE_ENV === "development") {
|
package/dist/machine.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config, ImageInfo } from "./config.js";
|
|
1
|
+
import type { Config, ImageInfo } from "./config.js";
|
|
2
2
|
export declare const bootMachine: (config: Config, info: ImageInfo | undefined, destination: string) => Promise<import("execa").Result<import("execa").Options & {
|
|
3
3
|
image?: string;
|
|
4
4
|
forceDocker?: false;
|
package/dist/machine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../src/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAe,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../src/machine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAe,SAAS,EAAE,MAAM,aAAa,CAAC;AAoBlE,eAAO,MAAM,WAAW,GACpB,QAAQ,MAAM,EACd,MAAM,SAAS,GAAG,SAAS,EAC3B,aAAa,MAAM;;;GAwFtB,CAAC"}
|
package/dist/prompts.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Separator } from "@inquirer/core";
|
|
1
|
+
import type { Separator } from "@inquirer/core";
|
|
2
2
|
import input from "@inquirer/input";
|
|
3
3
|
import select from "@inquirer/select";
|
|
4
|
-
import { Context } from "@inquirer/type";
|
|
5
|
-
import { Address, Hex } from "viem";
|
|
4
|
+
import type { Context } from "@inquirer/type";
|
|
5
|
+
import { type Address, type Hex } from "viem";
|
|
6
6
|
type InputConfig = Parameters<typeof input>[0];
|
|
7
7
|
type SelectConfig<ValueType> = Parameters<typeof select<ValueType>>[0];
|
|
8
8
|
/**
|
package/dist/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EASX,MAAM,MAAM,CAAC;AAEd,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,KAAK,YAAY,CAAC,SAAS,IAAI,UAAU,CAAC,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AACtE,eAAO,MAAM,YAAY,GACrB,QAAQ,mBAAmB,KAC5B,OAAO,CAAC,OAAO,CAMjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAAE,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC;AAC9D,eAAO,MAAM,QAAQ,GAAU,QAAQ,eAAe,KAAG,OAAO,CAAC,GAAG,CAMnE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,eAAO,MAAM,WAAW,GACpB,QAAQ,kBAAkB,KAC3B,OAAO,CAAC,MAAM,CAUhB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACnB,QAAQ,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,KAC1C,OAAO,CAAC,GAAG,CA8Cb,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACvB,QAAQ,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,KAC1C,OAAO,CAAC,KAAK,MAAM,EAAE,CA+DvB,CAAC;AAGF,MAAM,MAAM,MAAM,CAAC,SAAS,IAAI;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,SAAS,IAAI,YAAY,CAAC,SAAS,CAAC,GAAG;IAChE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,EAChC,QAAQ,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,EACnE,UAAU,OAAO,GAAG,SAAS,KAC9B,OAAO,CAAC,SAAS,CAsBnB,CAAC"}
|
package/dist/prompts.js
CHANGED
|
@@ -18,7 +18,7 @@ export const hexInput = async (config) => {
|
|
|
18
18
|
return value;
|
|
19
19
|
};
|
|
20
20
|
export const bigintInput = async (config) => {
|
|
21
|
-
const defaultValue = config.default
|
|
21
|
+
const defaultValue = config.default !== undefined
|
|
22
22
|
? formatUnits(config.default, config.decimals)
|
|
23
23
|
: undefined;
|
|
24
24
|
const value = await input({
|
package/dist/template.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DownloadTemplateResult } from "giget";
|
|
2
|
-
export declare const download: (
|
|
1
|
+
import { type DownloadTemplateResult } from "giget";
|
|
2
|
+
export declare const download: (template: string, branch: string, out: string) => Promise<DownloadTemplateResult>;
|
|
3
3
|
//# sourceMappingURL=template.d.ts.map
|
package/dist/template.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,OAAO,CAAC;AAEtE,eAAO,MAAM,QAAQ,GACjB,UAAU,MAAM,EAChB,QAAQ,MAAM,EACd,KAAK,MAAM,KACZ,OAAO,CAAC,sBAAsB,CAehC,CAAC"}
|
package/dist/template.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { downloadTemplate } from "giget";
|
|
2
|
-
export const download = async (
|
|
2
|
+
export const download = async (template, branch, out) => {
|
|
3
3
|
const cartesiProvider = async (input) => {
|
|
4
4
|
return {
|
|
5
5
|
name: "cartesi",
|
|
6
|
-
subdir:
|
|
6
|
+
subdir: input,
|
|
7
7
|
url: "https://github.com/cartesi/application-templates",
|
|
8
8
|
tar: `https://codeload.github.com/cartesi/application-templates/tar.gz/refs/heads/${branch}`,
|
|
9
9
|
};
|
package/dist/wallet.d.ts
CHANGED
package/dist/wallet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../src/wallet.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../src/wallet.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAER,OAAO,EACP,KAAK,EACL,GAAG,EAEH,YAAY,EAEZ,YAAY,EACf,MAAM,MAAM,CAAC;AAsBd,MAAM,MAAM,sBAAsB,GAAG;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,sBAAsB,KAAG,KAAK,EAgBvE,CAAC;AAEF,eAAO,MAAM,uBAAuB,gEAC6B,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,aAAa,CAAC;AA2CpD,MAAM,WAAW,qBAAqB;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,GAAG,CAAC;CACpB;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC5B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,KACzB,OAAO,CAAC,OAAO,CAAC,CAAC;AA+LtB,QAAA,MAAM,aAAa,GACf,SAAS,qBAAqB,KAC/B,OAAO,CAAC;IACP,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC9B,CAuBA,CAAC;AAEF,eAAe,aAAa,CAAC"}
|