deepline 0.3.393 → 0.3.394
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +477 -10
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-policy.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +251 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +25 -16
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +69 -22
- package/dist/bundling-sources/shared_libs/plays/core.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +18 -0
- package/dist/cli/auth-IHKISLJQ.js +39 -0
- package/dist/cli/{auth-5PXHA232.mjs → auth-OSXDAVCF.mjs} +4 -4
- package/dist/cli/{billing-JFB2XLSO.js → billing-EKLYOXUY.js} +75 -75
- package/dist/cli/{billing-Z2N7ZAGM.mjs → billing-ZNNKX3UR.mjs} +4 -4
- package/dist/cli/{chunk-OXNOAD6Y.js → chunk-2MDDA7A4.js} +26 -26
- package/dist/cli/{chunk-PTDECJGP.js → chunk-354JCXA2.js} +50 -50
- package/dist/cli/{chunk-RKMB3N7K.mjs → chunk-3HU47EGZ.mjs} +48 -9
- package/dist/cli/{chunk-6I73X254.mjs → chunk-3HWALOL2.mjs} +1 -1
- package/dist/cli/{chunk-VIQJIX2P.js → chunk-4P27AXEA.js} +65 -65
- package/dist/cli/{chunk-UOGZUA24.mjs → chunk-5BB2RGAX.mjs} +18 -8
- package/dist/cli/{chunk-RWHWF5ZJ.js → chunk-6YAUMG27.js} +1 -1
- package/dist/cli/{chunk-HLEESTCH.mjs → chunk-BP33SIZF.mjs} +1 -1
- package/dist/cli/{chunk-CDFH2DYL.js → chunk-CS6RAIVY.js} +4 -4
- package/dist/cli/{chunk-2HAD745V.js → chunk-E23BQ5SC.js} +9 -9
- package/dist/cli/{chunk-LMMEAMA7.mjs → chunk-FJGW5GXU.mjs} +1 -1
- package/dist/cli/{chunk-Q26LUSQ2.mjs → chunk-JHIJIHFB.mjs} +1 -1
- package/dist/cli/{chunk-PWSWAN7Q.js → chunk-KB4SDX5S.js} +48 -9
- package/dist/cli/{chunk-M7Y7JYZX.js → chunk-KGNTKMRG.js} +6 -6
- package/dist/cli/{chunk-4XX6443T.js → chunk-KI635JN4.js} +59 -59
- package/dist/cli/{chunk-Z3OOZM5L.js → chunk-KIUMEOM5.js} +8 -8
- package/dist/cli/{chunk-KIYU2TGL.mjs → chunk-M57J2SK4.mjs} +2 -2
- package/dist/cli/{chunk-FQ6VHPW4.mjs → chunk-MFB2VKBO.mjs} +2 -2
- package/dist/cli/{chunk-MS6GUPBB.js → chunk-MH73HMPV.js} +3 -3
- package/dist/cli/{chunk-AARX5L4B.js → chunk-MLPU5SMZ.js} +2 -2
- package/dist/cli/{chunk-5PRVMXKB.mjs → chunk-NR3DFKNF.mjs} +1 -1
- package/dist/cli/{chunk-W4WOMXR3.js → chunk-QIQBYKLB.js} +15 -15
- package/dist/cli/{chunk-VIWE6WRK.js → chunk-RBJYWRCF.js} +260 -250
- package/dist/cli/{chunk-LZPCDB7U.mjs → chunk-TJI2EN6K.mjs} +1 -1
- package/dist/cli/{chunk-4TCT77UF.js → chunk-URWF7NGQ.js} +6 -1
- package/dist/cli/{chunk-5KWKZIQR.mjs → chunk-UXFSWG3Q.mjs} +4 -4
- package/dist/cli/{chunk-L2SYLGRP.js → chunk-VK6FYZLP.js} +8 -8
- package/dist/cli/{chunk-7HR7BGZL.mjs → chunk-X63FDZJZ.mjs} +3 -3
- package/dist/cli/{chunk-4PT2VA3A.mjs → chunk-XRQ2AQL7.mjs} +2 -2
- package/dist/cli/{chunk-STNYIMIV.mjs → chunk-XXUDVEXK.mjs} +6 -6
- package/dist/cli/{chunk-PQSA443V.mjs → chunk-ZI2ZNDJK.mjs} +6 -1
- package/dist/cli/{chunk-2LGC4EFT.mjs → chunk-ZYBGA4AR.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-KJWZHKCH.mjs → csv-5AXRB35H.mjs} +3 -3
- package/dist/cli/{csv-P3Z3YE7H.js → csv-LU7O75WE.js} +12 -12
- package/dist/cli/{db-NCM4CQIS.mjs → db-7XP5UWEW.mjs} +4 -4
- package/dist/cli/{db-NUZGJNQC.js → db-F7YTFKVM.js} +29 -29
- package/dist/cli/{describe-YGSEN5WC.js → describe-FRH32RDV.js} +20 -20
- package/dist/cli/{describe-WT6MM2GO.mjs → describe-K4ES5LIL.mjs} +10 -10
- package/dist/cli/{executions-XS2IPJ4W.mjs → executions-IEHEHJUO.mjs} +4 -4
- package/dist/cli/{executions-PCOLHN7Q.js → executions-RZV5XPT2.js} +6 -6
- package/dist/cli/{feedback-4MSH7TFU.js → feedback-3P65QTX3.js} +7 -7
- package/dist/cli/{feedback-CCLTS5SV.mjs → feedback-FPUVZBAN.mjs} +3 -3
- package/dist/cli/{git-K2DHPMPC.mjs → git-GLVVP7TY.mjs} +4 -4
- package/dist/cli/git-MFFAWVVX.js +23 -0
- package/dist/cli/index.js +95 -95
- package/dist/cli/index.mjs +33 -33
- package/dist/cli/{legacy-noops-B5S4AR3P.mjs → legacy-noops-3MOI6NBM.mjs} +4 -4
- package/dist/cli/{legacy-noops-GPNOPFXV.js → legacy-noops-XKSGZR7Q.js} +7 -7
- package/dist/cli/{monitors-JLMAIPRG.mjs → monitors-FTBGNEFG.mjs} +4 -4
- package/dist/cli/{monitors-ZAWD7NSN.js → monitors-NZ2DYNST.js} +85 -85
- package/dist/cli/{org-P2KN4CES.js → org-MCKDQXIV.js} +64 -64
- package/dist/cli/{org-T3JTHP4G.mjs → org-V2J5RBCN.mjs} +4 -4
- package/dist/cli/{play-NK6BLRGL.mjs → play-AJFGME3B.mjs} +9 -9
- package/dist/cli/play-WLSN2EO2.js +158 -0
- package/dist/cli/{providers-5QRZN3DT.js → providers-2JEZ2264.js} +7 -7
- package/dist/cli/{providers-3NQRA7IT.mjs → providers-I6RQJZFZ.mjs} +4 -4
- package/dist/cli/{quickstart-PIA2JGPV.mjs → quickstart-BIDQDMO4.mjs} +3 -3
- package/dist/cli/{quickstart-R7NUZGNW.js → quickstart-GJ2RPDU3.js} +5 -5
- package/dist/cli/search-5VN4YD4I.js +27 -0
- package/dist/cli/{search-AIDIIGLY.mjs → search-ELRXFWG5.mjs} +5 -5
- package/dist/cli/{secrets-BT3PGMWN.js → secrets-53IT6VXD.js} +13 -13
- package/dist/cli/{secrets-OQNHL45O.mjs → secrets-SQXGZXIC.mjs} +4 -4
- package/dist/cli/{sessions-SF7WJPJP.mjs → sessions-2X5QF7SL.mjs} +4 -4
- package/dist/cli/{sessions-EYXWOSWK.js → sessions-CAV5M77Y.js} +5 -5
- package/dist/cli/{settings-BA3GHBOD.js → settings-532WNAZO.js} +74 -74
- package/dist/cli/{settings-Y57JTFDD.mjs → settings-7P67VGCJ.mjs} +7 -7
- package/dist/cli/{setup-RERXYC66.js → setup-6L2VSUWJ.js} +41 -41
- package/dist/cli/{setup-7GR5GBHA.mjs → setup-QGGBV2LE.mjs} +6 -6
- package/dist/cli/{skills-SJWIQAV5.mjs → skills-3FE62WBG.mjs} +4 -4
- package/dist/cli/skills-S6NPZAN7.js +28 -0
- package/dist/cli/tools-647RLXQS.js +41 -0
- package/dist/cli/{tools-ZF3JXPNL.mjs → tools-DMR25DEF.mjs} +7 -7
- package/dist/cli/{update-FFFYQAOJ.mjs → update-6RZMHJZP.mjs} +6 -6
- package/dist/cli/update-WVTSC3EM.js +28 -0
- package/dist/cli/{workflow-XVFEEGAS.mjs → workflow-L2DQRE6R.mjs} +5 -5
- package/dist/cli/{workflow-SZJVQH4T.js → workflow-TX4F2PIX.js} +15 -15
- package/dist/{client-DU5dtHDy.d.mts → client-BktIPdIj.d.mts} +1 -1
- package/dist/{client-mCE88hC4.d.ts → client-C3O1Ipf3.d.ts} +1 -1
- package/dist/{compiler-manifest-DE4RdAiY.d.ts → compiler-manifest-DLxUY5kI.d.mts} +65 -11
- package/dist/{compiler-manifest-DE4RdAiY.d.mts → compiler-manifest-DLxUY5kI.d.ts} +65 -11
- package/dist/{index-Bi-f7HFT.d.ts → index-B_GM9E3q.d.ts} +1 -1
- package/dist/{index-BI6nWgaV.d.mts → index-SCb0NvDb.d.mts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/dist/install-integrity.json +85 -84
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +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 +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-P3MVDTXM.js +0 -39
- package/dist/cli/git-RNM45FX4.js +0 -23
- package/dist/cli/play-PDXR6JFB.js +0 -158
- package/dist/cli/search-QRWL7MFM.js +0 -27
- package/dist/cli/skills-V7EY75HB.js +0 -28
- package/dist/cli/tools-H5HLBCHH.js +0 -41
- package/dist/cli/update-472HA3LT.js +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
4
|
+
var _chunkE23BQ5SCjs = require('./chunk-E23BQ5SC.js');
|
|
5
5
|
require('./chunk-S6R3OX7B.js');
|
|
6
6
|
require('./chunk-UHNDVD3P.js');
|
|
7
7
|
require('./chunk-XDVT3GOM.js');
|
|
@@ -18,15 +18,15 @@ var _chunkIF75RD6Ujs = require('./chunk-IF75RD6U.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
|
|
25
25
|
require('./chunk-XNYIZMNQ.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
29
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-6YAUMG27.js');
|
|
30
30
|
require('./chunk-OG64RBAC.js');
|
|
31
31
|
require('./chunk-COGTRVWW.js');
|
|
32
32
|
|
|
@@ -57,7 +57,7 @@ var MonitorDryRunUnsupportedError = (_class2 = class extends Error {
|
|
|
57
57
|
function monitorsErrorExitCode(error) {
|
|
58
58
|
if (error instanceof MonitorsUsageError) return 2;
|
|
59
59
|
if (error instanceof MonitorFleetStateError) return 6;
|
|
60
|
-
if (error instanceof
|
|
60
|
+
if (error instanceof _chunkCS6RAIVYjs.AuthError) return 3;
|
|
61
61
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError) {
|
|
62
62
|
const status = error.statusCode;
|
|
63
63
|
if (status === 401 || status === 403) return 3;
|
|
@@ -104,10 +104,10 @@ function reportMonitorsFailure(error, options) {
|
|
|
104
104
|
const exitCode = monitorsErrorExitCode(error);
|
|
105
105
|
const next = monitorsFailureNextCommand(error, exitCode, options);
|
|
106
106
|
const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
|
|
107
|
-
const wantsJson =
|
|
107
|
+
const wantsJson = _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
108
108
|
if (wantsJson) {
|
|
109
|
-
const payload =
|
|
110
|
-
|
|
109
|
+
const payload = _chunkKGNTKMRGjs.errorToJsonPayload.call(void 0, error);
|
|
110
|
+
_chunkKGNTKMRGjs.printJson.call(void 0, {
|
|
111
111
|
ok: false,
|
|
112
112
|
exitCode,
|
|
113
113
|
...next ? { next } : {},
|
|
@@ -521,14 +521,14 @@ Preview the plan first with:
|
|
|
521
521
|
);
|
|
522
522
|
}
|
|
523
523
|
async function handleMonitorsStatus(options) {
|
|
524
|
-
const payload = await new (0,
|
|
524
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.status();
|
|
525
525
|
const hasAccess = payload.has_access === true;
|
|
526
526
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
527
527
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
528
528
|
${reason}` : ""}
|
|
529
529
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
530
530
|
`;
|
|
531
|
-
|
|
531
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
532
532
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
533
533
|
{ json: options.json, text }
|
|
534
534
|
);
|
|
@@ -594,14 +594,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
597
|
-
const payload = await new (0,
|
|
597
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.available(tool, {
|
|
598
598
|
...options.provider ? { provider: options.provider } : {},
|
|
599
599
|
...options.search ? { search: options.search } : {},
|
|
600
600
|
...options.limit ? { limit: options.limit } : {},
|
|
601
601
|
...options.full ? { full: true } : {},
|
|
602
602
|
...options.compact ? { compact: true } : {}
|
|
603
603
|
});
|
|
604
|
-
|
|
604
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
605
605
|
json: options.json,
|
|
606
606
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
607
607
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -704,14 +704,14 @@ async function handleMonitorsList(options) {
|
|
|
704
704
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
705
705
|
);
|
|
706
706
|
}
|
|
707
|
-
const payload = await new (0,
|
|
707
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.list({
|
|
708
708
|
...state ? { state } : {},
|
|
709
709
|
...options.status ? { status: options.status } : {},
|
|
710
710
|
...options.limit ? { limit: options.limit } : {},
|
|
711
711
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
712
712
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
713
713
|
});
|
|
714
|
-
|
|
714
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
715
715
|
json: options.json,
|
|
716
716
|
text: renderDeployedListText(
|
|
717
717
|
payload,
|
|
@@ -727,10 +727,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
727
727
|
argLabel: "<definition>",
|
|
728
728
|
command: "deepline monitors check"
|
|
729
729
|
});
|
|
730
|
-
const payload = await new (0,
|
|
730
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.check(
|
|
731
731
|
body
|
|
732
732
|
);
|
|
733
|
-
|
|
733
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
734
734
|
}
|
|
735
735
|
async function handleMonitorsDeploy(definition, options) {
|
|
736
736
|
const body = resolveMonitorJsonBody({
|
|
@@ -739,7 +739,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
739
739
|
argLabel: "<definition>",
|
|
740
740
|
command: "deepline monitors deploy"
|
|
741
741
|
});
|
|
742
|
-
const client = new (0,
|
|
742
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
743
743
|
const definitionArg = body;
|
|
744
744
|
if (options.dryRun) {
|
|
745
745
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -747,7 +747,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
747
747
|
});
|
|
748
748
|
const valid = payload2.valid !== false;
|
|
749
749
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _21 => _21(payload2), 'optionalAccess', _22 => _22.identity_conflict]));
|
|
750
|
-
|
|
750
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
751
751
|
{ dry_run: true, ...payload2 },
|
|
752
752
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
753
753
|
);
|
|
@@ -757,7 +757,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
757
757
|
return;
|
|
758
758
|
}
|
|
759
759
|
const payload = await client.monitors.deploy(definitionArg);
|
|
760
|
-
|
|
760
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
761
761
|
json: options.json,
|
|
762
762
|
text: renderMonitorDeployCompletion(payload)
|
|
763
763
|
});
|
|
@@ -769,29 +769,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
769
769
|
argLabel: "<definition>",
|
|
770
770
|
command: "deepline monitors sync"
|
|
771
771
|
});
|
|
772
|
-
const payload = await new (0,
|
|
772
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.sync(body, {
|
|
773
773
|
...options.dryRun ? { dryRun: true } : {},
|
|
774
774
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
775
775
|
});
|
|
776
776
|
if (options.dryRun) {
|
|
777
777
|
const plan = payload;
|
|
778
|
-
|
|
778
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
779
779
|
{ dry_run: true, ...plan },
|
|
780
780
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
781
781
|
);
|
|
782
782
|
return;
|
|
783
783
|
}
|
|
784
|
-
|
|
784
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
785
785
|
json: options.json,
|
|
786
786
|
text: renderMonitorJob(payload)
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
789
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
790
|
-
const payload = await new (0,
|
|
790
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors[action](key, {
|
|
791
791
|
...options.dryRun ? { dryRun: true } : {},
|
|
792
792
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
793
793
|
});
|
|
794
|
-
|
|
794
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
795
795
|
json: options.json,
|
|
796
796
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
797
797
|
});
|
|
@@ -880,11 +880,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
880
880
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
881
881
|
);
|
|
882
882
|
}
|
|
883
|
-
const payload = await new (0,
|
|
883
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.batch.deploy(
|
|
884
884
|
lint.normalized.monitors,
|
|
885
885
|
{ idempotencyKey }
|
|
886
886
|
);
|
|
887
|
-
|
|
887
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
888
888
|
{
|
|
889
889
|
...payload,
|
|
890
890
|
idempotency_key: idempotencyKey,
|
|
@@ -917,7 +917,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
917
917
|
);
|
|
918
918
|
}
|
|
919
919
|
if (options.dryRun) {
|
|
920
|
-
|
|
920
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
921
921
|
{
|
|
922
922
|
ok: true,
|
|
923
923
|
dry_run: true,
|
|
@@ -934,7 +934,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
934
934
|
"sync",
|
|
935
935
|
options.idempotencyKey
|
|
936
936
|
);
|
|
937
|
-
const payload = await new (0,
|
|
937
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.batches.sync(
|
|
938
938
|
batchId,
|
|
939
939
|
lint.normalized.monitors,
|
|
940
940
|
{
|
|
@@ -942,14 +942,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
942
942
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
943
943
|
}
|
|
944
944
|
);
|
|
945
|
-
|
|
945
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
946
946
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
947
947
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
948
948
|
);
|
|
949
949
|
}
|
|
950
950
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
951
951
|
if (options.dryRun) {
|
|
952
|
-
|
|
952
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
953
953
|
{
|
|
954
954
|
ok: true,
|
|
955
955
|
dry_run: true,
|
|
@@ -965,17 +965,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
965
965
|
intent,
|
|
966
966
|
options.idempotencyKey
|
|
967
967
|
);
|
|
968
|
-
const payload = await new (0,
|
|
968
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
969
969
|
idempotencyKey
|
|
970
970
|
});
|
|
971
|
-
|
|
971
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
972
972
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
973
973
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
974
974
|
);
|
|
975
975
|
}
|
|
976
976
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
977
|
-
const payload = await new (0,
|
|
978
|
-
|
|
977
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
978
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
979
979
|
json: options.json,
|
|
980
980
|
text: renderMonitorJob(payload)
|
|
981
981
|
});
|
|
@@ -989,7 +989,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
989
989
|
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
990
990
|
readMonitorDefinitionsJsonFile(options.file)
|
|
991
991
|
);
|
|
992
|
-
|
|
992
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
993
993
|
{
|
|
994
994
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
995
995
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1009,7 +1009,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1009
1009
|
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1010
1010
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1011
1011
|
);
|
|
1012
|
-
|
|
1012
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
1013
1013
|
{
|
|
1014
1014
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1015
1015
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1021,32 +1021,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1021
1021
|
process.exitCode = 2;
|
|
1022
1022
|
}
|
|
1023
1023
|
async function handleMonitorJobGet(jobId, options) {
|
|
1024
|
-
const payload = await new (0,
|
|
1025
|
-
|
|
1024
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1025
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
1026
1026
|
json: options.json,
|
|
1027
1027
|
text: renderMonitorJob(payload)
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
1030
|
async function handleMonitorJobWait(jobId, options) {
|
|
1031
|
-
const payload = await new (0,
|
|
1031
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1032
1032
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1033
1033
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1034
1034
|
});
|
|
1035
|
-
|
|
1035
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
1036
1036
|
json: options.json,
|
|
1037
1037
|
text: renderMonitorJob(payload)
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
1040
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1041
1041
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1042
|
-
const payload = await new (0,
|
|
1042
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1043
1043
|
...limit === void 0 ? {} : { limit }
|
|
1044
1044
|
});
|
|
1045
|
-
|
|
1045
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1046
1046
|
}
|
|
1047
1047
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1048
|
-
const payload = await new (0,
|
|
1049
|
-
|
|
1048
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1049
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, {
|
|
1050
1050
|
json: options.json,
|
|
1051
1051
|
text: renderMonitorJob(payload)
|
|
1052
1052
|
});
|
|
@@ -1344,7 +1344,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1344
1344
|
`;
|
|
1345
1345
|
}
|
|
1346
1346
|
function reportFleetState(payload, error, options) {
|
|
1347
|
-
|
|
1347
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
1348
1348
|
{
|
|
1349
1349
|
...payload,
|
|
1350
1350
|
code: error.code,
|
|
@@ -1459,7 +1459,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1459
1459
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1460
1460
|
`, "utf8");
|
|
1461
1461
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1462
|
-
|
|
1462
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
1463
1463
|
{ schemaVersion: 2, file, definition, next },
|
|
1464
1464
|
{
|
|
1465
1465
|
json: options.json,
|
|
@@ -1521,7 +1521,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1521
1521
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1522
1522
|
);
|
|
1523
1523
|
}
|
|
1524
|
-
const client = new (0,
|
|
1524
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
1525
1525
|
const payload = await client.monitors.fleets.sync(
|
|
1526
1526
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1527
1527
|
{
|
|
@@ -1543,7 +1543,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1545
1545
|
if (!options.wait || options.dryRun) {
|
|
1546
|
-
|
|
1546
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1547
1547
|
json: options.json,
|
|
1548
1548
|
text: renderFleetSync(payload, {
|
|
1549
1549
|
fleetId,
|
|
@@ -1569,7 +1569,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1569
1569
|
const status = fleetStatus(final);
|
|
1570
1570
|
const summary = renderFleetGet(final);
|
|
1571
1571
|
if (status === "converged") {
|
|
1572
|
-
|
|
1572
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1573
1573
|
return;
|
|
1574
1574
|
}
|
|
1575
1575
|
const driftCommand = `deepline monitors fleets get ${fleetShellArg(fleetId)} --drift`;
|
|
@@ -1602,14 +1602,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1602
1602
|
);
|
|
1603
1603
|
}
|
|
1604
1604
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1605
|
-
const client = new (0,
|
|
1605
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
1606
1606
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1607
1607
|
...options.drift ? { drift: true } : {},
|
|
1608
1608
|
...limit !== void 0 ? { limit } : {}
|
|
1609
1609
|
});
|
|
1610
1610
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1611
1611
|
if (!options.check) {
|
|
1612
|
-
|
|
1612
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1613
1613
|
return;
|
|
1614
1614
|
}
|
|
1615
1615
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1617,7 +1617,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1617
1617
|
);
|
|
1618
1618
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1619
1619
|
if (unconverged.length === 0) {
|
|
1620
|
-
|
|
1620
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1621
1621
|
return;
|
|
1622
1622
|
}
|
|
1623
1623
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -1656,13 +1656,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1656
1656
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
1657
1657
|
);
|
|
1658
1658
|
}
|
|
1659
|
-
const client = new (0,
|
|
1659
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
1660
1660
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
1661
1661
|
idempotencyKey
|
|
1662
1662
|
});
|
|
1663
1663
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1664
1664
|
if (!options.wait) {
|
|
1665
|
-
|
|
1665
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1666
1666
|
json: options.json,
|
|
1667
1667
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
1668
1668
|
idempotency key ${idempotencyKey}
|
|
@@ -1685,7 +1685,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1685
1685
|
const envelope = { ...accepted, ...final };
|
|
1686
1686
|
const text = renderFleetGet(final);
|
|
1687
1687
|
if (fleetStatus(final) === "converged") {
|
|
1688
|
-
|
|
1688
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
1689
1689
|
return;
|
|
1690
1690
|
}
|
|
1691
1691
|
reportFleetState(
|
|
@@ -1727,7 +1727,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
1730
|
-
const client = new (0,
|
|
1730
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
1731
1731
|
if (options.dryRun) {
|
|
1732
1732
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
1733
1733
|
dryRun: true,
|
|
@@ -1737,7 +1737,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
1737
1737
|
command: "deepline monitors fleets deactivate",
|
|
1738
1738
|
mutation: "fleet deactivate"
|
|
1739
1739
|
});
|
|
1740
|
-
|
|
1740
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, plan, {
|
|
1741
1741
|
json: options.json,
|
|
1742
1742
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
1743
1743
|
});
|
|
@@ -1775,7 +1775,7 @@ Preview the blast radius first:
|
|
|
1775
1775
|
});
|
|
1776
1776
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1777
1777
|
if (payload.already === true) {
|
|
1778
|
-
|
|
1778
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1779
1779
|
json: options.json,
|
|
1780
1780
|
text: `Fleet ${fleetId} is already deactivated.
|
|
1781
1781
|
`
|
|
@@ -1787,7 +1787,7 @@ Preview the blast radius first:
|
|
|
1787
1787
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
1788
1788
|
` : "");
|
|
1789
1789
|
if (!options.wait) {
|
|
1790
|
-
|
|
1790
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1791
1791
|
json: options.json,
|
|
1792
1792
|
text: acceptedText
|
|
1793
1793
|
});
|
|
@@ -1809,7 +1809,7 @@ Preview the blast radius first:
|
|
|
1809
1809
|
const envelope = { ...accepted, ...final };
|
|
1810
1810
|
const summary = renderFleetGet(final);
|
|
1811
1811
|
if (fleetStatus(final) === "deactivated") {
|
|
1812
|
-
|
|
1812
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1813
1813
|
return;
|
|
1814
1814
|
}
|
|
1815
1815
|
reportFleetState(
|
|
@@ -1840,7 +1840,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
1840
1840
|
"Agent notes:",
|
|
1841
1841
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
1842
1842
|
];
|
|
1843
|
-
|
|
1843
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
1844
1844
|
{
|
|
1845
1845
|
schemaVersion: 1,
|
|
1846
1846
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2001,7 +2001,7 @@ function renderMonitorGet(payload) {
|
|
|
2001
2001
|
`;
|
|
2002
2002
|
}
|
|
2003
2003
|
async function handleMonitorsGet(key, options) {
|
|
2004
|
-
const client = new (0,
|
|
2004
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
2005
2005
|
const payload = await client.monitors.get(key);
|
|
2006
2006
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2007
2007
|
const dependents = boundPlays ? {
|
|
@@ -2009,24 +2009,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2009
2009
|
truncated: payload.consumer_health_truncated === true
|
|
2010
2010
|
} : await client.monitors.dependents(key);
|
|
2011
2011
|
const detail = { ...payload, dependents };
|
|
2012
|
-
|
|
2012
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, detail, {
|
|
2013
2013
|
json: options.json,
|
|
2014
2014
|
text: renderMonitorGet(detail)
|
|
2015
2015
|
});
|
|
2016
2016
|
}
|
|
2017
2017
|
async function handleMonitorsTest(key, payload, options) {
|
|
2018
2018
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2019
|
-
const result = await new (0,
|
|
2019
|
+
const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2020
2020
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2021
2021
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2022
2022
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2023
2023
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2024
2024
|
`;
|
|
2025
|
-
|
|
2025
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2026
2026
|
}
|
|
2027
2027
|
async function handleMonitorsValidate(key, options) {
|
|
2028
|
-
const result = await new (0,
|
|
2029
|
-
|
|
2028
|
+
const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.validate(key);
|
|
2029
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2030
2030
|
if (result.valid === false) process.exitCode = 7;
|
|
2031
2031
|
}
|
|
2032
2032
|
async function confirmMonitorDelete(key) {
|
|
@@ -2044,14 +2044,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
}
|
|
2046
2046
|
async function handleMonitorsDelete(key, options) {
|
|
2047
|
-
const client = new (0,
|
|
2047
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
2048
2048
|
if (options.dryRun) {
|
|
2049
2049
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2050
2050
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2051
2051
|
command: "deepline monitors delete",
|
|
2052
2052
|
mutation: "delete"
|
|
2053
2053
|
});
|
|
2054
|
-
|
|
2054
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2055
2055
|
json: options.json,
|
|
2056
2056
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2057
2057
|
});
|
|
@@ -2071,7 +2071,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
}
|
|
2073
2073
|
const payload = await client.monitors.delete(key);
|
|
2074
|
-
|
|
2074
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2075
2075
|
}
|
|
2076
2076
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2077
2077
|
const body = resolveMonitorJsonBody({
|
|
@@ -2080,25 +2080,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2080
2080
|
argLabel: "<patch>",
|
|
2081
2081
|
command: `deepline monitors update ${key}`
|
|
2082
2082
|
});
|
|
2083
|
-
const payload = await new (0,
|
|
2084
|
-
|
|
2083
|
+
const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.update(key, body);
|
|
2084
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2085
2085
|
}
|
|
2086
2086
|
async function handleMonitorsReactivate(key, options) {
|
|
2087
|
-
const client = new (0,
|
|
2087
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
2088
2088
|
if (options.dryRun) {
|
|
2089
2089
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2090
2090
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2091
2091
|
command: "deepline monitors reactivate",
|
|
2092
2092
|
mutation: "reactivate"
|
|
2093
2093
|
});
|
|
2094
|
-
|
|
2094
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2095
2095
|
json: options.json,
|
|
2096
2096
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2097
2097
|
});
|
|
2098
2098
|
return;
|
|
2099
2099
|
}
|
|
2100
2100
|
const payload = await client.monitors.reactivate(key);
|
|
2101
|
-
|
|
2101
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2102
2102
|
}
|
|
2103
2103
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2104
2104
|
function monitorHealthLine(health) {
|
|
@@ -2220,7 +2220,7 @@ function monitorHealthText(health) {
|
|
|
2220
2220
|
`;
|
|
2221
2221
|
}
|
|
2222
2222
|
async function handleMonitorsAudit(options) {
|
|
2223
|
-
const client = new (0,
|
|
2223
|
+
const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
|
|
2224
2224
|
const fleetId = _optionalChain([options, 'access', _73 => _73.fleet, 'optionalAccess', _74 => _74.trim, 'call', _75 => _75()]) || void 0;
|
|
2225
2225
|
const scope = fleetId ? { fleetId } : {};
|
|
2226
2226
|
let result = await client.monitors.audit(scope);
|
|
@@ -2264,7 +2264,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2264
2264
|
"",
|
|
2265
2265
|
monitorHealthText(health)
|
|
2266
2266
|
].join("\n");
|
|
2267
|
-
|
|
2267
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
2268
2268
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2269
2269
|
{ json: options.json, text }
|
|
2270
2270
|
);
|
|
@@ -2277,10 +2277,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2277
2277
|
}
|
|
2278
2278
|
async function handleMonitorsHealth(options) {
|
|
2279
2279
|
const fleetId = _optionalChain([options, 'access', _79 => _79.fleet, 'optionalAccess', _80 => _80.trim, 'call', _81 => _81()]) || void 0;
|
|
2280
|
-
const health = await new (0,
|
|
2280
|
+
const health = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.health(
|
|
2281
2281
|
fleetId ? { fleetId } : {}
|
|
2282
2282
|
);
|
|
2283
|
-
|
|
2283
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, health, {
|
|
2284
2284
|
json: options.json,
|
|
2285
2285
|
text: monitorHealthText(health)
|
|
2286
2286
|
});
|
|
@@ -2354,14 +2354,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2354
2354
|
"deploy",
|
|
2355
2355
|
options.idempotencyKey
|
|
2356
2356
|
);
|
|
2357
|
-
const result = await new (0,
|
|
2357
|
+
const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.batch.submit({
|
|
2358
2358
|
kind: "deploy",
|
|
2359
2359
|
manifestNdjson,
|
|
2360
2360
|
dryRun: options.dryRun === true,
|
|
2361
2361
|
idempotencyKey
|
|
2362
2362
|
});
|
|
2363
2363
|
const operation = result.operation;
|
|
2364
|
-
|
|
2364
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
2365
2365
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2366
2366
|
{
|
|
2367
2367
|
json: options.json,
|
|
@@ -2389,7 +2389,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2389
2389
|
kind,
|
|
2390
2390
|
options.idempotencyKey
|
|
2391
2391
|
);
|
|
2392
|
-
const result = await new (0,
|
|
2392
|
+
const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.batch.submit({
|
|
2393
2393
|
kind,
|
|
2394
2394
|
scope,
|
|
2395
2395
|
dryRun: options.dryRun === true,
|
|
@@ -2402,14 +2402,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2402
2402
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2403
2403
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2404
2404
|
].join("\n");
|
|
2405
|
-
|
|
2405
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
|
|
2406
2406
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2407
2407
|
{ json: options.json, text: `${text}
|
|
2408
2408
|
` }
|
|
2409
2409
|
);
|
|
2410
2410
|
}
|
|
2411
2411
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2412
|
-
const result = await new (0,
|
|
2412
|
+
const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2413
2413
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2414
2414
|
});
|
|
2415
2415
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2421,7 +2421,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2421
2421
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2422
2422
|
] : []
|
|
2423
2423
|
].join("\n");
|
|
2424
|
-
|
|
2424
|
+
_chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2425
2425
|
` });
|
|
2426
2426
|
}
|
|
2427
2427
|
function registerMonitorsCommands(program) {
|