Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@alchemyplatform/cli",
"name": "@alchemy/cli",
"version": "0.1.0",
"description": "Alchemy CLI — interact with blockchain data",
"type": "module",
Expand Down Expand Up @@ -38,7 +38,6 @@
},
"dependencies": {
"@alchemy/x402": "^0.4.0",
"@clack/prompts": "^1.0.1",
"cli-table3": "^0.6.5",
"commander": "^14.0.3",
"zod": "^4.3.6"
Expand Down
25 changes: 0 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/commands/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { App } from "../lib/admin-client.js";
import { errInvalidArgs } from "../lib/errors.js";
import { isJSONMode, printJSON } from "../lib/output.js";
import { exitWithError } from "../index.js";
import { promptSelect } from "../lib/terminal-ui.js";
import {
green,
dim,
Expand All @@ -14,6 +15,7 @@ import {
maskIf,
} from "../lib/ui.js";
import { splitCommaList } from "../lib/validators.js";
import { isInteractiveAllowed } from "../lib/interaction.js";

function maskAppSecrets<T extends { apiKey?: string; webhookApiKey?: string }>(app: T): T {
return {
Expand All @@ -35,19 +37,17 @@ function printFetchSummary(
type PaginationAction = "next" | "all" | "stop";

async function promptPaginationAction(): Promise<PaginationAction> {
const { select, isCancel, cancel } = await import("@clack/prompts");
const action = await select({
message: "More apps are available. What do you want to do?",
const action = await promptSelect({
message: "More apps available",
options: [
{ label: "Load next page", value: "next" },
{ label: "Load all remaining pages", value: "all" },
{ label: "Stop here", value: "stop" },
],
initialValue: "next",
cancelMessage: "Stopped pagination.",
});

if (isCancel(action)) {
cancel("Stopped pagination.");
if (action === null) {
return "stop";
}

Expand Down Expand Up @@ -176,7 +176,7 @@ export function registerApps(program: Command) {
return;
}

const interactivePagination = process.stdin.isTTY && !opts.all;
const interactivePagination = isInteractiveAllowed(program) && !opts.all;
if (interactivePagination) {
let page = result;
let autoFetchRemaining = false;
Expand Down
Loading