deepline 0.3.307 → 0.3.308
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/README.md +2 -1
- package/dist/bundling-sources/sdk/src/client.ts +270 -11
- package/dist/bundling-sources/sdk/src/compat.ts +27 -9
- package/dist/bundling-sources/sdk/src/index.ts +35 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/batch-runtime.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/batching-types.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +46 -16
- package/dist/bundling-sources/shared_libs/play-runtime/fullenrich-batching.ts +24 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-event-query.ts +872 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +595 -0
- package/dist/cli/auth-LWNR7TQB.js +31 -0
- package/dist/cli/{auth-AJPTFFC7.mjs → auth-ZWX4BF5K.mjs} +4 -4
- package/dist/cli/{billing-LPDYJLIL.mjs → billing-CLV5QRFQ.mjs} +4 -4
- package/dist/cli/{billing-SPBWUEOS.js → billing-H24FGAKE.js} +70 -70
- package/dist/cli/{chunk-O4OESDIN.mjs → chunk-3GIUCJAT.mjs} +1 -1
- package/dist/cli/{chunk-D55NIPGU.mjs → chunk-ABMGEW3C.mjs} +1 -1
- package/dist/cli/{chunk-RXYYANYP.mjs → chunk-ASWZTTKT.mjs} +13 -5
- package/dist/cli/{chunk-G4SSYZND.mjs → chunk-BPD7TR27.mjs} +1 -1
- package/dist/cli/{chunk-ZGICKTW7.mjs → chunk-CXU7ME5X.mjs} +2 -2
- package/dist/cli/{chunk-HWCB5MHF.js → chunk-GBFIAI4L.js} +68 -60
- package/dist/cli/{chunk-MZQP7CIL.js → chunk-GONK2N7U.js} +1 -1
- package/dist/cli/{chunk-TLTKAJ6S.mjs → chunk-HGI6RGHB.mjs} +653 -5
- package/dist/cli/{chunk-K2CQ2RBJ.js → chunk-IFIGQWHC.js} +6 -6
- package/dist/cli/{chunk-7ONALPWY.mjs → chunk-JUAVGRD7.mjs} +4 -4
- package/dist/cli/{chunk-GUIQWUCB.js → chunk-O7NNH76S.js} +6 -6
- package/dist/cli/{chunk-2IKIG333.js → chunk-QJBJZVG6.js} +15 -4
- package/dist/cli/{chunk-AKE6ZFIJ.js → chunk-QTCFSRGC.js} +4 -4
- package/dist/cli/{chunk-ZIF6JOOI.js → chunk-SRZ6XDX3.js} +26 -26
- package/dist/cli/{chunk-MPVXXDWH.mjs → chunk-T3P4NRZU.mjs} +1 -1
- package/dist/cli/{chunk-KCHBE2J3.js → chunk-TH3YBIJT.js} +852 -204
- package/dist/cli/{chunk-DF3XJ2V2.js → chunk-UGTYNMRX.js} +48 -48
- package/dist/cli/{chunk-76MFV3AC.js → chunk-WEZVPZPE.js} +2 -2
- package/dist/cli/{chunk-UABLQKTZ.mjs → chunk-WXLOW623.mjs} +11 -0
- package/dist/cli/{chunk-ILOCS73R.mjs → chunk-XFYVL7EM.mjs} +2 -2
- package/dist/cli/{chunk-BDFVIOLY.mjs → chunk-XSDL3NHZ.mjs} +3 -3
- package/dist/cli/{chunk-JNHXSZPB.js → chunk-YEJMVAD3.js} +6 -6
- package/dist/cli/{chunk-QACDLYNO.mjs → chunk-YSZSERRZ.mjs} +1 -1
- package/dist/cli/{chunk-IVXD2KA2.js → chunk-ZHHF24O5.js} +15 -15
- package/dist/cli/client-3J76AMVE.js +20 -0
- package/dist/cli/{client-7ZL4ROII.mjs → client-A5ILG5GT.mjs} +3 -3
- package/dist/cli/{csv-Y3LYCTGD.mjs → csv-NZ7KAYEF.mjs} +3 -3
- package/dist/cli/{csv-JUDFG7JV.js → csv-VSSAAXFX.js} +12 -12
- package/dist/cli/{db-5IXGEXNT.js → db-ICLEBSNO.js} +20 -20
- package/dist/cli/{db-GCOJD2BD.mjs → db-YSAJUBLD.mjs} +4 -4
- package/dist/cli/{executions-FIICTMSY.mjs → executions-MUJRAT5R.mjs} +4 -4
- package/dist/cli/{executions-LIEQKFT7.js → executions-XCAJB5TF.js} +6 -6
- package/dist/cli/{feedback-3OVAA3C7.mjs → feedback-6C7Y2SCJ.mjs} +3 -3
- package/dist/cli/{feedback-FAADYNAR.js → feedback-DBZMBHZG.js} +6 -6
- package/dist/cli/git-2NSE4WIK.js +23 -0
- package/dist/cli/{git-ESMYCYJO.mjs → git-EAH67ITA.mjs} +4 -4
- package/dist/cli/index.js +79 -77
- package/dist/cli/index.mjs +33 -31
- package/dist/cli/{legacy-noops-PKI3RFZW.js → legacy-noops-EJTOLTVO.js} +7 -7
- package/dist/cli/{legacy-noops-KP5CPZRK.mjs → legacy-noops-O5INQP6Q.mjs} +4 -4
- package/dist/cli/{monitors-KCFBLAFZ.js → monitors-5OYO2DPJ.js} +85 -85
- package/dist/cli/{monitors-A6KGGSBO.mjs → monitors-SBBBMUFY.mjs} +4 -4
- package/dist/cli/{org-WI6DEXZQ.js → org-SJRPJG42.js} +60 -60
- package/dist/cli/{org-DHI24UOK.mjs → org-Z7LTOL3H.mjs} +4 -4
- package/dist/cli/{play-2YXLQD24.mjs → play-2JTIEOZM.mjs} +472 -55
- package/dist/cli/{play-4EUUN76H.js → play-VQJ6ABZ2.js} +961 -544
- package/dist/cli/{providers-DWS3XIM6.js → providers-43MR5XOV.js} +7 -7
- package/dist/cli/{providers-2WZ6KHH2.mjs → providers-MX4CV2EH.mjs} +4 -4
- package/dist/cli/{quickstart-TDTDKM6F.js → quickstart-A6W3HEE2.js} +5 -5
- package/dist/cli/{quickstart-ZFZVG6UO.mjs → quickstart-Y4YLKRZ3.mjs} +3 -3
- package/dist/cli/{search-GMPXRQF4.js → search-AMUFSAFP.js} +6 -6
- package/dist/cli/{search-BBE2ZMCI.mjs → search-FRKDLJQG.mjs} +5 -5
- package/dist/cli/{secrets-JEJL3KIM.mjs → secrets-E4EX7O3J.mjs} +4 -4
- package/dist/cli/{secrets-SMBX4IE6.js → secrets-XITHKZW2.js} +13 -13
- package/dist/cli/{sessions-S6AWG747.js → sessions-6HJFDIR2.js} +5 -5
- package/dist/cli/{sessions-AVU353UT.mjs → sessions-6YXAUJII.mjs} +4 -4
- package/dist/cli/{settings-KBW4ROHC.js → settings-J5NRLCV2.js} +74 -74
- package/dist/cli/{settings-GY5CYRLF.mjs → settings-LBJSZIET.mjs} +7 -7
- package/dist/cli/{setup-WSVIDSEV.js → setup-2ES4CTO5.js} +41 -41
- package/dist/cli/{setup-4CW3XGGX.mjs → setup-75FENNVH.mjs} +6 -6
- package/dist/cli/skills-VLTAVA4K.js +28 -0
- package/dist/cli/{skills-U3NXFSFK.mjs → skills-XGZDUXW6.mjs} +4 -4
- package/dist/cli/{tools-XU6KLJZT.mjs → tools-2LEKXOGY.mjs} +58 -42
- package/dist/cli/{tools-KZKELW25.js → tools-ZOQOGDKI.js} +111 -95
- package/dist/cli/update-5CZOVYQT.js +28 -0
- package/dist/cli/{update-RZLH46DR.mjs → update-SNK3IN3I.mjs} +6 -6
- package/dist/cli/{workflow-ZQUKQI35.mjs → workflow-G7ZM3MAC.mjs} +5 -5
- package/dist/cli/{workflow-GDOGDGTZ.js → workflow-W3AYTB3J.js} +15 -15
- package/dist/{client-Dj8MAkDc.d.mts → client-DpnkGBn-.d.mts} +324 -11
- package/dist/{client-DsrFGXJf.d.ts → client-ypdBvf1o.d.ts} +324 -11
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -6
- package/dist/index.mjs +5 -3
- package/dist/install-integrity.json +73 -72
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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-TUQTQIH4.js +0 -31
- package/dist/cli/client-S3MIFPM2.js +0 -20
- package/dist/cli/git-GG6LWE2R.js +0 -23
- package/dist/cli/skills-6AU3RRAD.js +0 -28
- package/dist/cli/update-LVXXQF4A.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 _chunkSRZ6XDX3js = require('./chunk-SRZ6XDX3.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkO7NNH76Sjs = require('./chunk-O7NNH76S.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -28,7 +28,9 @@ var _chunkSDK3ZA2Cjs = require('./chunk-SDK3ZA2C.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
var _chunkTH3YBIJTjs = require('./chunk-TH3YBIJT.js');
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
|
|
@@ -59,12 +61,13 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
59
61
|
|
|
60
62
|
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
|
|
65
|
+
var _chunkYEJMVAD3js = require('./chunk-YEJMVAD3.js');
|
|
63
66
|
|
|
64
67
|
|
|
65
|
-
var
|
|
68
|
+
var _chunkQTCFSRGCjs = require('./chunk-QTCFSRGC.js');
|
|
66
69
|
require('./chunk-XNYIZMNQ.js');
|
|
67
|
-
require('./chunk-
|
|
70
|
+
require('./chunk-GONK2N7U.js');
|
|
68
71
|
|
|
69
72
|
|
|
70
73
|
|
|
@@ -2041,7 +2044,7 @@ function resolveField(key, command) {
|
|
|
2041
2044
|
}
|
|
2042
2045
|
function printSettings(result, json, name) {
|
|
2043
2046
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2044
|
-
|
|
2047
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2045
2048
|
{
|
|
2046
2049
|
...result,
|
|
2047
2050
|
settings: Object.fromEntries(
|
|
@@ -2085,7 +2088,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2085
2088
|
valueSyntax: field.cli.valueSyntax,
|
|
2086
2089
|
examples: field.cli.examples
|
|
2087
2090
|
}));
|
|
2088
|
-
|
|
2091
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2089
2092
|
{
|
|
2090
2093
|
fields: descriptions,
|
|
2091
2094
|
render: {
|
|
@@ -2110,7 +2113,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2110
2113
|
async (options, command) => {
|
|
2111
2114
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2112
2115
|
printSettings(
|
|
2113
|
-
await new (0,
|
|
2116
|
+
await new (0, _chunkTH3YBIJTjs.DeeplineClient)().getPlaySettings(options.play),
|
|
2114
2117
|
options.json,
|
|
2115
2118
|
options.name
|
|
2116
2119
|
);
|
|
@@ -2141,7 +2144,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2141
2144
|
);
|
|
2142
2145
|
}
|
|
2143
2146
|
if (options.dryRun) {
|
|
2144
|
-
|
|
2147
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2145
2148
|
{
|
|
2146
2149
|
dryRun: true,
|
|
2147
2150
|
play,
|
|
@@ -2162,7 +2165,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2162
2165
|
return;
|
|
2163
2166
|
}
|
|
2164
2167
|
printSettings(
|
|
2165
|
-
await new (0,
|
|
2168
|
+
await new (0, _chunkTH3YBIJTjs.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2166
2169
|
options.json
|
|
2167
2170
|
);
|
|
2168
2171
|
};
|
|
@@ -2188,13 +2191,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2188
2191
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2189
2192
|
{ exitCode: 2 }
|
|
2190
2193
|
);
|
|
2191
|
-
const page = await new (0,
|
|
2194
|
+
const page = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().listPlaySettingsPaths({
|
|
2192
2195
|
root: options.root,
|
|
2193
2196
|
limit,
|
|
2194
2197
|
cursor: options.cursor
|
|
2195
2198
|
});
|
|
2196
2199
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""} --json` : null;
|
|
2197
|
-
|
|
2200
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2198
2201
|
{
|
|
2199
2202
|
...page,
|
|
2200
2203
|
nextCommand,
|
|
@@ -2245,7 +2248,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2245
2248
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
|
|
2246
2249
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
|
|
2247
2250
|
};
|
|
2248
|
-
const client = new (0,
|
|
2251
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
2249
2252
|
const paths = [];
|
|
2250
2253
|
let cursor;
|
|
2251
2254
|
do {
|
|
@@ -2307,7 +2310,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2307
2310
|
moved.push(move.playName);
|
|
2308
2311
|
}
|
|
2309
2312
|
}
|
|
2310
|
-
|
|
2313
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2311
2314
|
{
|
|
2312
2315
|
dryRun: Boolean(options.dryRun),
|
|
2313
2316
|
from: options.from,
|
|
@@ -2435,7 +2438,7 @@ function triggerLines(view) {
|
|
|
2435
2438
|
return lines;
|
|
2436
2439
|
}
|
|
2437
2440
|
function printView(view, json) {
|
|
2438
|
-
|
|
2441
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2439
2442
|
{
|
|
2440
2443
|
...view,
|
|
2441
2444
|
render: {
|
|
@@ -2448,7 +2451,7 @@ function printView(view, json) {
|
|
|
2448
2451
|
);
|
|
2449
2452
|
}
|
|
2450
2453
|
function printResult(result, json) {
|
|
2451
|
-
|
|
2454
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2452
2455
|
{
|
|
2453
2456
|
...result,
|
|
2454
2457
|
render: {
|
|
@@ -2478,7 +2481,7 @@ async function mutate(command, options, build) {
|
|
|
2478
2481
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2479
2482
|
}
|
|
2480
2483
|
if (options.dryRun) {
|
|
2481
|
-
|
|
2484
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
2482
2485
|
{
|
|
2483
2486
|
dryRun: true,
|
|
2484
2487
|
play: options.play,
|
|
@@ -2497,7 +2500,7 @@ async function mutate(command, options, build) {
|
|
|
2497
2500
|
return;
|
|
2498
2501
|
}
|
|
2499
2502
|
printResult(
|
|
2500
|
-
await new (0,
|
|
2503
|
+
await new (0, _chunkTH3YBIJTjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2501
2504
|
options.json
|
|
2502
2505
|
);
|
|
2503
2506
|
}
|
|
@@ -2530,7 +2533,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2530
2533
|
}).addHelpText("after", help2);
|
|
2531
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) => {
|
|
2532
2535
|
printView(
|
|
2533
|
-
await new (0,
|
|
2536
|
+
await new (0, _chunkTH3YBIJTjs.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2534
2537
|
options.json
|
|
2535
2538
|
);
|
|
2536
2539
|
});
|
|
@@ -2574,7 +2577,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2574
2577
|
if (options.auth === void 0) {
|
|
2575
2578
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2576
2579
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2577
|
-
const current = await new (0,
|
|
2580
|
+
const current = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().getPlayTriggerConfig(
|
|
2578
2581
|
options.play
|
|
2579
2582
|
);
|
|
2580
2583
|
return {
|
|
@@ -2651,7 +2654,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2651
2654
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2652
2655
|
"runtime.event": "Other event."
|
|
2653
2656
|
};
|
|
2654
|
-
var RUN_LOGS_KIND_HELP =
|
|
2657
|
+
var RUN_LOGS_KIND_HELP = _chunkTH3YBIJTjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2655
2658
|
kind,
|
|
2656
2659
|
description: KIND_DESCRIPTIONS[kind]
|
|
2657
2660
|
}));
|
|
@@ -2711,6 +2714,8 @@ function renderRunLogsHelp() {
|
|
|
2711
2714
|
"",
|
|
2712
2715
|
"Examples:",
|
|
2713
2716
|
` ${READ_EXAMPLES[0]}`,
|
|
2717
|
+
" deepline runs logs '<run-id>' --step company-lookup --level warn --since 1h",
|
|
2718
|
+
" deepline runs logs '<run-id>' --query timeout --count --json",
|
|
2714
2719
|
` deepline runs logs --where '$.eventId == "receipt:5a32ee1a-46cf-4853-b72b-5f1d782ffab4"' --payloads --json`,
|
|
2715
2720
|
" deepline runs logs --kind run.failed --json",
|
|
2716
2721
|
...[
|
|
@@ -2731,20 +2736,408 @@ function renderRunLogsHelp() {
|
|
|
2731
2736
|
"Quote the whole filter with single shell quotes. Strings use double quotes; numbers and booleans are unquoted.",
|
|
2732
2737
|
"Missing fields do not match. Maximum eight matches and 512 bytes per filter."
|
|
2733
2738
|
].map((note) => wrapParagraph(note)),
|
|
2739
|
+
" With --step/--level/--query, filters also support ranges, ||, in and exists.",
|
|
2740
|
+
" --count is exact; --group-by pages groups; --sum totals numeric fields.",
|
|
2741
|
+
" Use --fields for available fields. Use runs events for lifecycle events.",
|
|
2734
2742
|
"",
|
|
2735
2743
|
"Search:",
|
|
2736
2744
|
...[
|
|
2737
|
-
"
|
|
2738
|
-
"
|
|
2739
|
-
"
|
|
2740
|
-
"
|
|
2741
|
-
"--out, --failed and --log-level
|
|
2745
|
+
"Defaults to the last hour; maximum lookback is seven days.",
|
|
2746
|
+
"Follow next.page for log queries, next.logs for compatibility event search.",
|
|
2747
|
+
"Text logs use nextCursor with --cursor. --payloads: 10 events and 16 MiB.",
|
|
2748
|
+
"Find an exact saved result by returned eventId and add --payloads.",
|
|
2749
|
+
"--out, --failed and --log-level cannot be combined with event search."
|
|
2742
2750
|
].map((note) => wrapParagraph(note)),
|
|
2743
2751
|
"",
|
|
2744
2752
|
"More examples: https://deepline.com/docs/sdk-v2/run-events"
|
|
2745
2753
|
].join("\n");
|
|
2746
2754
|
}
|
|
2747
2755
|
|
|
2756
|
+
// src/cli/run-event-query.ts
|
|
2757
|
+
var _commander = require('commander');
|
|
2758
|
+
var STRUCTURED_LOG_FLAGS = /* @__PURE__ */ new Set([
|
|
2759
|
+
"--step",
|
|
2760
|
+
"--level",
|
|
2761
|
+
"--query",
|
|
2762
|
+
"--count",
|
|
2763
|
+
"--group-by",
|
|
2764
|
+
"--sum",
|
|
2765
|
+
"--fields"
|
|
2766
|
+
]);
|
|
2767
|
+
var VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
2768
|
+
"--since",
|
|
2769
|
+
"--until",
|
|
2770
|
+
"--play",
|
|
2771
|
+
"--kind",
|
|
2772
|
+
"--where",
|
|
2773
|
+
"--step",
|
|
2774
|
+
"--level",
|
|
2775
|
+
"--query",
|
|
2776
|
+
"--limit",
|
|
2777
|
+
"--cursor",
|
|
2778
|
+
"--group-by",
|
|
2779
|
+
"--sum",
|
|
2780
|
+
"--runtime-namespace",
|
|
2781
|
+
"--runtime-backend"
|
|
2782
|
+
]);
|
|
2783
|
+
var SWITCH_FLAGS = /* @__PURE__ */ new Set(["--json", "--count", "--payloads", "--fields"]);
|
|
2784
|
+
function requestsStructuredLogs(args) {
|
|
2785
|
+
return args.some((arg) => STRUCTURED_LOG_FLAGS.has(arg.split("=", 1)[0]));
|
|
2786
|
+
}
|
|
2787
|
+
function configureRunQueryCommandErrors(command, resource) {
|
|
2788
|
+
command.exitOverride((error) => {
|
|
2789
|
+
let program = command;
|
|
2790
|
+
while (program.parent) program = program.parent;
|
|
2791
|
+
const args = program.args;
|
|
2792
|
+
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2793
|
+
error.exitCode = 2;
|
|
2794
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2795
|
+
_chunkYEJMVAD3js.printJsonError.call(void 0,
|
|
2796
|
+
Object.assign(new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(error.message), {
|
|
2797
|
+
exitCode: 2,
|
|
2798
|
+
retryable: false
|
|
2799
|
+
})
|
|
2800
|
+
);
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
throw error;
|
|
2804
|
+
});
|
|
2805
|
+
}
|
|
2806
|
+
function shellQuote(value) {
|
|
2807
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
2808
|
+
}
|
|
2809
|
+
function terminalText(value) {
|
|
2810
|
+
return value.replace(
|
|
2811
|
+
/[\u0000-\u001f\u007f-\u009f]/g,
|
|
2812
|
+
(control) => `\\x${control.codePointAt(0).toString(16).padStart(2, "0")}`
|
|
2813
|
+
);
|
|
2814
|
+
}
|
|
2815
|
+
function renderEvent(event, resource) {
|
|
2816
|
+
const context = event.context === void 0 ? "" : ` ${JSON.stringify(event.context)}`;
|
|
2817
|
+
const identity = resource === "logs" ? `${_nullishCoalesce(event.level, () => ( "unknown"))}${event.stepId ? ` [${event.stepId}]` : ""}` : `${event.kind} ${event.runId}${event.stepId ? ` [${event.stepId}]` : ""}`;
|
|
2818
|
+
const message = _nullishCoalesce(event.message, () => ( ""));
|
|
2819
|
+
const details = [
|
|
2820
|
+
event.eventPayload === void 0 ? "" : `event: ${JSON.stringify(event.eventPayload)}`,
|
|
2821
|
+
event.payload === void 0 ? "" : `payload: ${JSON.stringify(event.payload)}`
|
|
2822
|
+
].filter(Boolean);
|
|
2823
|
+
return [
|
|
2824
|
+
terminalText(`${event.occurredAt} ${identity} ${message}${context}`),
|
|
2825
|
+
...details.map(terminalText)
|
|
2826
|
+
].join("\n");
|
|
2827
|
+
}
|
|
2828
|
+
function parseQuery(args, resource) {
|
|
2829
|
+
const values = {};
|
|
2830
|
+
const switches = /* @__PURE__ */ new Set();
|
|
2831
|
+
const sums = [];
|
|
2832
|
+
let runId;
|
|
2833
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
2834
|
+
const arg = args[index];
|
|
2835
|
+
const equals = arg.indexOf("=");
|
|
2836
|
+
const flag = equals > 0 ? arg.slice(0, equals) : arg;
|
|
2837
|
+
if (VALUE_FLAGS.has(flag)) {
|
|
2838
|
+
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2839
|
+
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2840
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2841
|
+
`${flag} requires a value. Use ${flag} <value>.`
|
|
2842
|
+
);
|
|
2843
|
+
}
|
|
2844
|
+
if (flag === "--sum") sums.push(value);
|
|
2845
|
+
else {
|
|
2846
|
+
if (values[flag] !== void 0) {
|
|
2847
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2848
|
+
`${flag} may only be supplied once.`
|
|
2849
|
+
);
|
|
2850
|
+
}
|
|
2851
|
+
values[flag] = value;
|
|
2852
|
+
}
|
|
2853
|
+
continue;
|
|
2854
|
+
}
|
|
2855
|
+
if (SWITCH_FLAGS.has(flag) && equals < 0) {
|
|
2856
|
+
switches.add(flag);
|
|
2857
|
+
continue;
|
|
2858
|
+
}
|
|
2859
|
+
if (arg.startsWith("-")) {
|
|
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, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2862
|
+
`Unsupported query flag ${flag}. ${correction}`
|
|
2863
|
+
);
|
|
2864
|
+
}
|
|
2865
|
+
if (runId !== void 0) {
|
|
2866
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2867
|
+
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2868
|
+
);
|
|
2869
|
+
}
|
|
2870
|
+
runId = arg;
|
|
2871
|
+
}
|
|
2872
|
+
if (switches.has("--fields")) {
|
|
2873
|
+
if (runId !== void 0) {
|
|
2874
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2875
|
+
"--fields does not use a run ID. Omit the positional run ID."
|
|
2876
|
+
);
|
|
2877
|
+
}
|
|
2878
|
+
const incompatible = [
|
|
2879
|
+
...switches.has("--count") ? ["--count"] : [],
|
|
2880
|
+
...switches.has("--payloads") ? ["--payloads"] : [],
|
|
2881
|
+
...sums.length ? ["--sum"] : [],
|
|
2882
|
+
...Object.keys(values).filter(
|
|
2883
|
+
(flag) => flag !== "--runtime-namespace" && flag !== "--runtime-backend"
|
|
2884
|
+
)
|
|
2885
|
+
];
|
|
2886
|
+
if (incompatible.length) {
|
|
2887
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2888
|
+
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2889
|
+
);
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2893
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2894
|
+
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2895
|
+
);
|
|
2896
|
+
}
|
|
2897
|
+
if (sums.length && switches.has("--count")) {
|
|
2898
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2899
|
+
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2900
|
+
);
|
|
2901
|
+
}
|
|
2902
|
+
const operation = switches.has("--fields") ? "fields" : switches.has("--count") ? "count" : values["--group-by"] !== void 0 || sums.length > 0 ? "summarize" : "list";
|
|
2903
|
+
if (operation === "count") {
|
|
2904
|
+
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2905
|
+
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2906
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2907
|
+
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2908
|
+
);
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
const body = {
|
|
2913
|
+
operation,
|
|
2914
|
+
resource,
|
|
2915
|
+
...runId === void 0 ? {} : { runId }
|
|
2916
|
+
};
|
|
2917
|
+
for (const [flag, key] of [
|
|
2918
|
+
["--since", "since"],
|
|
2919
|
+
["--until", "until"],
|
|
2920
|
+
["--play", "playName"],
|
|
2921
|
+
["--kind", "kind"],
|
|
2922
|
+
["--where", "where"],
|
|
2923
|
+
["--step", "stepId"],
|
|
2924
|
+
["--level", "minLevel"],
|
|
2925
|
+
["--query", "text"],
|
|
2926
|
+
["--cursor", "cursor"]
|
|
2927
|
+
]) {
|
|
2928
|
+
if (values[flag] !== void 0) body[key] = values[flag];
|
|
2929
|
+
}
|
|
2930
|
+
if (values["--limit"] !== void 0) body.limit = Number(values["--limit"]);
|
|
2931
|
+
if (switches.has("--payloads")) body.includePayloads = true;
|
|
2932
|
+
if (operation === "summarize") {
|
|
2933
|
+
body.groupBy = values["--group-by"] === void 0 ? [] : values["--group-by"].split(",").map((field) => field.trim());
|
|
2934
|
+
if (sums.length) {
|
|
2935
|
+
body.measures = [
|
|
2936
|
+
{ op: "count" },
|
|
2937
|
+
...sums.map((field) => ({ op: "sum", field }))
|
|
2938
|
+
];
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
const request = _chunkTH3YBIJTjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
2942
|
+
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
2943
|
+
const backend = values["--runtime-backend"];
|
|
2944
|
+
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
2945
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2946
|
+
"--runtime-backend must be daytona or modal."
|
|
2947
|
+
);
|
|
2948
|
+
}
|
|
2949
|
+
if (backend && !namespace) {
|
|
2950
|
+
throw new (0, _chunkTH3YBIJTjs.RunEventQueryInputError)(
|
|
2951
|
+
"--runtime-backend requires --runtime-namespace."
|
|
2952
|
+
);
|
|
2953
|
+
}
|
|
2954
|
+
return {
|
|
2955
|
+
request,
|
|
2956
|
+
values,
|
|
2957
|
+
sums,
|
|
2958
|
+
...namespace ? {
|
|
2959
|
+
runtime: {
|
|
2960
|
+
environment: "preview",
|
|
2961
|
+
namespace,
|
|
2962
|
+
...backend ? { backend } : {}
|
|
2963
|
+
}
|
|
2964
|
+
} : {}
|
|
2965
|
+
};
|
|
2966
|
+
}
|
|
2967
|
+
function continuation(parsed, query, cursor) {
|
|
2968
|
+
const { request, values, sums, runtime } = parsed;
|
|
2969
|
+
return [
|
|
2970
|
+
`deepline runs ${request.resource}`,
|
|
2971
|
+
...request.runId ? [shellQuote(request.runId)] : [],
|
|
2972
|
+
"--since",
|
|
2973
|
+
shellQuote(String(query.since)),
|
|
2974
|
+
"--until",
|
|
2975
|
+
shellQuote(String(query.until)),
|
|
2976
|
+
...["--play", "--kind", "--where", "--step", "--level", "--query"].flatMap(
|
|
2977
|
+
(flag) => values[flag] === void 0 ? [] : [flag, shellQuote(values[flag])]
|
|
2978
|
+
),
|
|
2979
|
+
...request.operation === "summarize" && values["--group-by"] !== void 0 ? ["--group-by", shellQuote(values["--group-by"])] : [],
|
|
2980
|
+
...sums.flatMap((field) => ["--sum", shellQuote(field)]),
|
|
2981
|
+
...request.operation === "list" && request.includePayloads ? ["--payloads"] : [],
|
|
2982
|
+
...runtime ? ["--runtime-namespace", shellQuote(runtime.namespace)] : [],
|
|
2983
|
+
..._optionalChain([runtime, 'optionalAccess', _24 => _24.backend]) ? ["--runtime-backend", shellQuote(runtime.backend)] : [],
|
|
2984
|
+
"--limit",
|
|
2985
|
+
String("limit" in request ? request.limit : ""),
|
|
2986
|
+
"--cursor",
|
|
2987
|
+
shellQuote(cursor),
|
|
2988
|
+
"--json"
|
|
2989
|
+
].join(" ");
|
|
2990
|
+
}
|
|
2991
|
+
async function handleRunEventQuery(args, resource = "logs") {
|
|
2992
|
+
try {
|
|
2993
|
+
return await executeRunEventQuery(args, resource);
|
|
2994
|
+
} catch (error) {
|
|
2995
|
+
const failure = error instanceof Error ? error : new Error(String(error));
|
|
2996
|
+
const record3 = failure;
|
|
2997
|
+
const status = record3.statusCode;
|
|
2998
|
+
const exitCode = error instanceof _chunkTH3YBIJTjs.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
|
+
const diagnostic = Object.assign(failure, {
|
|
3000
|
+
exitCode,
|
|
3001
|
+
retryable: exitCode === 5
|
|
3002
|
+
});
|
|
3003
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) _chunkYEJMVAD3js.printJsonError.call(void 0, diagnostic);
|
|
3004
|
+
else console.error(`Error: ${diagnostic.message}`);
|
|
3005
|
+
return exitCode;
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
async function executeRunEventQuery(args, resource) {
|
|
3009
|
+
const parsed = parseQuery(args, resource);
|
|
3010
|
+
const { request, runtime } = parsed;
|
|
3011
|
+
const {
|
|
3012
|
+
operation: _operation,
|
|
3013
|
+
resource: _resource,
|
|
3014
|
+
runId,
|
|
3015
|
+
...criteria
|
|
3016
|
+
} = request;
|
|
3017
|
+
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3018
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
3019
|
+
let result;
|
|
3020
|
+
if (request.operation === "fields") {
|
|
3021
|
+
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
3022
|
+
} else if (request.operation === "count") {
|
|
3023
|
+
result = resource === "logs" ? await client.runs.logs.count(runId, options) : await client.runs.events.count({
|
|
3024
|
+
...options,
|
|
3025
|
+
...runId ? { runId } : {}
|
|
3026
|
+
});
|
|
3027
|
+
} else if (request.operation === "summarize") {
|
|
3028
|
+
const summary = {
|
|
3029
|
+
...options,
|
|
3030
|
+
groupBy: request.groupBy,
|
|
3031
|
+
measures: request.measures,
|
|
3032
|
+
limit: request.limit,
|
|
3033
|
+
cursor: request.cursor
|
|
3034
|
+
};
|
|
3035
|
+
result = resource === "logs" ? await client.runs.logs.summarize(runId, summary) : await client.runs.events.summarize({
|
|
3036
|
+
...summary,
|
|
3037
|
+
...runId ? { runId } : {}
|
|
3038
|
+
});
|
|
3039
|
+
} else {
|
|
3040
|
+
result = resource === "logs" ? await client.runs.logs.query(runId, options) : await client.runs.events.list({
|
|
3041
|
+
...options,
|
|
3042
|
+
...runId ? { runId } : {}
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
let lines;
|
|
3046
|
+
let nextPage;
|
|
3047
|
+
if ("fields" in result) {
|
|
3048
|
+
lines = [
|
|
3049
|
+
...result.fields.map(
|
|
3050
|
+
(field) => `${field.field} (${field.type}${field.nullable ? ", optional" : ""}): ${field.operators.join(", ")}${field.summable ? "; sum" : ""}`
|
|
3051
|
+
),
|
|
3052
|
+
`${result.context.field} (${result.context.type}): ${result.context.operators.join(", ")}; sum numeric values`,
|
|
3053
|
+
"Missing fields are distinct from null. Only recorded values match."
|
|
3054
|
+
];
|
|
3055
|
+
} else {
|
|
3056
|
+
if ("matchedCount" in result) {
|
|
3057
|
+
lines = [`${result.matchedCount} matching retained ${resource} (exact).`];
|
|
3058
|
+
} else if ("groups" in result) {
|
|
3059
|
+
lines = result.groups.map(
|
|
3060
|
+
(group) => [
|
|
3061
|
+
...Object.entries(group.keys).map(
|
|
3062
|
+
([field, value]) => `${field}=${typeof value === "object" && value !== null && "missing" in value ? "<missing>" : JSON.stringify(value)}`
|
|
3063
|
+
),
|
|
3064
|
+
...Object.entries(group.measures).map(
|
|
3065
|
+
([name, value]) => `${name}=${value}`
|
|
3066
|
+
)
|
|
3067
|
+
].join(" ")
|
|
3068
|
+
);
|
|
3069
|
+
if (lines.length === 0) lines.push("0 matching retained groups.");
|
|
3070
|
+
} else {
|
|
3071
|
+
const entries = "logs" in result ? result.logs : result.events;
|
|
3072
|
+
lines = entries.map((event) => renderEvent(event, resource));
|
|
3073
|
+
if (lines.length === 0) lines.push(`0 matching retained ${resource}.`);
|
|
3074
|
+
}
|
|
3075
|
+
lines.push(
|
|
3076
|
+
`Retained history since ${result.retention.retainedSince} (${result.retention.retentionDays} days).`
|
|
3077
|
+
);
|
|
3078
|
+
if ("page" in result && result.page.nextCursor) {
|
|
3079
|
+
nextPage = continuation(parsed, result.query, result.page.nextCursor);
|
|
3080
|
+
lines.push(`Next page: ${nextPage}`);
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
3084
|
+
{
|
|
3085
|
+
...result,
|
|
3086
|
+
...nextPage ? { next: { page: nextPage } } : {},
|
|
3087
|
+
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3088
|
+
},
|
|
3089
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3090
|
+
` }
|
|
3091
|
+
);
|
|
3092
|
+
return 0;
|
|
3093
|
+
}
|
|
3094
|
+
function registerRunEventsCommand(runs) {
|
|
3095
|
+
const command = runs.command("events [runId]").description("Query, count or summarize retained run events.").option("--since <time>", "Inclusive UTC time or lookback such as 1h").option("--until <time>", "Exclusive UTC time").option("--play <name>", "Exact Play name").option("--kind <kind>", "Exact event kind").option("--where <filter>", "Typed comparisons with &&, || and parentheses").option("--step <id>", "Exact authored step ID").option("--level <level>", "Minimum severity: debug, info, warn or error").option("--query <text>", "Literal text in the full retained log message").option("--count", "Exact retained count; no limit, cursor or payloads").option("--group-by <fields>", "Count groups by comma-separated fields").option(
|
|
3096
|
+
"--sum <field>",
|
|
3097
|
+
"Count and sum numeric values; repeatable, optionally grouped",
|
|
3098
|
+
(field, previous) => [...previous, field],
|
|
3099
|
+
[]
|
|
3100
|
+
).option("--fields", "Discover filter fields, types and operators").option("--limit <count>", "Rows or groups per page (maximum 200)").option("--cursor <token>", "Continue the exact preceding query").option("--payloads", "Include saved details: at most 10 events and 16 MiB").option("--json", "JSON output; automatic when piped").addOption(
|
|
3101
|
+
new (0, _commander.Option)(
|
|
3102
|
+
"--runtime-namespace <name>",
|
|
3103
|
+
"Authorized Preview namespace"
|
|
3104
|
+
).hideHelp()
|
|
3105
|
+
).addOption(
|
|
3106
|
+
new (0, _commander.Option)(
|
|
3107
|
+
"--runtime-backend <backend>",
|
|
3108
|
+
"Preview backend: daytona or modal"
|
|
3109
|
+
).hideHelp()
|
|
3110
|
+
).addHelpText(
|
|
3111
|
+
"after",
|
|
3112
|
+
"\nExamples:\n deepline runs events --kind step.failed --since 1h --json\n deepline runs events --group-by kind --since 1h --json\n deepline runs events --fields --json\n"
|
|
3113
|
+
).action(async (runId, options) => {
|
|
3114
|
+
const args = runId ? [runId] : [];
|
|
3115
|
+
for (const [key, flag] of [
|
|
3116
|
+
["since", "--since"],
|
|
3117
|
+
["until", "--until"],
|
|
3118
|
+
["play", "--play"],
|
|
3119
|
+
["kind", "--kind"],
|
|
3120
|
+
["where", "--where"],
|
|
3121
|
+
["step", "--step"],
|
|
3122
|
+
["level", "--level"],
|
|
3123
|
+
["query", "--query"],
|
|
3124
|
+
["groupBy", "--group-by"],
|
|
3125
|
+
["limit", "--limit"],
|
|
3126
|
+
["cursor", "--cursor"],
|
|
3127
|
+
["runtimeNamespace", "--runtime-namespace"],
|
|
3128
|
+
["runtimeBackend", "--runtime-backend"]
|
|
3129
|
+
]) {
|
|
3130
|
+
if (options[key] !== void 0) args.push(flag, options[key]);
|
|
3131
|
+
}
|
|
3132
|
+
for (const field of _nullishCoalesce(options.sum, () => ( []))) args.push("--sum", field);
|
|
3133
|
+
for (const flag of ["count", "fields", "payloads", "json"]) {
|
|
3134
|
+
if (options[flag]) args.push(`--${flag}`);
|
|
3135
|
+
}
|
|
3136
|
+
process.exitCode = await handleRunEventQuery(args, "events");
|
|
3137
|
+
});
|
|
3138
|
+
configureRunQueryCommandErrors(command, "events");
|
|
3139
|
+
}
|
|
3140
|
+
|
|
2748
3141
|
// ../play-runtime/run-execution-state.ts
|
|
2749
3142
|
function assertNeverState(value, what) {
|
|
2750
3143
|
throw new Error(`Unhandled ${what}: ${JSON.stringify(value)}`);
|
|
@@ -2785,7 +3178,7 @@ function deriveRunExecutionState(input) {
|
|
|
2785
3178
|
return {
|
|
2786
3179
|
kind: "failed",
|
|
2787
3180
|
rows,
|
|
2788
|
-
error: _optionalChain([input, 'access',
|
|
3181
|
+
error: _optionalChain([input, 'access', _25 => _25.error, 'optionalAccess', _26 => _26.trim, 'call', _27 => _27()]) ? input.error.trim() : null
|
|
2789
3182
|
};
|
|
2790
3183
|
case "cancelled":
|
|
2791
3184
|
return { kind: "cancelled", rows };
|
|
@@ -2804,7 +3197,7 @@ function runExecutionLabel(state) {
|
|
|
2804
3197
|
case "waiting":
|
|
2805
3198
|
return state.overdue ? { tone: "waiting_overdue", word: "Waiting past its deadline" } : { tone: "waiting", word: "Waiting" };
|
|
2806
3199
|
case "completed":
|
|
2807
|
-
return (_nullishCoalesce(_optionalChain([state, 'access',
|
|
3200
|
+
return (_nullishCoalesce(_optionalChain([state, 'access', _28 => _28.rows, 'optionalAccess', _29 => _29.failed]), () => ( 0))) > 0 ? { tone: "partial", word: "Completed, some rows failed" } : { tone: "completed", word: "Completed" };
|
|
2808
3201
|
case "failed":
|
|
2809
3202
|
return { tone: "failed", word: "Failed" };
|
|
2810
3203
|
case "cancelled":
|
|
@@ -2824,8 +3217,8 @@ function deriveNodeExecutionState(input) {
|
|
|
2824
3217
|
const run = decodeRunStatus(input.runStatus);
|
|
2825
3218
|
const runTerminal = run === "completed" || run === "failed" || run === "cancelled";
|
|
2826
3219
|
const reported = _nullishCoalesce(input.reported, () => ( null));
|
|
2827
|
-
const rows = input.rows !== void 0 ? input.rows : rowCountsFrom(_nullishCoalesce(_optionalChain([reported, 'optionalAccess',
|
|
2828
|
-
const status = _nullishCoalesce(_optionalChain([reported, 'optionalAccess',
|
|
3220
|
+
const rows = input.rows !== void 0 ? input.rows : rowCountsFrom(_nullishCoalesce(_optionalChain([reported, 'optionalAccess', _30 => _30.progress]), () => ( null)));
|
|
3221
|
+
const status = _nullishCoalesce(_optionalChain([reported, 'optionalAccess', _31 => _31.status]), () => ( "idle"));
|
|
2829
3222
|
const runStop = stopCauseForRun(run);
|
|
2830
3223
|
switch (status) {
|
|
2831
3224
|
case "running": {
|
|
@@ -2833,7 +3226,7 @@ function deriveNodeExecutionState(input) {
|
|
|
2833
3226
|
return {
|
|
2834
3227
|
kind: "running",
|
|
2835
3228
|
rows,
|
|
2836
|
-
startedAt: typeof _optionalChain([reported, 'optionalAccess',
|
|
3229
|
+
startedAt: typeof _optionalChain([reported, 'optionalAccess', _32 => _32.startedAt]) === "number" ? reported.startedAt : null
|
|
2837
3230
|
};
|
|
2838
3231
|
}
|
|
2839
3232
|
return runStop ? { kind: "stopped", rows, cause: runStop } : { kind: "completed", rows };
|
|
@@ -2843,7 +3236,7 @@ function deriveNodeExecutionState(input) {
|
|
|
2843
3236
|
case "skipped":
|
|
2844
3237
|
return { kind: "skipped" };
|
|
2845
3238
|
case "failed": {
|
|
2846
|
-
if (_optionalChain([reported, 'optionalAccess',
|
|
3239
|
+
if (_optionalChain([reported, 'optionalAccess', _33 => _33.stoppedBy])) {
|
|
2847
3240
|
return { kind: "stopped", rows, cause: reported.stoppedBy };
|
|
2848
3241
|
}
|
|
2849
3242
|
if (run === "cancelled") {
|
|
@@ -2852,7 +3245,7 @@ function deriveNodeExecutionState(input) {
|
|
|
2852
3245
|
return {
|
|
2853
3246
|
kind: "failed",
|
|
2854
3247
|
rows,
|
|
2855
|
-
error: _optionalChain([reported, 'optionalAccess',
|
|
3248
|
+
error: _optionalChain([reported, 'optionalAccess', _34 => _34.error, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()]) ? reported.error.trim() : null
|
|
2856
3249
|
};
|
|
2857
3250
|
}
|
|
2858
3251
|
default: {
|
|
@@ -2907,7 +3300,7 @@ function partialCount(rows) {
|
|
|
2907
3300
|
return settledCount(rows);
|
|
2908
3301
|
}
|
|
2909
3302
|
function nodeExecutionLabel(state) {
|
|
2910
|
-
const failedRows = _nullishCoalesce(_optionalChain([stateRows, 'call',
|
|
3303
|
+
const failedRows = _nullishCoalesce(_optionalChain([stateRows, 'call', _37 => _37(state), 'optionalAccess', _38 => _38.failed]), () => ( 0));
|
|
2911
3304
|
switch (state.kind) {
|
|
2912
3305
|
case "queued":
|
|
2913
3306
|
return { tone: "queued", word: "Queued", count: null, failedRows };
|
|
@@ -3160,10 +3553,10 @@ function datasetSummary(value, conflictingPopulation) {
|
|
|
3160
3553
|
return {
|
|
3161
3554
|
...other,
|
|
3162
3555
|
reportedPopulation: {
|
|
3163
|
-
totalRows: _nullishCoalesce(_nullishCoalesce(total_rows, () => ( _optionalChain([record, 'call',
|
|
3164
|
-
persistedRows: _nullishCoalesce(_optionalChain([record, 'call',
|
|
3165
|
-
succeededRows: _nullishCoalesce(_optionalChain([record, 'call',
|
|
3166
|
-
failedRows: _nullishCoalesce(_optionalChain([record, 'call',
|
|
3556
|
+
totalRows: _nullishCoalesce(_nullishCoalesce(total_rows, () => ( _optionalChain([record, 'call', _39 => _39(rowCounts), 'optionalAccess', _40 => _40.persisted]))), () => ( null)),
|
|
3557
|
+
persistedRows: _nullishCoalesce(_optionalChain([record, 'call', _41 => _41(rowCounts), 'optionalAccess', _42 => _42.persisted]), () => ( null)),
|
|
3558
|
+
succeededRows: _nullishCoalesce(_optionalChain([record, 'call', _43 => _43(rowCounts), 'optionalAccess', _44 => _44.succeeded]), () => ( null)),
|
|
3559
|
+
failedRows: _nullishCoalesce(_optionalChain([record, 'call', _45 => _45(rowCounts), 'optionalAccess', _46 => _46.failed]), () => ( null))
|
|
3167
3560
|
},
|
|
3168
3561
|
coverage: conflictingPopulation ? "conflicting" : "unknown",
|
|
3169
3562
|
...columns ? {
|
|
@@ -3208,7 +3601,7 @@ function stepExecution(step, runStatus) {
|
|
|
3208
3601
|
const decoded = decodeNodeExecutionState(step.execution);
|
|
3209
3602
|
if (decoded) return decoded;
|
|
3210
3603
|
const progress = record(step.progress);
|
|
3211
|
-
const completed = typeof _optionalChain([progress, 'optionalAccess',
|
|
3604
|
+
const completed = typeof _optionalChain([progress, 'optionalAccess', _47 => _47.executed]) === "number" ? progress.executed + (typeof progress.reused === "number" ? progress.reused : 0) : _optionalChain([progress, 'optionalAccess', _48 => _48.completedRows]);
|
|
3212
3605
|
return deriveNodeExecutionState({
|
|
3213
3606
|
reported: {
|
|
3214
3607
|
status: typeof step.status === "string" ? step.status : "idle",
|
|
@@ -3230,12 +3623,12 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3230
3623
|
);
|
|
3231
3624
|
}
|
|
3232
3625
|
const outputs = Object.entries(pkg.outputs);
|
|
3233
|
-
const resultPackage = _optionalChain([fullStatus, 'optionalAccess',
|
|
3626
|
+
const resultPackage = _optionalChain([fullStatus, 'optionalAccess', _49 => _49.package, 'optionalAccess', _50 => _50.resultState]) ? fullStatus.package : pkg;
|
|
3234
3627
|
const warnings = [..._nullishCoalesce(pkg.warnings, () => ( []))];
|
|
3235
3628
|
const { outcome: _outcome, ...run } = pkg.run;
|
|
3236
3629
|
const steps = pkg.steps.map((step) => {
|
|
3237
3630
|
const timing = record(step.timing);
|
|
3238
|
-
const started = _optionalChain([timing, 'optionalAccess',
|
|
3631
|
+
const started = _optionalChain([timing, 'optionalAccess', _51 => _51.startedAt]), finished = _optionalChain([timing, 'optionalAccess', _52 => _52.completedAt]);
|
|
3239
3632
|
const execution = stepExecution(step, pkg.run.status);
|
|
3240
3633
|
return {
|
|
3241
3634
|
id: step.id,
|
|
@@ -3273,9 +3666,9 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3273
3666
|
const output = record(candidate.output);
|
|
3274
3667
|
return output && (dataset.datasetId ? output.datasetId === dataset.datasetId : output.path === dataset.path);
|
|
3275
3668
|
});
|
|
3276
|
-
const stepOutput = record(_optionalChain([step, 'optionalAccess',
|
|
3277
|
-
const preview = _nullishCoalesce(record(_optionalChain([stepOutput, 'optionalAccess',
|
|
3278
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
3669
|
+
const stepOutput = record(_optionalChain([step, 'optionalAccess', _53 => _53.output]));
|
|
3670
|
+
const preview = _nullishCoalesce(record(_optionalChain([stepOutput, 'optionalAccess', _54 => _54.preview])), () => ( dataset.preview));
|
|
3671
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _55 => _55.rows])) ? preview.rows.map((row) => {
|
|
3279
3672
|
const fields2 = record(row);
|
|
3280
3673
|
return fields2 ? Object.fromEntries(
|
|
3281
3674
|
Object.entries(fields2).filter(([name]) => !name.startsWith("_")).map(([name, value]) => [
|
|
@@ -3284,27 +3677,27 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3284
3677
|
])
|
|
3285
3678
|
) : row;
|
|
3286
3679
|
}) : [];
|
|
3287
|
-
const total = typeof _optionalChain([preview, 'optionalAccess',
|
|
3680
|
+
const total = typeof _optionalChain([preview, 'optionalAccess', _56 => _56.totalRows]) === "number" ? preview.totalRows : dataset.rowCount;
|
|
3288
3681
|
const named = outputs.filter(
|
|
3289
3682
|
([, value]) => value.kind === "dataset" && (dataset.datasetId ? value.datasetId === dataset.datasetId : value.path === dataset.path)
|
|
3290
3683
|
);
|
|
3291
|
-
const summary = record(_nullishCoalesce(_optionalChain([record, 'call',
|
|
3292
|
-
const rowCounts = record(_optionalChain([summary, 'optionalAccess',
|
|
3293
|
-
const progress = record(_optionalChain([step, 'optionalAccess',
|
|
3294
|
-
const countConflict = typeof _optionalChain([rowCounts, 'optionalAccess',
|
|
3684
|
+
const summary = record(_nullishCoalesce(_optionalChain([record, 'call', _57 => _57(dataset), 'optionalAccess', _58 => _58.summary]), () => ( _optionalChain([stepOutput, 'optionalAccess', _59 => _59.summary]))));
|
|
3685
|
+
const rowCounts = record(_optionalChain([summary, 'optionalAccess', _60 => _60.rowCounts]));
|
|
3686
|
+
const progress = record(_optionalChain([step, 'optionalAccess', _61 => _61.progress]));
|
|
3687
|
+
const countConflict = typeof _optionalChain([rowCounts, 'optionalAccess', _62 => _62.persisted]) === "number" && typeof dataset.rowCount === "number" && rowCounts.persisted !== dataset.rowCount || typeof _optionalChain([rowCounts, 'optionalAccess', _63 => _63.failed]) === "number" && typeof _optionalChain([progress, 'optionalAccess', _64 => _64.failed]) === "number" && rowCounts.failed !== progress.failed;
|
|
3295
3688
|
if (countConflict)
|
|
3296
3689
|
warnings.push(
|
|
3297
3690
|
`Output ${dataset.path}: dataset summary and step/row counts disagree. Column execution counts may cover only a subset; inspect step progress and exported rows.`
|
|
3298
3691
|
);
|
|
3299
3692
|
return {
|
|
3300
3693
|
datasetId: dataset.datasetId,
|
|
3301
|
-
name: _nullishCoalesce(dataset.tableNamespace, () => ( (typeof _optionalChain([stepOutput, 'optionalAccess',
|
|
3302
|
-
stepId: _nullishCoalesce(_optionalChain([step, 'optionalAccess',
|
|
3694
|
+
name: _nullishCoalesce(dataset.tableNamespace, () => ( (typeof _optionalChain([stepOutput, 'optionalAccess', _65 => _65.tableNamespace]) === "string" ? stepOutput.tableNamespace : dataset.path))),
|
|
3695
|
+
stepId: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _66 => _66.id]), () => ( _optionalChain([named, 'access', _67 => _67[0], 'optionalAccess', _68 => _68[1], 'access', _69 => _69.stepId]))),
|
|
3303
3696
|
rowCount: _nullishCoalesce(dataset.rowCount, () => ( null)),
|
|
3304
3697
|
...dataset.lifecycle ? { lifecycle: dataset.lifecycle } : {},
|
|
3305
3698
|
summary: datasetSummary(summary, countConflict),
|
|
3306
3699
|
storage: {
|
|
3307
|
-
..._optionalChain([dataset, 'access',
|
|
3700
|
+
..._optionalChain([dataset, 'access', _70 => _70.sqlQualifiedTableName, 'optionalAccess', _71 => _71.includes, 'call', _72 => _72(".")]) ? {
|
|
3308
3701
|
schema: dataset.sqlQualifiedTableName.slice(0, dataset.sqlQualifiedTableName.lastIndexOf(".")).replace(/^"(.*)"$/, "$1").replace(/""/g, '"')
|
|
3309
3702
|
} : {},
|
|
3310
3703
|
table: dataset.sqlTableName
|
|
@@ -3314,7 +3707,7 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3314
3707
|
availability: rows.length ? "available" : total === 0 ? "empty" : "unavailable",
|
|
3315
3708
|
returnedRows: rows.length,
|
|
3316
3709
|
totalRows: _nullishCoalesce(total, () => ( null)),
|
|
3317
|
-
partial: _optionalChain([preview, 'optionalAccess',
|
|
3710
|
+
partial: _optionalChain([preview, 'optionalAccess', _73 => _73.truncated]) === true || total === void 0 || rows.length < total,
|
|
3318
3711
|
rows
|
|
3319
3712
|
},
|
|
3320
3713
|
...dataset.exportUnavailable ? { exportUnavailable: dataset.exportUnavailable } : {},
|
|
@@ -3333,7 +3726,7 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3333
3726
|
failures: {
|
|
3334
3727
|
steps: steps.flatMap((step) => {
|
|
3335
3728
|
const progress = record(step.progress);
|
|
3336
|
-
const failedRows = typeof _optionalChain([progress, 'optionalAccess',
|
|
3729
|
+
const failedRows = typeof _optionalChain([progress, 'optionalAccess', _74 => _74.failed]) === "number" ? progress.failed : void 0;
|
|
3337
3730
|
return step.execution.kind === "failed" || step.error && step.execution.kind !== "stopped" || failedRows !== void 0 && failedRows > 0 ? [
|
|
3338
3731
|
{
|
|
3339
3732
|
stepId: step.id,
|
|
@@ -3347,10 +3740,10 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3347
3740
|
},
|
|
3348
3741
|
errorDetails: {
|
|
3349
3742
|
coverage: "unknown",
|
|
3350
|
-
reported: _nullishCoalesce(_nullishCoalesce(_optionalChain([record, 'call',
|
|
3743
|
+
reported: _nullishCoalesce(_nullishCoalesce(_optionalChain([record, 'call', _75 => _75(pkg), 'optionalAccess', _76 => _76.errors]), () => ( _optionalChain([record, 'call', _77 => _77(status), 'optionalAccess', _78 => _78.errors]))), () => ( [])),
|
|
3351
3744
|
...pkg.run.error ? { run: pkg.run.error } : {},
|
|
3352
3745
|
steps: steps.filter((step) => step.error).map((step) => ({ stepId: step.id, message: step.error })),
|
|
3353
|
-
..._optionalChain([pkg, 'access',
|
|
3746
|
+
..._optionalChain([pkg, 'access', _79 => _79.next, 'optionalAccess', _80 => _80.logs]) ? { getMore: "actions.getLogsCmd" } : {}
|
|
3354
3747
|
},
|
|
3355
3748
|
rowOutcomes: status.rowOutcomes,
|
|
3356
3749
|
warnings,
|
|
@@ -3367,15 +3760,15 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3367
3760
|
logs: "getLogsCmd"
|
|
3368
3761
|
}),
|
|
3369
3762
|
...receiptAction(pkg.run.id),
|
|
3370
|
-
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access',
|
|
3763
|
+
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access', _81 => _81.actions, 'optionalAccess', _82 => _82.exportCsv])) ? {
|
|
3371
3764
|
exportDatasetCmds: uniqueCatalog.flatMap((dataset) => {
|
|
3372
|
-
const command = _optionalChain([dataset, 'access',
|
|
3765
|
+
const command = _optionalChain([dataset, 'access', _83 => _83.actions, 'optionalAccess', _84 => _84.exportCsv, 'optionalAccess', _85 => _85.command]);
|
|
3373
3766
|
return command && !dataset.exportUnavailable ? [command] : [];
|
|
3374
3767
|
})
|
|
3375
3768
|
} : {},
|
|
3376
|
-
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access',
|
|
3769
|
+
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access', _86 => _86.actions, 'optionalAccess', _87 => _87.query])) ? {
|
|
3377
3770
|
queryTableSqlCmds: uniqueCatalog.flatMap(
|
|
3378
|
-
(dataset) => _optionalChain([dataset, 'access',
|
|
3771
|
+
(dataset) => _optionalChain([dataset, 'access', _88 => _88.actions, 'optionalAccess', _89 => _89.query, 'optionalAccess', _90 => _90.command]) ? [dataset.actions.query.command] : []
|
|
3379
3772
|
)
|
|
3380
3773
|
} : {}
|
|
3381
3774
|
},
|
|
@@ -3396,7 +3789,7 @@ function receiptAction(id) {
|
|
|
3396
3789
|
};
|
|
3397
3790
|
}
|
|
3398
3791
|
function buildRunNavigation(status) {
|
|
3399
|
-
if (!_optionalChain([status, 'access',
|
|
3792
|
+
if (!_optionalChain([status, 'access', _91 => _91.package, 'optionalAccess', _92 => _92.run]) || !status.package.steps || !status.package.outputs) {
|
|
3400
3793
|
const id = status.runId;
|
|
3401
3794
|
return {
|
|
3402
3795
|
run: {
|
|
@@ -3435,7 +3828,7 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3435
3828
|
const { result } = outcome;
|
|
3436
3829
|
const raw = result;
|
|
3437
3830
|
const contract = record2(raw.authoringContract);
|
|
3438
|
-
const pipeline = record2(_nullishCoalesce(result.staticPipeline, () => ( _optionalChain([contract, 'optionalAccess',
|
|
3831
|
+
const pipeline = record2(_nullishCoalesce(result.staticPipeline, () => ( _optionalChain([contract, 'optionalAccess', _93 => _93.staticPipeline]))));
|
|
3439
3832
|
const { inputs, outputs, triggers, tools, ...recognized } = _nullishCoalesce(result.recognized, () => ( {}));
|
|
3440
3833
|
const issues = [..._nullishCoalesce(result.issues, () => ( []))];
|
|
3441
3834
|
for (const [severity, messages] of [
|
|
@@ -3444,7 +3837,7 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3444
3837
|
]) {
|
|
3445
3838
|
for (const message of messages) {
|
|
3446
3839
|
if (!issues.some(
|
|
3447
|
-
(issue) => issue.severity === severity && (issue.message.trim() === message.trim() || [issue.message.trim(), _optionalChain([issue, 'access',
|
|
3840
|
+
(issue) => issue.severity === severity && (issue.message.trim() === message.trim() || [issue.message.trim(), _optionalChain([issue, 'access', _94 => _94.hint, 'optionalAccess', _95 => _95.trim, 'call', _96 => _96()])].filter(Boolean).join(" ") === message.trim())
|
|
3448
3841
|
)) {
|
|
3449
3842
|
issues.push({ severity, message, code: "check_diagnostic" });
|
|
3450
3843
|
}
|
|
@@ -3486,18 +3879,18 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3486
3879
|
valid: result.valid,
|
|
3487
3880
|
...outcome.stage ? { stage: outcome.stage } : {},
|
|
3488
3881
|
issues,
|
|
3489
|
-
..._optionalChain([contract, 'optionalAccess',
|
|
3882
|
+
..._optionalChain([contract, 'optionalAccess', _97 => _97.inputSchema]) ? { inputSchema: contract.inputSchema } : {},
|
|
3490
3883
|
recognized: {
|
|
3491
3884
|
...recognized,
|
|
3492
3885
|
...inputs ? { rowInputs: inputs } : {},
|
|
3493
|
-
..._optionalChain([pipeline, 'optionalAccess',
|
|
3886
|
+
..._optionalChain([pipeline, 'optionalAccess', _98 => _98.returnFields]) ? { outputs: pipeline.returnFields } : outputs ? { outputs } : {},
|
|
3494
3887
|
tools: { names: _nullishCoalesce(tools, () => ( [])), coverage: "statically_recognized_only" }
|
|
3495
3888
|
},
|
|
3496
3889
|
..._nullishCoalesce(result.triggers, () => ( triggers)) ? { triggers: _nullishCoalesce(result.triggers, () => ( triggers)) } : {},
|
|
3497
3890
|
...result.runtimeLimit ? { runtimeLimit: result.runtimeLimit } : {},
|
|
3498
3891
|
...result.limits ? { limits: result.limits } : {},
|
|
3499
|
-
..._optionalChain([result, 'access',
|
|
3500
|
-
..._optionalChain([result, 'access',
|
|
3892
|
+
..._optionalChain([result, 'access', _99 => _99.featureFlags, 'optionalAccess', _100 => _100.length]) ? { featureFlags: result.featureFlags } : {},
|
|
3893
|
+
..._optionalChain([result, 'access', _101 => _101.toolGetterHints, 'optionalAccess', _102 => _102.length]) ? { toolGetterHints: result.toolGetterHints } : {},
|
|
3501
3894
|
...result.sourceHash ? { sourceHash: result.sourceHash } : {},
|
|
3502
3895
|
...result.artifactHash ? { artifactHash: result.artifactHash } : {},
|
|
3503
3896
|
...result.graphHash ? { graphHash: result.graphHash } : {},
|
|
@@ -3506,12 +3899,12 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3506
3899
|
}
|
|
3507
3900
|
function checkedRunExample(plays, target) {
|
|
3508
3901
|
const play = plays.find((item) => item.exportName === "default");
|
|
3509
|
-
const schema = record2(_optionalChain([play, 'optionalAccess',
|
|
3510
|
-
if (!_optionalChain([play, 'optionalAccess',
|
|
3902
|
+
const schema = record2(_optionalChain([play, 'optionalAccess', _103 => _103.inputSchema]));
|
|
3903
|
+
if (!_optionalChain([play, 'optionalAccess', _104 => _104.valid]) || !schema) return void 0;
|
|
3511
3904
|
const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
3512
3905
|
const base = `deepline plays run --file ${quote(target)}`;
|
|
3513
3906
|
return {
|
|
3514
|
-
command: `${base}${
|
|
3907
|
+
command: `${base}${_chunkTH3YBIJTjs.playInputExampleArgs.call(void 0, schema)} --json`,
|
|
3515
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."
|
|
3516
3909
|
};
|
|
3517
3910
|
}
|
|
@@ -3570,7 +3963,7 @@ var _promises = require('fs/promises');
|
|
|
3570
3963
|
|
|
3571
3964
|
|
|
3572
3965
|
var _path = require('path');
|
|
3573
|
-
|
|
3966
|
+
|
|
3574
3967
|
|
|
3575
3968
|
// src/cli/commands/plays/bootstrap.ts
|
|
3576
3969
|
|
|
@@ -4207,7 +4600,7 @@ function packagedCsvPathForPlay(csvPath) {
|
|
|
4207
4600
|
return portablePath.startsWith(".") ? portablePath : `./${portablePath}`;
|
|
4208
4601
|
}
|
|
4209
4602
|
function getterNamesFromTool(tool, kind) {
|
|
4210
|
-
const usageGuidance = isRecord(_optionalChain([tool, 'optionalAccess',
|
|
4603
|
+
const usageGuidance = isRecord(_optionalChain([tool, 'optionalAccess', _105 => _105.usageGuidance])) ? tool.usageGuidance : {};
|
|
4211
4604
|
const resultGuidance = isRecord(usageGuidance.toolExecutionResult) ? usageGuidance.toolExecutionResult : isRecord(usageGuidance.tool_execution_result) ? usageGuidance.tool_execution_result : {};
|
|
4212
4605
|
const key = kind === "list" ? "extractedLists" : "extractedValues";
|
|
4213
4606
|
const snakeKey = kind === "list" ? "extracted_lists" : "extracted_values";
|
|
@@ -4230,7 +4623,7 @@ function listRowCandidateKeysFromTool(tool) {
|
|
|
4230
4623
|
const keys = /* @__PURE__ */ new Set();
|
|
4231
4624
|
for (const paths of Object.values(targetGettersFromTool(tool))) {
|
|
4232
4625
|
for (const path of paths) {
|
|
4233
|
-
const key = _optionalChain([path, 'access',
|
|
4626
|
+
const key = _optionalChain([path, 'access', _106 => _106.replace, 'call', _107 => _107(/\[(?:\*|\d+)\]/g, ""), 'access', _108 => _108.split, 'call', _109 => _109(/[.[\]]/, 1), 'access', _110 => _110[0], 'optionalAccess', _111 => _111.trim, 'call', _112 => _112()]);
|
|
4234
4627
|
if (key) keys.add(key);
|
|
4235
4628
|
}
|
|
4236
4629
|
}
|
|
@@ -4310,7 +4703,7 @@ function renderFinderPlayResultType(input) {
|
|
|
4310
4703
|
function generatedFinderPlayResultTypes(input) {
|
|
4311
4704
|
return ["email_finder", "phone_finder"].flatMap((finder) => {
|
|
4312
4705
|
const stage = finderStage(input.options, finder);
|
|
4313
|
-
if (_optionalChain([stage, 'optionalAccess',
|
|
4706
|
+
if (_optionalChain([stage, 'optionalAccess', _113 => _113.kind]) !== "play") return [];
|
|
4314
4707
|
const typeDefinition = renderFinderPlayResultType({
|
|
4315
4708
|
finder,
|
|
4316
4709
|
play: input.finderPlays[finder]
|
|
@@ -4384,8 +4777,8 @@ ${indent.slice(2)}}`;
|
|
|
4384
4777
|
}
|
|
4385
4778
|
function generateSourceProviderInputObject(input) {
|
|
4386
4779
|
const { tool, indent, label, entity } = input;
|
|
4387
|
-
const properties = inputPropertyNames(_optionalChain([tool, 'optionalAccess',
|
|
4388
|
-
const details = schemaFieldDetails(_optionalChain([tool, 'optionalAccess',
|
|
4780
|
+
const properties = inputPropertyNames(_optionalChain([tool, 'optionalAccess', _114 => _114.inputSchema]));
|
|
4781
|
+
const details = schemaFieldDetails(_optionalChain([tool, 'optionalAccess', _115 => _115.inputSchema]));
|
|
4389
4782
|
const required = details.required;
|
|
4390
4783
|
const includeOptional = properties.length === 0 ? ["query", "title", "domain", "limit"] : properties.filter(
|
|
4391
4784
|
(field) => [
|
|
@@ -4459,7 +4852,7 @@ ${lines.join("\n")}
|
|
|
4459
4852
|
${indent.slice(2)}}`;
|
|
4460
4853
|
}
|
|
4461
4854
|
function requiredPlayInputFields(play) {
|
|
4462
|
-
const schema = _optionalChain([play, 'optionalAccess',
|
|
4855
|
+
const schema = _optionalChain([play, 'optionalAccess', _116 => _116.inputSchema]);
|
|
4463
4856
|
if (!isRecord(schema)) return [];
|
|
4464
4857
|
if (Array.isArray(schema.required)) {
|
|
4465
4858
|
return schema.required.filter(
|
|
@@ -4480,10 +4873,10 @@ function sourcePlayRef(options) {
|
|
|
4480
4873
|
return options.from.kind === "play" ? options.from.value : null;
|
|
4481
4874
|
}
|
|
4482
4875
|
function stagePlayRef(stage) {
|
|
4483
|
-
return _optionalChain([stage, 'optionalAccess',
|
|
4876
|
+
return _optionalChain([stage, 'optionalAccess', _117 => _117.kind]) === "play" ? stage.value : null;
|
|
4484
4877
|
}
|
|
4485
4878
|
function stageProviders(stage) {
|
|
4486
|
-
return _optionalChain([stage, 'optionalAccess',
|
|
4879
|
+
return _optionalChain([stage, 'optionalAccess', _118 => _118.kind]) === "providers" ? stage.values : [];
|
|
4487
4880
|
}
|
|
4488
4881
|
function finderStage(options, finder) {
|
|
4489
4882
|
return finder === "email_finder" ? options.email : options.phone;
|
|
@@ -4523,12 +4916,12 @@ function fieldsFromSchemaDetails(input) {
|
|
|
4523
4916
|
];
|
|
4524
4917
|
}
|
|
4525
4918
|
function schemaFieldsForStage(stage, input) {
|
|
4526
|
-
switch (_optionalChain([stage, 'optionalAccess',
|
|
4919
|
+
switch (_optionalChain([stage, 'optionalAccess', _119 => _119.kind])) {
|
|
4527
4920
|
case void 0:
|
|
4528
4921
|
return [];
|
|
4529
4922
|
case "play":
|
|
4530
4923
|
return fieldsFromSchemaDetails({
|
|
4531
|
-
details: schemaFieldDetails(_optionalChain([input, 'access',
|
|
4924
|
+
details: schemaFieldDetails(_optionalChain([input, 'access', _120 => _120.play, 'optionalAccess', _121 => _121.inputSchema])),
|
|
4532
4925
|
fallbackFields: input.fallbackFields
|
|
4533
4926
|
});
|
|
4534
4927
|
case "providers":
|
|
@@ -4553,7 +4946,7 @@ function sourceRowTypeDefinition(input) {
|
|
|
4553
4946
|
comment: "Candidate source row keys from described list getters; confirm the actual provider keys with source_*.extractedLists.*.keys before mapping."
|
|
4554
4947
|
});
|
|
4555
4948
|
case "play": {
|
|
4556
|
-
const details = schemaFieldDetails(_optionalChain([input, 'access',
|
|
4949
|
+
const details = schemaFieldDetails(_optionalChain([input, 'access', _122 => _122.sourcePlay, 'optionalAccess', _123 => _123.outputSchema]));
|
|
4557
4950
|
return renderPartialRowType({
|
|
4558
4951
|
typeName: input.sourceTypeName,
|
|
4559
4952
|
fields: [...details.required, ...details.optional].sort(),
|
|
@@ -4579,7 +4972,7 @@ function contactBridgeRowTypeDefinition(input) {
|
|
|
4579
4972
|
typeName: "ContactSourceRow",
|
|
4580
4973
|
fields: [
|
|
4581
4974
|
.../* @__PURE__ */ new Set([
|
|
4582
|
-
...inputPropertyNames(_optionalChain([input, 'access',
|
|
4975
|
+
...inputPropertyNames(_optionalChain([input, 'access', _124 => _124.peoplePlay, 'optionalAccess', _125 => _125.outputSchema])),
|
|
4583
4976
|
...emailFields,
|
|
4584
4977
|
...phoneFields
|
|
4585
4978
|
])
|
|
@@ -4616,7 +5009,7 @@ function validateBootstrapRoutes(input) {
|
|
|
4616
5009
|
);
|
|
4617
5010
|
}
|
|
4618
5011
|
}
|
|
4619
|
-
if (_optionalChain([input, 'access',
|
|
5012
|
+
if (_optionalChain([input, 'access', _126 => _126.options, 'access', _127 => _127.people, 'optionalAccess', _128 => _128.kind]) === "providers") {
|
|
4620
5013
|
throw new PlayBootstrapValidationError(
|
|
4621
5014
|
"Company-to-people bootstrap only accepts --people play:<play-ref> for now. Providers are too task-specific; choose or create a people play so the generated file can show the mapping contract."
|
|
4622
5015
|
);
|
|
@@ -4655,13 +5048,13 @@ function staticPipelineSubsteps(pipeline) {
|
|
|
4655
5048
|
];
|
|
4656
5049
|
}
|
|
4657
5050
|
function playUsesMapBackedRuntime(play) {
|
|
4658
|
-
const pipeline = _optionalChain([play, 'optionalAccess',
|
|
5051
|
+
const pipeline = _optionalChain([play, 'optionalAccess', _129 => _129.staticPipeline]);
|
|
4659
5052
|
if (!isRecord(pipeline)) return false;
|
|
4660
5053
|
if (stringValue(pipeline.tableNamespace)) return true;
|
|
4661
5054
|
return staticPipelineSubsteps(pipeline).some((substep) => {
|
|
4662
5055
|
if (stringValue(substep.type) === "map") return true;
|
|
4663
5056
|
return playUsesMapBackedRuntime({
|
|
4664
|
-
name: _nullishCoalesce(_optionalChain([play, 'optionalAccess',
|
|
5057
|
+
name: _nullishCoalesce(_optionalChain([play, 'optionalAccess', _130 => _130.name]), () => ( "child")),
|
|
4665
5058
|
aliases: [],
|
|
4666
5059
|
runCommand: "",
|
|
4667
5060
|
examples: [],
|
|
@@ -4671,7 +5064,7 @@ function playUsesMapBackedRuntime(play) {
|
|
|
4671
5064
|
}
|
|
4672
5065
|
function assertComposablePlayRoute(input) {
|
|
4673
5066
|
if (!input.playRef || !playUsesMapBackedRuntime(input.play)) return;
|
|
4674
|
-
const runCommand = _optionalChain([input, 'access',
|
|
5067
|
+
const runCommand = _optionalChain([input, 'access', _131 => _131.play, 'optionalAccess', _132 => _132.runCommand, 'optionalAccess', _133 => _133.trim, 'call', _134 => _134()]) || `deepline plays run ${input.playRef} --input '{...}'`;
|
|
4675
5068
|
throw new PlayBootstrapValidationError(
|
|
4676
5069
|
`Cannot use ${input.stageLabel} play:${input.playRef} in plays bootstrap composition: the selected play is dataset-backed/direct-run-only. Child plays that use ctx.dataset() own durable table state and must be run directly, exported, or validated as their own play instead of wrapped with ctx.runPlay. Run it directly first: ${runCommand}`
|
|
4677
5070
|
);
|
|
@@ -4713,7 +5106,7 @@ function generatePlaySourceRowsBlock(input) {
|
|
|
4713
5106
|
sourcePlay: input.sourcePlay
|
|
4714
5107
|
})) {
|
|
4715
5108
|
const sourcePlay = input.sourcePlay;
|
|
4716
|
-
const runCommand = _optionalChain([sourcePlay, 'optionalAccess',
|
|
5109
|
+
const runCommand = _optionalChain([sourcePlay, 'optionalAccess', _135 => _135.runCommand, 'optionalAccess', _136 => _136.trim, 'call', _137 => _137()]) || `deepline plays run ${input.source.value} --input '{...}'`;
|
|
4717
5110
|
return `// Source play ${input.source.value} is dataset-backed/direct-run-only, so this generated play is stage 2.
|
|
4718
5111
|
// Stage 1:
|
|
4719
5112
|
// ${runCommand}
|
|
@@ -4725,7 +5118,7 @@ function generatePlaySourceRowsBlock(input) {
|
|
|
4725
5118
|
const ${input.collection}: ${input.collectionType}[] = await sourceDataset.peek(limit);`;
|
|
4726
5119
|
}
|
|
4727
5120
|
const playInput = generatePlayInputObject({
|
|
4728
|
-
schema: _optionalChain([input, 'access',
|
|
5121
|
+
schema: _optionalChain([input, 'access', _138 => _138.sourcePlay, 'optionalAccess', _139 => _139.inputSchema]),
|
|
4729
5122
|
indent: " ",
|
|
4730
5123
|
label: input.source.value,
|
|
4731
5124
|
entity: input.entity
|
|
@@ -4815,7 +5208,7 @@ function generateSourceSeedBlock(input) {
|
|
|
4815
5208
|
const peoplePlayRef = stagePlayRef(input.options.people);
|
|
4816
5209
|
if (!peoplePlayRef) return sourceRows;
|
|
4817
5210
|
const peopleInput = generateCompanyInputObjectFromSchema(
|
|
4818
|
-
_optionalChain([input, 'access',
|
|
5211
|
+
_optionalChain([input, 'access', _140 => _140.peoplePlay, 'optionalAccess', _141 => _141.inputSchema]),
|
|
4819
5212
|
" ",
|
|
4820
5213
|
peoplePlayRef,
|
|
4821
5214
|
["domain", "company_name"]
|
|
@@ -4857,11 +5250,11 @@ function generateFinderPlayStep(input) {
|
|
|
4857
5250
|
const outputField = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER[input.finder];
|
|
4858
5251
|
const resultTypeName = finderResultTypeName(input.finder);
|
|
4859
5252
|
const returnsObjectWithField = playOutputHasField(
|
|
4860
|
-
_optionalChain([input, 'access',
|
|
5253
|
+
_optionalChain([input, 'access', _142 => _142.play, 'optionalAccess', _143 => _143.outputSchema]),
|
|
4861
5254
|
outputField
|
|
4862
5255
|
);
|
|
4863
5256
|
const payload = generateContactInputObjectFromSchema(
|
|
4864
|
-
_optionalChain([input, 'access',
|
|
5257
|
+
_optionalChain([input, 'access', _144 => _144.play, 'optionalAccess', _145 => _145.inputSchema]),
|
|
4865
5258
|
" ",
|
|
4866
5259
|
input.stage.value
|
|
4867
5260
|
);
|
|
@@ -4881,7 +5274,7 @@ function generateFinderPlayStep(input) {
|
|
|
4881
5274
|
}
|
|
4882
5275
|
function generateFinderProviderResolver(input) {
|
|
4883
5276
|
const payload = generateContactInputObjectFromSchema(
|
|
4884
|
-
_optionalChain([input, 'access',
|
|
5277
|
+
_optionalChain([input, 'access', _146 => _146.tool, 'optionalAccess', _147 => _147.inputSchema]),
|
|
4885
5278
|
" ",
|
|
4886
5279
|
input.provider
|
|
4887
5280
|
);
|
|
@@ -5129,7 +5522,7 @@ async function runPlayBootstrap(args) {
|
|
|
5129
5522
|
return runMonitorBootstrap(args);
|
|
5130
5523
|
}
|
|
5131
5524
|
const options = parsePlayBootstrapOptions(args);
|
|
5132
|
-
const client = new (0,
|
|
5525
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
5133
5526
|
const contracts = await loadBootstrapContracts(client, options);
|
|
5134
5527
|
const csvContext = loadCsvContext(options.from);
|
|
5135
5528
|
const source = generateBootstrapPlaySource({
|
|
@@ -5284,7 +5677,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5284
5677
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
5285
5678
|
);
|
|
5286
5679
|
}
|
|
5287
|
-
const response = await new (0,
|
|
5680
|
+
const response = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().runs.getReceipts(runId, {
|
|
5288
5681
|
keys
|
|
5289
5682
|
});
|
|
5290
5683
|
const failed = response.receipts.filter(
|
|
@@ -5296,7 +5689,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5296
5689
|
JSON.stringify(response, null, 2) + "\n",
|
|
5297
5690
|
{ flag: "wx", mode: 384 }
|
|
5298
5691
|
);
|
|
5299
|
-
|
|
5692
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
5300
5693
|
{
|
|
5301
5694
|
runId,
|
|
5302
5695
|
out: options.out,
|
|
@@ -5306,7 +5699,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5306
5699
|
{ json: true }
|
|
5307
5700
|
);
|
|
5308
5701
|
} else {
|
|
5309
|
-
|
|
5702
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
5310
5703
|
}
|
|
5311
5704
|
if (failed)
|
|
5312
5705
|
process.exitCode = response.receipts.some(
|
|
@@ -5317,7 +5710,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5317
5710
|
}
|
|
5318
5711
|
|
|
5319
5712
|
// src/cli/commands/run-children.ts
|
|
5320
|
-
function
|
|
5713
|
+
function shellQuote2(value) {
|
|
5321
5714
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
5322
5715
|
}
|
|
5323
5716
|
function registerRunChildrenCommand(runs) {
|
|
@@ -5345,23 +5738,23 @@ includes nextCommand when another page is available.
|
|
|
5345
5738
|
{ exitCode: 2 }
|
|
5346
5739
|
);
|
|
5347
5740
|
}
|
|
5348
|
-
const page = await new (0,
|
|
5741
|
+
const page = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().runs.children(parentRunId, {
|
|
5349
5742
|
launchKey: options.launchKey,
|
|
5350
5743
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
5351
5744
|
limit
|
|
5352
5745
|
});
|
|
5353
5746
|
const nextCommand = page.hasMore && page.nextCursor ? [
|
|
5354
5747
|
"deepline runs children",
|
|
5355
|
-
|
|
5748
|
+
shellQuote2(parentRunId),
|
|
5356
5749
|
"--launch-key",
|
|
5357
|
-
|
|
5750
|
+
shellQuote2(options.launchKey),
|
|
5358
5751
|
"--cursor",
|
|
5359
|
-
|
|
5752
|
+
shellQuote2(page.nextCursor),
|
|
5360
5753
|
"--limit",
|
|
5361
5754
|
String(limit),
|
|
5362
5755
|
"--json"
|
|
5363
5756
|
].join(" ") : null;
|
|
5364
|
-
|
|
5757
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
5365
5758
|
{
|
|
5366
5759
|
parentRunId,
|
|
5367
5760
|
launchKey: options.launchKey,
|
|
@@ -5397,7 +5790,7 @@ async function handleRunsHistory(options) {
|
|
|
5397
5790
|
throw new Error("--limit must be a positive integer.");
|
|
5398
5791
|
}
|
|
5399
5792
|
}
|
|
5400
|
-
const page = await new (0,
|
|
5793
|
+
const page = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().runs.history({
|
|
5401
5794
|
cursor: options.cursor,
|
|
5402
5795
|
orgId: options.org,
|
|
5403
5796
|
search: options.search,
|
|
@@ -5413,7 +5806,7 @@ async function handleRunsHistory(options) {
|
|
|
5413
5806
|
);
|
|
5414
5807
|
}
|
|
5415
5808
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
5416
|
-
|
|
5809
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
5417
5810
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
5418
5811
|
options.json ? { json: true } : {}
|
|
5419
5812
|
);
|
|
@@ -5441,7 +5834,7 @@ function registerRunHistoryCommand(runs) {
|
|
|
5441
5834
|
var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
|
|
5442
5835
|
var HASH_SUFFIX_LENGTH = 10;
|
|
5443
5836
|
function normalizePlayColumnName(id, preserveAuthoredPrefix = true) {
|
|
5444
|
-
const prefix = preserveAuthoredPrefix ? _nullishCoalesce(_optionalChain([id, 'access',
|
|
5837
|
+
const prefix = preserveAuthoredPrefix ? _nullishCoalesce(_optionalChain([id, 'access', _148 => _148.trim, 'call', _149 => _149(), 'access', _150 => _150.match, 'call', _151 => _151(/^_+/), 'optionalAccess', _152 => _152[0]]), () => ( "")) : "";
|
|
5445
5838
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
5446
5839
|
const safe = `${prefix}${normalized || "column"}`;
|
|
5447
5840
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
@@ -5503,8 +5896,8 @@ function formatHitShare(count2, total) {
|
|
|
5503
5896
|
|
|
5504
5897
|
// src/cli/run-hit-counts.ts
|
|
5505
5898
|
function runTableHitCounts(tableNamespace, summary) {
|
|
5506
|
-
const rows = _nullishCoalesce(_optionalChain([summary, 'optionalAccess',
|
|
5507
|
-
const filled = _optionalChain([summary, 'optionalAccess',
|
|
5899
|
+
const rows = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _153 => _153.stats, 'optionalAccess', _154 => _154.total]), () => ( 0));
|
|
5900
|
+
const filled = _optionalChain([summary, 'optionalAccess', _155 => _155.filled]);
|
|
5508
5901
|
if (!filled || rows <= 0) return null;
|
|
5509
5902
|
const legColumns = new Set(
|
|
5510
5903
|
Object.values(_nullishCoalesce(summary.cascades, () => ( {}))).flatMap((cascade) => cascade.legs)
|
|
@@ -5689,7 +6082,7 @@ function projectRunDatasetCell(value) {
|
|
|
5689
6082
|
const logicalValue = parseSerializedDatasetValue(value);
|
|
5690
6083
|
if (logicalValue === null || logicalValue === void 0) return logicalValue;
|
|
5691
6084
|
if (typeof logicalValue === "object") {
|
|
5692
|
-
return
|
|
6085
|
+
return _chunkYEJMVAD3js.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
|
|
5693
6086
|
}
|
|
5694
6087
|
return logicalValue;
|
|
5695
6088
|
}
|
|
@@ -5790,7 +6183,7 @@ function mergeCanonicalRowsInfo(left, right) {
|
|
|
5790
6183
|
...currentTable ? { currentTable: true } : {},
|
|
5791
6184
|
...exportUnavailableReason ? {
|
|
5792
6185
|
exportUnavailableReason,
|
|
5793
|
-
..._optionalChain([unavailableSource, 'optionalAccess',
|
|
6186
|
+
..._optionalChain([unavailableSource, 'optionalAccess', _156 => _156.exportUnavailableMessage]) ? {
|
|
5794
6187
|
exportUnavailableMessage: unavailableSource.exportUnavailableMessage
|
|
5795
6188
|
} : {}
|
|
5796
6189
|
} : {}
|
|
@@ -5962,7 +6355,7 @@ function totalRowsForDataset(result, datasetPath) {
|
|
|
5962
6355
|
const metadata = isRecord2(result._metadata) ? result._metadata : null;
|
|
5963
6356
|
const parentPath = datasetPath.split(".").slice(0, -1).join(".");
|
|
5964
6357
|
const parent = parentPath ? valueAtPath({ result }, parentPath) : result;
|
|
5965
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess',
|
|
6358
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _157 => _157.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _158 => _158.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _159 => _159.count]))), () => ( (isRecord2(parent) ? _nullishCoalesce(_nullishCoalesce(parent.totalRows, () => ( parent.rowCount)), () => ( parent.count)) : void 0))), () => ( result.totalRows)), () => ( result.rowCount)), () => ( result.count));
|
|
5966
6359
|
}
|
|
5967
6360
|
function rowArray(value) {
|
|
5968
6361
|
if (!Array.isArray(value)) {
|
|
@@ -6024,8 +6417,8 @@ function canonicalRowsInfoFromCandidate(input) {
|
|
|
6024
6417
|
};
|
|
6025
6418
|
}
|
|
6026
6419
|
if (isPackagedDatasetOutput(candidate.value)) {
|
|
6027
|
-
const rawRows = _nullishCoalesce(rowArray(_optionalChain([candidate, 'access',
|
|
6028
|
-
const totalRows2 = _nullishCoalesce(_nullishCoalesce(readNumber(candidate.value.rowCount), () => ( readNumber(_optionalChain([candidate, 'access',
|
|
6420
|
+
const rawRows = _nullishCoalesce(rowArray(_optionalChain([candidate, 'access', _160 => _160.value, 'access', _161 => _161.preview, 'optionalAccess', _162 => _162.rows])), () => ( []));
|
|
6421
|
+
const totalRows2 = _nullishCoalesce(_nullishCoalesce(readNumber(candidate.value.rowCount), () => ( readNumber(_optionalChain([candidate, 'access', _163 => _163.value, 'access', _164 => _164.preview, 'optionalAccess', _165 => _165.totalRows])))), () => ( rawRows.length));
|
|
6029
6422
|
const explicitColumns = Array.isArray(candidate.value.columns) ? candidate.value.columns.filter(
|
|
6030
6423
|
(column) => typeof column === "string"
|
|
6031
6424
|
) : [];
|
|
@@ -6121,12 +6514,12 @@ function collectDatasetCandidates(input) {
|
|
|
6121
6514
|
}
|
|
6122
6515
|
function collectCanonicalRowsInfos(statusOrResult) {
|
|
6123
6516
|
const root = isRecord2(statusOrResult) ? statusOrResult : null;
|
|
6124
|
-
const result = isRecord2(_optionalChain([root, 'optionalAccess',
|
|
6517
|
+
const result = isRecord2(_optionalChain([root, 'optionalAccess', _166 => _166.result])) ? root.result : root;
|
|
6125
6518
|
if (!result) {
|
|
6126
6519
|
return [];
|
|
6127
6520
|
}
|
|
6128
6521
|
const metadata = isRecord2(result._metadata) ? result._metadata : null;
|
|
6129
|
-
const totalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess',
|
|
6522
|
+
const totalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _167 => _167.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _168 => _168.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _169 => _169.count])));
|
|
6130
6523
|
const candidates = [
|
|
6131
6524
|
{
|
|
6132
6525
|
source: "result.contacts",
|
|
@@ -6151,7 +6544,7 @@ function collectCanonicalRowsInfos(statusOrResult) {
|
|
|
6151
6544
|
];
|
|
6152
6545
|
if (isRecord2(result.output)) {
|
|
6153
6546
|
const outputMetadata = isRecord2(result.output._metadata) ? result.output._metadata : null;
|
|
6154
|
-
const outputTotalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([outputMetadata, 'optionalAccess',
|
|
6547
|
+
const outputTotalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([outputMetadata, 'optionalAccess', _170 => _170.totalRows]), () => ( _optionalChain([outputMetadata, 'optionalAccess', _171 => _171.rowCount]))), () => ( _optionalChain([outputMetadata, 'optionalAccess', _172 => _172.count])));
|
|
6155
6548
|
candidates.push(
|
|
6156
6549
|
{
|
|
6157
6550
|
source: "result.output.contacts",
|
|
@@ -6240,14 +6633,14 @@ function collectPackagedStepDatasetCandidates(statusOrResult) {
|
|
|
6240
6633
|
{
|
|
6241
6634
|
source,
|
|
6242
6635
|
value: step.output,
|
|
6243
|
-
total: _nullishCoalesce(_nullishCoalesce(step.output.rowCount, () => ( _optionalChain([step, 'access',
|
|
6636
|
+
total: _nullishCoalesce(_nullishCoalesce(step.output.rowCount, () => ( _optionalChain([step, 'access', _173 => _173.output, 'access', _174 => _174.preview, 'optionalAccess', _175 => _175.totalRows]))), () => ( void 0))
|
|
6244
6637
|
}
|
|
6245
6638
|
] : [];
|
|
6246
6639
|
});
|
|
6247
6640
|
}
|
|
6248
6641
|
function collectSerializedDatasetRowsInfos(statusOrResult) {
|
|
6249
6642
|
const root = isRecord2(statusOrResult) ? statusOrResult : null;
|
|
6250
|
-
const result = root && "result" in root ? isRecord2(root.result) ? root.result : null : _optionalChain([root, 'optionalAccess',
|
|
6643
|
+
const result = root && "result" in root ? isRecord2(root.result) ? root.result : null : _optionalChain([root, 'optionalAccess', _176 => _176.kind]) === "play_run" || isRecord2(_optionalChain([root, 'optionalAccess', _177 => _177.package])) ? null : root;
|
|
6251
6644
|
const candidates = [];
|
|
6252
6645
|
if (result) {
|
|
6253
6646
|
collectDatasetCandidates({
|
|
@@ -6360,7 +6753,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
|
|
|
6360
6753
|
* a Run returns its sole returned Dataset, or its sole recovered Dataset.
|
|
6361
6754
|
*/
|
|
6362
6755
|
choose(path) {
|
|
6363
|
-
const requested = _optionalChain([path, 'optionalAccess',
|
|
6756
|
+
const requested = _optionalChain([path, 'optionalAccess', _178 => _178.trim, 'call', _179 => _179()]);
|
|
6364
6757
|
if (requested) {
|
|
6365
6758
|
const info = uniqueDatasetMatch(
|
|
6366
6759
|
this.#available.filter((dataset) => dataset.matches(requested)).map((dataset) => dataset.info()),
|
|
@@ -6368,7 +6761,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
|
|
|
6368
6761
|
);
|
|
6369
6762
|
return info ? RunDataset.from({
|
|
6370
6763
|
...info,
|
|
6371
|
-
source: _optionalChain([info, 'access',
|
|
6764
|
+
source: _optionalChain([info, 'access', _180 => _180.sourceAliases, 'optionalAccess', _181 => _181.includes, 'call', _182 => _182(requested)]) ? requested : info.source
|
|
6372
6765
|
}) : null;
|
|
6373
6766
|
}
|
|
6374
6767
|
if (this.#returned.length === 1) return this.#returned[0];
|
|
@@ -6411,7 +6804,7 @@ var RunDataset = class _RunDataset {
|
|
|
6411
6804
|
return this.#info.exportUnavailableMessage;
|
|
6412
6805
|
}
|
|
6413
6806
|
matches(path) {
|
|
6414
|
-
return this.source === path || _optionalChain([this, 'access',
|
|
6807
|
+
return this.source === path || _optionalChain([this, 'access', _183 => _183.#info, 'access', _184 => _184.sourceAliases, 'optionalAccess', _185 => _185.includes, 'call', _186 => _186(path)]) === true || this.#info.name === path || this.datasetId === path || this.tableNamespace === path || _optionalChain([this, 'access', _187 => _187.#info, 'access', _188 => _188.recoveredReturnPaths, 'optionalAccess', _189 => _189.includes, 'call', _190 => _190(path)]) === true;
|
|
6415
6808
|
}
|
|
6416
6809
|
/** Return a new Handle when its preview has been replaced by fetched rows. */
|
|
6417
6810
|
withRows(info) {
|
|
@@ -6450,7 +6843,7 @@ var RunDataset = class _RunDataset {
|
|
|
6450
6843
|
}
|
|
6451
6844
|
};
|
|
6452
6845
|
function resolveDatasetByName(available, datasetPath) {
|
|
6453
|
-
return _nullishCoalesce(_optionalChain([RunDatasetCatalog, 'access',
|
|
6846
|
+
return _nullishCoalesce(_optionalChain([RunDatasetCatalog, 'access', _191 => _191.from, 'call', _192 => _192({ runPackage: null, datasets: available }), 'access', _193 => _193.choose, 'call', _194 => _194(datasetPath), 'optionalAccess', _195 => _195.info, 'call', _196 => _196()]), () => ( null));
|
|
6454
6847
|
}
|
|
6455
6848
|
function uniqueDatasetMatch(infos, selector) {
|
|
6456
6849
|
const matches = distinctCanonicalRowsInfos(infos);
|
|
@@ -6474,11 +6867,11 @@ function uniqueDatasetMatch(infos, selector) {
|
|
|
6474
6867
|
function packageForDatasetSelection(runPackage) {
|
|
6475
6868
|
const root = recordValue(runPackage);
|
|
6476
6869
|
const nested = recordValue(root.package);
|
|
6477
|
-
if (_optionalChain([nested, 'optionalAccess',
|
|
6870
|
+
if (_optionalChain([nested, 'optionalAccess', _197 => _197.kind]) === "play_run") return nested;
|
|
6478
6871
|
return root.kind === "play_run" ? root : null;
|
|
6479
6872
|
}
|
|
6480
6873
|
function withReturnedDatasetAliases(runPackage, available) {
|
|
6481
|
-
const outputs = recordValue(_optionalChain([packageForDatasetSelection, 'call',
|
|
6874
|
+
const outputs = recordValue(_optionalChain([packageForDatasetSelection, 'call', _198 => _198(runPackage), 'optionalAccess', _199 => _199.outputs]));
|
|
6482
6875
|
if (Object.keys(outputs).length === 0) return available;
|
|
6483
6876
|
const expanded = [...available];
|
|
6484
6877
|
for (const outputValue of Object.values(outputs)) {
|
|
@@ -6492,7 +6885,7 @@ function withReturnedDatasetAliases(runPackage, available) {
|
|
|
6492
6885
|
return expanded;
|
|
6493
6886
|
}
|
|
6494
6887
|
function returnedRunDatasets(runPackage, available) {
|
|
6495
|
-
const rawOutputs = _optionalChain([packageForDatasetSelection, 'call',
|
|
6888
|
+
const rawOutputs = _optionalChain([packageForDatasetSelection, 'call', _200 => _200(runPackage), 'optionalAccess', _201 => _201.outputs]);
|
|
6496
6889
|
const outputs = recordValue(rawOutputs);
|
|
6497
6890
|
if (rawOutputs && typeof rawOutputs === "object" && !Array.isArray(rawOutputs)) {
|
|
6498
6891
|
const selected = [];
|
|
@@ -6511,7 +6904,7 @@ function returnedRunDatasets(runPackage, available) {
|
|
|
6511
6904
|
return distinctCanonicalRowsInfos(
|
|
6512
6905
|
available.filter(
|
|
6513
6906
|
(info) => info.returned || [info.source, ..._nullishCoalesce(info.sourceAliases, () => ( []))].some(
|
|
6514
|
-
(path) => _optionalChain([path, 'optionalAccess',
|
|
6907
|
+
(path) => _optionalChain([path, 'optionalAccess', _202 => _202.startsWith, 'call', _203 => _203("result.")])
|
|
6515
6908
|
) && !info.recovered
|
|
6516
6909
|
)
|
|
6517
6910
|
);
|
|
@@ -6541,7 +6934,7 @@ function resolveReturnedDataset(output, available) {
|
|
|
6541
6934
|
}
|
|
6542
6935
|
const legacy = path ? uniqueDatasetMatch(
|
|
6543
6936
|
available.filter(
|
|
6544
|
-
(info) => info.source === path || _optionalChain([info, 'access',
|
|
6937
|
+
(info) => info.source === path || _optionalChain([info, 'access', _204 => _204.sourceAliases, 'optionalAccess', _205 => _205.includes, 'call', _206 => _206(path)])
|
|
6545
6938
|
),
|
|
6546
6939
|
path
|
|
6547
6940
|
) : null;
|
|
@@ -6571,7 +6964,7 @@ var RUN_PLAY_SIGNATURE_HINT = "Deepline hint: ctx.runPlay uses a stable key plus
|
|
|
6571
6964
|
var MAP_BACKED_CHILD_HINT = "Deepline hint: dataset-backed child plays own durable table state and cannot be called from another play. Run that play directly, export its dataset, then pass the CSV to the next play.";
|
|
6572
6965
|
function sourceLineForError(sourceCode, error) {
|
|
6573
6966
|
const match = error.match(/:(\d+):(\d+)\s/);
|
|
6574
|
-
const lineNumber = _optionalChain([match, 'optionalAccess',
|
|
6967
|
+
const lineNumber = _optionalChain([match, 'optionalAccess', _207 => _207[1]]) ? Number(match[1]) : NaN;
|
|
6575
6968
|
if (!Number.isInteger(lineNumber) || lineNumber < 1) return "";
|
|
6576
6969
|
return _nullishCoalesce(sourceCode.split(/\r?\n/)[lineNumber - 1], () => ( ""));
|
|
6577
6970
|
}
|
|
@@ -7495,7 +7888,7 @@ async function discoverDeploymentFiles(input) {
|
|
|
7495
7888
|
}
|
|
7496
7889
|
}
|
|
7497
7890
|
const rootStat = await _promises.stat.call(void 0, input.projectRoot).catch(() => null);
|
|
7498
|
-
if (!_optionalChain([rootStat, 'optionalAccess',
|
|
7891
|
+
if (!_optionalChain([rootStat, 'optionalAccess', _208 => _208.isDirectory, 'call', _209 => _209()])) {
|
|
7499
7892
|
throw new DeeplineManifestError(
|
|
7500
7893
|
`Project root directory does not exist in the repo: ${input.projectRoot}`
|
|
7501
7894
|
);
|
|
@@ -7597,7 +7990,7 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
7597
7990
|
if (parsed.kind !== "org") {
|
|
7598
7991
|
return null;
|
|
7599
7992
|
}
|
|
7600
|
-
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess',
|
|
7993
|
+
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess', _210 => _210.trim, 'call', _211 => _211(), 'access', _212 => _212.toLowerCase, 'call', _213 => _213()]), () => ( ""));
|
|
7601
7994
|
return normalizedOwnerSlug && parsed.ownerSlug.trim().toLowerCase() === normalizedOwnerSlug ? parsed.name : null;
|
|
7602
7995
|
}
|
|
7603
7996
|
|
|
@@ -7612,7 +8005,7 @@ function stringLiteralValue(node) {
|
|
|
7612
8005
|
return node.value;
|
|
7613
8006
|
}
|
|
7614
8007
|
if (node.type === "TemplateLiteral" && Array.isArray(node.expressions) && node.expressions.length === 0 && Array.isArray(node.quasis) && node.quasis.length === 1) {
|
|
7615
|
-
const cooked = _optionalChain([node, 'access',
|
|
8008
|
+
const cooked = _optionalChain([node, 'access', _214 => _214.quasis, 'access', _215 => _215[0], 'access', _216 => _216.value, 'optionalAccess', _217 => _217.cooked]);
|
|
7616
8009
|
return typeof cooked === "string" ? cooked : null;
|
|
7617
8010
|
}
|
|
7618
8011
|
return null;
|
|
@@ -7736,7 +8129,7 @@ async function runDeployment(params, hooks) {
|
|
|
7736
8129
|
`Deployment ${params.deploymentId} has no linked repository and no target directory was given.`
|
|
7737
8130
|
);
|
|
7738
8131
|
}
|
|
7739
|
-
const checkRunName = _optionalChain([state, 'access',
|
|
8132
|
+
const checkRunName = _optionalChain([state, 'access', _218 => _218.checkRunName, 'optionalAccess', _219 => _219.trim, 'call', _220 => _220()]) || void 0;
|
|
7740
8133
|
let mergedPullRequestNumber = null;
|
|
7741
8134
|
let promoted = false;
|
|
7742
8135
|
const setStatus = (input) => client.setStatus({
|
|
@@ -7807,7 +8200,7 @@ async function runDeployment(params, hooks) {
|
|
|
7807
8200
|
finalStatus,
|
|
7808
8201
|
outcomes,
|
|
7809
8202
|
...monitorRunResult(),
|
|
7810
|
-
checkRunId: _optionalChain([checkRun, 'optionalAccess',
|
|
8203
|
+
checkRunId: _optionalChain([checkRun, 'optionalAccess', _221 => _221.checkRunId])
|
|
7811
8204
|
};
|
|
7812
8205
|
};
|
|
7813
8206
|
await _promises.mkdir.call(void 0, hooks.workRoot, { recursive: true });
|
|
@@ -7833,7 +8226,7 @@ async function runDeployment(params, hooks) {
|
|
|
7833
8226
|
const source = await hooks.openSource({ client, deployment });
|
|
7834
8227
|
if (deployment.isProduction) {
|
|
7835
8228
|
try {
|
|
7836
|
-
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access',
|
|
8229
|
+
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access', _222 => _222.findMergedPullRequest, 'optionalCall', _223 => _223()]), async () => ( null));
|
|
7837
8230
|
} catch (error) {
|
|
7838
8231
|
console.warn("[deploy-worker] merged PR lookup failed", {
|
|
7839
8232
|
deploymentId: params.deploymentId,
|
|
@@ -7903,15 +8296,15 @@ async function runDeployment(params, hooks) {
|
|
|
7903
8296
|
return finishFailed({
|
|
7904
8297
|
error: input.error,
|
|
7905
8298
|
outcomes: input.outcomes,
|
|
7906
|
-
checkRunId: _optionalChain([checkRun2, 'optionalAccess',
|
|
8299
|
+
checkRunId: _optionalChain([checkRun2, 'optionalAccess', _224 => _224.checkRunId])
|
|
7907
8300
|
});
|
|
7908
8301
|
};
|
|
7909
8302
|
postFailureCheck = async (summary) => await _asyncOptionalChain([(await postCheckOrNull({
|
|
7910
8303
|
conclusion: "failure",
|
|
7911
8304
|
title: "Deploy failed",
|
|
7912
8305
|
summary
|
|
7913
|
-
})), 'optionalAccess', async
|
|
7914
|
-
const deploymentBranch = _optionalChain([deployment, 'access',
|
|
8306
|
+
})), 'optionalAccess', async _225 => _225.checkRunId]);
|
|
8307
|
+
const deploymentBranch = _optionalChain([deployment, 'access', _226 => _226.ref, 'optionalAccess', _227 => _227.startsWith, 'call', _228 => _228("refs/heads/")]) ? deployment.ref.slice("refs/heads/".length) : _nullishCoalesce(_optionalChain([project, 'optionalAccess', _229 => _229.productionBranch]), () => ( null));
|
|
7915
8308
|
const supersedeIfHeadMoved = async () => {
|
|
7916
8309
|
if (!deployment.isProduction || !source.branchHead || !deploymentBranch) {
|
|
7917
8310
|
return null;
|
|
@@ -7925,7 +8318,7 @@ async function runDeployment(params, hooks) {
|
|
|
7925
8318
|
});
|
|
7926
8319
|
await setStatus({
|
|
7927
8320
|
status: "superseded",
|
|
7928
|
-
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess',
|
|
8321
|
+
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess', _230 => _230.slice, 'call', _231 => _231(0, 12)]), () => ( "<deleted>"))}; this deployment's commit is no longer the head.`,
|
|
7929
8322
|
buildSeconds: buildSeconds(),
|
|
7930
8323
|
...monitorOutcomes.length > 0 ? { results: monitorResults() } : {},
|
|
7931
8324
|
...head ? { observedHeadSha: head } : {}
|
|
@@ -8041,7 +8434,7 @@ async function runDeployment(params, hooks) {
|
|
|
8041
8434
|
failPlay(file, repoRelativeFile, message);
|
|
8042
8435
|
continue;
|
|
8043
8436
|
}
|
|
8044
|
-
const name = _nullishCoalesce(_optionalChain([result, 'access',
|
|
8437
|
+
const name = _nullishCoalesce(_optionalChain([result, 'access', _232 => _232.playName, 'optionalAccess', _233 => _233.trim, 'call', _234 => _234()]), () => ( ""));
|
|
8045
8438
|
if (!name) {
|
|
8046
8439
|
failPlay(
|
|
8047
8440
|
file,
|
|
@@ -8060,7 +8453,7 @@ async function runDeployment(params, hooks) {
|
|
|
8060
8453
|
continue;
|
|
8061
8454
|
}
|
|
8062
8455
|
seenNames.set(name, file);
|
|
8063
|
-
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access',
|
|
8456
|
+
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access', _235 => _235.artifact, 'access', _236 => _236.importPolicy, 'optionalAccess', _237 => _237.packages]), () => ( []))).map(
|
|
8064
8457
|
(pkg) => typeof pkg === "string" ? pkg : _nullishCoalesce(pkg.name, () => ( ""))
|
|
8065
8458
|
).filter((pkgName) => pkgName && pkgName !== "deepline");
|
|
8066
8459
|
if (disallowed.length > 0) {
|
|
@@ -8144,7 +8537,7 @@ async function runDeployment(params, hooks) {
|
|
|
8144
8537
|
const conflicts = [];
|
|
8145
8538
|
for (const play of ordered) {
|
|
8146
8539
|
const owner = stateByName.get(play.name);
|
|
8147
|
-
if (!project || !_optionalChain([owner, 'optionalAccess',
|
|
8540
|
+
if (!project || !_optionalChain([owner, 'optionalAccess', _238 => _238.playProjectRepo]) || owner.playProjectRepo === _optionalChain([project, 'optionalAccess', _239 => _239.repoFullName]) || owner.playProjectDisabled) {
|
|
8148
8541
|
continue;
|
|
8149
8542
|
}
|
|
8150
8543
|
const message = `The play name "${play.name}" is already deployed from ${owner.playProjectRepo}. A play name belongs to one repository at a time. Rename it here, or disable that deployment target first.`;
|
|
@@ -8167,16 +8560,16 @@ async function runDeployment(params, hooks) {
|
|
|
8167
8560
|
}
|
|
8168
8561
|
const playByName = new Map(ordered.map((play) => [play.name, play]));
|
|
8169
8562
|
const sdkUpdated = (name) => {
|
|
8170
|
-
const artifact = _optionalChain([playByName, 'access',
|
|
8171
|
-
const live = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
8563
|
+
const artifact = _optionalChain([playByName, 'access', _240 => _240.get, 'call', _241 => _241(name), 'optionalAccess', _242 => _242.result, 'access', _243 => _243.artifact]);
|
|
8564
|
+
const live = _nullishCoalesce(_optionalChain([stateByName, 'access', _244 => _244.get, 'call', _245 => _245(name), 'optionalAccess', _246 => _246.liveRevision]), () => ( null));
|
|
8172
8565
|
return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
|
|
8173
8566
|
};
|
|
8174
8567
|
const outcomes = [];
|
|
8175
8568
|
const toRegister = [];
|
|
8176
8569
|
const toPromote = [];
|
|
8177
8570
|
const takeoverWarning = (state2) => {
|
|
8178
|
-
const owner = _optionalChain([state2, 'optionalAccess',
|
|
8179
|
-
if (!owner || owner === _optionalChain([project, 'optionalAccess',
|
|
8571
|
+
const owner = _optionalChain([state2, 'optionalAccess', _247 => _247.playProjectRepo]);
|
|
8572
|
+
if (!owner || owner === _optionalChain([project, 'optionalAccess', _248 => _248.repoFullName])) return void 0;
|
|
8180
8573
|
if (!project) {
|
|
8181
8574
|
return `This play is deployed from ${owner}. This directory deploy made a different revision live, so it is marked drifted from ${owner} until that repository deploys again. If you are done with ${owner}, unlink it (deepline git unlink <id>) and this play is released from it.`;
|
|
8182
8575
|
}
|
|
@@ -8188,8 +8581,8 @@ async function runDeployment(params, hooks) {
|
|
|
8188
8581
|
const artifact = play.result.artifact;
|
|
8189
8582
|
const importsOtherPlays = (_nullishCoalesce(play.result.importedPlayDependencies, () => ( []))).length > 0;
|
|
8190
8583
|
const matches = (revision) => !importsOtherPlays && carriesArtifact(revision, artifact);
|
|
8191
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8192
|
-
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess',
|
|
8584
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _249 => _249.liveRevision]), () => ( null)))) {
|
|
8585
|
+
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess', _250 => _250.playProjectId]) !== project.id || _optionalChain([playState, 'optionalAccess', _251 => _251.driftFromGit]))) {
|
|
8193
8586
|
toPromote.push({
|
|
8194
8587
|
name: play.name,
|
|
8195
8588
|
revisionId: playState.liveRevision.revisionId
|
|
@@ -8200,12 +8593,12 @@ async function runDeployment(params, hooks) {
|
|
|
8200
8593
|
name: play.name,
|
|
8201
8594
|
file: play.file,
|
|
8202
8595
|
status: "unchanged",
|
|
8203
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8596
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _252 => _252.liveRevision, 'optionalAccess', _253 => _253.version]), () => ( void 0)),
|
|
8204
8597
|
...warning ? { warning } : {}
|
|
8205
8598
|
});
|
|
8206
8599
|
continue;
|
|
8207
8600
|
}
|
|
8208
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8601
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _254 => _254.workingRevision]), () => ( null)))) {
|
|
8209
8602
|
if (deployment.isProduction) {
|
|
8210
8603
|
toPromote.push({
|
|
8211
8604
|
name: play.name,
|
|
@@ -8216,7 +8609,7 @@ async function runDeployment(params, hooks) {
|
|
|
8216
8609
|
name: play.name,
|
|
8217
8610
|
file: play.file,
|
|
8218
8611
|
status: "registered",
|
|
8219
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8612
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _255 => _255.workingRevision, 'optionalAccess', _256 => _256.version]), () => ( void 0)),
|
|
8220
8613
|
...sdkUpdated(play.name),
|
|
8221
8614
|
...warning ? { warning } : {}
|
|
8222
8615
|
});
|
|
@@ -8343,11 +8736,11 @@ async function runDeployment(params, hooks) {
|
|
|
8343
8736
|
const promotion = await client.promote(toPromote);
|
|
8344
8737
|
promoted = true;
|
|
8345
8738
|
for (const outcome of promotion.outcomes) {
|
|
8346
|
-
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
8739
|
+
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access', _257 => _257.get, 'call', _258 => _258(outcome.name), 'optionalAccess', _259 => _259.liveRevision, 'optionalAccess', _260 => _260.version]), () => ( null));
|
|
8347
8740
|
const warning = takeoverWarning(stateByName.get(outcome.name));
|
|
8348
8741
|
outcomes.push({
|
|
8349
8742
|
name: outcome.name,
|
|
8350
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
8743
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _261 => _261.get, 'call', _262 => _262(outcome.name), 'optionalAccess', _263 => _263.file]), () => ( outcome.name)),
|
|
8351
8744
|
status: outcome.status === "promoted" ? "promoted" : "failed",
|
|
8352
8745
|
version: outcome.version,
|
|
8353
8746
|
...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
|
|
@@ -8359,7 +8752,7 @@ async function runDeployment(params, hooks) {
|
|
|
8359
8752
|
} catch (error) {
|
|
8360
8753
|
if (revokedFinalStatus(error)) throw error;
|
|
8361
8754
|
const body = error instanceof DeployApiError ? error.body : null;
|
|
8362
|
-
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
8755
|
+
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess', _264 => _264.error]), () => ( (error instanceof Error ? error.message : String(error))));
|
|
8363
8756
|
if (/PLAY_DEPLOYMENT_NOT_ACTIVE/.test(errorText)) {
|
|
8364
8757
|
console.info("[deploy-worker] cancelled at promote", {
|
|
8365
8758
|
deploymentId: params.deploymentId
|
|
@@ -8383,9 +8776,9 @@ async function runDeployment(params, hooks) {
|
|
|
8383
8776
|
error: errorText,
|
|
8384
8777
|
outcomes: [
|
|
8385
8778
|
...outcomes,
|
|
8386
|
-
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
8779
|
+
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _265 => _265.outcomes]), () => ( toPromote))).map((entry) => ({
|
|
8387
8780
|
name: entry.name,
|
|
8388
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
8781
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _266 => _266.get, 'call', _267 => _267(entry.name), 'optionalAccess', _268 => _268.file]), () => ( entry.name)),
|
|
8389
8782
|
status: "failed",
|
|
8390
8783
|
error: _nullishCoalesce(("error" in entry ? entry.error : void 0), () => ( errorText))
|
|
8391
8784
|
}))
|
|
@@ -8429,7 +8822,7 @@ async function runDeployment(params, hooks) {
|
|
|
8429
8822
|
});
|
|
8430
8823
|
let checkRunId;
|
|
8431
8824
|
try {
|
|
8432
|
-
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall',
|
|
8825
|
+
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _269 => _269(message.slice(0, 2e3))]);
|
|
8433
8826
|
} catch (checkError) {
|
|
8434
8827
|
const revokedAtCheck = revokedFinalStatus(checkError);
|
|
8435
8828
|
if (revokedAtCheck) {
|
|
@@ -8497,7 +8890,7 @@ function renderOutcome(outcome) {
|
|
|
8497
8890
|
function printResult2(input) {
|
|
8498
8891
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
8499
8892
|
if (failed) process.exitCode = 1;
|
|
8500
|
-
|
|
8893
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
8501
8894
|
{
|
|
8502
8895
|
deployment: { ...input.deployment, status: input.status },
|
|
8503
8896
|
plays: input.outcomes,
|
|
@@ -8522,7 +8915,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8522
8915
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
8523
8916
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
8524
8917
|
});
|
|
8525
|
-
const { http, config } =
|
|
8918
|
+
const { http, config } = _chunkYEJMVAD3js.getAuthedHttpClient.call(void 0, );
|
|
8526
8919
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
8527
8920
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
8528
8921
|
deliveryId,
|
|
@@ -8549,14 +8942,14 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8549
8942
|
},
|
|
8550
8943
|
{
|
|
8551
8944
|
bundle: bundleDeployPlayFile,
|
|
8552
|
-
fetchImpl:
|
|
8945
|
+
fetchImpl: _chunkQTCFSRGCjs.fetchWithDeploymentProtection,
|
|
8553
8946
|
// The plays are already here: "opening" the source is naming it.
|
|
8554
8947
|
openSource: async () => ({
|
|
8555
8948
|
open: async () => ({ repoRoot: root })
|
|
8556
8949
|
}),
|
|
8557
8950
|
target: {
|
|
8558
8951
|
rootDirectory: "",
|
|
8559
|
-
manifestPath: _nullishCoalesce(_optionalChain([options, 'access',
|
|
8952
|
+
manifestPath: _nullishCoalesce(_optionalChain([options, 'access', _270 => _270.manifest, 'optionalAccess', _271 => _271.trim, 'call', _272 => _272()]), () => ( ""))
|
|
8560
8953
|
},
|
|
8561
8954
|
workRoot
|
|
8562
8955
|
}
|
|
@@ -8716,7 +9109,7 @@ async function preflightRunIdFile(path) {
|
|
|
8716
9109
|
`Cannot write --run-id-file destination ${destination}: ${error instanceof Error ? error.message : String(error)}`
|
|
8717
9110
|
);
|
|
8718
9111
|
} finally {
|
|
8719
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
9112
|
+
await _optionalChain([handle, 'optionalAccess', _273 => _273.close, 'call', _274 => _274()]);
|
|
8720
9113
|
await removeRunIdTempFile(tempPath);
|
|
8721
9114
|
}
|
|
8722
9115
|
return destination;
|
|
@@ -8770,9 +9163,9 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
8770
9163
|
} catch (error) {
|
|
8771
9164
|
if (error.code !== "EEXIST") throw error;
|
|
8772
9165
|
const raced = await readRunIdFile(destination);
|
|
8773
|
-
if (_optionalChain([raced, 'optionalAccess',
|
|
9166
|
+
if (_optionalChain([raced, 'optionalAccess', _275 => _275.runId]) !== runId) {
|
|
8774
9167
|
throw new Error(
|
|
8775
|
-
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess',
|
|
9168
|
+
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess', _276 => _276.runId]), () => ( "<invalid>"))}; refusing to replace it with ${runId}: ${destination}`
|
|
8776
9169
|
);
|
|
8777
9170
|
}
|
|
8778
9171
|
if (!options.launchConfirmed || raced.launchConfirmed) return;
|
|
@@ -8788,7 +9181,7 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
8788
9181
|
}
|
|
8789
9182
|
}
|
|
8790
9183
|
} finally {
|
|
8791
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
9184
|
+
await _optionalChain([handle, 'optionalAccess', _277 => _277.close, 'call', _278 => _278()]);
|
|
8792
9185
|
await removeRunIdTempFile(tempPath);
|
|
8793
9186
|
}
|
|
8794
9187
|
}
|
|
@@ -8857,10 +9250,10 @@ function playReferenceMatchTokens(value) {
|
|
|
8857
9250
|
return normalizePlayReferenceForMatch(value).split("-").filter((token) => token.length > 1 && token !== "to" && token !== "and");
|
|
8858
9251
|
}
|
|
8859
9252
|
function playSuggestionReference(play) {
|
|
8860
|
-
if (_optionalChain([play, 'access',
|
|
9253
|
+
if (_optionalChain([play, 'access', _279 => _279.reference, 'optionalAccess', _280 => _280.trim, 'call', _281 => _281()])) {
|
|
8861
9254
|
return play.reference.trim();
|
|
8862
9255
|
}
|
|
8863
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
9256
|
+
const ownerSlug = _optionalChain([play, 'access', _282 => _282.ownerSlug, 'optionalAccess', _283 => _283.trim, 'call', _284 => _284()]);
|
|
8864
9257
|
return ownerSlug ? `${ownerSlug}/${play.name}` : play.name;
|
|
8865
9258
|
}
|
|
8866
9259
|
function scorePlayReferenceSuggestion(requested, play) {
|
|
@@ -8876,8 +9269,8 @@ function scorePlayReferenceSuggestion(requested, play) {
|
|
|
8876
9269
|
const reference = playSuggestionReference(play);
|
|
8877
9270
|
const referenceNorm = normalizePlayReferenceForMatch(reference);
|
|
8878
9271
|
const nameNorm = normalizePlayReferenceForMatch(play.name);
|
|
8879
|
-
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access',
|
|
8880
|
-
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access',
|
|
9272
|
+
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access', _285 => _285.split, 'call', _286 => _286("/"), 'access', _287 => _287[0], 'optionalAccess', _288 => _288.toLowerCase, 'call', _289 => _289()]) : null;
|
|
9273
|
+
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access', _290 => _290.ownerSlug, 'optionalAccess', _291 => _291.toLowerCase, 'call', _292 => _292()]), () => ( null));
|
|
8881
9274
|
const aliases = (_nullishCoalesce(play.aliases, () => ( []))).map(normalizePlayReferenceForMatch);
|
|
8882
9275
|
const searchable = [referenceNorm, nameNorm, ...aliases].filter(Boolean);
|
|
8883
9276
|
const requestedTokens = playReferenceMatchTokens(requestedName);
|
|
@@ -8944,7 +9337,7 @@ function rankPlayReferenceSuggestions(input) {
|
|
|
8944
9337
|
function searchQueryForMissingPlayReference(target) {
|
|
8945
9338
|
return parseReferencedPlayTarget2(target).unqualifiedPlayName.replace(/[-_./]+/g, " ").replace(/\s+/g, " ").trim();
|
|
8946
9339
|
}
|
|
8947
|
-
function
|
|
9340
|
+
function shellQuote3(value) {
|
|
8948
9341
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
8949
9342
|
}
|
|
8950
9343
|
function buildPlayReferenceNotFoundMessage(input) {
|
|
@@ -8977,7 +9370,7 @@ function buildPlayReferenceNotFoundMessage(input) {
|
|
|
8977
9370
|
lines.push(
|
|
8978
9371
|
"",
|
|
8979
9372
|
"Search visible plays:",
|
|
8980
|
-
` deepline search --type plays ${
|
|
9373
|
+
` deepline search --type plays ${shellQuote3(searchQuery)} --json`
|
|
8981
9374
|
);
|
|
8982
9375
|
}
|
|
8983
9376
|
return lines.join("\n");
|
|
@@ -9001,16 +9394,16 @@ async function buildPlayReferenceNotFoundError(input) {
|
|
|
9001
9394
|
suggestions = [];
|
|
9002
9395
|
}
|
|
9003
9396
|
const sourceError = input.sourceError instanceof _chunk7P5AA3SNjs.DeeplineError ? input.sourceError : null;
|
|
9004
|
-
const code = _optionalChain([sourceError, 'optionalAccess',
|
|
9397
|
+
const code = _optionalChain([sourceError, 'optionalAccess', _293 => _293.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
|
|
9005
9398
|
return new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
9006
9399
|
buildPlayReferenceNotFoundMessage({
|
|
9007
9400
|
requested: input.target,
|
|
9008
9401
|
command: input.command,
|
|
9009
9402
|
suggestions
|
|
9010
9403
|
}),
|
|
9011
|
-
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess',
|
|
9404
|
+
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _294 => _294.statusCode]), () => ( 404)),
|
|
9012
9405
|
code,
|
|
9013
|
-
_optionalChain([sourceError, 'optionalAccess',
|
|
9406
|
+
_optionalChain([sourceError, 'optionalAccess', _295 => _295.details])
|
|
9014
9407
|
);
|
|
9015
9408
|
}
|
|
9016
9409
|
async function isMissingRunPlayReferenceError(input) {
|
|
@@ -9062,7 +9455,7 @@ function formatPlayReference(play) {
|
|
|
9062
9455
|
if (play.reference) {
|
|
9063
9456
|
return play.reference;
|
|
9064
9457
|
}
|
|
9065
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
9458
|
+
const ownerSlug = _optionalChain([play, 'access', _296 => _296.ownerSlug, 'optionalAccess', _297 => _297.trim, 'call', _298 => _298()]) || "org";
|
|
9066
9459
|
return `${ownerSlug}/${play.name}`;
|
|
9067
9460
|
}
|
|
9068
9461
|
function formatPlayListReference(play) {
|
|
@@ -9092,7 +9485,7 @@ function materializeRemotePlaySource(input) {
|
|
|
9092
9485
|
return null;
|
|
9093
9486
|
}
|
|
9094
9487
|
const entrySource = input.source.files[input.source.entryFile];
|
|
9095
|
-
if (!_optionalChain([entrySource, 'optionalAccess',
|
|
9488
|
+
if (!_optionalChain([entrySource, 'optionalAccess', _299 => _299.trim, 'call', _300 => _300()])) {
|
|
9096
9489
|
return null;
|
|
9097
9490
|
}
|
|
9098
9491
|
const files = Object.entries(input.source.files);
|
|
@@ -9531,7 +9924,7 @@ async function compileBundledPlayGraphManifests(client, graph) {
|
|
|
9531
9924
|
const child = graph.nodes.get(
|
|
9532
9925
|
normalizePlayPath(dependency.filePath)
|
|
9533
9926
|
);
|
|
9534
|
-
if (!_optionalChain([child, 'optionalAccess',
|
|
9927
|
+
if (!_optionalChain([child, 'optionalAccess', _301 => _301.compilerManifest])) {
|
|
9535
9928
|
throw new Error(
|
|
9536
9929
|
`Missing compiler manifest for imported dependency ${dependency.filePath}.`
|
|
9537
9930
|
);
|
|
@@ -9565,7 +9958,7 @@ function missingPlayDescriptionMessage(node) {
|
|
|
9565
9958
|
].join(" ");
|
|
9566
9959
|
}
|
|
9567
9960
|
function collectMissingPlayDescriptionErrors(graph) {
|
|
9568
|
-
return [...graph.nodes.values()].filter((node) => !_optionalChain([node, 'access',
|
|
9961
|
+
return [...graph.nodes.values()].filter((node) => !_optionalChain([node, 'access', _302 => _302.playDescription, 'optionalAccess', _303 => _303.trim, 'call', _304 => _304()])).map(missingPlayDescriptionMessage);
|
|
9569
9962
|
}
|
|
9570
9963
|
function assertBundledPlayGraphDescriptions(graph) {
|
|
9571
9964
|
const errors = collectMissingPlayDescriptionErrors(graph);
|
|
@@ -9617,7 +10010,7 @@ function formatTimestamp(value) {
|
|
|
9617
10010
|
return date.toISOString();
|
|
9618
10011
|
}
|
|
9619
10012
|
function isoTimestamp(value) {
|
|
9620
|
-
return _nullishCoalesce(_optionalChain([timestampDate, 'call',
|
|
10013
|
+
return _nullishCoalesce(_optionalChain([timestampDate, 'call', _305 => _305(value), 'optionalAccess', _306 => _306.toISOString, 'call', _307 => _307()]), () => ( null));
|
|
9621
10014
|
}
|
|
9622
10015
|
function formatRunLine(run) {
|
|
9623
10016
|
const credits = typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount2(run.billingTotalCredits)} credits` : "\u2014";
|
|
@@ -9625,7 +10018,7 @@ function formatRunLine(run) {
|
|
|
9625
10018
|
}
|
|
9626
10019
|
function playStatusErrorText(status) {
|
|
9627
10020
|
const chunks = [];
|
|
9628
|
-
const progressError = _optionalChain([status, 'access',
|
|
10021
|
+
const progressError = _optionalChain([status, 'access', _308 => _308.progress, 'optionalAccess', _309 => _309.error]);
|
|
9629
10022
|
if (typeof progressError === "string" && progressError.trim()) {
|
|
9630
10023
|
chunks.push(progressError.trim());
|
|
9631
10024
|
}
|
|
@@ -9651,7 +10044,7 @@ function playStatusErrorText(status) {
|
|
|
9651
10044
|
function isRetryablePendingStartFailure(status) {
|
|
9652
10045
|
if (status.status !== "failed") return false;
|
|
9653
10046
|
if (status.runId && status.runId !== "pending") return false;
|
|
9654
|
-
return
|
|
10047
|
+
return _chunkTH3YBIJTjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
9655
10048
|
}
|
|
9656
10049
|
function pendingStartFailureStatus(input) {
|
|
9657
10050
|
const message = input.error instanceof Error ? input.error.message : String(input.error);
|
|
@@ -9678,13 +10071,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
|
9678
10071
|
var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
9679
10072
|
function watchSurfaceReaches(state, provenance, level) {
|
|
9680
10073
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
9681
|
-
if (!
|
|
10074
|
+
if (!_chunkTH3YBIJTjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
9682
10075
|
return false;
|
|
9683
10076
|
}
|
|
9684
|
-
if (
|
|
10077
|
+
if (_chunkTH3YBIJTjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
9685
10078
|
return true;
|
|
9686
10079
|
}
|
|
9687
|
-
return state.verbose === true &&
|
|
10080
|
+
return state.verbose === true && _chunkTH3YBIJTjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
9688
10081
|
}
|
|
9689
10082
|
function getEventPayload(event) {
|
|
9690
10083
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -9707,7 +10100,7 @@ function getRunIdFromLiveEvent(event) {
|
|
|
9707
10100
|
if (typeof directRunId === "string" && directRunId.trim()) {
|
|
9708
10101
|
return directRunId;
|
|
9709
10102
|
}
|
|
9710
|
-
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call',
|
|
10103
|
+
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _310 => _310(payload), 'optionalAccess', _311 => _311.id]);
|
|
9711
10104
|
return typeof packageRunId === "string" && packageRunId.trim() ? packageRunId : null;
|
|
9712
10105
|
}
|
|
9713
10106
|
function eventConfirmsPlayRunLaunch(event) {
|
|
@@ -9728,19 +10121,19 @@ function getStatusFromLiveEvent(event) {
|
|
|
9728
10121
|
return null;
|
|
9729
10122
|
}
|
|
9730
10123
|
const payload = getEventPayload(event);
|
|
9731
|
-
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call',
|
|
10124
|
+
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _312 => _312(payload), 'optionalAccess', _313 => _313.status]))));
|
|
9732
10125
|
}
|
|
9733
10126
|
function readLiveRunField(event, field) {
|
|
9734
10127
|
const payload = getEventPayload(event);
|
|
9735
10128
|
if (field === "waitKind") {
|
|
9736
|
-
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call',
|
|
10129
|
+
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _314 => _314(payload), 'optionalAccess', _315 => _315.wait])));
|
|
9737
10130
|
if (wait && typeof wait === "object" && !Array.isArray(wait)) {
|
|
9738
10131
|
const kind = wait.kind;
|
|
9739
10132
|
if (typeof kind === "string" && kind.trim()) return kind.trim();
|
|
9740
10133
|
}
|
|
9741
10134
|
}
|
|
9742
10135
|
const run = getRunRecordFromPackage(payload);
|
|
9743
|
-
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess',
|
|
10136
|
+
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _316 => _316.progress])].filter(
|
|
9744
10137
|
(value) => Boolean(value && typeof value === "object" && !Array.isArray(value))
|
|
9745
10138
|
);
|
|
9746
10139
|
for (const record3 of records) {
|
|
@@ -9755,7 +10148,7 @@ function getLiveRunStringField(event, field) {
|
|
|
9755
10148
|
function getLiveRunActivity(event) {
|
|
9756
10149
|
const payload = getEventPayload(event);
|
|
9757
10150
|
const run = getRunRecordFromPackage(payload);
|
|
9758
|
-
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess',
|
|
10151
|
+
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _317 => _317.activity])];
|
|
9759
10152
|
for (const candidate of candidates) {
|
|
9760
10153
|
if (candidate && typeof candidate === "object" && !Array.isArray(candidate) && typeof candidate.summary === "string" && candidate.observation && typeof candidate.observation === "object") {
|
|
9761
10154
|
return candidate;
|
|
@@ -9770,9 +10163,9 @@ function getRunLifecycleHint(input) {
|
|
|
9770
10163
|
return null;
|
|
9771
10164
|
}
|
|
9772
10165
|
const activity = getLiveRunActivity(input.event);
|
|
9773
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
10166
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _318 => _318.observation, 'access', _319 => _319.state, 'access', _320 => _320.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
9774
10167
|
const inspect = `'deepline runs get ${runId} --full --json'`;
|
|
9775
|
-
const sleepState = _optionalChain([activity, 'optionalAccess',
|
|
10168
|
+
const sleepState = _optionalChain([activity, 'optionalAccess', _321 => _321.observation, 'access', _322 => _322.state, 'access', _323 => _323.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
|
|
9776
10169
|
if (status === "waiting" && (sleepState !== null || getLiveRunStringField(input.event, "waitKind") === "sleep")) {
|
|
9777
10170
|
const recordedWake = readLiveRunField(input.event, "waitUntil");
|
|
9778
10171
|
const projectedWake = sleepState && sleepState.resumeAt > activity.observation.observedAt ? sleepState.resumeAt : null;
|
|
@@ -9783,7 +10176,7 @@ function getRunLifecycleHint(input) {
|
|
|
9783
10176
|
};
|
|
9784
10177
|
}
|
|
9785
10178
|
const typedEventWaitKind = getLiveRunStringField(input.event, "waitKind");
|
|
9786
|
-
const activityEventWait = _optionalChain([activity, 'optionalAccess',
|
|
10179
|
+
const activityEventWait = _optionalChain([activity, 'optionalAccess', _324 => _324.observation, 'access', _325 => _325.state, 'access', _326 => _326.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
|
|
9787
10180
|
if (status === "waiting" && (typedEventWaitKind === "integration_event" || typedEventWaitKind === "integration_event_batch" || activityEventWait)) {
|
|
9788
10181
|
return {
|
|
9789
10182
|
signature: [
|
|
@@ -9856,12 +10249,12 @@ function getFinalStatusFromLiveEvent(event) {
|
|
|
9856
10249
|
}
|
|
9857
10250
|
const payload = getEventPayload(event);
|
|
9858
10251
|
const packageRun = getRunRecordFromPackage(payload);
|
|
9859
|
-
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess',
|
|
10252
|
+
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _327 => _327.status]))));
|
|
9860
10253
|
if (status !== "completed" && status !== "failed" && status !== "cancelled") {
|
|
9861
10254
|
return null;
|
|
9862
10255
|
}
|
|
9863
|
-
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
9864
|
-
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
10256
|
+
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _328 => _328.id]) === "string" ? packageRun.id : "";
|
|
10257
|
+
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _329 => _329.error]) === "string" ? packageRun.error : void 0;
|
|
9865
10258
|
return {
|
|
9866
10259
|
...payload,
|
|
9867
10260
|
runId,
|
|
@@ -10096,7 +10489,7 @@ function getProgressLinesFromLiveEvent(event) {
|
|
|
10096
10489
|
(count2) => typeof count2 === "number" && Number.isSafeInteger(count2) && count2 >= 0
|
|
10097
10490
|
)) {
|
|
10098
10491
|
lines.push(
|
|
10099
|
-
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess',
|
|
10492
|
+
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _330 => _330.confirmed]) === true ? "" : " (observed)"}`
|
|
10100
10493
|
);
|
|
10101
10494
|
}
|
|
10102
10495
|
const rowOutcomes = readRowOutcomeSummary({
|
|
@@ -10147,7 +10540,7 @@ function getRunningHeartbeatLine(input) {
|
|
|
10147
10540
|
return null;
|
|
10148
10541
|
}
|
|
10149
10542
|
const activity = getLiveRunActivity(input.event);
|
|
10150
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
10543
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _331 => _331.observation, 'access', _332 => _332.state, 'access', _333 => _333.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
10151
10544
|
if (activity && activity.classified !== false && !activityConflictsWithDurableWait) {
|
|
10152
10545
|
return `activity ${input.playName}: ${activity.summary}`;
|
|
10153
10546
|
}
|
|
@@ -10186,7 +10579,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
10186
10579
|
}
|
|
10187
10580
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
10188
10581
|
if (open2 && dashboardUrl) {
|
|
10189
|
-
|
|
10582
|
+
_chunkYEJMVAD3js.openInBrowser.call(void 0, dashboardUrl);
|
|
10190
10583
|
}
|
|
10191
10584
|
}
|
|
10192
10585
|
function printPlayLogLines(input) {
|
|
@@ -10238,7 +10631,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
10238
10631
|
const confirmAdmission = async () => {
|
|
10239
10632
|
if (admissionConfirmed) return;
|
|
10240
10633
|
admissionConfirmed = true;
|
|
10241
|
-
await _optionalChain([input, 'access',
|
|
10634
|
+
await _optionalChain([input, 'access', _334 => _334.onRunAdmitted, 'optionalCall', _335 => _335(input.workflowId)]);
|
|
10242
10635
|
};
|
|
10243
10636
|
const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
|
|
10244
10637
|
const fetchTerminalStatus = async () => {
|
|
@@ -10248,7 +10641,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
10248
10641
|
billing: false
|
|
10249
10642
|
});
|
|
10250
10643
|
} catch (error) {
|
|
10251
|
-
if (
|
|
10644
|
+
if (_chunkTH3YBIJTjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
10252
10645
|
return null;
|
|
10253
10646
|
}
|
|
10254
10647
|
throw error;
|
|
@@ -10410,14 +10803,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10410
10803
|
let timedOut = false;
|
|
10411
10804
|
let emittedDashboardUrl = false;
|
|
10412
10805
|
let lastKnownWorkflowId = "";
|
|
10413
|
-
let launchedRevisionId = _optionalChain([input, 'access',
|
|
10806
|
+
let launchedRevisionId = _optionalChain([input, 'access', _336 => _336.request, 'access', _337 => _337.revisionId, 'optionalAccess', _338 => _338.trim, 'call', _339 => _339()]) || null;
|
|
10414
10807
|
let eventCount = 0;
|
|
10415
10808
|
let firstRunIdMs = null;
|
|
10416
10809
|
let launchConfirmed = false;
|
|
10417
10810
|
const confirmAdmission = async (runId) => {
|
|
10418
10811
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
10419
10812
|
launchConfirmed = true;
|
|
10420
|
-
await _optionalChain([input, 'access',
|
|
10813
|
+
await _optionalChain([input, 'access', _340 => _340.onRunAdmitted, 'optionalCall', _341 => _341(runId)]);
|
|
10421
10814
|
};
|
|
10422
10815
|
let lastPhase = null;
|
|
10423
10816
|
const timeout = input.waitTimeoutMs === null ? null : setTimeout(
|
|
@@ -10437,7 +10830,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10437
10830
|
billing: false
|
|
10438
10831
|
});
|
|
10439
10832
|
} catch (error) {
|
|
10440
|
-
if (
|
|
10833
|
+
if (_chunkTH3YBIJTjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
10441
10834
|
return null;
|
|
10442
10835
|
}
|
|
10443
10836
|
throw error;
|
|
@@ -10469,7 +10862,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10469
10862
|
lastKnownWorkflowId = eventRunId;
|
|
10470
10863
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
10471
10864
|
if (runStartedNow) {
|
|
10472
|
-
await _optionalChain([input, 'access',
|
|
10865
|
+
await _optionalChain([input, 'access', _342 => _342.onRunStarted, 'optionalCall', _343 => _343(eventRunId)]);
|
|
10473
10866
|
}
|
|
10474
10867
|
}
|
|
10475
10868
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -10645,7 +11038,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10645
11038
|
lastPhase
|
|
10646
11039
|
});
|
|
10647
11040
|
}
|
|
10648
|
-
if (lastKnownWorkflowId &&
|
|
11041
|
+
if (lastKnownWorkflowId && _chunkTH3YBIJTjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
10649
11042
|
if (timeout) {
|
|
10650
11043
|
clearTimeout(timeout);
|
|
10651
11044
|
}
|
|
@@ -10681,7 +11074,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10681
11074
|
onRunAdmitted: confirmAdmission
|
|
10682
11075
|
});
|
|
10683
11076
|
}
|
|
10684
|
-
if (!lastKnownWorkflowId &&
|
|
11077
|
+
if (!lastKnownWorkflowId && _chunkTH3YBIJTjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
10685
11078
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
10686
11079
|
phase: "cli.play_start_stream_transient_failure",
|
|
10687
11080
|
ms: Date.now() - startedAt,
|
|
@@ -10780,29 +11173,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
10780
11173
|
"logs"
|
|
10781
11174
|
]);
|
|
10782
11175
|
function formatPlayLogLine(rawLine, state) {
|
|
10783
|
-
const classified =
|
|
11176
|
+
const classified = _chunkTH3YBIJTjs.classifyLogLine.call(void 0, rawLine);
|
|
10784
11177
|
const line = classified.line;
|
|
10785
11178
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
10786
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
11179
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _344 => _344[1]]) ? new Date(timestampMatch[1]) : null;
|
|
10787
11180
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
10788
11181
|
hour12: false,
|
|
10789
11182
|
hour: "2-digit",
|
|
10790
11183
|
minute: "2-digit",
|
|
10791
11184
|
second: "2-digit"
|
|
10792
11185
|
}) : null;
|
|
10793
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
11186
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _345 => _345[2]]), () => ( line));
|
|
10794
11187
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
10795
11188
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
10796
11189
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
10797
11190
|
if (providerWait && !state.verbose) {
|
|
10798
|
-
return
|
|
11191
|
+
return _chunkTH3YBIJTjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
10799
11192
|
}
|
|
10800
11193
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
10801
11194
|
if (mapProgress && !state.verbose) {
|
|
10802
|
-
return
|
|
11195
|
+
return _chunkTH3YBIJTjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
10803
11196
|
}
|
|
10804
11197
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
10805
|
-
if (!
|
|
11198
|
+
if (!_chunkTH3YBIJTjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10806
11199
|
return null;
|
|
10807
11200
|
}
|
|
10808
11201
|
if (state.emittedRunnerStarted) {
|
|
@@ -10815,7 +11208,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
10815
11208
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
10816
11209
|
);
|
|
10817
11210
|
if (mapStart) {
|
|
10818
|
-
if (!
|
|
11211
|
+
if (!_chunkTH3YBIJTjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10819
11212
|
return null;
|
|
10820
11213
|
}
|
|
10821
11214
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -10825,7 +11218,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
10825
11218
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
10826
11219
|
);
|
|
10827
11220
|
if (mapDone) {
|
|
10828
|
-
if (!
|
|
11221
|
+
if (!_chunkTH3YBIJTjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10829
11222
|
return null;
|
|
10830
11223
|
}
|
|
10831
11224
|
const [, results, executed, cached] = mapDone;
|
|
@@ -11007,20 +11400,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
11007
11400
|
function buildRunWarnings(status, rowsInfo) {
|
|
11008
11401
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
11009
11402
|
const result = readRecord(status.result);
|
|
11010
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
11011
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
11403
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _346 => _346._metadata]));
|
|
11404
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _347 => _347.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
11012
11405
|
if (!warning) return false;
|
|
11013
11406
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
11014
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
11407
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _348 => _348.message])).filter(
|
|
11015
11408
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
11016
11409
|
).slice(0, 16) : [];
|
|
11017
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
11410
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _349 => _349.hasRowFailures]) ? [
|
|
11018
11411
|
`${status.status === "completed" ? "Run completed" : "Run ended"} with ${formatInteger(rowOutcomes.failedRows)} failed row(s); inspect the persisted failed rows before treating the output as complete.`
|
|
11019
11412
|
] : [];
|
|
11020
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11413
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _350 => _350.supersededRows]), () => ( 0))) > 0 ? [
|
|
11021
11414
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
11022
11415
|
] : [];
|
|
11023
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
11416
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _351 => _351.totalRows]) === 0) {
|
|
11024
11417
|
return [
|
|
11025
11418
|
...rowOutcomeWarnings,
|
|
11026
11419
|
...supersededRowNotices,
|
|
@@ -11039,7 +11432,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
11039
11432
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
11040
11433
|
}
|
|
11041
11434
|
function buildRunNextCommands(status) {
|
|
11042
|
-
const runId = _optionalChain([status, 'access',
|
|
11435
|
+
const runId = _optionalChain([status, 'access', _352 => _352.runId, 'optionalAccess', _353 => _353.trim, 'call', _354 => _354()]);
|
|
11043
11436
|
if (!runId) {
|
|
11044
11437
|
const playName = extractRunPlayName(status);
|
|
11045
11438
|
return playName ? {
|
|
@@ -11192,14 +11585,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
11192
11585
|
return null;
|
|
11193
11586
|
}
|
|
11194
11587
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
11195
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
11588
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _355 => _355[1]])) {
|
|
11196
11589
|
return lowerToolMatch[1];
|
|
11197
11590
|
}
|
|
11198
11591
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
11199
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
11592
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _356 => _356[1]]), () => ( null));
|
|
11200
11593
|
}
|
|
11201
11594
|
function isInsufficientCreditsBilling(billing) {
|
|
11202
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
11595
|
+
return _optionalChain([billing, 'optionalAccess', _357 => _357.kind]) === "insufficient_credits";
|
|
11203
11596
|
}
|
|
11204
11597
|
function extractBillingForStatus(status, error) {
|
|
11205
11598
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -11239,8 +11632,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
11239
11632
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
11240
11633
|
const progress = input.status.progress;
|
|
11241
11634
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
11242
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
11243
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
11635
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _358 => _358.rows, 'access', _359 => _359.length]))), () => ( null));
|
|
11636
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _360 => _360.totalRows]))), () => ( null));
|
|
11244
11637
|
const lines = [
|
|
11245
11638
|
" status: stopped_insufficient_credits",
|
|
11246
11639
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -11259,7 +11652,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
11259
11652
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
11260
11653
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
11261
11654
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
11262
|
-
const runId = _optionalChain([input, 'access',
|
|
11655
|
+
const runId = _optionalChain([input, 'access', _361 => _361.status, 'access', _362 => _362.runId, 'optionalAccess', _363 => _363.trim, 'call', _364 => _364()]);
|
|
11263
11656
|
if (runId) {
|
|
11264
11657
|
lines.push(` inspect: deepline runs get ${runId} --json`);
|
|
11265
11658
|
lines.push(
|
|
@@ -11341,10 +11734,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
11341
11734
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
11342
11735
|
const progress = status.progress;
|
|
11343
11736
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
11344
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11345
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11346
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11347
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11737
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _365 => _365.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _366 => _366.totalRows]))), () => ( null));
|
|
11738
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _367 => _367.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
11739
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _368 => _368.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
11740
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _369 => _369.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
11348
11741
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
11349
11742
|
const progressPending = getNumericField(progress, "pending");
|
|
11350
11743
|
const pending = _nullishCoalesce((progressPending !== null ? Math.max(0, progressPending - supersededOffset) : null), () => ( (typeof total === "number" && typeof completed === "number" && typeof failed === "number" ? Math.max(0, total - completed - failed - supersededOffset) : null)));
|
|
@@ -11414,7 +11807,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
11414
11807
|
];
|
|
11415
11808
|
}
|
|
11416
11809
|
function normalizeLogsForEnvelope(status) {
|
|
11417
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
11810
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _370 => _370.progress, 'optionalAccess', _371 => _371.logs])) ? status.progress.logs : [];
|
|
11418
11811
|
const totalCount = logs.length;
|
|
11419
11812
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
11420
11813
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -11471,7 +11864,7 @@ function compactPlayStatus(status) {
|
|
|
11471
11864
|
const packaged = getPlayRunPackage(status);
|
|
11472
11865
|
if (packaged) {
|
|
11473
11866
|
const packagedRun = readRecord(packaged.run);
|
|
11474
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
11867
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _372 => _372.error]) === "string" ? packagedRun.error : null;
|
|
11475
11868
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
11476
11869
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
11477
11870
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -11622,7 +12015,7 @@ function formatTopValuesPart(value) {
|
|
|
11622
12015
|
}
|
|
11623
12016
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
11624
12017
|
const record3 = readRecord(summary);
|
|
11625
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12018
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _373 => _373.columnStats]));
|
|
11626
12019
|
if (!record3 || !columnStats) {
|
|
11627
12020
|
return [];
|
|
11628
12021
|
}
|
|
@@ -11710,7 +12103,7 @@ function packageDatasetRecords(packaged) {
|
|
|
11710
12103
|
if (catalog.length > 0) return catalog;
|
|
11711
12104
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
11712
12105
|
const output = readRecord(step.output);
|
|
11713
|
-
return _optionalChain([output, 'optionalAccess',
|
|
12106
|
+
return _optionalChain([output, 'optionalAccess', _374 => _374.kind]) === "dataset" ? [output] : [];
|
|
11714
12107
|
});
|
|
11715
12108
|
}
|
|
11716
12109
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -11719,7 +12112,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
11719
12112
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
11720
12113
|
for (const outputValue of Object.values(outputs)) {
|
|
11721
12114
|
const output = readRecord(outputValue);
|
|
11722
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
12115
|
+
if (_optionalChain([output, 'optionalAccess', _375 => _375.kind]) !== "dataset") continue;
|
|
11723
12116
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
11724
12117
|
datasetIds.add(output.datasetId.trim());
|
|
11725
12118
|
}
|
|
@@ -11755,7 +12148,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
11755
12148
|
}
|
|
11756
12149
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
11757
12150
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
11758
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
12151
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _376 => _376.includeSummary]), () => ( true));
|
|
11759
12152
|
const lines = [];
|
|
11760
12153
|
const steps = readRecordArray(packaged.steps);
|
|
11761
12154
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -11764,10 +12157,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11764
12157
|
for (const step of steps) {
|
|
11765
12158
|
if (step.kind !== "dataset") continue;
|
|
11766
12159
|
const output = readRecord(step.output);
|
|
11767
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
12160
|
+
if (typeof _optionalChain([output, 'optionalAccess', _377 => _377.datasetId]) === "string") {
|
|
11768
12161
|
stepsByDatasetId.set(output.datasetId, step);
|
|
11769
12162
|
}
|
|
11770
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
12163
|
+
if (typeof _optionalChain([output, 'optionalAccess', _378 => _378.path]) === "string") {
|
|
11771
12164
|
stepsByPath.set(output.path, step);
|
|
11772
12165
|
}
|
|
11773
12166
|
if (typeof step.id === "string") {
|
|
@@ -11781,8 +12174,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11781
12174
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
11782
12175
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
11783
12176
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
11784
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
11785
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
12177
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _379 => _379.complete]) === false;
|
|
12178
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _380 => _380.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
11786
12179
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
11787
12180
|
if (countUnconfirmed) {
|
|
11788
12181
|
lines.push(
|
|
@@ -11800,7 +12193,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11800
12193
|
}
|
|
11801
12194
|
}
|
|
11802
12195
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
11803
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
12196
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _381 => _381.progress]));
|
|
11804
12197
|
if (progress) {
|
|
11805
12198
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
11806
12199
|
}
|
|
@@ -11814,10 +12207,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11814
12207
|
}
|
|
11815
12208
|
const exportAction = readRecord(actions2.exportCsv);
|
|
11816
12209
|
const exportCommand = actionToCommand(exportAction);
|
|
11817
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
12210
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _382 => _382.scope]));
|
|
11818
12211
|
const queryAction = readRecord(actions2.query);
|
|
11819
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
11820
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
12212
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _383 => _383.scope]));
|
|
12213
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _384 => _384.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
11821
12214
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
11822
12215
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
11823
12216
|
if (runQueryCommand) {
|
|
@@ -11829,11 +12222,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11829
12222
|
}
|
|
11830
12223
|
if (exportCommand) {
|
|
11831
12224
|
lines.push(
|
|
11832
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
12225
|
+
_optionalChain([exportScope, 'optionalAccess', _385 => _385.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
11833
12226
|
);
|
|
11834
12227
|
}
|
|
11835
12228
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
11836
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
12229
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _386 => _386.reason]) === "string" && typeof unavailable.message === "string") {
|
|
11837
12230
|
lines.push(
|
|
11838
12231
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
11839
12232
|
);
|
|
@@ -11850,7 +12243,7 @@ function packageSavedRowCount(packaged) {
|
|
|
11850
12243
|
}
|
|
11851
12244
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
11852
12245
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
11853
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
12246
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _387 => _387.exec, 'call', _388 => _388(message), 'optionalAccess', _389 => _389[1]]);
|
|
11854
12247
|
if (configuredSeconds) {
|
|
11855
12248
|
const seconds = Number(configuredSeconds);
|
|
11856
12249
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -11897,7 +12290,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
11897
12290
|
if (!outputs) return [];
|
|
11898
12291
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
11899
12292
|
const record3 = readRecord(output);
|
|
11900
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
12293
|
+
return _optionalChain([record3, 'optionalAccess', _390 => _390.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _391 => _391.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
11901
12294
|
});
|
|
11902
12295
|
if (returned.length === 0) return [];
|
|
11903
12296
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -11917,10 +12310,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
11917
12310
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
11918
12311
|
);
|
|
11919
12312
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
11920
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
12313
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _392 => _392.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _393 => _393.path]) === path
|
|
11921
12314
|
);
|
|
11922
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
11923
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
12315
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _394 => _394.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _395 => _395.preview]))));
|
|
12316
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _396 => _396.rows])) ? preview.rows.slice(0, 2) : [];
|
|
11924
12317
|
if (rows.length > 0) {
|
|
11925
12318
|
lines.push(` sample rows (${rows.length}):`);
|
|
11926
12319
|
lines.push(
|
|
@@ -11946,7 +12339,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
11946
12339
|
return lines;
|
|
11947
12340
|
}
|
|
11948
12341
|
function authoredPackageStackFrames(packaged) {
|
|
11949
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
12342
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _397 => _397.trim, 'call', _398 => _398()])));
|
|
11950
12343
|
if (!stack) return [];
|
|
11951
12344
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
11952
12345
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -11978,9 +12371,9 @@ function activityIsoTimestamp(value) {
|
|
|
11978
12371
|
}
|
|
11979
12372
|
function buildRunActivityTextLines(run) {
|
|
11980
12373
|
const activity = readRecord(run.activity);
|
|
11981
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
11982
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
11983
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
12374
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _399 => _399.observation]));
|
|
12375
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _400 => _400.state]));
|
|
12376
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _401 => _401.target]));
|
|
11984
12377
|
if (!activity || !observation || !state) return [];
|
|
11985
12378
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
11986
12379
|
if (kind === "completed") return [];
|
|
@@ -12025,11 +12418,11 @@ function buildRunActivityTextLines(run) {
|
|
|
12025
12418
|
}
|
|
12026
12419
|
function formatObservedRunCounter(value) {
|
|
12027
12420
|
const counter = readRecord(value);
|
|
12028
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
12421
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _402 => _402.value]);
|
|
12029
12422
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
12030
12423
|
return "unknown";
|
|
12031
12424
|
}
|
|
12032
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
12425
|
+
return _optionalChain([counter, 'optionalAccess', _403 => _403.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
12033
12426
|
}
|
|
12034
12427
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
12035
12428
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -12042,13 +12435,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
12042
12435
|
);
|
|
12043
12436
|
}
|
|
12044
12437
|
const source = readRecord(evidence.source);
|
|
12045
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
12438
|
+
if (_optionalChain([source, 'optionalAccess', _404 => _404.aligned]) === false) {
|
|
12046
12439
|
lines.push(
|
|
12047
12440
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
12048
12441
|
);
|
|
12049
12442
|
}
|
|
12050
12443
|
const focus = readRecord(evidence.focusStep);
|
|
12051
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
12444
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _405 => _405.rows]));
|
|
12052
12445
|
if (focus) {
|
|
12053
12446
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
12054
12447
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -12056,7 +12449,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
12056
12449
|
const known = readRecordArray(packaged.steps).find(
|
|
12057
12450
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
12058
12451
|
);
|
|
12059
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
12452
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _406 => _406.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
12060
12453
|
deriveNodeExecutionState({
|
|
12061
12454
|
reported: {
|
|
12062
12455
|
status: focus.status.trim(),
|
|
@@ -12066,7 +12459,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
12066
12459
|
total: rows.total
|
|
12067
12460
|
} : null
|
|
12068
12461
|
},
|
|
12069
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
12462
|
+
runStatus: _optionalChain([run, 'optionalAccess', _407 => _407.status])
|
|
12070
12463
|
})
|
|
12071
12464
|
) : null;
|
|
12072
12465
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -12114,7 +12507,7 @@ function formatRecentRunLogLines(value) {
|
|
|
12114
12507
|
(line) => typeof line === "string"
|
|
12115
12508
|
);
|
|
12116
12509
|
if (tail.length === 0) return [];
|
|
12117
|
-
const shown = tail.map((line) =>
|
|
12510
|
+
const shown = tail.map((line) => _chunkTH3YBIJTjs.classifyLogLine.call(void 0, line)).filter(
|
|
12118
12511
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
12119
12512
|
).slice(-8);
|
|
12120
12513
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -12158,7 +12551,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12158
12551
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
12159
12552
|
}
|
|
12160
12553
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
12161
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
12554
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _408 => _408.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
12162
12555
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
12163
12556
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
12164
12557
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -12169,11 +12562,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12169
12562
|
}
|
|
12170
12563
|
}
|
|
12171
12564
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
12172
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
12565
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _409 => _409.entries])) ? failedLogs.entries.filter(
|
|
12173
12566
|
(entry) => typeof entry === "string"
|
|
12174
12567
|
) : [];
|
|
12175
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
12176
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
12568
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _410 => _410.association]) === "string" ? failedLogs.association : null;
|
|
12569
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _411 => _411.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
12177
12570
|
if (failedLogEntries.length > 0) {
|
|
12178
12571
|
lines.push(" failed logs:");
|
|
12179
12572
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -12192,8 +12585,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12192
12585
|
)
|
|
12193
12586
|
).slice(0, 16) : [];
|
|
12194
12587
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
12195
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
12196
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
12588
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _412 => _412.next]));
|
|
12589
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _413 => _413.logs]) === "string") {
|
|
12197
12590
|
lines.push(
|
|
12198
12591
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
12199
12592
|
);
|
|
@@ -12221,20 +12614,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12221
12614
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
12222
12615
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
12223
12616
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
12224
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
12225
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
12617
|
+
const preview = _optionalChain([output, 'optionalAccess', _414 => _414.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
12618
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _415 => _415.rows])) ? preview.rows.length : null;
|
|
12226
12619
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
12227
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
12620
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _416 => _416.summary])));
|
|
12228
12621
|
if (previewRows !== null) {
|
|
12229
12622
|
lines.push(
|
|
12230
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
12623
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _417 => _417.truncated]) ? " truncated" : ""}`
|
|
12231
12624
|
);
|
|
12232
12625
|
}
|
|
12233
12626
|
}
|
|
12234
12627
|
const inspectCommand = actionToCommand(next.inspect);
|
|
12235
12628
|
const fullResultCommand = actionToCommand(next.full);
|
|
12236
12629
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
12237
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
12630
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _418 => _418(dataset.actions), 'optionalAccess', _419 => _419.exportCsv])))
|
|
12238
12631
|
);
|
|
12239
12632
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
12240
12633
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -12297,7 +12690,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
12297
12690
|
}
|
|
12298
12691
|
function buildBillingRollupTextLines(status) {
|
|
12299
12692
|
const billing = status.billing;
|
|
12300
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
12693
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _420 => _420.rollup]);
|
|
12301
12694
|
if (!rollup) return [];
|
|
12302
12695
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
12303
12696
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -12342,7 +12735,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
12342
12735
|
const overview = buildRunOverview(status);
|
|
12343
12736
|
const { run } = overview;
|
|
12344
12737
|
const failed = run.status === "failed";
|
|
12345
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
12738
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _421 => _421.rowOutcomes, 'optionalAccess', _422 => _422.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
12346
12739
|
const lines = [
|
|
12347
12740
|
`${label} ${_nullishCoalesce(_nullishCoalesce(run.playName, () => ( status.playName)), () => ( "Play"))}`,
|
|
12348
12741
|
`Run: ${run.id}`
|
|
@@ -12362,7 +12755,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
12362
12755
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
12363
12756
|
);
|
|
12364
12757
|
}
|
|
12365
|
-
if (_optionalChain([overview, 'access',
|
|
12758
|
+
if (_optionalChain([overview, 'access', _423 => _423.rowOutcomes, 'optionalAccess', _424 => _424.hasRowFailures])) {
|
|
12366
12759
|
lines.push(
|
|
12367
12760
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
12368
12761
|
);
|
|
@@ -12391,16 +12784,16 @@ function buildPlayCompletionTextLines(status) {
|
|
|
12391
12784
|
}
|
|
12392
12785
|
function writePlayResult(status, jsonOutput, options) {
|
|
12393
12786
|
const packaged = getPlayRunPackage(status);
|
|
12394
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
12787
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _425 => _425.hits]), () => ( null));
|
|
12395
12788
|
if (jsonOutput) {
|
|
12396
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
12397
|
-
|
|
12789
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _426 => _426.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
12790
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
12398
12791
|
hits ? { ...payload2, hits } : payload2,
|
|
12399
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
12792
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _427 => _427.jsonFields]) }
|
|
12400
12793
|
);
|
|
12401
12794
|
return;
|
|
12402
12795
|
}
|
|
12403
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
12796
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _428 => _428.fullJson])) {
|
|
12404
12797
|
const {
|
|
12405
12798
|
logs: _logs,
|
|
12406
12799
|
failedLogs: _failedLogs,
|
|
@@ -12410,7 +12803,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12410
12803
|
...buildPlayCompletionTextLines(status),
|
|
12411
12804
|
...formatRunHitsLines(hits)
|
|
12412
12805
|
];
|
|
12413
|
-
|
|
12806
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, displayPackage, {
|
|
12414
12807
|
json: false,
|
|
12415
12808
|
text: `${lines2.join("\n")}
|
|
12416
12809
|
`
|
|
@@ -12460,8 +12853,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12460
12853
|
lines.push(...renderedServerView.actions);
|
|
12461
12854
|
lines.push(...buildBillingRollupTextLines(status));
|
|
12462
12855
|
const compact = compactPlayStatus(status);
|
|
12463
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
12464
|
-
|
|
12856
|
+
const payload = _optionalChain([options, 'optionalAccess', _429 => _429.fullJson]) ? status : compact;
|
|
12857
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
12465
12858
|
{
|
|
12466
12859
|
...payload,
|
|
12467
12860
|
render: {
|
|
@@ -12617,14 +13010,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
12617
13010
|
return columns;
|
|
12618
13011
|
}
|
|
12619
13012
|
function sqlSafeExportColumnName(id) {
|
|
12620
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
13013
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _430 => _430.trim, 'call', _431 => _431(), 'access', _432 => _432.match, 'call', _433 => _433(/^_+/), 'optionalAccess', _434 => _434[0]]), () => ( ""));
|
|
12621
13014
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
12622
13015
|
const safe = `${prefix}${normalized || "column"}`;
|
|
12623
13016
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
12624
13017
|
}
|
|
12625
13018
|
async function fetchBackingDatasetRows(input) {
|
|
12626
13019
|
const playName = extractRunPlayName(input.status);
|
|
12627
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
13020
|
+
const tableNamespace = _optionalChain([input, 'access', _435 => _435.rowsInfo, 'access', _436 => _436.tableNamespace, 'optionalAccess', _437 => _437.trim, 'call', _438 => _438()]);
|
|
12628
13021
|
if (!playName || !tableNamespace) {
|
|
12629
13022
|
return null;
|
|
12630
13023
|
}
|
|
@@ -12663,7 +13056,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
12663
13056
|
seenEnvelopeKeys.add(key);
|
|
12664
13057
|
}
|
|
12665
13058
|
sheetRows.push(...page.rows);
|
|
12666
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
13059
|
+
const summaryTotal = _optionalChain([page, 'access', _439 => _439.summary, 'optionalAccess', _440 => _440.stats, 'optionalAccess', _441 => _441.total]);
|
|
12667
13060
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
12668
13061
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
12669
13062
|
}
|
|
@@ -12823,8 +13216,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
12823
13216
|
path: dataset.exportFile(outPath, options),
|
|
12824
13217
|
rowsInfo: dataset.info(),
|
|
12825
13218
|
currentTable: false,
|
|
12826
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
12827
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
13219
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _442 => _442.source]), () => ( null)),
|
|
13220
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _443 => _443.info, 'call', _444 => _444()]), () => ( null))
|
|
12828
13221
|
};
|
|
12829
13222
|
};
|
|
12830
13223
|
const run = Run.open({
|
|
@@ -12836,7 +13229,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
12836
13229
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
12837
13230
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
12838
13231
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
12839
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
13232
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _445 => _445.info, 'call', _446 => _446()]), () => ( null));
|
|
12840
13233
|
if (!selectedDataset && options.datasetPath) {
|
|
12841
13234
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
12842
13235
|
const commands = datasetChoiceLines({
|
|
@@ -12948,7 +13341,7 @@ ${commands.join("\n")}`,
|
|
|
12948
13341
|
throw error;
|
|
12949
13342
|
}
|
|
12950
13343
|
}
|
|
12951
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
13344
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _447 => _447.complete])) {
|
|
12952
13345
|
const guarded2 = assertDatasetHasExportableRows({
|
|
12953
13346
|
rowsInfo: fetchedRowsInfo,
|
|
12954
13347
|
status,
|
|
@@ -13007,7 +13400,7 @@ function extractActiveRunsFromError(error) {
|
|
|
13007
13400
|
if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError)) {
|
|
13008
13401
|
return [];
|
|
13009
13402
|
}
|
|
13010
|
-
const response = _optionalChain([error, 'access',
|
|
13403
|
+
const response = _optionalChain([error, 'access', _448 => _448.details, 'optionalAccess', _449 => _449.response]);
|
|
13011
13404
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
13012
13405
|
return [];
|
|
13013
13406
|
}
|
|
@@ -13128,8 +13521,8 @@ function renderServerResultView(value) {
|
|
|
13128
13521
|
return { lines: [], actions: [] };
|
|
13129
13522
|
}
|
|
13130
13523
|
const view = value;
|
|
13131
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
13132
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
13524
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _450 => _450.render, 'optionalAccess', _451 => _451.sections])) ? view.render.sections : [];
|
|
13525
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _452 => _452.render, 'optionalAccess', _453 => _453.actions])) ? view.render.actions : [];
|
|
13133
13526
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
13134
13527
|
const lines2 = [];
|
|
13135
13528
|
for (const section of renderedSections) {
|
|
@@ -13167,7 +13560,7 @@ function renderServerResultView(value) {
|
|
|
13167
13560
|
}
|
|
13168
13561
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
13169
13562
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
13170
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
13563
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _454 => _454.queryCommand]) === "string") {
|
|
13171
13564
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
13172
13565
|
}
|
|
13173
13566
|
if (tables.length > 0) {
|
|
@@ -13221,7 +13614,7 @@ function writeStartedPlayRun(input) {
|
|
|
13221
13614
|
dashboardUrl: input.dashboardUrl,
|
|
13222
13615
|
package: input.package
|
|
13223
13616
|
};
|
|
13224
|
-
|
|
13617
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
13225
13618
|
json: true,
|
|
13226
13619
|
fields: input.jsonFields
|
|
13227
13620
|
});
|
|
@@ -13243,7 +13636,7 @@ function writeStartedPlayRun(input) {
|
|
|
13243
13636
|
input.progress.writeLine(output2, process.stdout);
|
|
13244
13637
|
return;
|
|
13245
13638
|
}
|
|
13246
|
-
|
|
13639
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, input.package, {
|
|
13247
13640
|
json: false,
|
|
13248
13641
|
text: `${output2}
|
|
13249
13642
|
`
|
|
@@ -13272,7 +13665,7 @@ function writeStartedPlayRun(input) {
|
|
|
13272
13665
|
) ? [`Stop: deepline runs stop ${shellSingleQuote(input.runId)} --json`] : []
|
|
13273
13666
|
];
|
|
13274
13667
|
if (input.jsonOutput) {
|
|
13275
|
-
|
|
13668
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
13276
13669
|
return;
|
|
13277
13670
|
}
|
|
13278
13671
|
if (input.dashboardUrl) {
|
|
@@ -13283,7 +13676,7 @@ function writeStartedPlayRun(input) {
|
|
|
13283
13676
|
input.progress.writeLine(output, process.stdout);
|
|
13284
13677
|
return;
|
|
13285
13678
|
}
|
|
13286
|
-
|
|
13679
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
13287
13680
|
{
|
|
13288
13681
|
...payload,
|
|
13289
13682
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -13293,7 +13686,7 @@ function writeStartedPlayRun(input) {
|
|
|
13293
13686
|
);
|
|
13294
13687
|
}
|
|
13295
13688
|
function parsePlayRunOptions(args) {
|
|
13296
|
-
const selection =
|
|
13689
|
+
const selection = _chunkYEJMVAD3js.parseJsonFields.call(void 0, args, "run");
|
|
13297
13690
|
args = selection.args;
|
|
13298
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.";
|
|
13299
13692
|
let filePath = null;
|
|
@@ -13302,7 +13695,7 @@ function parsePlayRunOptions(args) {
|
|
|
13302
13695
|
let revisionId = null;
|
|
13303
13696
|
let revisionSelector = null;
|
|
13304
13697
|
const watch = !args.includes("--no-wait");
|
|
13305
|
-
let jsonOutput = watch ? args.includes("--json") :
|
|
13698
|
+
let jsonOutput = watch ? args.includes("--json") : _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
13306
13699
|
const fullJson = args.includes("--full");
|
|
13307
13700
|
const force = args.includes("--force");
|
|
13308
13701
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -13349,7 +13742,7 @@ function parsePlayRunOptions(args) {
|
|
|
13349
13742
|
"--log-level requires one of: debug, info, warn, error."
|
|
13350
13743
|
);
|
|
13351
13744
|
}
|
|
13352
|
-
const parsed =
|
|
13745
|
+
const parsed = _chunkTH3YBIJTjs.parseLogLevel.call(void 0, value);
|
|
13353
13746
|
if (!parsed) {
|
|
13354
13747
|
throw new Error(
|
|
13355
13748
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13576,7 +13969,7 @@ function parsePlayRunOptions(args) {
|
|
|
13576
13969
|
};
|
|
13577
13970
|
}
|
|
13578
13971
|
function parsePlayCheckOptions(args) {
|
|
13579
|
-
const selection =
|
|
13972
|
+
const selection = _chunkYEJMVAD3js.parseJsonFields.call(void 0, args, "check");
|
|
13580
13973
|
args = selection.args;
|
|
13581
13974
|
const target = args[0];
|
|
13582
13975
|
if (!target || target.startsWith("-")) {
|
|
@@ -13588,7 +13981,7 @@ function parsePlayCheckOptions(args) {
|
|
|
13588
13981
|
if (arg !== "--json" && arg !== "--full")
|
|
13589
13982
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
13590
13983
|
}
|
|
13591
|
-
const jsonOutput =
|
|
13984
|
+
const jsonOutput = _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
13592
13985
|
return {
|
|
13593
13986
|
target,
|
|
13594
13987
|
jsonOutput,
|
|
@@ -13664,7 +14057,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
13664
14057
|
useLatest,
|
|
13665
14058
|
expectedArtifactHash,
|
|
13666
14059
|
dryRun,
|
|
13667
|
-
jsonOutput:
|
|
14060
|
+
jsonOutput: _chunkYEJMVAD3js.argsWantJson.call(void 0, args)
|
|
13668
14061
|
};
|
|
13669
14062
|
}
|
|
13670
14063
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -13705,7 +14098,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
13705
14098
|
target,
|
|
13706
14099
|
expectedArtifactHash,
|
|
13707
14100
|
dryRun,
|
|
13708
|
-
jsonOutput:
|
|
14101
|
+
jsonOutput: _chunkYEJMVAD3js.argsWantJson.call(void 0, args)
|
|
13709
14102
|
};
|
|
13710
14103
|
}
|
|
13711
14104
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -13758,7 +14151,7 @@ function checkHintExpression(value) {
|
|
|
13758
14151
|
return stringValue3(value).replace(/^toolExecutionResult\./, "result.");
|
|
13759
14152
|
}
|
|
13760
14153
|
function checkHintRawPath(value) {
|
|
13761
|
-
return _optionalChain([value, 'optionalAccess',
|
|
14154
|
+
return _optionalChain([value, 'optionalAccess', _455 => _455.startsWith, 'call', _456 => _456("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
13762
14155
|
}
|
|
13763
14156
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
13764
14157
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -13833,30 +14226,30 @@ function cronExecutionLabel(status) {
|
|
|
13833
14226
|
}
|
|
13834
14227
|
function readLiveCronMetadata(play) {
|
|
13835
14228
|
const record3 = readRecord(play);
|
|
13836
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
14229
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _457 => _457.triggerMetadata]));
|
|
13837
14230
|
return {
|
|
13838
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13839
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13840
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13841
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13842
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14231
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _458 => _458.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
14232
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _459 => _459.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
14233
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _460 => _460.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
14234
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _461 => _461.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
14235
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _462 => _462.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
13843
14236
|
};
|
|
13844
14237
|
}
|
|
13845
14238
|
function liveTriggerStatusLines(status, play) {
|
|
13846
14239
|
const cron = readLiveCronMetadata(play);
|
|
13847
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
14240
|
+
if (!_optionalChain([status, 'optionalAccess', _463 => _463.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _464 => _464.webhook])) return [];
|
|
13848
14241
|
const lines = [];
|
|
13849
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
14242
|
+
if (_optionalChain([status, 'optionalAccess', _465 => _465.cron]) || cron.schedule) {
|
|
13850
14243
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
13851
14244
|
lines.push(
|
|
13852
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
14245
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _466 => _466.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
13853
14246
|
);
|
|
13854
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
14247
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _467 => _467.cron]) === "active") {
|
|
13855
14248
|
lines.push(
|
|
13856
14249
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
13857
14250
|
);
|
|
13858
14251
|
}
|
|
13859
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
14252
|
+
if (_optionalChain([status, 'optionalAccess', _468 => _468.blockedReason])) {
|
|
13860
14253
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
13861
14254
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
13862
14255
|
lines.push(
|
|
@@ -13872,7 +14265,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
13872
14265
|
);
|
|
13873
14266
|
}
|
|
13874
14267
|
}
|
|
13875
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
14268
|
+
if (_optionalChain([status, 'optionalAccess', _469 => _469.webhook])) {
|
|
13876
14269
|
lines.push(` Webhook: ${status.webhook}`);
|
|
13877
14270
|
}
|
|
13878
14271
|
return lines;
|
|
@@ -13880,11 +14273,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
13880
14273
|
function triggerStatusFromMetadata(value) {
|
|
13881
14274
|
const metadata = readRecord(value);
|
|
13882
14275
|
return {
|
|
13883
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13884
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13885
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13886
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
13887
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14276
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _470 => _470.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
14277
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _471 => _471.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
14278
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _472 => _472.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
14279
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _473 => _473.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
14280
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _474 => _474.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
13888
14281
|
};
|
|
13889
14282
|
}
|
|
13890
14283
|
function printPublishReceipt(input) {
|
|
@@ -13916,7 +14309,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
13916
14309
|
async function handlePlayCheck(args) {
|
|
13917
14310
|
const options = parsePlayCheckOptions(args);
|
|
13918
14311
|
if (!isFileTarget(options.target)) {
|
|
13919
|
-
const client = new (0,
|
|
14312
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
13920
14313
|
try {
|
|
13921
14314
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
13922
14315
|
command: "check"
|
|
@@ -13940,12 +14333,12 @@ async function handlePlayCheck(args) {
|
|
|
13940
14333
|
runtimeLimit: _nullishCoalesce(play.runtimeLimit, () => ( null)),
|
|
13941
14334
|
activeScheduledPlays: _nullishCoalesce(play.activeScheduledPlays, () => ( null)),
|
|
13942
14335
|
actions: {
|
|
13943
|
-
getFullCheckCmd: `deepline plays check ${
|
|
14336
|
+
getFullCheckCmd: `deepline plays check ${shellQuote3(options.target)} --full --json`,
|
|
13944
14337
|
...play.runCommand ? { runCmd: play.runCommand } : {}
|
|
13945
14338
|
},
|
|
13946
14339
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
13947
14340
|
};
|
|
13948
|
-
|
|
14341
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, result, {
|
|
13949
14342
|
json: options.jsonOutput,
|
|
13950
14343
|
fields: options.jsonFields,
|
|
13951
14344
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -13955,7 +14348,7 @@ async function handlePlayCheck(args) {
|
|
|
13955
14348
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
13956
14349
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
13957
14350
|
if (options.jsonOutput) {
|
|
13958
|
-
|
|
14351
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
13959
14352
|
{
|
|
13960
14353
|
kind: "play_check",
|
|
13961
14354
|
checked: "named_contract",
|
|
@@ -13994,10 +14387,10 @@ async function handlePlayCheck(args) {
|
|
|
13994
14387
|
outcomes,
|
|
13995
14388
|
target: options.target,
|
|
13996
14389
|
full: options.full,
|
|
13997
|
-
detailsCommand: `deepline plays check ${
|
|
13998
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
14390
|
+
detailsCommand: `deepline plays check ${shellQuote3(options.target)} --full --json`,
|
|
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
|
|
13999
14392
|
});
|
|
14000
|
-
|
|
14393
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, output, {
|
|
14001
14394
|
json: options.jsonOutput,
|
|
14002
14395
|
fields: options.jsonFields,
|
|
14003
14396
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -14010,7 +14403,7 @@ function resolvePlayCheckExportNames(sourceCode) {
|
|
|
14010
14403
|
return exports.map((entry) => entry.name);
|
|
14011
14404
|
}
|
|
14012
14405
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
14013
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
14406
|
+
const rawEdition = _optionalChain([process, 'access', _477 => _477.env, 'access', _478 => _478.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _479 => _479.trim, 'call', _480 => _480()]);
|
|
14014
14407
|
if (!rawEdition) return artifact;
|
|
14015
14408
|
if (!/^\d+$/.test(rawEdition)) {
|
|
14016
14409
|
throw new Error(
|
|
@@ -14059,7 +14452,7 @@ async function checkOneExportedPlay(input) {
|
|
|
14059
14452
|
result: { valid: false, errors: descriptionErrors }
|
|
14060
14453
|
};
|
|
14061
14454
|
}
|
|
14062
|
-
const client = new (0,
|
|
14455
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
14063
14456
|
const integrationMode = resolveEvalIntegrationMode();
|
|
14064
14457
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
14065
14458
|
playName: node.playName,
|
|
@@ -14096,7 +14489,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14096
14489
|
if (options.target.kind !== "file") {
|
|
14097
14490
|
throw new Error("Expected a file-backed play run target.");
|
|
14098
14491
|
}
|
|
14099
|
-
const client = new (0,
|
|
14492
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)(playRunClientOptions(options));
|
|
14100
14493
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14101
14494
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
14102
14495
|
progress.phase("compiling play");
|
|
@@ -14168,7 +14561,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14168
14561
|
);
|
|
14169
14562
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
14170
14563
|
const fileInputBindings = _chunkLA46MMTLjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
14171
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
14564
|
+
_optionalChain([compilerManifest, 'optionalAccess', _481 => _481.staticPipeline])
|
|
14172
14565
|
);
|
|
14173
14566
|
const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
14174
14567
|
"cli.play_stage_inputs",
|
|
@@ -14228,8 +14621,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14228
14621
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
14229
14622
|
open: options.open,
|
|
14230
14623
|
progress,
|
|
14231
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
14232
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
14624
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _482 => _482.onRunStarted]),
|
|
14625
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _483 => _483.onRunAdmitted])
|
|
14233
14626
|
}).catch(async (error) => {
|
|
14234
14627
|
throw await normalizePlayStartError(client, error, playName);
|
|
14235
14628
|
})
|
|
@@ -14251,7 +14644,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14251
14644
|
),
|
|
14252
14645
|
options
|
|
14253
14646
|
);
|
|
14254
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
14647
|
+
_optionalChain([hooks, 'optionalAccess', _484 => _484.onTerminalStatus, 'optionalCall', _485 => _485(outputStatus)]);
|
|
14255
14648
|
traceCliSync(
|
|
14256
14649
|
"cli.play_write_result",
|
|
14257
14650
|
{ targetKind: "file", playName },
|
|
@@ -14270,8 +14663,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14270
14663
|
throw await normalizePlayStartError(client, error, playName);
|
|
14271
14664
|
})
|
|
14272
14665
|
);
|
|
14273
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14274
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14666
|
+
await _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunStarted, 'optionalCall', _487 => _487(started.workflowId)]);
|
|
14667
|
+
await _optionalChain([hooks, 'optionalAccess', _488 => _488.onRunAdmitted, 'optionalCall', _489 => _489(started.workflowId)]);
|
|
14275
14668
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
14276
14669
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
14277
14670
|
progress.phase("started run");
|
|
@@ -14299,7 +14692,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
14299
14692
|
if (input.selector === "latest") {
|
|
14300
14693
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
14301
14694
|
const latest = versions[0];
|
|
14302
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
14695
|
+
if (!_optionalChain([latest, 'optionalAccess', _490 => _490._id])) {
|
|
14303
14696
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
14304
14697
|
}
|
|
14305
14698
|
return latest._id;
|
|
@@ -14310,7 +14703,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
14310
14703
|
if (options.target.kind !== "name") {
|
|
14311
14704
|
throw new Error("Expected a named play run target.");
|
|
14312
14705
|
}
|
|
14313
|
-
const client = new (0,
|
|
14706
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)(playRunClientOptions(options));
|
|
14314
14707
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14315
14708
|
const playName = options.target.name;
|
|
14316
14709
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
@@ -14416,8 +14809,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
14416
14809
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
14417
14810
|
open: options.open,
|
|
14418
14811
|
progress,
|
|
14419
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
14420
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
14812
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _491 => _491.onRunStarted]),
|
|
14813
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _492 => _492.onRunAdmitted])
|
|
14421
14814
|
}).catch(async (error) => {
|
|
14422
14815
|
throw await normalizePlayStartError(client, error, playName, {
|
|
14423
14816
|
suggestMissingPlay: true
|
|
@@ -14442,7 +14835,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
14442
14835
|
options,
|
|
14443
14836
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
14444
14837
|
);
|
|
14445
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
14838
|
+
_optionalChain([hooks, 'optionalAccess', _493 => _493.onTerminalStatus, 'optionalCall', _494 => _494(outputStatus)]);
|
|
14446
14839
|
traceCliSync(
|
|
14447
14840
|
"cli.play_write_result",
|
|
14448
14841
|
{ targetKind: "name", playName },
|
|
@@ -14463,8 +14856,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
14463
14856
|
});
|
|
14464
14857
|
})
|
|
14465
14858
|
);
|
|
14466
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14467
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14859
|
+
await _optionalChain([hooks, 'optionalAccess', _495 => _495.onRunStarted, 'optionalCall', _496 => _496(started.workflowId)]);
|
|
14860
|
+
await _optionalChain([hooks, 'optionalAccess', _497 => _497.onRunAdmitted, 'optionalCall', _498 => _498(started.workflowId)]);
|
|
14468
14861
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
14469
14862
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
14470
14863
|
progress.phase("started run");
|
|
@@ -14502,7 +14895,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
14502
14895
|
{ cause: error }
|
|
14503
14896
|
);
|
|
14504
14897
|
}
|
|
14505
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14898
|
+
await _optionalChain([hooks, 'optionalAccess', _499 => _499.onRunStarted, 'optionalCall', _500 => _500(runId)]);
|
|
14506
14899
|
},
|
|
14507
14900
|
onRunAdmitted: async (runId) => {
|
|
14508
14901
|
try {
|
|
@@ -14515,7 +14908,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
14515
14908
|
{ cause: error }
|
|
14516
14909
|
);
|
|
14517
14910
|
}
|
|
14518
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14911
|
+
await _optionalChain([hooks, 'optionalAccess', _501 => _501.onRunAdmitted, 'optionalCall', _502 => _502(runId)]);
|
|
14519
14912
|
}
|
|
14520
14913
|
} : hooks;
|
|
14521
14914
|
if (options.target.kind === "file") {
|
|
@@ -14593,10 +14986,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
14593
14986
|
...buildRunActivityTextLines(run),
|
|
14594
14987
|
...buildRunStatusEvidenceTextLines(overview)
|
|
14595
14988
|
];
|
|
14596
|
-
if (_optionalChain([overview, 'access',
|
|
14989
|
+
if (_optionalChain([overview, 'access', _503 => _503.runStatus, 'optionalAccess', _504 => _504.available]) === false)
|
|
14597
14990
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
14598
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
14599
|
-
if (work && !_optionalChain([overview, 'access',
|
|
14991
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _505 => _505(run), 'optionalAccess', _506 => _506.work]));
|
|
14992
|
+
if (work && !_optionalChain([overview, 'access', _507 => _507.runStatus, 'optionalAccess', _508 => _508.available]))
|
|
14600
14993
|
lines.push(
|
|
14601
14994
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
14602
14995
|
);
|
|
@@ -14647,7 +15040,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
14647
15040
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
14648
15041
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
14649
15042
|
...overview.failedLogs.entries,
|
|
14650
|
-
..._optionalChain([overview, 'access',
|
|
15043
|
+
..._optionalChain([overview, 'access', _509 => _509.failedLogs, 'access', _510 => _510.next, 'optionalAccess', _511 => _511.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
14651
15044
|
]
|
|
14652
15045
|
});
|
|
14653
15046
|
sections.push({
|
|
@@ -14707,10 +15100,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
14707
15100
|
);
|
|
14708
15101
|
return `${lines.join("\n")}
|
|
14709
15102
|
|
|
14710
|
-
${
|
|
15103
|
+
${_chunkYEJMVAD3js.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
14711
15104
|
}
|
|
14712
15105
|
async function handleRunGet(args) {
|
|
14713
|
-
const selection =
|
|
15106
|
+
const selection = _chunkYEJMVAD3js.parseJsonFields.call(void 0,
|
|
14714
15107
|
args,
|
|
14715
15108
|
args.includes("--config") ? "config" : "get"
|
|
14716
15109
|
);
|
|
@@ -14723,7 +15116,7 @@ async function handleRunGet(args) {
|
|
|
14723
15116
|
console.error(error instanceof Error ? error.message : usage2);
|
|
14724
15117
|
return 1;
|
|
14725
15118
|
}
|
|
14726
|
-
const client = new (0,
|
|
15119
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
14727
15120
|
if (args.includes("--config")) {
|
|
14728
15121
|
if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
|
|
14729
15122
|
console.error(
|
|
@@ -14737,7 +15130,7 @@ async function handleRunGet(args) {
|
|
|
14737
15130
|
"This server does not support recorded configuration reads."
|
|
14738
15131
|
);
|
|
14739
15132
|
}
|
|
14740
|
-
|
|
15133
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
14741
15134
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
14742
15135
|
{ json: true, fields: selection.fields }
|
|
14743
15136
|
);
|
|
@@ -14745,7 +15138,7 @@ async function handleRunGet(args) {
|
|
|
14745
15138
|
}
|
|
14746
15139
|
if (args.includes("--input")) {
|
|
14747
15140
|
const input = await client.getRunInput(runId);
|
|
14748
|
-
|
|
15141
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, input, { json: true });
|
|
14749
15142
|
return 0;
|
|
14750
15143
|
}
|
|
14751
15144
|
const full = args.includes("--full");
|
|
@@ -14758,8 +15151,8 @@ async function handleRunGet(args) {
|
|
|
14758
15151
|
full: true,
|
|
14759
15152
|
failedLogs: args.includes("--log-failed")
|
|
14760
15153
|
}) : status;
|
|
14761
|
-
if (
|
|
14762
|
-
|
|
15154
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
15155
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
14763
15156
|
full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
14764
15157
|
{ json: true, fields: selection.fields }
|
|
14765
15158
|
);
|
|
@@ -14775,8 +15168,8 @@ async function handleRunGet(args) {
|
|
|
14775
15168
|
readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
|
|
14776
15169
|
]);
|
|
14777
15170
|
const hitLines = formatRunHitsLines(hits);
|
|
14778
|
-
const json =
|
|
14779
|
-
|
|
15171
|
+
const json = _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
15172
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
14780
15173
|
{
|
|
14781
15174
|
...overview,
|
|
14782
15175
|
credits,
|
|
@@ -14879,9 +15272,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
14879
15272
|
console.error(error instanceof Error ? error.message : usage2);
|
|
14880
15273
|
return 1;
|
|
14881
15274
|
}
|
|
14882
|
-
const status = await new (0,
|
|
14883
|
-
if (
|
|
14884
|
-
|
|
15275
|
+
const status = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().runs.status(runId);
|
|
15276
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
15277
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, status, { json: true });
|
|
14885
15278
|
return 0;
|
|
14886
15279
|
}
|
|
14887
15280
|
if (!status.available) {
|
|
@@ -14955,12 +15348,12 @@ async function handleRunsRerun(args) {
|
|
|
14955
15348
|
index += 1;
|
|
14956
15349
|
}
|
|
14957
15350
|
}
|
|
14958
|
-
const result = await new (0,
|
|
15351
|
+
const result = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().runs.rerun(runId, {
|
|
14959
15352
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
14960
15353
|
...inputOverrides ? { inputOverrides } : {}
|
|
14961
15354
|
});
|
|
14962
|
-
if (
|
|
14963
|
-
|
|
15355
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
15356
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, result, { json: true });
|
|
14964
15357
|
} else {
|
|
14965
15358
|
console.log(
|
|
14966
15359
|
result.deduplicated === true ? `
|
|
@@ -15025,8 +15418,8 @@ ${usage2}
|
|
|
15025
15418
|
Discover Plays: ${next.discover}
|
|
15026
15419
|
Active runs: ${next.running}`
|
|
15027
15420
|
);
|
|
15028
|
-
if (
|
|
15029
|
-
|
|
15421
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
15422
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15030
15423
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
15031
15424
|
{ json: true }
|
|
15032
15425
|
);
|
|
@@ -15037,7 +15430,7 @@ Active runs: ${next.running}`
|
|
|
15037
15430
|
console.error("--offset requires --play.");
|
|
15038
15431
|
return 1;
|
|
15039
15432
|
}
|
|
15040
|
-
const client = new (0,
|
|
15433
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15041
15434
|
const page = await client.runs.listPage({
|
|
15042
15435
|
...playName ? { play: playName } : {},
|
|
15043
15436
|
...statusFilter ? { status: statusFilter } : {},
|
|
@@ -15065,7 +15458,7 @@ Active runs: ${next.running}`
|
|
|
15065
15458
|
executionTime: run.executionTime,
|
|
15066
15459
|
billingTotalCredits: run.billingTotalCredits,
|
|
15067
15460
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
15068
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
15461
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _512 => _512.memo, 'optionalAccess', _513 => _513.playName]))), () => ( playName)), () => ( null))
|
|
15069
15462
|
}));
|
|
15070
15463
|
const lines = runs.length === 0 ? [
|
|
15071
15464
|
playName ? `No runs found for ${playName}.` : `No runs found for status ${statusFilter}.`
|
|
@@ -15083,14 +15476,14 @@ Active runs: ${next.running}`
|
|
|
15083
15476
|
return lines2.join("\n");
|
|
15084
15477
|
});
|
|
15085
15478
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
15086
|
-
const nextPage = page.hasMore && playName ? `deepline runs list --play ${
|
|
15479
|
+
const nextPage = page.hasMore && playName ? `deepline runs list --play ${shellQuote3(playName)}${statusFilter ? ` --status ${shellQuote3(statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset} --json` : null;
|
|
15087
15480
|
if (page.hasMore) {
|
|
15088
15481
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
15089
15482
|
lines.push(
|
|
15090
15483
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
15091
15484
|
);
|
|
15092
15485
|
}
|
|
15093
|
-
|
|
15486
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15094
15487
|
{
|
|
15095
15488
|
runs,
|
|
15096
15489
|
count: runs.length,
|
|
@@ -15100,11 +15493,11 @@ Active runs: ${next.running}`
|
|
|
15100
15493
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
15101
15494
|
next: {
|
|
15102
15495
|
page: nextPage,
|
|
15103
|
-
get: _optionalChain([runs, 'access',
|
|
15496
|
+
get: _optionalChain([runs, 'access', _514 => _514[0], 'optionalAccess', _515 => _515.runId]) ? `deepline runs get ${runs[0].runId} --json` : null
|
|
15104
15497
|
},
|
|
15105
15498
|
render: { sections: [{ title: "runs", lines }] }
|
|
15106
15499
|
},
|
|
15107
|
-
{ json:
|
|
15500
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args) }
|
|
15108
15501
|
);
|
|
15109
15502
|
return 0;
|
|
15110
15503
|
}
|
|
@@ -15134,7 +15527,7 @@ async function handleRunTail(args) {
|
|
|
15134
15527
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15135
15528
|
return 1;
|
|
15136
15529
|
}
|
|
15137
|
-
const parsed =
|
|
15530
|
+
const parsed = _chunkTH3YBIJTjs.parseLogLevel.call(void 0, value);
|
|
15138
15531
|
if (!parsed) {
|
|
15139
15532
|
console.error(
|
|
15140
15533
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15172,9 +15565,9 @@ async function handleRunTail(args) {
|
|
|
15172
15565
|
);
|
|
15173
15566
|
return 1;
|
|
15174
15567
|
}
|
|
15175
|
-
const client = new (0,
|
|
15568
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15176
15569
|
const jsonLines = args.includes("--jsonl");
|
|
15177
|
-
const jsonOutput = !jsonLines &&
|
|
15570
|
+
const jsonOutput = !jsonLines && _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
15178
15571
|
const compact = args.includes("--compact");
|
|
15179
15572
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
15180
15573
|
const compactState = {
|
|
@@ -15242,6 +15635,7 @@ async function handleRunTail(args) {
|
|
|
15242
15635
|
return status.status === "failed" ? 1 : 0;
|
|
15243
15636
|
}
|
|
15244
15637
|
async function handleRunLogs(args) {
|
|
15638
|
+
if (requestsStructuredLogs(args)) return handleRunEventQuery(args, "logs");
|
|
15245
15639
|
const searchFlags = /* @__PURE__ */ new Set([
|
|
15246
15640
|
"--since",
|
|
15247
15641
|
"--until",
|
|
@@ -15254,7 +15648,7 @@ async function handleRunLogs(args) {
|
|
|
15254
15648
|
]);
|
|
15255
15649
|
const cursorIndex = args.indexOf("--cursor");
|
|
15256
15650
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
15257
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
15651
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkTH3YBIJTjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
15258
15652
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
15259
15653
|
return handleRunEventSearch(args);
|
|
15260
15654
|
}
|
|
@@ -15288,7 +15682,7 @@ async function handleRunLogs(args) {
|
|
|
15288
15682
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15289
15683
|
return 1;
|
|
15290
15684
|
}
|
|
15291
|
-
const parsed =
|
|
15685
|
+
const parsed = _chunkTH3YBIJTjs.parseLogLevel.call(void 0, value);
|
|
15292
15686
|
if (!parsed) {
|
|
15293
15687
|
console.error(
|
|
15294
15688
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15335,12 +15729,12 @@ async function handleRunLogs(args) {
|
|
|
15335
15729
|
);
|
|
15336
15730
|
return 1;
|
|
15337
15731
|
}
|
|
15338
|
-
const client = new (0,
|
|
15732
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15339
15733
|
if (outPath) {
|
|
15340
15734
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
15341
|
-
const logs = result2.entries.filter((line) =>
|
|
15735
|
+
const logs = result2.entries.filter((line) => _chunkTH3YBIJTjs.logLevelReaches.call(void 0, _chunkTH3YBIJTjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkTH3YBIJTjs.classifyLogLine.call(void 0, line).line);
|
|
15342
15736
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
15343
|
-
|
|
15737
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15344
15738
|
{
|
|
15345
15739
|
runId: result2.runId,
|
|
15346
15740
|
log_path: outPath,
|
|
@@ -15363,7 +15757,7 @@ async function handleRunLogs(args) {
|
|
|
15363
15757
|
]
|
|
15364
15758
|
}
|
|
15365
15759
|
},
|
|
15366
|
-
{ json:
|
|
15760
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args) }
|
|
15367
15761
|
);
|
|
15368
15762
|
return 0;
|
|
15369
15763
|
}
|
|
@@ -15394,7 +15788,7 @@ async function handleRunLogs(args) {
|
|
|
15394
15788
|
}
|
|
15395
15789
|
};
|
|
15396
15790
|
const text = buildRunLogsText(filteredResult);
|
|
15397
|
-
|
|
15791
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15398
15792
|
{
|
|
15399
15793
|
runId: result.runId,
|
|
15400
15794
|
totalCount: result.totalCount,
|
|
@@ -15418,7 +15812,7 @@ async function handleRunLogs(args) {
|
|
|
15418
15812
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
15419
15813
|
},
|
|
15420
15814
|
{
|
|
15421
|
-
json:
|
|
15815
|
+
json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args),
|
|
15422
15816
|
text
|
|
15423
15817
|
}
|
|
15424
15818
|
);
|
|
@@ -15442,17 +15836,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
15442
15836
|
);
|
|
15443
15837
|
}
|
|
15444
15838
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
15445
|
-
(entry) =>
|
|
15839
|
+
(entry) => _chunkTH3YBIJTjs.logLevelReaches.call(void 0, _chunkTH3YBIJTjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
15446
15840
|
);
|
|
15447
15841
|
const selected = matching.slice(-limit);
|
|
15448
15842
|
const olderMatchesExist = matching.length > selected.length;
|
|
15449
15843
|
return {
|
|
15450
15844
|
entries: selected.map((entry) => entry.line),
|
|
15451
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
15452
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
15845
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _516 => _516[0], 'optionalAccess', _517 => _517.seq]), () => ( null)),
|
|
15846
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _518 => _518.at, 'call', _519 => _519(-1), 'optionalAccess', _520 => _520.seq]), () => ( null)),
|
|
15453
15847
|
truncated: result.truncated || olderMatchesExist,
|
|
15454
15848
|
hasMore: olderMatchesExist,
|
|
15455
|
-
nextCursor: olderMatchesExist ?
|
|
15849
|
+
nextCursor: olderMatchesExist ? _chunkTH3YBIJTjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
15456
15850
|
};
|
|
15457
15851
|
}
|
|
15458
15852
|
async function handleRunEventSearch(args) {
|
|
@@ -15519,7 +15913,7 @@ ${usage2}`);
|
|
|
15519
15913
|
namespace,
|
|
15520
15914
|
...backend ? { backend } : {}
|
|
15521
15915
|
} : void 0;
|
|
15522
|
-
const client = new (0,
|
|
15916
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15523
15917
|
const result = await client.runs.searchEvents({
|
|
15524
15918
|
...runId ? { runId } : {},
|
|
15525
15919
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -15575,24 +15969,24 @@ ${renderedDetails}` : ""}`;
|
|
|
15575
15969
|
});
|
|
15576
15970
|
const nextCommand = result.nextCursor ? [
|
|
15577
15971
|
"deepline runs logs",
|
|
15578
|
-
...runId ? [
|
|
15972
|
+
...runId ? [shellQuote3(runId)] : [],
|
|
15579
15973
|
"--since",
|
|
15580
|
-
|
|
15974
|
+
shellQuote3(result.since),
|
|
15581
15975
|
"--until",
|
|
15582
|
-
|
|
15583
|
-
...values["--play"] ? ["--play",
|
|
15584
|
-
...values["--kind"] ? ["--kind",
|
|
15585
|
-
...values["--where"] ? ["--where",
|
|
15976
|
+
shellQuote3(result.until),
|
|
15977
|
+
...values["--play"] ? ["--play", shellQuote3(values["--play"])] : [],
|
|
15978
|
+
...values["--kind"] ? ["--kind", shellQuote3(values["--kind"])] : [],
|
|
15979
|
+
...values["--where"] ? ["--where", shellQuote3(values["--where"])] : [],
|
|
15586
15980
|
...includePayloads ? ["--payloads"] : [],
|
|
15587
|
-
...namespace ? ["--runtime-namespace",
|
|
15588
|
-
...backend ? ["--runtime-backend",
|
|
15981
|
+
...namespace ? ["--runtime-namespace", shellQuote3(namespace)] : [],
|
|
15982
|
+
...backend ? ["--runtime-backend", shellQuote3(backend)] : [],
|
|
15589
15983
|
"--cursor",
|
|
15590
|
-
|
|
15984
|
+
shellQuote3(result.nextCursor),
|
|
15591
15985
|
"--limit",
|
|
15592
15986
|
String(limit),
|
|
15593
15987
|
"--json"
|
|
15594
15988
|
].join(" ") : null;
|
|
15595
|
-
|
|
15989
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15596
15990
|
{
|
|
15597
15991
|
events,
|
|
15598
15992
|
nextCursor: result.nextCursor,
|
|
@@ -15603,19 +15997,19 @@ ${renderedDetails}` : ""}`;
|
|
|
15603
15997
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
15604
15998
|
},
|
|
15605
15999
|
{
|
|
15606
|
-
json:
|
|
16000
|
+
json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args),
|
|
15607
16001
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
15608
16002
|
}
|
|
15609
16003
|
);
|
|
15610
16004
|
return 0;
|
|
15611
16005
|
}
|
|
15612
16006
|
function buildRunLogsText(result) {
|
|
15613
|
-
const lines = result.entries.map((line) =>
|
|
16007
|
+
const lines = result.entries.map((line) => _chunkTH3YBIJTjs.classifyLogLine.call(void 0, line).line);
|
|
15614
16008
|
if (result.warning) {
|
|
15615
16009
|
if (lines.length > 0) lines.push("");
|
|
15616
16010
|
lines.push(`warning: ${result.warning}`);
|
|
15617
16011
|
lines.push(
|
|
15618
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
16012
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _521 => _521.next, 'optionalAccess', _522 => _522.logs]), () => ( `deepline runs logs ${result.runId} --out run.log --json`))}`
|
|
15619
16013
|
);
|
|
15620
16014
|
}
|
|
15621
16015
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -15644,7 +16038,7 @@ async function handleRunStop(args) {
|
|
|
15644
16038
|
reason = args[++index];
|
|
15645
16039
|
}
|
|
15646
16040
|
}
|
|
15647
|
-
const client = new (0,
|
|
16041
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15648
16042
|
const result = await client.runs.stop(runId, { reason });
|
|
15649
16043
|
const state = resolveRunStopState(result);
|
|
15650
16044
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -15659,7 +16053,7 @@ async function handleRunStop(args) {
|
|
|
15659
16053
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
15660
16054
|
`inspect: deepline runs get ${runId} --full --json`
|
|
15661
16055
|
];
|
|
15662
|
-
|
|
16056
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15663
16057
|
{
|
|
15664
16058
|
...cancelling,
|
|
15665
16059
|
state,
|
|
@@ -15674,7 +16068,7 @@ async function handleRunStop(args) {
|
|
|
15674
16068
|
]
|
|
15675
16069
|
}
|
|
15676
16070
|
},
|
|
15677
|
-
{ json:
|
|
16071
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args) }
|
|
15678
16072
|
);
|
|
15679
16073
|
return 0;
|
|
15680
16074
|
}
|
|
@@ -15691,7 +16085,7 @@ async function handleRunStop(args) {
|
|
|
15691
16085
|
];
|
|
15692
16086
|
process.stderr.write(`${lines2.join("\n")}
|
|
15693
16087
|
`);
|
|
15694
|
-
|
|
16088
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15695
16089
|
{
|
|
15696
16090
|
...result,
|
|
15697
16091
|
render: {
|
|
@@ -15706,7 +16100,7 @@ async function handleRunStop(args) {
|
|
|
15706
16100
|
]
|
|
15707
16101
|
}
|
|
15708
16102
|
},
|
|
15709
|
-
{ json:
|
|
16103
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args) }
|
|
15710
16104
|
);
|
|
15711
16105
|
return 1;
|
|
15712
16106
|
}
|
|
@@ -15717,12 +16111,12 @@ async function handleRunStop(args) {
|
|
|
15717
16111
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
15718
16112
|
] : []
|
|
15719
16113
|
];
|
|
15720
|
-
|
|
16114
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15721
16115
|
{
|
|
15722
16116
|
...result,
|
|
15723
16117
|
render: { sections: [{ title: "run stop", lines }] }
|
|
15724
16118
|
},
|
|
15725
|
-
{ json:
|
|
16119
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args) }
|
|
15726
16120
|
);
|
|
15727
16121
|
return 0;
|
|
15728
16122
|
}
|
|
@@ -15772,18 +16166,18 @@ async function handleRunStopAll(args) {
|
|
|
15772
16166
|
reason = args[++index];
|
|
15773
16167
|
}
|
|
15774
16168
|
}
|
|
15775
|
-
const client = new (0,
|
|
16169
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15776
16170
|
if (dryRun) {
|
|
15777
16171
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
15778
16172
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
15779
|
-
|
|
16173
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15780
16174
|
{
|
|
15781
16175
|
...result2,
|
|
15782
16176
|
render: {
|
|
15783
16177
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
15784
16178
|
}
|
|
15785
16179
|
},
|
|
15786
|
-
{ json:
|
|
16180
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
15787
16181
|
` }
|
|
15788
16182
|
);
|
|
15789
16183
|
return 0;
|
|
@@ -15796,17 +16190,17 @@ async function handleRunStopAll(args) {
|
|
|
15796
16190
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
15797
16191
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
15798
16192
|
];
|
|
15799
|
-
|
|
16193
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
15800
16194
|
{
|
|
15801
16195
|
...result,
|
|
15802
16196
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
15803
16197
|
},
|
|
15804
|
-
{ json:
|
|
16198
|
+
{ json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args) }
|
|
15805
16199
|
);
|
|
15806
16200
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
15807
16201
|
}
|
|
15808
16202
|
async function handleRunExport(args) {
|
|
15809
|
-
const selection =
|
|
16203
|
+
const selection = _chunkYEJMVAD3js.parseJsonFields.call(void 0, args, "export");
|
|
15810
16204
|
args = selection.args;
|
|
15811
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]";
|
|
15812
16206
|
let runId;
|
|
@@ -15865,16 +16259,16 @@ async function handleRunExport(args) {
|
|
|
15865
16259
|
"INVALID_ARGUMENT"
|
|
15866
16260
|
);
|
|
15867
16261
|
}
|
|
15868
|
-
const client = new (0,
|
|
16262
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15869
16263
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
15870
16264
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
15871
|
-
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !
|
|
16265
|
+
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkYEJMVAD3js.argsWantJson.call(void 0, args));
|
|
15872
16266
|
try {
|
|
15873
16267
|
await waitForPlayCompletionByWatch({
|
|
15874
16268
|
client,
|
|
15875
16269
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
15876
16270
|
workflowId: runId,
|
|
15877
|
-
jsonOutput:
|
|
16271
|
+
jsonOutput: _chunkYEJMVAD3js.argsWantJson.call(void 0, args),
|
|
15878
16272
|
emitLogs: false,
|
|
15879
16273
|
waitTimeoutMs,
|
|
15880
16274
|
startedAt: Date.now(),
|
|
@@ -15897,26 +16291,26 @@ async function handleRunExport(args) {
|
|
|
15897
16291
|
datasetPath,
|
|
15898
16292
|
format
|
|
15899
16293
|
});
|
|
15900
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
15901
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
16294
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _523 => _523.rowsInfo, 'access', _524 => _524.source]), () => ( datasetPath)), () => ( null));
|
|
16295
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _525 => _525.currentTable]) ? {
|
|
15902
16296
|
code: "CURRENT_SHARED_DATASET",
|
|
15903
16297
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
15904
16298
|
full_run_output_command: `deepline runs get ${status.runId} --full --json`
|
|
15905
16299
|
} : null;
|
|
15906
16300
|
const navigation = buildRunNavigation(status);
|
|
15907
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
16301
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _526 => _526.datasetInfo]);
|
|
15908
16302
|
const identity = navigation.datasets.find(
|
|
15909
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
16303
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _527 => _527.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _528 => _528.tableNamespace])
|
|
15910
16304
|
);
|
|
15911
16305
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
15912
16306
|
const exportCommand = runExportRetryCommand(
|
|
15913
16307
|
status.runId,
|
|
15914
16308
|
outPath,
|
|
15915
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
16309
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _529 => _529.datasetPath]))),
|
|
15916
16310
|
{ format }
|
|
15917
16311
|
);
|
|
15918
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
15919
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
16312
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _530 => _530.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _531 => _531.path]), () => ( null)) };
|
|
16313
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _532 => _532.rowsInfo, 'access', _533 => _533.exportedRowOutcomes]);
|
|
15920
16314
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
15921
16315
|
count: exportedRowOutcomes.failed,
|
|
15922
16316
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -15936,17 +16330,17 @@ async function handleRunExport(args) {
|
|
|
15936
16330
|
...fileLocation,
|
|
15937
16331
|
format,
|
|
15938
16332
|
source,
|
|
15939
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16333
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _534 => _534.rowsInfo, 'access', _535 => _535.totalRows]), () => ( null)),
|
|
15940
16334
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
15941
16335
|
...rowFailures ? { rowFailures } : {},
|
|
15942
|
-
columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16336
|
+
columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _536 => _536.rowsInfo, 'access', _537 => _537.columns]), () => ( []))),
|
|
15943
16337
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
15944
16338
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
15945
16339
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
15946
16340
|
};
|
|
15947
16341
|
const lines = withRunNavigationLines(
|
|
15948
16342
|
[
|
|
15949
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16343
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _538 => _538.path]), () => ( outPath))}`,
|
|
15950
16344
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
15951
16345
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
15952
16346
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -15973,8 +16367,8 @@ async function handleRunExport(args) {
|
|
|
15973
16367
|
"utf-8"
|
|
15974
16368
|
);
|
|
15975
16369
|
}
|
|
15976
|
-
|
|
15977
|
-
json:
|
|
16370
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0, payload, {
|
|
16371
|
+
json: _chunkYEJMVAD3js.argsWantJson.call(void 0, args),
|
|
15978
16372
|
fields: selection.fields,
|
|
15979
16373
|
text: `${lines.join("\n")}
|
|
15980
16374
|
`
|
|
@@ -15995,10 +16389,10 @@ async function handlePlayGet(args) {
|
|
|
15995
16389
|
);
|
|
15996
16390
|
return 2;
|
|
15997
16391
|
}
|
|
15998
|
-
const client = new (0,
|
|
16392
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
15999
16393
|
const explicitJson = args.includes("--json");
|
|
16000
16394
|
const sourceOutput = args.includes("--source");
|
|
16001
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
16395
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
16002
16396
|
const requestedRevisionFlags = [
|
|
16003
16397
|
args.includes("--working"),
|
|
16004
16398
|
args.includes("--live"),
|
|
@@ -16048,7 +16442,7 @@ async function handlePlayGet(args) {
|
|
|
16048
16442
|
...includeSource ? { source: sourceSelector } : {}
|
|
16049
16443
|
});
|
|
16050
16444
|
const source = detail.source;
|
|
16051
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
16445
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _539 => _539.files, 'access', _540 => _540[source.entryFile]]), () => ( ""));
|
|
16052
16446
|
let materializedFile = null;
|
|
16053
16447
|
try {
|
|
16054
16448
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -16058,7 +16452,7 @@ async function handlePlayGet(args) {
|
|
|
16058
16452
|
}
|
|
16059
16453
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
16060
16454
|
if (jsonOutput) {
|
|
16061
|
-
|
|
16455
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, {
|
|
16062
16456
|
...detail,
|
|
16063
16457
|
...materializedFile ? {
|
|
16064
16458
|
message: loadedMessage,
|
|
@@ -16099,11 +16493,11 @@ async function handlePlayGet(args) {
|
|
|
16099
16493
|
}
|
|
16100
16494
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
16101
16495
|
console.log(
|
|
16102
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
16496
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _541 => _541.play, 'access', _542 => _542.workingRevision, 'optionalAccess', _543 => _543.version]), () => ( "\u2014"))}`
|
|
16103
16497
|
);
|
|
16104
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
16498
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _544 => _544.play, 'access', _545 => _545.liveRevision, 'optionalAccess', _546 => _546.version]), () => ( "\u2014"))}`);
|
|
16105
16499
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
16106
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
16500
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _547 => _547.play, 'access', _548 => _548.liveRevision, 'optionalAccess', _549 => _549.version])) {
|
|
16107
16501
|
console.log(
|
|
16108
16502
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
16109
16503
|
);
|
|
@@ -16115,7 +16509,7 @@ async function handlePlayGet(args) {
|
|
|
16115
16509
|
console.log(line);
|
|
16116
16510
|
}
|
|
16117
16511
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
16118
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
16512
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _550 => _550.sheetSummary, 'optionalAccess', _551 => _551.stats, 'optionalAccess', _552 => _552.total]), () => ( 0))}`);
|
|
16119
16513
|
if (detail.customerDbUrl) {
|
|
16120
16514
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
16121
16515
|
}
|
|
@@ -16131,7 +16525,7 @@ async function handlePlayGet(args) {
|
|
|
16131
16525
|
return 0;
|
|
16132
16526
|
}
|
|
16133
16527
|
function formatVersionLine(version) {
|
|
16134
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
16528
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _553 => _553.artifactHash, 'optionalAccess', _554 => _554.slice, 'call', _555 => _555(0, 12)]), () => ( "unknown-revision"));
|
|
16135
16529
|
const state = [
|
|
16136
16530
|
version.isLive ? "live" : null,
|
|
16137
16531
|
version.isWorking ? "working" : null
|
|
@@ -16145,8 +16539,8 @@ async function handlePlayVersions(args) {
|
|
|
16145
16539
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
16146
16540
|
return 1;
|
|
16147
16541
|
}
|
|
16148
|
-
const client = new (0,
|
|
16149
|
-
const jsonOutput =
|
|
16542
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16543
|
+
const jsonOutput = _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
16150
16544
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16151
16545
|
command: "versions"
|
|
16152
16546
|
});
|
|
@@ -16154,7 +16548,7 @@ async function handlePlayVersions(args) {
|
|
|
16154
16548
|
parseReferencedPlayTarget2(playName).playName
|
|
16155
16549
|
);
|
|
16156
16550
|
if (jsonOutput) {
|
|
16157
|
-
|
|
16551
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, { versions });
|
|
16158
16552
|
return 0;
|
|
16159
16553
|
}
|
|
16160
16554
|
if (versions.length === 0) {
|
|
@@ -16186,11 +16580,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
16186
16580
|
"signals"
|
|
16187
16581
|
];
|
|
16188
16582
|
async function handlePlayList(args) {
|
|
16189
|
-
const jsonOutput =
|
|
16583
|
+
const jsonOutput = _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
16190
16584
|
const showCost = args.includes("--show-cost");
|
|
16191
|
-
const client = new (0,
|
|
16585
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16192
16586
|
const categoriesIndex = args.indexOf("--categories");
|
|
16193
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
16587
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _556 => _556[categoriesIndex + 1], 'optionalAccess', _557 => _557.trim, 'call', _558 => _558()]) : void 0;
|
|
16194
16588
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
16195
16589
|
if (args.includes("--tag") && tags.length === 0) {
|
|
16196
16590
|
console.error(
|
|
@@ -16211,7 +16605,7 @@ async function handlePlayList(args) {
|
|
|
16211
16605
|
const cursorIndex = args.indexOf("--cursor");
|
|
16212
16606
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
16213
16607
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
16214
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
16608
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _559 => _559.trim, 'call', _560 => _560()])) {
|
|
16215
16609
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
16216
16610
|
return 2;
|
|
16217
16611
|
}
|
|
@@ -16230,7 +16624,7 @@ async function handlePlayList(args) {
|
|
|
16230
16624
|
);
|
|
16231
16625
|
return 1;
|
|
16232
16626
|
}
|
|
16233
|
-
const nextPage = page.hasMore && page.cursor ? `deepline plays list${categories ? ` --categories ${
|
|
16627
|
+
const nextPage = page.hasMore && page.cursor ? `deepline plays list${categories ? ` --categories ${shellQuote3(categories)}` : ""}${tags.map((tag) => ` --tag ${shellQuote3(tag)}`).join("")}${limit ? ` --limit ${limit}` : ""}${showCost ? " --show-cost" : ""} --cursor ${shellQuote3(page.cursor)} --json` : null;
|
|
16234
16628
|
if (page.hasMore && !nextPage) {
|
|
16235
16629
|
throw new Error(
|
|
16236
16630
|
"Play list reported more results without a continuation cursor"
|
|
@@ -16251,7 +16645,7 @@ async function handlePlayList(args) {
|
|
|
16251
16645
|
if (play.inputSchema || play.hasInputSchema) {
|
|
16252
16646
|
lines.push(" inputSchema: yes");
|
|
16253
16647
|
}
|
|
16254
|
-
if (_optionalChain([play, 'access',
|
|
16648
|
+
if (_optionalChain([play, 'access', _561 => _561.triggerStatus, 'optionalAccess', _562 => _562.cron])) {
|
|
16255
16649
|
lines.push(
|
|
16256
16650
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
16257
16651
|
);
|
|
@@ -16271,7 +16665,7 @@ async function handlePlayList(args) {
|
|
|
16271
16665
|
} else {
|
|
16272
16666
|
lines.push(" scheduled execution: not configured");
|
|
16273
16667
|
}
|
|
16274
|
-
if (_optionalChain([play, 'access',
|
|
16668
|
+
if (_optionalChain([play, 'access', _563 => _563.triggerStatus, 'optionalAccess', _564 => _564.webhook])) {
|
|
16275
16669
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
16276
16670
|
}
|
|
16277
16671
|
if (showCost) {
|
|
@@ -16285,7 +16679,7 @@ async function handlePlayList(args) {
|
|
|
16285
16679
|
lines.push("List truncated \u2014 more plays are available.");
|
|
16286
16680
|
lines.push(`Next page: ${nextPage}`);
|
|
16287
16681
|
}
|
|
16288
|
-
|
|
16682
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
16289
16683
|
{
|
|
16290
16684
|
plays,
|
|
16291
16685
|
count: plays.length,
|
|
@@ -16302,8 +16696,8 @@ async function handlePlayList(args) {
|
|
|
16302
16696
|
return 0;
|
|
16303
16697
|
}
|
|
16304
16698
|
async function handlePlayPin(args, pinned) {
|
|
16305
|
-
const target = _optionalChain([args, 'access',
|
|
16306
|
-
const jsonOutput =
|
|
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 = _chunkYEJMVAD3js.argsWantJson.call(void 0, args);
|
|
16307
16701
|
const dryRun = args.includes("--dry-run");
|
|
16308
16702
|
if (!target) {
|
|
16309
16703
|
console.error(
|
|
@@ -16321,11 +16715,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
16321
16715
|
const name = parsedTarget.playName;
|
|
16322
16716
|
const plan = { name, pinned, dryRun };
|
|
16323
16717
|
if (dryRun) {
|
|
16324
|
-
|
|
16718
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, plan);
|
|
16325
16719
|
return 0;
|
|
16326
16720
|
}
|
|
16327
|
-
const result = await new (0,
|
|
16328
|
-
if (jsonOutput)
|
|
16721
|
+
const result = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().setPlayPinned(name, pinned);
|
|
16722
|
+
if (jsonOutput) _chunkYEJMVAD3js.printCompactJson.call(void 0, result);
|
|
16329
16723
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
16330
16724
|
return 0;
|
|
16331
16725
|
}
|
|
@@ -16341,7 +16735,7 @@ function csvColumnLines(csvInput) {
|
|
|
16341
16735
|
const headers = [defaults[column]].flat().filter((header) => header && header !== column);
|
|
16342
16736
|
return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
|
|
16343
16737
|
}),
|
|
16344
|
-
|
|
16738
|
+
_chunkTH3YBIJTjs.CSV_HEADER_MATCHING_NOTE
|
|
16345
16739
|
];
|
|
16346
16740
|
}
|
|
16347
16741
|
function printPlayDescription(play) {
|
|
@@ -16373,7 +16767,7 @@ function printPlayDescription(play) {
|
|
|
16373
16767
|
console.log(` ${line}`);
|
|
16374
16768
|
}
|
|
16375
16769
|
}
|
|
16376
|
-
if (_optionalChain([play, 'access',
|
|
16770
|
+
if (_optionalChain([play, 'access', _569 => _569.toolCategories, 'optionalAccess', _570 => _570.length])) {
|
|
16377
16771
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
16378
16772
|
}
|
|
16379
16773
|
if (play.aliases.length > 0) {
|
|
@@ -16418,7 +16812,7 @@ function printPlayDescription(play) {
|
|
|
16418
16812
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
16419
16813
|
if (runtimeLimit) {
|
|
16420
16814
|
console.log(
|
|
16421
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
16815
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _571 => _571.runtimeLimit, 'optionalAccess', _572 => _572.source]), () => ( "live"))})`
|
|
16422
16816
|
);
|
|
16423
16817
|
}
|
|
16424
16818
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -16433,7 +16827,7 @@ function printPlayDescription(play) {
|
|
|
16433
16827
|
function summarizePlayGrepResult(play) {
|
|
16434
16828
|
const reference = formatPlayListReference(play);
|
|
16435
16829
|
return {
|
|
16436
|
-
name: _optionalChain([play, 'access',
|
|
16830
|
+
name: _optionalChain([play, 'access', _573 => _573.displayName, 'optionalAccess', _574 => _574.trim, 'call', _575 => _575()]) || play.name,
|
|
16437
16831
|
reference,
|
|
16438
16832
|
matches: _nullishCoalesce(play.matches, () => ( [])),
|
|
16439
16833
|
describe: `deepline plays describe ${reference} --json`
|
|
@@ -16443,17 +16837,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
16443
16837
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
16444
16838
|
}
|
|
16445
16839
|
async function handlePlayGrep(args) {
|
|
16446
|
-
const query = _optionalChain([args, 'access',
|
|
16840
|
+
const query = _optionalChain([args, 'access', _576 => _576[0], 'optionalAccess', _577 => _577.trim, 'call', _578 => _578()]);
|
|
16447
16841
|
if (!query) {
|
|
16448
16842
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
16449
16843
|
return 1;
|
|
16450
16844
|
}
|
|
16451
|
-
const client = new (0,
|
|
16845
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16452
16846
|
const results = (await client.listPlays({ grep: query })).map(
|
|
16453
16847
|
summarizePlayGrepResult
|
|
16454
16848
|
);
|
|
16455
|
-
if (
|
|
16456
|
-
|
|
16849
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
16850
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, {
|
|
16457
16851
|
plays: results,
|
|
16458
16852
|
count: results.length,
|
|
16459
16853
|
query,
|
|
@@ -16476,7 +16870,7 @@ async function handlePlayGrep(args) {
|
|
|
16476
16870
|
return 0;
|
|
16477
16871
|
}
|
|
16478
16872
|
async function handlePlayDescribe(args) {
|
|
16479
|
-
const selection =
|
|
16873
|
+
const selection = _chunkYEJMVAD3js.parseJsonFields.call(void 0, args, "describe");
|
|
16480
16874
|
args = selection.args;
|
|
16481
16875
|
const playName = args[0];
|
|
16482
16876
|
if (!playName) {
|
|
@@ -16510,8 +16904,8 @@ async function handlePlayDescribe(args) {
|
|
|
16510
16904
|
`deepline plays check ${playName}`,
|
|
16511
16905
|
...definedName ? [`deepline plays describe <workspace>/${definedName}`] : []
|
|
16512
16906
|
];
|
|
16513
|
-
if (
|
|
16514
|
-
|
|
16907
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
16908
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, {
|
|
16515
16909
|
ok: false,
|
|
16516
16910
|
error: { message },
|
|
16517
16911
|
next
|
|
@@ -16525,7 +16919,7 @@ async function handlePlayDescribe(args) {
|
|
|
16525
16919
|
}
|
|
16526
16920
|
return 2;
|
|
16527
16921
|
}
|
|
16528
|
-
const client = new (0,
|
|
16922
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16529
16923
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16530
16924
|
command: "describe"
|
|
16531
16925
|
});
|
|
@@ -16535,9 +16929,9 @@ async function handlePlayDescribe(args) {
|
|
|
16535
16929
|
compact: args.includes("--compact")
|
|
16536
16930
|
}
|
|
16537
16931
|
);
|
|
16538
|
-
if (
|
|
16539
|
-
if (selection.fields)
|
|
16540
|
-
else
|
|
16932
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
16933
|
+
if (selection.fields) _chunkYEJMVAD3js.printJson.call(void 0, play, selection.fields);
|
|
16934
|
+
else _chunkYEJMVAD3js.printCompactJson.call(void 0, play);
|
|
16541
16935
|
return 0;
|
|
16542
16936
|
}
|
|
16543
16937
|
printPlayDescription(play);
|
|
@@ -16578,10 +16972,10 @@ async function handlePlaySave(args) {
|
|
|
16578
16972
|
message: "Refusing to save: the local file no longer produces the artifact checked earlier.",
|
|
16579
16973
|
expectedArtifactHash: options.expectedArtifactHash,
|
|
16580
16974
|
currentArtifactHash: artifactHash,
|
|
16581
|
-
next: `deepline plays check ${
|
|
16975
|
+
next: `deepline plays check ${shellQuote3(options.target)}`
|
|
16582
16976
|
};
|
|
16583
16977
|
if (options.jsonOutput) {
|
|
16584
|
-
|
|
16978
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result);
|
|
16585
16979
|
} else {
|
|
16586
16980
|
console.error(result.message);
|
|
16587
16981
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -16603,7 +16997,7 @@ async function handlePlaySave(args) {
|
|
|
16603
16997
|
};
|
|
16604
16998
|
if (options.dryRun) {
|
|
16605
16999
|
if (options.jsonOutput) {
|
|
16606
|
-
|
|
17000
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, dryRun);
|
|
16607
17001
|
} else {
|
|
16608
17002
|
console.log(`Dry run: ${playName}`);
|
|
16609
17003
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -16612,7 +17006,7 @@ async function handlePlaySave(args) {
|
|
|
16612
17006
|
}
|
|
16613
17007
|
return 0;
|
|
16614
17008
|
}
|
|
16615
|
-
const client = new (0,
|
|
17009
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16616
17010
|
try {
|
|
16617
17011
|
await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
16618
17012
|
"cli.play_save_compile_manifests",
|
|
@@ -16643,12 +17037,12 @@ async function handlePlaySave(args) {
|
|
|
16643
17037
|
graphHash: graph.root.artifact.graphHash,
|
|
16644
17038
|
artifactStorageKey: saved.artifactStorageKey,
|
|
16645
17039
|
next: {
|
|
16646
|
-
publish: `deepline plays publish ${
|
|
17040
|
+
publish: `deepline plays publish ${shellQuote3(options.target)} --expected-artifact ${artifactHash}`,
|
|
16647
17041
|
get: `deepline plays get ${playName} --source --out ./${playName}/ --working`
|
|
16648
17042
|
}
|
|
16649
17043
|
};
|
|
16650
17044
|
if (options.jsonOutput) {
|
|
16651
|
-
|
|
17045
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result);
|
|
16652
17046
|
} else {
|
|
16653
17047
|
console.log(
|
|
16654
17048
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -16674,7 +17068,7 @@ async function handlePlayPublish(args) {
|
|
|
16674
17068
|
}
|
|
16675
17069
|
const { target: playName, useLatest } = options;
|
|
16676
17070
|
let revisionId = options.revisionId;
|
|
16677
|
-
const client = new (0,
|
|
17071
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16678
17072
|
if (isFileTarget(playName)) {
|
|
16679
17073
|
if (revisionId || useLatest) {
|
|
16680
17074
|
console.error(
|
|
@@ -16703,10 +17097,10 @@ async function handlePlayPublish(args) {
|
|
|
16703
17097
|
message: "Refusing to publish: the local file no longer produces the artifact checked earlier.",
|
|
16704
17098
|
expectedArtifactHash: options.expectedArtifactHash,
|
|
16705
17099
|
currentArtifactHash: artifactHash,
|
|
16706
|
-
next: `deepline plays check ${
|
|
17100
|
+
next: `deepline plays check ${shellQuote3(playName)}`
|
|
16707
17101
|
};
|
|
16708
17102
|
if (options.jsonOutput) {
|
|
16709
|
-
|
|
17103
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result3);
|
|
16710
17104
|
} else {
|
|
16711
17105
|
console.error(result3.message);
|
|
16712
17106
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -16729,7 +17123,7 @@ async function handlePlayPublish(args) {
|
|
|
16729
17123
|
};
|
|
16730
17124
|
if (options.dryRun) {
|
|
16731
17125
|
if (options.jsonOutput) {
|
|
16732
|
-
|
|
17126
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, dryRun);
|
|
16733
17127
|
} else {
|
|
16734
17128
|
console.log(`Dry run: ${rootPlayName}`);
|
|
16735
17129
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -16787,17 +17181,17 @@ async function handlePlayPublish(args) {
|
|
|
16787
17181
|
artifactHash,
|
|
16788
17182
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
16789
17183
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
16790
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
16791
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
17184
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _579 => _579.version]), () => ( null)),
|
|
17185
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _580 => _580.artifactHash]), () => ( null)),
|
|
16792
17186
|
sourceBytes: {
|
|
16793
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
17187
|
+
before: _optionalChain([previousLive, 'optionalAccess', _581 => _581.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
16794
17188
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
16795
17189
|
},
|
|
16796
17190
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
16797
17191
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
16798
17192
|
};
|
|
16799
17193
|
if (options.jsonOutput) {
|
|
16800
|
-
|
|
17194
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result2);
|
|
16801
17195
|
} else {
|
|
16802
17196
|
printPublishReceipt({
|
|
16803
17197
|
name: rootPlayName,
|
|
@@ -16828,14 +17222,14 @@ async function handlePlayPublish(args) {
|
|
|
16828
17222
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
16829
17223
|
latest: useLatest
|
|
16830
17224
|
};
|
|
16831
|
-
|
|
17225
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result2);
|
|
16832
17226
|
return 0;
|
|
16833
17227
|
}
|
|
16834
17228
|
const resolvedName = parseReferencedPlayTarget2(playName).playName;
|
|
16835
17229
|
if (useLatest) {
|
|
16836
17230
|
const versions = await client.listPlayVersions(resolvedName);
|
|
16837
17231
|
const latest = versions[0];
|
|
16838
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
17232
|
+
if (!_optionalChain([latest, 'optionalAccess', _582 => _582._id])) {
|
|
16839
17233
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
16840
17234
|
return 1;
|
|
16841
17235
|
}
|
|
@@ -16852,7 +17246,7 @@ async function handlePlayPublish(args) {
|
|
|
16852
17246
|
revisionId ? { revisionId } : {}
|
|
16853
17247
|
);
|
|
16854
17248
|
if (options.jsonOutput) {
|
|
16855
|
-
|
|
17249
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result);
|
|
16856
17250
|
} else {
|
|
16857
17251
|
printPublishReceipt({
|
|
16858
17252
|
name: result.name,
|
|
@@ -16892,7 +17286,7 @@ async function handlePlayDelete(args) {
|
|
|
16892
17286
|
);
|
|
16893
17287
|
return 2;
|
|
16894
17288
|
}
|
|
16895
|
-
const client = new (0,
|
|
17289
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16896
17290
|
let detail;
|
|
16897
17291
|
try {
|
|
16898
17292
|
detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
|
|
@@ -16916,8 +17310,8 @@ async function handlePlayDelete(args) {
|
|
|
16916
17310
|
name: resolvedName,
|
|
16917
17311
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
16918
17312
|
};
|
|
16919
|
-
if (
|
|
16920
|
-
|
|
17313
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
17314
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result2);
|
|
16921
17315
|
} else {
|
|
16922
17316
|
process.stdout.write(
|
|
16923
17317
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -16927,8 +17321,8 @@ async function handlePlayDelete(args) {
|
|
|
16927
17321
|
return 0;
|
|
16928
17322
|
}
|
|
16929
17323
|
const result = await client.deletePlay(resolvedName);
|
|
16930
|
-
if (
|
|
16931
|
-
|
|
17324
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
17325
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result);
|
|
16932
17326
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
16933
17327
|
}
|
|
16934
17328
|
if (result.alreadyArchived) {
|
|
@@ -16967,13 +17361,13 @@ async function handlePlayRestore(args) {
|
|
|
16967
17361
|
);
|
|
16968
17362
|
return 2;
|
|
16969
17363
|
}
|
|
16970
|
-
const client = new (0,
|
|
17364
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
16971
17365
|
try {
|
|
16972
17366
|
const result = await client.restorePlay(
|
|
16973
17367
|
parseReferencedPlayTarget2(playName).playName
|
|
16974
17368
|
);
|
|
16975
|
-
if (
|
|
16976
|
-
|
|
17369
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
17370
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, result);
|
|
16977
17371
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
16978
17372
|
}
|
|
16979
17373
|
if (result.alreadyActive) {
|
|
@@ -17078,7 +17472,7 @@ Examples:
|
|
|
17078
17472
|
).action(async (target, options) => {
|
|
17079
17473
|
process.exitCode = await handlePlayCheck([
|
|
17080
17474
|
target,
|
|
17081
|
-
...
|
|
17475
|
+
..._chunkYEJMVAD3js.jsonFieldArgs.call(void 0, options.json),
|
|
17082
17476
|
...options.full ? ["--full"] : []
|
|
17083
17477
|
]);
|
|
17084
17478
|
});
|
|
@@ -17265,7 +17659,7 @@ JSON field selection:
|
|
|
17265
17659
|
...options.maxConcurrentRows ? ["--max-concurrent-rows", options.maxConcurrentRows] : [],
|
|
17266
17660
|
...options.open ? ["--open"] : [],
|
|
17267
17661
|
...options.debugMapLatency ? ["--debug-map-latency"] : [],
|
|
17268
|
-
...
|
|
17662
|
+
..._chunkYEJMVAD3js.jsonFieldArgs.call(void 0, options.json),
|
|
17269
17663
|
...options.full ? ["--full"] : [],
|
|
17270
17664
|
...passthroughArgs
|
|
17271
17665
|
]);
|
|
@@ -17320,9 +17714,9 @@ Examples:
|
|
|
17320
17714
|
const limit = Number(options.historyLimit);
|
|
17321
17715
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
17322
17716
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
17323
|
-
const client = new (0,
|
|
17717
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
17324
17718
|
if (options.binding) {
|
|
17325
|
-
|
|
17719
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0,
|
|
17326
17720
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
17327
17721
|
);
|
|
17328
17722
|
return;
|
|
@@ -17330,7 +17724,7 @@ Examples:
|
|
|
17330
17724
|
const result = await client.listPlayTriggerInventory({
|
|
17331
17725
|
cursor: options.cursor
|
|
17332
17726
|
});
|
|
17333
|
-
|
|
17727
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, {
|
|
17334
17728
|
...result,
|
|
17335
17729
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
|
|
17336
17730
|
});
|
|
@@ -17377,7 +17771,7 @@ Examples:
|
|
|
17377
17771
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
17378
17772
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
17379
17773
|
}
|
|
17380
|
-
const result = await new (0,
|
|
17774
|
+
const result = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().getPlaysActivity({
|
|
17381
17775
|
timeZone: options.timeZone,
|
|
17382
17776
|
days,
|
|
17383
17777
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -17391,7 +17785,7 @@ Examples:
|
|
|
17391
17785
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
17392
17786
|
);
|
|
17393
17787
|
}
|
|
17394
|
-
|
|
17788
|
+
_chunkYEJMVAD3js.printCommandEnvelope.call(void 0,
|
|
17395
17789
|
{ ...result },
|
|
17396
17790
|
{
|
|
17397
17791
|
json: options.json || !process.stdout.isTTY,
|
|
@@ -17420,7 +17814,7 @@ Examples:
|
|
|
17420
17814
|
false
|
|
17421
17815
|
);
|
|
17422
17816
|
});
|
|
17423
|
-
|
|
17817
|
+
_chunkO7NNH76Sjs.registerDeprecatedSearchCommand.call(void 0,
|
|
17424
17818
|
play,
|
|
17425
17819
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
17426
17820
|
);
|
|
@@ -17463,7 +17857,7 @@ Examples:
|
|
|
17463
17857
|
"JSON output; optionally select comma-separated dotted paths"
|
|
17464
17858
|
).action(async (target, options) => {
|
|
17465
17859
|
process.exitCode = await handlePlayDescribe(
|
|
17466
|
-
|
|
17860
|
+
_chunkYEJMVAD3js.describeArgs.call(void 0, target, options)
|
|
17467
17861
|
);
|
|
17468
17862
|
});
|
|
17469
17863
|
play.command("versions").description("List revisions for a named play.").addHelpText(
|
|
@@ -17570,7 +17964,7 @@ Examples:
|
|
|
17570
17964
|
deepline plays deployments <deployment-id>
|
|
17571
17965
|
`
|
|
17572
17966
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
|
|
17573
|
-
async (id, options) => id ?
|
|
17967
|
+
async (id, options) => id ? _chunkSRZ6XDX3js.handleDeploymentGet.call(void 0, id, options) : _chunkSRZ6XDX3js.handleDeploymentsList.call(void 0, options)
|
|
17574
17968
|
);
|
|
17575
17969
|
addPublishHelp(
|
|
17576
17970
|
play.command("publish <target>").description(
|
|
@@ -17694,6 +18088,7 @@ Examples:
|
|
|
17694
18088
|
registerRunReceiptCommand(runs);
|
|
17695
18089
|
registerRunChildrenCommand(runs);
|
|
17696
18090
|
registerRunHistoryCommand(runs);
|
|
18091
|
+
registerRunEventsCommand(runs);
|
|
17697
18092
|
runs.command("status <runId>").description(
|
|
17698
18093
|
"Legacy scalar-only read. Use runs get for canonical status, progress, logs, and results."
|
|
17699
18094
|
).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (runId, options) => {
|
|
@@ -17749,7 +18144,7 @@ Examples:
|
|
|
17749
18144
|
).action(async (runId, options) => {
|
|
17750
18145
|
process.exitCode = await handleRunGet([
|
|
17751
18146
|
runId,
|
|
17752
|
-
...
|
|
18147
|
+
..._chunkYEJMVAD3js.jsonFieldArgs.call(void 0, options.json),
|
|
17753
18148
|
...options.full ? ["--full"] : [],
|
|
17754
18149
|
...options.input ? ["--input"] : [],
|
|
17755
18150
|
...options.config ? ["--config"] : [],
|
|
@@ -17893,7 +18288,21 @@ Examples:
|
|
|
17893
18288
|
...options.logLevel ? ["--log-level", options.logLevel] : []
|
|
17894
18289
|
]);
|
|
17895
18290
|
});
|
|
17896
|
-
runs.command("logs [runId]").description("Read a run\u2019s logs or search recent events.").addHelpText("after", renderRunLogsHelp()).option("--limit <count>", "Maximum results: logs 200; events 100, max 200").option("--out <path>", "Save the full available text log").option("--failed", "Last 20 lines of a failed run").option("--log-level <level>", "debug (default), info, warn or error").
|
|
18291
|
+
const runLogsCommand = runs.command("logs [runId]").description("Read a run\u2019s logs or search recent events.").addHelpText("after", renderRunLogsHelp()).option("--limit <count>", "Maximum results: logs 200; events 100, max 200").option("--out <path>", "Save the full available text log").option("--failed", "Last 20 lines of a failed run").option("--log-level <level>", "debug (default), info, warn or error").option("--step <id>", "Query structured logs from this authored step").option(
|
|
18292
|
+
"--level <level>",
|
|
18293
|
+
"Query structured logs at this severity or above"
|
|
18294
|
+
).option(
|
|
18295
|
+
"--query <text>",
|
|
18296
|
+
"Find literal text in the full retained log message"
|
|
18297
|
+
).option(
|
|
18298
|
+
"--count",
|
|
18299
|
+
"Exact matching retained log count; no limit or payloads"
|
|
18300
|
+
).option("--group-by <fields>", "Count log groups by comma-separated fields").option(
|
|
18301
|
+
"--sum <field>",
|
|
18302
|
+
"Count and sum numeric values; repeatable, optionally grouped",
|
|
18303
|
+
(field, previous) => [...previous, field],
|
|
18304
|
+
[]
|
|
18305
|
+
).option("--fields", "Discover query fields, types and operators").addOption(
|
|
17897
18306
|
new (0, _commander.Option)(
|
|
17898
18307
|
"--logs",
|
|
17899
18308
|
"Compatibility alias for --log-level debug"
|
|
@@ -17919,24 +18328,32 @@ Examples:
|
|
|
17919
18328
|
).action(async (runId, options) => {
|
|
17920
18329
|
process.exitCode = await handleRunLogs([
|
|
17921
18330
|
...runId ? [runId] : [],
|
|
17922
|
-
...options.limit ? ["--limit", options.limit] : [],
|
|
17923
|
-
...options.out ? ["--out", options.out] : [],
|
|
18331
|
+
...options.limit !== void 0 ? ["--limit", options.limit] : [],
|
|
18332
|
+
...options.out !== void 0 ? ["--out", options.out] : [],
|
|
17924
18333
|
...options.failed ? ["--failed"] : [],
|
|
17925
18334
|
...options.logLevel ? ["--log-level", options.logLevel] : [],
|
|
18335
|
+
...options.step !== void 0 ? ["--step", options.step] : [],
|
|
18336
|
+
...options.level !== void 0 ? ["--level", options.level] : [],
|
|
18337
|
+
...options.query !== void 0 ? ["--query", options.query] : [],
|
|
18338
|
+
...options.count ? ["--count"] : [],
|
|
18339
|
+
...options.groupBy !== void 0 ? ["--group-by", options.groupBy] : [],
|
|
18340
|
+
...(_nullishCoalesce(options.sum, () => ( []))).flatMap((field) => ["--sum", field]),
|
|
18341
|
+
...options.fields ? ["--fields"] : [],
|
|
17926
18342
|
...options.logs ? ["--logs"] : [],
|
|
17927
18343
|
...options.debug ? ["--debug"] : [],
|
|
17928
|
-
...options.since ? ["--since", options.since] : [],
|
|
17929
|
-
...options.until ? ["--until", options.until] : [],
|
|
17930
|
-
...options.play ? ["--play", options.play] : [],
|
|
17931
|
-
...options.kind ? ["--kind", options.kind] : [],
|
|
17932
|
-
...options.where ? ["--where", options.where] : [],
|
|
18344
|
+
...options.since !== void 0 ? ["--since", options.since] : [],
|
|
18345
|
+
...options.until !== void 0 ? ["--until", options.until] : [],
|
|
18346
|
+
...options.play !== void 0 ? ["--play", options.play] : [],
|
|
18347
|
+
...options.kind !== void 0 ? ["--kind", options.kind] : [],
|
|
18348
|
+
...options.where !== void 0 ? ["--where", options.where] : [],
|
|
17933
18349
|
...options.payloads ? ["--payloads"] : [],
|
|
17934
|
-
...options.cursor ? ["--cursor", options.cursor] : [],
|
|
18350
|
+
...options.cursor !== void 0 ? ["--cursor", options.cursor] : [],
|
|
17935
18351
|
...options.runtimeNamespace ? ["--runtime-namespace", options.runtimeNamespace] : [],
|
|
17936
18352
|
...options.runtimeBackend ? ["--runtime-backend", options.runtimeBackend] : [],
|
|
17937
18353
|
...options.json ? ["--json"] : []
|
|
17938
18354
|
]);
|
|
17939
18355
|
});
|
|
18356
|
+
configureRunQueryCommandErrors(runLogsCommand, "logs");
|
|
17940
18357
|
runs.command("stop <runId>").description("Stop a play run.").addHelpText(
|
|
17941
18358
|
"after",
|
|
17942
18359
|
`
|
|
@@ -18002,7 +18419,7 @@ Examples:
|
|
|
18002
18419
|
...options.metadataOut ? ["--metadata-out", options.metadataOut] : [],
|
|
18003
18420
|
...options.wait ? ["--wait"] : [],
|
|
18004
18421
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
18005
|
-
...
|
|
18422
|
+
..._chunkYEJMVAD3js.jsonFieldArgs.call(void 0, options.json)
|
|
18006
18423
|
]);
|
|
18007
18424
|
});
|
|
18008
18425
|
const share = play.command("share").description(
|
|
@@ -18143,8 +18560,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
18143
18560
|
}
|
|
18144
18561
|
function shareUrlFields(status) {
|
|
18145
18562
|
return {
|
|
18146
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
18147
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
18563
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _583 => _583.share, 'optionalAccess', _584 => _584.publicPath])),
|
|
18564
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _585 => _585.share, 'optionalAccess', _586 => _586.canonicalPath]))
|
|
18148
18565
|
};
|
|
18149
18566
|
}
|
|
18150
18567
|
function shareStatusForOutput(status) {
|
|
@@ -18168,10 +18585,10 @@ async function handlePlayShareStatus(args) {
|
|
|
18168
18585
|
return 2;
|
|
18169
18586
|
}
|
|
18170
18587
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18171
|
-
const status = await new (0,
|
|
18588
|
+
const status = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().getSharePage(name);
|
|
18172
18589
|
const outputStatus = shareStatusForOutput(status);
|
|
18173
|
-
if (
|
|
18174
|
-
|
|
18590
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
18591
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, outputStatus);
|
|
18175
18592
|
return 0;
|
|
18176
18593
|
}
|
|
18177
18594
|
if (!outputStatus.share) {
|
|
@@ -18210,7 +18627,7 @@ async function handlePlaySharePublish(args) {
|
|
|
18210
18627
|
return 2;
|
|
18211
18628
|
}
|
|
18212
18629
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18213
|
-
const client = new (0,
|
|
18630
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
18214
18631
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18215
18632
|
let resolvedVersion;
|
|
18216
18633
|
if (!revisionId) {
|
|
@@ -18241,8 +18658,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18241
18658
|
);
|
|
18242
18659
|
if (!hasCompleted) {
|
|
18243
18660
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
18244
|
-
if (
|
|
18245
|
-
|
|
18661
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
18662
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, {
|
|
18246
18663
|
ok: false,
|
|
18247
18664
|
code: "NO_SUCCESSFUL_RUN",
|
|
18248
18665
|
message,
|
|
@@ -18266,8 +18683,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18266
18683
|
};
|
|
18267
18684
|
if (args.includes("--dry-run")) {
|
|
18268
18685
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
18269
|
-
if (
|
|
18270
|
-
|
|
18686
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
18687
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, plan);
|
|
18271
18688
|
} else {
|
|
18272
18689
|
console.log(
|
|
18273
18690
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -18277,13 +18694,13 @@ async function handlePlaySharePublish(args) {
|
|
|
18277
18694
|
}
|
|
18278
18695
|
const status = await client.publishSharePage(name, request);
|
|
18279
18696
|
const outputStatus = shareStatusForOutput(status);
|
|
18280
|
-
if (
|
|
18281
|
-
|
|
18697
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
18698
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, outputStatus);
|
|
18282
18699
|
return 0;
|
|
18283
18700
|
}
|
|
18284
18701
|
const urls = shareUrlFields(outputStatus);
|
|
18285
18702
|
console.log(
|
|
18286
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
18703
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _587 => _587.share, 'optionalAccess', _588 => _588.publicPath]))), () => ( ""))}`
|
|
18287
18704
|
);
|
|
18288
18705
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
18289
18706
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -18309,9 +18726,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
18309
18726
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
18310
18727
|
...seoIndexing ? { seoIndexing } : {}
|
|
18311
18728
|
};
|
|
18312
|
-
const status = await new (0,
|
|
18313
|
-
if (
|
|
18314
|
-
|
|
18729
|
+
const status = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().updateSharePage(name, request);
|
|
18730
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
18731
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, status);
|
|
18315
18732
|
return 0;
|
|
18316
18733
|
}
|
|
18317
18734
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -18326,13 +18743,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18326
18743
|
return 2;
|
|
18327
18744
|
}
|
|
18328
18745
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18329
|
-
const client = new (0,
|
|
18746
|
+
const client = new (0, _chunkTH3YBIJTjs.DeeplineClient)();
|
|
18330
18747
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18331
18748
|
const versionFlag = shareFlagValue(args, "--version");
|
|
18332
18749
|
if (!revisionId && versionFlag) {
|
|
18333
18750
|
const versions = await client.listPlayVersions(name);
|
|
18334
18751
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
18335
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
18752
|
+
if (!_optionalChain([chosen, 'optionalAccess', _589 => _589._id])) {
|
|
18336
18753
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
18337
18754
|
return 4;
|
|
18338
18755
|
}
|
|
@@ -18343,12 +18760,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18343
18760
|
revisionId ? { revisionId } : {}
|
|
18344
18761
|
);
|
|
18345
18762
|
const outputStatus = shareStatusForOutput(status);
|
|
18346
|
-
if (
|
|
18347
|
-
|
|
18763
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
18764
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, outputStatus);
|
|
18348
18765
|
return 0;
|
|
18349
18766
|
}
|
|
18350
18767
|
const urls = shareUrlFields(outputStatus);
|
|
18351
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
18768
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _590 => _590.share, 'optionalAccess', _591 => _591.publishedRevisionId]) === revisionId;
|
|
18352
18769
|
console.log(
|
|
18353
18770
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
18354
18771
|
);
|
|
@@ -18369,9 +18786,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
18369
18786
|
return 2;
|
|
18370
18787
|
}
|
|
18371
18788
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18372
|
-
const status = await new (0,
|
|
18373
|
-
if (
|
|
18374
|
-
|
|
18789
|
+
const status = await new (0, _chunkTH3YBIJTjs.DeeplineClient)().unpublishSharePage(name);
|
|
18790
|
+
if (_chunkYEJMVAD3js.argsWantJson.call(void 0, args)) {
|
|
18791
|
+
_chunkYEJMVAD3js.printCompactJson.call(void 0, status);
|
|
18375
18792
|
return 0;
|
|
18376
18793
|
}
|
|
18377
18794
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|