deepline 0.3.508 → 0.3.510
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/monitors/org-monitor-limits.ts +7 -2
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/db-session-plan.ts +47 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +94 -43
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +111 -27
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +79 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +80 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-transient-retry.ts +571 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -0
- package/dist/cli/auth-S2Z5YMU3.js +43 -0
- package/dist/cli/{auth-2URIN52G.mjs → auth-USS2W3UV.mjs} +5 -5
- package/dist/cli/{billing-IW23GSR5.mjs → billing-JCUWM5XB.mjs} +7 -7
- package/dist/cli/{billing-R2HY2ZVJ.js → billing-LQQHU443.js} +82 -82
- package/dist/cli/{chunk-7PELFO3C.js → chunk-2JXEZAJF.js} +21 -21
- package/dist/cli/chunk-3LXU22UZ.js +77 -0
- package/dist/cli/{chunk-74UO7THC.js → chunk-4NJK6P5T.js} +4 -4
- package/dist/cli/{chunk-FXKKFM7J.js → chunk-4ZIIS6KG.js} +9 -9
- package/dist/cli/{chunk-63MCLOR2.mjs → chunk-563HM4D2.mjs} +6 -6
- package/dist/cli/{chunk-XSOLA2ED.mjs → chunk-5DU7RXDW.mjs} +4 -4
- package/dist/cli/{chunk-OWH7SSBO.mjs → chunk-5MYXW6M6.mjs} +2 -2
- package/dist/cli/{chunk-3BZ74K27.js → chunk-5N2HFB3G.js} +16 -16
- package/dist/cli/{chunk-2YOM5J3G.js → chunk-63DHG7BM.js} +26 -26
- package/dist/cli/{chunk-P7GOQTUN.js → chunk-6AL2VF3E.js} +14 -14
- package/dist/cli/{chunk-QBZECLNG.mjs → chunk-7BF4R26M.mjs} +3 -3
- package/dist/cli/{chunk-JRHMPZJX.js → chunk-7VQKU6MS.js} +7 -7
- package/dist/cli/{chunk-3C6VBHNW.mjs → chunk-7VT7RMZ2.mjs} +2 -2
- package/dist/cli/{chunk-M37I4A2Z.js → chunk-ASBWPRBN.js} +16 -16
- package/dist/cli/{chunk-3ZNPIJX6.js → chunk-B2T7PBS6.js} +41 -41
- package/dist/cli/{chunk-NC2FIUPX.mjs → chunk-B2U3LVSO.mjs} +1 -1
- package/dist/cli/{chunk-RNZQ7RDW.mjs → chunk-B6Q6BHSY.mjs} +2 -2
- package/dist/cli/{chunk-IZZ7FFWP.js → chunk-BPGFNVH2.js} +44 -44
- package/dist/cli/{chunk-2PYFXXYA.mjs → chunk-CLV4T5FN.mjs} +2 -2
- package/dist/cli/{chunk-JEB6BNIU.mjs → chunk-DEPBCRKG.mjs} +15 -4
- package/dist/cli/{chunk-DZ7JCRAL.mjs → chunk-DMF56C6D.mjs} +2 -2
- package/dist/cli/{chunk-RWXHMG6F.js → chunk-EEQ2QQOH.js} +21 -10
- package/dist/cli/{chunk-UDH3YMBI.mjs → chunk-EJ57CA2L.mjs} +1 -1
- package/dist/cli/{chunk-JYNHHO3J.js → chunk-F6IXWFPF.js} +6 -6
- package/dist/cli/{chunk-DWV7KM6H.mjs → chunk-FFPLCSTZ.mjs} +10 -10
- package/dist/cli/{chunk-VXNL4HLE.mjs → chunk-FND6GZZ4.mjs} +5 -5
- package/dist/cli/{chunk-D73YB5NQ.js → chunk-HC27PYJM.js} +2 -2
- package/dist/cli/{chunk-FRT5MFLF.mjs → chunk-HOKOJGQW.mjs} +1 -1
- package/dist/cli/{chunk-AYNO4VFW.js → chunk-JNECQ5QF.js} +11 -11
- package/dist/cli/chunk-JVEU6MXD.mjs +77 -0
- package/dist/cli/{chunk-ZLIAUR2E.js → chunk-JY73USD7.js} +2 -2
- package/dist/cli/{chunk-K4RME7AV.mjs → chunk-KXSOZYCS.mjs} +1 -1
- package/dist/cli/{chunk-ESVK4Z7S.js → chunk-LF3FF2B2.js} +1 -1
- package/dist/cli/{chunk-63BGKU3A.js → chunk-N7FV7OM3.js} +96 -96
- package/dist/cli/{chunk-Q4I5YKN4.mjs → chunk-OEG6VCK4.mjs} +1 -1
- package/dist/cli/{chunk-2LY42EZJ.mjs → chunk-PQ56GE55.mjs} +1 -1
- package/dist/cli/{chunk-GRGZKXLL.mjs → chunk-Q5EJO4TE.mjs} +5 -5
- package/dist/cli/{chunk-N5HRBS4K.js → chunk-QRQBKLOM.js} +3 -3
- package/dist/cli/{chunk-4DAR2GYV.mjs → chunk-RHKFNEV2.mjs} +2 -2
- package/dist/cli/{chunk-C6TP4DR3.mjs → chunk-UV524JZ5.mjs} +1 -1
- package/dist/cli/{chunk-KSQO32L5.mjs → chunk-V6DLYRSO.mjs} +1 -1
- package/dist/cli/{chunk-J3LJ37WD.js → chunk-VPJSQMWQ.js} +3 -3
- package/dist/cli/{chunk-3XBI4KZM.mjs → chunk-WAOLTP6R.mjs} +2 -2
- package/dist/cli/{chunk-JXYVBF5L.mjs → chunk-WC5754QJ.mjs} +5 -5
- package/dist/cli/{chunk-RUD77W2Y.js → chunk-XJZU7KO4.js} +5 -5
- package/dist/cli/{chunk-GDHLL5EQ.js → chunk-XK3AJFYQ.js} +35 -10
- package/dist/cli/{chunk-JUYW6TSU.js → chunk-XL4FFVWL.js} +7 -7
- package/dist/cli/{chunk-ZL2ME3UT.js → chunk-XRLE2FPE.js} +6 -6
- package/dist/cli/{chunk-R4S2AK3Q.js → chunk-YDALHHUC.js} +53 -53
- package/dist/cli/{chunk-IF242BIJ.mjs → chunk-YYUVOUEH.mjs} +5 -5
- package/dist/cli/{chunk-TVADI7K5.js → chunk-ZCYV6MZH.js} +5 -5
- package/dist/cli/{chunk-AFSYNOG4.mjs → chunk-ZRACZKEE.mjs} +35 -10
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-CMJSMC2I.mjs → csv-MTFVEDPU.mjs} +4 -4
- package/dist/cli/{csv-DPDO6BU6.js → csv-UXFQZLZM.js} +13 -13
- package/dist/cli/{db-SL3EFN6V.mjs → db-3WPUYCCI.mjs} +6 -6
- package/dist/cli/{db-PPPKNTT5.js → db-RGWT6B7K.js} +27 -27
- package/dist/cli/describe-LNCLA2LA.js +50 -0
- package/dist/cli/{describe-XLN33FJX.mjs → describe-XJY5654F.mjs} +18 -18
- package/dist/cli/{executions-6YDTV2J6.js → executions-IWTALFNB.js} +8 -8
- package/dist/cli/{executions-O6Z5B5NY.mjs → executions-PDE4V5YH.mjs} +6 -6
- package/dist/cli/{feedback-DP7LPWAD.mjs → feedback-BMOVTPC4.mjs} +11 -7
- package/dist/cli/{feedback-BZ434BN4.js → feedback-I72P4XZS.js} +15 -11
- package/dist/cli/{git-MI7E5WGL.mjs → git-QJG3EF4P.mjs} +5 -5
- package/dist/cli/git-QWH7SPGF.js +25 -0
- package/dist/cli/index.js +173 -156
- package/dist/cli/index.mjs +76 -59
- package/dist/cli/{legacy-noops-65WNPQVZ.js → legacy-noops-5P75CQC7.js} +9 -8
- package/dist/cli/{legacy-noops-6VYXF2MG.mjs → legacy-noops-MZ45GDMK.mjs} +6 -5
- package/dist/cli/{monitors-BYUCTVSC.js → monitors-5PHQZDZM.js} +100 -100
- package/dist/cli/{monitors-Y7I5ZVCN.mjs → monitors-VIOBUG2X.mjs} +7 -7
- package/dist/cli/{org-F2ASWTFY.js → org-B5LDVP2P.js} +72 -72
- package/dist/cli/{org-IW3YD6JZ.mjs → org-D5RTFJNY.mjs} +6 -6
- package/dist/cli/{pages-X6HLRQNV.js → pages-BUJYG3JL.js} +18 -18
- package/dist/cli/{pages-H2CXNIDB.mjs → pages-XWZL3YV2.mjs} +6 -6
- package/dist/cli/{play-LLEEDXRX.mjs → play-OSXLGCLZ.mjs} +93 -54
- package/dist/cli/{play-H2EM7DTI.js → play-SEC3EE7H.js} +468 -429
- package/dist/cli/{providers-BZR5JONN.mjs → providers-ENSURIW6.mjs} +6 -6
- package/dist/cli/{providers-6R2SPOEV.js → providers-RQPUASLI.js} +9 -9
- package/dist/cli/{quickstart-KVES7R6D.mjs → quickstart-HJTK6XWI.mjs} +4 -4
- package/dist/cli/{quickstart-PW7ONQUH.js → quickstart-XDTU4MAT.js} +6 -6
- package/dist/cli/{run-HVUQROBE.js → run-GX2SU5AT.js} +41 -41
- package/dist/cli/{run-RDI3Q6GO.mjs → run-ZMWSQAR2.mjs} +23 -23
- package/dist/cli/search-7WPABWYO.js +33 -0
- package/dist/cli/{search-3TJ24CUF.mjs → search-DZHZBHWT.mjs} +8 -8
- package/dist/cli/{search-output-JHT553SL.js → search-output-3JVZERNV.js} +6 -6
- package/dist/cli/{search-output-Y57OBQXX.mjs → search-output-MNHAR754.mjs} +4 -4
- package/dist/cli/{secrets-OZK7GRD5.mjs → secrets-VALVNVXB.mjs} +6 -6
- package/dist/cli/{secrets-U5JHWAXU.js → secrets-WO2LMDQ2.js} +15 -15
- package/dist/cli/sessions-2IA2DGWO.js +18 -0
- package/dist/cli/{sessions-D6DSEQ2T.mjs → sessions-EPYCH3AY.mjs} +6 -5
- package/dist/cli/{settings-DLPEHYGS.js → settings-OSF4O5HM.js} +109 -82
- package/dist/cli/{settings-ITLSLT2R.mjs → settings-W2ABZUD4.mjs} +39 -12
- package/dist/cli/{setup-Y5ZYEC6U.js → setup-DCXNQG6R.js} +50 -50
- package/dist/cli/{setup-XTYLF2CF.mjs → setup-XI2ERSMQ.mjs} +10 -10
- package/dist/cli/skills-QMD2WARJ.js +37 -0
- package/dist/cli/{skills-C4WCAVII.mjs → skills-ZO4AH2YR.mjs} +8 -8
- package/dist/cli/tools-53E6GBQU.js +57 -0
- package/dist/cli/{tools-ZESAPVOW.mjs → tools-FTECXZYA.mjs} +17 -17
- package/dist/cli/update-PPPNR6J5.js +35 -0
- package/dist/cli/{update-4PCKVDCS.mjs → update-WPFZO2JE.mjs} +10 -10
- package/dist/cli/{workflow-42CL4TVR.mjs → workflow-7X75IP3D.mjs} +7 -7
- package/dist/cli/{workflow-XXKXMPTI.js → workflow-PKMU33LV.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +105 -102
- 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-LFU77QDI.js +0 -43
- package/dist/cli/describe-JKZ67X3E.js +0 -50
- package/dist/cli/git-U5N6CTML.js +0 -25
- package/dist/cli/search-NKEEGLY6.js +0 -33
- package/dist/cli/sessions-PNMYAJNB.js +0 -17
- package/dist/cli/skills-K6FVG3BX.js +0 -37
- package/dist/cli/tools-LSALTN7I.js +0 -57
- package/dist/cli/update-P5KGNFNL.js +0 -35
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return 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; } var _class; var _class2;require('./chunk-I5YZLGMG.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkZCYV6MZHjs = require('./chunk-ZCYV6MZH.js');
|
|
5
|
+
require('./chunk-7VQKU6MS.js');
|
|
6
6
|
require('./chunk-E4CABWXL.js');
|
|
7
7
|
require('./chunk-RNSHCJME.js');
|
|
8
8
|
require('./chunk-NMU3VR5U.js');
|
|
@@ -17,15 +17,15 @@ require('./chunk-UNEMDKXN.js');
|
|
|
17
17
|
var _chunkIF75RD6Ujs = require('./chunk-IF75RD6U.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkQRQBKLOMjs = require('./chunk-QRQBKLOM.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
26
|
+
var _chunkXL4FFVWLjs = require('./chunk-XL4FFVWL.js');
|
|
27
|
+
require('./chunk-VPJSQMWQ.js');
|
|
28
|
+
require('./chunk-4NJK6P5T.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -33,7 +33,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
36
|
-
require('./chunk-
|
|
36
|
+
require('./chunk-LF3FF2B2.js');
|
|
37
37
|
require('./chunk-OG64RBAC.js');
|
|
38
38
|
require('./chunk-COGTRVWW.js');
|
|
39
39
|
|
|
@@ -111,10 +111,10 @@ function reportMonitorsFailure(error, options) {
|
|
|
111
111
|
const exitCode = monitorsErrorExitCode(error);
|
|
112
112
|
const next = monitorsFailureNextCommand(error, exitCode, options);
|
|
113
113
|
const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
|
|
114
|
-
const wantsJson =
|
|
114
|
+
const wantsJson = _chunkXL4FFVWLjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
115
115
|
if (wantsJson) {
|
|
116
|
-
const payload =
|
|
117
|
-
|
|
116
|
+
const payload = _chunkXL4FFVWLjs.errorToJsonPayload.call(void 0, error);
|
|
117
|
+
_chunkXL4FFVWLjs.printJson.call(void 0, {
|
|
118
118
|
ok: false,
|
|
119
119
|
exitCode,
|
|
120
120
|
...next ? { next } : {},
|
|
@@ -534,14 +534,14 @@ Preview the plan first with:
|
|
|
534
534
|
);
|
|
535
535
|
}
|
|
536
536
|
async function handleMonitorsStatus(options) {
|
|
537
|
-
const payload = await new (0,
|
|
537
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.status();
|
|
538
538
|
const hasAccess = payload.has_access === true;
|
|
539
539
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
540
540
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
541
541
|
${reason}` : ""}
|
|
542
542
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
543
543
|
`;
|
|
544
|
-
|
|
544
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
545
545
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
546
546
|
{ json: options.json, text }
|
|
547
547
|
);
|
|
@@ -607,14 +607,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
610
|
-
const payload = await new (0,
|
|
610
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.available(tool, {
|
|
611
611
|
...options.provider ? { provider: options.provider } : {},
|
|
612
612
|
...options.search ? { search: options.search } : {},
|
|
613
613
|
...options.limit ? { limit: options.limit } : {},
|
|
614
614
|
...options.full ? { full: true } : {},
|
|
615
615
|
...options.compact ? { compact: true } : {}
|
|
616
616
|
});
|
|
617
|
-
|
|
617
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
618
618
|
json: options.json,
|
|
619
619
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
620
620
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -721,14 +721,14 @@ async function handleMonitorsList(options) {
|
|
|
721
721
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
722
722
|
);
|
|
723
723
|
}
|
|
724
|
-
const payload = await new (0,
|
|
724
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.list({
|
|
725
725
|
...state ? { state } : {},
|
|
726
726
|
...options.status ? { status: options.status } : {},
|
|
727
727
|
...options.limit ? { limit: options.limit } : {},
|
|
728
728
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
729
729
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
730
730
|
});
|
|
731
|
-
|
|
731
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
732
732
|
json: options.json,
|
|
733
733
|
text: renderDeployedListText(
|
|
734
734
|
payload,
|
|
@@ -819,7 +819,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
819
819
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
820
820
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
821
821
|
async function handleMonitorsLedger(key, options) {
|
|
822
|
-
const client = new (0,
|
|
822
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
823
823
|
if (options.findings) {
|
|
824
824
|
if (!key) {
|
|
825
825
|
throw new MonitorsUsageError(
|
|
@@ -829,12 +829,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
829
829
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
830
830
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
831
831
|
});
|
|
832
|
-
|
|
832
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
835
|
if (key) {
|
|
836
836
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
837
|
-
|
|
837
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
838
838
|
return;
|
|
839
839
|
}
|
|
840
840
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -858,7 +858,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
858
858
|
...options.limit ? { limit: options.limit } : {},
|
|
859
859
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
860
860
|
});
|
|
861
|
-
|
|
861
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
862
862
|
json: options.json,
|
|
863
863
|
text: renderMonitorLedgerText(payload)
|
|
864
864
|
});
|
|
@@ -870,10 +870,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
870
870
|
argLabel: "<definition>",
|
|
871
871
|
command: "deepline monitors check"
|
|
872
872
|
});
|
|
873
|
-
const payload = await new (0,
|
|
873
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.check(
|
|
874
874
|
body
|
|
875
875
|
);
|
|
876
|
-
|
|
876
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
877
877
|
}
|
|
878
878
|
function previewText(value) {
|
|
879
879
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -931,22 +931,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
931
931
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
932
932
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
933
933
|
}
|
|
934
|
-
const wantsJson =
|
|
934
|
+
const wantsJson = _chunkXL4FFVWLjs.shouldEmitJson.call(void 0, options.json);
|
|
935
935
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
936
936
|
throw new MonitorsUsageError(
|
|
937
937
|
"--json requires --idempotency-key <key>. Choose a new key for each new preview and keep it: rerunning with the same key returns the result without paying again."
|
|
938
938
|
);
|
|
939
939
|
}
|
|
940
940
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
941
|
-
const progress =
|
|
941
|
+
const progress = _chunkQRQBKLOMjs.createCliProgress.call(void 0, !wantsJson);
|
|
942
942
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
943
943
|
try {
|
|
944
|
-
const payload = await new (0,
|
|
944
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.preview(
|
|
945
945
|
body,
|
|
946
946
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
947
947
|
);
|
|
948
948
|
progress.complete();
|
|
949
|
-
|
|
949
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
950
950
|
json: options.json,
|
|
951
951
|
text: renderMonitorPreviewText(payload)
|
|
952
952
|
});
|
|
@@ -991,7 +991,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
991
991
|
argLabel: "<definition>",
|
|
992
992
|
command: "deepline monitors deploy"
|
|
993
993
|
});
|
|
994
|
-
const client = new (0,
|
|
994
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
995
995
|
const definitionArg = body;
|
|
996
996
|
if (options.dryRun) {
|
|
997
997
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -999,7 +999,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
999
999
|
});
|
|
1000
1000
|
const valid = payload2.valid !== false;
|
|
1001
1001
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
1002
|
-
|
|
1002
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1003
1003
|
{ dry_run: true, ...payload2 },
|
|
1004
1004
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
1005
1005
|
);
|
|
@@ -1009,7 +1009,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1009
1009
|
return;
|
|
1010
1010
|
}
|
|
1011
1011
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1012
|
-
|
|
1012
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
1013
1013
|
json: options.json,
|
|
1014
1014
|
text: renderMonitorDeployCompletion(payload)
|
|
1015
1015
|
});
|
|
@@ -1021,29 +1021,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1021
1021
|
argLabel: "<definition>",
|
|
1022
1022
|
command: "deepline monitors sync"
|
|
1023
1023
|
});
|
|
1024
|
-
const payload = await new (0,
|
|
1024
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.sync(body, {
|
|
1025
1025
|
...options.dryRun ? { dryRun: true } : {},
|
|
1026
1026
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1027
1027
|
});
|
|
1028
1028
|
if (options.dryRun) {
|
|
1029
1029
|
const plan = payload;
|
|
1030
|
-
|
|
1030
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1031
1031
|
{ dry_run: true, ...plan },
|
|
1032
1032
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1033
1033
|
);
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
|
-
|
|
1036
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
1037
1037
|
json: options.json,
|
|
1038
1038
|
text: renderMonitorJob(payload)
|
|
1039
1039
|
});
|
|
1040
1040
|
}
|
|
1041
1041
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1042
|
-
const payload = await new (0,
|
|
1042
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors[action](key, {
|
|
1043
1043
|
...options.dryRun ? { dryRun: true } : {},
|
|
1044
1044
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1045
1045
|
});
|
|
1046
|
-
|
|
1046
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
1047
1047
|
json: options.json,
|
|
1048
1048
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1049
1049
|
});
|
|
@@ -1132,11 +1132,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1132
1132
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1133
1133
|
);
|
|
1134
1134
|
}
|
|
1135
|
-
const payload = await new (0,
|
|
1135
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.batch.deploy(
|
|
1136
1136
|
lint.normalized.monitors,
|
|
1137
1137
|
{ idempotencyKey }
|
|
1138
1138
|
);
|
|
1139
|
-
|
|
1139
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1140
1140
|
{
|
|
1141
1141
|
...payload,
|
|
1142
1142
|
idempotency_key: idempotencyKey,
|
|
@@ -1169,7 +1169,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1169
1169
|
);
|
|
1170
1170
|
}
|
|
1171
1171
|
if (options.dryRun) {
|
|
1172
|
-
|
|
1172
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1173
1173
|
{
|
|
1174
1174
|
ok: true,
|
|
1175
1175
|
dry_run: true,
|
|
@@ -1186,7 +1186,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1186
1186
|
"sync",
|
|
1187
1187
|
options.idempotencyKey
|
|
1188
1188
|
);
|
|
1189
|
-
const payload = await new (0,
|
|
1189
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.batches.sync(
|
|
1190
1190
|
batchId,
|
|
1191
1191
|
lint.normalized.monitors,
|
|
1192
1192
|
{
|
|
@@ -1194,14 +1194,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1194
1194
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1195
1195
|
}
|
|
1196
1196
|
);
|
|
1197
|
-
|
|
1197
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1198
1198
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1199
1199
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1200
1200
|
);
|
|
1201
1201
|
}
|
|
1202
1202
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1203
1203
|
if (options.dryRun) {
|
|
1204
|
-
|
|
1204
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1205
1205
|
{
|
|
1206
1206
|
ok: true,
|
|
1207
1207
|
dry_run: true,
|
|
@@ -1217,17 +1217,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1217
1217
|
intent,
|
|
1218
1218
|
options.idempotencyKey
|
|
1219
1219
|
);
|
|
1220
|
-
const payload = await new (0,
|
|
1220
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1221
1221
|
idempotencyKey
|
|
1222
1222
|
});
|
|
1223
|
-
|
|
1223
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1224
1224
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1225
1225
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1226
1226
|
);
|
|
1227
1227
|
}
|
|
1228
1228
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1229
|
-
const payload = await new (0,
|
|
1230
|
-
|
|
1229
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1230
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
1231
1231
|
json: options.json,
|
|
1232
1232
|
text: renderMonitorJob(payload)
|
|
1233
1233
|
});
|
|
@@ -1241,7 +1241,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1241
1241
|
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
1242
1242
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1243
1243
|
);
|
|
1244
|
-
|
|
1244
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1245
1245
|
{
|
|
1246
1246
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1247
1247
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1261,7 +1261,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1261
1261
|
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1262
1262
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1263
1263
|
);
|
|
1264
|
-
|
|
1264
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1265
1265
|
{
|
|
1266
1266
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1267
1267
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1273,32 +1273,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1273
1273
|
process.exitCode = 2;
|
|
1274
1274
|
}
|
|
1275
1275
|
async function handleMonitorJobGet(jobId, options) {
|
|
1276
|
-
const payload = await new (0,
|
|
1277
|
-
|
|
1276
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1277
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
1278
1278
|
json: options.json,
|
|
1279
1279
|
text: renderMonitorJob(payload)
|
|
1280
1280
|
});
|
|
1281
1281
|
}
|
|
1282
1282
|
async function handleMonitorJobWait(jobId, options) {
|
|
1283
|
-
const payload = await new (0,
|
|
1283
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1284
1284
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1285
1285
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1286
1286
|
});
|
|
1287
|
-
|
|
1287
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
1288
1288
|
json: options.json,
|
|
1289
1289
|
text: renderMonitorJob(payload)
|
|
1290
1290
|
});
|
|
1291
1291
|
}
|
|
1292
1292
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1293
1293
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1294
|
-
const payload = await new (0,
|
|
1294
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1295
1295
|
...limit === void 0 ? {} : { limit }
|
|
1296
1296
|
});
|
|
1297
|
-
|
|
1297
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1298
1298
|
}
|
|
1299
1299
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1300
|
-
const payload = await new (0,
|
|
1301
|
-
|
|
1300
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1301
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
1302
1302
|
json: options.json,
|
|
1303
1303
|
text: renderMonitorJob(payload)
|
|
1304
1304
|
});
|
|
@@ -1615,7 +1615,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1615
1615
|
`;
|
|
1616
1616
|
}
|
|
1617
1617
|
function reportFleetState(payload, error, options) {
|
|
1618
|
-
|
|
1618
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1619
1619
|
{
|
|
1620
1620
|
...payload,
|
|
1621
1621
|
code: error.code,
|
|
@@ -1747,7 +1747,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1747
1747
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1748
1748
|
`, "utf8");
|
|
1749
1749
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1750
|
-
|
|
1750
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
1751
1751
|
{ schemaVersion: 2, file, definition, next },
|
|
1752
1752
|
{
|
|
1753
1753
|
json: options.json,
|
|
@@ -1809,7 +1809,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1809
1809
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1810
1810
|
);
|
|
1811
1811
|
}
|
|
1812
|
-
const client = new (0,
|
|
1812
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
1813
1813
|
const payload = await client.monitors.fleets.sync(
|
|
1814
1814
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1815
1815
|
{
|
|
@@ -1831,7 +1831,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1833
1833
|
if (!options.wait || options.dryRun) {
|
|
1834
|
-
|
|
1834
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1835
1835
|
json: options.json,
|
|
1836
1836
|
text: renderFleetSync(payload, {
|
|
1837
1837
|
fleetId,
|
|
@@ -1857,7 +1857,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1857
1857
|
const status = fleetStatus(final);
|
|
1858
1858
|
const summary = renderFleetGet(final);
|
|
1859
1859
|
if (status === "converged") {
|
|
1860
|
-
|
|
1860
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1861
1861
|
return;
|
|
1862
1862
|
}
|
|
1863
1863
|
if (status === "billing_suspended") {
|
|
@@ -1897,14 +1897,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1897
1897
|
);
|
|
1898
1898
|
}
|
|
1899
1899
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1900
|
-
const client = new (0,
|
|
1900
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
1901
1901
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1902
1902
|
...options.drift ? { drift: true } : {},
|
|
1903
1903
|
...limit !== void 0 ? { limit } : {}
|
|
1904
1904
|
});
|
|
1905
1905
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1906
1906
|
if (!options.check) {
|
|
1907
|
-
|
|
1907
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1908
1908
|
return;
|
|
1909
1909
|
}
|
|
1910
1910
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1912,7 +1912,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1912
1912
|
);
|
|
1913
1913
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1914
1914
|
if (unconverged.length === 0) {
|
|
1915
|
-
|
|
1915
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1916
1916
|
return;
|
|
1917
1917
|
}
|
|
1918
1918
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2075,7 +2075,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2077
2077
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2078
|
-
const client = new (0,
|
|
2078
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
2079
2079
|
if (fleetId) {
|
|
2080
2080
|
const listOnly = [
|
|
2081
2081
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2090,7 +2090,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2090
2090
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2091
2091
|
...window ? { window } : {}
|
|
2092
2092
|
});
|
|
2093
|
-
|
|
2093
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2094
2094
|
json: options.json,
|
|
2095
2095
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2096
2096
|
});
|
|
@@ -2106,7 +2106,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2106
2106
|
...sort ? { sort } : {},
|
|
2107
2107
|
...window ? { window } : {}
|
|
2108
2108
|
});
|
|
2109
|
-
|
|
2109
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
2110
2110
|
json: options.json,
|
|
2111
2111
|
text: renderFleetOverviewList(payload)
|
|
2112
2112
|
});
|
|
@@ -2117,13 +2117,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2117
2117
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2118
2118
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2119
2119
|
}
|
|
2120
|
-
const payload = await new (0,
|
|
2120
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2121
2121
|
...group ? { group } : {},
|
|
2122
2122
|
...options.cause ? { cause: options.cause } : {},
|
|
2123
2123
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2124
2124
|
...limit !== void 0 ? { limit } : {}
|
|
2125
2125
|
});
|
|
2126
|
-
|
|
2126
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, {
|
|
2127
2127
|
json: options.json,
|
|
2128
2128
|
text: renderFleetIssuePage(payload)
|
|
2129
2129
|
});
|
|
@@ -2152,13 +2152,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2152
2152
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2153
2153
|
);
|
|
2154
2154
|
}
|
|
2155
|
-
const client = new (0,
|
|
2155
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
2156
2156
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2157
2157
|
idempotencyKey
|
|
2158
2158
|
});
|
|
2159
2159
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2160
2160
|
if (!options.wait) {
|
|
2161
|
-
|
|
2161
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2162
2162
|
json: options.json,
|
|
2163
2163
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2164
2164
|
idempotency key ${idempotencyKey}
|
|
@@ -2181,7 +2181,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2181
2181
|
const envelope = { ...accepted, ...final };
|
|
2182
2182
|
const text = renderFleetGet(final);
|
|
2183
2183
|
if (fleetStatus(final) === "converged") {
|
|
2184
|
-
|
|
2184
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2185
2185
|
return;
|
|
2186
2186
|
}
|
|
2187
2187
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2230,7 +2230,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2230
2230
|
}
|
|
2231
2231
|
}
|
|
2232
2232
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2233
|
-
const client = new (0,
|
|
2233
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
2234
2234
|
if (options.dryRun) {
|
|
2235
2235
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2236
2236
|
dryRun: true,
|
|
@@ -2240,7 +2240,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2240
2240
|
command: "deepline monitors fleets deactivate",
|
|
2241
2241
|
mutation: "fleet deactivate"
|
|
2242
2242
|
});
|
|
2243
|
-
|
|
2243
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, plan, {
|
|
2244
2244
|
json: options.json,
|
|
2245
2245
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2246
2246
|
});
|
|
@@ -2278,7 +2278,7 @@ Preview the blast radius first:
|
|
|
2278
2278
|
});
|
|
2279
2279
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2280
2280
|
if (payload.already === true) {
|
|
2281
|
-
|
|
2281
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2282
2282
|
json: options.json,
|
|
2283
2283
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2284
2284
|
`
|
|
@@ -2290,7 +2290,7 @@ Preview the blast radius first:
|
|
|
2290
2290
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2291
2291
|
` : "");
|
|
2292
2292
|
if (!options.wait) {
|
|
2293
|
-
|
|
2293
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2294
2294
|
json: options.json,
|
|
2295
2295
|
text: acceptedText
|
|
2296
2296
|
});
|
|
@@ -2312,7 +2312,7 @@ Preview the blast radius first:
|
|
|
2312
2312
|
const envelope = { ...accepted, ...final };
|
|
2313
2313
|
const summary = renderFleetGet(final);
|
|
2314
2314
|
if (fleetStatus(final) === "deactivated") {
|
|
2315
|
-
|
|
2315
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2316
2316
|
return;
|
|
2317
2317
|
}
|
|
2318
2318
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2351,7 +2351,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2351
2351
|
"Agent notes:",
|
|
2352
2352
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2353
2353
|
];
|
|
2354
|
-
|
|
2354
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
2355
2355
|
{
|
|
2356
2356
|
schemaVersion: 1,
|
|
2357
2357
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2513,7 +2513,7 @@ function renderMonitorGet(payload) {
|
|
|
2513
2513
|
`;
|
|
2514
2514
|
}
|
|
2515
2515
|
async function handleMonitorsGet(key, options) {
|
|
2516
|
-
const client = new (0,
|
|
2516
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
2517
2517
|
const payload = await client.monitors.get(key);
|
|
2518
2518
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2519
2519
|
const dependents = boundPlays ? {
|
|
@@ -2521,24 +2521,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2521
2521
|
truncated: payload.consumer_health_truncated === true
|
|
2522
2522
|
} : await client.monitors.dependents(key);
|
|
2523
2523
|
const detail = { ...payload, dependents };
|
|
2524
|
-
|
|
2524
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, detail, {
|
|
2525
2525
|
json: options.json,
|
|
2526
2526
|
text: renderMonitorGet(detail)
|
|
2527
2527
|
});
|
|
2528
2528
|
}
|
|
2529
2529
|
async function handleMonitorsTest(key, payload, options) {
|
|
2530
2530
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2531
|
-
const result = await new (0,
|
|
2531
|
+
const result = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2532
2532
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2533
2533
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2534
2534
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2535
2535
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2536
2536
|
`;
|
|
2537
|
-
|
|
2537
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2538
2538
|
}
|
|
2539
2539
|
async function handleMonitorsValidate(key, options) {
|
|
2540
|
-
const result = await new (0,
|
|
2541
|
-
|
|
2540
|
+
const result = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.validate(key);
|
|
2541
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2542
2542
|
if (result.valid === false) process.exitCode = 7;
|
|
2543
2543
|
}
|
|
2544
2544
|
async function confirmMonitorDelete(key) {
|
|
@@ -2556,14 +2556,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
2558
|
async function handleMonitorsDelete(key, options) {
|
|
2559
|
-
const client = new (0,
|
|
2559
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
2560
2560
|
if (options.dryRun) {
|
|
2561
2561
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2562
2562
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2563
2563
|
command: "deepline monitors delete",
|
|
2564
2564
|
mutation: "delete"
|
|
2565
2565
|
});
|
|
2566
|
-
|
|
2566
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2567
2567
|
json: options.json,
|
|
2568
2568
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2569
2569
|
});
|
|
@@ -2583,7 +2583,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
}
|
|
2585
2585
|
const payload = await client.monitors.delete(key);
|
|
2586
|
-
|
|
2586
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2587
2587
|
}
|
|
2588
2588
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2589
2589
|
const body = resolveMonitorJsonBody({
|
|
@@ -2592,25 +2592,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2592
2592
|
argLabel: "<patch>",
|
|
2593
2593
|
command: `deepline monitors update ${key}`
|
|
2594
2594
|
});
|
|
2595
|
-
const payload = await new (0,
|
|
2596
|
-
|
|
2595
|
+
const payload = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.update(key, body);
|
|
2596
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2597
2597
|
}
|
|
2598
2598
|
async function handleMonitorsReactivate(key, options) {
|
|
2599
|
-
const client = new (0,
|
|
2599
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
2600
2600
|
if (options.dryRun) {
|
|
2601
2601
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2602
2602
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2603
2603
|
command: "deepline monitors reactivate",
|
|
2604
2604
|
mutation: "reactivate"
|
|
2605
2605
|
});
|
|
2606
|
-
|
|
2606
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2607
2607
|
json: options.json,
|
|
2608
2608
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2609
2609
|
});
|
|
2610
2610
|
return;
|
|
2611
2611
|
}
|
|
2612
2612
|
const payload = await client.monitors.reactivate(key);
|
|
2613
|
-
|
|
2613
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2614
2614
|
}
|
|
2615
2615
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2616
2616
|
function monitorHealthLine(health) {
|
|
@@ -2732,7 +2732,7 @@ function monitorHealthText(health) {
|
|
|
2732
2732
|
`;
|
|
2733
2733
|
}
|
|
2734
2734
|
async function handleMonitorsAudit(options) {
|
|
2735
|
-
const client = new (0,
|
|
2735
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
2736
2736
|
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2737
2737
|
const scope = fleetId ? { fleetId } : {};
|
|
2738
2738
|
let result = await client.monitors.audit(scope);
|
|
@@ -2776,7 +2776,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2776
2776
|
"",
|
|
2777
2777
|
monitorHealthText(health)
|
|
2778
2778
|
].join("\n");
|
|
2779
|
-
|
|
2779
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
2780
2780
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2781
2781
|
{ json: options.json, text }
|
|
2782
2782
|
);
|
|
@@ -2789,10 +2789,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2789
2789
|
}
|
|
2790
2790
|
async function handleMonitorsHealth(options) {
|
|
2791
2791
|
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2792
|
-
const health = await new (0,
|
|
2792
|
+
const health = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.health(
|
|
2793
2793
|
fleetId ? { fleetId } : {}
|
|
2794
2794
|
);
|
|
2795
|
-
|
|
2795
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, health, {
|
|
2796
2796
|
json: options.json,
|
|
2797
2797
|
text: monitorHealthText(health)
|
|
2798
2798
|
});
|
|
@@ -2866,14 +2866,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2866
2866
|
"deploy",
|
|
2867
2867
|
options.idempotencyKey
|
|
2868
2868
|
);
|
|
2869
|
-
const result = await new (0,
|
|
2869
|
+
const result = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.batch.submit({
|
|
2870
2870
|
kind: "deploy",
|
|
2871
2871
|
manifestNdjson,
|
|
2872
2872
|
dryRun: options.dryRun === true,
|
|
2873
2873
|
idempotencyKey
|
|
2874
2874
|
});
|
|
2875
2875
|
const operation = result.operation;
|
|
2876
|
-
|
|
2876
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
2877
2877
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2878
2878
|
{
|
|
2879
2879
|
json: options.json,
|
|
@@ -2901,7 +2901,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2901
2901
|
kind,
|
|
2902
2902
|
options.idempotencyKey
|
|
2903
2903
|
);
|
|
2904
|
-
const result = await new (0,
|
|
2904
|
+
const result = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.batch.submit({
|
|
2905
2905
|
kind,
|
|
2906
2906
|
scope,
|
|
2907
2907
|
dryRun: options.dryRun === true,
|
|
@@ -2914,14 +2914,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2914
2914
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2915
2915
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2916
2916
|
].join("\n");
|
|
2917
|
-
|
|
2917
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
2918
2918
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2919
2919
|
{ json: options.json, text: `${text}
|
|
2920
2920
|
` }
|
|
2921
2921
|
);
|
|
2922
2922
|
}
|
|
2923
2923
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2924
|
-
const result = await new (0,
|
|
2924
|
+
const result = await new (0, _chunkZCYV6MZHjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2925
2925
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2926
2926
|
});
|
|
2927
2927
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2933,7 +2933,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2933
2933
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2934
2934
|
] : []
|
|
2935
2935
|
].join("\n");
|
|
2936
|
-
|
|
2936
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2937
2937
|
` });
|
|
2938
2938
|
}
|
|
2939
2939
|
function registerMonitorsCommands(program) {
|