deepline 0.3.310 → 0.3.311
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/ledger-safe-payload.ts +7 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +53 -7
- package/dist/cli/{auth-CS6NQ737.mjs → auth-2A7OYHFJ.mjs} +4 -4
- package/dist/cli/auth-66JFXP6C.js +31 -0
- package/dist/cli/{billing-7SIQJUEI.js → billing-2PQ4VDRR.js} +70 -70
- package/dist/cli/{billing-SDRP5BYV.mjs → billing-P7GIAP3U.mjs} +4 -4
- package/dist/cli/{chunk-7L27LIZO.mjs → chunk-4WFNAWVO.mjs} +2 -2
- package/dist/cli/{chunk-D3HSRXCJ.js → chunk-5IBHISKA.js} +6 -6
- package/dist/cli/{chunk-NKRSVEP4.mjs → chunk-5OVNL6LS.mjs} +1 -1
- package/dist/cli/{chunk-MWY35HT3.js → chunk-7TT4LZIR.js} +60 -60
- package/dist/cli/{chunk-HYACJPRJ.mjs → chunk-DUEHAEPM.mjs} +1 -1
- package/dist/cli/{chunk-KKAAKV77.js → chunk-FYPZ43Y4.js} +1 -1
- package/dist/cli/{chunk-T25I3M2J.mjs → chunk-G3QP2WYR.mjs} +4 -4
- package/dist/cli/{chunk-DCUYMHHV.js → chunk-GCX3343L.js} +48 -48
- package/dist/cli/{chunk-LUJGLZCJ.mjs → chunk-HOCPOTDX.mjs} +2 -2
- package/dist/cli/{chunk-5VVRQY4Y.js → chunk-IB7OGQGH.js} +6 -6
- package/dist/cli/{chunk-NXFFT73P.mjs → chunk-ICZB4GTY.mjs} +3 -3
- package/dist/cli/{chunk-JVCD2CWD.js → chunk-LRI2FQF2.js} +26 -26
- package/dist/cli/{chunk-M4KGWEN2.mjs → chunk-Q3LYQTSO.mjs} +1 -1
- package/dist/cli/{chunk-XOIOZ5JA.mjs → chunk-QJA6SJHA.mjs} +1 -1
- package/dist/cli/{chunk-4YCPND5A.js → chunk-QO3GH6UP.js} +2 -2
- package/dist/cli/{chunk-PNNFR4L5.js → chunk-QYL5ZV4U.js} +6 -6
- package/dist/cli/{chunk-QARMMLYE.js → chunk-RNJ74JDH.js} +4 -4
- package/dist/cli/{chunk-VN7Y4LVH.mjs → chunk-SGTSJCOA.mjs} +1 -1
- package/dist/cli/{chunk-OJWZADOG.mjs → chunk-SPUTBCUR.mjs} +1 -1
- package/dist/cli/{chunk-AV4CJWNP.mjs → chunk-TBX7AA7Y.mjs} +2 -2
- package/dist/cli/{chunk-N2VXH4GK.js → chunk-VODJJUKE.js} +15 -15
- package/dist/cli/{chunk-RYO6353O.js → chunk-XDUQQTIS.js} +6 -6
- package/dist/cli/client-ADWRS22F.js +20 -0
- package/dist/cli/{client-G7HWPY6S.mjs → client-PNLDT2M3.mjs} +3 -3
- package/dist/cli/{csv-4JIXNZ6J.mjs → csv-KUAATBZQ.mjs} +3 -3
- package/dist/cli/{csv-6GDEDRY6.js → csv-L5DN7F45.js} +12 -12
- package/dist/cli/{db-MXNCRZNY.js → db-6NIH4KTZ.js} +20 -20
- package/dist/cli/{db-TGAQ7XWX.mjs → db-WZOD6NP5.mjs} +4 -4
- package/dist/cli/{executions-XSGG4VCW.mjs → executions-RDDXGT2Y.mjs} +4 -4
- package/dist/cli/{executions-VEBKTUFZ.js → executions-TQ5WRHDS.js} +6 -6
- package/dist/cli/{feedback-GI3Q4RGW.js → feedback-NYKLEQB6.js} +6 -6
- package/dist/cli/{feedback-PY4ZCKEV.mjs → feedback-ZB4WKBSS.mjs} +3 -3
- package/dist/cli/git-E56KOYJR.js +23 -0
- package/dist/cli/{git-7QAK7CKT.mjs → git-E6DKAX3X.mjs} +4 -4
- package/dist/cli/index.js +73 -73
- package/dist/cli/index.mjs +30 -30
- package/dist/cli/{legacy-noops-KCG3YZCN.mjs → legacy-noops-25B7JCOZ.mjs} +4 -4
- package/dist/cli/{legacy-noops-2VT7K2VQ.js → legacy-noops-26Y5NSU6.js} +7 -7
- package/dist/cli/{monitors-7CLNZE7C.js → monitors-L3GFT4MG.js} +85 -85
- package/dist/cli/{monitors-GTIHVO56.mjs → monitors-WRTHO7DT.mjs} +4 -4
- package/dist/cli/{org-HTA6MXVO.js → org-BNCTGPWF.js} +60 -60
- package/dist/cli/{org-FCPAM7NW.mjs → org-ZTHOFVEO.mjs} +4 -4
- package/dist/cli/{play-Q5SVL5MG.js → play-BCMGFYTF.js} +220 -220
- package/dist/cli/{play-YO22ZNSN.mjs → play-SOG5Q2GE.mjs} +6 -6
- package/dist/cli/{providers-YHWPMW4J.js → providers-MLOKTD6O.js} +7 -7
- package/dist/cli/{providers-25X5A5JC.mjs → providers-SLAPPVMU.mjs} +4 -4
- package/dist/cli/{quickstart-SLE7UMAK.js → quickstart-IWJLGET3.js} +5 -5
- package/dist/cli/{quickstart-Z4CXNAQ3.mjs → quickstart-LZRKZLNQ.mjs} +3 -3
- package/dist/cli/{search-UBWCREKT.js → search-6FBDSA3K.js} +6 -6
- package/dist/cli/{search-RQO3ZVKK.mjs → search-RCDGSNWW.mjs} +5 -5
- package/dist/cli/{secrets-N37STTK4.js → secrets-24KEMSCU.js} +13 -13
- package/dist/cli/{secrets-MV6MRXW5.mjs → secrets-GDPYV6OC.mjs} +4 -4
- package/dist/cli/{sessions-KBWZYHNE.js → sessions-QOUUGVP3.js} +5 -5
- package/dist/cli/{sessions-4M2BUN2J.mjs → sessions-ST5XQQZN.mjs} +4 -4
- package/dist/cli/{settings-OCRYSYWC.js → settings-4XWDMAA2.js} +74 -74
- package/dist/cli/{settings-EYMOSUED.mjs → settings-V6Z775TO.mjs} +7 -7
- package/dist/cli/{setup-TUVPIGJV.mjs → setup-QPZLP25U.mjs} +6 -6
- package/dist/cli/{setup-3UKEGBFB.js → setup-W7SPZTUL.js} +41 -41
- package/dist/cli/{skills-56ADS5BA.mjs → skills-QG22R2EI.mjs} +4 -4
- package/dist/cli/skills-WKOQBJY7.js +28 -0
- package/dist/cli/{tools-M73P2E7K.mjs → tools-G4HGCHNQ.mjs} +5 -5
- package/dist/cli/{tools-XSF6FCIM.js → tools-WN7T25LW.js} +50 -50
- package/dist/cli/{update-Y6KMCBWD.mjs → update-5PSYBGVU.mjs} +6 -6
- package/dist/cli/update-WKVCWGYY.js +28 -0
- package/dist/cli/{workflow-DWKZA4FR.mjs → workflow-EK7DV4AQ.mjs} +5 -5
- package/dist/cli/{workflow-DHQ3NCVT.js → workflow-ZEQ46MGG.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +68 -68
- 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-CP4YBO33.js +0 -31
- package/dist/cli/client-MIVDO6SP.js +0 -20
- package/dist/cli/git-5KB2XFJ6.js +0 -23
- package/dist/cli/skills-CUWFLZG4.js +0 -28
- package/dist/cli/update-QOQRJM2S.js +0 -28
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await 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; } async function _asyncOptionalChain(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 = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkLRI2FQF2js = require('./chunk-LRI2FQF2.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkIB7OGQGHjs = require('./chunk-IB7OGQGH.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -30,7 +30,7 @@ var _chunkSDK3ZA2Cjs = require('./chunk-SDK3ZA2C.js');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkQYL5ZV4Ujs = require('./chunk-QYL5ZV4U.js');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -62,12 +62,12 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunkXDUQQTISjs = require('./chunk-XDUQQTIS.js');
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
var
|
|
68
|
+
var _chunkRNJ74JDHjs = require('./chunk-RNJ74JDH.js');
|
|
69
69
|
require('./chunk-XNYIZMNQ.js');
|
|
70
|
-
require('./chunk-
|
|
70
|
+
require('./chunk-FYPZ43Y4.js');
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
@@ -2044,7 +2044,7 @@ function resolveField(key, command) {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
function printSettings(result, json, name) {
|
|
2046
2046
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2047
|
-
|
|
2047
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2048
2048
|
{
|
|
2049
2049
|
...result,
|
|
2050
2050
|
settings: Object.fromEntries(
|
|
@@ -2088,7 +2088,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2088
2088
|
valueSyntax: field.cli.valueSyntax,
|
|
2089
2089
|
examples: field.cli.examples
|
|
2090
2090
|
}));
|
|
2091
|
-
|
|
2091
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2092
2092
|
{
|
|
2093
2093
|
fields: descriptions,
|
|
2094
2094
|
render: {
|
|
@@ -2113,7 +2113,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2113
2113
|
async (options, command) => {
|
|
2114
2114
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2115
2115
|
printSettings(
|
|
2116
|
-
await new (0,
|
|
2116
|
+
await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().getPlaySettings(options.play),
|
|
2117
2117
|
options.json,
|
|
2118
2118
|
options.name
|
|
2119
2119
|
);
|
|
@@ -2144,7 +2144,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2144
2144
|
);
|
|
2145
2145
|
}
|
|
2146
2146
|
if (options.dryRun) {
|
|
2147
|
-
|
|
2147
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2148
2148
|
{
|
|
2149
2149
|
dryRun: true,
|
|
2150
2150
|
play,
|
|
@@ -2165,7 +2165,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2165
2165
|
return;
|
|
2166
2166
|
}
|
|
2167
2167
|
printSettings(
|
|
2168
|
-
await new (0,
|
|
2168
|
+
await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2169
2169
|
options.json
|
|
2170
2170
|
);
|
|
2171
2171
|
};
|
|
@@ -2191,13 +2191,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2191
2191
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2192
2192
|
{ exitCode: 2 }
|
|
2193
2193
|
);
|
|
2194
|
-
const page = await new (0,
|
|
2194
|
+
const page = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().listPlaySettingsPaths({
|
|
2195
2195
|
root: options.root,
|
|
2196
2196
|
limit,
|
|
2197
2197
|
cursor: options.cursor
|
|
2198
2198
|
});
|
|
2199
2199
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""} --json` : null;
|
|
2200
|
-
|
|
2200
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2201
2201
|
{
|
|
2202
2202
|
...page,
|
|
2203
2203
|
nextCommand,
|
|
@@ -2248,7 +2248,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2248
2248
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
|
|
2249
2249
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
|
|
2250
2250
|
};
|
|
2251
|
-
const client = new (0,
|
|
2251
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
2252
2252
|
const paths = [];
|
|
2253
2253
|
let cursor;
|
|
2254
2254
|
do {
|
|
@@ -2310,7 +2310,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2310
2310
|
moved.push(move.playName);
|
|
2311
2311
|
}
|
|
2312
2312
|
}
|
|
2313
|
-
|
|
2313
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2314
2314
|
{
|
|
2315
2315
|
dryRun: Boolean(options.dryRun),
|
|
2316
2316
|
from: options.from,
|
|
@@ -2438,7 +2438,7 @@ function triggerLines(view) {
|
|
|
2438
2438
|
return lines;
|
|
2439
2439
|
}
|
|
2440
2440
|
function printView(view, json) {
|
|
2441
|
-
|
|
2441
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2442
2442
|
{
|
|
2443
2443
|
...view,
|
|
2444
2444
|
render: {
|
|
@@ -2451,7 +2451,7 @@ function printView(view, json) {
|
|
|
2451
2451
|
);
|
|
2452
2452
|
}
|
|
2453
2453
|
function printResult(result, json) {
|
|
2454
|
-
|
|
2454
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2455
2455
|
{
|
|
2456
2456
|
...result,
|
|
2457
2457
|
render: {
|
|
@@ -2481,7 +2481,7 @@ async function mutate(command, options, build) {
|
|
|
2481
2481
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2482
2482
|
}
|
|
2483
2483
|
if (options.dryRun) {
|
|
2484
|
-
|
|
2484
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
2485
2485
|
{
|
|
2486
2486
|
dryRun: true,
|
|
2487
2487
|
play: options.play,
|
|
@@ -2500,7 +2500,7 @@ async function mutate(command, options, build) {
|
|
|
2500
2500
|
return;
|
|
2501
2501
|
}
|
|
2502
2502
|
printResult(
|
|
2503
|
-
await new (0,
|
|
2503
|
+
await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2504
2504
|
options.json
|
|
2505
2505
|
);
|
|
2506
2506
|
}
|
|
@@ -2533,7 +2533,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2533
2533
|
}).addHelpText("after", help2);
|
|
2534
2534
|
trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON; automatic when piped").addHelpText("after", help2).action(async (options) => {
|
|
2535
2535
|
printView(
|
|
2536
|
-
await new (0,
|
|
2536
|
+
await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2537
2537
|
options.json
|
|
2538
2538
|
);
|
|
2539
2539
|
});
|
|
@@ -2577,7 +2577,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2577
2577
|
if (options.auth === void 0) {
|
|
2578
2578
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2579
2579
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2580
|
-
const current = await new (0,
|
|
2580
|
+
const current = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().getPlayTriggerConfig(
|
|
2581
2581
|
options.play
|
|
2582
2582
|
);
|
|
2583
2583
|
return {
|
|
@@ -2654,7 +2654,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2654
2654
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2655
2655
|
"runtime.event": "Other event."
|
|
2656
2656
|
};
|
|
2657
|
-
var RUN_LOGS_KIND_HELP =
|
|
2657
|
+
var RUN_LOGS_KIND_HELP = _chunkQYL5ZV4Ujs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2658
2658
|
kind,
|
|
2659
2659
|
description: KIND_DESCRIPTIONS[kind]
|
|
2660
2660
|
}));
|
|
@@ -2791,9 +2791,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2791
2791
|
const args = program.args;
|
|
2792
2792
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2793
2793
|
error.exitCode = 2;
|
|
2794
|
-
if (
|
|
2795
|
-
|
|
2796
|
-
Object.assign(new (0,
|
|
2794
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2795
|
+
_chunkXDUQQTISjs.printJsonError.call(void 0,
|
|
2796
|
+
Object.assign(new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(error.message), {
|
|
2797
2797
|
exitCode: 2,
|
|
2798
2798
|
retryable: false
|
|
2799
2799
|
})
|
|
@@ -2837,14 +2837,14 @@ function parseQuery(args, resource) {
|
|
|
2837
2837
|
if (VALUE_FLAGS.has(flag)) {
|
|
2838
2838
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2839
2839
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2840
|
-
throw new (0,
|
|
2840
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2841
2841
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2842
2842
|
);
|
|
2843
2843
|
}
|
|
2844
2844
|
if (flag === "--sum") sums.push(value);
|
|
2845
2845
|
else {
|
|
2846
2846
|
if (values[flag] !== void 0) {
|
|
2847
|
-
throw new (0,
|
|
2847
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2848
2848
|
`${flag} may only be supplied once.`
|
|
2849
2849
|
);
|
|
2850
2850
|
}
|
|
@@ -2858,12 +2858,12 @@ function parseQuery(args, resource) {
|
|
|
2858
2858
|
}
|
|
2859
2859
|
if (arg.startsWith("-")) {
|
|
2860
2860
|
const correction = flag === "--log-level" ? "Use --level for structured severity filtering." : flag === "--out" || flag === "--failed" || flag === "--all" ? "Use this flag with a plain runs logs <run-id> text read." : "Use --step, --level, --query, --where, --count, --group-by or --fields; see runs logs --help.";
|
|
2861
|
-
throw new (0,
|
|
2861
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2862
2862
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2863
2863
|
);
|
|
2864
2864
|
}
|
|
2865
2865
|
if (runId !== void 0) {
|
|
2866
|
-
throw new (0,
|
|
2866
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2867
2867
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2868
2868
|
);
|
|
2869
2869
|
}
|
|
@@ -2871,7 +2871,7 @@ function parseQuery(args, resource) {
|
|
|
2871
2871
|
}
|
|
2872
2872
|
if (switches.has("--fields")) {
|
|
2873
2873
|
if (runId !== void 0) {
|
|
2874
|
-
throw new (0,
|
|
2874
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2875
2875
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2876
2876
|
);
|
|
2877
2877
|
}
|
|
@@ -2884,18 +2884,18 @@ function parseQuery(args, resource) {
|
|
|
2884
2884
|
)
|
|
2885
2885
|
];
|
|
2886
2886
|
if (incompatible.length) {
|
|
2887
|
-
throw new (0,
|
|
2887
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2888
2888
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2889
2889
|
);
|
|
2890
2890
|
}
|
|
2891
2891
|
}
|
|
2892
2892
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2893
|
-
throw new (0,
|
|
2893
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2894
2894
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2895
2895
|
);
|
|
2896
2896
|
}
|
|
2897
2897
|
if (sums.length && switches.has("--count")) {
|
|
2898
|
-
throw new (0,
|
|
2898
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2899
2899
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2900
2900
|
);
|
|
2901
2901
|
}
|
|
@@ -2903,7 +2903,7 @@ function parseQuery(args, resource) {
|
|
|
2903
2903
|
if (operation === "count") {
|
|
2904
2904
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2905
2905
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2906
|
-
throw new (0,
|
|
2906
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2907
2907
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2908
2908
|
);
|
|
2909
2909
|
}
|
|
@@ -2938,16 +2938,16 @@ function parseQuery(args, resource) {
|
|
|
2938
2938
|
];
|
|
2939
2939
|
}
|
|
2940
2940
|
}
|
|
2941
|
-
const request =
|
|
2941
|
+
const request = _chunkQYL5ZV4Ujs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
2942
2942
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
2943
2943
|
const backend = values["--runtime-backend"];
|
|
2944
2944
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
2945
|
-
throw new (0,
|
|
2945
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2946
2946
|
"--runtime-backend must be daytona or modal."
|
|
2947
2947
|
);
|
|
2948
2948
|
}
|
|
2949
2949
|
if (backend && !namespace) {
|
|
2950
|
-
throw new (0,
|
|
2950
|
+
throw new (0, _chunkQYL5ZV4Ujs.RunEventQueryInputError)(
|
|
2951
2951
|
"--runtime-backend requires --runtime-namespace."
|
|
2952
2952
|
);
|
|
2953
2953
|
}
|
|
@@ -2995,12 +2995,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
2995
2995
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
2996
2996
|
const record3 = failure;
|
|
2997
2997
|
const status = record3.statusCode;
|
|
2998
|
-
const exitCode = error instanceof
|
|
2998
|
+
const exitCode = error instanceof _chunkQYL5ZV4Ujs.RunEventQueryInputError || status === 400 || status === 422 || record3.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record3.code === "CONFIG_ERROR" || record3.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
|
|
2999
2999
|
const diagnostic = Object.assign(failure, {
|
|
3000
3000
|
exitCode,
|
|
3001
3001
|
retryable: exitCode === 5
|
|
3002
3002
|
});
|
|
3003
|
-
if (
|
|
3003
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) _chunkXDUQQTISjs.printJsonError.call(void 0, diagnostic);
|
|
3004
3004
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3005
3005
|
return exitCode;
|
|
3006
3006
|
}
|
|
@@ -3015,7 +3015,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3015
3015
|
...criteria
|
|
3016
3016
|
} = request;
|
|
3017
3017
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3018
|
-
const client = new (0,
|
|
3018
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
3019
3019
|
let result;
|
|
3020
3020
|
if (request.operation === "fields") {
|
|
3021
3021
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3080,13 +3080,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3080
3080
|
lines.push(`Next page: ${nextPage}`);
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
|
-
|
|
3083
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
3084
3084
|
{
|
|
3085
3085
|
...result,
|
|
3086
3086
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3087
3087
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3088
3088
|
},
|
|
3089
|
-
{ json:
|
|
3089
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3090
3090
|
` }
|
|
3091
3091
|
);
|
|
3092
3092
|
return 0;
|
|
@@ -3904,7 +3904,7 @@ function checkedRunExample(plays, target) {
|
|
|
3904
3904
|
const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
3905
3905
|
const base = `deepline plays run --file ${quote(target)}`;
|
|
3906
3906
|
return {
|
|
3907
|
-
command: `${base}${
|
|
3907
|
+
command: `${base}${_chunkQYL5ZV4Ujs.playInputExampleArgs.call(void 0, schema)} --json`,
|
|
3908
3908
|
note: "Runs the local file without publishing and may spend credits. Supply the indicated file; JSON input must match inputSchema. Keep stderr separate from JSON stdout."
|
|
3909
3909
|
};
|
|
3910
3910
|
}
|
|
@@ -5522,7 +5522,7 @@ async function runPlayBootstrap(args) {
|
|
|
5522
5522
|
return runMonitorBootstrap(args);
|
|
5523
5523
|
}
|
|
5524
5524
|
const options = parsePlayBootstrapOptions(args);
|
|
5525
|
-
const client = new (0,
|
|
5525
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
5526
5526
|
const contracts = await loadBootstrapContracts(client, options);
|
|
5527
5527
|
const csvContext = loadCsvContext(options.from);
|
|
5528
5528
|
const source = generateBootstrapPlaySource({
|
|
@@ -5677,7 +5677,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5677
5677
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
5678
5678
|
);
|
|
5679
5679
|
}
|
|
5680
|
-
const response = await new (0,
|
|
5680
|
+
const response = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().runs.getReceipts(runId, {
|
|
5681
5681
|
keys
|
|
5682
5682
|
});
|
|
5683
5683
|
const failed = response.receipts.filter(
|
|
@@ -5689,7 +5689,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5689
5689
|
JSON.stringify(response, null, 2) + "\n",
|
|
5690
5690
|
{ flag: "wx", mode: 384 }
|
|
5691
5691
|
);
|
|
5692
|
-
|
|
5692
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
5693
5693
|
{
|
|
5694
5694
|
runId,
|
|
5695
5695
|
out: options.out,
|
|
@@ -5699,7 +5699,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5699
5699
|
{ json: true }
|
|
5700
5700
|
);
|
|
5701
5701
|
} else {
|
|
5702
|
-
|
|
5702
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
5703
5703
|
}
|
|
5704
5704
|
if (failed)
|
|
5705
5705
|
process.exitCode = response.receipts.some(
|
|
@@ -5738,7 +5738,7 @@ includes nextCommand when another page is available.
|
|
|
5738
5738
|
{ exitCode: 2 }
|
|
5739
5739
|
);
|
|
5740
5740
|
}
|
|
5741
|
-
const page = await new (0,
|
|
5741
|
+
const page = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().runs.children(parentRunId, {
|
|
5742
5742
|
launchKey: options.launchKey,
|
|
5743
5743
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
5744
5744
|
limit
|
|
@@ -5754,7 +5754,7 @@ includes nextCommand when another page is available.
|
|
|
5754
5754
|
String(limit),
|
|
5755
5755
|
"--json"
|
|
5756
5756
|
].join(" ") : null;
|
|
5757
|
-
|
|
5757
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
5758
5758
|
{
|
|
5759
5759
|
parentRunId,
|
|
5760
5760
|
launchKey: options.launchKey,
|
|
@@ -5790,7 +5790,7 @@ async function handleRunsHistory(options) {
|
|
|
5790
5790
|
throw new Error("--limit must be a positive integer.");
|
|
5791
5791
|
}
|
|
5792
5792
|
}
|
|
5793
|
-
const page = await new (0,
|
|
5793
|
+
const page = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().runs.history({
|
|
5794
5794
|
cursor: options.cursor,
|
|
5795
5795
|
orgId: options.org,
|
|
5796
5796
|
search: options.search,
|
|
@@ -5806,7 +5806,7 @@ async function handleRunsHistory(options) {
|
|
|
5806
5806
|
);
|
|
5807
5807
|
}
|
|
5808
5808
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
5809
|
-
|
|
5809
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
5810
5810
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
5811
5811
|
options.json ? { json: true } : {}
|
|
5812
5812
|
);
|
|
@@ -6082,7 +6082,7 @@ function projectRunDatasetCell(value) {
|
|
|
6082
6082
|
const logicalValue = parseSerializedDatasetValue(value);
|
|
6083
6083
|
if (logicalValue === null || logicalValue === void 0) return logicalValue;
|
|
6084
6084
|
if (typeof logicalValue === "object") {
|
|
6085
|
-
return
|
|
6085
|
+
return _chunkXDUQQTISjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
|
|
6086
6086
|
}
|
|
6087
6087
|
return logicalValue;
|
|
6088
6088
|
}
|
|
@@ -8890,7 +8890,7 @@ function renderOutcome(outcome) {
|
|
|
8890
8890
|
function printResult2(input) {
|
|
8891
8891
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
8892
8892
|
if (failed) process.exitCode = 1;
|
|
8893
|
-
|
|
8893
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
8894
8894
|
{
|
|
8895
8895
|
deployment: { ...input.deployment, status: input.status },
|
|
8896
8896
|
plays: input.outcomes,
|
|
@@ -8915,7 +8915,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8915
8915
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
8916
8916
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
8917
8917
|
});
|
|
8918
|
-
const { http, config } =
|
|
8918
|
+
const { http, config } = _chunkXDUQQTISjs.getAuthedHttpClient.call(void 0, );
|
|
8919
8919
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
8920
8920
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
8921
8921
|
deliveryId,
|
|
@@ -8942,7 +8942,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8942
8942
|
},
|
|
8943
8943
|
{
|
|
8944
8944
|
bundle: bundleDeployPlayFile,
|
|
8945
|
-
fetchImpl:
|
|
8945
|
+
fetchImpl: _chunkRNJ74JDHjs.fetchWithDeploymentProtection,
|
|
8946
8946
|
// The plays are already here: "opening" the source is naming it.
|
|
8947
8947
|
openSource: async () => ({
|
|
8948
8948
|
open: async () => ({ repoRoot: root })
|
|
@@ -10044,7 +10044,7 @@ function playStatusErrorText(status) {
|
|
|
10044
10044
|
function isRetryablePendingStartFailure(status) {
|
|
10045
10045
|
if (status.status !== "failed") return false;
|
|
10046
10046
|
if (status.runId && status.runId !== "pending") return false;
|
|
10047
|
-
return
|
|
10047
|
+
return _chunkQYL5ZV4Ujs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
10048
10048
|
}
|
|
10049
10049
|
function pendingStartFailureStatus(input) {
|
|
10050
10050
|
const message = input.error instanceof Error ? input.error.message : String(input.error);
|
|
@@ -10071,13 +10071,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
|
10071
10071
|
var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
10072
10072
|
function watchSurfaceReaches(state, provenance, level) {
|
|
10073
10073
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
10074
|
-
if (!
|
|
10074
|
+
if (!_chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
10075
10075
|
return false;
|
|
10076
10076
|
}
|
|
10077
|
-
if (
|
|
10077
|
+
if (_chunkQYL5ZV4Ujs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
10078
10078
|
return true;
|
|
10079
10079
|
}
|
|
10080
|
-
return state.verbose === true &&
|
|
10080
|
+
return state.verbose === true && _chunkQYL5ZV4Ujs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
10081
10081
|
}
|
|
10082
10082
|
function getEventPayload(event) {
|
|
10083
10083
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -10579,7 +10579,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
10579
10579
|
}
|
|
10580
10580
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
10581
10581
|
if (open2 && dashboardUrl) {
|
|
10582
|
-
|
|
10582
|
+
_chunkXDUQQTISjs.openInBrowser.call(void 0, dashboardUrl);
|
|
10583
10583
|
}
|
|
10584
10584
|
}
|
|
10585
10585
|
function printPlayLogLines(input) {
|
|
@@ -10641,7 +10641,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
10641
10641
|
billing: false
|
|
10642
10642
|
});
|
|
10643
10643
|
} catch (error) {
|
|
10644
|
-
if (
|
|
10644
|
+
if (_chunkQYL5ZV4Ujs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
10645
10645
|
return null;
|
|
10646
10646
|
}
|
|
10647
10647
|
throw error;
|
|
@@ -10830,7 +10830,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10830
10830
|
billing: false
|
|
10831
10831
|
});
|
|
10832
10832
|
} catch (error) {
|
|
10833
|
-
if (
|
|
10833
|
+
if (_chunkQYL5ZV4Ujs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
10834
10834
|
return null;
|
|
10835
10835
|
}
|
|
10836
10836
|
throw error;
|
|
@@ -11038,7 +11038,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11038
11038
|
lastPhase
|
|
11039
11039
|
});
|
|
11040
11040
|
}
|
|
11041
|
-
if (lastKnownWorkflowId &&
|
|
11041
|
+
if (lastKnownWorkflowId && _chunkQYL5ZV4Ujs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11042
11042
|
if (timeout) {
|
|
11043
11043
|
clearTimeout(timeout);
|
|
11044
11044
|
}
|
|
@@ -11074,7 +11074,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11074
11074
|
onRunAdmitted: confirmAdmission
|
|
11075
11075
|
});
|
|
11076
11076
|
}
|
|
11077
|
-
if (!lastKnownWorkflowId &&
|
|
11077
|
+
if (!lastKnownWorkflowId && _chunkQYL5ZV4Ujs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11078
11078
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
11079
11079
|
phase: "cli.play_start_stream_transient_failure",
|
|
11080
11080
|
ms: Date.now() - startedAt,
|
|
@@ -11173,7 +11173,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
11173
11173
|
"logs"
|
|
11174
11174
|
]);
|
|
11175
11175
|
function formatPlayLogLine(rawLine, state) {
|
|
11176
|
-
const classified =
|
|
11176
|
+
const classified = _chunkQYL5ZV4Ujs.classifyLogLine.call(void 0, rawLine);
|
|
11177
11177
|
const line = classified.line;
|
|
11178
11178
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
11179
11179
|
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _344 => _344[1]]) ? new Date(timestampMatch[1]) : null;
|
|
@@ -11188,14 +11188,14 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11188
11188
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
11189
11189
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
11190
11190
|
if (providerWait && !state.verbose) {
|
|
11191
|
-
return
|
|
11191
|
+
return _chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
11192
11192
|
}
|
|
11193
11193
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
11194
11194
|
if (mapProgress && !state.verbose) {
|
|
11195
|
-
return
|
|
11195
|
+
return _chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
11196
11196
|
}
|
|
11197
11197
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
11198
|
-
if (!
|
|
11198
|
+
if (!_chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11199
11199
|
return null;
|
|
11200
11200
|
}
|
|
11201
11201
|
if (state.emittedRunnerStarted) {
|
|
@@ -11208,7 +11208,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11208
11208
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
11209
11209
|
);
|
|
11210
11210
|
if (mapStart) {
|
|
11211
|
-
if (!
|
|
11211
|
+
if (!_chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11212
11212
|
return null;
|
|
11213
11213
|
}
|
|
11214
11214
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -11218,7 +11218,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11218
11218
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
11219
11219
|
);
|
|
11220
11220
|
if (mapDone) {
|
|
11221
|
-
if (!
|
|
11221
|
+
if (!_chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11222
11222
|
return null;
|
|
11223
11223
|
}
|
|
11224
11224
|
const [, results, executed, cached] = mapDone;
|
|
@@ -12507,7 +12507,7 @@ function formatRecentRunLogLines(value) {
|
|
|
12507
12507
|
(line) => typeof line === "string"
|
|
12508
12508
|
);
|
|
12509
12509
|
if (tail.length === 0) return [];
|
|
12510
|
-
const shown = tail.map((line) =>
|
|
12510
|
+
const shown = tail.map((line) => _chunkQYL5ZV4Ujs.classifyLogLine.call(void 0, line)).filter(
|
|
12511
12511
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
12512
12512
|
).slice(-8);
|
|
12513
12513
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -12787,7 +12787,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12787
12787
|
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _425 => _425.hits]), () => ( null));
|
|
12788
12788
|
if (jsonOutput) {
|
|
12789
12789
|
const payload2 = _optionalChain([options, 'optionalAccess', _426 => _426.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
12790
|
-
|
|
12790
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
12791
12791
|
hits ? { ...payload2, hits } : payload2,
|
|
12792
12792
|
{ json: true, fields: _optionalChain([options, 'optionalAccess', _427 => _427.jsonFields]) }
|
|
12793
12793
|
);
|
|
@@ -12803,7 +12803,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12803
12803
|
...buildPlayCompletionTextLines(status),
|
|
12804
12804
|
...formatRunHitsLines(hits)
|
|
12805
12805
|
];
|
|
12806
|
-
|
|
12806
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
12807
12807
|
json: false,
|
|
12808
12808
|
text: `${lines2.join("\n")}
|
|
12809
12809
|
`
|
|
@@ -12854,7 +12854,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12854
12854
|
lines.push(...buildBillingRollupTextLines(status));
|
|
12855
12855
|
const compact = compactPlayStatus(status);
|
|
12856
12856
|
const payload = _optionalChain([options, 'optionalAccess', _429 => _429.fullJson]) ? status : compact;
|
|
12857
|
-
|
|
12857
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
12858
12858
|
{
|
|
12859
12859
|
...payload,
|
|
12860
12860
|
render: {
|
|
@@ -13614,7 +13614,7 @@ function writeStartedPlayRun(input) {
|
|
|
13614
13614
|
dashboardUrl: input.dashboardUrl,
|
|
13615
13615
|
package: input.package
|
|
13616
13616
|
};
|
|
13617
|
-
|
|
13617
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
13618
13618
|
json: true,
|
|
13619
13619
|
fields: input.jsonFields
|
|
13620
13620
|
});
|
|
@@ -13636,7 +13636,7 @@ function writeStartedPlayRun(input) {
|
|
|
13636
13636
|
input.progress.writeLine(output2, process.stdout);
|
|
13637
13637
|
return;
|
|
13638
13638
|
}
|
|
13639
|
-
|
|
13639
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, input.package, {
|
|
13640
13640
|
json: false,
|
|
13641
13641
|
text: `${output2}
|
|
13642
13642
|
`
|
|
@@ -13665,7 +13665,7 @@ function writeStartedPlayRun(input) {
|
|
|
13665
13665
|
) ? [`Stop: deepline runs stop ${shellSingleQuote(input.runId)} --json`] : []
|
|
13666
13666
|
];
|
|
13667
13667
|
if (input.jsonOutput) {
|
|
13668
|
-
|
|
13668
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
13669
13669
|
return;
|
|
13670
13670
|
}
|
|
13671
13671
|
if (input.dashboardUrl) {
|
|
@@ -13676,7 +13676,7 @@ function writeStartedPlayRun(input) {
|
|
|
13676
13676
|
input.progress.writeLine(output, process.stdout);
|
|
13677
13677
|
return;
|
|
13678
13678
|
}
|
|
13679
|
-
|
|
13679
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
13680
13680
|
{
|
|
13681
13681
|
...payload,
|
|
13682
13682
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -13686,7 +13686,7 @@ function writeStartedPlayRun(input) {
|
|
|
13686
13686
|
);
|
|
13687
13687
|
}
|
|
13688
13688
|
function parsePlayRunOptions(args) {
|
|
13689
|
-
const selection =
|
|
13689
|
+
const selection = _chunkXDUQQTISjs.parseJsonFields.call(void 0, args, "run");
|
|
13690
13690
|
args = selection.args;
|
|
13691
13691
|
const usage2 = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
|
|
13692
13692
|
let filePath = null;
|
|
@@ -13695,7 +13695,7 @@ function parsePlayRunOptions(args) {
|
|
|
13695
13695
|
let revisionId = null;
|
|
13696
13696
|
let revisionSelector = null;
|
|
13697
13697
|
const watch = !args.includes("--no-wait");
|
|
13698
|
-
let jsonOutput = watch ? args.includes("--json") :
|
|
13698
|
+
let jsonOutput = watch ? args.includes("--json") : _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
13699
13699
|
const fullJson = args.includes("--full");
|
|
13700
13700
|
const force = args.includes("--force");
|
|
13701
13701
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -13742,7 +13742,7 @@ function parsePlayRunOptions(args) {
|
|
|
13742
13742
|
"--log-level requires one of: debug, info, warn, error."
|
|
13743
13743
|
);
|
|
13744
13744
|
}
|
|
13745
|
-
const parsed =
|
|
13745
|
+
const parsed = _chunkQYL5ZV4Ujs.parseLogLevel.call(void 0, value);
|
|
13746
13746
|
if (!parsed) {
|
|
13747
13747
|
throw new Error(
|
|
13748
13748
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13969,7 +13969,7 @@ function parsePlayRunOptions(args) {
|
|
|
13969
13969
|
};
|
|
13970
13970
|
}
|
|
13971
13971
|
function parsePlayCheckOptions(args) {
|
|
13972
|
-
const selection =
|
|
13972
|
+
const selection = _chunkXDUQQTISjs.parseJsonFields.call(void 0, args, "check");
|
|
13973
13973
|
args = selection.args;
|
|
13974
13974
|
const target = args[0];
|
|
13975
13975
|
if (!target || target.startsWith("-")) {
|
|
@@ -13981,7 +13981,7 @@ function parsePlayCheckOptions(args) {
|
|
|
13981
13981
|
if (arg !== "--json" && arg !== "--full")
|
|
13982
13982
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
13983
13983
|
}
|
|
13984
|
-
const jsonOutput =
|
|
13984
|
+
const jsonOutput = _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
13985
13985
|
return {
|
|
13986
13986
|
target,
|
|
13987
13987
|
jsonOutput,
|
|
@@ -14057,7 +14057,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
14057
14057
|
useLatest,
|
|
14058
14058
|
expectedArtifactHash,
|
|
14059
14059
|
dryRun,
|
|
14060
|
-
jsonOutput:
|
|
14060
|
+
jsonOutput: _chunkXDUQQTISjs.argsWantJson.call(void 0, args)
|
|
14061
14061
|
};
|
|
14062
14062
|
}
|
|
14063
14063
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -14098,7 +14098,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
14098
14098
|
target,
|
|
14099
14099
|
expectedArtifactHash,
|
|
14100
14100
|
dryRun,
|
|
14101
|
-
jsonOutput:
|
|
14101
|
+
jsonOutput: _chunkXDUQQTISjs.argsWantJson.call(void 0, args)
|
|
14102
14102
|
};
|
|
14103
14103
|
}
|
|
14104
14104
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -14309,7 +14309,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
14309
14309
|
async function handlePlayCheck(args) {
|
|
14310
14310
|
const options = parsePlayCheckOptions(args);
|
|
14311
14311
|
if (!isFileTarget(options.target)) {
|
|
14312
|
-
const client = new (0,
|
|
14312
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
14313
14313
|
try {
|
|
14314
14314
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
14315
14315
|
command: "check"
|
|
@@ -14338,7 +14338,7 @@ async function handlePlayCheck(args) {
|
|
|
14338
14338
|
},
|
|
14339
14339
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
14340
14340
|
};
|
|
14341
|
-
|
|
14341
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, result, {
|
|
14342
14342
|
json: options.jsonOutput,
|
|
14343
14343
|
fields: options.jsonFields,
|
|
14344
14344
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -14348,7 +14348,7 @@ async function handlePlayCheck(args) {
|
|
|
14348
14348
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
14349
14349
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
14350
14350
|
if (options.jsonOutput) {
|
|
14351
|
-
|
|
14351
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
14352
14352
|
{
|
|
14353
14353
|
kind: "play_check",
|
|
14354
14354
|
checked: "named_contract",
|
|
@@ -14390,7 +14390,7 @@ async function handlePlayCheck(args) {
|
|
|
14390
14390
|
detailsCommand: `deepline plays check ${shellQuote3(options.target)} --full --json`,
|
|
14391
14391
|
publishCommand: _optionalChain([primary, 'optionalAccess', _475 => _475.result, 'access', _476 => _476.artifactHash]) ? `deepline plays publish ${shellQuote3(options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
14392
14392
|
});
|
|
14393
|
-
|
|
14393
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, output, {
|
|
14394
14394
|
json: options.jsonOutput,
|
|
14395
14395
|
fields: options.jsonFields,
|
|
14396
14396
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -14452,7 +14452,7 @@ async function checkOneExportedPlay(input) {
|
|
|
14452
14452
|
result: { valid: false, errors: descriptionErrors }
|
|
14453
14453
|
};
|
|
14454
14454
|
}
|
|
14455
|
-
const client = new (0,
|
|
14455
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
14456
14456
|
const integrationMode = resolveEvalIntegrationMode();
|
|
14457
14457
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
14458
14458
|
playName: node.playName,
|
|
@@ -14489,7 +14489,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14489
14489
|
if (options.target.kind !== "file") {
|
|
14490
14490
|
throw new Error("Expected a file-backed play run target.");
|
|
14491
14491
|
}
|
|
14492
|
-
const client = new (0,
|
|
14492
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)(playRunClientOptions(options));
|
|
14493
14493
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14494
14494
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
14495
14495
|
progress.phase("compiling play");
|
|
@@ -14703,7 +14703,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
14703
14703
|
if (options.target.kind !== "name") {
|
|
14704
14704
|
throw new Error("Expected a named play run target.");
|
|
14705
14705
|
}
|
|
14706
|
-
const client = new (0,
|
|
14706
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)(playRunClientOptions(options));
|
|
14707
14707
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14708
14708
|
const playName = options.target.name;
|
|
14709
14709
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
@@ -15100,10 +15100,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
15100
15100
|
);
|
|
15101
15101
|
return `${lines.join("\n")}
|
|
15102
15102
|
|
|
15103
|
-
${
|
|
15103
|
+
${_chunkXDUQQTISjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
15104
15104
|
}
|
|
15105
15105
|
async function handleRunGet(args) {
|
|
15106
|
-
const selection =
|
|
15106
|
+
const selection = _chunkXDUQQTISjs.parseJsonFields.call(void 0,
|
|
15107
15107
|
args,
|
|
15108
15108
|
args.includes("--config") ? "config" : "get"
|
|
15109
15109
|
);
|
|
@@ -15116,7 +15116,7 @@ async function handleRunGet(args) {
|
|
|
15116
15116
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15117
15117
|
return 1;
|
|
15118
15118
|
}
|
|
15119
|
-
const client = new (0,
|
|
15119
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
15120
15120
|
if (args.includes("--config")) {
|
|
15121
15121
|
if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
|
|
15122
15122
|
console.error(
|
|
@@ -15130,7 +15130,7 @@ async function handleRunGet(args) {
|
|
|
15130
15130
|
"This server does not support recorded configuration reads."
|
|
15131
15131
|
);
|
|
15132
15132
|
}
|
|
15133
|
-
|
|
15133
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15134
15134
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
15135
15135
|
{ json: true, fields: selection.fields }
|
|
15136
15136
|
);
|
|
@@ -15138,7 +15138,7 @@ async function handleRunGet(args) {
|
|
|
15138
15138
|
}
|
|
15139
15139
|
if (args.includes("--input")) {
|
|
15140
15140
|
const input = await client.getRunInput(runId);
|
|
15141
|
-
|
|
15141
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
15142
15142
|
return 0;
|
|
15143
15143
|
}
|
|
15144
15144
|
const full = args.includes("--full");
|
|
@@ -15151,8 +15151,8 @@ async function handleRunGet(args) {
|
|
|
15151
15151
|
full: true,
|
|
15152
15152
|
failedLogs: args.includes("--log-failed")
|
|
15153
15153
|
}) : status;
|
|
15154
|
-
if (
|
|
15155
|
-
|
|
15154
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
15155
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15156
15156
|
full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
15157
15157
|
{ json: true, fields: selection.fields }
|
|
15158
15158
|
);
|
|
@@ -15168,8 +15168,8 @@ async function handleRunGet(args) {
|
|
|
15168
15168
|
readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
|
|
15169
15169
|
]);
|
|
15170
15170
|
const hitLines = formatRunHitsLines(hits);
|
|
15171
|
-
const json =
|
|
15172
|
-
|
|
15171
|
+
const json = _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
15172
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15173
15173
|
{
|
|
15174
15174
|
...overview,
|
|
15175
15175
|
credits,
|
|
@@ -15272,9 +15272,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
15272
15272
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15273
15273
|
return 1;
|
|
15274
15274
|
}
|
|
15275
|
-
const status = await new (0,
|
|
15276
|
-
if (
|
|
15277
|
-
|
|
15275
|
+
const status = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().runs.status(runId);
|
|
15276
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
15277
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
15278
15278
|
return 0;
|
|
15279
15279
|
}
|
|
15280
15280
|
if (!status.available) {
|
|
@@ -15348,12 +15348,12 @@ async function handleRunsRerun(args) {
|
|
|
15348
15348
|
index += 1;
|
|
15349
15349
|
}
|
|
15350
15350
|
}
|
|
15351
|
-
const result = await new (0,
|
|
15351
|
+
const result = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().runs.rerun(runId, {
|
|
15352
15352
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
15353
15353
|
...inputOverrides ? { inputOverrides } : {}
|
|
15354
15354
|
});
|
|
15355
|
-
if (
|
|
15356
|
-
|
|
15355
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
15356
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
15357
15357
|
} else {
|
|
15358
15358
|
console.log(
|
|
15359
15359
|
result.deduplicated === true ? `
|
|
@@ -15418,8 +15418,8 @@ ${usage2}
|
|
|
15418
15418
|
Discover Plays: ${next.discover}
|
|
15419
15419
|
Active runs: ${next.running}`
|
|
15420
15420
|
);
|
|
15421
|
-
if (
|
|
15422
|
-
|
|
15421
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
15422
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15423
15423
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
15424
15424
|
{ json: true }
|
|
15425
15425
|
);
|
|
@@ -15430,7 +15430,7 @@ Active runs: ${next.running}`
|
|
|
15430
15430
|
console.error("--offset requires --play.");
|
|
15431
15431
|
return 1;
|
|
15432
15432
|
}
|
|
15433
|
-
const client = new (0,
|
|
15433
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
15434
15434
|
const page = await client.runs.listPage({
|
|
15435
15435
|
...playName ? { play: playName } : {},
|
|
15436
15436
|
...statusFilter ? { status: statusFilter } : {},
|
|
@@ -15483,7 +15483,7 @@ Active runs: ${next.running}`
|
|
|
15483
15483
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
15484
15484
|
);
|
|
15485
15485
|
}
|
|
15486
|
-
|
|
15486
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15487
15487
|
{
|
|
15488
15488
|
runs,
|
|
15489
15489
|
count: runs.length,
|
|
@@ -15497,7 +15497,7 @@ Active runs: ${next.running}`
|
|
|
15497
15497
|
},
|
|
15498
15498
|
render: { sections: [{ title: "runs", lines }] }
|
|
15499
15499
|
},
|
|
15500
|
-
{ json:
|
|
15500
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args) }
|
|
15501
15501
|
);
|
|
15502
15502
|
return 0;
|
|
15503
15503
|
}
|
|
@@ -15527,7 +15527,7 @@ async function handleRunTail(args) {
|
|
|
15527
15527
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15528
15528
|
return 1;
|
|
15529
15529
|
}
|
|
15530
|
-
const parsed =
|
|
15530
|
+
const parsed = _chunkQYL5ZV4Ujs.parseLogLevel.call(void 0, value);
|
|
15531
15531
|
if (!parsed) {
|
|
15532
15532
|
console.error(
|
|
15533
15533
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15565,9 +15565,9 @@ async function handleRunTail(args) {
|
|
|
15565
15565
|
);
|
|
15566
15566
|
return 1;
|
|
15567
15567
|
}
|
|
15568
|
-
const client = new (0,
|
|
15568
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
15569
15569
|
const jsonLines = args.includes("--jsonl");
|
|
15570
|
-
const jsonOutput = !jsonLines &&
|
|
15570
|
+
const jsonOutput = !jsonLines && _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
15571
15571
|
const compact = args.includes("--compact");
|
|
15572
15572
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
15573
15573
|
const compactState = {
|
|
@@ -15648,7 +15648,7 @@ async function handleRunLogs(args) {
|
|
|
15648
15648
|
]);
|
|
15649
15649
|
const cursorIndex = args.indexOf("--cursor");
|
|
15650
15650
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
15651
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
15651
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkQYL5ZV4Ujs.isRunLogsCursor.call(void 0, cursorValue));
|
|
15652
15652
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
15653
15653
|
return handleRunEventSearch(args);
|
|
15654
15654
|
}
|
|
@@ -15682,7 +15682,7 @@ async function handleRunLogs(args) {
|
|
|
15682
15682
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15683
15683
|
return 1;
|
|
15684
15684
|
}
|
|
15685
|
-
const parsed =
|
|
15685
|
+
const parsed = _chunkQYL5ZV4Ujs.parseLogLevel.call(void 0, value);
|
|
15686
15686
|
if (!parsed) {
|
|
15687
15687
|
console.error(
|
|
15688
15688
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15729,12 +15729,12 @@ async function handleRunLogs(args) {
|
|
|
15729
15729
|
);
|
|
15730
15730
|
return 1;
|
|
15731
15731
|
}
|
|
15732
|
-
const client = new (0,
|
|
15732
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
15733
15733
|
if (outPath) {
|
|
15734
15734
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
15735
|
-
const logs = result2.entries.filter((line) =>
|
|
15735
|
+
const logs = result2.entries.filter((line) => _chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, _chunkQYL5ZV4Ujs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkQYL5ZV4Ujs.classifyLogLine.call(void 0, line).line);
|
|
15736
15736
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
15737
|
-
|
|
15737
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15738
15738
|
{
|
|
15739
15739
|
runId: result2.runId,
|
|
15740
15740
|
log_path: outPath,
|
|
@@ -15757,7 +15757,7 @@ async function handleRunLogs(args) {
|
|
|
15757
15757
|
]
|
|
15758
15758
|
}
|
|
15759
15759
|
},
|
|
15760
|
-
{ json:
|
|
15760
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args) }
|
|
15761
15761
|
);
|
|
15762
15762
|
return 0;
|
|
15763
15763
|
}
|
|
@@ -15788,7 +15788,7 @@ async function handleRunLogs(args) {
|
|
|
15788
15788
|
}
|
|
15789
15789
|
};
|
|
15790
15790
|
const text = buildRunLogsText(filteredResult);
|
|
15791
|
-
|
|
15791
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15792
15792
|
{
|
|
15793
15793
|
runId: result.runId,
|
|
15794
15794
|
totalCount: result.totalCount,
|
|
@@ -15812,7 +15812,7 @@ async function handleRunLogs(args) {
|
|
|
15812
15812
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
15813
15813
|
},
|
|
15814
15814
|
{
|
|
15815
|
-
json:
|
|
15815
|
+
json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args),
|
|
15816
15816
|
text
|
|
15817
15817
|
}
|
|
15818
15818
|
);
|
|
@@ -15836,7 +15836,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
15836
15836
|
);
|
|
15837
15837
|
}
|
|
15838
15838
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
15839
|
-
(entry) =>
|
|
15839
|
+
(entry) => _chunkQYL5ZV4Ujs.logLevelReaches.call(void 0, _chunkQYL5ZV4Ujs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
15840
15840
|
);
|
|
15841
15841
|
const selected = matching.slice(-limit);
|
|
15842
15842
|
const olderMatchesExist = matching.length > selected.length;
|
|
@@ -15846,7 +15846,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
15846
15846
|
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _518 => _518.at, 'call', _519 => _519(-1), 'optionalAccess', _520 => _520.seq]), () => ( null)),
|
|
15847
15847
|
truncated: result.truncated || olderMatchesExist,
|
|
15848
15848
|
hasMore: olderMatchesExist,
|
|
15849
|
-
nextCursor: olderMatchesExist ?
|
|
15849
|
+
nextCursor: olderMatchesExist ? _chunkQYL5ZV4Ujs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
15850
15850
|
};
|
|
15851
15851
|
}
|
|
15852
15852
|
async function handleRunEventSearch(args) {
|
|
@@ -15913,7 +15913,7 @@ ${usage2}`);
|
|
|
15913
15913
|
namespace,
|
|
15914
15914
|
...backend ? { backend } : {}
|
|
15915
15915
|
} : void 0;
|
|
15916
|
-
const client = new (0,
|
|
15916
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
15917
15917
|
const result = await client.runs.searchEvents({
|
|
15918
15918
|
...runId ? { runId } : {},
|
|
15919
15919
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -15986,7 +15986,7 @@ ${renderedDetails}` : ""}`;
|
|
|
15986
15986
|
String(limit),
|
|
15987
15987
|
"--json"
|
|
15988
15988
|
].join(" ") : null;
|
|
15989
|
-
|
|
15989
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
15990
15990
|
{
|
|
15991
15991
|
events,
|
|
15992
15992
|
nextCursor: result.nextCursor,
|
|
@@ -15997,14 +15997,14 @@ ${renderedDetails}` : ""}`;
|
|
|
15997
15997
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
15998
15998
|
},
|
|
15999
15999
|
{
|
|
16000
|
-
json:
|
|
16000
|
+
json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args),
|
|
16001
16001
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
16002
16002
|
}
|
|
16003
16003
|
);
|
|
16004
16004
|
return 0;
|
|
16005
16005
|
}
|
|
16006
16006
|
function buildRunLogsText(result) {
|
|
16007
|
-
const lines = result.entries.map((line) =>
|
|
16007
|
+
const lines = result.entries.map((line) => _chunkQYL5ZV4Ujs.classifyLogLine.call(void 0, line).line);
|
|
16008
16008
|
if (result.warning) {
|
|
16009
16009
|
if (lines.length > 0) lines.push("");
|
|
16010
16010
|
lines.push(`warning: ${result.warning}`);
|
|
@@ -16038,7 +16038,7 @@ async function handleRunStop(args) {
|
|
|
16038
16038
|
reason = args[++index];
|
|
16039
16039
|
}
|
|
16040
16040
|
}
|
|
16041
|
-
const client = new (0,
|
|
16041
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16042
16042
|
const result = await client.runs.stop(runId, { reason });
|
|
16043
16043
|
const state = resolveRunStopState(result);
|
|
16044
16044
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -16053,7 +16053,7 @@ async function handleRunStop(args) {
|
|
|
16053
16053
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
16054
16054
|
`inspect: deepline runs get ${runId} --full --json`
|
|
16055
16055
|
];
|
|
16056
|
-
|
|
16056
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
16057
16057
|
{
|
|
16058
16058
|
...cancelling,
|
|
16059
16059
|
state,
|
|
@@ -16068,7 +16068,7 @@ async function handleRunStop(args) {
|
|
|
16068
16068
|
]
|
|
16069
16069
|
}
|
|
16070
16070
|
},
|
|
16071
|
-
{ json:
|
|
16071
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args) }
|
|
16072
16072
|
);
|
|
16073
16073
|
return 0;
|
|
16074
16074
|
}
|
|
@@ -16085,7 +16085,7 @@ async function handleRunStop(args) {
|
|
|
16085
16085
|
];
|
|
16086
16086
|
process.stderr.write(`${lines2.join("\n")}
|
|
16087
16087
|
`);
|
|
16088
|
-
|
|
16088
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
16089
16089
|
{
|
|
16090
16090
|
...result,
|
|
16091
16091
|
render: {
|
|
@@ -16100,7 +16100,7 @@ async function handleRunStop(args) {
|
|
|
16100
16100
|
]
|
|
16101
16101
|
}
|
|
16102
16102
|
},
|
|
16103
|
-
{ json:
|
|
16103
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args) }
|
|
16104
16104
|
);
|
|
16105
16105
|
return 1;
|
|
16106
16106
|
}
|
|
@@ -16111,12 +16111,12 @@ async function handleRunStop(args) {
|
|
|
16111
16111
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
16112
16112
|
] : []
|
|
16113
16113
|
];
|
|
16114
|
-
|
|
16114
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
16115
16115
|
{
|
|
16116
16116
|
...result,
|
|
16117
16117
|
render: { sections: [{ title: "run stop", lines }] }
|
|
16118
16118
|
},
|
|
16119
|
-
{ json:
|
|
16119
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args) }
|
|
16120
16120
|
);
|
|
16121
16121
|
return 0;
|
|
16122
16122
|
}
|
|
@@ -16166,18 +16166,18 @@ async function handleRunStopAll(args) {
|
|
|
16166
16166
|
reason = args[++index];
|
|
16167
16167
|
}
|
|
16168
16168
|
}
|
|
16169
|
-
const client = new (0,
|
|
16169
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16170
16170
|
if (dryRun) {
|
|
16171
16171
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
16172
16172
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
16173
|
-
|
|
16173
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
16174
16174
|
{
|
|
16175
16175
|
...result2,
|
|
16176
16176
|
render: {
|
|
16177
16177
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
16178
16178
|
}
|
|
16179
16179
|
},
|
|
16180
|
-
{ json:
|
|
16180
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
16181
16181
|
` }
|
|
16182
16182
|
);
|
|
16183
16183
|
return 0;
|
|
@@ -16190,17 +16190,17 @@ async function handleRunStopAll(args) {
|
|
|
16190
16190
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
16191
16191
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
16192
16192
|
];
|
|
16193
|
-
|
|
16193
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
16194
16194
|
{
|
|
16195
16195
|
...result,
|
|
16196
16196
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
16197
16197
|
},
|
|
16198
|
-
{ json:
|
|
16198
|
+
{ json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args) }
|
|
16199
16199
|
);
|
|
16200
16200
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
16201
16201
|
}
|
|
16202
16202
|
async function handleRunExport(args) {
|
|
16203
|
-
const selection =
|
|
16203
|
+
const selection = _chunkXDUQQTISjs.parseJsonFields.call(void 0, args, "export");
|
|
16204
16204
|
args = selection.args;
|
|
16205
16205
|
const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--json]";
|
|
16206
16206
|
let runId;
|
|
@@ -16259,16 +16259,16 @@ async function handleRunExport(args) {
|
|
|
16259
16259
|
"INVALID_ARGUMENT"
|
|
16260
16260
|
);
|
|
16261
16261
|
}
|
|
16262
|
-
const client = new (0,
|
|
16262
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16263
16263
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
16264
16264
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
16265
|
-
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !
|
|
16265
|
+
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkXDUQQTISjs.argsWantJson.call(void 0, args));
|
|
16266
16266
|
try {
|
|
16267
16267
|
await waitForPlayCompletionByWatch({
|
|
16268
16268
|
client,
|
|
16269
16269
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
16270
16270
|
workflowId: runId,
|
|
16271
|
-
jsonOutput:
|
|
16271
|
+
jsonOutput: _chunkXDUQQTISjs.argsWantJson.call(void 0, args),
|
|
16272
16272
|
emitLogs: false,
|
|
16273
16273
|
waitTimeoutMs,
|
|
16274
16274
|
startedAt: Date.now(),
|
|
@@ -16367,8 +16367,8 @@ async function handleRunExport(args) {
|
|
|
16367
16367
|
"utf-8"
|
|
16368
16368
|
);
|
|
16369
16369
|
}
|
|
16370
|
-
|
|
16371
|
-
json:
|
|
16370
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0, payload, {
|
|
16371
|
+
json: _chunkXDUQQTISjs.argsWantJson.call(void 0, args),
|
|
16372
16372
|
fields: selection.fields,
|
|
16373
16373
|
text: `${lines.join("\n")}
|
|
16374
16374
|
`
|
|
@@ -16389,10 +16389,10 @@ async function handlePlayGet(args) {
|
|
|
16389
16389
|
);
|
|
16390
16390
|
return 2;
|
|
16391
16391
|
}
|
|
16392
|
-
const client = new (0,
|
|
16392
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16393
16393
|
const explicitJson = args.includes("--json");
|
|
16394
16394
|
const sourceOutput = args.includes("--source");
|
|
16395
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
16395
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
16396
16396
|
const requestedRevisionFlags = [
|
|
16397
16397
|
args.includes("--working"),
|
|
16398
16398
|
args.includes("--live"),
|
|
@@ -16452,7 +16452,7 @@ async function handlePlayGet(args) {
|
|
|
16452
16452
|
}
|
|
16453
16453
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
16454
16454
|
if (jsonOutput) {
|
|
16455
|
-
|
|
16455
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, {
|
|
16456
16456
|
...detail,
|
|
16457
16457
|
...materializedFile ? {
|
|
16458
16458
|
message: loadedMessage,
|
|
@@ -16539,8 +16539,8 @@ async function handlePlayVersions(args) {
|
|
|
16539
16539
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
16540
16540
|
return 1;
|
|
16541
16541
|
}
|
|
16542
|
-
const client = new (0,
|
|
16543
|
-
const jsonOutput =
|
|
16542
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16543
|
+
const jsonOutput = _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
16544
16544
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16545
16545
|
command: "versions"
|
|
16546
16546
|
});
|
|
@@ -16548,7 +16548,7 @@ async function handlePlayVersions(args) {
|
|
|
16548
16548
|
parseReferencedPlayTarget2(playName).playName
|
|
16549
16549
|
);
|
|
16550
16550
|
if (jsonOutput) {
|
|
16551
|
-
|
|
16551
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, { versions });
|
|
16552
16552
|
return 0;
|
|
16553
16553
|
}
|
|
16554
16554
|
if (versions.length === 0) {
|
|
@@ -16580,9 +16580,9 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
16580
16580
|
"signals"
|
|
16581
16581
|
];
|
|
16582
16582
|
async function handlePlayList(args) {
|
|
16583
|
-
const jsonOutput =
|
|
16583
|
+
const jsonOutput = _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
16584
16584
|
const showCost = args.includes("--show-cost");
|
|
16585
|
-
const client = new (0,
|
|
16585
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16586
16586
|
const categoriesIndex = args.indexOf("--categories");
|
|
16587
16587
|
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _556 => _556[categoriesIndex + 1], 'optionalAccess', _557 => _557.trim, 'call', _558 => _558()]) : void 0;
|
|
16588
16588
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
@@ -16679,7 +16679,7 @@ async function handlePlayList(args) {
|
|
|
16679
16679
|
lines.push("List truncated \u2014 more plays are available.");
|
|
16680
16680
|
lines.push(`Next page: ${nextPage}`);
|
|
16681
16681
|
}
|
|
16682
|
-
|
|
16682
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
16683
16683
|
{
|
|
16684
16684
|
plays,
|
|
16685
16685
|
count: plays.length,
|
|
@@ -16697,7 +16697,7 @@ async function handlePlayList(args) {
|
|
|
16697
16697
|
}
|
|
16698
16698
|
async function handlePlayPin(args, pinned) {
|
|
16699
16699
|
const target = _optionalChain([args, 'access', _565 => _565.find, 'call', _566 => _566((arg) => !arg.startsWith("-")), 'optionalAccess', _567 => _567.trim, 'call', _568 => _568()]);
|
|
16700
|
-
const jsonOutput =
|
|
16700
|
+
const jsonOutput = _chunkXDUQQTISjs.argsWantJson.call(void 0, args);
|
|
16701
16701
|
const dryRun = args.includes("--dry-run");
|
|
16702
16702
|
if (!target) {
|
|
16703
16703
|
console.error(
|
|
@@ -16715,11 +16715,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
16715
16715
|
const name = parsedTarget.playName;
|
|
16716
16716
|
const plan = { name, pinned, dryRun };
|
|
16717
16717
|
if (dryRun) {
|
|
16718
|
-
|
|
16718
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, plan);
|
|
16719
16719
|
return 0;
|
|
16720
16720
|
}
|
|
16721
|
-
const result = await new (0,
|
|
16722
|
-
if (jsonOutput)
|
|
16721
|
+
const result = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().setPlayPinned(name, pinned);
|
|
16722
|
+
if (jsonOutput) _chunkXDUQQTISjs.printCompactJson.call(void 0, result);
|
|
16723
16723
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
16724
16724
|
return 0;
|
|
16725
16725
|
}
|
|
@@ -16735,7 +16735,7 @@ function csvColumnLines(csvInput) {
|
|
|
16735
16735
|
const headers = [defaults[column]].flat().filter((header) => header && header !== column);
|
|
16736
16736
|
return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
|
|
16737
16737
|
}),
|
|
16738
|
-
|
|
16738
|
+
_chunkQYL5ZV4Ujs.CSV_HEADER_MATCHING_NOTE
|
|
16739
16739
|
];
|
|
16740
16740
|
}
|
|
16741
16741
|
function printPlayDescription(play) {
|
|
@@ -16842,12 +16842,12 @@ async function handlePlayGrep(args) {
|
|
|
16842
16842
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
16843
16843
|
return 1;
|
|
16844
16844
|
}
|
|
16845
|
-
const client = new (0,
|
|
16845
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16846
16846
|
const results = (await client.listPlays({ grep: query })).map(
|
|
16847
16847
|
summarizePlayGrepResult
|
|
16848
16848
|
);
|
|
16849
|
-
if (
|
|
16850
|
-
|
|
16849
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
16850
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, {
|
|
16851
16851
|
plays: results,
|
|
16852
16852
|
count: results.length,
|
|
16853
16853
|
query,
|
|
@@ -16870,7 +16870,7 @@ async function handlePlayGrep(args) {
|
|
|
16870
16870
|
return 0;
|
|
16871
16871
|
}
|
|
16872
16872
|
async function handlePlayDescribe(args) {
|
|
16873
|
-
const selection =
|
|
16873
|
+
const selection = _chunkXDUQQTISjs.parseJsonFields.call(void 0, args, "describe");
|
|
16874
16874
|
args = selection.args;
|
|
16875
16875
|
const playName = args[0];
|
|
16876
16876
|
if (!playName) {
|
|
@@ -16904,8 +16904,8 @@ async function handlePlayDescribe(args) {
|
|
|
16904
16904
|
`deepline plays check ${playName}`,
|
|
16905
16905
|
...definedName ? [`deepline plays describe <workspace>/${definedName}`] : []
|
|
16906
16906
|
];
|
|
16907
|
-
if (
|
|
16908
|
-
|
|
16907
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
16908
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, {
|
|
16909
16909
|
ok: false,
|
|
16910
16910
|
error: { message },
|
|
16911
16911
|
next
|
|
@@ -16919,7 +16919,7 @@ async function handlePlayDescribe(args) {
|
|
|
16919
16919
|
}
|
|
16920
16920
|
return 2;
|
|
16921
16921
|
}
|
|
16922
|
-
const client = new (0,
|
|
16922
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
16923
16923
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16924
16924
|
command: "describe"
|
|
16925
16925
|
});
|
|
@@ -16929,9 +16929,9 @@ async function handlePlayDescribe(args) {
|
|
|
16929
16929
|
compact: args.includes("--compact")
|
|
16930
16930
|
}
|
|
16931
16931
|
);
|
|
16932
|
-
if (
|
|
16933
|
-
if (selection.fields)
|
|
16934
|
-
else
|
|
16932
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
16933
|
+
if (selection.fields) _chunkXDUQQTISjs.printJson.call(void 0, play, selection.fields);
|
|
16934
|
+
else _chunkXDUQQTISjs.printCompactJson.call(void 0, play);
|
|
16935
16935
|
return 0;
|
|
16936
16936
|
}
|
|
16937
16937
|
printPlayDescription(play);
|
|
@@ -16975,7 +16975,7 @@ async function handlePlaySave(args) {
|
|
|
16975
16975
|
next: `deepline plays check ${shellQuote3(options.target)}`
|
|
16976
16976
|
};
|
|
16977
16977
|
if (options.jsonOutput) {
|
|
16978
|
-
|
|
16978
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result);
|
|
16979
16979
|
} else {
|
|
16980
16980
|
console.error(result.message);
|
|
16981
16981
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -16997,7 +16997,7 @@ async function handlePlaySave(args) {
|
|
|
16997
16997
|
};
|
|
16998
16998
|
if (options.dryRun) {
|
|
16999
16999
|
if (options.jsonOutput) {
|
|
17000
|
-
|
|
17000
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, dryRun);
|
|
17001
17001
|
} else {
|
|
17002
17002
|
console.log(`Dry run: ${playName}`);
|
|
17003
17003
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17006,7 +17006,7 @@ async function handlePlaySave(args) {
|
|
|
17006
17006
|
}
|
|
17007
17007
|
return 0;
|
|
17008
17008
|
}
|
|
17009
|
-
const client = new (0,
|
|
17009
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
17010
17010
|
try {
|
|
17011
17011
|
await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
17012
17012
|
"cli.play_save_compile_manifests",
|
|
@@ -17042,7 +17042,7 @@ async function handlePlaySave(args) {
|
|
|
17042
17042
|
}
|
|
17043
17043
|
};
|
|
17044
17044
|
if (options.jsonOutput) {
|
|
17045
|
-
|
|
17045
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result);
|
|
17046
17046
|
} else {
|
|
17047
17047
|
console.log(
|
|
17048
17048
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -17068,7 +17068,7 @@ async function handlePlayPublish(args) {
|
|
|
17068
17068
|
}
|
|
17069
17069
|
const { target: playName, useLatest } = options;
|
|
17070
17070
|
let revisionId = options.revisionId;
|
|
17071
|
-
const client = new (0,
|
|
17071
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
17072
17072
|
if (isFileTarget(playName)) {
|
|
17073
17073
|
if (revisionId || useLatest) {
|
|
17074
17074
|
console.error(
|
|
@@ -17100,7 +17100,7 @@ async function handlePlayPublish(args) {
|
|
|
17100
17100
|
next: `deepline plays check ${shellQuote3(playName)}`
|
|
17101
17101
|
};
|
|
17102
17102
|
if (options.jsonOutput) {
|
|
17103
|
-
|
|
17103
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result3);
|
|
17104
17104
|
} else {
|
|
17105
17105
|
console.error(result3.message);
|
|
17106
17106
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -17123,7 +17123,7 @@ async function handlePlayPublish(args) {
|
|
|
17123
17123
|
};
|
|
17124
17124
|
if (options.dryRun) {
|
|
17125
17125
|
if (options.jsonOutput) {
|
|
17126
|
-
|
|
17126
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, dryRun);
|
|
17127
17127
|
} else {
|
|
17128
17128
|
console.log(`Dry run: ${rootPlayName}`);
|
|
17129
17129
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17191,7 +17191,7 @@ async function handlePlayPublish(args) {
|
|
|
17191
17191
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
17192
17192
|
};
|
|
17193
17193
|
if (options.jsonOutput) {
|
|
17194
|
-
|
|
17194
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result2);
|
|
17195
17195
|
} else {
|
|
17196
17196
|
printPublishReceipt({
|
|
17197
17197
|
name: rootPlayName,
|
|
@@ -17222,7 +17222,7 @@ async function handlePlayPublish(args) {
|
|
|
17222
17222
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
17223
17223
|
latest: useLatest
|
|
17224
17224
|
};
|
|
17225
|
-
|
|
17225
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result2);
|
|
17226
17226
|
return 0;
|
|
17227
17227
|
}
|
|
17228
17228
|
const resolvedName = parseReferencedPlayTarget2(playName).playName;
|
|
@@ -17246,7 +17246,7 @@ async function handlePlayPublish(args) {
|
|
|
17246
17246
|
revisionId ? { revisionId } : {}
|
|
17247
17247
|
);
|
|
17248
17248
|
if (options.jsonOutput) {
|
|
17249
|
-
|
|
17249
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result);
|
|
17250
17250
|
} else {
|
|
17251
17251
|
printPublishReceipt({
|
|
17252
17252
|
name: result.name,
|
|
@@ -17286,7 +17286,7 @@ async function handlePlayDelete(args) {
|
|
|
17286
17286
|
);
|
|
17287
17287
|
return 2;
|
|
17288
17288
|
}
|
|
17289
|
-
const client = new (0,
|
|
17289
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
17290
17290
|
let detail;
|
|
17291
17291
|
try {
|
|
17292
17292
|
detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
|
|
@@ -17310,8 +17310,8 @@ async function handlePlayDelete(args) {
|
|
|
17310
17310
|
name: resolvedName,
|
|
17311
17311
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
17312
17312
|
};
|
|
17313
|
-
if (
|
|
17314
|
-
|
|
17313
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
17314
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result2);
|
|
17315
17315
|
} else {
|
|
17316
17316
|
process.stdout.write(
|
|
17317
17317
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -17321,8 +17321,8 @@ async function handlePlayDelete(args) {
|
|
|
17321
17321
|
return 0;
|
|
17322
17322
|
}
|
|
17323
17323
|
const result = await client.deletePlay(resolvedName);
|
|
17324
|
-
if (
|
|
17325
|
-
|
|
17324
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
17325
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result);
|
|
17326
17326
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
17327
17327
|
}
|
|
17328
17328
|
if (result.alreadyArchived) {
|
|
@@ -17361,13 +17361,13 @@ async function handlePlayRestore(args) {
|
|
|
17361
17361
|
);
|
|
17362
17362
|
return 2;
|
|
17363
17363
|
}
|
|
17364
|
-
const client = new (0,
|
|
17364
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
17365
17365
|
try {
|
|
17366
17366
|
const result = await client.restorePlay(
|
|
17367
17367
|
parseReferencedPlayTarget2(playName).playName
|
|
17368
17368
|
);
|
|
17369
|
-
if (
|
|
17370
|
-
|
|
17369
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
17370
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, result);
|
|
17371
17371
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
17372
17372
|
}
|
|
17373
17373
|
if (result.alreadyActive) {
|
|
@@ -17472,7 +17472,7 @@ Examples:
|
|
|
17472
17472
|
).action(async (target, options) => {
|
|
17473
17473
|
process.exitCode = await handlePlayCheck([
|
|
17474
17474
|
target,
|
|
17475
|
-
...
|
|
17475
|
+
..._chunkXDUQQTISjs.jsonFieldArgs.call(void 0, options.json),
|
|
17476
17476
|
...options.full ? ["--full"] : []
|
|
17477
17477
|
]);
|
|
17478
17478
|
});
|
|
@@ -17659,7 +17659,7 @@ JSON field selection:
|
|
|
17659
17659
|
...options.maxConcurrentRows ? ["--max-concurrent-rows", options.maxConcurrentRows] : [],
|
|
17660
17660
|
...options.open ? ["--open"] : [],
|
|
17661
17661
|
...options.debugMapLatency ? ["--debug-map-latency"] : [],
|
|
17662
|
-
...
|
|
17662
|
+
..._chunkXDUQQTISjs.jsonFieldArgs.call(void 0, options.json),
|
|
17663
17663
|
...options.full ? ["--full"] : [],
|
|
17664
17664
|
...passthroughArgs
|
|
17665
17665
|
]);
|
|
@@ -17714,9 +17714,9 @@ Examples:
|
|
|
17714
17714
|
const limit = Number(options.historyLimit);
|
|
17715
17715
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
17716
17716
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
17717
|
-
const client = new (0,
|
|
17717
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
17718
17718
|
if (options.binding) {
|
|
17719
|
-
|
|
17719
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0,
|
|
17720
17720
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
17721
17721
|
);
|
|
17722
17722
|
return;
|
|
@@ -17724,7 +17724,7 @@ Examples:
|
|
|
17724
17724
|
const result = await client.listPlayTriggerInventory({
|
|
17725
17725
|
cursor: options.cursor
|
|
17726
17726
|
});
|
|
17727
|
-
|
|
17727
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, {
|
|
17728
17728
|
...result,
|
|
17729
17729
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
|
|
17730
17730
|
});
|
|
@@ -17771,7 +17771,7 @@ Examples:
|
|
|
17771
17771
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
17772
17772
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
17773
17773
|
}
|
|
17774
|
-
const result = await new (0,
|
|
17774
|
+
const result = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().getPlaysActivity({
|
|
17775
17775
|
timeZone: options.timeZone,
|
|
17776
17776
|
days,
|
|
17777
17777
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -17785,7 +17785,7 @@ Examples:
|
|
|
17785
17785
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
17786
17786
|
);
|
|
17787
17787
|
}
|
|
17788
|
-
|
|
17788
|
+
_chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
|
|
17789
17789
|
{ ...result },
|
|
17790
17790
|
{
|
|
17791
17791
|
json: options.json || !process.stdout.isTTY,
|
|
@@ -17814,7 +17814,7 @@ Examples:
|
|
|
17814
17814
|
false
|
|
17815
17815
|
);
|
|
17816
17816
|
});
|
|
17817
|
-
|
|
17817
|
+
_chunkIB7OGQGHjs.registerDeprecatedSearchCommand.call(void 0,
|
|
17818
17818
|
play,
|
|
17819
17819
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
17820
17820
|
);
|
|
@@ -17857,7 +17857,7 @@ Examples:
|
|
|
17857
17857
|
"JSON output; optionally select comma-separated dotted paths"
|
|
17858
17858
|
).action(async (target, options) => {
|
|
17859
17859
|
process.exitCode = await handlePlayDescribe(
|
|
17860
|
-
|
|
17860
|
+
_chunkXDUQQTISjs.describeArgs.call(void 0, target, options)
|
|
17861
17861
|
);
|
|
17862
17862
|
});
|
|
17863
17863
|
play.command("versions").description("List revisions for a named play.").addHelpText(
|
|
@@ -17964,7 +17964,7 @@ Examples:
|
|
|
17964
17964
|
deepline plays deployments <deployment-id>
|
|
17965
17965
|
`
|
|
17966
17966
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
|
|
17967
|
-
async (id, options) => id ?
|
|
17967
|
+
async (id, options) => id ? _chunkLRI2FQF2js.handleDeploymentGet.call(void 0, id, options) : _chunkLRI2FQF2js.handleDeploymentsList.call(void 0, options)
|
|
17968
17968
|
);
|
|
17969
17969
|
addPublishHelp(
|
|
17970
17970
|
play.command("publish <target>").description(
|
|
@@ -18144,7 +18144,7 @@ Examples:
|
|
|
18144
18144
|
).action(async (runId, options) => {
|
|
18145
18145
|
process.exitCode = await handleRunGet([
|
|
18146
18146
|
runId,
|
|
18147
|
-
...
|
|
18147
|
+
..._chunkXDUQQTISjs.jsonFieldArgs.call(void 0, options.json),
|
|
18148
18148
|
...options.full ? ["--full"] : [],
|
|
18149
18149
|
...options.input ? ["--input"] : [],
|
|
18150
18150
|
...options.config ? ["--config"] : [],
|
|
@@ -18419,7 +18419,7 @@ Examples:
|
|
|
18419
18419
|
...options.metadataOut ? ["--metadata-out", options.metadataOut] : [],
|
|
18420
18420
|
...options.wait ? ["--wait"] : [],
|
|
18421
18421
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
18422
|
-
...
|
|
18422
|
+
..._chunkXDUQQTISjs.jsonFieldArgs.call(void 0, options.json)
|
|
18423
18423
|
]);
|
|
18424
18424
|
});
|
|
18425
18425
|
const share = play.command("share").description(
|
|
@@ -18585,10 +18585,10 @@ async function handlePlayShareStatus(args) {
|
|
|
18585
18585
|
return 2;
|
|
18586
18586
|
}
|
|
18587
18587
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18588
|
-
const status = await new (0,
|
|
18588
|
+
const status = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().getSharePage(name);
|
|
18589
18589
|
const outputStatus = shareStatusForOutput(status);
|
|
18590
|
-
if (
|
|
18591
|
-
|
|
18590
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
18591
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, outputStatus);
|
|
18592
18592
|
return 0;
|
|
18593
18593
|
}
|
|
18594
18594
|
if (!outputStatus.share) {
|
|
@@ -18627,7 +18627,7 @@ async function handlePlaySharePublish(args) {
|
|
|
18627
18627
|
return 2;
|
|
18628
18628
|
}
|
|
18629
18629
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18630
|
-
const client = new (0,
|
|
18630
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
18631
18631
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18632
18632
|
let resolvedVersion;
|
|
18633
18633
|
if (!revisionId) {
|
|
@@ -18658,8 +18658,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18658
18658
|
);
|
|
18659
18659
|
if (!hasCompleted) {
|
|
18660
18660
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
18661
|
-
if (
|
|
18662
|
-
|
|
18661
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
18662
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, {
|
|
18663
18663
|
ok: false,
|
|
18664
18664
|
code: "NO_SUCCESSFUL_RUN",
|
|
18665
18665
|
message,
|
|
@@ -18683,8 +18683,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18683
18683
|
};
|
|
18684
18684
|
if (args.includes("--dry-run")) {
|
|
18685
18685
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
18686
|
-
if (
|
|
18687
|
-
|
|
18686
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
18687
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, plan);
|
|
18688
18688
|
} else {
|
|
18689
18689
|
console.log(
|
|
18690
18690
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -18694,8 +18694,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18694
18694
|
}
|
|
18695
18695
|
const status = await client.publishSharePage(name, request);
|
|
18696
18696
|
const outputStatus = shareStatusForOutput(status);
|
|
18697
|
-
if (
|
|
18698
|
-
|
|
18697
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
18698
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, outputStatus);
|
|
18699
18699
|
return 0;
|
|
18700
18700
|
}
|
|
18701
18701
|
const urls = shareUrlFields(outputStatus);
|
|
@@ -18726,9 +18726,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
18726
18726
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
18727
18727
|
...seoIndexing ? { seoIndexing } : {}
|
|
18728
18728
|
};
|
|
18729
|
-
const status = await new (0,
|
|
18730
|
-
if (
|
|
18731
|
-
|
|
18729
|
+
const status = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().updateSharePage(name, request);
|
|
18730
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
18731
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, status);
|
|
18732
18732
|
return 0;
|
|
18733
18733
|
}
|
|
18734
18734
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -18743,7 +18743,7 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18743
18743
|
return 2;
|
|
18744
18744
|
}
|
|
18745
18745
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18746
|
-
const client = new (0,
|
|
18746
|
+
const client = new (0, _chunkQYL5ZV4Ujs.DeeplineClient)();
|
|
18747
18747
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18748
18748
|
const versionFlag = shareFlagValue(args, "--version");
|
|
18749
18749
|
if (!revisionId && versionFlag) {
|
|
@@ -18760,8 +18760,8 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18760
18760
|
revisionId ? { revisionId } : {}
|
|
18761
18761
|
);
|
|
18762
18762
|
const outputStatus = shareStatusForOutput(status);
|
|
18763
|
-
if (
|
|
18764
|
-
|
|
18763
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
18764
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, outputStatus);
|
|
18765
18765
|
return 0;
|
|
18766
18766
|
}
|
|
18767
18767
|
const urls = shareUrlFields(outputStatus);
|
|
@@ -18786,9 +18786,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
18786
18786
|
return 2;
|
|
18787
18787
|
}
|
|
18788
18788
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18789
|
-
const status = await new (0,
|
|
18790
|
-
if (
|
|
18791
|
-
|
|
18789
|
+
const status = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().unpublishSharePage(name);
|
|
18790
|
+
if (_chunkXDUQQTISjs.argsWantJson.call(void 0, args)) {
|
|
18791
|
+
_chunkXDUQQTISjs.printCompactJson.call(void 0, status);
|
|
18792
18792
|
return 0;
|
|
18793
18793
|
}
|
|
18794
18794
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|