deepline 0.3.476 → 0.3.478
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 +5 -4
- package/dist/bundling-sources/sdk/src/http-core.ts +84 -3
- package/dist/bundling-sources/sdk/src/http.ts +2 -0
- package/dist/bundling-sources/sdk/src/play.ts +8 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +10 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +77 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +11 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +77 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +83 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +215 -22
- package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +42 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +13 -12
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +5 -2
- package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +37 -12
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +1 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +29 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +15 -0
- package/dist/cli/{auth-A22724UX.mjs → auth-SA4DJCSO.mjs} +5 -5
- package/dist/cli/auth-U5SNVC5F.js +41 -0
- package/dist/cli/{billing-T5Q6OO6M.js → billing-462SAHWX.js} +107 -87
- package/dist/cli/{billing-IIBEZ6J7.mjs → billing-Z4D35MV5.mjs} +34 -14
- package/dist/cli/{chunk-NPNQCPFP.mjs → chunk-2FTUPGTN.mjs} +2 -2
- package/dist/cli/{chunk-2WEPQSA2.mjs → chunk-2JS5DNVX.mjs} +5 -5
- package/dist/cli/{chunk-L45IECBZ.js → chunk-2MSKG4ER.js} +7 -6
- package/dist/cli/{chunk-JU2KBLOR.mjs → chunk-3LTLQAU4.mjs} +4 -4
- package/dist/cli/{chunk-ZV4OWYLZ.mjs → chunk-3V7INABZ.mjs} +2 -2
- package/dist/cli/{chunk-VPAVNEDQ.mjs → chunk-4C3TMIF3.mjs} +4 -4
- package/dist/cli/{chunk-H3GOAZHV.mjs → chunk-4RJRGQ5Y.mjs} +2 -2
- package/dist/cli/{chunk-AS3VECCY.js → chunk-4RV7U3RP.js} +7 -7
- package/dist/cli/{chunk-UHTJWDYB.mjs → chunk-645RNF2Y.mjs} +1 -1
- package/dist/cli/{chunk-TEJSRJNH.js → chunk-6EEMW7YP.js} +8 -8
- package/dist/cli/{chunk-ZOXV6WFI.mjs → chunk-75DAGCEX.mjs} +1 -1
- package/dist/cli/{chunk-NTJDZURV.mjs → chunk-7HTWT3Z4.mjs} +2 -2
- package/dist/cli/chunk-7I4B6V2S.mjs +127 -0
- package/dist/cli/{chunk-MZSLFWOT.js → chunk-7UFFWPQ2.js} +13 -9
- package/dist/cli/{chunk-5FBCMLJW.js → chunk-A5LPDB6N.js} +6 -6
- package/dist/cli/{chunk-4YWYLHED.mjs → chunk-ABBP5ZCI.mjs} +3 -3
- package/dist/cli/{chunk-IC3BZJR7.js → chunk-AQYSZYNE.js} +8 -8
- package/dist/cli/{chunk-WTPRRKZA.js → chunk-AYW242XF.js} +37 -37
- package/dist/cli/{chunk-CFSCHLNQ.mjs → chunk-BLAZVZVD.mjs} +23 -5
- package/dist/cli/{chunk-KGLIDLJ2.js → chunk-D2LKEQKI.js} +5 -5
- package/dist/cli/{chunk-4WMIMSSI.mjs → chunk-F2SJYUBW.mjs} +5 -5
- package/dist/cli/{chunk-KCP6XNRR.mjs → chunk-F44O4PEP.mjs} +1 -1
- package/dist/cli/{chunk-EBWYNNTJ.js → chunk-HMUBLAT4.js} +5 -5
- package/dist/cli/{chunk-UYA7LJGC.mjs → chunk-IL5AF6AR.mjs} +4 -2
- package/dist/cli/{chunk-B7PEXXRW.js → chunk-IWYWZXCA.js} +53 -53
- package/dist/cli/{chunk-PGNLD6L6.js → chunk-J3ZYRN5L.js} +10 -10
- package/dist/cli/{chunk-VKBZLV2K.mjs → chunk-JH775FF6.mjs} +1 -1
- package/dist/cli/{chunk-5AEEINTU.js → chunk-KBBZXWXF.js} +63 -11
- package/dist/cli/{chunk-FVPT44IJ.mjs → chunk-M5USVQ33.mjs} +55 -3
- package/dist/cli/{chunk-2YHDNHRR.mjs → chunk-N573OK4W.mjs} +4 -4
- package/dist/cli/{chunk-WFVEMDQL.js → chunk-OKAZHDYN.js} +4 -2
- package/dist/cli/{chunk-J4FCTFQS.mjs → chunk-PHBOI24Y.mjs} +10 -10
- package/dist/cli/{chunk-D7EQ4PI5.mjs → chunk-PLJV6SX4.mjs} +1 -1
- package/dist/cli/{chunk-YQOWMQEW.mjs → chunk-PPHHPAQV.mjs} +1 -1
- package/dist/cli/{chunk-CBVCCXIY.js → chunk-PZHRNSMU.js} +21 -21
- package/dist/cli/{chunk-LJFIUT5R.mjs → chunk-QB3Q73LP.mjs} +2 -2
- package/dist/cli/{chunk-ULKGYVYP.js → chunk-QVZNUQAP.js} +2 -2
- package/dist/cli/{chunk-A6BETJ2A.js → chunk-S3BKOCVB.js} +1 -1
- package/dist/cli/{chunk-F5PYBZ2H.mjs → chunk-S7UEKKOX.mjs} +2 -1
- package/dist/cli/{chunk-W3BHZUPL.js → chunk-SCHE5QRN.js} +3 -3
- package/dist/cli/{chunk-YEJDFZJP.js → chunk-SXY4DOVA.js} +16 -16
- package/dist/cli/{chunk-LZCYDU6Q.mjs → chunk-TLF3KGWG.mjs} +2 -2
- package/dist/cli/{chunk-5PYSYW63.js → chunk-TQWI7LJX.js} +26 -26
- package/dist/cli/{chunk-7HAUVMRF.js → chunk-TW3TTKW5.js} +3 -3
- package/dist/cli/{chunk-FK7SBMSZ.js → chunk-UXQVSDFP.js} +3 -3
- package/dist/cli/{chunk-HSANVBVL.js → chunk-V7I65ME7.js} +2 -2
- package/dist/cli/{chunk-6YZYCKWD.js → chunk-VE25VUTE.js} +70 -52
- package/dist/cli/{chunk-VLYUFZUT.js → chunk-XFY3JOP2.js} +9 -9
- package/dist/cli/{chunk-MYYOCJZ2.js → chunk-XOORR6P3.js} +93 -93
- package/dist/cli/chunk-YGCKMI5P.js +127 -0
- package/dist/cli/{chunk-3A7TDUZV.mjs → chunk-ZBSUXXZS.mjs} +13 -9
- package/dist/cli/{chunk-NREO7TT4.mjs → chunk-ZSU3C4ST.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-GPVCETS2.mjs → csv-3SNWBO5F.mjs} +4 -4
- package/dist/cli/{csv-FXOQ2PBE.js → csv-LAYTDYIF.js} +13 -13
- package/dist/cli/{db-F5UJTBGP.mjs → db-72JKGQSK.mjs} +6 -6
- package/dist/cli/{db-LXYV4GPZ.js → db-OOUOSURL.js} +27 -27
- package/dist/cli/describe-7HYV44MO.js +48 -0
- package/dist/cli/{describe-GYWCI7I6.mjs → describe-KDPNOEUJ.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-6NL2YW76.mjs → executions-O6JS3UKX.mjs} +6 -6
- package/dist/cli/{executions-6SJKTY2L.js → executions-RJNMGJEE.js} +8 -8
- package/dist/cli/{feedback-E3HULSQD.js → feedback-FXB6NV3Y.js} +8 -8
- package/dist/cli/{feedback-7AMQCNTB.mjs → feedback-T3JH3CWC.mjs} +4 -4
- package/dist/cli/git-5LTKPXGN.js +25 -0
- package/dist/cli/{git-74IS2EFH.mjs → git-6KAQSH5J.mjs} +5 -5
- package/dist/cli/index.js +161 -142
- package/dist/cli/index.mjs +65 -46
- package/dist/cli/{legacy-noops-52FFRTRZ.mjs → legacy-noops-7HDGEGTK.mjs} +5 -5
- package/dist/cli/{legacy-noops-ALWUQPKS.js → legacy-noops-PAOGRKUK.js} +8 -8
- package/dist/cli/{monitors-Z4ADOGTY.js → monitors-KQFI7TVJ.js} +91 -91
- package/dist/cli/{monitors-VTJIWWW2.mjs → monitors-LE2AYK3Z.mjs} +7 -7
- package/dist/cli/{org-2BTEKDF5.js → org-J6XFHDJE.js} +72 -72
- package/dist/cli/{org-7GU6H7JL.mjs → org-Z4DMJ72I.mjs} +6 -6
- package/dist/cli/{pages-I6PFQGEU.mjs → pages-5LYS6Y4I.mjs} +6 -6
- package/dist/cli/{pages-MG36E7RY.js → pages-FIXBZQJG.js} +17 -17
- package/dist/cli/{play-VN52S3RV.js → play-D7WPXADH.js} +604 -680
- package/dist/cli/{play-7KFSLJX2.mjs → play-GILXXIN7.mjs} +45 -121
- package/dist/cli/{providers-W5XLII66.js → providers-KN7YACT6.js} +9 -9
- package/dist/cli/{providers-D46JDEL2.mjs → providers-OQWL4Q4W.mjs} +6 -6
- package/dist/cli/{quickstart-4GTXBZHY.mjs → quickstart-2LRIORFM.mjs} +4 -4
- package/dist/cli/{quickstart-TIZAC63S.js → quickstart-M2OBP3W3.js} +6 -6
- package/dist/cli/{run-FOVEMYYX.js → run-6YZZO7VM.js} +36 -36
- package/dist/cli/{run-LE3D4LVU.mjs → run-GYRBKQZT.mjs} +22 -22
- package/dist/cli/search-OVKWA4AV.js +32 -0
- package/dist/cli/{search-6YL6WJMQ.mjs → search-VUPK6BNU.mjs} +7 -7
- package/dist/cli/{secrets-CSTTTMZH.js → secrets-RE3UMZB7.js} +15 -15
- package/dist/cli/{secrets-D66U6RTT.mjs → secrets-ULRGU7NM.mjs} +6 -6
- package/dist/cli/{sessions-XIO3OUER.mjs → sessions-2ZZVJ3P2.mjs} +5 -5
- package/dist/cli/{sessions-45M2NRAA.js → sessions-T4UMHNDW.js} +6 -6
- package/dist/cli/{settings-N42CVKSK.js → settings-BRV6AYFM.js} +78 -78
- package/dist/cli/{settings-R33X2D5T.mjs → settings-PDY4TJU6.mjs} +11 -11
- package/dist/cli/{setup-CBBC4FQP.mjs → setup-CXL6C5Z5.mjs} +9 -9
- package/dist/cli/{setup-HREDVNF2.js → setup-JONYJYBK.js} +44 -44
- package/dist/cli/{skills-4X6WS2PT.mjs → skills-TOMVQD5O.mjs} +7 -7
- package/dist/cli/skills-UK5AK35I.js +33 -0
- package/dist/cli/{tools-YR46YFR2.mjs → tools-B2LJK4MM.mjs} +16 -16
- package/dist/cli/tools-HH6E5G7J.js +55 -0
- package/dist/cli/{update-5CYAZX5X.mjs → update-CD6T2REC.mjs} +9 -9
- package/dist/cli/update-EGXT3EIJ.js +33 -0
- package/dist/cli/{workflow-M7AA722W.js → workflow-PZML43E2.js} +17 -17
- package/dist/cli/{workflow-NKQ3CWPK.mjs → workflow-ZAOBP6I7.mjs} +7 -7
- package/dist/{client-AjmfA5nR.d.mts → client-B1s1yJdT.d.mts} +1 -1
- package/dist/{client-DMyY-QL8.d.ts → client-DqUseRzd.d.ts} +1 -1
- package/dist/{client-core-C705vFyV.d.ts → client-core-Bd7tP9Uz.d.ts} +45 -6
- package/dist/{client-core-CpBbvLEX.d.mts → client-core-BijQEQ70.d.mts} +45 -6
- package/dist/{compiler-manifest-hqIAukR0.d.mts → compiler-manifest-B1m5tRzz.d.mts} +23 -17
- package/dist/{compiler-manifest-hqIAukR0.d.ts → compiler-manifest-B1m5tRzz.d.ts} +23 -17
- package/dist/{errors-CRO2qQ6k.d.ts → errors-3g71OMXy.d.ts} +1 -1
- package/dist/{errors-DIHVetNY.d.mts → errors-QiC6am-q.d.mts} +1 -1
- package/dist/{index-DVZ_X4Gb.d.mts → index-Biz5toO4.d.mts} +1 -1
- package/dist/{index-B8DVoeYt.d.ts → index-CIBiwzhK.d.ts} +1 -1
- package/dist/index.d.mts +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +112 -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 +2 -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-2ZY57Q7W.js +0 -41
- package/dist/cli/describe-IB7SUIUT.js +0 -48
- package/dist/cli/git-A2QIIMW5.js +0 -25
- package/dist/cli/search-HN6SVDQU.js +0 -32
- package/dist/cli/skills-QZ6HZX2T.js +0 -33
- package/dist/cli/tools-KFIH7UWB.js +0 -55
- package/dist/cli/update-VZLEJLWJ.js +0 -33
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkXFY3JOP2js = require('./chunk-XFY3JOP2.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,14 +17,14 @@ var _chunkVLYUFZUTjs = require('./chunk-VLYUFZUT.js');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkUXQVSDFPjs = require('./chunk-UXQVSDFP.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk6EEMW7YPjs = require('./chunk-6EEMW7YP.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkTQWI7LJXjs = require('./chunk-TQWI7LJX.js');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkIAYSWZDJjs = require('./chunk-IAYSWZDJ.js');
|
|
@@ -40,11 +40,19 @@ require('./chunk-ZM2YPJQJ.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunk7UFFWPQ2js = require('./chunk-7UFFWPQ2.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
47
47
|
require('./chunk-3KC45UVF.js');
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
|
|
48
56
|
require('./chunk-J33TSWO5.js');
|
|
49
57
|
|
|
50
58
|
|
|
@@ -52,10 +60,10 @@ var _chunkA6QCMBGLjs = require('./chunk-A6QCMBGL.js');
|
|
|
52
60
|
|
|
53
61
|
|
|
54
62
|
|
|
55
|
-
var
|
|
63
|
+
var _chunkD2LKEQKIjs = require('./chunk-D2LKEQKI.js');
|
|
56
64
|
|
|
57
65
|
|
|
58
|
-
var
|
|
66
|
+
var _chunkHMUBLAT4js = require('./chunk-HMUBLAT4.js');
|
|
59
67
|
require('./chunk-VKKVSFRD.js');
|
|
60
68
|
|
|
61
69
|
|
|
@@ -69,7 +77,7 @@ require('./chunk-VKKVSFRD.js');
|
|
|
69
77
|
|
|
70
78
|
|
|
71
79
|
|
|
72
|
-
var
|
|
80
|
+
var _chunk2MSKG4ERjs = require('./chunk-2MSKG4ER.js');
|
|
73
81
|
require('./chunk-E4CABWXL.js');
|
|
74
82
|
|
|
75
83
|
|
|
@@ -89,18 +97,18 @@ require('./chunk-XDVT3GOM.js');
|
|
|
89
97
|
|
|
90
98
|
|
|
91
99
|
|
|
92
|
-
var
|
|
100
|
+
var _chunkA5LPDB6Njs = require('./chunk-A5LPDB6N.js');
|
|
93
101
|
|
|
94
102
|
|
|
95
103
|
|
|
96
104
|
|
|
97
105
|
|
|
98
|
-
var
|
|
99
|
-
require('./chunk-
|
|
106
|
+
var _chunkV7I65ME7js = require('./chunk-V7I65ME7.js');
|
|
107
|
+
require('./chunk-IWYWZXCA.js');
|
|
100
108
|
|
|
101
109
|
|
|
102
110
|
|
|
103
|
-
var
|
|
111
|
+
var _chunkSCHE5QRNjs = require('./chunk-SCHE5QRN.js');
|
|
104
112
|
|
|
105
113
|
|
|
106
114
|
|
|
@@ -114,17 +122,17 @@ var _chunkW3BHZUPLjs = require('./chunk-W3BHZUPL.js');
|
|
|
114
122
|
|
|
115
123
|
|
|
116
124
|
|
|
117
|
-
var
|
|
118
|
-
require('./chunk-
|
|
125
|
+
var _chunk4RV7U3RPjs = require('./chunk-4RV7U3RP.js');
|
|
126
|
+
require('./chunk-TW3TTKW5.js');
|
|
119
127
|
|
|
120
128
|
|
|
121
|
-
var
|
|
129
|
+
var _chunkKBBZXWXFjs = require('./chunk-KBBZXWXF.js');
|
|
122
130
|
require('./chunk-ALJJRZNJ.js');
|
|
123
131
|
require('./chunk-XNYIZMNQ.js');
|
|
124
132
|
|
|
125
133
|
|
|
126
134
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
127
|
-
require('./chunk-
|
|
135
|
+
require('./chunk-S3BKOCVB.js');
|
|
128
136
|
require('./chunk-OG64RBAC.js');
|
|
129
137
|
|
|
130
138
|
|
|
@@ -2106,7 +2114,7 @@ function resolveField(key, command) {
|
|
|
2106
2114
|
function printSettings(result, json, name) {
|
|
2107
2115
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2108
2116
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2109
|
-
|
|
2117
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2110
2118
|
{
|
|
2111
2119
|
...result,
|
|
2112
2120
|
settings: Object.fromEntries(
|
|
@@ -2150,7 +2158,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2150
2158
|
valueSyntax: field.cli.valueSyntax,
|
|
2151
2159
|
examples: field.cli.examples
|
|
2152
2160
|
}));
|
|
2153
|
-
|
|
2161
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2154
2162
|
{
|
|
2155
2163
|
fields: descriptions,
|
|
2156
2164
|
render: {
|
|
@@ -2175,7 +2183,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2175
2183
|
async (options, command) => {
|
|
2176
2184
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2177
2185
|
printSettings(
|
|
2178
|
-
await new (0,
|
|
2186
|
+
await new (0, _chunkHMUBLAT4js.DeeplineClient)().getPlaySettings(options.play),
|
|
2179
2187
|
options.json,
|
|
2180
2188
|
options.name
|
|
2181
2189
|
);
|
|
@@ -2206,7 +2214,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2206
2214
|
);
|
|
2207
2215
|
}
|
|
2208
2216
|
if (options.dryRun) {
|
|
2209
|
-
|
|
2217
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2210
2218
|
{
|
|
2211
2219
|
dryRun: true,
|
|
2212
2220
|
play,
|
|
@@ -2227,7 +2235,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2227
2235
|
return;
|
|
2228
2236
|
}
|
|
2229
2237
|
printSettings(
|
|
2230
|
-
await new (0,
|
|
2238
|
+
await new (0, _chunkHMUBLAT4js.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2231
2239
|
options.json
|
|
2232
2240
|
);
|
|
2233
2241
|
};
|
|
@@ -2253,13 +2261,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2253
2261
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2254
2262
|
{ exitCode: 2 }
|
|
2255
2263
|
);
|
|
2256
|
-
const page = await new (0,
|
|
2264
|
+
const page = await new (0, _chunkHMUBLAT4js.DeeplineClient)().listPlaySettingsPaths({
|
|
2257
2265
|
root: options.root,
|
|
2258
2266
|
limit,
|
|
2259
2267
|
cursor: options.cursor
|
|
2260
2268
|
});
|
|
2261
2269
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2262
|
-
|
|
2270
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2263
2271
|
{
|
|
2264
2272
|
...page,
|
|
2265
2273
|
nextCommand,
|
|
@@ -2310,7 +2318,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2310
2318
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _12 => _12.root]), () => ( "person")),
|
|
2311
2319
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.folders]), () => ( []))
|
|
2312
2320
|
};
|
|
2313
|
-
const client = new (0,
|
|
2321
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
2314
2322
|
const paths = [];
|
|
2315
2323
|
let cursor;
|
|
2316
2324
|
do {
|
|
@@ -2372,7 +2380,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2372
2380
|
moved.push(move.playName);
|
|
2373
2381
|
}
|
|
2374
2382
|
}
|
|
2375
|
-
|
|
2383
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2376
2384
|
{
|
|
2377
2385
|
dryRun: Boolean(options.dryRun),
|
|
2378
2386
|
from: options.from,
|
|
@@ -2500,7 +2508,7 @@ function triggerLines(view) {
|
|
|
2500
2508
|
return lines;
|
|
2501
2509
|
}
|
|
2502
2510
|
function printView(view, json) {
|
|
2503
|
-
|
|
2511
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2504
2512
|
{
|
|
2505
2513
|
...view,
|
|
2506
2514
|
render: {
|
|
@@ -2513,7 +2521,7 @@ function printView(view, json) {
|
|
|
2513
2521
|
);
|
|
2514
2522
|
}
|
|
2515
2523
|
function printResult(result, json) {
|
|
2516
|
-
|
|
2524
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2517
2525
|
{
|
|
2518
2526
|
...result,
|
|
2519
2527
|
render: {
|
|
@@ -2543,7 +2551,7 @@ async function mutate(command, options, build) {
|
|
|
2543
2551
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2544
2552
|
}
|
|
2545
2553
|
if (options.dryRun) {
|
|
2546
|
-
|
|
2554
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
2547
2555
|
{
|
|
2548
2556
|
dryRun: true,
|
|
2549
2557
|
play: options.play,
|
|
@@ -2562,7 +2570,7 @@ async function mutate(command, options, build) {
|
|
|
2562
2570
|
return;
|
|
2563
2571
|
}
|
|
2564
2572
|
printResult(
|
|
2565
|
-
await new (0,
|
|
2573
|
+
await new (0, _chunkHMUBLAT4js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2566
2574
|
options.json
|
|
2567
2575
|
);
|
|
2568
2576
|
}
|
|
@@ -2595,7 +2603,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2595
2603
|
}).addHelpText("after", help2);
|
|
2596
2604
|
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
2605
|
printView(
|
|
2598
|
-
await new (0,
|
|
2606
|
+
await new (0, _chunkHMUBLAT4js.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2599
2607
|
options.json
|
|
2600
2608
|
);
|
|
2601
2609
|
});
|
|
@@ -2639,7 +2647,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2639
2647
|
if (options.auth === void 0) {
|
|
2640
2648
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2641
2649
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2642
|
-
const current = await new (0,
|
|
2650
|
+
const current = await new (0, _chunkHMUBLAT4js.DeeplineClient)().getPlayTriggerConfig(
|
|
2643
2651
|
options.play
|
|
2644
2652
|
);
|
|
2645
2653
|
return {
|
|
@@ -2716,7 +2724,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2716
2724
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2717
2725
|
"runtime.event": "Other event."
|
|
2718
2726
|
};
|
|
2719
|
-
var RUN_LOGS_KIND_HELP =
|
|
2727
|
+
var RUN_LOGS_KIND_HELP = _chunk2MSKG4ERjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2720
2728
|
kind,
|
|
2721
2729
|
description: KIND_DESCRIPTIONS[kind]
|
|
2722
2730
|
}));
|
|
@@ -2853,9 +2861,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2853
2861
|
const args = program.args;
|
|
2854
2862
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2855
2863
|
error.exitCode = 2;
|
|
2856
|
-
if (
|
|
2857
|
-
|
|
2858
|
-
Object.assign(new (0,
|
|
2864
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2865
|
+
_chunk4RV7U3RPjs.printJsonError.call(void 0,
|
|
2866
|
+
Object.assign(new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(error.message), {
|
|
2859
2867
|
exitCode: 2,
|
|
2860
2868
|
retryable: false
|
|
2861
2869
|
})
|
|
@@ -2899,14 +2907,14 @@ function parseQuery(args, resource) {
|
|
|
2899
2907
|
if (VALUE_FLAGS.has(flag)) {
|
|
2900
2908
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2901
2909
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2902
|
-
throw new (0,
|
|
2910
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2903
2911
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2904
2912
|
);
|
|
2905
2913
|
}
|
|
2906
2914
|
if (flag === "--sum") sums.push(value);
|
|
2907
2915
|
else {
|
|
2908
2916
|
if (values[flag] !== void 0) {
|
|
2909
|
-
throw new (0,
|
|
2917
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2910
2918
|
`${flag} may only be supplied once.`
|
|
2911
2919
|
);
|
|
2912
2920
|
}
|
|
@@ -2920,12 +2928,12 @@ function parseQuery(args, resource) {
|
|
|
2920
2928
|
}
|
|
2921
2929
|
if (arg.startsWith("-")) {
|
|
2922
2930
|
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,
|
|
2931
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2924
2932
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2925
2933
|
);
|
|
2926
2934
|
}
|
|
2927
2935
|
if (runId !== void 0) {
|
|
2928
|
-
throw new (0,
|
|
2936
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2929
2937
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2930
2938
|
);
|
|
2931
2939
|
}
|
|
@@ -2933,7 +2941,7 @@ function parseQuery(args, resource) {
|
|
|
2933
2941
|
}
|
|
2934
2942
|
if (switches.has("--fields")) {
|
|
2935
2943
|
if (runId !== void 0) {
|
|
2936
|
-
throw new (0,
|
|
2944
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2937
2945
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2938
2946
|
);
|
|
2939
2947
|
}
|
|
@@ -2946,18 +2954,18 @@ function parseQuery(args, resource) {
|
|
|
2946
2954
|
)
|
|
2947
2955
|
];
|
|
2948
2956
|
if (incompatible.length) {
|
|
2949
|
-
throw new (0,
|
|
2957
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2950
2958
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2951
2959
|
);
|
|
2952
2960
|
}
|
|
2953
2961
|
}
|
|
2954
2962
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2955
|
-
throw new (0,
|
|
2963
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2956
2964
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2957
2965
|
);
|
|
2958
2966
|
}
|
|
2959
2967
|
if (sums.length && switches.has("--count")) {
|
|
2960
|
-
throw new (0,
|
|
2968
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2961
2969
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2962
2970
|
);
|
|
2963
2971
|
}
|
|
@@ -2965,7 +2973,7 @@ function parseQuery(args, resource) {
|
|
|
2965
2973
|
if (operation === "count") {
|
|
2966
2974
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2967
2975
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2968
|
-
throw new (0,
|
|
2976
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
2969
2977
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2970
2978
|
);
|
|
2971
2979
|
}
|
|
@@ -3000,16 +3008,16 @@ function parseQuery(args, resource) {
|
|
|
3000
3008
|
];
|
|
3001
3009
|
}
|
|
3002
3010
|
}
|
|
3003
|
-
const request =
|
|
3011
|
+
const request = _chunk2MSKG4ERjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
3004
3012
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
3005
3013
|
const backend = values["--runtime-backend"];
|
|
3006
3014
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
3007
|
-
throw new (0,
|
|
3015
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
3008
3016
|
"--runtime-backend must be daytona or modal."
|
|
3009
3017
|
);
|
|
3010
3018
|
}
|
|
3011
3019
|
if (backend && !namespace) {
|
|
3012
|
-
throw new (0,
|
|
3020
|
+
throw new (0, _chunk2MSKG4ERjs.RunEventQueryInputError)(
|
|
3013
3021
|
"--runtime-backend requires --runtime-namespace."
|
|
3014
3022
|
);
|
|
3015
3023
|
}
|
|
@@ -3056,12 +3064,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3056
3064
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3057
3065
|
const record3 = failure;
|
|
3058
3066
|
const status = record3.statusCode;
|
|
3059
|
-
const exitCode = error instanceof
|
|
3067
|
+
const exitCode = error instanceof _chunk2MSKG4ERjs.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
3068
|
const diagnostic = Object.assign(failure, {
|
|
3061
3069
|
exitCode,
|
|
3062
3070
|
retryable: exitCode === 5
|
|
3063
3071
|
});
|
|
3064
|
-
if (
|
|
3072
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) _chunk4RV7U3RPjs.printJsonError.call(void 0, diagnostic);
|
|
3065
3073
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3066
3074
|
return exitCode;
|
|
3067
3075
|
}
|
|
@@ -3076,7 +3084,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3076
3084
|
...criteria
|
|
3077
3085
|
} = request;
|
|
3078
3086
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3079
|
-
const client = new (0,
|
|
3087
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
3080
3088
|
let result;
|
|
3081
3089
|
if (request.operation === "fields") {
|
|
3082
3090
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3142,13 +3150,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3142
3150
|
lines.push(`Next page: ${nextPage}`);
|
|
3143
3151
|
}
|
|
3144
3152
|
}
|
|
3145
|
-
|
|
3153
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
3146
3154
|
{
|
|
3147
3155
|
...result,
|
|
3148
3156
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3149
3157
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3150
3158
|
},
|
|
3151
|
-
{ json:
|
|
3159
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3152
3160
|
` }
|
|
3153
3161
|
);
|
|
3154
3162
|
return 0;
|
|
@@ -4067,7 +4075,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4067
4075
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4068
4076
|
);
|
|
4069
4077
|
}
|
|
4070
|
-
const response = await new (0,
|
|
4078
|
+
const response = await new (0, _chunkHMUBLAT4js.DeeplineClient)().runs.getReceipts(runId, {
|
|
4071
4079
|
keys
|
|
4072
4080
|
});
|
|
4073
4081
|
const failed = response.receipts.filter(
|
|
@@ -4079,7 +4087,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4079
4087
|
JSON.stringify(response, null, 2) + "\n",
|
|
4080
4088
|
{ flag: "wx", mode: 384 }
|
|
4081
4089
|
);
|
|
4082
|
-
|
|
4090
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
4083
4091
|
{
|
|
4084
4092
|
runId,
|
|
4085
4093
|
out: options.out,
|
|
@@ -4089,7 +4097,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4089
4097
|
{ json: true }
|
|
4090
4098
|
);
|
|
4091
4099
|
} else {
|
|
4092
|
-
|
|
4100
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4093
4101
|
}
|
|
4094
4102
|
if (failed)
|
|
4095
4103
|
process.exitCode = response.receipts.some(
|
|
@@ -4128,7 +4136,7 @@ includes nextCommand when another page is available.
|
|
|
4128
4136
|
{ exitCode: 2 }
|
|
4129
4137
|
);
|
|
4130
4138
|
}
|
|
4131
|
-
const page = await new (0,
|
|
4139
|
+
const page = await new (0, _chunkHMUBLAT4js.DeeplineClient)().runs.children(parentRunId, {
|
|
4132
4140
|
launchKey: options.launchKey,
|
|
4133
4141
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4134
4142
|
limit
|
|
@@ -4143,7 +4151,7 @@ includes nextCommand when another page is available.
|
|
|
4143
4151
|
"--limit",
|
|
4144
4152
|
String(limit)
|
|
4145
4153
|
].join(" ") : null;
|
|
4146
|
-
|
|
4154
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
4147
4155
|
{
|
|
4148
4156
|
parentRunId,
|
|
4149
4157
|
launchKey: options.launchKey,
|
|
@@ -4179,7 +4187,7 @@ async function handleRunsHistory(options) {
|
|
|
4179
4187
|
throw new Error("--limit must be a positive integer.");
|
|
4180
4188
|
}
|
|
4181
4189
|
}
|
|
4182
|
-
const page = await new (0,
|
|
4190
|
+
const page = await new (0, _chunkHMUBLAT4js.DeeplineClient)().runs.history({
|
|
4183
4191
|
cursor: options.cursor,
|
|
4184
4192
|
orgId: options.org,
|
|
4185
4193
|
search: options.search,
|
|
@@ -4195,7 +4203,7 @@ async function handleRunsHistory(options) {
|
|
|
4195
4203
|
);
|
|
4196
4204
|
}
|
|
4197
4205
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4198
|
-
|
|
4206
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
4199
4207
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4200
4208
|
options.json ? { json: true } : {}
|
|
4201
4209
|
);
|
|
@@ -4247,12 +4255,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4247
4255
|
return 1;
|
|
4248
4256
|
}
|
|
4249
4257
|
}
|
|
4250
|
-
const result = await new (0,
|
|
4258
|
+
const result = await new (0, _chunkHMUBLAT4js.DeeplineClient)().runs.rerun(runId, {
|
|
4251
4259
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4252
4260
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4253
4261
|
});
|
|
4254
|
-
if (
|
|
4255
|
-
|
|
4262
|
+
if (_chunk4RV7U3RPjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4263
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4256
4264
|
} else if (result.rateLimited) {
|
|
4257
4265
|
console.log(`
|
|
4258
4266
|
${result.rateLimited.message}`);
|
|
@@ -5076,13 +5084,13 @@ var RunDataset = class _RunDataset {
|
|
|
5076
5084
|
const absolutePath = _path.resolve.call(void 0, outPath);
|
|
5077
5085
|
_fs.writeFileSync.call(void 0,
|
|
5078
5086
|
absolutePath,
|
|
5079
|
-
`${JSON.stringify(
|
|
5087
|
+
`${JSON.stringify(_chunkUXQVSDFPjs.orderRunExportJson.call(void 0, this.rows), null, 2)}
|
|
5080
5088
|
`,
|
|
5081
5089
|
"utf-8"
|
|
5082
5090
|
);
|
|
5083
5091
|
return absolutePath;
|
|
5084
5092
|
}
|
|
5085
|
-
return
|
|
5093
|
+
return _chunkUXQVSDFPjs.writeRunDatasetCsv.call(void 0, {
|
|
5086
5094
|
rows: this.rows,
|
|
5087
5095
|
columns: this.#info.columns,
|
|
5088
5096
|
outPath
|
|
@@ -5281,107 +5289,6 @@ ${hint}`;
|
|
|
5281
5289
|
});
|
|
5282
5290
|
}
|
|
5283
5291
|
|
|
5284
|
-
// ../plays/sandbox-runtime-limits.ts
|
|
5285
|
-
var PLAY_SANDBOX_SIZE_LIMITS = {
|
|
5286
|
-
standard: {
|
|
5287
|
-
memoryGiB: 1,
|
|
5288
|
-
cpu: 1,
|
|
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
|
|
5300
|
-
}
|
|
5301
|
-
};
|
|
5302
|
-
var STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
5303
|
-
timeoutSeconds: 30 * 60,
|
|
5304
|
-
...PLAY_SANDBOX_SIZE_LIMITS.standard
|
|
5305
|
-
};
|
|
5306
|
-
var MAX_PLAY_SANDBOX_RUNTIME_LIMITS = {
|
|
5307
|
-
timeoutSeconds: 4 * 60 * 60,
|
|
5308
|
-
...PLAY_SANDBOX_SIZE_LIMITS.xlarge
|
|
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
|
-
);
|
|
5331
|
-
function parseTimeout(value) {
|
|
5332
|
-
const match = /^(\d+)\s*([mh])$/i.exec(value.trim());
|
|
5333
|
-
if (!match) return null;
|
|
5334
|
-
const amount = Number(match[1]);
|
|
5335
|
-
if (!Number.isSafeInteger(amount) || amount <= 0) return null;
|
|
5336
|
-
return amount * (match[2].toLowerCase() === "h" ? 3600 : 60);
|
|
5337
|
-
}
|
|
5338
|
-
function validatePlaySandboxRuntimeLimits(value) {
|
|
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
|
-
);
|
|
5343
|
-
}
|
|
5344
|
-
if (!Number.isSafeInteger(value.timeoutSeconds) || value.timeoutSeconds <= 0) {
|
|
5345
|
-
throw new Error(
|
|
5346
|
-
'Invalid runtime sandbox timeout. Use timeout like "90m" or "2h".'
|
|
5347
|
-
);
|
|
5348
|
-
}
|
|
5349
|
-
if (value.timeoutSeconds > MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds) {
|
|
5350
|
-
throw new Error(
|
|
5351
|
-
`Requested runtime timeoutSeconds=${value.timeoutSeconds} exceeds this organisation's maximum ${MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds}.`
|
|
5352
|
-
);
|
|
5353
|
-
}
|
|
5354
|
-
return { ...value };
|
|
5355
|
-
}
|
|
5356
|
-
function resolvePlaySandboxRuntimeLimits(declaration) {
|
|
5357
|
-
const base = STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS;
|
|
5358
|
-
if (!declaration) return { ...base };
|
|
5359
|
-
const unsupportedProperties = Object.keys(declaration).filter(
|
|
5360
|
-
(key) => key !== "timeout" && key !== "size"
|
|
5361
|
-
);
|
|
5362
|
-
if (unsupportedProperties.length > 0) {
|
|
5363
|
-
throw new Error(
|
|
5364
|
-
`Unsupported runtime sandbox option${unsupportedProperties.length === 1 ? "" : "s"}: ${unsupportedProperties.join(", ")}. Use runtime.size with a Deepline prebuilt sandbox. Supported sizes: ${supportedPlaySandboxSizes}.`
|
|
5365
|
-
);
|
|
5366
|
-
}
|
|
5367
|
-
if (declaration.size !== void 0 && !Object.hasOwn(PLAY_SANDBOX_SIZE_LIMITS, declaration.size)) {
|
|
5368
|
-
throw new Error(
|
|
5369
|
-
`Unsupported runtime sandbox size "${String(declaration.size)}". Supported sizes: ${supportedPlaySandboxSizes}.`
|
|
5370
|
-
);
|
|
5371
|
-
}
|
|
5372
|
-
const timeoutSeconds = declaration.timeout ? parseTimeout(declaration.timeout) : base.timeoutSeconds;
|
|
5373
|
-
if (timeoutSeconds === null) {
|
|
5374
|
-
throw new Error(
|
|
5375
|
-
'Invalid runtime sandbox timeout. Use timeout like "90m" or "2h".'
|
|
5376
|
-
);
|
|
5377
|
-
}
|
|
5378
|
-
const size = _nullishCoalesce(declaration.size, () => ( "standard"));
|
|
5379
|
-
return validatePlaySandboxRuntimeLimits({
|
|
5380
|
-
timeoutSeconds,
|
|
5381
|
-
...PLAY_SANDBOX_SIZE_LIMITS[size]
|
|
5382
|
-
});
|
|
5383
|
-
}
|
|
5384
|
-
|
|
5385
5292
|
// ../play-runtime/worker-api-types.ts
|
|
5386
5293
|
var DAYTONA_COMPUTE_PRICING_USD = {
|
|
5387
5294
|
vcpuSecond: 14e-6,
|
|
@@ -5404,11 +5311,20 @@ function roundUsd(amount) {
|
|
|
5404
5311
|
return Number(Math.max(0, amount).toFixed(12));
|
|
5405
5312
|
}
|
|
5406
5313
|
function sandboxSizeMetadata(cpu, memoryGiB) {
|
|
5407
|
-
const entry = Object.entries(PLAY_SANDBOX_SIZE_LIMITS).find(
|
|
5314
|
+
const entry = Object.entries(_chunkYGCKMI5Pjs.PLAY_SANDBOX_SIZE_LIMITS).find(
|
|
5408
5315
|
([, limits]) => limits.cpu === cpu && limits.memoryGiB === memoryGiB
|
|
5409
5316
|
);
|
|
5410
5317
|
return entry ? { sandboxSize: entry[0] } : {};
|
|
5411
5318
|
}
|
|
5319
|
+
function runtimeLimitMetadata(maxBillingDurationSeconds, observedWallTimeSeconds) {
|
|
5320
|
+
if (typeof maxBillingDurationSeconds !== "number" || !Number.isFinite(maxBillingDurationSeconds) || maxBillingDurationSeconds <= 0) {
|
|
5321
|
+
return {};
|
|
5322
|
+
}
|
|
5323
|
+
return {
|
|
5324
|
+
maxBillingDurationSeconds,
|
|
5325
|
+
...typeof observedWallTimeSeconds === "number" && Number.isFinite(observedWallTimeSeconds) ? { observedWallTimeSeconds: Math.max(0, observedWallTimeSeconds) } : {}
|
|
5326
|
+
};
|
|
5327
|
+
}
|
|
5412
5328
|
function resolveDaytonaSandboxComputeItem(input) {
|
|
5413
5329
|
const billableSeconds = Math.max(1, Math.ceil(input.wallTimeSeconds));
|
|
5414
5330
|
const cpu = Math.max(0, input.cpu);
|
|
@@ -5434,7 +5350,11 @@ function resolveDaytonaSandboxComputeItem(input) {
|
|
|
5434
5350
|
diskGiB: Math.max(0, input.diskGiB),
|
|
5435
5351
|
billableDiskGiB,
|
|
5436
5352
|
startedAt: input.startedAt,
|
|
5437
|
-
endedAt: input.endedAt
|
|
5353
|
+
endedAt: input.endedAt,
|
|
5354
|
+
...runtimeLimitMetadata(
|
|
5355
|
+
input.maxBillingDurationSeconds,
|
|
5356
|
+
input.observedWallTimeSeconds
|
|
5357
|
+
)
|
|
5438
5358
|
}
|
|
5439
5359
|
};
|
|
5440
5360
|
}
|
|
@@ -5467,7 +5387,11 @@ function resolveModalSandboxComputeItem(input) {
|
|
|
5467
5387
|
costBasis: "reserved_resources"
|
|
5468
5388
|
},
|
|
5469
5389
|
startedAt: input.startedAt,
|
|
5470
|
-
endedAt: input.endedAt
|
|
5390
|
+
endedAt: input.endedAt,
|
|
5391
|
+
...runtimeLimitMetadata(
|
|
5392
|
+
input.maxBillingDurationSeconds,
|
|
5393
|
+
input.observedWallTimeSeconds
|
|
5394
|
+
)
|
|
5471
5395
|
}
|
|
5472
5396
|
};
|
|
5473
5397
|
}
|
|
@@ -5479,7 +5403,7 @@ var PLAY_RUNNER_STARTUP_GRACE_SECONDS = 4 * 60;
|
|
|
5479
5403
|
var SANDBOX_NETWORK_CUT_MAX_MS = 11 * 6e4;
|
|
5480
5404
|
var RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS = SANDBOX_NETWORK_CUT_MAX_MS + 6e4;
|
|
5481
5405
|
var PLAY_RUNNER_TIMEOUT_SECONDS = 40 * 60;
|
|
5482
|
-
var WORKFLOW_EXECUTOR_TOKEN_TTL_SECONDS = MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds + (PLAY_RUNNER_TIMEOUT_SECONDS - STANDARD_PLAY_RUNTIME_LIMIT_SECONDS);
|
|
5406
|
+
var WORKFLOW_EXECUTOR_TOKEN_TTL_SECONDS = _chunkYGCKMI5Pjs.MAX_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds + (PLAY_RUNNER_TIMEOUT_SECONDS - STANDARD_PLAY_RUNTIME_LIMIT_SECONDS);
|
|
5483
5407
|
|
|
5484
5408
|
// ../billing/compute-pricing-contract.ts
|
|
5485
5409
|
var COMPUTE_BILLING_MARKUP_MULTIPLIER = 5;
|
|
@@ -5487,7 +5411,7 @@ var DEFAULT_USD_PER_CUSTOMER_CREDIT = 0.1;
|
|
|
5487
5411
|
var DEFAULT_PROVIDER_MARKUP_MULTIPLIER = 1.4;
|
|
5488
5412
|
var MAX_SANDBOX_COMPUTE_BILLING_SECONDS = 60 * 60;
|
|
5489
5413
|
var MAX_SANDBOX_COMPUTE_PROVIDER_COST_USD = Math.max(
|
|
5490
|
-
...Object.values(PLAY_SANDBOX_SIZE_LIMITS).flatMap((profile) => {
|
|
5414
|
+
...Object.values(_chunkYGCKMI5Pjs.PLAY_SANDBOX_SIZE_LIMITS).flatMap((profile) => {
|
|
5491
5415
|
const modalResources = modalSandboxResourcesForPlay(profile);
|
|
5492
5416
|
return [
|
|
5493
5417
|
resolveDaytonaSandboxComputeItem({
|
|
@@ -5534,7 +5458,7 @@ function estimateModalMaximumComputeCredits(limits, elasticMemory = false) {
|
|
|
5534
5458
|
itemId: "estimate",
|
|
5535
5459
|
wallTimeSeconds: maximumPlaySandboxBillingSeconds(limits),
|
|
5536
5460
|
physicalCpuCores: resources.physicalCpuCores,
|
|
5537
|
-
memoryGiB: elasticMemory ? modalSandboxMemoryLimitGiBForPlay(limits) : limits.memoryGiB
|
|
5461
|
+
memoryGiB: elasticMemory ? _chunkYGCKMI5Pjs.modalSandboxMemoryLimitGiBForPlay.call(void 0, limits) : limits.memoryGiB
|
|
5538
5462
|
});
|
|
5539
5463
|
return roundUpCredits(
|
|
5540
5464
|
item.providerCostUsd * COMPUTE_BILLING_MARKUP_MULTIPLIER * DEFAULT_PROVIDER_MARKUP_MULTIPLIER / DEFAULT_USD_PER_CUSTOMER_CREDIT
|
|
@@ -5547,9 +5471,9 @@ function estimateMaximumSandboxComputeCredits(limits, elasticMemory = false) {
|
|
|
5547
5471
|
);
|
|
5548
5472
|
}
|
|
5549
5473
|
function formatNonStandardSandboxRuntimeWarning(limits) {
|
|
5550
|
-
const size = playSandboxSizeForLimits(limits);
|
|
5474
|
+
const size = _chunkYGCKMI5Pjs.playSandboxSizeForLimits.call(void 0, limits);
|
|
5551
5475
|
if (!size) return null;
|
|
5552
|
-
if (size === "standard" && limits.timeoutSeconds <= STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds) {
|
|
5476
|
+
if (size === "standard" && limits.timeoutSeconds <= _chunkYGCKMI5Pjs.STANDARD_PLAY_SANDBOX_RUNTIME_LIMITS.timeoutSeconds) {
|
|
5553
5477
|
return null;
|
|
5554
5478
|
}
|
|
5555
5479
|
const maximumComputeCredits = estimateMaximumSandboxComputeCredits(limits);
|
|
@@ -5861,7 +5785,7 @@ async function discoverDeploymentFiles(input) {
|
|
|
5861
5785
|
}
|
|
5862
5786
|
}
|
|
5863
5787
|
const rootStat = await _promises.stat.call(void 0, input.projectRoot).catch(() => null);
|
|
5864
|
-
if (!_optionalChain([rootStat, 'optionalAccess',
|
|
5788
|
+
if (!_optionalChain([rootStat, 'optionalAccess', _168 => _168.isDirectory, 'call', _169 => _169()])) {
|
|
5865
5789
|
throw new DeeplineManifestError(
|
|
5866
5790
|
`Project root directory does not exist in the repo: ${input.projectRoot}`
|
|
5867
5791
|
);
|
|
@@ -5963,33 +5887,33 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
5963
5887
|
if (parsed.kind !== "org") {
|
|
5964
5888
|
return null;
|
|
5965
5889
|
}
|
|
5966
|
-
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess',
|
|
5890
|
+
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess', _170 => _170.trim, 'call', _171 => _171(), 'access', _172 => _172.toLowerCase, 'call', _173 => _173()]), () => ( ""));
|
|
5967
5891
|
return normalizedOwnerSlug && parsed.ownerSlug.trim().toLowerCase() === normalizedOwnerSlug ? parsed.name : null;
|
|
5968
5892
|
}
|
|
5969
5893
|
|
|
5970
5894
|
// ../plays/deploy/run-deployment.ts
|
|
5971
5895
|
var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
|
|
5972
5896
|
function isRunPlayReceiver(node) {
|
|
5973
|
-
return
|
|
5897
|
+
return _chunk7UFFWPQ2js.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
|
|
5974
5898
|
}
|
|
5975
5899
|
function stringLiteralValue(node) {
|
|
5976
|
-
if (!
|
|
5900
|
+
if (!_chunk7UFFWPQ2js.isAstNode.call(void 0, node)) return null;
|
|
5977
5901
|
if (node.type === "Literal" && typeof node.value === "string") {
|
|
5978
5902
|
return node.value;
|
|
5979
5903
|
}
|
|
5980
5904
|
if (node.type === "TemplateLiteral" && Array.isArray(node.expressions) && node.expressions.length === 0 && Array.isArray(node.quasis) && node.quasis.length === 1) {
|
|
5981
|
-
const cooked = _optionalChain([node, 'access',
|
|
5905
|
+
const cooked = _optionalChain([node, 'access', _174 => _174.quasis, 'access', _175 => _175[0], 'access', _176 => _176.value, 'optionalAccess', _177 => _177.cooked]);
|
|
5982
5906
|
return typeof cooked === "string" ? cooked : null;
|
|
5983
5907
|
}
|
|
5984
5908
|
return null;
|
|
5985
5909
|
}
|
|
5986
5910
|
async function extractRunPlayStringTargets(sourceCode) {
|
|
5987
|
-
const program =
|
|
5911
|
+
const program = _chunk7UFFWPQ2js.parsePlaySourceForAnalysis.call(void 0, sourceCode);
|
|
5988
5912
|
if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
|
|
5989
5913
|
const targets = /* @__PURE__ */ new Set();
|
|
5990
5914
|
const visit = (node) => {
|
|
5991
5915
|
const callee = node.callee;
|
|
5992
|
-
if (node.type === "CallExpression" &&
|
|
5916
|
+
if (node.type === "CallExpression" && _chunk7UFFWPQ2js.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunk7UFFWPQ2js.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
|
|
5993
5917
|
const playRef = stringLiteralValue(node.arguments[1]);
|
|
5994
5918
|
const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
|
|
5995
5919
|
if (ownedName) targets.add(ownedName);
|
|
@@ -5997,7 +5921,7 @@ async function extractRunPlayStringTargets(sourceCode) {
|
|
|
5997
5921
|
for (const [key, value] of Object.entries(node)) {
|
|
5998
5922
|
if (key === "loc") continue;
|
|
5999
5923
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
6000
|
-
if (
|
|
5924
|
+
if (_chunk7UFFWPQ2js.isAstNode.call(void 0, child)) visit(child);
|
|
6001
5925
|
}
|
|
6002
5926
|
}
|
|
6003
5927
|
};
|
|
@@ -6102,7 +6026,7 @@ async function runDeployment(params, hooks) {
|
|
|
6102
6026
|
`Deployment ${params.deploymentId} has no linked repository and no target directory was given.`
|
|
6103
6027
|
);
|
|
6104
6028
|
}
|
|
6105
|
-
const checkRunName = _optionalChain([state, 'access',
|
|
6029
|
+
const checkRunName = _optionalChain([state, 'access', _178 => _178.checkRunName, 'optionalAccess', _179 => _179.trim, 'call', _180 => _180()]) || void 0;
|
|
6106
6030
|
let mergedPullRequestNumber = null;
|
|
6107
6031
|
let promoted = false;
|
|
6108
6032
|
const setStatus = (input) => client.setStatus({
|
|
@@ -6173,7 +6097,7 @@ async function runDeployment(params, hooks) {
|
|
|
6173
6097
|
finalStatus,
|
|
6174
6098
|
outcomes,
|
|
6175
6099
|
...monitorRunResult(),
|
|
6176
|
-
checkRunId: _optionalChain([checkRun, 'optionalAccess',
|
|
6100
|
+
checkRunId: _optionalChain([checkRun, 'optionalAccess', _181 => _181.checkRunId])
|
|
6177
6101
|
};
|
|
6178
6102
|
};
|
|
6179
6103
|
await _promises.mkdir.call(void 0, hooks.workRoot, { recursive: true });
|
|
@@ -6199,7 +6123,7 @@ async function runDeployment(params, hooks) {
|
|
|
6199
6123
|
const source = await hooks.openSource({ client, deployment });
|
|
6200
6124
|
if (deployment.isProduction) {
|
|
6201
6125
|
try {
|
|
6202
|
-
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access',
|
|
6126
|
+
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access', _182 => _182.findMergedPullRequest, 'optionalCall', _183 => _183()]), async () => ( null));
|
|
6203
6127
|
} catch (error) {
|
|
6204
6128
|
console.warn("[deploy-worker] merged PR lookup failed", {
|
|
6205
6129
|
deploymentId: params.deploymentId,
|
|
@@ -6269,15 +6193,15 @@ async function runDeployment(params, hooks) {
|
|
|
6269
6193
|
return finishFailed({
|
|
6270
6194
|
error: input.error,
|
|
6271
6195
|
outcomes: input.outcomes,
|
|
6272
|
-
checkRunId: _optionalChain([checkRun2, 'optionalAccess',
|
|
6196
|
+
checkRunId: _optionalChain([checkRun2, 'optionalAccess', _184 => _184.checkRunId])
|
|
6273
6197
|
});
|
|
6274
6198
|
};
|
|
6275
6199
|
postFailureCheck = async (summary) => await _asyncOptionalChain([(await postCheckOrNull({
|
|
6276
6200
|
conclusion: "failure",
|
|
6277
6201
|
title: "Deploy failed",
|
|
6278
6202
|
summary
|
|
6279
|
-
})), 'optionalAccess', async
|
|
6280
|
-
const deploymentBranch = _optionalChain([deployment, 'access',
|
|
6203
|
+
})), 'optionalAccess', async _185 => _185.checkRunId]);
|
|
6204
|
+
const deploymentBranch = _optionalChain([deployment, 'access', _186 => _186.ref, 'optionalAccess', _187 => _187.startsWith, 'call', _188 => _188("refs/heads/")]) ? deployment.ref.slice("refs/heads/".length) : _nullishCoalesce(_optionalChain([project, 'optionalAccess', _189 => _189.productionBranch]), () => ( null));
|
|
6281
6205
|
const supersedeIfHeadMoved = async () => {
|
|
6282
6206
|
if (!deployment.isProduction || !source.branchHead || !deploymentBranch) {
|
|
6283
6207
|
return null;
|
|
@@ -6291,7 +6215,7 @@ async function runDeployment(params, hooks) {
|
|
|
6291
6215
|
});
|
|
6292
6216
|
await setStatus({
|
|
6293
6217
|
status: "superseded",
|
|
6294
|
-
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess',
|
|
6218
|
+
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess', _190 => _190.slice, 'call', _191 => _191(0, 12)]), () => ( "<deleted>"))}; this deployment's commit is no longer the head.`,
|
|
6295
6219
|
buildSeconds: buildSeconds(),
|
|
6296
6220
|
...monitorOutcomes.length > 0 ? { results: monitorResults() } : {},
|
|
6297
6221
|
...head ? { observedHeadSha: head } : {}
|
|
@@ -6407,7 +6331,7 @@ async function runDeployment(params, hooks) {
|
|
|
6407
6331
|
failPlay(file, repoRelativeFile, message);
|
|
6408
6332
|
continue;
|
|
6409
6333
|
}
|
|
6410
|
-
const name = _nullishCoalesce(_optionalChain([result, 'access',
|
|
6334
|
+
const name = _nullishCoalesce(_optionalChain([result, 'access', _192 => _192.playName, 'optionalAccess', _193 => _193.trim, 'call', _194 => _194()]), () => ( ""));
|
|
6411
6335
|
if (!name) {
|
|
6412
6336
|
failPlay(
|
|
6413
6337
|
file,
|
|
@@ -6426,7 +6350,7 @@ async function runDeployment(params, hooks) {
|
|
|
6426
6350
|
continue;
|
|
6427
6351
|
}
|
|
6428
6352
|
seenNames.set(name, file);
|
|
6429
|
-
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access',
|
|
6353
|
+
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access', _195 => _195.artifact, 'access', _196 => _196.importPolicy, 'optionalAccess', _197 => _197.packages]), () => ( []))).map(
|
|
6430
6354
|
(pkg) => typeof pkg === "string" ? pkg : _nullishCoalesce(pkg.name, () => ( ""))
|
|
6431
6355
|
).filter((pkgName) => pkgName && pkgName !== "deepline");
|
|
6432
6356
|
if (disallowed.length > 0) {
|
|
@@ -6510,7 +6434,7 @@ async function runDeployment(params, hooks) {
|
|
|
6510
6434
|
const conflicts = [];
|
|
6511
6435
|
for (const play of ordered) {
|
|
6512
6436
|
const owner = stateByName.get(play.name);
|
|
6513
|
-
if (!project || !_optionalChain([owner, 'optionalAccess',
|
|
6437
|
+
if (!project || !_optionalChain([owner, 'optionalAccess', _198 => _198.playProjectRepo]) || owner.playProjectRepo === _optionalChain([project, 'optionalAccess', _199 => _199.repoFullName]) || owner.playProjectDisabled) {
|
|
6514
6438
|
continue;
|
|
6515
6439
|
}
|
|
6516
6440
|
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.`;
|
|
@@ -6533,16 +6457,16 @@ async function runDeployment(params, hooks) {
|
|
|
6533
6457
|
}
|
|
6534
6458
|
const playByName = new Map(ordered.map((play) => [play.name, play]));
|
|
6535
6459
|
const sdkUpdated = (name) => {
|
|
6536
|
-
const artifact = _optionalChain([playByName, 'access',
|
|
6537
|
-
const live = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
6460
|
+
const artifact = _optionalChain([playByName, 'access', _200 => _200.get, 'call', _201 => _201(name), 'optionalAccess', _202 => _202.result, 'access', _203 => _203.artifact]);
|
|
6461
|
+
const live = _nullishCoalesce(_optionalChain([stateByName, 'access', _204 => _204.get, 'call', _205 => _205(name), 'optionalAccess', _206 => _206.liveRevision]), () => ( null));
|
|
6538
6462
|
return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
|
|
6539
6463
|
};
|
|
6540
6464
|
const outcomes = [];
|
|
6541
6465
|
const toRegister = [];
|
|
6542
6466
|
const toPromote = [];
|
|
6543
6467
|
const takeoverWarning = (state2) => {
|
|
6544
|
-
const owner = _optionalChain([state2, 'optionalAccess',
|
|
6545
|
-
if (!owner || owner === _optionalChain([project, 'optionalAccess',
|
|
6468
|
+
const owner = _optionalChain([state2, 'optionalAccess', _207 => _207.playProjectRepo]);
|
|
6469
|
+
if (!owner || owner === _optionalChain([project, 'optionalAccess', _208 => _208.repoFullName])) return void 0;
|
|
6546
6470
|
if (!project) {
|
|
6547
6471
|
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.`;
|
|
6548
6472
|
}
|
|
@@ -6554,8 +6478,8 @@ async function runDeployment(params, hooks) {
|
|
|
6554
6478
|
const artifact = play.result.artifact;
|
|
6555
6479
|
const importsOtherPlays = (_nullishCoalesce(play.result.importedPlayDependencies, () => ( []))).length > 0;
|
|
6556
6480
|
const matches = (revision) => !importsOtherPlays && carriesArtifact(revision, artifact);
|
|
6557
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6558
|
-
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess',
|
|
6481
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _209 => _209.liveRevision]), () => ( null)))) {
|
|
6482
|
+
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess', _210 => _210.playProjectId]) !== project.id || _optionalChain([playState, 'optionalAccess', _211 => _211.driftFromGit]))) {
|
|
6559
6483
|
toPromote.push({
|
|
6560
6484
|
name: play.name,
|
|
6561
6485
|
revisionId: playState.liveRevision.revisionId
|
|
@@ -6566,12 +6490,12 @@ async function runDeployment(params, hooks) {
|
|
|
6566
6490
|
name: play.name,
|
|
6567
6491
|
file: play.file,
|
|
6568
6492
|
status: "unchanged",
|
|
6569
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6493
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _212 => _212.liveRevision, 'optionalAccess', _213 => _213.version]), () => ( void 0)),
|
|
6570
6494
|
...warning ? { warning } : {}
|
|
6571
6495
|
});
|
|
6572
6496
|
continue;
|
|
6573
6497
|
}
|
|
6574
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6498
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _214 => _214.workingRevision]), () => ( null)))) {
|
|
6575
6499
|
if (deployment.isProduction) {
|
|
6576
6500
|
toPromote.push({
|
|
6577
6501
|
name: play.name,
|
|
@@ -6582,7 +6506,7 @@ async function runDeployment(params, hooks) {
|
|
|
6582
6506
|
name: play.name,
|
|
6583
6507
|
file: play.file,
|
|
6584
6508
|
status: "registered",
|
|
6585
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
6509
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _215 => _215.workingRevision, 'optionalAccess', _216 => _216.version]), () => ( void 0)),
|
|
6586
6510
|
...sdkUpdated(play.name),
|
|
6587
6511
|
...warning ? { warning } : {}
|
|
6588
6512
|
});
|
|
@@ -6709,11 +6633,11 @@ async function runDeployment(params, hooks) {
|
|
|
6709
6633
|
const promotion = await client.promote(toPromote);
|
|
6710
6634
|
promoted = true;
|
|
6711
6635
|
for (const outcome of promotion.outcomes) {
|
|
6712
|
-
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
6636
|
+
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access', _217 => _217.get, 'call', _218 => _218(outcome.name), 'optionalAccess', _219 => _219.liveRevision, 'optionalAccess', _220 => _220.version]), () => ( null));
|
|
6713
6637
|
const warning = takeoverWarning(stateByName.get(outcome.name));
|
|
6714
6638
|
outcomes.push({
|
|
6715
6639
|
name: outcome.name,
|
|
6716
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
6640
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _221 => _221.get, 'call', _222 => _222(outcome.name), 'optionalAccess', _223 => _223.file]), () => ( outcome.name)),
|
|
6717
6641
|
status: outcome.status === "promoted" ? "promoted" : "failed",
|
|
6718
6642
|
version: outcome.version,
|
|
6719
6643
|
...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
|
|
@@ -6725,7 +6649,7 @@ async function runDeployment(params, hooks) {
|
|
|
6725
6649
|
} catch (error) {
|
|
6726
6650
|
if (revokedFinalStatus(error)) throw error;
|
|
6727
6651
|
const body = error instanceof DeployApiError ? error.body : null;
|
|
6728
|
-
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
6652
|
+
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess', _224 => _224.error]), () => ( (error instanceof Error ? error.message : String(error))));
|
|
6729
6653
|
if (/PLAY_DEPLOYMENT_NOT_ACTIVE/.test(errorText)) {
|
|
6730
6654
|
console.info("[deploy-worker] cancelled at promote", {
|
|
6731
6655
|
deploymentId: params.deploymentId
|
|
@@ -6749,9 +6673,9 @@ async function runDeployment(params, hooks) {
|
|
|
6749
6673
|
error: errorText,
|
|
6750
6674
|
outcomes: [
|
|
6751
6675
|
...outcomes,
|
|
6752
|
-
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
6676
|
+
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _225 => _225.outcomes]), () => ( toPromote))).map((entry) => ({
|
|
6753
6677
|
name: entry.name,
|
|
6754
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
6678
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _226 => _226.get, 'call', _227 => _227(entry.name), 'optionalAccess', _228 => _228.file]), () => ( entry.name)),
|
|
6755
6679
|
status: "failed",
|
|
6756
6680
|
error: _nullishCoalesce(("error" in entry ? entry.error : void 0), () => ( errorText))
|
|
6757
6681
|
}))
|
|
@@ -6795,7 +6719,7 @@ async function runDeployment(params, hooks) {
|
|
|
6795
6719
|
});
|
|
6796
6720
|
let checkRunId;
|
|
6797
6721
|
try {
|
|
6798
|
-
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall',
|
|
6722
|
+
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _229 => _229(message.slice(0, 2e3))]);
|
|
6799
6723
|
} catch (checkError) {
|
|
6800
6724
|
const revokedAtCheck = revokedFinalStatus(checkError);
|
|
6801
6725
|
if (revokedAtCheck) {
|
|
@@ -6863,7 +6787,7 @@ function renderOutcome(outcome) {
|
|
|
6863
6787
|
function printResult2(input) {
|
|
6864
6788
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6865
6789
|
if (failed) process.exitCode = 1;
|
|
6866
|
-
|
|
6790
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
6867
6791
|
{
|
|
6868
6792
|
deployment: { ...input.deployment, status: input.status },
|
|
6869
6793
|
plays: input.outcomes,
|
|
@@ -6888,7 +6812,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6888
6812
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6889
6813
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6890
6814
|
});
|
|
6891
|
-
const { http, config } =
|
|
6815
|
+
const { http, config } = _chunk4RV7U3RPjs.getAuthedHttpClient.call(void 0, );
|
|
6892
6816
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6893
6817
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6894
6818
|
deliveryId,
|
|
@@ -6915,14 +6839,14 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6915
6839
|
},
|
|
6916
6840
|
{
|
|
6917
6841
|
bundle: bundleDeployPlayFile,
|
|
6918
|
-
fetchImpl:
|
|
6842
|
+
fetchImpl: _chunkKBBZXWXFjs.fetchWithDeploymentProtection,
|
|
6919
6843
|
// The plays are already here: "opening" the source is naming it.
|
|
6920
6844
|
openSource: async () => ({
|
|
6921
6845
|
open: async () => ({ repoRoot: root })
|
|
6922
6846
|
}),
|
|
6923
6847
|
target: {
|
|
6924
6848
|
rootDirectory: "",
|
|
6925
|
-
manifestPath: _nullishCoalesce(_optionalChain([options, 'access',
|
|
6849
|
+
manifestPath: _nullishCoalesce(_optionalChain([options, 'access', _230 => _230.manifest, 'optionalAccess', _231 => _231.trim, 'call', _232 => _232()]), () => ( ""))
|
|
6926
6850
|
},
|
|
6927
6851
|
workRoot
|
|
6928
6852
|
}
|
|
@@ -7006,7 +6930,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
7006
6930
|
sourceCode: node.sourceCode,
|
|
7007
6931
|
sourceFiles: node.sourceFiles,
|
|
7008
6932
|
description: _nullishCoalesce(node.playDescription, () => ( void 0)),
|
|
7009
|
-
artifact: _nullishCoalesce(_optionalChain([input, 'access',
|
|
6933
|
+
artifact: _nullishCoalesce(_optionalChain([input, 'access', _233 => _233.prepareArtifact, 'optionalCall', _234 => _234(node.artifact)]), () => ( node.artifact)),
|
|
7010
6934
|
...exportName === "default" ? {} : { exportName },
|
|
7011
6935
|
...importedPlays.length ? { importedPlays } : {},
|
|
7012
6936
|
...input.integrationMode ? { integrationMode: input.integrationMode } : {}
|
|
@@ -7041,7 +6965,7 @@ async function checkLocalPlayGraph(input) {
|
|
|
7041
6965
|
// src/cli/renderers/local-play-execution.ts
|
|
7042
6966
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
7043
6967
|
if (options.dryRun) {
|
|
7044
|
-
|
|
6968
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
7045
6969
|
return;
|
|
7046
6970
|
}
|
|
7047
6971
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -7133,7 +7057,7 @@ async function preflightRunIdFile(path) {
|
|
|
7133
7057
|
`Cannot write --run-id-file destination ${destination}: ${error instanceof Error ? error.message : String(error)}`
|
|
7134
7058
|
);
|
|
7135
7059
|
} finally {
|
|
7136
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
7060
|
+
await _optionalChain([handle, 'optionalAccess', _235 => _235.close, 'call', _236 => _236()]);
|
|
7137
7061
|
await removeRunIdTempFile(tempPath);
|
|
7138
7062
|
}
|
|
7139
7063
|
return destination;
|
|
@@ -7187,9 +7111,9 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
7187
7111
|
} catch (error) {
|
|
7188
7112
|
if (error.code !== "EEXIST") throw error;
|
|
7189
7113
|
const raced = await readRunIdFile(destination);
|
|
7190
|
-
if (_optionalChain([raced, 'optionalAccess',
|
|
7114
|
+
if (_optionalChain([raced, 'optionalAccess', _237 => _237.runId]) !== runId) {
|
|
7191
7115
|
throw new Error(
|
|
7192
|
-
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess',
|
|
7116
|
+
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess', _238 => _238.runId]), () => ( "<invalid>"))}; refusing to replace it with ${runId}: ${destination}`
|
|
7193
7117
|
);
|
|
7194
7118
|
}
|
|
7195
7119
|
if (!options.launchConfirmed || raced.launchConfirmed) return;
|
|
@@ -7205,7 +7129,7 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
7205
7129
|
}
|
|
7206
7130
|
}
|
|
7207
7131
|
} finally {
|
|
7208
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
7132
|
+
await _optionalChain([handle, 'optionalAccess', _239 => _239.close, 'call', _240 => _240()]);
|
|
7209
7133
|
await removeRunIdTempFile(tempPath);
|
|
7210
7134
|
}
|
|
7211
7135
|
}
|
|
@@ -7213,7 +7137,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7213
7137
|
const startedAt = Date.now();
|
|
7214
7138
|
try {
|
|
7215
7139
|
const result = run();
|
|
7216
|
-
|
|
7140
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
7217
7141
|
phase,
|
|
7218
7142
|
ms: Date.now() - startedAt,
|
|
7219
7143
|
ok: true,
|
|
@@ -7221,7 +7145,7 @@ function traceCliSync(phase, fields2, run) {
|
|
|
7221
7145
|
});
|
|
7222
7146
|
return result;
|
|
7223
7147
|
} catch (error) {
|
|
7224
|
-
|
|
7148
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
7225
7149
|
phase,
|
|
7226
7150
|
ms: Date.now() - startedAt,
|
|
7227
7151
|
ok: false,
|
|
@@ -7274,10 +7198,10 @@ function playReferenceMatchTokens(value) {
|
|
|
7274
7198
|
return normalizePlayReferenceForMatch(value).split("-").filter((token) => token.length > 1 && token !== "to" && token !== "and");
|
|
7275
7199
|
}
|
|
7276
7200
|
function playSuggestionReference(play) {
|
|
7277
|
-
if (_optionalChain([play, 'access',
|
|
7201
|
+
if (_optionalChain([play, 'access', _241 => _241.reference, 'optionalAccess', _242 => _242.trim, 'call', _243 => _243()])) {
|
|
7278
7202
|
return play.reference.trim();
|
|
7279
7203
|
}
|
|
7280
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
7204
|
+
const ownerSlug = _optionalChain([play, 'access', _244 => _244.ownerSlug, 'optionalAccess', _245 => _245.trim, 'call', _246 => _246()]);
|
|
7281
7205
|
return ownerSlug ? `${ownerSlug}/${play.name}` : play.name;
|
|
7282
7206
|
}
|
|
7283
7207
|
function scorePlayReferenceSuggestion(requested, play) {
|
|
@@ -7293,8 +7217,8 @@ function scorePlayReferenceSuggestion(requested, play) {
|
|
|
7293
7217
|
const reference = playSuggestionReference(play);
|
|
7294
7218
|
const referenceNorm = normalizePlayReferenceForMatch(reference);
|
|
7295
7219
|
const nameNorm = normalizePlayReferenceForMatch(play.name);
|
|
7296
|
-
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access',
|
|
7297
|
-
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access',
|
|
7220
|
+
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access', _247 => _247.split, 'call', _248 => _248("/"), 'access', _249 => _249[0], 'optionalAccess', _250 => _250.toLowerCase, 'call', _251 => _251()]) : null;
|
|
7221
|
+
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access', _252 => _252.ownerSlug, 'optionalAccess', _253 => _253.toLowerCase, 'call', _254 => _254()]), () => ( null));
|
|
7298
7222
|
const aliases = (_nullishCoalesce(play.aliases, () => ( []))).map(normalizePlayReferenceForMatch);
|
|
7299
7223
|
const searchable = [referenceNorm, nameNorm, ...aliases].filter(Boolean);
|
|
7300
7224
|
const requestedTokens = playReferenceMatchTokens(requestedName);
|
|
@@ -7411,16 +7335,16 @@ async function buildPlayReferenceNotFoundError(input) {
|
|
|
7411
7335
|
suggestions = [];
|
|
7412
7336
|
}
|
|
7413
7337
|
const sourceError = input.sourceError instanceof _chunkDIAWYWT5js.DeeplineError ? input.sourceError : null;
|
|
7414
|
-
const code = _optionalChain([sourceError, 'optionalAccess',
|
|
7338
|
+
const code = _optionalChain([sourceError, 'optionalAccess', _255 => _255.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
|
|
7415
7339
|
return new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
7416
7340
|
buildPlayReferenceNotFoundMessage({
|
|
7417
7341
|
requested: input.target,
|
|
7418
7342
|
command: input.command,
|
|
7419
7343
|
suggestions
|
|
7420
7344
|
}),
|
|
7421
|
-
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess',
|
|
7345
|
+
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _256 => _256.statusCode]), () => ( 404)),
|
|
7422
7346
|
code,
|
|
7423
|
-
_optionalChain([sourceError, 'optionalAccess',
|
|
7347
|
+
_optionalChain([sourceError, 'optionalAccess', _257 => _257.details])
|
|
7424
7348
|
);
|
|
7425
7349
|
}
|
|
7426
7350
|
async function isMissingRunPlayReferenceError(input) {
|
|
@@ -7472,7 +7396,7 @@ function formatPlayReference(play) {
|
|
|
7472
7396
|
if (play.reference) {
|
|
7473
7397
|
return play.reference;
|
|
7474
7398
|
}
|
|
7475
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
7399
|
+
const ownerSlug = _optionalChain([play, 'access', _258 => _258.ownerSlug, 'optionalAccess', _259 => _259.trim, 'call', _260 => _260()]) || "org";
|
|
7476
7400
|
return `${ownerSlug}/${play.name}`;
|
|
7477
7401
|
}
|
|
7478
7402
|
function formatPlayListReference(play) {
|
|
@@ -7502,7 +7426,7 @@ function materializeRemotePlaySource(input) {
|
|
|
7502
7426
|
return null;
|
|
7503
7427
|
}
|
|
7504
7428
|
const entrySource = input.source.files[input.source.entryFile];
|
|
7505
|
-
if (!_optionalChain([entrySource, 'optionalAccess',
|
|
7429
|
+
if (!_optionalChain([entrySource, 'optionalAccess', _261 => _261.trim, 'call', _262 => _262()])) {
|
|
7506
7430
|
return null;
|
|
7507
7431
|
}
|
|
7508
7432
|
const files = Object.entries(input.source.files);
|
|
@@ -7581,8 +7505,8 @@ async function ensureEditableRemotePlay(client, target) {
|
|
|
7581
7505
|
return detail;
|
|
7582
7506
|
}
|
|
7583
7507
|
function writeInlinePlay(code) {
|
|
7584
|
-
const filePath = _path.resolve.call(void 0,
|
|
7585
|
-
const source =
|
|
7508
|
+
const filePath = _path.resolve.call(void 0, _chunk7UFFWPQ2js.INLINE_PLAY_FILE);
|
|
7509
|
+
const source = _chunk7UFFWPQ2js.inlinePlaySource.call(void 0, code);
|
|
7586
7510
|
try {
|
|
7587
7511
|
_fs.writeFileSync.call(void 0, filePath, source, { flag: "wx" });
|
|
7588
7512
|
} catch (error) {
|
|
@@ -7601,7 +7525,7 @@ function buildMissingDefinePlayError(filePath) {
|
|
|
7601
7525
|
);
|
|
7602
7526
|
}
|
|
7603
7527
|
function extractPlayName(code, filePath) {
|
|
7604
|
-
const definedPlayName =
|
|
7528
|
+
const definedPlayName = _chunk7UFFWPQ2js.extractDefinedPlayName.call(void 0, code, filePath);
|
|
7605
7529
|
if (definedPlayName) {
|
|
7606
7530
|
return definedPlayName;
|
|
7607
7531
|
}
|
|
@@ -7830,7 +7754,7 @@ function unresolvedPackagedFilesMessage(node) {
|
|
|
7830
7754
|
const details = node.unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
7831
7755
|
return `Failed to package local deepline.csv(...) files in ${node.filePath}: ${details}`;
|
|
7832
7756
|
}
|
|
7833
|
-
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName =
|
|
7757
|
+
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunk7UFFWPQ2js.PLAY_DEFAULT_EXPORT, options = {}) {
|
|
7834
7758
|
const playBundler = await loadPlayBundler();
|
|
7835
7759
|
const nodes = /* @__PURE__ */ new Map();
|
|
7836
7760
|
const diagnostics = [];
|
|
@@ -7844,7 +7768,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
|
|
|
7844
7768
|
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
7845
7769
|
target: artifactKind,
|
|
7846
7770
|
...options.cache === false ? { cache: false } : {},
|
|
7847
|
-
...absolutePath === rootPath && entryExportName !==
|
|
7771
|
+
...absolutePath === rootPath && entryExportName !== _chunk7UFFWPQ2js.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
7848
7772
|
});
|
|
7849
7773
|
if (bundleResult.success === false) {
|
|
7850
7774
|
diagnostics.push(
|
|
@@ -7895,7 +7819,7 @@ async function compileBundledPlayGraphManifests(client, graph) {
|
|
|
7895
7819
|
const child = graph.nodes.get(
|
|
7896
7820
|
normalizePlayPath(dependency.filePath)
|
|
7897
7821
|
);
|
|
7898
|
-
if (!_optionalChain([child, 'optionalAccess',
|
|
7822
|
+
if (!_optionalChain([child, 'optionalAccess', _263 => _263.compilerManifest])) {
|
|
7899
7823
|
throw new Error(
|
|
7900
7824
|
`Missing compiler manifest for imported dependency ${dependency.filePath}.`
|
|
7901
7825
|
);
|
|
@@ -7974,7 +7898,7 @@ function formatTimestamp(value) {
|
|
|
7974
7898
|
return date.toISOString();
|
|
7975
7899
|
}
|
|
7976
7900
|
function isoTimestamp(value) {
|
|
7977
|
-
return _nullishCoalesce(_optionalChain([timestampDate, 'call',
|
|
7901
|
+
return _nullishCoalesce(_optionalChain([timestampDate, 'call', _264 => _264(value), 'optionalAccess', _265 => _265.toISOString, 'call', _266 => _266()]), () => ( null));
|
|
7978
7902
|
}
|
|
7979
7903
|
function formatRunLine(run) {
|
|
7980
7904
|
const credits = typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount2(run.billingTotalCredits)} credits` : "\u2014";
|
|
@@ -7982,7 +7906,7 @@ function formatRunLine(run) {
|
|
|
7982
7906
|
}
|
|
7983
7907
|
function playStatusErrorText(status) {
|
|
7984
7908
|
const chunks = [];
|
|
7985
|
-
const progressError = _optionalChain([status, 'access',
|
|
7909
|
+
const progressError = _optionalChain([status, 'access', _267 => _267.progress, 'optionalAccess', _268 => _268.error]);
|
|
7986
7910
|
if (typeof progressError === "string" && progressError.trim()) {
|
|
7987
7911
|
chunks.push(progressError.trim());
|
|
7988
7912
|
}
|
|
@@ -8008,7 +7932,7 @@ function playStatusErrorText(status) {
|
|
|
8008
7932
|
function isRetryablePendingStartFailure(status) {
|
|
8009
7933
|
if (status.status !== "failed") return false;
|
|
8010
7934
|
if (status.runId && status.runId !== "pending") return false;
|
|
8011
|
-
return
|
|
7935
|
+
return _chunk2MSKG4ERjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
8012
7936
|
}
|
|
8013
7937
|
function isAmbiguousPlayStartOutcomeError(error) {
|
|
8014
7938
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && typeof error.statusCode === "number") {
|
|
@@ -8057,13 +7981,13 @@ var PlayStartOutcomeUnknownError = (_class = class extends _chunkDIAWYWT5js.Deep
|
|
|
8057
7981
|
}, _class);
|
|
8058
7982
|
function watchSurfaceReaches(state, provenance, level) {
|
|
8059
7983
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
8060
|
-
if (!
|
|
7984
|
+
if (!_chunk2MSKG4ERjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
8061
7985
|
return false;
|
|
8062
7986
|
}
|
|
8063
|
-
if (
|
|
7987
|
+
if (_chunk2MSKG4ERjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
8064
7988
|
return true;
|
|
8065
7989
|
}
|
|
8066
|
-
return state.verbose === true &&
|
|
7990
|
+
return state.verbose === true && _chunk2MSKG4ERjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
8067
7991
|
}
|
|
8068
7992
|
function getEventPayload(event) {
|
|
8069
7993
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -8086,7 +8010,7 @@ function getRunIdFromLiveEvent(event) {
|
|
|
8086
8010
|
if (typeof directRunId === "string" && directRunId.trim()) {
|
|
8087
8011
|
return directRunId;
|
|
8088
8012
|
}
|
|
8089
|
-
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call',
|
|
8013
|
+
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _269 => _269(payload), 'optionalAccess', _270 => _270.id]);
|
|
8090
8014
|
return typeof packageRunId === "string" && packageRunId.trim() ? packageRunId : null;
|
|
8091
8015
|
}
|
|
8092
8016
|
function eventConfirmsPlayRunLaunch(event) {
|
|
@@ -8107,19 +8031,19 @@ function getStatusFromLiveEvent(event) {
|
|
|
8107
8031
|
return null;
|
|
8108
8032
|
}
|
|
8109
8033
|
const payload = getEventPayload(event);
|
|
8110
|
-
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call',
|
|
8034
|
+
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _271 => _271(payload), 'optionalAccess', _272 => _272.status]))));
|
|
8111
8035
|
}
|
|
8112
8036
|
function readLiveRunField(event, field) {
|
|
8113
8037
|
const payload = getEventPayload(event);
|
|
8114
8038
|
if (field === "waitKind") {
|
|
8115
|
-
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call',
|
|
8039
|
+
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _273 => _273(payload), 'optionalAccess', _274 => _274.wait])));
|
|
8116
8040
|
if (wait && typeof wait === "object" && !Array.isArray(wait)) {
|
|
8117
8041
|
const kind = wait.kind;
|
|
8118
8042
|
if (typeof kind === "string" && kind.trim()) return kind.trim();
|
|
8119
8043
|
}
|
|
8120
8044
|
}
|
|
8121
8045
|
const run = getRunRecordFromPackage(payload);
|
|
8122
|
-
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess',
|
|
8046
|
+
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _275 => _275.progress])].filter(
|
|
8123
8047
|
(value) => Boolean(value && typeof value === "object" && !Array.isArray(value))
|
|
8124
8048
|
);
|
|
8125
8049
|
for (const record3 of records) {
|
|
@@ -8134,7 +8058,7 @@ function getLiveRunStringField(event, field) {
|
|
|
8134
8058
|
function getLiveRunActivity(event) {
|
|
8135
8059
|
const payload = getEventPayload(event);
|
|
8136
8060
|
const run = getRunRecordFromPackage(payload);
|
|
8137
|
-
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess',
|
|
8061
|
+
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _276 => _276.activity])];
|
|
8138
8062
|
for (const candidate of candidates) {
|
|
8139
8063
|
if (candidate && typeof candidate === "object" && !Array.isArray(candidate) && typeof candidate.summary === "string" && candidate.observation && typeof candidate.observation === "object") {
|
|
8140
8064
|
return candidate;
|
|
@@ -8149,9 +8073,9 @@ function getRunLifecycleHint(input) {
|
|
|
8149
8073
|
return null;
|
|
8150
8074
|
}
|
|
8151
8075
|
const activity = getLiveRunActivity(input.event);
|
|
8152
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
8076
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _277 => _277.observation, 'access', _278 => _278.state, 'access', _279 => _279.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
8153
8077
|
const inspect = `'deepline runs get ${runId} --full'`;
|
|
8154
|
-
const sleepState = _optionalChain([activity, 'optionalAccess',
|
|
8078
|
+
const sleepState = _optionalChain([activity, 'optionalAccess', _280 => _280.observation, 'access', _281 => _281.state, 'access', _282 => _282.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
|
|
8155
8079
|
if (status === "waiting" && (sleepState !== null || getLiveRunStringField(input.event, "waitKind") === "sleep")) {
|
|
8156
8080
|
const recordedWake = readLiveRunField(input.event, "waitUntil");
|
|
8157
8081
|
const projectedWake = sleepState && sleepState.resumeAt > activity.observation.observedAt ? sleepState.resumeAt : null;
|
|
@@ -8162,7 +8086,7 @@ function getRunLifecycleHint(input) {
|
|
|
8162
8086
|
};
|
|
8163
8087
|
}
|
|
8164
8088
|
const typedEventWaitKind = getLiveRunStringField(input.event, "waitKind");
|
|
8165
|
-
const activityEventWait = _optionalChain([activity, 'optionalAccess',
|
|
8089
|
+
const activityEventWait = _optionalChain([activity, 'optionalAccess', _283 => _283.observation, 'access', _284 => _284.state, 'access', _285 => _285.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
|
|
8166
8090
|
if (status === "waiting" && (typedEventWaitKind === "integration_event" || typedEventWaitKind === "integration_event_batch" || activityEventWait)) {
|
|
8167
8091
|
return {
|
|
8168
8092
|
signature: [
|
|
@@ -8235,12 +8159,12 @@ function getFinalStatusFromLiveEvent(event) {
|
|
|
8235
8159
|
}
|
|
8236
8160
|
const payload = getEventPayload(event);
|
|
8237
8161
|
const packageRun = getRunRecordFromPackage(payload);
|
|
8238
|
-
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess',
|
|
8162
|
+
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _286 => _286.status]))));
|
|
8239
8163
|
if (status !== "completed" && status !== "failed" && status !== "cancelled") {
|
|
8240
8164
|
return null;
|
|
8241
8165
|
}
|
|
8242
|
-
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
8243
|
-
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
8166
|
+
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _287 => _287.id]) === "string" ? packageRun.id : "";
|
|
8167
|
+
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _288 => _288.error]) === "string" ? packageRun.error : void 0;
|
|
8244
8168
|
return {
|
|
8245
8169
|
...payload,
|
|
8246
8170
|
runId,
|
|
@@ -8475,7 +8399,7 @@ function getProgressLinesFromLiveEvent(event) {
|
|
|
8475
8399
|
(count2) => typeof count2 === "number" && Number.isSafeInteger(count2) && count2 >= 0
|
|
8476
8400
|
)) {
|
|
8477
8401
|
lines.push(
|
|
8478
|
-
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess',
|
|
8402
|
+
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _289 => _289.confirmed]) === true ? "" : " (observed)"}`
|
|
8479
8403
|
);
|
|
8480
8404
|
}
|
|
8481
8405
|
const rowOutcomes = readRowOutcomeSummary({
|
|
@@ -8526,7 +8450,7 @@ function getRunningHeartbeatLine(input) {
|
|
|
8526
8450
|
return null;
|
|
8527
8451
|
}
|
|
8528
8452
|
const activity = getLiveRunActivity(input.event);
|
|
8529
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
8453
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _290 => _290.observation, 'access', _291 => _291.state, 'access', _292 => _292.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
8530
8454
|
if (activity && activity.classified !== false && !activityConflictsWithDurableWait) {
|
|
8531
8455
|
return `activity ${input.playName}: ${activity.summary}`;
|
|
8532
8456
|
}
|
|
@@ -8559,13 +8483,13 @@ function printPlayStatusHeartbeat(input) {
|
|
|
8559
8483
|
input.progress.writeLine(line);
|
|
8560
8484
|
}
|
|
8561
8485
|
function resolveRunPlayName(status, runId) {
|
|
8562
|
-
const packaged = _optionalChain([status, 'access',
|
|
8486
|
+
const packaged = _optionalChain([status, 'access', _293 => _293.package, 'optionalAccess', _294 => _294.run, 'optionalAccess', _295 => _295.playName]);
|
|
8563
8487
|
if (typeof packaged === "string" && packaged.trim()) return packaged.trim();
|
|
8564
|
-
return _nullishCoalesce(_nullishCoalesce(extractRunPlayName(status), () => ( _optionalChain([/^play\/(.+)\/(?:run|webhook)\//, 'access',
|
|
8488
|
+
return _nullishCoalesce(_nullishCoalesce(extractRunPlayName(status), () => ( _optionalChain([/^play\/(.+)\/(?:run|webhook)\//, 'access', _296 => _296.exec, 'call', _297 => _297(runId), 'optionalAccess', _298 => _298[1]]))), () => ( null));
|
|
8565
8489
|
}
|
|
8566
8490
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
8567
8491
|
if (open2 && dashboardUrl) {
|
|
8568
|
-
|
|
8492
|
+
_chunk4RV7U3RPjs.openInBrowser.call(void 0, dashboardUrl);
|
|
8569
8493
|
}
|
|
8570
8494
|
}
|
|
8571
8495
|
function printPlayLogLines(input) {
|
|
@@ -8617,7 +8541,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8617
8541
|
const confirmAdmission = async () => {
|
|
8618
8542
|
if (admissionConfirmed) return;
|
|
8619
8543
|
admissionConfirmed = true;
|
|
8620
|
-
await _optionalChain([input, 'access',
|
|
8544
|
+
await _optionalChain([input, 'access', _299 => _299.onRunAdmitted, 'optionalCall', _300 => _300(input.workflowId)]);
|
|
8621
8545
|
};
|
|
8622
8546
|
const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
|
|
8623
8547
|
const finishTerminalStatus = async (status) => {
|
|
@@ -8642,7 +8566,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8642
8566
|
...input.fullJson === void 0 ? {} : { full: input.fullJson }
|
|
8643
8567
|
});
|
|
8644
8568
|
} catch (error) {
|
|
8645
|
-
if (
|
|
8569
|
+
if (_chunk2MSKG4ERjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
8646
8570
|
return null;
|
|
8647
8571
|
}
|
|
8648
8572
|
throw error;
|
|
@@ -8722,9 +8646,9 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8722
8646
|
signal: controller.signal,
|
|
8723
8647
|
deferLogs: !input.emitLogs,
|
|
8724
8648
|
omitTerminalLogs: !input.emitLogs,
|
|
8725
|
-
...
|
|
8649
|
+
..._chunkV7I65ME7js.isCliTraceEnabled.call(void 0, ) ? {
|
|
8726
8650
|
onPoll: (observation) => {
|
|
8727
|
-
|
|
8651
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
8728
8652
|
phase: "play_watch_poll",
|
|
8729
8653
|
workflowId: input.workflowId,
|
|
8730
8654
|
ms: observation.durationMs,
|
|
@@ -8738,7 +8662,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
8738
8662
|
full: input.fullJson,
|
|
8739
8663
|
billing: false,
|
|
8740
8664
|
onStatus: async (status) => {
|
|
8741
|
-
|
|
8665
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
8742
8666
|
phase: "play_watch_terminal_status",
|
|
8743
8667
|
workflowId: input.workflowId,
|
|
8744
8668
|
full: input.fullJson === true
|
|
@@ -8808,7 +8732,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8808
8732
|
});
|
|
8809
8733
|
} catch (error) {
|
|
8810
8734
|
if (!(error instanceof _chunkJDMR33HSjs.CliPlayAdmissionUnsupportedError)) throw error;
|
|
8811
|
-
await
|
|
8735
|
+
await _chunkA5LPDB6Njs.checkPlayRunCompatibility.call(void 0,
|
|
8812
8736
|
input.client.baseUrl,
|
|
8813
8737
|
input.maintenancePolicy
|
|
8814
8738
|
);
|
|
@@ -8839,8 +8763,8 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8839
8763
|
"PLAY_START_MISSING_RUN_ID"
|
|
8840
8764
|
);
|
|
8841
8765
|
}
|
|
8842
|
-
await _optionalChain([input, 'access',
|
|
8843
|
-
await _optionalChain([input, 'access',
|
|
8766
|
+
await _optionalChain([input, 'access', _301 => _301.onRunStarted, 'optionalCall', _302 => _302(workflowId)]);
|
|
8767
|
+
await _optionalChain([input, 'access', _303 => _303.onRunAdmitted, 'optionalCall', _304 => _304(workflowId)]);
|
|
8844
8768
|
const dashboardUrl = _nullishCoalesce(started.dashboardUrl, () => ( _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, input.client.baseUrl, input.playName)));
|
|
8845
8769
|
const rateLimited = _nullishCoalesce(started.rateLimited, () => ( null));
|
|
8846
8770
|
if (!input.jsonOutput) {
|
|
@@ -8856,7 +8780,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8856
8780
|
}
|
|
8857
8781
|
openPlayDashboard(dashboardUrl, _nullishCoalesce(input.open, () => ( false)));
|
|
8858
8782
|
input.progress.phase("running");
|
|
8859
|
-
|
|
8783
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
8860
8784
|
phase: "cli.play_start_admitted",
|
|
8861
8785
|
ms: Date.now() - startedAt,
|
|
8862
8786
|
ok: true,
|
|
@@ -8865,15 +8789,15 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8865
8789
|
inlineCompatibility
|
|
8866
8790
|
});
|
|
8867
8791
|
const initialTerminal = readRecord(started.finalStatus);
|
|
8868
|
-
const initialPackage = _nullishCoalesce(readRecord(_optionalChain([initialTerminal, 'optionalAccess',
|
|
8869
|
-
const initialRun = readRecord(_optionalChain([initialPackage, 'optionalAccess',
|
|
8870
|
-
if (initialTerminal && _optionalChain([initialRun, 'optionalAccess',
|
|
8792
|
+
const initialPackage = _nullishCoalesce(readRecord(_optionalChain([initialTerminal, 'optionalAccess', _305 => _305.package])), () => ( initialTerminal));
|
|
8793
|
+
const initialRun = readRecord(_optionalChain([initialPackage, 'optionalAccess', _306 => _306.run]));
|
|
8794
|
+
if (initialTerminal && _optionalChain([initialRun, 'optionalAccess', _307 => _307.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") {
|
|
8871
8795
|
assertPlayWaitNotTimedOut({
|
|
8872
8796
|
workflowId,
|
|
8873
8797
|
startedAt,
|
|
8874
8798
|
waitTimeoutMs: input.waitTimeoutMs
|
|
8875
8799
|
});
|
|
8876
|
-
const initialStatus =
|
|
8800
|
+
const initialStatus = _chunk2MSKG4ERjs.normalizePlayStatus.call(void 0, initialTerminal);
|
|
8877
8801
|
const status2 = await resolvePlayRunOutputStatus({
|
|
8878
8802
|
client: input.client,
|
|
8879
8803
|
status: initialStatus,
|
|
@@ -8881,7 +8805,7 @@ async function startAndWaitForPlayCompletion(input) {
|
|
|
8881
8805
|
jsonOutput: input.jsonOutput,
|
|
8882
8806
|
fromDurableStatus: true
|
|
8883
8807
|
});
|
|
8884
|
-
|
|
8808
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
8885
8809
|
phase: "play_watch_terminal_status",
|
|
8886
8810
|
workflowId,
|
|
8887
8811
|
full: true,
|
|
@@ -8936,7 +8860,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8936
8860
|
);
|
|
8937
8861
|
} catch (error) {
|
|
8938
8862
|
if (error instanceof _chunkJDMR33HSjs.CliPlayAdmissionUnsupportedError && input.cliAdmission) {
|
|
8939
|
-
await
|
|
8863
|
+
await _chunkA5LPDB6Njs.checkPlayRunCompatibility.call(void 0,
|
|
8940
8864
|
input.client.baseUrl,
|
|
8941
8865
|
input.maintenancePolicy
|
|
8942
8866
|
);
|
|
@@ -8963,7 +8887,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8963
8887
|
`[play watch] start response was ambiguous; retrying the same caller intent (${error.message})`
|
|
8964
8888
|
);
|
|
8965
8889
|
}
|
|
8966
|
-
|
|
8890
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
8967
8891
|
phase: "cli.play_start_stream_retry",
|
|
8968
8892
|
ms: 0,
|
|
8969
8893
|
ok: true,
|
|
@@ -8984,7 +8908,7 @@ async function startAndWaitForPlayCompletionByStream(input) {
|
|
|
8984
8908
|
`[play watch] start failed before run id with a transient error; retrying (${playStatusErrorText(status)})`
|
|
8985
8909
|
);
|
|
8986
8910
|
}
|
|
8987
|
-
|
|
8911
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
8988
8912
|
phase: "cli.play_start_stream_retry",
|
|
8989
8913
|
ms: 0,
|
|
8990
8914
|
ok: true,
|
|
@@ -9018,7 +8942,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9018
8942
|
let timedOut = false;
|
|
9019
8943
|
let emittedDashboardUrl = false;
|
|
9020
8944
|
let lastKnownWorkflowId = "";
|
|
9021
|
-
let launchedRevisionId = _optionalChain([input, 'access',
|
|
8945
|
+
let launchedRevisionId = _optionalChain([input, 'access', _308 => _308.request, 'access', _309 => _309.revisionId, 'optionalAccess', _310 => _310.trim, 'call', _311 => _311()]) || null;
|
|
9022
8946
|
let eventCount = 0;
|
|
9023
8947
|
let firstRunIdMs = null;
|
|
9024
8948
|
let launchConfirmed = false;
|
|
@@ -9028,8 +8952,8 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9028
8952
|
const confirmAdmission = async (runId) => {
|
|
9029
8953
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
9030
8954
|
launchConfirmed = true;
|
|
9031
|
-
await _optionalChain([input, 'access',
|
|
9032
|
-
|
|
8955
|
+
await _optionalChain([input, 'access', _312 => _312.onRunAdmitted, 'optionalCall', _313 => _313(runId)]);
|
|
8956
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9033
8957
|
phase: "cli.play_start_admitted",
|
|
9034
8958
|
ms: Date.now() - startedAt,
|
|
9035
8959
|
ok: true,
|
|
@@ -9063,7 +8987,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9063
8987
|
full: input.fullJson
|
|
9064
8988
|
});
|
|
9065
8989
|
} catch (error) {
|
|
9066
|
-
if (
|
|
8990
|
+
if (_chunk2MSKG4ERjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9067
8991
|
return null;
|
|
9068
8992
|
}
|
|
9069
8993
|
throw error;
|
|
@@ -9089,7 +9013,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9089
9013
|
if (eventRevisionId) {
|
|
9090
9014
|
launchedRevisionId = eventRevisionId;
|
|
9091
9015
|
}
|
|
9092
|
-
const eventRateLimited = _optionalChain([getEventPayload, 'call',
|
|
9016
|
+
const eventRateLimited = _optionalChain([getEventPayload, 'call', _314 => _314(event), 'optionalAccess', _315 => _315.rateLimited]);
|
|
9093
9017
|
if (eventRateLimited && typeof eventRateLimited === "object") {
|
|
9094
9018
|
notice.value = eventRateLimited;
|
|
9095
9019
|
}
|
|
@@ -9099,7 +9023,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9099
9023
|
lastKnownWorkflowId = eventRunId;
|
|
9100
9024
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
9101
9025
|
if (runStartedNow) {
|
|
9102
|
-
await _optionalChain([input, 'access',
|
|
9026
|
+
await _optionalChain([input, 'access', _316 => _316.onRunStarted, 'optionalCall', _317 => _317(eventRunId)]);
|
|
9103
9027
|
}
|
|
9104
9028
|
}
|
|
9105
9029
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -9201,7 +9125,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9201
9125
|
};
|
|
9202
9126
|
}
|
|
9203
9127
|
if (!canonicalTerminal) {
|
|
9204
|
-
|
|
9128
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9205
9129
|
phase: "cli.play_start_stream_stale_terminal_ignored",
|
|
9206
9130
|
ms: Date.now() - startedAt,
|
|
9207
9131
|
ok: true,
|
|
@@ -9222,14 +9146,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9222
9146
|
fromDurableStatus
|
|
9223
9147
|
}) : canonicalTerminal;
|
|
9224
9148
|
if (input.fullJson === true) {
|
|
9225
|
-
|
|
9149
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9226
9150
|
phase: "play_watch_terminal_status",
|
|
9227
9151
|
workflowId: outputTerminal.runId || lastKnownWorkflowId || void 0,
|
|
9228
9152
|
full: true,
|
|
9229
9153
|
source: outputTerminal === canonicalTerminal ? fromDurableStatus ? "start_stream_durable" : "start_stream" : "durable_repair"
|
|
9230
9154
|
});
|
|
9231
9155
|
}
|
|
9232
|
-
|
|
9156
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9233
9157
|
phase: "cli.play_start_stream_terminal",
|
|
9234
9158
|
ms: Date.now() - startedAt,
|
|
9235
9159
|
ok: true,
|
|
@@ -9249,7 +9173,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9249
9173
|
clearTimeout(timeout);
|
|
9250
9174
|
}
|
|
9251
9175
|
controller.abort();
|
|
9252
|
-
|
|
9176
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9253
9177
|
phase: "cli.play_start_stream_handoff_to_tail",
|
|
9254
9178
|
ms: Date.now() - startedAt,
|
|
9255
9179
|
ok: true,
|
|
@@ -9280,7 +9204,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9280
9204
|
if (timedOut) {
|
|
9281
9205
|
const terminal = await fetchKnownTerminalStatus();
|
|
9282
9206
|
if (terminal) {
|
|
9283
|
-
|
|
9207
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9284
9208
|
phase: "cli.play_start_stream_timeout_status_reconcile",
|
|
9285
9209
|
ms: Date.now() - startedAt,
|
|
9286
9210
|
ok: true,
|
|
@@ -9300,7 +9224,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9300
9224
|
lastPhase
|
|
9301
9225
|
});
|
|
9302
9226
|
}
|
|
9303
|
-
if (lastKnownWorkflowId && (terminalWindowExpired ||
|
|
9227
|
+
if (lastKnownWorkflowId && (terminalWindowExpired || _chunk2MSKG4ERjs.isTransientPlayRunReadError.call(void 0, error))) {
|
|
9304
9228
|
if (timeout) {
|
|
9305
9229
|
clearTimeout(timeout);
|
|
9306
9230
|
}
|
|
@@ -9311,7 +9235,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9311
9235
|
`
|
|
9312
9236
|
);
|
|
9313
9237
|
}
|
|
9314
|
-
|
|
9238
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9315
9239
|
phase: "cli.play_start_stream_reconnect",
|
|
9316
9240
|
ms: Date.now() - startedAt,
|
|
9317
9241
|
ok: true,
|
|
@@ -9338,7 +9262,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9338
9262
|
});
|
|
9339
9263
|
}
|
|
9340
9264
|
if (!lastKnownWorkflowId && isAmbiguousPlayStartOutcomeError(error)) {
|
|
9341
|
-
|
|
9265
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9342
9266
|
phase: "cli.play_start_stream_transient_failure",
|
|
9343
9267
|
ms: Date.now() - startedAt,
|
|
9344
9268
|
ok: false,
|
|
@@ -9366,7 +9290,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9366
9290
|
`[play watch] start stream ended after run ${lastKnownWorkflowId}; reconnecting to canonical run stream`
|
|
9367
9291
|
);
|
|
9368
9292
|
}
|
|
9369
|
-
|
|
9293
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
9370
9294
|
phase: "cli.play_start_stream_reconnect",
|
|
9371
9295
|
ms: Date.now() - startedAt,
|
|
9372
9296
|
ok: true,
|
|
@@ -9446,29 +9370,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
9446
9370
|
"logs"
|
|
9447
9371
|
]);
|
|
9448
9372
|
function formatPlayLogLine(rawLine, state) {
|
|
9449
|
-
const classified =
|
|
9373
|
+
const classified = _chunk2MSKG4ERjs.classifyLogLine.call(void 0, rawLine);
|
|
9450
9374
|
const line = classified.line;
|
|
9451
9375
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
9452
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
9376
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _318 => _318[1]]) ? new Date(timestampMatch[1]) : null;
|
|
9453
9377
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
9454
9378
|
hour12: false,
|
|
9455
9379
|
hour: "2-digit",
|
|
9456
9380
|
minute: "2-digit",
|
|
9457
9381
|
second: "2-digit"
|
|
9458
9382
|
}) : null;
|
|
9459
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
9383
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _319 => _319[2]]), () => ( line));
|
|
9460
9384
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
9461
9385
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
9462
9386
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
9463
9387
|
if (providerWait && !state.verbose) {
|
|
9464
|
-
return
|
|
9388
|
+
return _chunk2MSKG4ERjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
9465
9389
|
}
|
|
9466
9390
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
9467
9391
|
if (mapProgress && !state.verbose) {
|
|
9468
|
-
return
|
|
9392
|
+
return _chunk2MSKG4ERjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
9469
9393
|
}
|
|
9470
9394
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
9471
|
-
if (!
|
|
9395
|
+
if (!_chunk2MSKG4ERjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9472
9396
|
return null;
|
|
9473
9397
|
}
|
|
9474
9398
|
if (state.emittedRunnerStarted) {
|
|
@@ -9481,7 +9405,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9481
9405
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
9482
9406
|
);
|
|
9483
9407
|
if (mapStart) {
|
|
9484
|
-
if (!
|
|
9408
|
+
if (!_chunk2MSKG4ERjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9485
9409
|
return null;
|
|
9486
9410
|
}
|
|
9487
9411
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -9491,7 +9415,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
9491
9415
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
9492
9416
|
);
|
|
9493
9417
|
if (mapDone) {
|
|
9494
|
-
if (!
|
|
9418
|
+
if (!_chunk2MSKG4ERjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
9495
9419
|
return null;
|
|
9496
9420
|
}
|
|
9497
9421
|
const [, results, executed, cached] = mapDone;
|
|
@@ -9673,20 +9597,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
9673
9597
|
function buildRunWarnings(status, rowsInfo) {
|
|
9674
9598
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
9675
9599
|
const result = readRecord(status.result);
|
|
9676
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
9677
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
9600
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _320 => _320._metadata]));
|
|
9601
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _321 => _321.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
9678
9602
|
if (!warning) return false;
|
|
9679
9603
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
9680
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
9604
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _322 => _322.message])).filter(
|
|
9681
9605
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
9682
9606
|
).slice(0, 16) : [];
|
|
9683
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
9607
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _323 => _323.hasRowFailures]) ? [
|
|
9684
9608
|
`${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.`
|
|
9685
9609
|
] : [];
|
|
9686
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9610
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _324 => _324.supersededRows]), () => ( 0))) > 0 ? [
|
|
9687
9611
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
9688
9612
|
] : [];
|
|
9689
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
9613
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _325 => _325.totalRows]) === 0) {
|
|
9690
9614
|
return [
|
|
9691
9615
|
...rowOutcomeWarnings,
|
|
9692
9616
|
...supersededRowNotices,
|
|
@@ -9705,7 +9629,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
9705
9629
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
9706
9630
|
}
|
|
9707
9631
|
function buildRunNextCommands(status) {
|
|
9708
|
-
const runId = _optionalChain([status, 'access',
|
|
9632
|
+
const runId = _optionalChain([status, 'access', _326 => _326.runId, 'optionalAccess', _327 => _327.trim, 'call', _328 => _328()]);
|
|
9709
9633
|
if (!runId) {
|
|
9710
9634
|
const playName = extractRunPlayName(status);
|
|
9711
9635
|
return playName ? {
|
|
@@ -9856,14 +9780,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
9856
9780
|
return null;
|
|
9857
9781
|
}
|
|
9858
9782
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
9859
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
9783
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _329 => _329[1]])) {
|
|
9860
9784
|
return lowerToolMatch[1];
|
|
9861
9785
|
}
|
|
9862
9786
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
9863
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
9787
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _330 => _330[1]]), () => ( null));
|
|
9864
9788
|
}
|
|
9865
9789
|
function isInsufficientCreditsBilling(billing) {
|
|
9866
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
9790
|
+
return _optionalChain([billing, 'optionalAccess', _331 => _331.kind]) === "insufficient_credits";
|
|
9867
9791
|
}
|
|
9868
9792
|
function extractBillingForStatus(status, error) {
|
|
9869
9793
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -9905,8 +9829,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
9905
9829
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
9906
9830
|
const progress = input.status.progress;
|
|
9907
9831
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
9908
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9909
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
9832
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _332 => _332.rows, 'access', _333 => _333.length]))), () => ( null));
|
|
9833
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _334 => _334.totalRows]))), () => ( null));
|
|
9910
9834
|
const lines = [
|
|
9911
9835
|
" status: stopped_insufficient_credits",
|
|
9912
9836
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -9925,7 +9849,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
9925
9849
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
9926
9850
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
9927
9851
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
9928
|
-
const runId = _optionalChain([input, 'access',
|
|
9852
|
+
const runId = _optionalChain([input, 'access', _335 => _335.status, 'access', _336 => _336.runId, 'optionalAccess', _337 => _337.trim, 'call', _338 => _338()]);
|
|
9929
9853
|
if (runId) {
|
|
9930
9854
|
lines.push(` inspect: deepline runs get ${runId}`);
|
|
9931
9855
|
lines.push(
|
|
@@ -10007,10 +9931,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
10007
9931
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
10008
9932
|
const progress = status.progress;
|
|
10009
9933
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
10010
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10011
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10012
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10013
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
9934
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _339 => _339.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _340 => _340.totalRows]))), () => ( null));
|
|
9935
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _341 => _341.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
9936
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _342 => _342.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
9937
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _343 => _343.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
10014
9938
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
10015
9939
|
const progressPending = getNumericField(progress, "pending");
|
|
10016
9940
|
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)));
|
|
@@ -10080,7 +10004,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
10080
10004
|
];
|
|
10081
10005
|
}
|
|
10082
10006
|
function normalizeLogsForEnvelope(status) {
|
|
10083
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
10007
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _344 => _344.progress, 'optionalAccess', _345 => _345.logs])) ? status.progress.logs : [];
|
|
10084
10008
|
const totalCount = logs.length;
|
|
10085
10009
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
10086
10010
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -10137,7 +10061,7 @@ function compactPlayStatus(status) {
|
|
|
10137
10061
|
const packaged = getPlayRunPackage(status);
|
|
10138
10062
|
if (packaged) {
|
|
10139
10063
|
const packagedRun = readRecord(packaged.run);
|
|
10140
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
10064
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _346 => _346.error]) === "string" ? packagedRun.error : null;
|
|
10141
10065
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
10142
10066
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
10143
10067
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -10288,7 +10212,7 @@ function formatTopValuesPart(value) {
|
|
|
10288
10212
|
}
|
|
10289
10213
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
10290
10214
|
const record3 = readRecord(summary);
|
|
10291
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
10215
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _347 => _347.columnStats]));
|
|
10292
10216
|
if (!record3 || !columnStats) {
|
|
10293
10217
|
return [];
|
|
10294
10218
|
}
|
|
@@ -10376,7 +10300,7 @@ function packageDatasetRecords(packaged) {
|
|
|
10376
10300
|
if (catalog.length > 0) return catalog;
|
|
10377
10301
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
10378
10302
|
const output = readRecord(step.output);
|
|
10379
|
-
return _optionalChain([output, 'optionalAccess',
|
|
10303
|
+
return _optionalChain([output, 'optionalAccess', _348 => _348.kind]) === "dataset" ? [output] : [];
|
|
10380
10304
|
});
|
|
10381
10305
|
}
|
|
10382
10306
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -10385,7 +10309,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
10385
10309
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
10386
10310
|
for (const outputValue of Object.values(outputs)) {
|
|
10387
10311
|
const output = readRecord(outputValue);
|
|
10388
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
10312
|
+
if (_optionalChain([output, 'optionalAccess', _349 => _349.kind]) !== "dataset") continue;
|
|
10389
10313
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
10390
10314
|
datasetIds.add(output.datasetId.trim());
|
|
10391
10315
|
}
|
|
@@ -10421,7 +10345,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
10421
10345
|
}
|
|
10422
10346
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
10423
10347
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
10424
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
10348
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _350 => _350.includeSummary]), () => ( true));
|
|
10425
10349
|
const lines = [];
|
|
10426
10350
|
const steps = readRecordArray(packaged.steps);
|
|
10427
10351
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -10430,10 +10354,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10430
10354
|
for (const step of steps) {
|
|
10431
10355
|
if (step.kind !== "dataset") continue;
|
|
10432
10356
|
const output = readRecord(step.output);
|
|
10433
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10357
|
+
if (typeof _optionalChain([output, 'optionalAccess', _351 => _351.datasetId]) === "string") {
|
|
10434
10358
|
stepsByDatasetId.set(output.datasetId, step);
|
|
10435
10359
|
}
|
|
10436
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
10360
|
+
if (typeof _optionalChain([output, 'optionalAccess', _352 => _352.path]) === "string") {
|
|
10437
10361
|
stepsByPath.set(output.path, step);
|
|
10438
10362
|
}
|
|
10439
10363
|
if (typeof step.id === "string") {
|
|
@@ -10447,8 +10371,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10447
10371
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
10448
10372
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
10449
10373
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
10450
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
10451
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
10374
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _353 => _353.complete]) === false;
|
|
10375
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _354 => _354.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
10452
10376
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
10453
10377
|
if (countUnconfirmed) {
|
|
10454
10378
|
lines.push(
|
|
@@ -10466,7 +10390,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10466
10390
|
}
|
|
10467
10391
|
}
|
|
10468
10392
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
10469
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
10393
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _355 => _355.progress]));
|
|
10470
10394
|
if (progress) {
|
|
10471
10395
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
10472
10396
|
}
|
|
@@ -10480,10 +10404,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10480
10404
|
}
|
|
10481
10405
|
const exportAction = readRecord(actions2.exportCsv);
|
|
10482
10406
|
const exportCommand = actionToCommand(exportAction);
|
|
10483
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
10407
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _356 => _356.scope]));
|
|
10484
10408
|
const queryAction = readRecord(actions2.query);
|
|
10485
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
10486
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
10409
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _357 => _357.scope]));
|
|
10410
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _358 => _358.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
10487
10411
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
10488
10412
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
10489
10413
|
if (runQueryCommand) {
|
|
@@ -10495,11 +10419,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
10495
10419
|
}
|
|
10496
10420
|
if (exportCommand) {
|
|
10497
10421
|
lines.push(
|
|
10498
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
10422
|
+
_optionalChain([exportScope, 'optionalAccess', _359 => _359.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
10499
10423
|
);
|
|
10500
10424
|
}
|
|
10501
10425
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
10502
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
10426
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _360 => _360.reason]) === "string" && typeof unavailable.message === "string") {
|
|
10503
10427
|
lines.push(
|
|
10504
10428
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
10505
10429
|
);
|
|
@@ -10516,7 +10440,7 @@ function packageSavedRowCount(packaged) {
|
|
|
10516
10440
|
}
|
|
10517
10441
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
10518
10442
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
10519
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
10443
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _361 => _361.exec, 'call', _362 => _362(message), 'optionalAccess', _363 => _363[1]]);
|
|
10520
10444
|
if (configuredSeconds) {
|
|
10521
10445
|
const seconds = Number(configuredSeconds);
|
|
10522
10446
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -10563,7 +10487,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10563
10487
|
if (!outputs) return [];
|
|
10564
10488
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
10565
10489
|
const record3 = readRecord(output);
|
|
10566
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
10490
|
+
return _optionalChain([record3, 'optionalAccess', _364 => _364.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _365 => _365.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
10567
10491
|
});
|
|
10568
10492
|
if (returned.length === 0) return [];
|
|
10569
10493
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -10583,10 +10507,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10583
10507
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
10584
10508
|
);
|
|
10585
10509
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
10586
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
10510
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _366 => _366.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _367 => _367.path]) === path
|
|
10587
10511
|
);
|
|
10588
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
10589
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10512
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _368 => _368.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _369 => _369.preview]))));
|
|
10513
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _370 => _370.rows])) ? preview.rows.slice(0, 2) : [];
|
|
10590
10514
|
if (rows.length > 0) {
|
|
10591
10515
|
lines.push(` sample rows (${rows.length}):`);
|
|
10592
10516
|
lines.push(
|
|
@@ -10612,7 +10536,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
10612
10536
|
return lines;
|
|
10613
10537
|
}
|
|
10614
10538
|
function authoredPackageStackFrames(packaged) {
|
|
10615
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
10539
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _371 => _371.trim, 'call', _372 => _372()])));
|
|
10616
10540
|
if (!stack) return [];
|
|
10617
10541
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
10618
10542
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -10644,9 +10568,9 @@ function activityIsoTimestamp(value) {
|
|
|
10644
10568
|
}
|
|
10645
10569
|
function buildRunActivityTextLines(run) {
|
|
10646
10570
|
const activity = readRecord(run.activity);
|
|
10647
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
10648
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10649
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
10571
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _373 => _373.observation]));
|
|
10572
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _374 => _374.state]));
|
|
10573
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _375 => _375.target]));
|
|
10650
10574
|
if (!activity || !observation || !state) return [];
|
|
10651
10575
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
10652
10576
|
if (kind === "completed") return [];
|
|
@@ -10691,11 +10615,11 @@ function buildRunActivityTextLines(run) {
|
|
|
10691
10615
|
}
|
|
10692
10616
|
function formatObservedRunCounter(value) {
|
|
10693
10617
|
const counter = readRecord(value);
|
|
10694
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
10618
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _376 => _376.value]);
|
|
10695
10619
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
10696
10620
|
return "unknown";
|
|
10697
10621
|
}
|
|
10698
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
10622
|
+
return _optionalChain([counter, 'optionalAccess', _377 => _377.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
10699
10623
|
}
|
|
10700
10624
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
10701
10625
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -10708,13 +10632,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10708
10632
|
);
|
|
10709
10633
|
}
|
|
10710
10634
|
const source = readRecord(evidence.source);
|
|
10711
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
10635
|
+
if (_optionalChain([source, 'optionalAccess', _378 => _378.aligned]) === false) {
|
|
10712
10636
|
lines.push(
|
|
10713
10637
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
10714
10638
|
);
|
|
10715
10639
|
}
|
|
10716
10640
|
const focus = readRecord(evidence.focusStep);
|
|
10717
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
10641
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _379 => _379.rows]));
|
|
10718
10642
|
if (focus) {
|
|
10719
10643
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
10720
10644
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -10722,7 +10646,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10722
10646
|
const known = readRecordArray(packaged.steps).find(
|
|
10723
10647
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
10724
10648
|
);
|
|
10725
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
10649
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _380 => _380.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
10726
10650
|
deriveNodeExecutionState({
|
|
10727
10651
|
reported: {
|
|
10728
10652
|
status: focus.status.trim(),
|
|
@@ -10732,7 +10656,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
10732
10656
|
total: rows.total
|
|
10733
10657
|
} : null
|
|
10734
10658
|
},
|
|
10735
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
10659
|
+
runStatus: _optionalChain([run, 'optionalAccess', _381 => _381.status])
|
|
10736
10660
|
})
|
|
10737
10661
|
) : null;
|
|
10738
10662
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -10780,7 +10704,7 @@ function formatRecentRunLogLines(value) {
|
|
|
10780
10704
|
(line) => typeof line === "string"
|
|
10781
10705
|
);
|
|
10782
10706
|
if (tail.length === 0) return [];
|
|
10783
|
-
const shown = tail.map((line) =>
|
|
10707
|
+
const shown = tail.map((line) => _chunk2MSKG4ERjs.classifyLogLine.call(void 0, line)).filter(
|
|
10784
10708
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
10785
10709
|
).slice(-8);
|
|
10786
10710
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -10824,7 +10748,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10824
10748
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
10825
10749
|
}
|
|
10826
10750
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
10827
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
10751
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _382 => _382.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
10828
10752
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
10829
10753
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
10830
10754
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -10835,11 +10759,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10835
10759
|
}
|
|
10836
10760
|
}
|
|
10837
10761
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
10838
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
10762
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _383 => _383.entries])) ? failedLogs.entries.filter(
|
|
10839
10763
|
(entry) => typeof entry === "string"
|
|
10840
10764
|
) : [];
|
|
10841
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10842
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
10765
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _384 => _384.association]) === "string" ? failedLogs.association : null;
|
|
10766
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _385 => _385.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
10843
10767
|
if (failedLogEntries.length > 0) {
|
|
10844
10768
|
lines.push(" failed logs:");
|
|
10845
10769
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -10858,8 +10782,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10858
10782
|
)
|
|
10859
10783
|
).slice(0, 16) : [];
|
|
10860
10784
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
10861
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
10862
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
10785
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _386 => _386.next]));
|
|
10786
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _387 => _387.logs]) === "string") {
|
|
10863
10787
|
lines.push(
|
|
10864
10788
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
10865
10789
|
);
|
|
@@ -10887,20 +10811,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
10887
10811
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
10888
10812
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
10889
10813
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
10890
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
10891
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
10814
|
+
const preview = _optionalChain([output, 'optionalAccess', _388 => _388.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
10815
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _389 => _389.rows])) ? preview.rows.length : null;
|
|
10892
10816
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
10893
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
10817
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _390 => _390.summary])));
|
|
10894
10818
|
if (previewRows !== null) {
|
|
10895
10819
|
lines.push(
|
|
10896
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
10820
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _391 => _391.truncated]) ? " truncated" : ""}`
|
|
10897
10821
|
);
|
|
10898
10822
|
}
|
|
10899
10823
|
}
|
|
10900
10824
|
const inspectCommand = actionToCommand(next.inspect);
|
|
10901
10825
|
const fullResultCommand = actionToCommand(next.full);
|
|
10902
10826
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
10903
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
10827
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _392 => _392(dataset.actions), 'optionalAccess', _393 => _393.exportCsv])))
|
|
10904
10828
|
);
|
|
10905
10829
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
10906
10830
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -10965,7 +10889,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
10965
10889
|
}
|
|
10966
10890
|
function buildBillingRollupTextLines(status) {
|
|
10967
10891
|
const billing = status.billing;
|
|
10968
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
10892
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _394 => _394.rollup]);
|
|
10969
10893
|
if (!rollup) return [];
|
|
10970
10894
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
10971
10895
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -10984,7 +10908,7 @@ function buildBillingRollupTextLines(status) {
|
|
|
10984
10908
|
return [` cost: ${total} credits`];
|
|
10985
10909
|
}
|
|
10986
10910
|
function playRunRateLimitedNotice(status) {
|
|
10987
|
-
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call',
|
|
10911
|
+
const notice = _nullishCoalesce(_optionalChain([getPlayRunPackage, 'call', _395 => _395(status), 'optionalAccess', _396 => _396.rateLimited]), () => ( status.rateLimited));
|
|
10988
10912
|
return notice && typeof notice === "object" ? notice : null;
|
|
10989
10913
|
}
|
|
10990
10914
|
function withRateLimitedNotice(status, notice) {
|
|
@@ -11024,7 +10948,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11024
10948
|
const overview = buildRunOverview(status);
|
|
11025
10949
|
const { run } = overview;
|
|
11026
10950
|
const failed = run.status === "failed";
|
|
11027
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
10951
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _397 => _397.rowOutcomes, 'optionalAccess', _398 => _398.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
11028
10952
|
const rateLimited = playRunRateLimitedNotice(status);
|
|
11029
10953
|
const lines = [
|
|
11030
10954
|
...rateLimited ? [rateLimited.message] : [],
|
|
@@ -11046,7 +10970,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11046
10970
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
11047
10971
|
);
|
|
11048
10972
|
}
|
|
11049
|
-
if (_optionalChain([overview, 'access',
|
|
10973
|
+
if (_optionalChain([overview, 'access', _399 => _399.rowOutcomes, 'optionalAccess', _400 => _400.hasRowFailures])) {
|
|
11050
10974
|
lines.push(
|
|
11051
10975
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
11052
10976
|
);
|
|
@@ -11075,17 +10999,17 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11075
10999
|
}
|
|
11076
11000
|
function writePlayResult(status, jsonOutput, options) {
|
|
11077
11001
|
const packaged = getPlayRunPackage(status);
|
|
11078
|
-
if (status.package)
|
|
11079
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11002
|
+
if (status.package) _chunkUXQVSDFPjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11003
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _401 => _401.hits]), () => ( null));
|
|
11080
11004
|
if (jsonOutput) {
|
|
11081
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
11082
|
-
|
|
11005
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _402 => _402.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11006
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
11083
11007
|
hits ? { ...payload2, hits } : payload2,
|
|
11084
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11008
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _403 => _403.jsonFields]) }
|
|
11085
11009
|
);
|
|
11086
11010
|
return;
|
|
11087
11011
|
}
|
|
11088
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11012
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _404 => _404.fullJson])) {
|
|
11089
11013
|
const {
|
|
11090
11014
|
logs: _logs,
|
|
11091
11015
|
failedLogs: _failedLogs,
|
|
@@ -11095,7 +11019,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11095
11019
|
...buildPlayCompletionTextLines(status),
|
|
11096
11020
|
...formatRunHitsLines(hits)
|
|
11097
11021
|
];
|
|
11098
|
-
|
|
11022
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11099
11023
|
json: false,
|
|
11100
11024
|
text: `${lines2.join("\n")}
|
|
11101
11025
|
`
|
|
@@ -11145,8 +11069,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11145
11069
|
lines.push(...renderedServerView.actions);
|
|
11146
11070
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11147
11071
|
const compact = compactPlayStatus(status);
|
|
11148
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11149
|
-
|
|
11072
|
+
const payload = _optionalChain([options, 'optionalAccess', _405 => _405.fullJson]) ? status : compact;
|
|
11073
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
11150
11074
|
{
|
|
11151
11075
|
...payload,
|
|
11152
11076
|
render: {
|
|
@@ -11199,7 +11123,7 @@ async function resolvePlayRunOutputStatus(input) {
|
|
|
11199
11123
|
const streamedPackage = getPlayRunPackage(input.status);
|
|
11200
11124
|
const refreshForFullJson = input.fullJson && !input.fromDurableStatus;
|
|
11201
11125
|
const streamedTextPackageIncomplete = input.status.status === "completed" && playRunPackageTextLedgerIncomplete(streamedPackage);
|
|
11202
|
-
const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call',
|
|
11126
|
+
const refreshFailedTerminal = input.status.status === "failed" && (!input.fromDurableStatus || _optionalChain([readRecord, 'call', _406 => _406(_optionalChain([streamedPackage, 'optionalAccess', _407 => _407.run])), 'optionalAccess', _408 => _408.status]) !== "failed");
|
|
11203
11127
|
if (!refreshForFullJson && !streamedTextPackageIncomplete && !refreshFailedTerminal) {
|
|
11204
11128
|
return input.status;
|
|
11205
11129
|
}
|
|
@@ -11299,14 +11223,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11299
11223
|
return columns;
|
|
11300
11224
|
}
|
|
11301
11225
|
function sqlSafeExportColumnName(id) {
|
|
11302
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11226
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _409 => _409.trim, 'call', _410 => _410(), 'access', _411 => _411.match, 'call', _412 => _412(/^_+/), 'optionalAccess', _413 => _413[0]]), () => ( ""));
|
|
11303
11227
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11304
11228
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11305
11229
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11306
11230
|
}
|
|
11307
11231
|
async function fetchBackingDatasetRows(input) {
|
|
11308
11232
|
const playName = extractRunPlayName(input.status);
|
|
11309
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11233
|
+
const tableNamespace = _optionalChain([input, 'access', _414 => _414.rowsInfo, 'access', _415 => _415.tableNamespace, 'optionalAccess', _416 => _416.trim, 'call', _417 => _417()]);
|
|
11310
11234
|
if (!playName || !tableNamespace) {
|
|
11311
11235
|
return null;
|
|
11312
11236
|
}
|
|
@@ -11346,7 +11270,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11346
11270
|
seenEnvelopeKeys.add(key);
|
|
11347
11271
|
}
|
|
11348
11272
|
sheetRows.push(...page.rows);
|
|
11349
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11273
|
+
const summaryTotal = _optionalChain([page, 'access', _418 => _418.summary, 'optionalAccess', _419 => _419.stats, 'optionalAccess', _420 => _420.total]);
|
|
11350
11274
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11351
11275
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11352
11276
|
}
|
|
@@ -11355,7 +11279,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11355
11279
|
}
|
|
11356
11280
|
offset += page.rows.length;
|
|
11357
11281
|
}
|
|
11358
|
-
const withError =
|
|
11282
|
+
const withError = _chunkUXQVSDFPjs.tableExportHasFailedRows.call(void 0,
|
|
11359
11283
|
sheetRows.filter(
|
|
11360
11284
|
(row) => Boolean(row) && typeof row === "object" && !Array.isArray(row)
|
|
11361
11285
|
)
|
|
@@ -11371,7 +11295,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11371
11295
|
return [
|
|
11372
11296
|
withError ? {
|
|
11373
11297
|
...exported,
|
|
11374
|
-
[
|
|
11298
|
+
[_chunkUXQVSDFPjs.TABLE_EXPORT_ERROR_COLUMN]: _chunkUXQVSDFPjs.tableExportErrorCell.call(void 0,
|
|
11375
11299
|
row
|
|
11376
11300
|
)
|
|
11377
11301
|
} : exported
|
|
@@ -11440,7 +11364,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
11440
11364
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
11441
11365
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
11442
11366
|
)));
|
|
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',
|
|
11367
|
+
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', _421 => _421.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
11444
11368
|
return input.rowsInfo;
|
|
11445
11369
|
}
|
|
11446
11370
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -11512,8 +11436,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11512
11436
|
path: dataset.exportFile(outPath, options),
|
|
11513
11437
|
rowsInfo: dataset.info(),
|
|
11514
11438
|
currentTable: false,
|
|
11515
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11516
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11439
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _422 => _422.source]), () => ( null)),
|
|
11440
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _423 => _423.info, 'call', _424 => _424()]), () => ( null))
|
|
11517
11441
|
};
|
|
11518
11442
|
};
|
|
11519
11443
|
const run = Run.open({
|
|
@@ -11525,7 +11449,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
11525
11449
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
11526
11450
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
11527
11451
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
11528
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
11452
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _425 => _425.info, 'call', _426 => _426()]), () => ( null));
|
|
11529
11453
|
if (!selectedDataset && options.datasetPath) {
|
|
11530
11454
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
11531
11455
|
const commands = datasetChoiceLines({
|
|
@@ -11638,7 +11562,7 @@ ${commands.join("\n")}`,
|
|
|
11638
11562
|
throw error;
|
|
11639
11563
|
}
|
|
11640
11564
|
}
|
|
11641
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
11565
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _427 => _427.complete])) {
|
|
11642
11566
|
const guarded2 = assertDatasetHasExportableRows({
|
|
11643
11567
|
rowsInfo: fetchedRowsInfo,
|
|
11644
11568
|
status,
|
|
@@ -11703,7 +11627,7 @@ function extractActiveRunsFromError(error) {
|
|
|
11703
11627
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError)) {
|
|
11704
11628
|
return [];
|
|
11705
11629
|
}
|
|
11706
|
-
const response = _optionalChain([error, 'access',
|
|
11630
|
+
const response = _optionalChain([error, 'access', _428 => _428.details, 'optionalAccess', _429 => _429.response]);
|
|
11707
11631
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
11708
11632
|
return [];
|
|
11709
11633
|
}
|
|
@@ -11820,8 +11744,8 @@ function renderServerResultView(value) {
|
|
|
11820
11744
|
return { lines: [], actions: [] };
|
|
11821
11745
|
}
|
|
11822
11746
|
const view = value;
|
|
11823
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
11824
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
11747
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _430 => _430.render, 'optionalAccess', _431 => _431.sections])) ? view.render.sections : [];
|
|
11748
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _432 => _432.render, 'optionalAccess', _433 => _433.actions])) ? view.render.actions : [];
|
|
11825
11749
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
11826
11750
|
const lines2 = [];
|
|
11827
11751
|
for (const section of renderedSections) {
|
|
@@ -11859,7 +11783,7 @@ function renderServerResultView(value) {
|
|
|
11859
11783
|
}
|
|
11860
11784
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
11861
11785
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
11862
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
11786
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _434 => _434.queryCommand]) === "string") {
|
|
11863
11787
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
11864
11788
|
}
|
|
11865
11789
|
if (tables.length > 0) {
|
|
@@ -11906,7 +11830,7 @@ function renderServerResultView(value) {
|
|
|
11906
11830
|
function writeStartedPlayRun(input) {
|
|
11907
11831
|
if (input.package && isPlayRunPackageValue(input.package)) {
|
|
11908
11832
|
const run = input.package.run;
|
|
11909
|
-
|
|
11833
|
+
_chunkUXQVSDFPjs.recordPlayTermination.call(void 0, {
|
|
11910
11834
|
id: run.id,
|
|
11911
11835
|
status: run.status,
|
|
11912
11836
|
finishedAt: run.finishedAt
|
|
@@ -11919,7 +11843,7 @@ function writeStartedPlayRun(input) {
|
|
|
11919
11843
|
dashboardUrl: input.dashboardUrl,
|
|
11920
11844
|
package: input.package
|
|
11921
11845
|
};
|
|
11922
|
-
|
|
11846
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
11923
11847
|
json: true,
|
|
11924
11848
|
fields: input.jsonFields
|
|
11925
11849
|
});
|
|
@@ -11941,7 +11865,7 @@ function writeStartedPlayRun(input) {
|
|
|
11941
11865
|
input.progress.writeLine(output2, process.stdout);
|
|
11942
11866
|
return;
|
|
11943
11867
|
}
|
|
11944
|
-
|
|
11868
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, input.package, {
|
|
11945
11869
|
json: false,
|
|
11946
11870
|
text: `${output2}
|
|
11947
11871
|
`
|
|
@@ -11970,7 +11894,7 @@ function writeStartedPlayRun(input) {
|
|
|
11970
11894
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
11971
11895
|
];
|
|
11972
11896
|
if (input.jsonOutput) {
|
|
11973
|
-
|
|
11897
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
11974
11898
|
return;
|
|
11975
11899
|
}
|
|
11976
11900
|
if (input.dashboardUrl) {
|
|
@@ -11981,7 +11905,7 @@ function writeStartedPlayRun(input) {
|
|
|
11981
11905
|
input.progress.writeLine(output, process.stdout);
|
|
11982
11906
|
return;
|
|
11983
11907
|
}
|
|
11984
|
-
|
|
11908
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
11985
11909
|
{
|
|
11986
11910
|
...payload,
|
|
11987
11911
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -11991,7 +11915,7 @@ function writeStartedPlayRun(input) {
|
|
|
11991
11915
|
);
|
|
11992
11916
|
}
|
|
11993
11917
|
function parsePlayCheckOptions(args) {
|
|
11994
|
-
const selection =
|
|
11918
|
+
const selection = _chunk4RV7U3RPjs.parseJsonFields.call(void 0, args, "check");
|
|
11995
11919
|
args = selection.args;
|
|
11996
11920
|
const target = args[0];
|
|
11997
11921
|
if (!target || target.startsWith("-")) {
|
|
@@ -12003,7 +11927,7 @@ function parsePlayCheckOptions(args) {
|
|
|
12003
11927
|
if (arg !== "--json" && arg !== "--full")
|
|
12004
11928
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
12005
11929
|
}
|
|
12006
|
-
const jsonOutput =
|
|
11930
|
+
const jsonOutput = _chunk4RV7U3RPjs.argsWantJson.call(void 0, args);
|
|
12007
11931
|
return {
|
|
12008
11932
|
target,
|
|
12009
11933
|
jsonOutput,
|
|
@@ -12079,7 +12003,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12079
12003
|
useLatest,
|
|
12080
12004
|
expectedArtifactHash,
|
|
12081
12005
|
dryRun,
|
|
12082
|
-
jsonOutput:
|
|
12006
|
+
jsonOutput: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args)
|
|
12083
12007
|
};
|
|
12084
12008
|
}
|
|
12085
12009
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12120,7 +12044,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12120
12044
|
target,
|
|
12121
12045
|
expectedArtifactHash,
|
|
12122
12046
|
dryRun,
|
|
12123
|
-
jsonOutput:
|
|
12047
|
+
jsonOutput: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args)
|
|
12124
12048
|
};
|
|
12125
12049
|
}
|
|
12126
12050
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12173,7 +12097,7 @@ function checkHintExpression(value) {
|
|
|
12173
12097
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12174
12098
|
}
|
|
12175
12099
|
function checkHintRawPath(value) {
|
|
12176
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12100
|
+
return _optionalChain([value, 'optionalAccess', _435 => _435.startsWith, 'call', _436 => _436("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12177
12101
|
}
|
|
12178
12102
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12179
12103
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12248,30 +12172,30 @@ function cronExecutionLabel(status) {
|
|
|
12248
12172
|
}
|
|
12249
12173
|
function readLiveCronMetadata(play) {
|
|
12250
12174
|
const record3 = readRecord(play);
|
|
12251
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12175
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _437 => _437.triggerMetadata]));
|
|
12252
12176
|
return {
|
|
12253
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12254
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12255
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12256
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12257
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12177
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _438 => _438.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12178
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _439 => _439.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12179
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _440 => _440.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12180
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _441 => _441.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12181
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _442 => _442.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12258
12182
|
};
|
|
12259
12183
|
}
|
|
12260
12184
|
function liveTriggerStatusLines(status, play) {
|
|
12261
12185
|
const cron = readLiveCronMetadata(play);
|
|
12262
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12186
|
+
if (!_optionalChain([status, 'optionalAccess', _443 => _443.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _444 => _444.webhook])) return [];
|
|
12263
12187
|
const lines = [];
|
|
12264
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12188
|
+
if (_optionalChain([status, 'optionalAccess', _445 => _445.cron]) || cron.schedule) {
|
|
12265
12189
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12266
12190
|
lines.push(
|
|
12267
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12191
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _446 => _446.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12268
12192
|
);
|
|
12269
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12193
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _447 => _447.cron]) === "active") {
|
|
12270
12194
|
lines.push(
|
|
12271
12195
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12272
12196
|
);
|
|
12273
12197
|
}
|
|
12274
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12198
|
+
if (_optionalChain([status, 'optionalAccess', _448 => _448.blockedReason])) {
|
|
12275
12199
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12276
12200
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12277
12201
|
lines.push(
|
|
@@ -12287,7 +12211,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12287
12211
|
);
|
|
12288
12212
|
}
|
|
12289
12213
|
}
|
|
12290
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12214
|
+
if (_optionalChain([status, 'optionalAccess', _449 => _449.webhook])) {
|
|
12291
12215
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12292
12216
|
}
|
|
12293
12217
|
return lines;
|
|
@@ -12295,11 +12219,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12295
12219
|
function triggerStatusFromMetadata(value) {
|
|
12296
12220
|
const metadata = readRecord(value);
|
|
12297
12221
|
return {
|
|
12298
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12299
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12300
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12301
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12302
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12222
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _450 => _450.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12223
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _451 => _451.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12224
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _452 => _452.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12225
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _453 => _453.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12226
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _454 => _454.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12303
12227
|
};
|
|
12304
12228
|
}
|
|
12305
12229
|
function printPublishReceipt(input) {
|
|
@@ -12318,7 +12242,7 @@ function printPublishReceipt(input) {
|
|
|
12318
12242
|
function formatPlaySandboxRuntimeWarning(declaration) {
|
|
12319
12243
|
if (!declaration) return null;
|
|
12320
12244
|
const warning = formatNonStandardSandboxRuntimeWarning(
|
|
12321
|
-
resolvePlaySandboxRuntimeLimits(declaration)
|
|
12245
|
+
_chunkYGCKMI5Pjs.resolvePlaySandboxRuntimeLimits.call(void 0, declaration)
|
|
12322
12246
|
);
|
|
12323
12247
|
return warning ? `Warning: ${warning}` : null;
|
|
12324
12248
|
}
|
|
@@ -12331,7 +12255,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12331
12255
|
async function handlePlayCheck(args) {
|
|
12332
12256
|
const options = parsePlayCheckOptions(args);
|
|
12333
12257
|
if (!isFileTarget(options.target)) {
|
|
12334
|
-
const client = new (0,
|
|
12258
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
12335
12259
|
try {
|
|
12336
12260
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12337
12261
|
command: "check"
|
|
@@ -12360,7 +12284,7 @@ async function handlePlayCheck(args) {
|
|
|
12360
12284
|
},
|
|
12361
12285
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12362
12286
|
};
|
|
12363
|
-
|
|
12287
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, result, {
|
|
12364
12288
|
json: options.jsonOutput,
|
|
12365
12289
|
fields: options.jsonFields,
|
|
12366
12290
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12370,7 +12294,7 @@ async function handlePlayCheck(args) {
|
|
|
12370
12294
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12371
12295
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12372
12296
|
if (options.jsonOutput) {
|
|
12373
|
-
|
|
12297
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
12374
12298
|
{
|
|
12375
12299
|
kind: "play_check",
|
|
12376
12300
|
checked: "named_contract",
|
|
@@ -12403,16 +12327,16 @@ async function handlePlayCheck(args) {
|
|
|
12403
12327
|
);
|
|
12404
12328
|
}
|
|
12405
12329
|
const primary = outcomes.find(
|
|
12406
|
-
(outcome) => outcome.exportName ===
|
|
12330
|
+
(outcome) => outcome.exportName === _chunk7UFFWPQ2js.PLAY_DEFAULT_EXPORT
|
|
12407
12331
|
);
|
|
12408
12332
|
const output = buildPlayCheckOutput({
|
|
12409
12333
|
outcomes,
|
|
12410
12334
|
target: options.target,
|
|
12411
12335
|
full: options.full,
|
|
12412
12336
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12413
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12337
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _455 => _455.result, 'access', _456 => _456.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12414
12338
|
});
|
|
12415
|
-
|
|
12339
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, output, {
|
|
12416
12340
|
json: options.jsonOutput,
|
|
12417
12341
|
fields: options.jsonFields,
|
|
12418
12342
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12420,12 +12344,12 @@ async function handlePlayCheck(args) {
|
|
|
12420
12344
|
return output.valid ? 0 : 1;
|
|
12421
12345
|
}
|
|
12422
12346
|
function resolvePlayCheckExportNames(sourceCode) {
|
|
12423
|
-
const exports =
|
|
12424
|
-
if (!exports || exports.length === 0) return [
|
|
12347
|
+
const exports = _chunk7UFFWPQ2js.listPlayFileExports.call(void 0, sourceCode);
|
|
12348
|
+
if (!exports || exports.length === 0) return [_chunk7UFFWPQ2js.PLAY_DEFAULT_EXPORT];
|
|
12425
12349
|
return exports.map((entry) => entry.name);
|
|
12426
12350
|
}
|
|
12427
12351
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12428
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
12352
|
+
const rawEdition = _optionalChain([process, 'access', _457 => _457.env, 'access', _458 => _458.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _459 => _459.trim, 'call', _460 => _460()]);
|
|
12429
12353
|
if (!rawEdition) return artifact;
|
|
12430
12354
|
if (!/^\d+$/.test(rawEdition)) {
|
|
12431
12355
|
throw new Error(
|
|
@@ -12466,7 +12390,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12466
12390
|
}
|
|
12467
12391
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
12468
12392
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
12469
|
-
const client = new (0,
|
|
12393
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
12470
12394
|
const integrationMode = resolveEvalIntegrationMode();
|
|
12471
12395
|
const checked = await checkLocalPlayGraph({
|
|
12472
12396
|
client,
|
|
@@ -12476,7 +12400,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12476
12400
|
integrationMode,
|
|
12477
12401
|
prepareArtifact: artifactForProductionCompatibilityCheck
|
|
12478
12402
|
});
|
|
12479
|
-
const importedPlayName = _optionalChain([checked, 'access',
|
|
12403
|
+
const importedPlayName = _optionalChain([checked, 'access', _461 => _461.failedChild, 'optionalAccess', _462 => _462.playName]);
|
|
12480
12404
|
const diagnosticPrefix = importedPlayName ? `Imported Play ${importedPlayName}: ` : "";
|
|
12481
12405
|
const valid = checked.result.valid && !checked.failedChild && authoringErrors.length === 0;
|
|
12482
12406
|
const errors = [
|
|
@@ -12492,7 +12416,7 @@ async function checkOneExportedPlay(input) {
|
|
|
12492
12416
|
valid,
|
|
12493
12417
|
errors: valid ? checked.result.errors : addPlayCheckRepairHints({
|
|
12494
12418
|
errors,
|
|
12495
|
-
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access',
|
|
12419
|
+
sourceCode: _nullishCoalesce(_optionalChain([checked, 'access', _463 => _463.failedChild, 'optionalAccess', _464 => _464.sourceCode]), () => ( graph.root.sourceCode))
|
|
12496
12420
|
}),
|
|
12497
12421
|
...checked.failedChild && checked.result.issues ? {
|
|
12498
12422
|
issues: checked.result.issues.map((issue) => ({
|
|
@@ -12519,11 +12443,11 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12519
12443
|
throw new Error("Expected a file-backed play run target.");
|
|
12520
12444
|
}
|
|
12521
12445
|
let client;
|
|
12522
|
-
let cliAdmission =
|
|
12446
|
+
let cliAdmission = _chunkA5LPDB6Njs.usesInlinePlayAdmission.call(void 0,
|
|
12523
12447
|
"plays run",
|
|
12524
12448
|
process.argv.slice(2)
|
|
12525
12449
|
);
|
|
12526
|
-
const progress = _nullishCoalesce(
|
|
12450
|
+
const progress = _nullishCoalesce(_chunkSCHE5QRNjs.getActiveCliProgress.call(void 0, ), () => ( _chunkSCHE5QRNjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12527
12451
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
12528
12452
|
progress.phase("compiling play");
|
|
12529
12453
|
const sourceCode = traceCliSync(
|
|
@@ -12540,13 +12464,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12540
12464
|
}
|
|
12541
12465
|
let graph;
|
|
12542
12466
|
try {
|
|
12543
|
-
graph = await
|
|
12467
|
+
graph = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12544
12468
|
"cli.play_file_bundle_graph",
|
|
12545
12469
|
{ targetKind: "file" },
|
|
12546
12470
|
() => collectBundledPlayGraph(
|
|
12547
12471
|
absolutePlayPath,
|
|
12548
12472
|
options.profile,
|
|
12549
|
-
|
|
12473
|
+
_chunk7UFFWPQ2js.PLAY_DEFAULT_EXPORT,
|
|
12550
12474
|
{ cache: !options.dryRun }
|
|
12551
12475
|
)
|
|
12552
12476
|
);
|
|
@@ -12554,14 +12478,14 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12554
12478
|
if (options.dryRun) {
|
|
12555
12479
|
progress.complete();
|
|
12556
12480
|
renderLocalPlayExecutionPlan(
|
|
12557
|
-
|
|
12481
|
+
_chunkD2LKEQKIjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile }),
|
|
12558
12482
|
{ dryRun: true, json: options.jsonOutput }
|
|
12559
12483
|
);
|
|
12560
12484
|
return 0;
|
|
12561
12485
|
}
|
|
12562
|
-
client = new (0,
|
|
12486
|
+
client = new (0, _chunkHMUBLAT4js.DeeplineClient)(playRunClientOptions(options));
|
|
12563
12487
|
if (cliAdmission && (graph.root.importedPlayDependencies.length > 0 || inputContainsLocalFilePath(runtimeInput))) {
|
|
12564
|
-
await
|
|
12488
|
+
await _chunkA5LPDB6Njs.checkPlayRunCompatibility.call(void 0,
|
|
12565
12489
|
client.baseUrl,
|
|
12566
12490
|
options.maintenancePolicy
|
|
12567
12491
|
);
|
|
@@ -12574,7 +12498,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12574
12498
|
});
|
|
12575
12499
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12576
12500
|
if (canDeferCompilerManifest) {
|
|
12577
|
-
|
|
12501
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
12578
12502
|
phase: "cli.play_file_compile_manifests",
|
|
12579
12503
|
ms: 0,
|
|
12580
12504
|
ok: true,
|
|
@@ -12583,7 +12507,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12583
12507
|
reason: "validated_by_run_route"
|
|
12584
12508
|
});
|
|
12585
12509
|
} else {
|
|
12586
|
-
await
|
|
12510
|
+
await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12587
12511
|
"cli.play_file_compile_manifests",
|
|
12588
12512
|
{ targetKind: "file", skipped: false },
|
|
12589
12513
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
@@ -12604,13 +12528,13 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12604
12528
|
if (bundleResult.importedPlayDependencies.length > 0) {
|
|
12605
12529
|
try {
|
|
12606
12530
|
renderLocalPlayExecutionPlan(
|
|
12607
|
-
|
|
12531
|
+
_chunkD2LKEQKIjs.planLocalPlayExecution.call(void 0, graph, { runIdFile: options.runIdFile })
|
|
12608
12532
|
);
|
|
12609
12533
|
progress.phase("pinning imported plays");
|
|
12610
|
-
graph = await
|
|
12534
|
+
graph = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12611
12535
|
"cli.play_file_pin_imports",
|
|
12612
12536
|
{ targetKind: "file" },
|
|
12613
|
-
() =>
|
|
12537
|
+
() => _chunkD2LKEQKIjs.pinLocalPlayImports.call(void 0, client, graph)
|
|
12614
12538
|
);
|
|
12615
12539
|
bundleResult = graph.root;
|
|
12616
12540
|
} catch (error) {
|
|
@@ -12624,9 +12548,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12624
12548
|
);
|
|
12625
12549
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
12626
12550
|
const fileInputBindings = _chunkJDMR33HSjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
12627
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
12551
|
+
_optionalChain([compilerManifest, 'optionalAccess', _465 => _465.staticPipeline])
|
|
12628
12552
|
);
|
|
12629
|
-
const stagedFileInputs = await
|
|
12553
|
+
const stagedFileInputs = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12630
12554
|
"cli.play_stage_inputs",
|
|
12631
12555
|
{
|
|
12632
12556
|
targetKind: "file",
|
|
@@ -12673,7 +12597,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12673
12597
|
};
|
|
12674
12598
|
if (options.watch) {
|
|
12675
12599
|
progress.phase("starting run");
|
|
12676
|
-
const finalStatus = await
|
|
12600
|
+
const finalStatus = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12677
12601
|
"cli.play_start_watch",
|
|
12678
12602
|
{ targetKind: "file", playName },
|
|
12679
12603
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12687,9 +12611,9 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12687
12611
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12688
12612
|
open: options.open,
|
|
12689
12613
|
progress,
|
|
12690
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12691
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12692
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12614
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _466 => _466.onRunStarted]),
|
|
12615
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _467 => _467.onSubmission]),
|
|
12616
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _468 => _468.onRunAdmitted]),
|
|
12693
12617
|
maintenancePolicy: options.maintenancePolicy,
|
|
12694
12618
|
...options.runIdFile ? {} : { fullJson: options.fullJson },
|
|
12695
12619
|
...cliAdmission ? {
|
|
@@ -12717,8 +12641,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12717
12641
|
),
|
|
12718
12642
|
options
|
|
12719
12643
|
);
|
|
12720
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12721
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12644
|
+
_optionalChain([hooks, 'optionalAccess', _469 => _469.onTerminalStatus, 'optionalCall', _470 => _470(outputStatus)]);
|
|
12645
|
+
if (_optionalChain([hooks, 'optionalAccess', _471 => _471.writeResult])) {
|
|
12722
12646
|
await hooks.writeResult(client, outputStatus);
|
|
12723
12647
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12724
12648
|
}
|
|
@@ -12733,20 +12657,20 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
12733
12657
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12734
12658
|
}
|
|
12735
12659
|
progress.phase("starting run");
|
|
12736
|
-
const started = await
|
|
12660
|
+
const started = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12737
12661
|
"cli.play_start_unwatched",
|
|
12738
12662
|
{ targetKind: "file", playName },
|
|
12739
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12663
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _472 => _472.onSubmission]) }).catch(async (error) => {
|
|
12740
12664
|
throw await normalizePlayStartError(client, error, playName);
|
|
12741
12665
|
})
|
|
12742
12666
|
);
|
|
12743
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12744
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12667
|
+
await _optionalChain([hooks, 'optionalAccess', _473 => _473.onRunStarted, 'optionalCall', _474 => _474(started.workflowId)]);
|
|
12668
|
+
await _optionalChain([hooks, 'optionalAccess', _475 => _475.onRunAdmitted, 'optionalCall', _476 => _476(started.workflowId)]);
|
|
12745
12669
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12746
12670
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12747
12671
|
progress.phase("started run");
|
|
12748
12672
|
progress.complete();
|
|
12749
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12673
|
+
if (_optionalChain([hooks, 'optionalAccess', _477 => _477.writeStarted])) {
|
|
12750
12674
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12751
12675
|
return 0;
|
|
12752
12676
|
}
|
|
@@ -12773,7 +12697,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
12773
12697
|
if (input.selector === "latest") {
|
|
12774
12698
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
12775
12699
|
const latest = versions[0];
|
|
12776
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
12700
|
+
if (!_optionalChain([latest, 'optionalAccess', _478 => _478._id])) {
|
|
12777
12701
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
12778
12702
|
}
|
|
12779
12703
|
return latest._id;
|
|
@@ -12784,12 +12708,12 @@ async function handleNamedRun(options, hooks) {
|
|
|
12784
12708
|
if (options.target.kind !== "name") {
|
|
12785
12709
|
throw new Error("Expected a named play run target.");
|
|
12786
12710
|
}
|
|
12787
|
-
const client = new (0,
|
|
12788
|
-
let cliAdmission =
|
|
12711
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)(playRunClientOptions(options));
|
|
12712
|
+
let cliAdmission = _chunkA5LPDB6Njs.usesInlinePlayAdmission.call(void 0,
|
|
12789
12713
|
"plays run",
|
|
12790
12714
|
process.argv.slice(2)
|
|
12791
12715
|
);
|
|
12792
|
-
const progress = _nullishCoalesce(
|
|
12716
|
+
const progress = _nullishCoalesce(_chunkSCHE5QRNjs.getActiveCliProgress.call(void 0, ), () => ( _chunkSCHE5QRNjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
12793
12717
|
const playName = options.target.name;
|
|
12794
12718
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
12795
12719
|
try {
|
|
@@ -12804,14 +12728,14 @@ async function handleNamedRun(options, hooks) {
|
|
|
12804
12728
|
});
|
|
12805
12729
|
const playDetail = needsPlayDefinition ? await (async () => {
|
|
12806
12730
|
progress.phase("loading play definition");
|
|
12807
|
-
return
|
|
12731
|
+
return _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12808
12732
|
"cli.play_load_definition",
|
|
12809
12733
|
{ targetKind: "name", playName, skipped: false },
|
|
12810
12734
|
() => assertCanonicalNamedPlayReference(client, playName, {
|
|
12811
12735
|
command: "run"
|
|
12812
12736
|
})
|
|
12813
12737
|
);
|
|
12814
|
-
})() : (
|
|
12738
|
+
})() : (_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
12815
12739
|
phase: "cli.play_load_definition",
|
|
12816
12740
|
ms: 0,
|
|
12817
12741
|
ok: true,
|
|
@@ -12820,7 +12744,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12820
12744
|
skipped: true
|
|
12821
12745
|
}), null);
|
|
12822
12746
|
progress.phase("selecting revision");
|
|
12823
|
-
const selectedRevisionId = await
|
|
12747
|
+
const selectedRevisionId = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12824
12748
|
"cli.play_select_revision",
|
|
12825
12749
|
{
|
|
12826
12750
|
targetKind: "name",
|
|
@@ -12845,10 +12769,10 @@ async function handleNamedRun(options, hooks) {
|
|
|
12845
12769
|
..._chunkJDMR33HSjs.fileInputBindingsFromStaticPipeline.call(void 0, playDetail.play.staticPipeline)
|
|
12846
12770
|
] : [];
|
|
12847
12771
|
if (cliAdmission && fileInputBindings.length > 0) {
|
|
12848
|
-
await
|
|
12772
|
+
await _chunkA5LPDB6Njs.checkPlayRunCompatibility.call(void 0, client.baseUrl, options.maintenancePolicy);
|
|
12849
12773
|
cliAdmission = false;
|
|
12850
12774
|
}
|
|
12851
|
-
const stagedFileInputs = await
|
|
12775
|
+
const stagedFileInputs = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12852
12776
|
"cli.play_stage_inputs",
|
|
12853
12777
|
{
|
|
12854
12778
|
targetKind: "name",
|
|
@@ -12892,7 +12816,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
12892
12816
|
});
|
|
12893
12817
|
if (options.watch) {
|
|
12894
12818
|
progress.phase("starting run");
|
|
12895
|
-
const finalStatus = await
|
|
12819
|
+
const finalStatus = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12896
12820
|
"cli.play_start_watch",
|
|
12897
12821
|
{ targetKind: "name", playName },
|
|
12898
12822
|
() => (options.runIdFile || cliAdmission ? startAndWaitForPlayCompletionByStream : startAndWaitForPlayCompletion)({
|
|
@@ -12906,9 +12830,9 @@ async function handleNamedRun(options, hooks) {
|
|
|
12906
12830
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
12907
12831
|
open: options.open,
|
|
12908
12832
|
progress,
|
|
12909
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
12910
|
-
onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12911
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
12833
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _479 => _479.onRunStarted]),
|
|
12834
|
+
onSubmission: _optionalChain([hooks, 'optionalAccess', _480 => _480.onSubmission]),
|
|
12835
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _481 => _481.onRunAdmitted]),
|
|
12912
12836
|
maintenancePolicy: options.maintenancePolicy,
|
|
12913
12837
|
...options.runIdFile ? {} : { fullJson: options.fullJson },
|
|
12914
12838
|
...cliAdmission ? {
|
|
@@ -12939,8 +12863,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
12939
12863
|
options,
|
|
12940
12864
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
12941
12865
|
);
|
|
12942
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
12943
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12866
|
+
_optionalChain([hooks, 'optionalAccess', _482 => _482.onTerminalStatus, 'optionalCall', _483 => _483(outputStatus)]);
|
|
12867
|
+
if (_optionalChain([hooks, 'optionalAccess', _484 => _484.writeResult])) {
|
|
12944
12868
|
await hooks.writeResult(client, outputStatus);
|
|
12945
12869
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12946
12870
|
}
|
|
@@ -12955,22 +12879,22 @@ async function handleNamedRun(options, hooks) {
|
|
|
12955
12879
|
return outputStatus.status === "completed" ? 0 : 1;
|
|
12956
12880
|
}
|
|
12957
12881
|
progress.phase("starting run");
|
|
12958
|
-
const started = await
|
|
12882
|
+
const started = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
12959
12883
|
"cli.play_start_unwatched",
|
|
12960
12884
|
{ targetKind: "name", playName },
|
|
12961
|
-
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess',
|
|
12885
|
+
() => client.startPlayRun(startRequest, { onSubmission: _optionalChain([hooks, 'optionalAccess', _485 => _485.onSubmission]) }).catch(async (error) => {
|
|
12962
12886
|
throw await normalizePlayStartError(client, error, playName, {
|
|
12963
12887
|
suggestMissingPlay: true
|
|
12964
12888
|
});
|
|
12965
12889
|
})
|
|
12966
12890
|
);
|
|
12967
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12968
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
12891
|
+
await _optionalChain([hooks, 'optionalAccess', _486 => _486.onRunStarted, 'optionalCall', _487 => _487(started.workflowId)]);
|
|
12892
|
+
await _optionalChain([hooks, 'optionalAccess', _488 => _488.onRunAdmitted, 'optionalCall', _489 => _489(started.workflowId)]);
|
|
12969
12893
|
const resolvedDashboardUrl = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName);
|
|
12970
12894
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
12971
12895
|
progress.phase("started run");
|
|
12972
12896
|
progress.complete();
|
|
12973
|
-
if (_optionalChain([hooks, 'optionalAccess',
|
|
12897
|
+
if (_optionalChain([hooks, 'optionalAccess', _490 => _490.writeStarted])) {
|
|
12974
12898
|
hooks.writeStarted(started.workflowId, _nullishCoalesce(started.status, () => ( "started")));
|
|
12975
12899
|
return 0;
|
|
12976
12900
|
}
|
|
@@ -12995,12 +12919,12 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
12995
12919
|
const compact = compactPlayStatus(status);
|
|
12996
12920
|
const errors = Array.isArray(compact.errors) ? compact.errors : [];
|
|
12997
12921
|
const error = status.status === "failed" ? _nullishCoalesce(errors[0], () => ( {
|
|
12998
|
-
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access',
|
|
12922
|
+
message: _nullishCoalesce(_nullishCoalesce(compact.error, () => ( _optionalChain([status, 'access', _491 => _491.progress, 'optionalAccess', _492 => _492.error]))), () => ( "Play failed. Inspect the run for details."))
|
|
12999
12923
|
})) : null;
|
|
13000
12924
|
const next = { status: `deepline runs get ${status.runId}` };
|
|
13001
|
-
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access',
|
|
12925
|
+
const playName = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^play\/(.+)\/run\//, 'access', _493 => _493.exec, 'call', _494 => _494(status.runId), 'optionalAccess', _495 => _495[1]]), () => ( extractRunPlayName(status))), () => ( null));
|
|
13002
12926
|
if (!terminal) {
|
|
13003
|
-
|
|
12927
|
+
_chunkUXQVSDFPjs.writeExecutionOutput.call(void 0,
|
|
13004
12928
|
{ id: status.runId, status: status.status, next },
|
|
13005
12929
|
output
|
|
13006
12930
|
);
|
|
@@ -13059,11 +12983,11 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13059
12983
|
Object.entries(handle).filter(([key]) => source !== "result" || key !== "_metadata").map(([key, child]) => [key, materialize(child, `${source}.${key}`)])
|
|
13060
12984
|
);
|
|
13061
12985
|
};
|
|
13062
|
-
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call',
|
|
12986
|
+
const packagedOutputs = readRecord(_optionalChain([getPlayRunPackage, 'call', _496 => _496(status), 'optionalAccess', _497 => _497.outputs]));
|
|
13063
12987
|
const returned = status.result !== void 0 ? status.result : packagedOutputs ? Object.fromEntries(
|
|
13064
12988
|
Object.entries(packagedOutputs).map(([key, value]) => [
|
|
13065
12989
|
key,
|
|
13066
|
-
_optionalChain([readRecord, 'call',
|
|
12990
|
+
_optionalChain([readRecord, 'call', _498 => _498(value), 'optionalAccess', _499 => _499.kind]) === "value" ? _optionalChain([readRecord, 'call', _500 => _500(value), 'optionalAccess', _501 => _501.value]) : value
|
|
13067
12991
|
])
|
|
13068
12992
|
) : null;
|
|
13069
12993
|
let data = materialize(returned);
|
|
@@ -13075,10 +12999,10 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13075
12999
|
};
|
|
13076
13000
|
}
|
|
13077
13001
|
const byRows = new Map(collections.map((c) => [c.rows, c]));
|
|
13078
|
-
const allCollections =
|
|
13002
|
+
const allCollections = _chunkUXQVSDFPjs.outputCollections.call(void 0, data).map(
|
|
13079
13003
|
(collection) => _nullishCoalesce(byRows.get(collection.rows), () => ( collection))
|
|
13080
13004
|
);
|
|
13081
|
-
|
|
13005
|
+
_chunkUXQVSDFPjs.writeExecutionOutput.call(void 0,
|
|
13082
13006
|
{
|
|
13083
13007
|
id: status.runId,
|
|
13084
13008
|
status: status.status,
|
|
@@ -13086,7 +13010,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13086
13010
|
...allCollections.length ? { collections: allCollections } : {},
|
|
13087
13011
|
complete: allCollections.every((c) => c.complete === true) ? true : allCollections.some((c) => c.complete === false) ? false : null,
|
|
13088
13012
|
error,
|
|
13089
|
-
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access',
|
|
13013
|
+
credits: _nullishCoalesce(_nullishCoalesce(status.billingTotalCreditsRollup, () => ( _optionalChain([status, 'access', _502 => _502.billing, 'optionalAccess', _503 => _503.totalCredits]))), () => ( null)),
|
|
13090
13014
|
...playName ? { page: _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) } : {},
|
|
13091
13015
|
warnings: [
|
|
13092
13016
|
...buildRunWarnings(status, null),
|
|
@@ -13099,7 +13023,7 @@ async function writePlayRunReceipt(client, status, output) {
|
|
|
13099
13023
|
}
|
|
13100
13024
|
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;
|
|
13101
13025
|
async function handlePlayRun(args, hooks) {
|
|
13102
|
-
const parsedOptions = Array.isArray(args) ?
|
|
13026
|
+
const parsedOptions = Array.isArray(args) ? _chunkXFY3JOP2js.parsePlayRunOptions.call(void 0, args) : args;
|
|
13103
13027
|
const options = parsedOptions.runIdFile ? {
|
|
13104
13028
|
...parsedOptions,
|
|
13105
13029
|
runIdFile: parsedOptions.dryRun ? _path.resolve.call(void 0, parsedOptions.runIdFile) : await preflightRunIdFile(parsedOptions.runIdFile)
|
|
@@ -13116,7 +13040,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13116
13040
|
JSON.stringify({
|
|
13117
13041
|
version: 1,
|
|
13118
13042
|
admissionState: "submitted_unknown",
|
|
13119
|
-
baseUrl: new (0,
|
|
13043
|
+
baseUrl: new (0, _chunkHMUBLAT4js.DeeplineClient)().baseUrl,
|
|
13120
13044
|
...intent
|
|
13121
13045
|
})
|
|
13122
13046
|
);
|
|
@@ -13128,7 +13052,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13128
13052
|
} finally {
|
|
13129
13053
|
await removeRunIdTempFile(tempPath);
|
|
13130
13054
|
}
|
|
13131
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13055
|
+
await _optionalChain([hooks, 'optionalAccess', _504 => _504.onSubmission, 'optionalCall', _505 => _505(intent)]);
|
|
13132
13056
|
},
|
|
13133
13057
|
onRunStarted: async (runId) => {
|
|
13134
13058
|
try {
|
|
@@ -13139,7 +13063,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13139
13063
|
{ cause: error }
|
|
13140
13064
|
);
|
|
13141
13065
|
}
|
|
13142
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13066
|
+
await _optionalChain([hooks, 'optionalAccess', _506 => _506.onRunStarted, 'optionalCall', _507 => _507(runId)]);
|
|
13143
13067
|
},
|
|
13144
13068
|
onRunAdmitted: async (runId) => {
|
|
13145
13069
|
try {
|
|
@@ -13152,7 +13076,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13152
13076
|
{ cause: error }
|
|
13153
13077
|
);
|
|
13154
13078
|
}
|
|
13155
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13079
|
+
await _optionalChain([hooks, 'optionalAccess', _508 => _508.onRunAdmitted, 'optionalCall', _509 => _509(runId)]);
|
|
13156
13080
|
}
|
|
13157
13081
|
} : hooks;
|
|
13158
13082
|
if (options.target.kind === "file") {
|
|
@@ -13231,10 +13155,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13231
13155
|
...buildRunActivityTextLines(run),
|
|
13232
13156
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13233
13157
|
];
|
|
13234
|
-
if (_optionalChain([overview, 'access',
|
|
13158
|
+
if (_optionalChain([overview, 'access', _510 => _510.runStatus, 'optionalAccess', _511 => _511.available]) === false)
|
|
13235
13159
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13236
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13237
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13160
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _512 => _512(run), 'optionalAccess', _513 => _513.work]));
|
|
13161
|
+
if (work && !_optionalChain([overview, 'access', _514 => _514.runStatus, 'optionalAccess', _515 => _515.available]))
|
|
13238
13162
|
lines.push(
|
|
13239
13163
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13240
13164
|
);
|
|
@@ -13285,7 +13209,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13285
13209
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13286
13210
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13287
13211
|
...overview.failedLogs.entries,
|
|
13288
|
-
..._optionalChain([overview, 'access',
|
|
13212
|
+
..._optionalChain([overview, 'access', _516 => _516.failedLogs, 'access', _517 => _517.next, 'optionalAccess', _518 => _518.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13289
13213
|
]
|
|
13290
13214
|
});
|
|
13291
13215
|
sections.push({
|
|
@@ -13345,7 +13269,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13345
13269
|
);
|
|
13346
13270
|
return `${lines.join("\n")}
|
|
13347
13271
|
|
|
13348
|
-
${
|
|
13272
|
+
${_chunk4RV7U3RPjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13349
13273
|
}
|
|
13350
13274
|
var RUN_READ_TIMING_PROGRESS_INTERVAL_MS = 15e3;
|
|
13351
13275
|
async function withRunReadTiming(command, stage, enabled, action) {
|
|
@@ -13356,7 +13280,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13356
13280
|
const progressTimer = setInterval(() => {
|
|
13357
13281
|
console.error(`[${command}] ${stage} still running after ${elapsedMs()}ms`);
|
|
13358
13282
|
}, RUN_READ_TIMING_PROGRESS_INTERVAL_MS);
|
|
13359
|
-
_optionalChain([progressTimer, 'access',
|
|
13283
|
+
_optionalChain([progressTimer, 'access', _519 => _519.unref, 'optionalCall', _520 => _520()]);
|
|
13360
13284
|
try {
|
|
13361
13285
|
const result = await action();
|
|
13362
13286
|
console.error(`[${command}] ${stage} completed in ${elapsedMs()}ms`);
|
|
@@ -13369,7 +13293,7 @@ async function withRunReadTiming(command, stage, enabled, action) {
|
|
|
13369
13293
|
}
|
|
13370
13294
|
}
|
|
13371
13295
|
async function handleRunGet(args) {
|
|
13372
|
-
const selection =
|
|
13296
|
+
const selection = _chunk4RV7U3RPjs.parseJsonFields.call(void 0,
|
|
13373
13297
|
args,
|
|
13374
13298
|
args.includes("--config") ? "config" : "get"
|
|
13375
13299
|
);
|
|
@@ -13382,7 +13306,7 @@ async function handleRunGet(args) {
|
|
|
13382
13306
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13383
13307
|
return 1;
|
|
13384
13308
|
}
|
|
13385
|
-
const client = new (0,
|
|
13309
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
13386
13310
|
const timing = args.includes("--timing");
|
|
13387
13311
|
if (args.includes("--web-url")) {
|
|
13388
13312
|
const status2 = await withRunReadTiming(
|
|
@@ -13397,7 +13321,7 @@ async function handleRunGet(args) {
|
|
|
13397
13321
|
return 1;
|
|
13398
13322
|
}
|
|
13399
13323
|
const dashboardUrl2 = _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName2);
|
|
13400
|
-
|
|
13324
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
13401
13325
|
{ dashboardUrl: dashboardUrl2 },
|
|
13402
13326
|
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13403
13327
|
` }
|
|
@@ -13422,7 +13346,7 @@ async function handleRunGet(args) {
|
|
|
13422
13346
|
"This server does not support recorded configuration reads."
|
|
13423
13347
|
);
|
|
13424
13348
|
}
|
|
13425
|
-
|
|
13349
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
13426
13350
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13427
13351
|
{ json: true, fields: selection.fields }
|
|
13428
13352
|
);
|
|
@@ -13435,7 +13359,7 @@ async function handleRunGet(args) {
|
|
|
13435
13359
|
timing,
|
|
13436
13360
|
() => client.getRunInput(runId)
|
|
13437
13361
|
);
|
|
13438
|
-
|
|
13362
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13439
13363
|
return 0;
|
|
13440
13364
|
}
|
|
13441
13365
|
const full = args.includes("--full");
|
|
@@ -13448,7 +13372,7 @@ async function handleRunGet(args) {
|
|
|
13448
13372
|
failedLogs: args.includes("--log-failed")
|
|
13449
13373
|
})
|
|
13450
13374
|
);
|
|
13451
|
-
if (status.package)
|
|
13375
|
+
if (status.package) _chunkUXQVSDFPjs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
13452
13376
|
if (!status.package) {
|
|
13453
13377
|
const legacyStatus = full ? await withRunReadTiming(
|
|
13454
13378
|
"runs get",
|
|
@@ -13461,8 +13385,8 @@ async function handleRunGet(args) {
|
|
|
13461
13385
|
) : status;
|
|
13462
13386
|
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13463
13387
|
const legacyDashboardUrl = legacyPlayName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, legacyPlayName) : null;
|
|
13464
|
-
if (
|
|
13465
|
-
|
|
13388
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
13389
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
13466
13390
|
{
|
|
13467
13391
|
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13468
13392
|
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
@@ -13472,7 +13396,7 @@ async function handleRunGet(args) {
|
|
|
13472
13396
|
} else {
|
|
13473
13397
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13474
13398
|
if (legacyDashboardUrl)
|
|
13475
|
-
|
|
13399
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
13476
13400
|
{ dashboardUrl: legacyDashboardUrl },
|
|
13477
13401
|
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13478
13402
|
` }
|
|
@@ -13502,10 +13426,10 @@ async function handleRunGet(args) {
|
|
|
13502
13426
|
)
|
|
13503
13427
|
]);
|
|
13504
13428
|
const hitLines = formatRunHitsLines(hits);
|
|
13505
|
-
const json =
|
|
13429
|
+
const json = _chunk4RV7U3RPjs.argsWantJson.call(void 0, args);
|
|
13506
13430
|
const playName = resolveRunPlayName(status, runId);
|
|
13507
13431
|
const dashboardUrl = playName ? _chunkIAYSWZDJjs.buildPlayDashboardUrl.call(void 0, client.baseUrl, playName) : void 0;
|
|
13508
|
-
|
|
13432
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
13509
13433
|
{
|
|
13510
13434
|
...overview,
|
|
13511
13435
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
@@ -13609,9 +13533,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13609
13533
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13610
13534
|
return 1;
|
|
13611
13535
|
}
|
|
13612
|
-
const status = await new (0,
|
|
13613
|
-
if (
|
|
13614
|
-
|
|
13536
|
+
const status = await new (0, _chunkHMUBLAT4js.DeeplineClient)().runs.status(runId);
|
|
13537
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
13538
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13615
13539
|
return 0;
|
|
13616
13540
|
}
|
|
13617
13541
|
if (!status.available) {
|
|
@@ -13651,7 +13575,7 @@ async function handleRunsRerun(args) {
|
|
|
13651
13575
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13652
13576
|
return 1;
|
|
13653
13577
|
}
|
|
13654
|
-
const options = { json:
|
|
13578
|
+
const options = { json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args) };
|
|
13655
13579
|
for (let index = 0; index < args.length; index += 1) {
|
|
13656
13580
|
if (args[index] === "--idempotency-key") {
|
|
13657
13581
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13717,8 +13641,8 @@ ${usage2}
|
|
|
13717
13641
|
Discover Plays: ${next.discover}
|
|
13718
13642
|
Active runs: ${next.running}`
|
|
13719
13643
|
);
|
|
13720
|
-
if (
|
|
13721
|
-
|
|
13644
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
13645
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
13722
13646
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13723
13647
|
{ json: true }
|
|
13724
13648
|
);
|
|
@@ -13733,7 +13657,7 @@ Active runs: ${next.running}`
|
|
|
13733
13657
|
console.error("--offset requires --play.");
|
|
13734
13658
|
return 1;
|
|
13735
13659
|
}
|
|
13736
|
-
const client = new (0,
|
|
13660
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
13737
13661
|
const page = await withRunReadTiming(
|
|
13738
13662
|
"runs list",
|
|
13739
13663
|
"run inventory",
|
|
@@ -13768,7 +13692,7 @@ Active runs: ${next.running}`
|
|
|
13768
13692
|
executionTime: run.executionTime,
|
|
13769
13693
|
billingTotalCredits: run.billingTotalCredits,
|
|
13770
13694
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
13771
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
13695
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _521 => _521.memo, 'optionalAccess', _522 => _522.playName]))), () => ( playName)), () => ( null)),
|
|
13772
13696
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
13773
13697
|
}));
|
|
13774
13698
|
const lines = runs.length === 0 ? [
|
|
@@ -13800,14 +13724,14 @@ Active runs: ${next.running}`
|
|
|
13800
13724
|
return lines2.join("\n");
|
|
13801
13725
|
});
|
|
13802
13726
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
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}${
|
|
13727
|
+
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}${_chunk4RV7U3RPjs.argsWantJson.call(void 0, args) ? " --json" : ""}` : null;
|
|
13804
13728
|
if (page.hasMore) {
|
|
13805
13729
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
13806
13730
|
lines.push(
|
|
13807
13731
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
13808
13732
|
);
|
|
13809
13733
|
}
|
|
13810
|
-
|
|
13734
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
13811
13735
|
{
|
|
13812
13736
|
runs,
|
|
13813
13737
|
count: runs.length,
|
|
@@ -13817,11 +13741,11 @@ Active runs: ${next.running}`
|
|
|
13817
13741
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
13818
13742
|
next: {
|
|
13819
13743
|
page: nextPage,
|
|
13820
|
-
get: _optionalChain([runs, 'access',
|
|
13744
|
+
get: _optionalChain([runs, 'access', _523 => _523[0], 'optionalAccess', _524 => _524.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
13821
13745
|
},
|
|
13822
13746
|
render: { sections: [{ title: "runs", lines }] }
|
|
13823
13747
|
},
|
|
13824
|
-
{ json:
|
|
13748
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args) }
|
|
13825
13749
|
);
|
|
13826
13750
|
return 0;
|
|
13827
13751
|
}
|
|
@@ -13851,7 +13775,7 @@ async function handleRunTail(args) {
|
|
|
13851
13775
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
13852
13776
|
return 1;
|
|
13853
13777
|
}
|
|
13854
|
-
const parsed =
|
|
13778
|
+
const parsed = _chunk2MSKG4ERjs.parseLogLevel.call(void 0, value);
|
|
13855
13779
|
if (!parsed) {
|
|
13856
13780
|
console.error(
|
|
13857
13781
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13889,9 +13813,9 @@ async function handleRunTail(args) {
|
|
|
13889
13813
|
);
|
|
13890
13814
|
return 1;
|
|
13891
13815
|
}
|
|
13892
|
-
const client = new (0,
|
|
13816
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
13893
13817
|
const jsonLines = args.includes("--jsonl");
|
|
13894
|
-
const jsonOutput = !jsonLines &&
|
|
13818
|
+
const jsonOutput = !jsonLines && _chunk4RV7U3RPjs.argsWantJson.call(void 0, args);
|
|
13895
13819
|
const compact = args.includes("--compact");
|
|
13896
13820
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
13897
13821
|
const compactState = {
|
|
@@ -13972,7 +13896,7 @@ async function handleRunLogs(args) {
|
|
|
13972
13896
|
]);
|
|
13973
13897
|
const cursorIndex = args.indexOf("--cursor");
|
|
13974
13898
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
13975
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
13899
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunk2MSKG4ERjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
13976
13900
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
13977
13901
|
return handleRunEventSearch(args);
|
|
13978
13902
|
}
|
|
@@ -14006,7 +13930,7 @@ async function handleRunLogs(args) {
|
|
|
14006
13930
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14007
13931
|
return 1;
|
|
14008
13932
|
}
|
|
14009
|
-
const parsed =
|
|
13933
|
+
const parsed = _chunk2MSKG4ERjs.parseLogLevel.call(void 0, value);
|
|
14010
13934
|
if (!parsed) {
|
|
14011
13935
|
console.error(
|
|
14012
13936
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14053,12 +13977,12 @@ async function handleRunLogs(args) {
|
|
|
14053
13977
|
);
|
|
14054
13978
|
return 1;
|
|
14055
13979
|
}
|
|
14056
|
-
const client = new (0,
|
|
13980
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14057
13981
|
if (outPath) {
|
|
14058
13982
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
14059
|
-
const logs = result2.entries.filter((line) =>
|
|
13983
|
+
const logs = result2.entries.filter((line) => _chunk2MSKG4ERjs.logLevelReaches.call(void 0, _chunk2MSKG4ERjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunk2MSKG4ERjs.classifyLogLine.call(void 0, line).line);
|
|
14060
13984
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
14061
|
-
|
|
13985
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14062
13986
|
{
|
|
14063
13987
|
runId: result2.runId,
|
|
14064
13988
|
log_path: outPath,
|
|
@@ -14081,7 +14005,7 @@ async function handleRunLogs(args) {
|
|
|
14081
14005
|
]
|
|
14082
14006
|
}
|
|
14083
14007
|
},
|
|
14084
|
-
{ json:
|
|
14008
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args) }
|
|
14085
14009
|
);
|
|
14086
14010
|
return 0;
|
|
14087
14011
|
}
|
|
@@ -14112,7 +14036,7 @@ async function handleRunLogs(args) {
|
|
|
14112
14036
|
}
|
|
14113
14037
|
};
|
|
14114
14038
|
const text = buildRunLogsText(filteredResult);
|
|
14115
|
-
|
|
14039
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14116
14040
|
{
|
|
14117
14041
|
runId: result.runId,
|
|
14118
14042
|
totalCount: result.totalCount,
|
|
@@ -14136,7 +14060,7 @@ async function handleRunLogs(args) {
|
|
|
14136
14060
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14137
14061
|
},
|
|
14138
14062
|
{
|
|
14139
|
-
json:
|
|
14063
|
+
json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args),
|
|
14140
14064
|
text
|
|
14141
14065
|
}
|
|
14142
14066
|
);
|
|
@@ -14160,17 +14084,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14160
14084
|
);
|
|
14161
14085
|
}
|
|
14162
14086
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14163
|
-
(entry) =>
|
|
14087
|
+
(entry) => _chunk2MSKG4ERjs.logLevelReaches.call(void 0, _chunk2MSKG4ERjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14164
14088
|
);
|
|
14165
14089
|
const selected = matching.slice(-limit);
|
|
14166
14090
|
const olderMatchesExist = matching.length > selected.length;
|
|
14167
14091
|
return {
|
|
14168
14092
|
entries: selected.map((entry) => entry.line),
|
|
14169
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14170
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14093
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _525 => _525[0], 'optionalAccess', _526 => _526.seq]), () => ( null)),
|
|
14094
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _527 => _527.at, 'call', _528 => _528(-1), 'optionalAccess', _529 => _529.seq]), () => ( null)),
|
|
14171
14095
|
truncated: result.truncated || olderMatchesExist,
|
|
14172
14096
|
hasMore: olderMatchesExist,
|
|
14173
|
-
nextCursor: olderMatchesExist ?
|
|
14097
|
+
nextCursor: olderMatchesExist ? _chunk2MSKG4ERjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14174
14098
|
};
|
|
14175
14099
|
}
|
|
14176
14100
|
async function handleRunEventSearch(args) {
|
|
@@ -14237,7 +14161,7 @@ ${usage2}`);
|
|
|
14237
14161
|
namespace,
|
|
14238
14162
|
...backend ? { backend } : {}
|
|
14239
14163
|
} : void 0;
|
|
14240
|
-
const client = new (0,
|
|
14164
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14241
14165
|
const result = await client.runs.searchEvents({
|
|
14242
14166
|
...runId ? { runId } : {},
|
|
14243
14167
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14309,7 +14233,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14309
14233
|
"--limit",
|
|
14310
14234
|
String(limit)
|
|
14311
14235
|
].join(" ") : null;
|
|
14312
|
-
|
|
14236
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14313
14237
|
{
|
|
14314
14238
|
events,
|
|
14315
14239
|
nextCursor: result.nextCursor,
|
|
@@ -14320,19 +14244,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14320
14244
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14321
14245
|
},
|
|
14322
14246
|
{
|
|
14323
|
-
json:
|
|
14247
|
+
json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args),
|
|
14324
14248
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14325
14249
|
}
|
|
14326
14250
|
);
|
|
14327
14251
|
return 0;
|
|
14328
14252
|
}
|
|
14329
14253
|
function buildRunLogsText(result) {
|
|
14330
|
-
const lines = result.entries.map((line) =>
|
|
14254
|
+
const lines = result.entries.map((line) => _chunk2MSKG4ERjs.classifyLogLine.call(void 0, line).line);
|
|
14331
14255
|
if (result.warning) {
|
|
14332
14256
|
if (lines.length > 0) lines.push("");
|
|
14333
14257
|
lines.push(`warning: ${result.warning}`);
|
|
14334
14258
|
lines.push(
|
|
14335
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14259
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _530 => _530.next, 'optionalAccess', _531 => _531.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14336
14260
|
);
|
|
14337
14261
|
}
|
|
14338
14262
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14361,7 +14285,7 @@ async function handleRunStop(args) {
|
|
|
14361
14285
|
reason = args[++index];
|
|
14362
14286
|
}
|
|
14363
14287
|
}
|
|
14364
|
-
const client = new (0,
|
|
14288
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14365
14289
|
const result = await client.runs.stop(runId, { reason });
|
|
14366
14290
|
const state = resolveRunStopState(result);
|
|
14367
14291
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14376,7 +14300,7 @@ async function handleRunStop(args) {
|
|
|
14376
14300
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14377
14301
|
`inspect: deepline runs get ${runId} --full`
|
|
14378
14302
|
];
|
|
14379
|
-
|
|
14303
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14380
14304
|
{
|
|
14381
14305
|
...cancelling,
|
|
14382
14306
|
state,
|
|
@@ -14391,7 +14315,7 @@ async function handleRunStop(args) {
|
|
|
14391
14315
|
]
|
|
14392
14316
|
}
|
|
14393
14317
|
},
|
|
14394
|
-
{ json:
|
|
14318
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args) }
|
|
14395
14319
|
);
|
|
14396
14320
|
return 0;
|
|
14397
14321
|
}
|
|
@@ -14408,7 +14332,7 @@ async function handleRunStop(args) {
|
|
|
14408
14332
|
];
|
|
14409
14333
|
process.stderr.write(`${lines2.join("\n")}
|
|
14410
14334
|
`);
|
|
14411
|
-
|
|
14335
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14412
14336
|
{
|
|
14413
14337
|
...result,
|
|
14414
14338
|
render: {
|
|
@@ -14423,7 +14347,7 @@ async function handleRunStop(args) {
|
|
|
14423
14347
|
]
|
|
14424
14348
|
}
|
|
14425
14349
|
},
|
|
14426
|
-
{ json:
|
|
14350
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args) }
|
|
14427
14351
|
);
|
|
14428
14352
|
return 1;
|
|
14429
14353
|
}
|
|
@@ -14434,12 +14358,12 @@ async function handleRunStop(args) {
|
|
|
14434
14358
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14435
14359
|
] : []
|
|
14436
14360
|
];
|
|
14437
|
-
|
|
14361
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14438
14362
|
{
|
|
14439
14363
|
...result,
|
|
14440
14364
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14441
14365
|
},
|
|
14442
|
-
{ json:
|
|
14366
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args) }
|
|
14443
14367
|
);
|
|
14444
14368
|
return 0;
|
|
14445
14369
|
}
|
|
@@ -14489,18 +14413,18 @@ async function handleRunStopAll(args) {
|
|
|
14489
14413
|
reason = args[++index];
|
|
14490
14414
|
}
|
|
14491
14415
|
}
|
|
14492
|
-
const client = new (0,
|
|
14416
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14493
14417
|
if (dryRun) {
|
|
14494
14418
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14495
14419
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14496
|
-
|
|
14420
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14497
14421
|
{
|
|
14498
14422
|
...result2,
|
|
14499
14423
|
render: {
|
|
14500
14424
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14501
14425
|
}
|
|
14502
14426
|
},
|
|
14503
|
-
{ json:
|
|
14427
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14504
14428
|
` }
|
|
14505
14429
|
);
|
|
14506
14430
|
return 0;
|
|
@@ -14513,17 +14437,17 @@ async function handleRunStopAll(args) {
|
|
|
14513
14437
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14514
14438
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14515
14439
|
];
|
|
14516
|
-
|
|
14440
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
14517
14441
|
{
|
|
14518
14442
|
...result,
|
|
14519
14443
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14520
14444
|
},
|
|
14521
|
-
{ json:
|
|
14445
|
+
{ json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args) }
|
|
14522
14446
|
);
|
|
14523
14447
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14524
14448
|
}
|
|
14525
14449
|
async function handleRunExport(args) {
|
|
14526
|
-
const selection =
|
|
14450
|
+
const selection = _chunk4RV7U3RPjs.parseJsonFields.call(void 0, args, "export");
|
|
14527
14451
|
args = selection.args;
|
|
14528
14452
|
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]";
|
|
14529
14453
|
let runId;
|
|
@@ -14594,17 +14518,17 @@ async function handleRunExport(args) {
|
|
|
14594
14518
|
"INVALID_ARGUMENT"
|
|
14595
14519
|
);
|
|
14596
14520
|
}
|
|
14597
|
-
const client = new (0,
|
|
14521
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14598
14522
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14599
14523
|
assertRunExportStatusIdentity(status, runId);
|
|
14600
14524
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14601
|
-
const progress =
|
|
14525
|
+
const progress = _chunkSCHE5QRNjs.createCliProgress.call(void 0, !_chunk4RV7U3RPjs.argsWantJson.call(void 0, args));
|
|
14602
14526
|
try {
|
|
14603
14527
|
await waitForPlayCompletionByWatch({
|
|
14604
14528
|
client,
|
|
14605
14529
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14606
14530
|
workflowId: runId,
|
|
14607
|
-
jsonOutput:
|
|
14531
|
+
jsonOutput: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args),
|
|
14608
14532
|
emitLogs: false,
|
|
14609
14533
|
waitTimeoutMs,
|
|
14610
14534
|
startedAt: Date.now(),
|
|
@@ -14630,26 +14554,26 @@ async function handleRunExport(args) {
|
|
|
14630
14554
|
format,
|
|
14631
14555
|
summary
|
|
14632
14556
|
});
|
|
14633
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14634
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14557
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _532 => _532.rowsInfo, 'access', _533 => _533.source]), () => ( datasetPath)), () => ( null));
|
|
14558
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _534 => _534.currentTable]) ? {
|
|
14635
14559
|
code: "CURRENT_SHARED_DATASET",
|
|
14636
14560
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14637
14561
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14638
14562
|
} : null;
|
|
14639
14563
|
const navigation = buildRunNavigation(status);
|
|
14640
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14564
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _535 => _535.datasetInfo]);
|
|
14641
14565
|
const identity = navigation.datasets.find(
|
|
14642
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14566
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _536 => _536.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _537 => _537.tableNamespace])
|
|
14643
14567
|
);
|
|
14644
14568
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14645
14569
|
const exportCommand = runExportRetryCommand(
|
|
14646
14570
|
status.runId,
|
|
14647
14571
|
outPath,
|
|
14648
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14572
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _538 => _538.datasetPath]))),
|
|
14649
14573
|
{ format, summary }
|
|
14650
14574
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14651
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14652
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14575
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _539 => _539.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _540 => _540.path]), () => ( null)) };
|
|
14576
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _541 => _541.rowsInfo, 'access', _542 => _542.exportedRowOutcomes]);
|
|
14653
14577
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14654
14578
|
count: exportedRowOutcomes.failed,
|
|
14655
14579
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14669,17 +14593,17 @@ async function handleRunExport(args) {
|
|
|
14669
14593
|
...fileLocation,
|
|
14670
14594
|
format,
|
|
14671
14595
|
source,
|
|
14672
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14596
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _543 => _543.rowsInfo, 'access', _544 => _544.totalRows]), () => ( null)),
|
|
14673
14597
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14674
14598
|
...rowFailures ? { rowFailures } : {},
|
|
14675
|
-
columns:
|
|
14599
|
+
columns: _chunkUXQVSDFPjs.underscoreKeysLast.call(void 0, _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _545 => _545.rowsInfo, 'access', _546 => _546.columns]), () => ( []))),
|
|
14676
14600
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14677
14601
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14678
14602
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14679
14603
|
};
|
|
14680
14604
|
const lines = withRunNavigationLines(
|
|
14681
14605
|
[
|
|
14682
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14606
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _547 => _547.path]), () => ( outPath))}`,
|
|
14683
14607
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14684
14608
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14685
14609
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14706,8 +14630,8 @@ async function handleRunExport(args) {
|
|
|
14706
14630
|
"utf-8"
|
|
14707
14631
|
);
|
|
14708
14632
|
}
|
|
14709
|
-
|
|
14710
|
-
json:
|
|
14633
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, payload, {
|
|
14634
|
+
json: _chunk4RV7U3RPjs.argsWantJson.call(void 0, args),
|
|
14711
14635
|
fields: selection.fields,
|
|
14712
14636
|
text: `${lines.join("\n")}
|
|
14713
14637
|
`
|
|
@@ -14741,10 +14665,10 @@ async function handlePlayGet(args) {
|
|
|
14741
14665
|
);
|
|
14742
14666
|
return 2;
|
|
14743
14667
|
}
|
|
14744
|
-
const client = new (0,
|
|
14668
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14745
14669
|
const explicitJson = args.includes("--json");
|
|
14746
14670
|
const sourceOutput = args.includes("--source");
|
|
14747
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
14671
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunk4RV7U3RPjs.argsWantJson.call(void 0, args);
|
|
14748
14672
|
const requestedRevisionFlags = [
|
|
14749
14673
|
args.includes("--working"),
|
|
14750
14674
|
args.includes("--live"),
|
|
@@ -14794,7 +14718,7 @@ async function handlePlayGet(args) {
|
|
|
14794
14718
|
...includeSource ? { source: sourceSelector } : {}
|
|
14795
14719
|
});
|
|
14796
14720
|
const source = detail.source;
|
|
14797
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
14721
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _548 => _548.files, 'access', _549 => _549[source.entryFile]]), () => ( ""));
|
|
14798
14722
|
let materializedFile = null;
|
|
14799
14723
|
try {
|
|
14800
14724
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -14804,7 +14728,7 @@ async function handlePlayGet(args) {
|
|
|
14804
14728
|
}
|
|
14805
14729
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
14806
14730
|
if (jsonOutput) {
|
|
14807
|
-
|
|
14731
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, {
|
|
14808
14732
|
...detail,
|
|
14809
14733
|
...materializedFile ? {
|
|
14810
14734
|
message: loadedMessage,
|
|
@@ -14845,16 +14769,16 @@ async function handlePlayGet(args) {
|
|
|
14845
14769
|
}
|
|
14846
14770
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
14847
14771
|
console.log(
|
|
14848
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14772
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _550 => _550.play, 'access', _551 => _551.workingRevision, 'optionalAccess', _552 => _552.version]), () => ( "\u2014"))}`
|
|
14849
14773
|
);
|
|
14850
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14774
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _553 => _553.play, 'access', _554 => _554.liveRevision, 'optionalAccess', _555 => _555.version]), () => ( "\u2014"))}`);
|
|
14851
14775
|
if (detail.play.liveRevision) {
|
|
14852
14776
|
console.log(
|
|
14853
14777
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
14854
14778
|
);
|
|
14855
14779
|
}
|
|
14856
14780
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
14857
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
14781
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _556 => _556.play, 'access', _557 => _557.liveRevision, 'optionalAccess', _558 => _558.version])) {
|
|
14858
14782
|
console.log(
|
|
14859
14783
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
14860
14784
|
);
|
|
@@ -14866,7 +14790,7 @@ async function handlePlayGet(args) {
|
|
|
14866
14790
|
console.log(line);
|
|
14867
14791
|
}
|
|
14868
14792
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
14869
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
14793
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _559 => _559.sheetSummary, 'optionalAccess', _560 => _560.stats, 'optionalAccess', _561 => _561.total]), () => ( 0))}`);
|
|
14870
14794
|
if (detail.customerDbUrl) {
|
|
14871
14795
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
14872
14796
|
}
|
|
@@ -14882,7 +14806,7 @@ async function handlePlayGet(args) {
|
|
|
14882
14806
|
return 0;
|
|
14883
14807
|
}
|
|
14884
14808
|
function formatVersionLine(version) {
|
|
14885
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
14809
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _562 => _562.artifactHash, 'optionalAccess', _563 => _563.slice, 'call', _564 => _564(0, 12)]), () => ( "unknown-revision"));
|
|
14886
14810
|
const state = [
|
|
14887
14811
|
version.isLive ? "live" : null,
|
|
14888
14812
|
version.isWorking ? "working" : null
|
|
@@ -14896,8 +14820,8 @@ async function handlePlayVersions(args) {
|
|
|
14896
14820
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
14897
14821
|
return 1;
|
|
14898
14822
|
}
|
|
14899
|
-
const client = new (0,
|
|
14900
|
-
const jsonOutput =
|
|
14823
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14824
|
+
const jsonOutput = _chunk4RV7U3RPjs.argsWantJson.call(void 0, args);
|
|
14901
14825
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
14902
14826
|
command: "versions"
|
|
14903
14827
|
});
|
|
@@ -14905,7 +14829,7 @@ async function handlePlayVersions(args) {
|
|
|
14905
14829
|
parseReferencedPlayTarget(playName).playName
|
|
14906
14830
|
);
|
|
14907
14831
|
if (jsonOutput) {
|
|
14908
|
-
|
|
14832
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, { versions });
|
|
14909
14833
|
return 0;
|
|
14910
14834
|
}
|
|
14911
14835
|
if (versions.length === 0) {
|
|
@@ -14918,7 +14842,7 @@ async function handlePlayVersions(args) {
|
|
|
14918
14842
|
return 0;
|
|
14919
14843
|
}
|
|
14920
14844
|
function formatPlayCostEstimate(estimate) {
|
|
14921
|
-
const computeSummary = _optionalChain([estimate, 'optionalAccess',
|
|
14845
|
+
const computeSummary = _optionalChain([estimate, 'optionalAccess', _565 => _565.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)` : "";
|
|
14922
14846
|
if (!estimate || estimate.status === "unavailable") {
|
|
14923
14847
|
return `unavailable${estimate ? `: ${estimate.message}${computeSummary}` : ""}`;
|
|
14924
14848
|
}
|
|
@@ -14948,8 +14872,8 @@ async function handlePlayCost(args) {
|
|
|
14948
14872
|
console.error("Usage: deepline plays cost <play> [--json]");
|
|
14949
14873
|
return 2;
|
|
14950
14874
|
}
|
|
14951
|
-
const result = await new (0,
|
|
14952
|
-
if (
|
|
14875
|
+
const result = await new (0, _chunkHMUBLAT4js.DeeplineClient)().getPlayCostEstimate(name);
|
|
14876
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) console.log(JSON.stringify(result, null, 2));
|
|
14953
14877
|
else
|
|
14954
14878
|
console.log(
|
|
14955
14879
|
`${result.reference}: ${formatPlayCostEstimate(result.costEstimate)}`
|
|
@@ -14957,11 +14881,11 @@ async function handlePlayCost(args) {
|
|
|
14957
14881
|
return 0;
|
|
14958
14882
|
}
|
|
14959
14883
|
async function handlePlayList(args) {
|
|
14960
|
-
const jsonOutput =
|
|
14884
|
+
const jsonOutput = _chunk4RV7U3RPjs.argsWantJson.call(void 0, args);
|
|
14961
14885
|
const showCost = args.includes("--show-cost");
|
|
14962
|
-
const client = new (0,
|
|
14886
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
14963
14887
|
const categoriesIndex = args.indexOf("--categories");
|
|
14964
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
14888
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _566 => _566[categoriesIndex + 1], 'optionalAccess', _567 => _567.trim, 'call', _568 => _568()]) : void 0;
|
|
14965
14889
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
14966
14890
|
if (args.includes("--tag") && tags.length === 0) {
|
|
14967
14891
|
console.error(
|
|
@@ -14982,7 +14906,7 @@ async function handlePlayList(args) {
|
|
|
14982
14906
|
const cursorIndex = args.indexOf("--cursor");
|
|
14983
14907
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
14984
14908
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14985
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
14909
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _569 => _569.trim, 'call', _570 => _570()])) {
|
|
14986
14910
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
14987
14911
|
return 2;
|
|
14988
14912
|
}
|
|
@@ -15023,7 +14947,7 @@ async function handlePlayList(args) {
|
|
|
15023
14947
|
if (play.inputSchema || play.hasInputSchema) {
|
|
15024
14948
|
lines.push(" inputSchema: yes");
|
|
15025
14949
|
}
|
|
15026
|
-
if (_optionalChain([play, 'access',
|
|
14950
|
+
if (_optionalChain([play, 'access', _571 => _571.triggerStatus, 'optionalAccess', _572 => _572.cron])) {
|
|
15027
14951
|
lines.push(
|
|
15028
14952
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
15029
14953
|
);
|
|
@@ -15043,12 +14967,12 @@ async function handlePlayList(args) {
|
|
|
15043
14967
|
} else {
|
|
15044
14968
|
lines.push(" scheduled execution: not configured");
|
|
15045
14969
|
}
|
|
15046
|
-
if (_optionalChain([play, 'access',
|
|
14970
|
+
if (_optionalChain([play, 'access', _573 => _573.triggerStatus, 'optionalAccess', _574 => _574.webhook])) {
|
|
15047
14971
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
15048
14972
|
}
|
|
15049
14973
|
if (showCost) {
|
|
15050
14974
|
lines.push(
|
|
15051
|
-
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access',
|
|
14975
|
+
` cost estimate: ${_nullishCoalesce(_optionalChain([play, 'access', _575 => _575.observedCost, 'optionalAccess', _576 => _576.displayText]), () => ( formatPlayCostEstimate(play.costEstimate)))}`
|
|
15052
14976
|
);
|
|
15053
14977
|
}
|
|
15054
14978
|
lines.push(` run: deepline run ${reference}`);
|
|
@@ -15057,7 +14981,7 @@ async function handlePlayList(args) {
|
|
|
15057
14981
|
lines.push("List truncated \u2014 more plays are available.");
|
|
15058
14982
|
lines.push(`Next page: ${nextPage}`);
|
|
15059
14983
|
}
|
|
15060
|
-
|
|
14984
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
15061
14985
|
{
|
|
15062
14986
|
plays,
|
|
15063
14987
|
count: plays.length,
|
|
@@ -15074,8 +14998,8 @@ async function handlePlayList(args) {
|
|
|
15074
14998
|
return 0;
|
|
15075
14999
|
}
|
|
15076
15000
|
async function handlePlayPin(args, pinned) {
|
|
15077
|
-
const target = _optionalChain([args, 'access',
|
|
15078
|
-
const jsonOutput =
|
|
15001
|
+
const target = _optionalChain([args, 'access', _577 => _577.find, 'call', _578 => _578((arg) => !arg.startsWith("-")), 'optionalAccess', _579 => _579.trim, 'call', _580 => _580()]);
|
|
15002
|
+
const jsonOutput = _chunk4RV7U3RPjs.argsWantJson.call(void 0, args);
|
|
15079
15003
|
const dryRun = args.includes("--dry-run");
|
|
15080
15004
|
if (!target) {
|
|
15081
15005
|
console.error(
|
|
@@ -15093,11 +15017,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15093
15017
|
const name = parsedTarget.playName;
|
|
15094
15018
|
const plan = { name, pinned, dryRun };
|
|
15095
15019
|
if (dryRun) {
|
|
15096
|
-
|
|
15020
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, plan);
|
|
15097
15021
|
return 0;
|
|
15098
15022
|
}
|
|
15099
|
-
const result = await new (0,
|
|
15100
|
-
if (jsonOutput)
|
|
15023
|
+
const result = await new (0, _chunkHMUBLAT4js.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15024
|
+
if (jsonOutput) _chunk4RV7U3RPjs.printCompactJson.call(void 0, result);
|
|
15101
15025
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15102
15026
|
return 0;
|
|
15103
15027
|
}
|
|
@@ -15145,7 +15069,7 @@ function printPlayDescription(play) {
|
|
|
15145
15069
|
console.log(` ${line}`);
|
|
15146
15070
|
}
|
|
15147
15071
|
}
|
|
15148
|
-
if (_optionalChain([play, 'access',
|
|
15072
|
+
if (_optionalChain([play, 'access', _581 => _581.toolCategories, 'optionalAccess', _582 => _582.length])) {
|
|
15149
15073
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15150
15074
|
}
|
|
15151
15075
|
if (play.aliases.length > 0) {
|
|
@@ -15190,7 +15114,7 @@ function printPlayDescription(play) {
|
|
|
15190
15114
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15191
15115
|
if (runtimeLimit) {
|
|
15192
15116
|
console.log(
|
|
15193
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15117
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _583 => _583.runtimeLimit, 'optionalAccess', _584 => _584.source]), () => ( "live"))})`
|
|
15194
15118
|
);
|
|
15195
15119
|
}
|
|
15196
15120
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15218,17 +15142,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15218
15142
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15219
15143
|
}
|
|
15220
15144
|
async function handlePlayGrep(args) {
|
|
15221
|
-
const query = _optionalChain([args, 'access',
|
|
15145
|
+
const query = _optionalChain([args, 'access', _585 => _585[0], 'optionalAccess', _586 => _586.trim, 'call', _587 => _587()]);
|
|
15222
15146
|
if (!query) {
|
|
15223
15147
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15224
15148
|
return 1;
|
|
15225
15149
|
}
|
|
15226
|
-
const client = new (0,
|
|
15150
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
15227
15151
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15228
15152
|
summarizePlayGrepResult
|
|
15229
15153
|
);
|
|
15230
|
-
if (
|
|
15231
|
-
|
|
15154
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
15155
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, {
|
|
15232
15156
|
plays: results,
|
|
15233
15157
|
count: results.length,
|
|
15234
15158
|
query,
|
|
@@ -15242,7 +15166,7 @@ async function handlePlayGrep(args) {
|
|
|
15242
15166
|
`
|
|
15243
15167
|
);
|
|
15244
15168
|
for (const result of results) {
|
|
15245
|
-
console.log(_optionalChain([result, 'access',
|
|
15169
|
+
console.log(_optionalChain([result, 'access', _588 => _588.displayName, 'optionalAccess', _589 => _589.trim, 'call', _590 => _590()]) || result.name);
|
|
15246
15170
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15247
15171
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15248
15172
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15251,7 +15175,7 @@ async function handlePlayGrep(args) {
|
|
|
15251
15175
|
return 0;
|
|
15252
15176
|
}
|
|
15253
15177
|
async function handlePlayDescribe(args) {
|
|
15254
|
-
const selection =
|
|
15178
|
+
const selection = _chunk4RV7U3RPjs.parseJsonFields.call(void 0, args, "describe");
|
|
15255
15179
|
args = selection.args;
|
|
15256
15180
|
const playName = args[0];
|
|
15257
15181
|
if (!playName) {
|
|
@@ -15285,8 +15209,8 @@ async function handlePlayDescribe(args) {
|
|
|
15285
15209
|
`deepline plays check ${playName}`,
|
|
15286
15210
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15287
15211
|
];
|
|
15288
|
-
if (
|
|
15289
|
-
|
|
15212
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
15213
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, {
|
|
15290
15214
|
ok: false,
|
|
15291
15215
|
error: { message },
|
|
15292
15216
|
next
|
|
@@ -15300,7 +15224,7 @@ async function handlePlayDescribe(args) {
|
|
|
15300
15224
|
}
|
|
15301
15225
|
return 2;
|
|
15302
15226
|
}
|
|
15303
|
-
const client = new (0,
|
|
15227
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
15304
15228
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15305
15229
|
command: "describe"
|
|
15306
15230
|
});
|
|
@@ -15310,9 +15234,9 @@ async function handlePlayDescribe(args) {
|
|
|
15310
15234
|
compact: args.includes("--compact")
|
|
15311
15235
|
}
|
|
15312
15236
|
);
|
|
15313
|
-
if (
|
|
15314
|
-
if (selection.fields)
|
|
15315
|
-
else
|
|
15237
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
15238
|
+
if (selection.fields) _chunk4RV7U3RPjs.printJson.call(void 0, play, selection.fields);
|
|
15239
|
+
else _chunk4RV7U3RPjs.printCompactJson.call(void 0, play);
|
|
15316
15240
|
return 0;
|
|
15317
15241
|
}
|
|
15318
15242
|
printPlayDescription(play);
|
|
@@ -15334,7 +15258,7 @@ async function handlePlaySave(args) {
|
|
|
15334
15258
|
}
|
|
15335
15259
|
let graph;
|
|
15336
15260
|
try {
|
|
15337
|
-
graph = await
|
|
15261
|
+
graph = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
15338
15262
|
"cli.play_save_bundle_graph",
|
|
15339
15263
|
{ targetKind: "file" },
|
|
15340
15264
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
@@ -15356,7 +15280,7 @@ async function handlePlaySave(args) {
|
|
|
15356
15280
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15357
15281
|
};
|
|
15358
15282
|
if (options.jsonOutput) {
|
|
15359
|
-
|
|
15283
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result);
|
|
15360
15284
|
} else {
|
|
15361
15285
|
console.error(result.message);
|
|
15362
15286
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15378,7 +15302,7 @@ async function handlePlaySave(args) {
|
|
|
15378
15302
|
};
|
|
15379
15303
|
if (options.dryRun) {
|
|
15380
15304
|
if (options.jsonOutput) {
|
|
15381
|
-
|
|
15305
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, dryRun);
|
|
15382
15306
|
} else {
|
|
15383
15307
|
console.log(`Dry run: ${playName}`);
|
|
15384
15308
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15387,14 +15311,14 @@ async function handlePlaySave(args) {
|
|
|
15387
15311
|
}
|
|
15388
15312
|
return 0;
|
|
15389
15313
|
}
|
|
15390
|
-
const client = new (0,
|
|
15314
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
15391
15315
|
try {
|
|
15392
|
-
await
|
|
15316
|
+
await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
15393
15317
|
"cli.play_save_compile_manifests",
|
|
15394
15318
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15395
15319
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15396
15320
|
);
|
|
15397
|
-
const saved = await
|
|
15321
|
+
const saved = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
15398
15322
|
"cli.play_save_register_draft",
|
|
15399
15323
|
{ targetKind: "file", playName, artifactHash },
|
|
15400
15324
|
() => client.registerPlayArtifact({
|
|
@@ -15423,7 +15347,7 @@ async function handlePlaySave(args) {
|
|
|
15423
15347
|
}
|
|
15424
15348
|
};
|
|
15425
15349
|
if (options.jsonOutput) {
|
|
15426
|
-
|
|
15350
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result);
|
|
15427
15351
|
} else {
|
|
15428
15352
|
console.log(
|
|
15429
15353
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15449,7 +15373,7 @@ async function handlePlayPublish(args) {
|
|
|
15449
15373
|
}
|
|
15450
15374
|
const { target: playName, useLatest } = options;
|
|
15451
15375
|
let revisionId = options.revisionId;
|
|
15452
|
-
const client = new (0,
|
|
15376
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
15453
15377
|
if (isFileTarget(playName)) {
|
|
15454
15378
|
if (revisionId || useLatest) {
|
|
15455
15379
|
console.error(
|
|
@@ -15459,7 +15383,7 @@ async function handlePlayPublish(args) {
|
|
|
15459
15383
|
}
|
|
15460
15384
|
let graph;
|
|
15461
15385
|
try {
|
|
15462
|
-
graph = await
|
|
15386
|
+
graph = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
15463
15387
|
"cli.play_publish_bundle_graph",
|
|
15464
15388
|
{ targetKind: "file" },
|
|
15465
15389
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
@@ -15481,7 +15405,7 @@ async function handlePlayPublish(args) {
|
|
|
15481
15405
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15482
15406
|
};
|
|
15483
15407
|
if (options.jsonOutput) {
|
|
15484
|
-
|
|
15408
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result3);
|
|
15485
15409
|
} else {
|
|
15486
15410
|
console.error(result3.message);
|
|
15487
15411
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15504,7 +15428,7 @@ async function handlePlayPublish(args) {
|
|
|
15504
15428
|
};
|
|
15505
15429
|
if (options.dryRun) {
|
|
15506
15430
|
if (options.jsonOutput) {
|
|
15507
|
-
|
|
15431
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, dryRun);
|
|
15508
15432
|
} else {
|
|
15509
15433
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15510
15434
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15523,12 +15447,12 @@ async function handlePlayPublish(args) {
|
|
|
15523
15447
|
}
|
|
15524
15448
|
}
|
|
15525
15449
|
try {
|
|
15526
|
-
await
|
|
15450
|
+
await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
15527
15451
|
"cli.play_publish_compile_manifests",
|
|
15528
15452
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15529
15453
|
() => compileBundledPlayGraphManifests(client, graph)
|
|
15530
15454
|
);
|
|
15531
|
-
await
|
|
15455
|
+
await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
15532
15456
|
"cli.play_publish_imports",
|
|
15533
15457
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
15534
15458
|
() => publishImportedPlayDependencies(client, graph)
|
|
@@ -15537,7 +15461,7 @@ async function handlePlayPublish(args) {
|
|
|
15537
15461
|
console.error(error instanceof Error ? error.message : String(error));
|
|
15538
15462
|
return 1;
|
|
15539
15463
|
}
|
|
15540
|
-
const published = await
|
|
15464
|
+
const published = await _chunkV7I65ME7js.traceCliSpan.call(void 0,
|
|
15541
15465
|
"cli.play_publish_register_root",
|
|
15542
15466
|
{
|
|
15543
15467
|
targetKind: "file",
|
|
@@ -15562,17 +15486,17 @@ async function handlePlayPublish(args) {
|
|
|
15562
15486
|
artifactHash,
|
|
15563
15487
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15564
15488
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15565
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15566
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15489
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _591 => _591.version]), () => ( null)),
|
|
15490
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _592 => _592.artifactHash]), () => ( null)),
|
|
15567
15491
|
sourceBytes: {
|
|
15568
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15492
|
+
before: _optionalChain([previousLive, 'optionalAccess', _593 => _593.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15569
15493
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15570
15494
|
},
|
|
15571
15495
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15572
15496
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15573
15497
|
};
|
|
15574
15498
|
if (options.jsonOutput) {
|
|
15575
|
-
|
|
15499
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result2);
|
|
15576
15500
|
} else {
|
|
15577
15501
|
printPublishReceipt({
|
|
15578
15502
|
name: rootPlayName,
|
|
@@ -15603,14 +15527,14 @@ async function handlePlayPublish(args) {
|
|
|
15603
15527
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15604
15528
|
latest: useLatest
|
|
15605
15529
|
};
|
|
15606
|
-
|
|
15530
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result2);
|
|
15607
15531
|
return 0;
|
|
15608
15532
|
}
|
|
15609
15533
|
const resolvedName = parseReferencedPlayTarget(playName).playName;
|
|
15610
15534
|
if (useLatest) {
|
|
15611
15535
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15612
15536
|
const latest = versions[0];
|
|
15613
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15537
|
+
if (!_optionalChain([latest, 'optionalAccess', _594 => _594._id])) {
|
|
15614
15538
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15615
15539
|
return 1;
|
|
15616
15540
|
}
|
|
@@ -15627,7 +15551,7 @@ async function handlePlayPublish(args) {
|
|
|
15627
15551
|
revisionId ? { revisionId } : {}
|
|
15628
15552
|
);
|
|
15629
15553
|
if (options.jsonOutput) {
|
|
15630
|
-
|
|
15554
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result);
|
|
15631
15555
|
} else {
|
|
15632
15556
|
printPublishReceipt({
|
|
15633
15557
|
name: result.name,
|
|
@@ -15667,7 +15591,7 @@ async function handlePlayDelete(args) {
|
|
|
15667
15591
|
);
|
|
15668
15592
|
return 2;
|
|
15669
15593
|
}
|
|
15670
|
-
const client = new (0,
|
|
15594
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
15671
15595
|
let detail;
|
|
15672
15596
|
try {
|
|
15673
15597
|
detail = await client.getPlay(parseReferencedPlayTarget(playName).playName);
|
|
@@ -15691,8 +15615,8 @@ async function handlePlayDelete(args) {
|
|
|
15691
15615
|
name: resolvedName,
|
|
15692
15616
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15693
15617
|
};
|
|
15694
|
-
if (
|
|
15695
|
-
|
|
15618
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
15619
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result2);
|
|
15696
15620
|
} else {
|
|
15697
15621
|
process.stdout.write(
|
|
15698
15622
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15702,8 +15626,8 @@ async function handlePlayDelete(args) {
|
|
|
15702
15626
|
return 0;
|
|
15703
15627
|
}
|
|
15704
15628
|
const result = await client.deletePlay(resolvedName);
|
|
15705
|
-
if (
|
|
15706
|
-
|
|
15629
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
15630
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result);
|
|
15707
15631
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15708
15632
|
}
|
|
15709
15633
|
if (result.alreadyArchived) {
|
|
@@ -15742,13 +15666,13 @@ async function handlePlayRestore(args) {
|
|
|
15742
15666
|
);
|
|
15743
15667
|
return 2;
|
|
15744
15668
|
}
|
|
15745
|
-
const client = new (0,
|
|
15669
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
15746
15670
|
try {
|
|
15747
15671
|
const result = await client.restorePlay(
|
|
15748
15672
|
parseReferencedPlayTarget(playName).playName
|
|
15749
15673
|
);
|
|
15750
|
-
if (
|
|
15751
|
-
|
|
15674
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
15675
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, result);
|
|
15752
15676
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
15753
15677
|
}
|
|
15754
15678
|
if (result.alreadyActive) {
|
|
@@ -15875,21 +15799,21 @@ Common commands:
|
|
|
15875
15799
|
resume: `deepline plays resume-submission ${_chunkAID3OYVJjs.shellQuote.call(void 0, path)} --json`
|
|
15876
15800
|
}
|
|
15877
15801
|
};
|
|
15878
|
-
|
|
15802
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0, result2, {
|
|
15879
15803
|
json: options.json,
|
|
15880
15804
|
text: `Submission ${saved.workflowId}: admission is unknown. ${result2.next.inspect}
|
|
15881
15805
|
`
|
|
15882
15806
|
});
|
|
15883
15807
|
return;
|
|
15884
15808
|
}
|
|
15885
|
-
const client = new (0,
|
|
15809
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
15886
15810
|
if (new URL(saved.baseUrl).origin !== new URL(client.baseUrl).origin) {
|
|
15887
15811
|
throw new Error(
|
|
15888
15812
|
"The submission belongs to a different API origin. Select its original host before recovery."
|
|
15889
15813
|
);
|
|
15890
15814
|
}
|
|
15891
15815
|
const result = await client.startPlayRun(saved.request);
|
|
15892
|
-
|
|
15816
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
15893
15817
|
{ ...result },
|
|
15894
15818
|
{
|
|
15895
15819
|
json: options.json,
|
|
@@ -15925,7 +15849,7 @@ Examples:
|
|
|
15925
15849
|
).action(async (target, options) => {
|
|
15926
15850
|
process.exitCode = await handlePlayCheck([
|
|
15927
15851
|
target,
|
|
15928
|
-
...
|
|
15852
|
+
..._chunk4RV7U3RPjs.jsonFieldArgs.call(void 0, options.json),
|
|
15929
15853
|
...options.full ? ["--full"] : []
|
|
15930
15854
|
]);
|
|
15931
15855
|
});
|
|
@@ -15964,10 +15888,10 @@ Notes:
|
|
|
15964
15888
|
--force-tool-refresh re-executes completed tool receipts and may repeat billed
|
|
15965
15889
|
provider calls. It is independent from --force.
|
|
15966
15890
|
--max-concurrent-external-calls controls the per-run provider-tool/deepline.fetch
|
|
15967
|
-
resident-work ceiling. Default: ${
|
|
15891
|
+
resident-work ceiling. Default: ${_chunkXFY3JOP2js.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS}; accepted range: 1-${_chunkXFY3JOP2js.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS}.
|
|
15968
15892
|
Provider pacing and sandbox memory limits still apply.
|
|
15969
15893
|
--max-concurrent-rows sets the run-wide default and ceiling for live map row
|
|
15970
|
-
resolvers. Accepted range: 1-${
|
|
15894
|
+
resolvers. Accepted range: 1-${_chunkXFY3JOP2js.MAX_CONFIGURABLE_CONCURRENT_ROWS}. The runtime
|
|
15971
15895
|
may lower it when source-row size exceeds the active-row memory budget.
|
|
15972
15896
|
--max-credits replaces the play's billing.maxCreditsPerRun for this run.
|
|
15973
15897
|
Tool calls that would exceed it are denied.
|
|
@@ -16081,10 +16005,10 @@ Examples:
|
|
|
16081
16005
|
"Refresh completed tool receipts; may repeat billed provider calls"
|
|
16082
16006
|
).option(
|
|
16083
16007
|
"--max-concurrent-external-calls <count>",
|
|
16084
|
-
`Concurrent provider-tool and deepline.fetch executions (${
|
|
16008
|
+
`Concurrent provider-tool and deepline.fetch executions (${_chunkXFY3JOP2js.DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS} default, max ${_chunkXFY3JOP2js.MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS})`
|
|
16085
16009
|
).option(
|
|
16086
16010
|
"--max-concurrent-rows <count>",
|
|
16087
|
-
`Run-wide dataset map row resolver ceiling (max ${
|
|
16011
|
+
`Run-wide dataset map row resolver ceiling (max ${_chunkXFY3JOP2js.MAX_CONFIGURABLE_CONCURRENT_ROWS})`
|
|
16088
16012
|
).option("--max-credits <credits>", "Deepline-credit cap for this run").option("--open", "Open the play page in a browser after the run starts").option(
|
|
16089
16013
|
"--debug-map-latency",
|
|
16090
16014
|
"Internal diagnostics: emit one aggregate latency profile per dataset map"
|
|
@@ -16129,14 +16053,14 @@ JSON field selection:
|
|
|
16129
16053
|
passthroughArgs.shift();
|
|
16130
16054
|
}
|
|
16131
16055
|
const exitCode = await handlePlayRun(
|
|
16132
|
-
|
|
16056
|
+
_chunkXFY3JOP2js.resolvePlayRunCliOptions.call(void 0,
|
|
16133
16057
|
_nullishCoalesce(effectiveTarget, () => ( void 0)),
|
|
16134
16058
|
options,
|
|
16135
16059
|
passthroughArgs,
|
|
16136
|
-
|
|
16060
|
+
_chunkV7I65ME7js.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
16137
16061
|
)
|
|
16138
16062
|
);
|
|
16139
|
-
|
|
16063
|
+
_chunkV7I65ME7js.recordCliTrace.call(void 0, {
|
|
16140
16064
|
phase: "cli.play_command_exit",
|
|
16141
16065
|
exitCode
|
|
16142
16066
|
});
|
|
@@ -16185,9 +16109,9 @@ Examples:
|
|
|
16185
16109
|
const limit = Number(options.historyLimit);
|
|
16186
16110
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16187
16111
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16188
|
-
const client = new (0,
|
|
16112
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
16189
16113
|
if (options.binding) {
|
|
16190
|
-
|
|
16114
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0,
|
|
16191
16115
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16192
16116
|
);
|
|
16193
16117
|
return;
|
|
@@ -16195,7 +16119,7 @@ Examples:
|
|
|
16195
16119
|
const result = await client.listPlayTriggerInventory({
|
|
16196
16120
|
cursor: options.cursor
|
|
16197
16121
|
});
|
|
16198
|
-
|
|
16122
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, {
|
|
16199
16123
|
...result,
|
|
16200
16124
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16201
16125
|
});
|
|
@@ -16254,7 +16178,7 @@ Examples:
|
|
|
16254
16178
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16255
16179
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16256
16180
|
}
|
|
16257
|
-
const result = await new (0,
|
|
16181
|
+
const result = await new (0, _chunkHMUBLAT4js.DeeplineClient)().getPlaysActivity({
|
|
16258
16182
|
timeZone: options.timeZone,
|
|
16259
16183
|
days,
|
|
16260
16184
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16268,7 +16192,7 @@ Examples:
|
|
|
16268
16192
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16269
16193
|
);
|
|
16270
16194
|
}
|
|
16271
|
-
|
|
16195
|
+
_chunk4RV7U3RPjs.printCommandEnvelope.call(void 0,
|
|
16272
16196
|
{ ...result },
|
|
16273
16197
|
{
|
|
16274
16198
|
json: Boolean(options.json),
|
|
@@ -16297,7 +16221,7 @@ Examples:
|
|
|
16297
16221
|
false
|
|
16298
16222
|
);
|
|
16299
16223
|
});
|
|
16300
|
-
|
|
16224
|
+
_chunk6EEMW7YPjs.registerDeprecatedSearchCommand.call(void 0,
|
|
16301
16225
|
play,
|
|
16302
16226
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16303
16227
|
);
|
|
@@ -16338,9 +16262,9 @@ Examples:
|
|
|
16338
16262
|
"--json [fields]",
|
|
16339
16263
|
"JSON output; optionally select comma-separated dotted paths"
|
|
16340
16264
|
);
|
|
16341
|
-
|
|
16265
|
+
_chunkUXQVSDFPjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16342
16266
|
async (target, options) => {
|
|
16343
|
-
const ownView = () => handlePlayDescribe(
|
|
16267
|
+
const ownView = () => handlePlayDescribe(_chunk4RV7U3RPjs.describeArgs.call(void 0, target, options));
|
|
16344
16268
|
const [flagText] = [options.json].filter(
|
|
16345
16269
|
(value) => typeof value === "string"
|
|
16346
16270
|
);
|
|
@@ -16351,7 +16275,7 @@ Examples:
|
|
|
16351
16275
|
process.exitCode = await ownView();
|
|
16352
16276
|
return;
|
|
16353
16277
|
}
|
|
16354
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16278
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-7HYV44MO.js")));
|
|
16355
16279
|
process.exitCode = await describeAnything(
|
|
16356
16280
|
name,
|
|
16357
16281
|
{
|
|
@@ -16469,7 +16393,7 @@ Examples:
|
|
|
16469
16393
|
deepline plays deployments <deployment-id>
|
|
16470
16394
|
`
|
|
16471
16395
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16472
|
-
async (id, options) => id ?
|
|
16396
|
+
async (id, options) => id ? _chunkTQWI7LJXjs.handleDeploymentGet.call(void 0, id, options) : _chunkTQWI7LJXjs.handleDeploymentsList.call(void 0, options)
|
|
16473
16397
|
);
|
|
16474
16398
|
addPublishHelp(
|
|
16475
16399
|
play.command("publish <target>").description(
|
|
@@ -16604,14 +16528,14 @@ Examples:
|
|
|
16604
16528
|
const limit = Number(options.limit);
|
|
16605
16529
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 1e3)
|
|
16606
16530
|
throw new Error("--limit must be an integer from 1 to 1000.");
|
|
16607
|
-
const result = await new (0,
|
|
16531
|
+
const result = await new (0, _chunkHMUBLAT4js.DeeplineClient)().runs.rowHistory({
|
|
16608
16532
|
playName: options.play,
|
|
16609
16533
|
runId,
|
|
16610
16534
|
tableNamespace: options.dataset,
|
|
16611
16535
|
limit,
|
|
16612
16536
|
cursor: options.cursor
|
|
16613
16537
|
});
|
|
16614
|
-
|
|
16538
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, {
|
|
16615
16539
|
...result,
|
|
16616
16540
|
...result.nextCursor ? {
|
|
16617
16541
|
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`
|
|
@@ -16685,7 +16609,7 @@ Examples:
|
|
|
16685
16609
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
16686
16610
|
).action(async (runId, options) => {
|
|
16687
16611
|
if (TOOL_EXECUTION_ID.test(runId)) {
|
|
16688
|
-
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-
|
|
16612
|
+
const { getToolExecutionReceipt } = await Promise.resolve().then(() => _interopRequireWildcard(require("./tools-HH6E5G7J.js")));
|
|
16689
16613
|
process.exitCode = await getToolExecutionReceipt(runId, {
|
|
16690
16614
|
receiptJson: options.json !== void 0
|
|
16691
16615
|
});
|
|
@@ -16693,7 +16617,7 @@ Examples:
|
|
|
16693
16617
|
}
|
|
16694
16618
|
process.exitCode = await handleRunGet([
|
|
16695
16619
|
runId,
|
|
16696
|
-
...
|
|
16620
|
+
..._chunk4RV7U3RPjs.jsonFieldArgs.call(void 0, options.json),
|
|
16697
16621
|
...options.webUrl ? ["--web-url"] : [],
|
|
16698
16622
|
...options.full ? ["--full"] : [],
|
|
16699
16623
|
...options.input ? ["--input"] : [],
|
|
@@ -16983,7 +16907,7 @@ Examples:
|
|
|
16983
16907
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
16984
16908
|
...options.wait ? ["--wait"] : [],
|
|
16985
16909
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
16986
|
-
...
|
|
16910
|
+
..._chunk4RV7U3RPjs.jsonFieldArgs.call(void 0, options.json)
|
|
16987
16911
|
]);
|
|
16988
16912
|
});
|
|
16989
16913
|
const share = play.command("share").description(
|
|
@@ -17124,8 +17048,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17124
17048
|
}
|
|
17125
17049
|
function shareUrlFields(status) {
|
|
17126
17050
|
return {
|
|
17127
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17128
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17051
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _595 => _595.share, 'optionalAccess', _596 => _596.publicPath])),
|
|
17052
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _597 => _597.share, 'optionalAccess', _598 => _598.canonicalPath]))
|
|
17129
17053
|
};
|
|
17130
17054
|
}
|
|
17131
17055
|
function shareStatusForOutput(status) {
|
|
@@ -17149,10 +17073,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17149
17073
|
return 2;
|
|
17150
17074
|
}
|
|
17151
17075
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17152
|
-
const status = await new (0,
|
|
17076
|
+
const status = await new (0, _chunkHMUBLAT4js.DeeplineClient)().getSharePage(name);
|
|
17153
17077
|
const outputStatus = shareStatusForOutput(status);
|
|
17154
|
-
if (
|
|
17155
|
-
|
|
17078
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
17079
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, outputStatus);
|
|
17156
17080
|
return 0;
|
|
17157
17081
|
}
|
|
17158
17082
|
if (!outputStatus.share) {
|
|
@@ -17191,7 +17115,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17191
17115
|
return 2;
|
|
17192
17116
|
}
|
|
17193
17117
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17194
|
-
const client = new (0,
|
|
17118
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
17195
17119
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17196
17120
|
let resolvedVersion;
|
|
17197
17121
|
if (!revisionId) {
|
|
@@ -17222,8 +17146,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17222
17146
|
);
|
|
17223
17147
|
if (!hasCompleted) {
|
|
17224
17148
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17225
|
-
if (
|
|
17226
|
-
|
|
17149
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
17150
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, {
|
|
17227
17151
|
ok: false,
|
|
17228
17152
|
code: "NO_SUCCESSFUL_RUN",
|
|
17229
17153
|
message,
|
|
@@ -17247,8 +17171,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17247
17171
|
};
|
|
17248
17172
|
if (args.includes("--dry-run")) {
|
|
17249
17173
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17250
|
-
if (
|
|
17251
|
-
|
|
17174
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
17175
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, plan);
|
|
17252
17176
|
} else {
|
|
17253
17177
|
console.log(
|
|
17254
17178
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17258,13 +17182,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17258
17182
|
}
|
|
17259
17183
|
const status = await client.publishSharePage(name, request);
|
|
17260
17184
|
const outputStatus = shareStatusForOutput(status);
|
|
17261
|
-
if (
|
|
17262
|
-
|
|
17185
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
17186
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, outputStatus);
|
|
17263
17187
|
return 0;
|
|
17264
17188
|
}
|
|
17265
17189
|
const urls = shareUrlFields(outputStatus);
|
|
17266
17190
|
console.log(
|
|
17267
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17191
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _599 => _599.share, 'optionalAccess', _600 => _600.publicPath]))), () => ( ""))}`
|
|
17268
17192
|
);
|
|
17269
17193
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17270
17194
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17290,9 +17214,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17290
17214
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17291
17215
|
...seoIndexing ? { seoIndexing } : {}
|
|
17292
17216
|
};
|
|
17293
|
-
const status = await new (0,
|
|
17294
|
-
if (
|
|
17295
|
-
|
|
17217
|
+
const status = await new (0, _chunkHMUBLAT4js.DeeplineClient)().updateSharePage(name, request);
|
|
17218
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
17219
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, status);
|
|
17296
17220
|
return 0;
|
|
17297
17221
|
}
|
|
17298
17222
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17307,13 +17231,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17307
17231
|
return 2;
|
|
17308
17232
|
}
|
|
17309
17233
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17310
|
-
const client = new (0,
|
|
17234
|
+
const client = new (0, _chunkHMUBLAT4js.DeeplineClient)();
|
|
17311
17235
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17312
17236
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17313
17237
|
if (!revisionId && versionFlag) {
|
|
17314
17238
|
const versions = await client.listPlayVersions(name);
|
|
17315
17239
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17316
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17240
|
+
if (!_optionalChain([chosen, 'optionalAccess', _601 => _601._id])) {
|
|
17317
17241
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17318
17242
|
return 4;
|
|
17319
17243
|
}
|
|
@@ -17324,12 +17248,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17324
17248
|
revisionId ? { revisionId } : {}
|
|
17325
17249
|
);
|
|
17326
17250
|
const outputStatus = shareStatusForOutput(status);
|
|
17327
|
-
if (
|
|
17328
|
-
|
|
17251
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
17252
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, outputStatus);
|
|
17329
17253
|
return 0;
|
|
17330
17254
|
}
|
|
17331
17255
|
const urls = shareUrlFields(outputStatus);
|
|
17332
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17256
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _602 => _602.share, 'optionalAccess', _603 => _603.publishedRevisionId]) === revisionId;
|
|
17333
17257
|
console.log(
|
|
17334
17258
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17335
17259
|
);
|
|
@@ -17350,9 +17274,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17350
17274
|
return 2;
|
|
17351
17275
|
}
|
|
17352
17276
|
const name = parseReferencedPlayTarget(target).playName;
|
|
17353
|
-
const status = await new (0,
|
|
17354
|
-
if (
|
|
17355
|
-
|
|
17277
|
+
const status = await new (0, _chunkHMUBLAT4js.DeeplineClient)().unpublishSharePage(name);
|
|
17278
|
+
if (_chunk4RV7U3RPjs.argsWantJson.call(void 0, args)) {
|
|
17279
|
+
_chunk4RV7U3RPjs.printCompactJson.call(void 0, status);
|
|
17356
17280
|
return 0;
|
|
17357
17281
|
}
|
|
17358
17282
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17427,4 +17351,4 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17427
17351
|
|
|
17428
17352
|
|
|
17429
17353
|
|
|
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 =
|
|
17354
|
+
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 = _chunkXFY3JOP2js.parsePlayRunHeaderFlag; exports.parsePlayRunOptions = _chunkXFY3JOP2js.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;
|