deepline 0.3.328 → 0.3.330
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/bundling-sources/sdk/src/billing-idempotency.ts +24 -0
- package/dist/bundling-sources/sdk/src/client.ts +22 -22
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/play.ts +55 -45
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +16 -0
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +31 -15
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +22 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +29 -11
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +145 -19
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -10
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +59 -10
- package/dist/cli/{auth-ANHHABWT.mjs → auth-A4XQ3KMW.mjs} +4 -4
- package/dist/cli/auth-XJJYQESF.js +31 -0
- package/dist/cli/{billing-R6NYYO6G.mjs → billing-634WZLKG.mjs} +36 -14
- package/dist/cli/{billing-GGVKLFE6.js → billing-WLHXYC5Z.js} +101 -79
- package/dist/cli/{chunk-ZND34HL7.mjs → chunk-3QZ22IZO.mjs} +4 -4
- package/dist/cli/{chunk-UDIPEHNJ.js → chunk-46IVSO6O.js} +141 -11
- package/dist/cli/{chunk-GZV5F6CL.mjs → chunk-56RM5AQF.mjs} +79 -26
- package/dist/cli/{chunk-UM4ZE3P7.mjs → chunk-5W636CDP.mjs} +2 -2
- package/dist/cli/{chunk-W6WV6UME.js → chunk-63W4744F.js} +563 -555
- package/dist/cli/{chunk-OOLIEDIJ.mjs → chunk-6VBXS43D.mjs} +2 -2
- package/dist/cli/{chunk-B2R66UTW.mjs → chunk-7DGZCMXQ.mjs} +1 -1
- package/dist/cli/{chunk-7DDNACAQ.js → chunk-7FWHOKNS.js} +26 -26
- package/dist/cli/{chunk-YIY74KUF.mjs → chunk-EV4QJE4J.mjs} +1 -1
- package/dist/cli/{chunk-2HKPAZVJ.js → chunk-FKKNYKDY.js} +14 -3
- package/dist/cli/{chunk-DNYRAZSK.js → chunk-FLIABSY6.js} +48 -48
- package/dist/cli/{chunk-O5GPNPOC.js → chunk-GHHLLEZK.js} +4 -4
- package/dist/cli/{chunk-ZFKUVDOM.js → chunk-GKZZ32EV.js} +60 -60
- package/dist/cli/{chunk-LJWC5HSO.js → chunk-GS7GA7PI.js} +15 -15
- package/dist/cli/{chunk-7R6KQSFA.mjs → chunk-GTBS6LQH.mjs} +38 -22
- package/dist/cli/{chunk-2FPVWL4W.js → chunk-LNDGT7NV.js} +119 -66
- package/dist/cli/{chunk-SMGNDW7O.mjs → chunk-LQ5DD2UF.mjs} +2 -2
- package/dist/cli/{chunk-WWVE4HFN.mjs → chunk-MBI3BVSQ.mjs} +1 -1
- package/dist/cli/{chunk-KP7W5NO6.mjs → chunk-NTVTZAVZ.mjs} +13 -2
- package/dist/cli/{chunk-XVKQ6D4K.js → chunk-O2L46S3I.js} +2 -2
- package/dist/cli/{chunk-BC7FMQ2G.mjs → chunk-PH2N6GC7.mjs} +1 -1
- package/dist/cli/{chunk-6ENR652E.mjs → chunk-SDSS4OTO.mjs} +77 -69
- package/dist/cli/{chunk-YFCHBN3C.mjs → chunk-SZCUJ4AL.mjs} +1 -1
- package/dist/cli/{chunk-AGH6YP2T.js → chunk-UQV5M6HN.js} +3 -3
- package/dist/cli/{chunk-7MABE3ZK.mjs → chunk-VFC6CZLF.mjs} +135 -5
- package/dist/cli/{chunk-DNMV2L7Q.js → chunk-WHKTRZ3J.js} +6 -6
- package/dist/cli/{chunk-Y4LXIUHX.js → chunk-XUNMVZOW.js} +1 -1
- package/dist/cli/{chunk-LEEXRXQQ.js → chunk-YFP4UH2Y.js} +6 -6
- package/dist/cli/{chunk-ITFUZEHE.js → chunk-YGFQ7YSM.js} +51 -35
- package/dist/cli/{chunk-AKKQ26RX.mjs → chunk-ZYPFCBW5.mjs} +1 -1
- package/dist/cli/client-3CREIHGC.js +20 -0
- package/dist/cli/{client-ZABA5NMD.mjs → client-WYFGEJOX.mjs} +3 -3
- package/dist/cli/{csv-VECE3PWX.mjs → csv-BDZSDXLU.mjs} +3 -3
- package/dist/cli/{csv-4ZK5ZJAJ.js → csv-THMQDXCJ.js} +12 -12
- package/dist/cli/{db-UJPCDBV7.js → db-5BQJOZG7.js} +29 -29
- package/dist/cli/{db-6VE4OEWW.mjs → db-R2LTNLFM.mjs} +4 -4
- package/dist/cli/{describe-CFUZZ326.js → describe-F4G5H3SC.js} +17 -17
- package/dist/cli/{describe-W6X5G4JR.mjs → describe-WECII7FS.mjs} +10 -10
- package/dist/cli/{executions-AI4DTQQL.js → executions-HJRVD4M6.js} +6 -6
- package/dist/cli/{executions-ZZWB75DF.mjs → executions-HPRIRB73.mjs} +4 -4
- package/dist/cli/{feedback-IM5Z6T5K.mjs → feedback-5VVW5WW7.mjs} +3 -3
- package/dist/cli/{feedback-FYSNSYUU.js → feedback-GHGDH43D.js} +6 -6
- package/dist/cli/{git-YNYTK3YW.mjs → git-BBXML2UJ.mjs} +4 -4
- package/dist/cli/git-NNEBLRVP.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-4DTMYYUY.mjs → legacy-noops-IALOUAGL.mjs} +4 -4
- package/dist/cli/{legacy-noops-PHJE2XFK.js → legacy-noops-VNZZ3VVT.js} +7 -7
- package/dist/cli/{monitors-27JP76WE.js → monitors-MLP6IA2R.js} +85 -85
- package/dist/cli/{monitors-HUP4MVWJ.mjs → monitors-VDEB2FKS.mjs} +4 -4
- package/dist/cli/{org-RHVDMUKN.js → org-N6ADDGEV.js} +60 -60
- package/dist/cli/{org-L3B2RR4U.mjs → org-SDSSKY42.mjs} +4 -4
- package/dist/cli/play-UTIPBVDQ.js +153 -0
- package/dist/cli/{play-UXIJVYNF.mjs → play-VSTVY6PM.mjs} +9 -9
- package/dist/cli/{providers-VL6VY56M.js → providers-TJ42O6NN.js} +7 -7
- package/dist/cli/{providers-FABWTNKR.mjs → providers-UKC7KD3W.mjs} +4 -4
- package/dist/cli/{quickstart-IIPZ6DSY.js → quickstart-7S7NMCMX.js} +5 -5
- package/dist/cli/{quickstart-OA54A4IE.mjs → quickstart-WSKATNHJ.mjs} +3 -3
- package/dist/cli/{search-YDK4V2EW.mjs → search-6OS6VVCJ.mjs} +5 -5
- package/dist/cli/search-Y6UGKL5C.js +26 -0
- package/dist/cli/{secrets-JGU7ZRUW.js → secrets-GWLYB2KD.js} +13 -13
- package/dist/cli/{secrets-4MQF6RF6.mjs → secrets-QTTR5R5M.mjs} +4 -4
- package/dist/cli/{sessions-PTHOMSZ5.mjs → sessions-Q7MY5YYI.mjs} +4 -4
- package/dist/cli/{sessions-I7ZZYSYW.js → sessions-SUURWTVX.js} +5 -5
- package/dist/cli/{settings-X4ENSGNK.mjs → settings-3D5YDD2B.mjs} +7 -7
- package/dist/cli/{settings-ZUUBKIG6.js → settings-W4DYMYFA.js} +74 -74
- package/dist/cli/{setup-4UM6FCZL.mjs → setup-5F5OGYKW.mjs} +6 -6
- package/dist/cli/{setup-6L576TQE.js → setup-NIUADTDP.js} +41 -41
- package/dist/cli/skills-SHUL5UT7.js +28 -0
- package/dist/cli/{skills-U3BS5KUI.mjs → skills-TV3ORUIG.mjs} +4 -4
- package/dist/cli/tools-GNIVV4OF.js +40 -0
- package/dist/cli/{tools-O4PX6UVB.mjs → tools-YSZWAFKO.mjs} +7 -6
- package/dist/cli/{update-OHWSK2WN.mjs → update-FJAMLGLT.mjs} +6 -6
- package/dist/cli/update-U3XGY6IT.js +28 -0
- package/dist/cli/{workflow-QWTZBLT3.js → workflow-C6ZCM5S4.js} +15 -15
- package/dist/cli/{workflow-RVMGBMLX.mjs → workflow-HDHBYC7S.mjs} +5 -5
- package/dist/{client-wiWPZhnI.d.mts → client-D5XOQKsA.d.mts} +20 -1
- package/dist/{client-DHq8dJ56.d.ts → client-l-IoLh8Z.d.ts} +20 -1
- package/dist/{compiler-manifest-9TkZ_ykI.d.mts → compiler-manifest-82q4jtfQ.d.mts} +44 -17
- package/dist/{compiler-manifest-9TkZ_ykI.d.ts → compiler-manifest-82q4jtfQ.d.ts} +44 -17
- package/dist/{index-B-5_Xhud.d.mts → index-BPbW2XHF.d.mts} +1 -1
- package/dist/{index-ykksoEyR.d.ts → index-k0rquHIm.d.ts} +1 -1
- package/dist/index.d.mts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.js +194 -69
- package/dist/index.mjs +162 -37
- package/dist/install-integrity.json +85 -84
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +2 -1
- package/dist/cli/auth-EKRB4GMP.js +0 -31
- package/dist/cli/client-55BDB4LE.js +0 -20
- package/dist/cli/git-VWXH6LCP.js +0 -23
- package/dist/cli/play-UKH4VFPF.js +0 -153
- package/dist/cli/search-JD2VTR4A.js +0 -26
- package/dist/cli/skills-TLPNCERR.js +0 -28
- package/dist/cli/tools-26JTFFU4.js +0 -39
- package/dist/cli/update-35RRCU2G.js +0 -28
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
var _chunkYGFQ7YSMjs = require('./chunk-YGFQ7YSM.js');
|
|
5
6
|
require('./chunk-LA46MMTL.js');
|
|
6
7
|
|
|
7
8
|
|
|
@@ -9,13 +10,13 @@ require('./chunk-LA46MMTL.js');
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
var
|
|
13
|
+
var _chunkWHKTRZ3Jjs = require('./chunk-WHKTRZ3J.js');
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
var
|
|
17
|
+
var _chunkGHHLLEZKjs = require('./chunk-GHHLLEZK.js');
|
|
17
18
|
require('./chunk-XNYIZMNQ.js');
|
|
18
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-XUNMVZOW.js');
|
|
19
20
|
require('./chunk-S6R3OX7B.js');
|
|
20
21
|
|
|
21
22
|
|
|
@@ -34,7 +35,7 @@ var SUBSCRIPTION_CANCEL_PATH = "/api/v2/billing/subscription/cancel";
|
|
|
34
35
|
var BILLING_TOP_UP_PATH = "/api/v2/billing/top-up";
|
|
35
36
|
var DEFAULT_BALANCE_RECOVERY_CREDITS = 100;
|
|
36
37
|
function billingFailureFromError(error, options) {
|
|
37
|
-
if (error instanceof
|
|
38
|
+
if (error instanceof _chunkGHHLLEZKjs.AuthError) {
|
|
38
39
|
return {
|
|
39
40
|
exitCode: 3,
|
|
40
41
|
code: "AUTH_ERROR",
|
|
@@ -68,7 +69,7 @@ function reportBillingFailure(failure, options) {
|
|
|
68
69
|
if (failure.next) {
|
|
69
70
|
textLines.push(`Next: ${failure.next}`);
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
72
73
|
{
|
|
73
74
|
ok: false,
|
|
74
75
|
exitCode: failure.exitCode,
|
|
@@ -89,11 +90,7 @@ function parseTopUpCredits(raw) {
|
|
|
89
90
|
return parsed;
|
|
90
91
|
}
|
|
91
92
|
function topUpIdempotencyKey(raw) {
|
|
92
|
-
|
|
93
|
-
const trimmed = raw.trim();
|
|
94
|
-
if (trimmed) return trimmed.slice(0, 120);
|
|
95
|
-
}
|
|
96
|
-
return `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
93
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkYGFQ7YSMjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
97
94
|
}
|
|
98
95
|
function targetBillingIdempotencyKey(raw) {
|
|
99
96
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -130,7 +127,7 @@ function apiErrorCode(error) {
|
|
|
130
127
|
return _nullishCoalesce(error.code, () => ( "BILLING_API_ERROR"));
|
|
131
128
|
}
|
|
132
129
|
function billingTopUpFailureFromError(error, input) {
|
|
133
|
-
if (error instanceof
|
|
130
|
+
if (error instanceof _chunkGHHLLEZKjs.AuthError || error instanceof _chunkGHHLLEZKjs.ConfigError) {
|
|
134
131
|
return {
|
|
135
132
|
exitCode: 3,
|
|
136
133
|
code: "AUTH_ERROR",
|
|
@@ -299,7 +296,7 @@ function defaultLedgerExportPath() {
|
|
|
299
296
|
);
|
|
300
297
|
}
|
|
301
298
|
async function handleBalance(options) {
|
|
302
|
-
const { http } =
|
|
299
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
303
300
|
const payload = await http.get(
|
|
304
301
|
"/api/v2/billing/balance"
|
|
305
302
|
);
|
|
@@ -362,14 +359,21 @@ async function handleBalance(options) {
|
|
|
362
359
|
lines.push(`If the user approves, run: ${recovery.top_up_command}`);
|
|
363
360
|
lines.push(`If checkout is required, run: ${recovery.checkout_command}`);
|
|
364
361
|
}
|
|
365
|
-
const text = [
|
|
366
|
-
|
|
362
|
+
const text = [
|
|
363
|
+
lines[0],
|
|
364
|
+
...options.verbose ? detail : [],
|
|
365
|
+
...lines.slice(1)
|
|
366
|
+
];
|
|
367
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
367
368
|
{
|
|
368
369
|
...payload,
|
|
369
370
|
...recovery ? { recovery } : {},
|
|
370
371
|
render: {
|
|
371
372
|
sections: [
|
|
372
|
-
{
|
|
373
|
+
{
|
|
374
|
+
title: "billing balance",
|
|
375
|
+
lines: [lines[0], ...detail, ...lines.slice(1)]
|
|
376
|
+
}
|
|
373
377
|
]
|
|
374
378
|
}
|
|
375
379
|
},
|
|
@@ -384,7 +388,7 @@ function quoteShellArgument(value) {
|
|
|
384
388
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
385
389
|
}
|
|
386
390
|
async function handleUsage(options) {
|
|
387
|
-
const { http } =
|
|
391
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
388
392
|
const params = new URLSearchParams();
|
|
389
393
|
if (options.requestId !== void 0) {
|
|
390
394
|
const requestId = options.requestId.trim();
|
|
@@ -465,7 +469,7 @@ async function handleUsage(options) {
|
|
|
465
469
|
"No continuation is available for this view. Use deepline billing ledger export all --json for the full ledger."
|
|
466
470
|
] : []
|
|
467
471
|
];
|
|
468
|
-
|
|
472
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
469
473
|
{
|
|
470
474
|
...payload,
|
|
471
475
|
recent: {
|
|
@@ -479,7 +483,7 @@ async function handleUsage(options) {
|
|
|
479
483
|
);
|
|
480
484
|
}
|
|
481
485
|
async function handleLimit(options) {
|
|
482
|
-
const { http } =
|
|
486
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
483
487
|
const payload = await http.get(
|
|
484
488
|
"/api/v2/billing/limit"
|
|
485
489
|
);
|
|
@@ -487,7 +491,7 @@ async function handleLimit(options) {
|
|
|
487
491
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
488
492
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
489
493
|
] : ["Monthly usage cap: off"];
|
|
490
|
-
|
|
494
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
491
495
|
{
|
|
492
496
|
...payload,
|
|
493
497
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -496,12 +500,12 @@ async function handleLimit(options) {
|
|
|
496
500
|
);
|
|
497
501
|
}
|
|
498
502
|
async function handleSetLimit(credits, options) {
|
|
499
|
-
const { http } =
|
|
503
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
500
504
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
501
505
|
method: "PUT",
|
|
502
506
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
503
507
|
});
|
|
504
|
-
|
|
508
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
505
509
|
{
|
|
506
510
|
...payload,
|
|
507
511
|
render: {
|
|
@@ -517,11 +521,11 @@ async function handleSetLimit(credits, options) {
|
|
|
517
521
|
);
|
|
518
522
|
}
|
|
519
523
|
async function handleLimitOff(options) {
|
|
520
|
-
const { http } =
|
|
524
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
521
525
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
522
526
|
method: "DELETE"
|
|
523
527
|
});
|
|
524
|
-
|
|
528
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
525
529
|
{
|
|
526
530
|
...payload,
|
|
527
531
|
render: {
|
|
@@ -541,7 +545,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
541
545
|
let initialized = false;
|
|
542
546
|
let pageNumber = 0;
|
|
543
547
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
544
|
-
for await (const entries of
|
|
548
|
+
for await (const entries of _chunkYGFQ7YSMjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
545
549
|
pageNumber += 1;
|
|
546
550
|
console.error(
|
|
547
551
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -580,7 +584,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
580
584
|
return summary;
|
|
581
585
|
}
|
|
582
586
|
async function handleHistory(options) {
|
|
583
|
-
const { http } =
|
|
587
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
584
588
|
const windows = {
|
|
585
589
|
"1d": 86400,
|
|
586
590
|
"1w": 604800,
|
|
@@ -592,10 +596,10 @@ async function handleHistory(options) {
|
|
|
592
596
|
process.cwd(),
|
|
593
597
|
"deepline",
|
|
594
598
|
"data",
|
|
595
|
-
|
|
599
|
+
_chunkWHKTRZ3Jjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
596
600
|
);
|
|
597
601
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
598
|
-
|
|
602
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
599
603
|
{
|
|
600
604
|
output_path: outputPath,
|
|
601
605
|
row_count: summary.row_count,
|
|
@@ -632,14 +636,14 @@ async function handleLedgerExportAll(options) {
|
|
|
632
636
|
);
|
|
633
637
|
return;
|
|
634
638
|
}
|
|
635
|
-
const { http } =
|
|
639
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
636
640
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
637
641
|
const summary = await exportLedger(http, outputPath, {
|
|
638
642
|
sinceAt,
|
|
639
643
|
runId: options.runId,
|
|
640
644
|
operation: options.operation
|
|
641
645
|
});
|
|
642
|
-
|
|
646
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
643
647
|
{
|
|
644
648
|
output_path: outputPath,
|
|
645
649
|
row_count: summary.row_count,
|
|
@@ -678,7 +682,7 @@ function targetPlanLine(plan) {
|
|
|
678
682
|
return `${plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
679
683
|
}
|
|
680
684
|
async function handlePlans(options) {
|
|
681
|
-
const client = new (0,
|
|
685
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
682
686
|
const payload = await client.billing.targetPlans();
|
|
683
687
|
const listedCurrentPlan = payload.plans.find(
|
|
684
688
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -691,8 +695,8 @@ async function handlePlans(options) {
|
|
|
691
695
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
692
696
|
"Change plan: deepline billing change-plan <plan_sku> --json"
|
|
693
697
|
];
|
|
694
|
-
const legacyPayload =
|
|
695
|
-
|
|
698
|
+
const legacyPayload = _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
699
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
696
700
|
{
|
|
697
701
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
698
702
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -702,7 +706,7 @@ async function handlePlans(options) {
|
|
|
702
706
|
);
|
|
703
707
|
}
|
|
704
708
|
async function handleSubscribe(planVersionId, options) {
|
|
705
|
-
const { http } =
|
|
709
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
706
710
|
const payload = await http.request(
|
|
707
711
|
"/api/v2/billing/subscription/checkout",
|
|
708
712
|
{
|
|
@@ -711,8 +715,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
711
715
|
}
|
|
712
716
|
);
|
|
713
717
|
const url = String(payload.checkout_url || "");
|
|
714
|
-
if (!options.json && options.open !== false && url)
|
|
715
|
-
|
|
718
|
+
if (!options.json && options.open !== false && url) _chunkWHKTRZ3Jjs.openInBrowser.call(void 0, url);
|
|
719
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
716
720
|
{
|
|
717
721
|
...payload,
|
|
718
722
|
render: {
|
|
@@ -728,7 +732,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
728
732
|
);
|
|
729
733
|
}
|
|
730
734
|
async function handleSubscriptionStatus(options) {
|
|
731
|
-
const client = new (0,
|
|
735
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
732
736
|
const payload = await client.billing.subscription.status();
|
|
733
737
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
734
738
|
const lines = [
|
|
@@ -748,7 +752,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
748
752
|
],
|
|
749
753
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
750
754
|
];
|
|
751
|
-
|
|
755
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
752
756
|
{
|
|
753
757
|
...payload,
|
|
754
758
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -757,7 +761,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
757
761
|
);
|
|
758
762
|
}
|
|
759
763
|
async function handleSubscriptionCancel(options) {
|
|
760
|
-
const client = new (0,
|
|
764
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
761
765
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
762
766
|
if (options.dryRun) {
|
|
763
767
|
const status = await client.billing.subscription.status();
|
|
@@ -774,7 +778,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
774
778
|
return;
|
|
775
779
|
}
|
|
776
780
|
const consequence = action === "cancel" ? `Would schedule cancellation at period end${status.current_period_end ? ` (${status.current_period_end})` : ""}. The subscription stays active until then and remaining credits are kept.` : "Would reverse the pending cancellation; the subscription would renew normally.";
|
|
777
|
-
|
|
781
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
778
782
|
{
|
|
779
783
|
ok: true,
|
|
780
784
|
dry_run: true,
|
|
@@ -829,7 +833,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
829
833
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
830
834
|
"Undo with: deepline billing subscription cancel --undo"
|
|
831
835
|
];
|
|
832
|
-
|
|
836
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
833
837
|
{
|
|
834
838
|
ok: true,
|
|
835
839
|
...result,
|
|
@@ -883,7 +887,7 @@ async function handleInvoices(options) {
|
|
|
883
887
|
return;
|
|
884
888
|
}
|
|
885
889
|
}
|
|
886
|
-
const client = new (0,
|
|
890
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
887
891
|
let payload;
|
|
888
892
|
try {
|
|
889
893
|
payload = await client.billing.invoices.list(
|
|
@@ -912,7 +916,7 @@ async function handleInvoices(options) {
|
|
|
912
916
|
url: entry.url
|
|
913
917
|
}))
|
|
914
918
|
} : { ...payload, count: entries.length };
|
|
915
|
-
|
|
919
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
916
920
|
{
|
|
917
921
|
...envelope,
|
|
918
922
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -921,7 +925,7 @@ async function handleInvoices(options) {
|
|
|
921
925
|
);
|
|
922
926
|
}
|
|
923
927
|
async function handleCheckout(options) {
|
|
924
|
-
const { http } =
|
|
928
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
925
929
|
const payload = await http.post(
|
|
926
930
|
"/api/v2/billing/checkout",
|
|
927
931
|
{
|
|
@@ -931,8 +935,8 @@ async function handleCheckout(options) {
|
|
|
931
935
|
}
|
|
932
936
|
);
|
|
933
937
|
const url = String(payload.url || payload.checkout_url || "");
|
|
934
|
-
if (!options.json && !options.noOpen && url)
|
|
935
|
-
|
|
938
|
+
if (!options.json && !options.noOpen && url) _chunkWHKTRZ3Jjs.openInBrowser.call(void 0, url);
|
|
939
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
936
940
|
{
|
|
937
941
|
...payload,
|
|
938
942
|
render: {
|
|
@@ -961,9 +965,23 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
961
965
|
);
|
|
962
966
|
return;
|
|
963
967
|
}
|
|
964
|
-
|
|
968
|
+
let idempotencyKey;
|
|
969
|
+
try {
|
|
970
|
+
idempotencyKey = topUpIdempotencyKey(options.idempotencyKey);
|
|
971
|
+
} catch (error) {
|
|
972
|
+
if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError)) throw error;
|
|
973
|
+
reportBillingFailure(
|
|
974
|
+
{
|
|
975
|
+
exitCode: 2,
|
|
976
|
+
code: "INVALID_BILLING_IDEMPOTENCY_KEY",
|
|
977
|
+
message: "--idempotency-key must contain 1\u2013200 characters with no leading or trailing whitespace and be valid HTTP header text."
|
|
978
|
+
},
|
|
979
|
+
options
|
|
980
|
+
);
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
965
983
|
if (options.dryRun) {
|
|
966
|
-
|
|
984
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
967
985
|
{
|
|
968
986
|
ok: true,
|
|
969
987
|
dry_run: true,
|
|
@@ -972,6 +990,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
972
990
|
planned_request: {
|
|
973
991
|
method: "POST",
|
|
974
992
|
path: BILLING_TOP_UP_PATH,
|
|
993
|
+
headers: { "Idempotency-Key": idempotencyKey },
|
|
975
994
|
body: { credits, idempotency_key: idempotencyKey }
|
|
976
995
|
},
|
|
977
996
|
render: {
|
|
@@ -992,7 +1011,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
992
1011
|
);
|
|
993
1012
|
return;
|
|
994
1013
|
}
|
|
995
|
-
const client = new (0,
|
|
1014
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
996
1015
|
let payload;
|
|
997
1016
|
try {
|
|
998
1017
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1009,7 +1028,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1009
1028
|
return;
|
|
1010
1029
|
}
|
|
1011
1030
|
if (payload.status === "pending") {
|
|
1012
|
-
|
|
1031
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1013
1032
|
{
|
|
1014
1033
|
ok: true,
|
|
1015
1034
|
...payload,
|
|
@@ -1073,17 +1092,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1073
1092
|
]
|
|
1074
1093
|
}
|
|
1075
1094
|
};
|
|
1076
|
-
|
|
1095
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1077
1096
|
json: options.json
|
|
1078
1097
|
});
|
|
1079
1098
|
}
|
|
1080
1099
|
async function handleTargetStatus(options) {
|
|
1081
|
-
const client = new (0,
|
|
1100
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
1082
1101
|
const payload = await client.billing.targetStatus();
|
|
1083
1102
|
const balanceCommand = "deepline billing balance --json";
|
|
1084
1103
|
const recentChargesCommand = "deepline billing usage --limit 5 --json";
|
|
1085
1104
|
const exactChargeCommand = "deepline billing usage --request-id <job_id> --json";
|
|
1086
|
-
|
|
1105
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1087
1106
|
{
|
|
1088
1107
|
ok: true,
|
|
1089
1108
|
...payload,
|
|
@@ -1113,7 +1132,7 @@ async function handleTargetStatus(options) {
|
|
|
1113
1132
|
);
|
|
1114
1133
|
}
|
|
1115
1134
|
async function handleAutoRechargeStatus(options) {
|
|
1116
|
-
const payload = await new (0,
|
|
1135
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1117
1136
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1118
1137
|
const lines = [
|
|
1119
1138
|
`State: ${state}`,
|
|
@@ -1123,7 +1142,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1123
1142
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1124
1143
|
] : []
|
|
1125
1144
|
];
|
|
1126
|
-
|
|
1145
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1127
1146
|
{
|
|
1128
1147
|
ok: true,
|
|
1129
1148
|
...payload,
|
|
@@ -1172,7 +1191,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1172
1191
|
}
|
|
1173
1192
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1174
1193
|
if (options.dryRun) {
|
|
1175
|
-
|
|
1194
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1176
1195
|
{
|
|
1177
1196
|
ok: true,
|
|
1178
1197
|
dry_run: true,
|
|
@@ -1193,7 +1212,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1193
1212
|
);
|
|
1194
1213
|
return;
|
|
1195
1214
|
}
|
|
1196
|
-
const payload = await new (0,
|
|
1215
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1197
1216
|
enabled: true,
|
|
1198
1217
|
thresholdCredits,
|
|
1199
1218
|
refillToCredits,
|
|
@@ -1201,7 +1220,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1201
1220
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1202
1221
|
idempotencyKey
|
|
1203
1222
|
});
|
|
1204
|
-
|
|
1223
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1205
1224
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1206
1225
|
{ json: options.json }
|
|
1207
1226
|
);
|
|
@@ -1209,7 +1228,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1209
1228
|
async function handleAutoRechargeOff(options) {
|
|
1210
1229
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1211
1230
|
if (options.dryRun) {
|
|
1212
|
-
|
|
1231
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1213
1232
|
{
|
|
1214
1233
|
ok: true,
|
|
1215
1234
|
dry_run: true,
|
|
@@ -1224,11 +1243,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1224
1243
|
);
|
|
1225
1244
|
return;
|
|
1226
1245
|
}
|
|
1227
|
-
const payload = await new (0,
|
|
1246
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1228
1247
|
enabled: false,
|
|
1229
1248
|
idempotencyKey
|
|
1230
1249
|
});
|
|
1231
|
-
|
|
1250
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1232
1251
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1233
1252
|
{ json: options.json }
|
|
1234
1253
|
);
|
|
@@ -1247,11 +1266,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1247
1266
|
return;
|
|
1248
1267
|
}
|
|
1249
1268
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1250
|
-
const payload = await new (0,
|
|
1269
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.purchaseCredits({
|
|
1251
1270
|
credits,
|
|
1252
1271
|
idempotencyKey
|
|
1253
1272
|
});
|
|
1254
|
-
|
|
1273
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1255
1274
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1256
1275
|
{ json: options.json }
|
|
1257
1276
|
);
|
|
@@ -1287,7 +1306,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1287
1306
|
return;
|
|
1288
1307
|
}
|
|
1289
1308
|
if (options.dryRun) {
|
|
1290
|
-
|
|
1309
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1291
1310
|
{
|
|
1292
1311
|
ok: true,
|
|
1293
1312
|
dry_run: true,
|
|
@@ -1300,12 +1319,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1300
1319
|
);
|
|
1301
1320
|
return;
|
|
1302
1321
|
}
|
|
1303
|
-
const payload = await new (0,
|
|
1322
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1304
1323
|
credits,
|
|
1305
1324
|
orgId: options.orgId,
|
|
1306
1325
|
idempotencyKey: options.idempotencyKey
|
|
1307
1326
|
});
|
|
1308
|
-
|
|
1327
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1309
1328
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1310
1329
|
{ json: options.json }
|
|
1311
1330
|
);
|
|
@@ -1325,37 +1344,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1325
1344
|
return;
|
|
1326
1345
|
}
|
|
1327
1346
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1328
|
-
const payload = await new (0,
|
|
1347
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.transitionPlan({
|
|
1329
1348
|
action: "start_or_change",
|
|
1330
1349
|
targetPlanSku: planSku,
|
|
1331
1350
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1332
1351
|
idempotencyKey
|
|
1333
1352
|
});
|
|
1334
|
-
|
|
1353
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1335
1354
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1336
1355
|
{ json: options.json }
|
|
1337
1356
|
);
|
|
1338
1357
|
}
|
|
1339
1358
|
async function handleTargetPlanCancellation(options) {
|
|
1340
1359
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1341
|
-
const payload = await new (0,
|
|
1360
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.transitionPlan({
|
|
1342
1361
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1343
1362
|
idempotencyKey
|
|
1344
1363
|
});
|
|
1345
|
-
|
|
1364
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1346
1365
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1347
1366
|
{ json: options.json }
|
|
1348
1367
|
);
|
|
1349
1368
|
}
|
|
1350
1369
|
async function handleTargetPortal(options) {
|
|
1351
|
-
const payload = await new (0,
|
|
1370
|
+
const payload = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.portalSession(
|
|
1352
1371
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1353
1372
|
);
|
|
1354
|
-
if (!options.json && !options.noOpen)
|
|
1355
|
-
|
|
1373
|
+
if (!options.json && !options.noOpen) _chunkWHKTRZ3Jjs.openInBrowser.call(void 0, payload.url);
|
|
1374
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1356
1375
|
}
|
|
1357
1376
|
async function handleRedeemCode(code, options) {
|
|
1358
|
-
const { http } =
|
|
1377
|
+
const { http } = _chunkWHKTRZ3Jjs.getAuthedHttpClient.call(void 0, );
|
|
1359
1378
|
const payload = await http.post(
|
|
1360
1379
|
"/api/v2/billing/checkout",
|
|
1361
1380
|
{
|
|
@@ -1363,8 +1382,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1363
1382
|
}
|
|
1364
1383
|
);
|
|
1365
1384
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1366
|
-
if (!options.json && !options.noOpen && url)
|
|
1367
|
-
|
|
1385
|
+
if (!options.json && !options.noOpen && url) _chunkWHKTRZ3Jjs.openInBrowser.call(void 0, url);
|
|
1386
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1368
1387
|
{
|
|
1369
1388
|
...payload,
|
|
1370
1389
|
render: {
|
|
@@ -1567,6 +1586,9 @@ Notes:
|
|
|
1567
1586
|
workspace, then adding purchased Deepline credits. If no saved payment method
|
|
1568
1587
|
is available, use the checkout command printed in the error response.
|
|
1569
1588
|
--dry-run prints the planned request and idempotency key without charging.
|
|
1589
|
+
Earlier CLI versions truncated supplied keys over 120 characters. To recover
|
|
1590
|
+
an earlier attempt, reuse the effective key printed in its original output
|
|
1591
|
+
or retry command.
|
|
1570
1592
|
|
|
1571
1593
|
Examples:
|
|
1572
1594
|
deepline billing top-up 1000
|
|
@@ -1576,7 +1598,7 @@ Examples:
|
|
|
1576
1598
|
`
|
|
1577
1599
|
).argument("<credits>", "Positive integer Deepline credit amount").option(
|
|
1578
1600
|
"--idempotency-key <key>",
|
|
1579
|
-
"Stable retry key for the same intended top-up"
|
|
1601
|
+
"Stable retry key for the same intended top-up (1\u2013200 characters, no padding, valid HTTP header text)"
|
|
1580
1602
|
).option("--dry-run", "Print the planned top-up without charging").option("--compact", "Keep only high-signal fields in JSON output").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleTopUp);
|
|
1581
1603
|
billing.command("buy").description("Buy credits through the target billing contract.").argument("<credits>", "Positive integer Deepline credit amount").option("--idempotency-key <key>", "Stable retry key").option("--json", "Emit JSON output").action(handleBuyCredits);
|
|
1582
1604
|
billing.command("top-up-recover").description(
|
|
@@ -1630,8 +1652,8 @@ Examples:
|
|
|
1630
1652
|
new (0, _commander.Command)("trigger").description(
|
|
1631
1653
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1632
1654
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1633
|
-
const result = await new (0,
|
|
1634
|
-
|
|
1655
|
+
const result = await new (0, _chunkYGFQ7YSMjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1656
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1635
1657
|
})
|
|
1636
1658
|
);
|
|
1637
1659
|
billing.command("change-plan").description("Start or change the target billing plan.").argument("<plan_sku>", "payg-v1, builder-v1, growth-v1, or team-v1").option(
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZYPFCBW5.mjs";
|
|
5
5
|
import {
|
|
6
6
|
resolveShellSpawn,
|
|
7
7
|
runSkillsCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6VBXS43D.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7DGZCMXQ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
autoDetectBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MBI3BVSQ.mjs";
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
import { spawn, spawnSync } from "child_process";
|