deepline 0.3.394 → 0.3.396
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client.ts +30 -162
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/plays/play-description.ts +167 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/cli/{auth-OSXDAVCF.mjs → auth-3LTD62VL.mjs} +4 -4
- package/dist/cli/auth-562JPKOM.js +39 -0
- package/dist/cli/{billing-ZNNKX3UR.mjs → billing-DP7ZAJBO.mjs} +5 -4
- package/dist/cli/{billing-EKLYOXUY.js → billing-PA5OXEM5.js} +76 -75
- package/dist/cli/{chunk-BP33SIZF.mjs → chunk-23GAA3YO.mjs} +1 -1
- package/dist/cli/{chunk-KI635JN4.js → chunk-2VOLOWYZ.js} +1087 -1056
- package/dist/cli/{chunk-XXUDVEXK.mjs → chunk-3T4MCB5R.mjs} +1026 -995
- package/dist/cli/{chunk-VB6KECLU.mjs → chunk-5WNJF2T3.mjs} +102 -36
- package/dist/cli/{chunk-KIUMEOM5.js → chunk-772W2SAU.js} +8 -8
- package/dist/cli/{chunk-2MDDA7A4.js → chunk-7Z66NHUC.js} +26 -26
- package/dist/cli/{chunk-M57J2SK4.mjs → chunk-AUYXWELC.mjs} +2 -2
- package/dist/cli/{chunk-354JCXA2.js → chunk-AVHLATII.js} +50 -50
- package/dist/cli/{chunk-MLPU5SMZ.js → chunk-DC6LTULT.js} +2 -2
- package/dist/cli/chunk-EIMG75BT.mjs +130 -0
- package/dist/cli/{chunk-6YAUMG27.js → chunk-GNN4MY5X.js} +1 -1
- package/dist/cli/{chunk-UXFSWG3Q.mjs → chunk-I4T4XAA2.mjs} +4 -4
- package/dist/cli/{chunk-MFB2VKBO.mjs → chunk-JCN4DHF7.mjs} +2 -2
- package/dist/cli/{chunk-VK6FYZLP.js → chunk-KAEZNPUM.js} +23 -8
- package/dist/cli/chunk-KXMNM4AQ.js +130 -0
- package/dist/cli/{chunk-XRQ2AQL7.mjs → chunk-LOGGNW4H.mjs} +2 -2
- package/dist/cli/{chunk-RDXFGPJU.js → chunk-LWERJUKN.js} +218 -218
- package/dist/cli/{chunk-QIQBYKLB.js → chunk-ME6XRFLY.js} +15 -15
- package/dist/cli/{chunk-JHIJIHFB.mjs → chunk-MR6XCBQJ.mjs} +23 -131
- package/dist/cli/{chunk-TJI2EN6K.mjs → chunk-NHB5YUCS.mjs} +1 -1
- package/dist/cli/{chunk-ZMVJSS6N.js → chunk-NSOTASOP.js} +101 -35
- package/dist/cli/{chunk-ZYBGA4AR.mjs → chunk-QHGPA362.mjs} +18 -3
- package/dist/cli/{chunk-4P27AXEA.js → chunk-RMTASUAK.js} +65 -65
- package/dist/cli/{chunk-KGNTKMRG.js → chunk-RTO5QZWT.js} +6 -6
- package/dist/cli/{chunk-X63FDZJZ.mjs → chunk-TLQ3FZOC.mjs} +3 -3
- package/dist/cli/{chunk-CS6RAIVY.js → chunk-V7UP2F4U.js} +4 -4
- package/dist/cli/{chunk-FJGW5GXU.mjs → chunk-VE3U3SQC.mjs} +1 -1
- package/dist/cli/{chunk-E23BQ5SC.js → chunk-WQJJNIMQ.js} +241 -349
- package/dist/cli/{chunk-NR3DFKNF.mjs → chunk-XKZXO7D3.mjs} +1 -1
- package/dist/cli/{csv-5AXRB35H.mjs → csv-RLRR74RQ.mjs} +3 -3
- package/dist/cli/{csv-LU7O75WE.js → csv-TF576S77.js} +12 -12
- package/dist/cli/{db-F7YTFKVM.js → db-FDBJUTFO.js} +30 -29
- package/dist/cli/{db-7XP5UWEW.mjs → db-XORGNBIC.mjs} +5 -4
- package/dist/cli/{describe-K4ES5LIL.mjs → describe-6O2ENKTP.mjs} +86 -67
- package/dist/cli/{describe-FRH32RDV.js → describe-EFWNECHI.js} +100 -81
- package/dist/cli/{executions-RZV5XPT2.js → executions-SFYAXPF4.js} +7 -6
- package/dist/cli/{executions-IEHEHJUO.mjs → executions-YPP7WR77.mjs} +5 -4
- package/dist/cli/{feedback-3P65QTX3.js → feedback-5UZFYMGB.js} +7 -7
- package/dist/cli/{feedback-FPUVZBAN.mjs → feedback-RBGA5ARU.mjs} +3 -3
- package/dist/cli/git-5LDY5ZID.js +23 -0
- package/dist/cli/{git-GLVVP7TY.mjs → git-IRSAJEK2.mjs} +4 -4
- package/dist/cli/index.js +93 -93
- package/dist/cli/index.mjs +42 -42
- package/dist/cli/{legacy-noops-XKSGZR7Q.js → legacy-noops-CVAOQY2F.js} +7 -7
- package/dist/cli/{legacy-noops-3MOI6NBM.mjs → legacy-noops-NA7N6ZOU.mjs} +4 -4
- package/dist/cli/{monitors-NZ2DYNST.js → monitors-4OMRXCXP.js} +86 -85
- package/dist/cli/{monitors-FTBGNEFG.mjs → monitors-ILZ2XHYG.mjs} +5 -4
- package/dist/cli/{org-V2J5RBCN.mjs → org-QDDXAE3J.mjs} +5 -4
- package/dist/cli/{org-MCKDQXIV.js → org-YGNJDD2X.js} +65 -64
- package/dist/cli/{chunk-RBJYWRCF.js → play-L535H26U.js} +270 -325
- package/dist/cli/{chunk-5BB2RGAX.mjs → play-VT6OHB2D.mjs} +77 -132
- package/dist/cli/{providers-2JEZ2264.js → providers-GPZ6PQAL.js} +8 -7
- package/dist/cli/{providers-I6RQJZFZ.mjs → providers-KG4W5MPK.mjs} +5 -4
- package/dist/cli/{quickstart-BIDQDMO4.mjs → quickstart-2JDGTXIG.mjs} +3 -3
- package/dist/cli/{quickstart-GJ2RPDU3.js → quickstart-UI27S5LO.js} +5 -5
- package/dist/cli/search-MGWROZ33.js +28 -0
- package/dist/cli/{search-ELRXFWG5.mjs → search-PW3RAUX7.mjs} +6 -5
- package/dist/cli/{secrets-SQXGZXIC.mjs → secrets-HNOMK5A2.mjs} +5 -4
- package/dist/cli/{secrets-53IT6VXD.js → secrets-WFAXOUZE.js} +14 -13
- package/dist/cli/{sessions-CAV5M77Y.js → sessions-366KROUA.js} +5 -5
- package/dist/cli/{sessions-2X5QF7SL.mjs → sessions-XLX3E5UO.mjs} +4 -4
- package/dist/cli/{settings-532WNAZO.js → settings-GADAG2UK.js} +75 -74
- package/dist/cli/{settings-7P67VGCJ.mjs → settings-YNZ4YKCH.mjs} +8 -7
- package/dist/cli/{setup-QGGBV2LE.mjs → setup-PSEHIUXO.mjs} +6 -6
- package/dist/cli/{setup-6L2VSUWJ.js → setup-R5YO7GT6.js} +41 -41
- package/dist/cli/skills-JF2LPEGM.js +28 -0
- package/dist/cli/{skills-3FE62WBG.mjs → skills-LTQBP6CZ.mjs} +4 -4
- package/dist/cli/tools-CP2PEFRN.js +34 -0
- package/dist/cli/{tools-DMR25DEF.mjs → tools-UAXDWU63.mjs} +11 -18
- package/dist/cli/update-HZHZOU6C.js +28 -0
- package/dist/cli/{update-6RZMHJZP.mjs → update-SMNIBIMS.mjs} +6 -6
- package/dist/cli/{workflow-TX4F2PIX.js → workflow-AOQVZHMD.js} +16 -15
- package/dist/cli/{workflow-L2DQRE6R.mjs → workflow-IKGMBGF6.mjs} +6 -5
- package/dist/{client-C3O1Ipf3.d.ts → client-Bgis7F6-.d.ts} +22 -12
- package/dist/{client-BktIPdIj.d.mts → client-DiGl8ska.d.mts} +22 -12
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -10
- package/dist/index.mjs +9 -8
- package/dist/install-integrity.json +83 -78
- package/dist/plays/play-description.d.mts +6 -0
- package/dist/plays/play-description.d.ts +6 -0
- package/dist/plays/play-description.js +11 -0
- package/dist/plays/play-description.mjs +11 -0
- 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 +6 -1
- package/dist/cli/auth-IHKISLJQ.js +0 -39
- package/dist/cli/git-MFFAWVVX.js +0 -23
- package/dist/cli/play-AJFGME3B.mjs +0 -158
- package/dist/cli/play-WLSN2EO2.js +0 -158
- package/dist/cli/search-5VN4YD4I.js +0 -27
- package/dist/cli/skills-S6NPZAN7.js +0 -28
- package/dist/cli/tools-647RLXQS.js +0 -41
- package/dist/cli/update-WVTSC3EM.js +0 -28
- package/dist/cli/{chunk-KZZC33PY.mjs → chunk-H5KLUGY7.mjs} +214 -214
|
@@ -2,32 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkNSOTASOPjs = require('./chunk-NSOTASOP.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
var _chunk7Z66NHUCjs = require('./chunk-7Z66NHUC.js');
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
var _chunkMH73HMPVjs = require('./chunk-MH73HMPV.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var _chunkGSK6NHVMjs = require('./chunk-GSK6NHVM.js');
|
|
20
19
|
|
|
20
|
+
var _chunkMH73HMPVjs = require('./chunk-MH73HMPV.js');
|
|
21
|
+
require('./chunk-3KC45UVF.js');
|
|
21
22
|
|
|
22
|
-
var _chunkVK6FYZLPjs = require('./chunk-VK6FYZLP.js');
|
|
23
23
|
|
|
24
|
+
var _chunkGSK6NHVMjs = require('./chunk-GSK6NHVM.js');
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
var
|
|
27
|
+
var _chunkKAEZNPUMjs = require('./chunk-KAEZNPUM.js');
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
var _chunkGEJDBXXMjs = require('./chunk-GEJDBXXM.js');
|
|
32
|
+
require('./chunk-KB4SDX5S.js');
|
|
33
|
+
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
|
|
@@ -39,20 +42,23 @@ var _chunkGEJDBXXMjs = require('./chunk-GEJDBXXM.js');
|
|
|
39
42
|
|
|
40
43
|
|
|
41
44
|
|
|
45
|
+
var _chunkWQJJNIMQjs = require('./chunk-WQJJNIMQ.js');
|
|
46
|
+
require('./chunk-S6R3OX7B.js');
|
|
42
47
|
|
|
43
48
|
|
|
44
49
|
|
|
45
|
-
var _chunkE23BQ5SCjs = require('./chunk-E23BQ5SC.js');
|
|
46
50
|
|
|
47
51
|
|
|
48
52
|
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
|
|
56
|
+
var _chunkUHNDVD3Pjs = require('./chunk-UHNDVD3P.js');
|
|
52
57
|
|
|
53
58
|
|
|
54
59
|
|
|
55
|
-
var
|
|
60
|
+
var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
|
|
61
|
+
require('./chunk-XDVT3GOM.js');
|
|
56
62
|
|
|
57
63
|
|
|
58
64
|
|
|
@@ -75,13 +81,16 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
75
81
|
|
|
76
82
|
|
|
77
83
|
|
|
78
|
-
var
|
|
84
|
+
var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
|
|
79
85
|
|
|
80
86
|
|
|
81
|
-
var
|
|
87
|
+
var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
|
|
88
|
+
require('./chunk-XNYIZMNQ.js');
|
|
82
89
|
|
|
83
90
|
|
|
84
91
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
92
|
+
require('./chunk-GNN4MY5X.js');
|
|
93
|
+
require('./chunk-OG64RBAC.js');
|
|
85
94
|
|
|
86
95
|
|
|
87
96
|
|
|
@@ -2062,7 +2071,7 @@ function resolveField(key, command) {
|
|
|
2062
2071
|
function printSettings(result, json, name) {
|
|
2063
2072
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2064
2073
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2065
|
-
|
|
2074
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2066
2075
|
{
|
|
2067
2076
|
...result,
|
|
2068
2077
|
settings: Object.fromEntries(
|
|
@@ -2106,7 +2115,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2106
2115
|
valueSyntax: field.cli.valueSyntax,
|
|
2107
2116
|
examples: field.cli.examples
|
|
2108
2117
|
}));
|
|
2109
|
-
|
|
2118
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2110
2119
|
{
|
|
2111
2120
|
fields: descriptions,
|
|
2112
2121
|
render: {
|
|
@@ -2131,7 +2140,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2131
2140
|
async (options, command) => {
|
|
2132
2141
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2133
2142
|
printSettings(
|
|
2134
|
-
await new (0,
|
|
2143
|
+
await new (0, _chunkWQJJNIMQjs.DeeplineClient)().getPlaySettings(options.play),
|
|
2135
2144
|
options.json,
|
|
2136
2145
|
options.name
|
|
2137
2146
|
);
|
|
@@ -2162,7 +2171,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2162
2171
|
);
|
|
2163
2172
|
}
|
|
2164
2173
|
if (options.dryRun) {
|
|
2165
|
-
|
|
2174
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2166
2175
|
{
|
|
2167
2176
|
dryRun: true,
|
|
2168
2177
|
play,
|
|
@@ -2183,7 +2192,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2183
2192
|
return;
|
|
2184
2193
|
}
|
|
2185
2194
|
printSettings(
|
|
2186
|
-
await new (0,
|
|
2195
|
+
await new (0, _chunkWQJJNIMQjs.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2187
2196
|
options.json
|
|
2188
2197
|
);
|
|
2189
2198
|
};
|
|
@@ -2209,13 +2218,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2209
2218
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2210
2219
|
{ exitCode: 2 }
|
|
2211
2220
|
);
|
|
2212
|
-
const page = await new (0,
|
|
2221
|
+
const page = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().listPlaySettingsPaths({
|
|
2213
2222
|
root: options.root,
|
|
2214
2223
|
limit,
|
|
2215
2224
|
cursor: options.cursor
|
|
2216
2225
|
});
|
|
2217
2226
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2218
|
-
|
|
2227
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2219
2228
|
{
|
|
2220
2229
|
...page,
|
|
2221
2230
|
nextCommand,
|
|
@@ -2266,7 +2275,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2266
2275
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
|
|
2267
2276
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
|
|
2268
2277
|
};
|
|
2269
|
-
const client = new (0,
|
|
2278
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
2270
2279
|
const paths = [];
|
|
2271
2280
|
let cursor;
|
|
2272
2281
|
do {
|
|
@@ -2328,7 +2337,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2328
2337
|
moved.push(move.playName);
|
|
2329
2338
|
}
|
|
2330
2339
|
}
|
|
2331
|
-
|
|
2340
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2332
2341
|
{
|
|
2333
2342
|
dryRun: Boolean(options.dryRun),
|
|
2334
2343
|
from: options.from,
|
|
@@ -2456,7 +2465,7 @@ function triggerLines(view) {
|
|
|
2456
2465
|
return lines;
|
|
2457
2466
|
}
|
|
2458
2467
|
function printView(view, json) {
|
|
2459
|
-
|
|
2468
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2460
2469
|
{
|
|
2461
2470
|
...view,
|
|
2462
2471
|
render: {
|
|
@@ -2469,7 +2478,7 @@ function printView(view, json) {
|
|
|
2469
2478
|
);
|
|
2470
2479
|
}
|
|
2471
2480
|
function printResult(result, json) {
|
|
2472
|
-
|
|
2481
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2473
2482
|
{
|
|
2474
2483
|
...result,
|
|
2475
2484
|
render: {
|
|
@@ -2499,7 +2508,7 @@ async function mutate(command, options, build) {
|
|
|
2499
2508
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2500
2509
|
}
|
|
2501
2510
|
if (options.dryRun) {
|
|
2502
|
-
|
|
2511
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
2503
2512
|
{
|
|
2504
2513
|
dryRun: true,
|
|
2505
2514
|
play: options.play,
|
|
@@ -2518,7 +2527,7 @@ async function mutate(command, options, build) {
|
|
|
2518
2527
|
return;
|
|
2519
2528
|
}
|
|
2520
2529
|
printResult(
|
|
2521
|
-
await new (0,
|
|
2530
|
+
await new (0, _chunkWQJJNIMQjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2522
2531
|
options.json
|
|
2523
2532
|
);
|
|
2524
2533
|
}
|
|
@@ -2551,7 +2560,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2551
2560
|
}).addHelpText("after", help2);
|
|
2552
2561
|
trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON").addHelpText("after", help2).action(async (options) => {
|
|
2553
2562
|
printView(
|
|
2554
|
-
await new (0,
|
|
2563
|
+
await new (0, _chunkWQJJNIMQjs.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2555
2564
|
options.json
|
|
2556
2565
|
);
|
|
2557
2566
|
});
|
|
@@ -2595,7 +2604,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2595
2604
|
if (options.auth === void 0) {
|
|
2596
2605
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2597
2606
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2598
|
-
const current = await new (0,
|
|
2607
|
+
const current = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().getPlayTriggerConfig(
|
|
2599
2608
|
options.play
|
|
2600
2609
|
);
|
|
2601
2610
|
return {
|
|
@@ -2672,7 +2681,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2672
2681
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2673
2682
|
"runtime.event": "Other event."
|
|
2674
2683
|
};
|
|
2675
|
-
var RUN_LOGS_KIND_HELP =
|
|
2684
|
+
var RUN_LOGS_KIND_HELP = _chunkWQJJNIMQjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2676
2685
|
kind,
|
|
2677
2686
|
description: KIND_DESCRIPTIONS[kind]
|
|
2678
2687
|
}));
|
|
@@ -2809,9 +2818,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2809
2818
|
const args = program.args;
|
|
2810
2819
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2811
2820
|
error.exitCode = 2;
|
|
2812
|
-
if (
|
|
2813
|
-
|
|
2814
|
-
Object.assign(new (0,
|
|
2821
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2822
|
+
_chunkRTO5QZWTjs.printJsonError.call(void 0,
|
|
2823
|
+
Object.assign(new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(error.message), {
|
|
2815
2824
|
exitCode: 2,
|
|
2816
2825
|
retryable: false
|
|
2817
2826
|
})
|
|
@@ -2855,14 +2864,14 @@ function parseQuery(args, resource) {
|
|
|
2855
2864
|
if (VALUE_FLAGS.has(flag)) {
|
|
2856
2865
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2857
2866
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2858
|
-
throw new (0,
|
|
2867
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2859
2868
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2860
2869
|
);
|
|
2861
2870
|
}
|
|
2862
2871
|
if (flag === "--sum") sums.push(value);
|
|
2863
2872
|
else {
|
|
2864
2873
|
if (values[flag] !== void 0) {
|
|
2865
|
-
throw new (0,
|
|
2874
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2866
2875
|
`${flag} may only be supplied once.`
|
|
2867
2876
|
);
|
|
2868
2877
|
}
|
|
@@ -2876,12 +2885,12 @@ function parseQuery(args, resource) {
|
|
|
2876
2885
|
}
|
|
2877
2886
|
if (arg.startsWith("-")) {
|
|
2878
2887
|
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.";
|
|
2879
|
-
throw new (0,
|
|
2888
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2880
2889
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2881
2890
|
);
|
|
2882
2891
|
}
|
|
2883
2892
|
if (runId !== void 0) {
|
|
2884
|
-
throw new (0,
|
|
2893
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2885
2894
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2886
2895
|
);
|
|
2887
2896
|
}
|
|
@@ -2889,7 +2898,7 @@ function parseQuery(args, resource) {
|
|
|
2889
2898
|
}
|
|
2890
2899
|
if (switches.has("--fields")) {
|
|
2891
2900
|
if (runId !== void 0) {
|
|
2892
|
-
throw new (0,
|
|
2901
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2893
2902
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2894
2903
|
);
|
|
2895
2904
|
}
|
|
@@ -2902,18 +2911,18 @@ function parseQuery(args, resource) {
|
|
|
2902
2911
|
)
|
|
2903
2912
|
];
|
|
2904
2913
|
if (incompatible.length) {
|
|
2905
|
-
throw new (0,
|
|
2914
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2906
2915
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2907
2916
|
);
|
|
2908
2917
|
}
|
|
2909
2918
|
}
|
|
2910
2919
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2911
|
-
throw new (0,
|
|
2920
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2912
2921
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2913
2922
|
);
|
|
2914
2923
|
}
|
|
2915
2924
|
if (sums.length && switches.has("--count")) {
|
|
2916
|
-
throw new (0,
|
|
2925
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2917
2926
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2918
2927
|
);
|
|
2919
2928
|
}
|
|
@@ -2921,7 +2930,7 @@ function parseQuery(args, resource) {
|
|
|
2921
2930
|
if (operation === "count") {
|
|
2922
2931
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2923
2932
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2924
|
-
throw new (0,
|
|
2933
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2925
2934
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2926
2935
|
);
|
|
2927
2936
|
}
|
|
@@ -2956,16 +2965,16 @@ function parseQuery(args, resource) {
|
|
|
2956
2965
|
];
|
|
2957
2966
|
}
|
|
2958
2967
|
}
|
|
2959
|
-
const request =
|
|
2968
|
+
const request = _chunkWQJJNIMQjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
2960
2969
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
2961
2970
|
const backend = values["--runtime-backend"];
|
|
2962
2971
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
2963
|
-
throw new (0,
|
|
2972
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2964
2973
|
"--runtime-backend must be daytona or modal."
|
|
2965
2974
|
);
|
|
2966
2975
|
}
|
|
2967
2976
|
if (backend && !namespace) {
|
|
2968
|
-
throw new (0,
|
|
2977
|
+
throw new (0, _chunkWQJJNIMQjs.RunEventQueryInputError)(
|
|
2969
2978
|
"--runtime-backend requires --runtime-namespace."
|
|
2970
2979
|
);
|
|
2971
2980
|
}
|
|
@@ -3012,12 +3021,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3012
3021
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3013
3022
|
const record3 = failure;
|
|
3014
3023
|
const status = record3.statusCode;
|
|
3015
|
-
const exitCode = error instanceof
|
|
3024
|
+
const exitCode = error instanceof _chunkWQJJNIMQjs.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;
|
|
3016
3025
|
const diagnostic = Object.assign(failure, {
|
|
3017
3026
|
exitCode,
|
|
3018
3027
|
retryable: exitCode === 5
|
|
3019
3028
|
});
|
|
3020
|
-
if (
|
|
3029
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) _chunkRTO5QZWTjs.printJsonError.call(void 0, diagnostic);
|
|
3021
3030
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3022
3031
|
return exitCode;
|
|
3023
3032
|
}
|
|
@@ -3032,7 +3041,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3032
3041
|
...criteria
|
|
3033
3042
|
} = request;
|
|
3034
3043
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3035
|
-
const client = new (0,
|
|
3044
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
3036
3045
|
let result;
|
|
3037
3046
|
if (request.operation === "fields") {
|
|
3038
3047
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3098,13 +3107,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3098
3107
|
lines.push(`Next page: ${nextPage}`);
|
|
3099
3108
|
}
|
|
3100
3109
|
}
|
|
3101
|
-
|
|
3110
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
3102
3111
|
{
|
|
3103
3112
|
...result,
|
|
3104
3113
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3105
3114
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3106
3115
|
},
|
|
3107
|
-
{ json:
|
|
3116
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3108
3117
|
` }
|
|
3109
3118
|
);
|
|
3110
3119
|
return 0;
|
|
@@ -3924,7 +3933,7 @@ function checkedRunExample(plays, target) {
|
|
|
3924
3933
|
const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
3925
3934
|
const base = `deepline plays run --file ${quote(target)}`;
|
|
3926
3935
|
return {
|
|
3927
|
-
command: `${base}${
|
|
3936
|
+
command: `${base}${_chunkKXMNM4AQjs.playInputExampleArgs.call(void 0, schema)}`,
|
|
3928
3937
|
note: "Runs the local file without publishing and may spend credits. Supply the indicated file; JSON input must match inputSchema."
|
|
3929
3938
|
};
|
|
3930
3939
|
}
|
|
@@ -4022,7 +4031,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4022
4031
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4023
4032
|
);
|
|
4024
4033
|
}
|
|
4025
|
-
const response = await new (0,
|
|
4034
|
+
const response = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().runs.getReceipts(runId, {
|
|
4026
4035
|
keys
|
|
4027
4036
|
});
|
|
4028
4037
|
const failed = response.receipts.filter(
|
|
@@ -4034,7 +4043,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4034
4043
|
JSON.stringify(response, null, 2) + "\n",
|
|
4035
4044
|
{ flag: "wx", mode: 384 }
|
|
4036
4045
|
);
|
|
4037
|
-
|
|
4046
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
4038
4047
|
{
|
|
4039
4048
|
runId,
|
|
4040
4049
|
out: options.out,
|
|
@@ -4044,7 +4053,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4044
4053
|
{ json: true }
|
|
4045
4054
|
);
|
|
4046
4055
|
} else {
|
|
4047
|
-
|
|
4056
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4048
4057
|
}
|
|
4049
4058
|
if (failed)
|
|
4050
4059
|
process.exitCode = response.receipts.some(
|
|
@@ -4083,7 +4092,7 @@ includes nextCommand when another page is available.
|
|
|
4083
4092
|
{ exitCode: 2 }
|
|
4084
4093
|
);
|
|
4085
4094
|
}
|
|
4086
|
-
const page = await new (0,
|
|
4095
|
+
const page = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().runs.children(parentRunId, {
|
|
4087
4096
|
launchKey: options.launchKey,
|
|
4088
4097
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4089
4098
|
limit
|
|
@@ -4098,7 +4107,7 @@ includes nextCommand when another page is available.
|
|
|
4098
4107
|
"--limit",
|
|
4099
4108
|
String(limit)
|
|
4100
4109
|
].join(" ") : null;
|
|
4101
|
-
|
|
4110
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
4102
4111
|
{
|
|
4103
4112
|
parentRunId,
|
|
4104
4113
|
launchKey: options.launchKey,
|
|
@@ -4134,7 +4143,7 @@ async function handleRunsHistory(options) {
|
|
|
4134
4143
|
throw new Error("--limit must be a positive integer.");
|
|
4135
4144
|
}
|
|
4136
4145
|
}
|
|
4137
|
-
const page = await new (0,
|
|
4146
|
+
const page = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().runs.history({
|
|
4138
4147
|
cursor: options.cursor,
|
|
4139
4148
|
orgId: options.org,
|
|
4140
4149
|
search: options.search,
|
|
@@ -4150,7 +4159,7 @@ async function handleRunsHistory(options) {
|
|
|
4150
4159
|
);
|
|
4151
4160
|
}
|
|
4152
4161
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4153
|
-
|
|
4162
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
4154
4163
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4155
4164
|
options.json ? { json: true } : {}
|
|
4156
4165
|
);
|
|
@@ -4202,12 +4211,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4202
4211
|
return 1;
|
|
4203
4212
|
}
|
|
4204
4213
|
}
|
|
4205
|
-
const result = await new (0,
|
|
4214
|
+
const result = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().runs.rerun(runId, {
|
|
4206
4215
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4207
4216
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4208
4217
|
});
|
|
4209
|
-
if (
|
|
4210
|
-
|
|
4218
|
+
if (_chunkRTO5QZWTjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4219
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4211
4220
|
} else {
|
|
4212
4221
|
console.log(
|
|
4213
4222
|
result.deduplicated === true ? `
|
|
@@ -4475,7 +4484,7 @@ function projectRunDatasetCell(value) {
|
|
|
4475
4484
|
const logicalValue = parseSerializedDatasetValue(value);
|
|
4476
4485
|
if (logicalValue === null || logicalValue === void 0) return logicalValue;
|
|
4477
4486
|
if (typeof logicalValue === "object") {
|
|
4478
|
-
return
|
|
4487
|
+
return _chunkRTO5QZWTjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
|
|
4479
4488
|
}
|
|
4480
4489
|
return logicalValue;
|
|
4481
4490
|
}
|
|
@@ -6902,7 +6911,7 @@ function renderOutcome(outcome) {
|
|
|
6902
6911
|
function printResult2(input) {
|
|
6903
6912
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6904
6913
|
if (failed) process.exitCode = 1;
|
|
6905
|
-
|
|
6914
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
6906
6915
|
{
|
|
6907
6916
|
deployment: { ...input.deployment, status: input.status },
|
|
6908
6917
|
plays: input.outcomes,
|
|
@@ -6927,7 +6936,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6927
6936
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6928
6937
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6929
6938
|
});
|
|
6930
|
-
const { http, config } =
|
|
6939
|
+
const { http, config } = _chunkRTO5QZWTjs.getAuthedHttpClient.call(void 0, );
|
|
6931
6940
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6932
6941
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6933
6942
|
deliveryId,
|
|
@@ -6954,7 +6963,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6954
6963
|
},
|
|
6955
6964
|
{
|
|
6956
6965
|
bundle: bundleDeployPlayFile,
|
|
6957
|
-
fetchImpl:
|
|
6966
|
+
fetchImpl: _chunkV7UP2F4Ujs.fetchWithDeploymentProtection,
|
|
6958
6967
|
// The plays are already here: "opening" the source is naming it.
|
|
6959
6968
|
openSource: async () => ({
|
|
6960
6969
|
open: async () => ({ repoRoot: root })
|
|
@@ -7522,7 +7531,7 @@ function parseInputFlagValue(raw) {
|
|
|
7522
7531
|
return raw;
|
|
7523
7532
|
}
|
|
7524
7533
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
7525
|
-
const selection =
|
|
7534
|
+
const selection = _chunkRTO5QZWTjs.parseJsonFields.call(void 0, args, "run");
|
|
7526
7535
|
args = selection.args;
|
|
7527
7536
|
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.";
|
|
7528
7537
|
let filePath = null;
|
|
@@ -7534,7 +7543,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
7534
7543
|
let revisionSelector = null;
|
|
7535
7544
|
const watch = !args.includes("--no-wait");
|
|
7536
7545
|
const dryRun = args.includes("--dry-run");
|
|
7537
|
-
let jsonOutput = dryRun ?
|
|
7546
|
+
let jsonOutput = dryRun ? _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
7538
7547
|
const fullJson = args.includes("--full");
|
|
7539
7548
|
const force = args.includes("--force");
|
|
7540
7549
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -7597,7 +7606,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
7597
7606
|
"--log-level requires one of: debug, info, warn, error."
|
|
7598
7607
|
);
|
|
7599
7608
|
}
|
|
7600
|
-
const parsed =
|
|
7609
|
+
const parsed = _chunkWQJJNIMQjs.parseLogLevel.call(void 0, value);
|
|
7601
7610
|
if (!parsed) {
|
|
7602
7611
|
throw new Error(
|
|
7603
7612
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -7915,7 +7924,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
|
|
|
7915
7924
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
7916
7925
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
7917
7926
|
);
|
|
7918
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
7927
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkWQJJNIMQjs.parseLogLevel.call(void 0, options.logLevel);
|
|
7919
7928
|
if (!logLevel)
|
|
7920
7929
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
7921
7930
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -7929,13 +7938,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
|
|
|
7929
7938
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
7930
7939
|
logLevel = "debug";
|
|
7931
7940
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
7932
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
7933
|
-
[...fullJson ? ["--full"] : [], ...
|
|
7941
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunkRTO5QZWTjs.parseJsonFields.call(void 0,
|
|
7942
|
+
[...fullJson ? ["--full"] : [], ..._chunkRTO5QZWTjs.jsonFieldArgs.call(void 0, options.json)],
|
|
7934
7943
|
"run"
|
|
7935
7944
|
).fields;
|
|
7936
7945
|
const watch = options.wait === false ? false : base.watch;
|
|
7937
7946
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
7938
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
7947
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunkRTO5QZWTjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
7939
7948
|
const verboseLogs = Boolean(
|
|
7940
7949
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
7941
7950
|
);
|
|
@@ -7982,7 +7991,7 @@ function playAuthoringGraphPath(parent, filePath) {
|
|
|
7982
7991
|
// src/cli/renderers/local-play-execution.ts
|
|
7983
7992
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
7984
7993
|
if (options.dryRun) {
|
|
7985
|
-
|
|
7994
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
7986
7995
|
return;
|
|
7987
7996
|
}
|
|
7988
7997
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -8946,7 +8955,7 @@ function playStatusErrorText(status) {
|
|
|
8946
8955
|
function isRetryablePendingStartFailure(status) {
|
|
8947
8956
|
if (status.status !== "failed") return false;
|
|
8948
8957
|
if (status.runId && status.runId !== "pending") return false;
|
|
8949
|
-
return
|
|
8958
|
+
return _chunkWQJJNIMQjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
8950
8959
|
}
|
|
8951
8960
|
function pendingStartFailureStatus(input) {
|
|
8952
8961
|
const message = input.error instanceof Error ? input.error.message : String(input.error);
|
|
@@ -8973,13 +8982,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
|
8973
8982
|
var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
8974
8983
|
function watchSurfaceReaches(state, provenance, level) {
|
|
8975
8984
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
8976
|
-
if (!
|
|
8985
|
+
if (!_chunkWQJJNIMQjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
8977
8986
|
return false;
|
|
8978
8987
|
}
|
|
8979
|
-
if (
|
|
8988
|
+
if (_chunkWQJJNIMQjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
8980
8989
|
return true;
|
|
8981
8990
|
}
|
|
8982
|
-
return state.verbose === true &&
|
|
8991
|
+
return state.verbose === true && _chunkWQJJNIMQjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
8983
8992
|
}
|
|
8984
8993
|
function getEventPayload(event) {
|
|
8985
8994
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -9474,11 +9483,6 @@ function printPlayStatusHeartbeat(input) {
|
|
|
9474
9483
|
input.state.lastStatusHeartbeatAt = now;
|
|
9475
9484
|
input.progress.writeLine(line);
|
|
9476
9485
|
}
|
|
9477
|
-
function buildPlayDashboardUrl(baseUrl, playName) {
|
|
9478
|
-
const trimmedBase = baseUrl.replace(/\/$/, "");
|
|
9479
|
-
const encodedPlayName = encodeURIComponent(playName);
|
|
9480
|
-
return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
|
|
9481
|
-
}
|
|
9482
9486
|
function resolveRunPlayName(status, runId) {
|
|
9483
9487
|
const packaged = _optionalChain([status, 'access', _301 => _301.package, 'optionalAccess', _302 => _302.run, 'optionalAccess', _303 => _303.playName]);
|
|
9484
9488
|
if (typeof packaged === "string" && packaged.trim()) return packaged.trim();
|
|
@@ -9486,7 +9490,7 @@ function resolveRunPlayName(status, runId) {
|
|
|
9486
9490
|
}
|
|
9487
9491
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
9488
9492
|
if (open2 && dashboardUrl) {
|
|
9489
|
-
|
|
9493
|
+
_chunkRTO5QZWTjs.openInBrowser.call(void 0, dashboardUrl);
|
|
9490
9494
|
}
|
|
9491
9495
|
}
|
|
9492
9496
|
function printPlayLogLines(input) {
|
|
@@ -9548,7 +9552,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
9548
9552
|
billing: false
|
|
9549
9553
|
});
|
|
9550
9554
|
} catch (error) {
|
|
9551
|
-
if (
|
|
9555
|
+
if (_chunkWQJJNIMQjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
9552
9556
|
return null;
|
|
9553
9557
|
}
|
|
9554
9558
|
throw error;
|
|
@@ -9703,7 +9707,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
9703
9707
|
}
|
|
9704
9708
|
async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
9705
9709
|
const startedAt = Date.now();
|
|
9706
|
-
const dashboardUrl = buildPlayDashboardUrl(
|
|
9710
|
+
const dashboardUrl = _chunkNSOTASOPjs.buildPlayDashboardUrl.call(void 0,
|
|
9707
9711
|
input.client.baseUrl,
|
|
9708
9712
|
input.playName
|
|
9709
9713
|
);
|
|
@@ -9746,7 +9750,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9746
9750
|
billing: false
|
|
9747
9751
|
});
|
|
9748
9752
|
} catch (error) {
|
|
9749
|
-
if (
|
|
9753
|
+
if (_chunkWQJJNIMQjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9750
9754
|
return null;
|
|
9751
9755
|
}
|
|
9752
9756
|
throw error;
|
|
@@ -9954,7 +9958,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9954
9958
|
lastPhase
|
|
9955
9959
|
});
|
|
9956
9960
|
}
|
|
9957
|
-
if (lastKnownWorkflowId &&
|
|
9961
|
+
if (lastKnownWorkflowId && _chunkWQJJNIMQjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9958
9962
|
if (timeout) {
|
|
9959
9963
|
clearTimeout(timeout);
|
|
9960
9964
|
}
|
|
@@ -9990,7 +9994,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9990
9994
|
onRunAdmitted: confirmAdmission
|
|
9991
9995
|
});
|
|
9992
9996
|
}
|
|
9993
|
-
if (!lastKnownWorkflowId &&
|
|
9997
|
+
if (!lastKnownWorkflowId && _chunkWQJJNIMQjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9994
9998
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
9995
9999
|
phase: "cli.play_start_stream_transient_failure",
|
|
9996
10000
|
ms: Date.now() - startedAt,
|
|
@@ -10089,7 +10093,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
10089
10093
|
"logs"
|
|
10090
10094
|
]);
|
|
10091
10095
|
function formatPlayLogLine(rawLine, state) {
|
|
10092
|
-
const classified =
|
|
10096
|
+
const classified = _chunkWQJJNIMQjs.classifyLogLine.call(void 0, rawLine);
|
|
10093
10097
|
const line = classified.line;
|
|
10094
10098
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
10095
10099
|
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _317 => _317[1]]) ? new Date(timestampMatch[1]) : null;
|
|
@@ -10104,14 +10108,14 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
10104
10108
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
10105
10109
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
10106
10110
|
if (providerWait && !state.verbose) {
|
|
10107
|
-
return
|
|
10111
|
+
return _chunkWQJJNIMQjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
10108
10112
|
}
|
|
10109
10113
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
10110
10114
|
if (mapProgress && !state.verbose) {
|
|
10111
|
-
return
|
|
10115
|
+
return _chunkWQJJNIMQjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
10112
10116
|
}
|
|
10113
10117
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
10114
|
-
if (!
|
|
10118
|
+
if (!_chunkWQJJNIMQjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10115
10119
|
return null;
|
|
10116
10120
|
}
|
|
10117
10121
|
if (state.emittedRunnerStarted) {
|
|
@@ -10124,7 +10128,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
10124
10128
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
10125
10129
|
);
|
|
10126
10130
|
if (mapStart) {
|
|
10127
|
-
if (!
|
|
10131
|
+
if (!_chunkWQJJNIMQjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10128
10132
|
return null;
|
|
10129
10133
|
}
|
|
10130
10134
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -10134,7 +10138,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
10134
10138
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
10135
10139
|
);
|
|
10136
10140
|
if (mapDone) {
|
|
10137
|
-
if (!
|
|
10141
|
+
if (!_chunkWQJJNIMQjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10138
10142
|
return null;
|
|
10139
10143
|
}
|
|
10140
10144
|
const [, results, executed, cached] = mapDone;
|
|
@@ -11421,7 +11425,7 @@ function formatRecentRunLogLines(value) {
|
|
|
11421
11425
|
(line) => typeof line === "string"
|
|
11422
11426
|
);
|
|
11423
11427
|
if (tail.length === 0) return [];
|
|
11424
|
-
const shown = tail.map((line) =>
|
|
11428
|
+
const shown = tail.map((line) => _chunkWQJJNIMQjs.classifyLogLine.call(void 0, line)).filter(
|
|
11425
11429
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
11426
11430
|
).slice(-8);
|
|
11427
11431
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -11700,11 +11704,11 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11700
11704
|
}
|
|
11701
11705
|
function writePlayResult(status, jsonOutput, options) {
|
|
11702
11706
|
const packaged = getPlayRunPackage(status);
|
|
11703
|
-
if (status.package)
|
|
11707
|
+
if (status.package) _chunkNSOTASOPjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11704
11708
|
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _398 => _398.hits]), () => ( null));
|
|
11705
11709
|
if (jsonOutput) {
|
|
11706
11710
|
const payload2 = _optionalChain([options, 'optionalAccess', _399 => _399.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11707
|
-
|
|
11711
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
11708
11712
|
hits ? { ...payload2, hits } : payload2,
|
|
11709
11713
|
{ json: true, fields: _optionalChain([options, 'optionalAccess', _400 => _400.jsonFields]) }
|
|
11710
11714
|
);
|
|
@@ -11720,7 +11724,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11720
11724
|
...buildPlayCompletionTextLines(status),
|
|
11721
11725
|
...formatRunHitsLines(hits)
|
|
11722
11726
|
];
|
|
11723
|
-
|
|
11727
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11724
11728
|
json: false,
|
|
11725
11729
|
text: `${lines2.join("\n")}
|
|
11726
11730
|
`
|
|
@@ -11771,7 +11775,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11771
11775
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11772
11776
|
const compact = compactPlayStatus(status);
|
|
11773
11777
|
const payload = _optionalChain([options, 'optionalAccess', _402 => _402.fullJson]) ? status : compact;
|
|
11774
|
-
|
|
11778
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
11775
11779
|
{
|
|
11776
11780
|
...payload,
|
|
11777
11781
|
render: {
|
|
@@ -12528,7 +12532,7 @@ function renderServerResultView(value) {
|
|
|
12528
12532
|
function writeStartedPlayRun(input) {
|
|
12529
12533
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
12530
12534
|
const run = input.package.run;
|
|
12531
|
-
|
|
12535
|
+
_chunkNSOTASOPjs.recordPlayTermination.call(void 0, {
|
|
12532
12536
|
id: run.id,
|
|
12533
12537
|
status: run.status,
|
|
12534
12538
|
finishedAt: run.finishedAt
|
|
@@ -12541,7 +12545,7 @@ function writeStartedPlayRun(input) {
|
|
|
12541
12545
|
dashboardUrl: input.dashboardUrl,
|
|
12542
12546
|
package: input.package
|
|
12543
12547
|
};
|
|
12544
|
-
|
|
12548
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
12545
12549
|
json: true,
|
|
12546
12550
|
fields: input.jsonFields
|
|
12547
12551
|
});
|
|
@@ -12563,7 +12567,7 @@ function writeStartedPlayRun(input) {
|
|
|
12563
12567
|
input.progress.writeLine(output2, process.stdout);
|
|
12564
12568
|
return;
|
|
12565
12569
|
}
|
|
12566
|
-
|
|
12570
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, input.package, {
|
|
12567
12571
|
json: false,
|
|
12568
12572
|
text: `${output2}
|
|
12569
12573
|
`
|
|
@@ -12592,7 +12596,7 @@ function writeStartedPlayRun(input) {
|
|
|
12592
12596
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
12593
12597
|
];
|
|
12594
12598
|
if (input.jsonOutput) {
|
|
12595
|
-
|
|
12599
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
12596
12600
|
return;
|
|
12597
12601
|
}
|
|
12598
12602
|
if (input.dashboardUrl) {
|
|
@@ -12603,7 +12607,7 @@ function writeStartedPlayRun(input) {
|
|
|
12603
12607
|
input.progress.writeLine(output, process.stdout);
|
|
12604
12608
|
return;
|
|
12605
12609
|
}
|
|
12606
|
-
|
|
12610
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
12607
12611
|
{
|
|
12608
12612
|
...payload,
|
|
12609
12613
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -12613,7 +12617,7 @@ function writeStartedPlayRun(input) {
|
|
|
12613
12617
|
);
|
|
12614
12618
|
}
|
|
12615
12619
|
function parsePlayCheckOptions(args) {
|
|
12616
|
-
const selection =
|
|
12620
|
+
const selection = _chunkRTO5QZWTjs.parseJsonFields.call(void 0, args, "check");
|
|
12617
12621
|
args = selection.args;
|
|
12618
12622
|
const target = args[0];
|
|
12619
12623
|
if (!target || target.startsWith("-")) {
|
|
@@ -12625,7 +12629,7 @@ function parsePlayCheckOptions(args) {
|
|
|
12625
12629
|
if (arg !== "--json" && arg !== "--full")
|
|
12626
12630
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
12627
12631
|
}
|
|
12628
|
-
const jsonOutput =
|
|
12632
|
+
const jsonOutput = _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
12629
12633
|
return {
|
|
12630
12634
|
target,
|
|
12631
12635
|
jsonOutput,
|
|
@@ -12701,7 +12705,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12701
12705
|
useLatest,
|
|
12702
12706
|
expectedArtifactHash,
|
|
12703
12707
|
dryRun,
|
|
12704
|
-
jsonOutput:
|
|
12708
|
+
jsonOutput: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args)
|
|
12705
12709
|
};
|
|
12706
12710
|
}
|
|
12707
12711
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12742,7 +12746,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12742
12746
|
target,
|
|
12743
12747
|
expectedArtifactHash,
|
|
12744
12748
|
dryRun,
|
|
12745
|
-
jsonOutput:
|
|
12749
|
+
jsonOutput: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args)
|
|
12746
12750
|
};
|
|
12747
12751
|
}
|
|
12748
12752
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12953,14 +12957,14 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12953
12957
|
async function handlePlayCheck(args) {
|
|
12954
12958
|
const options = parsePlayCheckOptions(args);
|
|
12955
12959
|
if (!isFileTarget2(options.target)) {
|
|
12956
|
-
const client = new (0,
|
|
12960
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
12957
12961
|
try {
|
|
12958
12962
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12959
12963
|
command: "check"
|
|
12960
12964
|
});
|
|
12961
12965
|
const play = await client.describePlay(
|
|
12962
12966
|
parseReferencedPlayTarget2(options.target).playName,
|
|
12963
|
-
{ compact: true }
|
|
12967
|
+
{ compact: true, pipeline: options.full }
|
|
12964
12968
|
);
|
|
12965
12969
|
const result = {
|
|
12966
12970
|
kind: "play_check",
|
|
@@ -12982,7 +12986,7 @@ async function handlePlayCheck(args) {
|
|
|
12982
12986
|
},
|
|
12983
12987
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12984
12988
|
};
|
|
12985
|
-
|
|
12989
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, result, {
|
|
12986
12990
|
json: options.jsonOutput,
|
|
12987
12991
|
fields: options.jsonFields,
|
|
12988
12992
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12992,7 +12996,7 @@ async function handlePlayCheck(args) {
|
|
|
12992
12996
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12993
12997
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12994
12998
|
if (options.jsonOutput) {
|
|
12995
|
-
|
|
12999
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
12996
13000
|
{
|
|
12997
13001
|
kind: "play_check",
|
|
12998
13002
|
checked: "named_contract",
|
|
@@ -13034,7 +13038,7 @@ async function handlePlayCheck(args) {
|
|
|
13034
13038
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
13035
13039
|
publishCommand: _optionalChain([primary, 'optionalAccess', _449 => _449.result, 'access', _450 => _450.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
13036
13040
|
});
|
|
13037
|
-
|
|
13041
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, output, {
|
|
13038
13042
|
json: options.jsonOutput,
|
|
13039
13043
|
fields: options.jsonFields,
|
|
13040
13044
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -13088,7 +13092,7 @@ async function checkOneExportedPlay(input) {
|
|
|
13088
13092
|
}
|
|
13089
13093
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
13090
13094
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
13091
|
-
const client = new (0,
|
|
13095
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
13092
13096
|
const integrationMode = resolveEvalIntegrationMode();
|
|
13093
13097
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
13094
13098
|
playName: node.playName,
|
|
@@ -13165,7 +13169,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13165
13169
|
);
|
|
13166
13170
|
return 0;
|
|
13167
13171
|
}
|
|
13168
|
-
client = new (0,
|
|
13172
|
+
client = new (0, _chunkWQJJNIMQjs.DeeplineClient)(playRunClientOptions(options));
|
|
13169
13173
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
13170
13174
|
if (canDeferCompilerManifest) {
|
|
13171
13175
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
@@ -13326,7 +13330,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13326
13330
|
);
|
|
13327
13331
|
await _optionalChain([hooks, 'optionalAccess', _462 => _462.onRunStarted, 'optionalCall', _463 => _463(started.workflowId)]);
|
|
13328
13332
|
await _optionalChain([hooks, 'optionalAccess', _464 => _464.onRunAdmitted, 'optionalCall', _465 => _465(started.workflowId)]);
|
|
13329
|
-
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
13333
|
+
const resolvedDashboardUrl = _chunkNSOTASOPjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
13330
13334
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
13331
13335
|
progress.phase("started run");
|
|
13332
13336
|
progress.complete();
|
|
@@ -13364,7 +13368,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
13364
13368
|
if (options.target.kind !== "name") {
|
|
13365
13369
|
throw new Error("Expected a named play run target.");
|
|
13366
13370
|
}
|
|
13367
|
-
const client = new (0,
|
|
13371
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)(playRunClientOptions(options));
|
|
13368
13372
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
13369
13373
|
const playName = options.target.name;
|
|
13370
13374
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
@@ -13523,7 +13527,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
13523
13527
|
);
|
|
13524
13528
|
await _optionalChain([hooks, 'optionalAccess', _473 => _473.onRunStarted, 'optionalCall', _474 => _474(started.workflowId)]);
|
|
13525
13529
|
await _optionalChain([hooks, 'optionalAccess', _475 => _475.onRunAdmitted, 'optionalCall', _476 => _476(started.workflowId)]);
|
|
13526
|
-
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
13530
|
+
const resolvedDashboardUrl = _chunkNSOTASOPjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
13527
13531
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
13528
13532
|
progress.phase("started run");
|
|
13529
13533
|
progress.complete();
|
|
@@ -13561,7 +13565,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13561
13565
|
JSON.stringify({
|
|
13562
13566
|
version: 1,
|
|
13563
13567
|
admissionState: "submitted_unknown",
|
|
13564
|
-
baseUrl: new (0,
|
|
13568
|
+
baseUrl: new (0, _chunkWQJJNIMQjs.DeeplineClient)().baseUrl,
|
|
13565
13569
|
...intent
|
|
13566
13570
|
})
|
|
13567
13571
|
);
|
|
@@ -13790,10 +13794,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13790
13794
|
);
|
|
13791
13795
|
return `${lines.join("\n")}
|
|
13792
13796
|
|
|
13793
|
-
${
|
|
13797
|
+
${_chunkRTO5QZWTjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13794
13798
|
}
|
|
13795
13799
|
async function handleRunGet(args) {
|
|
13796
|
-
const selection =
|
|
13800
|
+
const selection = _chunkRTO5QZWTjs.parseJsonFields.call(void 0,
|
|
13797
13801
|
args,
|
|
13798
13802
|
args.includes("--config") ? "config" : "get"
|
|
13799
13803
|
);
|
|
@@ -13806,7 +13810,7 @@ async function handleRunGet(args) {
|
|
|
13806
13810
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13807
13811
|
return 1;
|
|
13808
13812
|
}
|
|
13809
|
-
const client = new (0,
|
|
13813
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
13810
13814
|
if (args.includes("--web-url")) {
|
|
13811
13815
|
const status2 = await client.runs.get(runId, { full: false });
|
|
13812
13816
|
const playName2 = resolveRunPlayName(status2, runId);
|
|
@@ -13814,8 +13818,8 @@ async function handleRunGet(args) {
|
|
|
13814
13818
|
console.error(`Run ${runId} does not name its play; no play page URL.`);
|
|
13815
13819
|
return 1;
|
|
13816
13820
|
}
|
|
13817
|
-
const dashboardUrl2 = buildPlayDashboardUrl(client.baseUrl, playName2);
|
|
13818
|
-
|
|
13821
|
+
const dashboardUrl2 = _chunkNSOTASOPjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13822
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
13819
13823
|
{ dashboardUrl: dashboardUrl2 },
|
|
13820
13824
|
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13821
13825
|
` }
|
|
@@ -13835,7 +13839,7 @@ async function handleRunGet(args) {
|
|
|
13835
13839
|
"This server does not support recorded configuration reads."
|
|
13836
13840
|
);
|
|
13837
13841
|
}
|
|
13838
|
-
|
|
13842
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
13839
13843
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13840
13844
|
{ json: true, fields: selection.fields }
|
|
13841
13845
|
);
|
|
@@ -13843,7 +13847,7 @@ async function handleRunGet(args) {
|
|
|
13843
13847
|
}
|
|
13844
13848
|
if (args.includes("--input")) {
|
|
13845
13849
|
const input = await client.getRunInput(runId);
|
|
13846
|
-
|
|
13850
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13847
13851
|
return 0;
|
|
13848
13852
|
}
|
|
13849
13853
|
const full = args.includes("--full");
|
|
@@ -13851,16 +13855,16 @@ async function handleRunGet(args) {
|
|
|
13851
13855
|
full: false,
|
|
13852
13856
|
failedLogs: args.includes("--log-failed")
|
|
13853
13857
|
});
|
|
13854
|
-
if (status.package)
|
|
13858
|
+
if (status.package) _chunkNSOTASOPjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13855
13859
|
if (!status.package) {
|
|
13856
13860
|
const legacyStatus = full ? await client.runs.get(runId, {
|
|
13857
13861
|
full: true,
|
|
13858
13862
|
failedLogs: args.includes("--log-failed")
|
|
13859
13863
|
}) : status;
|
|
13860
13864
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13861
|
-
const legacyDashboardUrl = legacyPlayName ? buildPlayDashboardUrl(client.baseUrl, legacyPlayName) : null;
|
|
13862
|
-
if (
|
|
13863
|
-
|
|
13865
|
+
const legacyDashboardUrl = legacyPlayName ? _chunkNSOTASOPjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13866
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
13867
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
13864
13868
|
{
|
|
13865
13869
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13866
13870
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
@@ -13870,7 +13874,7 @@ async function handleRunGet(args) {
|
|
|
13870
13874
|
} else {
|
|
13871
13875
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13872
13876
|
if (legacyDashboardUrl)
|
|
13873
|
-
|
|
13877
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
13874
13878
|
{ dashboardUrl: legacyDashboardUrl },
|
|
13875
13879
|
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13876
13880
|
` }
|
|
@@ -13885,10 +13889,10 @@ async function handleRunGet(args) {
|
|
|
13885
13889
|
readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
|
|
13886
13890
|
]);
|
|
13887
13891
|
const hitLines = formatRunHitsLines(hits);
|
|
13888
|
-
const json =
|
|
13892
|
+
const json = _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
13889
13893
|
const playName = resolveRunPlayName(status, runId);
|
|
13890
|
-
const dashboardUrl = playName ? buildPlayDashboardUrl(client.baseUrl, playName) : void 0;
|
|
13891
|
-
|
|
13894
|
+
const dashboardUrl = playName ? _chunkNSOTASOPjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13895
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
13892
13896
|
{
|
|
13893
13897
|
...overview,
|
|
13894
13898
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13992,9 +13996,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13992
13996
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13993
13997
|
return 1;
|
|
13994
13998
|
}
|
|
13995
|
-
const status = await new (0,
|
|
13996
|
-
if (
|
|
13997
|
-
|
|
13999
|
+
const status = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().runs.status(runId);
|
|
14000
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
14001
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13998
14002
|
return 0;
|
|
13999
14003
|
}
|
|
14000
14004
|
if (!status.available) {
|
|
@@ -14034,7 +14038,7 @@ async function handleRunsRerun(args) {
|
|
|
14034
14038
|
console.error(error instanceof Error ? error.message : usage2);
|
|
14035
14039
|
return 1;
|
|
14036
14040
|
}
|
|
14037
|
-
const options = { json:
|
|
14041
|
+
const options = { json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) };
|
|
14038
14042
|
for (let index = 0; index < args.length; index += 1) {
|
|
14039
14043
|
if (args[index] === "--idempotency-key") {
|
|
14040
14044
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -14099,8 +14103,8 @@ ${usage2}
|
|
|
14099
14103
|
Discover Plays: ${next.discover}
|
|
14100
14104
|
Active runs: ${next.running}`
|
|
14101
14105
|
);
|
|
14102
|
-
if (
|
|
14103
|
-
|
|
14106
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
14107
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14104
14108
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
14105
14109
|
{ json: true }
|
|
14106
14110
|
);
|
|
@@ -14115,7 +14119,7 @@ Active runs: ${next.running}`
|
|
|
14115
14119
|
console.error("--offset requires --play.");
|
|
14116
14120
|
return 1;
|
|
14117
14121
|
}
|
|
14118
|
-
const client = new (0,
|
|
14122
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
14119
14123
|
const page = await client.runs.listPage({
|
|
14120
14124
|
...playName ? { play: playName } : {},
|
|
14121
14125
|
...statusFilter ? { status: statusFilter } : {},
|
|
@@ -14184,7 +14188,7 @@ Active runs: ${next.running}`
|
|
|
14184
14188
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
14185
14189
|
);
|
|
14186
14190
|
}
|
|
14187
|
-
|
|
14191
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14188
14192
|
{
|
|
14189
14193
|
runs,
|
|
14190
14194
|
count: runs.length,
|
|
@@ -14198,7 +14202,7 @@ Active runs: ${next.running}`
|
|
|
14198
14202
|
},
|
|
14199
14203
|
render: { sections: [{ title: "runs", lines }] }
|
|
14200
14204
|
},
|
|
14201
|
-
{ json:
|
|
14205
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) }
|
|
14202
14206
|
);
|
|
14203
14207
|
return 0;
|
|
14204
14208
|
}
|
|
@@ -14228,7 +14232,7 @@ async function handleRunTail(args) {
|
|
|
14228
14232
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14229
14233
|
return 1;
|
|
14230
14234
|
}
|
|
14231
|
-
const parsed =
|
|
14235
|
+
const parsed = _chunkWQJJNIMQjs.parseLogLevel.call(void 0, value);
|
|
14232
14236
|
if (!parsed) {
|
|
14233
14237
|
console.error(
|
|
14234
14238
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14266,9 +14270,9 @@ async function handleRunTail(args) {
|
|
|
14266
14270
|
);
|
|
14267
14271
|
return 1;
|
|
14268
14272
|
}
|
|
14269
|
-
const client = new (0,
|
|
14273
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
14270
14274
|
const jsonLines = args.includes("--jsonl");
|
|
14271
|
-
const jsonOutput = !jsonLines &&
|
|
14275
|
+
const jsonOutput = !jsonLines && _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
14272
14276
|
const compact = args.includes("--compact");
|
|
14273
14277
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
14274
14278
|
const compactState = {
|
|
@@ -14349,7 +14353,7 @@ async function handleRunLogs(args) {
|
|
|
14349
14353
|
]);
|
|
14350
14354
|
const cursorIndex = args.indexOf("--cursor");
|
|
14351
14355
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14352
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
14356
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkWQJJNIMQjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
14353
14357
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
14354
14358
|
return handleRunEventSearch(args);
|
|
14355
14359
|
}
|
|
@@ -14383,7 +14387,7 @@ async function handleRunLogs(args) {
|
|
|
14383
14387
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14384
14388
|
return 1;
|
|
14385
14389
|
}
|
|
14386
|
-
const parsed =
|
|
14390
|
+
const parsed = _chunkWQJJNIMQjs.parseLogLevel.call(void 0, value);
|
|
14387
14391
|
if (!parsed) {
|
|
14388
14392
|
console.error(
|
|
14389
14393
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14430,12 +14434,12 @@ async function handleRunLogs(args) {
|
|
|
14430
14434
|
);
|
|
14431
14435
|
return 1;
|
|
14432
14436
|
}
|
|
14433
|
-
const client = new (0,
|
|
14437
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
14434
14438
|
if (outPath) {
|
|
14435
14439
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
14436
|
-
const logs = result2.entries.filter((line) =>
|
|
14440
|
+
const logs = result2.entries.filter((line) => _chunkWQJJNIMQjs.logLevelReaches.call(void 0, _chunkWQJJNIMQjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkWQJJNIMQjs.classifyLogLine.call(void 0, line).line);
|
|
14437
14441
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
14438
|
-
|
|
14442
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14439
14443
|
{
|
|
14440
14444
|
runId: result2.runId,
|
|
14441
14445
|
log_path: outPath,
|
|
@@ -14458,7 +14462,7 @@ async function handleRunLogs(args) {
|
|
|
14458
14462
|
]
|
|
14459
14463
|
}
|
|
14460
14464
|
},
|
|
14461
|
-
{ json:
|
|
14465
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) }
|
|
14462
14466
|
);
|
|
14463
14467
|
return 0;
|
|
14464
14468
|
}
|
|
@@ -14489,7 +14493,7 @@ async function handleRunLogs(args) {
|
|
|
14489
14493
|
}
|
|
14490
14494
|
};
|
|
14491
14495
|
const text = buildRunLogsText(filteredResult);
|
|
14492
|
-
|
|
14496
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14493
14497
|
{
|
|
14494
14498
|
runId: result.runId,
|
|
14495
14499
|
totalCount: result.totalCount,
|
|
@@ -14513,7 +14517,7 @@ async function handleRunLogs(args) {
|
|
|
14513
14517
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14514
14518
|
},
|
|
14515
14519
|
{
|
|
14516
|
-
json:
|
|
14520
|
+
json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args),
|
|
14517
14521
|
text
|
|
14518
14522
|
}
|
|
14519
14523
|
);
|
|
@@ -14537,7 +14541,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14537
14541
|
);
|
|
14538
14542
|
}
|
|
14539
14543
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14540
|
-
(entry) =>
|
|
14544
|
+
(entry) => _chunkWQJJNIMQjs.logLevelReaches.call(void 0, _chunkWQJJNIMQjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14541
14545
|
);
|
|
14542
14546
|
const selected = matching.slice(-limit);
|
|
14543
14547
|
const olderMatchesExist = matching.length > selected.length;
|
|
@@ -14547,7 +14551,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14547
14551
|
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _498 => _498.at, 'call', _499 => _499(-1), 'optionalAccess', _500 => _500.seq]), () => ( null)),
|
|
14548
14552
|
truncated: result.truncated || olderMatchesExist,
|
|
14549
14553
|
hasMore: olderMatchesExist,
|
|
14550
|
-
nextCursor: olderMatchesExist ?
|
|
14554
|
+
nextCursor: olderMatchesExist ? _chunkWQJJNIMQjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14551
14555
|
};
|
|
14552
14556
|
}
|
|
14553
14557
|
async function handleRunEventSearch(args) {
|
|
@@ -14614,7 +14618,7 @@ ${usage2}`);
|
|
|
14614
14618
|
namespace,
|
|
14615
14619
|
...backend ? { backend } : {}
|
|
14616
14620
|
} : void 0;
|
|
14617
|
-
const client = new (0,
|
|
14621
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
14618
14622
|
const result = await client.runs.searchEvents({
|
|
14619
14623
|
...runId ? { runId } : {},
|
|
14620
14624
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14686,7 +14690,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14686
14690
|
"--limit",
|
|
14687
14691
|
String(limit)
|
|
14688
14692
|
].join(" ") : null;
|
|
14689
|
-
|
|
14693
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14690
14694
|
{
|
|
14691
14695
|
events,
|
|
14692
14696
|
nextCursor: result.nextCursor,
|
|
@@ -14697,14 +14701,14 @@ ${renderedDetails}` : ""}`;
|
|
|
14697
14701
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14698
14702
|
},
|
|
14699
14703
|
{
|
|
14700
|
-
json:
|
|
14704
|
+
json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args),
|
|
14701
14705
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14702
14706
|
}
|
|
14703
14707
|
);
|
|
14704
14708
|
return 0;
|
|
14705
14709
|
}
|
|
14706
14710
|
function buildRunLogsText(result) {
|
|
14707
|
-
const lines = result.entries.map((line) =>
|
|
14711
|
+
const lines = result.entries.map((line) => _chunkWQJJNIMQjs.classifyLogLine.call(void 0, line).line);
|
|
14708
14712
|
if (result.warning) {
|
|
14709
14713
|
if (lines.length > 0) lines.push("");
|
|
14710
14714
|
lines.push(`warning: ${result.warning}`);
|
|
@@ -14738,7 +14742,7 @@ async function handleRunStop(args) {
|
|
|
14738
14742
|
reason = args[++index];
|
|
14739
14743
|
}
|
|
14740
14744
|
}
|
|
14741
|
-
const client = new (0,
|
|
14745
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
14742
14746
|
const result = await client.runs.stop(runId, { reason });
|
|
14743
14747
|
const state = resolveRunStopState(result);
|
|
14744
14748
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14753,7 +14757,7 @@ async function handleRunStop(args) {
|
|
|
14753
14757
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14754
14758
|
`inspect: deepline runs get ${runId} --full`
|
|
14755
14759
|
];
|
|
14756
|
-
|
|
14760
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14757
14761
|
{
|
|
14758
14762
|
...cancelling,
|
|
14759
14763
|
state,
|
|
@@ -14768,7 +14772,7 @@ async function handleRunStop(args) {
|
|
|
14768
14772
|
]
|
|
14769
14773
|
}
|
|
14770
14774
|
},
|
|
14771
|
-
{ json:
|
|
14775
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) }
|
|
14772
14776
|
);
|
|
14773
14777
|
return 0;
|
|
14774
14778
|
}
|
|
@@ -14785,7 +14789,7 @@ async function handleRunStop(args) {
|
|
|
14785
14789
|
];
|
|
14786
14790
|
process.stderr.write(`${lines2.join("\n")}
|
|
14787
14791
|
`);
|
|
14788
|
-
|
|
14792
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14789
14793
|
{
|
|
14790
14794
|
...result,
|
|
14791
14795
|
render: {
|
|
@@ -14800,7 +14804,7 @@ async function handleRunStop(args) {
|
|
|
14800
14804
|
]
|
|
14801
14805
|
}
|
|
14802
14806
|
},
|
|
14803
|
-
{ json:
|
|
14807
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) }
|
|
14804
14808
|
);
|
|
14805
14809
|
return 1;
|
|
14806
14810
|
}
|
|
@@ -14811,12 +14815,12 @@ async function handleRunStop(args) {
|
|
|
14811
14815
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14812
14816
|
] : []
|
|
14813
14817
|
];
|
|
14814
|
-
|
|
14818
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14815
14819
|
{
|
|
14816
14820
|
...result,
|
|
14817
14821
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14818
14822
|
},
|
|
14819
|
-
{ json:
|
|
14823
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) }
|
|
14820
14824
|
);
|
|
14821
14825
|
return 0;
|
|
14822
14826
|
}
|
|
@@ -14866,18 +14870,18 @@ async function handleRunStopAll(args) {
|
|
|
14866
14870
|
reason = args[++index];
|
|
14867
14871
|
}
|
|
14868
14872
|
}
|
|
14869
|
-
const client = new (0,
|
|
14873
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
14870
14874
|
if (dryRun) {
|
|
14871
14875
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14872
14876
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14873
|
-
|
|
14877
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14874
14878
|
{
|
|
14875
14879
|
...result2,
|
|
14876
14880
|
render: {
|
|
14877
14881
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14878
14882
|
}
|
|
14879
14883
|
},
|
|
14880
|
-
{ json:
|
|
14884
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14881
14885
|
` }
|
|
14882
14886
|
);
|
|
14883
14887
|
return 0;
|
|
@@ -14890,17 +14894,17 @@ async function handleRunStopAll(args) {
|
|
|
14890
14894
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14891
14895
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14892
14896
|
];
|
|
14893
|
-
|
|
14897
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
14894
14898
|
{
|
|
14895
14899
|
...result,
|
|
14896
14900
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14897
14901
|
},
|
|
14898
|
-
{ json:
|
|
14902
|
+
{ json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args) }
|
|
14899
14903
|
);
|
|
14900
14904
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14901
14905
|
}
|
|
14902
14906
|
async function handleRunExport(args) {
|
|
14903
|
-
const selection =
|
|
14907
|
+
const selection = _chunkRTO5QZWTjs.parseJsonFields.call(void 0, args, "export");
|
|
14904
14908
|
args = selection.args;
|
|
14905
14909
|
const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--allow-empty] [--json]";
|
|
14906
14910
|
let runId;
|
|
@@ -14959,16 +14963,16 @@ async function handleRunExport(args) {
|
|
|
14959
14963
|
"INVALID_ARGUMENT"
|
|
14960
14964
|
);
|
|
14961
14965
|
}
|
|
14962
|
-
const client = new (0,
|
|
14966
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
14963
14967
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14964
14968
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14965
|
-
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !
|
|
14969
|
+
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkRTO5QZWTjs.argsWantJson.call(void 0, args));
|
|
14966
14970
|
try {
|
|
14967
14971
|
await waitForPlayCompletionByWatch({
|
|
14968
14972
|
client,
|
|
14969
14973
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14970
14974
|
workflowId: runId,
|
|
14971
|
-
jsonOutput:
|
|
14975
|
+
jsonOutput: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args),
|
|
14972
14976
|
emitLogs: false,
|
|
14973
14977
|
waitTimeoutMs,
|
|
14974
14978
|
startedAt: Date.now(),
|
|
@@ -15068,8 +15072,8 @@ async function handleRunExport(args) {
|
|
|
15068
15072
|
"utf-8"
|
|
15069
15073
|
);
|
|
15070
15074
|
}
|
|
15071
|
-
|
|
15072
|
-
json:
|
|
15075
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, payload, {
|
|
15076
|
+
json: _chunkRTO5QZWTjs.argsWantJson.call(void 0, args),
|
|
15073
15077
|
fields: selection.fields,
|
|
15074
15078
|
text: `${lines.join("\n")}
|
|
15075
15079
|
`
|
|
@@ -15090,10 +15094,10 @@ async function handlePlayGet(args) {
|
|
|
15090
15094
|
);
|
|
15091
15095
|
return 2;
|
|
15092
15096
|
}
|
|
15093
|
-
const client = new (0,
|
|
15097
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
15094
15098
|
const explicitJson = args.includes("--json");
|
|
15095
15099
|
const sourceOutput = args.includes("--source");
|
|
15096
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
15100
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
15097
15101
|
const requestedRevisionFlags = [
|
|
15098
15102
|
args.includes("--working"),
|
|
15099
15103
|
args.includes("--live"),
|
|
@@ -15153,7 +15157,7 @@ async function handlePlayGet(args) {
|
|
|
15153
15157
|
}
|
|
15154
15158
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
15155
15159
|
if (jsonOutput) {
|
|
15156
|
-
|
|
15160
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, {
|
|
15157
15161
|
...detail,
|
|
15158
15162
|
...materializedFile ? {
|
|
15159
15163
|
message: loadedMessage,
|
|
@@ -15245,8 +15249,8 @@ async function handlePlayVersions(args) {
|
|
|
15245
15249
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
15246
15250
|
return 1;
|
|
15247
15251
|
}
|
|
15248
|
-
const client = new (0,
|
|
15249
|
-
const jsonOutput =
|
|
15252
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
15253
|
+
const jsonOutput = _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
15250
15254
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15251
15255
|
command: "versions"
|
|
15252
15256
|
});
|
|
@@ -15254,7 +15258,7 @@ async function handlePlayVersions(args) {
|
|
|
15254
15258
|
parseReferencedPlayTarget2(playName).playName
|
|
15255
15259
|
);
|
|
15256
15260
|
if (jsonOutput) {
|
|
15257
|
-
|
|
15261
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, { versions });
|
|
15258
15262
|
return 0;
|
|
15259
15263
|
}
|
|
15260
15264
|
if (versions.length === 0) {
|
|
@@ -15286,9 +15290,9 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
15286
15290
|
"signals"
|
|
15287
15291
|
];
|
|
15288
15292
|
async function handlePlayList(args) {
|
|
15289
|
-
const jsonOutput =
|
|
15293
|
+
const jsonOutput = _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
15290
15294
|
const showCost = args.includes("--show-cost");
|
|
15291
|
-
const client = new (0,
|
|
15295
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
15292
15296
|
const categoriesIndex = args.indexOf("--categories");
|
|
15293
15297
|
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _536 => _536[categoriesIndex + 1], 'optionalAccess', _537 => _537.trim, 'call', _538 => _538()]) : void 0;
|
|
15294
15298
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
@@ -15385,7 +15389,7 @@ async function handlePlayList(args) {
|
|
|
15385
15389
|
lines.push("List truncated \u2014 more plays are available.");
|
|
15386
15390
|
lines.push(`Next page: ${nextPage}`);
|
|
15387
15391
|
}
|
|
15388
|
-
|
|
15392
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
15389
15393
|
{
|
|
15390
15394
|
plays,
|
|
15391
15395
|
count: plays.length,
|
|
@@ -15403,7 +15407,7 @@ async function handlePlayList(args) {
|
|
|
15403
15407
|
}
|
|
15404
15408
|
async function handlePlayPin(args, pinned) {
|
|
15405
15409
|
const target = _optionalChain([args, 'access', _545 => _545.find, 'call', _546 => _546((arg) => !arg.startsWith("-")), 'optionalAccess', _547 => _547.trim, 'call', _548 => _548()]);
|
|
15406
|
-
const jsonOutput =
|
|
15410
|
+
const jsonOutput = _chunkRTO5QZWTjs.argsWantJson.call(void 0, args);
|
|
15407
15411
|
const dryRun = args.includes("--dry-run");
|
|
15408
15412
|
if (!target) {
|
|
15409
15413
|
console.error(
|
|
@@ -15421,11 +15425,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15421
15425
|
const name = parsedTarget.playName;
|
|
15422
15426
|
const plan = { name, pinned, dryRun };
|
|
15423
15427
|
if (dryRun) {
|
|
15424
|
-
|
|
15428
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, plan);
|
|
15425
15429
|
return 0;
|
|
15426
15430
|
}
|
|
15427
|
-
const result = await new (0,
|
|
15428
|
-
if (jsonOutput)
|
|
15431
|
+
const result = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15432
|
+
if (jsonOutput) _chunkRTO5QZWTjs.printCompactJson.call(void 0, result);
|
|
15429
15433
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15430
15434
|
return 0;
|
|
15431
15435
|
}
|
|
@@ -15441,65 +15445,9 @@ function csvColumnLines(csvInput) {
|
|
|
15441
15445
|
const headers = [defaults[column]].flat().filter((header) => header && header !== column);
|
|
15442
15446
|
return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
|
|
15443
15447
|
}),
|
|
15444
|
-
|
|
15448
|
+
_chunkKXMNM4AQjs.CSV_HEADER_MATCHING_NOTE
|
|
15445
15449
|
];
|
|
15446
15450
|
}
|
|
15447
|
-
function describedPlay(play) {
|
|
15448
|
-
const reference = formatPlayListReference(play);
|
|
15449
|
-
const starter = _nullishCoalesce(play.cloneEditStarter, () => ( buildCloneEditStarter(play)));
|
|
15450
|
-
const csv = _nullishCoalesce(play.csvInput, () => ( {}));
|
|
15451
|
-
const csvField2 = typeof csv.inputField === "string" ? csv.inputField : "csv";
|
|
15452
|
-
const alongside = /* @__PURE__ */ new Set([
|
|
15453
|
-
csvField2,
|
|
15454
|
-
"columns",
|
|
15455
|
-
...Array.isArray(csv.runLevelControlFields) ? csv.runLevelControlFields.map(String) : []
|
|
15456
|
-
]);
|
|
15457
|
-
const declared = _chunkZMVJSS6Njs.schemaFields.call(void 0, play.inputSchema).map((field) => field.name);
|
|
15458
|
-
const rowNames = _chunkZMVJSS6Njs.schemaFields.call(void 0, csv.rowInputSchema).map((field) => field.name);
|
|
15459
|
-
const replaced = play.csvInput ? (rowNames.length > 0 ? rowNames : declared).filter(
|
|
15460
|
-
(name) => declared.includes(name) && !alongside.has(name)
|
|
15461
|
-
) : [];
|
|
15462
|
-
const exclusive = replaced.length ? { field: csvField2, with: replaced } : void 0;
|
|
15463
|
-
const headers = isRecord2(csv.defaultColumns) ? csv.defaultColumns : {};
|
|
15464
|
-
const rowInputs = _chunkZMVJSS6Njs.schemaFields.call(void 0, csv.rowInputSchema).map((field) => {
|
|
15465
|
-
const header = [headers[field.name]].flat().filter((name) => name && name !== field.name).join(" or ");
|
|
15466
|
-
return header ? {
|
|
15467
|
-
...field,
|
|
15468
|
-
description: [field.description, `CSV header: ${header}`].filter(Boolean).join(" - ")
|
|
15469
|
-
} : field;
|
|
15470
|
-
});
|
|
15471
|
-
const rowOutput = _nullishCoalesce(play.rowOutputSchema, () => ( {}));
|
|
15472
|
-
const added = isRecord2(rowOutput.addedColumns) ? rowOutput.addedColumns : {};
|
|
15473
|
-
const rowOutputs = _chunkZMVJSS6Njs.schemaFields.call(void 0,
|
|
15474
|
-
Object.keys(added).length ? { properties: added } : rowOutput
|
|
15475
|
-
).map((field) => ({ ...field, required: true }));
|
|
15476
|
-
return {
|
|
15477
|
-
kind: play.ownerType === "deepline" ? "prebuilt_play" : "custom_play",
|
|
15478
|
-
id: reference,
|
|
15479
|
-
...play.displayName && play.displayName !== play.name ? { displayName: play.displayName } : {},
|
|
15480
|
-
...play.description ? { description: play.description } : {},
|
|
15481
|
-
...play.observedCost ? { cost: play.observedCost.displayText } : {},
|
|
15482
|
-
guidance: [],
|
|
15483
|
-
inputs: _chunkZMVJSS6Njs.schemaFields.call(void 0, play.inputSchema),
|
|
15484
|
-
outputs: _chunkZMVJSS6Njs.schemaFields.call(void 0, play.outputSchema),
|
|
15485
|
-
...rowInputs.length ? { rowInputs } : {},
|
|
15486
|
-
...typeof csv.inputField === "string" ? { csvInput: csv.inputField } : {},
|
|
15487
|
-
...rowOutputs.length ? {
|
|
15488
|
-
rowOutputs,
|
|
15489
|
-
rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
|
|
15490
|
-
} : {},
|
|
15491
|
-
runner: {
|
|
15492
|
-
via: "play",
|
|
15493
|
-
reference,
|
|
15494
|
-
// A CSV play's run command is built by the server around its columns.
|
|
15495
|
-
...play.csvInput ? { cli: play.runCommand } : {}
|
|
15496
|
-
},
|
|
15497
|
-
...starter ? { source: starter.command } : {},
|
|
15498
|
-
...exclusive ? { exclusive } : {},
|
|
15499
|
-
// A prebuilt's cost is what its recent runs were charged; there is no rate.
|
|
15500
|
-
..._optionalChain([play, 'access', _549 => _549.observedCost, 'optionalAccess', _550 => _550.displayText]) ? { cost: play.observedCost.displayText } : {}
|
|
15501
|
-
};
|
|
15502
|
-
}
|
|
15503
15451
|
function printPlayDescription(play) {
|
|
15504
15452
|
const reference = formatPlayListReference(play);
|
|
15505
15453
|
const labels = [
|
|
@@ -15529,7 +15477,7 @@ function printPlayDescription(play) {
|
|
|
15529
15477
|
console.log(` ${line}`);
|
|
15530
15478
|
}
|
|
15531
15479
|
}
|
|
15532
|
-
if (_optionalChain([play, 'access',
|
|
15480
|
+
if (_optionalChain([play, 'access', _549 => _549.toolCategories, 'optionalAccess', _550 => _550.length])) {
|
|
15533
15481
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15534
15482
|
}
|
|
15535
15483
|
if (play.aliases.length > 0) {
|
|
@@ -15574,7 +15522,7 @@ function printPlayDescription(play) {
|
|
|
15574
15522
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15575
15523
|
if (runtimeLimit) {
|
|
15576
15524
|
console.log(
|
|
15577
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15525
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _551 => _551.runtimeLimit, 'optionalAccess', _552 => _552.source]), () => ( "live"))})`
|
|
15578
15526
|
);
|
|
15579
15527
|
}
|
|
15580
15528
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15602,17 +15550,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15602
15550
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15603
15551
|
}
|
|
15604
15552
|
async function handlePlayGrep(args) {
|
|
15605
|
-
const query = _optionalChain([args, 'access',
|
|
15553
|
+
const query = _optionalChain([args, 'access', _553 => _553[0], 'optionalAccess', _554 => _554.trim, 'call', _555 => _555()]);
|
|
15606
15554
|
if (!query) {
|
|
15607
15555
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15608
15556
|
return 1;
|
|
15609
15557
|
}
|
|
15610
|
-
const client = new (0,
|
|
15558
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
15611
15559
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15612
15560
|
summarizePlayGrepResult
|
|
15613
15561
|
);
|
|
15614
|
-
if (
|
|
15615
|
-
|
|
15562
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
15563
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, {
|
|
15616
15564
|
plays: results,
|
|
15617
15565
|
count: results.length,
|
|
15618
15566
|
query,
|
|
@@ -15626,7 +15574,7 @@ async function handlePlayGrep(args) {
|
|
|
15626
15574
|
`
|
|
15627
15575
|
);
|
|
15628
15576
|
for (const result of results) {
|
|
15629
|
-
console.log(_optionalChain([result, 'access',
|
|
15577
|
+
console.log(_optionalChain([result, 'access', _556 => _556.displayName, 'optionalAccess', _557 => _557.trim, 'call', _558 => _558()]) || result.name);
|
|
15630
15578
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15631
15579
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15632
15580
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15635,7 +15583,7 @@ async function handlePlayGrep(args) {
|
|
|
15635
15583
|
return 0;
|
|
15636
15584
|
}
|
|
15637
15585
|
async function handlePlayDescribe(args) {
|
|
15638
|
-
const selection =
|
|
15586
|
+
const selection = _chunkRTO5QZWTjs.parseJsonFields.call(void 0, args, "describe");
|
|
15639
15587
|
args = selection.args;
|
|
15640
15588
|
const playName = args[0];
|
|
15641
15589
|
if (!playName) {
|
|
@@ -15669,8 +15617,8 @@ async function handlePlayDescribe(args) {
|
|
|
15669
15617
|
`deepline plays check ${playName}`,
|
|
15670
15618
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15671
15619
|
];
|
|
15672
|
-
if (
|
|
15673
|
-
|
|
15620
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
15621
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, {
|
|
15674
15622
|
ok: false,
|
|
15675
15623
|
error: { message },
|
|
15676
15624
|
next
|
|
@@ -15684,7 +15632,7 @@ async function handlePlayDescribe(args) {
|
|
|
15684
15632
|
}
|
|
15685
15633
|
return 2;
|
|
15686
15634
|
}
|
|
15687
|
-
const client = new (0,
|
|
15635
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
15688
15636
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15689
15637
|
command: "describe"
|
|
15690
15638
|
});
|
|
@@ -15694,9 +15642,9 @@ async function handlePlayDescribe(args) {
|
|
|
15694
15642
|
compact: args.includes("--compact")
|
|
15695
15643
|
}
|
|
15696
15644
|
);
|
|
15697
|
-
if (
|
|
15698
|
-
if (selection.fields)
|
|
15699
|
-
else
|
|
15645
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
15646
|
+
if (selection.fields) _chunkRTO5QZWTjs.printJson.call(void 0, play, selection.fields);
|
|
15647
|
+
else _chunkRTO5QZWTjs.printCompactJson.call(void 0, play);
|
|
15700
15648
|
return 0;
|
|
15701
15649
|
}
|
|
15702
15650
|
printPlayDescription(play);
|
|
@@ -15740,7 +15688,7 @@ async function handlePlaySave(args) {
|
|
|
15740
15688
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15741
15689
|
};
|
|
15742
15690
|
if (options.jsonOutput) {
|
|
15743
|
-
|
|
15691
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result);
|
|
15744
15692
|
} else {
|
|
15745
15693
|
console.error(result.message);
|
|
15746
15694
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15762,7 +15710,7 @@ async function handlePlaySave(args) {
|
|
|
15762
15710
|
};
|
|
15763
15711
|
if (options.dryRun) {
|
|
15764
15712
|
if (options.jsonOutput) {
|
|
15765
|
-
|
|
15713
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, dryRun);
|
|
15766
15714
|
} else {
|
|
15767
15715
|
console.log(`Dry run: ${playName}`);
|
|
15768
15716
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15771,7 +15719,7 @@ async function handlePlaySave(args) {
|
|
|
15771
15719
|
}
|
|
15772
15720
|
return 0;
|
|
15773
15721
|
}
|
|
15774
|
-
const client = new (0,
|
|
15722
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
15775
15723
|
try {
|
|
15776
15724
|
await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
15777
15725
|
"cli.play_save_compile_manifests",
|
|
@@ -15807,7 +15755,7 @@ async function handlePlaySave(args) {
|
|
|
15807
15755
|
}
|
|
15808
15756
|
};
|
|
15809
15757
|
if (options.jsonOutput) {
|
|
15810
|
-
|
|
15758
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result);
|
|
15811
15759
|
} else {
|
|
15812
15760
|
console.log(
|
|
15813
15761
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15833,7 +15781,7 @@ async function handlePlayPublish(args) {
|
|
|
15833
15781
|
}
|
|
15834
15782
|
const { target: playName, useLatest } = options;
|
|
15835
15783
|
let revisionId = options.revisionId;
|
|
15836
|
-
const client = new (0,
|
|
15784
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
15837
15785
|
if (isFileTarget2(playName)) {
|
|
15838
15786
|
if (revisionId || useLatest) {
|
|
15839
15787
|
console.error(
|
|
@@ -15865,7 +15813,7 @@ async function handlePlayPublish(args) {
|
|
|
15865
15813
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15866
15814
|
};
|
|
15867
15815
|
if (options.jsonOutput) {
|
|
15868
|
-
|
|
15816
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result3);
|
|
15869
15817
|
} else {
|
|
15870
15818
|
console.error(result3.message);
|
|
15871
15819
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15888,7 +15836,7 @@ async function handlePlayPublish(args) {
|
|
|
15888
15836
|
};
|
|
15889
15837
|
if (options.dryRun) {
|
|
15890
15838
|
if (options.jsonOutput) {
|
|
15891
|
-
|
|
15839
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, dryRun);
|
|
15892
15840
|
} else {
|
|
15893
15841
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15894
15842
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15946,17 +15894,17 @@ async function handlePlayPublish(args) {
|
|
|
15946
15894
|
artifactHash,
|
|
15947
15895
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15948
15896
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15949
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15950
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15897
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _559 => _559.version]), () => ( null)),
|
|
15898
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _560 => _560.artifactHash]), () => ( null)),
|
|
15951
15899
|
sourceBytes: {
|
|
15952
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15900
|
+
before: _optionalChain([previousLive, 'optionalAccess', _561 => _561.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15953
15901
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15954
15902
|
},
|
|
15955
15903
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15956
15904
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15957
15905
|
};
|
|
15958
15906
|
if (options.jsonOutput) {
|
|
15959
|
-
|
|
15907
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result2);
|
|
15960
15908
|
} else {
|
|
15961
15909
|
printPublishReceipt({
|
|
15962
15910
|
name: rootPlayName,
|
|
@@ -15987,14 +15935,14 @@ async function handlePlayPublish(args) {
|
|
|
15987
15935
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15988
15936
|
latest: useLatest
|
|
15989
15937
|
};
|
|
15990
|
-
|
|
15938
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result2);
|
|
15991
15939
|
return 0;
|
|
15992
15940
|
}
|
|
15993
15941
|
const resolvedName = parseReferencedPlayTarget2(playName).playName;
|
|
15994
15942
|
if (useLatest) {
|
|
15995
15943
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15996
15944
|
const latest = versions[0];
|
|
15997
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15945
|
+
if (!_optionalChain([latest, 'optionalAccess', _562 => _562._id])) {
|
|
15998
15946
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15999
15947
|
return 1;
|
|
16000
15948
|
}
|
|
@@ -16011,7 +15959,7 @@ async function handlePlayPublish(args) {
|
|
|
16011
15959
|
revisionId ? { revisionId } : {}
|
|
16012
15960
|
);
|
|
16013
15961
|
if (options.jsonOutput) {
|
|
16014
|
-
|
|
15962
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result);
|
|
16015
15963
|
} else {
|
|
16016
15964
|
printPublishReceipt({
|
|
16017
15965
|
name: result.name,
|
|
@@ -16051,7 +15999,7 @@ async function handlePlayDelete(args) {
|
|
|
16051
15999
|
);
|
|
16052
16000
|
return 2;
|
|
16053
16001
|
}
|
|
16054
|
-
const client = new (0,
|
|
16002
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
16055
16003
|
let detail;
|
|
16056
16004
|
try {
|
|
16057
16005
|
detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
|
|
@@ -16075,8 +16023,8 @@ async function handlePlayDelete(args) {
|
|
|
16075
16023
|
name: resolvedName,
|
|
16076
16024
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
16077
16025
|
};
|
|
16078
|
-
if (
|
|
16079
|
-
|
|
16026
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
16027
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result2);
|
|
16080
16028
|
} else {
|
|
16081
16029
|
process.stdout.write(
|
|
16082
16030
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -16086,8 +16034,8 @@ async function handlePlayDelete(args) {
|
|
|
16086
16034
|
return 0;
|
|
16087
16035
|
}
|
|
16088
16036
|
const result = await client.deletePlay(resolvedName);
|
|
16089
|
-
if (
|
|
16090
|
-
|
|
16037
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
16038
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result);
|
|
16091
16039
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
16092
16040
|
}
|
|
16093
16041
|
if (result.alreadyArchived) {
|
|
@@ -16126,13 +16074,13 @@ async function handlePlayRestore(args) {
|
|
|
16126
16074
|
);
|
|
16127
16075
|
return 2;
|
|
16128
16076
|
}
|
|
16129
|
-
const client = new (0,
|
|
16077
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
16130
16078
|
try {
|
|
16131
16079
|
const result = await client.restorePlay(
|
|
16132
16080
|
parseReferencedPlayTarget2(playName).playName
|
|
16133
16081
|
);
|
|
16134
|
-
if (
|
|
16135
|
-
|
|
16082
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
16083
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, result);
|
|
16136
16084
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
16137
16085
|
}
|
|
16138
16086
|
if (result.alreadyActive) {
|
|
@@ -16245,21 +16193,21 @@ Common commands:
|
|
|
16245
16193
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
16246
16194
|
}
|
|
16247
16195
|
};
|
|
16248
|
-
|
|
16196
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, result2, {
|
|
16249
16197
|
json: options.json,
|
|
16250
16198
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
16251
16199
|
`
|
|
16252
16200
|
});
|
|
16253
16201
|
return;
|
|
16254
16202
|
}
|
|
16255
|
-
const client = new (0,
|
|
16203
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
16256
16204
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
16257
16205
|
throw new Error(
|
|
16258
16206
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
16259
16207
|
);
|
|
16260
16208
|
}
|
|
16261
16209
|
const result = await client.startPlayRun(saved.request);
|
|
16262
|
-
|
|
16210
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
16263
16211
|
{ ...result },
|
|
16264
16212
|
{
|
|
16265
16213
|
json: options.json,
|
|
@@ -16295,7 +16243,7 @@ Examples:
|
|
|
16295
16243
|
).action(async (target, options) => {
|
|
16296
16244
|
process.exitCode = await handlePlayCheck([
|
|
16297
16245
|
target,
|
|
16298
|
-
...
|
|
16246
|
+
..._chunkRTO5QZWTjs.jsonFieldArgs.call(void 0, options.json),
|
|
16299
16247
|
...options.full ? ["--full"] : []
|
|
16300
16248
|
]);
|
|
16301
16249
|
});
|
|
@@ -16536,9 +16484,9 @@ Examples:
|
|
|
16536
16484
|
const limit = Number(options.historyLimit);
|
|
16537
16485
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16538
16486
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16539
|
-
const client = new (0,
|
|
16487
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
16540
16488
|
if (options.binding) {
|
|
16541
|
-
|
|
16489
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0,
|
|
16542
16490
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16543
16491
|
);
|
|
16544
16492
|
return;
|
|
@@ -16546,7 +16494,7 @@ Examples:
|
|
|
16546
16494
|
const result = await client.listPlayTriggerInventory({
|
|
16547
16495
|
cursor: options.cursor
|
|
16548
16496
|
});
|
|
16549
|
-
|
|
16497
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, {
|
|
16550
16498
|
...result,
|
|
16551
16499
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16552
16500
|
});
|
|
@@ -16593,7 +16541,7 @@ Examples:
|
|
|
16593
16541
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16594
16542
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16595
16543
|
}
|
|
16596
|
-
const result = await new (0,
|
|
16544
|
+
const result = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().getPlaysActivity({
|
|
16597
16545
|
timeZone: options.timeZone,
|
|
16598
16546
|
days,
|
|
16599
16547
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16607,7 +16555,7 @@ Examples:
|
|
|
16607
16555
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16608
16556
|
);
|
|
16609
16557
|
}
|
|
16610
|
-
|
|
16558
|
+
_chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
|
|
16611
16559
|
{ ...result },
|
|
16612
16560
|
{
|
|
16613
16561
|
json: Boolean(options.json),
|
|
@@ -16636,7 +16584,7 @@ Examples:
|
|
|
16636
16584
|
false
|
|
16637
16585
|
);
|
|
16638
16586
|
});
|
|
16639
|
-
|
|
16587
|
+
_chunkKAEZNPUMjs.registerDeprecatedSearchCommand.call(void 0,
|
|
16640
16588
|
play,
|
|
16641
16589
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16642
16590
|
);
|
|
@@ -16677,9 +16625,9 @@ Examples:
|
|
|
16677
16625
|
"--json [fields]",
|
|
16678
16626
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16679
16627
|
);
|
|
16680
|
-
|
|
16628
|
+
_chunkNSOTASOPjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16681
16629
|
async (target, options) => {
|
|
16682
|
-
const ownView = () => handlePlayDescribe(
|
|
16630
|
+
const ownView = () => handlePlayDescribe(_chunkRTO5QZWTjs.describeArgs.call(void 0, target, options));
|
|
16683
16631
|
const [flagText] = [options.json].filter(
|
|
16684
16632
|
(value) => typeof value === "string"
|
|
16685
16633
|
);
|
|
@@ -16690,7 +16638,7 @@ Examples:
|
|
|
16690
16638
|
process.exitCode = await ownView();
|
|
16691
16639
|
return;
|
|
16692
16640
|
}
|
|
16693
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16641
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-EFWNECHI.js")));
|
|
16694
16642
|
process.exitCode = await describeAnything(
|
|
16695
16643
|
name,
|
|
16696
16644
|
{
|
|
@@ -16808,7 +16756,7 @@ Examples:
|
|
|
16808
16756
|
deepline plays deployments <deployment-id>
|
|
16809
16757
|
`
|
|
16810
16758
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16811
|
-
async (id, options) => id ?
|
|
16759
|
+
async (id, options) => id ? _chunk7Z66NHUCjs.handleDeploymentGet.call(void 0, id, options) : _chunk7Z66NHUCjs.handleDeploymentsList.call(void 0, options)
|
|
16812
16760
|
);
|
|
16813
16761
|
addPublishHelp(
|
|
16814
16762
|
play.command("publish <target>").description(
|
|
@@ -16943,14 +16891,14 @@ Examples:
|
|
|
16943
16891
|
const limit = Number(options.limit);
|
|
16944
16892
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16945
16893
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16946
|
-
const result = await new (0,
|
|
16894
|
+
const result = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().runs.rowHistory({
|
|
16947
16895
|
playName: options.play,
|
|
16948
16896
|
runId,
|
|
16949
16897
|
tableNamespace: options.dataset,
|
|
16950
16898
|
limit,
|
|
16951
16899
|
cursor: options.cursor
|
|
16952
16900
|
});
|
|
16953
|
-
|
|
16901
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, {
|
|
16954
16902
|
...result,
|
|
16955
16903
|
...result.nextCursor ? {
|
|
16956
16904
|
next: `deepline runs rows-history ${_chunkAID3OYVJjs.shellQuote.call(void 0, runId)} --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.play)} --dataset ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.dataset)} --limit ${limit} --cursor ${_chunkAID3OYVJjs.shellQuote.call(void 0, result.nextCursor)} --json`
|
|
@@ -17015,7 +16963,7 @@ Examples:
|
|
|
17015
16963
|
).action(async (runId, options) => {
|
|
17016
16964
|
process.exitCode = await handleRunGet([
|
|
17017
16965
|
runId,
|
|
17018
|
-
...
|
|
16966
|
+
..._chunkRTO5QZWTjs.jsonFieldArgs.call(void 0, options.json),
|
|
17019
16967
|
...options.webUrl ? ["--web-url"] : [],
|
|
17020
16968
|
...options.full ? ["--full"] : [],
|
|
17021
16969
|
...options.input ? ["--input"] : [],
|
|
@@ -17294,7 +17242,7 @@ Examples:
|
|
|
17294
17242
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
17295
17243
|
...options.wait ? ["--wait"] : [],
|
|
17296
17244
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
17297
|
-
...
|
|
17245
|
+
..._chunkRTO5QZWTjs.jsonFieldArgs.call(void 0, options.json)
|
|
17298
17246
|
]);
|
|
17299
17247
|
});
|
|
17300
17248
|
const share = play.command("share").description(
|
|
@@ -17435,8 +17383,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17435
17383
|
}
|
|
17436
17384
|
function shareUrlFields(status) {
|
|
17437
17385
|
return {
|
|
17438
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17439
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17386
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _563 => _563.share, 'optionalAccess', _564 => _564.publicPath])),
|
|
17387
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _565 => _565.share, 'optionalAccess', _566 => _566.canonicalPath]))
|
|
17440
17388
|
};
|
|
17441
17389
|
}
|
|
17442
17390
|
function shareStatusForOutput(status) {
|
|
@@ -17460,10 +17408,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17460
17408
|
return 2;
|
|
17461
17409
|
}
|
|
17462
17410
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17463
|
-
const status = await new (0,
|
|
17411
|
+
const status = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().getSharePage(name);
|
|
17464
17412
|
const outputStatus = shareStatusForOutput(status);
|
|
17465
|
-
if (
|
|
17466
|
-
|
|
17413
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
17414
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, outputStatus);
|
|
17467
17415
|
return 0;
|
|
17468
17416
|
}
|
|
17469
17417
|
if (!outputStatus.share) {
|
|
@@ -17502,7 +17450,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17502
17450
|
return 2;
|
|
17503
17451
|
}
|
|
17504
17452
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17505
|
-
const client = new (0,
|
|
17453
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
17506
17454
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17507
17455
|
let resolvedVersion;
|
|
17508
17456
|
if (!revisionId) {
|
|
@@ -17533,8 +17481,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17533
17481
|
);
|
|
17534
17482
|
if (!hasCompleted) {
|
|
17535
17483
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17536
|
-
if (
|
|
17537
|
-
|
|
17484
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
17485
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, {
|
|
17538
17486
|
ok: false,
|
|
17539
17487
|
code: "NO_SUCCESSFUL_RUN",
|
|
17540
17488
|
message,
|
|
@@ -17558,8 +17506,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17558
17506
|
};
|
|
17559
17507
|
if (args.includes("--dry-run")) {
|
|
17560
17508
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17561
|
-
if (
|
|
17562
|
-
|
|
17509
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
17510
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, plan);
|
|
17563
17511
|
} else {
|
|
17564
17512
|
console.log(
|
|
17565
17513
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17569,13 +17517,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17569
17517
|
}
|
|
17570
17518
|
const status = await client.publishSharePage(name, request);
|
|
17571
17519
|
const outputStatus = shareStatusForOutput(status);
|
|
17572
|
-
if (
|
|
17573
|
-
|
|
17520
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
17521
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, outputStatus);
|
|
17574
17522
|
return 0;
|
|
17575
17523
|
}
|
|
17576
17524
|
const urls = shareUrlFields(outputStatus);
|
|
17577
17525
|
console.log(
|
|
17578
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17526
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _567 => _567.share, 'optionalAccess', _568 => _568.publicPath]))), () => ( ""))}`
|
|
17579
17527
|
);
|
|
17580
17528
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17581
17529
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17601,9 +17549,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17601
17549
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17602
17550
|
...seoIndexing ? { seoIndexing } : {}
|
|
17603
17551
|
};
|
|
17604
|
-
const status = await new (0,
|
|
17605
|
-
if (
|
|
17606
|
-
|
|
17552
|
+
const status = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().updateSharePage(name, request);
|
|
17553
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
17554
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, status);
|
|
17607
17555
|
return 0;
|
|
17608
17556
|
}
|
|
17609
17557
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17618,13 +17566,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17618
17566
|
return 2;
|
|
17619
17567
|
}
|
|
17620
17568
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17621
|
-
const client = new (0,
|
|
17569
|
+
const client = new (0, _chunkWQJJNIMQjs.DeeplineClient)();
|
|
17622
17570
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17623
17571
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17624
17572
|
if (!revisionId && versionFlag) {
|
|
17625
17573
|
const versions = await client.listPlayVersions(name);
|
|
17626
17574
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17627
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17575
|
+
if (!_optionalChain([chosen, 'optionalAccess', _569 => _569._id])) {
|
|
17628
17576
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17629
17577
|
return 4;
|
|
17630
17578
|
}
|
|
@@ -17635,12 +17583,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17635
17583
|
revisionId ? { revisionId } : {}
|
|
17636
17584
|
);
|
|
17637
17585
|
const outputStatus = shareStatusForOutput(status);
|
|
17638
|
-
if (
|
|
17639
|
-
|
|
17586
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
17587
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, outputStatus);
|
|
17640
17588
|
return 0;
|
|
17641
17589
|
}
|
|
17642
17590
|
const urls = shareUrlFields(outputStatus);
|
|
17643
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17591
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _570 => _570.share, 'optionalAccess', _571 => _571.publishedRevisionId]) === revisionId;
|
|
17644
17592
|
console.log(
|
|
17645
17593
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17646
17594
|
);
|
|
@@ -17661,9 +17609,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17661
17609
|
return 2;
|
|
17662
17610
|
}
|
|
17663
17611
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17664
|
-
const status = await new (0,
|
|
17665
|
-
if (
|
|
17666
|
-
|
|
17612
|
+
const status = await new (0, _chunkWQJJNIMQjs.DeeplineClient)().unpublishSharePage(name);
|
|
17613
|
+
if (_chunkRTO5QZWTjs.argsWantJson.call(void 0, args)) {
|
|
17614
|
+
_chunkRTO5QZWTjs.printCompactJson.call(void 0, status);
|
|
17667
17615
|
return 0;
|
|
17668
17616
|
}
|
|
17669
17617
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17734,7 +17682,4 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17734
17682
|
|
|
17735
17683
|
|
|
17736
17684
|
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
|
|
17740
|
-
exports.resolveDatasetByName = resolveDatasetByName; exports.parsePlayRunHeaderFlag = parsePlayRunHeaderFlag; exports.parsePlayRunOptions = parsePlayRunOptions; exports.loadPlayBundler = loadPlayBundler; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.writePlayRunIdFile = writePlayRunIdFile; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.describeSleepUntil = describeSleepUntil; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.buildPlayDashboardUrl = buildPlayDashboardUrl; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.clampJsonPreviewText = clampJsonPreviewText; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.compactPlayStatus = compactPlayStatus; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.exportPlayStatusRows = exportPlayStatusRows; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayRun = handlePlayRun; exports.renderRunOverviewText = renderRunOverviewText; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunsRerun = handleRunsRerun; exports.handleRunsList = handleRunsList; exports.handleRunTail = handleRunTail; exports.handleRunLogs = handleRunLogs; exports.selectRunLogTailPage = selectRunLogTailPage; exports.handleRunEventSearch = handleRunEventSearch; exports.buildRunLogsText = buildRunLogsText; exports.resolveRunStopState = resolveRunStopState; exports.handleRunStop = handleRunStop; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.handleRunStopAll = handleRunStopAll; exports.handleRunExport = handleRunExport; exports.handlePlayGet = handlePlayGet; exports.handlePlayVersions = handlePlayVersions; exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.csvColumnLines = csvColumnLines; exports.describedPlay = describedPlay; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlaySave = handlePlaySave; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayRestore = handlePlayRestore; exports.registerPlayCommands = registerPlayCommands; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareUnpublish = handlePlayShareUnpublish;
|
|
17685
|
+
exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildRunLogsText = buildRunLogsText; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.clampJsonPreviewText = clampJsonPreviewText; exports.compactPlayStatus = compactPlayStatus; exports.csvColumnLines = csvColumnLines; exports.describeSleepUntil = describeSleepUntil; exports.exportPlayStatusRows = exportPlayStatusRows; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlayGet = handlePlayGet; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayRestore = handlePlayRestore; exports.handlePlayRun = handlePlayRun; exports.handlePlaySave = handlePlaySave; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlayShareUnpublish = handlePlayShareUnpublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayVersions = handlePlayVersions; exports.handleRunEventSearch = handleRunEventSearch; exports.handleRunExport = handleRunExport; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunLogs = handleRunLogs; exports.handleRunStop = handleRunStop; exports.handleRunStopAll = handleRunStopAll; exports.handleRunTail = handleRunTail; exports.handleRunsList = handleRunsList; exports.handleRunsRerun = handleRunsRerun; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.parsePlayRunHeaderFlag = parsePlayRunHeaderFlag; exports.parsePlayRunOptions = parsePlayRunOptions; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.registerPlayCommands = registerPlayCommands; exports.renderRunOverviewText = renderRunOverviewText; exports.resolveDatasetByName = resolveDatasetByName; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.resolveRunStopState = resolveRunStopState; exports.selectRunLogTailPage = selectRunLogTailPage; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.writePlayRunIdFile = writePlayRunIdFile;
|