deepline 0.3.503 → 0.3.504
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/http-error-response.ts +35 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +13 -0
- package/dist/cli/{auth-IC4WLSE3.mjs → auth-3L5AA5AX.mjs} +5 -5
- package/dist/cli/auth-UPK4IIIN.js +43 -0
- package/dist/cli/{billing-2VOV64SD.mjs → billing-E7EASVPO.mjs} +19 -12
- package/dist/cli/{billing-LWQOII22.js → billing-HOGXVE2V.js} +92 -85
- package/dist/cli/{chunk-FHJ54BHH.mjs → chunk-22OCKCYS.mjs} +1 -1
- package/dist/cli/{chunk-D27HP3HS.mjs → chunk-2ABRDH3B.mjs} +2 -2
- package/dist/cli/{chunk-WHP3FJ7T.js → chunk-2W77YCKH.js} +5 -5
- package/dist/cli/{chunk-KGLVATEB.mjs → chunk-3MLFFWDM.mjs} +2 -2
- package/dist/cli/{chunk-K7NFFQFU.mjs → chunk-4CC67XH5.mjs} +2 -2
- package/dist/cli/{chunk-DPI5OYVU.mjs → chunk-5CHBIJIM.mjs} +2 -2
- package/dist/cli/chunk-5LUF4LAR.mjs +209 -0
- package/dist/cli/{chunk-A2C6ONWA.js → chunk-5Z6EULD5.js} +6 -6
- package/dist/cli/{chunk-33JUK73X.js → chunk-67OI26OE.js} +7 -7
- package/dist/cli/{chunk-IIP46RVC.js → chunk-6JNBMTCZ.js} +1 -1
- package/dist/cli/{chunk-HRTDCXHI.js → chunk-6SMR7LU7.js} +2 -2
- package/dist/cli/{chunk-7HEDCIR3.mjs → chunk-7F4OEHQK.mjs} +1 -1
- package/dist/cli/{chunk-C5RQTTLP.js → chunk-7P2QVMBP.js} +7 -7
- package/dist/cli/{chunk-MJQOG4TZ.js → chunk-A6LA42JY.js} +16 -16
- package/dist/cli/{chunk-XYZZZLN6.mjs → chunk-BTWUNKKX.mjs} +2 -2
- package/dist/cli/{chunk-EDMV4JT5.mjs → chunk-BX45XMXZ.mjs} +2 -2
- package/dist/cli/{chunk-GIHNEYBG.mjs → chunk-DEAJVQEG.mjs} +1 -1
- package/dist/cli/{chunk-2K2QBLYO.js → chunk-FISP4LCK.js} +53 -53
- package/dist/cli/{chunk-26RSSTCF.js → chunk-FTRVCIGC.js} +26 -26
- package/dist/cli/{chunk-JJVN7OIX.mjs → chunk-GGBXNQCR.mjs} +4 -4
- package/dist/cli/{chunk-4IIYSBEP.js → chunk-GJ2DA35C.js} +30 -4
- package/dist/cli/{chunk-RVOBFO7C.js → chunk-GRAGUYIE.js} +41 -41
- package/dist/cli/{chunk-ZEQPCEV4.mjs → chunk-HUX5DZO6.mjs} +3 -3
- package/dist/cli/{chunk-6XTE6C3W.mjs → chunk-IGNQKOWT.mjs} +10 -10
- package/dist/cli/{chunk-FVDTERO2.js → chunk-IPAMOMGP.js} +21 -21
- package/dist/cli/{chunk-FZHOWPSN.js → chunk-JPR2546F.js} +16 -16
- package/dist/cli/{chunk-3CXHK4TW.js → chunk-KCKAFTPY.js} +6 -6
- package/dist/cli/{chunk-2626LTU3.js → chunk-KGUGNEKL.js} +96 -96
- package/dist/cli/{chunk-QIEYEY6Z.js → chunk-LHXYCZYO.js} +8 -8
- package/dist/cli/{chunk-PVA3MWCO.js → chunk-MJTK6Q3G.js} +3 -3
- package/dist/cli/{chunk-EQ3WMKFY.mjs → chunk-MLMWM5DV.mjs} +5 -5
- package/dist/cli/{chunk-VC5B462T.mjs → chunk-NZ7Z7WNM.mjs} +2 -2
- package/dist/cli/{chunk-5GI6NKOE.mjs → chunk-OX2D6BG4.mjs} +1 -1
- package/dist/cli/{chunk-F73PD2XD.js → chunk-QKKU2FH4.js} +7 -7
- package/dist/cli/{chunk-URZNSJE2.mjs → chunk-QOLX2O2S.mjs} +4 -4
- package/dist/cli/chunk-R7J7CJPZ.js +209 -0
- package/dist/cli/{chunk-TCQYWZFS.js → chunk-SMSQVRHE.js} +5 -5
- package/dist/cli/{chunk-J6RBOLK7.mjs → chunk-SVFTZTCI.mjs} +1 -1
- package/dist/cli/{chunk-5M5WSFRZ.mjs → chunk-UFYJTRSF.mjs} +28 -2
- package/dist/cli/{chunk-FIUTDSJX.js → chunk-UJMBG5JU.js} +4 -4
- package/dist/cli/{chunk-AARF4SOW.js → chunk-USTJEEND.js} +9 -9
- package/dist/cli/{chunk-YXGPMTAK.js → chunk-UXQQPMYO.js} +2 -2
- package/dist/cli/{chunk-GLZBFBJS.mjs → chunk-VJVJWZ6I.mjs} +5 -5
- package/dist/cli/{chunk-HS63YBT5.js → chunk-WBIDPDKJ.js} +3 -3
- package/dist/cli/{chunk-B3X4YWQ6.js → chunk-WZSFIJMG.js} +53 -53
- package/dist/cli/{chunk-BI2Q45SY.mjs → chunk-XHZSPMNC.mjs} +4 -4
- package/dist/cli/{chunk-L3TZV625.mjs → chunk-Y6XKCEPK.mjs} +1 -1
- package/dist/cli/{chunk-JPDD4Y53.mjs → chunk-Y7VEHKID.mjs} +6 -6
- package/dist/cli/{chunk-KPBBT6OS.mjs → chunk-YOQ2NNDO.mjs} +1 -1
- package/dist/cli/{chunk-WS274KID.mjs → chunk-Z6FXUDIL.mjs} +1 -1
- package/dist/cli/command-docs.d.mts +2 -1
- package/dist/cli/command-docs.d.ts +2 -1
- package/dist/cli/command-docs.js +6 -2
- package/dist/cli/command-docs.mjs +5 -1
- package/dist/cli/{csv-NEWCNOSZ.js → csv-2XWGPITO.js} +13 -13
- package/dist/cli/{csv-2TXOI3UE.mjs → csv-433JEHLQ.mjs} +4 -4
- package/dist/cli/{db-PX7EQEIG.mjs → db-K747DH43.mjs} +6 -6
- package/dist/cli/{db-J3IJS4OG.js → db-PJJMD4VH.js} +27 -27
- package/dist/cli/describe-OYS7LZJD.js +49 -0
- package/dist/cli/{describe-GQHGTZSL.mjs → describe-VEDDYW4P.mjs} +17 -17
- package/dist/cli/{executions-RO3TJUXL.js → executions-HM5T72H6.js} +8 -8
- package/dist/cli/{executions-FFKK24RY.mjs → executions-JWRX3XCT.mjs} +6 -6
- package/dist/cli/{feedback-XRR4HIS6.js → feedback-34UG4BO3.js} +8 -8
- package/dist/cli/{feedback-ZTO56SRL.mjs → feedback-MNSIA63Y.mjs} +4 -4
- package/dist/cli/git-5YQJSJFR.js +25 -0
- package/dist/cli/{git-FIPBVFYZ.mjs → git-ZKEOXV3A.mjs} +5 -5
- package/dist/cli/index.js +143 -141
- package/dist/cli/index.mjs +43 -41
- package/dist/cli/{legacy-noops-AMD2NWHF.mjs → legacy-noops-5M4T4ZVT.mjs} +5 -5
- package/dist/cli/{legacy-noops-MTBBGM27.js → legacy-noops-YXSI4FVU.js} +8 -8
- package/dist/cli/{monitors-24LDKDJX.mjs → monitors-C65OC4AW.mjs} +7 -7
- package/dist/cli/{monitors-42PIGLBF.js → monitors-O25GDOYE.js} +95 -95
- package/dist/cli/{org-GQMCA3MN.js → org-2GSPLY2A.js} +72 -72
- package/dist/cli/{org-4B7SCFRL.mjs → org-ZRMG5NS2.mjs} +6 -6
- package/dist/cli/{pages-RL2M62GJ.js → pages-45DPADK6.js} +18 -18
- package/dist/cli/{pages-PD5EGL2R.mjs → pages-TZZUFBRO.mjs} +6 -6
- package/dist/cli/{play-5V54VTUR.mjs → play-3D7HH273.mjs} +23 -217
- package/dist/cli/{play-FST6ZAHW.js → play-RCGMND6X.js} +323 -517
- package/dist/cli/{providers-HBUUPN7J.js → providers-3N3ECMTY.js} +9 -9
- package/dist/cli/{providers-N5YVCKPL.mjs → providers-PSAKV6CJ.mjs} +6 -6
- package/dist/cli/{quickstart-NJDDVTQR.mjs → quickstart-2A35SMGC.mjs} +4 -4
- package/dist/cli/{quickstart-4QIQNSHG.js → quickstart-6R6AIXM6.js} +6 -6
- package/dist/cli/{run-JHI5MTHD.mjs → run-F3TLDGUO.mjs} +22 -22
- package/dist/cli/{run-FGOKCG4J.js → run-F6ZXTASZ.js} +40 -40
- package/dist/cli/{search-EWIZBIY2.mjs → search-CZLCY3D2.mjs} +7 -7
- package/dist/cli/search-R5VEWJO2.js +32 -0
- package/dist/cli/{search-output-NAK3MWBH.mjs → search-output-MQTSTLN5.mjs} +4 -4
- package/dist/cli/{search-output-TMQTRC2W.js → search-output-R5XDNILW.js} +6 -6
- package/dist/cli/{secrets-ONQVW5SR.mjs → secrets-D3GF4B2Z.mjs} +6 -6
- package/dist/cli/{secrets-5TSUEOJB.js → secrets-DCJYHDSY.js} +15 -15
- package/dist/cli/{sessions-B7F5O3ZR.mjs → sessions-QGEQ2UYZ.mjs} +5 -5
- package/dist/cli/{sessions-BSGE5EET.js → sessions-Z4JYJSDP.js} +6 -6
- package/dist/cli/{settings-SGGFQV5R.mjs → settings-G7QEXA4N.mjs} +11 -11
- package/dist/cli/{settings-47LARBRU.js → settings-UVXXAT4A.js} +78 -78
- package/dist/cli/{setup-BNFZFXO6.js → setup-5I42W7D4.js} +49 -49
- package/dist/cli/{setup-ATGNXQUK.mjs → setup-QHJU3DUI.mjs} +9 -9
- package/dist/cli/{skills-CIMBRM5R.mjs → skills-5LRF4UKX.mjs} +7 -7
- package/dist/cli/skills-FB6TV52O.js +36 -0
- package/dist/cli/tools-L2364RPA.js +56 -0
- package/dist/cli/{tools-DTDXAULX.mjs → tools-PUT6STVG.mjs} +16 -16
- package/dist/cli/{update-EOIJBJCO.mjs → update-CJ2GA64X.mjs} +9 -9
- package/dist/cli/update-ESYJGYVZ.js +34 -0
- package/dist/cli/{workflow-IWXUJPWY.mjs → workflow-HVEWRTXD.mjs} +7 -7
- package/dist/cli/{workflow-V5VKPICQ.js → workflow-O67MEBCP.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +102 -100
- package/dist/plays/bundle-play-file.mjs +4 -4
- 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-ZCMSXZO4.js +0 -43
- package/dist/cli/describe-LE7EZCL4.js +0 -49
- package/dist/cli/git-26AH4XIO.js +0 -25
- package/dist/cli/search-CTKSEVSO.js +0 -32
- package/dist/cli/skills-6RD25MVM.js +0 -36
- package/dist/cli/tools-TDZH4XHS.js +0 -56
- package/dist/cli/update-Y32VT4VL.js +0 -34
|
@@ -1,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 _chunkSMSQVRHEjs = require('./chunk-SMSQVRHE.js');
|
|
5
|
+
require('./chunk-7P2QVMBP.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 _chunkMJTK6Q3Gjs = require('./chunk-MJTK6Q3G.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
26
|
+
var _chunkQKKU2FH4js = require('./chunk-QKKU2FH4.js');
|
|
27
|
+
require('./chunk-WBIDPDKJ.js');
|
|
28
|
+
require('./chunk-UJMBG5JU.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-6JNBMTCZ.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 = _chunkQKKU2FH4js.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
115
115
|
if (wantsJson) {
|
|
116
|
-
const payload =
|
|
117
|
-
|
|
116
|
+
const payload = _chunkQKKU2FH4js.errorToJsonPayload.call(void 0, error);
|
|
117
|
+
_chunkQKKU2FH4js.printJson.call(void 0, {
|
|
118
118
|
ok: false,
|
|
119
119
|
exitCode,
|
|
120
120
|
...next ? { next } : {},
|
|
@@ -529,14 +529,14 @@ Preview the plan first with:
|
|
|
529
529
|
);
|
|
530
530
|
}
|
|
531
531
|
async function handleMonitorsStatus(options) {
|
|
532
|
-
const payload = await new (0,
|
|
532
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.status();
|
|
533
533
|
const hasAccess = payload.has_access === true;
|
|
534
534
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
535
535
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
536
536
|
${reason}` : ""}
|
|
537
537
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
538
538
|
`;
|
|
539
|
-
|
|
539
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
540
540
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
541
541
|
{ json: options.json, text }
|
|
542
542
|
);
|
|
@@ -602,14 +602,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
605
|
-
const payload = await new (0,
|
|
605
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.available(tool, {
|
|
606
606
|
...options.provider ? { provider: options.provider } : {},
|
|
607
607
|
...options.search ? { search: options.search } : {},
|
|
608
608
|
...options.limit ? { limit: options.limit } : {},
|
|
609
609
|
...options.full ? { full: true } : {},
|
|
610
610
|
...options.compact ? { compact: true } : {}
|
|
611
611
|
});
|
|
612
|
-
|
|
612
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
613
613
|
json: options.json,
|
|
614
614
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
615
615
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -712,14 +712,14 @@ async function handleMonitorsList(options) {
|
|
|
712
712
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
713
713
|
);
|
|
714
714
|
}
|
|
715
|
-
const payload = await new (0,
|
|
715
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.list({
|
|
716
716
|
...state ? { state } : {},
|
|
717
717
|
...options.status ? { status: options.status } : {},
|
|
718
718
|
...options.limit ? { limit: options.limit } : {},
|
|
719
719
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
720
720
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
721
721
|
});
|
|
722
|
-
|
|
722
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
723
723
|
json: options.json,
|
|
724
724
|
text: renderDeployedListText(
|
|
725
725
|
payload,
|
|
@@ -800,7 +800,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
800
800
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
801
801
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
802
802
|
async function handleMonitorsLedger(key, options) {
|
|
803
|
-
const client = new (0,
|
|
803
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
804
804
|
if (options.findings) {
|
|
805
805
|
if (!key) {
|
|
806
806
|
throw new MonitorsUsageError(
|
|
@@ -810,12 +810,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
810
810
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
811
811
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
812
812
|
});
|
|
813
|
-
|
|
813
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
814
814
|
return;
|
|
815
815
|
}
|
|
816
816
|
if (key) {
|
|
817
817
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
818
|
-
|
|
818
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
819
819
|
return;
|
|
820
820
|
}
|
|
821
821
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -838,7 +838,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
838
838
|
...options.limit ? { limit: options.limit } : {},
|
|
839
839
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
840
840
|
});
|
|
841
|
-
|
|
841
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
842
842
|
json: options.json,
|
|
843
843
|
text: renderMonitorLedgerText(payload)
|
|
844
844
|
});
|
|
@@ -850,10 +850,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
850
850
|
argLabel: "<definition>",
|
|
851
851
|
command: "deepline monitors check"
|
|
852
852
|
});
|
|
853
|
-
const payload = await new (0,
|
|
853
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.check(
|
|
854
854
|
body
|
|
855
855
|
);
|
|
856
|
-
|
|
856
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
857
857
|
}
|
|
858
858
|
function previewText(value) {
|
|
859
859
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -911,22 +911,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
911
911
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
912
912
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
913
913
|
}
|
|
914
|
-
const wantsJson =
|
|
914
|
+
const wantsJson = _chunkQKKU2FH4js.shouldEmitJson.call(void 0, options.json);
|
|
915
915
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
916
916
|
throw new MonitorsUsageError(
|
|
917
917
|
"--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."
|
|
918
918
|
);
|
|
919
919
|
}
|
|
920
920
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
921
|
-
const progress =
|
|
921
|
+
const progress = _chunkMJTK6Q3Gjs.createCliProgress.call(void 0, !wantsJson);
|
|
922
922
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
923
923
|
try {
|
|
924
|
-
const payload = await new (0,
|
|
924
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.preview(
|
|
925
925
|
body,
|
|
926
926
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
927
927
|
);
|
|
928
928
|
progress.complete();
|
|
929
|
-
|
|
929
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
930
930
|
json: options.json,
|
|
931
931
|
text: renderMonitorPreviewText(payload)
|
|
932
932
|
});
|
|
@@ -971,7 +971,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
971
971
|
argLabel: "<definition>",
|
|
972
972
|
command: "deepline monitors deploy"
|
|
973
973
|
});
|
|
974
|
-
const client = new (0,
|
|
974
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
975
975
|
const definitionArg = body;
|
|
976
976
|
if (options.dryRun) {
|
|
977
977
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -979,7 +979,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
979
979
|
});
|
|
980
980
|
const valid = payload2.valid !== false;
|
|
981
981
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
982
|
-
|
|
982
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
983
983
|
{ dry_run: true, ...payload2 },
|
|
984
984
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
985
985
|
);
|
|
@@ -989,7 +989,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
991
|
const payload = await client.monitors.deploy(definitionArg);
|
|
992
|
-
|
|
992
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
993
993
|
json: options.json,
|
|
994
994
|
text: renderMonitorDeployCompletion(payload)
|
|
995
995
|
});
|
|
@@ -1001,29 +1001,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1001
1001
|
argLabel: "<definition>",
|
|
1002
1002
|
command: "deepline monitors sync"
|
|
1003
1003
|
});
|
|
1004
|
-
const payload = await new (0,
|
|
1004
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.sync(body, {
|
|
1005
1005
|
...options.dryRun ? { dryRun: true } : {},
|
|
1006
1006
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1007
1007
|
});
|
|
1008
1008
|
if (options.dryRun) {
|
|
1009
1009
|
const plan = payload;
|
|
1010
|
-
|
|
1010
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1011
1011
|
{ dry_run: true, ...plan },
|
|
1012
1012
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1013
1013
|
);
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
1016
|
-
|
|
1016
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
1017
1017
|
json: options.json,
|
|
1018
1018
|
text: renderMonitorJob(payload)
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
1021
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1022
|
-
const payload = await new (0,
|
|
1022
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors[action](key, {
|
|
1023
1023
|
...options.dryRun ? { dryRun: true } : {},
|
|
1024
1024
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1025
1025
|
});
|
|
1026
|
-
|
|
1026
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
1027
1027
|
json: options.json,
|
|
1028
1028
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1029
1029
|
});
|
|
@@ -1112,11 +1112,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1112
1112
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1113
1113
|
);
|
|
1114
1114
|
}
|
|
1115
|
-
const payload = await new (0,
|
|
1115
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.batch.deploy(
|
|
1116
1116
|
lint.normalized.monitors,
|
|
1117
1117
|
{ idempotencyKey }
|
|
1118
1118
|
);
|
|
1119
|
-
|
|
1119
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1120
1120
|
{
|
|
1121
1121
|
...payload,
|
|
1122
1122
|
idempotency_key: idempotencyKey,
|
|
@@ -1149,7 +1149,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1149
1149
|
);
|
|
1150
1150
|
}
|
|
1151
1151
|
if (options.dryRun) {
|
|
1152
|
-
|
|
1152
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1153
1153
|
{
|
|
1154
1154
|
ok: true,
|
|
1155
1155
|
dry_run: true,
|
|
@@ -1166,7 +1166,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1166
1166
|
"sync",
|
|
1167
1167
|
options.idempotencyKey
|
|
1168
1168
|
);
|
|
1169
|
-
const payload = await new (0,
|
|
1169
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.batches.sync(
|
|
1170
1170
|
batchId,
|
|
1171
1171
|
lint.normalized.monitors,
|
|
1172
1172
|
{
|
|
@@ -1174,14 +1174,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1174
1174
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1175
1175
|
}
|
|
1176
1176
|
);
|
|
1177
|
-
|
|
1177
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1178
1178
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1179
1179
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1180
1180
|
);
|
|
1181
1181
|
}
|
|
1182
1182
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1183
1183
|
if (options.dryRun) {
|
|
1184
|
-
|
|
1184
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1185
1185
|
{
|
|
1186
1186
|
ok: true,
|
|
1187
1187
|
dry_run: true,
|
|
@@ -1197,17 +1197,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1197
1197
|
intent,
|
|
1198
1198
|
options.idempotencyKey
|
|
1199
1199
|
);
|
|
1200
|
-
const payload = await new (0,
|
|
1200
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1201
1201
|
idempotencyKey
|
|
1202
1202
|
});
|
|
1203
|
-
|
|
1203
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1204
1204
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1205
1205
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1206
1206
|
);
|
|
1207
1207
|
}
|
|
1208
1208
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1209
|
-
const payload = await new (0,
|
|
1210
|
-
|
|
1209
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1210
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
1211
1211
|
json: options.json,
|
|
1212
1212
|
text: renderMonitorJob(payload)
|
|
1213
1213
|
});
|
|
@@ -1221,7 +1221,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1221
1221
|
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
1222
1222
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1223
1223
|
);
|
|
1224
|
-
|
|
1224
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1225
1225
|
{
|
|
1226
1226
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1227
1227
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1241,7 +1241,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1241
1241
|
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1242
1242
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1243
1243
|
);
|
|
1244
|
-
|
|
1244
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1245
1245
|
{
|
|
1246
1246
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1247
1247
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1253,32 +1253,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1253
1253
|
process.exitCode = 2;
|
|
1254
1254
|
}
|
|
1255
1255
|
async function handleMonitorJobGet(jobId, options) {
|
|
1256
|
-
const payload = await new (0,
|
|
1257
|
-
|
|
1256
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1257
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
1258
1258
|
json: options.json,
|
|
1259
1259
|
text: renderMonitorJob(payload)
|
|
1260
1260
|
});
|
|
1261
1261
|
}
|
|
1262
1262
|
async function handleMonitorJobWait(jobId, options) {
|
|
1263
|
-
const payload = await new (0,
|
|
1263
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1264
1264
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1265
1265
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1266
1266
|
});
|
|
1267
|
-
|
|
1267
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
1268
1268
|
json: options.json,
|
|
1269
1269
|
text: renderMonitorJob(payload)
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
1272
1272
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1273
1273
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1274
|
-
const payload = await new (0,
|
|
1274
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1275
1275
|
...limit === void 0 ? {} : { limit }
|
|
1276
1276
|
});
|
|
1277
|
-
|
|
1277
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1278
1278
|
}
|
|
1279
1279
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1280
|
-
const payload = await new (0,
|
|
1281
|
-
|
|
1280
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1281
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, {
|
|
1282
1282
|
json: options.json,
|
|
1283
1283
|
text: renderMonitorJob(payload)
|
|
1284
1284
|
});
|
|
@@ -1587,7 +1587,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1587
1587
|
`;
|
|
1588
1588
|
}
|
|
1589
1589
|
function reportFleetState(payload, error, options) {
|
|
1590
|
-
|
|
1590
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1591
1591
|
{
|
|
1592
1592
|
...payload,
|
|
1593
1593
|
code: error.code,
|
|
@@ -1719,7 +1719,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1719
1719
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1720
1720
|
`, "utf8");
|
|
1721
1721
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1722
|
-
|
|
1722
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
1723
1723
|
{ schemaVersion: 2, file, definition, next },
|
|
1724
1724
|
{
|
|
1725
1725
|
json: options.json,
|
|
@@ -1781,7 +1781,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1781
1781
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1782
1782
|
);
|
|
1783
1783
|
}
|
|
1784
|
-
const client = new (0,
|
|
1784
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
1785
1785
|
const payload = await client.monitors.fleets.sync(
|
|
1786
1786
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1787
1787
|
{
|
|
@@ -1803,7 +1803,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1803
1803
|
}
|
|
1804
1804
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1805
1805
|
if (!options.wait || options.dryRun) {
|
|
1806
|
-
|
|
1806
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, accepted, {
|
|
1807
1807
|
json: options.json,
|
|
1808
1808
|
text: renderFleetSync(payload, {
|
|
1809
1809
|
fleetId,
|
|
@@ -1829,7 +1829,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1829
1829
|
const status = fleetStatus(final);
|
|
1830
1830
|
const summary = renderFleetGet(final);
|
|
1831
1831
|
if (status === "converged") {
|
|
1832
|
-
|
|
1832
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1833
1833
|
return;
|
|
1834
1834
|
}
|
|
1835
1835
|
if (status === "billing_suspended") {
|
|
@@ -1869,14 +1869,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1869
1869
|
);
|
|
1870
1870
|
}
|
|
1871
1871
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1872
|
-
const client = new (0,
|
|
1872
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
1873
1873
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1874
1874
|
...options.drift ? { drift: true } : {},
|
|
1875
1875
|
...limit !== void 0 ? { limit } : {}
|
|
1876
1876
|
});
|
|
1877
1877
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1878
1878
|
if (!options.check) {
|
|
1879
|
-
|
|
1879
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1880
1880
|
return;
|
|
1881
1881
|
}
|
|
1882
1882
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1884,7 +1884,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1884
1884
|
);
|
|
1885
1885
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1886
1886
|
if (unconverged.length === 0) {
|
|
1887
|
-
|
|
1887
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1888
1888
|
return;
|
|
1889
1889
|
}
|
|
1890
1890
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -1923,13 +1923,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1923
1923
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
1924
1924
|
);
|
|
1925
1925
|
}
|
|
1926
|
-
const client = new (0,
|
|
1926
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
1927
1927
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
1928
1928
|
idempotencyKey
|
|
1929
1929
|
});
|
|
1930
1930
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1931
1931
|
if (!options.wait) {
|
|
1932
|
-
|
|
1932
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, accepted, {
|
|
1933
1933
|
json: options.json,
|
|
1934
1934
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
1935
1935
|
idempotency key ${idempotencyKey}
|
|
@@ -1952,7 +1952,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1952
1952
|
const envelope = { ...accepted, ...final };
|
|
1953
1953
|
const text = renderFleetGet(final);
|
|
1954
1954
|
if (fleetStatus(final) === "converged") {
|
|
1955
|
-
|
|
1955
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
1956
1956
|
return;
|
|
1957
1957
|
}
|
|
1958
1958
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2001,7 +2001,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
2003
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2004
|
-
const client = new (0,
|
|
2004
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
2005
2005
|
if (options.dryRun) {
|
|
2006
2006
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2007
2007
|
dryRun: true,
|
|
@@ -2011,7 +2011,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2011
2011
|
command: "deepline monitors fleets deactivate",
|
|
2012
2012
|
mutation: "fleet deactivate"
|
|
2013
2013
|
});
|
|
2014
|
-
|
|
2014
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, plan, {
|
|
2015
2015
|
json: options.json,
|
|
2016
2016
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2017
2017
|
});
|
|
@@ -2049,7 +2049,7 @@ Preview the blast radius first:
|
|
|
2049
2049
|
});
|
|
2050
2050
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2051
2051
|
if (payload.already === true) {
|
|
2052
|
-
|
|
2052
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, accepted, {
|
|
2053
2053
|
json: options.json,
|
|
2054
2054
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2055
2055
|
`
|
|
@@ -2061,7 +2061,7 @@ Preview the blast radius first:
|
|
|
2061
2061
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2062
2062
|
` : "");
|
|
2063
2063
|
if (!options.wait) {
|
|
2064
|
-
|
|
2064
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, accepted, {
|
|
2065
2065
|
json: options.json,
|
|
2066
2066
|
text: acceptedText
|
|
2067
2067
|
});
|
|
@@ -2083,7 +2083,7 @@ Preview the blast radius first:
|
|
|
2083
2083
|
const envelope = { ...accepted, ...final };
|
|
2084
2084
|
const summary = renderFleetGet(final);
|
|
2085
2085
|
if (fleetStatus(final) === "deactivated") {
|
|
2086
|
-
|
|
2086
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2087
2087
|
return;
|
|
2088
2088
|
}
|
|
2089
2089
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2122,7 +2122,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2122
2122
|
"Agent notes:",
|
|
2123
2123
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2124
2124
|
];
|
|
2125
|
-
|
|
2125
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
2126
2126
|
{
|
|
2127
2127
|
schemaVersion: 1,
|
|
2128
2128
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2283,7 +2283,7 @@ function renderMonitorGet(payload) {
|
|
|
2283
2283
|
`;
|
|
2284
2284
|
}
|
|
2285
2285
|
async function handleMonitorsGet(key, options) {
|
|
2286
|
-
const client = new (0,
|
|
2286
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
2287
2287
|
const payload = await client.monitors.get(key);
|
|
2288
2288
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2289
2289
|
const dependents = boundPlays ? {
|
|
@@ -2291,24 +2291,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2291
2291
|
truncated: payload.consumer_health_truncated === true
|
|
2292
2292
|
} : await client.monitors.dependents(key);
|
|
2293
2293
|
const detail = { ...payload, dependents };
|
|
2294
|
-
|
|
2294
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, detail, {
|
|
2295
2295
|
json: options.json,
|
|
2296
2296
|
text: renderMonitorGet(detail)
|
|
2297
2297
|
});
|
|
2298
2298
|
}
|
|
2299
2299
|
async function handleMonitorsTest(key, payload, options) {
|
|
2300
2300
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2301
|
-
const result = await new (0,
|
|
2301
|
+
const result = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2302
2302
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2303
2303
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2304
2304
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2305
2305
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2306
2306
|
`;
|
|
2307
|
-
|
|
2307
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2308
2308
|
}
|
|
2309
2309
|
async function handleMonitorsValidate(key, options) {
|
|
2310
|
-
const result = await new (0,
|
|
2311
|
-
|
|
2310
|
+
const result = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.validate(key);
|
|
2311
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2312
2312
|
if (result.valid === false) process.exitCode = 7;
|
|
2313
2313
|
}
|
|
2314
2314
|
async function confirmMonitorDelete(key) {
|
|
@@ -2326,14 +2326,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2326
2326
|
}
|
|
2327
2327
|
}
|
|
2328
2328
|
async function handleMonitorsDelete(key, options) {
|
|
2329
|
-
const client = new (0,
|
|
2329
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
2330
2330
|
if (options.dryRun) {
|
|
2331
2331
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2332
2332
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2333
2333
|
command: "deepline monitors delete",
|
|
2334
2334
|
mutation: "delete"
|
|
2335
2335
|
});
|
|
2336
|
-
|
|
2336
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload2, {
|
|
2337
2337
|
json: options.json,
|
|
2338
2338
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2339
2339
|
});
|
|
@@ -2353,7 +2353,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2353
2353
|
}
|
|
2354
2354
|
}
|
|
2355
2355
|
const payload = await client.monitors.delete(key);
|
|
2356
|
-
|
|
2356
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2357
2357
|
}
|
|
2358
2358
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2359
2359
|
const body = resolveMonitorJsonBody({
|
|
@@ -2362,25 +2362,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2362
2362
|
argLabel: "<patch>",
|
|
2363
2363
|
command: `deepline monitors update ${key}`
|
|
2364
2364
|
});
|
|
2365
|
-
const payload = await new (0,
|
|
2366
|
-
|
|
2365
|
+
const payload = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.update(key, body);
|
|
2366
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2367
2367
|
}
|
|
2368
2368
|
async function handleMonitorsReactivate(key, options) {
|
|
2369
|
-
const client = new (0,
|
|
2369
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
2370
2370
|
if (options.dryRun) {
|
|
2371
2371
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2372
2372
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2373
2373
|
command: "deepline monitors reactivate",
|
|
2374
2374
|
mutation: "reactivate"
|
|
2375
2375
|
});
|
|
2376
|
-
|
|
2376
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload2, {
|
|
2377
2377
|
json: options.json,
|
|
2378
2378
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2379
2379
|
});
|
|
2380
2380
|
return;
|
|
2381
2381
|
}
|
|
2382
2382
|
const payload = await client.monitors.reactivate(key);
|
|
2383
|
-
|
|
2383
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2384
2384
|
}
|
|
2385
2385
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2386
2386
|
function monitorHealthLine(health) {
|
|
@@ -2502,7 +2502,7 @@ function monitorHealthText(health) {
|
|
|
2502
2502
|
`;
|
|
2503
2503
|
}
|
|
2504
2504
|
async function handleMonitorsAudit(options) {
|
|
2505
|
-
const client = new (0,
|
|
2505
|
+
const client = new (0, _chunkSMSQVRHEjs.DeeplineClient)();
|
|
2506
2506
|
const fleetId = _optionalChain([options, 'access', _94 => _94.fleet, 'optionalAccess', _95 => _95.trim, 'call', _96 => _96()]) || void 0;
|
|
2507
2507
|
const scope = fleetId ? { fleetId } : {};
|
|
2508
2508
|
let result = await client.monitors.audit(scope);
|
|
@@ -2546,7 +2546,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2546
2546
|
"",
|
|
2547
2547
|
monitorHealthText(health)
|
|
2548
2548
|
].join("\n");
|
|
2549
|
-
|
|
2549
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
2550
2550
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2551
2551
|
{ json: options.json, text }
|
|
2552
2552
|
);
|
|
@@ -2559,10 +2559,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2559
2559
|
}
|
|
2560
2560
|
async function handleMonitorsHealth(options) {
|
|
2561
2561
|
const fleetId = _optionalChain([options, 'access', _100 => _100.fleet, 'optionalAccess', _101 => _101.trim, 'call', _102 => _102()]) || void 0;
|
|
2562
|
-
const health = await new (0,
|
|
2562
|
+
const health = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.health(
|
|
2563
2563
|
fleetId ? { fleetId } : {}
|
|
2564
2564
|
);
|
|
2565
|
-
|
|
2565
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, health, {
|
|
2566
2566
|
json: options.json,
|
|
2567
2567
|
text: monitorHealthText(health)
|
|
2568
2568
|
});
|
|
@@ -2636,14 +2636,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2636
2636
|
"deploy",
|
|
2637
2637
|
options.idempotencyKey
|
|
2638
2638
|
);
|
|
2639
|
-
const result = await new (0,
|
|
2639
|
+
const result = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.batch.submit({
|
|
2640
2640
|
kind: "deploy",
|
|
2641
2641
|
manifestNdjson,
|
|
2642
2642
|
dryRun: options.dryRun === true,
|
|
2643
2643
|
idempotencyKey
|
|
2644
2644
|
});
|
|
2645
2645
|
const operation = result.operation;
|
|
2646
|
-
|
|
2646
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
2647
2647
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2648
2648
|
{
|
|
2649
2649
|
json: options.json,
|
|
@@ -2671,7 +2671,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2671
2671
|
kind,
|
|
2672
2672
|
options.idempotencyKey
|
|
2673
2673
|
);
|
|
2674
|
-
const result = await new (0,
|
|
2674
|
+
const result = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.batch.submit({
|
|
2675
2675
|
kind,
|
|
2676
2676
|
scope,
|
|
2677
2677
|
dryRun: options.dryRun === true,
|
|
@@ -2684,14 +2684,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2684
2684
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2685
2685
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2686
2686
|
].join("\n");
|
|
2687
|
-
|
|
2687
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0,
|
|
2688
2688
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2689
2689
|
{ json: options.json, text: `${text}
|
|
2690
2690
|
` }
|
|
2691
2691
|
);
|
|
2692
2692
|
}
|
|
2693
2693
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2694
|
-
const result = await new (0,
|
|
2694
|
+
const result = await new (0, _chunkSMSQVRHEjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2695
2695
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2696
2696
|
});
|
|
2697
2697
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2703,7 +2703,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2703
2703
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2704
2704
|
] : []
|
|
2705
2705
|
].join("\n");
|
|
2706
|
-
|
|
2706
|
+
_chunkQKKU2FH4js.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2707
2707
|
` });
|
|
2708
2708
|
}
|
|
2709
2709
|
function registerMonitorsCommands(program) {
|