deepline 0.3.493 → 0.3.495
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 +12 -0
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/bundling-sources/sdk/src/types.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +8 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +101 -3
- package/dist/cli/{auth-3NAY3AST.mjs → auth-B2YUNFQ6.mjs} +5 -5
- package/dist/cli/auth-GAOWVOK4.js +43 -0
- package/dist/cli/{billing-FSB4BBBO.js → billing-2Q7TMNRE.js} +79 -79
- package/dist/cli/{billing-SBWQCC7B.mjs → billing-5TR7ZBZM.mjs} +6 -6
- package/dist/cli/{chunk-3RGWTKK3.mjs → chunk-2GEYN3H4.mjs} +89 -3
- package/dist/cli/{chunk-IRDYBMA7.mjs → chunk-2HCZHIMT.mjs} +21 -0
- package/dist/cli/{chunk-WCZFCOMZ.js → chunk-5OKQPDYJ.js} +11 -10
- package/dist/cli/{chunk-DYP27IWC.mjs → chunk-7LLUJQM5.mjs} +4 -4
- package/dist/cli/{chunk-IJOHWGPF.js → chunk-7OGADAAA.js} +6 -6
- package/dist/cli/{chunk-2BRTYIAH.mjs → chunk-7YNZRALI.mjs} +3 -3
- package/dist/cli/{chunk-MLEUOTEQ.js → chunk-ACVT5LPN.js} +53 -53
- package/dist/cli/{chunk-IOMEJKGK.js → chunk-B3ROCZ5Y.js} +2 -2
- package/dist/cli/{chunk-NPZBE64X.js → chunk-BLMB4N63.js} +89 -3
- package/dist/cli/{chunk-KGDDQMI7.mjs → chunk-C5R3UH5V.mjs} +28 -1
- package/dist/cli/{chunk-QTPS5RLG.js → chunk-CAWE3MS2.js} +45 -13
- package/dist/cli/{chunk-NALJJTPS.mjs → chunk-CKLJAQIV.mjs} +5 -5
- package/dist/cli/{chunk-NPNAEPY4.js → chunk-CTFR52JC.js} +26 -26
- package/dist/cli/{chunk-KKSKYZO4.mjs → chunk-DFK5IJMT.mjs} +2 -2
- package/dist/cli/{chunk-4NIGNT7X.mjs → chunk-FC4JGTFC.mjs} +1 -1
- package/dist/cli/{chunk-TNQOR6XQ.mjs → chunk-FLJSK32S.mjs} +1 -1
- package/dist/cli/{chunk-TIFRRLZT.js → chunk-GBICEYUA.js} +6 -6
- package/dist/cli/{chunk-ZQH4TXM2.mjs → chunk-H5L2Q2GI.mjs} +2 -2
- package/dist/cli/{chunk-Y3NN2UAF.mjs → chunk-HJ5LYO6U.mjs} +2 -2
- package/dist/cli/{chunk-C2MRDPA5.js → chunk-I42EOZKQ.js} +32 -5
- package/dist/cli/{chunk-3QGUWB6E.mjs → chunk-I66IWCY4.mjs} +8 -7
- package/dist/cli/{chunk-VFHIYWMC.mjs → chunk-JRBQC6L4.mjs} +2 -2
- package/dist/cli/{chunk-67ZG7XZV.mjs → chunk-KG2FUYWB.mjs} +2 -2
- package/dist/cli/{chunk-5WOPBX3H.mjs → chunk-KSHAFYYG.mjs} +1 -1
- package/dist/cli/{chunk-SXD2EYAH.mjs → chunk-L5ZXEYTQ.mjs} +37 -5
- package/dist/cli/{chunk-KCDZWS2B.js → chunk-LQKZG5RN.js} +231 -231
- package/dist/cli/{chunk-2I7VN65H.js → chunk-MAMEKGLI.js} +7 -7
- package/dist/cli/{chunk-2IHGVAGT.mjs → chunk-MG3WST3Z.mjs} +2 -2
- package/dist/cli/{chunk-DWJ4RXSA.js → chunk-N3T3L3WW.js} +21 -0
- package/dist/cli/{chunk-5DIZ2G74.mjs → chunk-OFBDI5S3.mjs} +2 -2
- package/dist/cli/{chunk-UCMY2SO2.js → chunk-PEIOQKTA.js} +3 -3
- package/dist/cli/{chunk-NWIDPT7H.js → chunk-PHO53W67.js} +4 -4
- package/dist/cli/{chunk-E5ILCMKQ.mjs → chunk-RBBOUPME.mjs} +1 -1
- package/dist/cli/{chunk-HLM2UFQ5.mjs → chunk-S2QARJLX.mjs} +1 -1
- package/dist/cli/{chunk-GSC35TPZ.mjs → chunk-SC5GHGFD.mjs} +2 -2
- package/dist/cli/{chunk-ZVW7EWTC.mjs → chunk-SR6VS5PG.mjs} +184 -184
- package/dist/cli/{chunk-EFO5GVYS.js → chunk-T4PGA6UD.js} +2 -2
- package/dist/cli/{chunk-AGTXL6LZ.js → chunk-TCNILHMS.js} +5 -5
- package/dist/cli/{chunk-ZVXB7OU7.mjs → chunk-TFMV3NKL.mjs} +1 -1
- package/dist/cli/{chunk-4IJFQV3O.mjs → chunk-TMO7W4P2.mjs} +1 -1
- package/dist/cli/{chunk-WTFI7BVH.mjs → chunk-TSKVPEVZ.mjs} +8 -1
- package/dist/cli/{chunk-HTUSTPP4.js → chunk-TUAEM76Y.js} +14 -7
- package/dist/cli/{chunk-EYG336YV.js → chunk-UDFO2MWA.js} +41 -41
- package/dist/cli/{chunk-2NGIBJM2.js → chunk-UKGOZOTT.js} +8 -8
- package/dist/cli/{chunk-7HABWOMB.js → chunk-UMFZQREB.js} +259 -259
- package/dist/cli/{chunk-XLE7KXE7.js → chunk-WVL5HGUG.js} +2 -2
- package/dist/cli/{chunk-XQX476QK.js → chunk-XAOLMEN5.js} +9 -9
- package/dist/cli/{chunk-AWMCZAUR.js → chunk-XKYQR3QK.js} +3 -3
- package/dist/cli/{chunk-IJJ6D5WL.mjs → chunk-XR6RCBB3.mjs} +11 -11
- package/dist/cli/{chunk-IOBPR2VO.js → chunk-XX6PRYFI.js} +16 -16
- package/dist/cli/{chunk-LGTZYI5B.js → chunk-Y2DUGUUU.js} +21 -21
- package/dist/cli/{chunk-2H4OFVR5.js → chunk-Z33PZUWG.js} +5 -5
- package/dist/cli/{chunk-EBAS3UT2.mjs → chunk-ZB6UYG5I.mjs} +5 -5
- package/dist/cli/{chunk-JO2JZUBR.js → chunk-ZBQBH4IT.js} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-XR22YQXT.mjs → csv-5UQXKWLE.mjs} +4 -4
- package/dist/cli/{csv-DKYZE2KM.js → csv-DZQ77T67.js} +13 -13
- package/dist/cli/{db-EOKG36YN.mjs → db-F62BVFTP.mjs} +6 -6
- package/dist/cli/{db-RNYRTCMV.js → db-JIPLUHA6.js} +27 -27
- package/dist/cli/describe-BA4RAZ7J.js +50 -0
- package/dist/cli/{describe-ICFXOQBW.mjs → describe-J7KYHONJ.mjs} +20 -20
- package/dist/cli/describe-core.d.mts +5 -11
- package/dist/cli/describe-core.d.ts +5 -11
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-3RAOACNS.mjs → executions-XB4F2KZD.mjs} +6 -6
- package/dist/cli/{executions-OBWPSWH7.js → executions-XQ4FNJ27.js} +8 -8
- package/dist/cli/{feedback-6EQRVBKF.mjs → feedback-5CR4CJ6W.mjs} +4 -4
- package/dist/cli/{feedback-6GPEUBLF.js → feedback-Q6JRCMDV.js} +8 -8
- package/dist/cli/git-EAO432S2.js +25 -0
- package/dist/cli/{git-CVQ24DTR.mjs → git-P5WBBUT3.mjs} +5 -5
- package/dist/cli/index.js +141 -141
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-XPOATG5V.js → legacy-noops-EJAB6III.js} +8 -8
- package/dist/cli/{legacy-noops-QULJZYNH.mjs → legacy-noops-H5JJVYZ2.mjs} +5 -5
- package/dist/cli/{monitors-OJ4CMREE.js → monitors-7DOGM7RO.js} +91 -91
- package/dist/cli/{monitors-AFT5YJPZ.mjs → monitors-QPFAT2J5.mjs} +7 -7
- package/dist/cli/{org-WHKNXANG.mjs → org-BH7ATDIJ.mjs} +6 -6
- package/dist/cli/{org-RKT52CSL.js → org-QOBB4IN3.js} +72 -72
- package/dist/cli/{pages-EEAQFGVD.mjs → pages-PJH2TXZQ.mjs} +20 -6
- package/dist/cli/{pages-SOE3R667.js → pages-PLTE54KM.js} +32 -18
- package/dist/cli/{play-LXFWHUBP.mjs → play-ULTJ3LPA.mjs} +17 -17
- package/dist/cli/{play-OTJJ4E4T.js → play-XZAPTF3T.js} +314 -314
- package/dist/cli/{providers-U3CPKTMM.mjs → providers-6NUTRVE4.mjs} +6 -6
- package/dist/cli/{providers-RU4HIAT3.js → providers-SKXLW7M3.js} +9 -9
- package/dist/cli/{quickstart-75AO2AJC.mjs → quickstart-5HMJMXVT.mjs} +4 -4
- package/dist/cli/{quickstart-N72IVA2Y.js → quickstart-JFCIIGII.js} +6 -6
- package/dist/cli/{run-IGWFL6WH.mjs → run-2BJZPY4K.mjs} +25 -25
- package/dist/cli/{run-MMYES3IW.js → run-BRAXLCBC.js} +40 -40
- package/dist/cli/search-4MU2G6HV.js +32 -0
- package/dist/cli/{search-FIYESBLZ.mjs → search-IDXSB2CV.mjs} +7 -7
- package/dist/cli/{search-output-3I5KSW36.mjs → search-output-AATMH4QG.mjs} +4 -4
- package/dist/cli/{search-output-2FXN4ZWD.js → search-output-CJ4TNYF7.js} +6 -6
- package/dist/cli/{secrets-HCZQ6JNP.js → secrets-6SMKTBFT.js} +15 -15
- package/dist/cli/{secrets-O7IUQ3VT.mjs → secrets-UQNEJSNG.mjs} +6 -6
- package/dist/cli/{sessions-KY7A3EZO.mjs → sessions-MHTUVPSR.mjs} +5 -5
- package/dist/cli/{sessions-5AYTT4IW.js → sessions-W3KU4Q4X.js} +6 -6
- package/dist/cli/{settings-P4VFYWJK.js → settings-BA52NEU5.js} +78 -78
- package/dist/cli/{settings-WSMRR2GS.mjs → settings-KNYJ6GXK.mjs} +11 -11
- package/dist/cli/{setup-J7CA3EJL.js → setup-D5HCJAVU.js} +49 -49
- package/dist/cli/{setup-YTVKVQC7.mjs → setup-TLTZ2YCO.mjs} +9 -9
- package/dist/cli/{skills-W5WY764N.mjs → skills-DPLM4EGS.mjs} +7 -7
- package/dist/cli/skills-SVUWVXCE.js +36 -0
- package/dist/cli/{tools-YECI6N3N.mjs → tools-I4ZOJV23.mjs} +18 -18
- package/dist/cli/tools-RJSP76HX.js +57 -0
- package/dist/cli/{update-BIFBIEII.mjs → update-VIFS7IK5.mjs} +9 -9
- package/dist/cli/update-YT6JPIC6.js +34 -0
- package/dist/cli/{workflow-D2TUFFH6.js → workflow-7REPOHXM.js} +17 -17
- package/dist/cli/{workflow-XZVDNARC.mjs → workflow-TAQBNDV7.mjs} +7 -7
- package/dist/{client-CNzJ1LTF.d.mts → client-BDT_LwuM.d.mts} +1 -1
- package/dist/{client-BDB_VbE4.d.ts → client-CKVH6tmp.d.ts} +1 -1
- package/dist/{client-core-CSv3DlPD.d.mts → client-core-CEixe_C0.d.mts} +10 -5
- package/dist/{client-core-xEa9x3pl.d.ts → client-core-RS-d-vtY.d.ts} +10 -5
- package/dist/{compiler-manifest-BFTwq1HI.d.ts → compiler-manifest-CPEF48NM.d.mts} +91 -0
- package/dist/{compiler-manifest-BFTwq1HI.d.mts → compiler-manifest-CPEF48NM.d.ts} +91 -0
- package/dist/{errors-c3pMsylw.d.ts → errors-B-PJXveg.d.ts} +1 -1
- package/dist/{errors-w31ybrQM.d.mts → errors-BWbPzqwo.d.mts} +1 -1
- package/dist/{index-DvNtxucX.d.mts → index-BJ8AA1F9.d.mts} +1 -1
- package/dist/{index-CQ-15-QL.d.ts → index-CvVxPpE8.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +26 -18
- package/dist/index.mjs +15 -7
- package/dist/install-integrity.json +116 -116
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +2 -2
- package/dist/release.d.ts +2 -2
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-KYQLDI6V.js +0 -43
- package/dist/cli/describe-RS75I33X.js +0 -50
- package/dist/cli/git-DEFE4SSB.js +0 -25
- package/dist/cli/search-EQURI7SZ.js +0 -32
- package/dist/cli/skills-KKPEGLAR.js +0 -36
- package/dist/cli/tools-65Y4QTW6.js +0 -57
- package/dist/cli/update-WDG7VFOW.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 _chunkZ33PZUWGjs = require('./chunk-Z33PZUWG.js');
|
|
5
|
+
require('./chunk-TUAEM76Y.js');
|
|
6
6
|
require('./chunk-E4CABWXL.js');
|
|
7
7
|
require('./chunk-PKV5CD3W.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 _chunkXKYQR3QKjs = require('./chunk-XKYQR3QK.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
26
|
+
var _chunkMAMEKGLIjs = require('./chunk-MAMEKGLI.js');
|
|
27
|
+
require('./chunk-ZBQBH4IT.js');
|
|
28
|
+
require('./chunk-PHO53W67.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-T4PGA6UD.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 = _chunkMAMEKGLIjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
115
115
|
if (wantsJson) {
|
|
116
|
-
const payload =
|
|
117
|
-
|
|
116
|
+
const payload = _chunkMAMEKGLIjs.errorToJsonPayload.call(void 0, error);
|
|
117
|
+
_chunkMAMEKGLIjs.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, _chunkZ33PZUWGjs.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
|
+
_chunkMAMEKGLIjs.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, _chunkZ33PZUWGjs.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
|
+
_chunkMAMEKGLIjs.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, _chunkZ33PZUWGjs.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
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
723
723
|
json: options.json,
|
|
724
724
|
text: renderDeployedListText(
|
|
725
725
|
payload,
|
|
@@ -735,10 +735,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
735
735
|
argLabel: "<definition>",
|
|
736
736
|
command: "deepline monitors check"
|
|
737
737
|
});
|
|
738
|
-
const payload = await new (0,
|
|
738
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.check(
|
|
739
739
|
body
|
|
740
740
|
);
|
|
741
|
-
|
|
741
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
742
742
|
}
|
|
743
743
|
function previewText(value) {
|
|
744
744
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -796,22 +796,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
796
796
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
797
797
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
798
798
|
}
|
|
799
|
-
const wantsJson =
|
|
799
|
+
const wantsJson = _chunkMAMEKGLIjs.shouldEmitJson.call(void 0, options.json);
|
|
800
800
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
801
801
|
throw new MonitorsUsageError(
|
|
802
802
|
"--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."
|
|
803
803
|
);
|
|
804
804
|
}
|
|
805
805
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
806
|
-
const progress =
|
|
806
|
+
const progress = _chunkXKYQR3QKjs.createCliProgress.call(void 0, !wantsJson);
|
|
807
807
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
808
808
|
try {
|
|
809
|
-
const payload = await new (0,
|
|
809
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.preview(
|
|
810
810
|
body,
|
|
811
811
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
812
812
|
);
|
|
813
813
|
progress.complete();
|
|
814
|
-
|
|
814
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
815
815
|
json: options.json,
|
|
816
816
|
text: renderMonitorPreviewText(payload)
|
|
817
817
|
});
|
|
@@ -856,7 +856,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
856
856
|
argLabel: "<definition>",
|
|
857
857
|
command: "deepline monitors deploy"
|
|
858
858
|
});
|
|
859
|
-
const client = new (0,
|
|
859
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
860
860
|
const definitionArg = body;
|
|
861
861
|
if (options.dryRun) {
|
|
862
862
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -864,7 +864,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
864
864
|
});
|
|
865
865
|
const valid = payload2.valid !== false;
|
|
866
866
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _23 => _23(payload2), 'optionalAccess', _24 => _24.identity_conflict]));
|
|
867
|
-
|
|
867
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
868
868
|
{ dry_run: true, ...payload2 },
|
|
869
869
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
870
870
|
);
|
|
@@ -874,7 +874,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
876
|
const payload = await client.monitors.deploy(definitionArg);
|
|
877
|
-
|
|
877
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
878
878
|
json: options.json,
|
|
879
879
|
text: renderMonitorDeployCompletion(payload)
|
|
880
880
|
});
|
|
@@ -886,29 +886,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
886
886
|
argLabel: "<definition>",
|
|
887
887
|
command: "deepline monitors sync"
|
|
888
888
|
});
|
|
889
|
-
const payload = await new (0,
|
|
889
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.sync(body, {
|
|
890
890
|
...options.dryRun ? { dryRun: true } : {},
|
|
891
891
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
892
892
|
});
|
|
893
893
|
if (options.dryRun) {
|
|
894
894
|
const plan = payload;
|
|
895
|
-
|
|
895
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
896
896
|
{ dry_run: true, ...plan },
|
|
897
897
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
898
898
|
);
|
|
899
899
|
return;
|
|
900
900
|
}
|
|
901
|
-
|
|
901
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
902
902
|
json: options.json,
|
|
903
903
|
text: renderMonitorJob(payload)
|
|
904
904
|
});
|
|
905
905
|
}
|
|
906
906
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
907
|
-
const payload = await new (0,
|
|
907
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors[action](key, {
|
|
908
908
|
...options.dryRun ? { dryRun: true } : {},
|
|
909
909
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
910
910
|
});
|
|
911
|
-
|
|
911
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
912
912
|
json: options.json,
|
|
913
913
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
914
914
|
});
|
|
@@ -997,11 +997,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
997
997
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
998
998
|
);
|
|
999
999
|
}
|
|
1000
|
-
const payload = await new (0,
|
|
1000
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.batch.deploy(
|
|
1001
1001
|
lint.normalized.monitors,
|
|
1002
1002
|
{ idempotencyKey }
|
|
1003
1003
|
);
|
|
1004
|
-
|
|
1004
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1005
1005
|
{
|
|
1006
1006
|
...payload,
|
|
1007
1007
|
idempotency_key: idempotencyKey,
|
|
@@ -1034,7 +1034,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1034
1034
|
);
|
|
1035
1035
|
}
|
|
1036
1036
|
if (options.dryRun) {
|
|
1037
|
-
|
|
1037
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1038
1038
|
{
|
|
1039
1039
|
ok: true,
|
|
1040
1040
|
dry_run: true,
|
|
@@ -1051,7 +1051,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1051
1051
|
"sync",
|
|
1052
1052
|
options.idempotencyKey
|
|
1053
1053
|
);
|
|
1054
|
-
const payload = await new (0,
|
|
1054
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.batches.sync(
|
|
1055
1055
|
batchId,
|
|
1056
1056
|
lint.normalized.monitors,
|
|
1057
1057
|
{
|
|
@@ -1059,14 +1059,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1059
1059
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1060
1060
|
}
|
|
1061
1061
|
);
|
|
1062
|
-
|
|
1062
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1063
1063
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1064
1064
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1065
1065
|
);
|
|
1066
1066
|
}
|
|
1067
1067
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1068
1068
|
if (options.dryRun) {
|
|
1069
|
-
|
|
1069
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1070
1070
|
{
|
|
1071
1071
|
ok: true,
|
|
1072
1072
|
dry_run: true,
|
|
@@ -1082,17 +1082,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1082
1082
|
intent,
|
|
1083
1083
|
options.idempotencyKey
|
|
1084
1084
|
);
|
|
1085
|
-
const payload = await new (0,
|
|
1085
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1086
1086
|
idempotencyKey
|
|
1087
1087
|
});
|
|
1088
|
-
|
|
1088
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1089
1089
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1090
1090
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1091
1091
|
);
|
|
1092
1092
|
}
|
|
1093
1093
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1094
|
-
const payload = await new (0,
|
|
1095
|
-
|
|
1094
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1095
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
1096
1096
|
json: options.json,
|
|
1097
1097
|
text: renderMonitorJob(payload)
|
|
1098
1098
|
});
|
|
@@ -1106,7 +1106,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1106
1106
|
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
1107
1107
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1108
1108
|
);
|
|
1109
|
-
|
|
1109
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1110
1110
|
{
|
|
1111
1111
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1112
1112
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1126,7 +1126,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1126
1126
|
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1127
1127
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1128
1128
|
);
|
|
1129
|
-
|
|
1129
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1130
1130
|
{
|
|
1131
1131
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1132
1132
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1138,32 +1138,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1138
1138
|
process.exitCode = 2;
|
|
1139
1139
|
}
|
|
1140
1140
|
async function handleMonitorJobGet(jobId, options) {
|
|
1141
|
-
const payload = await new (0,
|
|
1142
|
-
|
|
1141
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1142
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
1143
1143
|
json: options.json,
|
|
1144
1144
|
text: renderMonitorJob(payload)
|
|
1145
1145
|
});
|
|
1146
1146
|
}
|
|
1147
1147
|
async function handleMonitorJobWait(jobId, options) {
|
|
1148
|
-
const payload = await new (0,
|
|
1148
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1149
1149
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1150
1150
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1151
1151
|
});
|
|
1152
|
-
|
|
1152
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
1153
1153
|
json: options.json,
|
|
1154
1154
|
text: renderMonitorJob(payload)
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
1157
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1158
1158
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1159
|
-
const payload = await new (0,
|
|
1159
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1160
1160
|
...limit === void 0 ? {} : { limit }
|
|
1161
1161
|
});
|
|
1162
|
-
|
|
1162
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1163
1163
|
}
|
|
1164
1164
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1165
|
-
const payload = await new (0,
|
|
1166
|
-
|
|
1165
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1166
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, {
|
|
1167
1167
|
json: options.json,
|
|
1168
1168
|
text: renderMonitorJob(payload)
|
|
1169
1169
|
});
|
|
@@ -1472,7 +1472,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1472
1472
|
`;
|
|
1473
1473
|
}
|
|
1474
1474
|
function reportFleetState(payload, error, options) {
|
|
1475
|
-
|
|
1475
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1476
1476
|
{
|
|
1477
1477
|
...payload,
|
|
1478
1478
|
code: error.code,
|
|
@@ -1604,7 +1604,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1604
1604
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1605
1605
|
`, "utf8");
|
|
1606
1606
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1607
|
-
|
|
1607
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
1608
1608
|
{ schemaVersion: 2, file, definition, next },
|
|
1609
1609
|
{
|
|
1610
1610
|
json: options.json,
|
|
@@ -1666,7 +1666,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1666
1666
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1667
1667
|
);
|
|
1668
1668
|
}
|
|
1669
|
-
const client = new (0,
|
|
1669
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
1670
1670
|
const payload = await client.monitors.fleets.sync(
|
|
1671
1671
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1672
1672
|
{
|
|
@@ -1688,7 +1688,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1688
1688
|
}
|
|
1689
1689
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1690
1690
|
if (!options.wait || options.dryRun) {
|
|
1691
|
-
|
|
1691
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1692
1692
|
json: options.json,
|
|
1693
1693
|
text: renderFleetSync(payload, {
|
|
1694
1694
|
fleetId,
|
|
@@ -1714,7 +1714,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1714
1714
|
const status = fleetStatus(final);
|
|
1715
1715
|
const summary = renderFleetGet(final);
|
|
1716
1716
|
if (status === "converged") {
|
|
1717
|
-
|
|
1717
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1718
1718
|
return;
|
|
1719
1719
|
}
|
|
1720
1720
|
if (status === "billing_suspended") {
|
|
@@ -1754,14 +1754,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1754
1754
|
);
|
|
1755
1755
|
}
|
|
1756
1756
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1757
|
-
const client = new (0,
|
|
1757
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
1758
1758
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1759
1759
|
...options.drift ? { drift: true } : {},
|
|
1760
1760
|
...limit !== void 0 ? { limit } : {}
|
|
1761
1761
|
});
|
|
1762
1762
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1763
1763
|
if (!options.check) {
|
|
1764
|
-
|
|
1764
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1765
1765
|
return;
|
|
1766
1766
|
}
|
|
1767
1767
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1769,7 +1769,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1769
1769
|
);
|
|
1770
1770
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1771
1771
|
if (unconverged.length === 0) {
|
|
1772
|
-
|
|
1772
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1773
1773
|
return;
|
|
1774
1774
|
}
|
|
1775
1775
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -1808,13 +1808,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1808
1808
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
1809
1809
|
);
|
|
1810
1810
|
}
|
|
1811
|
-
const client = new (0,
|
|
1811
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
1812
1812
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
1813
1813
|
idempotencyKey
|
|
1814
1814
|
});
|
|
1815
1815
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1816
1816
|
if (!options.wait) {
|
|
1817
|
-
|
|
1817
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1818
1818
|
json: options.json,
|
|
1819
1819
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
1820
1820
|
idempotency key ${idempotencyKey}
|
|
@@ -1837,7 +1837,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1837
1837
|
const envelope = { ...accepted, ...final };
|
|
1838
1838
|
const text = renderFleetGet(final);
|
|
1839
1839
|
if (fleetStatus(final) === "converged") {
|
|
1840
|
-
|
|
1840
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
1841
1841
|
return;
|
|
1842
1842
|
}
|
|
1843
1843
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -1886,7 +1886,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
1888
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
1889
|
-
const client = new (0,
|
|
1889
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
1890
1890
|
if (options.dryRun) {
|
|
1891
1891
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
1892
1892
|
dryRun: true,
|
|
@@ -1896,7 +1896,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
1896
1896
|
command: "deepline monitors fleets deactivate",
|
|
1897
1897
|
mutation: "fleet deactivate"
|
|
1898
1898
|
});
|
|
1899
|
-
|
|
1899
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, plan, {
|
|
1900
1900
|
json: options.json,
|
|
1901
1901
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
1902
1902
|
});
|
|
@@ -1934,7 +1934,7 @@ Preview the blast radius first:
|
|
|
1934
1934
|
});
|
|
1935
1935
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1936
1936
|
if (payload.already === true) {
|
|
1937
|
-
|
|
1937
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1938
1938
|
json: options.json,
|
|
1939
1939
|
text: `Fleet ${fleetId} is already deactivated.
|
|
1940
1940
|
`
|
|
@@ -1946,7 +1946,7 @@ Preview the blast radius first:
|
|
|
1946
1946
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
1947
1947
|
` : "");
|
|
1948
1948
|
if (!options.wait) {
|
|
1949
|
-
|
|
1949
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1950
1950
|
json: options.json,
|
|
1951
1951
|
text: acceptedText
|
|
1952
1952
|
});
|
|
@@ -1968,7 +1968,7 @@ Preview the blast radius first:
|
|
|
1968
1968
|
const envelope = { ...accepted, ...final };
|
|
1969
1969
|
const summary = renderFleetGet(final);
|
|
1970
1970
|
if (fleetStatus(final) === "deactivated") {
|
|
1971
|
-
|
|
1971
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1972
1972
|
return;
|
|
1973
1973
|
}
|
|
1974
1974
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2007,7 +2007,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2007
2007
|
"Agent notes:",
|
|
2008
2008
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2009
2009
|
];
|
|
2010
|
-
|
|
2010
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
2011
2011
|
{
|
|
2012
2012
|
schemaVersion: 1,
|
|
2013
2013
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2168,7 +2168,7 @@ function renderMonitorGet(payload) {
|
|
|
2168
2168
|
`;
|
|
2169
2169
|
}
|
|
2170
2170
|
async function handleMonitorsGet(key, options) {
|
|
2171
|
-
const client = new (0,
|
|
2171
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
2172
2172
|
const payload = await client.monitors.get(key);
|
|
2173
2173
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2174
2174
|
const dependents = boundPlays ? {
|
|
@@ -2176,24 +2176,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2176
2176
|
truncated: payload.consumer_health_truncated === true
|
|
2177
2177
|
} : await client.monitors.dependents(key);
|
|
2178
2178
|
const detail = { ...payload, dependents };
|
|
2179
|
-
|
|
2179
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, detail, {
|
|
2180
2180
|
json: options.json,
|
|
2181
2181
|
text: renderMonitorGet(detail)
|
|
2182
2182
|
});
|
|
2183
2183
|
}
|
|
2184
2184
|
async function handleMonitorsTest(key, payload, options) {
|
|
2185
2185
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2186
|
-
const result = await new (0,
|
|
2186
|
+
const result = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2187
2187
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2188
2188
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2189
2189
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2190
2190
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2191
2191
|
`;
|
|
2192
|
-
|
|
2192
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2193
2193
|
}
|
|
2194
2194
|
async function handleMonitorsValidate(key, options) {
|
|
2195
|
-
const result = await new (0,
|
|
2196
|
-
|
|
2195
|
+
const result = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.validate(key);
|
|
2196
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2197
2197
|
if (result.valid === false) process.exitCode = 7;
|
|
2198
2198
|
}
|
|
2199
2199
|
async function confirmMonitorDelete(key) {
|
|
@@ -2211,14 +2211,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
2213
|
async function handleMonitorsDelete(key, options) {
|
|
2214
|
-
const client = new (0,
|
|
2214
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
2215
2215
|
if (options.dryRun) {
|
|
2216
2216
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2217
2217
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2218
2218
|
command: "deepline monitors delete",
|
|
2219
2219
|
mutation: "delete"
|
|
2220
2220
|
});
|
|
2221
|
-
|
|
2221
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2222
2222
|
json: options.json,
|
|
2223
2223
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2224
2224
|
});
|
|
@@ -2238,7 +2238,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
2240
|
const payload = await client.monitors.delete(key);
|
|
2241
|
-
|
|
2241
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2242
2242
|
}
|
|
2243
2243
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2244
2244
|
const body = resolveMonitorJsonBody({
|
|
@@ -2247,25 +2247,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2247
2247
|
argLabel: "<patch>",
|
|
2248
2248
|
command: `deepline monitors update ${key}`
|
|
2249
2249
|
});
|
|
2250
|
-
const payload = await new (0,
|
|
2251
|
-
|
|
2250
|
+
const payload = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.update(key, body);
|
|
2251
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2252
2252
|
}
|
|
2253
2253
|
async function handleMonitorsReactivate(key, options) {
|
|
2254
|
-
const client = new (0,
|
|
2254
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
2255
2255
|
if (options.dryRun) {
|
|
2256
2256
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2257
2257
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2258
2258
|
command: "deepline monitors reactivate",
|
|
2259
2259
|
mutation: "reactivate"
|
|
2260
2260
|
});
|
|
2261
|
-
|
|
2261
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2262
2262
|
json: options.json,
|
|
2263
2263
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2264
2264
|
});
|
|
2265
2265
|
return;
|
|
2266
2266
|
}
|
|
2267
2267
|
const payload = await client.monitors.reactivate(key);
|
|
2268
|
-
|
|
2268
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2269
2269
|
}
|
|
2270
2270
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2271
2271
|
function monitorHealthLine(health) {
|
|
@@ -2387,7 +2387,7 @@ function monitorHealthText(health) {
|
|
|
2387
2387
|
`;
|
|
2388
2388
|
}
|
|
2389
2389
|
async function handleMonitorsAudit(options) {
|
|
2390
|
-
const client = new (0,
|
|
2390
|
+
const client = new (0, _chunkZ33PZUWGjs.DeeplineClient)();
|
|
2391
2391
|
const fleetId = _optionalChain([options, 'access', _78 => _78.fleet, 'optionalAccess', _79 => _79.trim, 'call', _80 => _80()]) || void 0;
|
|
2392
2392
|
const scope = fleetId ? { fleetId } : {};
|
|
2393
2393
|
let result = await client.monitors.audit(scope);
|
|
@@ -2431,7 +2431,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2431
2431
|
"",
|
|
2432
2432
|
monitorHealthText(health)
|
|
2433
2433
|
].join("\n");
|
|
2434
|
-
|
|
2434
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
2435
2435
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2436
2436
|
{ json: options.json, text }
|
|
2437
2437
|
);
|
|
@@ -2444,10 +2444,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
async function handleMonitorsHealth(options) {
|
|
2446
2446
|
const fleetId = _optionalChain([options, 'access', _84 => _84.fleet, 'optionalAccess', _85 => _85.trim, 'call', _86 => _86()]) || void 0;
|
|
2447
|
-
const health = await new (0,
|
|
2447
|
+
const health = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.health(
|
|
2448
2448
|
fleetId ? { fleetId } : {}
|
|
2449
2449
|
);
|
|
2450
|
-
|
|
2450
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, health, {
|
|
2451
2451
|
json: options.json,
|
|
2452
2452
|
text: monitorHealthText(health)
|
|
2453
2453
|
});
|
|
@@ -2521,14 +2521,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2521
2521
|
"deploy",
|
|
2522
2522
|
options.idempotencyKey
|
|
2523
2523
|
);
|
|
2524
|
-
const result = await new (0,
|
|
2524
|
+
const result = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.batch.submit({
|
|
2525
2525
|
kind: "deploy",
|
|
2526
2526
|
manifestNdjson,
|
|
2527
2527
|
dryRun: options.dryRun === true,
|
|
2528
2528
|
idempotencyKey
|
|
2529
2529
|
});
|
|
2530
2530
|
const operation = result.operation;
|
|
2531
|
-
|
|
2531
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
2532
2532
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2533
2533
|
{
|
|
2534
2534
|
json: options.json,
|
|
@@ -2556,7 +2556,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2556
2556
|
kind,
|
|
2557
2557
|
options.idempotencyKey
|
|
2558
2558
|
);
|
|
2559
|
-
const result = await new (0,
|
|
2559
|
+
const result = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.batch.submit({
|
|
2560
2560
|
kind,
|
|
2561
2561
|
scope,
|
|
2562
2562
|
dryRun: options.dryRun === true,
|
|
@@ -2569,14 +2569,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2569
2569
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2570
2570
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2571
2571
|
].join("\n");
|
|
2572
|
-
|
|
2572
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
2573
2573
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2574
2574
|
{ json: options.json, text: `${text}
|
|
2575
2575
|
` }
|
|
2576
2576
|
);
|
|
2577
2577
|
}
|
|
2578
2578
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2579
|
-
const result = await new (0,
|
|
2579
|
+
const result = await new (0, _chunkZ33PZUWGjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2580
2580
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2581
2581
|
});
|
|
2582
2582
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2588,7 +2588,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2588
2588
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2589
2589
|
] : []
|
|
2590
2590
|
].join("\n");
|
|
2591
|
-
|
|
2591
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2592
2592
|
` });
|
|
2593
2593
|
}
|
|
2594
2594
|
function registerMonitorsCommands(program) {
|