@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.
@@ -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-64A5W4M2.js";
5
+ } from "./chunk-75ICFV5K.js";
6
6
  import {
7
7
  resolveAuthToken,
8
8
  resolveWalletSession
9
- } from "./chunk-K6V3R7SH.js";
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 --chain evm"
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 --chain evm && alchemy config set x402 true"]
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 --chain evm && alchemy config set x402 true"
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 --chain evm', or use --wallet-key-file.",
452
- "alchemy wallet connect --mode local --chain evm"
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 --chain solana', or use --solana-wallet-key-file.",
473
- "alchemy wallet connect --mode local --chain solana"
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,7 +2,7 @@
2
2
  if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
3
3
  import {
4
4
  getBaseDomain
5
- } from "./chunk-2BALTY22.js";
5
+ } from "./chunk-OVLQH6KL.js";
6
6
 
7
7
  // src/lib/auth.ts
8
8
  import { createHash, randomBytes } from "crypto";
@@ -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-JUCUKTP3.js";
5
+ } from "./chunk-GDLPBPG3.js";
6
6
  import {
7
7
  esc
8
- } from "./chunk-2BALTY22.js";
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.7.4" : "0.0.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-C5HNQOLB.js";
7
+ } from "./chunk-RGVM5SNE.js";
8
8
  import {
9
9
  isInteractiveAllowed
10
- } from "./chunk-64A5W4M2.js";
10
+ } from "./chunk-75ICFV5K.js";
11
11
  import {
12
12
  AdminClient,
13
13
  resolveAuthToken
14
- } from "./chunk-K6V3R7SH.js";
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-5IL2PMZ6.js";
23
+ } from "./chunk-MV7O3XBG.js";
24
24
  import {
25
25
  configPath,
26
26
  load,
27
27
  maskIf,
28
28
  save
29
- } from "./chunk-JUCUKTP3.js";
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-2BALTY22.js";
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-2BALTY22.js";
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,