deepline 0.3.473 → 0.3.474
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-core.ts +4 -1
- package/dist/bundling-sources/sdk/src/play.ts +7 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +3 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +101 -2
- package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +62 -20
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +24 -8
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +19 -7
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +196 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +40 -17
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/local-process.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal-resource-usage.ts +222 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +46 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +9 -5
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +36 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +18 -8
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +64 -16
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +14 -1
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +40 -0
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +23 -1
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +18 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +2 -1
- package/dist/cli/auth-O6KAH543.js +41 -0
- package/dist/cli/{auth-KLJOQ4DZ.mjs → auth-QMANU5PV.mjs} +5 -5
- package/dist/cli/{billing-IQNJXKH5.js → billing-WZ5POBZX.js} +85 -83
- package/dist/cli/{billing-DNDYNBQ7.mjs → billing-YJAP4VZN.mjs} +12 -10
- package/dist/cli/{chunk-GTH7JORC.mjs → chunk-26CZVDQN.mjs} +2 -2
- package/dist/cli/{chunk-VGVSHQN5.mjs → chunk-35SZHTRW.mjs} +5 -5
- package/dist/cli/{chunk-GAWP2YF5.mjs → chunk-3MZPWIOE.mjs} +1 -1
- package/dist/cli/{chunk-B3BM3PAI.js → chunk-3NRZFMX4.js} +6 -6
- package/dist/cli/{chunk-63OOFT6B.js → chunk-3ODBCZLL.js} +93 -93
- package/dist/cli/{chunk-D4B3EV55.js → chunk-475V572K.js} +36 -36
- package/dist/cli/{chunk-36KEQFWZ.js → chunk-4C34LGI4.js} +10 -10
- package/dist/cli/{chunk-6ZTSHKJF.js → chunk-5QS4T4KR.js} +10 -3
- package/dist/cli/{chunk-GQBAJTQU.mjs → chunk-7IYOWIEJ.mjs} +2 -2
- package/dist/cli/{chunk-3J2N7YF5.js → chunk-AIPTW3EK.js} +3 -3
- package/dist/cli/{chunk-YHB6MASP.js → chunk-AWJKYS25.js} +2 -2
- package/dist/cli/{chunk-V25CXRQ7.mjs → chunk-BB4RZMWA.mjs} +5 -5
- package/dist/cli/{chunk-OHUGXZ7N.js → chunk-CXBEZAPU.js} +16 -16
- package/dist/cli/{chunk-Z52WEIBR.js → chunk-DKR7QPEO.js} +11 -7
- package/dist/cli/{chunk-X6R5UNDZ.mjs → chunk-DQZBERDL.mjs} +1 -1
- package/dist/cli/{chunk-YUNPYX5T.mjs → chunk-DUGZKPRK.mjs} +10 -3
- package/dist/cli/{chunk-HQCTPAXP.mjs → chunk-EIKONWW7.mjs} +1 -1
- package/dist/cli/{chunk-MREO5LZD.js → chunk-EK2TAZJZ.js} +2 -2
- package/dist/cli/{chunk-RVRG57OB.js → chunk-G3UHAYRX.js} +8 -8
- package/dist/cli/{chunk-3LFSIUFI.js → chunk-IK3VOGDR.js} +21 -21
- package/dist/cli/{chunk-IC6AHOYS.js → chunk-JCNJQH6X.js} +1 -1
- package/dist/cli/{chunk-NTFM7JQW.mjs → chunk-JEYX3345.mjs} +3 -3
- package/dist/cli/{chunk-IFZ76E5H.mjs → chunk-JJVYUKLY.mjs} +1 -1
- package/dist/cli/{chunk-N4ZCMQ54.js → chunk-JSXMJSBE.js} +8 -8
- package/dist/cli/{chunk-QG3THSTN.mjs → chunk-KKWQ24VM.mjs} +2 -2
- package/dist/cli/{chunk-TUFQFTOC.js → chunk-LHOEWAVD.js} +53 -53
- package/dist/cli/{chunk-QD6IW2HP.mjs → chunk-MKSB2FTU.mjs} +4 -4
- package/dist/cli/{chunk-6YOGOXOJ.mjs → chunk-MNK4ZK2C.mjs} +10 -10
- package/dist/cli/{chunk-ABLEU3QI.mjs → chunk-MXUJVCKV.mjs} +4 -4
- package/dist/cli/{chunk-WGQKOLXH.js → chunk-N62MS3XJ.js} +6 -6
- package/dist/cli/{chunk-YH5SFKHJ.js → chunk-ORQYKA4I.js} +4 -4
- package/dist/cli/{chunk-4U3RNA3J.js → chunk-PGKELBIY.js} +51 -51
- package/dist/cli/{chunk-SWAYZST7.mjs → chunk-RGIQ5ZJX.mjs} +2 -2
- package/dist/cli/{chunk-UON3WCBD.js → chunk-RLQIGBFK.js} +3 -3
- package/dist/cli/{chunk-F4PUDYBY.js → chunk-RXITRC37.js} +3 -3
- package/dist/cli/{chunk-DD7E4ZVH.js → chunk-STLJYWUC.js} +7 -7
- package/dist/cli/{chunk-3OPQLFUK.mjs → chunk-THDXVSNL.mjs} +4 -4
- package/dist/cli/{chunk-TBLBYIKO.mjs → chunk-UGYLGT7B.mjs} +1 -1
- package/dist/cli/{chunk-CNCK2D6B.mjs → chunk-UKX4FESF.mjs} +2 -2
- package/dist/cli/{chunk-RZHUHL53.mjs → chunk-V4ILQ2DS.mjs} +11 -7
- package/dist/cli/{chunk-QI73EL5C.js → chunk-XNP7XTBN.js} +26 -26
- package/dist/cli/{chunk-PMJAGTSQ.js → chunk-XP7FAYLN.js} +5 -5
- package/dist/cli/{chunk-D22QIUE3.js → chunk-YFDTF2XC.js} +9 -9
- package/dist/cli/{chunk-GE5GPLNM.mjs → chunk-YK64UZXN.mjs} +1 -1
- package/dist/cli/{chunk-ZVLYUKJU.js → chunk-YKNULB7V.js} +5 -5
- package/dist/cli/{chunk-VS7JKS22.mjs → chunk-YVJ6IWVD.mjs} +1 -1
- package/dist/cli/{chunk-6QS7522K.mjs → chunk-YX762HFK.mjs} +2 -2
- package/dist/cli/{chunk-EUHTZV2E.mjs → chunk-Z27NSLPC.mjs} +1 -1
- package/dist/cli/{chunk-EVLUSXQG.mjs → chunk-ZGC2SUAA.mjs} +2 -2
- package/dist/cli/{chunk-GISBRE2H.mjs → chunk-ZRWQKTSX.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-OVV3HWN4.js → csv-ENKCFCSM.js} +13 -13
- package/dist/cli/{csv-NCY5MWS2.mjs → csv-QCLQOIEA.mjs} +4 -4
- package/dist/cli/{db-BOELNDS4.js → db-5TLBZDT3.js} +27 -27
- package/dist/cli/{db-VPH6JHUD.mjs → db-P25LGP33.mjs} +6 -6
- package/dist/cli/describe-44L7OBGM.js +48 -0
- package/dist/cli/{describe-FFDCPYZH.mjs → describe-W2H5DHR6.mjs} +17 -17
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-5GCCDENS.mjs → executions-VYZCYUBR.mjs} +6 -6
- package/dist/cli/{executions-RF44ANF5.js → executions-YHFAWJOJ.js} +8 -8
- package/dist/cli/{feedback-OI2A5L6F.mjs → feedback-K2FWYYLZ.mjs} +4 -4
- package/dist/cli/{feedback-NJM3V7QV.js → feedback-RJF3QSBB.js} +8 -8
- package/dist/cli/git-F3EI5DY5.js +25 -0
- package/dist/cli/{git-EOGSZ3T2.mjs → git-S3APUPLL.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-5QM7XGGX.js → legacy-noops-3SWNRE7Z.js} +8 -8
- package/dist/cli/{legacy-noops-UYKK7AAB.mjs → legacy-noops-ICYZACTW.mjs} +5 -5
- package/dist/cli/{monitors-N3ITC5MP.mjs → monitors-DEZCEQLB.mjs} +7 -7
- package/dist/cli/{monitors-52GW2V4V.js → monitors-VRIWTRPG.js} +91 -91
- package/dist/cli/{org-KUZUG33W.mjs → org-IQW5ZIAO.mjs} +6 -6
- package/dist/cli/{org-ADF47NPV.js → org-NX752DTE.js} +72 -72
- package/dist/cli/{pages-C3S5WU3S.mjs → pages-5WQRVVKX.mjs} +6 -6
- package/dist/cli/{pages-H3H7ODBN.js → pages-YIBWYGVS.js} +17 -17
- package/dist/cli/{play-YWZWBG32.js → play-3EXNH3HD.js} +662 -601
- package/dist/cli/{play-SZETTQPV.mjs → play-WOMJXS4O.mjs} +110 -49
- package/dist/cli/{providers-V3BP7ZB2.js → providers-C2WYSR2Y.js} +9 -9
- package/dist/cli/{providers-FSCD35HB.mjs → providers-XDVPYRTS.mjs} +6 -6
- package/dist/cli/{quickstart-ICULVGAR.js → quickstart-7RABZF66.js} +6 -6
- package/dist/cli/{quickstart-SYZCT2WI.mjs → quickstart-YMSIL2TK.mjs} +4 -4
- package/dist/cli/{run-WUJSKGUM.js → run-5QVVWFGL.js} +36 -36
- package/dist/cli/{run-HA5B3AYQ.mjs → run-A4JD6TAR.mjs} +22 -22
- package/dist/cli/{search-A27AGYDV.mjs → search-2TOSF2G3.mjs} +7 -7
- package/dist/cli/search-772R7YHI.js +32 -0
- package/dist/cli/{secrets-2L4VRJ2F.mjs → secrets-BUN4ORE7.mjs} +6 -6
- package/dist/cli/{secrets-ODX56QBF.js → secrets-Q7UVOSNM.js} +15 -15
- package/dist/cli/{sessions-PRF36DHO.mjs → sessions-IAOORI6X.mjs} +5 -5
- package/dist/cli/{sessions-DVZ4FECP.js → sessions-NXQOQ4HX.js} +6 -6
- package/dist/cli/{settings-LUATIKJE.mjs → settings-BMI373AI.mjs} +11 -11
- package/dist/cli/{settings-RJT5DBWG.js → settings-WD4KSY5S.js} +78 -78
- package/dist/cli/{setup-FJSBKCLU.js → setup-3IA7BVPE.js} +44 -44
- package/dist/cli/{setup-IQXTYLRH.mjs → setup-55VIWAWR.mjs} +9 -9
- package/dist/cli/{skills-XJH4ZC5Y.mjs → skills-GKITMBTM.mjs} +7 -7
- package/dist/cli/skills-PUUTFMP3.js +31 -0
- package/dist/cli/tools-3WX7TUUG.js +55 -0
- package/dist/cli/{tools-IGXLZCKZ.mjs → tools-XHCFC7GP.mjs} +16 -16
- package/dist/cli/update-PC3CLODV.js +33 -0
- package/dist/cli/{update-AH7G5VSL.mjs → update-SWB24YKE.mjs} +9 -9
- package/dist/cli/{workflow-IQ2J7LWM.js → workflow-5QPMFI3Z.js} +17 -17
- package/dist/cli/{workflow-WOYSCWVD.mjs → workflow-XO4CKUA7.mjs} +7 -7
- package/dist/{client-C9bJ0QXu.d.mts → client-Bgl0_zXi.d.mts} +1 -1
- package/dist/{client-CuNH54w3.d.ts → client-_ah6IuhK.d.ts} +1 -1
- package/dist/{client-core-CSiXbe2n.d.mts → client-core-Bfsedm0_.d.mts} +44 -3
- package/dist/{client-core-C8Q6DKga.d.ts → client-core-C-ZF5vh9.d.ts} +44 -3
- package/dist/{compiler-manifest-Zwm9yqOA.d.mts → compiler-manifest-CCOqDGjU.d.mts} +12 -10
- package/dist/{compiler-manifest-Zwm9yqOA.d.ts → compiler-manifest-CCOqDGjU.d.ts} +12 -10
- package/dist/{errors-nEsqNLL8.d.mts → errors-BLccD7tG.d.mts} +1 -1
- package/dist/{errors-CsYwlpn4.d.ts → errors-Cy3kPnsi.d.ts} +1 -1
- package/dist/{index-CXF2jtza.d.mts → index-4-j44HuT.d.mts} +1 -1
- package/dist/{index-9pUZqkPH.d.ts → index-D5e4h1-H.d.ts} +1 -1
- package/dist/index.d.mts +14 -9
- package/dist/index.d.ts +14 -9
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +111 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-IJOWKNSB.js +0 -41
- package/dist/cli/describe-7SFESEFL.js +0 -48
- package/dist/cli/git-4V5ZS5SE.js +0 -25
- package/dist/cli/search-XATDPNEM.js +0 -32
- package/dist/cli/skills-N6CPBF6T.js +0 -31
- package/dist/cli/tools-YMVEVRCE.js +0 -55
- package/dist/cli/update-MUCWGTXH.js +0 -33
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkYFDTF2XCjs = require('./chunk-YFDTF2XC.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,14 +17,14 @@ var _chunkD22QIUE3js = require('./chunk-D22QIUE3.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkAIPTW3EKjs = require('./chunk-AIPTW3EK.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkG3UHAYRXjs = require('./chunk-G3UHAYRX.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkXNP7XTBNjs = require('./chunk-XNP7XTBN.js');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
|
|
@@ -40,7 +40,7 @@ require('./chunk-ZM2YPJQJ.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkDKR7QPEOjs = require('./chunk-DKR7QPEO.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
@@ -52,10 +52,10 @@ var _chunkA6QCMBGLjs = require('./chunk-A6QCMBGL.js');
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkYKNULB7Vjs = require('./chunk-YKNULB7V.js');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkXP7FAYLNjs = require('./chunk-XP7FAYLN.js');
|
|
59
59
|
require('./chunk-VKKVSFRD.js');
|
|
60
60
|
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ require('./chunk-VKKVSFRD.js');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
var
|
|
72
|
+
var _chunkN62MS3XJjs = require('./chunk-N62MS3XJ.js');
|
|
73
73
|
require('./chunk-E4CABWXL.js');
|
|
74
74
|
|
|
75
75
|
|
|
@@ -89,18 +89,18 @@ require('./chunk-XDVT3GOM.js');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunk3NRZFMX4js = require('./chunk-3NRZFMX4.js');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
99
|
-
require('./chunk-
|
|
98
|
+
var _chunkAWJKYS25js = require('./chunk-AWJKYS25.js');
|
|
99
|
+
require('./chunk-LHOEWAVD.js');
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
var
|
|
103
|
+
var _chunkRLQIGBFKjs = require('./chunk-RLQIGBFK.js');
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
|
|
@@ -114,17 +114,17 @@ var _chunkUON3WCBDjs = require('./chunk-UON3WCBD.js');
|
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
var
|
|
118
|
-
require('./chunk-
|
|
117
|
+
var _chunkSTLJYWUCjs = require('./chunk-STLJYWUC.js');
|
|
118
|
+
require('./chunk-RXITRC37.js');
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
var
|
|
121
|
+
var _chunkORQYKA4Ijs = require('./chunk-ORQYKA4I.js');
|
|
122
122
|
require('./chunk-ALJJRZNJ.js');
|
|
123
123
|
require('./chunk-XNYIZMNQ.js');
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
127
|
-
require('./chunk-
|
|
127
|
+
require('./chunk-JCNJQH6X.js');
|
|
128
128
|
require('./chunk-OG64RBAC.js');
|
|
129
129
|
|
|
130
130
|
|
|
@@ -2106,7 +2106,7 @@ function resolveField(key, command) {
|
|
|
2106
2106
|
function printSettings(result, json, name) {
|
|
2107
2107
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2108
2108
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2109
|
-
|
|
2109
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2110
2110
|
{
|
|
2111
2111
|
...result,
|
|
2112
2112
|
settings: Object.fromEntries(
|
|
@@ -2150,7 +2150,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2150
2150
|
valueSyntax: field.cli.valueSyntax,
|
|
2151
2151
|
examples: field.cli.examples
|
|
2152
2152
|
}));
|
|
2153
|
-
|
|
2153
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2154
2154
|
{
|
|
2155
2155
|
fields: descriptions,
|
|
2156
2156
|
render: {
|
|
@@ -2175,7 +2175,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2175
2175
|
async (options, command) => {
|
|
2176
2176
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2177
2177
|
printSettings(
|
|
2178
|
-
await new (0,
|
|
2178
|
+
await new (0, _chunkXP7FAYLNjs.DeeplineClient)().getPlaySettings(options.play),
|
|
2179
2179
|
options.json,
|
|
2180
2180
|
options.name
|
|
2181
2181
|
);
|
|
@@ -2206,7 +2206,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2206
2206
|
);
|
|
2207
2207
|
}
|
|
2208
2208
|
if (options.dryRun) {
|
|
2209
|
-
|
|
2209
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2210
2210
|
{
|
|
2211
2211
|
dryRun: true,
|
|
2212
2212
|
play,
|
|
@@ -2227,7 +2227,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2227
2227
|
return;
|
|
2228
2228
|
}
|
|
2229
2229
|
printSettings(
|
|
2230
|
-
await new (0,
|
|
2230
|
+
await new (0, _chunkXP7FAYLNjs.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2231
2231
|
options.json
|
|
2232
2232
|
);
|
|
2233
2233
|
};
|
|
@@ -2253,13 +2253,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2253
2253
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2254
2254
|
{ exitCode: 2 }
|
|
2255
2255
|
);
|
|
2256
|
-
const page = await new (0,
|
|
2256
|
+
const page = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().listPlaySettingsPaths({
|
|
2257
2257
|
root: options.root,
|
|
2258
2258
|
limit,
|
|
2259
2259
|
cursor: options.cursor
|
|
2260
2260
|
});
|
|
2261
2261
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2262
|
-
|
|
2262
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2263
2263
|
{
|
|
2264
2264
|
...page,
|
|
2265
2265
|
nextCommand,
|
|
@@ -2310,7 +2310,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2310
2310
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
|
|
2311
2311
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
|
|
2312
2312
|
};
|
|
2313
|
-
const client = new (0,
|
|
2313
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
2314
2314
|
const paths = [];
|
|
2315
2315
|
let cursor;
|
|
2316
2316
|
do {
|
|
@@ -2372,7 +2372,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2372
2372
|
moved.push(move.playName);
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
|
-
|
|
2375
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2376
2376
|
{
|
|
2377
2377
|
dryRun: Boolean(options.dryRun),
|
|
2378
2378
|
from: options.from,
|
|
@@ -2500,7 +2500,7 @@ function triggerLines(view) {
|
|
|
2500
2500
|
return lines;
|
|
2501
2501
|
}
|
|
2502
2502
|
function printView(view, json) {
|
|
2503
|
-
|
|
2503
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2504
2504
|
{
|
|
2505
2505
|
...view,
|
|
2506
2506
|
render: {
|
|
@@ -2513,7 +2513,7 @@ function printView(view, json) {
|
|
|
2513
2513
|
);
|
|
2514
2514
|
}
|
|
2515
2515
|
function printResult(result, json) {
|
|
2516
|
-
|
|
2516
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2517
2517
|
{
|
|
2518
2518
|
...result,
|
|
2519
2519
|
render: {
|
|
@@ -2543,7 +2543,7 @@ async function mutate(command, options, build) {
|
|
|
2543
2543
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2544
2544
|
}
|
|
2545
2545
|
if (options.dryRun) {
|
|
2546
|
-
|
|
2546
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
2547
2547
|
{
|
|
2548
2548
|
dryRun: true,
|
|
2549
2549
|
play: options.play,
|
|
@@ -2562,7 +2562,7 @@ async function mutate(command, options, build) {
|
|
|
2562
2562
|
return;
|
|
2563
2563
|
}
|
|
2564
2564
|
printResult(
|
|
2565
|
-
await new (0,
|
|
2565
|
+
await new (0, _chunkXP7FAYLNjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2566
2566
|
options.json
|
|
2567
2567
|
);
|
|
2568
2568
|
}
|
|
@@ -2595,7 +2595,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2595
2595
|
}).addHelpText("after", help2);
|
|
2596
2596
|
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) => {
|
|
2597
2597
|
printView(
|
|
2598
|
-
await new (0,
|
|
2598
|
+
await new (0, _chunkXP7FAYLNjs.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2599
2599
|
options.json
|
|
2600
2600
|
);
|
|
2601
2601
|
});
|
|
@@ -2639,7 +2639,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2639
2639
|
if (options.auth === void 0) {
|
|
2640
2640
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2641
2641
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2642
|
-
const current = await new (0,
|
|
2642
|
+
const current = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().getPlayTriggerConfig(
|
|
2643
2643
|
options.play
|
|
2644
2644
|
);
|
|
2645
2645
|
return {
|
|
@@ -2716,7 +2716,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2716
2716
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2717
2717
|
"runtime.event": "Other event."
|
|
2718
2718
|
};
|
|
2719
|
-
var RUN_LOGS_KIND_HELP =
|
|
2719
|
+
var RUN_LOGS_KIND_HELP = _chunkN62MS3XJjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2720
2720
|
kind,
|
|
2721
2721
|
description: KIND_DESCRIPTIONS[kind]
|
|
2722
2722
|
}));
|
|
@@ -2853,9 +2853,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2853
2853
|
const args = program.args;
|
|
2854
2854
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2855
2855
|
error.exitCode = 2;
|
|
2856
|
-
if (
|
|
2857
|
-
|
|
2858
|
-
Object.assign(new (0,
|
|
2856
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2857
|
+
_chunkSTLJYWUCjs.printJsonError.call(void 0,
|
|
2858
|
+
Object.assign(new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(error.message), {
|
|
2859
2859
|
exitCode: 2,
|
|
2860
2860
|
retryable: false
|
|
2861
2861
|
})
|
|
@@ -2899,14 +2899,14 @@ function parseQuery(args, resource) {
|
|
|
2899
2899
|
if (VALUE_FLAGS.has(flag)) {
|
|
2900
2900
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2901
2901
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2902
|
-
throw new (0,
|
|
2902
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2903
2903
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2904
2904
|
);
|
|
2905
2905
|
}
|
|
2906
2906
|
if (flag === "--sum") sums.push(value);
|
|
2907
2907
|
else {
|
|
2908
2908
|
if (values[flag] !== void 0) {
|
|
2909
|
-
throw new (0,
|
|
2909
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2910
2910
|
`${flag} may only be supplied once.`
|
|
2911
2911
|
);
|
|
2912
2912
|
}
|
|
@@ -2920,12 +2920,12 @@ function parseQuery(args, resource) {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
if (arg.startsWith("-")) {
|
|
2922
2922
|
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.";
|
|
2923
|
-
throw new (0,
|
|
2923
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2924
2924
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2925
2925
|
);
|
|
2926
2926
|
}
|
|
2927
2927
|
if (runId !== void 0) {
|
|
2928
|
-
throw new (0,
|
|
2928
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2929
2929
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2930
2930
|
);
|
|
2931
2931
|
}
|
|
@@ -2933,7 +2933,7 @@ function parseQuery(args, resource) {
|
|
|
2933
2933
|
}
|
|
2934
2934
|
if (switches.has("--fields")) {
|
|
2935
2935
|
if (runId !== void 0) {
|
|
2936
|
-
throw new (0,
|
|
2936
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2937
2937
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2938
2938
|
);
|
|
2939
2939
|
}
|
|
@@ -2946,18 +2946,18 @@ function parseQuery(args, resource) {
|
|
|
2946
2946
|
)
|
|
2947
2947
|
];
|
|
2948
2948
|
if (incompatible.length) {
|
|
2949
|
-
throw new (0,
|
|
2949
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2950
2950
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2951
2951
|
);
|
|
2952
2952
|
}
|
|
2953
2953
|
}
|
|
2954
2954
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2955
|
-
throw new (0,
|
|
2955
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2956
2956
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2957
2957
|
);
|
|
2958
2958
|
}
|
|
2959
2959
|
if (sums.length && switches.has("--count")) {
|
|
2960
|
-
throw new (0,
|
|
2960
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2961
2961
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2962
2962
|
);
|
|
2963
2963
|
}
|
|
@@ -2965,7 +2965,7 @@ function parseQuery(args, resource) {
|
|
|
2965
2965
|
if (operation === "count") {
|
|
2966
2966
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2967
2967
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2968
|
-
throw new (0,
|
|
2968
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
2969
2969
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2970
2970
|
);
|
|
2971
2971
|
}
|
|
@@ -3000,16 +3000,16 @@ function parseQuery(args, resource) {
|
|
|
3000
3000
|
];
|
|
3001
3001
|
}
|
|
3002
3002
|
}
|
|
3003
|
-
const request =
|
|
3003
|
+
const request = _chunkN62MS3XJjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
3004
3004
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
3005
3005
|
const backend = values["--runtime-backend"];
|
|
3006
3006
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
3007
|
-
throw new (0,
|
|
3007
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
3008
3008
|
"--runtime-backend must be daytona or modal."
|
|
3009
3009
|
);
|
|
3010
3010
|
}
|
|
3011
3011
|
if (backend && !namespace) {
|
|
3012
|
-
throw new (0,
|
|
3012
|
+
throw new (0, _chunkN62MS3XJjs.RunEventQueryInputError)(
|
|
3013
3013
|
"--runtime-backend requires --runtime-namespace."
|
|
3014
3014
|
);
|
|
3015
3015
|
}
|
|
@@ -3056,12 +3056,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3056
3056
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3057
3057
|
const record3 = failure;
|
|
3058
3058
|
const status = record3.statusCode;
|
|
3059
|
-
const exitCode = error instanceof
|
|
3059
|
+
const exitCode = error instanceof _chunkN62MS3XJjs.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;
|
|
3060
3060
|
const diagnostic = Object.assign(failure, {
|
|
3061
3061
|
exitCode,
|
|
3062
3062
|
retryable: exitCode === 5
|
|
3063
3063
|
});
|
|
3064
|
-
if (
|
|
3064
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) _chunkSTLJYWUCjs.printJsonError.call(void 0, diagnostic);
|
|
3065
3065
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3066
3066
|
return exitCode;
|
|
3067
3067
|
}
|
|
@@ -3076,7 +3076,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3076
3076
|
...criteria
|
|
3077
3077
|
} = request;
|
|
3078
3078
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3079
|
-
const client = new (0,
|
|
3079
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
3080
3080
|
let result;
|
|
3081
3081
|
if (request.operation === "fields") {
|
|
3082
3082
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3142,13 +3142,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3142
3142
|
lines.push(`Next page: ${nextPage}`);
|
|
3143
3143
|
}
|
|
3144
3144
|
}
|
|
3145
|
-
|
|
3145
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
3146
3146
|
{
|
|
3147
3147
|
...result,
|
|
3148
3148
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3149
3149
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3150
3150
|
},
|
|
3151
|
-
{ json:
|
|
3151
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3152
3152
|
` }
|
|
3153
3153
|
);
|
|
3154
3154
|
return 0;
|
|
@@ -4067,7 +4067,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4067
4067
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4068
4068
|
);
|
|
4069
4069
|
}
|
|
4070
|
-
const response = await new (0,
|
|
4070
|
+
const response = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().runs.getReceipts(runId, {
|
|
4071
4071
|
keys
|
|
4072
4072
|
});
|
|
4073
4073
|
const failed = response.receipts.filter(
|
|
@@ -4079,7 +4079,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4079
4079
|
JSON.stringify(response, null, 2) + "\n",
|
|
4080
4080
|
{ flag: "wx", mode: 384 }
|
|
4081
4081
|
);
|
|
4082
|
-
|
|
4082
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
4083
4083
|
{
|
|
4084
4084
|
runId,
|
|
4085
4085
|
out: options.out,
|
|
@@ -4089,7 +4089,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4089
4089
|
{ json: true }
|
|
4090
4090
|
);
|
|
4091
4091
|
} else {
|
|
4092
|
-
|
|
4092
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4093
4093
|
}
|
|
4094
4094
|
if (failed)
|
|
4095
4095
|
process.exitCode = response.receipts.some(
|
|
@@ -4128,7 +4128,7 @@ includes nextCommand when another page is available.
|
|
|
4128
4128
|
{ exitCode: 2 }
|
|
4129
4129
|
);
|
|
4130
4130
|
}
|
|
4131
|
-
const page = await new (0,
|
|
4131
|
+
const page = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().runs.children(parentRunId, {
|
|
4132
4132
|
launchKey: options.launchKey,
|
|
4133
4133
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4134
4134
|
limit
|
|
@@ -4143,7 +4143,7 @@ includes nextCommand when another page is available.
|
|
|
4143
4143
|
"--limit",
|
|
4144
4144
|
String(limit)
|
|
4145
4145
|
].join(" ") : null;
|
|
4146
|
-
|
|
4146
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
4147
4147
|
{
|
|
4148
4148
|
parentRunId,
|
|
4149
4149
|
launchKey: options.launchKey,
|
|
@@ -4179,7 +4179,7 @@ async function handleRunsHistory(options) {
|
|
|
4179
4179
|
throw new Error("--limit must be a positive integer.");
|
|
4180
4180
|
}
|
|
4181
4181
|
}
|
|
4182
|
-
const page = await new (0,
|
|
4182
|
+
const page = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().runs.history({
|
|
4183
4183
|
cursor: options.cursor,
|
|
4184
4184
|
orgId: options.org,
|
|
4185
4185
|
search: options.search,
|
|
@@ -4195,7 +4195,7 @@ async function handleRunsHistory(options) {
|
|
|
4195
4195
|
);
|
|
4196
4196
|
}
|
|
4197
4197
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4198
|
-
|
|
4198
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
4199
4199
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4200
4200
|
options.json ? { json: true } : {}
|
|
4201
4201
|
);
|
|
@@ -4247,12 +4247,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4247
4247
|
return 1;
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
4250
|
-
const result = await new (0,
|
|
4250
|
+
const result = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().runs.rerun(runId, {
|
|
4251
4251
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4252
4252
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4253
4253
|
});
|
|
4254
|
-
if (
|
|
4255
|
-
|
|
4254
|
+
if (_chunkSTLJYWUCjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4255
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4256
4256
|
} else if (result.rateLimited) {
|
|
4257
4257
|
console.log(`
|
|
4258
4258
|
${result.rateLimited.message}`);
|
|
@@ -5076,13 +5076,13 @@ var RunDataset = class _RunDataset {
|
|
|
5076
5076
|
const absolutePath = _path.resolve.call(void 0, outPath);
|
|
5077
5077
|
_fs.writeFileSync.call(void 0,
|
|
5078
5078
|
absolutePath,
|
|
5079
|
-
`${JSON.stringify(
|
|
5079
|
+
`${JSON.stringify(_chunkAIPTW3EKjs.orderRunExportJson.call(void 0, this.rows), null, 2)}
|
|
5080
5080
|
`,
|
|
5081
5081
|
"utf-8"
|
|
5082
5082
|
);
|
|
5083
5083
|
return absolutePath;
|
|
5084
5084
|
}
|
|
5085
|
-
return
|
|
5085
|
+
return _chunkAIPTW3EKjs.writeRunDatasetCsv.call(void 0, {
|
|
5086
5086
|
rows: this.rows,
|
|
5087
5087
|
columns: this.#info.columns,
|
|
5088
5088
|
outPath
|
|
@@ -5287,6 +5287,16 @@ var PLAY_SANDBOX_SIZE_LIMITS = {
|
|
|
5287
5287
|
memoryGiB: 1,
|
|
5288
5288
|
cpu: 1,
|
|
5289
5289
|
diskGiB: 3
|
|
5290
|
+
},
|
|
5291
|
+
large: {
|
|
5292
|
+
memoryGiB: 4,
|
|
5293
|
+
cpu: 2,
|
|
5294
|
+
diskGiB: 8
|
|
5295
|
+
},
|
|
5296
|
+
xlarge: {
|
|
5297
|
+
memoryGiB: 8,
|
|
5298
|
+
cpu: 4,
|
|
5299
|
+
diskGiB: 10
|
|
5290
5300
|
}
|
|
5291
5301
|
};
|
|
5292
5302
|
var STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
@@ -5295,10 +5305,29 @@ var STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
|
5295
5305
|
};
|
|
5296
5306
|
var MAX_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
5297
5307
|
timeoutSeconds: 4 * 60 * 60,
|
|
5298
|
-
|
|
5299
|
-
cpu: STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS.cpu,
|
|
5300
|
-
diskGiB: STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS.diskGiB
|
|
5308
|
+
...PLAY_SANDBOX_SIZE_LIMITS.xlarge
|
|
5301
5309
|
};
|
|
5310
|
+
function modalSandboxMemoryLimitGiBForPlay(input) {
|
|
5311
|
+
if (!Object.values(PLAY_SANDBOX_SIZE_LIMITS).some(
|
|
5312
|
+
(profile) => profile.memoryGiB === input.memoryGiB
|
|
5313
|
+
)) {
|
|
5314
|
+
throw new Error(
|
|
5315
|
+
`Unsupported Modal memory reservation: ${input.memoryGiB} GiB.`
|
|
5316
|
+
);
|
|
5317
|
+
}
|
|
5318
|
+
return Math.min(
|
|
5319
|
+
Math.max(4, input.memoryGiB * 2),
|
|
5320
|
+
MAX_PLAY_SANDBOX_RUNTIME_LIMITS.memoryGiB
|
|
5321
|
+
);
|
|
5322
|
+
}
|
|
5323
|
+
function playSandboxSizeForLimits(limits) {
|
|
5324
|
+
return _nullishCoalesce(_optionalChain([Object, 'access', _168 => _168.entries, 'call', _169 => _169(PLAY_SANDBOX_SIZE_LIMITS), 'access', _170 => _170.find, 'call', _171 => _171(
|
|
5325
|
+
([, profile]) => profile.memoryGiB === limits.memoryGiB && profile.cpu === limits.cpu && profile.diskGiB === limits.diskGiB
|
|
5326
|
+
), 'optionalAccess', _172 => _172[0]]), () => ( null));
|
|
5327
|
+
}
|
|
5328
|
+
var supportedPlaySandboxSizes = Object.keys(PLAY_SANDBOX_SIZE_LIMITS).join(
|
|
5329
|
+
", "
|
|
5330
|
+
);
|
|
5302
5331
|
function parseTimeout(value) {
|
|
5303
5332
|
const match = /^(\d+)\s*([mh])$/i.exec(value.trim());
|
|
5304
5333
|
if (!match) return null;
|
|
@@ -5307,13 +5336,10 @@ function parseTimeout(value) {
|
|
|
5307
5336
|
return amount * (match[2].toLowerCase() === "h" ? 3600 : 60);
|
|
5308
5337
|
}
|
|
5309
5338
|
function validatePlaySandboxRuntimeLimits(value) {
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
`Unsupported runtime sandbox resources: ${key}=${value[key]}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: "standard" (${base.cpu} CPU, ${base.memoryGiB}GiB memory, ${base.diskGiB}GiB disk).`
|
|
5315
|
-
);
|
|
5316
|
-
}
|
|
5339
|
+
if (!playSandboxSizeForLimits(value)) {
|
|
5340
|
+
throw new Error(
|
|
5341
|
+
`Unsupported runtime sandbox resources: cpu=${value.cpu} memoryGiB=${value.memoryGiB} diskGiB=${value.diskGiB}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${supportedPlaySandboxSizes}.`
|
|
5342
|
+
);
|
|
5317
5343
|
}
|
|
5318
5344
|
if (!Number.isSafeInteger(value.timeoutSeconds) || value.timeoutSeconds <= 0) {
|
|
5319
5345
|
throw new Error(
|
|
@@ -5335,12 +5361,12 @@ function resolvePlaySandboxRuntimeLimits(declaration) {
|
|
|
5335
5361
|
);
|
|
5336
5362
|
if (unsupportedProperties.length > 0) {
|
|
5337
5363
|
throw new Error(
|
|
5338
|
-
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"}: ${unsupportedProperties.join(", ")}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes:
|
|
5364
|
+
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"}: ${unsupportedProperties.join(", ")}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${supportedPlaySandboxSizes}.`
|
|
5339
5365
|
);
|
|
5340
5366
|
}
|
|
5341
|
-
if (declaration.size !== void 0 && declaration.size
|
|
5367
|
+
if (declaration.size !== void 0 && !Object.hasOwn(PLAY_SANDBOX_SIZE_LIMITS, declaration.size)) {
|
|
5342
5368
|
throw new Error(
|
|
5343
|
-
`Unsupported runtime sandbox size "${String(declaration.size)}". Supported sizes:
|
|
5369
|
+
`Unsupported runtime sandbox size "${String(declaration.size)}". Supported sizes: ${supportedPlaySandboxSizes}.`
|
|
5344
5370
|
);
|
|
5345
5371
|
}
|
|
5346
5372
|
const timeoutSeconds = declaration.timeout ? parseTimeout(declaration.timeout) : base.timeoutSeconds;
|
|
@@ -5368,9 +5394,21 @@ var MODAL_SANDBOX_COMPUTE_PRICING_USD = {
|
|
|
5368
5394
|
memoryGiBSecond: 667e-8
|
|
5369
5395
|
};
|
|
5370
5396
|
var MODAL_SANDBOX_CPU_CORES = 0.5;
|
|
5397
|
+
function modalSandboxResourcesForPlay(input) {
|
|
5398
|
+
return {
|
|
5399
|
+
physicalCpuCores: MODAL_SANDBOX_CPU_CORES * input.cpu,
|
|
5400
|
+
memoryMiB: input.memoryGiB * 1024
|
|
5401
|
+
};
|
|
5402
|
+
}
|
|
5371
5403
|
function roundUsd(amount) {
|
|
5372
5404
|
return Number(Math.max(0, amount).toFixed(12));
|
|
5373
5405
|
}
|
|
5406
|
+
function sandboxSizeMetadata(cpu, memoryGiB) {
|
|
5407
|
+
const entry = Object.entries(PLAY_SANDBOX_SIZE_LIMITS).find(
|
|
5408
|
+
([, limits]) => limits.cpu === cpu && limits.memoryGiB === memoryGiB
|
|
5409
|
+
);
|
|
5410
|
+
return entry ? { sandboxSize: entry[0] } : {};
|
|
5411
|
+
}
|
|
5374
5412
|
function resolveDaytonaSandboxComputeItem(input) {
|
|
5375
5413
|
const billableSeconds = Math.max(1, Math.ceil(input.wallTimeSeconds));
|
|
5376
5414
|
const cpu = Math.max(0, input.cpu);
|
|
@@ -5389,6 +5427,7 @@ function resolveDaytonaSandboxComputeItem(input) {
|
|
|
5389
5427
|
units: billableSeconds,
|
|
5390
5428
|
providerCostUsd,
|
|
5391
5429
|
metadata: {
|
|
5430
|
+
...sandboxSizeMetadata(cpu, memoryGiB),
|
|
5392
5431
|
sandboxId: _nullishCoalesce(input.sandboxId, () => ( null)),
|
|
5393
5432
|
cpu,
|
|
5394
5433
|
memoryGiB,
|
|
@@ -5413,9 +5452,20 @@ function resolveModalSandboxComputeItem(input) {
|
|
|
5413
5452
|
units: billableSeconds,
|
|
5414
5453
|
providerCostUsd,
|
|
5415
5454
|
metadata: {
|
|
5455
|
+
...sandboxSizeMetadata(
|
|
5456
|
+
physicalCpuCores / MODAL_SANDBOX_CPU_CORES,
|
|
5457
|
+
memoryGiB
|
|
5458
|
+
),
|
|
5416
5459
|
sandboxId: _nullishCoalesce(input.sandboxId, () => ( null)),
|
|
5417
5460
|
physicalCpuCores,
|
|
5418
5461
|
memoryGiB,
|
|
5462
|
+
...input.memoryLimitGiB === void 0 ? {} : {
|
|
5463
|
+
memoryLimitGiB: input.memoryLimitGiB,
|
|
5464
|
+
// The Preview evaluation preserves the existing compute price.
|
|
5465
|
+
// Sampled burst cost is diagnostic until provider billing can be
|
|
5466
|
+
// reconciled; a hard ceiling is never presented as actual usage.
|
|
5467
|
+
costBasis: "reserved_resources"
|
|
5468
|
+
},
|
|
5419
5469
|
startedAt: input.startedAt,
|
|
5420
5470
|
endedAt: input.endedAt
|
|
5421
5471
|
}
|
|
@@ -5437,17 +5487,24 @@ var DEFAULT_USD_PER_CUSTOMER_CREDIT = 0.1;
|
|
|
5437
5487
|
var DEFAULT_PROVIDER_MARKUP_MULTIPLIER = 1.4;
|
|
5438
5488
|
var MAX_SANDBOX_COMPUTE_BILLING_SECONDS = 60 * 60;
|
|
5439
5489
|
var MAX_SANDBOX_COMPUTE_PROVIDER_COST_USD = Math.max(
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5490
|
+
...Object.values(PLAY_SANDBOX_SIZE_LIMITS).flatMap((profile) => {
|
|
5491
|
+
const modalResources = modalSandboxResourcesForPlay(profile);
|
|
5492
|
+
return [
|
|
5493
|
+
resolveDaytonaSandboxComputeItem({
|
|
5494
|
+
itemId: "billing-cap",
|
|
5495
|
+
wallTimeSeconds: MAX_SANDBOX_COMPUTE_BILLING_SECONDS,
|
|
5496
|
+
cpu: profile.cpu,
|
|
5497
|
+
memoryGiB: profile.memoryGiB,
|
|
5498
|
+
diskGiB: profile.diskGiB
|
|
5499
|
+
}).providerCostUsd,
|
|
5500
|
+
resolveModalSandboxComputeItem({
|
|
5501
|
+
itemId: "billing-cap",
|
|
5502
|
+
wallTimeSeconds: MAX_SANDBOX_COMPUTE_BILLING_SECONDS,
|
|
5503
|
+
physicalCpuCores: modalResources.physicalCpuCores,
|
|
5504
|
+
memoryGiB: profile.memoryGiB
|
|
5505
|
+
}).providerCostUsd
|
|
5506
|
+
];
|
|
5507
|
+
})
|
|
5451
5508
|
);
|
|
5452
5509
|
function roundUpCredits(value) {
|
|
5453
5510
|
if (!Number.isFinite(value) || value <= 0) return 0;
|
|
@@ -5471,29 +5528,33 @@ function estimateDaytonaMaximumComputeCredits(limits) {
|
|
|
5471
5528
|
item.providerCostUsd * COMPUTE_BILLING_MARKUP_MULTIPLIER * DEFAULT_PROVIDER_MARKUP_MULTIPLIER / DEFAULT_USD_PER_CUSTOMER_CREDIT
|
|
5472
5529
|
);
|
|
5473
5530
|
}
|
|
5474
|
-
function estimateModalMaximumComputeCredits(limits) {
|
|
5531
|
+
function estimateModalMaximumComputeCredits(limits, elasticMemory = false) {
|
|
5532
|
+
const resources = modalSandboxResourcesForPlay(limits);
|
|
5475
5533
|
const item = resolveModalSandboxComputeItem({
|
|
5476
5534
|
itemId: "estimate",
|
|
5477
5535
|
wallTimeSeconds: maximumPlaySandboxBillingSeconds(limits),
|
|
5478
|
-
physicalCpuCores:
|
|
5479
|
-
memoryGiB: limits.memoryGiB
|
|
5536
|
+
physicalCpuCores: resources.physicalCpuCores,
|
|
5537
|
+
memoryGiB: elasticMemory ? modalSandboxMemoryLimitGiBForPlay(limits) : limits.memoryGiB
|
|
5480
5538
|
});
|
|
5481
5539
|
return roundUpCredits(
|
|
5482
5540
|
item.providerCostUsd * COMPUTE_BILLING_MARKUP_MULTIPLIER * DEFAULT_PROVIDER_MARKUP_MULTIPLIER / DEFAULT_USD_PER_CUSTOMER_CREDIT
|
|
5483
5541
|
);
|
|
5484
5542
|
}
|
|
5485
|
-
function estimateMaximumSandboxComputeCredits(limits) {
|
|
5543
|
+
function estimateMaximumSandboxComputeCredits(limits, elasticMemory = false) {
|
|
5486
5544
|
return Math.max(
|
|
5487
5545
|
estimateDaytonaMaximumComputeCredits(limits),
|
|
5488
|
-
estimateModalMaximumComputeCredits(limits)
|
|
5546
|
+
estimateModalMaximumComputeCredits(limits, elasticMemory)
|
|
5489
5547
|
);
|
|
5490
5548
|
}
|
|
5491
5549
|
function formatNonStandardSandboxRuntimeWarning(limits) {
|
|
5492
|
-
|
|
5550
|
+
const size = playSandboxSizeForLimits(limits);
|
|
5551
|
+
if (!size) return null;
|
|
5552
|
+
if (size === "standard" && limits.timeoutSeconds <= STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds) {
|
|
5493
5553
|
return null;
|
|
5494
5554
|
}
|
|
5495
5555
|
const maximumComputeCredits = estimateMaximumSandboxComputeCredits(limits);
|
|
5496
|
-
|
|
5556
|
+
const quotedTimeout = `${Math.ceil(limits.timeoutSeconds / 60)}m`;
|
|
5557
|
+
return `This Play requests the ${size} sandbox for up to ${limits.timeoutSeconds}s (${limits.memoryGiB}GiB memory, ${limits.cpu} CPU, ${limits.diskGiB}GiB disk). Resource-based pricing estimate: ${maximumComputeCredits.toFixed(2)} Deepline credits. Workspace plan pricing can differ. Run deepline billing quote --sandbox-timeout ${quotedTimeout} --sandbox-size ${size} for your workspace's session ceiling.`;
|
|
5497
5558
|
}
|
|
5498
5559
|
|
|
5499
5560
|
// ../play-runtime/internal-step-ids.ts
|
|
@@ -5800,7 +5861,7 @@ async function discoverDeploymentFiles(input) {
|
|
|
5800
5861
|
}
|
|
5801
5862
|
}
|
|
5802
5863
|
const rootStat = await _promises.stat.call(void 0, input.projectRoot).catch(() => null);
|
|
5803
|
-
if (!_optionalChain([rootStat, 'optionalAccess',
|
|
5864
|
+
if (!_optionalChain([rootStat, 'optionalAccess', _173 => _173.isDirectory, 'call', _174 => _174()])) {
|
|
5804
5865
|
throw new DeeplineManifestError(
|
|
5805
5866
|
`Project root directory does not exist in the repo: ${input.projectRoot}`
|
|
5806
5867
|
);
|
|
@@ -5902,33 +5963,33 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
5902
5963
|
if (parsed.kind !== "org") {
|
|
5903
5964
|
return null;
|
|
5904
5965
|
}
|
|
5905
|
-
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess',
|
|
5966
|
+
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess', _175 => _175.trim, 'call', _176 => _176(), 'access', _177 => _177.toLowerCase, 'call', _178 => _178()]), () => ( ""));
|
|
5906
5967
|
return normalizedOwnerSlug && parsed.ownerSlug.trim().toLowerCase() === normalizedOwnerSlug ? parsed.name : null;
|
|
5907
5968
|
}
|
|
5908
5969
|
|
|
5909
5970
|
// ../plays/deploy/run-deployment.ts
|
|
5910
5971
|
var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
|
|
5911
5972
|
function isRunPlayReceiver(node) {
|
|
5912
|
-
return
|
|
5973
|
+
return _chunkDKR7QPEOjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
|
|
5913
5974
|
}
|
|
5914
5975
|
function stringLiteralValue(node) {
|
|
5915
|
-
if (!
|
|
5976
|
+
if (!_chunkDKR7QPEOjs.isAstNode.call(void 0, node)) return null;
|
|
5916
5977
|
if (node.type === "Literal" && typeof node.value === "string") {
|
|
5917
5978
|
return node.value;
|
|
5918
5979
|
}
|
|
5919
5980
|
if (node.type === "TemplateLiteral" && Array.isArray(node.expressions) && node.expressions.length === 0 && Array.isArray(node.quasis) && node.quasis.length === 1) {
|
|
5920
|
-
const cooked = _optionalChain([node, 'access',
|
|
5981
|
+
const cooked = _optionalChain([node, 'access', _179 => _179.quasis, 'access', _180 => _180[0], 'access', _181 => _181.value, 'optionalAccess', _182 => _182.cooked]);
|
|
5921
5982
|
return typeof cooked === "string" ? cooked : null;
|
|
5922
5983
|
}
|
|
5923
5984
|
return null;
|
|
5924
5985
|
}
|
|
5925
5986
|
async function extractRunPlayStringTargets(sourceCode) {
|
|
5926
|
-
const program =
|
|
5987
|
+
const program = _chunkDKR7QPEOjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
|
|
5927
5988
|
if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
|
|
5928
5989
|
const targets = /* @__PURE__ */ new Set();
|
|
5929
5990
|
const visit = (node) => {
|
|
5930
5991
|
const callee = node.callee;
|
|
5931
|
-
if (node.type === "CallExpression" &&
|
|
5992
|
+
if (node.type === "CallExpression" && _chunkDKR7QPEOjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkDKR7QPEOjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
|
|
5932
5993
|
const playRef = stringLiteralValue(node.arguments[1]);
|
|
5933
5994
|
const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
|
|
5934
5995
|
if (ownedName) targets.add(ownedName);
|
|
@@ -5936,7 +5997,7 @@ async function extractRunPlayStringTargets(sourceCode) {
|
|
|
5936
5997
|
for (const [key, value] of Object.entries(node)) {
|
|
5937
5998
|
if (key === "loc") continue;
|
|
5938
5999
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
5939
|
-
if (
|
|
6000
|
+
if (_chunkDKR7QPEOjs.isAstNode.call(void 0, child)) visit(child);
|
|
5940
6001
|
}
|
|
5941
6002
|
}
|
|
5942
6003
|
};
|
|
@@ -6041,7 +6102,7 @@ async function runDeployment(params, hooks) {
|
|
|
6041
6102
|
`Deployment ${params.deploymentId} has no linked repository and no target directory was given.`
|
|
6042
6103
|
);
|
|
6043
6104
|
}
|
|
6044
|
-
const checkRunName = _optionalChain([state, 'access',
|
|
6105
|
+
const checkRunName = _optionalChain([state, 'access', _183 => _183.checkRunName, 'optionalAccess', _184 => _184.trim, 'call', _185 => _185()]) || void 0;
|
|
6045
6106
|
let mergedPullRequestNumber = null;
|
|
6046
6107
|
let promoted = false;
|
|
6047
6108
|
const setStatus = (input) => client.setStatus({
|
|
@@ -6112,7 +6173,7 @@ async function runDeployment(params, hooks) {
|
|
|
6112
6173
|
finalStatus,
|
|
6113
6174
|
outcomes,
|
|
6114
6175
|
...monitorRunResult(),
|
|
6115
|
-
checkRunId: _optionalChain([checkRun, 'optionalAccess',
|
|
6176
|
+
checkRunId: _optionalChain([checkRun, 'optionalAccess', _186 => _186.checkRunId])
|
|
6116
6177
|
};
|
|
6117
6178
|
};
|
|
6118
6179
|
await _promises.mkdir.call(void 0, hooks.workRoot, { recursive: true });
|
|
@@ -6138,7 +6199,7 @@ async function runDeployment(params, hooks) {
|
|
|
6138
6199
|
const source = await hooks.openSource({ client, deployment });
|
|
6139
6200
|
if (deployment.isProduction) {
|
|
6140
6201
|
try {
|
|
6141
|
-
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access',
|
|
6202
|
+
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access', _187 => _187.findMergedPullRequest, 'optionalCall', _188 => _188()]), async () => ( null));
|
|
6142
6203
|
} catch (error) {
|
|
6143
6204
|
console.warn("[deploy-worker] merged PR lookup failed", {
|
|
6144
6205
|
deploymentId: params.deploymentId,
|
|
@@ -6208,15 +6269,15 @@ async function runDeployment(params, hooks) {
|
|
|
6208
6269
|
return finishFailed({
|
|
6209
6270
|
error: input.error,
|
|
6210
6271
|
outcomes: input.outcomes,
|
|
6211
|
-
checkRunId: _optionalChain([checkRun2, 'optionalAccess',
|
|
6272
|
+
checkRunId: _optionalChain([checkRun2, 'optionalAccess', _189 => _189.checkRunId])
|
|
6212
6273
|
});
|
|
6213
6274
|
};
|
|
6214
6275
|
postFailureCheck = async (summary) => await _asyncOptionalChain([(await postCheckOrNull({
|
|
6215
6276
|
conclusion: "failure",
|
|
6216
6277
|
title: "Deploy failed",
|
|
6217
6278
|
summary
|
|
6218
|
-
})), 'optionalAccess', async
|
|
6219
|
-
const deploymentBranch = _optionalChain([deployment, 'access',
|
|
6279
|
+
})), 'optionalAccess', async _190 => _190.checkRunId]);
|
|
6280
|
+
const deploymentBranch = _optionalChain([deployment, 'access', _191 => _191.ref, 'optionalAccess', _192 => _192.startsWith, 'call', _193 => _193("refs/heads/")]) ? deployment.ref.slice("refs/heads/".length) : _nullishCoalesce(_optionalChain([project, 'optionalAccess', _194 => _194.productionBranch]), () => ( null));
|
|
6220
6281
|
const supersedeIfHeadMoved = async () => {
|
|
6221
6282
|
if (!deployment.isProduction || !source.branchHead || !deploymentBranch) {
|
|
6222
6283
|
return null;
|
|
@@ -6230,7 +6291,7 @@ async function runDeployment(params, hooks) {
|
|
|
6230
6291
|
});
|
|
6231
6292
|
await setStatus({
|
|
6232
6293
|
status: "superseded",
|
|
6233
|
-
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess',
|
|
6294
|
+
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess', _195 => _195.slice, 'call', _196 => _196(0, 12)]), () => ( "<deleted>"))}; this deployment's commit is no longer the head.`,
|
|
6234
6295
|
buildSeconds: buildSeconds(),
|
|
6235
6296
|
...monitorOutcomes.length > 0 ? { results: monitorResults() } : {},
|
|
6236
6297
|
...head ? { observedHeadSha: head } : {}
|
|
@@ -6346,7 +6407,7 @@ async function runDeployment(params, hooks) {
|
|
|
6346
6407
|
failPlay(file, repoRelativeFile, message);
|
|
6347
6408
|
continue;
|
|
6348
6409
|
}
|
|
6349
|
-
const name = _nullishCoalesce(_optionalChain([result, 'access',
|
|
6410
|
+
const name = _nullishCoalesce(_optionalChain([result, 'access', _197 => _197.playName, 'optionalAccess', _198 => _198.trim, 'call', _199 => _199()]), () => ( ""));
|
|
6350
6411
|
if (!name) {
|
|
6351
6412
|
failPlay(
|
|
6352
6413
|
file,
|
|
@@ -6365,7 +6426,7 @@ async function runDeployment(params, hooks) {
|
|
|
6365
6426
|
continue;
|
|
6366
6427
|
}
|
|
6367
6428
|
seenNames.set(name, file);
|
|
6368
|
-
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access',
|
|
6429
|
+
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access', _200 => _200.artifact, 'access', _201 => _201.importPolicy, 'optionalAccess', _202 => _202.packages]), () => ( []))).map(
|
|
6369
6430
|
(pkg) => typeof pkg === "string" ? pkg : _nullishCoalesce(pkg.name, () => ( ""))
|
|
6370
6431
|
).filter((pkgName) => pkgName && pkgName !== "deepline");
|
|
6371
6432
|
if (disallowed.length > 0) {
|
|
@@ -6449,7 +6510,7 @@ async function runDeployment(params, hooks) {
|
|
|
6449
6510
|
const conflicts = [];
|
|
6450
6511
|
for (const play of ordered) {
|
|
6451
6512
|
const owner = stateByName.get(play.name);
|
|
6452
|
-
if (!project || !_optionalChain([owner, 'optionalAccess',
|
|
6513
|
+
if (!project || !_optionalChain([owner, 'optionalAccess', _203 => _203.playProjectRepo]) || owner.playProjectRepo === _optionalChain([project, 'optionalAccess', _204 => _204.repoFullName]) || owner.playProjectDisabled) {
|
|
6453
6514
|
continue;
|
|
6454
6515
|
}
|
|
6455
6516
|
const message = `The play name "${play.name}" is already deployed from ${owner.playProjectRepo}. A play name belongs to one repository at a time. Rename it here, or disable that deployment target first.`;
|
|
@@ -6472,16 +6533,16 @@ async function runDeployment(params, hooks) {
|
|
|
6472
6533
|
}
|
|
6473
6534
|
const playByName = new Map(ordered.map((play) => [play.name, play]));
|
|
6474
6535
|
const sdkUpdated = (name) => {
|
|
6475
|
-
const artifact = _optionalChain([playByName, 'access',
|
|
6476
|
-
const live = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
6536
|
+
const artifact = _optionalChain([playByName, 'access', _205 => _205.get, 'call', _206 => _206(name), 'optionalAccess', _207 => _207.result, 'access', _208 => _208.artifact]);
|
|
6537
|
+
const live = _nullishCoalesce(_optionalChain([stateByName, 'access', _209 => _209.get, 'call', _210 => _210(name), 'optionalAccess', _211 => _211.liveRevision]), () => ( null));
|
|
6477
6538
|
return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
|
|
6478
6539
|
};
|
|
6479
6540
|
const outcomes = [];
|
|
6480
6541
|
const toRegister = [];
|
|
6481
6542
|
const toPromote = [];
|
|
6482
6543
|
const takeoverWarning = (state2) => {
|
|
6483
|
-
const owner = _optionalChain([state2, 'optionalAccess',
|
|
6484
|
-
if (!owner || owner === _optionalChain([project, 'optionalAccess',
|
|
6544
|
+
const owner = _optionalChain([state2, 'optionalAccess', _212 => _212.playProjectRepo]);
|
|
6545
|
+
if (!owner || owner === _optionalChain([project, 'optionalAccess', _213 => _213.repoFullName])) return void 0;
|
|
6485
6546
|
if (!project) {
|
|
6486
6547
|
return `This play is deployed from ${owner}. This directory deploy made a different revision live, so it is marked drifted from ${owner} until that repository deploys again. If you are done with ${owner}, unlink it (deepline git unlink <id>) and this play is released from it.`;
|
|
6487
6548
|
}
|
|
@@ -6493,8 +6554,8 @@ async function runDeployment(params, hooks) {
|
|
|
6493
6554
|
const artifact = play.result.artifact;
|
|
6494
6555
|
const importsOtherPlays = (_nullishCoalesce(play.result.importedPlayDependencies, () => ( []))).length > 0;
|
|
6495
6556
|
const matches = (revision) => !importsOtherPlays && carriesArtifact(revision, artifact);
|
|
6496
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6497
|
-
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess',
|
|
6557
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _214 => _214.liveRevision]), () => ( null)))) {
|
|
6558
|
+
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess', _215 => _215.playProjectId]) !== project.id || _optionalChain([playState, 'optionalAccess', _216 => _216.driftFromGit]))) {
|
|
6498
6559
|
toPromote.push({
|
|
6499
6560
|
name: play.name,
|
|
6500
6561
|
revisionId: playState.liveRevision.revisionId
|
|
@@ -6505,12 +6566,12 @@ async function runDeployment(params, hooks) {
|
|
|
6505
6566
|
name: play.name,
|
|
6506
6567
|
file: play.file,
|
|
6507
6568
|
status: "unchanged",
|
|
6508
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6569
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _217 => _217.liveRevision, 'optionalAccess', _218 => _218.version]), () => ( void 0)),
|
|
6509
6570
|
...warning ? { warning } : {}
|
|
6510
6571
|
});
|
|
6511
6572
|
continue;
|
|
6512
6573
|
}
|
|
6513
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6574
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _219 => _219.workingRevision]), () => ( null)))) {
|
|
6514
6575
|
if (deployment.isProduction) {
|
|
6515
6576
|
toPromote.push({
|
|
6516
6577
|
name: play.name,
|
|
@@ -6521,7 +6582,7 @@ async function runDeployment(params, hooks) {
|
|
|
6521
6582
|
name: play.name,
|
|
6522
6583
|
file: play.file,
|
|
6523
6584
|
status: "registered",
|
|
6524
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6585
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _220 => _220.workingRevision, 'optionalAccess', _221 => _221.version]), () => ( void 0)),
|
|
6525
6586
|
...sdkUpdated(play.name),
|
|
6526
6587
|
...warning ? { warning } : {}
|
|
6527
6588
|
});
|
|
@@ -6648,11 +6709,11 @@ async function runDeployment(params, hooks) {
|
|
|
6648
6709
|
const promotion = await client.promote(toPromote);
|
|
6649
6710
|
promoted = true;
|
|
6650
6711
|
for (const outcome of promotion.outcomes) {
|
|
6651
|
-
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
6712
|
+
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access', _222 => _222.get, 'call', _223 => _223(outcome.name), 'optionalAccess', _224 => _224.liveRevision, 'optionalAccess', _225 => _225.version]), () => ( null));
|
|
6652
6713
|
const warning = takeoverWarning(stateByName.get(outcome.name));
|
|
6653
6714
|
outcomes.push({
|
|
6654
6715
|
name: outcome.name,
|
|
6655
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
6716
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _226 => _226.get, 'call', _227 => _227(outcome.name), 'optionalAccess', _228 => _228.file]), () => ( outcome.name)),
|
|
6656
6717
|
status: outcome.status === "promoted" ? "promoted" : "failed",
|
|
6657
6718
|
version: outcome.version,
|
|
6658
6719
|
...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
|
|
@@ -6664,7 +6725,7 @@ async function runDeployment(params, hooks) {
|
|
|
6664
6725
|
} catch (error) {
|
|
6665
6726
|
if (revokedFinalStatus(error)) throw error;
|
|
6666
6727
|
const body = error instanceof DeployApiError ? error.body : null;
|
|
6667
|
-
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
6728
|
+
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess', _229 => _229.error]), () => ( (error instanceof Error ? error.message : String(error))));
|
|
6668
6729
|
if (/PLAY_DEPLOYMENT_NOT_ACTIVE/.test(errorText)) {
|
|
6669
6730
|
console.info("[deploy-worker] cancelled at promote", {
|
|
6670
6731
|
deploymentId: params.deploymentId
|
|
@@ -6688,9 +6749,9 @@ async function runDeployment(params, hooks) {
|
|
|
6688
6749
|
error: errorText,
|
|
6689
6750
|
outcomes: [
|
|
6690
6751
|
...outcomes,
|
|
6691
|
-
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
6752
|
+
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _230 => _230.outcomes]), () => ( toPromote))).map((entry) => ({
|
|
6692
6753
|
name: entry.name,
|
|
6693
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
6754
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _231 => _231.get, 'call', _232 => _232(entry.name), 'optionalAccess', _233 => _233.file]), () => ( entry.name)),
|
|
6694
6755
|
status: "failed",
|
|
6695
6756
|
error: _nullishCoalesce(("error" in entry ? entry.error : void 0), () => ( errorText))
|
|
6696
6757
|
}))
|
|
@@ -6734,7 +6795,7 @@ async function runDeployment(params, hooks) {
|
|
|
6734
6795
|
});
|
|
6735
6796
|
let checkRunId;
|
|
6736
6797
|
try {
|
|
6737
|
-
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall',
|
|
6798
|
+
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _234 => _234(message.slice(0, 2e3))]);
|
|
6738
6799
|
} catch (checkError) {
|
|
6739
6800
|
const revokedAtCheck = revokedFinalStatus(checkError);
|
|
6740
6801
|
if (revokedAtCheck) {
|
|
@@ -6802,7 +6863,7 @@ function renderOutcome(outcome) {
|
|
|
6802
6863
|
function printResult2(input) {
|
|
6803
6864
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6804
6865
|
if (failed) process.exitCode = 1;
|
|
6805
|
-
|
|
6866
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
6806
6867
|
{
|
|
6807
6868
|
deployment: { ...input.deployment, status: input.status },
|
|
6808
6869
|
plays: input.outcomes,
|
|
@@ -6827,7 +6888,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6827
6888
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6828
6889
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6829
6890
|
});
|
|
6830
|
-
const { http, config } =
|
|
6891
|
+
const { http, config } = _chunkSTLJYWUCjs.getAuthedHttpClient.call(void 0, );
|
|
6831
6892
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6832
6893
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6833
6894
|
deliveryId,
|
|
@@ -6854,14 +6915,14 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6854
6915
|
},
|
|
6855
6916
|
{
|
|
6856
6917
|
bundle: bundleDeployPlayFile,
|
|
6857
|
-
fetchImpl:
|
|
6918
|
+
fetchImpl: _chunkORQYKA4Ijs.fetchWithDeploymentProtection,
|
|
6858
6919
|
// The plays are already here: "opening" the source is naming it.
|
|
6859
6920
|
openSource: async () => ({
|
|
6860
6921
|
open: async () => ({ repoRoot: root })
|
|
6861
6922
|
}),
|
|
6862
6923
|
target: {
|
|
6863
6924
|
rootDirectory: "",
|
|
6864
|
-
manifestPath: _nullishCoalesce(_optionalChain([options, 'access',
|
|
6925
|
+
manifestPath: _nullishCoalesce(_optionalChain([options, 'access', _235 => _235.manifest, 'optionalAccess', _236 => _236.trim, 'call', _237 => _237()]), () => ( ""))
|
|
6865
6926
|
},
|
|
6866
6927
|
workRoot
|
|
6867
6928
|
}
|
|
@@ -6945,7 +7006,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
6945
7006
|
sourceCode: node.sourceCode,
|
|
6946
7007
|
sourceFiles: node.sourceFiles,
|
|
6947
7008
|
description: _nullishCoalesce(node.playDescription, () => ( void 0)),
|
|
6948
|
-
artifact: _nullishCoalesce(_optionalChain([input, 'access',
|
|
7009
|
+
artifact: _nullishCoalesce(_optionalChain([input, 'access', _238 => _238.prepareArtifact, 'optionalCall', _239 => _239(node.artifact)]), () => ( node.artifact)),
|
|
6949
7010
|
...exportName === "default" ? {} : { exportName },
|
|
6950
7011
|
...importedPlays.length ? { importedPlays } : {},
|
|
6951
7012
|
...input.integrationMode ? { integrationMode: input.integrationMode } : {}
|
|
@@ -6980,7 +7041,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
6980
7041
|
// src/cli/renderers/local-play-execution.ts
|
|
6981
7042
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
6982
7043
|
if (options.dryRun) {
|
|
6983
|
-
|
|
7044
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
6984
7045
|
return;
|
|
6985
7046
|
}
|
|
6986
7047
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -7072,7 +7133,7 @@ async function preflightRunIdFile(path) {
|
|
|
7072
7133
|
`Cannot write --run-id-file destination ${destination}: ${error instanceof Error ? error.message : String(error)}`
|
|
7073
7134
|
);
|
|
7074
7135
|
} finally {
|
|
7075
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
7136
|
+
await _optionalChain([handle, 'optionalAccess', _240 => _240.close, 'call', _241 => _241()]);
|
|
7076
7137
|
await removeRunIdTempFile(tempPath);
|
|
7077
7138
|
}
|
|
7078
7139
|
return destination;
|
|
@@ -7126,9 +7187,9 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
7126
7187
|
} catch (error) {
|
|
7127
7188
|
if (error.code !== "EEXIST") throw error;
|
|
7128
7189
|
const raced = await readRunIdFile(destination);
|
|
7129
|
-
if (_optionalChain([raced, 'optionalAccess',
|
|
7190
|
+
if (_optionalChain([raced, 'optionalAccess', _242 => _242.runId]) !== runId) {
|
|
7130
7191
|
throw new Error(
|
|
7131
|
-
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess',
|
|
7192
|
+
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess', _243 => _243.runId]), () => ( "<invalid>"))}; refusing to replace it with ${runId}: ${destination}`
|
|
7132
7193
|
);
|
|
7133
7194
|
}
|
|
7134
7195
|
if (!options.launchConfirmed || raced.launchConfirmed) return;
|
|
@@ -7144,7 +7205,7 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
7144
7205
|
}
|
|
7145
7206
|
}
|
|
7146
7207
|
} finally {
|
|
7147
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
7208
|
+
await _optionalChain([handle, 'optionalAccess', _244 => _244.close, 'call', _245 => _245()]);
|
|
7148
7209
|
await removeRunIdTempFile(tempPath);
|
|
7149
7210
|
}
|
|
7150
7211
|
}
|
|
@@ -7152,7 +7213,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7152
7213
|
const startedAt = Date.now();
|
|
7153
7214
|
try {
|
|
7154
7215
|
const result = run();
|
|
7155
|
-
|
|
7216
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
7156
7217
|
phase,
|
|
7157
7218
|
ms: Date.now() - startedAt,
|
|
7158
7219
|
ok: true,
|
|
@@ -7160,7 +7221,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7160
7221
|
});
|
|
7161
7222
|
return result;
|
|
7162
7223
|
} catch (error) {
|
|
7163
|
-
|
|
7224
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
7164
7225
|
phase,
|
|
7165
7226
|
ms: Date.now() - startedAt,
|
|
7166
7227
|
ok: false,
|
|
@@ -7213,10 +7274,10 @@ function playReferenceMatchTokens(value) {
|
|
|
7213
7274
|
return normalizePlayReferenceForMatch(value).split("-").filter((token) => token.length > 1 && token !== "to" && token !== "and");
|
|
7214
7275
|
}
|
|
7215
7276
|
function playSuggestionReference(play) {
|
|
7216
|
-
if (_optionalChain([play, 'access',
|
|
7277
|
+
if (_optionalChain([play, 'access', _246 => _246.reference, 'optionalAccess', _247 => _247.trim, 'call', _248 => _248()])) {
|
|
7217
7278
|
return play.reference.trim();
|
|
7218
7279
|
}
|
|
7219
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
7280
|
+
const ownerSlug = _optionalChain([play, 'access', _249 => _249.ownerSlug, 'optionalAccess', _250 => _250.trim, 'call', _251 => _251()]);
|
|
7220
7281
|
return ownerSlug ? `${ownerSlug}/${play.name}` : play.name;
|
|
7221
7282
|
}
|
|
7222
7283
|
function scorePlayReferenceSuggestion(requested, play) {
|
|
@@ -7232,8 +7293,8 @@ function scorePlayReferenceSuggestion(requested, play) {
|
|
|
7232
7293
|
const reference = playSuggestionReference(play);
|
|
7233
7294
|
const referenceNorm = normalizePlayReferenceForMatch(reference);
|
|
7234
7295
|
const nameNorm = normalizePlayReferenceForMatch(play.name);
|
|
7235
|
-
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access',
|
|
7236
|
-
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access',
|
|
7296
|
+
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access', _252 => _252.split, 'call', _253 => _253("/"), 'access', _254 => _254[0], 'optionalAccess', _255 => _255.toLowerCase, 'call', _256 => _256()]) : null;
|
|
7297
|
+
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access', _257 => _257.ownerSlug, 'optionalAccess', _258 => _258.toLowerCase, 'call', _259 => _259()]), () => ( null));
|
|
7237
7298
|
const aliases = (_nullishCoalesce(play.aliases, () => ( []))).map(normalizePlayReferenceForMatch);
|
|
7238
7299
|
const searchable = [referenceNorm, nameNorm, ...aliases].filter(Boolean);
|
|
7239
7300
|
const requestedTokens = playReferenceMatchTokens(requestedName);
|
|
@@ -7350,16 +7411,16 @@ async function buildPlayReferenceNotFoundError(input) {
|
|
|
7350
7411
|
suggestions = [];
|
|
7351
7412
|
}
|
|
7352
7413
|
const sourceError = input.sourceError instanceof _chunkDIAWYWT5js.DeeplineError ? input.sourceError : null;
|
|
7353
|
-
const code = _optionalChain([sourceError, 'optionalAccess',
|
|
7414
|
+
const code = _optionalChain([sourceError, 'optionalAccess', _260 => _260.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
|
|
7354
7415
|
return new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
7355
7416
|
buildPlayReferenceNotFoundMessage({
|
|
7356
7417
|
requested: input.target,
|
|
7357
7418
|
command: input.command,
|
|
7358
7419
|
suggestions
|
|
7359
7420
|
}),
|
|
7360
|
-
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess',
|
|
7421
|
+
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _261 => _261.statusCode]), () => ( 404)),
|
|
7361
7422
|
code,
|
|
7362
|
-
_optionalChain([sourceError, 'optionalAccess',
|
|
7423
|
+
_optionalChain([sourceError, 'optionalAccess', _262 => _262.details])
|
|
7363
7424
|
);
|
|
7364
7425
|
}
|
|
7365
7426
|
async function isMissingRunPlayReferenceError(input) {
|
|
@@ -7411,7 +7472,7 @@ function formatPlayReference(play) {
|
|
|
7411
7472
|
if (play.reference) {
|
|
7412
7473
|
return play.reference;
|
|
7413
7474
|
}
|
|
7414
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
7475
|
+
const ownerSlug = _optionalChain([play, 'access', _263 => _263.ownerSlug, 'optionalAccess', _264 => _264.trim, 'call', _265 => _265()]) || "org";
|
|
7415
7476
|
return `${ownerSlug}/${play.name}`;
|
|
7416
7477
|
}
|
|
7417
7478
|
function formatPlayListReference(play) {
|
|
@@ -7441,7 +7502,7 @@ function materializeRemotePlaySource(input) {
|
|
|
7441
7502
|
return null;
|
|
7442
7503
|
}
|
|
7443
7504
|
const entrySource = input.source.files[input.source.entryFile];
|
|
7444
|
-
if (!_optionalChain([entrySource, 'optionalAccess',
|
|
7505
|
+
if (!_optionalChain([entrySource, 'optionalAccess', _266 => _266.trim, 'call', _267 => _267()])) {
|
|
7445
7506
|
return null;
|
|
7446
7507
|
}
|
|
7447
7508
|
const files = Object.entries(input.source.files);
|
|
@@ -7520,8 +7581,8 @@ async function ensureEditableRemotePlay(client, target) {
|
|
|
7520
7581
|
return detail;
|
|
7521
7582
|
}
|
|
7522
7583
|
function writeInlinePlay(code) {
|
|
7523
|
-
const filePath = _path.resolve.call(void 0,
|
|
7524
|
-
const source =
|
|
7584
|
+
const filePath = _path.resolve.call(void 0, _chunkDKR7QPEOjs.INLINE_PLAY_FILE);
|
|
7585
|
+
const source = _chunkDKR7QPEOjs.inlinePlaySource.call(void 0, code);
|
|
7525
7586
|
try {
|
|
7526
7587
|
_fs.writeFileSync.call(void 0, filePath, source, { flag: "wx" });
|
|
7527
7588
|
} catch (error) {
|
|
@@ -7540,7 +7601,7 @@ function buildMissingDefinePlayError(filePath) {
|
|
|
7540
7601
|
);
|
|
7541
7602
|
}
|
|
7542
7603
|
function extractPlayName(code, filePath) {
|
|
7543
|
-
const definedPlayName =
|
|
7604
|
+
const definedPlayName = _chunkDKR7QPEOjs.extractDefinedPlayName.call(void 0, code, filePath);
|
|
7544
7605
|
if (definedPlayName) {
|
|
7545
7606
|
return definedPlayName;
|
|
7546
7607
|
}
|
|
@@ -7769,7 +7830,7 @@ function unresolvedPackagedFilesMessage(node) {
|
|
|
7769
7830
|
const details = node.unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
7770
7831
|
return `Failed to package local deepline.csv(...) files in ${node.filePath}: ${details}`;
|
|
7771
7832
|
}
|
|
7772
|
-
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName =
|
|
7833
|
+
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkDKR7QPEOjs.PLAY_DEFAULT_EXPORT, options = {}) {
|
|
7773
7834
|
const playBundler = await loadPlayBundler();
|
|
7774
7835
|
const nodes = /* @__PURE__ */ new Map();
|
|
7775
7836
|
const diagnostics = [];
|
|
@@ -7783,7 +7844,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
|
|
|
7783
7844
|
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
7784
7845
|
target: artifactKind,
|
|
7785
7846
|
...options.cache === false ? { cache: false } : {},
|
|
7786
|
-
...absolutePath === rootPath && entryExportName !==
|
|
7847
|
+
...absolutePath === rootPath && entryExportName !== _chunkDKR7QPEOjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
7787
7848
|
});
|
|
7788
7849
|
if (bundleResult.success === false) {
|
|
7789
7850
|
diagnostics.push(
|
|
@@ -7834,7 +7895,7 @@ async function compileBundledPlayGraphManifests(client, graph) {
|
|
|
7834
7895
|
const child = graph.nodes.get(
|
|
7835
7896
|
normalizePlayPath(dependency.filePath)
|
|
7836
7897
|
);
|
|
7837
|
-
if (!_optionalChain([child, 'optionalAccess',
|
|
7898
|
+
if (!_optionalChain([child, 'optionalAccess', _268 => _268.compilerManifest])) {
|
|
7838
7899
|
throw new Error(
|
|
7839
7900
|
`Missing compiler manifest for imported dependency ${dependency.filePath}.`
|
|
7840
7901
|
);
|
|
@@ -7913,7 +7974,7 @@ function formatTimestamp(value) {
|
|
|
7913
7974
|
return date.toISOString();
|
|
7914
7975
|
}
|
|
7915
7976
|
function isoTimestamp(value) {
|
|
7916
|
-
return _nullishCoalesce(_optionalChain([timestampDate, 'call',
|
|
7977
|
+
return _nullishCoalesce(_optionalChain([timestampDate, 'call', _269 => _269(value), 'optionalAccess', _270 => _270.toISOString, 'call', _271 => _271()]), () => ( null));
|
|
7917
7978
|
}
|
|
7918
7979
|
function formatRunLine(run) {
|
|
7919
7980
|
const credits = typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount2(run.billingTotalCredits)} credits` : "\u2014";
|
|
@@ -7921,7 +7982,7 @@ function formatRunLine(run) {
|
|
|
7921
7982
|
}
|
|
7922
7983
|
function playStatusErrorText(status) {
|
|
7923
7984
|
const chunks = [];
|
|
7924
|
-
const progressError = _optionalChain([status, 'access',
|
|
7985
|
+
const progressError = _optionalChain([status, 'access', _272 => _272.progress, 'optionalAccess', _273 => _273.error]);
|
|
7925
7986
|
if (typeof progressError === "string" && progressError.trim()) {
|
|
7926
7987
|
chunks.push(progressError.trim());
|
|
7927
7988
|
}
|
|
@@ -7947,7 +8008,7 @@ function playStatusErrorText(status) {
|
|
|
7947
8008
|
function isRetryablePendingStartFailure(status) {
|
|
7948
8009
|
if (status.status !== "failed") return false;
|
|
7949
8010
|
if (status.runId && status.runId !== "pending") return false;
|
|
7950
|
-
return
|
|
8011
|
+
return _chunkN62MS3XJjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
7951
8012
|
}
|
|
7952
8013
|
function isAmbiguousPlayStartOutcomeError(error) {
|
|
7953
8014
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
|
|
@@ -7996,13 +8057,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.Deep
|
|
|
7996
8057
|
}, _class);
|
|
7997
8058
|
function watchSurfaceReaches(state, provenance, level) {
|
|
7998
8059
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
7999
|
-
if (!
|
|
8060
|
+
if (!_chunkN62MS3XJjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
8000
8061
|
return false;
|
|
8001
8062
|
}
|
|
8002
|
-
if (
|
|
8063
|
+
if (_chunkN62MS3XJjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
8003
8064
|
return true;
|
|
8004
8065
|
}
|
|
8005
|
-
return state.verbose === true &&
|
|
8066
|
+
return state.verbose === true && _chunkN62MS3XJjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
8006
8067
|
}
|
|
8007
8068
|
function getEventPayload(event) {
|
|
8008
8069
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -8025,7 +8086,7 @@ function getRunIdFromLiveEvent(event) {
|
|
|
8025
8086
|
if (typeof directRunId === "string" && directRunId.trim()) {
|
|
8026
8087
|
return directRunId;
|
|
8027
8088
|
}
|
|
8028
|
-
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call',
|
|
8089
|
+
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _274 => _274(payload), 'optionalAccess', _275 => _275.id]);
|
|
8029
8090
|
return typeof packageRunId === "string" && packageRunId.trim() ? packageRunId : null;
|
|
8030
8091
|
}
|
|
8031
8092
|
function eventConfirmsPlayRunLaunch(event) {
|
|
@@ -8046,19 +8107,19 @@ function getStatusFromLiveEvent(event) {
|
|
|
8046
8107
|
return null;
|
|
8047
8108
|
}
|
|
8048
8109
|
const payload = getEventPayload(event);
|
|
8049
|
-
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call',
|
|
8110
|
+
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _276 => _276(payload), 'optionalAccess', _277 => _277.status]))));
|
|
8050
8111
|
}
|
|
8051
8112
|
function readLiveRunField(event, field) {
|
|
8052
8113
|
const payload = getEventPayload(event);
|
|
8053
8114
|
if (field === "waitKind") {
|
|
8054
|
-
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call',
|
|
8115
|
+
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _278 => _278(payload), 'optionalAccess', _279 => _279.wait])));
|
|
8055
8116
|
if (wait && typeof wait === "object" && !Array.isArray(wait)) {
|
|
8056
8117
|
const kind = wait.kind;
|
|
8057
8118
|
if (typeof kind === "string" && kind.trim()) return kind.trim();
|
|
8058
8119
|
}
|
|
8059
8120
|
}
|
|
8060
8121
|
const run = getRunRecordFromPackage(payload);
|
|
8061
|
-
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess',
|
|
8122
|
+
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _280 => _280.progress])].filter(
|
|
8062
8123
|
(value) => Boolean(value && typeof value === "object" && !Array.isArray(value))
|
|
8063
8124
|
);
|
|
8064
8125
|
for (const record3 of records) {
|
|
@@ -8073,7 +8134,7 @@ function getLiveRunStringField(event, field) {
|
|
|
8073
8134
|
function getLiveRunActivity(event) {
|
|
8074
8135
|
const payload = getEventPayload(event);
|
|
8075
8136
|
const run = getRunRecordFromPackage(payload);
|
|
8076
|
-
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess',
|
|
8137
|
+
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _281 => _281.activity])];
|
|
8077
8138
|
for (const candidate of candidates) {
|
|
8078
8139
|
if (candidate && typeof candidate === "object" && !Array.isArray(candidate) && typeof candidate.summary === "string" && candidate.observation && typeof candidate.observation === "object") {
|
|
8079
8140
|
return candidate;
|
|
@@ -8088,9 +8149,9 @@ function getRunLifecycleHint(input) {
|
|
|
8088
8149
|
return null;
|
|
8089
8150
|
}
|
|
8090
8151
|
const activity = getLiveRunActivity(input.event);
|
|
8091
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
8152
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _282 => _282.observation, 'access', _283 => _283.state, 'access', _284 => _284.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
8092
8153
|
const inspect = `'deepline runs get ${runId} --full'`;
|
|
8093
|
-
const sleepState = _optionalChain([activity, 'optionalAccess',
|
|
8154
|
+
const sleepState = _optionalChain([activity, 'optionalAccess', _285 => _285.observation, 'access', _286 => _286.state, 'access', _287 => _287.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
|
|
8094
8155
|
if (status === "waiting" && (sleepState !== null || getLiveRunStringField(input.event, "waitKind") === "sleep")) {
|
|
8095
8156
|
const recordedWake = readLiveRunField(input.event, "waitUntil");
|
|
8096
8157
|
const projectedWake = sleepState && sleepState.resumeAt > activity.observation.observedAt ? sleepState.resumeAt : null;
|
|
@@ -8101,7 +8162,7 @@ function getRunLifecycleHint(input) {
|
|
|
8101
8162
|
};
|
|
8102
8163
|
}
|
|
8103
8164
|
const typedEventWaitKind = getLiveRunStringField(input.event, "waitKind");
|
|
8104
|
-
const activityEventWait = _optionalChain([activity, 'optionalAccess',
|
|
8165
|
+
const activityEventWait = _optionalChain([activity, 'optionalAccess', _288 => _288.observation, 'access', _289 => _289.state, 'access', _290 => _290.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
|
|
8105
8166
|
if (status === "waiting" && (typedEventWaitKind === "integration_event" || typedEventWaitKind === "integration_event_batch" || activityEventWait)) {
|
|
8106
8167
|
return {
|
|
8107
8168
|
signature: [
|
|
@@ -8174,12 +8235,12 @@ function getFinalStatusFromLiveEvent(event) {
|
|
|
8174
8235
|
}
|
|
8175
8236
|
const payload = getEventPayload(event);
|
|
8176
8237
|
const packageRun = getRunRecordFromPackage(payload);
|
|
8177
|
-
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess',
|
|
8238
|
+
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _291 => _291.status]))));
|
|
8178
8239
|
if (status !== "completed" && status !== "failed" && status !== "cancelled") {
|
|
8179
8240
|
return null;
|
|
8180
8241
|
}
|
|
8181
|
-
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
8182
|
-
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
8242
|
+
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _292 => _292.id]) === "string" ? packageRun.id : "";
|
|
8243
|
+
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _293 => _293.error]) === "string" ? packageRun.error : void 0;
|
|
8183
8244
|
return {
|
|
8184
8245
|
...payload,
|
|
8185
8246
|
runId,
|
|
@@ -8414,7 +8475,7 @@ function getProgressLinesFromLiveEvent(event) {
|
|
|
8414
8475
|
(count2) => typeof count2 === "number" && Number.isSafeInteger(count2) && count2 >= 0
|
|
8415
8476
|
)) {
|
|
8416
8477
|
lines.push(
|
|
8417
|
-
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess',
|
|
8478
|
+
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _294 => _294.confirmed]) === true ? "" : " (observed)"}`
|
|
8418
8479
|
);
|
|
8419
8480
|
}
|
|
8420
8481
|
const rowOutcomes = readRowOutcomeSummary({
|
|
@@ -8465,7 +8526,7 @@ function getRunningHeartbeatLine(input) {
|
|
|
8465
8526
|
return null;
|
|
8466
8527
|
}
|
|
8467
8528
|
const activity = getLiveRunActivity(input.event);
|
|
8468
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
8529
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _295 => _295.observation, 'access', _296 => _296.state, 'access', _297 => _297.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
8469
8530
|
if (activity && activity.classified !== false && !activityConflictsWithDurableWait) {
|
|
8470
8531
|
return `activity ${input.playName}: ${activity.summary}`;
|
|
8471
8532
|
}
|
|
@@ -8498,13 +8559,13 @@ function printPlayStatusHeartbeat(input) {
|
|
|
8498
8559
|
input.progress.writeLine(line);
|
|
8499
8560
|
}
|
|
8500
8561
|
function resolveRunPlayName(status, runId) {
|
|
8501
|
-
const packaged = _optionalChain([status, 'access',
|
|
8562
|
+
const packaged = _optionalChain([status, 'access', _298 => _298.package, 'optionalAccess', _299 => _299.run, 'optionalAccess', _300 => _300.playName]);
|
|
8502
8563
|
if (typeof packaged === "string" && packaged.trim()) return packaged.trim();
|
|
8503
|
-
return _nullishCoalesce(_nullishCoalesce(extractRunPlayName(status), () => ( _optionalChain([/^play\/(.+)\/(?:run|webhook)\//, 'access',
|
|
8564
|
+
return _nullishCoalesce(_nullishCoalesce(extractRunPlayName(status), () => ( _optionalChain([/^play\/(.+)\/(?:run|webhook)\//, 'access', _301 => _301.exec, 'call', _302 => _302(runId), 'optionalAccess', _303 => _303[1]]))), () => ( null));
|
|
8504
8565
|
}
|
|
8505
8566
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
8506
8567
|
if (open2 && dashboardUrl) {
|
|
8507
|
-
|
|
8568
|
+
_chunkSTLJYWUCjs.openInBrowser.call(void 0, dashboardUrl);
|
|
8508
8569
|
}
|
|
8509
8570
|
}
|
|
8510
8571
|
function printPlayLogLines(input) {
|
|
@@ -8556,7 +8617,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8556
8617
|
const confirmAdmission = async () => {
|
|
8557
8618
|
if (admissionConfirmed) return;
|
|
8558
8619
|
admissionConfirmed = true;
|
|
8559
|
-
await _optionalChain([input, 'access',
|
|
8620
|
+
await _optionalChain([input, 'access', _304 => _304.onRunAdmitted, 'optionalCall', _305 => _305(input.workflowId)]);
|
|
8560
8621
|
};
|
|
8561
8622
|
const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
|
|
8562
8623
|
const finishTerminalStatus = async (status) => {
|
|
@@ -8581,7 +8642,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8581
8642
|
...input.fullJson === void 0 ? {} : { full: input.fullJson }
|
|
8582
8643
|
});
|
|
8583
8644
|
} catch (error) {
|
|
8584
|
-
if (
|
|
8645
|
+
if (_chunkN62MS3XJjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
8585
8646
|
return null;
|
|
8586
8647
|
}
|
|
8587
8648
|
throw error;
|
|
@@ -8661,9 +8722,9 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8661
8722
|
signal: controller.signal,
|
|
8662
8723
|
deferLogs: !input.emitLogs,
|
|
8663
8724
|
omitTerminalLogs: !input.emitLogs,
|
|
8664
|
-
...
|
|
8725
|
+
..._chunkAWJKYS25js.isCliTraceEnabled.call(void 0, ) ? {
|
|
8665
8726
|
onPoll: (observation) => {
|
|
8666
|
-
|
|
8727
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
8667
8728
|
phase: "play_watch_poll",
|
|
8668
8729
|
workflowId: input.workflowId,
|
|
8669
8730
|
ms: observation.durationMs,
|
|
@@ -8677,7 +8738,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8677
8738
|
full: input.fullJson,
|
|
8678
8739
|
billing: false,
|
|
8679
8740
|
onStatus: async (status) => {
|
|
8680
|
-
|
|
8741
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
8681
8742
|
phase: "play_watch_terminal_status",
|
|
8682
8743
|
workflowId: input.workflowId,
|
|
8683
8744
|
full: input.fullJson === true
|
|
@@ -8747,7 +8808,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8747
8808
|
});
|
|
8748
8809
|
} catch (error) {
|
|
8749
8810
|
if (!(error instanceof _chunkJDMR33HSjs.CliPlayAdmissionUnsupportedError)) throw error;
|
|
8750
|
-
await
|
|
8811
|
+
await _chunk3NRZFMX4js.checkPlayRunCompatibility.call(void 0,
|
|
8751
8812
|
input.client.baseUrl,
|
|
8752
8813
|
input.maintenancePolicy
|
|
8753
8814
|
);
|
|
@@ -8778,8 +8839,8 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8778
8839
|
"PLAY_START_MISSING_RUN_ID"
|
|
8779
8840
|
);
|
|
8780
8841
|
}
|
|
8781
|
-
await _optionalChain([input, 'access',
|
|
8782
|
-
await _optionalChain([input, 'access',
|
|
8842
|
+
await _optionalChain([input, 'access', _306 => _306.onRunStarted, 'optionalCall', _307 => _307(workflowId)]);
|
|
8843
|
+
await _optionalChain([input, 'access', _308 => _308.onRunAdmitted, 'optionalCall', _309 => _309(workflowId)]);
|
|
8783
8844
|
const dashboardUrl = _nullishCoalesce(started.dashboardUrl, () => ( _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, input.client.baseUrl, input.playName)));
|
|
8784
8845
|
const rateLimited = _nullishCoalesce(started.rateLimited, () => ( null));
|
|
8785
8846
|
if (!input.jsonOutput) {
|
|
@@ -8795,7 +8856,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8795
8856
|
}
|
|
8796
8857
|
openPlayDashboard(dashboardUrl, _nullishCoalesce(input.open, () => ( false)));
|
|
8797
8858
|
input.progress.phase("running");
|
|
8798
|
-
|
|
8859
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
8799
8860
|
phase: "cli.play_start_admitted",
|
|
8800
8861
|
ms: Date.now() - startedAt,
|
|
8801
8862
|
ok: true,
|
|
@@ -8804,15 +8865,15 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8804
8865
|
inlineCompatibility
|
|
8805
8866
|
});
|
|
8806
8867
|
const initialTerminal = readRecord(started.finalStatus);
|
|
8807
|
-
const initialPackage = _nullishCoalesce(readRecord(_optionalChain([initialTerminal, 'optionalAccess',
|
|
8808
|
-
const initialRun = readRecord(_optionalChain([initialPackage, 'optionalAccess',
|
|
8809
|
-
if (initialTerminal && _optionalChain([initialRun, 'optionalAccess',
|
|
8868
|
+
const initialPackage = _nullishCoalesce(readRecord(_optionalChain([initialTerminal, 'optionalAccess', _310 => _310.package])), () => ( initialTerminal));
|
|
8869
|
+
const initialRun = readRecord(_optionalChain([initialPackage, 'optionalAccess', _311 => _311.run]));
|
|
8870
|
+
if (initialTerminal && _optionalChain([initialRun, 'optionalAccess', _312 => _312.id]) === workflowId && initialRun.status === "completed" && (initialTerminal.runId === void 0 || initialTerminal.runId === workflowId) && (initialTerminal.status === void 0 || initialTerminal.status === "completed") && input.fullJson === true && started.finalStatusView === "full") {
|
|
8810
8871
|
assertPlayWaitNotTimedOut({
|
|
8811
8872
|
workflowId,
|
|
8812
8873
|
startedAt,
|
|
8813
8874
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8814
8875
|
});
|
|
8815
|
-
const initialStatus =
|
|
8876
|
+
const initialStatus = _chunkN62MS3XJjs.normalizePlayStatus.call(void 0, initialTerminal);
|
|
8816
8877
|
const status2 = await resolvePlayRunOutputStatus({
|
|
8817
8878
|
client: input.client,
|
|
8818
8879
|
status: initialStatus,
|
|
@@ -8820,7 +8881,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8820
8881
|
jsonOutput: input.jsonOutput,
|
|
8821
8882
|
fromDurableStatus: true
|
|
8822
8883
|
});
|
|
8823
|
-
|
|
8884
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
8824
8885
|
phase: "play_watch_terminal_status",
|
|
8825
8886
|
workflowId,
|
|
8826
8887
|
full: true,
|
|
@@ -8875,7 +8936,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8875
8936
|
);
|
|
8876
8937
|
} catch (error) {
|
|
8877
8938
|
if (error instanceof _chunkJDMR33HSjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
|
|
8878
|
-
await
|
|
8939
|
+
await _chunk3NRZFMX4js.checkPlayRunCompatibility.call(void 0,
|
|
8879
8940
|
input.client.baseUrl,
|
|
8880
8941
|
input.maintenancePolicy
|
|
8881
8942
|
);
|
|
@@ -8902,7 +8963,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8902
8963
|
`[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
|
|
8903
8964
|
);
|
|
8904
8965
|
}
|
|
8905
|
-
|
|
8966
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
8906
8967
|
phase: "cli.play_start_stream_retry",
|
|
8907
8968
|
ms: 0,
|
|
8908
8969
|
ok: true,
|
|
@@ -8923,7 +8984,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8923
8984
|
`[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
|
|
8924
8985
|
);
|
|
8925
8986
|
}
|
|
8926
|
-
|
|
8987
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
8927
8988
|
phase: "cli.play_start_stream_retry",
|
|
8928
8989
|
ms: 0,
|
|
8929
8990
|
ok: true,
|
|
@@ -8957,7 +9018,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8957
9018
|
let timedOut = false;
|
|
8958
9019
|
let emittedDashboardUrl = false;
|
|
8959
9020
|
let lastKnownWorkflowId = "";
|
|
8960
|
-
let launchedRevisionId = _optionalChain([input, 'access',
|
|
9021
|
+
let launchedRevisionId = _optionalChain([input, 'access', _313 => _313.request, 'access', _314 => _314.revisionId, 'optionalAccess', _315 => _315.trim, 'call', _316 => _316()]) || null;
|
|
8961
9022
|
let eventCount = 0;
|
|
8962
9023
|
let firstRunIdMs = null;
|
|
8963
9024
|
let launchConfirmed = false;
|
|
@@ -8967,8 +9028,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
8967
9028
|
const confirmAdmission = async (runId) => {
|
|
8968
9029
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
8969
9030
|
launchConfirmed = true;
|
|
8970
|
-
await _optionalChain([input, 'access',
|
|
8971
|
-
|
|
9031
|
+
await _optionalChain([input, 'access', _317 => _317.onRunAdmitted, 'optionalCall', _318 => _318(runId)]);
|
|
9032
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
8972
9033
|
phase: "cli.play_start_admitted",
|
|
8973
9034
|
ms: Date.now() - startedAt,
|
|
8974
9035
|
ok: true,
|
|
@@ -9002,7 +9063,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9002
9063
|
full: input.fullJson
|
|
9003
9064
|
});
|
|
9004
9065
|
} catch (error) {
|
|
9005
|
-
if (
|
|
9066
|
+
if (_chunkN62MS3XJjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9006
9067
|
return null;
|
|
9007
9068
|
}
|
|
9008
9069
|
throw error;
|
|
@@ -9028,7 +9089,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9028
9089
|
if (eventRevisionId) {
|
|
9029
9090
|
launchedRevisionId = eventRevisionId;
|
|
9030
9091
|
}
|
|
9031
|
-
const eventRateLimited = _optionalChain([getEventPayload, 'call',
|
|
9092
|
+
const eventRateLimited = _optionalChain([getEventPayload, 'call', _319 => _319(event), 'optionalAccess', _320 => _320.rateLimited]);
|
|
9032
9093
|
if (eventRateLimited && typeof eventRateLimited === "object") {
|
|
9033
9094
|
notice.value = eventRateLimited;
|
|
9034
9095
|
}
|
|
@@ -9038,7 +9099,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9038
9099
|
lastKnownWorkflowId = eventRunId;
|
|
9039
9100
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
9040
9101
|
if (runStartedNow) {
|
|
9041
|
-
await _optionalChain([input, 'access',
|
|
9102
|
+
await _optionalChain([input, 'access', _321 => _321.onRunStarted, 'optionalCall', _322 => _322(eventRunId)]);
|
|
9042
9103
|
}
|
|
9043
9104
|
}
|
|
9044
9105
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -9140,7 +9201,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9140
9201
|
};
|
|
9141
9202
|
}
|
|
9142
9203
|
if (!canonicalTerminal) {
|
|
9143
|
-
|
|
9204
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9144
9205
|
phase: "cli.play_start_stream_stale_terminal_ignored",
|
|
9145
9206
|
ms: Date.now() - startedAt,
|
|
9146
9207
|
ok: true,
|
|
@@ -9161,14 +9222,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9161
9222
|
fromDurableStatus
|
|
9162
9223
|
}) : canonicalTerminal;
|
|
9163
9224
|
if (input.fullJson === true) {
|
|
9164
|
-
|
|
9225
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9165
9226
|
phase: "play_watch_terminal_status",
|
|
9166
9227
|
workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
|
|
9167
9228
|
full: true,
|
|
9168
9229
|
source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
|
|
9169
9230
|
});
|
|
9170
9231
|
}
|
|
9171
|
-
|
|
9232
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9172
9233
|
phase: "cli.play_start_stream_terminal",
|
|
9173
9234
|
ms: Date.now() - startedAt,
|
|
9174
9235
|
ok: true,
|
|
@@ -9188,7 +9249,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9188
9249
|
clearTimeout(timeout);
|
|
9189
9250
|
}
|
|
9190
9251
|
controller.abort();
|
|
9191
|
-
|
|
9252
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9192
9253
|
phase: "cli.play_start_stream_handoff_to_tail",
|
|
9193
9254
|
ms: Date.now() - startedAt,
|
|
9194
9255
|
ok: true,
|
|
@@ -9219,7 +9280,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9219
9280
|
if (timedOut) {
|
|
9220
9281
|
const terminal = await fetchKnownTerminalStatus();
|
|
9221
9282
|
if (terminal) {
|
|
9222
|
-
|
|
9283
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9223
9284
|
phase: "cli.play_start_stream_timeout_status_reconcile",
|
|
9224
9285
|
ms: Date.now() - startedAt,
|
|
9225
9286
|
ok: true,
|
|
@@ -9239,7 +9300,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9239
9300
|
lastPhase
|
|
9240
9301
|
});
|
|
9241
9302
|
}
|
|
9242
|
-
if (lastKnownWorkflowId && (terminalWindowExpired ||
|
|
9303
|
+
if (lastKnownWorkflowId && (terminalWindowExpired || _chunkN62MS3XJjs.isTransientPlayRunReadError.call(void 0, error))) {
|
|
9243
9304
|
if (timeout) {
|
|
9244
9305
|
clearTimeout(timeout);
|
|
9245
9306
|
}
|
|
@@ -9250,7 +9311,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9250
9311
|
`
|
|
9251
9312
|
);
|
|
9252
9313
|
}
|
|
9253
|
-
|
|
9314
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9254
9315
|
phase: "cli.play_start_stream_reconnect",
|
|
9255
9316
|
ms: Date.now() - startedAt,
|
|
9256
9317
|
ok: true,
|
|
@@ -9277,7 +9338,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9277
9338
|
});
|
|
9278
9339
|
}
|
|
9279
9340
|
if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
|
|
9280
|
-
|
|
9341
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9281
9342
|
phase: "cli.play_start_stream_transient_failure",
|
|
9282
9343
|
ms: Date.now() - startedAt,
|
|
9283
9344
|
ok: false,
|
|
@@ -9305,7 +9366,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9305
9366
|
`[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
|
|
9306
9367
|
);
|
|
9307
9368
|
}
|
|
9308
|
-
|
|
9369
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
9309
9370
|
phase: "cli.play_start_stream_reconnect",
|
|
9310
9371
|
ms: Date.now() - startedAt,
|
|
9311
9372
|
ok: true,
|
|
@@ -9385,29 +9446,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
9385
9446
|
"logs"
|
|
9386
9447
|
]);
|
|
9387
9448
|
function formatPlayLogLine(rawLine, state) {
|
|
9388
|
-
const classified =
|
|
9449
|
+
const classified = _chunkN62MS3XJjs.classifyLogLine.call(void 0, rawLine);
|
|
9389
9450
|
const line = classified.line;
|
|
9390
9451
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
9391
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
9452
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _323 => _323[1]]) ? new Date(timestampMatch[1]) : null;
|
|
9392
9453
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
9393
9454
|
hour12: false,
|
|
9394
9455
|
hour: "2-digit",
|
|
9395
9456
|
minute: "2-digit",
|
|
9396
9457
|
second: "2-digit"
|
|
9397
9458
|
}) : null;
|
|
9398
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
9459
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _324 => _324[2]]), () => ( line));
|
|
9399
9460
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
9400
9461
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
9401
9462
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
9402
9463
|
if (providerWait && !state.verbose) {
|
|
9403
|
-
return
|
|
9464
|
+
return _chunkN62MS3XJjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
9404
9465
|
}
|
|
9405
9466
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
9406
9467
|
if (mapProgress && !state.verbose) {
|
|
9407
|
-
return
|
|
9468
|
+
return _chunkN62MS3XJjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
9408
9469
|
}
|
|
9409
9470
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
9410
|
-
if (!
|
|
9471
|
+
if (!_chunkN62MS3XJjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9411
9472
|
return null;
|
|
9412
9473
|
}
|
|
9413
9474
|
if (state.emittedRunnerStarted) {
|
|
@@ -9420,7 +9481,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9420
9481
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
9421
9482
|
);
|
|
9422
9483
|
if (mapStart) {
|
|
9423
|
-
if (!
|
|
9484
|
+
if (!_chunkN62MS3XJjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9424
9485
|
return null;
|
|
9425
9486
|
}
|
|
9426
9487
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -9430,7 +9491,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9430
9491
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
9431
9492
|
);
|
|
9432
9493
|
if (mapDone) {
|
|
9433
|
-
if (!
|
|
9494
|
+
if (!_chunkN62MS3XJjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9434
9495
|
return null;
|
|
9435
9496
|
}
|
|
9436
9497
|
const [, results, executed, cached] = mapDone;
|
|
@@ -9612,20 +9673,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
9612
9673
|
function buildRunWarnings(status, rowsInfo) {
|
|
9613
9674
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9614
9675
|
const result = readRecord(status.result);
|
|
9615
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
9616
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
9676
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _325 => _325._metadata]));
|
|
9677
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _326 => _326.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
9617
9678
|
if (!warning) return false;
|
|
9618
9679
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
9619
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
9680
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _327 => _327.message])).filter(
|
|
9620
9681
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
9621
9682
|
).slice(0, 16) : [];
|
|
9622
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
9683
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _328 => _328.hasRowFailures]) ? [
|
|
9623
9684
|
`${status.status === "completed" ? "Run completed" : "Run ended"} with ${formatInteger(rowOutcomes.failedRows)} failed row(s); inspect the persisted failed rows before treating the output as complete.`
|
|
9624
9685
|
] : [];
|
|
9625
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9686
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _329 => _329.supersededRows]), () => ( 0))) > 0 ? [
|
|
9626
9687
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
9627
9688
|
] : [];
|
|
9628
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
9689
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _330 => _330.totalRows]) === 0) {
|
|
9629
9690
|
return [
|
|
9630
9691
|
...rowOutcomeWarnings,
|
|
9631
9692
|
...supersededRowNotices,
|
|
@@ -9644,7 +9705,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
9644
9705
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
9645
9706
|
}
|
|
9646
9707
|
function buildRunNextCommands(status) {
|
|
9647
|
-
const runId = _optionalChain([status, 'access',
|
|
9708
|
+
const runId = _optionalChain([status, 'access', _331 => _331.runId, 'optionalAccess', _332 => _332.trim, 'call', _333 => _333()]);
|
|
9648
9709
|
if (!runId) {
|
|
9649
9710
|
const playName = extractRunPlayName(status);
|
|
9650
9711
|
return playName ? {
|
|
@@ -9795,14 +9856,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
9795
9856
|
return null;
|
|
9796
9857
|
}
|
|
9797
9858
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
9798
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
9859
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _334 => _334[1]])) {
|
|
9799
9860
|
return lowerToolMatch[1];
|
|
9800
9861
|
}
|
|
9801
9862
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
9802
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
9863
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _335 => _335[1]]), () => ( null));
|
|
9803
9864
|
}
|
|
9804
9865
|
function isInsufficientCreditsBilling(billing) {
|
|
9805
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
9866
|
+
return _optionalChain([billing, 'optionalAccess', _336 => _336.kind]) === "insufficient_credits";
|
|
9806
9867
|
}
|
|
9807
9868
|
function extractBillingForStatus(status, error) {
|
|
9808
9869
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -9844,8 +9905,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
9844
9905
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
9845
9906
|
const progress = input.status.progress;
|
|
9846
9907
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
9847
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9848
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9908
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _337 => _337.rows, 'access', _338 => _338.length]))), () => ( null));
|
|
9909
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _339 => _339.totalRows]))), () => ( null));
|
|
9849
9910
|
const lines = [
|
|
9850
9911
|
" status: stopped_insufficient_credits",
|
|
9851
9912
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -9864,7 +9925,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
9864
9925
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
9865
9926
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
9866
9927
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
9867
|
-
const runId = _optionalChain([input, 'access',
|
|
9928
|
+
const runId = _optionalChain([input, 'access', _340 => _340.status, 'access', _341 => _341.runId, 'optionalAccess', _342 => _342.trim, 'call', _343 => _343()]);
|
|
9868
9929
|
if (runId) {
|
|
9869
9930
|
lines.push(` inspect: deepline runs get ${runId}`);
|
|
9870
9931
|
lines.push(
|
|
@@ -9946,10 +10007,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
9946
10007
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
9947
10008
|
const progress = status.progress;
|
|
9948
10009
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9949
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9950
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9951
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9952
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10010
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _344 => _344.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _345 => _345.totalRows]))), () => ( null));
|
|
10011
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _346 => _346.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
10012
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _347 => _347.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
10013
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _348 => _348.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
9953
10014
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
9954
10015
|
const progressPending = getNumericField(progress, "pending");
|
|
9955
10016
|
const pending = _nullishCoalesce((progressPending !== null ? Math.max(0, progressPending - supersededOffset) : null), () => ( (typeof total === "number" && typeof completed === "number" && typeof failed === "number" ? Math.max(0, total - completed - failed - supersededOffset) : null)));
|
|
@@ -10019,7 +10080,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
10019
10080
|
];
|
|
10020
10081
|
}
|
|
10021
10082
|
function normalizeLogsForEnvelope(status) {
|
|
10022
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
10083
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _349 => _349.progress, 'optionalAccess', _350 => _350.logs])) ? status.progress.logs : [];
|
|
10023
10084
|
const totalCount = logs.length;
|
|
10024
10085
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
10025
10086
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -10076,7 +10137,7 @@ function compactPlayStatus(status) {
|
|
|
10076
10137
|
const packaged = getPlayRunPackage(status);
|
|
10077
10138
|
if (packaged) {
|
|
10078
10139
|
const packagedRun = readRecord(packaged.run);
|
|
10079
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
10140
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _351 => _351.error]) === "string" ? packagedRun.error : null;
|
|
10080
10141
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
10081
10142
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
10082
10143
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -10227,7 +10288,7 @@ function formatTopValuesPart(value) {
|
|
|
10227
10288
|
}
|
|
10228
10289
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
10229
10290
|
const record3 = readRecord(summary);
|
|
10230
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
10291
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _352 => _352.columnStats]));
|
|
10231
10292
|
if (!record3 || !columnStats) {
|
|
10232
10293
|
return [];
|
|
10233
10294
|
}
|
|
@@ -10315,7 +10376,7 @@ function packageDatasetRecords(packaged) {
|
|
|
10315
10376
|
if (catalog.length > 0) return catalog;
|
|
10316
10377
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
10317
10378
|
const output = readRecord(step.output);
|
|
10318
|
-
return _optionalChain([output, 'optionalAccess',
|
|
10379
|
+
return _optionalChain([output, 'optionalAccess', _353 => _353.kind]) === "dataset" ? [output] : [];
|
|
10319
10380
|
});
|
|
10320
10381
|
}
|
|
10321
10382
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -10324,7 +10385,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
10324
10385
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
10325
10386
|
for (const outputValue of Object.values(outputs)) {
|
|
10326
10387
|
const output = readRecord(outputValue);
|
|
10327
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
10388
|
+
if (_optionalChain([output, 'optionalAccess', _354 => _354.kind]) !== "dataset") continue;
|
|
10328
10389
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
10329
10390
|
datasetIds.add(output.datasetId.trim());
|
|
10330
10391
|
}
|
|
@@ -10360,7 +10421,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
10360
10421
|
}
|
|
10361
10422
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
10362
10423
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
10363
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
10424
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _355 => _355.includeSummary]), () => ( true));
|
|
10364
10425
|
const lines = [];
|
|
10365
10426
|
const steps = readRecordArray(packaged.steps);
|
|
10366
10427
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -10369,10 +10430,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10369
10430
|
for (const step of steps) {
|
|
10370
10431
|
if (step.kind !== "dataset") continue;
|
|
10371
10432
|
const output = readRecord(step.output);
|
|
10372
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10433
|
+
if (typeof _optionalChain([output, 'optionalAccess', _356 => _356.datasetId]) === "string") {
|
|
10373
10434
|
stepsByDatasetId.set(output.datasetId, step);
|
|
10374
10435
|
}
|
|
10375
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10436
|
+
if (typeof _optionalChain([output, 'optionalAccess', _357 => _357.path]) === "string") {
|
|
10376
10437
|
stepsByPath.set(output.path, step);
|
|
10377
10438
|
}
|
|
10378
10439
|
if (typeof step.id === "string") {
|
|
@@ -10386,8 +10447,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10386
10447
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
10387
10448
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
10388
10449
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
10389
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
10390
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
10450
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _358 => _358.complete]) === false;
|
|
10451
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _359 => _359.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
10391
10452
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
10392
10453
|
if (countUnconfirmed) {
|
|
10393
10454
|
lines.push(
|
|
@@ -10405,7 +10466,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10405
10466
|
}
|
|
10406
10467
|
}
|
|
10407
10468
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
10408
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
10469
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _360 => _360.progress]));
|
|
10409
10470
|
if (progress) {
|
|
10410
10471
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
10411
10472
|
}
|
|
@@ -10419,10 +10480,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10419
10480
|
}
|
|
10420
10481
|
const exportAction = readRecord(actions2.exportCsv);
|
|
10421
10482
|
const exportCommand = actionToCommand(exportAction);
|
|
10422
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
10483
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _361 => _361.scope]));
|
|
10423
10484
|
const queryAction = readRecord(actions2.query);
|
|
10424
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
10425
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
10485
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _362 => _362.scope]));
|
|
10486
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _363 => _363.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
10426
10487
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
10427
10488
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
10428
10489
|
if (runQueryCommand) {
|
|
@@ -10434,11 +10495,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10434
10495
|
}
|
|
10435
10496
|
if (exportCommand) {
|
|
10436
10497
|
lines.push(
|
|
10437
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
10498
|
+
_optionalChain([exportScope, 'optionalAccess', _364 => _364.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
10438
10499
|
);
|
|
10439
10500
|
}
|
|
10440
10501
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
10441
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
10502
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _365 => _365.reason]) === "string" && typeof unavailable.message === "string") {
|
|
10442
10503
|
lines.push(
|
|
10443
10504
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
10444
10505
|
);
|
|
@@ -10455,7 +10516,7 @@ function packageSavedRowCount(packaged) {
|
|
|
10455
10516
|
}
|
|
10456
10517
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
10457
10518
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
10458
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
10519
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _366 => _366.exec, 'call', _367 => _367(message), 'optionalAccess', _368 => _368[1]]);
|
|
10459
10520
|
if (configuredSeconds) {
|
|
10460
10521
|
const seconds = Number(configuredSeconds);
|
|
10461
10522
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -10502,7 +10563,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10502
10563
|
if (!outputs) return [];
|
|
10503
10564
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
10504
10565
|
const record3 = readRecord(output);
|
|
10505
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
10566
|
+
return _optionalChain([record3, 'optionalAccess', _369 => _369.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _370 => _370.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
10506
10567
|
});
|
|
10507
10568
|
if (returned.length === 0) return [];
|
|
10508
10569
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -10522,10 +10583,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10522
10583
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
10523
10584
|
);
|
|
10524
10585
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
10525
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
10586
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _371 => _371.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _372 => _372.path]) === path
|
|
10526
10587
|
);
|
|
10527
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
10528
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10588
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _373 => _373.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _374 => _374.preview]))));
|
|
10589
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _375 => _375.rows])) ? preview.rows.slice(0, 2) : [];
|
|
10529
10590
|
if (rows.length > 0) {
|
|
10530
10591
|
lines.push(` sample rows (${rows.length}):`);
|
|
10531
10592
|
lines.push(
|
|
@@ -10551,7 +10612,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10551
10612
|
return lines;
|
|
10552
10613
|
}
|
|
10553
10614
|
function authoredPackageStackFrames(packaged) {
|
|
10554
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
10615
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _376 => _376.trim, 'call', _377 => _377()])));
|
|
10555
10616
|
if (!stack) return [];
|
|
10556
10617
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
10557
10618
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -10583,9 +10644,9 @@ function activityIsoTimestamp(value) {
|
|
|
10583
10644
|
}
|
|
10584
10645
|
function buildRunActivityTextLines(run) {
|
|
10585
10646
|
const activity = readRecord(run.activity);
|
|
10586
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
10587
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10588
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10647
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _378 => _378.observation]));
|
|
10648
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _379 => _379.state]));
|
|
10649
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _380 => _380.target]));
|
|
10589
10650
|
if (!activity || !observation || !state) return [];
|
|
10590
10651
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
10591
10652
|
if (kind === "completed") return [];
|
|
@@ -10630,11 +10691,11 @@ function buildRunActivityTextLines(run) {
|
|
|
10630
10691
|
}
|
|
10631
10692
|
function formatObservedRunCounter(value) {
|
|
10632
10693
|
const counter = readRecord(value);
|
|
10633
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
10694
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _381 => _381.value]);
|
|
10634
10695
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
10635
10696
|
return "unknown";
|
|
10636
10697
|
}
|
|
10637
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
10698
|
+
return _optionalChain([counter, 'optionalAccess', _382 => _382.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
10638
10699
|
}
|
|
10639
10700
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
10640
10701
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -10647,13 +10708,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10647
10708
|
);
|
|
10648
10709
|
}
|
|
10649
10710
|
const source = readRecord(evidence.source);
|
|
10650
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
10711
|
+
if (_optionalChain([source, 'optionalAccess', _383 => _383.aligned]) === false) {
|
|
10651
10712
|
lines.push(
|
|
10652
10713
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
10653
10714
|
);
|
|
10654
10715
|
}
|
|
10655
10716
|
const focus = readRecord(evidence.focusStep);
|
|
10656
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
10717
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _384 => _384.rows]));
|
|
10657
10718
|
if (focus) {
|
|
10658
10719
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
10659
10720
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -10661,7 +10722,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10661
10722
|
const known = readRecordArray(packaged.steps).find(
|
|
10662
10723
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
10663
10724
|
);
|
|
10664
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
10725
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _385 => _385.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
10665
10726
|
deriveNodeExecutionState({
|
|
10666
10727
|
reported: {
|
|
10667
10728
|
status: focus.status.trim(),
|
|
@@ -10671,7 +10732,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10671
10732
|
total: rows.total
|
|
10672
10733
|
} : null
|
|
10673
10734
|
},
|
|
10674
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
10735
|
+
runStatus: _optionalChain([run, 'optionalAccess', _386 => _386.status])
|
|
10675
10736
|
})
|
|
10676
10737
|
) : null;
|
|
10677
10738
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -10719,7 +10780,7 @@ function formatRecentRunLogLines(value) {
|
|
|
10719
10780
|
(line) => typeof line === "string"
|
|
10720
10781
|
);
|
|
10721
10782
|
if (tail.length === 0) return [];
|
|
10722
|
-
const shown = tail.map((line) =>
|
|
10783
|
+
const shown = tail.map((line) => _chunkN62MS3XJjs.classifyLogLine.call(void 0, line)).filter(
|
|
10723
10784
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
10724
10785
|
).slice(-8);
|
|
10725
10786
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -10763,7 +10824,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10763
10824
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
10764
10825
|
}
|
|
10765
10826
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
10766
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
10827
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _387 => _387.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
10767
10828
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
10768
10829
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
10769
10830
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -10774,11 +10835,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10774
10835
|
}
|
|
10775
10836
|
}
|
|
10776
10837
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
10777
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
10838
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _388 => _388.entries])) ? failedLogs.entries.filter(
|
|
10778
10839
|
(entry) => typeof entry === "string"
|
|
10779
10840
|
) : [];
|
|
10780
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10781
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10841
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _389 => _389.association]) === "string" ? failedLogs.association : null;
|
|
10842
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _390 => _390.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
10782
10843
|
if (failedLogEntries.length > 0) {
|
|
10783
10844
|
lines.push(" failed logs:");
|
|
10784
10845
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -10797,8 +10858,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10797
10858
|
)
|
|
10798
10859
|
).slice(0, 16) : [];
|
|
10799
10860
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
10800
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
10801
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
10861
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _391 => _391.next]));
|
|
10862
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _392 => _392.logs]) === "string") {
|
|
10802
10863
|
lines.push(
|
|
10803
10864
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
10804
10865
|
);
|
|
@@ -10826,20 +10887,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10826
10887
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
10827
10888
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
10828
10889
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
10829
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
10830
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10890
|
+
const preview = _optionalChain([output, 'optionalAccess', _393 => _393.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
10891
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _394 => _394.rows])) ? preview.rows.length : null;
|
|
10831
10892
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
10832
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
10893
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _395 => _395.summary])));
|
|
10833
10894
|
if (previewRows !== null) {
|
|
10834
10895
|
lines.push(
|
|
10835
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
10896
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _396 => _396.truncated]) ? " truncated" : ""}`
|
|
10836
10897
|
);
|
|
10837
10898
|
}
|
|
10838
10899
|
}
|
|
10839
10900
|
const inspectCommand = actionToCommand(next.inspect);
|
|
10840
10901
|
const fullResultCommand = actionToCommand(next.full);
|
|
10841
10902
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
10842
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
10903
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _397 => _397(dataset.actions), 'optionalAccess', _398 => _398.exportCsv])))
|
|
10843
10904
|
);
|
|
10844
10905
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
10845
10906
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -10904,7 +10965,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
10904
10965
|
}
|
|
10905
10966
|
function buildBillingRollupTextLines(status) {
|
|
10906
10967
|
const billing = status.billing;
|
|
10907
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
10968
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _399 => _399.rollup]);
|
|
10908
10969
|
if (!rollup) return [];
|
|
10909
10970
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
10910
10971
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -10923,7 +10984,7 @@ function buildBillingRollupTextLines(status) {
|
|
|
10923
10984
|
return [` cost: ${total} credits`];
|
|
10924
10985
|
}
|
|
10925
10986
|
function playRunRateLimitedNotice(status) {
|
|
10926
|
-
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call',
|
|
10987
|
+
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _400 => _400(status), 'optionalAccess', _401 => _401.rateLimited]), () => ( status.rateLimited));
|
|
10927
10988
|
return notice && typeof notice === "object" ? notice : null;
|
|
10928
10989
|
}
|
|
10929
10990
|
function withRateLimitedNotice(status, notice) {
|
|
@@ -10963,7 +11024,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10963
11024
|
const overview = buildRunOverview(status);
|
|
10964
11025
|
const { run } = overview;
|
|
10965
11026
|
const failed = run.status === "failed";
|
|
10966
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
11027
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _402 => _402.rowOutcomes, 'optionalAccess', _403 => _403.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
10967
11028
|
const rateLimited = playRunRateLimitedNotice(status);
|
|
10968
11029
|
const lines = [
|
|
10969
11030
|
...rateLimited ? [rateLimited.message] : [],
|
|
@@ -10985,7 +11046,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
10985
11046
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
10986
11047
|
);
|
|
10987
11048
|
}
|
|
10988
|
-
if (_optionalChain([overview, 'access',
|
|
11049
|
+
if (_optionalChain([overview, 'access', _404 => _404.rowOutcomes, 'optionalAccess', _405 => _405.hasRowFailures])) {
|
|
10989
11050
|
lines.push(
|
|
10990
11051
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
10991
11052
|
);
|
|
@@ -11014,17 +11075,17 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11014
11075
|
}
|
|
11015
11076
|
function writePlayResult(status, jsonOutput, options) {
|
|
11016
11077
|
const packaged = getPlayRunPackage(status);
|
|
11017
|
-
if (status.package)
|
|
11018
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11078
|
+
if (status.package) _chunkAIPTW3EKjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11079
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _406 => _406.hits]), () => ( null));
|
|
11019
11080
|
if (jsonOutput) {
|
|
11020
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
11021
|
-
|
|
11081
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _407 => _407.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11082
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
11022
11083
|
hits ? { ...payload2, hits } : payload2,
|
|
11023
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11084
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _408 => _408.jsonFields]) }
|
|
11024
11085
|
);
|
|
11025
11086
|
return;
|
|
11026
11087
|
}
|
|
11027
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11088
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _409 => _409.fullJson])) {
|
|
11028
11089
|
const {
|
|
11029
11090
|
logs: _logs,
|
|
11030
11091
|
failedLogs: _failedLogs,
|
|
@@ -11034,7 +11095,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11034
11095
|
...buildPlayCompletionTextLines(status),
|
|
11035
11096
|
...formatRunHitsLines(hits)
|
|
11036
11097
|
];
|
|
11037
|
-
|
|
11098
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11038
11099
|
json: false,
|
|
11039
11100
|
text: `${lines2.join("\n")}
|
|
11040
11101
|
`
|
|
@@ -11084,8 +11145,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11084
11145
|
lines.push(...renderedServerView.actions);
|
|
11085
11146
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11086
11147
|
const compact = compactPlayStatus(status);
|
|
11087
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11088
|
-
|
|
11148
|
+
const payload = _optionalChain([options, 'optionalAccess', _410 => _410.fullJson]) ? status : compact;
|
|
11149
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
11089
11150
|
{
|
|
11090
11151
|
...payload,
|
|
11091
11152
|
render: {
|
|
@@ -11138,7 +11199,7 @@ async function resolvePlayRunOutputStatus(input) {
|
|
|
11138
11199
|
const streamedPackage = getPlayRunPackage(input.status);
|
|
11139
11200
|
const refreshForFullJson = input.fullJson && !input.fromDurableStatus;
|
|
11140
11201
|
const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
|
|
11141
|
-
const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call',
|
|
11202
|
+
const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call', _411 => _411(_optionalChain([streamedPackage, 'optionalAccess', _412 => _412.run])), 'optionalAccess', _413 => _413.status]) !== "failed");
|
|
11142
11203
|
if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
|
|
11143
11204
|
return input.status;
|
|
11144
11205
|
}
|
|
@@ -11238,14 +11299,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11238
11299
|
return columns;
|
|
11239
11300
|
}
|
|
11240
11301
|
function sqlSafeExportColumnName(id) {
|
|
11241
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11302
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _414 => _414.trim, 'call', _415 => _415(), 'access', _416 => _416.match, 'call', _417 => _417(/^_+/), 'optionalAccess', _418 => _418[0]]), () => ( ""));
|
|
11242
11303
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11243
11304
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11244
11305
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11245
11306
|
}
|
|
11246
11307
|
async function fetchBackingDatasetRows(input) {
|
|
11247
11308
|
const playName = extractRunPlayName(input.status);
|
|
11248
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11309
|
+
const tableNamespace = _optionalChain([input, 'access', _419 => _419.rowsInfo, 'access', _420 => _420.tableNamespace, 'optionalAccess', _421 => _421.trim, 'call', _422 => _422()]);
|
|
11249
11310
|
if (!playName || !tableNamespace) {
|
|
11250
11311
|
return null;
|
|
11251
11312
|
}
|
|
@@ -11285,7 +11346,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11285
11346
|
seenEnvelopeKeys.add(key);
|
|
11286
11347
|
}
|
|
11287
11348
|
sheetRows.push(...page.rows);
|
|
11288
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11349
|
+
const summaryTotal = _optionalChain([page, 'access', _423 => _423.summary, 'optionalAccess', _424 => _424.stats, 'optionalAccess', _425 => _425.total]);
|
|
11289
11350
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11290
11351
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11291
11352
|
}
|
|
@@ -11294,7 +11355,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11294
11355
|
}
|
|
11295
11356
|
offset += page.rows.length;
|
|
11296
11357
|
}
|
|
11297
|
-
const withError =
|
|
11358
|
+
const withError = _chunkAIPTW3EKjs.tableExportHasFailedRows.call(void 0,
|
|
11298
11359
|
sheetRows.filter(
|
|
11299
11360
|
(row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
|
|
11300
11361
|
)
|
|
@@ -11310,7 +11371,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11310
11371
|
return [
|
|
11311
11372
|
withError ? {
|
|
11312
11373
|
...exported,
|
|
11313
|
-
[
|
|
11374
|
+
[_chunkAIPTW3EKjs.TABLE_EXPORT_ERROR_COLUMN]: _chunkAIPTW3EKjs.tableExportErrorCell.call(void 0,
|
|
11314
11375
|
row
|
|
11315
11376
|
)
|
|
11316
11377
|
} : exported
|
|
@@ -11379,7 +11440,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11379
11440
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
11380
11441
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
11381
11442
|
)));
|
|
11382
|
-
if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess',
|
|
11443
|
+
if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess', _426 => _426.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
11383
11444
|
return input.rowsInfo;
|
|
11384
11445
|
}
|
|
11385
11446
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -11451,8 +11512,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11451
11512
|
path: dataset.exportFile(outPath, options),
|
|
11452
11513
|
rowsInfo: dataset.info(),
|
|
11453
11514
|
currentTable: false,
|
|
11454
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11455
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11515
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _427 => _427.source]), () => ( null)),
|
|
11516
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _428 => _428.info, 'call', _429 => _429()]), () => ( null))
|
|
11456
11517
|
};
|
|
11457
11518
|
};
|
|
11458
11519
|
const run = Run.open({
|
|
@@ -11464,7 +11525,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11464
11525
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
11465
11526
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
11466
11527
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
11467
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11528
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _430 => _430.info, 'call', _431 => _431()]), () => ( null));
|
|
11468
11529
|
if (!selectedDataset && options.datasetPath) {
|
|
11469
11530
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
11470
11531
|
const commands = datasetChoiceLines({
|
|
@@ -11577,7 +11638,7 @@ ${commands.join("\n")}`,
|
|
|
11577
11638
|
throw error;
|
|
11578
11639
|
}
|
|
11579
11640
|
}
|
|
11580
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
11641
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _432 => _432.complete])) {
|
|
11581
11642
|
const guarded2 = assertDatasetHasExportableRows({
|
|
11582
11643
|
rowsInfo: fetchedRowsInfo,
|
|
11583
11644
|
status,
|
|
@@ -11642,7 +11703,7 @@ function extractActiveRunsFromError(error) {
|
|
|
11642
11703
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) {
|
|
11643
11704
|
return [];
|
|
11644
11705
|
}
|
|
11645
|
-
const response = _optionalChain([error, 'access',
|
|
11706
|
+
const response = _optionalChain([error, 'access', _433 => _433.details, 'optionalAccess', _434 => _434.response]);
|
|
11646
11707
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
11647
11708
|
return [];
|
|
11648
11709
|
}
|
|
@@ -11759,8 +11820,8 @@ function renderServerResultView(value) {
|
|
|
11759
11820
|
return { lines: [], actions: [] };
|
|
11760
11821
|
}
|
|
11761
11822
|
const view = value;
|
|
11762
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
11763
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
11823
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _435 => _435.render, 'optionalAccess', _436 => _436.sections])) ? view.render.sections : [];
|
|
11824
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _437 => _437.render, 'optionalAccess', _438 => _438.actions])) ? view.render.actions : [];
|
|
11764
11825
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
11765
11826
|
const lines2 = [];
|
|
11766
11827
|
for (const section of renderedSections) {
|
|
@@ -11798,7 +11859,7 @@ function renderServerResultView(value) {
|
|
|
11798
11859
|
}
|
|
11799
11860
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
11800
11861
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
11801
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
11862
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _439 => _439.queryCommand]) === "string") {
|
|
11802
11863
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
11803
11864
|
}
|
|
11804
11865
|
if (tables.length > 0) {
|
|
@@ -11845,7 +11906,7 @@ function renderServerResultView(value) {
|
|
|
11845
11906
|
function writeStartedPlayRun(input) {
|
|
11846
11907
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
11847
11908
|
const run = input.package.run;
|
|
11848
|
-
|
|
11909
|
+
_chunkAIPTW3EKjs.recordPlayTermination.call(void 0, {
|
|
11849
11910
|
id: run.id,
|
|
11850
11911
|
status: run.status,
|
|
11851
11912
|
finishedAt: run.finishedAt
|
|
@@ -11858,7 +11919,7 @@ function writeStartedPlayRun(input) {
|
|
|
11858
11919
|
dashboardUrl: input.dashboardUrl,
|
|
11859
11920
|
package: input.package
|
|
11860
11921
|
};
|
|
11861
|
-
|
|
11922
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
11862
11923
|
json: true,
|
|
11863
11924
|
fields: input.jsonFields
|
|
11864
11925
|
});
|
|
@@ -11880,7 +11941,7 @@ function writeStartedPlayRun(input) {
|
|
|
11880
11941
|
input.progress.writeLine(output2, process.stdout);
|
|
11881
11942
|
return;
|
|
11882
11943
|
}
|
|
11883
|
-
|
|
11944
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, input.package, {
|
|
11884
11945
|
json: false,
|
|
11885
11946
|
text: `${output2}
|
|
11886
11947
|
`
|
|
@@ -11909,7 +11970,7 @@ function writeStartedPlayRun(input) {
|
|
|
11909
11970
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
11910
11971
|
];
|
|
11911
11972
|
if (input.jsonOutput) {
|
|
11912
|
-
|
|
11973
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
11913
11974
|
return;
|
|
11914
11975
|
}
|
|
11915
11976
|
if (input.dashboardUrl) {
|
|
@@ -11920,7 +11981,7 @@ function writeStartedPlayRun(input) {
|
|
|
11920
11981
|
input.progress.writeLine(output, process.stdout);
|
|
11921
11982
|
return;
|
|
11922
11983
|
}
|
|
11923
|
-
|
|
11984
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
11924
11985
|
{
|
|
11925
11986
|
...payload,
|
|
11926
11987
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -11930,7 +11991,7 @@ function writeStartedPlayRun(input) {
|
|
|
11930
11991
|
);
|
|
11931
11992
|
}
|
|
11932
11993
|
function parsePlayCheckOptions(args) {
|
|
11933
|
-
const selection =
|
|
11994
|
+
const selection = _chunkSTLJYWUCjs.parseJsonFields.call(void 0, args, "check");
|
|
11934
11995
|
args = selection.args;
|
|
11935
11996
|
const target = args[0];
|
|
11936
11997
|
if (!target || target.startsWith("-")) {
|
|
@@ -11942,7 +12003,7 @@ function parsePlayCheckOptions(args) {
|
|
|
11942
12003
|
if (arg !== "--json" && arg !== "--full")
|
|
11943
12004
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
11944
12005
|
}
|
|
11945
|
-
const jsonOutput =
|
|
12006
|
+
const jsonOutput = _chunkSTLJYWUCjs.argsWantJson.call(void 0, args);
|
|
11946
12007
|
return {
|
|
11947
12008
|
target,
|
|
11948
12009
|
jsonOutput,
|
|
@@ -12018,7 +12079,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12018
12079
|
useLatest,
|
|
12019
12080
|
expectedArtifactHash,
|
|
12020
12081
|
dryRun,
|
|
12021
|
-
jsonOutput:
|
|
12082
|
+
jsonOutput: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args)
|
|
12022
12083
|
};
|
|
12023
12084
|
}
|
|
12024
12085
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12059,7 +12120,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12059
12120
|
target,
|
|
12060
12121
|
expectedArtifactHash,
|
|
12061
12122
|
dryRun,
|
|
12062
|
-
jsonOutput:
|
|
12123
|
+
jsonOutput: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args)
|
|
12063
12124
|
};
|
|
12064
12125
|
}
|
|
12065
12126
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12112,7 +12173,7 @@ function checkHintExpression(value) {
|
|
|
12112
12173
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12113
12174
|
}
|
|
12114
12175
|
function checkHintRawPath(value) {
|
|
12115
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12176
|
+
return _optionalChain([value, 'optionalAccess', _440 => _440.startsWith, 'call', _441 => _441("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12116
12177
|
}
|
|
12117
12178
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12118
12179
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12187,30 +12248,30 @@ function cronExecutionLabel(status) {
|
|
|
12187
12248
|
}
|
|
12188
12249
|
function readLiveCronMetadata(play) {
|
|
12189
12250
|
const record3 = readRecord(play);
|
|
12190
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12251
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _442 => _442.triggerMetadata]));
|
|
12191
12252
|
return {
|
|
12192
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12193
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12194
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12195
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12196
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12253
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _443 => _443.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12254
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _444 => _444.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12255
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _445 => _445.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12256
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _446 => _446.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12257
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _447 => _447.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12197
12258
|
};
|
|
12198
12259
|
}
|
|
12199
12260
|
function liveTriggerStatusLines(status, play) {
|
|
12200
12261
|
const cron = readLiveCronMetadata(play);
|
|
12201
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12262
|
+
if (!_optionalChain([status, 'optionalAccess', _448 => _448.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _449 => _449.webhook])) return [];
|
|
12202
12263
|
const lines = [];
|
|
12203
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12264
|
+
if (_optionalChain([status, 'optionalAccess', _450 => _450.cron]) || cron.schedule) {
|
|
12204
12265
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12205
12266
|
lines.push(
|
|
12206
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12267
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _451 => _451.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12207
12268
|
);
|
|
12208
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12269
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _452 => _452.cron]) === "active") {
|
|
12209
12270
|
lines.push(
|
|
12210
12271
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12211
12272
|
);
|
|
12212
12273
|
}
|
|
12213
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12274
|
+
if (_optionalChain([status, 'optionalAccess', _453 => _453.blockedReason])) {
|
|
12214
12275
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12215
12276
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12216
12277
|
lines.push(
|
|
@@ -12226,7 +12287,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12226
12287
|
);
|
|
12227
12288
|
}
|
|
12228
12289
|
}
|
|
12229
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12290
|
+
if (_optionalChain([status, 'optionalAccess', _454 => _454.webhook])) {
|
|
12230
12291
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12231
12292
|
}
|
|
12232
12293
|
return lines;
|
|
@@ -12234,11 +12295,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12234
12295
|
function triggerStatusFromMetadata(value) {
|
|
12235
12296
|
const metadata = readRecord(value);
|
|
12236
12297
|
return {
|
|
12237
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12238
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12239
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12240
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12241
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12298
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _455 => _455.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12299
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _456 => _456.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12300
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _457 => _457.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12301
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _458 => _458.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12302
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _459 => _459.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12242
12303
|
};
|
|
12243
12304
|
}
|
|
12244
12305
|
function printPublishReceipt(input) {
|
|
@@ -12270,7 +12331,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12270
12331
|
async function handlePlayCheck(args) {
|
|
12271
12332
|
const options = parsePlayCheckOptions(args);
|
|
12272
12333
|
if (!isFileTarget(options.target)) {
|
|
12273
|
-
const client = new (0,
|
|
12334
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
12274
12335
|
try {
|
|
12275
12336
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12276
12337
|
command: "check"
|
|
@@ -12299,7 +12360,7 @@ async function handlePlayCheck(args) {
|
|
|
12299
12360
|
},
|
|
12300
12361
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12301
12362
|
};
|
|
12302
|
-
|
|
12363
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, result, {
|
|
12303
12364
|
json: options.jsonOutput,
|
|
12304
12365
|
fields: options.jsonFields,
|
|
12305
12366
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12309,7 +12370,7 @@ async function handlePlayCheck(args) {
|
|
|
12309
12370
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12310
12371
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12311
12372
|
if (options.jsonOutput) {
|
|
12312
|
-
|
|
12373
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
12313
12374
|
{
|
|
12314
12375
|
kind: "play_check",
|
|
12315
12376
|
checked: "named_contract",
|
|
@@ -12342,16 +12403,16 @@ async function handlePlayCheck(args) {
|
|
|
12342
12403
|
);
|
|
12343
12404
|
}
|
|
12344
12405
|
const primary = outcomes.find(
|
|
12345
|
-
(outcome) => outcome.exportName ===
|
|
12406
|
+
(outcome) => outcome.exportName === _chunkDKR7QPEOjs.PLAY_DEFAULT_EXPORT
|
|
12346
12407
|
);
|
|
12347
12408
|
const output = buildPlayCheckOutput({
|
|
12348
12409
|
outcomes,
|
|
12349
12410
|
target: options.target,
|
|
12350
12411
|
full: options.full,
|
|
12351
12412
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12352
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12413
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _460 => _460.result, 'access', _461 => _461.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12353
12414
|
});
|
|
12354
|
-
|
|
12415
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, output, {
|
|
12355
12416
|
json: options.jsonOutput,
|
|
12356
12417
|
fields: options.jsonFields,
|
|
12357
12418
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12359,12 +12420,12 @@ async function handlePlayCheck(args) {
|
|
|
12359
12420
|
return output.valid ? 0 : 1;
|
|
12360
12421
|
}
|
|
12361
12422
|
function resolvePlayCheckExportNames(sourceCode) {
|
|
12362
|
-
const exports =
|
|
12363
|
-
if (!exports || exports.length === 0) return [
|
|
12423
|
+
const exports = _chunkDKR7QPEOjs.listPlayFileExports.call(void 0, sourceCode);
|
|
12424
|
+
if (!exports || exports.length === 0) return [_chunkDKR7QPEOjs.PLAY_DEFAULT_EXPORT];
|
|
12364
12425
|
return exports.map((entry) => entry.name);
|
|
12365
12426
|
}
|
|
12366
12427
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12367
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
12428
|
+
const rawEdition = _optionalChain([process, 'access', _462 => _462.env, 'access', _463 => _463.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _464 => _464.trim, 'call', _465 => _465()]);
|
|
12368
12429
|
if (!rawEdition) return artifact;
|
|
12369
12430
|
if (!/^\d+$/.test(rawEdition)) {
|
|
12370
12431
|
throw new Error(
|
|
@@ -12405,7 +12466,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12405
12466
|
}
|
|
12406
12467
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
12407
12468
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
12408
|
-
const client = new (0,
|
|
12469
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
12409
12470
|
const integrationMode = resolveEvalIntegrationMode();
|
|
12410
12471
|
const checked = await checkLocalPlayGraph({
|
|
12411
12472
|
client,
|
|
@@ -12415,7 +12476,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12415
12476
|
integrationMode,
|
|
12416
12477
|
prepareArtifact: artifactForProductionCompatibilityCheck
|
|
12417
12478
|
});
|
|
12418
|
-
const importedPlayName = _optionalChain([checked, 'access',
|
|
12479
|
+
const importedPlayName = _optionalChain([checked, 'access', _466 => _466.failedChild, 'optionalAccess', _467 => _467.playName]);
|
|
12419
12480
|
const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
|
|
12420
12481
|
const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
|
|
12421
12482
|
const errors = [
|
|
@@ -12431,7 +12492,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12431
12492
|
valid,
|
|
12432
12493
|
errors: valid ? checked.result.errors : addPlayCheckRepairHints({
|
|
12433
12494
|
errors,
|
|
12434
|
-
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access',
|
|
12495
|
+
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _468 => _468.failedChild, 'optionalAccess', _469 => _469.sourceCode]), () => ( graph.root.sourceCode))
|
|
12435
12496
|
}),
|
|
12436
12497
|
...checked.failedChild && checked.result.issues ? {
|
|
12437
12498
|
issues: checked.result.issues.map((issue) => ({
|
|
@@ -12458,11 +12519,11 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12458
12519
|
throw new Error("Expected a file-backed play run target.");
|
|
12459
12520
|
}
|
|
12460
12521
|
let client;
|
|
12461
|
-
let cliAdmission =
|
|
12522
|
+
let cliAdmission = _chunk3NRZFMX4js.usesInlinePlayAdmission.call(void 0,
|
|
12462
12523
|
"plays run",
|
|
12463
12524
|
process.argv.slice(2)
|
|
12464
12525
|
);
|
|
12465
|
-
const progress = _nullishCoalesce(
|
|
12526
|
+
const progress = _nullishCoalesce(_chunkRLQIGBFKjs.getActiveCliProgress.call(void 0, ), () => ( _chunkRLQIGBFKjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12466
12527
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
12467
12528
|
progress.phase("compiling play");
|
|
12468
12529
|
const sourceCode = traceCliSync(
|
|
@@ -12479,13 +12540,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12479
12540
|
}
|
|
12480
12541
|
let graph;
|
|
12481
12542
|
try {
|
|
12482
|
-
graph = await
|
|
12543
|
+
graph = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12483
12544
|
"cli.play_file_bundle_graph",
|
|
12484
12545
|
{ targetKind: "file" },
|
|
12485
12546
|
() => collectBundledPlayGraph(
|
|
12486
12547
|
absolutePlayPath,
|
|
12487
12548
|
options.profile,
|
|
12488
|
-
|
|
12549
|
+
_chunkDKR7QPEOjs.PLAY_DEFAULT_EXPORT,
|
|
12489
12550
|
{ cache: !options.dryRun }
|
|
12490
12551
|
)
|
|
12491
12552
|
);
|
|
@@ -12493,14 +12554,14 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12493
12554
|
if (options.dryRun) {
|
|
12494
12555
|
progress.complete();
|
|
12495
12556
|
renderLocalPlayExecutionPlan(
|
|
12496
|
-
|
|
12557
|
+
_chunkYKNULB7Vjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
|
|
12497
12558
|
{ dryRun: true, json: options.jsonOutput }
|
|
12498
12559
|
);
|
|
12499
12560
|
return 0;
|
|
12500
12561
|
}
|
|
12501
|
-
client = new (0,
|
|
12562
|
+
client = new (0, _chunkXP7FAYLNjs.DeeplineClient)(playRunClientOptions(options));
|
|
12502
12563
|
if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
|
|
12503
|
-
await
|
|
12564
|
+
await _chunk3NRZFMX4js.checkPlayRunCompatibility.call(void 0,
|
|
12504
12565
|
client.baseUrl,
|
|
12505
12566
|
options.maintenancePolicy
|
|
12506
12567
|
);
|
|
@@ -12513,7 +12574,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12513
12574
|
});
|
|
12514
12575
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12515
12576
|
if (canDeferCompilerManifest) {
|
|
12516
|
-
|
|
12577
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
12517
12578
|
phase: "cli.play_file_compile_manifests",
|
|
12518
12579
|
ms: 0,
|
|
12519
12580
|
ok: true,
|
|
@@ -12522,7 +12583,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12522
12583
|
reason: "validated_by_run_route"
|
|
12523
12584
|
});
|
|
12524
12585
|
} else {
|
|
12525
|
-
await
|
|
12586
|
+
await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12526
12587
|
"cli.play_file_compile_manifests",
|
|
12527
12588
|
{ targetKind: "file", skipped: false },
|
|
12528
12589
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
@@ -12543,13 +12604,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12543
12604
|
if (bundleResult.importedPlayDependencies.length > 0) {
|
|
12544
12605
|
try {
|
|
12545
12606
|
renderLocalPlayExecutionPlan(
|
|
12546
|
-
|
|
12607
|
+
_chunkYKNULB7Vjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
|
|
12547
12608
|
);
|
|
12548
12609
|
progress.phase("pinning imported plays");
|
|
12549
|
-
graph = await
|
|
12610
|
+
graph = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12550
12611
|
"cli.play_file_pin_imports",
|
|
12551
12612
|
{ targetKind: "file" },
|
|
12552
|
-
() =>
|
|
12613
|
+
() => _chunkYKNULB7Vjs.pinLocalPlayImports.call(void 0, client, graph)
|
|
12553
12614
|
);
|
|
12554
12615
|
bundleResult = graph.root;
|
|
12555
12616
|
} catch (error) {
|
|
@@ -12563,9 +12624,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12563
12624
|
);
|
|
12564
12625
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
12565
12626
|
const fileInputBindings = _chunkJDMR33HSjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
12566
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
12627
|
+
_optionalChain([compilerManifest, 'optionalAccess', _470 => _470.staticPipeline])
|
|
12567
12628
|
);
|
|
12568
|
-
const stagedFileInputs = await
|
|
12629
|
+
const stagedFileInputs = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12569
12630
|
"cli.play_stage_inputs",
|
|
12570
12631
|
{
|
|
12571
12632
|
targetKind: "file",
|
|
@@ -12612,7 +12673,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12612
12673
|
};
|
|
12613
12674
|
if (options.watch) {
|
|
12614
12675
|
progress.phase("starting run");
|
|
12615
|
-
const finalStatus = await
|
|
12676
|
+
const finalStatus = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12616
12677
|
"cli.play_start_watch",
|
|
12617
12678
|
{ targetKind: "file", playName },
|
|
12618
12679
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12626,9 +12687,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12626
12687
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12627
12688
|
open: options.open,
|
|
12628
12689
|
progress,
|
|
12629
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12630
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12631
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12690
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _471 => _471.onRunStarted]),
|
|
12691
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _472 => _472.onSubmission]),
|
|
12692
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _473 => _473.onRunAdmitted]),
|
|
12632
12693
|
maintenancePolicy: options.maintenancePolicy,
|
|
12633
12694
|
...options.runIdFile ? {} : { fullJson: options.fullJson },
|
|
12634
12695
|
...cliAdmission ? {
|
|
@@ -12656,8 +12717,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12656
12717
|
),
|
|
12657
12718
|
options
|
|
12658
12719
|
);
|
|
12659
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12660
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12720
|
+
_optionalChain([hooks, 'optionalAccess', _474 => _474.onTerminalStatus, 'optionalCall', _475 => _475(outputStatus)]);
|
|
12721
|
+
if (_optionalChain([hooks, 'optionalAccess', _476 => _476.writeResult])) {
|
|
12661
12722
|
await hooks.writeResult(client, outputStatus);
|
|
12662
12723
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12663
12724
|
}
|
|
@@ -12672,20 +12733,20 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12672
12733
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12673
12734
|
}
|
|
12674
12735
|
progress.phase("starting run");
|
|
12675
|
-
const started = await
|
|
12736
|
+
const started = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12676
12737
|
"cli.play_start_unwatched",
|
|
12677
12738
|
{ targetKind: "file", playName },
|
|
12678
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12739
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _477 => _477.onSubmission]) }).catch(async (error) => {
|
|
12679
12740
|
throw await normalizePlayStartError(client, error, playName);
|
|
12680
12741
|
})
|
|
12681
12742
|
);
|
|
12682
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12683
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12743
|
+
await _optionalChain([hooks, 'optionalAccess', _478 => _478.onRunStarted, 'optionalCall', _479 => _479(started.workflowId)]);
|
|
12744
|
+
await _optionalChain([hooks, 'optionalAccess', _480 => _480.onRunAdmitted, 'optionalCall', _481 => _481(started.workflowId)]);
|
|
12684
12745
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12685
12746
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12686
12747
|
progress.phase("started run");
|
|
12687
12748
|
progress.complete();
|
|
12688
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12749
|
+
if (_optionalChain([hooks, 'optionalAccess', _482 => _482.writeStarted])) {
|
|
12689
12750
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12690
12751
|
return 0;
|
|
12691
12752
|
}
|
|
@@ -12712,7 +12773,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
12712
12773
|
if (input.selector === "latest") {
|
|
12713
12774
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
12714
12775
|
const latest = versions[0];
|
|
12715
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
12776
|
+
if (!_optionalChain([latest, 'optionalAccess', _483 => _483._id])) {
|
|
12716
12777
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
12717
12778
|
}
|
|
12718
12779
|
return latest._id;
|
|
@@ -12723,12 +12784,12 @@ async function handleNamedRun(options, hooks) {
|
|
|
12723
12784
|
if (options.target.kind !== "name") {
|
|
12724
12785
|
throw new Error("Expected a named play run target.");
|
|
12725
12786
|
}
|
|
12726
|
-
const client = new (0,
|
|
12727
|
-
let cliAdmission =
|
|
12787
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)(playRunClientOptions(options));
|
|
12788
|
+
let cliAdmission = _chunk3NRZFMX4js.usesInlinePlayAdmission.call(void 0,
|
|
12728
12789
|
"plays run",
|
|
12729
12790
|
process.argv.slice(2)
|
|
12730
12791
|
);
|
|
12731
|
-
const progress = _nullishCoalesce(
|
|
12792
|
+
const progress = _nullishCoalesce(_chunkRLQIGBFKjs.getActiveCliProgress.call(void 0, ), () => ( _chunkRLQIGBFKjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12732
12793
|
const playName = options.target.name;
|
|
12733
12794
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
12734
12795
|
try {
|
|
@@ -12743,14 +12804,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12743
12804
|
});
|
|
12744
12805
|
const playDetail = needsPlayDefinition ? await (async () => {
|
|
12745
12806
|
progress.phase("loading play definition");
|
|
12746
|
-
return
|
|
12807
|
+
return _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12747
12808
|
"cli.play_load_definition",
|
|
12748
12809
|
{ targetKind: "name", playName, skipped: false },
|
|
12749
12810
|
() => assertCanonicalNamedPlayReference(client, playName, {
|
|
12750
12811
|
command: "run"
|
|
12751
12812
|
})
|
|
12752
12813
|
);
|
|
12753
|
-
})() : (
|
|
12814
|
+
})() : (_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
12754
12815
|
phase: "cli.play_load_definition",
|
|
12755
12816
|
ms: 0,
|
|
12756
12817
|
ok: true,
|
|
@@ -12759,7 +12820,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12759
12820
|
skipped: true
|
|
12760
12821
|
}), null);
|
|
12761
12822
|
progress.phase("selecting revision");
|
|
12762
|
-
const selectedRevisionId = await
|
|
12823
|
+
const selectedRevisionId = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12763
12824
|
"cli.play_select_revision",
|
|
12764
12825
|
{
|
|
12765
12826
|
targetKind: "name",
|
|
@@ -12784,10 +12845,10 @@ async function handleNamedRun(options, hooks) {
|
|
|
12784
12845
|
..._chunkJDMR33HSjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
|
|
12785
12846
|
] : [];
|
|
12786
12847
|
if (cliAdmission && fileInputBindings.length > 0) {
|
|
12787
|
-
await
|
|
12848
|
+
await _chunk3NRZFMX4js.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
|
|
12788
12849
|
cliAdmission = false;
|
|
12789
12850
|
}
|
|
12790
|
-
const stagedFileInputs = await
|
|
12851
|
+
const stagedFileInputs = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12791
12852
|
"cli.play_stage_inputs",
|
|
12792
12853
|
{
|
|
12793
12854
|
targetKind: "name",
|
|
@@ -12831,7 +12892,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12831
12892
|
});
|
|
12832
12893
|
if (options.watch) {
|
|
12833
12894
|
progress.phase("starting run");
|
|
12834
|
-
const finalStatus = await
|
|
12895
|
+
const finalStatus = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12835
12896
|
"cli.play_start_watch",
|
|
12836
12897
|
{ targetKind: "name", playName },
|
|
12837
12898
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12845,9 +12906,9 @@ async function handleNamedRun(options, hooks) {
|
|
|
12845
12906
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12846
12907
|
open: options.open,
|
|
12847
12908
|
progress,
|
|
12848
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12849
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12850
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12909
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _484 => _484.onRunStarted]),
|
|
12910
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _485 => _485.onSubmission]),
|
|
12911
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunAdmitted]),
|
|
12851
12912
|
maintenancePolicy: options.maintenancePolicy,
|
|
12852
12913
|
...options.runIdFile ? {} : { fullJson: options.fullJson },
|
|
12853
12914
|
...cliAdmission ? {
|
|
@@ -12878,8 +12939,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
12878
12939
|
options,
|
|
12879
12940
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
12880
12941
|
);
|
|
12881
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12882
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12942
|
+
_optionalChain([hooks, 'optionalAccess', _487 => _487.onTerminalStatus, 'optionalCall', _488 => _488(outputStatus)]);
|
|
12943
|
+
if (_optionalChain([hooks, 'optionalAccess', _489 => _489.writeResult])) {
|
|
12883
12944
|
await hooks.writeResult(client, outputStatus);
|
|
12884
12945
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12885
12946
|
}
|
|
@@ -12894,22 +12955,22 @@ async function handleNamedRun(options, hooks) {
|
|
|
12894
12955
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12895
12956
|
}
|
|
12896
12957
|
progress.phase("starting run");
|
|
12897
|
-
const started = await
|
|
12958
|
+
const started = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
12898
12959
|
"cli.play_start_unwatched",
|
|
12899
12960
|
{ targetKind: "name", playName },
|
|
12900
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12961
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _490 => _490.onSubmission]) }).catch(async (error) => {
|
|
12901
12962
|
throw await normalizePlayStartError(client, error, playName, {
|
|
12902
12963
|
suggestMissingPlay: true
|
|
12903
12964
|
});
|
|
12904
12965
|
})
|
|
12905
12966
|
);
|
|
12906
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12907
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12967
|
+
await _optionalChain([hooks, 'optionalAccess', _491 => _491.onRunStarted, 'optionalCall', _492 => _492(started.workflowId)]);
|
|
12968
|
+
await _optionalChain([hooks, 'optionalAccess', _493 => _493.onRunAdmitted, 'optionalCall', _494 => _494(started.workflowId)]);
|
|
12908
12969
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12909
12970
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12910
12971
|
progress.phase("started run");
|
|
12911
12972
|
progress.complete();
|
|
12912
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12973
|
+
if (_optionalChain([hooks, 'optionalAccess', _495 => _495.writeStarted])) {
|
|
12913
12974
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12914
12975
|
return 0;
|
|
12915
12976
|
}
|
|
@@ -12934,12 +12995,12 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12934
12995
|
const compact = compactPlayStatus(status);
|
|
12935
12996
|
const errors = Array.isArray(compact.errors) ? compact.errors : [];
|
|
12936
12997
|
const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
|
|
12937
|
-
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access',
|
|
12998
|
+
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _496 => _496.progress, 'optionalAccess', _497 => _497.error]))), () => ( "Play failed. Inspect the run for details."))
|
|
12938
12999
|
})) : null;
|
|
12939
13000
|
const next = { status: `deepline runs get ${status.runId}` };
|
|
12940
|
-
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access',
|
|
13001
|
+
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _498 => _498.exec, 'call', _499 => _499(status.runId), 'optionalAccess', _500 => _500[1]]), () => ( extractRunPlayName(status))), () => ( null));
|
|
12941
13002
|
if (!terminal) {
|
|
12942
|
-
|
|
13003
|
+
_chunkAIPTW3EKjs.writeExecutionOutput.call(void 0,
|
|
12943
13004
|
{ id: status.runId, status: status.status, next },
|
|
12944
13005
|
output
|
|
12945
13006
|
);
|
|
@@ -12998,11 +13059,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12998
13059
|
Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
|
|
12999
13060
|
);
|
|
13000
13061
|
};
|
|
13001
|
-
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call',
|
|
13062
|
+
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _501 => _501(status), 'optionalAccess', _502 => _502.outputs]));
|
|
13002
13063
|
const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
|
|
13003
13064
|
Object.entries(packagedOutputs).map(([key, value]) => [
|
|
13004
13065
|
key,
|
|
13005
|
-
_optionalChain([readRecord, 'call',
|
|
13066
|
+
_optionalChain([readRecord, 'call', _503 => _503(value), 'optionalAccess', _504 => _504.kind]) === "value" ? _optionalChain([readRecord, 'call', _505 => _505(value), 'optionalAccess', _506 => _506.value]) : value
|
|
13006
13067
|
])
|
|
13007
13068
|
) : null;
|
|
13008
13069
|
let data = materialize(returned);
|
|
@@ -13014,10 +13075,10 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13014
13075
|
};
|
|
13015
13076
|
}
|
|
13016
13077
|
const byRows = new Map(collections.map((c) => [c.rows, c]));
|
|
13017
|
-
const allCollections =
|
|
13078
|
+
const allCollections = _chunkAIPTW3EKjs.outputCollections.call(void 0, data).map(
|
|
13018
13079
|
(collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
|
|
13019
13080
|
);
|
|
13020
|
-
|
|
13081
|
+
_chunkAIPTW3EKjs.writeExecutionOutput.call(void 0,
|
|
13021
13082
|
{
|
|
13022
13083
|
id: status.runId,
|
|
13023
13084
|
status: status.status,
|
|
@@ -13025,7 +13086,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13025
13086
|
...allCollections.length ? { collections: allCollections } : {},
|
|
13026
13087
|
complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
|
|
13027
13088
|
error,
|
|
13028
|
-
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access',
|
|
13089
|
+
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _507 => _507.billing, 'optionalAccess', _508 => _508.totalCredits]))), () => ( null)),
|
|
13029
13090
|
...playName ? { page: _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) } : {},
|
|
13030
13091
|
warnings: [
|
|
13031
13092
|
...buildRunWarnings(status, null),
|
|
@@ -13038,7 +13099,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13038
13099
|
}
|
|
13039
13100
|
var TOOL_EXECUTION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
13040
13101
|
async function handlePlayRun(args, hooks) {
|
|
13041
|
-
const parsedOptions = Array.isArray(args) ?
|
|
13102
|
+
const parsedOptions = Array.isArray(args) ? _chunkYFDTF2XCjs.parsePlayRunOptions.call(void 0, args) : args;
|
|
13042
13103
|
const options = parsedOptions.runIdFile ? {
|
|
13043
13104
|
...parsedOptions,
|
|
13044
13105
|
runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
|
|
@@ -13055,7 +13116,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13055
13116
|
JSON.stringify({
|
|
13056
13117
|
version: 1,
|
|
13057
13118
|
admissionState: "submitted_unknown",
|
|
13058
|
-
baseUrl: new (0,
|
|
13119
|
+
baseUrl: new (0, _chunkXP7FAYLNjs.DeeplineClient)().baseUrl,
|
|
13059
13120
|
...intent
|
|
13060
13121
|
})
|
|
13061
13122
|
);
|
|
@@ -13067,7 +13128,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13067
13128
|
} finally {
|
|
13068
13129
|
await removeRunIdTempFile(tempPath);
|
|
13069
13130
|
}
|
|
13070
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13131
|
+
await _optionalChain([hooks, 'optionalAccess', _509 => _509.onSubmission, 'optionalCall', _510 => _510(intent)]);
|
|
13071
13132
|
},
|
|
13072
13133
|
onRunStarted: async (runId) => {
|
|
13073
13134
|
try {
|
|
@@ -13078,7 +13139,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13078
13139
|
{ cause: error }
|
|
13079
13140
|
);
|
|
13080
13141
|
}
|
|
13081
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13142
|
+
await _optionalChain([hooks, 'optionalAccess', _511 => _511.onRunStarted, 'optionalCall', _512 => _512(runId)]);
|
|
13082
13143
|
},
|
|
13083
13144
|
onRunAdmitted: async (runId) => {
|
|
13084
13145
|
try {
|
|
@@ -13091,7 +13152,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13091
13152
|
{ cause: error }
|
|
13092
13153
|
);
|
|
13093
13154
|
}
|
|
13094
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13155
|
+
await _optionalChain([hooks, 'optionalAccess', _513 => _513.onRunAdmitted, 'optionalCall', _514 => _514(runId)]);
|
|
13095
13156
|
}
|
|
13096
13157
|
} : hooks;
|
|
13097
13158
|
if (options.target.kind === "file") {
|
|
@@ -13170,10 +13231,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13170
13231
|
...buildRunActivityTextLines(run),
|
|
13171
13232
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13172
13233
|
];
|
|
13173
|
-
if (_optionalChain([overview, 'access',
|
|
13234
|
+
if (_optionalChain([overview, 'access', _515 => _515.runStatus, 'optionalAccess', _516 => _516.available]) === false)
|
|
13174
13235
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13175
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13176
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13236
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _517 => _517(run), 'optionalAccess', _518 => _518.work]));
|
|
13237
|
+
if (work && !_optionalChain([overview, 'access', _519 => _519.runStatus, 'optionalAccess', _520 => _520.available]))
|
|
13177
13238
|
lines.push(
|
|
13178
13239
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13179
13240
|
);
|
|
@@ -13224,7 +13285,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13224
13285
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13225
13286
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13226
13287
|
...overview.failedLogs.entries,
|
|
13227
|
-
..._optionalChain([overview, 'access',
|
|
13288
|
+
..._optionalChain([overview, 'access', _521 => _521.failedLogs, 'access', _522 => _522.next, 'optionalAccess', _523 => _523.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13228
13289
|
]
|
|
13229
13290
|
});
|
|
13230
13291
|
sections.push({
|
|
@@ -13284,7 +13345,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13284
13345
|
);
|
|
13285
13346
|
return `${lines.join("\n")}
|
|
13286
13347
|
|
|
13287
|
-
${
|
|
13348
|
+
${_chunkSTLJYWUCjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13288
13349
|
}
|
|
13289
13350
|
var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
|
|
13290
13351
|
async function withRunReadTiming(command, stage, enabled, action) {
|
|
@@ -13295,7 +13356,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13295
13356
|
const progressTimer = setInterval(() => {
|
|
13296
13357
|
console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
|
|
13297
13358
|
}, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
|
|
13298
|
-
_optionalChain([progressTimer, 'access',
|
|
13359
|
+
_optionalChain([progressTimer, 'access', _524 => _524.unref, 'optionalCall', _525 => _525()]);
|
|
13299
13360
|
try {
|
|
13300
13361
|
const result = await action();
|
|
13301
13362
|
console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
|
|
@@ -13308,7 +13369,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13308
13369
|
}
|
|
13309
13370
|
}
|
|
13310
13371
|
async function handleRunGet(args) {
|
|
13311
|
-
const selection =
|
|
13372
|
+
const selection = _chunkSTLJYWUCjs.parseJsonFields.call(void 0,
|
|
13312
13373
|
args,
|
|
13313
13374
|
args.includes("--config") ? "config" : "get"
|
|
13314
13375
|
);
|
|
@@ -13321,7 +13382,7 @@ async function handleRunGet(args) {
|
|
|
13321
13382
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13322
13383
|
return 1;
|
|
13323
13384
|
}
|
|
13324
|
-
const client = new (0,
|
|
13385
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
13325
13386
|
const timing = args.includes("--timing");
|
|
13326
13387
|
if (args.includes("--web-url")) {
|
|
13327
13388
|
const status2 = await withRunReadTiming(
|
|
@@ -13336,7 +13397,7 @@ async function handleRunGet(args) {
|
|
|
13336
13397
|
return 1;
|
|
13337
13398
|
}
|
|
13338
13399
|
const dashboardUrl2 = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13339
|
-
|
|
13400
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
13340
13401
|
{ dashboardUrl: dashboardUrl2 },
|
|
13341
13402
|
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13342
13403
|
` }
|
|
@@ -13361,7 +13422,7 @@ async function handleRunGet(args) {
|
|
|
13361
13422
|
"This server does not support recorded configuration reads."
|
|
13362
13423
|
);
|
|
13363
13424
|
}
|
|
13364
|
-
|
|
13425
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
13365
13426
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13366
13427
|
{ json: true, fields: selection.fields }
|
|
13367
13428
|
);
|
|
@@ -13374,7 +13435,7 @@ async function handleRunGet(args) {
|
|
|
13374
13435
|
timing,
|
|
13375
13436
|
() => client.getRunInput(runId)
|
|
13376
13437
|
);
|
|
13377
|
-
|
|
13438
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13378
13439
|
return 0;
|
|
13379
13440
|
}
|
|
13380
13441
|
const full = args.includes("--full");
|
|
@@ -13387,7 +13448,7 @@ async function handleRunGet(args) {
|
|
|
13387
13448
|
failedLogs: args.includes("--log-failed")
|
|
13388
13449
|
})
|
|
13389
13450
|
);
|
|
13390
|
-
if (status.package)
|
|
13451
|
+
if (status.package) _chunkAIPTW3EKjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13391
13452
|
if (!status.package) {
|
|
13392
13453
|
const legacyStatus = full ? await withRunReadTiming(
|
|
13393
13454
|
"runs get",
|
|
@@ -13400,8 +13461,8 @@ async function handleRunGet(args) {
|
|
|
13400
13461
|
) : status;
|
|
13401
13462
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13402
13463
|
const legacyDashboardUrl = legacyPlayName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13403
|
-
if (
|
|
13404
|
-
|
|
13464
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
13465
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
13405
13466
|
{
|
|
13406
13467
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13407
13468
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
@@ -13411,7 +13472,7 @@ async function handleRunGet(args) {
|
|
|
13411
13472
|
} else {
|
|
13412
13473
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13413
13474
|
if (legacyDashboardUrl)
|
|
13414
|
-
|
|
13475
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
13415
13476
|
{ dashboardUrl: legacyDashboardUrl },
|
|
13416
13477
|
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13417
13478
|
` }
|
|
@@ -13441,10 +13502,10 @@ async function handleRunGet(args) {
|
|
|
13441
13502
|
)
|
|
13442
13503
|
]);
|
|
13443
13504
|
const hitLines = formatRunHitsLines(hits);
|
|
13444
|
-
const json =
|
|
13505
|
+
const json = _chunkSTLJYWUCjs.argsWantJson.call(void 0, args);
|
|
13445
13506
|
const playName = resolveRunPlayName(status, runId);
|
|
13446
13507
|
const dashboardUrl = playName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13447
|
-
|
|
13508
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
13448
13509
|
{
|
|
13449
13510
|
...overview,
|
|
13450
13511
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13548,9 +13609,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13548
13609
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13549
13610
|
return 1;
|
|
13550
13611
|
}
|
|
13551
|
-
const status = await new (0,
|
|
13552
|
-
if (
|
|
13553
|
-
|
|
13612
|
+
const status = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().runs.status(runId);
|
|
13613
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
13614
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13554
13615
|
return 0;
|
|
13555
13616
|
}
|
|
13556
13617
|
if (!status.available) {
|
|
@@ -13590,7 +13651,7 @@ async function handleRunsRerun(args) {
|
|
|
13590
13651
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13591
13652
|
return 1;
|
|
13592
13653
|
}
|
|
13593
|
-
const options = { json:
|
|
13654
|
+
const options = { json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args) };
|
|
13594
13655
|
for (let index = 0; index < args.length; index += 1) {
|
|
13595
13656
|
if (args[index] === "--idempotency-key") {
|
|
13596
13657
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13656,8 +13717,8 @@ ${usage2}
|
|
|
13656
13717
|
Discover Plays: ${next.discover}
|
|
13657
13718
|
Active runs: ${next.running}`
|
|
13658
13719
|
);
|
|
13659
|
-
if (
|
|
13660
|
-
|
|
13720
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
13721
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
13661
13722
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13662
13723
|
{ json: true }
|
|
13663
13724
|
);
|
|
@@ -13672,7 +13733,7 @@ Active runs: ${next.running}`
|
|
|
13672
13733
|
console.error("--offset requires --play.");
|
|
13673
13734
|
return 1;
|
|
13674
13735
|
}
|
|
13675
|
-
const client = new (0,
|
|
13736
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
13676
13737
|
const page = await withRunReadTiming(
|
|
13677
13738
|
"runs list",
|
|
13678
13739
|
"run inventory",
|
|
@@ -13707,7 +13768,7 @@ Active runs: ${next.running}`
|
|
|
13707
13768
|
executionTime: run.executionTime,
|
|
13708
13769
|
billingTotalCredits: run.billingTotalCredits,
|
|
13709
13770
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
13710
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
13771
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _526 => _526.memo, 'optionalAccess', _527 => _527.playName]))), () => ( playName)), () => ( null)),
|
|
13711
13772
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
13712
13773
|
}));
|
|
13713
13774
|
const lines = runs.length === 0 ? [
|
|
@@ -13739,14 +13800,14 @@ Active runs: ${next.running}`
|
|
|
13739
13800
|
return lines2.join("\n");
|
|
13740
13801
|
});
|
|
13741
13802
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
13742
|
-
const nextPage = page.hasMore && playName ? `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}${nodeId ? ` --node ${_chunkAID3OYVJjs.shellQuote.call(void 0, nodeId)}` : ""}${statusFilter ? ` --status ${_chunkAID3OYVJjs.shellQuote.call(void 0, statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset}${
|
|
13803
|
+
const nextPage = page.hasMore && playName ? `deepline runs list --play ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}${nodeId ? ` --node ${_chunkAID3OYVJjs.shellQuote.call(void 0, nodeId)}` : ""}${statusFilter ? ` --status ${_chunkAID3OYVJjs.shellQuote.call(void 0, statusFilter)}` : ""} --limit ${_nullishCoalesce(_nullishCoalesce(page.limit, () => ( limit)), () => ( 20))} --offset ${nextOffset}${_chunkSTLJYWUCjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
|
|
13743
13804
|
if (page.hasMore) {
|
|
13744
13805
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
13745
13806
|
lines.push(
|
|
13746
13807
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
13747
13808
|
);
|
|
13748
13809
|
}
|
|
13749
|
-
|
|
13810
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
13750
13811
|
{
|
|
13751
13812
|
runs,
|
|
13752
13813
|
count: runs.length,
|
|
@@ -13756,11 +13817,11 @@ Active runs: ${next.running}`
|
|
|
13756
13817
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
13757
13818
|
next: {
|
|
13758
13819
|
page: nextPage,
|
|
13759
|
-
get: _optionalChain([runs, 'access',
|
|
13820
|
+
get: _optionalChain([runs, 'access', _528 => _528[0], 'optionalAccess', _529 => _529.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
13760
13821
|
},
|
|
13761
13822
|
render: { sections: [{ title: "runs", lines }] }
|
|
13762
13823
|
},
|
|
13763
|
-
{ json:
|
|
13824
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args) }
|
|
13764
13825
|
);
|
|
13765
13826
|
return 0;
|
|
13766
13827
|
}
|
|
@@ -13790,7 +13851,7 @@ async function handleRunTail(args) {
|
|
|
13790
13851
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13791
13852
|
return 1;
|
|
13792
13853
|
}
|
|
13793
|
-
const parsed =
|
|
13854
|
+
const parsed = _chunkN62MS3XJjs.parseLogLevel.call(void 0, value);
|
|
13794
13855
|
if (!parsed) {
|
|
13795
13856
|
console.error(
|
|
13796
13857
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13828,9 +13889,9 @@ async function handleRunTail(args) {
|
|
|
13828
13889
|
);
|
|
13829
13890
|
return 1;
|
|
13830
13891
|
}
|
|
13831
|
-
const client = new (0,
|
|
13892
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
13832
13893
|
const jsonLines = args.includes("--jsonl");
|
|
13833
|
-
const jsonOutput = !jsonLines &&
|
|
13894
|
+
const jsonOutput = !jsonLines && _chunkSTLJYWUCjs.argsWantJson.call(void 0, args);
|
|
13834
13895
|
const compact = args.includes("--compact");
|
|
13835
13896
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
13836
13897
|
const compactState = {
|
|
@@ -13911,7 +13972,7 @@ async function handleRunLogs(args) {
|
|
|
13911
13972
|
]);
|
|
13912
13973
|
const cursorIndex = args.indexOf("--cursor");
|
|
13913
13974
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
13914
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
13975
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkN62MS3XJjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
13915
13976
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
13916
13977
|
return handleRunEventSearch(args);
|
|
13917
13978
|
}
|
|
@@ -13945,7 +14006,7 @@ async function handleRunLogs(args) {
|
|
|
13945
14006
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13946
14007
|
return 1;
|
|
13947
14008
|
}
|
|
13948
|
-
const parsed =
|
|
14009
|
+
const parsed = _chunkN62MS3XJjs.parseLogLevel.call(void 0, value);
|
|
13949
14010
|
if (!parsed) {
|
|
13950
14011
|
console.error(
|
|
13951
14012
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13992,12 +14053,12 @@ async function handleRunLogs(args) {
|
|
|
13992
14053
|
);
|
|
13993
14054
|
return 1;
|
|
13994
14055
|
}
|
|
13995
|
-
const client = new (0,
|
|
14056
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
13996
14057
|
if (outPath) {
|
|
13997
14058
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
13998
|
-
const logs = result2.entries.filter((line) =>
|
|
14059
|
+
const logs = result2.entries.filter((line) => _chunkN62MS3XJjs.logLevelReaches.call(void 0, _chunkN62MS3XJjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkN62MS3XJjs.classifyLogLine.call(void 0, line).line);
|
|
13999
14060
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
14000
|
-
|
|
14061
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14001
14062
|
{
|
|
14002
14063
|
runId: result2.runId,
|
|
14003
14064
|
log_path: outPath,
|
|
@@ -14020,7 +14081,7 @@ async function handleRunLogs(args) {
|
|
|
14020
14081
|
]
|
|
14021
14082
|
}
|
|
14022
14083
|
},
|
|
14023
|
-
{ json:
|
|
14084
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args) }
|
|
14024
14085
|
);
|
|
14025
14086
|
return 0;
|
|
14026
14087
|
}
|
|
@@ -14051,7 +14112,7 @@ async function handleRunLogs(args) {
|
|
|
14051
14112
|
}
|
|
14052
14113
|
};
|
|
14053
14114
|
const text = buildRunLogsText(filteredResult);
|
|
14054
|
-
|
|
14115
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14055
14116
|
{
|
|
14056
14117
|
runId: result.runId,
|
|
14057
14118
|
totalCount: result.totalCount,
|
|
@@ -14075,7 +14136,7 @@ async function handleRunLogs(args) {
|
|
|
14075
14136
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14076
14137
|
},
|
|
14077
14138
|
{
|
|
14078
|
-
json:
|
|
14139
|
+
json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args),
|
|
14079
14140
|
text
|
|
14080
14141
|
}
|
|
14081
14142
|
);
|
|
@@ -14099,17 +14160,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14099
14160
|
);
|
|
14100
14161
|
}
|
|
14101
14162
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14102
|
-
(entry) =>
|
|
14163
|
+
(entry) => _chunkN62MS3XJjs.logLevelReaches.call(void 0, _chunkN62MS3XJjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14103
14164
|
);
|
|
14104
14165
|
const selected = matching.slice(-limit);
|
|
14105
14166
|
const olderMatchesExist = matching.length > selected.length;
|
|
14106
14167
|
return {
|
|
14107
14168
|
entries: selected.map((entry) => entry.line),
|
|
14108
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14109
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14169
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _530 => _530[0], 'optionalAccess', _531 => _531.seq]), () => ( null)),
|
|
14170
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _532 => _532.at, 'call', _533 => _533(-1), 'optionalAccess', _534 => _534.seq]), () => ( null)),
|
|
14110
14171
|
truncated: result.truncated || olderMatchesExist,
|
|
14111
14172
|
hasMore: olderMatchesExist,
|
|
14112
|
-
nextCursor: olderMatchesExist ?
|
|
14173
|
+
nextCursor: olderMatchesExist ? _chunkN62MS3XJjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14113
14174
|
};
|
|
14114
14175
|
}
|
|
14115
14176
|
async function handleRunEventSearch(args) {
|
|
@@ -14176,7 +14237,7 @@ ${usage2}`);
|
|
|
14176
14237
|
namespace,
|
|
14177
14238
|
...backend ? { backend } : {}
|
|
14178
14239
|
} : void 0;
|
|
14179
|
-
const client = new (0,
|
|
14240
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
14180
14241
|
const result = await client.runs.searchEvents({
|
|
14181
14242
|
...runId ? { runId } : {},
|
|
14182
14243
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14248,7 +14309,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14248
14309
|
"--limit",
|
|
14249
14310
|
String(limit)
|
|
14250
14311
|
].join(" ") : null;
|
|
14251
|
-
|
|
14312
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14252
14313
|
{
|
|
14253
14314
|
events,
|
|
14254
14315
|
nextCursor: result.nextCursor,
|
|
@@ -14259,19 +14320,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14259
14320
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14260
14321
|
},
|
|
14261
14322
|
{
|
|
14262
|
-
json:
|
|
14323
|
+
json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args),
|
|
14263
14324
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14264
14325
|
}
|
|
14265
14326
|
);
|
|
14266
14327
|
return 0;
|
|
14267
14328
|
}
|
|
14268
14329
|
function buildRunLogsText(result) {
|
|
14269
|
-
const lines = result.entries.map((line) =>
|
|
14330
|
+
const lines = result.entries.map((line) => _chunkN62MS3XJjs.classifyLogLine.call(void 0, line).line);
|
|
14270
14331
|
if (result.warning) {
|
|
14271
14332
|
if (lines.length > 0) lines.push("");
|
|
14272
14333
|
lines.push(`warning: ${result.warning}`);
|
|
14273
14334
|
lines.push(
|
|
14274
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14335
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _535 => _535.next, 'optionalAccess', _536 => _536.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14275
14336
|
);
|
|
14276
14337
|
}
|
|
14277
14338
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14300,7 +14361,7 @@ async function handleRunStop(args) {
|
|
|
14300
14361
|
reason = args[++index];
|
|
14301
14362
|
}
|
|
14302
14363
|
}
|
|
14303
|
-
const client = new (0,
|
|
14364
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
14304
14365
|
const result = await client.runs.stop(runId, { reason });
|
|
14305
14366
|
const state = resolveRunStopState(result);
|
|
14306
14367
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14315,7 +14376,7 @@ async function handleRunStop(args) {
|
|
|
14315
14376
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14316
14377
|
`inspect: deepline runs get ${runId} --full`
|
|
14317
14378
|
];
|
|
14318
|
-
|
|
14379
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14319
14380
|
{
|
|
14320
14381
|
...cancelling,
|
|
14321
14382
|
state,
|
|
@@ -14330,7 +14391,7 @@ async function handleRunStop(args) {
|
|
|
14330
14391
|
]
|
|
14331
14392
|
}
|
|
14332
14393
|
},
|
|
14333
|
-
{ json:
|
|
14394
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args) }
|
|
14334
14395
|
);
|
|
14335
14396
|
return 0;
|
|
14336
14397
|
}
|
|
@@ -14347,7 +14408,7 @@ async function handleRunStop(args) {
|
|
|
14347
14408
|
];
|
|
14348
14409
|
process.stderr.write(`${lines2.join("\n")}
|
|
14349
14410
|
`);
|
|
14350
|
-
|
|
14411
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14351
14412
|
{
|
|
14352
14413
|
...result,
|
|
14353
14414
|
render: {
|
|
@@ -14362,7 +14423,7 @@ async function handleRunStop(args) {
|
|
|
14362
14423
|
]
|
|
14363
14424
|
}
|
|
14364
14425
|
},
|
|
14365
|
-
{ json:
|
|
14426
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args) }
|
|
14366
14427
|
);
|
|
14367
14428
|
return 1;
|
|
14368
14429
|
}
|
|
@@ -14373,12 +14434,12 @@ async function handleRunStop(args) {
|
|
|
14373
14434
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14374
14435
|
] : []
|
|
14375
14436
|
];
|
|
14376
|
-
|
|
14437
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14377
14438
|
{
|
|
14378
14439
|
...result,
|
|
14379
14440
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14380
14441
|
},
|
|
14381
|
-
{ json:
|
|
14442
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args) }
|
|
14382
14443
|
);
|
|
14383
14444
|
return 0;
|
|
14384
14445
|
}
|
|
@@ -14428,18 +14489,18 @@ async function handleRunStopAll(args) {
|
|
|
14428
14489
|
reason = args[++index];
|
|
14429
14490
|
}
|
|
14430
14491
|
}
|
|
14431
|
-
const client = new (0,
|
|
14492
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
14432
14493
|
if (dryRun) {
|
|
14433
14494
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14434
14495
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14435
|
-
|
|
14496
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14436
14497
|
{
|
|
14437
14498
|
...result2,
|
|
14438
14499
|
render: {
|
|
14439
14500
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14440
14501
|
}
|
|
14441
14502
|
},
|
|
14442
|
-
{ json:
|
|
14503
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14443
14504
|
` }
|
|
14444
14505
|
);
|
|
14445
14506
|
return 0;
|
|
@@ -14452,17 +14513,17 @@ async function handleRunStopAll(args) {
|
|
|
14452
14513
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14453
14514
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14454
14515
|
];
|
|
14455
|
-
|
|
14516
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
14456
14517
|
{
|
|
14457
14518
|
...result,
|
|
14458
14519
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14459
14520
|
},
|
|
14460
|
-
{ json:
|
|
14521
|
+
{ json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args) }
|
|
14461
14522
|
);
|
|
14462
14523
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14463
14524
|
}
|
|
14464
14525
|
async function handleRunExport(args) {
|
|
14465
|
-
const selection =
|
|
14526
|
+
const selection = _chunkSTLJYWUCjs.parseJsonFields.call(void 0, args, "export");
|
|
14466
14527
|
args = selection.args;
|
|
14467
14528
|
const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--summary full|counts] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--allow-empty] [--json]";
|
|
14468
14529
|
let runId;
|
|
@@ -14533,17 +14594,17 @@ async function handleRunExport(args) {
|
|
|
14533
14594
|
"INVALID_ARGUMENT"
|
|
14534
14595
|
);
|
|
14535
14596
|
}
|
|
14536
|
-
const client = new (0,
|
|
14597
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
14537
14598
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14538
14599
|
assertRunExportStatusIdentity(status, runId);
|
|
14539
14600
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14540
|
-
const progress =
|
|
14601
|
+
const progress = _chunkRLQIGBFKjs.createCliProgress.call(void 0, !_chunkSTLJYWUCjs.argsWantJson.call(void 0, args));
|
|
14541
14602
|
try {
|
|
14542
14603
|
await waitForPlayCompletionByWatch({
|
|
14543
14604
|
client,
|
|
14544
14605
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14545
14606
|
workflowId: runId,
|
|
14546
|
-
jsonOutput:
|
|
14607
|
+
jsonOutput: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args),
|
|
14547
14608
|
emitLogs: false,
|
|
14548
14609
|
waitTimeoutMs,
|
|
14549
14610
|
startedAt: Date.now(),
|
|
@@ -14569,26 +14630,26 @@ async function handleRunExport(args) {
|
|
|
14569
14630
|
format,
|
|
14570
14631
|
summary
|
|
14571
14632
|
});
|
|
14572
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14573
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14633
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _537 => _537.rowsInfo, 'access', _538 => _538.source]), () => ( datasetPath)), () => ( null));
|
|
14634
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _539 => _539.currentTable]) ? {
|
|
14574
14635
|
code: "CURRENT_SHARED_DATASET",
|
|
14575
14636
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14576
14637
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14577
14638
|
} : null;
|
|
14578
14639
|
const navigation = buildRunNavigation(status);
|
|
14579
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14640
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _540 => _540.datasetInfo]);
|
|
14580
14641
|
const identity = navigation.datasets.find(
|
|
14581
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14642
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _541 => _541.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _542 => _542.tableNamespace])
|
|
14582
14643
|
);
|
|
14583
14644
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14584
14645
|
const exportCommand = runExportRetryCommand(
|
|
14585
14646
|
status.runId,
|
|
14586
14647
|
outPath,
|
|
14587
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14648
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _543 => _543.datasetPath]))),
|
|
14588
14649
|
{ format, summary }
|
|
14589
14650
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14590
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14591
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14651
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _544 => _544.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _545 => _545.path]), () => ( null)) };
|
|
14652
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _546 => _546.rowsInfo, 'access', _547 => _547.exportedRowOutcomes]);
|
|
14592
14653
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14593
14654
|
count: exportedRowOutcomes.failed,
|
|
14594
14655
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14608,17 +14669,17 @@ async function handleRunExport(args) {
|
|
|
14608
14669
|
...fileLocation,
|
|
14609
14670
|
format,
|
|
14610
14671
|
source,
|
|
14611
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14672
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _548 => _548.rowsInfo, 'access', _549 => _549.totalRows]), () => ( null)),
|
|
14612
14673
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14613
14674
|
...rowFailures ? { rowFailures } : {},
|
|
14614
|
-
columns:
|
|
14675
|
+
columns: _chunkAIPTW3EKjs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _550 => _550.rowsInfo, 'access', _551 => _551.columns]), () => ( []))),
|
|
14615
14676
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14616
14677
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14617
14678
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14618
14679
|
};
|
|
14619
14680
|
const lines = withRunNavigationLines(
|
|
14620
14681
|
[
|
|
14621
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14682
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _552 => _552.path]), () => ( outPath))}`,
|
|
14622
14683
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14623
14684
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14624
14685
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14645,8 +14706,8 @@ async function handleRunExport(args) {
|
|
|
14645
14706
|
"utf-8"
|
|
14646
14707
|
);
|
|
14647
14708
|
}
|
|
14648
|
-
|
|
14649
|
-
json:
|
|
14709
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, payload, {
|
|
14710
|
+
json: _chunkSTLJYWUCjs.argsWantJson.call(void 0, args),
|
|
14650
14711
|
fields: selection.fields,
|
|
14651
14712
|
text: `${lines.join("\n")}
|
|
14652
14713
|
`
|
|
@@ -14680,10 +14741,10 @@ async function handlePlayGet(args) {
|
|
|
14680
14741
|
);
|
|
14681
14742
|
return 2;
|
|
14682
14743
|
}
|
|
14683
|
-
const client = new (0,
|
|
14744
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
14684
14745
|
const explicitJson = args.includes("--json");
|
|
14685
14746
|
const sourceOutput = args.includes("--source");
|
|
14686
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
14747
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkSTLJYWUCjs.argsWantJson.call(void 0, args);
|
|
14687
14748
|
const requestedRevisionFlags = [
|
|
14688
14749
|
args.includes("--working"),
|
|
14689
14750
|
args.includes("--live"),
|
|
@@ -14733,7 +14794,7 @@ async function handlePlayGet(args) {
|
|
|
14733
14794
|
...includeSource ? { source: sourceSelector } : {}
|
|
14734
14795
|
});
|
|
14735
14796
|
const source = detail.source;
|
|
14736
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
14797
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _553 => _553.files, 'access', _554 => _554[source.entryFile]]), () => ( ""));
|
|
14737
14798
|
let materializedFile = null;
|
|
14738
14799
|
try {
|
|
14739
14800
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -14743,7 +14804,7 @@ async function handlePlayGet(args) {
|
|
|
14743
14804
|
}
|
|
14744
14805
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
14745
14806
|
if (jsonOutput) {
|
|
14746
|
-
|
|
14807
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, {
|
|
14747
14808
|
...detail,
|
|
14748
14809
|
...materializedFile ? {
|
|
14749
14810
|
message: loadedMessage,
|
|
@@ -14784,16 +14845,16 @@ async function handlePlayGet(args) {
|
|
|
14784
14845
|
}
|
|
14785
14846
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
14786
14847
|
console.log(
|
|
14787
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14848
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _555 => _555.play, 'access', _556 => _556.workingRevision, 'optionalAccess', _557 => _557.version]), () => ( "\u2014"))}`
|
|
14788
14849
|
);
|
|
14789
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14850
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _558 => _558.play, 'access', _559 => _559.liveRevision, 'optionalAccess', _560 => _560.version]), () => ( "\u2014"))}`);
|
|
14790
14851
|
if (detail.play.liveRevision) {
|
|
14791
14852
|
console.log(
|
|
14792
14853
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
14793
14854
|
);
|
|
14794
14855
|
}
|
|
14795
14856
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
14796
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
14857
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _561 => _561.play, 'access', _562 => _562.liveRevision, 'optionalAccess', _563 => _563.version])) {
|
|
14797
14858
|
console.log(
|
|
14798
14859
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
14799
14860
|
);
|
|
@@ -14805,7 +14866,7 @@ async function handlePlayGet(args) {
|
|
|
14805
14866
|
console.log(line);
|
|
14806
14867
|
}
|
|
14807
14868
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
14808
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14869
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _564 => _564.sheetSummary, 'optionalAccess', _565 => _565.stats, 'optionalAccess', _566 => _566.total]), () => ( 0))}`);
|
|
14809
14870
|
if (detail.customerDbUrl) {
|
|
14810
14871
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
14811
14872
|
}
|
|
@@ -14821,7 +14882,7 @@ async function handlePlayGet(args) {
|
|
|
14821
14882
|
return 0;
|
|
14822
14883
|
}
|
|
14823
14884
|
function formatVersionLine(version) {
|
|
14824
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
14885
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _567 => _567.artifactHash, 'optionalAccess', _568 => _568.slice, 'call', _569 => _569(0, 12)]), () => ( "unknown-revision"));
|
|
14825
14886
|
const state = [
|
|
14826
14887
|
version.isLive ? "live" : null,
|
|
14827
14888
|
version.isWorking ? "working" : null
|
|
@@ -14835,8 +14896,8 @@ async function handlePlayVersions(args) {
|
|
|
14835
14896
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
14836
14897
|
return 1;
|
|
14837
14898
|
}
|
|
14838
|
-
const client = new (0,
|
|
14839
|
-
const jsonOutput =
|
|
14899
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
14900
|
+
const jsonOutput = _chunkSTLJYWUCjs.argsWantJson.call(void 0, args);
|
|
14840
14901
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
14841
14902
|
command: "versions"
|
|
14842
14903
|
});
|
|
@@ -14844,7 +14905,7 @@ async function handlePlayVersions(args) {
|
|
|
14844
14905
|
parseReferencedPlayTarget(playName).playName
|
|
14845
14906
|
);
|
|
14846
14907
|
if (jsonOutput) {
|
|
14847
|
-
|
|
14908
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, { versions });
|
|
14848
14909
|
return 0;
|
|
14849
14910
|
}
|
|
14850
14911
|
if (versions.length === 0) {
|
|
@@ -14857,7 +14918,7 @@ async function handlePlayVersions(args) {
|
|
|
14857
14918
|
return 0;
|
|
14858
14919
|
}
|
|
14859
14920
|
function formatPlayCostEstimate(estimate) {
|
|
14860
|
-
const computeSummary = _optionalChain([estimate, 'optionalAccess',
|
|
14921
|
+
const computeSummary = _optionalChain([estimate, 'optionalAccess', _570 => _570.compute]) ? `; ${estimate.status === "available" && estimate.source === "observed" ? "observed Deepline total includes usage-based compute; per-session ceiling" : "separate Deepline compute is usage-based; per-session ceiling"} across ${estimate.compute.pricedBackends.map(formatSandboxBackend).join(" and ")}: ${formatCredits(estimate.compute.maximumCredits)} credits (${formatSandboxBackend(estimate.compute.maximumBackend)} is highest; ${formatCredits(estimate.compute.maximumBillingSeconds)}s; total session count unbounded)` : "";
|
|
14861
14922
|
if (!estimate || estimate.status === "unavailable") {
|
|
14862
14923
|
return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
|
|
14863
14924
|
}
|
|
@@ -14887,8 +14948,8 @@ async function handlePlayCost(args) {
|
|
|
14887
14948
|
console.error("Usage: deepline plays cost <play> [--json]");
|
|
14888
14949
|
return 2;
|
|
14889
14950
|
}
|
|
14890
|
-
const result = await new (0,
|
|
14891
|
-
if (
|
|
14951
|
+
const result = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().getPlayCostEstimate(name);
|
|
14952
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
|
|
14892
14953
|
else
|
|
14893
14954
|
console.log(
|
|
14894
14955
|
`${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
|
|
@@ -14896,11 +14957,11 @@ async function handlePlayCost(args) {
|
|
|
14896
14957
|
return 0;
|
|
14897
14958
|
}
|
|
14898
14959
|
async function handlePlayList(args) {
|
|
14899
|
-
const jsonOutput =
|
|
14960
|
+
const jsonOutput = _chunkSTLJYWUCjs.argsWantJson.call(void 0, args);
|
|
14900
14961
|
const showCost = args.includes("--show-cost");
|
|
14901
|
-
const client = new (0,
|
|
14962
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
14902
14963
|
const categoriesIndex = args.indexOf("--categories");
|
|
14903
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
14964
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _571 => _571[categoriesIndex + 1], 'optionalAccess', _572 => _572.trim, 'call', _573 => _573()]) : void 0;
|
|
14904
14965
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
14905
14966
|
if (args.includes("--tag") && tags.length === 0) {
|
|
14906
14967
|
console.error(
|
|
@@ -14921,7 +14982,7 @@ async function handlePlayList(args) {
|
|
|
14921
14982
|
const cursorIndex = args.indexOf("--cursor");
|
|
14922
14983
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
14923
14984
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14924
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
14985
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _574 => _574.trim, 'call', _575 => _575()])) {
|
|
14925
14986
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
14926
14987
|
return 2;
|
|
14927
14988
|
}
|
|
@@ -14962,7 +15023,7 @@ async function handlePlayList(args) {
|
|
|
14962
15023
|
if (play.inputSchema || play.hasInputSchema) {
|
|
14963
15024
|
lines.push(" inputSchema: yes");
|
|
14964
15025
|
}
|
|
14965
|
-
if (_optionalChain([play, 'access',
|
|
15026
|
+
if (_optionalChain([play, 'access', _576 => _576.triggerStatus, 'optionalAccess', _577 => _577.cron])) {
|
|
14966
15027
|
lines.push(
|
|
14967
15028
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
14968
15029
|
);
|
|
@@ -14982,12 +15043,12 @@ async function handlePlayList(args) {
|
|
|
14982
15043
|
} else {
|
|
14983
15044
|
lines.push(" scheduled execution: not configured");
|
|
14984
15045
|
}
|
|
14985
|
-
if (_optionalChain([play, 'access',
|
|
15046
|
+
if (_optionalChain([play, 'access', _578 => _578.triggerStatus, 'optionalAccess', _579 => _579.webhook])) {
|
|
14986
15047
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
14987
15048
|
}
|
|
14988
15049
|
if (showCost) {
|
|
14989
15050
|
lines.push(
|
|
14990
|
-
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15051
|
+
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _580 => _580.observedCost, 'optionalAccess', _581 => _581.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
|
|
14991
15052
|
);
|
|
14992
15053
|
}
|
|
14993
15054
|
lines.push(` run: deepline run ${reference}`);
|
|
@@ -14996,7 +15057,7 @@ async function handlePlayList(args) {
|
|
|
14996
15057
|
lines.push("List truncated \u2014 more plays are available.");
|
|
14997
15058
|
lines.push(`Next page: ${nextPage}`);
|
|
14998
15059
|
}
|
|
14999
|
-
|
|
15060
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
15000
15061
|
{
|
|
15001
15062
|
plays,
|
|
15002
15063
|
count: plays.length,
|
|
@@ -15013,8 +15074,8 @@ async function handlePlayList(args) {
|
|
|
15013
15074
|
return 0;
|
|
15014
15075
|
}
|
|
15015
15076
|
async function handlePlayPin(args, pinned) {
|
|
15016
|
-
const target = _optionalChain([args, 'access',
|
|
15017
|
-
const jsonOutput =
|
|
15077
|
+
const target = _optionalChain([args, 'access', _582 => _582.find, 'call', _583 => _583((arg) => !arg.startsWith("-")), 'optionalAccess', _584 => _584.trim, 'call', _585 => _585()]);
|
|
15078
|
+
const jsonOutput = _chunkSTLJYWUCjs.argsWantJson.call(void 0, args);
|
|
15018
15079
|
const dryRun = args.includes("--dry-run");
|
|
15019
15080
|
if (!target) {
|
|
15020
15081
|
console.error(
|
|
@@ -15032,11 +15093,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15032
15093
|
const name = parsedTarget.playName;
|
|
15033
15094
|
const plan = { name, pinned, dryRun };
|
|
15034
15095
|
if (dryRun) {
|
|
15035
|
-
|
|
15096
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, plan);
|
|
15036
15097
|
return 0;
|
|
15037
15098
|
}
|
|
15038
|
-
const result = await new (0,
|
|
15039
|
-
if (jsonOutput)
|
|
15099
|
+
const result = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15100
|
+
if (jsonOutput) _chunkSTLJYWUCjs.printCompactJson.call(void 0, result);
|
|
15040
15101
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15041
15102
|
return 0;
|
|
15042
15103
|
}
|
|
@@ -15084,7 +15145,7 @@ function printPlayDescription(play) {
|
|
|
15084
15145
|
console.log(` ${line}`);
|
|
15085
15146
|
}
|
|
15086
15147
|
}
|
|
15087
|
-
if (_optionalChain([play, 'access',
|
|
15148
|
+
if (_optionalChain([play, 'access', _586 => _586.toolCategories, 'optionalAccess', _587 => _587.length])) {
|
|
15088
15149
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15089
15150
|
}
|
|
15090
15151
|
if (play.aliases.length > 0) {
|
|
@@ -15129,7 +15190,7 @@ function printPlayDescription(play) {
|
|
|
15129
15190
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15130
15191
|
if (runtimeLimit) {
|
|
15131
15192
|
console.log(
|
|
15132
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15193
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _588 => _588.runtimeLimit, 'optionalAccess', _589 => _589.source]), () => ( "live"))})`
|
|
15133
15194
|
);
|
|
15134
15195
|
}
|
|
15135
15196
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15157,17 +15218,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15157
15218
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15158
15219
|
}
|
|
15159
15220
|
async function handlePlayGrep(args) {
|
|
15160
|
-
const query = _optionalChain([args, 'access',
|
|
15221
|
+
const query = _optionalChain([args, 'access', _590 => _590[0], 'optionalAccess', _591 => _591.trim, 'call', _592 => _592()]);
|
|
15161
15222
|
if (!query) {
|
|
15162
15223
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15163
15224
|
return 1;
|
|
15164
15225
|
}
|
|
15165
|
-
const client = new (0,
|
|
15226
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
15166
15227
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15167
15228
|
summarizePlayGrepResult
|
|
15168
15229
|
);
|
|
15169
|
-
if (
|
|
15170
|
-
|
|
15230
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
15231
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, {
|
|
15171
15232
|
plays: results,
|
|
15172
15233
|
count: results.length,
|
|
15173
15234
|
query,
|
|
@@ -15181,7 +15242,7 @@ async function handlePlayGrep(args) {
|
|
|
15181
15242
|
`
|
|
15182
15243
|
);
|
|
15183
15244
|
for (const result of results) {
|
|
15184
|
-
console.log(_optionalChain([result, 'access',
|
|
15245
|
+
console.log(_optionalChain([result, 'access', _593 => _593.displayName, 'optionalAccess', _594 => _594.trim, 'call', _595 => _595()]) || result.name);
|
|
15185
15246
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15186
15247
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15187
15248
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15190,7 +15251,7 @@ async function handlePlayGrep(args) {
|
|
|
15190
15251
|
return 0;
|
|
15191
15252
|
}
|
|
15192
15253
|
async function handlePlayDescribe(args) {
|
|
15193
|
-
const selection =
|
|
15254
|
+
const selection = _chunkSTLJYWUCjs.parseJsonFields.call(void 0, args, "describe");
|
|
15194
15255
|
args = selection.args;
|
|
15195
15256
|
const playName = args[0];
|
|
15196
15257
|
if (!playName) {
|
|
@@ -15224,8 +15285,8 @@ async function handlePlayDescribe(args) {
|
|
|
15224
15285
|
`deepline plays check ${playName}`,
|
|
15225
15286
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15226
15287
|
];
|
|
15227
|
-
if (
|
|
15228
|
-
|
|
15288
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
15289
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, {
|
|
15229
15290
|
ok: false,
|
|
15230
15291
|
error: { message },
|
|
15231
15292
|
next
|
|
@@ -15239,7 +15300,7 @@ async function handlePlayDescribe(args) {
|
|
|
15239
15300
|
}
|
|
15240
15301
|
return 2;
|
|
15241
15302
|
}
|
|
15242
|
-
const client = new (0,
|
|
15303
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
15243
15304
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15244
15305
|
command: "describe"
|
|
15245
15306
|
});
|
|
@@ -15249,9 +15310,9 @@ async function handlePlayDescribe(args) {
|
|
|
15249
15310
|
compact: args.includes("--compact")
|
|
15250
15311
|
}
|
|
15251
15312
|
);
|
|
15252
|
-
if (
|
|
15253
|
-
if (selection.fields)
|
|
15254
|
-
else
|
|
15313
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
15314
|
+
if (selection.fields) _chunkSTLJYWUCjs.printJson.call(void 0, play, selection.fields);
|
|
15315
|
+
else _chunkSTLJYWUCjs.printCompactJson.call(void 0, play);
|
|
15255
15316
|
return 0;
|
|
15256
15317
|
}
|
|
15257
15318
|
printPlayDescription(play);
|
|
@@ -15273,7 +15334,7 @@ async function handlePlaySave(args) {
|
|
|
15273
15334
|
}
|
|
15274
15335
|
let graph;
|
|
15275
15336
|
try {
|
|
15276
|
-
graph = await
|
|
15337
|
+
graph = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
15277
15338
|
"cli.play_save_bundle_graph",
|
|
15278
15339
|
{ targetKind: "file" },
|
|
15279
15340
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
@@ -15295,7 +15356,7 @@ async function handlePlaySave(args) {
|
|
|
15295
15356
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15296
15357
|
};
|
|
15297
15358
|
if (options.jsonOutput) {
|
|
15298
|
-
|
|
15359
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result);
|
|
15299
15360
|
} else {
|
|
15300
15361
|
console.error(result.message);
|
|
15301
15362
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15317,7 +15378,7 @@ async function handlePlaySave(args) {
|
|
|
15317
15378
|
};
|
|
15318
15379
|
if (options.dryRun) {
|
|
15319
15380
|
if (options.jsonOutput) {
|
|
15320
|
-
|
|
15381
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, dryRun);
|
|
15321
15382
|
} else {
|
|
15322
15383
|
console.log(`Dry run: ${playName}`);
|
|
15323
15384
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15326,14 +15387,14 @@ async function handlePlaySave(args) {
|
|
|
15326
15387
|
}
|
|
15327
15388
|
return 0;
|
|
15328
15389
|
}
|
|
15329
|
-
const client = new (0,
|
|
15390
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
15330
15391
|
try {
|
|
15331
|
-
await
|
|
15392
|
+
await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
15332
15393
|
"cli.play_save_compile_manifests",
|
|
15333
15394
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15334
15395
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15335
15396
|
);
|
|
15336
|
-
const saved = await
|
|
15397
|
+
const saved = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
15337
15398
|
"cli.play_save_register_draft",
|
|
15338
15399
|
{ targetKind: "file", playName, artifactHash },
|
|
15339
15400
|
() => client.registerPlayArtifact({
|
|
@@ -15362,7 +15423,7 @@ async function handlePlaySave(args) {
|
|
|
15362
15423
|
}
|
|
15363
15424
|
};
|
|
15364
15425
|
if (options.jsonOutput) {
|
|
15365
|
-
|
|
15426
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result);
|
|
15366
15427
|
} else {
|
|
15367
15428
|
console.log(
|
|
15368
15429
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15388,7 +15449,7 @@ async function handlePlayPublish(args) {
|
|
|
15388
15449
|
}
|
|
15389
15450
|
const { target: playName, useLatest } = options;
|
|
15390
15451
|
let revisionId = options.revisionId;
|
|
15391
|
-
const client = new (0,
|
|
15452
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
15392
15453
|
if (isFileTarget(playName)) {
|
|
15393
15454
|
if (revisionId || useLatest) {
|
|
15394
15455
|
console.error(
|
|
@@ -15398,7 +15459,7 @@ async function handlePlayPublish(args) {
|
|
|
15398
15459
|
}
|
|
15399
15460
|
let graph;
|
|
15400
15461
|
try {
|
|
15401
|
-
graph = await
|
|
15462
|
+
graph = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
15402
15463
|
"cli.play_publish_bundle_graph",
|
|
15403
15464
|
{ targetKind: "file" },
|
|
15404
15465
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
@@ -15420,7 +15481,7 @@ async function handlePlayPublish(args) {
|
|
|
15420
15481
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15421
15482
|
};
|
|
15422
15483
|
if (options.jsonOutput) {
|
|
15423
|
-
|
|
15484
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result3);
|
|
15424
15485
|
} else {
|
|
15425
15486
|
console.error(result3.message);
|
|
15426
15487
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15443,7 +15504,7 @@ async function handlePlayPublish(args) {
|
|
|
15443
15504
|
};
|
|
15444
15505
|
if (options.dryRun) {
|
|
15445
15506
|
if (options.jsonOutput) {
|
|
15446
|
-
|
|
15507
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, dryRun);
|
|
15447
15508
|
} else {
|
|
15448
15509
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15449
15510
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15462,12 +15523,12 @@ async function handlePlayPublish(args) {
|
|
|
15462
15523
|
}
|
|
15463
15524
|
}
|
|
15464
15525
|
try {
|
|
15465
|
-
await
|
|
15526
|
+
await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
15466
15527
|
"cli.play_publish_compile_manifests",
|
|
15467
15528
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15468
15529
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15469
15530
|
);
|
|
15470
|
-
await
|
|
15531
|
+
await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
15471
15532
|
"cli.play_publish_imports",
|
|
15472
15533
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15473
15534
|
() => publishImportedPlayDependencies(client, graph)
|
|
@@ -15476,7 +15537,7 @@ async function handlePlayPublish(args) {
|
|
|
15476
15537
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15477
15538
|
return 1;
|
|
15478
15539
|
}
|
|
15479
|
-
const published = await
|
|
15540
|
+
const published = await _chunkAWJKYS25js.traceCliSpan.call(void 0,
|
|
15480
15541
|
"cli.play_publish_register_root",
|
|
15481
15542
|
{
|
|
15482
15543
|
targetKind: "file",
|
|
@@ -15501,17 +15562,17 @@ async function handlePlayPublish(args) {
|
|
|
15501
15562
|
artifactHash,
|
|
15502
15563
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15503
15564
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15504
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15505
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15565
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _596 => _596.version]), () => ( null)),
|
|
15566
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _597 => _597.artifactHash]), () => ( null)),
|
|
15506
15567
|
sourceBytes: {
|
|
15507
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15568
|
+
before: _optionalChain([previousLive, 'optionalAccess', _598 => _598.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15508
15569
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15509
15570
|
},
|
|
15510
15571
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15511
15572
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15512
15573
|
};
|
|
15513
15574
|
if (options.jsonOutput) {
|
|
15514
|
-
|
|
15575
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result2);
|
|
15515
15576
|
} else {
|
|
15516
15577
|
printPublishReceipt({
|
|
15517
15578
|
name: rootPlayName,
|
|
@@ -15542,14 +15603,14 @@ async function handlePlayPublish(args) {
|
|
|
15542
15603
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15543
15604
|
latest: useLatest
|
|
15544
15605
|
};
|
|
15545
|
-
|
|
15606
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result2);
|
|
15546
15607
|
return 0;
|
|
15547
15608
|
}
|
|
15548
15609
|
const resolvedName = parseReferencedPlayTarget(playName).playName;
|
|
15549
15610
|
if (useLatest) {
|
|
15550
15611
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15551
15612
|
const latest = versions[0];
|
|
15552
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15613
|
+
if (!_optionalChain([latest, 'optionalAccess', _599 => _599._id])) {
|
|
15553
15614
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15554
15615
|
return 1;
|
|
15555
15616
|
}
|
|
@@ -15566,7 +15627,7 @@ async function handlePlayPublish(args) {
|
|
|
15566
15627
|
revisionId ? { revisionId } : {}
|
|
15567
15628
|
);
|
|
15568
15629
|
if (options.jsonOutput) {
|
|
15569
|
-
|
|
15630
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result);
|
|
15570
15631
|
} else {
|
|
15571
15632
|
printPublishReceipt({
|
|
15572
15633
|
name: result.name,
|
|
@@ -15606,7 +15667,7 @@ async function handlePlayDelete(args) {
|
|
|
15606
15667
|
);
|
|
15607
15668
|
return 2;
|
|
15608
15669
|
}
|
|
15609
|
-
const client = new (0,
|
|
15670
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
15610
15671
|
let detail;
|
|
15611
15672
|
try {
|
|
15612
15673
|
detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
|
|
@@ -15630,8 +15691,8 @@ async function handlePlayDelete(args) {
|
|
|
15630
15691
|
name: resolvedName,
|
|
15631
15692
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15632
15693
|
};
|
|
15633
|
-
if (
|
|
15634
|
-
|
|
15694
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
15695
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result2);
|
|
15635
15696
|
} else {
|
|
15636
15697
|
process.stdout.write(
|
|
15637
15698
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15641,8 +15702,8 @@ async function handlePlayDelete(args) {
|
|
|
15641
15702
|
return 0;
|
|
15642
15703
|
}
|
|
15643
15704
|
const result = await client.deletePlay(resolvedName);
|
|
15644
|
-
if (
|
|
15645
|
-
|
|
15705
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
15706
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result);
|
|
15646
15707
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15647
15708
|
}
|
|
15648
15709
|
if (result.alreadyArchived) {
|
|
@@ -15681,13 +15742,13 @@ async function handlePlayRestore(args) {
|
|
|
15681
15742
|
);
|
|
15682
15743
|
return 2;
|
|
15683
15744
|
}
|
|
15684
|
-
const client = new (0,
|
|
15745
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
15685
15746
|
try {
|
|
15686
15747
|
const result = await client.restorePlay(
|
|
15687
15748
|
parseReferencedPlayTarget(playName).playName
|
|
15688
15749
|
);
|
|
15689
|
-
if (
|
|
15690
|
-
|
|
15750
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
15751
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, result);
|
|
15691
15752
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
15692
15753
|
}
|
|
15693
15754
|
if (result.alreadyActive) {
|
|
@@ -15814,21 +15875,21 @@ Common commands:
|
|
|
15814
15875
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
15815
15876
|
}
|
|
15816
15877
|
};
|
|
15817
|
-
|
|
15878
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0, result2, {
|
|
15818
15879
|
json: options.json,
|
|
15819
15880
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
15820
15881
|
`
|
|
15821
15882
|
});
|
|
15822
15883
|
return;
|
|
15823
15884
|
}
|
|
15824
|
-
const client = new (0,
|
|
15885
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
15825
15886
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
15826
15887
|
throw new Error(
|
|
15827
15888
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
15828
15889
|
);
|
|
15829
15890
|
}
|
|
15830
15891
|
const result = await client.startPlayRun(saved.request);
|
|
15831
|
-
|
|
15892
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
15832
15893
|
{ ...result },
|
|
15833
15894
|
{
|
|
15834
15895
|
json: options.json,
|
|
@@ -15864,7 +15925,7 @@ Examples:
|
|
|
15864
15925
|
).action(async (target, options) => {
|
|
15865
15926
|
process.exitCode = await handlePlayCheck([
|
|
15866
15927
|
target,
|
|
15867
|
-
...
|
|
15928
|
+
..._chunkSTLJYWUCjs.jsonFieldArgs.call(void 0, options.json),
|
|
15868
15929
|
...options.full ? ["--full"] : []
|
|
15869
15930
|
]);
|
|
15870
15931
|
});
|
|
@@ -15903,10 +15964,10 @@ Notes:
|
|
|
15903
15964
|
--force-tool-refresh re-executes completed tool receipts and may repeat billed
|
|
15904
15965
|
provider calls. It is independent from --force.
|
|
15905
15966
|
--max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
|
|
15906
|
-
resident-work ceiling. Default: ${
|
|
15967
|
+
resident-work ceiling. Default: ${_chunkYFDTF2XCjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkYFDTF2XCjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
|
|
15907
15968
|
Provider pacing and sandbox memory limits still apply.
|
|
15908
15969
|
--max-concurrent-rows sets the run-wide default and ceiling for live map row
|
|
15909
|
-
resolvers. Accepted range: 1-${
|
|
15970
|
+
resolvers. Accepted range: 1-${_chunkYFDTF2XCjs.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
|
|
15910
15971
|
may lower it when source-row size exceeds the active-row memory budget.
|
|
15911
15972
|
--max-credits replaces the play's billing.maxCreditsPerRun for this run.
|
|
15912
15973
|
Tool calls that would exceed it are denied.
|
|
@@ -16020,10 +16081,10 @@ Examples:
|
|
|
16020
16081
|
"Refresh completed tool receipts; may repeat billed provider calls"
|
|
16021
16082
|
).option(
|
|
16022
16083
|
"--max-concurrent-external-calls <count>",
|
|
16023
|
-
`Concurrent provider-tool and deepline.fetch executions (${
|
|
16084
|
+
`Concurrent provider-tool and deepline.fetch executions (${_chunkYFDTF2XCjs.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkYFDTF2XCjs.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
|
|
16024
16085
|
).option(
|
|
16025
16086
|
"--max-concurrent-rows <count>",
|
|
16026
|
-
`Run-wide dataset map row resolver ceiling (max ${
|
|
16087
|
+
`Run-wide dataset map row resolver ceiling (max ${_chunkYFDTF2XCjs.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
|
|
16027
16088
|
).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the play page in a browser after the run starts").option(
|
|
16028
16089
|
"--debug-map-latency",
|
|
16029
16090
|
"Internal diagnostics: emit one aggregate latency profile per dataset map"
|
|
@@ -16068,14 +16129,14 @@ JSON field selection:
|
|
|
16068
16129
|
passthroughArgs.shift();
|
|
16069
16130
|
}
|
|
16070
16131
|
const exitCode = await handlePlayRun(
|
|
16071
|
-
|
|
16132
|
+
_chunkYFDTF2XCjs.resolvePlayRunCliOptions.call(void 0,
|
|
16072
16133
|
_nullishCoalesce(effectiveTarget, () => ( void 0)),
|
|
16073
16134
|
options,
|
|
16074
16135
|
passthroughArgs,
|
|
16075
|
-
|
|
16136
|
+
_chunkAWJKYS25js.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
16076
16137
|
)
|
|
16077
16138
|
);
|
|
16078
|
-
|
|
16139
|
+
_chunkAWJKYS25js.recordCliTrace.call(void 0, {
|
|
16079
16140
|
phase: "cli.play_command_exit",
|
|
16080
16141
|
exitCode
|
|
16081
16142
|
});
|
|
@@ -16124,9 +16185,9 @@ Examples:
|
|
|
16124
16185
|
const limit = Number(options.historyLimit);
|
|
16125
16186
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16126
16187
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16127
|
-
const client = new (0,
|
|
16188
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
16128
16189
|
if (options.binding) {
|
|
16129
|
-
|
|
16190
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0,
|
|
16130
16191
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16131
16192
|
);
|
|
16132
16193
|
return;
|
|
@@ -16134,7 +16195,7 @@ Examples:
|
|
|
16134
16195
|
const result = await client.listPlayTriggerInventory({
|
|
16135
16196
|
cursor: options.cursor
|
|
16136
16197
|
});
|
|
16137
|
-
|
|
16198
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, {
|
|
16138
16199
|
...result,
|
|
16139
16200
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16140
16201
|
});
|
|
@@ -16193,7 +16254,7 @@ Examples:
|
|
|
16193
16254
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16194
16255
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16195
16256
|
}
|
|
16196
|
-
const result = await new (0,
|
|
16257
|
+
const result = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().getPlaysActivity({
|
|
16197
16258
|
timeZone: options.timeZone,
|
|
16198
16259
|
days,
|
|
16199
16260
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16207,7 +16268,7 @@ Examples:
|
|
|
16207
16268
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16208
16269
|
);
|
|
16209
16270
|
}
|
|
16210
|
-
|
|
16271
|
+
_chunkSTLJYWUCjs.printCommandEnvelope.call(void 0,
|
|
16211
16272
|
{ ...result },
|
|
16212
16273
|
{
|
|
16213
16274
|
json: Boolean(options.json),
|
|
@@ -16236,7 +16297,7 @@ Examples:
|
|
|
16236
16297
|
false
|
|
16237
16298
|
);
|
|
16238
16299
|
});
|
|
16239
|
-
|
|
16300
|
+
_chunkG3UHAYRXjs.registerDeprecatedSearchCommand.call(void 0,
|
|
16240
16301
|
play,
|
|
16241
16302
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16242
16303
|
);
|
|
@@ -16277,9 +16338,9 @@ Examples:
|
|
|
16277
16338
|
"--json [fields]",
|
|
16278
16339
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16279
16340
|
);
|
|
16280
|
-
|
|
16341
|
+
_chunkAIPTW3EKjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16281
16342
|
async (target, options) => {
|
|
16282
|
-
const ownView = () => handlePlayDescribe(
|
|
16343
|
+
const ownView = () => handlePlayDescribe(_chunkSTLJYWUCjs.describeArgs.call(void 0, target, options));
|
|
16283
16344
|
const [flagText] = [options.json].filter(
|
|
16284
16345
|
(value) => typeof value === "string"
|
|
16285
16346
|
);
|
|
@@ -16290,7 +16351,7 @@ Examples:
|
|
|
16290
16351
|
process.exitCode = await ownView();
|
|
16291
16352
|
return;
|
|
16292
16353
|
}
|
|
16293
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16354
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-44L7OBGM.js")));
|
|
16294
16355
|
process.exitCode = await describeAnything(
|
|
16295
16356
|
name,
|
|
16296
16357
|
{
|
|
@@ -16408,7 +16469,7 @@ Examples:
|
|
|
16408
16469
|
deepline plays deployments <deployment-id>
|
|
16409
16470
|
`
|
|
16410
16471
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16411
|
-
async (id, options) => id ?
|
|
16472
|
+
async (id, options) => id ? _chunkXNP7XTBNjs.handleDeploymentGet.call(void 0, id, options) : _chunkXNP7XTBNjs.handleDeploymentsList.call(void 0, options)
|
|
16412
16473
|
);
|
|
16413
16474
|
addPublishHelp(
|
|
16414
16475
|
play.command("publish <target>").description(
|
|
@@ -16543,14 +16604,14 @@ Examples:
|
|
|
16543
16604
|
const limit = Number(options.limit);
|
|
16544
16605
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16545
16606
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16546
|
-
const result = await new (0,
|
|
16607
|
+
const result = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().runs.rowHistory({
|
|
16547
16608
|
playName: options.play,
|
|
16548
16609
|
runId,
|
|
16549
16610
|
tableNamespace: options.dataset,
|
|
16550
16611
|
limit,
|
|
16551
16612
|
cursor: options.cursor
|
|
16552
16613
|
});
|
|
16553
|
-
|
|
16614
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, {
|
|
16554
16615
|
...result,
|
|
16555
16616
|
...result.nextCursor ? {
|
|
16556
16617
|
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`
|
|
@@ -16624,7 +16685,7 @@ Examples:
|
|
|
16624
16685
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
16625
16686
|
).action(async (runId, options) => {
|
|
16626
16687
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
16627
|
-
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
16688
|
+
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-3WX7TUUG.js")));
|
|
16628
16689
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
16629
16690
|
receiptJson: options.json !== void 0
|
|
16630
16691
|
});
|
|
@@ -16632,7 +16693,7 @@ Examples:
|
|
|
16632
16693
|
}
|
|
16633
16694
|
process.exitCode = await handleRunGet([
|
|
16634
16695
|
runId,
|
|
16635
|
-
...
|
|
16696
|
+
..._chunkSTLJYWUCjs.jsonFieldArgs.call(void 0, options.json),
|
|
16636
16697
|
...options.webUrl ? ["--web-url"] : [],
|
|
16637
16698
|
...options.full ? ["--full"] : [],
|
|
16638
16699
|
...options.input ? ["--input"] : [],
|
|
@@ -16922,7 +16983,7 @@ Examples:
|
|
|
16922
16983
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
16923
16984
|
...options.wait ? ["--wait"] : [],
|
|
16924
16985
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
16925
|
-
...
|
|
16986
|
+
..._chunkSTLJYWUCjs.jsonFieldArgs.call(void 0, options.json)
|
|
16926
16987
|
]);
|
|
16927
16988
|
});
|
|
16928
16989
|
const share = play.command("share").description(
|
|
@@ -17063,8 +17124,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17063
17124
|
}
|
|
17064
17125
|
function shareUrlFields(status) {
|
|
17065
17126
|
return {
|
|
17066
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17067
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17127
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _600 => _600.share, 'optionalAccess', _601 => _601.publicPath])),
|
|
17128
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _602 => _602.share, 'optionalAccess', _603 => _603.canonicalPath]))
|
|
17068
17129
|
};
|
|
17069
17130
|
}
|
|
17070
17131
|
function shareStatusForOutput(status) {
|
|
@@ -17088,10 +17149,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17088
17149
|
return 2;
|
|
17089
17150
|
}
|
|
17090
17151
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17091
|
-
const status = await new (0,
|
|
17152
|
+
const status = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().getSharePage(name);
|
|
17092
17153
|
const outputStatus = shareStatusForOutput(status);
|
|
17093
|
-
if (
|
|
17094
|
-
|
|
17154
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
17155
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, outputStatus);
|
|
17095
17156
|
return 0;
|
|
17096
17157
|
}
|
|
17097
17158
|
if (!outputStatus.share) {
|
|
@@ -17130,7 +17191,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17130
17191
|
return 2;
|
|
17131
17192
|
}
|
|
17132
17193
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17133
|
-
const client = new (0,
|
|
17194
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
17134
17195
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17135
17196
|
let resolvedVersion;
|
|
17136
17197
|
if (!revisionId) {
|
|
@@ -17161,8 +17222,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17161
17222
|
);
|
|
17162
17223
|
if (!hasCompleted) {
|
|
17163
17224
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17164
|
-
if (
|
|
17165
|
-
|
|
17225
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
17226
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, {
|
|
17166
17227
|
ok: false,
|
|
17167
17228
|
code: "NO_SUCCESSFUL_RUN",
|
|
17168
17229
|
message,
|
|
@@ -17186,8 +17247,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17186
17247
|
};
|
|
17187
17248
|
if (args.includes("--dry-run")) {
|
|
17188
17249
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17189
|
-
if (
|
|
17190
|
-
|
|
17250
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
17251
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, plan);
|
|
17191
17252
|
} else {
|
|
17192
17253
|
console.log(
|
|
17193
17254
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17197,13 +17258,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17197
17258
|
}
|
|
17198
17259
|
const status = await client.publishSharePage(name, request);
|
|
17199
17260
|
const outputStatus = shareStatusForOutput(status);
|
|
17200
|
-
if (
|
|
17201
|
-
|
|
17261
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
17262
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, outputStatus);
|
|
17202
17263
|
return 0;
|
|
17203
17264
|
}
|
|
17204
17265
|
const urls = shareUrlFields(outputStatus);
|
|
17205
17266
|
console.log(
|
|
17206
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17267
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _604 => _604.share, 'optionalAccess', _605 => _605.publicPath]))), () => ( ""))}`
|
|
17207
17268
|
);
|
|
17208
17269
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17209
17270
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17229,9 +17290,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17229
17290
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17230
17291
|
...seoIndexing ? { seoIndexing } : {}
|
|
17231
17292
|
};
|
|
17232
|
-
const status = await new (0,
|
|
17233
|
-
if (
|
|
17234
|
-
|
|
17293
|
+
const status = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().updateSharePage(name, request);
|
|
17294
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
17295
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, status);
|
|
17235
17296
|
return 0;
|
|
17236
17297
|
}
|
|
17237
17298
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17246,13 +17307,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17246
17307
|
return 2;
|
|
17247
17308
|
}
|
|
17248
17309
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17249
|
-
const client = new (0,
|
|
17310
|
+
const client = new (0, _chunkXP7FAYLNjs.DeeplineClient)();
|
|
17250
17311
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17251
17312
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17252
17313
|
if (!revisionId && versionFlag) {
|
|
17253
17314
|
const versions = await client.listPlayVersions(name);
|
|
17254
17315
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17255
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17316
|
+
if (!_optionalChain([chosen, 'optionalAccess', _606 => _606._id])) {
|
|
17256
17317
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17257
17318
|
return 4;
|
|
17258
17319
|
}
|
|
@@ -17263,12 +17324,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17263
17324
|
revisionId ? { revisionId } : {}
|
|
17264
17325
|
);
|
|
17265
17326
|
const outputStatus = shareStatusForOutput(status);
|
|
17266
|
-
if (
|
|
17267
|
-
|
|
17327
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
17328
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, outputStatus);
|
|
17268
17329
|
return 0;
|
|
17269
17330
|
}
|
|
17270
17331
|
const urls = shareUrlFields(outputStatus);
|
|
17271
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17332
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _607 => _607.share, 'optionalAccess', _608 => _608.publishedRevisionId]) === revisionId;
|
|
17272
17333
|
console.log(
|
|
17273
17334
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17274
17335
|
);
|
|
@@ -17289,9 +17350,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17289
17350
|
return 2;
|
|
17290
17351
|
}
|
|
17291
17352
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17292
|
-
const status = await new (0,
|
|
17293
|
-
if (
|
|
17294
|
-
|
|
17353
|
+
const status = await new (0, _chunkXP7FAYLNjs.DeeplineClient)().unpublishSharePage(name);
|
|
17354
|
+
if (_chunkSTLJYWUCjs.argsWantJson.call(void 0, args)) {
|
|
17355
|
+
_chunkSTLJYWUCjs.printCompactJson.call(void 0, status);
|
|
17295
17356
|
return 0;
|
|
17296
17357
|
}
|
|
17297
17358
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17366,4 +17427,4 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17366
17427
|
|
|
17367
17428
|
|
|
17368
17429
|
|
|
17369
|
-
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.handlePlayCost = handlePlayCost; 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 =
|
|
17430
|
+
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.handlePlayCost = handlePlayCost; 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 = _chunkYFDTF2XCjs.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkYFDTF2XCjs.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.startAndWaitForPlayCompletion = startAndWaitForPlayCompletion; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.writeInlinePlay = writeInlinePlay; exports.writePlayRunIdFile = writePlayRunIdFile; exports.writePlayRunReceipt = writePlayRunReceipt;
|