deepline 0.3.547 → 0.3.548
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/scheduler-backends/absurd-runtime-worker.ts +47 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +89 -0
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +3 -0
- package/dist/bundling-sources/shared_libs/security/email-domain.ts +24 -0
- package/dist/cli/auth-7UJFY5BY.js +43 -0
- package/dist/cli/{auth-WJEY4IDX.mjs → auth-YOOVLLUL.mjs} +5 -5
- package/dist/cli/{billing-PHJUDYF3.mjs → billing-2NCNX6L2.mjs} +8 -8
- package/dist/cli/{billing-IJITDDRQ.js → billing-HETIOUD6.js} +92 -92
- package/dist/cli/{chunk-FFBXLFKV.js → chunk-2OG2KBYJ.js} +1 -1
- package/dist/cli/{chunk-ECUD4QPD.mjs → chunk-3QRU6RY7.mjs} +3 -3
- package/dist/cli/{chunk-DJI5CLLW.mjs → chunk-53QLWPZK.mjs} +1 -1
- package/dist/cli/{chunk-IVFFCAV2.js → chunk-5OJOFUMO.js} +44 -44
- package/dist/cli/{chunk-MO7TGNXB.js → chunk-5XFJBIQT.js} +13 -13
- package/dist/cli/{chunk-E2OIYPB4.js → chunk-5XXPP3PR.js} +10 -10
- package/dist/cli/{chunk-Z2YGQZWV.mjs → chunk-64BFUBXX.mjs} +2 -2
- package/dist/cli/{chunk-QU3K3IY6.js → chunk-6GIZNOXQ.js} +12 -12
- package/dist/cli/{chunk-XNTDTAKC.mjs → chunk-7AJ5V3BK.mjs} +1 -1
- package/dist/cli/{chunk-HFIFKP3A.js → chunk-7H6TQ6W2.js} +5 -5
- package/dist/cli/{chunk-VNOQEDVC.js → chunk-7JIOJLTS.js} +7 -7
- package/dist/cli/{chunk-GIGAYLY6.js → chunk-7UJZWI5Z.js} +9 -9
- package/dist/cli/{chunk-L6QE2XVM.mjs → chunk-ATTURFOV.mjs} +1 -1
- package/dist/cli/{chunk-LMLSOHTU.js → chunk-AUYBBFPT.js} +53 -53
- package/dist/cli/{chunk-MBQELFL7.js → chunk-BDBEEV6X.js} +22 -22
- package/dist/cli/{chunk-L5J6UJ2X.js → chunk-BWJZ4NQJ.js} +15 -15
- package/dist/cli/{chunk-SAJWYN4B.js → chunk-CXZLHBNK.js} +4 -4
- package/dist/cli/{chunk-PBMO36BP.mjs → chunk-F4ON5COB.mjs} +2 -2
- package/dist/cli/{chunk-DIUNDLSX.mjs → chunk-FMQA7UZZ.mjs} +2 -2
- package/dist/cli/{chunk-ITLZBDSR.mjs → chunk-FUUYWEF4.mjs} +2 -2
- package/dist/cli/{chunk-G6KW764N.mjs → chunk-GCEGQ7TQ.mjs} +1 -1
- package/dist/cli/{chunk-2AHY47SI.js → chunk-GUIYFOG2.js} +3 -3
- package/dist/cli/{chunk-OVYXYTEP.js → chunk-HDLMX7SG.js} +16 -16
- package/dist/cli/{chunk-IKYN6PLO.mjs → chunk-HIMZ57QD.mjs} +5 -5
- package/dist/cli/{chunk-REAFIEV5.js → chunk-HTZIJORU.js} +99 -99
- package/dist/cli/{chunk-ESCVHDNY.mjs → chunk-HU3DDLGD.mjs} +5 -5
- package/dist/cli/{chunk-GJOGFWX3.js → chunk-I2JIWKCQ.js} +19 -19
- package/dist/cli/{chunk-2HPTLBNB.js → chunk-IIWXBRDK.js} +3 -3
- package/dist/cli/{chunk-CKIRKYW7.mjs → chunk-IQBXX54G.mjs} +3 -3
- package/dist/cli/{chunk-K3GMDSUX.js → chunk-JQWX377P.js} +5 -5
- package/dist/cli/{chunk-ABLTVG3J.js → chunk-LAVPP6WD.js} +41 -41
- package/dist/cli/{chunk-NBYFQZ6O.js → chunk-M2OZORIH.js} +2 -2
- package/dist/cli/{chunk-MOZEAGSR.mjs → chunk-MQSKSISW.mjs} +1 -1
- package/dist/cli/{chunk-56MEAGWA.mjs → chunk-MWQ4WWZF.mjs} +2 -2
- package/dist/cli/{chunk-G6XTCG3J.mjs → chunk-NFMX7BRF.mjs} +2 -2
- package/dist/cli/{chunk-TNJG4ZPN.mjs → chunk-OGDQFVCP.mjs} +2 -2
- package/dist/cli/{chunk-FMQXAOVE.mjs → chunk-OQCYSLML.mjs} +4 -4
- package/dist/cli/{chunk-GZFZZQL4.js → chunk-PVE3A2BO.js} +8 -8
- package/dist/cli/{chunk-5SFHPMBY.mjs → chunk-QQBRXMZM.mjs} +11 -11
- package/dist/cli/{chunk-GPAWLXW3.mjs → chunk-QZ74ZC55.mjs} +1 -1
- package/dist/cli/{chunk-YURGAKI3.js → chunk-T3RDWG5J.js} +2 -2
- package/dist/cli/{chunk-XMBVHJPR.mjs → chunk-TKGFHRHE.mjs} +1 -1
- package/dist/cli/{chunk-RXRC2COC.mjs → chunk-U35ZLVBA.mjs} +2 -2
- package/dist/cli/{chunk-YVKLF7RW.js → chunk-U7HJXE6Y.js} +2 -2
- package/dist/cli/{chunk-AEQ5VWZ5.mjs → chunk-UBQQR56I.mjs} +4 -4
- package/dist/cli/{chunk-N63U5CRG.js → chunk-VK2GSTRN.js} +26 -26
- package/dist/cli/{chunk-QLE3QKJ2.mjs → chunk-VSACOMIA.mjs} +5 -5
- package/dist/cli/{chunk-D6OIEH47.js → chunk-WI4MCR7M.js} +5 -5
- package/dist/cli/{chunk-DZC7LMYM.js → chunk-WIHQAZPV.js} +6 -6
- package/dist/cli/{chunk-IGAK22XO.mjs → chunk-WVZF4DU7.mjs} +1 -1
- package/dist/cli/{chunk-VPF54TXQ.mjs → chunk-XKEBQVCP.mjs} +5 -5
- package/dist/cli/{chunk-HARZ4AAX.mjs → chunk-XU3D2KFR.mjs} +1 -1
- package/dist/cli/concurrent-runs-help-A2IQVZRJ.js +21 -0
- package/dist/cli/{concurrent-runs-help-ZNGP563R.mjs → concurrent-runs-help-FDCCZ45D.mjs} +6 -6
- package/dist/cli/{csv-VAHQHYYV.mjs → csv-GJYLQ52D.mjs} +4 -4
- package/dist/cli/{csv-X6D4ZELE.js → csv-OCEQWZO3.js} +13 -13
- package/dist/cli/{db-4G4S2VOV.mjs → db-5MA2UUHQ.mjs} +6 -6
- package/dist/cli/{db-YA5ZGVEX.js → db-G5QGXFAX.js} +27 -27
- package/dist/cli/{describe-EVXEM2S6.mjs → describe-4DOJ4DHA.mjs} +18 -18
- package/dist/cli/describe-SD7DRTBW.js +50 -0
- package/dist/cli/{executions-HR6CTN5M.mjs → executions-C7SMBHHB.mjs} +6 -6
- package/dist/cli/{executions-5YC7ABF6.js → executions-IYEVUPJI.js} +8 -8
- package/dist/cli/{feedback-MJHSYLFF.js → feedback-GYAF46GA.js} +14 -14
- package/dist/cli/{feedback-GEU5SPLR.mjs → feedback-XUU2UKM6.mjs} +6 -6
- package/dist/cli/git-7YYVMY6L.js +25 -0
- package/dist/cli/{git-NPFF6QUS.mjs → git-WVCMK5AH.mjs} +5 -5
- package/dist/cli/index.js +142 -142
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{integrations-Z7EGVBHF.mjs → integrations-FXADGAX2.mjs} +7 -7
- package/dist/cli/{integrations-YPHFI77G.js → integrations-YYBJJFVX.js} +15 -15
- package/dist/cli/{legacy-noops-5IYCFWWX.mjs → legacy-noops-LJY7LDUE.mjs} +6 -6
- package/dist/cli/{legacy-noops-246E3KKG.js → legacy-noops-REZCYES2.js} +9 -9
- package/dist/cli/{mcp-YTYTW67G.js → mcp-L5PURE5S.js} +24 -24
- package/dist/cli/{mcp-WUYGZXPI.mjs → mcp-XSB3ZJFR.mjs} +4 -4
- package/dist/cli/{monitors-SA6ILD6Z.js → monitors-I5EIHSGV.js} +100 -100
- package/dist/cli/{monitors-73DQKCU7.mjs → monitors-UBPF2OLO.mjs} +7 -7
- package/dist/cli/{org-WVQRB2KX.mjs → org-PHHIN2ER.mjs} +6 -6
- package/dist/cli/{org-X7ELDV7B.js → org-SGSTGGUD.js} +88 -88
- package/dist/cli/{play-QI6V2EUQ.mjs → play-LEJNJLWY.mjs} +17 -17
- package/dist/cli/{play-QTYOAJPE.js → play-WQEKMANL.js} +317 -317
- package/dist/cli/{providers-DPVMVDS4.mjs → providers-3W26ZDAV.mjs} +6 -6
- package/dist/cli/{providers-XXFLVREV.js → providers-RSDXBXIS.js} +9 -9
- package/dist/cli/{quickstart-YWGNHULM.mjs → quickstart-LGJD2M36.mjs} +4 -4
- package/dist/cli/{quickstart-33ISXQJU.js → quickstart-U3QX4EMI.js} +6 -6
- package/dist/cli/{run-BWHZXLTD.js → run-F2UPZUJS.js} +43 -43
- package/dist/cli/{run-J6FCAKQC.mjs → run-YWZ3W5HK.mjs} +23 -23
- package/dist/cli/search-K6ANAXLF.js +32 -0
- package/dist/cli/{search-Z3UU3WBB.mjs → search-O2OJH3PY.mjs} +7 -7
- package/dist/cli/{search-output-OJYY4J7E.mjs → search-output-H5BF6SJ3.mjs} +4 -4
- package/dist/cli/{search-output-YIPV74ME.js → search-output-W7OCBYBU.js} +6 -6
- package/dist/cli/{secrets-YZZN2WST.mjs → secrets-65XCAA7U.mjs} +6 -6
- package/dist/cli/{secrets-UXRJCEN4.js → secrets-BN4GYVRI.js} +15 -15
- package/dist/cli/sessions-M52QWLA6.js +22 -0
- package/dist/cli/{sessions-ITCGPD7Z.mjs → sessions-SVEVESCQ.mjs} +6 -6
- package/dist/cli/{settings-LAFYMILP.js → settings-7YMDAFCN.js} +85 -85
- package/dist/cli/{settings-ZP2LSVNM.mjs → settings-HAU2NP2H.mjs} +12 -12
- package/dist/cli/{setup-WEQAQSYC.mjs → setup-5RXHZ6YI.mjs} +9 -9
- package/dist/cli/{setup-4AL3XYM5.js → setup-G37QXQGM.js} +49 -49
- package/dist/cli/{skills-NQH4HFW2.mjs → skills-Q7A3XFAU.mjs} +7 -7
- package/dist/cli/skills-ZK4D5BJW.js +36 -0
- package/dist/cli/tools-DBZTLYFM.js +57 -0
- package/dist/cli/{tools-CXK2GSI4.mjs → tools-ZG4NYRGB.mjs} +17 -17
- package/dist/cli/{update-3ROF3Z75.mjs → update-2CMZTZCL.mjs} +9 -9
- package/dist/cli/update-LC5HGEEH.js +34 -0
- package/dist/cli/{views-AOUHVGV2.mjs → views-A6IIY4OQ.mjs} +6 -6
- package/dist/cli/{views-XJFO5CEH.js → views-XUMDMDIE.js} +21 -21
- package/dist/cli/{workflow-GY3DBHXX.js → workflow-4EEW6MCD.js} +17 -17
- package/dist/cli/{workflow-KBS2QJK6.mjs → workflow-74MYISHU.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +110 -110
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-AC5277PI.js +0 -43
- package/dist/cli/concurrent-runs-help-ZYISYOQA.js +0 -21
- package/dist/cli/describe-GYYSLZLV.js +0 -50
- package/dist/cli/git-FZIQZNI4.js +0 -25
- package/dist/cli/search-JCWJX2XD.js +0 -32
- package/dist/cli/sessions-NA4SJH6Q.js +0 -22
- package/dist/cli/skills-XZ4Y6SZ7.js +0 -36
- package/dist/cli/tools-WJQ6Y7E4.js +0 -57
- package/dist/cli/update-ZLRLTBRD.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 _chunkJQWX377Pjs = require('./chunk-JQWX377P.js');
|
|
5
|
+
require('./chunk-PVE3A2BO.js');
|
|
6
6
|
require('./chunk-4WAM6TLD.js');
|
|
7
7
|
require('./chunk-SL6MYJYM.js');
|
|
8
8
|
require('./chunk-PMH4GLMD.js');
|
|
@@ -18,15 +18,15 @@ require('./chunk-UNEMDKXN.js');
|
|
|
18
18
|
var _chunkU2LVWCTDjs = require('./chunk-U2LVWCTD.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkGUIYFOG2js = require('./chunk-GUIYFOG2.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
28
|
-
require('./chunk-
|
|
29
|
-
require('./chunk-
|
|
27
|
+
var _chunkI2JIWKCQjs = require('./chunk-I2JIWKCQ.js');
|
|
28
|
+
require('./chunk-IIWXBRDK.js');
|
|
29
|
+
require('./chunk-CXZLHBNK.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkEITMD3A5js = require('./chunk-EITMD3A5.js');
|
|
@@ -34,7 +34,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
37
|
-
require('./chunk-
|
|
37
|
+
require('./chunk-2OG2KBYJ.js');
|
|
38
38
|
require('./chunk-OG64RBAC.js');
|
|
39
39
|
require('./chunk-COGTRVWW.js');
|
|
40
40
|
|
|
@@ -112,10 +112,10 @@ function reportMonitorsFailure(error, options) {
|
|
|
112
112
|
const exitCode = monitorsErrorExitCode(error);
|
|
113
113
|
const next = monitorsFailureNextCommand(error, exitCode, options);
|
|
114
114
|
const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
|
|
115
|
-
const wantsJson =
|
|
115
|
+
const wantsJson = _chunkI2JIWKCQjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
116
116
|
if (wantsJson) {
|
|
117
|
-
const payload =
|
|
118
|
-
|
|
117
|
+
const payload = _chunkI2JIWKCQjs.errorToJsonPayload.call(void 0, error);
|
|
118
|
+
_chunkI2JIWKCQjs.printJson.call(void 0, {
|
|
119
119
|
ok: false,
|
|
120
120
|
exitCode,
|
|
121
121
|
...next ? { next } : {},
|
|
@@ -535,14 +535,14 @@ Preview the plan first with:
|
|
|
535
535
|
);
|
|
536
536
|
}
|
|
537
537
|
async function handleMonitorsStatus(options) {
|
|
538
|
-
const payload = await new (0,
|
|
538
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.status();
|
|
539
539
|
const hasAccess = payload.has_access === true;
|
|
540
540
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
541
541
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
542
542
|
${reason}` : ""}
|
|
543
543
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
544
544
|
`;
|
|
545
|
-
|
|
545
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
546
546
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
547
547
|
{ json: options.json, text }
|
|
548
548
|
);
|
|
@@ -608,14 +608,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
611
|
-
const payload = await new (0,
|
|
611
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.available(tool, {
|
|
612
612
|
...options.provider ? { provider: options.provider } : {},
|
|
613
613
|
...options.search ? { search: options.search } : {},
|
|
614
614
|
...options.limit ? { limit: options.limit } : {},
|
|
615
615
|
...options.full ? { full: true } : {},
|
|
616
616
|
...options.compact ? { compact: true } : {}
|
|
617
617
|
});
|
|
618
|
-
|
|
618
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
619
619
|
json: options.json,
|
|
620
620
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
621
621
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -722,14 +722,14 @@ async function handleMonitorsList(options) {
|
|
|
722
722
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
723
723
|
);
|
|
724
724
|
}
|
|
725
|
-
const payload = await new (0,
|
|
725
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.list({
|
|
726
726
|
...state ? { state } : {},
|
|
727
727
|
...options.status ? { status: options.status } : {},
|
|
728
728
|
...options.limit ? { limit: options.limit } : {},
|
|
729
729
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
730
730
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
731
731
|
});
|
|
732
|
-
|
|
732
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
733
733
|
json: options.json,
|
|
734
734
|
text: renderDeployedListText(
|
|
735
735
|
payload,
|
|
@@ -820,7 +820,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
820
820
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
821
821
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
822
822
|
async function handleMonitorsLedger(key, options) {
|
|
823
|
-
const client = new (0,
|
|
823
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
824
824
|
if (options.findings) {
|
|
825
825
|
if (!key) {
|
|
826
826
|
throw new MonitorsUsageError(
|
|
@@ -830,12 +830,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
830
830
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
831
831
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
832
832
|
});
|
|
833
|
-
|
|
833
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
834
834
|
return;
|
|
835
835
|
}
|
|
836
836
|
if (key) {
|
|
837
837
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
838
|
-
|
|
838
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
839
839
|
return;
|
|
840
840
|
}
|
|
841
841
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -859,7 +859,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
859
859
|
...options.limit ? { limit: options.limit } : {},
|
|
860
860
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
861
861
|
});
|
|
862
|
-
|
|
862
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
863
863
|
json: options.json,
|
|
864
864
|
text: renderMonitorLedgerText(payload)
|
|
865
865
|
});
|
|
@@ -871,10 +871,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
871
871
|
argLabel: "<definition>",
|
|
872
872
|
command: "deepline monitors check"
|
|
873
873
|
});
|
|
874
|
-
const payload = await new (0,
|
|
874
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.check(
|
|
875
875
|
body
|
|
876
876
|
);
|
|
877
|
-
|
|
877
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
878
878
|
}
|
|
879
879
|
function previewText(value) {
|
|
880
880
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -932,22 +932,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
932
932
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
933
933
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
934
934
|
}
|
|
935
|
-
const wantsJson =
|
|
935
|
+
const wantsJson = _chunkI2JIWKCQjs.shouldEmitJson.call(void 0, options.json);
|
|
936
936
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
937
937
|
throw new MonitorsUsageError(
|
|
938
938
|
"--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."
|
|
939
939
|
);
|
|
940
940
|
}
|
|
941
941
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
942
|
-
const progress =
|
|
942
|
+
const progress = _chunkGUIYFOG2js.createCliProgress.call(void 0, !wantsJson);
|
|
943
943
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
944
944
|
try {
|
|
945
|
-
const payload = await new (0,
|
|
945
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.preview(
|
|
946
946
|
body,
|
|
947
947
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
948
948
|
);
|
|
949
949
|
progress.complete();
|
|
950
|
-
|
|
950
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
951
951
|
json: options.json,
|
|
952
952
|
text: renderMonitorPreviewText(payload)
|
|
953
953
|
});
|
|
@@ -992,7 +992,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
992
992
|
argLabel: "<definition>",
|
|
993
993
|
command: "deepline monitors deploy"
|
|
994
994
|
});
|
|
995
|
-
const client = new (0,
|
|
995
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
996
996
|
const definitionArg = body;
|
|
997
997
|
if (options.dryRun) {
|
|
998
998
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -1000,7 +1000,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
const valid = payload2.valid !== false;
|
|
1002
1002
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
1003
|
-
|
|
1003
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1004
1004
|
{ dry_run: true, ...payload2 },
|
|
1005
1005
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
1006
1006
|
);
|
|
@@ -1010,7 +1010,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
1012
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1013
|
-
|
|
1013
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
1014
1014
|
json: options.json,
|
|
1015
1015
|
text: renderMonitorDeployCompletion(payload)
|
|
1016
1016
|
});
|
|
@@ -1022,29 +1022,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1022
1022
|
argLabel: "<definition>",
|
|
1023
1023
|
command: "deepline monitors sync"
|
|
1024
1024
|
});
|
|
1025
|
-
const payload = await new (0,
|
|
1025
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.sync(body, {
|
|
1026
1026
|
...options.dryRun ? { dryRun: true } : {},
|
|
1027
1027
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1028
1028
|
});
|
|
1029
1029
|
if (options.dryRun) {
|
|
1030
1030
|
const plan = payload;
|
|
1031
|
-
|
|
1031
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1032
1032
|
{ dry_run: true, ...plan },
|
|
1033
1033
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1034
1034
|
);
|
|
1035
1035
|
return;
|
|
1036
1036
|
}
|
|
1037
|
-
|
|
1037
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
1038
1038
|
json: options.json,
|
|
1039
1039
|
text: renderMonitorJob(payload)
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
1042
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1043
|
-
const payload = await new (0,
|
|
1043
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors[action](key, {
|
|
1044
1044
|
...options.dryRun ? { dryRun: true } : {},
|
|
1045
1045
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1046
1046
|
});
|
|
1047
|
-
|
|
1047
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
1048
1048
|
json: options.json,
|
|
1049
1049
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1050
1050
|
});
|
|
@@ -1133,11 +1133,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1133
1133
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1134
1134
|
);
|
|
1135
1135
|
}
|
|
1136
|
-
const payload = await new (0,
|
|
1136
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.batch.deploy(
|
|
1137
1137
|
lint.normalized.monitors,
|
|
1138
1138
|
{ idempotencyKey }
|
|
1139
1139
|
);
|
|
1140
|
-
|
|
1140
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1141
1141
|
{
|
|
1142
1142
|
...payload,
|
|
1143
1143
|
idempotency_key: idempotencyKey,
|
|
@@ -1170,7 +1170,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
1172
|
if (options.dryRun) {
|
|
1173
|
-
|
|
1173
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1174
1174
|
{
|
|
1175
1175
|
ok: true,
|
|
1176
1176
|
dry_run: true,
|
|
@@ -1187,7 +1187,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1187
1187
|
"sync",
|
|
1188
1188
|
options.idempotencyKey
|
|
1189
1189
|
);
|
|
1190
|
-
const payload = await new (0,
|
|
1190
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.batches.sync(
|
|
1191
1191
|
batchId,
|
|
1192
1192
|
lint.normalized.monitors,
|
|
1193
1193
|
{
|
|
@@ -1195,14 +1195,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1195
1195
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1196
1196
|
}
|
|
1197
1197
|
);
|
|
1198
|
-
|
|
1198
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1199
1199
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1200
1200
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1201
1201
|
);
|
|
1202
1202
|
}
|
|
1203
1203
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1204
1204
|
if (options.dryRun) {
|
|
1205
|
-
|
|
1205
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1206
1206
|
{
|
|
1207
1207
|
ok: true,
|
|
1208
1208
|
dry_run: true,
|
|
@@ -1218,17 +1218,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1218
1218
|
intent,
|
|
1219
1219
|
options.idempotencyKey
|
|
1220
1220
|
);
|
|
1221
|
-
const payload = await new (0,
|
|
1221
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1222
1222
|
idempotencyKey
|
|
1223
1223
|
});
|
|
1224
|
-
|
|
1224
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1225
1225
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1226
1226
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1227
1227
|
);
|
|
1228
1228
|
}
|
|
1229
1229
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1230
|
-
const payload = await new (0,
|
|
1231
|
-
|
|
1230
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1231
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
1232
1232
|
json: options.json,
|
|
1233
1233
|
text: renderMonitorJob(payload)
|
|
1234
1234
|
});
|
|
@@ -1242,7 +1242,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1242
1242
|
const result = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1243
1243
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1244
1244
|
);
|
|
1245
|
-
|
|
1245
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1246
1246
|
{
|
|
1247
1247
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1248
1248
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1262,7 +1262,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1262
1262
|
const result = _chunkWOQO3GV4js.lintMonitorFleetInput.call(void 0,
|
|
1263
1263
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1264
1264
|
);
|
|
1265
|
-
|
|
1265
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1266
1266
|
{
|
|
1267
1267
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1268
1268
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1274,32 +1274,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1274
1274
|
process.exitCode = 2;
|
|
1275
1275
|
}
|
|
1276
1276
|
async function handleMonitorJobGet(jobId, options) {
|
|
1277
|
-
const payload = await new (0,
|
|
1278
|
-
|
|
1277
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1278
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
1279
1279
|
json: options.json,
|
|
1280
1280
|
text: renderMonitorJob(payload)
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
1283
|
async function handleMonitorJobWait(jobId, options) {
|
|
1284
|
-
const payload = await new (0,
|
|
1284
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1285
1285
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1286
1286
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1287
1287
|
});
|
|
1288
|
-
|
|
1288
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
1289
1289
|
json: options.json,
|
|
1290
1290
|
text: renderMonitorJob(payload)
|
|
1291
1291
|
});
|
|
1292
1292
|
}
|
|
1293
1293
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1294
1294
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1295
|
-
const payload = await new (0,
|
|
1295
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1296
1296
|
...limit === void 0 ? {} : { limit }
|
|
1297
1297
|
});
|
|
1298
|
-
|
|
1298
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1299
1299
|
}
|
|
1300
1300
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1301
|
-
const payload = await new (0,
|
|
1302
|
-
|
|
1301
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1302
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
1303
1303
|
json: options.json,
|
|
1304
1304
|
text: renderMonitorJob(payload)
|
|
1305
1305
|
});
|
|
@@ -1641,7 +1641,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1641
1641
|
`;
|
|
1642
1642
|
}
|
|
1643
1643
|
function reportFleetState(payload, error, options) {
|
|
1644
|
-
|
|
1644
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1645
1645
|
{
|
|
1646
1646
|
...payload,
|
|
1647
1647
|
code: error.code,
|
|
@@ -1775,7 +1775,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1775
1775
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1776
1776
|
`, "utf8");
|
|
1777
1777
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1778
|
-
|
|
1778
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
1779
1779
|
{ schemaVersion: 2, file, definition, next },
|
|
1780
1780
|
{
|
|
1781
1781
|
json: options.json,
|
|
@@ -1838,7 +1838,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1838
1838
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1839
1839
|
);
|
|
1840
1840
|
}
|
|
1841
|
-
const client = new (0,
|
|
1841
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
1842
1842
|
const payload = await client.monitors.fleets.sync(
|
|
1843
1843
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1844
1844
|
{
|
|
@@ -1861,7 +1861,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1863
1863
|
if (!options.wait || options.dryRun) {
|
|
1864
|
-
|
|
1864
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1865
1865
|
json: options.json,
|
|
1866
1866
|
text: renderFleetSync(payload, {
|
|
1867
1867
|
fleetId,
|
|
@@ -1887,7 +1887,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1887
1887
|
const status = fleetStatus(final);
|
|
1888
1888
|
const summary = renderFleetGet(final);
|
|
1889
1889
|
if (status === "converged") {
|
|
1890
|
-
|
|
1890
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1891
1891
|
return;
|
|
1892
1892
|
}
|
|
1893
1893
|
if (status === "billing_suspended") {
|
|
@@ -1949,14 +1949,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1949
1949
|
`
|
|
1950
1950
|
);
|
|
1951
1951
|
}
|
|
1952
|
-
const client = new (0,
|
|
1952
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
1953
1953
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1954
1954
|
...options.drift ? { drift: true } : {},
|
|
1955
1955
|
...limit !== void 0 ? { limit } : {}
|
|
1956
1956
|
});
|
|
1957
1957
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1958
1958
|
if (!options.check) {
|
|
1959
|
-
|
|
1959
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1960
1960
|
return;
|
|
1961
1961
|
}
|
|
1962
1962
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1964,7 +1964,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1964
1964
|
);
|
|
1965
1965
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1966
1966
|
if (unconverged.length === 0) {
|
|
1967
|
-
|
|
1967
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1968
1968
|
return;
|
|
1969
1969
|
}
|
|
1970
1970
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2129,7 +2129,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2131
2131
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2132
|
-
const client = new (0,
|
|
2132
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
2133
2133
|
if (fleetId) {
|
|
2134
2134
|
const listOnly = [
|
|
2135
2135
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2144,7 +2144,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2144
2144
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2145
2145
|
...window ? { window } : {}
|
|
2146
2146
|
});
|
|
2147
|
-
|
|
2147
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2148
2148
|
json: options.json,
|
|
2149
2149
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2150
2150
|
});
|
|
@@ -2160,7 +2160,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2160
2160
|
...sort ? { sort } : {},
|
|
2161
2161
|
...window ? { window } : {}
|
|
2162
2162
|
});
|
|
2163
|
-
|
|
2163
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
2164
2164
|
json: options.json,
|
|
2165
2165
|
text: renderFleetOverviewList(payload)
|
|
2166
2166
|
});
|
|
@@ -2171,13 +2171,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2171
2171
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2172
2172
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2173
2173
|
}
|
|
2174
|
-
const payload = await new (0,
|
|
2174
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2175
2175
|
...group ? { group } : {},
|
|
2176
2176
|
...options.cause ? { cause: options.cause } : {},
|
|
2177
2177
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2178
2178
|
...limit !== void 0 ? { limit } : {}
|
|
2179
2179
|
});
|
|
2180
|
-
|
|
2180
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, {
|
|
2181
2181
|
json: options.json,
|
|
2182
2182
|
text: renderFleetIssuePage(payload)
|
|
2183
2183
|
});
|
|
@@ -2206,13 +2206,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2206
2206
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2207
2207
|
);
|
|
2208
2208
|
}
|
|
2209
|
-
const client = new (0,
|
|
2209
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
2210
2210
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2211
2211
|
idempotencyKey
|
|
2212
2212
|
});
|
|
2213
2213
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2214
2214
|
if (!options.wait) {
|
|
2215
|
-
|
|
2215
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2216
2216
|
json: options.json,
|
|
2217
2217
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2218
2218
|
idempotency key ${idempotencyKey}
|
|
@@ -2235,7 +2235,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2235
2235
|
const envelope = { ...accepted, ...final };
|
|
2236
2236
|
const text = renderFleetGet(final);
|
|
2237
2237
|
if (fleetStatus(final) === "converged") {
|
|
2238
|
-
|
|
2238
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2239
2239
|
return;
|
|
2240
2240
|
}
|
|
2241
2241
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2284,7 +2284,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2284
2284
|
}
|
|
2285
2285
|
}
|
|
2286
2286
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2287
|
-
const client = new (0,
|
|
2287
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
2288
2288
|
if (options.dryRun) {
|
|
2289
2289
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2290
2290
|
dryRun: true,
|
|
@@ -2294,7 +2294,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2294
2294
|
command: "deepline monitors fleets deactivate",
|
|
2295
2295
|
mutation: "fleet deactivate"
|
|
2296
2296
|
});
|
|
2297
|
-
|
|
2297
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, plan, {
|
|
2298
2298
|
json: options.json,
|
|
2299
2299
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2300
2300
|
});
|
|
@@ -2332,7 +2332,7 @@ Preview the blast radius first:
|
|
|
2332
2332
|
});
|
|
2333
2333
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2334
2334
|
if (payload.already === true) {
|
|
2335
|
-
|
|
2335
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2336
2336
|
json: options.json,
|
|
2337
2337
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2338
2338
|
`
|
|
@@ -2344,7 +2344,7 @@ Preview the blast radius first:
|
|
|
2344
2344
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2345
2345
|
` : "");
|
|
2346
2346
|
if (!options.wait) {
|
|
2347
|
-
|
|
2347
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2348
2348
|
json: options.json,
|
|
2349
2349
|
text: acceptedText
|
|
2350
2350
|
});
|
|
@@ -2366,7 +2366,7 @@ Preview the blast radius first:
|
|
|
2366
2366
|
const envelope = { ...accepted, ...final };
|
|
2367
2367
|
const summary = renderFleetGet(final);
|
|
2368
2368
|
if (fleetStatus(final) === "deactivated") {
|
|
2369
|
-
|
|
2369
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2370
2370
|
return;
|
|
2371
2371
|
}
|
|
2372
2372
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2405,7 +2405,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2405
2405
|
"Agent notes:",
|
|
2406
2406
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2407
2407
|
];
|
|
2408
|
-
|
|
2408
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
2409
2409
|
{
|
|
2410
2410
|
schemaVersion: 1,
|
|
2411
2411
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2567,7 +2567,7 @@ function renderMonitorGet(payload) {
|
|
|
2567
2567
|
`;
|
|
2568
2568
|
}
|
|
2569
2569
|
async function handleMonitorsGet(key, options) {
|
|
2570
|
-
const client = new (0,
|
|
2570
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
2571
2571
|
const payload = await client.monitors.get(key);
|
|
2572
2572
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2573
2573
|
const dependents = boundPlays ? {
|
|
@@ -2575,24 +2575,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2575
2575
|
truncated: payload.consumer_health_truncated === true
|
|
2576
2576
|
} : await client.monitors.dependents(key);
|
|
2577
2577
|
const detail = { ...payload, dependents };
|
|
2578
|
-
|
|
2578
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, detail, {
|
|
2579
2579
|
json: options.json,
|
|
2580
2580
|
text: renderMonitorGet(detail)
|
|
2581
2581
|
});
|
|
2582
2582
|
}
|
|
2583
2583
|
async function handleMonitorsTest(key, payload, options) {
|
|
2584
2584
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2585
|
-
const result = await new (0,
|
|
2585
|
+
const result = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2586
2586
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2587
2587
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2588
2588
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2589
2589
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2590
2590
|
`;
|
|
2591
|
-
|
|
2591
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2592
2592
|
}
|
|
2593
2593
|
async function handleMonitorsValidate(key, options) {
|
|
2594
|
-
const result = await new (0,
|
|
2595
|
-
|
|
2594
|
+
const result = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.validate(key);
|
|
2595
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2596
2596
|
if (result.valid === false) process.exitCode = 7;
|
|
2597
2597
|
}
|
|
2598
2598
|
async function confirmMonitorDelete(key) {
|
|
@@ -2610,14 +2610,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
}
|
|
2612
2612
|
async function handleMonitorsDelete(key, options) {
|
|
2613
|
-
const client = new (0,
|
|
2613
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
2614
2614
|
if (options.dryRun) {
|
|
2615
2615
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2616
2616
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2617
2617
|
command: "deepline monitors delete",
|
|
2618
2618
|
mutation: "delete"
|
|
2619
2619
|
});
|
|
2620
|
-
|
|
2620
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2621
2621
|
json: options.json,
|
|
2622
2622
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2623
2623
|
});
|
|
@@ -2637,7 +2637,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
2639
|
const payload = await client.monitors.delete(key);
|
|
2640
|
-
|
|
2640
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2641
2641
|
}
|
|
2642
2642
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2643
2643
|
const body = resolveMonitorJsonBody({
|
|
@@ -2646,25 +2646,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2646
2646
|
argLabel: "<patch>",
|
|
2647
2647
|
command: `deepline monitors update ${key}`
|
|
2648
2648
|
});
|
|
2649
|
-
const payload = await new (0,
|
|
2650
|
-
|
|
2649
|
+
const payload = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.update(key, body);
|
|
2650
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2651
2651
|
}
|
|
2652
2652
|
async function handleMonitorsReactivate(key, options) {
|
|
2653
|
-
const client = new (0,
|
|
2653
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
2654
2654
|
if (options.dryRun) {
|
|
2655
2655
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2656
2656
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2657
2657
|
command: "deepline monitors reactivate",
|
|
2658
2658
|
mutation: "reactivate"
|
|
2659
2659
|
});
|
|
2660
|
-
|
|
2660
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2661
2661
|
json: options.json,
|
|
2662
2662
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2663
2663
|
});
|
|
2664
2664
|
return;
|
|
2665
2665
|
}
|
|
2666
2666
|
const payload = await client.monitors.reactivate(key);
|
|
2667
|
-
|
|
2667
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2668
2668
|
}
|
|
2669
2669
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2670
2670
|
function monitorHealthLine(health) {
|
|
@@ -2797,7 +2797,7 @@ function monitorHealthText(health) {
|
|
|
2797
2797
|
`;
|
|
2798
2798
|
}
|
|
2799
2799
|
async function handleMonitorsAudit(options) {
|
|
2800
|
-
const client = new (0,
|
|
2800
|
+
const client = new (0, _chunkJQWX377Pjs.DeeplineClient)();
|
|
2801
2801
|
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2802
2802
|
const scope = fleetId ? { fleetId } : {};
|
|
2803
2803
|
let result = await client.monitors.audit(scope);
|
|
@@ -2841,7 +2841,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2841
2841
|
"",
|
|
2842
2842
|
monitorHealthText(health)
|
|
2843
2843
|
].join("\n");
|
|
2844
|
-
|
|
2844
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
2845
2845
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2846
2846
|
{ json: options.json, text }
|
|
2847
2847
|
);
|
|
@@ -2854,10 +2854,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
async function handleMonitorsHealth(options) {
|
|
2856
2856
|
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2857
|
-
const health = await new (0,
|
|
2857
|
+
const health = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.health(
|
|
2858
2858
|
fleetId ? { fleetId } : {}
|
|
2859
2859
|
);
|
|
2860
|
-
|
|
2860
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, health, {
|
|
2861
2861
|
json: options.json,
|
|
2862
2862
|
text: monitorHealthText(health)
|
|
2863
2863
|
});
|
|
@@ -2931,14 +2931,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2931
2931
|
"deploy",
|
|
2932
2932
|
options.idempotencyKey
|
|
2933
2933
|
);
|
|
2934
|
-
const result = await new (0,
|
|
2934
|
+
const result = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.batch.submit({
|
|
2935
2935
|
kind: "deploy",
|
|
2936
2936
|
manifestNdjson,
|
|
2937
2937
|
dryRun: options.dryRun === true,
|
|
2938
2938
|
idempotencyKey
|
|
2939
2939
|
});
|
|
2940
2940
|
const operation = result.operation;
|
|
2941
|
-
|
|
2941
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
2942
2942
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2943
2943
|
{
|
|
2944
2944
|
json: options.json,
|
|
@@ -2966,7 +2966,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2966
2966
|
kind,
|
|
2967
2967
|
options.idempotencyKey
|
|
2968
2968
|
);
|
|
2969
|
-
const result = await new (0,
|
|
2969
|
+
const result = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.batch.submit({
|
|
2970
2970
|
kind,
|
|
2971
2971
|
scope,
|
|
2972
2972
|
dryRun: options.dryRun === true,
|
|
@@ -2979,14 +2979,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2979
2979
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2980
2980
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2981
2981
|
].join("\n");
|
|
2982
|
-
|
|
2982
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0,
|
|
2983
2983
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2984
2984
|
{ json: options.json, text: `${text}
|
|
2985
2985
|
` }
|
|
2986
2986
|
);
|
|
2987
2987
|
}
|
|
2988
2988
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2989
|
-
const result = await new (0,
|
|
2989
|
+
const result = await new (0, _chunkJQWX377Pjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2990
2990
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2991
2991
|
});
|
|
2992
2992
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2998,7 +2998,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2998
2998
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2999
2999
|
] : []
|
|
3000
3000
|
].join("\n");
|
|
3001
|
-
|
|
3001
|
+
_chunkI2JIWKCQjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
3002
3002
|
` });
|
|
3003
3003
|
}
|
|
3004
3004
|
function registerMonitorsCommands(program) {
|