deepline 0.3.392 → 0.3.393
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.ts +156 -24
- package/dist/bundling-sources/sdk/src/compat.ts +9 -0
- package/dist/bundling-sources/sdk/src/http.ts +5 -1
- package/dist/bundling-sources/sdk/src/index.ts +5 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +182 -6
- package/dist/bundling-sources/sdk/src/release.ts +4 -1
- package/dist/bundling-sources/sdk/src/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/request-warnings.ts +64 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +315 -0
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +41 -8
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +418 -44
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +36 -3
- package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +11 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +19 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +158 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +235 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +92 -58
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +30 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1161 -316
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +28 -15
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +24 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +31 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -4
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +172 -79
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +173 -1
- package/dist/cli/{auth-6JSA2ZCW.mjs → auth-5PXHA232.mjs} +4 -4
- package/dist/cli/auth-P3MVDTXM.js +39 -0
- package/dist/cli/{billing-Q5BLQHIU.js → billing-JFB2XLSO.js} +101 -74
- package/dist/cli/{billing-MRRO643H.mjs → billing-Z2N7ZAGM.mjs} +32 -5
- package/dist/cli/{chunk-CVLM3WMJ.js → chunk-2HAD745V.js} +242 -183
- package/dist/cli/{chunk-HGYBEAQP.mjs → chunk-2LGC4EFT.mjs} +3 -3
- package/dist/cli/{chunk-A3APGZFP.mjs → chunk-4PT2VA3A.mjs} +2 -2
- package/dist/cli/{chunk-6DBOU7UH.js → chunk-4XX6443T.js} +176 -87
- package/dist/cli/{chunk-2QLML6G4.mjs → chunk-5KWKZIQR.mjs} +4 -4
- package/dist/cli/{chunk-2G7DXFHI.mjs → chunk-5PRVMXKB.mjs} +27 -2
- package/dist/cli/{chunk-DSWSEHRX.mjs → chunk-6I73X254.mjs} +1 -1
- package/dist/cli/{chunk-ZTACINO5.mjs → chunk-7HR7BGZL.mjs} +13 -3
- package/dist/cli/{chunk-BB3FNYFY.js → chunk-AARX5L4B.js} +2 -2
- package/dist/cli/{chunk-WMS5U6YB.js → chunk-CDFH2DYL.js} +20 -19
- package/dist/cli/{chunk-R3O2CZ4H.mjs → chunk-FQ6VHPW4.mjs} +2 -2
- package/dist/cli/{chunk-MU6M3URX.mjs → chunk-HLEESTCH.mjs} +1 -1
- package/dist/cli/{chunk-Q6EOHNRH.mjs → chunk-JI2B4RZP.mjs} +119 -6
- package/dist/cli/{chunk-2Q3GEFL4.mjs → chunk-KIYU2TGL.mjs} +2 -2
- package/dist/cli/{chunk-Y6VOGHF2.mjs → chunk-KZZC33PY.mjs} +0 -181
- package/dist/cli/{chunk-UCKJQG25.js → chunk-L2SYLGRP.js} +8 -8
- package/dist/cli/{chunk-2GAHHSLB.mjs → chunk-LMMEAMA7.mjs} +3 -2
- package/dist/cli/{chunk-YAZCDBXX.mjs → chunk-LZPCDB7U.mjs} +3 -2
- package/dist/cli/{chunk-RV6ALZIX.js → chunk-M7Y7JYZX.js} +32 -7
- package/dist/cli/{chunk-QGKPTBRR.js → chunk-MS6GUPBB.js} +3 -3
- package/dist/cli/{chunk-4SFPVW7A.js → chunk-OXNOAD6Y.js} +26 -26
- package/dist/cli/{chunk-JOFPQGXW.js → chunk-PTDECJGP.js} +50 -50
- package/dist/cli/{chunk-5O4B6AUN.js → chunk-PWSWAN7Q.js} +25 -2
- package/dist/cli/{chunk-YN6YA7ZZ.mjs → chunk-Q26LUSQ2.mjs} +79 -20
- package/dist/cli/{chunk-3VN4FTE3.js → chunk-RDXFGPJU.js} +1 -182
- package/dist/cli/{chunk-7E66A24V.mjs → chunk-RKMB3N7K.mjs} +25 -2
- package/dist/cli/{chunk-JSLPHFP7.js → chunk-RWHWF5ZJ.js} +3 -2
- package/dist/cli/{chunk-3FV4GBRK.mjs → chunk-STNYIMIV.mjs} +97 -8
- package/dist/cli/chunk-UBKA33KY.mjs +310 -0
- package/dist/cli/{chunk-PAIMOGCM.js → chunk-UHNDVD3P.js} +125 -12
- package/dist/cli/{chunk-24VEN5PQ.mjs → chunk-UOGZUA24.mjs} +179 -17
- package/dist/cli/{chunk-T7OKJ2T6.js → chunk-VIQJIX2P.js} +73 -63
- package/dist/cli/{chunk-RIV2GS5E.js → chunk-VIWE6WRK.js} +627 -465
- package/dist/cli/{chunk-EY7RFC6A.js → chunk-W4WOMXR3.js} +15 -15
- package/dist/cli/chunk-XDVT3GOM.js +310 -0
- package/dist/cli/{chunk-2FQG2HU4.js → chunk-Z3OOZM5L.js} +8 -8
- package/dist/cli/{csv-E4QGUIGI.mjs → csv-KJWZHKCH.mjs} +3 -3
- package/dist/cli/{csv-26U5T24Z.js → csv-P3Z3YE7H.js} +12 -12
- package/dist/cli/{db-JTRJIAQW.mjs → db-NCM4CQIS.mjs} +6 -5
- package/dist/cli/{db-QHBFLMVL.js → db-NUZGJNQC.js} +31 -30
- package/dist/cli/{describe-E3DE3ZK3.mjs → describe-WT6MM2GO.mjs} +17 -16
- package/dist/cli/{describe-FDV2V74F.js → describe-YGSEN5WC.js} +24 -23
- package/dist/cli/{executions-VZYOGVQY.js → executions-PCOLHN7Q.js} +8 -7
- package/dist/cli/{executions-B3GTNPRE.mjs → executions-XS2IPJ4W.mjs} +6 -5
- package/dist/cli/{feedback-CR55FJA2.js → feedback-4MSH7TFU.js} +7 -7
- package/dist/cli/{feedback-4CEBR3OV.mjs → feedback-CCLTS5SV.mjs} +3 -3
- package/dist/cli/{git-NM2PHHZ4.mjs → git-K2DHPMPC.mjs} +4 -4
- package/dist/cli/git-RNM45FX4.js +23 -0
- package/dist/cli/index.js +96 -92
- package/dist/cli/index.mjs +46 -42
- package/dist/cli/{legacy-noops-A7MSW5ND.mjs → legacy-noops-B5S4AR3P.mjs} +4 -4
- package/dist/cli/{legacy-noops-ZUA4YFIH.js → legacy-noops-GPNOPFXV.js} +7 -7
- package/dist/cli/{monitors-NVPRQYP3.mjs → monitors-JLMAIPRG.mjs} +6 -5
- package/dist/cli/{monitors-ZE3TLZ4H.js → monitors-ZAWD7NSN.js} +87 -86
- package/dist/cli/{org-U7A6DV5D.js → org-P2KN4CES.js} +66 -65
- package/dist/cli/{org-KUBILNQV.mjs → org-T3JTHP4G.mjs} +6 -5
- package/dist/cli/{play-HRDXQ4QE.mjs → play-NK6BLRGL.mjs} +11 -10
- package/dist/cli/play-PDXR6JFB.js +158 -0
- package/dist/cli/{providers-OHIWI453.mjs → providers-3NQRA7IT.mjs} +6 -5
- package/dist/cli/{providers-VD6YTVQZ.js → providers-5QRZN3DT.js} +9 -8
- package/dist/cli/{quickstart-UBV2FONF.mjs → quickstart-PIA2JGPV.mjs} +3 -3
- package/dist/cli/{quickstart-ETTCWPA4.js → quickstart-R7NUZGNW.js} +5 -5
- package/dist/cli/run-identity-G257GQED.js +25 -0
- package/dist/cli/run-identity-MRNCEGV2.mjs +25 -0
- package/dist/cli/{search-F44IZRT7.mjs → search-AIDIIGLY.mjs} +7 -6
- package/dist/cli/search-QRWL7MFM.js +27 -0
- package/dist/cli/{secrets-CAEMRORF.js → secrets-BT3PGMWN.js} +15 -14
- package/dist/cli/{secrets-R6XOJZKU.mjs → secrets-OQNHL45O.mjs} +6 -5
- package/dist/cli/{sessions-6GC7OFTT.js → sessions-EYXWOSWK.js} +5 -5
- package/dist/cli/{sessions-RLN6UQS3.mjs → sessions-SF7WJPJP.mjs} +4 -4
- package/dist/cli/{settings-DPNVUAV2.js → settings-BA3GHBOD.js} +76 -75
- package/dist/cli/{settings-KIPAMRPP.mjs → settings-Y57JTFDD.mjs} +9 -8
- package/dist/cli/{setup-TU2F7PU5.mjs → setup-7GR5GBHA.mjs} +6 -6
- package/dist/cli/{setup-DTL3L5SG.js → setup-RERXYC66.js} +41 -41
- package/dist/cli/{skills-UV5MYJ46.mjs → skills-SJWIQAV5.mjs} +4 -4
- package/dist/cli/skills-V7EY75HB.js +28 -0
- package/dist/cli/tools-H5HLBCHH.js +41 -0
- package/dist/cli/{tools-QRRNDCQ7.mjs → tools-ZF3JXPNL.mjs} +10 -9
- package/dist/cli/update-472HA3LT.js +28 -0
- package/dist/cli/{update-4426TF35.mjs → update-FFFYQAOJ.mjs} +6 -6
- package/dist/cli/{workflow-HNLOVISB.js → workflow-SZJVQH4T.js} +17 -16
- package/dist/cli/{workflow-N4U5VLZ3.mjs → workflow-XVFEEGAS.mjs} +7 -6
- package/dist/{client-e6Qh5ZIg.d.mts → client-DU5dtHDy.d.mts} +153 -4
- package/dist/{client-Uxuy-xQ2.d.ts → client-mCE88hC4.d.ts} +153 -4
- package/dist/{compiler-manifest-CY2v8ab0.d.ts → compiler-manifest-DE4RdAiY.d.mts} +61 -1
- package/dist/{compiler-manifest-CY2v8ab0.d.mts → compiler-manifest-DE4RdAiY.d.ts} +61 -1
- package/dist/{index-B9fBZH1g.d.mts → index-BI6nWgaV.d.mts} +1 -1
- package/dist/{index-BZ6uzZJl.d.ts → index-Bi-f7HFT.d.ts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +120 -29
- package/dist/index.mjs +111 -20
- package/dist/install-integrity.json +91 -86
- 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/plays/run-request.js +5 -2
- package/dist/plays/run-request.mjs +4 -1
- package/dist/release.d.mts +4 -1
- package/dist/release.d.ts +4 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-67TAELQL.js +0 -39
- package/dist/cli/git-I5JTK6YU.js +0 -23
- package/dist/cli/play-A2V7YDU7.js +0 -157
- package/dist/cli/search-WWXMBVPH.js +0 -26
- package/dist/cli/skills-SWOSEZLB.js +0 -28
- package/dist/cli/tools-IL2YCDQ6.js +0 -40
- package/dist/cli/update-BERDPEYR.js +0 -28
|
@@ -1,9 +1,10 @@
|
|
|
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 _chunk2HAD745Vjs = require('./chunk-2HAD745V.js');
|
|
5
5
|
require('./chunk-S6R3OX7B.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-UHNDVD3P.js');
|
|
7
|
+
require('./chunk-XDVT3GOM.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
@@ -17,15 +18,15 @@ var _chunkIF75RD6Ujs = require('./chunk-IF75RD6U.js');
|
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
var
|
|
21
|
+
var _chunkM7Y7JYZXjs = require('./chunk-M7Y7JYZX.js');
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
var
|
|
24
|
+
var _chunkCDFH2DYLjs = require('./chunk-CDFH2DYL.js');
|
|
24
25
|
require('./chunk-XNYIZMNQ.js');
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
28
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-RWHWF5ZJ.js');
|
|
29
30
|
require('./chunk-OG64RBAC.js');
|
|
30
31
|
require('./chunk-COGTRVWW.js');
|
|
31
32
|
|
|
@@ -56,7 +57,7 @@ var MonitorDryRunUnsupportedError = (_class2 = class extends Error {
|
|
|
56
57
|
function monitorsErrorExitCode(error) {
|
|
57
58
|
if (error instanceof MonitorsUsageError) return 2;
|
|
58
59
|
if (error instanceof MonitorFleetStateError) return 6;
|
|
59
|
-
if (error instanceof
|
|
60
|
+
if (error instanceof _chunkCDFH2DYLjs.AuthError) return 3;
|
|
60
61
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError) {
|
|
61
62
|
const status = error.statusCode;
|
|
62
63
|
if (status === 401 || status === 403) return 3;
|
|
@@ -103,10 +104,10 @@ function reportMonitorsFailure(error, options) {
|
|
|
103
104
|
const exitCode = monitorsErrorExitCode(error);
|
|
104
105
|
const next = monitorsFailureNextCommand(error, exitCode, options);
|
|
105
106
|
const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
|
|
106
|
-
const wantsJson =
|
|
107
|
+
const wantsJson = _chunkM7Y7JYZXjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
107
108
|
if (wantsJson) {
|
|
108
|
-
const payload =
|
|
109
|
-
|
|
109
|
+
const payload = _chunkM7Y7JYZXjs.errorToJsonPayload.call(void 0, error);
|
|
110
|
+
_chunkM7Y7JYZXjs.printJson.call(void 0, {
|
|
110
111
|
ok: false,
|
|
111
112
|
exitCode,
|
|
112
113
|
...next ? { next } : {},
|
|
@@ -520,14 +521,14 @@ Preview the plan first with:
|
|
|
520
521
|
);
|
|
521
522
|
}
|
|
522
523
|
async function handleMonitorsStatus(options) {
|
|
523
|
-
const payload = await new (0,
|
|
524
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.status();
|
|
524
525
|
const hasAccess = payload.has_access === true;
|
|
525
526
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
526
527
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
527
528
|
${reason}` : ""}
|
|
528
529
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
529
530
|
`;
|
|
530
|
-
|
|
531
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
531
532
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
532
533
|
{ json: options.json, text }
|
|
533
534
|
);
|
|
@@ -593,14 +594,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
593
594
|
}
|
|
594
595
|
}
|
|
595
596
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
596
|
-
const payload = await new (0,
|
|
597
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.available(tool, {
|
|
597
598
|
...options.provider ? { provider: options.provider } : {},
|
|
598
599
|
...options.search ? { search: options.search } : {},
|
|
599
600
|
...options.limit ? { limit: options.limit } : {},
|
|
600
601
|
...options.full ? { full: true } : {},
|
|
601
602
|
...options.compact ? { compact: true } : {}
|
|
602
603
|
});
|
|
603
|
-
|
|
604
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
604
605
|
json: options.json,
|
|
605
606
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
606
607
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -703,14 +704,14 @@ async function handleMonitorsList(options) {
|
|
|
703
704
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
704
705
|
);
|
|
705
706
|
}
|
|
706
|
-
const payload = await new (0,
|
|
707
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.list({
|
|
707
708
|
...state ? { state } : {},
|
|
708
709
|
...options.status ? { status: options.status } : {},
|
|
709
710
|
...options.limit ? { limit: options.limit } : {},
|
|
710
711
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
711
712
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
712
713
|
});
|
|
713
|
-
|
|
714
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
714
715
|
json: options.json,
|
|
715
716
|
text: renderDeployedListText(
|
|
716
717
|
payload,
|
|
@@ -726,10 +727,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
726
727
|
argLabel: "<definition>",
|
|
727
728
|
command: "deepline monitors check"
|
|
728
729
|
});
|
|
729
|
-
const payload = await new (0,
|
|
730
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.check(
|
|
730
731
|
body
|
|
731
732
|
);
|
|
732
|
-
|
|
733
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
733
734
|
}
|
|
734
735
|
async function handleMonitorsDeploy(definition, options) {
|
|
735
736
|
const body = resolveMonitorJsonBody({
|
|
@@ -738,7 +739,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
738
739
|
argLabel: "<definition>",
|
|
739
740
|
command: "deepline monitors deploy"
|
|
740
741
|
});
|
|
741
|
-
const client = new (0,
|
|
742
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
742
743
|
const definitionArg = body;
|
|
743
744
|
if (options.dryRun) {
|
|
744
745
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -746,7 +747,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
746
747
|
});
|
|
747
748
|
const valid = payload2.valid !== false;
|
|
748
749
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _21 => _21(payload2), 'optionalAccess', _22 => _22.identity_conflict]));
|
|
749
|
-
|
|
750
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
750
751
|
{ dry_run: true, ...payload2 },
|
|
751
752
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
752
753
|
);
|
|
@@ -756,7 +757,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
756
757
|
return;
|
|
757
758
|
}
|
|
758
759
|
const payload = await client.monitors.deploy(definitionArg);
|
|
759
|
-
|
|
760
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
760
761
|
json: options.json,
|
|
761
762
|
text: renderMonitorDeployCompletion(payload)
|
|
762
763
|
});
|
|
@@ -768,29 +769,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
768
769
|
argLabel: "<definition>",
|
|
769
770
|
command: "deepline monitors sync"
|
|
770
771
|
});
|
|
771
|
-
const payload = await new (0,
|
|
772
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.sync(body, {
|
|
772
773
|
...options.dryRun ? { dryRun: true } : {},
|
|
773
774
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
774
775
|
});
|
|
775
776
|
if (options.dryRun) {
|
|
776
777
|
const plan = payload;
|
|
777
|
-
|
|
778
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
778
779
|
{ dry_run: true, ...plan },
|
|
779
780
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
780
781
|
);
|
|
781
782
|
return;
|
|
782
783
|
}
|
|
783
|
-
|
|
784
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
784
785
|
json: options.json,
|
|
785
786
|
text: renderMonitorJob(payload)
|
|
786
787
|
});
|
|
787
788
|
}
|
|
788
789
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
789
|
-
const payload = await new (0,
|
|
790
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors[action](key, {
|
|
790
791
|
...options.dryRun ? { dryRun: true } : {},
|
|
791
792
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
792
793
|
});
|
|
793
|
-
|
|
794
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
794
795
|
json: options.json,
|
|
795
796
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
796
797
|
});
|
|
@@ -879,11 +880,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
879
880
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
880
881
|
);
|
|
881
882
|
}
|
|
882
|
-
const payload = await new (0,
|
|
883
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.batch.deploy(
|
|
883
884
|
lint.normalized.monitors,
|
|
884
885
|
{ idempotencyKey }
|
|
885
886
|
);
|
|
886
|
-
|
|
887
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
887
888
|
{
|
|
888
889
|
...payload,
|
|
889
890
|
idempotency_key: idempotencyKey,
|
|
@@ -916,7 +917,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
916
917
|
);
|
|
917
918
|
}
|
|
918
919
|
if (options.dryRun) {
|
|
919
|
-
|
|
920
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
920
921
|
{
|
|
921
922
|
ok: true,
|
|
922
923
|
dry_run: true,
|
|
@@ -933,7 +934,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
933
934
|
"sync",
|
|
934
935
|
options.idempotencyKey
|
|
935
936
|
);
|
|
936
|
-
const payload = await new (0,
|
|
937
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.batches.sync(
|
|
937
938
|
batchId,
|
|
938
939
|
lint.normalized.monitors,
|
|
939
940
|
{
|
|
@@ -941,14 +942,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
941
942
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
942
943
|
}
|
|
943
944
|
);
|
|
944
|
-
|
|
945
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
945
946
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
946
947
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
947
948
|
);
|
|
948
949
|
}
|
|
949
950
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
950
951
|
if (options.dryRun) {
|
|
951
|
-
|
|
952
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
952
953
|
{
|
|
953
954
|
ok: true,
|
|
954
955
|
dry_run: true,
|
|
@@ -964,17 +965,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
964
965
|
intent,
|
|
965
966
|
options.idempotencyKey
|
|
966
967
|
);
|
|
967
|
-
const payload = await new (0,
|
|
968
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
968
969
|
idempotencyKey
|
|
969
970
|
});
|
|
970
|
-
|
|
971
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
971
972
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
972
973
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
973
974
|
);
|
|
974
975
|
}
|
|
975
976
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
976
|
-
const payload = await new (0,
|
|
977
|
-
|
|
977
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
978
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
978
979
|
json: options.json,
|
|
979
980
|
text: renderMonitorJob(payload)
|
|
980
981
|
});
|
|
@@ -988,7 +989,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
988
989
|
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
989
990
|
readMonitorDefinitionsJsonFile(options.file)
|
|
990
991
|
);
|
|
991
|
-
|
|
992
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
992
993
|
{
|
|
993
994
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
994
995
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1008,7 +1009,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1008
1009
|
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1009
1010
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1010
1011
|
);
|
|
1011
|
-
|
|
1012
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1012
1013
|
{
|
|
1013
1014
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1014
1015
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1020,32 +1021,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1020
1021
|
process.exitCode = 2;
|
|
1021
1022
|
}
|
|
1022
1023
|
async function handleMonitorJobGet(jobId, options) {
|
|
1023
|
-
const payload = await new (0,
|
|
1024
|
-
|
|
1024
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1025
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1025
1026
|
json: options.json,
|
|
1026
1027
|
text: renderMonitorJob(payload)
|
|
1027
1028
|
});
|
|
1028
1029
|
}
|
|
1029
1030
|
async function handleMonitorJobWait(jobId, options) {
|
|
1030
|
-
const payload = await new (0,
|
|
1031
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1031
1032
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1032
1033
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1033
1034
|
});
|
|
1034
|
-
|
|
1035
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1035
1036
|
json: options.json,
|
|
1036
1037
|
text: renderMonitorJob(payload)
|
|
1037
1038
|
});
|
|
1038
1039
|
}
|
|
1039
1040
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1040
1041
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1041
|
-
const payload = await new (0,
|
|
1042
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1042
1043
|
...limit === void 0 ? {} : { limit }
|
|
1043
1044
|
});
|
|
1044
|
-
|
|
1045
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1045
1046
|
}
|
|
1046
1047
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1047
|
-
const payload = await new (0,
|
|
1048
|
-
|
|
1048
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1049
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1049
1050
|
json: options.json,
|
|
1050
1051
|
text: renderMonitorJob(payload)
|
|
1051
1052
|
});
|
|
@@ -1343,7 +1344,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1343
1344
|
`;
|
|
1344
1345
|
}
|
|
1345
1346
|
function reportFleetState(payload, error, options) {
|
|
1346
|
-
|
|
1347
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1347
1348
|
{
|
|
1348
1349
|
...payload,
|
|
1349
1350
|
code: error.code,
|
|
@@ -1458,7 +1459,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1458
1459
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1459
1460
|
`, "utf8");
|
|
1460
1461
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1461
|
-
|
|
1462
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1462
1463
|
{ schemaVersion: 2, file, definition, next },
|
|
1463
1464
|
{
|
|
1464
1465
|
json: options.json,
|
|
@@ -1520,7 +1521,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1520
1521
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1521
1522
|
);
|
|
1522
1523
|
}
|
|
1523
|
-
const client = new (0,
|
|
1524
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
1524
1525
|
const payload = await client.monitors.fleets.sync(
|
|
1525
1526
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1526
1527
|
{
|
|
@@ -1542,7 +1543,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1542
1543
|
}
|
|
1543
1544
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1544
1545
|
if (!options.wait || options.dryRun) {
|
|
1545
|
-
|
|
1546
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1546
1547
|
json: options.json,
|
|
1547
1548
|
text: renderFleetSync(payload, {
|
|
1548
1549
|
fleetId,
|
|
@@ -1568,7 +1569,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1568
1569
|
const status = fleetStatus(final);
|
|
1569
1570
|
const summary = renderFleetGet(final);
|
|
1570
1571
|
if (status === "converged") {
|
|
1571
|
-
|
|
1572
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1572
1573
|
return;
|
|
1573
1574
|
}
|
|
1574
1575
|
const driftCommand = `deepline monitors fleets get ${fleetShellArg(fleetId)} --drift`;
|
|
@@ -1601,14 +1602,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1601
1602
|
);
|
|
1602
1603
|
}
|
|
1603
1604
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1604
|
-
const client = new (0,
|
|
1605
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
1605
1606
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1606
1607
|
...options.drift ? { drift: true } : {},
|
|
1607
1608
|
...limit !== void 0 ? { limit } : {}
|
|
1608
1609
|
});
|
|
1609
1610
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1610
1611
|
if (!options.check) {
|
|
1611
|
-
|
|
1612
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1612
1613
|
return;
|
|
1613
1614
|
}
|
|
1614
1615
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1616,7 +1617,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1616
1617
|
);
|
|
1617
1618
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1618
1619
|
if (unconverged.length === 0) {
|
|
1619
|
-
|
|
1620
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1620
1621
|
return;
|
|
1621
1622
|
}
|
|
1622
1623
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -1655,13 +1656,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1655
1656
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
1656
1657
|
);
|
|
1657
1658
|
}
|
|
1658
|
-
const client = new (0,
|
|
1659
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
1659
1660
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
1660
1661
|
idempotencyKey
|
|
1661
1662
|
});
|
|
1662
1663
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1663
1664
|
if (!options.wait) {
|
|
1664
|
-
|
|
1665
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1665
1666
|
json: options.json,
|
|
1666
1667
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
1667
1668
|
idempotency key ${idempotencyKey}
|
|
@@ -1684,7 +1685,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1684
1685
|
const envelope = { ...accepted, ...final };
|
|
1685
1686
|
const text = renderFleetGet(final);
|
|
1686
1687
|
if (fleetStatus(final) === "converged") {
|
|
1687
|
-
|
|
1688
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
1688
1689
|
return;
|
|
1689
1690
|
}
|
|
1690
1691
|
reportFleetState(
|
|
@@ -1726,7 +1727,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
1726
1727
|
}
|
|
1727
1728
|
}
|
|
1728
1729
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
1729
|
-
const client = new (0,
|
|
1730
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
1730
1731
|
if (options.dryRun) {
|
|
1731
1732
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
1732
1733
|
dryRun: true,
|
|
@@ -1736,7 +1737,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
1736
1737
|
command: "deepline monitors fleets deactivate",
|
|
1737
1738
|
mutation: "fleet deactivate"
|
|
1738
1739
|
});
|
|
1739
|
-
|
|
1740
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, plan, {
|
|
1740
1741
|
json: options.json,
|
|
1741
1742
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
1742
1743
|
});
|
|
@@ -1774,7 +1775,7 @@ Preview the blast radius first:
|
|
|
1774
1775
|
});
|
|
1775
1776
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1776
1777
|
if (payload.already === true) {
|
|
1777
|
-
|
|
1778
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1778
1779
|
json: options.json,
|
|
1779
1780
|
text: `Fleet ${fleetId} is already deactivated.
|
|
1780
1781
|
`
|
|
@@ -1786,7 +1787,7 @@ Preview the blast radius first:
|
|
|
1786
1787
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
1787
1788
|
` : "");
|
|
1788
1789
|
if (!options.wait) {
|
|
1789
|
-
|
|
1790
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1790
1791
|
json: options.json,
|
|
1791
1792
|
text: acceptedText
|
|
1792
1793
|
});
|
|
@@ -1808,7 +1809,7 @@ Preview the blast radius first:
|
|
|
1808
1809
|
const envelope = { ...accepted, ...final };
|
|
1809
1810
|
const summary = renderFleetGet(final);
|
|
1810
1811
|
if (fleetStatus(final) === "deactivated") {
|
|
1811
|
-
|
|
1812
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1812
1813
|
return;
|
|
1813
1814
|
}
|
|
1814
1815
|
reportFleetState(
|
|
@@ -1839,7 +1840,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
1839
1840
|
"Agent notes:",
|
|
1840
1841
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
1841
1842
|
];
|
|
1842
|
-
|
|
1843
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
1843
1844
|
{
|
|
1844
1845
|
schemaVersion: 1,
|
|
1845
1846
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2000,7 +2001,7 @@ function renderMonitorGet(payload) {
|
|
|
2000
2001
|
`;
|
|
2001
2002
|
}
|
|
2002
2003
|
async function handleMonitorsGet(key, options) {
|
|
2003
|
-
const client = new (0,
|
|
2004
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
2004
2005
|
const payload = await client.monitors.get(key);
|
|
2005
2006
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2006
2007
|
const dependents = boundPlays ? {
|
|
@@ -2008,24 +2009,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2008
2009
|
truncated: payload.consumer_health_truncated === true
|
|
2009
2010
|
} : await client.monitors.dependents(key);
|
|
2010
2011
|
const detail = { ...payload, dependents };
|
|
2011
|
-
|
|
2012
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, detail, {
|
|
2012
2013
|
json: options.json,
|
|
2013
2014
|
text: renderMonitorGet(detail)
|
|
2014
2015
|
});
|
|
2015
2016
|
}
|
|
2016
2017
|
async function handleMonitorsTest(key, payload, options) {
|
|
2017
2018
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2018
|
-
const result = await new (0,
|
|
2019
|
+
const result = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2019
2020
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2020
2021
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2021
2022
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2022
2023
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2023
2024
|
`;
|
|
2024
|
-
|
|
2025
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2025
2026
|
}
|
|
2026
2027
|
async function handleMonitorsValidate(key, options) {
|
|
2027
|
-
const result = await new (0,
|
|
2028
|
-
|
|
2028
|
+
const result = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.validate(key);
|
|
2029
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2029
2030
|
if (result.valid === false) process.exitCode = 7;
|
|
2030
2031
|
}
|
|
2031
2032
|
async function confirmMonitorDelete(key) {
|
|
@@ -2043,14 +2044,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2043
2044
|
}
|
|
2044
2045
|
}
|
|
2045
2046
|
async function handleMonitorsDelete(key, options) {
|
|
2046
|
-
const client = new (0,
|
|
2047
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
2047
2048
|
if (options.dryRun) {
|
|
2048
2049
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2049
2050
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2050
2051
|
command: "deepline monitors delete",
|
|
2051
2052
|
mutation: "delete"
|
|
2052
2053
|
});
|
|
2053
|
-
|
|
2054
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2054
2055
|
json: options.json,
|
|
2055
2056
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2056
2057
|
});
|
|
@@ -2070,7 +2071,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2070
2071
|
}
|
|
2071
2072
|
}
|
|
2072
2073
|
const payload = await client.monitors.delete(key);
|
|
2073
|
-
|
|
2074
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2074
2075
|
}
|
|
2075
2076
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2076
2077
|
const body = resolveMonitorJsonBody({
|
|
@@ -2079,25 +2080,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2079
2080
|
argLabel: "<patch>",
|
|
2080
2081
|
command: `deepline monitors update ${key}`
|
|
2081
2082
|
});
|
|
2082
|
-
const payload = await new (0,
|
|
2083
|
-
|
|
2083
|
+
const payload = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.update(key, body);
|
|
2084
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2084
2085
|
}
|
|
2085
2086
|
async function handleMonitorsReactivate(key, options) {
|
|
2086
|
-
const client = new (0,
|
|
2087
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
2087
2088
|
if (options.dryRun) {
|
|
2088
2089
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2089
2090
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2090
2091
|
command: "deepline monitors reactivate",
|
|
2091
2092
|
mutation: "reactivate"
|
|
2092
2093
|
});
|
|
2093
|
-
|
|
2094
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2094
2095
|
json: options.json,
|
|
2095
2096
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2096
2097
|
});
|
|
2097
2098
|
return;
|
|
2098
2099
|
}
|
|
2099
2100
|
const payload = await client.monitors.reactivate(key);
|
|
2100
|
-
|
|
2101
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2101
2102
|
}
|
|
2102
2103
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2103
2104
|
function monitorHealthLine(health) {
|
|
@@ -2219,7 +2220,7 @@ function monitorHealthText(health) {
|
|
|
2219
2220
|
`;
|
|
2220
2221
|
}
|
|
2221
2222
|
async function handleMonitorsAudit(options) {
|
|
2222
|
-
const client = new (0,
|
|
2223
|
+
const client = new (0, _chunk2HAD745Vjs.DeeplineClient)();
|
|
2223
2224
|
const fleetId = _optionalChain([options, 'access', _73 => _73.fleet, 'optionalAccess', _74 => _74.trim, 'call', _75 => _75()]) || void 0;
|
|
2224
2225
|
const scope = fleetId ? { fleetId } : {};
|
|
2225
2226
|
let result = await client.monitors.audit(scope);
|
|
@@ -2263,7 +2264,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2263
2264
|
"",
|
|
2264
2265
|
monitorHealthText(health)
|
|
2265
2266
|
].join("\n");
|
|
2266
|
-
|
|
2267
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
2267
2268
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2268
2269
|
{ json: options.json, text }
|
|
2269
2270
|
);
|
|
@@ -2276,10 +2277,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2276
2277
|
}
|
|
2277
2278
|
async function handleMonitorsHealth(options) {
|
|
2278
2279
|
const fleetId = _optionalChain([options, 'access', _79 => _79.fleet, 'optionalAccess', _80 => _80.trim, 'call', _81 => _81()]) || void 0;
|
|
2279
|
-
const health = await new (0,
|
|
2280
|
+
const health = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.health(
|
|
2280
2281
|
fleetId ? { fleetId } : {}
|
|
2281
2282
|
);
|
|
2282
|
-
|
|
2283
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, health, {
|
|
2283
2284
|
json: options.json,
|
|
2284
2285
|
text: monitorHealthText(health)
|
|
2285
2286
|
});
|
|
@@ -2353,14 +2354,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2353
2354
|
"deploy",
|
|
2354
2355
|
options.idempotencyKey
|
|
2355
2356
|
);
|
|
2356
|
-
const result = await new (0,
|
|
2357
|
+
const result = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.batch.submit({
|
|
2357
2358
|
kind: "deploy",
|
|
2358
2359
|
manifestNdjson,
|
|
2359
2360
|
dryRun: options.dryRun === true,
|
|
2360
2361
|
idempotencyKey
|
|
2361
2362
|
});
|
|
2362
2363
|
const operation = result.operation;
|
|
2363
|
-
|
|
2364
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
2364
2365
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2365
2366
|
{
|
|
2366
2367
|
json: options.json,
|
|
@@ -2388,7 +2389,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2388
2389
|
kind,
|
|
2389
2390
|
options.idempotencyKey
|
|
2390
2391
|
);
|
|
2391
|
-
const result = await new (0,
|
|
2392
|
+
const result = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.batch.submit({
|
|
2392
2393
|
kind,
|
|
2393
2394
|
scope,
|
|
2394
2395
|
dryRun: options.dryRun === true,
|
|
@@ -2401,14 +2402,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2401
2402
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2402
2403
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2403
2404
|
].join("\n");
|
|
2404
|
-
|
|
2405
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
|
|
2405
2406
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2406
2407
|
{ json: options.json, text: `${text}
|
|
2407
2408
|
` }
|
|
2408
2409
|
);
|
|
2409
2410
|
}
|
|
2410
2411
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2411
|
-
const result = await new (0,
|
|
2412
|
+
const result = await new (0, _chunk2HAD745Vjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2412
2413
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2413
2414
|
});
|
|
2414
2415
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2420,7 +2421,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2420
2421
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2421
2422
|
] : []
|
|
2422
2423
|
].join("\n");
|
|
2423
|
-
|
|
2424
|
+
_chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2424
2425
|
` });
|
|
2425
2426
|
}
|
|
2426
2427
|
function registerMonitorsCommands(program) {
|