deepline 0.3.503 → 0.3.505
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/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +5 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +35 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +144 -7
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +18 -0
- package/dist/bundling-sources/shared_libs/product-notifications/onboarding-unsubscribe.ts +23 -0
- package/dist/cli/{auth-IC4WLSE3.mjs → auth-AHE2EDQA.mjs} +5 -5
- package/dist/cli/auth-SEPKNRHV.js +43 -0
- package/dist/cli/{billing-2VOV64SD.mjs → billing-7CPWTGGI.mjs} +19 -12
- package/dist/cli/{billing-LWQOII22.js → billing-JOIZPHON.js} +92 -85
- package/dist/cli/{chunk-33JUK73X.js → chunk-3YEOOXD4.js} +96 -37
- package/dist/cli/{chunk-FVDTERO2.js → chunk-45XYW477.js} +21 -21
- package/dist/cli/{chunk-5GI6NKOE.mjs → chunk-4OFSAZN6.mjs} +1 -1
- package/dist/cli/{chunk-D27HP3HS.mjs → chunk-52FPW2RD.mjs} +2 -2
- package/dist/cli/chunk-5LUF4LAR.mjs +209 -0
- package/dist/cli/{chunk-VC5B462T.mjs → chunk-5XT4DZQL.mjs} +2 -2
- package/dist/cli/{chunk-26RSSTCF.js → chunk-6FEN6VWZ.js} +26 -26
- package/dist/cli/{chunk-7HEDCIR3.mjs → chunk-6U3AGJWI.mjs} +1 -1
- package/dist/cli/{chunk-KPBBT6OS.mjs → chunk-7AD565DO.mjs} +1 -1
- package/dist/cli/{chunk-FZHOWPSN.js → chunk-7DDACLMX.js} +16 -16
- package/dist/cli/{chunk-ZEQPCEV4.mjs → chunk-7DDKLFOY.mjs} +3 -3
- package/dist/cli/{chunk-WHP3FJ7T.js → chunk-7QLK2GHL.js} +5 -5
- package/dist/cli/{chunk-BI2Q45SY.mjs → chunk-ACI6CUDX.mjs} +11 -401
- package/dist/cli/{chunk-C5RQTTLP.js → chunk-BWAYMJ23.js} +7 -7
- package/dist/cli/{chunk-YXGPMTAK.js → chunk-CA3SYXCS.js} +2 -2
- package/dist/cli/{chunk-J6RBOLK7.mjs → chunk-CSLLQWAB.mjs} +1 -1
- package/dist/cli/{chunk-F73PD2XD.js → chunk-EMUFF6EU.js} +7 -7
- package/dist/cli/chunk-FIQ5UEIF.mjs +405 -0
- package/dist/cli/{chunk-2626LTU3.js → chunk-GAUNJCXQ.js} +96 -96
- package/dist/cli/{chunk-A2C6ONWA.js → chunk-GXMNOUHP.js} +6 -6
- package/dist/cli/{chunk-MJQOG4TZ.js → chunk-HASFFOSU.js} +16 -16
- package/dist/cli/{chunk-TCQYWZFS.js → chunk-IDAE5VDH.js} +5 -5
- package/dist/cli/{chunk-JJVN7OIX.mjs → chunk-IZYOYXG7.mjs} +4 -4
- package/dist/cli/{chunk-FHJ54BHH.mjs → chunk-JA7YBRP4.mjs} +1 -1
- package/dist/cli/{chunk-HRTDCXHI.js → chunk-JSTKLYYD.js} +2 -2
- package/dist/cli/{chunk-5M5WSFRZ.mjs → chunk-JVKEZT7L.mjs} +48 -8
- package/dist/cli/{chunk-4IIYSBEP.js → chunk-K26YOPDO.js} +50 -10
- package/dist/cli/{chunk-2K2QBLYO.js → chunk-LC4FG34E.js} +53 -53
- package/dist/cli/{chunk-XYZZZLN6.mjs → chunk-MAFZ64RN.mjs} +2 -2
- package/dist/cli/{chunk-B3X4YWQ6.js → chunk-MHZAG2ZQ.js} +80 -470
- package/dist/cli/{chunk-DPI5OYVU.mjs → chunk-NARJWXBR.mjs} +2 -2
- package/dist/cli/{chunk-GLZBFBJS.mjs → chunk-OA6U5NVB.mjs} +5 -5
- package/dist/cli/{chunk-URZNSJE2.mjs → chunk-OMEDQ77C.mjs} +93 -34
- package/dist/cli/{chunk-QIEYEY6Z.js → chunk-OORPAQVC.js} +8 -8
- package/dist/cli/{chunk-WS274KID.mjs → chunk-PDLOPF5L.mjs} +1 -1
- package/dist/cli/{chunk-KGLVATEB.mjs → chunk-PZN24YQQ.mjs} +2 -2
- package/dist/cli/{chunk-GIHNEYBG.mjs → chunk-QGNNAZ5M.mjs} +1 -1
- package/dist/cli/chunk-QYGYVCRI.js +405 -0
- package/dist/cli/chunk-R7J7CJPZ.js +209 -0
- package/dist/cli/{chunk-6XTE6C3W.mjs → chunk-RT3HJBIH.mjs} +12 -12
- package/dist/cli/{chunk-L3TZV625.mjs → chunk-SHKRL7CW.mjs} +1 -1
- package/dist/cli/{chunk-FIUTDSJX.js → chunk-SPN7U3MV.js} +4 -4
- package/dist/cli/{chunk-EQ3WMKFY.mjs → chunk-UZ24SF7N.mjs} +5 -5
- package/dist/cli/{chunk-AARF4SOW.js → chunk-VXKWF3AD.js} +9 -9
- package/dist/cli/{chunk-JPDD4Y53.mjs → chunk-W6I4N4JN.mjs} +6 -6
- package/dist/cli/{chunk-PVA3MWCO.js → chunk-WPCF7C6B.js} +3 -3
- package/dist/cli/{chunk-3CXHK4TW.js → chunk-WTQLUULB.js} +6 -6
- package/dist/cli/{chunk-EDMV4JT5.mjs → chunk-WTUC5VKB.mjs} +2 -2
- package/dist/cli/{chunk-IIP46RVC.js → chunk-XHPB6RGY.js} +1 -1
- package/dist/cli/{chunk-RVOBFO7C.js → chunk-Y52XY56V.js} +41 -41
- package/dist/cli/{chunk-K7NFFQFU.mjs → chunk-YBIVVAL7.mjs} +2 -2
- package/dist/cli/{chunk-HS63YBT5.js → chunk-ZLN2B5YA.js} +3 -3
- package/dist/cli/command-docs.d.mts +2 -1
- package/dist/cli/command-docs.d.ts +2 -1
- package/dist/cli/command-docs.js +6 -2
- package/dist/cli/command-docs.mjs +5 -1
- package/dist/cli/{csv-NEWCNOSZ.js → csv-DZHVIW3G.js} +13 -13
- package/dist/cli/{csv-2TXOI3UE.mjs → csv-WTPI6ZON.mjs} +4 -4
- package/dist/cli/{db-J3IJS4OG.js → db-D7LPPNCC.js} +27 -27
- package/dist/cli/{db-PX7EQEIG.mjs → db-NR4PJ6AF.mjs} +6 -6
- package/dist/cli/describe-HVQBTKFM.js +50 -0
- package/dist/cli/{describe-GQHGTZSL.mjs → describe-NCKAJPUG.mjs} +18 -17
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-FFKK24RY.mjs → executions-RQVJ4LAB.mjs} +6 -6
- package/dist/cli/{executions-RO3TJUXL.js → executions-UQG6LWEN.js} +8 -8
- package/dist/cli/{feedback-ZTO56SRL.mjs → feedback-RD4Y3YQR.mjs} +4 -4
- package/dist/cli/{feedback-XRR4HIS6.js → feedback-TCHA67IA.js} +8 -8
- package/dist/cli/git-TUB2ZUEH.js +25 -0
- package/dist/cli/{git-FIPBVFYZ.mjs → git-Z7434B7Y.mjs} +5 -5
- package/dist/cli/index.js +145 -141
- package/dist/cli/index.mjs +51 -47
- package/dist/cli/{legacy-noops-MTBBGM27.js → legacy-noops-23WRA7DH.js} +8 -8
- package/dist/cli/{legacy-noops-AMD2NWHF.mjs → legacy-noops-LQJU4UIV.mjs} +5 -5
- package/dist/cli/{monitors-42PIGLBF.js → monitors-KOWN7M3V.js} +95 -95
- package/dist/cli/{monitors-24LDKDJX.mjs → monitors-Z6VYUZ2W.mjs} +7 -7
- package/dist/cli/{org-GQMCA3MN.js → org-2T5K2VP5.js} +72 -72
- package/dist/cli/{org-4B7SCFRL.mjs → org-UBNRO5XO.mjs} +6 -6
- package/dist/cli/{pages-PD5EGL2R.mjs → pages-GHPJBVV3.mjs} +6 -6
- package/dist/cli/{pages-RL2M62GJ.js → pages-SRXTU7XO.js} +18 -18
- package/dist/cli/{play-FST6ZAHW.js → play-2HMZ57EZ.js} +324 -517
- package/dist/cli/{play-5V54VTUR.mjs → play-HRQKGTXA.mjs} +24 -217
- package/dist/cli/{providers-N5YVCKPL.mjs → providers-JWJRFRR5.mjs} +6 -6
- package/dist/cli/{providers-HBUUPN7J.js → providers-P5O676MZ.js} +9 -9
- package/dist/cli/{quickstart-NJDDVTQR.mjs → quickstart-S7NZUQRO.mjs} +4 -4
- package/dist/cli/{quickstart-4QIQNSHG.js → quickstart-YCY72TAO.js} +6 -6
- package/dist/cli/{run-FGOKCG4J.js → run-MHLLGF4G.js} +41 -40
- package/dist/cli/{run-JHI5MTHD.mjs → run-QWMRIUIU.mjs} +23 -22
- package/dist/cli/{search-EWIZBIY2.mjs → search-4BFTQUEP.mjs} +8 -7
- package/dist/cli/search-QPUHOEIL.js +33 -0
- package/dist/cli/{search-output-TMQTRC2W.js → search-output-62LBVZHN.js} +6 -6
- package/dist/cli/{search-output-NAK3MWBH.mjs → search-output-LIYHDTBP.mjs} +4 -4
- package/dist/cli/{secrets-ONQVW5SR.mjs → secrets-GW27V77E.mjs} +6 -6
- package/dist/cli/{secrets-5TSUEOJB.js → secrets-KKKHVSOO.js} +15 -15
- package/dist/cli/{sessions-BSGE5EET.js → sessions-R3OEINAR.js} +6 -6
- package/dist/cli/{sessions-B7F5O3ZR.mjs → sessions-R75LBGIL.mjs} +5 -5
- package/dist/cli/{settings-SGGFQV5R.mjs → settings-I3AQZSYG.mjs} +12 -11
- package/dist/cli/{settings-47LARBRU.js → settings-MQIHAEZN.js} +79 -78
- package/dist/cli/{setup-ATGNXQUK.mjs → setup-2YA5MYMS.mjs} +10 -9
- package/dist/cli/{setup-BNFZFXO6.js → setup-X3QRJERP.js} +50 -49
- package/dist/cli/{skills-CIMBRM5R.mjs → skills-7252FOOI.mjs} +8 -7
- package/dist/cli/skills-BPZWMZSL.js +37 -0
- package/dist/cli/tools-F7RVQ3IK.js +57 -0
- package/dist/cli/{tools-DTDXAULX.mjs → tools-SKQTSVGE.mjs} +17 -16
- package/dist/cli/{update-EOIJBJCO.mjs → update-GNBBSKTB.mjs} +10 -9
- package/dist/cli/update-TLSY6LC2.js +35 -0
- package/dist/cli/{workflow-IWXUJPWY.mjs → workflow-OJSAL5FO.mjs} +7 -7
- package/dist/cli/{workflow-V5VKPICQ.js → workflow-QB7YYWPP.js} +17 -17
- package/dist/{client-CIwenMFS.d.ts → client-B3GSaSFn.d.ts} +1 -1
- package/dist/{client-DYAfJpaN.d.mts → client-DEJg0CZn.d.mts} +1 -1
- package/dist/{client-core-DlzP8vEs.d.mts → client-core-C404E33V.d.mts} +5 -0
- package/dist/{client-core-CRjtyMAI.d.ts → client-core-GQmy3N8y.d.ts} +5 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +109 -104
- package/dist/plays/bundle-play-file.mjs +4 -4
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-ZCMSXZO4.js +0 -43
- package/dist/cli/describe-LE7EZCL4.js +0 -49
- package/dist/cli/git-26AH4XIO.js +0 -25
- package/dist/cli/search-CTKSEVSO.js +0 -32
- package/dist/cli/skills-6RD25MVM.js +0 -36
- package/dist/cli/tools-TDZH4XHS.js +0 -56
- package/dist/cli/update-Y32VT4VL.js +0 -34
|
@@ -1,26 +1,30 @@
|
|
|
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
|
|
4
|
-
|
|
3
|
+
var _chunkIDAE5VDHjs = require('./chunk-IDAE5VDH.js');
|
|
5
4
|
|
|
6
|
-
var _chunkTCQYWZFSjs = require('./chunk-TCQYWZFS.js');
|
|
7
5
|
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
var _chunkC5RQTTLPjs = require('./chunk-C5RQTTLP.js');
|
|
7
|
+
var _chunkBWAYMJ23js = require('./chunk-BWAYMJ23.js');
|
|
11
8
|
require('./chunk-E4CABWXL.js');
|
|
12
9
|
require('./chunk-RNSHCJME.js');
|
|
13
10
|
require('./chunk-NMU3VR5U.js');
|
|
14
11
|
require('./chunk-WSGXBROE.js');
|
|
15
12
|
|
|
16
13
|
|
|
14
|
+
var _chunkK26YOPDOjs = require('./chunk-K26YOPDO.js');
|
|
15
|
+
require('./chunk-R7J7CJPZ.js');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
|
|
19
|
+
|
|
20
|
+
|
|
17
21
|
|
|
18
22
|
|
|
19
23
|
|
|
20
24
|
|
|
21
|
-
var
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
25
|
+
var _chunkEMUFF6EUjs = require('./chunk-EMUFF6EU.js');
|
|
26
|
+
require('./chunk-ZLN2B5YA.js');
|
|
27
|
+
require('./chunk-SPN7U3MV.js');
|
|
24
28
|
|
|
25
29
|
|
|
26
30
|
|
|
@@ -29,7 +33,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
32
|
-
require('./chunk-
|
|
36
|
+
require('./chunk-XHPB6RGY.js');
|
|
33
37
|
require('./chunk-OG64RBAC.js');
|
|
34
38
|
require('./chunk-COGTRVWW.js');
|
|
35
39
|
|
|
@@ -78,7 +82,7 @@ function reportBillingFailure(failure, options) {
|
|
|
78
82
|
if (failure.next) {
|
|
79
83
|
textLines.push(`Next: ${failure.next}`);
|
|
80
84
|
}
|
|
81
|
-
|
|
85
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
82
86
|
{
|
|
83
87
|
ok: false,
|
|
84
88
|
exitCode: failure.exitCode,
|
|
@@ -99,7 +103,7 @@ function parseTopUpCredits(raw) {
|
|
|
99
103
|
return parsed;
|
|
100
104
|
}
|
|
101
105
|
function topUpIdempotencyKey(raw) {
|
|
102
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
106
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkBWAYMJ23js.requireBillingIdempotencyKey.call(void 0, raw);
|
|
103
107
|
}
|
|
104
108
|
function targetBillingIdempotencyKey(raw) {
|
|
105
109
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -318,7 +322,7 @@ function defaultLedgerExportPath() {
|
|
|
318
322
|
);
|
|
319
323
|
}
|
|
320
324
|
async function handleBalance(options) {
|
|
321
|
-
const { http } =
|
|
325
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
322
326
|
const payload = await http.get(
|
|
323
327
|
"/api/v2/billing/balance"
|
|
324
328
|
);
|
|
@@ -402,7 +406,7 @@ async function handleBalance(options) {
|
|
|
402
406
|
...options.verbose ? detail : [],
|
|
403
407
|
...lines.slice(1)
|
|
404
408
|
];
|
|
405
|
-
|
|
409
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
406
410
|
{
|
|
407
411
|
...payload,
|
|
408
412
|
...recovery ? { recovery } : {},
|
|
@@ -438,7 +442,7 @@ async function handleUsageEvents(options) {
|
|
|
438
442
|
);
|
|
439
443
|
return;
|
|
440
444
|
}
|
|
441
|
-
const client = new (0,
|
|
445
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
442
446
|
let payload;
|
|
443
447
|
try {
|
|
444
448
|
payload = await client.billing.usageEvents({
|
|
@@ -469,7 +473,7 @@ async function handleUsageEvents(options) {
|
|
|
469
473
|
),
|
|
470
474
|
...nextPage ? [`Next page: ${nextPage}`] : []
|
|
471
475
|
];
|
|
472
|
-
|
|
476
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
473
477
|
{
|
|
474
478
|
...payload,
|
|
475
479
|
next: { page: nextPage },
|
|
@@ -491,7 +495,7 @@ async function handleUsage(options) {
|
|
|
491
495
|
return;
|
|
492
496
|
}
|
|
493
497
|
if (options.events) return handleUsageEvents(options);
|
|
494
|
-
const { http } =
|
|
498
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
495
499
|
const params = new URLSearchParams();
|
|
496
500
|
if (options.requestId !== void 0) {
|
|
497
501
|
const requestId = options.requestId.trim();
|
|
@@ -575,7 +579,7 @@ async function handleUsage(options) {
|
|
|
575
579
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
576
580
|
] : []
|
|
577
581
|
];
|
|
578
|
-
|
|
582
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
579
583
|
{
|
|
580
584
|
...payload,
|
|
581
585
|
recent: {
|
|
@@ -589,7 +593,7 @@ async function handleUsage(options) {
|
|
|
589
593
|
);
|
|
590
594
|
}
|
|
591
595
|
async function handleLimit(options) {
|
|
592
|
-
const { http } =
|
|
596
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
593
597
|
const payload = await http.get(
|
|
594
598
|
"/api/v2/billing/limit"
|
|
595
599
|
);
|
|
@@ -597,7 +601,7 @@ async function handleLimit(options) {
|
|
|
597
601
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
598
602
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
599
603
|
] : ["Monthly usage cap: off"];
|
|
600
|
-
|
|
604
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
601
605
|
{
|
|
602
606
|
...payload,
|
|
603
607
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -606,12 +610,12 @@ async function handleLimit(options) {
|
|
|
606
610
|
);
|
|
607
611
|
}
|
|
608
612
|
async function handleSetLimit(credits, options) {
|
|
609
|
-
const { http } =
|
|
613
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
610
614
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
611
615
|
method: "PUT",
|
|
612
616
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
613
617
|
});
|
|
614
|
-
|
|
618
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
615
619
|
{
|
|
616
620
|
...payload,
|
|
617
621
|
render: {
|
|
@@ -627,11 +631,11 @@ async function handleSetLimit(credits, options) {
|
|
|
627
631
|
);
|
|
628
632
|
}
|
|
629
633
|
async function handleLimitOff(options) {
|
|
630
|
-
const { http } =
|
|
634
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
631
635
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
632
636
|
method: "DELETE"
|
|
633
637
|
});
|
|
634
|
-
|
|
638
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
635
639
|
{
|
|
636
640
|
...payload,
|
|
637
641
|
render: {
|
|
@@ -651,7 +655,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
651
655
|
let initialized = false;
|
|
652
656
|
let pageNumber = 0;
|
|
653
657
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
654
|
-
for await (const entries of
|
|
658
|
+
for await (const entries of _chunkBWAYMJ23js.iterateCursorPages.call(void 0, async (cursor) => {
|
|
655
659
|
pageNumber += 1;
|
|
656
660
|
console.error(
|
|
657
661
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -690,7 +694,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
690
694
|
return summary;
|
|
691
695
|
}
|
|
692
696
|
async function handleHistory(options) {
|
|
693
|
-
const { http } =
|
|
697
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
694
698
|
const windows = {
|
|
695
699
|
"1d": 86400,
|
|
696
700
|
"1w": 604800,
|
|
@@ -702,10 +706,10 @@ async function handleHistory(options) {
|
|
|
702
706
|
process.cwd(),
|
|
703
707
|
"deepline",
|
|
704
708
|
"data",
|
|
705
|
-
|
|
709
|
+
_chunkEMUFF6EUjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
706
710
|
);
|
|
707
711
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
708
|
-
|
|
712
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
709
713
|
{
|
|
710
714
|
output_path: outputPath,
|
|
711
715
|
row_count: summary.row_count,
|
|
@@ -742,14 +746,14 @@ async function handleLedgerExportAll(options) {
|
|
|
742
746
|
);
|
|
743
747
|
return;
|
|
744
748
|
}
|
|
745
|
-
const { http } =
|
|
749
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
746
750
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
747
751
|
const summary = await exportLedger(http, outputPath, {
|
|
748
752
|
sinceAt,
|
|
749
753
|
runId: options.runId,
|
|
750
754
|
operation: options.operation
|
|
751
755
|
});
|
|
752
|
-
|
|
756
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
753
757
|
{
|
|
754
758
|
output_path: outputPath,
|
|
755
759
|
row_count: summary.row_count,
|
|
@@ -789,7 +793,7 @@ function targetPlanLine(plan) {
|
|
|
789
793
|
return `${plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
|
|
790
794
|
}
|
|
791
795
|
async function handlePlans(options) {
|
|
792
|
-
const client = new (0,
|
|
796
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
793
797
|
const payload = await client.billing.targetPlans();
|
|
794
798
|
const listedCurrentPlan = payload.plans.find(
|
|
795
799
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -802,8 +806,8 @@ async function handlePlans(options) {
|
|
|
802
806
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
803
807
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
804
808
|
];
|
|
805
|
-
const legacyPayload =
|
|
806
|
-
|
|
809
|
+
const legacyPayload = _chunkEMUFF6EUjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
810
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
807
811
|
{
|
|
808
812
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
809
813
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -813,7 +817,7 @@ async function handlePlans(options) {
|
|
|
813
817
|
);
|
|
814
818
|
}
|
|
815
819
|
async function handleSubscribe(planVersionId, options) {
|
|
816
|
-
const { http } =
|
|
820
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
817
821
|
const payload = await http.request(
|
|
818
822
|
"/api/v2/billing/subscription/checkout",
|
|
819
823
|
{
|
|
@@ -822,8 +826,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
822
826
|
}
|
|
823
827
|
);
|
|
824
828
|
const url = String(payload.checkout_url || "");
|
|
825
|
-
if (!options.json && options.open !== false && url)
|
|
826
|
-
|
|
829
|
+
if (!options.json && options.open !== false && url) _chunkEMUFF6EUjs.openInBrowser.call(void 0, url);
|
|
830
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
827
831
|
{
|
|
828
832
|
...payload,
|
|
829
833
|
render: {
|
|
@@ -839,7 +843,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
839
843
|
);
|
|
840
844
|
}
|
|
841
845
|
async function handleSubscriptionStatus(options) {
|
|
842
|
-
const client = new (0,
|
|
846
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
843
847
|
const payload = await client.billing.subscription.status();
|
|
844
848
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
845
849
|
const lines = [
|
|
@@ -859,7 +863,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
859
863
|
],
|
|
860
864
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
861
865
|
];
|
|
862
|
-
|
|
866
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
863
867
|
{
|
|
864
868
|
...payload,
|
|
865
869
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -868,7 +872,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
868
872
|
);
|
|
869
873
|
}
|
|
870
874
|
async function handleSubscriptionCancel(options) {
|
|
871
|
-
const client = new (0,
|
|
875
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
872
876
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
873
877
|
if (options.dryRun) {
|
|
874
878
|
const status = await client.billing.subscription.status();
|
|
@@ -885,7 +889,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
885
889
|
return;
|
|
886
890
|
}
|
|
887
891
|
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.";
|
|
888
|
-
|
|
892
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
889
893
|
{
|
|
890
894
|
ok: true,
|
|
891
895
|
dry_run: true,
|
|
@@ -940,7 +944,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
940
944
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
941
945
|
"Undo with: deepline billing subscription cancel --undo"
|
|
942
946
|
];
|
|
943
|
-
|
|
947
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
944
948
|
{
|
|
945
949
|
ok: true,
|
|
946
950
|
...result,
|
|
@@ -994,7 +998,7 @@ async function handleInvoices(options) {
|
|
|
994
998
|
return;
|
|
995
999
|
}
|
|
996
1000
|
}
|
|
997
|
-
const client = new (0,
|
|
1001
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
998
1002
|
let payload;
|
|
999
1003
|
try {
|
|
1000
1004
|
payload = await client.billing.invoices.list(
|
|
@@ -1023,7 +1027,7 @@ async function handleInvoices(options) {
|
|
|
1023
1027
|
url: entry.url
|
|
1024
1028
|
}))
|
|
1025
1029
|
} : { ...payload, count: entries.length };
|
|
1026
|
-
|
|
1030
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1027
1031
|
{
|
|
1028
1032
|
...envelope,
|
|
1029
1033
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -1032,7 +1036,7 @@ async function handleInvoices(options) {
|
|
|
1032
1036
|
);
|
|
1033
1037
|
}
|
|
1034
1038
|
async function handleCheckout(options) {
|
|
1035
|
-
const { http } =
|
|
1039
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
1036
1040
|
const payload = await http.post(
|
|
1037
1041
|
"/api/v2/billing/checkout",
|
|
1038
1042
|
{
|
|
@@ -1042,8 +1046,8 @@ async function handleCheckout(options) {
|
|
|
1042
1046
|
}
|
|
1043
1047
|
);
|
|
1044
1048
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1045
|
-
if (!options.json && !options.noOpen && url)
|
|
1046
|
-
|
|
1049
|
+
if (!options.json && !options.noOpen && url) _chunkEMUFF6EUjs.openInBrowser.call(void 0, url);
|
|
1050
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1047
1051
|
{
|
|
1048
1052
|
...payload,
|
|
1049
1053
|
render: {
|
|
@@ -1088,7 +1092,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1088
1092
|
return;
|
|
1089
1093
|
}
|
|
1090
1094
|
if (options.dryRun) {
|
|
1091
|
-
|
|
1095
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1092
1096
|
{
|
|
1093
1097
|
ok: true,
|
|
1094
1098
|
dry_run: true,
|
|
@@ -1118,7 +1122,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1118
1122
|
);
|
|
1119
1123
|
return;
|
|
1120
1124
|
}
|
|
1121
|
-
const client = new (0,
|
|
1125
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
1122
1126
|
let payload;
|
|
1123
1127
|
try {
|
|
1124
1128
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1135,7 +1139,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1135
1139
|
return;
|
|
1136
1140
|
}
|
|
1137
1141
|
if (payload.status === "pending") {
|
|
1138
|
-
|
|
1142
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1139
1143
|
{
|
|
1140
1144
|
ok: true,
|
|
1141
1145
|
...payload,
|
|
@@ -1199,17 +1203,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1199
1203
|
]
|
|
1200
1204
|
}
|
|
1201
1205
|
};
|
|
1202
|
-
|
|
1206
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1203
1207
|
json: options.json
|
|
1204
1208
|
});
|
|
1205
1209
|
}
|
|
1206
1210
|
async function handleTargetStatus(options) {
|
|
1207
|
-
const client = new (0,
|
|
1211
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
1208
1212
|
const payload = await client.billing.targetStatus();
|
|
1209
1213
|
const balanceCommand = "deepline billing balance";
|
|
1210
1214
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1211
1215
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1212
|
-
|
|
1216
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1213
1217
|
{
|
|
1214
1218
|
ok: true,
|
|
1215
1219
|
...payload,
|
|
@@ -1245,10 +1249,10 @@ function formatComputeMinutes(minutes) {
|
|
|
1245
1249
|
return minutes < 120 ? `${Number(minutes.toFixed(1)).toLocaleString("en-US")} minutes` : `${Number((minutes / 60).toFixed(1)).toLocaleString("en-US")} hours`;
|
|
1246
1250
|
}
|
|
1247
1251
|
async function handleIncludedCompute(options) {
|
|
1248
|
-
const client = new (0,
|
|
1252
|
+
const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
|
|
1249
1253
|
const payload = options.enable ? await client.billing.enableIncludedCompute() : await client.billing.includedCompute();
|
|
1250
1254
|
const plan = `${formatComputeMinutes(payload.plan.included_minutes)} standard-equivalent compute included per month, then ${Math.round(payload.plan.credits_per_minute * 60)} credits/standard hour`;
|
|
1251
|
-
|
|
1255
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1252
1256
|
{
|
|
1253
1257
|
ok: true,
|
|
1254
1258
|
...payload,
|
|
@@ -1258,11 +1262,13 @@ async function handleIncludedCompute(options) {
|
|
|
1258
1262
|
title: "billing compute",
|
|
1259
1263
|
lines: payload.status === "on" ? [
|
|
1260
1264
|
`Included compute: on, ${formatComputeMinutes(payload.included_minutes)} standard-equivalent per month, then ${Math.round((_nullishCoalesce(payload.credits_per_minute, () => ( 0))) * 60)} credits/standard hour`,
|
|
1261
|
-
`Used: ${formatComputeMinutes(payload.included_minutes_used)} standard-equivalent included, ${formatComputeMinutes(payload.minutes_used)} elapsed since ${payload.period_start_at.slice(0, 10)}
|
|
1265
|
+
`Used: ${formatComputeMinutes(payload.included_minutes_used)} standard-equivalent included, ${formatComputeMinutes(payload.minutes_used)} elapsed since ${payload.period_start_at.slice(0, 10)}`,
|
|
1266
|
+
_chunkK26YOPDOjs.PLAY_RUNTIME_PRICING_NOTE
|
|
1262
1267
|
] : payload.status === "off" ? [
|
|
1263
1268
|
"Included compute: off; Play compute is billed at provider cost.",
|
|
1264
1269
|
`Used: ${formatComputeMinutes(payload.minutes_used)} since ${payload.period_start_at.slice(0, 10)}`,
|
|
1265
|
-
`Turning it on gives ${plan}. Run deepline billing compute --enable; it cannot be turned off again
|
|
1270
|
+
`Turning it on gives ${plan}. Run deepline billing compute --enable; it cannot be turned off again.`,
|
|
1271
|
+
_chunkK26YOPDOjs.PLAY_RUNTIME_PRICING_NOTE
|
|
1266
1272
|
] : [
|
|
1267
1273
|
"Included compute is not available for this workspace yet."
|
|
1268
1274
|
]
|
|
@@ -1274,8 +1280,8 @@ async function handleIncludedCompute(options) {
|
|
|
1274
1280
|
);
|
|
1275
1281
|
}
|
|
1276
1282
|
async function handleEntitlements(options) {
|
|
1277
|
-
const payload = await new (0,
|
|
1278
|
-
|
|
1283
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.entitlements();
|
|
1284
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1279
1285
|
{
|
|
1280
1286
|
ok: true,
|
|
1281
1287
|
...payload,
|
|
@@ -1308,7 +1314,7 @@ async function handleEntitlements(options) {
|
|
|
1308
1314
|
);
|
|
1309
1315
|
}
|
|
1310
1316
|
async function handleAutoRechargeStatus(options) {
|
|
1311
|
-
const payload = await new (0,
|
|
1317
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1312
1318
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1313
1319
|
const lines = [
|
|
1314
1320
|
`State: ${state}`,
|
|
@@ -1318,7 +1324,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1318
1324
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1319
1325
|
] : []
|
|
1320
1326
|
];
|
|
1321
|
-
|
|
1327
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1322
1328
|
{
|
|
1323
1329
|
ok: true,
|
|
1324
1330
|
...payload,
|
|
@@ -1367,7 +1373,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1367
1373
|
}
|
|
1368
1374
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1369
1375
|
if (options.dryRun) {
|
|
1370
|
-
|
|
1376
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1371
1377
|
{
|
|
1372
1378
|
ok: true,
|
|
1373
1379
|
dry_run: true,
|
|
@@ -1388,7 +1394,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1388
1394
|
);
|
|
1389
1395
|
return;
|
|
1390
1396
|
}
|
|
1391
|
-
const payload = await new (0,
|
|
1397
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1392
1398
|
enabled: true,
|
|
1393
1399
|
thresholdCredits,
|
|
1394
1400
|
refillToCredits,
|
|
@@ -1396,7 +1402,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1396
1402
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1397
1403
|
idempotencyKey
|
|
1398
1404
|
});
|
|
1399
|
-
|
|
1405
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1400
1406
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1401
1407
|
{ json: options.json }
|
|
1402
1408
|
);
|
|
@@ -1404,7 +1410,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1404
1410
|
async function handleAutoRechargeOff(options) {
|
|
1405
1411
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1406
1412
|
if (options.dryRun) {
|
|
1407
|
-
|
|
1413
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1408
1414
|
{
|
|
1409
1415
|
ok: true,
|
|
1410
1416
|
dry_run: true,
|
|
@@ -1419,11 +1425,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1419
1425
|
);
|
|
1420
1426
|
return;
|
|
1421
1427
|
}
|
|
1422
|
-
const payload = await new (0,
|
|
1428
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1423
1429
|
enabled: false,
|
|
1424
1430
|
idempotencyKey
|
|
1425
1431
|
});
|
|
1426
|
-
|
|
1432
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1427
1433
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1428
1434
|
{ json: options.json }
|
|
1429
1435
|
);
|
|
@@ -1442,11 +1448,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1442
1448
|
return;
|
|
1443
1449
|
}
|
|
1444
1450
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1445
|
-
const payload = await new (0,
|
|
1451
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.purchaseCredits({
|
|
1446
1452
|
credits,
|
|
1447
1453
|
idempotencyKey
|
|
1448
1454
|
});
|
|
1449
|
-
|
|
1455
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1450
1456
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1451
1457
|
{ json: options.json }
|
|
1452
1458
|
);
|
|
@@ -1482,7 +1488,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1482
1488
|
return;
|
|
1483
1489
|
}
|
|
1484
1490
|
if (options.dryRun) {
|
|
1485
|
-
|
|
1491
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1486
1492
|
{
|
|
1487
1493
|
ok: true,
|
|
1488
1494
|
dry_run: true,
|
|
@@ -1495,12 +1501,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1495
1501
|
);
|
|
1496
1502
|
return;
|
|
1497
1503
|
}
|
|
1498
|
-
const payload = await new (0,
|
|
1504
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1499
1505
|
credits,
|
|
1500
1506
|
orgId: options.orgId,
|
|
1501
1507
|
idempotencyKey: options.idempotencyKey
|
|
1502
1508
|
});
|
|
1503
|
-
|
|
1509
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1504
1510
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1505
1511
|
{ json: options.json }
|
|
1506
1512
|
);
|
|
@@ -1520,37 +1526,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1520
1526
|
return;
|
|
1521
1527
|
}
|
|
1522
1528
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1523
|
-
const payload = await new (0,
|
|
1529
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.transitionPlan({
|
|
1524
1530
|
action: "start_or_change",
|
|
1525
1531
|
targetPlanSku: planSku,
|
|
1526
1532
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1527
1533
|
idempotencyKey
|
|
1528
1534
|
});
|
|
1529
|
-
|
|
1535
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1530
1536
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1531
1537
|
{ json: options.json }
|
|
1532
1538
|
);
|
|
1533
1539
|
}
|
|
1534
1540
|
async function handleTargetPlanCancellation(options) {
|
|
1535
1541
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1536
|
-
const payload = await new (0,
|
|
1542
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.transitionPlan({
|
|
1537
1543
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1538
1544
|
idempotencyKey
|
|
1539
1545
|
});
|
|
1540
|
-
|
|
1546
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1541
1547
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1542
1548
|
{ json: options.json }
|
|
1543
1549
|
);
|
|
1544
1550
|
}
|
|
1545
1551
|
async function handleTargetPortal(options) {
|
|
1546
|
-
const payload = await new (0,
|
|
1552
|
+
const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.portalSession(
|
|
1547
1553
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1548
1554
|
);
|
|
1549
|
-
if (!options.json && !options.noOpen)
|
|
1550
|
-
|
|
1555
|
+
if (!options.json && !options.noOpen) _chunkEMUFF6EUjs.openInBrowser.call(void 0, payload.url);
|
|
1556
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1551
1557
|
}
|
|
1552
1558
|
async function handleRedeemCode(code, options) {
|
|
1553
|
-
const { http } =
|
|
1559
|
+
const { http } = _chunkEMUFF6EUjs.getAuthedHttpClient.call(void 0, );
|
|
1554
1560
|
const payload = await http.post(
|
|
1555
1561
|
"/api/v2/billing/checkout",
|
|
1556
1562
|
{
|
|
@@ -1558,8 +1564,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1558
1564
|
}
|
|
1559
1565
|
);
|
|
1560
1566
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1561
|
-
if (!options.json && !options.noOpen && url)
|
|
1562
|
-
|
|
1567
|
+
if (!options.json && !options.noOpen && url) _chunkEMUFF6EUjs.openInBrowser.call(void 0, url);
|
|
1568
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
|
|
1563
1569
|
{
|
|
1564
1570
|
...payload,
|
|
1565
1571
|
render: {
|
|
@@ -1584,6 +1590,7 @@ Examples:
|
|
|
1584
1590
|
deepline billing balance
|
|
1585
1591
|
deepline billing usage --limit 20
|
|
1586
1592
|
deepline billing plans
|
|
1593
|
+
deepline billing compute
|
|
1587
1594
|
deepline billing subscription status
|
|
1588
1595
|
|
|
1589
1596
|
# Price a tool before execution; look up its exact charge afterward
|
|
@@ -1619,14 +1626,14 @@ Examples:
|
|
|
1619
1626
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1620
1627
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1621
1628
|
}
|
|
1622
|
-
const quote = await new (0,
|
|
1629
|
+
const quote = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.quote({
|
|
1623
1630
|
quantity,
|
|
1624
1631
|
sandbox_runtime: {
|
|
1625
1632
|
timeout: options.sandboxTimeout,
|
|
1626
1633
|
size: options.sandboxSize
|
|
1627
1634
|
}
|
|
1628
1635
|
});
|
|
1629
|
-
|
|
1636
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, quote, {
|
|
1630
1637
|
json: options.json,
|
|
1631
1638
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1632
1639
|
${quote.explanation}
|
|
@@ -1833,7 +1840,7 @@ Examples:
|
|
|
1833
1840
|
"Show workspace benefits, remaining people search profiles, and effective rate limits."
|
|
1834
1841
|
).option("--json", "Emit JSON output").action(handleEntitlements);
|
|
1835
1842
|
billing.command("compute").description(
|
|
1836
|
-
"Show Play
|
|
1843
|
+
"Show Play runtime pricing, included compute, and minutes used."
|
|
1837
1844
|
).option(
|
|
1838
1845
|
"--enable",
|
|
1839
1846
|
"Turn on included compute for this workspace (cannot be undone)"
|
|
@@ -1874,8 +1881,8 @@ Examples:
|
|
|
1874
1881
|
new (0, _commander.Command)("trigger").description(
|
|
1875
1882
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1876
1883
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1877
|
-
const result = await new (0,
|
|
1878
|
-
|
|
1884
|
+
const result = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1885
|
+
_chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1879
1886
|
})
|
|
1880
1887
|
);
|
|
1881
1888
|
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(
|