deepline 0.3.506 → 0.3.508
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +27 -6
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +38 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +4 -2
- package/dist/bundling-sources/shared_libs/monitors/package.json +4 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-admission-codes.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +15 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +24 -4
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +405 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +3 -1
- package/dist/cli/{auth-ZHFONT2D.mjs → auth-2URIN52G.mjs} +5 -5
- package/dist/cli/auth-LFU77QDI.js +43 -0
- package/dist/cli/{billing-B2YEMNHE.mjs → billing-IW23GSR5.mjs} +6 -6
- package/dist/cli/{billing-3Z7N4WTL.js → billing-R2HY2ZVJ.js} +79 -79
- package/dist/cli/{chunk-TS4KFQKS.mjs → chunk-2LY42EZJ.mjs} +1 -1
- package/dist/cli/{chunk-ND4WPLTE.mjs → chunk-2PYFXXYA.mjs} +2 -2
- package/dist/cli/{chunk-N7G36GXB.js → chunk-2YOM5J3G.js} +26 -26
- package/dist/cli/{chunk-SUJIVF6L.js → chunk-3BZ74K27.js} +16 -16
- package/dist/cli/{chunk-Z7EHY2MF.mjs → chunk-3C6VBHNW.mjs} +2 -2
- package/dist/cli/{chunk-FFGQR5J3.mjs → chunk-3XBI4KZM.mjs} +2 -2
- package/dist/cli/{chunk-OHNMJ5XQ.js → chunk-3ZNPIJX6.js} +41 -41
- package/dist/cli/{chunk-6RYVIZRP.mjs → chunk-4DAR2GYV.mjs} +2 -2
- package/dist/cli/{chunk-E554XCJI.js → chunk-63BGKU3A.js} +96 -96
- package/dist/cli/{chunk-OUGJUM5X.mjs → chunk-63MCLOR2.mjs} +6 -6
- package/dist/cli/{chunk-FWSEGIT6.js → chunk-74UO7THC.js} +4 -4
- package/dist/cli/{chunk-ZZDTWVCQ.js → chunk-7PELFO3C.js} +21 -21
- package/dist/cli/{chunk-3F676QXJ.js → chunk-AYNO4VFW.js} +11 -11
- package/dist/cli/{chunk-D7OCORZ7.mjs → chunk-C6TP4DR3.mjs} +1 -1
- package/dist/cli/{chunk-F7IQQYKV.js → chunk-D73YB5NQ.js} +2 -2
- package/dist/cli/{chunk-QAY5AS2H.mjs → chunk-DWV7KM6H.mjs} +10 -10
- package/dist/cli/{chunk-2CFTDVEP.mjs → chunk-DZ7JCRAL.mjs} +2 -2
- package/dist/cli/{chunk-2OY5DXTC.js → chunk-ESVK4Z7S.js} +1 -1
- package/dist/cli/{chunk-YVOS5KSG.mjs → chunk-FRT5MFLF.mjs} +1 -1
- package/dist/cli/{chunk-PRIHD5XS.js → chunk-FXKKFM7J.js} +9 -9
- package/dist/cli/{chunk-GJNIC2CO.mjs → chunk-GRGZKXLL.mjs} +5 -5
- package/dist/cli/{chunk-CHGRURBN.mjs → chunk-IF242BIJ.mjs} +5 -5
- package/dist/cli/{chunk-HINTYT5H.js → chunk-IZZ7FFWP.js} +44 -44
- package/dist/cli/{chunk-MHRR47VQ.js → chunk-J3LJ37WD.js} +3 -3
- package/dist/cli/{chunk-O4DZG4VA.mjs → chunk-JEB6BNIU.mjs} +2 -2
- package/dist/cli/{chunk-AD2WJUZA.js → chunk-JRHMPZJX.js} +7 -7
- package/dist/cli/{chunk-75NAFY36.js → chunk-JUYW6TSU.js} +7 -7
- package/dist/cli/{chunk-2IXXB7OA.mjs → chunk-JXYVBF5L.mjs} +5 -5
- package/dist/cli/{chunk-QP333GFE.js → chunk-JYNHHO3J.js} +6 -6
- package/dist/cli/{chunk-3BFZEHBH.mjs → chunk-K4RME7AV.mjs} +1 -1
- package/dist/cli/{chunk-OPBXKB57.mjs → chunk-KSQO32L5.mjs} +1 -1
- package/dist/cli/{chunk-LRSRJJPD.js → chunk-M37I4A2Z.js} +16 -16
- package/dist/cli/{chunk-YJKKOSXS.js → chunk-N5HRBS4K.js} +3 -3
- package/dist/cli/{chunk-TEMORCEE.mjs → chunk-NC2FIUPX.mjs} +1 -1
- package/dist/cli/{chunk-YWZEBPXK.mjs → chunk-OWH7SSBO.mjs} +2 -2
- package/dist/cli/{chunk-GRESJ3H3.js → chunk-P7GOQTUN.js} +14 -14
- package/dist/cli/{chunk-ONBXTEFQ.mjs → chunk-Q4I5YKN4.mjs} +1 -1
- package/dist/cli/{chunk-BQBPVUFJ.mjs → chunk-QBZECLNG.mjs} +3 -3
- package/dist/cli/{chunk-ZM5BJ5MP.js → chunk-R4S2AK3Q.js} +53 -53
- package/dist/cli/{chunk-XUY7WQ2R.mjs → chunk-RNZQ7RDW.mjs} +2 -2
- package/dist/cli/{chunk-F53SGS3C.js → chunk-RUD77W2Y.js} +5 -5
- package/dist/cli/{chunk-OD6TASBP.js → chunk-RWXHMG6F.js} +8 -8
- package/dist/cli/{chunk-DB54ROPH.js → chunk-TVADI7K5.js} +5 -5
- package/dist/cli/{chunk-YEX6RPUO.mjs → chunk-UDH3YMBI.mjs} +1 -1
- package/dist/cli/{chunk-BJ5OX62J.mjs → chunk-VXNL4HLE.mjs} +5 -5
- package/dist/cli/{chunk-EN7GXLFX.mjs → chunk-XSOLA2ED.mjs} +4 -4
- package/dist/cli/{chunk-5ARG7J7A.js → chunk-ZL2ME3UT.js} +6 -6
- package/dist/cli/{chunk-26DJ4BDY.js → chunk-ZLIAUR2E.js} +2 -2
- package/dist/cli/{csv-ARHQ54HA.mjs → csv-CMJSMC2I.mjs} +4 -4
- package/dist/cli/{csv-7K7LK63Y.js → csv-DPDO6BU6.js} +13 -13
- package/dist/cli/{db-V4Z2I6DY.js → db-PPPKNTT5.js} +27 -27
- package/dist/cli/{db-JBX24NJY.mjs → db-SL3EFN6V.mjs} +6 -6
- package/dist/cli/describe-JKZ67X3E.js +50 -0
- package/dist/cli/{describe-RBDSGSZ7.mjs → describe-XLN33FJX.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-XEZKV5QU.js → executions-6YDTV2J6.js} +8 -8
- package/dist/cli/{executions-BAZEU63W.mjs → executions-O6Z5B5NY.mjs} +6 -6
- package/dist/cli/{feedback-LOERESRU.js → feedback-BZ434BN4.js} +8 -8
- package/dist/cli/{feedback-YDSWBHCO.mjs → feedback-DP7LPWAD.mjs} +4 -4
- package/dist/cli/{git-4Z3W2CQU.mjs → git-MI7E5WGL.mjs} +5 -5
- package/dist/cli/git-U5N6CTML.js +25 -0
- package/dist/cli/index.js +138 -138
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-4QIQPVE5.js → legacy-noops-65WNPQVZ.js} +8 -8
- package/dist/cli/{legacy-noops-E4HH7S5O.mjs → legacy-noops-6VYXF2MG.mjs} +5 -5
- package/dist/cli/{monitors-QBHDSDA7.js → monitors-BYUCTVSC.js} +127 -112
- package/dist/cli/{monitors-FPDW5DDM.mjs → monitors-Y7I5ZVCN.mjs} +34 -19
- package/dist/cli/{org-JO4GGSAH.js → org-F2ASWTFY.js} +72 -72
- package/dist/cli/{org-UCDHIHAD.mjs → org-IW3YD6JZ.mjs} +6 -6
- package/dist/cli/{pages-6V52IZXY.mjs → pages-H2CXNIDB.mjs} +6 -6
- package/dist/cli/{pages-FJAAXAWO.js → pages-X6HLRQNV.js} +18 -18
- package/dist/cli/{play-F3AENS6W.js → play-H2EM7DTI.js} +317 -317
- package/dist/cli/{play-MF4DWROJ.mjs → play-LLEEDXRX.mjs} +18 -18
- package/dist/cli/{providers-XXOQLPX7.js → providers-6R2SPOEV.js} +9 -9
- package/dist/cli/{providers-NJJLTECA.mjs → providers-BZR5JONN.mjs} +6 -6
- package/dist/cli/{quickstart-Z5MSMI7S.mjs → quickstart-KVES7R6D.mjs} +4 -4
- package/dist/cli/{quickstart-JCE3XGQG.js → quickstart-PW7ONQUH.js} +6 -6
- package/dist/cli/{run-X2DNIW3F.js → run-HVUQROBE.js} +41 -41
- package/dist/cli/{run-56UGPIRL.mjs → run-RDI3Q6GO.mjs} +23 -23
- package/dist/cli/{search-SZYI4NBB.mjs → search-3TJ24CUF.mjs} +8 -8
- package/dist/cli/search-NKEEGLY6.js +33 -0
- package/dist/cli/{search-output-7UNT6EMP.js → search-output-JHT553SL.js} +6 -6
- package/dist/cli/{search-output-T35QNZUF.mjs → search-output-Y57OBQXX.mjs} +4 -4
- package/dist/cli/{secrets-Q36VC35L.mjs → secrets-OZK7GRD5.mjs} +6 -6
- package/dist/cli/{secrets-JMUAVIVC.js → secrets-U5JHWAXU.js} +15 -15
- package/dist/cli/{sessions-HG6I3HMY.mjs → sessions-D6DSEQ2T.mjs} +5 -5
- package/dist/cli/{sessions-SUXU7OM7.js → sessions-PNMYAJNB.js} +6 -6
- package/dist/cli/{settings-UIELQ5CV.js → settings-DLPEHYGS.js} +82 -82
- package/dist/cli/{settings-Z76XW4KF.mjs → settings-ITLSLT2R.mjs} +12 -12
- package/dist/cli/{setup-OXNYAOQ4.mjs → setup-XTYLF2CF.mjs} +10 -10
- package/dist/cli/{setup-2L7H5P2O.js → setup-Y5ZYEC6U.js} +50 -50
- package/dist/cli/{skills-XSNLXJGI.mjs → skills-C4WCAVII.mjs} +8 -8
- package/dist/cli/skills-K6FVG3BX.js +37 -0
- package/dist/cli/tools-LSALTN7I.js +57 -0
- package/dist/cli/{tools-SUSFAYFH.mjs → tools-ZESAPVOW.mjs} +17 -17
- package/dist/cli/{update-ENSTG3QO.mjs → update-4PCKVDCS.mjs} +10 -10
- package/dist/cli/update-P5KGNFNL.js +35 -0
- package/dist/cli/{workflow-Z33QE6VT.mjs → workflow-42CL4TVR.mjs} +7 -7
- package/dist/cli/{workflow-FMBZNY4F.js → workflow-XXKXMPTI.js} +17 -17
- package/dist/{client-Cx0420fs.d.ts → client-BlwD-G4v.d.ts} +1 -1
- package/dist/{client-BDbouy3Y.d.mts → client-DMpsMNH9.d.mts} +1 -1
- package/dist/{client-core-CwiVaMZ5.d.mts → client-core-CITtRTbB.d.mts} +27 -8
- package/dist/{client-core-B4hq0-m2.d.ts → client-core-DwBLuEkm.d.ts} +27 -8
- 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 +106 -104
- 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-MMHG2OFE.js +0 -43
- package/dist/cli/describe-AYXVS6DZ.js +0 -50
- package/dist/cli/git-T6WKO7EA.js +0 -25
- package/dist/cli/search-B753RTKC.js +0 -33
- package/dist/cli/skills-DEVXYGYH.js +0 -37
- package/dist/cli/tools-SCGHABDL.js +0 -57
- package/dist/cli/update-BSIILGO3.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 _chunkTVADI7K5js = require('./chunk-TVADI7K5.js');
|
|
5
|
+
require('./chunk-JRHMPZJX.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 _chunkN5HRBS4Kjs = require('./chunk-N5HRBS4K.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
26
|
+
var _chunkJUYW6TSUjs = require('./chunk-JUYW6TSU.js');
|
|
27
|
+
require('./chunk-J3LJ37WD.js');
|
|
28
|
+
require('./chunk-74UO7THC.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-ESVK4Z7S.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 = _chunkJUYW6TSUjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
115
115
|
if (wantsJson) {
|
|
116
|
-
const payload =
|
|
117
|
-
|
|
116
|
+
const payload = _chunkJUYW6TSUjs.errorToJsonPayload.call(void 0, error);
|
|
117
|
+
_chunkJUYW6TSUjs.printJson.call(void 0, {
|
|
118
118
|
ok: false,
|
|
119
119
|
exitCode,
|
|
120
120
|
...next ? { next } : {},
|
|
@@ -206,8 +206,13 @@ var MONITOR_STATES = /* @__PURE__ */ new Set([
|
|
|
206
206
|
"active",
|
|
207
207
|
"provisioning",
|
|
208
208
|
"billing_suspended",
|
|
209
|
+
"errored",
|
|
209
210
|
"disabled"
|
|
210
211
|
]);
|
|
212
|
+
function monitorFailureMessage(record) {
|
|
213
|
+
const failure = asRecord(record.failure);
|
|
214
|
+
return failure ? asString(failure.message) : void 0;
|
|
215
|
+
}
|
|
211
216
|
function customerMonitorState(value) {
|
|
212
217
|
if (typeof value === "string" && MONITOR_STATES.has(value)) {
|
|
213
218
|
return value;
|
|
@@ -529,14 +534,14 @@ Preview the plan first with:
|
|
|
529
534
|
);
|
|
530
535
|
}
|
|
531
536
|
async function handleMonitorsStatus(options) {
|
|
532
|
-
const payload = await new (0,
|
|
537
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.status();
|
|
533
538
|
const hasAccess = payload.has_access === true;
|
|
534
539
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
535
540
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
536
541
|
${reason}` : ""}
|
|
537
542
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
538
543
|
`;
|
|
539
|
-
|
|
544
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
540
545
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
541
546
|
{ json: options.json, text }
|
|
542
547
|
);
|
|
@@ -602,14 +607,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
602
607
|
}
|
|
603
608
|
}
|
|
604
609
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
605
|
-
const payload = await new (0,
|
|
610
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.available(tool, {
|
|
606
611
|
...options.provider ? { provider: options.provider } : {},
|
|
607
612
|
...options.search ? { search: options.search } : {},
|
|
608
613
|
...options.limit ? { limit: options.limit } : {},
|
|
609
614
|
...options.full ? { full: true } : {},
|
|
610
615
|
...options.compact ? { compact: true } : {}
|
|
611
616
|
});
|
|
612
|
-
|
|
617
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
613
618
|
json: options.json,
|
|
614
619
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
615
620
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -640,6 +645,10 @@ function renderDeployedListText(payload, requestedStatus, filterKind = "status")
|
|
|
640
645
|
lines.push(
|
|
641
646
|
` ${key}${state ? ` ${state}` : ""}${tool ? ` ${tool}` : ""}${name ? ` (${name})` : ""}`
|
|
642
647
|
);
|
|
648
|
+
const failureMessage = monitorFailureMessage(entry);
|
|
649
|
+
if (state === "errored" && failureMessage) {
|
|
650
|
+
lines.push(` error: ${failureMessage}`);
|
|
651
|
+
}
|
|
643
652
|
if (outputTable || monitorType || webhookState || executionType || boundPlays !== void 0) {
|
|
644
653
|
lines.push(
|
|
645
654
|
` ${[
|
|
@@ -704,7 +713,7 @@ async function handleMonitorsList(options) {
|
|
|
704
713
|
const state = options.state ? monitorStateFilter(options.state) : void 0;
|
|
705
714
|
if (options.state !== void 0 && !state) {
|
|
706
715
|
throw new MonitorsUsageError(
|
|
707
|
-
`--state must be active, provisioning, billing_suspended, disabled, or all; received ${options.state}.`
|
|
716
|
+
`--state must be active, provisioning, billing_suspended, errored, disabled, or all; received ${options.state}.`
|
|
708
717
|
);
|
|
709
718
|
}
|
|
710
719
|
if (options.compact) {
|
|
@@ -712,14 +721,14 @@ async function handleMonitorsList(options) {
|
|
|
712
721
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
713
722
|
);
|
|
714
723
|
}
|
|
715
|
-
const payload = await new (0,
|
|
724
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.list({
|
|
716
725
|
...state ? { state } : {},
|
|
717
726
|
...options.status ? { status: options.status } : {},
|
|
718
727
|
...options.limit ? { limit: options.limit } : {},
|
|
719
728
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
720
729
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
721
730
|
});
|
|
722
|
-
|
|
731
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
723
732
|
json: options.json,
|
|
724
733
|
text: renderDeployedListText(
|
|
725
734
|
payload,
|
|
@@ -734,6 +743,7 @@ var LEDGER_STATUS_LABELS = {
|
|
|
734
743
|
paused_credits: "Paused \xB7 out of credits",
|
|
735
744
|
paused_cap: "Paused \xB7 spending cap",
|
|
736
745
|
paused_billing: "Paused \xB7 billing issue",
|
|
746
|
+
errored: "Errored \xB7 update or remove",
|
|
737
747
|
stopped: "Stopped"
|
|
738
748
|
};
|
|
739
749
|
function ledgerPlayLabel(play) {
|
|
@@ -809,7 +819,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
809
819
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
810
820
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
811
821
|
async function handleMonitorsLedger(key, options) {
|
|
812
|
-
const client = new (0,
|
|
822
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
813
823
|
if (options.findings) {
|
|
814
824
|
if (!key) {
|
|
815
825
|
throw new MonitorsUsageError(
|
|
@@ -819,12 +829,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
819
829
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
820
830
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
821
831
|
});
|
|
822
|
-
|
|
832
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
823
833
|
return;
|
|
824
834
|
}
|
|
825
835
|
if (key) {
|
|
826
836
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
827
|
-
|
|
837
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
828
838
|
return;
|
|
829
839
|
}
|
|
830
840
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -848,7 +858,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
848
858
|
...options.limit ? { limit: options.limit } : {},
|
|
849
859
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
850
860
|
});
|
|
851
|
-
|
|
861
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
852
862
|
json: options.json,
|
|
853
863
|
text: renderMonitorLedgerText(payload)
|
|
854
864
|
});
|
|
@@ -860,10 +870,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
860
870
|
argLabel: "<definition>",
|
|
861
871
|
command: "deepline monitors check"
|
|
862
872
|
});
|
|
863
|
-
const payload = await new (0,
|
|
873
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.check(
|
|
864
874
|
body
|
|
865
875
|
);
|
|
866
|
-
|
|
876
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
867
877
|
}
|
|
868
878
|
function previewText(value) {
|
|
869
879
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -921,22 +931,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
921
931
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
922
932
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
923
933
|
}
|
|
924
|
-
const wantsJson =
|
|
934
|
+
const wantsJson = _chunkJUYW6TSUjs.shouldEmitJson.call(void 0, options.json);
|
|
925
935
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
926
936
|
throw new MonitorsUsageError(
|
|
927
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."
|
|
928
938
|
);
|
|
929
939
|
}
|
|
930
940
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
931
|
-
const progress =
|
|
941
|
+
const progress = _chunkN5HRBS4Kjs.createCliProgress.call(void 0, !wantsJson);
|
|
932
942
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
933
943
|
try {
|
|
934
|
-
const payload = await new (0,
|
|
944
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.preview(
|
|
935
945
|
body,
|
|
936
946
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
937
947
|
);
|
|
938
948
|
progress.complete();
|
|
939
|
-
|
|
949
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
940
950
|
json: options.json,
|
|
941
951
|
text: renderMonitorPreviewText(payload)
|
|
942
952
|
});
|
|
@@ -981,7 +991,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
981
991
|
argLabel: "<definition>",
|
|
982
992
|
command: "deepline monitors deploy"
|
|
983
993
|
});
|
|
984
|
-
const client = new (0,
|
|
994
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
985
995
|
const definitionArg = body;
|
|
986
996
|
if (options.dryRun) {
|
|
987
997
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -989,7 +999,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
989
999
|
});
|
|
990
1000
|
const valid = payload2.valid !== false;
|
|
991
1001
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
992
|
-
|
|
1002
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
993
1003
|
{ dry_run: true, ...payload2 },
|
|
994
1004
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
995
1005
|
);
|
|
@@ -999,7 +1009,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
999
1009
|
return;
|
|
1000
1010
|
}
|
|
1001
1011
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1002
|
-
|
|
1012
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
1003
1013
|
json: options.json,
|
|
1004
1014
|
text: renderMonitorDeployCompletion(payload)
|
|
1005
1015
|
});
|
|
@@ -1011,29 +1021,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1011
1021
|
argLabel: "<definition>",
|
|
1012
1022
|
command: "deepline monitors sync"
|
|
1013
1023
|
});
|
|
1014
|
-
const payload = await new (0,
|
|
1024
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.sync(body, {
|
|
1015
1025
|
...options.dryRun ? { dryRun: true } : {},
|
|
1016
1026
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1017
1027
|
});
|
|
1018
1028
|
if (options.dryRun) {
|
|
1019
1029
|
const plan = payload;
|
|
1020
|
-
|
|
1030
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1021
1031
|
{ dry_run: true, ...plan },
|
|
1022
1032
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1023
1033
|
);
|
|
1024
1034
|
return;
|
|
1025
1035
|
}
|
|
1026
|
-
|
|
1036
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
1027
1037
|
json: options.json,
|
|
1028
1038
|
text: renderMonitorJob(payload)
|
|
1029
1039
|
});
|
|
1030
1040
|
}
|
|
1031
1041
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1032
|
-
const payload = await new (0,
|
|
1042
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors[action](key, {
|
|
1033
1043
|
...options.dryRun ? { dryRun: true } : {},
|
|
1034
1044
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1035
1045
|
});
|
|
1036
|
-
|
|
1046
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
1037
1047
|
json: options.json,
|
|
1038
1048
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1039
1049
|
});
|
|
@@ -1122,11 +1132,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1122
1132
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1123
1133
|
);
|
|
1124
1134
|
}
|
|
1125
|
-
const payload = await new (0,
|
|
1135
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.batch.deploy(
|
|
1126
1136
|
lint.normalized.monitors,
|
|
1127
1137
|
{ idempotencyKey }
|
|
1128
1138
|
);
|
|
1129
|
-
|
|
1139
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1130
1140
|
{
|
|
1131
1141
|
...payload,
|
|
1132
1142
|
idempotency_key: idempotencyKey,
|
|
@@ -1159,7 +1169,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1159
1169
|
);
|
|
1160
1170
|
}
|
|
1161
1171
|
if (options.dryRun) {
|
|
1162
|
-
|
|
1172
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1163
1173
|
{
|
|
1164
1174
|
ok: true,
|
|
1165
1175
|
dry_run: true,
|
|
@@ -1176,7 +1186,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1176
1186
|
"sync",
|
|
1177
1187
|
options.idempotencyKey
|
|
1178
1188
|
);
|
|
1179
|
-
const payload = await new (0,
|
|
1189
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.batches.sync(
|
|
1180
1190
|
batchId,
|
|
1181
1191
|
lint.normalized.monitors,
|
|
1182
1192
|
{
|
|
@@ -1184,14 +1194,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1184
1194
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1185
1195
|
}
|
|
1186
1196
|
);
|
|
1187
|
-
|
|
1197
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1188
1198
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1189
1199
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1190
1200
|
);
|
|
1191
1201
|
}
|
|
1192
1202
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1193
1203
|
if (options.dryRun) {
|
|
1194
|
-
|
|
1204
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1195
1205
|
{
|
|
1196
1206
|
ok: true,
|
|
1197
1207
|
dry_run: true,
|
|
@@ -1207,17 +1217,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1207
1217
|
intent,
|
|
1208
1218
|
options.idempotencyKey
|
|
1209
1219
|
);
|
|
1210
|
-
const payload = await new (0,
|
|
1220
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1211
1221
|
idempotencyKey
|
|
1212
1222
|
});
|
|
1213
|
-
|
|
1223
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1214
1224
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1215
1225
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1216
1226
|
);
|
|
1217
1227
|
}
|
|
1218
1228
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1219
|
-
const payload = await new (0,
|
|
1220
|
-
|
|
1229
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.batches.get(batchId);
|
|
1230
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
1221
1231
|
json: options.json,
|
|
1222
1232
|
text: renderMonitorJob(payload)
|
|
1223
1233
|
});
|
|
@@ -1231,7 +1241,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1231
1241
|
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
1232
1242
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1233
1243
|
);
|
|
1234
|
-
|
|
1244
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1235
1245
|
{
|
|
1236
1246
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1237
1247
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1251,7 +1261,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1251
1261
|
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1252
1262
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1253
1263
|
);
|
|
1254
|
-
|
|
1264
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1255
1265
|
{
|
|
1256
1266
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1257
1267
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1263,32 +1273,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1263
1273
|
process.exitCode = 2;
|
|
1264
1274
|
}
|
|
1265
1275
|
async function handleMonitorJobGet(jobId, options) {
|
|
1266
|
-
const payload = await new (0,
|
|
1267
|
-
|
|
1276
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1277
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
1268
1278
|
json: options.json,
|
|
1269
1279
|
text: renderMonitorJob(payload)
|
|
1270
1280
|
});
|
|
1271
1281
|
}
|
|
1272
1282
|
async function handleMonitorJobWait(jobId, options) {
|
|
1273
|
-
const payload = await new (0,
|
|
1283
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1274
1284
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1275
1285
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1276
1286
|
});
|
|
1277
|
-
|
|
1287
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
1278
1288
|
json: options.json,
|
|
1279
1289
|
text: renderMonitorJob(payload)
|
|
1280
1290
|
});
|
|
1281
1291
|
}
|
|
1282
1292
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1283
1293
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1284
|
-
const payload = await new (0,
|
|
1294
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1285
1295
|
...limit === void 0 ? {} : { limit }
|
|
1286
1296
|
});
|
|
1287
|
-
|
|
1297
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1288
1298
|
}
|
|
1289
1299
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1290
|
-
const payload = await new (0,
|
|
1291
|
-
|
|
1300
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1301
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
1292
1302
|
json: options.json,
|
|
1293
1303
|
text: renderMonitorJob(payload)
|
|
1294
1304
|
});
|
|
@@ -1605,7 +1615,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1605
1615
|
`;
|
|
1606
1616
|
}
|
|
1607
1617
|
function reportFleetState(payload, error, options) {
|
|
1608
|
-
|
|
1618
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1609
1619
|
{
|
|
1610
1620
|
...payload,
|
|
1611
1621
|
code: error.code,
|
|
@@ -1737,7 +1747,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1737
1747
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1738
1748
|
`, "utf8");
|
|
1739
1749
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1740
|
-
|
|
1750
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
1741
1751
|
{ schemaVersion: 2, file, definition, next },
|
|
1742
1752
|
{
|
|
1743
1753
|
json: options.json,
|
|
@@ -1799,7 +1809,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1799
1809
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1800
1810
|
);
|
|
1801
1811
|
}
|
|
1802
|
-
const client = new (0,
|
|
1812
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
1803
1813
|
const payload = await client.monitors.fleets.sync(
|
|
1804
1814
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1805
1815
|
{
|
|
@@ -1821,7 +1831,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1821
1831
|
}
|
|
1822
1832
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1823
1833
|
if (!options.wait || options.dryRun) {
|
|
1824
|
-
|
|
1834
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1825
1835
|
json: options.json,
|
|
1826
1836
|
text: renderFleetSync(payload, {
|
|
1827
1837
|
fleetId,
|
|
@@ -1847,7 +1857,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1847
1857
|
const status = fleetStatus(final);
|
|
1848
1858
|
const summary = renderFleetGet(final);
|
|
1849
1859
|
if (status === "converged") {
|
|
1850
|
-
|
|
1860
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1851
1861
|
return;
|
|
1852
1862
|
}
|
|
1853
1863
|
if (status === "billing_suspended") {
|
|
@@ -1887,14 +1897,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1887
1897
|
);
|
|
1888
1898
|
}
|
|
1889
1899
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1890
|
-
const client = new (0,
|
|
1900
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
1891
1901
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1892
1902
|
...options.drift ? { drift: true } : {},
|
|
1893
1903
|
...limit !== void 0 ? { limit } : {}
|
|
1894
1904
|
});
|
|
1895
1905
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1896
1906
|
if (!options.check) {
|
|
1897
|
-
|
|
1907
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1898
1908
|
return;
|
|
1899
1909
|
}
|
|
1900
1910
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1902,7 +1912,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1902
1912
|
);
|
|
1903
1913
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1904
1914
|
if (unconverged.length === 0) {
|
|
1905
|
-
|
|
1915
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1906
1916
|
return;
|
|
1907
1917
|
}
|
|
1908
1918
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2065,7 +2075,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2065
2075
|
}
|
|
2066
2076
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2067
2077
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2068
|
-
const client = new (0,
|
|
2078
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
2069
2079
|
if (fleetId) {
|
|
2070
2080
|
const listOnly = [
|
|
2071
2081
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2080,7 +2090,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2080
2090
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2081
2091
|
...window ? { window } : {}
|
|
2082
2092
|
});
|
|
2083
|
-
|
|
2093
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2084
2094
|
json: options.json,
|
|
2085
2095
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2086
2096
|
});
|
|
@@ -2096,7 +2106,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2096
2106
|
...sort ? { sort } : {},
|
|
2097
2107
|
...window ? { window } : {}
|
|
2098
2108
|
});
|
|
2099
|
-
|
|
2109
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
2100
2110
|
json: options.json,
|
|
2101
2111
|
text: renderFleetOverviewList(payload)
|
|
2102
2112
|
});
|
|
@@ -2107,13 +2117,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2107
2117
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2108
2118
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2109
2119
|
}
|
|
2110
|
-
const payload = await new (0,
|
|
2120
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2111
2121
|
...group ? { group } : {},
|
|
2112
2122
|
...options.cause ? { cause: options.cause } : {},
|
|
2113
2123
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2114
2124
|
...limit !== void 0 ? { limit } : {}
|
|
2115
2125
|
});
|
|
2116
|
-
|
|
2126
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, {
|
|
2117
2127
|
json: options.json,
|
|
2118
2128
|
text: renderFleetIssuePage(payload)
|
|
2119
2129
|
});
|
|
@@ -2142,13 +2152,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2142
2152
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2143
2153
|
);
|
|
2144
2154
|
}
|
|
2145
|
-
const client = new (0,
|
|
2155
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
2146
2156
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2147
2157
|
idempotencyKey
|
|
2148
2158
|
});
|
|
2149
2159
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2150
2160
|
if (!options.wait) {
|
|
2151
|
-
|
|
2161
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2152
2162
|
json: options.json,
|
|
2153
2163
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2154
2164
|
idempotency key ${idempotencyKey}
|
|
@@ -2171,7 +2181,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2171
2181
|
const envelope = { ...accepted, ...final };
|
|
2172
2182
|
const text = renderFleetGet(final);
|
|
2173
2183
|
if (fleetStatus(final) === "converged") {
|
|
2174
|
-
|
|
2184
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2175
2185
|
return;
|
|
2176
2186
|
}
|
|
2177
2187
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2220,7 +2230,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2220
2230
|
}
|
|
2221
2231
|
}
|
|
2222
2232
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2223
|
-
const client = new (0,
|
|
2233
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
2224
2234
|
if (options.dryRun) {
|
|
2225
2235
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2226
2236
|
dryRun: true,
|
|
@@ -2230,7 +2240,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2230
2240
|
command: "deepline monitors fleets deactivate",
|
|
2231
2241
|
mutation: "fleet deactivate"
|
|
2232
2242
|
});
|
|
2233
|
-
|
|
2243
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, plan, {
|
|
2234
2244
|
json: options.json,
|
|
2235
2245
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2236
2246
|
});
|
|
@@ -2268,7 +2278,7 @@ Preview the blast radius first:
|
|
|
2268
2278
|
});
|
|
2269
2279
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2270
2280
|
if (payload.already === true) {
|
|
2271
|
-
|
|
2281
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2272
2282
|
json: options.json,
|
|
2273
2283
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2274
2284
|
`
|
|
@@ -2280,7 +2290,7 @@ Preview the blast radius first:
|
|
|
2280
2290
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2281
2291
|
` : "");
|
|
2282
2292
|
if (!options.wait) {
|
|
2283
|
-
|
|
2293
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2284
2294
|
json: options.json,
|
|
2285
2295
|
text: acceptedText
|
|
2286
2296
|
});
|
|
@@ -2302,7 +2312,7 @@ Preview the blast radius first:
|
|
|
2302
2312
|
const envelope = { ...accepted, ...final };
|
|
2303
2313
|
const summary = renderFleetGet(final);
|
|
2304
2314
|
if (fleetStatus(final) === "deactivated") {
|
|
2305
|
-
|
|
2315
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2306
2316
|
return;
|
|
2307
2317
|
}
|
|
2308
2318
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2341,7 +2351,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2341
2351
|
"Agent notes:",
|
|
2342
2352
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2343
2353
|
];
|
|
2344
|
-
|
|
2354
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
2345
2355
|
{
|
|
2346
2356
|
schemaVersion: 1,
|
|
2347
2357
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2378,6 +2388,7 @@ function renderMonitorGet(payload) {
|
|
|
2378
2388
|
`Tool: ${tool}`,
|
|
2379
2389
|
...monitorType ? [`Type: ${monitorType}`] : [],
|
|
2380
2390
|
...state ? [`Status: ${state}`] : [],
|
|
2391
|
+
...state === "errored" && monitorFailureMessage(payload) ? [`Error: ${monitorFailureMessage(payload)}`] : [],
|
|
2381
2392
|
...hasLastReceivedEvent ? [`Latest inbound event: ${_nullishCoalesce(lastReceivedEvent, () => ( "never"))}`] : [],
|
|
2382
2393
|
...pricingLine ? [`Pricing: ${pricingLine}`] : [],
|
|
2383
2394
|
...nextRenewalAt ? [`Next renewal: ${nextRenewalAt}`] : []
|
|
@@ -2502,7 +2513,7 @@ function renderMonitorGet(payload) {
|
|
|
2502
2513
|
`;
|
|
2503
2514
|
}
|
|
2504
2515
|
async function handleMonitorsGet(key, options) {
|
|
2505
|
-
const client = new (0,
|
|
2516
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
2506
2517
|
const payload = await client.monitors.get(key);
|
|
2507
2518
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2508
2519
|
const dependents = boundPlays ? {
|
|
@@ -2510,24 +2521,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2510
2521
|
truncated: payload.consumer_health_truncated === true
|
|
2511
2522
|
} : await client.monitors.dependents(key);
|
|
2512
2523
|
const detail = { ...payload, dependents };
|
|
2513
|
-
|
|
2524
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, detail, {
|
|
2514
2525
|
json: options.json,
|
|
2515
2526
|
text: renderMonitorGet(detail)
|
|
2516
2527
|
});
|
|
2517
2528
|
}
|
|
2518
2529
|
async function handleMonitorsTest(key, payload, options) {
|
|
2519
2530
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2520
|
-
const result = await new (0,
|
|
2531
|
+
const result = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2521
2532
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2522
2533
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2523
2534
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2524
2535
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2525
2536
|
`;
|
|
2526
|
-
|
|
2537
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2527
2538
|
}
|
|
2528
2539
|
async function handleMonitorsValidate(key, options) {
|
|
2529
|
-
const result = await new (0,
|
|
2530
|
-
|
|
2540
|
+
const result = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.validate(key);
|
|
2541
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2531
2542
|
if (result.valid === false) process.exitCode = 7;
|
|
2532
2543
|
}
|
|
2533
2544
|
async function confirmMonitorDelete(key) {
|
|
@@ -2545,14 +2556,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2545
2556
|
}
|
|
2546
2557
|
}
|
|
2547
2558
|
async function handleMonitorsDelete(key, options) {
|
|
2548
|
-
const client = new (0,
|
|
2559
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
2549
2560
|
if (options.dryRun) {
|
|
2550
2561
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2551
2562
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2552
2563
|
command: "deepline monitors delete",
|
|
2553
2564
|
mutation: "delete"
|
|
2554
2565
|
});
|
|
2555
|
-
|
|
2566
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2556
2567
|
json: options.json,
|
|
2557
2568
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2558
2569
|
});
|
|
@@ -2572,7 +2583,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2572
2583
|
}
|
|
2573
2584
|
}
|
|
2574
2585
|
const payload = await client.monitors.delete(key);
|
|
2575
|
-
|
|
2586
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2576
2587
|
}
|
|
2577
2588
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2578
2589
|
const body = resolveMonitorJsonBody({
|
|
@@ -2581,25 +2592,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2581
2592
|
argLabel: "<patch>",
|
|
2582
2593
|
command: `deepline monitors update ${key}`
|
|
2583
2594
|
});
|
|
2584
|
-
const payload = await new (0,
|
|
2585
|
-
|
|
2595
|
+
const payload = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.update(key, body);
|
|
2596
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2586
2597
|
}
|
|
2587
2598
|
async function handleMonitorsReactivate(key, options) {
|
|
2588
|
-
const client = new (0,
|
|
2599
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
2589
2600
|
if (options.dryRun) {
|
|
2590
2601
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2591
2602
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2592
2603
|
command: "deepline monitors reactivate",
|
|
2593
2604
|
mutation: "reactivate"
|
|
2594
2605
|
});
|
|
2595
|
-
|
|
2606
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2596
2607
|
json: options.json,
|
|
2597
2608
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2598
2609
|
});
|
|
2599
2610
|
return;
|
|
2600
2611
|
}
|
|
2601
2612
|
const payload = await client.monitors.reactivate(key);
|
|
2602
|
-
|
|
2613
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2603
2614
|
}
|
|
2604
2615
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2605
2616
|
function monitorHealthLine(health) {
|
|
@@ -2721,7 +2732,7 @@ function monitorHealthText(health) {
|
|
|
2721
2732
|
`;
|
|
2722
2733
|
}
|
|
2723
2734
|
async function handleMonitorsAudit(options) {
|
|
2724
|
-
const client = new (0,
|
|
2735
|
+
const client = new (0, _chunkTVADI7K5js.DeeplineClient)();
|
|
2725
2736
|
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2726
2737
|
const scope = fleetId ? { fleetId } : {};
|
|
2727
2738
|
let result = await client.monitors.audit(scope);
|
|
@@ -2765,7 +2776,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2765
2776
|
"",
|
|
2766
2777
|
monitorHealthText(health)
|
|
2767
2778
|
].join("\n");
|
|
2768
|
-
|
|
2779
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
2769
2780
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2770
2781
|
{ json: options.json, text }
|
|
2771
2782
|
);
|
|
@@ -2778,10 +2789,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2778
2789
|
}
|
|
2779
2790
|
async function handleMonitorsHealth(options) {
|
|
2780
2791
|
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2781
|
-
const health = await new (0,
|
|
2792
|
+
const health = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.health(
|
|
2782
2793
|
fleetId ? { fleetId } : {}
|
|
2783
2794
|
);
|
|
2784
|
-
|
|
2795
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, health, {
|
|
2785
2796
|
json: options.json,
|
|
2786
2797
|
text: monitorHealthText(health)
|
|
2787
2798
|
});
|
|
@@ -2855,14 +2866,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2855
2866
|
"deploy",
|
|
2856
2867
|
options.idempotencyKey
|
|
2857
2868
|
);
|
|
2858
|
-
const result = await new (0,
|
|
2869
|
+
const result = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.batch.submit({
|
|
2859
2870
|
kind: "deploy",
|
|
2860
2871
|
manifestNdjson,
|
|
2861
2872
|
dryRun: options.dryRun === true,
|
|
2862
2873
|
idempotencyKey
|
|
2863
2874
|
});
|
|
2864
2875
|
const operation = result.operation;
|
|
2865
|
-
|
|
2876
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
2866
2877
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2867
2878
|
{
|
|
2868
2879
|
json: options.json,
|
|
@@ -2890,7 +2901,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2890
2901
|
kind,
|
|
2891
2902
|
options.idempotencyKey
|
|
2892
2903
|
);
|
|
2893
|
-
const result = await new (0,
|
|
2904
|
+
const result = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.batch.submit({
|
|
2894
2905
|
kind,
|
|
2895
2906
|
scope,
|
|
2896
2907
|
dryRun: options.dryRun === true,
|
|
@@ -2903,14 +2914,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2903
2914
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2904
2915
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2905
2916
|
].join("\n");
|
|
2906
|
-
|
|
2917
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0,
|
|
2907
2918
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2908
2919
|
{ json: options.json, text: `${text}
|
|
2909
2920
|
` }
|
|
2910
2921
|
);
|
|
2911
2922
|
}
|
|
2912
2923
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2913
|
-
const result = await new (0,
|
|
2924
|
+
const result = await new (0, _chunkTVADI7K5js.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2914
2925
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2915
2926
|
});
|
|
2916
2927
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2922,7 +2933,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2922
2933
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2923
2934
|
] : []
|
|
2924
2935
|
].join("\n");
|
|
2925
|
-
|
|
2936
|
+
_chunkJUYW6TSUjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2926
2937
|
` });
|
|
2927
2938
|
}
|
|
2928
2939
|
function registerMonitorsCommands(program) {
|
|
@@ -3209,12 +3220,15 @@ Examples:
|
|
|
3209
3220
|
"after",
|
|
3210
3221
|
`
|
|
3211
3222
|
Notes:
|
|
3212
|
-
Read-only. A monitor has one of
|
|
3213
|
-
billing_suspended, or disabled. provisioning means the create was
|
|
3214
|
-
but the provider has not confirmed the monitor yet; it delivers no
|
|
3215
|
-
does not bill until it becomes active.
|
|
3216
|
-
|
|
3217
|
-
|
|
3223
|
+
Read-only. A monitor has one of five customer states: active, provisioning,
|
|
3224
|
+
billing_suspended, errored, or disabled. provisioning means the create was
|
|
3225
|
+
recorded but the provider has not confirmed the monitor yet; it delivers no
|
|
3226
|
+
events and does not bill until it becomes active. errored means the provider
|
|
3227
|
+
stopped the monitor after it was created (for example its LinkedIn URL no
|
|
3228
|
+
longer resolves); its failure.message says what to do. Fix it by updating the
|
|
3229
|
+
monitor's payload, which creates a fresh monitor, or delete it. Resubmitting
|
|
3230
|
+
the same payload leaves it errored. Cleanup and retries are reported by
|
|
3231
|
+
Monitor Jobs; provider disagreement is reported separately by audit/health. The output echoes the canonical state filter that was applied.
|
|
3218
3232
|
The legacy --status flag remains accepted for installed clients. The response reports
|
|
3219
3233
|
total (the true registry count, not the page size), returned, has_more, and
|
|
3220
3234
|
next_cursor. When has_more is true, page with --cursor <next_cursor> until it
|
|
@@ -3235,7 +3249,7 @@ Examples:
|
|
|
3235
3249
|
`
|
|
3236
3250
|
).option(
|
|
3237
3251
|
"--state <state>",
|
|
3238
|
-
"Filter by customer state: active (default), provisioning, billing_suspended, disabled, or all"
|
|
3252
|
+
"Filter by customer state: active (default), provisioning, billing_suspended, errored, disabled, or all"
|
|
3239
3253
|
).option(
|
|
3240
3254
|
"--status <status>",
|
|
3241
3255
|
"Deprecated compatibility filter; use --state (active, provisioning, billing_suspended, disabled, or all)"
|
|
@@ -3267,8 +3281,9 @@ Notes:
|
|
|
3267
3281
|
one monitor with every Play it can trigger and that monitor's latest run.
|
|
3268
3282
|
|
|
3269
3283
|
Statuses: active, setting_up, paused_credits, paused_cap, paused_billing,
|
|
3270
|
-
stopped. Every status except stopped is shown by default; repeat
|
|
3271
|
-
choose.
|
|
3284
|
+
errored, stopped. Every status except stopped is shown by default; repeat
|
|
3285
|
+
--state to choose. errored means the provider stopped the monitor; update
|
|
3286
|
+
its payload or remove it. A Play is listed when a finding can trigger it: "some findings" means
|
|
3272
3287
|
its own where filter decides per finding, and it is omitted only when a
|
|
3273
3288
|
_dl_monitor_id filter excludes this monitor. Failing Plays (their latest
|
|
3274
3289
|
completed monitor-triggered run failed) are listed first.
|
|
@@ -3300,7 +3315,7 @@ Examples:
|
|
|
3300
3315
|
"Search name, key, subject, signal and deploy filters"
|
|
3301
3316
|
).option(
|
|
3302
3317
|
"--state <state>",
|
|
3303
|
-
"Include a status (repeatable): active, setting_up, paused_credits, paused_cap, paused_billing, stopped",
|
|
3318
|
+
"Include a status (repeatable): active, setting_up, paused_credits, paused_cap, paused_billing, errored, stopped",
|
|
3304
3319
|
collect
|
|
3305
3320
|
).option(
|
|
3306
3321
|
"--signal <key>",
|
|
@@ -3891,7 +3906,7 @@ Example:
|
|
|
3891
3906
|
const deployed = withJsonOption(
|
|
3892
3907
|
monitors.command("deployed", { hidden: true }).description("Alias of `monitors list` (plus get/update/delete aliases).").option(
|
|
3893
3908
|
"--state <state>",
|
|
3894
|
-
"Filter by customer state: active (default), provisioning, billing_suspended, disabled, or all"
|
|
3909
|
+
"Filter by customer state: active (default), provisioning, billing_suspended, errored, disabled, or all"
|
|
3895
3910
|
).option(
|
|
3896
3911
|
"--status <status>",
|
|
3897
3912
|
"Deprecated compatibility filter; use --state (active, provisioning, billing_suspended, disabled, or all)"
|