deepline 0.3.465 → 0.3.466
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/client-core.ts +2 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/{auth-WZCX4MTH.mjs → auth-HYIPYSKK.mjs} +5 -5
- package/dist/cli/auth-Y3UTWD3W.js +41 -0
- package/dist/cli/{billing-ATR3CLIW.mjs → billing-5S6SGBUP.mjs} +6 -6
- package/dist/cli/{billing-DQUD3DBY.js → billing-NG62QGPT.js} +77 -77
- package/dist/cli/{chunk-BQNUJK53.js → chunk-22BKA2QL.js} +26 -26
- package/dist/cli/{chunk-RREWUPC3.js → chunk-3DVJ2IPG.js} +7 -7
- package/dist/cli/{chunk-N27BUJU3.mjs → chunk-46YQQOTC.mjs} +5 -5
- package/dist/cli/{chunk-3XFNF6RR.js → chunk-4QJ63YHC.js} +8 -8
- package/dist/cli/{chunk-DDF74332.js → chunk-5BEKJUOK.js} +2 -2
- package/dist/cli/{chunk-EVQBOVOJ.mjs → chunk-5EUJKY3G.mjs} +3 -3
- package/dist/cli/{chunk-SSQXSMAT.mjs → chunk-6CYRIFZ3.mjs} +2 -2
- package/dist/cli/{chunk-B6GAIXVD.mjs → chunk-6R36QIG4.mjs} +4 -4
- package/dist/cli/{chunk-PIGMBDBZ.js → chunk-7IWYO475.js} +21 -21
- package/dist/cli/{chunk-E3EYQ2FQ.mjs → chunk-7QITO7XO.mjs} +4 -4
- package/dist/cli/{chunk-4URRABMM.js → chunk-A7MWUG5H.js} +1 -1
- package/dist/cli/{chunk-6WKYRHGT.js → chunk-B7BNWOG6.js} +3 -3
- package/dist/cli/{chunk-DJD4KLIX.js → chunk-CMXFOZVG.js} +93 -93
- package/dist/cli/{chunk-QPJ2BDFD.js → chunk-EOKUL6XS.js} +5 -5
- package/dist/cli/{chunk-GNLCGR7R.mjs → chunk-F6H74EFB.mjs} +2 -2
- package/dist/cli/{chunk-JQSPKPHT.mjs → chunk-FWHRCZET.mjs} +4 -4
- package/dist/cli/{chunk-3K3EHT6E.mjs → chunk-H5MYPDO2.mjs} +1 -1
- package/dist/cli/{chunk-GBQSEOXE.js → chunk-HOFXQYRF.js} +7 -7
- package/dist/cli/{chunk-YZZGFUQ4.mjs → chunk-IEQPOBTK.mjs} +1 -1
- package/dist/cli/{chunk-EA2F4YVX.mjs → chunk-JLE5UYZV.mjs} +2 -2
- package/dist/cli/{chunk-OQDN6JK6.js → chunk-LDEJ4NUP.js} +10 -10
- package/dist/cli/{chunk-E3PLLFE2.js → chunk-MTH7WIE3.js} +53 -53
- package/dist/cli/{chunk-HS6CM7TF.mjs → chunk-NJ6KQLMO.mjs} +10 -10
- package/dist/cli/{chunk-5VGMRONE.js → chunk-NQH7E3F2.js} +3 -3
- package/dist/cli/{chunk-SOIXDMZK.js → chunk-NYNNNOJW.js} +51 -51
- package/dist/cli/{chunk-OKI3HWFF.js → chunk-OB5NON4G.js} +8 -8
- package/dist/cli/{chunk-XJ5W64AC.js → chunk-PEUWKPY4.js} +4 -4
- package/dist/cli/{chunk-SBM5JVTK.mjs → chunk-QMHBWFU5.mjs} +1 -1
- package/dist/cli/{chunk-OEU3ZNBZ.mjs → chunk-QTTYIPFY.mjs} +1 -1
- package/dist/cli/{chunk-6Y34LU6P.mjs → chunk-QWMXP2IP.mjs} +2 -2
- package/dist/cli/{chunk-N57JYG7J.js → chunk-QZKSG7XZ.js} +36 -36
- package/dist/cli/{chunk-TJXGEK7P.js → chunk-R2SQN2CD.js} +6 -6
- package/dist/cli/{chunk-7Y2MLWTM.mjs → chunk-RCMT6AZ5.mjs} +1 -1
- package/dist/cli/{chunk-7R76B3WE.js → chunk-RGRSUMN6.js} +5 -5
- package/dist/cli/{chunk-LFTLH5BK.js → chunk-RRCVAVM7.js} +2 -2
- package/dist/cli/{chunk-XFAO5A5R.mjs → chunk-RSXOGXGX.mjs} +1 -1
- package/dist/cli/{chunk-NIJYJI67.mjs → chunk-SQFBLBYC.mjs} +2 -2
- package/dist/cli/{chunk-A3GML7WW.js → chunk-SWUSDFG2.js} +9 -9
- package/dist/cli/{chunk-GW7RUNLW.mjs → chunk-UHAKSLL2.mjs} +2 -2
- package/dist/cli/{chunk-EISIAWBD.mjs → chunk-V27TVT7P.mjs} +1 -1
- package/dist/cli/{chunk-X6BQ4JAD.mjs → chunk-VSEKVRAP.mjs} +2 -2
- package/dist/cli/{chunk-W4J2EK5K.js → chunk-VVCMP45C.js} +3 -3
- package/dist/cli/{chunk-HXWZ52CW.mjs → chunk-W4XWGNW4.mjs} +3 -3
- package/dist/cli/{chunk-UMQT7QMB.mjs → chunk-WKOWXTDR.mjs} +2 -2
- package/dist/cli/{chunk-FFTLJGZQ.mjs → chunk-YHPUJI7G.mjs} +5 -5
- package/dist/cli/{chunk-JN7AOVD4.js → chunk-ZBWKWMSH.js} +16 -16
- package/dist/cli/{csv-ZVFGYRB7.js → csv-AD2DLLLL.js} +13 -13
- package/dist/cli/{csv-AE7OLXCV.mjs → csv-ZGZX2IIP.mjs} +4 -4
- package/dist/cli/{db-KTXMCLB5.mjs → db-LUFEKPEK.mjs} +6 -6
- package/dist/cli/{db-JOD2MQ2T.js → db-NBY4LHAY.js} +27 -27
- package/dist/cli/{describe-FENTKQFK.mjs → describe-MLXMC47U.mjs} +17 -17
- package/dist/cli/describe-Z66CQESH.js +48 -0
- package/dist/cli/{executions-IT6TQ65Q.js → executions-HDJMKNBR.js} +8 -8
- package/dist/cli/{executions-FJCV5L37.mjs → executions-JKVWM3P4.mjs} +6 -6
- package/dist/cli/{feedback-LTTO73YD.mjs → feedback-7E5Z4ZO5.mjs} +4 -4
- package/dist/cli/{feedback-WGURC3BG.js → feedback-VXMP7HDF.js} +8 -8
- package/dist/cli/git-NNSJKW3V.js +25 -0
- package/dist/cli/{git-ZYEDB2UG.mjs → git-UFMRAGMY.mjs} +5 -5
- package/dist/cli/index.js +135 -135
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-JFXWEOZF.js → legacy-noops-4QKREY4K.js} +8 -8
- package/dist/cli/{legacy-noops-EGQ4G4BT.mjs → legacy-noops-BDULCVGD.mjs} +5 -5
- package/dist/cli/{monitors-WKN2K6ZH.js → monitors-LNNSTELC.js} +91 -91
- package/dist/cli/{monitors-IK6GWLCA.mjs → monitors-S6TDJYCK.mjs} +7 -7
- package/dist/cli/{org-PD5YBUHR.mjs → org-EEEMWKQ2.mjs} +6 -6
- package/dist/cli/{org-FE5VMAKF.js → org-OWM3IGOK.js} +68 -68
- package/dist/cli/{pages-H3DKEVVI.js → pages-7JF6AKDI.js} +17 -17
- package/dist/cli/{pages-ZVKSOSZJ.mjs → pages-ZYYMQUDX.mjs} +6 -6
- package/dist/cli/{play-RLIQY22H.mjs → play-5Z3E7KL6.mjs} +17 -17
- package/dist/cli/{play-2UL5OPGH.js → play-WLAFXAHR.js} +304 -304
- package/dist/cli/{providers-M4AFFJF2.mjs → providers-JUT7IYD3.mjs} +6 -6
- package/dist/cli/{providers-2IMHQDBC.js → providers-TTDFQQU2.js} +9 -9
- package/dist/cli/{quickstart-OE64DBKK.js → quickstart-OZYEGICI.js} +6 -6
- package/dist/cli/{quickstart-PS4QKNG2.mjs → quickstart-P4TL4NWJ.mjs} +4 -4
- package/dist/cli/{run-SWLGV2VS.js → run-BYGE4LUB.js} +36 -36
- package/dist/cli/{run-3TKR5CZU.mjs → run-CM6OZUBR.mjs} +22 -22
- package/dist/cli/search-RIG4LTCS.js +32 -0
- package/dist/cli/{search-AMZ67RKO.mjs → search-RZRJ73YL.mjs} +7 -7
- package/dist/cli/{secrets-INBXKNFM.mjs → secrets-DHI6ZMKE.mjs} +6 -6
- package/dist/cli/{secrets-ZTLJY7L2.js → secrets-XLTN3SCL.js} +15 -15
- package/dist/cli/{sessions-3GKS45NP.js → sessions-6NCQQXVK.js} +6 -6
- package/dist/cli/{sessions-ZVBTKQ7J.mjs → sessions-MZD5WZBT.mjs} +5 -5
- package/dist/cli/{settings-7YG3UWJH.js → settings-JJH72W5V.js} +78 -78
- package/dist/cli/{settings-AUPDZZ2U.mjs → settings-S6GQ4XFZ.mjs} +11 -11
- package/dist/cli/{setup-YGESCFTH.js → setup-3BIOG6N2.js} +44 -44
- package/dist/cli/{setup-44QB72NU.mjs → setup-ZJ4G54XN.mjs} +9 -9
- package/dist/cli/{skills-N3AWWCWO.mjs → skills-FBH4REPB.mjs} +7 -7
- package/dist/cli/skills-ODISCL7S.js +31 -0
- package/dist/cli/tools-IHBHDI4P.js +55 -0
- package/dist/cli/{tools-3SHNTJPU.mjs → tools-J6YGZTD5.mjs} +16 -16
- package/dist/cli/update-5O3HDR5O.js +33 -0
- package/dist/cli/{update-3TWB5EEV.mjs → update-6CSRALIQ.mjs} +9 -9
- package/dist/cli/{workflow-ULIZU7KI.js → workflow-2ETKYSJV.js} +17 -17
- package/dist/cli/{workflow-SYP62XNN.mjs → workflow-3ATSB7HQ.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +96 -96
- 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/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-W62UTNJZ.js +0 -41
- package/dist/cli/describe-2IKB4KIX.js +0 -48
- package/dist/cli/git-UOIC2DJL.js +0 -25
- package/dist/cli/search-LXG7T6YZ.js +0 -32
- package/dist/cli/skills-QALGBUFY.js +0 -31
- package/dist/cli/tools-PUQ3JBZ7.js +0 -55
- package/dist/cli/update-O7XSJMLX.js +0 -33
|
@@ -1,10 +1,10 @@
|
|
|
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
|
-
var
|
|
3
|
+
var _chunkEOKUL6XSjs = require('./chunk-EOKUL6XS.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk3DVJ2IPGjs = require('./chunk-3DVJ2IPG.js');
|
|
8
8
|
require('./chunk-E4CABWXL.js');
|
|
9
9
|
require('./chunk-JKVRBCZL.js');
|
|
10
10
|
require('./chunk-NMU3VR5U.js');
|
|
@@ -15,9 +15,9 @@ require('./chunk-XDVT3GOM.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('./chunk-
|
|
20
|
-
require('./chunk-
|
|
18
|
+
var _chunkHOFXQYRFjs = require('./chunk-HOFXQYRF.js');
|
|
19
|
+
require('./chunk-NQH7E3F2.js');
|
|
20
|
+
require('./chunk-PEUWKPY4.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
29
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-A7MWUG5H.js');
|
|
30
30
|
require('./chunk-OG64RBAC.js');
|
|
31
31
|
require('./chunk-COGTRVWW.js');
|
|
32
32
|
|
|
@@ -75,7 +75,7 @@ function reportBillingFailure(failure, options) {
|
|
|
75
75
|
if (failure.next) {
|
|
76
76
|
textLines.push(`Next: ${failure.next}`);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
79
79
|
{
|
|
80
80
|
ok: false,
|
|
81
81
|
exitCode: failure.exitCode,
|
|
@@ -96,7 +96,7 @@ function parseTopUpCredits(raw) {
|
|
|
96
96
|
return parsed;
|
|
97
97
|
}
|
|
98
98
|
function topUpIdempotencyKey(raw) {
|
|
99
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
99
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunk3DVJ2IPGjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
100
100
|
}
|
|
101
101
|
function targetBillingIdempotencyKey(raw) {
|
|
102
102
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -315,7 +315,7 @@ function defaultLedgerExportPath() {
|
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
317
|
async function handleBalance(options) {
|
|
318
|
-
const { http } =
|
|
318
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
"/api/v2/billing/balance"
|
|
321
321
|
);
|
|
@@ -399,7 +399,7 @@ async function handleBalance(options) {
|
|
|
399
399
|
...options.verbose ? detail : [],
|
|
400
400
|
...lines.slice(1)
|
|
401
401
|
];
|
|
402
|
-
|
|
402
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
403
403
|
{
|
|
404
404
|
...payload,
|
|
405
405
|
...recovery ? { recovery } : {},
|
|
@@ -435,7 +435,7 @@ async function handleUsageEvents(options) {
|
|
|
435
435
|
);
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
|
-
const client = new (0,
|
|
438
|
+
const client = new (0, _chunkEOKUL6XSjs.DeeplineClient)();
|
|
439
439
|
let payload;
|
|
440
440
|
try {
|
|
441
441
|
payload = await client.billing.usageEvents({
|
|
@@ -466,7 +466,7 @@ async function handleUsageEvents(options) {
|
|
|
466
466
|
),
|
|
467
467
|
...nextPage ? [`Next page: ${nextPage}`] : []
|
|
468
468
|
];
|
|
469
|
-
|
|
469
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
470
470
|
{
|
|
471
471
|
...payload,
|
|
472
472
|
next: { page: nextPage },
|
|
@@ -477,7 +477,7 @@ async function handleUsageEvents(options) {
|
|
|
477
477
|
}
|
|
478
478
|
async function handleUsage(options) {
|
|
479
479
|
if (options.events) return handleUsageEvents(options);
|
|
480
|
-
const { http } =
|
|
480
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
481
481
|
const params = new URLSearchParams();
|
|
482
482
|
if (options.requestId !== void 0) {
|
|
483
483
|
const requestId = options.requestId.trim();
|
|
@@ -558,7 +558,7 @@ async function handleUsage(options) {
|
|
|
558
558
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
559
559
|
] : []
|
|
560
560
|
];
|
|
561
|
-
|
|
561
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
562
562
|
{
|
|
563
563
|
...payload,
|
|
564
564
|
recent: {
|
|
@@ -572,7 +572,7 @@ async function handleUsage(options) {
|
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
574
|
async function handleLimit(options) {
|
|
575
|
-
const { http } =
|
|
575
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
576
576
|
const payload = await http.get(
|
|
577
577
|
"/api/v2/billing/limit"
|
|
578
578
|
);
|
|
@@ -580,7 +580,7 @@ async function handleLimit(options) {
|
|
|
580
580
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
581
581
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
582
582
|
] : ["Monthly usage cap: off"];
|
|
583
|
-
|
|
583
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
584
584
|
{
|
|
585
585
|
...payload,
|
|
586
586
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -589,12 +589,12 @@ async function handleLimit(options) {
|
|
|
589
589
|
);
|
|
590
590
|
}
|
|
591
591
|
async function handleSetLimit(credits, options) {
|
|
592
|
-
const { http } =
|
|
592
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
593
593
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
594
594
|
method: "PUT",
|
|
595
595
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
596
596
|
});
|
|
597
|
-
|
|
597
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
598
598
|
{
|
|
599
599
|
...payload,
|
|
600
600
|
render: {
|
|
@@ -610,11 +610,11 @@ async function handleSetLimit(credits, options) {
|
|
|
610
610
|
);
|
|
611
611
|
}
|
|
612
612
|
async function handleLimitOff(options) {
|
|
613
|
-
const { http } =
|
|
613
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
614
614
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
615
615
|
method: "DELETE"
|
|
616
616
|
});
|
|
617
|
-
|
|
617
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
618
618
|
{
|
|
619
619
|
...payload,
|
|
620
620
|
render: {
|
|
@@ -634,7 +634,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
634
634
|
let initialized = false;
|
|
635
635
|
let pageNumber = 0;
|
|
636
636
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
637
|
-
for await (const entries of
|
|
637
|
+
for await (const entries of _chunk3DVJ2IPGjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
638
638
|
pageNumber += 1;
|
|
639
639
|
console.error(
|
|
640
640
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -673,7 +673,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
673
673
|
return summary;
|
|
674
674
|
}
|
|
675
675
|
async function handleHistory(options) {
|
|
676
|
-
const { http } =
|
|
676
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
677
677
|
const windows = {
|
|
678
678
|
"1d": 86400,
|
|
679
679
|
"1w": 604800,
|
|
@@ -685,10 +685,10 @@ async function handleHistory(options) {
|
|
|
685
685
|
process.cwd(),
|
|
686
686
|
"deepline",
|
|
687
687
|
"data",
|
|
688
|
-
|
|
688
|
+
_chunkHOFXQYRFjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
689
689
|
);
|
|
690
690
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
691
|
-
|
|
691
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
692
692
|
{
|
|
693
693
|
output_path: outputPath,
|
|
694
694
|
row_count: summary.row_count,
|
|
@@ -725,14 +725,14 @@ async function handleLedgerExportAll(options) {
|
|
|
725
725
|
);
|
|
726
726
|
return;
|
|
727
727
|
}
|
|
728
|
-
const { http } =
|
|
728
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
729
729
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
730
730
|
const summary = await exportLedger(http, outputPath, {
|
|
731
731
|
sinceAt,
|
|
732
732
|
runId: options.runId,
|
|
733
733
|
operation: options.operation
|
|
734
734
|
});
|
|
735
|
-
|
|
735
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
736
736
|
{
|
|
737
737
|
output_path: outputPath,
|
|
738
738
|
row_count: summary.row_count,
|
|
@@ -771,7 +771,7 @@ function targetPlanLine(plan) {
|
|
|
771
771
|
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"}`;
|
|
772
772
|
}
|
|
773
773
|
async function handlePlans(options) {
|
|
774
|
-
const client = new (0,
|
|
774
|
+
const client = new (0, _chunkEOKUL6XSjs.DeeplineClient)();
|
|
775
775
|
const payload = await client.billing.targetPlans();
|
|
776
776
|
const listedCurrentPlan = payload.plans.find(
|
|
777
777
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -784,8 +784,8 @@ async function handlePlans(options) {
|
|
|
784
784
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
785
785
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
786
786
|
];
|
|
787
|
-
const legacyPayload =
|
|
788
|
-
|
|
787
|
+
const legacyPayload = _chunkHOFXQYRFjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
788
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
789
789
|
{
|
|
790
790
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
791
791
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -795,7 +795,7 @@ async function handlePlans(options) {
|
|
|
795
795
|
);
|
|
796
796
|
}
|
|
797
797
|
async function handleSubscribe(planVersionId, options) {
|
|
798
|
-
const { http } =
|
|
798
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
799
799
|
const payload = await http.request(
|
|
800
800
|
"/api/v2/billing/subscription/checkout",
|
|
801
801
|
{
|
|
@@ -804,8 +804,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
804
804
|
}
|
|
805
805
|
);
|
|
806
806
|
const url = String(payload.checkout_url || "");
|
|
807
|
-
if (!options.json && options.open !== false && url)
|
|
808
|
-
|
|
807
|
+
if (!options.json && options.open !== false && url) _chunkHOFXQYRFjs.openInBrowser.call(void 0, url);
|
|
808
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
809
809
|
{
|
|
810
810
|
...payload,
|
|
811
811
|
render: {
|
|
@@ -821,7 +821,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
821
821
|
);
|
|
822
822
|
}
|
|
823
823
|
async function handleSubscriptionStatus(options) {
|
|
824
|
-
const client = new (0,
|
|
824
|
+
const client = new (0, _chunkEOKUL6XSjs.DeeplineClient)();
|
|
825
825
|
const payload = await client.billing.subscription.status();
|
|
826
826
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
827
827
|
const lines = [
|
|
@@ -841,7 +841,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
841
841
|
],
|
|
842
842
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
843
843
|
];
|
|
844
|
-
|
|
844
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
845
845
|
{
|
|
846
846
|
...payload,
|
|
847
847
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -850,7 +850,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
850
850
|
);
|
|
851
851
|
}
|
|
852
852
|
async function handleSubscriptionCancel(options) {
|
|
853
|
-
const client = new (0,
|
|
853
|
+
const client = new (0, _chunkEOKUL6XSjs.DeeplineClient)();
|
|
854
854
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
855
855
|
if (options.dryRun) {
|
|
856
856
|
const status = await client.billing.subscription.status();
|
|
@@ -867,7 +867,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
867
867
|
return;
|
|
868
868
|
}
|
|
869
869
|
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.";
|
|
870
|
-
|
|
870
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
871
871
|
{
|
|
872
872
|
ok: true,
|
|
873
873
|
dry_run: true,
|
|
@@ -922,7 +922,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
922
922
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
923
923
|
"Undo with: deepline billing subscription cancel --undo"
|
|
924
924
|
];
|
|
925
|
-
|
|
925
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
926
926
|
{
|
|
927
927
|
ok: true,
|
|
928
928
|
...result,
|
|
@@ -976,7 +976,7 @@ async function handleInvoices(options) {
|
|
|
976
976
|
return;
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
const client = new (0,
|
|
979
|
+
const client = new (0, _chunkEOKUL6XSjs.DeeplineClient)();
|
|
980
980
|
let payload;
|
|
981
981
|
try {
|
|
982
982
|
payload = await client.billing.invoices.list(
|
|
@@ -1005,7 +1005,7 @@ async function handleInvoices(options) {
|
|
|
1005
1005
|
url: entry.url
|
|
1006
1006
|
}))
|
|
1007
1007
|
} : { ...payload, count: entries.length };
|
|
1008
|
-
|
|
1008
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1009
1009
|
{
|
|
1010
1010
|
...envelope,
|
|
1011
1011
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -1014,7 +1014,7 @@ async function handleInvoices(options) {
|
|
|
1014
1014
|
);
|
|
1015
1015
|
}
|
|
1016
1016
|
async function handleCheckout(options) {
|
|
1017
|
-
const { http } =
|
|
1017
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
1018
1018
|
const payload = await http.post(
|
|
1019
1019
|
"/api/v2/billing/checkout",
|
|
1020
1020
|
{
|
|
@@ -1024,8 +1024,8 @@ async function handleCheckout(options) {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
);
|
|
1026
1026
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1027
|
-
if (!options.json && !options.noOpen && url)
|
|
1028
|
-
|
|
1027
|
+
if (!options.json && !options.noOpen && url) _chunkHOFXQYRFjs.openInBrowser.call(void 0, url);
|
|
1028
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1029
1029
|
{
|
|
1030
1030
|
...payload,
|
|
1031
1031
|
render: {
|
|
@@ -1070,7 +1070,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
1072
|
if (options.dryRun) {
|
|
1073
|
-
|
|
1073
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1074
1074
|
{
|
|
1075
1075
|
ok: true,
|
|
1076
1076
|
dry_run: true,
|
|
@@ -1100,7 +1100,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1100
1100
|
);
|
|
1101
1101
|
return;
|
|
1102
1102
|
}
|
|
1103
|
-
const client = new (0,
|
|
1103
|
+
const client = new (0, _chunkEOKUL6XSjs.DeeplineClient)();
|
|
1104
1104
|
let payload;
|
|
1105
1105
|
try {
|
|
1106
1106
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1117,7 +1117,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
1119
|
if (payload.status === "pending") {
|
|
1120
|
-
|
|
1120
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1121
1121
|
{
|
|
1122
1122
|
ok: true,
|
|
1123
1123
|
...payload,
|
|
@@ -1181,17 +1181,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1181
1181
|
]
|
|
1182
1182
|
}
|
|
1183
1183
|
};
|
|
1184
|
-
|
|
1184
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1185
1185
|
json: options.json
|
|
1186
1186
|
});
|
|
1187
1187
|
}
|
|
1188
1188
|
async function handleTargetStatus(options) {
|
|
1189
|
-
const client = new (0,
|
|
1189
|
+
const client = new (0, _chunkEOKUL6XSjs.DeeplineClient)();
|
|
1190
1190
|
const payload = await client.billing.targetStatus();
|
|
1191
1191
|
const balanceCommand = "deepline billing balance";
|
|
1192
1192
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1193
1193
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1194
|
-
|
|
1194
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1195
1195
|
{
|
|
1196
1196
|
ok: true,
|
|
1197
1197
|
...payload,
|
|
@@ -1224,8 +1224,8 @@ function formatAllowanceAmount(value) {
|
|
|
1224
1224
|
return Number(value.toFixed(2)).toLocaleString("en-US");
|
|
1225
1225
|
}
|
|
1226
1226
|
async function handleEntitlements(options) {
|
|
1227
|
-
const payload = await new (0,
|
|
1228
|
-
|
|
1227
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.entitlements();
|
|
1228
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1229
1229
|
{
|
|
1230
1230
|
ok: true,
|
|
1231
1231
|
...payload,
|
|
@@ -1258,7 +1258,7 @@ async function handleEntitlements(options) {
|
|
|
1258
1258
|
);
|
|
1259
1259
|
}
|
|
1260
1260
|
async function handleAutoRechargeStatus(options) {
|
|
1261
|
-
const payload = await new (0,
|
|
1261
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1262
1262
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1263
1263
|
const lines = [
|
|
1264
1264
|
`State: ${state}`,
|
|
@@ -1268,7 +1268,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1268
1268
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1269
1269
|
] : []
|
|
1270
1270
|
];
|
|
1271
|
-
|
|
1271
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1272
1272
|
{
|
|
1273
1273
|
ok: true,
|
|
1274
1274
|
...payload,
|
|
@@ -1317,7 +1317,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1319
1319
|
if (options.dryRun) {
|
|
1320
|
-
|
|
1320
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1321
1321
|
{
|
|
1322
1322
|
ok: true,
|
|
1323
1323
|
dry_run: true,
|
|
@@ -1338,7 +1338,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1338
1338
|
);
|
|
1339
1339
|
return;
|
|
1340
1340
|
}
|
|
1341
|
-
const payload = await new (0,
|
|
1341
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1342
1342
|
enabled: true,
|
|
1343
1343
|
thresholdCredits,
|
|
1344
1344
|
refillToCredits,
|
|
@@ -1346,7 +1346,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1346
1346
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1347
1347
|
idempotencyKey
|
|
1348
1348
|
});
|
|
1349
|
-
|
|
1349
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1350
1350
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1351
1351
|
{ json: options.json }
|
|
1352
1352
|
);
|
|
@@ -1354,7 +1354,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1354
1354
|
async function handleAutoRechargeOff(options) {
|
|
1355
1355
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1356
1356
|
if (options.dryRun) {
|
|
1357
|
-
|
|
1357
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1358
1358
|
{
|
|
1359
1359
|
ok: true,
|
|
1360
1360
|
dry_run: true,
|
|
@@ -1369,11 +1369,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1369
1369
|
);
|
|
1370
1370
|
return;
|
|
1371
1371
|
}
|
|
1372
|
-
const payload = await new (0,
|
|
1372
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1373
1373
|
enabled: false,
|
|
1374
1374
|
idempotencyKey
|
|
1375
1375
|
});
|
|
1376
|
-
|
|
1376
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1377
1377
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1378
1378
|
{ json: options.json }
|
|
1379
1379
|
);
|
|
@@ -1392,11 +1392,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1392
1392
|
return;
|
|
1393
1393
|
}
|
|
1394
1394
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1395
|
-
const payload = await new (0,
|
|
1395
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.purchaseCredits({
|
|
1396
1396
|
credits,
|
|
1397
1397
|
idempotencyKey
|
|
1398
1398
|
});
|
|
1399
|
-
|
|
1399
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1400
1400
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1401
1401
|
{ json: options.json }
|
|
1402
1402
|
);
|
|
@@ -1432,7 +1432,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1432
1432
|
return;
|
|
1433
1433
|
}
|
|
1434
1434
|
if (options.dryRun) {
|
|
1435
|
-
|
|
1435
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1436
1436
|
{
|
|
1437
1437
|
ok: true,
|
|
1438
1438
|
dry_run: true,
|
|
@@ -1445,12 +1445,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1445
1445
|
);
|
|
1446
1446
|
return;
|
|
1447
1447
|
}
|
|
1448
|
-
const payload = await new (0,
|
|
1448
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1449
1449
|
credits,
|
|
1450
1450
|
orgId: options.orgId,
|
|
1451
1451
|
idempotencyKey: options.idempotencyKey
|
|
1452
1452
|
});
|
|
1453
|
-
|
|
1453
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1454
1454
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1455
1455
|
{ json: options.json }
|
|
1456
1456
|
);
|
|
@@ -1470,37 +1470,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
1472
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1473
|
-
const payload = await new (0,
|
|
1473
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.transitionPlan({
|
|
1474
1474
|
action: "start_or_change",
|
|
1475
1475
|
targetPlanSku: planSku,
|
|
1476
1476
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1477
1477
|
idempotencyKey
|
|
1478
1478
|
});
|
|
1479
|
-
|
|
1479
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1480
1480
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1481
1481
|
{ json: options.json }
|
|
1482
1482
|
);
|
|
1483
1483
|
}
|
|
1484
1484
|
async function handleTargetPlanCancellation(options) {
|
|
1485
1485
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1486
|
-
const payload = await new (0,
|
|
1486
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.transitionPlan({
|
|
1487
1487
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1488
1488
|
idempotencyKey
|
|
1489
1489
|
});
|
|
1490
|
-
|
|
1490
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1491
1491
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1492
1492
|
{ json: options.json }
|
|
1493
1493
|
);
|
|
1494
1494
|
}
|
|
1495
1495
|
async function handleTargetPortal(options) {
|
|
1496
|
-
const payload = await new (0,
|
|
1496
|
+
const payload = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.portalSession(
|
|
1497
1497
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1498
1498
|
);
|
|
1499
|
-
if (!options.json && !options.noOpen)
|
|
1500
|
-
|
|
1499
|
+
if (!options.json && !options.noOpen) _chunkHOFXQYRFjs.openInBrowser.call(void 0, payload.url);
|
|
1500
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1501
1501
|
}
|
|
1502
1502
|
async function handleRedeemCode(code, options) {
|
|
1503
|
-
const { http } =
|
|
1503
|
+
const { http } = _chunkHOFXQYRFjs.getAuthedHttpClient.call(void 0, );
|
|
1504
1504
|
const payload = await http.post(
|
|
1505
1505
|
"/api/v2/billing/checkout",
|
|
1506
1506
|
{
|
|
@@ -1508,8 +1508,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
);
|
|
1510
1510
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1511
|
-
if (!options.json && !options.noOpen && url)
|
|
1512
|
-
|
|
1511
|
+
if (!options.json && !options.noOpen && url) _chunkHOFXQYRFjs.openInBrowser.call(void 0, url);
|
|
1512
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0,
|
|
1513
1513
|
{
|
|
1514
1514
|
...payload,
|
|
1515
1515
|
render: {
|
|
@@ -1567,14 +1567,14 @@ Examples:
|
|
|
1567
1567
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1568
1568
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1569
1569
|
}
|
|
1570
|
-
const quote = await new (0,
|
|
1570
|
+
const quote = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.quote({
|
|
1571
1571
|
quantity,
|
|
1572
1572
|
sandbox_runtime: {
|
|
1573
1573
|
timeout: options.sandboxTimeout,
|
|
1574
1574
|
size: "standard"
|
|
1575
1575
|
}
|
|
1576
1576
|
});
|
|
1577
|
-
|
|
1577
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0, quote, {
|
|
1578
1578
|
json: options.json,
|
|
1579
1579
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1580
1580
|
${quote.explanation}
|
|
@@ -1813,8 +1813,8 @@ Examples:
|
|
|
1813
1813
|
new (0, _commander.Command)("trigger").description(
|
|
1814
1814
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1815
1815
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1816
|
-
const result = await new (0,
|
|
1817
|
-
|
|
1816
|
+
const result = await new (0, _chunkEOKUL6XSjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1817
|
+
_chunkHOFXQYRFjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1818
1818
|
})
|
|
1819
1819
|
);
|
|
1820
1820
|
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(
|