clawmoney 0.15.24 → 0.15.25
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,7 +2,7 @@ import { execSync } from "node:child_process";
|
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import { intro, outro, multiselect,
|
|
5
|
+
import { intro, outro, multiselect, select, spinner, isCancel, cancel, log, } from "@clack/prompts";
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
import { apiPost } from "../utils/api.js";
|
|
8
8
|
import { loadConfig, requireConfig } from "../utils/config.js";
|
|
@@ -288,15 +288,13 @@ export async function relaySetupCommand() {
|
|
|
288
288
|
log.message(chalk.dim(` ${registrations.length} provider(s) · ${limitLabel[dailyLimit] ?? `$${dailyLimit}/day cap`} per model`));
|
|
289
289
|
log.message(chalk.dim(` You earn ~${Math.round((1 - PLATFORM_FEE) * 100)}% of what buyers pay (after platform fee)`));
|
|
290
290
|
log.message(chalk.dim(` To customize: edit ~/.clawmoney/config.yaml after start`));
|
|
291
|
-
const proceed = await confirm({
|
|
292
|
-
message: `Register all ${registrations.length} providers now?`,
|
|
293
|
-
initialValue: true,
|
|
294
|
-
});
|
|
295
|
-
if (isCancel(proceed) || !proceed) {
|
|
296
|
-
cancel("Setup cancelled");
|
|
297
|
-
process.exit(0);
|
|
298
|
-
}
|
|
299
291
|
// ── Step 6: register each (idempotent — "already registered" counts as success) ──
|
|
292
|
+
//
|
|
293
|
+
// No "Register all N providers now?" confirm — the user already
|
|
294
|
+
// picked subscriptions + daily quota share. Seeing the summary and
|
|
295
|
+
// immediately going into registration is the expected flow. Ctrl-C
|
|
296
|
+
// still aborts, and registrations are idempotent so a mid-way abort
|
|
297
|
+
// is recoverable by re-running.
|
|
300
298
|
let succeeded = 0;
|
|
301
299
|
let failed = 0;
|
|
302
300
|
const failures = [];
|