@alchemy/cli 0.9.0 → 0.9.1
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 → auth-6BBITIOZ.js} +2 -2
- package/dist/{chunk-WT4RGQLC.js → chunk-AJOLFTCZ.js} +1 -1
- package/dist/{chunk-XCKUCXC6.js → chunk-L2WODD2D.js} +1 -1
- package/dist/{chunk-NMT7XH3C.js → chunk-P56HOTPV.js} +1 -1
- package/dist/{chunk-7ZSEELHZ.js → chunk-SIIZGMK5.js} +1 -1
- package/dist/{chunk-AJPOUEO6.js → chunk-TTWOBNJP.js} +1 -1
- package/dist/index.js +15 -15
- package/dist/{interactive-GVMPYXNJ.js → interactive-IFPSMRMX.js} +3 -3
- package/dist/{onboarding-MDHVOUY3.js → onboarding-ZLBWCNTB.js} +2 -2
- package/dist/{policy-prompt-PHVO6VRZ.js → policy-prompt-4BV5AWVV.js} +2 -2
- package/dist/{resolve-GBS26K44.js → resolve-FQ66OWT7.js} +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@ if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
|
3
3
|
import {
|
|
4
4
|
registerAuth,
|
|
5
5
|
selectAppAfterAuth
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L2WODD2D.js";
|
|
7
7
|
import "./chunk-RGVM5SNE.js";
|
|
8
8
|
import "./chunk-75ICFV5K.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-SIIZGMK5.js";
|
|
10
10
|
import "./chunk-MV7O3XBG.js";
|
|
11
11
|
import "./chunk-GDLPBPG3.js";
|
|
12
12
|
import "./chunk-OVLQH6KL.js";
|
|
@@ -830,7 +830,7 @@ var AdminClient = class _AdminClient {
|
|
|
830
830
|
async createApp(opts) {
|
|
831
831
|
const resp = await this.request("POST", "/v1/apps", {
|
|
832
832
|
name: opts.name,
|
|
833
|
-
|
|
833
|
+
networkAllowlist: opts.networks,
|
|
834
834
|
...opts.description && { description: opts.description },
|
|
835
835
|
...opts.products && { products: opts.products }
|
|
836
836
|
});
|
package/dist/index.js
CHANGED
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
errNotLoggedInForPolicyLookup,
|
|
6
6
|
errSponsorshipNeedsPolicy,
|
|
7
7
|
selectOrCreatePolicy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TTWOBNJP.js";
|
|
9
9
|
import {
|
|
10
10
|
registerAuth
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L2WODD2D.js";
|
|
12
12
|
import {
|
|
13
13
|
openBrowser
|
|
14
14
|
} from "./chunk-RGVM5SNE.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
getSetupStatus,
|
|
19
19
|
isSetupComplete,
|
|
20
20
|
shouldRunOnboarding
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-P56HOTPV.js";
|
|
22
22
|
import {
|
|
23
23
|
isInteractiveAllowed
|
|
24
24
|
} from "./chunk-75ICFV5K.js";
|
|
@@ -54,12 +54,12 @@ import {
|
|
|
54
54
|
saveSession,
|
|
55
55
|
toAdminNetworkId,
|
|
56
56
|
updateSession
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-SIIZGMK5.js";
|
|
58
58
|
import {
|
|
59
59
|
getAvailableUpdate,
|
|
60
60
|
getUpdateStatus,
|
|
61
61
|
printUpdateNotice
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-AJOLFTCZ.js";
|
|
63
63
|
import {
|
|
64
64
|
bold,
|
|
65
65
|
brand,
|
|
@@ -577,8 +577,8 @@ function registerConfig(program2) {
|
|
|
577
577
|
"Interactive policy selection requires an interactive terminal. Pass an ID: `alchemy config set evm-gas-policy-id <id>`."
|
|
578
578
|
);
|
|
579
579
|
}
|
|
580
|
-
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-
|
|
581
|
-
const { resolveNetwork: resolveNetwork2 } = await import("./resolve-
|
|
580
|
+
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-4BV5AWVV.js");
|
|
581
|
+
const { resolveNetwork: resolveNetwork2 } = await import("./resolve-FQ66OWT7.js");
|
|
582
582
|
const network = resolveNetwork2(program2);
|
|
583
583
|
await selectOrCreatePolicy2({
|
|
584
584
|
flavor: "sponsorship",
|
|
@@ -632,8 +632,8 @@ function registerConfig(program2) {
|
|
|
632
632
|
"Interactive policy selection requires an interactive terminal. Pass an ID: `alchemy config set solana-fee-policy-id <id>`."
|
|
633
633
|
);
|
|
634
634
|
}
|
|
635
|
-
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-
|
|
636
|
-
const { resolveSolanaNetwork: resolveSolanaNetwork2 } = await import("./resolve-
|
|
635
|
+
const { selectOrCreatePolicy: selectOrCreatePolicy2 } = await import("./policy-prompt-4BV5AWVV.js");
|
|
636
|
+
const { resolveSolanaNetwork: resolveSolanaNetwork2 } = await import("./resolve-FQ66OWT7.js");
|
|
637
637
|
const network = resolveSolanaNetwork2(program2);
|
|
638
638
|
await selectOrCreatePolicy2({
|
|
639
639
|
flavor: "solana",
|
|
@@ -691,7 +691,7 @@ function registerConfig(program2) {
|
|
|
691
691
|
printJSON(toMap(cfg));
|
|
692
692
|
return;
|
|
693
693
|
}
|
|
694
|
-
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-
|
|
694
|
+
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-FQ66OWT7.js");
|
|
695
695
|
const validToken = resolveAuthToken2(cfg);
|
|
696
696
|
const authStatus = cfg.auth_token ? validToken ? `${green("\u2713")} authenticated${cfg.auth_token_expires_at ? ` ${dim(`(expires ${cfg.auth_token_expires_at})`)}` : ""}` : `${yellow("\u25C6")} expired${cfg.auth_token_expires_at ? ` ${dim(`(${cfg.auth_token_expires_at})`)}` : ""}` : dim("(not set) \u2014 run 'alchemy auth' to log in");
|
|
697
697
|
const pairs = [
|
|
@@ -9125,7 +9125,7 @@ async function flushProcessOutput() {
|
|
|
9125
9125
|
}
|
|
9126
9126
|
program.name("alchemy").description(
|
|
9127
9127
|
"The Alchemy CLI lets you query blockchain data, call JSON-RPC methods, and manage your Alchemy configuration."
|
|
9128
|
-
).version("0.9.
|
|
9128
|
+
).version("0.9.1", "-v, --version", "display CLI version").option("--api-key <key>", "Alchemy API key (env: ALCHEMY_API_KEY)").option(
|
|
9129
9129
|
"-n, --network <network>",
|
|
9130
9130
|
"Target network (default: eth-mainnet) (env: ALCHEMY_NETWORK)"
|
|
9131
9131
|
).option("--x402", "Use x402 wallet-based gateway auth").option(
|
|
@@ -9312,11 +9312,11 @@ ${styledLine}`;
|
|
|
9312
9312
|
"wallet"
|
|
9313
9313
|
];
|
|
9314
9314
|
if (!skipAppPrompt.includes(cmdName) && isInteractiveAllowed(program) && !opts.apiKey && !process.env.ALCHEMY_API_KEY) {
|
|
9315
|
-
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-
|
|
9315
|
+
const { resolveAuthToken: resolveAuthToken2 } = await import("./resolve-FQ66OWT7.js");
|
|
9316
9316
|
const authToken = resolveAuthToken2(cfg);
|
|
9317
9317
|
const hasApiKey = Boolean(cfg.api_key?.trim() || cfg.app?.apiKey);
|
|
9318
9318
|
if (authToken && !hasApiKey) {
|
|
9319
|
-
const { selectAppAfterAuth } = await import("./auth-
|
|
9319
|
+
const { selectAppAfterAuth } = await import("./auth-6BBITIOZ.js");
|
|
9320
9320
|
console.log("");
|
|
9321
9321
|
console.log(` No app selected. Please select an app to continue.`);
|
|
9322
9322
|
await selectAppAfterAuth(authToken);
|
|
@@ -9351,7 +9351,7 @@ ${styledLine}`;
|
|
|
9351
9351
|
if (isInteractiveAllowed(program)) {
|
|
9352
9352
|
let latestForInteractiveStartup = null;
|
|
9353
9353
|
if (shouldRunOnboarding(program, cfg)) {
|
|
9354
|
-
const { runOnboarding } = await import("./onboarding-
|
|
9354
|
+
const { runOnboarding } = await import("./onboarding-ZLBWCNTB.js");
|
|
9355
9355
|
const latest = getAvailableUpdateOnce();
|
|
9356
9356
|
const completed = await runOnboarding(program, latest);
|
|
9357
9357
|
updateShownDuringInteractiveStartup = Boolean(latest);
|
|
@@ -9365,7 +9365,7 @@ ${styledLine}`;
|
|
|
9365
9365
|
latestForInteractiveStartup
|
|
9366
9366
|
);
|
|
9367
9367
|
}
|
|
9368
|
-
const { startREPL } = await import("./interactive-
|
|
9368
|
+
const { startREPL } = await import("./interactive-IFPSMRMX.js");
|
|
9369
9369
|
program.exitOverride();
|
|
9370
9370
|
program.configureOutput({
|
|
9371
9371
|
writeErr: () => {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
getSetupMethod
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P56HOTPV.js";
|
|
6
6
|
import "./chunk-75ICFV5K.js";
|
|
7
7
|
import {
|
|
8
8
|
getRPCNetworkIds
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SIIZGMK5.js";
|
|
10
10
|
import {
|
|
11
11
|
getUpdateNoticeLines
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AJOLFTCZ.js";
|
|
13
13
|
import {
|
|
14
14
|
bold,
|
|
15
15
|
brand,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
|
|
3
3
|
import {
|
|
4
4
|
getUpdateNoticeLines
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AJOLFTCZ.js";
|
|
6
6
|
import {
|
|
7
7
|
bold,
|
|
8
8
|
brand,
|
|
@@ -51,7 +51,7 @@ async function runOnboarding(_program, latestUpdate = null) {
|
|
|
51
51
|
auth_token_expires_at: result.expiresAt
|
|
52
52
|
});
|
|
53
53
|
console.log(` ${green("\u2713")} Logged in successfully`);
|
|
54
|
-
const { selectAppAfterAuth } = await import("./auth-
|
|
54
|
+
const { selectAppAfterAuth } = await import("./auth-6BBITIOZ.js");
|
|
55
55
|
await selectAppAfterAuth(result.token);
|
|
56
56
|
return true;
|
|
57
57
|
} catch (err) {
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
errNotLoggedInForPolicyLookup,
|
|
6
6
|
errSponsorshipNeedsPolicy,
|
|
7
7
|
selectOrCreatePolicy
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-TTWOBNJP.js";
|
|
9
|
+
import "./chunk-SIIZGMK5.js";
|
|
10
10
|
import "./chunk-MV7O3XBG.js";
|
|
11
11
|
import "./chunk-GDLPBPG3.js";
|
|
12
12
|
import "./chunk-OVLQH6KL.js";
|