deepline 0.3.396 → 0.3.397
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/shared_libs/play-runtime/fixture-behavior.ts +2 -2
- package/dist/cli/{auth-3LTD62VL.mjs → auth-AZJFXGKP.mjs} +5 -4
- package/dist/cli/auth-CZJQU7B5.js +40 -0
- package/dist/cli/{billing-PA5OXEM5.js → billing-MQV5AGDJ.js} +76 -75
- package/dist/cli/{billing-DP7ZAJBO.mjs → billing-MZAAUHGH.mjs} +5 -4
- package/dist/cli/{chunk-VE3U3SQC.mjs → chunk-2LDADJNO.mjs} +7 -107
- package/dist/cli/{chunk-772W2SAU.js → chunk-3VP34TAU.js} +8 -8
- package/dist/cli/{chunk-QHGPA362.mjs → chunk-4D745XZO.mjs} +6 -108
- package/dist/cli/chunk-7DRPTGCK.js +930 -0
- package/dist/cli/{chunk-NSOTASOP.js → chunk-BQR6UN3C.js} +1 -83
- package/dist/cli/{chunk-RTO5QZWT.js → chunk-DQ65ZVHN.js} +6 -6
- package/dist/cli/{chunk-3T4MCB5R.mjs → chunk-F3BUFYKE.mjs} +89 -969
- package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
- package/dist/cli/{describe-6O2ENKTP.mjs → chunk-HFYQBC2D.mjs} +22 -160
- package/dist/cli/chunk-HGFFYVXN.js +210 -0
- package/dist/cli/{chunk-5WNJF2T3.mjs → chunk-IHG7UAHD.mjs} +1 -83
- package/dist/cli/{chunk-GNN4MY5X.js → chunk-IZ74ABSX.js} +1 -1
- package/dist/cli/{chunk-MR6XCBQJ.mjs → chunk-J7ABTQQ7.mjs} +4 -2
- package/dist/cli/{chunk-2VOLOWYZ.js → chunk-K33MXVXQ.js} +293 -1173
- package/dist/cli/chunk-LJ5747UC.mjs +107 -0
- package/dist/cli/{chunk-NHB5YUCS.mjs → chunk-MRXMMERY.mjs} +1 -1
- package/dist/cli/{chunk-TLQ3FZOC.mjs → chunk-MV7QRALK.mjs} +3 -3
- package/dist/cli/{chunk-AUYXWELC.mjs → chunk-MYPH2LUU.mjs} +2 -2
- package/dist/cli/{chunk-LWERJUKN.js → chunk-NA4T3B62.js} +7 -215
- package/dist/cli/{chunk-23GAA3YO.mjs → chunk-NOX2TCBP.mjs} +1 -1
- package/dist/cli/chunk-OSDXE27V.mjs +88 -0
- package/dist/cli/{chunk-KAEZNPUM.js → chunk-PSGEDGLT.js} +13 -115
- package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
- package/dist/cli/{describe-EFWNECHI.js → chunk-RFG3MRAC.js} +37 -175
- package/dist/cli/{chunk-XKZXO7D3.mjs → chunk-RNSWDKBM.mjs} +1 -1
- package/dist/cli/{chunk-V7UP2F4U.js → chunk-RYW4HPSM.js} +21 -121
- package/dist/cli/{chunk-7Z66NHUC.js → chunk-SO7RUVTY.js} +26 -26
- package/dist/cli/{chunk-H5KLUGY7.mjs → chunk-TXZVVBQZ.mjs} +1 -209
- package/dist/cli/{chunk-WQJJNIMQ.js → chunk-UVXBVUZQ.js} +11 -9
- package/dist/cli/{chunk-AVHLATII.js → chunk-VTF4RRWJ.js} +50 -50
- package/dist/cli/{chunk-LOGGNW4H.mjs → chunk-W3HMGKMI.mjs} +2 -2
- package/dist/cli/{chunk-JCN4DHF7.mjs → chunk-WM2QEHZL.mjs} +2 -2
- package/dist/cli/chunk-YHPYUZZX.mjs +112 -0
- package/dist/cli/chunk-YHZUZO3U.mjs +930 -0
- package/dist/cli/{chunk-ME6XRFLY.js → chunk-YLRME7MK.js} +15 -15
- package/dist/cli/{chunk-DC6LTULT.js → chunk-YSVORIEW.js} +2 -2
- package/dist/cli/{chunk-I4T4XAA2.mjs → chunk-YUDKBQUD.mjs} +4 -4
- package/dist/cli/chunk-ZAAKSJAS.js +88 -0
- package/dist/cli/{chunk-RMTASUAK.js → chunk-ZHUMDMOS.js} +65 -65
- package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
- package/dist/cli/{csv-TF576S77.js → csv-AQBQ5O3I.js} +13 -12
- package/dist/cli/{csv-RLRR74RQ.mjs → csv-MB7PJMYQ.mjs} +4 -3
- package/dist/cli/{db-FDBJUTFO.js → db-JPUYC5RB.js} +30 -29
- package/dist/cli/{db-XORGNBIC.mjs → db-L5IEI2AU.mjs} +5 -4
- package/dist/cli/describe-6WT74AOR.js +164 -0
- package/dist/cli/describe-S6BFANVI.mjs +164 -0
- package/dist/cli/describe-core.d.mts +100 -0
- package/dist/cli/describe-core.d.ts +100 -0
- package/dist/cli/describe-core.js +18 -0
- package/dist/cli/describe-core.mjs +18 -0
- package/dist/cli/{executions-SFYAXPF4.js → executions-6TMQTFP4.js} +7 -6
- package/dist/cli/{executions-YPP7WR77.mjs → executions-L7I2ZW4Z.mjs} +5 -4
- package/dist/cli/{feedback-RBGA5ARU.mjs → feedback-DSJ63HK6.mjs} +4 -3
- package/dist/cli/{feedback-5UZFYMGB.js → feedback-XF7CQGMD.js} +8 -7
- package/dist/cli/{git-IRSAJEK2.mjs → git-C3ENM67D.mjs} +5 -4
- package/dist/cli/git-HYDZK2QR.js +24 -0
- package/dist/cli/index.js +93 -91
- package/dist/cli/index.mjs +35 -33
- package/dist/cli/{legacy-noops-CVAOQY2F.js → legacy-noops-B2NHWIVD.js} +8 -7
- package/dist/cli/{legacy-noops-NA7N6ZOU.mjs → legacy-noops-VFG2K6HK.mjs} +5 -4
- package/dist/cli/{monitors-4OMRXCXP.js → monitors-ORFWOVZB.js} +86 -85
- package/dist/cli/{monitors-ILZ2XHYG.mjs → monitors-TCEDBDGY.mjs} +5 -4
- package/dist/cli/{org-QDDXAE3J.mjs → org-45KREIKZ.mjs} +5 -4
- package/dist/cli/{org-YGNJDD2X.js → org-T74CJESN.js} +65 -64
- package/dist/cli/{play-VT6OHB2D.mjs → play-MU7MYBIM.mjs} +19 -15
- package/dist/cli/{play-L535H26U.js → play-XHK2LPON.js} +251 -247
- package/dist/cli/{providers-GPZ6PQAL.js → providers-4MGQKYFD.js} +8 -7
- package/dist/cli/{providers-KG4W5MPK.mjs → providers-VYCXIJT5.mjs} +5 -4
- package/dist/cli/{quickstart-UI27S5LO.js → quickstart-47G3VEOT.js} +6 -5
- package/dist/cli/{quickstart-2JDGTXIG.mjs → quickstart-H724EFM2.mjs} +4 -3
- package/dist/cli/search-3356ENLD.js +30 -0
- package/dist/cli/{search-PW3RAUX7.mjs → search-VQHXEFQ4.mjs} +7 -5
- package/dist/cli/{secrets-WFAXOUZE.js → secrets-ALLKCU35.js} +14 -13
- package/dist/cli/{secrets-HNOMK5A2.mjs → secrets-CPBNGA44.mjs} +5 -4
- package/dist/cli/{sessions-XLX3E5UO.mjs → sessions-7RSQB7IX.mjs} +5 -4
- package/dist/cli/sessions-FKGAY7WQ.js +16 -0
- package/dist/cli/{settings-YNZ4YKCH.mjs → settings-UYSGV4IC.mjs} +8 -7
- package/dist/cli/{settings-GADAG2UK.js → settings-Y5BI42P7.js} +75 -74
- package/dist/cli/{setup-PSEHIUXO.mjs → setup-L3ZBBTS4.mjs} +7 -6
- package/dist/cli/{setup-R5YO7GT6.js → setup-VXQPEU3E.js} +42 -41
- package/dist/cli/skills-DUZQTDTE.js +29 -0
- package/dist/cli/{skills-LTQBP6CZ.mjs → skills-QHVDLSFE.mjs} +5 -4
- package/dist/cli/{tools-UAXDWU63.mjs → tools-LSCEK4K2.mjs} +13 -8
- package/dist/cli/tools-YWU5QOQ5.js +39 -0
- package/dist/cli/update-5LYQAI55.js +29 -0
- package/dist/cli/{update-SMNIBIMS.mjs → update-CU22OTBM.mjs} +7 -6
- package/dist/cli/{workflow-AOQVZHMD.js → workflow-ERFLTRNX.js} +16 -15
- package/dist/cli/{workflow-IKGMBGF6.mjs → workflow-KQARK5BZ.mjs} +6 -5
- package/dist/{client-DiGl8ska.d.mts → client-D0j-_aaa.d.mts} +1 -1
- package/dist/{client-Bgis7F6-.d.ts → client-DflfVyj6.d.ts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -10
- package/dist/index.mjs +19 -15
- package/dist/install-integrity.json +92 -76
- 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/package.json +6 -1
- package/dist/cli/auth-562JPKOM.js +0 -39
- package/dist/cli/git-5LDY5ZID.js +0 -23
- package/dist/cli/search-MGWROZ33.js +0 -28
- package/dist/cli/sessions-366KROUA.js +0 -15
- package/dist/cli/skills-JF2LPEGM.js +0 -28
- package/dist/cli/tools-CP2PEFRN.js +0 -34
- package/dist/cli/update-HZHZOU6C.js +0 -28
|
@@ -202,7 +202,7 @@ export const SDK_RELEASE = {
|
|
|
202
202
|
// getters keep their established compatibility behavior.
|
|
203
203
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
204
204
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
205
|
-
version: '0.3.
|
|
205
|
+
version: '0.3.397',
|
|
206
206
|
updateSummary:
|
|
207
207
|
'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
|
|
208
208
|
packageCapabilities: {
|
|
@@ -327,7 +327,7 @@ export function validateFixtureBehavior(
|
|
|
327
327
|
}
|
|
328
328
|
if (
|
|
329
329
|
error.failuresBeforeSuccess !== undefined &&
|
|
330
|
-
(error.status
|
|
330
|
+
(![429, 500, 502, 503, 504].includes(error.status) ||
|
|
331
331
|
typeof error.failuresBeforeSuccess !== 'number' ||
|
|
332
332
|
!Number.isSafeInteger(error.failuresBeforeSuccess) ||
|
|
333
333
|
error.failuresBeforeSuccess < 1 ||
|
|
@@ -337,7 +337,7 @@ export function validateFixtureBehavior(
|
|
|
337
337
|
ok: false,
|
|
338
338
|
error:
|
|
339
339
|
`fixtureBehavior.responseSamples[${index}].httpError.failuresBeforeSuccess ` +
|
|
340
|
-
'requires status 429 and an integer from 1 through 20.',
|
|
340
|
+
'requires status 429, 500, 502, 503, or 504 and an integer from 1 through 20.',
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
httpError = {
|
|
@@ -13,12 +13,13 @@ import {
|
|
|
13
13
|
reportSetupCompleted,
|
|
14
14
|
resolvePendingAuthClaimForResume,
|
|
15
15
|
statusBannerLine
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-WM2QEHZL.mjs";
|
|
17
|
+
import "./chunk-RNSWDKBM.mjs";
|
|
18
|
+
import "./chunk-2LDADJNO.mjs";
|
|
19
|
+
import "./chunk-YHPYUZZX.mjs";
|
|
19
20
|
import "./chunk-DLIRSHV6.mjs";
|
|
20
21
|
import "./chunk-NXGCO4JB.mjs";
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-MRXMMERY.mjs";
|
|
22
23
|
import "./chunk-WZYKRD7T.mjs";
|
|
23
24
|
import "./chunk-KRD6H754.mjs";
|
|
24
25
|
export {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkVTF4RRWJjs = require('./chunk-VTF4RRWJ.js');
|
|
17
|
+
require('./chunk-DQ65ZVHN.js');
|
|
18
|
+
require('./chunk-RYW4HPSM.js');
|
|
19
|
+
require('./chunk-Q2E4E4FJ.js');
|
|
20
|
+
require('./chunk-XNYIZMNQ.js');
|
|
21
|
+
require('./chunk-7P5AA3SN.js');
|
|
22
|
+
require('./chunk-IZ74ABSX.js');
|
|
23
|
+
require('./chunk-OG64RBAC.js');
|
|
24
|
+
require('./chunk-COGTRVWW.js');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkVTF4RRWJjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkVTF4RRWJjs.authStatusLine; exports.clearPendingClaim = _chunkVTF4RRWJjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkVTF4RRWJjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkVTF4RRWJjs.handleRegister; exports.handleStatus = _chunkVTF4RRWJjs.handleStatus; exports.handleWait = _chunkVTF4RRWJjs.handleWait; exports.httpJson = _chunkVTF4RRWJjs.httpJson; exports.readPendingAuthClaim = _chunkVTF4RRWJjs.readPendingAuthClaim; exports.readStatusBanner = _chunkVTF4RRWJjs.readStatusBanner; exports.registerAuthCommands = _chunkVTF4RRWJjs.registerAuthCommands; exports.reportSetupCompleted = _chunkVTF4RRWJjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkVTF4RRWJjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkVTF4RRWJjs.statusBannerLine;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkUVXBVUZQjs = require('./chunk-UVXBVUZQ.js');
|
|
6
6
|
require('./chunk-S6R3OX7B.js');
|
|
7
7
|
require('./chunk-UHNDVD3P.js');
|
|
8
8
|
require('./chunk-KXMNM4AQ.js');
|
|
@@ -13,16 +13,17 @@ require('./chunk-XDVT3GOM.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkDQ65ZVHNjs = require('./chunk-DQ65ZVHN.js');
|
|
17
|
+
require('./chunk-RYW4HPSM.js');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
var
|
|
21
|
+
var _chunkQ2E4E4FJjs = require('./chunk-Q2E4E4FJ.js');
|
|
21
22
|
require('./chunk-XNYIZMNQ.js');
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
25
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-IZ74ABSX.js');
|
|
26
27
|
require('./chunk-OG64RBAC.js');
|
|
27
28
|
require('./chunk-COGTRVWW.js');
|
|
28
29
|
|
|
@@ -37,7 +38,7 @@ var SUBSCRIPTION_CANCEL_PATH = "/api/v2/billing/subscription/cancel";
|
|
|
37
38
|
var BILLING_TOP_UP_PATH = "/api/v2/billing/top-up";
|
|
38
39
|
var DEFAULT_BALANCE_RECOVERY_CREDITS = 100;
|
|
39
40
|
function billingFailureFromError(error, options) {
|
|
40
|
-
if (error instanceof
|
|
41
|
+
if (error instanceof _chunkQ2E4E4FJjs.AuthError) {
|
|
41
42
|
return {
|
|
42
43
|
exitCode: 3,
|
|
43
44
|
code: "AUTH_ERROR",
|
|
@@ -71,7 +72,7 @@ function reportBillingFailure(failure, options) {
|
|
|
71
72
|
if (failure.next) {
|
|
72
73
|
textLines.push(`Next: ${failure.next}`);
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
75
76
|
{
|
|
76
77
|
ok: false,
|
|
77
78
|
exitCode: failure.exitCode,
|
|
@@ -92,7 +93,7 @@ function parseTopUpCredits(raw) {
|
|
|
92
93
|
return parsed;
|
|
93
94
|
}
|
|
94
95
|
function topUpIdempotencyKey(raw) {
|
|
95
|
-
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` :
|
|
96
|
+
return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkUVXBVUZQjs.requireBillingIdempotencyKey.call(void 0, raw);
|
|
96
97
|
}
|
|
97
98
|
function targetBillingIdempotencyKey(raw) {
|
|
98
99
|
return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
|
|
@@ -129,7 +130,7 @@ function apiErrorCode(error) {
|
|
|
129
130
|
return _nullishCoalesce(error.code, () => ( "BILLING_API_ERROR"));
|
|
130
131
|
}
|
|
131
132
|
function billingTopUpFailureFromError(error, input) {
|
|
132
|
-
if (error instanceof
|
|
133
|
+
if (error instanceof _chunkQ2E4E4FJjs.AuthError || error instanceof _chunkQ2E4E4FJjs.ConfigError) {
|
|
133
134
|
return {
|
|
134
135
|
exitCode: 3,
|
|
135
136
|
code: "AUTH_ERROR",
|
|
@@ -298,7 +299,7 @@ function defaultLedgerExportPath() {
|
|
|
298
299
|
);
|
|
299
300
|
}
|
|
300
301
|
async function handleBalance(options) {
|
|
301
|
-
const { http } =
|
|
302
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
302
303
|
const payload = await http.get(
|
|
303
304
|
"/api/v2/billing/balance"
|
|
304
305
|
);
|
|
@@ -366,7 +367,7 @@ async function handleBalance(options) {
|
|
|
366
367
|
...options.verbose ? detail : [],
|
|
367
368
|
...lines.slice(1)
|
|
368
369
|
];
|
|
369
|
-
|
|
370
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
370
371
|
{
|
|
371
372
|
...payload,
|
|
372
373
|
...recovery ? { recovery } : {},
|
|
@@ -390,7 +391,7 @@ function quoteShellArgument(value) {
|
|
|
390
391
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
391
392
|
}
|
|
392
393
|
async function handleUsage(options) {
|
|
393
|
-
const { http } =
|
|
394
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
394
395
|
const params = new URLSearchParams();
|
|
395
396
|
if (options.requestId !== void 0) {
|
|
396
397
|
const requestId = options.requestId.trim();
|
|
@@ -471,7 +472,7 @@ async function handleUsage(options) {
|
|
|
471
472
|
"No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
|
|
472
473
|
] : []
|
|
473
474
|
];
|
|
474
|
-
|
|
475
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
475
476
|
{
|
|
476
477
|
...payload,
|
|
477
478
|
recent: {
|
|
@@ -485,7 +486,7 @@ async function handleUsage(options) {
|
|
|
485
486
|
);
|
|
486
487
|
}
|
|
487
488
|
async function handleLimit(options) {
|
|
488
|
-
const { http } =
|
|
489
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
489
490
|
const payload = await http.get(
|
|
490
491
|
"/api/v2/billing/limit"
|
|
491
492
|
);
|
|
@@ -493,7 +494,7 @@ async function handleLimit(options) {
|
|
|
493
494
|
`Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
|
|
494
495
|
"Enforcement: checked before new calls; in-flight work can exceed the cap."
|
|
495
496
|
] : ["Monthly usage cap: off"];
|
|
496
|
-
|
|
497
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
497
498
|
{
|
|
498
499
|
...payload,
|
|
499
500
|
render: { sections: [{ title: "billing limit", lines }] }
|
|
@@ -502,12 +503,12 @@ async function handleLimit(options) {
|
|
|
502
503
|
);
|
|
503
504
|
}
|
|
504
505
|
async function handleSetLimit(credits, options) {
|
|
505
|
-
const { http } =
|
|
506
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
506
507
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
507
508
|
method: "PUT",
|
|
508
509
|
body: { monthly_credits_limit: Number.parseInt(credits, 10) }
|
|
509
510
|
});
|
|
510
|
-
|
|
511
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
511
512
|
{
|
|
512
513
|
...payload,
|
|
513
514
|
render: {
|
|
@@ -523,11 +524,11 @@ async function handleSetLimit(credits, options) {
|
|
|
523
524
|
);
|
|
524
525
|
}
|
|
525
526
|
async function handleLimitOff(options) {
|
|
526
|
-
const { http } =
|
|
527
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
527
528
|
const payload = await http.request("/api/v2/billing/limit", {
|
|
528
529
|
method: "DELETE"
|
|
529
530
|
});
|
|
530
|
-
|
|
531
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
531
532
|
{
|
|
532
533
|
...payload,
|
|
533
534
|
render: {
|
|
@@ -547,7 +548,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
547
548
|
let initialized = false;
|
|
548
549
|
let pageNumber = 0;
|
|
549
550
|
console.error(`Exporting billing ledger to ${outputPath}`);
|
|
550
|
-
for await (const entries of
|
|
551
|
+
for await (const entries of _chunkUVXBVUZQjs.iterateCursorPages.call(void 0, async (cursor) => {
|
|
551
552
|
pageNumber += 1;
|
|
552
553
|
console.error(
|
|
553
554
|
`Fetching page ${pageNumber}; ${summary.row_count} rows written.`
|
|
@@ -586,7 +587,7 @@ async function exportLedger(http, outputPath, options) {
|
|
|
586
587
|
return summary;
|
|
587
588
|
}
|
|
588
589
|
async function handleHistory(options) {
|
|
589
|
-
const { http } =
|
|
590
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
590
591
|
const windows = {
|
|
591
592
|
"1d": 86400,
|
|
592
593
|
"1w": 604800,
|
|
@@ -598,10 +599,10 @@ async function handleHistory(options) {
|
|
|
598
599
|
process.cwd(),
|
|
599
600
|
"deepline",
|
|
600
601
|
"data",
|
|
601
|
-
|
|
602
|
+
_chunkDQ65ZVHNjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
|
|
602
603
|
);
|
|
603
604
|
const summary = await exportLedger(http, outputPath, { sinceAt });
|
|
604
|
-
|
|
605
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
605
606
|
{
|
|
606
607
|
output_path: outputPath,
|
|
607
608
|
row_count: summary.row_count,
|
|
@@ -638,14 +639,14 @@ async function handleLedgerExportAll(options) {
|
|
|
638
639
|
);
|
|
639
640
|
return;
|
|
640
641
|
}
|
|
641
|
-
const { http } =
|
|
642
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
642
643
|
const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
|
|
643
644
|
const summary = await exportLedger(http, outputPath, {
|
|
644
645
|
sinceAt,
|
|
645
646
|
runId: options.runId,
|
|
646
647
|
operation: options.operation
|
|
647
648
|
});
|
|
648
|
-
|
|
649
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
649
650
|
{
|
|
650
651
|
output_path: outputPath,
|
|
651
652
|
row_count: summary.row_count,
|
|
@@ -684,7 +685,7 @@ function targetPlanLine(plan) {
|
|
|
684
685
|
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"}`;
|
|
685
686
|
}
|
|
686
687
|
async function handlePlans(options) {
|
|
687
|
-
const client = new (0,
|
|
688
|
+
const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
|
|
688
689
|
const payload = await client.billing.targetPlans();
|
|
689
690
|
const listedCurrentPlan = payload.plans.find(
|
|
690
691
|
(plan) => plan.sku === payload.current_plan_sku
|
|
@@ -697,8 +698,8 @@ async function handlePlans(options) {
|
|
|
697
698
|
...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
|
|
698
699
|
"Change plan: deepline billing change-plan <plan_sku>"
|
|
699
700
|
];
|
|
700
|
-
const legacyPayload =
|
|
701
|
-
|
|
701
|
+
const legacyPayload = _chunkDQ65ZVHNjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
|
|
702
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
702
703
|
{
|
|
703
704
|
..._nullishCoalesce(legacyPayload, () => ( payload)),
|
|
704
705
|
...legacyPayload ? { target_billing: payload } : {},
|
|
@@ -708,7 +709,7 @@ async function handlePlans(options) {
|
|
|
708
709
|
);
|
|
709
710
|
}
|
|
710
711
|
async function handleSubscribe(planVersionId, options) {
|
|
711
|
-
const { http } =
|
|
712
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
712
713
|
const payload = await http.request(
|
|
713
714
|
"/api/v2/billing/subscription/checkout",
|
|
714
715
|
{
|
|
@@ -717,8 +718,8 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
717
718
|
}
|
|
718
719
|
);
|
|
719
720
|
const url = String(payload.checkout_url || "");
|
|
720
|
-
if (!options.json && options.open !== false && url)
|
|
721
|
-
|
|
721
|
+
if (!options.json && options.open !== false && url) _chunkDQ65ZVHNjs.openInBrowser.call(void 0, url);
|
|
722
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
722
723
|
{
|
|
723
724
|
...payload,
|
|
724
725
|
render: {
|
|
@@ -734,7 +735,7 @@ async function handleSubscribe(planVersionId, options) {
|
|
|
734
735
|
);
|
|
735
736
|
}
|
|
736
737
|
async function handleSubscriptionStatus(options) {
|
|
737
|
-
const client = new (0,
|
|
738
|
+
const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
|
|
738
739
|
const payload = await client.billing.subscription.status();
|
|
739
740
|
const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
|
|
740
741
|
const lines = [
|
|
@@ -754,7 +755,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
754
755
|
],
|
|
755
756
|
`Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
|
|
756
757
|
];
|
|
757
|
-
|
|
758
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
758
759
|
{
|
|
759
760
|
...payload,
|
|
760
761
|
render: { sections: [{ title: "billing subscription", lines }] }
|
|
@@ -763,7 +764,7 @@ async function handleSubscriptionStatus(options) {
|
|
|
763
764
|
);
|
|
764
765
|
}
|
|
765
766
|
async function handleSubscriptionCancel(options) {
|
|
766
|
-
const client = new (0,
|
|
767
|
+
const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
|
|
767
768
|
const action = options.undo ? "undo_cancel" : "cancel";
|
|
768
769
|
if (options.dryRun) {
|
|
769
770
|
const status = await client.billing.subscription.status();
|
|
@@ -780,7 +781,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
780
781
|
return;
|
|
781
782
|
}
|
|
782
783
|
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.";
|
|
783
|
-
|
|
784
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
784
785
|
{
|
|
785
786
|
ok: true,
|
|
786
787
|
dry_run: true,
|
|
@@ -835,7 +836,7 @@ async function handleSubscriptionCancel(options) {
|
|
|
835
836
|
"Remaining credits are yours to keep \u2014 cancellation never removes credits.",
|
|
836
837
|
"Undo with: deepline billing subscription cancel --undo"
|
|
837
838
|
];
|
|
838
|
-
|
|
839
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
839
840
|
{
|
|
840
841
|
ok: true,
|
|
841
842
|
...result,
|
|
@@ -889,7 +890,7 @@ async function handleInvoices(options) {
|
|
|
889
890
|
return;
|
|
890
891
|
}
|
|
891
892
|
}
|
|
892
|
-
const client = new (0,
|
|
893
|
+
const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
|
|
893
894
|
let payload;
|
|
894
895
|
try {
|
|
895
896
|
payload = await client.billing.invoices.list(
|
|
@@ -918,7 +919,7 @@ async function handleInvoices(options) {
|
|
|
918
919
|
url: entry.url
|
|
919
920
|
}))
|
|
920
921
|
} : { ...payload, count: entries.length };
|
|
921
|
-
|
|
922
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
922
923
|
{
|
|
923
924
|
...envelope,
|
|
924
925
|
render: { sections: [{ title: "billing invoices", lines }] }
|
|
@@ -927,7 +928,7 @@ async function handleInvoices(options) {
|
|
|
927
928
|
);
|
|
928
929
|
}
|
|
929
930
|
async function handleCheckout(options) {
|
|
930
|
-
const { http } =
|
|
931
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
931
932
|
const payload = await http.post(
|
|
932
933
|
"/api/v2/billing/checkout",
|
|
933
934
|
{
|
|
@@ -937,8 +938,8 @@ async function handleCheckout(options) {
|
|
|
937
938
|
}
|
|
938
939
|
);
|
|
939
940
|
const url = String(payload.url || payload.checkout_url || "");
|
|
940
|
-
if (!options.json && !options.noOpen && url)
|
|
941
|
-
|
|
941
|
+
if (!options.json && !options.noOpen && url) _chunkDQ65ZVHNjs.openInBrowser.call(void 0, url);
|
|
942
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
942
943
|
{
|
|
943
944
|
...payload,
|
|
944
945
|
render: {
|
|
@@ -983,7 +984,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
983
984
|
return;
|
|
984
985
|
}
|
|
985
986
|
if (options.dryRun) {
|
|
986
|
-
|
|
987
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
987
988
|
{
|
|
988
989
|
ok: true,
|
|
989
990
|
dry_run: true,
|
|
@@ -1013,7 +1014,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1013
1014
|
);
|
|
1014
1015
|
return;
|
|
1015
1016
|
}
|
|
1016
|
-
const client = new (0,
|
|
1017
|
+
const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
|
|
1017
1018
|
let payload;
|
|
1018
1019
|
try {
|
|
1019
1020
|
payload = await client.billing.topUpWithReceipt({
|
|
@@ -1030,7 +1031,7 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1030
1031
|
return;
|
|
1031
1032
|
}
|
|
1032
1033
|
if (payload.status === "pending") {
|
|
1033
|
-
|
|
1034
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1034
1035
|
{
|
|
1035
1036
|
ok: true,
|
|
1036
1037
|
...payload,
|
|
@@ -1094,17 +1095,17 @@ async function handleTopUp(creditsRaw, options) {
|
|
|
1094
1095
|
]
|
|
1095
1096
|
}
|
|
1096
1097
|
};
|
|
1097
|
-
|
|
1098
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
|
|
1098
1099
|
json: options.json
|
|
1099
1100
|
});
|
|
1100
1101
|
}
|
|
1101
1102
|
async function handleTargetStatus(options) {
|
|
1102
|
-
const client = new (0,
|
|
1103
|
+
const client = new (0, _chunkUVXBVUZQjs.DeeplineClient)();
|
|
1103
1104
|
const payload = await client.billing.targetStatus();
|
|
1104
1105
|
const balanceCommand = "deepline billing balance";
|
|
1105
1106
|
const recentChargesCommand = "deepline billing usage --limit 5";
|
|
1106
1107
|
const exactChargeCommand = "deepline billing usage --request-id <job_id>";
|
|
1107
|
-
|
|
1108
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1108
1109
|
{
|
|
1109
1110
|
ok: true,
|
|
1110
1111
|
...payload,
|
|
@@ -1134,8 +1135,8 @@ async function handleTargetStatus(options) {
|
|
|
1134
1135
|
);
|
|
1135
1136
|
}
|
|
1136
1137
|
async function handleEntitlements(options) {
|
|
1137
|
-
const payload = await new (0,
|
|
1138
|
-
|
|
1138
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.entitlements();
|
|
1139
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1139
1140
|
{
|
|
1140
1141
|
ok: true,
|
|
1141
1142
|
...payload,
|
|
@@ -1160,7 +1161,7 @@ async function handleEntitlements(options) {
|
|
|
1160
1161
|
);
|
|
1161
1162
|
}
|
|
1162
1163
|
async function handleAutoRechargeStatus(options) {
|
|
1163
|
-
const payload = await new (0,
|
|
1164
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.autoRecharge.get();
|
|
1164
1165
|
const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
|
|
1165
1166
|
const lines = [
|
|
1166
1167
|
`State: ${state}`,
|
|
@@ -1170,7 +1171,7 @@ async function handleAutoRechargeStatus(options) {
|
|
|
1170
1171
|
`Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
|
|
1171
1172
|
] : []
|
|
1172
1173
|
];
|
|
1173
|
-
|
|
1174
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1174
1175
|
{
|
|
1175
1176
|
ok: true,
|
|
1176
1177
|
...payload,
|
|
@@ -1219,7 +1220,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1219
1220
|
}
|
|
1220
1221
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1221
1222
|
if (options.dryRun) {
|
|
1222
|
-
|
|
1223
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1223
1224
|
{
|
|
1224
1225
|
ok: true,
|
|
1225
1226
|
dry_run: true,
|
|
@@ -1240,7 +1241,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1240
1241
|
);
|
|
1241
1242
|
return;
|
|
1242
1243
|
}
|
|
1243
|
-
const payload = await new (0,
|
|
1244
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1244
1245
|
enabled: true,
|
|
1245
1246
|
thresholdCredits,
|
|
1246
1247
|
refillToCredits,
|
|
@@ -1248,7 +1249,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1248
1249
|
...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
|
|
1249
1250
|
idempotencyKey
|
|
1250
1251
|
});
|
|
1251
|
-
|
|
1252
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1252
1253
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1253
1254
|
{ json: options.json }
|
|
1254
1255
|
);
|
|
@@ -1256,7 +1257,7 @@ async function handleAutoRechargeSet(options) {
|
|
|
1256
1257
|
async function handleAutoRechargeOff(options) {
|
|
1257
1258
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1258
1259
|
if (options.dryRun) {
|
|
1259
|
-
|
|
1260
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1260
1261
|
{
|
|
1261
1262
|
ok: true,
|
|
1262
1263
|
dry_run: true,
|
|
@@ -1271,11 +1272,11 @@ async function handleAutoRechargeOff(options) {
|
|
|
1271
1272
|
);
|
|
1272
1273
|
return;
|
|
1273
1274
|
}
|
|
1274
|
-
const payload = await new (0,
|
|
1275
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.autoRecharge.update({
|
|
1275
1276
|
enabled: false,
|
|
1276
1277
|
idempotencyKey
|
|
1277
1278
|
});
|
|
1278
|
-
|
|
1279
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1279
1280
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1280
1281
|
{ json: options.json }
|
|
1281
1282
|
);
|
|
@@ -1294,11 +1295,11 @@ async function handleBuyCredits(creditsRaw, options) {
|
|
|
1294
1295
|
return;
|
|
1295
1296
|
}
|
|
1296
1297
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1297
|
-
const payload = await new (0,
|
|
1298
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.purchaseCredits({
|
|
1298
1299
|
credits,
|
|
1299
1300
|
idempotencyKey
|
|
1300
1301
|
});
|
|
1301
|
-
|
|
1302
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1302
1303
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1303
1304
|
{ json: options.json }
|
|
1304
1305
|
);
|
|
@@ -1334,7 +1335,7 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1334
1335
|
return;
|
|
1335
1336
|
}
|
|
1336
1337
|
if (options.dryRun) {
|
|
1337
|
-
|
|
1338
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1338
1339
|
{
|
|
1339
1340
|
ok: true,
|
|
1340
1341
|
dry_run: true,
|
|
@@ -1347,12 +1348,12 @@ async function handleTopUpRecover(creditsRaw, options) {
|
|
|
1347
1348
|
);
|
|
1348
1349
|
return;
|
|
1349
1350
|
}
|
|
1350
|
-
const payload = await new (0,
|
|
1351
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.recoverCreditPurchase({
|
|
1351
1352
|
credits,
|
|
1352
1353
|
orgId: options.orgId,
|
|
1353
1354
|
idempotencyKey: options.idempotencyKey
|
|
1354
1355
|
});
|
|
1355
|
-
|
|
1356
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1356
1357
|
{ ok: true, idempotency_key: options.idempotencyKey, ...payload },
|
|
1357
1358
|
{ json: options.json }
|
|
1358
1359
|
);
|
|
@@ -1372,37 +1373,37 @@ async function handleTargetPlan(planSku, options) {
|
|
|
1372
1373
|
return;
|
|
1373
1374
|
}
|
|
1374
1375
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1375
|
-
const payload = await new (0,
|
|
1376
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.transitionPlan({
|
|
1376
1377
|
action: "start_or_change",
|
|
1377
1378
|
targetPlanSku: planSku,
|
|
1378
1379
|
...options.billingEmail ? { billingEmail: options.billingEmail } : {},
|
|
1379
1380
|
idempotencyKey
|
|
1380
1381
|
});
|
|
1381
|
-
|
|
1382
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1382
1383
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1383
1384
|
{ json: options.json }
|
|
1384
1385
|
);
|
|
1385
1386
|
}
|
|
1386
1387
|
async function handleTargetPlanCancellation(options) {
|
|
1387
1388
|
const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
|
|
1388
|
-
const payload = await new (0,
|
|
1389
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.transitionPlan({
|
|
1389
1390
|
action: options.undo ? "undo_cancel" : "cancel",
|
|
1390
1391
|
idempotencyKey
|
|
1391
1392
|
});
|
|
1392
|
-
|
|
1393
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1393
1394
|
{ ok: true, idempotency_key: idempotencyKey, ...payload },
|
|
1394
1395
|
{ json: options.json }
|
|
1395
1396
|
);
|
|
1396
1397
|
}
|
|
1397
1398
|
async function handleTargetPortal(options) {
|
|
1398
|
-
const payload = await new (0,
|
|
1399
|
+
const payload = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.portalSession(
|
|
1399
1400
|
options.billingAddress ? { flow: "customer_update" } : void 0
|
|
1400
1401
|
);
|
|
1401
|
-
if (!options.json && !options.noOpen)
|
|
1402
|
-
|
|
1402
|
+
if (!options.json && !options.noOpen) _chunkDQ65ZVHNjs.openInBrowser.call(void 0, payload.url);
|
|
1403
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
|
|
1403
1404
|
}
|
|
1404
1405
|
async function handleRedeemCode(code, options) {
|
|
1405
|
-
const { http } =
|
|
1406
|
+
const { http } = _chunkDQ65ZVHNjs.getAuthedHttpClient.call(void 0, );
|
|
1406
1407
|
const payload = await http.post(
|
|
1407
1408
|
"/api/v2/billing/checkout",
|
|
1408
1409
|
{
|
|
@@ -1410,8 +1411,8 @@ async function handleRedeemCode(code, options) {
|
|
|
1410
1411
|
}
|
|
1411
1412
|
);
|
|
1412
1413
|
const url = String(payload.url || payload.checkout_url || "");
|
|
1413
|
-
if (!options.json && !options.noOpen && url)
|
|
1414
|
-
|
|
1414
|
+
if (!options.json && !options.noOpen && url) _chunkDQ65ZVHNjs.openInBrowser.call(void 0, url);
|
|
1415
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
1415
1416
|
{
|
|
1416
1417
|
...payload,
|
|
1417
1418
|
render: {
|
|
@@ -1469,14 +1470,14 @@ Examples:
|
|
|
1469
1470
|
if (!Number.isSafeInteger(quantity) || quantity <= 0) {
|
|
1470
1471
|
throw new Error("--quantity must be a positive safe integer.");
|
|
1471
1472
|
}
|
|
1472
|
-
const quote = await new (0,
|
|
1473
|
+
const quote = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.quote({
|
|
1473
1474
|
quantity,
|
|
1474
1475
|
sandbox_runtime: {
|
|
1475
1476
|
timeout: options.sandboxTimeout,
|
|
1476
1477
|
size: "standard"
|
|
1477
1478
|
}
|
|
1478
1479
|
});
|
|
1479
|
-
|
|
1480
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, quote, {
|
|
1480
1481
|
json: options.json,
|
|
1481
1482
|
text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
|
|
1482
1483
|
${quote.explanation}
|
|
@@ -1707,8 +1708,8 @@ Examples:
|
|
|
1707
1708
|
new (0, _commander.Command)("trigger").description(
|
|
1708
1709
|
"Evaluate capped automatic recharge and resume any pending purchase."
|
|
1709
1710
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
1710
|
-
const result = await new (0,
|
|
1711
|
-
|
|
1711
|
+
const result = await new (0, _chunkUVXBVUZQjs.DeeplineClient)().billing.autoRecharge.trigger();
|
|
1712
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
|
|
1712
1713
|
})
|
|
1713
1714
|
);
|
|
1714
1715
|
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(
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DeeplineClient,
|
|
3
3
|
iterateCursorPages,
|
|
4
4
|
requireBillingIdempotencyKey
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J7ABTQQ7.mjs";
|
|
6
6
|
import "./chunk-6IKARAYD.mjs";
|
|
7
7
|
import "./chunk-JI2B4RZP.mjs";
|
|
8
8
|
import "./chunk-EIMG75BT.mjs";
|
|
@@ -13,16 +13,17 @@ import {
|
|
|
13
13
|
openInBrowser,
|
|
14
14
|
printCommandEnvelope,
|
|
15
15
|
shouldEmitJson
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RNSWDKBM.mjs";
|
|
17
|
+
import "./chunk-2LDADJNO.mjs";
|
|
17
18
|
import {
|
|
18
19
|
AuthError,
|
|
19
20
|
ConfigError
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YHPYUZZX.mjs";
|
|
21
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
22
23
|
import {
|
|
23
24
|
DeeplineError
|
|
24
25
|
} from "./chunk-NXGCO4JB.mjs";
|
|
25
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-MRXMMERY.mjs";
|
|
26
27
|
import "./chunk-WZYKRD7T.mjs";
|
|
27
28
|
import "./chunk-KRD6H754.mjs";
|
|
28
29
|
|