@alchemy/cli 0.9.3 → 0.11.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.
@@ -5,7 +5,7 @@ import {
5
5
  isJSONMode,
6
6
  quiet,
7
7
  rgb
8
- } from "./chunk-CTTW4PA4.js";
8
+ } from "./chunk-5BEJA752.js";
9
9
 
10
10
  // src/lib/terminal-ui.ts
11
11
  import * as readline from "readline";
@@ -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-CTTW4PA4.js";
5
+ } from "./chunk-5BEJA752.js";
6
6
 
7
7
  // src/lib/auth.ts
8
8
  import { createHash, randomBytes } from "crypto";
@@ -3,7 +3,7 @@ if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
3
3
  import {
4
4
  gasManagerClientFromFlags,
5
5
  toAdminNetworkId
6
- } from "./chunk-ANONMDDZ.js";
6
+ } from "./chunk-B5KVL3ZR.js";
7
7
  import {
8
8
  dim,
9
9
  green,
@@ -11,16 +11,16 @@ import {
11
11
  promptConfirm,
12
12
  promptText,
13
13
  withSpinner
14
- } from "./chunk-PMNRIXJI.js";
14
+ } from "./chunk-DXQAGBW6.js";
15
15
  import {
16
16
  load,
17
17
  save
18
- } from "./chunk-GLKB4JM7.js";
18
+ } from "./chunk-LANOFNO6.js";
19
19
  import {
20
20
  errAppRequired,
21
21
  errInvalidArgs,
22
22
  errLoginRequired
23
- } from "./chunk-CTTW4PA4.js";
23
+ } from "./chunk-5BEJA752.js";
24
24
 
25
25
  // src/lib/policy-prompt.ts
26
26
  var CREATE_NEW_SENTINEL = "__create_new__";
@@ -2,7 +2,7 @@
2
2
  if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
3
3
  import {
4
4
  isRevealMode
5
- } from "./chunk-CTTW4PA4.js";
5
+ } from "./chunk-5BEJA752.js";
6
6
 
7
7
  // src/lib/secrets.ts
8
8
  function maskSecret(value) {
@@ -22,11 +22,8 @@ import { z } from "zod";
22
22
  var KEY_MAP = {
23
23
  "api-key": "api_key",
24
24
  api_key: "api_key",
25
- "access-key": "access_key",
26
- access_key: "access_key",
27
25
  "webhook-api-key": "webhook_api_key",
28
26
  webhook_api_key: "webhook_api_key",
29
- network: "network",
30
27
  verbose: "verbose",
31
28
  "wallet-key-file": "wallet_key_file",
32
29
  wallet_key_file: "wallet_key_file",
@@ -57,7 +54,6 @@ var KEY_MAP = {
57
54
  wallet_client_instance_name: "wallet_client_instance_name"
58
55
  };
59
56
  var SAFE_ID_RE = /^[A-Za-z0-9:_-]{1,128}$/;
60
- var SAFE_NETWORK_RE = /^[A-Za-z0-9:_-]{1,128}$/;
61
57
  var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
62
58
  var MAX_SECRET_LEN = 512;
63
59
  var MAX_APP_NAME_LEN = 128;
@@ -74,10 +70,8 @@ var appConfigSchema = z.object({
74
70
  var MAX_PATH_LEN = 4096;
75
71
  var configSchema = z.object({
76
72
  api_key: safeTextSchema(MAX_SECRET_LEN).optional().catch(void 0),
77
- access_key: safeTextSchema(MAX_SECRET_LEN).optional().catch(void 0),
78
73
  webhook_api_key: safeTextSchema(MAX_SECRET_LEN).optional().catch(void 0),
79
74
  app: appConfigSchema.optional().catch(void 0),
80
- network: z.string().regex(SAFE_NETWORK_RE).optional().catch(void 0),
81
75
  verbose: z.boolean().optional().catch(void 0),
82
76
  wallet_key_file: safeTextSchema(MAX_PATH_LEN).optional().catch(void 0),
83
77
  wallet_address: safeTextSchema(MAX_SECRET_LEN).optional().catch(void 0),
@@ -212,9 +206,7 @@ function get(cfg, key) {
212
206
  function validKeys() {
213
207
  return [
214
208
  "api-key",
215
- "access-key",
216
209
  "webhook-api-key",
217
- "network",
218
210
  "verbose",
219
211
  "wallet-key-file",
220
212
  "x402",
@@ -227,10 +219,8 @@ function validKeys() {
227
219
  function toMap(cfg) {
228
220
  const m = {};
229
221
  if (cfg.api_key) m["api-key"] = maskIf(cfg.api_key);
230
- if (cfg.access_key) m["access-key"] = maskIf(cfg.access_key);
231
222
  if (cfg.webhook_api_key) m["webhook-api-key"] = maskIf(cfg.webhook_api_key);
232
223
  if (cfg.app) m["app"] = `${cfg.app.name} (${cfg.app.id})`;
233
- if (cfg.network) m["network"] = cfg.network;
234
224
  if (cfg.verbose !== void 0) m["verbose"] = String(cfg.verbose);
235
225
  if (cfg.wallet_key_file) m["wallet-key-file"] = cfg.wallet_key_file;
236
226
  if (cfg.wallet_address) m["wallet-address"] = cfg.wallet_address;
@@ -2,7 +2,7 @@
2
2
  if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
3
3
  import {
4
4
  isJSONMode
5
- } from "./chunk-CTTW4PA4.js";
5
+ } from "./chunk-5BEJA752.js";
6
6
 
7
7
  // src/lib/interaction.ts
8
8
  import { stdin, stdout } from "process";
@@ -4,14 +4,14 @@ import {
4
4
  completeLogin,
5
5
  prepareLogin,
6
6
  revokeToken
7
- } from "./chunk-AMGGO36F.js";
7
+ } from "./chunk-I6YQX7PF.js";
8
8
  import {
9
9
  isInteractiveAllowed
10
- } from "./chunk-3GBDYROJ.js";
10
+ } from "./chunk-RPSHRYCZ.js";
11
11
  import {
12
12
  AdminClient,
13
13
  resolveAuthToken
14
- } from "./chunk-ANONMDDZ.js";
14
+ } from "./chunk-B5KVL3ZR.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-PMNRIXJI.js";
23
+ } from "./chunk-DXQAGBW6.js";
24
24
  import {
25
25
  configPath,
26
26
  load,
27
27
  maskIf,
28
28
  save
29
- } from "./chunk-GLKB4JM7.js";
29
+ } from "./chunk-LANOFNO6.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-CTTW4PA4.js";
37
+ } from "./chunk-5BEJA752.js";
38
38
 
39
39
  // src/commands/auth.ts
40
40
  function registerAuth(program) {
@@ -5,16 +5,15 @@ import {
5
5
  EXIT_CODES,
6
6
  ErrorCode,
7
7
  errAccessDenied,
8
- errAccessKeyRequired,
9
8
  errAdminAPI,
10
9
  errAppRequired,
11
10
  errAuthRequired,
12
11
  errInvalidAPIKey,
13
- errInvalidAccessKey,
14
12
  errInvalidArgs,
15
13
  errLoginRequired,
16
14
  errNetwork,
17
15
  errNetworkNotEnabled,
16
+ errNetworkRequired,
18
17
  errNoActiveSession,
19
18
  errNotFound,
20
19
  errRPC,
@@ -24,25 +23,25 @@ import {
24
23
  errSolanaTransactionFailed,
25
24
  errSolanaWalletKeyRequired,
26
25
  errWalletKeyRequired,
26
+ errWalletRequired,
27
27
  exitWithError,
28
28
  isReplMode,
29
29
  setReplMode
30
- } from "./chunk-CTTW4PA4.js";
30
+ } from "./chunk-5BEJA752.js";
31
31
  export {
32
32
  CLIError,
33
33
  EXIT_CODES,
34
34
  ErrorCode,
35
35
  errAccessDenied,
36
- errAccessKeyRequired,
37
36
  errAdminAPI,
38
37
  errAppRequired,
39
38
  errAuthRequired,
40
39
  errInvalidAPIKey,
41
- errInvalidAccessKey,
42
40
  errInvalidArgs,
43
41
  errLoginRequired,
44
42
  errNetwork,
45
43
  errNetworkNotEnabled,
44
+ errNetworkRequired,
46
45
  errNoActiveSession,
47
46
  errNotFound,
48
47
  errRPC,
@@ -52,6 +51,7 @@ export {
52
51
  errSolanaTransactionFailed,
53
52
  errSolanaWalletKeyRequired,
54
53
  errWalletKeyRequired,
54
+ errWalletRequired,
55
55
  exitWithError,
56
56
  isReplMode,
57
57
  setReplMode