@alchemy/cli 0.7.4 → 0.9.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/auth-65X7EMCF.js +16 -0
- package/dist/{auth-GD7BJOMK.js → auth-IAM4AMBK.js} +2 -2
- package/dist/{chunk-64A5W4M2.js → chunk-75ICFV5K.js} +1 -1
- package/dist/{chunk-K6V3R7SH.js → chunk-7ZSEELHZ.js} +312 -8
- package/dist/chunk-AJPOUEO6.js +186 -0
- package/dist/{chunk-JUCUKTP3.js → chunk-GDLPBPG3.js} +1 -1
- package/dist/{chunk-5IL2PMZ6.js → chunk-MV7O3XBG.js} +1 -1
- package/dist/{chunk-R4W44A6E.js → chunk-NMT7XH3C.js} +5 -5
- package/dist/{chunk-2BALTY22.js → chunk-OVLQH6KL.js} +12 -4
- package/dist/{chunk-C5HNQOLB.js → chunk-RGVM5SNE.js} +1 -1
- package/dist/{chunk-N36ZNOVV.js → chunk-WT4RGQLC.js} +3 -3
- package/dist/{chunk-XSN4XA5Z.js → chunk-XCKUCXC6.js} +6 -6
- package/dist/{errors-E2P6WHTX.js → errors-T6XE2I2L.js} +3 -1
- package/dist/index.js +1062 -234
- package/dist/{interactive-MHAC5WQI.js → interactive-GVMPYXNJ.js} +7 -7
- package/dist/{onboarding-CT4RRH6O.js → onboarding-MDHVOUY3.js} +6 -6
- package/dist/policy-prompt-PHVO6VRZ.js +18 -0
- package/dist/{resolve-WXT5ZCUK.js → resolve-GBS26K44.js} +7 -3
- package/package.json +1 -1
- package/dist/auth-F2IXC6CM.js +0 -16
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
isInteractiveAllowed
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-75ICFV5K.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveAuthToken,
|
|
8
8
|
resolveWalletSession
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7ZSEELHZ.js";
|
|
10
10
|
|
|
11
11
|
// src/lib/onboarding.ts
|
|
12
12
|
var SETUP_CAPABILITY_ORDER = [
|
|
@@ -74,14 +74,14 @@ function getSetupCapabilities(cfg) {
|
|
|
74
74
|
missing: hasLocalWallet || hasSessionWallet ? [] : ["wallet signer"],
|
|
75
75
|
nextCommands: hasLocalWallet || hasSessionWallet ? [] : [
|
|
76
76
|
"alchemy wallet connect",
|
|
77
|
-
"alchemy wallet connect --mode local
|
|
77
|
+
"alchemy wallet connect --mode local"
|
|
78
78
|
]
|
|
79
79
|
}),
|
|
80
80
|
x402: capabilityStatus({
|
|
81
81
|
complete: x402Ready,
|
|
82
82
|
satisfiedBy: x402Ready ? "x402_wallet" : null,
|
|
83
83
|
missing: x402Ready ? [] : ["x402 enabled with wallet key file"],
|
|
84
|
-
nextCommands: x402Ready ? [] : ["alchemy wallet connect --mode local
|
|
84
|
+
nextCommands: x402Ready ? [] : ["alchemy wallet connect --mode local && alchemy config set x402 true"]
|
|
85
85
|
})
|
|
86
86
|
};
|
|
87
87
|
}
|
|
@@ -115,7 +115,7 @@ function getSetupStatus(cfg) {
|
|
|
115
115
|
"alchemy auth",
|
|
116
116
|
"alchemy config set app",
|
|
117
117
|
"alchemy config set access-key <key> && alchemy config set app <app-id>",
|
|
118
|
-
"alchemy wallet connect --mode local
|
|
118
|
+
"alchemy wallet connect --mode local && alchemy config set x402 true"
|
|
119
119
|
],
|
|
120
120
|
capabilities
|
|
121
121
|
};
|
|
@@ -375,6 +375,13 @@ function errAccessKeyRequired() {
|
|
|
375
375
|
"Get an access key: https://www.alchemy.com/docs/reference/admin-api/overview"
|
|
376
376
|
);
|
|
377
377
|
}
|
|
378
|
+
function errLoginRequired() {
|
|
379
|
+
return new CLIError(
|
|
380
|
+
ErrorCode.AUTH_REQUIRED,
|
|
381
|
+
"Sign in to Alchemy to continue. Run 'alchemy auth login', then retry.",
|
|
382
|
+
"alchemy auth login"
|
|
383
|
+
);
|
|
384
|
+
}
|
|
378
385
|
function errInvalidAPIKey(details) {
|
|
379
386
|
return new CLIError(
|
|
380
387
|
ErrorCode.INVALID_API_KEY,
|
|
@@ -448,8 +455,8 @@ function errAppRequired() {
|
|
|
448
455
|
function errWalletKeyRequired() {
|
|
449
456
|
return new CLIError(
|
|
450
457
|
ErrorCode.AUTH_REQUIRED,
|
|
451
|
-
"Wallet key required for x402. Set ALCHEMY_WALLET_KEY, run 'alchemy wallet connect --mode local
|
|
452
|
-
"alchemy wallet connect --mode local
|
|
458
|
+
"Wallet key required for x402. Set ALCHEMY_WALLET_KEY, run 'alchemy wallet connect --mode local', or use --wallet-key-file.",
|
|
459
|
+
"alchemy wallet connect --mode local"
|
|
453
460
|
);
|
|
454
461
|
}
|
|
455
462
|
function errSessionExpired() {
|
|
@@ -469,8 +476,8 @@ function errNoActiveSession() {
|
|
|
469
476
|
function errSolanaWalletKeyRequired() {
|
|
470
477
|
return new CLIError(
|
|
471
478
|
ErrorCode.AUTH_REQUIRED,
|
|
472
|
-
"Solana wallet key required. Set ALCHEMY_SOLANA_WALLET_KEY, run 'alchemy wallet connect --mode local
|
|
473
|
-
"alchemy wallet connect --mode local
|
|
479
|
+
"Solana wallet key required. Set ALCHEMY_SOLANA_WALLET_KEY, run 'alchemy wallet connect --mode local', or use --solana-wallet-key-file.",
|
|
480
|
+
"alchemy wallet connect --mode local"
|
|
474
481
|
);
|
|
475
482
|
}
|
|
476
483
|
function errSolanaTransactionFailed(details) {
|
|
@@ -541,6 +548,7 @@ export {
|
|
|
541
548
|
CLIError,
|
|
542
549
|
errAuthRequired,
|
|
543
550
|
errAccessKeyRequired,
|
|
551
|
+
errLoginRequired,
|
|
544
552
|
errInvalidAPIKey,
|
|
545
553
|
errNetworkNotEnabled,
|
|
546
554
|
errNetwork,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
configPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GDLPBPG3.js";
|
|
6
6
|
import {
|
|
7
7
|
esc
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OVLQH6KL.js";
|
|
9
9
|
|
|
10
10
|
// src/lib/update-check.ts
|
|
11
11
|
import { execFileSync } from "child_process";
|
|
@@ -53,7 +53,7 @@ function semverLT(a, b) {
|
|
|
53
53
|
return false;
|
|
54
54
|
}
|
|
55
55
|
function currentVersion() {
|
|
56
|
-
return true ? "0.
|
|
56
|
+
return true ? "0.9.0" : "0.0.0";
|
|
57
57
|
}
|
|
58
58
|
function toUpdateStatus(latestVersion, checkedAt) {
|
|
59
59
|
const current = currentVersion();
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
completeLogin,
|
|
5
5
|
prepareLogin,
|
|
6
6
|
revokeToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RGVM5SNE.js";
|
|
8
8
|
import {
|
|
9
9
|
isInteractiveAllowed
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-75ICFV5K.js";
|
|
11
11
|
import {
|
|
12
12
|
AdminClient,
|
|
13
13
|
resolveAuthToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7ZSEELHZ.js";
|
|
15
15
|
import {
|
|
16
16
|
bold,
|
|
17
17
|
brand,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
promptAutocomplete,
|
|
21
21
|
promptText,
|
|
22
22
|
withSpinner
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MV7O3XBG.js";
|
|
24
24
|
import {
|
|
25
25
|
configPath,
|
|
26
26
|
load,
|
|
27
27
|
maskIf,
|
|
28
28
|
save
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GDLPBPG3.js";
|
|
30
30
|
import {
|
|
31
31
|
CLIError,
|
|
32
32
|
ErrorCode,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
exitWithError,
|
|
35
35
|
isJSONMode,
|
|
36
36
|
printHuman
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-OVLQH6KL.js";
|
|
38
38
|
|
|
39
39
|
// src/commands/auth.ts
|
|
40
40
|
function registerAuth(program) {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
errInvalidAPIKey,
|
|
13
13
|
errInvalidAccessKey,
|
|
14
14
|
errInvalidArgs,
|
|
15
|
+
errLoginRequired,
|
|
15
16
|
errNetwork,
|
|
16
17
|
errNetworkNotEnabled,
|
|
17
18
|
errNoActiveSession,
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
exitWithError,
|
|
27
28
|
isReplMode,
|
|
28
29
|
setReplMode
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-OVLQH6KL.js";
|
|
30
31
|
export {
|
|
31
32
|
CLIError,
|
|
32
33
|
EXIT_CODES,
|
|
@@ -39,6 +40,7 @@ export {
|
|
|
39
40
|
errInvalidAPIKey,
|
|
40
41
|
errInvalidAccessKey,
|
|
41
42
|
errInvalidArgs,
|
|
43
|
+
errLoginRequired,
|
|
42
44
|
errNetwork,
|
|
43
45
|
errNetworkNotEnabled,
|
|
44
46
|
errNoActiveSession,
|