deepline 0.3.314 → 0.3.316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client.ts +12 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/overview.ts +17 -10
- package/dist/bundling-sources/sdk/src/types.ts +16 -5
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +217 -488
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +13 -4
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/live-events.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +444 -51
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +22 -43
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +4 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +136 -87
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +24 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +94 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +5 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +20 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +18 -12
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +140 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +3 -2
- package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +61 -11
- package/dist/cli/{auth-GWF55S3N.mjs → auth-JP7ZJ4OI.mjs} +4 -4
- package/dist/cli/auth-SPUJ4EXC.js +31 -0
- package/dist/cli/{billing-WWOJN7GV.mjs → billing-KG6MC2BC.mjs} +4 -4
- package/dist/cli/{billing-2YU6E2IF.js → billing-WZGS32ME.js} +70 -70
- package/dist/cli/{chunk-OJ243ZA5.js → chunk-2HKPAZVJ.js} +1 -1
- package/dist/cli/{chunk-YVMJTXEG.js → chunk-35YXDTOB.js} +26 -26
- package/dist/cli/{chunk-QB5MAFCU.mjs → chunk-46ZOD4PQ.mjs} +1 -1
- package/dist/cli/{chunk-CPN2N6EZ.mjs → chunk-6R5ACEWN.mjs} +43 -17
- package/dist/cli/{chunk-US4S3E4Y.mjs → chunk-7PZFGB7L.mjs} +1 -1
- package/dist/cli/{chunk-3CKNUJVZ.mjs → chunk-AXAPMVUC.mjs} +4 -4
- package/dist/cli/{chunk-ENQZV7NR.js → chunk-B6OOVO3A.js} +562 -536
- package/dist/cli/{chunk-WDPRE6DU.js → chunk-BOKHMPCZ.js} +48 -48
- package/dist/cli/{chunk-VFRZG4OW.js → chunk-C6QGM72M.js} +1 -1
- package/dist/cli/{chunk-IZTIBG7A.mjs → chunk-D3NMIACS.mjs} +29 -15
- package/dist/cli/{chunk-DR3S76BG.mjs → chunk-DAFGPNVW.mjs} +1 -1
- package/dist/cli/{chunk-3K6QD7Z3.mjs → chunk-F2T5UENG.mjs} +1 -1
- package/dist/cli/{chunk-VWW6VHQX.js → chunk-G2G67D3L.js} +60 -60
- package/dist/cli/{chunk-ODEWOXWW.js → chunk-GHLWDXUB.js} +6 -6
- package/dist/cli/{chunk-25SPKKF2.mjs → chunk-IDSDRGKF.mjs} +1 -1
- package/dist/cli/{chunk-OUHCJL5B.mjs → chunk-J3ZPMADG.mjs} +1 -1
- package/dist/cli/{chunk-MLEJ2FYH.js → chunk-K3BIRBT3.js} +248 -234
- package/dist/cli/{chunk-N5V2SBB2.mjs → chunk-KP7W5NO6.mjs} +1 -1
- package/dist/cli/{chunk-B5LUKLKH.js → chunk-MCPHK7AF.js} +4 -4
- package/dist/cli/{chunk-2Q2IKUL5.mjs → chunk-OB3SYJGU.mjs} +3 -3
- package/dist/cli/{chunk-UZTTPEG2.js → chunk-PJERS5VW.js} +6 -6
- package/dist/cli/{chunk-VBRO5QCI.js → chunk-RBBSRB56.js} +15 -15
- package/dist/cli/{chunk-NG4WDOGN.js → chunk-SRUWVQ66.js} +6 -6
- package/dist/cli/{chunk-WTO3ITBC.mjs → chunk-TYSAKSX7.mjs} +2 -2
- package/dist/cli/{chunk-HTXZLCSP.mjs → chunk-VC25WFXV.mjs} +2 -2
- package/dist/cli/{chunk-3A4LJUX6.mjs → chunk-VDPBQCRQ.mjs} +2 -2
- package/dist/cli/{chunk-IALPYID6.js → chunk-XSEMQ4II.js} +3 -3
- package/dist/cli/{chunk-JNUHGWB2.js → chunk-YEMOOWZI.js} +50 -50
- package/dist/cli/{chunk-JZZT4GAY.mjs → chunk-YNSAVFWL.mjs} +5 -5
- package/dist/cli/{chunk-GSRDZD7R.js → chunk-ZNHGAWYI.js} +2 -2
- package/dist/cli/client-GMMPQT7B.js +20 -0
- package/dist/cli/{client-EYGNDORT.mjs → client-MNPM4ME3.mjs} +3 -3
- package/dist/cli/{csv-YOW5JMOH.js → csv-G72FIQWI.js} +12 -12
- package/dist/cli/{csv-NZCN7SVV.mjs → csv-ZME7HAPR.mjs} +3 -3
- package/dist/cli/{db-HALJV3KY.mjs → db-K2DS4PEY.mjs} +4 -4
- package/dist/cli/{db-6BIYLZ6F.js → db-KRBWHSMA.js} +20 -20
- package/dist/cli/{describe-KY2ZYGBR.mjs → describe-LXBJP6OP.mjs} +10 -10
- package/dist/cli/{describe-WA6R2JSH.js → describe-UKFV376D.js} +17 -17
- package/dist/cli/{executions-CBOAN6KI.mjs → executions-2V3AROY6.mjs} +4 -4
- package/dist/cli/{executions-NMCTN7XM.js → executions-E66AM4JU.js} +6 -6
- package/dist/cli/{feedback-ZZFDSCWS.js → feedback-7C2N7M37.js} +6 -6
- package/dist/cli/{feedback-FOMPE3DJ.mjs → feedback-IEPZ2XKZ.mjs} +3 -3
- package/dist/cli/{git-YQR2NBCO.mjs → git-AR5KGN4O.mjs} +4 -4
- package/dist/cli/git-EXYB66IH.js +23 -0
- package/dist/cli/index.js +171 -98
- package/dist/cli/index.mjs +114 -41
- package/dist/cli/{legacy-noops-XH2TFFI6.js → legacy-noops-A2SH45P4.js} +7 -7
- package/dist/cli/{legacy-noops-KMU6P3K4.mjs → legacy-noops-LC2EGAZU.mjs} +4 -4
- package/dist/cli/{monitors-2ONK5L3I.mjs → monitors-5YPW3IZQ.mjs} +4 -4
- package/dist/cli/{monitors-5M3BZ5OR.js → monitors-IZBUPKPW.js} +85 -85
- package/dist/cli/{org-LR5BMCGL.mjs → org-2OMYI5KJ.mjs} +4 -4
- package/dist/cli/{org-6MKULUZI.js → org-L42SQ65U.js} +60 -60
- package/dist/cli/play-CQI3IDDN.js +152 -0
- package/dist/cli/{play-4NOSD7DW.mjs → play-UPCBLAOH.mjs} +9 -9
- package/dist/cli/{providers-UFJD3VKF.js → providers-GGNDWUKB.js} +7 -7
- package/dist/cli/{providers-UBGIKGCA.mjs → providers-VE2RM56M.mjs} +4 -4
- package/dist/cli/{quickstart-KQZHZE6C.js → quickstart-4CZHURUX.js} +5 -5
- package/dist/cli/{quickstart-KDUKQRUH.mjs → quickstart-HSJ7FU7Z.mjs} +3 -3
- package/dist/cli/{search-4BVOOS5Q.mjs → search-MWBM3I2L.mjs} +5 -5
- package/dist/cli/search-PD5FBCUN.js +26 -0
- package/dist/cli/{secrets-TVXZ3WJ3.js → secrets-CWBPGDZV.js} +13 -13
- package/dist/cli/{secrets-YGV23N3N.mjs → secrets-W5DQYKGU.mjs} +4 -4
- package/dist/cli/{sessions-RWIQWDFD.js → sessions-EDCFU6P2.js} +5 -5
- package/dist/cli/{sessions-G7ROUW35.mjs → sessions-Q42GUYTF.mjs} +4 -4
- package/dist/cli/{settings-TG3E2NR7.js → settings-OKRENZGX.js} +74 -74
- package/dist/cli/{settings-QZEVGCXE.mjs → settings-SO56AJPQ.mjs} +7 -7
- package/dist/cli/{setup-3KDUNEEE.js → setup-7PLHLNLS.js} +41 -41
- package/dist/cli/{setup-HUXINKOH.mjs → setup-OTYMF5CZ.mjs} +6 -6
- package/dist/cli/{skills-LHU3DB7J.mjs → skills-4UFS4FXP.mjs} +4 -4
- package/dist/cli/skills-IP7IW7EQ.js +28 -0
- package/dist/cli/{tools-J5WQ33BB.mjs → tools-6FV543YV.mjs} +6 -6
- package/dist/cli/tools-A2YNR6PI.js +38 -0
- package/dist/cli/{update-T6744RM7.mjs → update-6POGDXYW.mjs} +6 -6
- package/dist/cli/update-QXSGKLJG.js +28 -0
- package/dist/cli/{workflow-CG2B65HD.mjs → workflow-HVZSFWYR.mjs} +5 -5
- package/dist/cli/{workflow-YF5SQJLG.js → workflow-RB4POZP5.js} +15 -15
- package/dist/{client-OBwghxPC.d.ts → client-BV68GMPo.d.ts} +19 -6
- package/dist/{client-CtVdLZux.d.mts → client-D9ACjiRC.d.mts} +19 -6
- package/dist/{compiler-manifest-wOKNiXpa.d.mts → compiler-manifest-BXcZ4P4W.d.mts} +2 -2
- package/dist/{compiler-manifest-wOKNiXpa.d.ts → compiler-manifest-BXcZ4P4W.d.ts} +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/dist/install-integrity.json +82 -82
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/bundle-play-file.mjs +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/package.json +1 -1
- package/dist/cli/auth-QX2L4LPM.js +0 -31
- package/dist/cli/client-Z4VFNTUB.js +0 -20
- package/dist/cli/git-AC2ATBDK.js +0 -23
- package/dist/cli/play-U3CZ4F2W.js +0 -152
- package/dist/cli/search-Y7OTFRCI.js +0 -26
- package/dist/cli/skills-CO5YUWBK.js +0 -28
- package/dist/cli/tools-MWPT5X47.js +0 -38
- package/dist/cli/update-VVIJW7ZJ.js +0 -28
|
@@ -7,11 +7,11 @@ var _chunkXNL3SEMCjs = require('./chunk-XNL3SEMC.js');
|
|
|
7
7
|
var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkPJERS5VWjs = require('./chunk-PJERS5VW.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk35YXDTOBjs = require('./chunk-35YXDTOB.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -34,7 +34,7 @@ var _chunkSDK3ZA2Cjs = require('./chunk-SDK3ZA2C.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkK3BIRBT3js = require('./chunk-K3BIRBT3.js');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -66,10 +66,10 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
var
|
|
69
|
+
var _chunkGHLWDXUBjs = require('./chunk-GHLWDXUB.js');
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
var
|
|
72
|
+
var _chunkMCPHK7AFjs = require('./chunk-MCPHK7AF.js');
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
@@ -77,7 +77,7 @@ var _chunkB5LUKLKHjs = require('./chunk-B5LUKLKH.js');
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
var
|
|
80
|
+
var _chunkXSEMQ4IIjs = require('./chunk-XSEMQ4II.js');
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -2061,7 +2061,7 @@ function resolveField(key, command) {
|
|
|
2061
2061
|
function printSettings(result, json, name) {
|
|
2062
2062
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2063
2063
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2064
|
-
|
|
2064
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2065
2065
|
{
|
|
2066
2066
|
...result,
|
|
2067
2067
|
settings: Object.fromEntries(
|
|
@@ -2105,7 +2105,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2105
2105
|
valueSyntax: field.cli.valueSyntax,
|
|
2106
2106
|
examples: field.cli.examples
|
|
2107
2107
|
}));
|
|
2108
|
-
|
|
2108
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2109
2109
|
{
|
|
2110
2110
|
fields: descriptions,
|
|
2111
2111
|
render: {
|
|
@@ -2130,7 +2130,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2130
2130
|
async (options, command) => {
|
|
2131
2131
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2132
2132
|
printSettings(
|
|
2133
|
-
await new (0,
|
|
2133
|
+
await new (0, _chunkK3BIRBT3js.DeeplineClient)().getPlaySettings(options.play),
|
|
2134
2134
|
options.json,
|
|
2135
2135
|
options.name
|
|
2136
2136
|
);
|
|
@@ -2161,7 +2161,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2161
2161
|
);
|
|
2162
2162
|
}
|
|
2163
2163
|
if (options.dryRun) {
|
|
2164
|
-
|
|
2164
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2165
2165
|
{
|
|
2166
2166
|
dryRun: true,
|
|
2167
2167
|
play,
|
|
@@ -2182,7 +2182,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2182
2182
|
return;
|
|
2183
2183
|
}
|
|
2184
2184
|
printSettings(
|
|
2185
|
-
await new (0,
|
|
2185
|
+
await new (0, _chunkK3BIRBT3js.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2186
2186
|
options.json
|
|
2187
2187
|
);
|
|
2188
2188
|
};
|
|
@@ -2208,13 +2208,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2208
2208
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2209
2209
|
{ exitCode: 2 }
|
|
2210
2210
|
);
|
|
2211
|
-
const page = await new (0,
|
|
2211
|
+
const page = await new (0, _chunkK3BIRBT3js.DeeplineClient)().listPlaySettingsPaths({
|
|
2212
2212
|
root: options.root,
|
|
2213
2213
|
limit,
|
|
2214
2214
|
cursor: options.cursor
|
|
2215
2215
|
});
|
|
2216
2216
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""} --json` : null;
|
|
2217
|
-
|
|
2217
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2218
2218
|
{
|
|
2219
2219
|
...page,
|
|
2220
2220
|
nextCommand,
|
|
@@ -2265,7 +2265,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2265
2265
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
|
|
2266
2266
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
|
|
2267
2267
|
};
|
|
2268
|
-
const client = new (0,
|
|
2268
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
2269
2269
|
const paths = [];
|
|
2270
2270
|
let cursor;
|
|
2271
2271
|
do {
|
|
@@ -2327,7 +2327,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2327
2327
|
moved.push(move.playName);
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
|
|
2330
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2331
2331
|
{
|
|
2332
2332
|
dryRun: Boolean(options.dryRun),
|
|
2333
2333
|
from: options.from,
|
|
@@ -2455,7 +2455,7 @@ function triggerLines(view) {
|
|
|
2455
2455
|
return lines;
|
|
2456
2456
|
}
|
|
2457
2457
|
function printView(view, json) {
|
|
2458
|
-
|
|
2458
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2459
2459
|
{
|
|
2460
2460
|
...view,
|
|
2461
2461
|
render: {
|
|
@@ -2468,7 +2468,7 @@ function printView(view, json) {
|
|
|
2468
2468
|
);
|
|
2469
2469
|
}
|
|
2470
2470
|
function printResult(result, json) {
|
|
2471
|
-
|
|
2471
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2472
2472
|
{
|
|
2473
2473
|
...result,
|
|
2474
2474
|
render: {
|
|
@@ -2498,7 +2498,7 @@ async function mutate(command, options, build) {
|
|
|
2498
2498
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2499
2499
|
}
|
|
2500
2500
|
if (options.dryRun) {
|
|
2501
|
-
|
|
2501
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
2502
2502
|
{
|
|
2503
2503
|
dryRun: true,
|
|
2504
2504
|
play: options.play,
|
|
@@ -2517,7 +2517,7 @@ async function mutate(command, options, build) {
|
|
|
2517
2517
|
return;
|
|
2518
2518
|
}
|
|
2519
2519
|
printResult(
|
|
2520
|
-
await new (0,
|
|
2520
|
+
await new (0, _chunkK3BIRBT3js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2521
2521
|
options.json
|
|
2522
2522
|
);
|
|
2523
2523
|
}
|
|
@@ -2550,7 +2550,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2550
2550
|
}).addHelpText("after", help2);
|
|
2551
2551
|
trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON; automatic when piped").addHelpText("after", help2).action(async (options) => {
|
|
2552
2552
|
printView(
|
|
2553
|
-
await new (0,
|
|
2553
|
+
await new (0, _chunkK3BIRBT3js.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2554
2554
|
options.json
|
|
2555
2555
|
);
|
|
2556
2556
|
});
|
|
@@ -2594,7 +2594,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2594
2594
|
if (options.auth === void 0) {
|
|
2595
2595
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2596
2596
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2597
|
-
const current = await new (0,
|
|
2597
|
+
const current = await new (0, _chunkK3BIRBT3js.DeeplineClient)().getPlayTriggerConfig(
|
|
2598
2598
|
options.play
|
|
2599
2599
|
);
|
|
2600
2600
|
return {
|
|
@@ -2671,7 +2671,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2671
2671
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2672
2672
|
"runtime.event": "Other event."
|
|
2673
2673
|
};
|
|
2674
|
-
var RUN_LOGS_KIND_HELP =
|
|
2674
|
+
var RUN_LOGS_KIND_HELP = _chunkK3BIRBT3js.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2675
2675
|
kind,
|
|
2676
2676
|
description: KIND_DESCRIPTIONS[kind]
|
|
2677
2677
|
}));
|
|
@@ -2808,9 +2808,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2808
2808
|
const args = program.args;
|
|
2809
2809
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2810
2810
|
error.exitCode = 2;
|
|
2811
|
-
if (
|
|
2812
|
-
|
|
2813
|
-
Object.assign(new (0,
|
|
2811
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2812
|
+
_chunkGHLWDXUBjs.printJsonError.call(void 0,
|
|
2813
|
+
Object.assign(new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(error.message), {
|
|
2814
2814
|
exitCode: 2,
|
|
2815
2815
|
retryable: false
|
|
2816
2816
|
})
|
|
@@ -2854,14 +2854,14 @@ function parseQuery(args, resource) {
|
|
|
2854
2854
|
if (VALUE_FLAGS.has(flag)) {
|
|
2855
2855
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2856
2856
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2857
|
-
throw new (0,
|
|
2857
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2858
2858
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2859
2859
|
);
|
|
2860
2860
|
}
|
|
2861
2861
|
if (flag === "--sum") sums.push(value);
|
|
2862
2862
|
else {
|
|
2863
2863
|
if (values[flag] !== void 0) {
|
|
2864
|
-
throw new (0,
|
|
2864
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2865
2865
|
`${flag} may only be supplied once.`
|
|
2866
2866
|
);
|
|
2867
2867
|
}
|
|
@@ -2875,12 +2875,12 @@ function parseQuery(args, resource) {
|
|
|
2875
2875
|
}
|
|
2876
2876
|
if (arg.startsWith("-")) {
|
|
2877
2877
|
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.";
|
|
2878
|
-
throw new (0,
|
|
2878
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2879
2879
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2880
2880
|
);
|
|
2881
2881
|
}
|
|
2882
2882
|
if (runId !== void 0) {
|
|
2883
|
-
throw new (0,
|
|
2883
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2884
2884
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2885
2885
|
);
|
|
2886
2886
|
}
|
|
@@ -2888,7 +2888,7 @@ function parseQuery(args, resource) {
|
|
|
2888
2888
|
}
|
|
2889
2889
|
if (switches.has("--fields")) {
|
|
2890
2890
|
if (runId !== void 0) {
|
|
2891
|
-
throw new (0,
|
|
2891
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2892
2892
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2893
2893
|
);
|
|
2894
2894
|
}
|
|
@@ -2901,18 +2901,18 @@ function parseQuery(args, resource) {
|
|
|
2901
2901
|
)
|
|
2902
2902
|
];
|
|
2903
2903
|
if (incompatible.length) {
|
|
2904
|
-
throw new (0,
|
|
2904
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2905
2905
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2906
2906
|
);
|
|
2907
2907
|
}
|
|
2908
2908
|
}
|
|
2909
2909
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2910
|
-
throw new (0,
|
|
2910
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2911
2911
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2912
2912
|
);
|
|
2913
2913
|
}
|
|
2914
2914
|
if (sums.length && switches.has("--count")) {
|
|
2915
|
-
throw new (0,
|
|
2915
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2916
2916
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2917
2917
|
);
|
|
2918
2918
|
}
|
|
@@ -2920,7 +2920,7 @@ function parseQuery(args, resource) {
|
|
|
2920
2920
|
if (operation === "count") {
|
|
2921
2921
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2922
2922
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2923
|
-
throw new (0,
|
|
2923
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2924
2924
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2925
2925
|
);
|
|
2926
2926
|
}
|
|
@@ -2955,16 +2955,16 @@ function parseQuery(args, resource) {
|
|
|
2955
2955
|
];
|
|
2956
2956
|
}
|
|
2957
2957
|
}
|
|
2958
|
-
const request =
|
|
2958
|
+
const request = _chunkK3BIRBT3js.normalizeRunEventOperationRequest.call(void 0, body);
|
|
2959
2959
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
2960
2960
|
const backend = values["--runtime-backend"];
|
|
2961
2961
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
2962
|
-
throw new (0,
|
|
2962
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2963
2963
|
"--runtime-backend must be daytona or modal."
|
|
2964
2964
|
);
|
|
2965
2965
|
}
|
|
2966
2966
|
if (backend && !namespace) {
|
|
2967
|
-
throw new (0,
|
|
2967
|
+
throw new (0, _chunkK3BIRBT3js.RunEventQueryInputError)(
|
|
2968
2968
|
"--runtime-backend requires --runtime-namespace."
|
|
2969
2969
|
);
|
|
2970
2970
|
}
|
|
@@ -3012,12 +3012,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3012
3012
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3013
3013
|
const record3 = failure;
|
|
3014
3014
|
const status = record3.statusCode;
|
|
3015
|
-
const exitCode = error instanceof
|
|
3015
|
+
const exitCode = error instanceof _chunkK3BIRBT3js.RunEventQueryInputError || status === 400 || status === 422 || record3.code === "INVALID_RUNTIME_SELECTION" ? 2 : status === 401 || status === 403 || record3.code === "CONFIG_ERROR" || record3.code === "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED" ? 3 : status === 404 ? 4 : 5;
|
|
3016
3016
|
const diagnostic = Object.assign(failure, {
|
|
3017
3017
|
exitCode,
|
|
3018
3018
|
retryable: exitCode === 5
|
|
3019
3019
|
});
|
|
3020
|
-
if (
|
|
3020
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) _chunkGHLWDXUBjs.printJsonError.call(void 0, diagnostic);
|
|
3021
3021
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3022
3022
|
return exitCode;
|
|
3023
3023
|
}
|
|
@@ -3032,7 +3032,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3032
3032
|
...criteria
|
|
3033
3033
|
} = request;
|
|
3034
3034
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3035
|
-
const client = new (0,
|
|
3035
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
3036
3036
|
let result;
|
|
3037
3037
|
if (request.operation === "fields") {
|
|
3038
3038
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3098,13 +3098,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3098
3098
|
lines.push(`Next page: ${nextPage}`);
|
|
3099
3099
|
}
|
|
3100
3100
|
}
|
|
3101
|
-
|
|
3101
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
3102
3102
|
{
|
|
3103
3103
|
...result,
|
|
3104
3104
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3105
3105
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3106
3106
|
},
|
|
3107
|
-
{ json:
|
|
3107
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3108
3108
|
` }
|
|
3109
3109
|
);
|
|
3110
3110
|
return 0;
|
|
@@ -3634,19 +3634,21 @@ function stepExecution(step, runStatus) {
|
|
|
3634
3634
|
});
|
|
3635
3635
|
}
|
|
3636
3636
|
function buildRunOverview(status, fullStatus) {
|
|
3637
|
-
const
|
|
3637
|
+
const inspectedStatus = _optionalChain([fullStatus, 'optionalAccess', _49 => _49.package]) ? fullStatus : status;
|
|
3638
|
+
const pkg = inspectedStatus.package;
|
|
3638
3639
|
if (!pkg) {
|
|
3639
3640
|
throw new Error(
|
|
3640
3641
|
"This server did not return a run package; use runs get --full --json."
|
|
3641
3642
|
);
|
|
3642
3643
|
}
|
|
3643
3644
|
const outputs = Object.entries(pkg.outputs);
|
|
3644
|
-
const resultPackage = _optionalChain([fullStatus, 'optionalAccess',
|
|
3645
|
+
const resultPackage = _optionalChain([fullStatus, 'optionalAccess', _50 => _50.package, 'optionalAccess', _51 => _51.resultState]) ? fullStatus.package : _nullishCoalesce(status.package, () => ( pkg));
|
|
3646
|
+
const failedLogs = _nullishCoalesce(inspectedStatus.failedLogs, () => ( status.failedLogs));
|
|
3645
3647
|
const warnings = [..._nullishCoalesce(pkg.warnings, () => ( []))];
|
|
3646
3648
|
const { outcome: _outcome, ...run } = pkg.run;
|
|
3647
3649
|
const steps = pkg.steps.map((step) => {
|
|
3648
3650
|
const timing = record(step.timing);
|
|
3649
|
-
const started = _optionalChain([timing, 'optionalAccess',
|
|
3651
|
+
const started = _optionalChain([timing, 'optionalAccess', _52 => _52.startedAt]), finished = _optionalChain([timing, 'optionalAccess', _53 => _53.completedAt]);
|
|
3650
3652
|
const execution = stepExecution(step, pkg.run.status);
|
|
3651
3653
|
return {
|
|
3652
3654
|
id: step.id,
|
|
@@ -3684,9 +3686,9 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3684
3686
|
const output = record(candidate.output);
|
|
3685
3687
|
return output && (dataset.datasetId ? output.datasetId === dataset.datasetId : output.path === dataset.path);
|
|
3686
3688
|
});
|
|
3687
|
-
const stepOutput = record(_optionalChain([step, 'optionalAccess',
|
|
3688
|
-
const preview = _nullishCoalesce(record(_optionalChain([stepOutput, 'optionalAccess',
|
|
3689
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
3689
|
+
const stepOutput = record(_optionalChain([step, 'optionalAccess', _54 => _54.output]));
|
|
3690
|
+
const preview = _nullishCoalesce(record(_optionalChain([stepOutput, 'optionalAccess', _55 => _55.preview])), () => ( dataset.preview));
|
|
3691
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _56 => _56.rows])) ? preview.rows.map((row) => {
|
|
3690
3692
|
const fields2 = record(row);
|
|
3691
3693
|
return fields2 ? Object.fromEntries(
|
|
3692
3694
|
Object.entries(fields2).filter(([name]) => !name.startsWith("_")).map(([name, value]) => [
|
|
@@ -3695,27 +3697,27 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3695
3697
|
])
|
|
3696
3698
|
) : row;
|
|
3697
3699
|
}) : [];
|
|
3698
|
-
const total = typeof _optionalChain([preview, 'optionalAccess',
|
|
3700
|
+
const total = typeof _optionalChain([preview, 'optionalAccess', _57 => _57.totalRows]) === "number" ? preview.totalRows : dataset.rowCount;
|
|
3699
3701
|
const named = outputs.filter(
|
|
3700
3702
|
([, value]) => value.kind === "dataset" && (dataset.datasetId ? value.datasetId === dataset.datasetId : value.path === dataset.path)
|
|
3701
3703
|
);
|
|
3702
|
-
const summary = record(_nullishCoalesce(_optionalChain([record, 'call',
|
|
3703
|
-
const rowCounts = record(_optionalChain([summary, 'optionalAccess',
|
|
3704
|
-
const progress = record(_optionalChain([step, 'optionalAccess',
|
|
3705
|
-
const countConflict = typeof _optionalChain([rowCounts, 'optionalAccess',
|
|
3704
|
+
const summary = record(_nullishCoalesce(_optionalChain([record, 'call', _58 => _58(dataset), 'optionalAccess', _59 => _59.summary]), () => ( _optionalChain([stepOutput, 'optionalAccess', _60 => _60.summary]))));
|
|
3705
|
+
const rowCounts = record(_optionalChain([summary, 'optionalAccess', _61 => _61.rowCounts]));
|
|
3706
|
+
const progress = record(_optionalChain([step, 'optionalAccess', _62 => _62.progress]));
|
|
3707
|
+
const countConflict = typeof _optionalChain([rowCounts, 'optionalAccess', _63 => _63.persisted]) === "number" && typeof dataset.rowCount === "number" && rowCounts.persisted !== dataset.rowCount || typeof _optionalChain([rowCounts, 'optionalAccess', _64 => _64.failed]) === "number" && typeof _optionalChain([progress, 'optionalAccess', _65 => _65.failed]) === "number" && rowCounts.failed !== progress.failed;
|
|
3706
3708
|
if (countConflict)
|
|
3707
3709
|
warnings.push(
|
|
3708
3710
|
`Output ${dataset.path}: dataset summary and step/row counts disagree. Column execution counts may cover only a subset; inspect step progress and exported rows.`
|
|
3709
3711
|
);
|
|
3710
3712
|
return {
|
|
3711
3713
|
datasetId: dataset.datasetId,
|
|
3712
|
-
name: _nullishCoalesce(dataset.tableNamespace, () => ( (typeof _optionalChain([stepOutput, 'optionalAccess',
|
|
3713
|
-
stepId: _nullishCoalesce(_optionalChain([step, 'optionalAccess',
|
|
3714
|
+
name: _nullishCoalesce(dataset.tableNamespace, () => ( (typeof _optionalChain([stepOutput, 'optionalAccess', _66 => _66.tableNamespace]) === "string" ? stepOutput.tableNamespace : dataset.path))),
|
|
3715
|
+
stepId: _nullishCoalesce(_optionalChain([step, 'optionalAccess', _67 => _67.id]), () => ( _optionalChain([named, 'access', _68 => _68[0], 'optionalAccess', _69 => _69[1], 'access', _70 => _70.stepId]))),
|
|
3714
3716
|
rowCount: _nullishCoalesce(dataset.rowCount, () => ( null)),
|
|
3715
3717
|
...dataset.lifecycle ? { lifecycle: dataset.lifecycle } : {},
|
|
3716
3718
|
summary: datasetSummary(summary, countConflict),
|
|
3717
3719
|
storage: {
|
|
3718
|
-
..._optionalChain([dataset, 'access',
|
|
3720
|
+
..._optionalChain([dataset, 'access', _71 => _71.sqlQualifiedTableName, 'optionalAccess', _72 => _72.includes, 'call', _73 => _73(".")]) ? {
|
|
3719
3721
|
schema: dataset.sqlQualifiedTableName.slice(0, dataset.sqlQualifiedTableName.lastIndexOf(".")).replace(/^"(.*)"$/, "$1").replace(/""/g, '"')
|
|
3720
3722
|
} : {},
|
|
3721
3723
|
table: dataset.sqlTableName
|
|
@@ -3725,7 +3727,7 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3725
3727
|
availability: rows.length ? "available" : total === 0 ? "empty" : "unavailable",
|
|
3726
3728
|
returnedRows: rows.length,
|
|
3727
3729
|
totalRows: _nullishCoalesce(total, () => ( null)),
|
|
3728
|
-
partial: _optionalChain([preview, 'optionalAccess',
|
|
3730
|
+
partial: _optionalChain([preview, 'optionalAccess', _74 => _74.truncated]) === true || total === void 0 || rows.length < total,
|
|
3729
3731
|
rows
|
|
3730
3732
|
},
|
|
3731
3733
|
...dataset.exportUnavailable ? { exportUnavailable: dataset.exportUnavailable } : {},
|
|
@@ -3735,16 +3737,16 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3735
3737
|
return {
|
|
3736
3738
|
schemaVersion: pkg.schemaVersion,
|
|
3737
3739
|
kind: "run_overview",
|
|
3738
|
-
..._nullishCoalesce(
|
|
3740
|
+
..._nullishCoalesce(inspectedStatus.runStatus, () => ( pkg.runStatus)) ? { runStatus: _nullishCoalesce(inspectedStatus.runStatus, () => ( pkg.runStatus)) } : {},
|
|
3739
3741
|
run: {
|
|
3740
3742
|
...run,
|
|
3741
|
-
...
|
|
3743
|
+
...inspectedStatus.revisionId && !run.revisionId ? { revisionId: inspectedStatus.revisionId } : {}
|
|
3742
3744
|
},
|
|
3743
3745
|
steps,
|
|
3744
3746
|
failures: {
|
|
3745
3747
|
steps: steps.flatMap((step) => {
|
|
3746
3748
|
const progress = record(step.progress);
|
|
3747
|
-
const failedRows = typeof _optionalChain([progress, 'optionalAccess',
|
|
3749
|
+
const failedRows = typeof _optionalChain([progress, 'optionalAccess', _75 => _75.failed]) === "number" ? progress.failed : void 0;
|
|
3748
3750
|
return step.execution.kind === "failed" || step.error && step.execution.kind !== "stopped" || failedRows !== void 0 && failedRows > 0 ? [
|
|
3749
3751
|
{
|
|
3750
3752
|
stepId: step.id,
|
|
@@ -3758,19 +3760,19 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3758
3760
|
},
|
|
3759
3761
|
errorDetails: {
|
|
3760
3762
|
coverage: "unknown",
|
|
3761
|
-
reported: _nullishCoalesce(_nullishCoalesce(_optionalChain([record, 'call',
|
|
3763
|
+
reported: _nullishCoalesce(_nullishCoalesce(_optionalChain([record, 'call', _76 => _76(pkg), 'optionalAccess', _77 => _77.errors]), () => ( _optionalChain([record, 'call', _78 => _78(inspectedStatus), 'optionalAccess', _79 => _79.errors]))), () => ( [])),
|
|
3762
3764
|
...pkg.run.error ? { run: pkg.run.error } : {},
|
|
3763
3765
|
steps: steps.filter((step) => step.error).map((step) => ({ stepId: step.id, message: step.error })),
|
|
3764
|
-
..._optionalChain([pkg, 'access',
|
|
3766
|
+
..._optionalChain([pkg, 'access', _80 => _80.next, 'optionalAccess', _81 => _81.logs]) ? { getMore: "actions.getLogsCmd" } : {}
|
|
3765
3767
|
},
|
|
3766
|
-
rowOutcomes:
|
|
3768
|
+
rowOutcomes: _nullishCoalesce(inspectedStatus.rowOutcomes, () => ( pkg.rowOutcomes)),
|
|
3767
3769
|
warnings,
|
|
3768
|
-
...
|
|
3770
|
+
...failedLogs ? { failedLogs } : {},
|
|
3769
3771
|
datasets,
|
|
3770
3772
|
...Object.hasOwn(resultPackage, "result") ? { result: resultPackage.result } : {},
|
|
3771
3773
|
resultState: _nullishCoalesce(resultPackage.resultState, () => ( "unavailable")),
|
|
3772
3774
|
actions: {
|
|
3773
|
-
...lifecycleActions(
|
|
3775
|
+
...lifecycleActions(inspectedStatus, pkg.run.id, pkg.run.status),
|
|
3774
3776
|
...actions(pkg.next, {
|
|
3775
3777
|
inspect: "getRunCmd",
|
|
3776
3778
|
full: "getFullRunCmd",
|
|
@@ -3778,15 +3780,15 @@ function buildRunOverview(status, fullStatus) {
|
|
|
3778
3780
|
logs: "getLogsCmd"
|
|
3779
3781
|
}),
|
|
3780
3782
|
...receiptAction(pkg.run.id),
|
|
3781
|
-
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access',
|
|
3783
|
+
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access', _82 => _82.actions, 'optionalAccess', _83 => _83.exportCsv])) ? {
|
|
3782
3784
|
exportDatasetCmds: uniqueCatalog.flatMap((dataset) => {
|
|
3783
|
-
const command = _optionalChain([dataset, 'access',
|
|
3785
|
+
const command = _optionalChain([dataset, 'access', _84 => _84.actions, 'optionalAccess', _85 => _85.exportCsv, 'optionalAccess', _86 => _86.command]);
|
|
3784
3786
|
return command && !dataset.exportUnavailable ? [command] : [];
|
|
3785
3787
|
})
|
|
3786
3788
|
} : {},
|
|
3787
|
-
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access',
|
|
3789
|
+
...uniqueCatalog.some((dataset) => _optionalChain([dataset, 'access', _87 => _87.actions, 'optionalAccess', _88 => _88.query])) ? {
|
|
3788
3790
|
queryTableSqlCmds: uniqueCatalog.flatMap(
|
|
3789
|
-
(dataset) => _optionalChain([dataset, 'access',
|
|
3791
|
+
(dataset) => _optionalChain([dataset, 'access', _89 => _89.actions, 'optionalAccess', _90 => _90.query, 'optionalAccess', _91 => _91.command]) ? [dataset.actions.query.command] : []
|
|
3790
3792
|
)
|
|
3791
3793
|
} : {}
|
|
3792
3794
|
},
|
|
@@ -3807,7 +3809,7 @@ function receiptAction(id) {
|
|
|
3807
3809
|
};
|
|
3808
3810
|
}
|
|
3809
3811
|
function buildRunNavigation(status) {
|
|
3810
|
-
if (!_optionalChain([status, 'access',
|
|
3812
|
+
if (!_optionalChain([status, 'access', _92 => _92.package, 'optionalAccess', _93 => _93.run]) || !status.package.steps || !status.package.outputs) {
|
|
3811
3813
|
const id = status.runId;
|
|
3812
3814
|
return {
|
|
3813
3815
|
run: {
|
|
@@ -3846,7 +3848,7 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3846
3848
|
const { result } = outcome;
|
|
3847
3849
|
const raw = result;
|
|
3848
3850
|
const contract = record2(raw.authoringContract);
|
|
3849
|
-
const pipeline = record2(_nullishCoalesce(result.staticPipeline, () => ( _optionalChain([contract, 'optionalAccess',
|
|
3851
|
+
const pipeline = record2(_nullishCoalesce(result.staticPipeline, () => ( _optionalChain([contract, 'optionalAccess', _94 => _94.staticPipeline]))));
|
|
3850
3852
|
const { inputs, outputs, triggers, tools, ...recognized } = _nullishCoalesce(result.recognized, () => ( {}));
|
|
3851
3853
|
const issues = [..._nullishCoalesce(result.issues, () => ( []))];
|
|
3852
3854
|
for (const [severity, messages] of [
|
|
@@ -3855,7 +3857,7 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3855
3857
|
]) {
|
|
3856
3858
|
for (const message of messages) {
|
|
3857
3859
|
if (!issues.some(
|
|
3858
|
-
(issue) => issue.severity === severity && (issue.message.trim() === message.trim() || [issue.message.trim(), _optionalChain([issue, 'access',
|
|
3860
|
+
(issue) => issue.severity === severity && (issue.message.trim() === message.trim() || [issue.message.trim(), _optionalChain([issue, 'access', _95 => _95.hint, 'optionalAccess', _96 => _96.trim, 'call', _97 => _97()])].filter(Boolean).join(" ") === message.trim())
|
|
3859
3861
|
)) {
|
|
3860
3862
|
issues.push({ severity, message, code: "check_diagnostic" });
|
|
3861
3863
|
}
|
|
@@ -3897,18 +3899,18 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3897
3899
|
valid: result.valid,
|
|
3898
3900
|
...outcome.stage ? { stage: outcome.stage } : {},
|
|
3899
3901
|
issues,
|
|
3900
|
-
..._optionalChain([contract, 'optionalAccess',
|
|
3902
|
+
..._optionalChain([contract, 'optionalAccess', _98 => _98.inputSchema]) ? { inputSchema: contract.inputSchema } : {},
|
|
3901
3903
|
recognized: {
|
|
3902
3904
|
...recognized,
|
|
3903
3905
|
...inputs ? { rowInputs: inputs } : {},
|
|
3904
|
-
..._optionalChain([pipeline, 'optionalAccess',
|
|
3906
|
+
..._optionalChain([pipeline, 'optionalAccess', _99 => _99.returnFields]) ? { outputs: pipeline.returnFields } : outputs ? { outputs } : {},
|
|
3905
3907
|
tools: { names: _nullishCoalesce(tools, () => ( [])), coverage: "statically_recognized_only" }
|
|
3906
3908
|
},
|
|
3907
3909
|
..._nullishCoalesce(result.triggers, () => ( triggers)) ? { triggers: _nullishCoalesce(result.triggers, () => ( triggers)) } : {},
|
|
3908
3910
|
...result.runtimeLimit ? { runtimeLimit: result.runtimeLimit } : {},
|
|
3909
3911
|
...result.limits ? { limits: result.limits } : {},
|
|
3910
|
-
..._optionalChain([result, 'access',
|
|
3911
|
-
..._optionalChain([result, 'access',
|
|
3912
|
+
..._optionalChain([result, 'access', _100 => _100.featureFlags, 'optionalAccess', _101 => _101.length]) ? { featureFlags: result.featureFlags } : {},
|
|
3913
|
+
..._optionalChain([result, 'access', _102 => _102.toolGetterHints, 'optionalAccess', _103 => _103.length]) ? { toolGetterHints: result.toolGetterHints } : {},
|
|
3912
3914
|
...result.sourceHash ? { sourceHash: result.sourceHash } : {},
|
|
3913
3915
|
...result.artifactHash ? { artifactHash: result.artifactHash } : {},
|
|
3914
3916
|
...result.graphHash ? { graphHash: result.graphHash } : {},
|
|
@@ -3917,12 +3919,12 @@ function projectCheckedPlay(outcome, full = false) {
|
|
|
3917
3919
|
}
|
|
3918
3920
|
function checkedRunExample(plays, target) {
|
|
3919
3921
|
const play = plays.find((item) => item.exportName === "default");
|
|
3920
|
-
const schema = record2(_optionalChain([play, 'optionalAccess',
|
|
3921
|
-
if (!_optionalChain([play, 'optionalAccess',
|
|
3922
|
+
const schema = record2(_optionalChain([play, 'optionalAccess', _104 => _104.inputSchema]));
|
|
3923
|
+
if (!_optionalChain([play, 'optionalAccess', _105 => _105.valid]) || !schema) return void 0;
|
|
3922
3924
|
const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
3923
3925
|
const base = `deepline plays run --file ${quote(target)}`;
|
|
3924
3926
|
return {
|
|
3925
|
-
command: `${base}${
|
|
3927
|
+
command: `${base}${_chunkK3BIRBT3js.playInputExampleArgs.call(void 0, schema)} --json`,
|
|
3926
3928
|
note: "Runs the local file without publishing and may spend credits. Supply the indicated file; JSON input must match inputSchema. Keep stderr separate from JSON stdout."
|
|
3927
3929
|
};
|
|
3928
3930
|
}
|
|
@@ -4618,7 +4620,7 @@ function packagedCsvPathForPlay(csvPath) {
|
|
|
4618
4620
|
return portablePath.startsWith(".") ? portablePath : `./${portablePath}`;
|
|
4619
4621
|
}
|
|
4620
4622
|
function getterNamesFromTool(tool, kind) {
|
|
4621
|
-
const usageGuidance = isRecord(_optionalChain([tool, 'optionalAccess',
|
|
4623
|
+
const usageGuidance = isRecord(_optionalChain([tool, 'optionalAccess', _106 => _106.usageGuidance])) ? tool.usageGuidance : {};
|
|
4622
4624
|
const resultGuidance = isRecord(usageGuidance.toolExecutionResult) ? usageGuidance.toolExecutionResult : isRecord(usageGuidance.tool_execution_result) ? usageGuidance.tool_execution_result : {};
|
|
4623
4625
|
const key = kind === "list" ? "extractedLists" : "extractedValues";
|
|
4624
4626
|
const snakeKey = kind === "list" ? "extracted_lists" : "extracted_values";
|
|
@@ -4641,7 +4643,7 @@ function listRowCandidateKeysFromTool(tool) {
|
|
|
4641
4643
|
const keys = /* @__PURE__ */ new Set();
|
|
4642
4644
|
for (const paths of Object.values(targetGettersFromTool(tool))) {
|
|
4643
4645
|
for (const path of paths) {
|
|
4644
|
-
const key = _optionalChain([path, 'access',
|
|
4646
|
+
const key = _optionalChain([path, 'access', _107 => _107.replace, 'call', _108 => _108(/\[(?:\*|\d+)\]/g, ""), 'access', _109 => _109.split, 'call', _110 => _110(/[.[\]]/, 1), 'access', _111 => _111[0], 'optionalAccess', _112 => _112.trim, 'call', _113 => _113()]);
|
|
4645
4647
|
if (key) keys.add(key);
|
|
4646
4648
|
}
|
|
4647
4649
|
}
|
|
@@ -4721,7 +4723,7 @@ function renderFinderPlayResultType(input) {
|
|
|
4721
4723
|
function generatedFinderPlayResultTypes(input) {
|
|
4722
4724
|
return ["email_finder", "phone_finder"].flatMap((finder) => {
|
|
4723
4725
|
const stage = finderStage(input.options, finder);
|
|
4724
|
-
if (_optionalChain([stage, 'optionalAccess',
|
|
4726
|
+
if (_optionalChain([stage, 'optionalAccess', _114 => _114.kind]) !== "play") return [];
|
|
4725
4727
|
const typeDefinition = renderFinderPlayResultType({
|
|
4726
4728
|
finder,
|
|
4727
4729
|
play: input.finderPlays[finder]
|
|
@@ -4795,8 +4797,8 @@ ${indent.slice(2)}}`;
|
|
|
4795
4797
|
}
|
|
4796
4798
|
function generateSourceProviderInputObject(input) {
|
|
4797
4799
|
const { tool, indent, label, entity } = input;
|
|
4798
|
-
const properties = inputPropertyNames(_optionalChain([tool, 'optionalAccess',
|
|
4799
|
-
const details = schemaFieldDetails(_optionalChain([tool, 'optionalAccess',
|
|
4800
|
+
const properties = inputPropertyNames(_optionalChain([tool, 'optionalAccess', _115 => _115.inputSchema]));
|
|
4801
|
+
const details = schemaFieldDetails(_optionalChain([tool, 'optionalAccess', _116 => _116.inputSchema]));
|
|
4800
4802
|
const required = details.required;
|
|
4801
4803
|
const includeOptional = properties.length === 0 ? ["query", "title", "domain", "limit"] : properties.filter(
|
|
4802
4804
|
(field) => [
|
|
@@ -4870,7 +4872,7 @@ ${lines.join("\n")}
|
|
|
4870
4872
|
${indent.slice(2)}}`;
|
|
4871
4873
|
}
|
|
4872
4874
|
function requiredPlayInputFields(play) {
|
|
4873
|
-
const schema = _optionalChain([play, 'optionalAccess',
|
|
4875
|
+
const schema = _optionalChain([play, 'optionalAccess', _117 => _117.inputSchema]);
|
|
4874
4876
|
if (!isRecord(schema)) return [];
|
|
4875
4877
|
if (Array.isArray(schema.required)) {
|
|
4876
4878
|
return schema.required.filter(
|
|
@@ -4891,10 +4893,10 @@ function sourcePlayRef(options) {
|
|
|
4891
4893
|
return options.from.kind === "play" ? options.from.value : null;
|
|
4892
4894
|
}
|
|
4893
4895
|
function stagePlayRef(stage) {
|
|
4894
|
-
return _optionalChain([stage, 'optionalAccess',
|
|
4896
|
+
return _optionalChain([stage, 'optionalAccess', _118 => _118.kind]) === "play" ? stage.value : null;
|
|
4895
4897
|
}
|
|
4896
4898
|
function stageProviders(stage) {
|
|
4897
|
-
return _optionalChain([stage, 'optionalAccess',
|
|
4899
|
+
return _optionalChain([stage, 'optionalAccess', _119 => _119.kind]) === "providers" ? stage.values : [];
|
|
4898
4900
|
}
|
|
4899
4901
|
function finderStage(options, finder) {
|
|
4900
4902
|
return finder === "email_finder" ? options.email : options.phone;
|
|
@@ -4934,12 +4936,12 @@ function fieldsFromSchemaDetails(input) {
|
|
|
4934
4936
|
];
|
|
4935
4937
|
}
|
|
4936
4938
|
function schemaFieldsForStage(stage, input) {
|
|
4937
|
-
switch (_optionalChain([stage, 'optionalAccess',
|
|
4939
|
+
switch (_optionalChain([stage, 'optionalAccess', _120 => _120.kind])) {
|
|
4938
4940
|
case void 0:
|
|
4939
4941
|
return [];
|
|
4940
4942
|
case "play":
|
|
4941
4943
|
return fieldsFromSchemaDetails({
|
|
4942
|
-
details: schemaFieldDetails(_optionalChain([input, 'access',
|
|
4944
|
+
details: schemaFieldDetails(_optionalChain([input, 'access', _121 => _121.play, 'optionalAccess', _122 => _122.inputSchema])),
|
|
4943
4945
|
fallbackFields: input.fallbackFields
|
|
4944
4946
|
});
|
|
4945
4947
|
case "providers":
|
|
@@ -4964,7 +4966,7 @@ function sourceRowTypeDefinition(input) {
|
|
|
4964
4966
|
comment: "Candidate source row keys from described list getters; confirm the actual provider keys with source_*.extractedLists.*.keys before mapping."
|
|
4965
4967
|
});
|
|
4966
4968
|
case "play": {
|
|
4967
|
-
const details = schemaFieldDetails(_optionalChain([input, 'access',
|
|
4969
|
+
const details = schemaFieldDetails(_optionalChain([input, 'access', _123 => _123.sourcePlay, 'optionalAccess', _124 => _124.outputSchema]));
|
|
4968
4970
|
return renderPartialRowType({
|
|
4969
4971
|
typeName: input.sourceTypeName,
|
|
4970
4972
|
fields: [...details.required, ...details.optional].sort(),
|
|
@@ -4990,7 +4992,7 @@ function contactBridgeRowTypeDefinition(input) {
|
|
|
4990
4992
|
typeName: "ContactSourceRow",
|
|
4991
4993
|
fields: [
|
|
4992
4994
|
.../* @__PURE__ */ new Set([
|
|
4993
|
-
...inputPropertyNames(_optionalChain([input, 'access',
|
|
4995
|
+
...inputPropertyNames(_optionalChain([input, 'access', _125 => _125.peoplePlay, 'optionalAccess', _126 => _126.outputSchema])),
|
|
4994
4996
|
...emailFields,
|
|
4995
4997
|
...phoneFields
|
|
4996
4998
|
])
|
|
@@ -5027,7 +5029,7 @@ function validateBootstrapRoutes(input) {
|
|
|
5027
5029
|
);
|
|
5028
5030
|
}
|
|
5029
5031
|
}
|
|
5030
|
-
if (_optionalChain([input, 'access',
|
|
5032
|
+
if (_optionalChain([input, 'access', _127 => _127.options, 'access', _128 => _128.people, 'optionalAccess', _129 => _129.kind]) === "providers") {
|
|
5031
5033
|
throw new PlayBootstrapValidationError(
|
|
5032
5034
|
"Company-to-people bootstrap only accepts --people play:<play-ref> for now. Providers are too task-specific; choose or create a people play so the generated file can show the mapping contract."
|
|
5033
5035
|
);
|
|
@@ -5066,13 +5068,13 @@ function staticPipelineSubsteps(pipeline) {
|
|
|
5066
5068
|
];
|
|
5067
5069
|
}
|
|
5068
5070
|
function playUsesMapBackedRuntime(play) {
|
|
5069
|
-
const pipeline = _optionalChain([play, 'optionalAccess',
|
|
5071
|
+
const pipeline = _optionalChain([play, 'optionalAccess', _130 => _130.staticPipeline]);
|
|
5070
5072
|
if (!isRecord(pipeline)) return false;
|
|
5071
5073
|
if (stringValue(pipeline.tableNamespace)) return true;
|
|
5072
5074
|
return staticPipelineSubsteps(pipeline).some((substep) => {
|
|
5073
5075
|
if (stringValue(substep.type) === "map") return true;
|
|
5074
5076
|
return playUsesMapBackedRuntime({
|
|
5075
|
-
name: _nullishCoalesce(_optionalChain([play, 'optionalAccess',
|
|
5077
|
+
name: _nullishCoalesce(_optionalChain([play, 'optionalAccess', _131 => _131.name]), () => ( "child")),
|
|
5076
5078
|
aliases: [],
|
|
5077
5079
|
runCommand: "",
|
|
5078
5080
|
examples: [],
|
|
@@ -5082,7 +5084,7 @@ function playUsesMapBackedRuntime(play) {
|
|
|
5082
5084
|
}
|
|
5083
5085
|
function assertComposablePlayRoute(input) {
|
|
5084
5086
|
if (!input.playRef || !playUsesMapBackedRuntime(input.play)) return;
|
|
5085
|
-
const runCommand = _optionalChain([input, 'access',
|
|
5087
|
+
const runCommand = _optionalChain([input, 'access', _132 => _132.play, 'optionalAccess', _133 => _133.runCommand, 'optionalAccess', _134 => _134.trim, 'call', _135 => _135()]) || `deepline plays run ${input.playRef} --input '{...}'`;
|
|
5086
5088
|
throw new PlayBootstrapValidationError(
|
|
5087
5089
|
`Cannot use ${input.stageLabel} play:${input.playRef} in plays bootstrap composition: the selected play is dataset-backed/direct-run-only. Child plays that use ctx.dataset() own durable table state and must be run directly, exported, or validated as their own play instead of wrapped with ctx.runPlay. Run it directly first: ${runCommand}`
|
|
5088
5090
|
);
|
|
@@ -5124,7 +5126,7 @@ function generatePlaySourceRowsBlock(input) {
|
|
|
5124
5126
|
sourcePlay: input.sourcePlay
|
|
5125
5127
|
})) {
|
|
5126
5128
|
const sourcePlay = input.sourcePlay;
|
|
5127
|
-
const runCommand = _optionalChain([sourcePlay, 'optionalAccess',
|
|
5129
|
+
const runCommand = _optionalChain([sourcePlay, 'optionalAccess', _136 => _136.runCommand, 'optionalAccess', _137 => _137.trim, 'call', _138 => _138()]) || `deepline plays run ${input.source.value} --input '{...}'`;
|
|
5128
5130
|
return `// Source play ${input.source.value} is dataset-backed/direct-run-only, so this generated play is stage 2.
|
|
5129
5131
|
// Stage 1:
|
|
5130
5132
|
// ${runCommand}
|
|
@@ -5136,7 +5138,7 @@ function generatePlaySourceRowsBlock(input) {
|
|
|
5136
5138
|
const ${input.collection}: ${input.collectionType}[] = await sourceDataset.peek(limit);`;
|
|
5137
5139
|
}
|
|
5138
5140
|
const playInput = generatePlayInputObject({
|
|
5139
|
-
schema: _optionalChain([input, 'access',
|
|
5141
|
+
schema: _optionalChain([input, 'access', _139 => _139.sourcePlay, 'optionalAccess', _140 => _140.inputSchema]),
|
|
5140
5142
|
indent: " ",
|
|
5141
5143
|
label: input.source.value,
|
|
5142
5144
|
entity: input.entity
|
|
@@ -5226,7 +5228,7 @@ function generateSourceSeedBlock(input) {
|
|
|
5226
5228
|
const peoplePlayRef = stagePlayRef(input.options.people);
|
|
5227
5229
|
if (!peoplePlayRef) return sourceRows;
|
|
5228
5230
|
const peopleInput = generateCompanyInputObjectFromSchema(
|
|
5229
|
-
_optionalChain([input, 'access',
|
|
5231
|
+
_optionalChain([input, 'access', _141 => _141.peoplePlay, 'optionalAccess', _142 => _142.inputSchema]),
|
|
5230
5232
|
" ",
|
|
5231
5233
|
peoplePlayRef,
|
|
5232
5234
|
["domain", "company_name"]
|
|
@@ -5268,11 +5270,11 @@ function generateFinderPlayStep(input) {
|
|
|
5268
5270
|
const outputField = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER[input.finder];
|
|
5269
5271
|
const resultTypeName = finderResultTypeName(input.finder);
|
|
5270
5272
|
const returnsObjectWithField = playOutputHasField(
|
|
5271
|
-
_optionalChain([input, 'access',
|
|
5273
|
+
_optionalChain([input, 'access', _143 => _143.play, 'optionalAccess', _144 => _144.outputSchema]),
|
|
5272
5274
|
outputField
|
|
5273
5275
|
);
|
|
5274
5276
|
const payload = generateContactInputObjectFromSchema(
|
|
5275
|
-
_optionalChain([input, 'access',
|
|
5277
|
+
_optionalChain([input, 'access', _145 => _145.play, 'optionalAccess', _146 => _146.inputSchema]),
|
|
5276
5278
|
" ",
|
|
5277
5279
|
input.stage.value
|
|
5278
5280
|
);
|
|
@@ -5292,7 +5294,7 @@ function generateFinderPlayStep(input) {
|
|
|
5292
5294
|
}
|
|
5293
5295
|
function generateFinderProviderResolver(input) {
|
|
5294
5296
|
const payload = generateContactInputObjectFromSchema(
|
|
5295
|
-
_optionalChain([input, 'access',
|
|
5297
|
+
_optionalChain([input, 'access', _147 => _147.tool, 'optionalAccess', _148 => _148.inputSchema]),
|
|
5296
5298
|
" ",
|
|
5297
5299
|
input.provider
|
|
5298
5300
|
);
|
|
@@ -5540,7 +5542,7 @@ async function runPlayBootstrap(args) {
|
|
|
5540
5542
|
return runMonitorBootstrap(args);
|
|
5541
5543
|
}
|
|
5542
5544
|
const options = parsePlayBootstrapOptions(args);
|
|
5543
|
-
const client = new (0,
|
|
5545
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
5544
5546
|
const contracts = await loadBootstrapContracts(client, options);
|
|
5545
5547
|
const csvContext = loadCsvContext(options.from);
|
|
5546
5548
|
const source = generateBootstrapPlaySource({
|
|
@@ -5695,7 +5697,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5695
5697
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
5696
5698
|
);
|
|
5697
5699
|
}
|
|
5698
|
-
const response = await new (0,
|
|
5700
|
+
const response = await new (0, _chunkK3BIRBT3js.DeeplineClient)().runs.getReceipts(runId, {
|
|
5699
5701
|
keys
|
|
5700
5702
|
});
|
|
5701
5703
|
const failed = response.receipts.filter(
|
|
@@ -5707,7 +5709,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5707
5709
|
JSON.stringify(response, null, 2) + "\n",
|
|
5708
5710
|
{ flag: "wx", mode: 384 }
|
|
5709
5711
|
);
|
|
5710
|
-
|
|
5712
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
5711
5713
|
{
|
|
5712
5714
|
runId,
|
|
5713
5715
|
out: options.out,
|
|
@@ -5717,7 +5719,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5717
5719
|
{ json: true }
|
|
5718
5720
|
);
|
|
5719
5721
|
} else {
|
|
5720
|
-
|
|
5722
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
5721
5723
|
}
|
|
5722
5724
|
if (failed)
|
|
5723
5725
|
process.exitCode = response.receipts.some(
|
|
@@ -5756,7 +5758,7 @@ includes nextCommand when another page is available.
|
|
|
5756
5758
|
{ exitCode: 2 }
|
|
5757
5759
|
);
|
|
5758
5760
|
}
|
|
5759
|
-
const page = await new (0,
|
|
5761
|
+
const page = await new (0, _chunkK3BIRBT3js.DeeplineClient)().runs.children(parentRunId, {
|
|
5760
5762
|
launchKey: options.launchKey,
|
|
5761
5763
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
5762
5764
|
limit
|
|
@@ -5772,7 +5774,7 @@ includes nextCommand when another page is available.
|
|
|
5772
5774
|
String(limit),
|
|
5773
5775
|
"--json"
|
|
5774
5776
|
].join(" ") : null;
|
|
5775
|
-
|
|
5777
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
5776
5778
|
{
|
|
5777
5779
|
parentRunId,
|
|
5778
5780
|
launchKey: options.launchKey,
|
|
@@ -5808,7 +5810,7 @@ async function handleRunsHistory(options) {
|
|
|
5808
5810
|
throw new Error("--limit must be a positive integer.");
|
|
5809
5811
|
}
|
|
5810
5812
|
}
|
|
5811
|
-
const page = await new (0,
|
|
5813
|
+
const page = await new (0, _chunkK3BIRBT3js.DeeplineClient)().runs.history({
|
|
5812
5814
|
cursor: options.cursor,
|
|
5813
5815
|
orgId: options.org,
|
|
5814
5816
|
search: options.search,
|
|
@@ -5824,7 +5826,7 @@ async function handleRunsHistory(options) {
|
|
|
5824
5826
|
);
|
|
5825
5827
|
}
|
|
5826
5828
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
5827
|
-
|
|
5829
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
5828
5830
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
5829
5831
|
options.json ? { json: true } : {}
|
|
5830
5832
|
);
|
|
@@ -5852,7 +5854,7 @@ function registerRunHistoryCommand(runs) {
|
|
|
5852
5854
|
var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
|
|
5853
5855
|
var HASH_SUFFIX_LENGTH = 10;
|
|
5854
5856
|
function normalizePlayColumnName(id, preserveAuthoredPrefix = true) {
|
|
5855
|
-
const prefix = preserveAuthoredPrefix ? _nullishCoalesce(_optionalChain([id, 'access',
|
|
5857
|
+
const prefix = preserveAuthoredPrefix ? _nullishCoalesce(_optionalChain([id, 'access', _149 => _149.trim, 'call', _150 => _150(), 'access', _151 => _151.match, 'call', _152 => _152(/^_+/), 'optionalAccess', _153 => _153[0]]), () => ( "")) : "";
|
|
5856
5858
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
5857
5859
|
const safe = `${prefix}${normalized || "column"}`;
|
|
5858
5860
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
@@ -5914,8 +5916,8 @@ function formatHitShare(count2, total) {
|
|
|
5914
5916
|
|
|
5915
5917
|
// src/cli/run-hit-counts.ts
|
|
5916
5918
|
function runTableHitCounts(tableNamespace, summary) {
|
|
5917
|
-
const rows = _nullishCoalesce(_optionalChain([summary, 'optionalAccess',
|
|
5918
|
-
const filled = _optionalChain([summary, 'optionalAccess',
|
|
5919
|
+
const rows = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _154 => _154.stats, 'optionalAccess', _155 => _155.total]), () => ( 0));
|
|
5920
|
+
const filled = _optionalChain([summary, 'optionalAccess', _156 => _156.filled]);
|
|
5919
5921
|
if (!filled || rows <= 0) return null;
|
|
5920
5922
|
const legColumns = new Set(
|
|
5921
5923
|
Object.values(_nullishCoalesce(summary.cascades, () => ( {}))).flatMap((cascade) => cascade.legs)
|
|
@@ -6100,7 +6102,7 @@ function projectRunDatasetCell(value) {
|
|
|
6100
6102
|
const logicalValue = parseSerializedDatasetValue(value);
|
|
6101
6103
|
if (logicalValue === null || logicalValue === void 0) return logicalValue;
|
|
6102
6104
|
if (typeof logicalValue === "object") {
|
|
6103
|
-
return
|
|
6105
|
+
return _chunkGHLWDXUBjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
|
|
6104
6106
|
}
|
|
6105
6107
|
return logicalValue;
|
|
6106
6108
|
}
|
|
@@ -6201,7 +6203,7 @@ function mergeCanonicalRowsInfo(left, right) {
|
|
|
6201
6203
|
...currentTable ? { currentTable: true } : {},
|
|
6202
6204
|
...exportUnavailableReason ? {
|
|
6203
6205
|
exportUnavailableReason,
|
|
6204
|
-
..._optionalChain([unavailableSource, 'optionalAccess',
|
|
6206
|
+
..._optionalChain([unavailableSource, 'optionalAccess', _157 => _157.exportUnavailableMessage]) ? {
|
|
6205
6207
|
exportUnavailableMessage: unavailableSource.exportUnavailableMessage
|
|
6206
6208
|
} : {}
|
|
6207
6209
|
} : {}
|
|
@@ -6373,7 +6375,7 @@ function totalRowsForDataset(result, datasetPath) {
|
|
|
6373
6375
|
const metadata = isRecord2(result._metadata) ? result._metadata : null;
|
|
6374
6376
|
const parentPath = datasetPath.split(".").slice(0, -1).join(".");
|
|
6375
6377
|
const parent = parentPath ? valueAtPath({ result }, parentPath) : result;
|
|
6376
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess',
|
|
6378
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _158 => _158.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _159 => _159.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _160 => _160.count]))), () => ( (isRecord2(parent) ? _nullishCoalesce(_nullishCoalesce(parent.totalRows, () => ( parent.rowCount)), () => ( parent.count)) : void 0))), () => ( result.totalRows)), () => ( result.rowCount)), () => ( result.count));
|
|
6377
6379
|
}
|
|
6378
6380
|
function rowArray(value) {
|
|
6379
6381
|
if (!Array.isArray(value)) {
|
|
@@ -6435,8 +6437,8 @@ function canonicalRowsInfoFromCandidate(input) {
|
|
|
6435
6437
|
};
|
|
6436
6438
|
}
|
|
6437
6439
|
if (isPackagedDatasetOutput(candidate.value)) {
|
|
6438
|
-
const rawRows = _nullishCoalesce(rowArray(_optionalChain([candidate, 'access',
|
|
6439
|
-
const totalRows2 = _nullishCoalesce(_nullishCoalesce(readNumber(candidate.value.rowCount), () => ( readNumber(_optionalChain([candidate, 'access',
|
|
6440
|
+
const rawRows = _nullishCoalesce(rowArray(_optionalChain([candidate, 'access', _161 => _161.value, 'access', _162 => _162.preview, 'optionalAccess', _163 => _163.rows])), () => ( []));
|
|
6441
|
+
const totalRows2 = _nullishCoalesce(_nullishCoalesce(readNumber(candidate.value.rowCount), () => ( readNumber(_optionalChain([candidate, 'access', _164 => _164.value, 'access', _165 => _165.preview, 'optionalAccess', _166 => _166.totalRows])))), () => ( rawRows.length));
|
|
6440
6442
|
const explicitColumns = Array.isArray(candidate.value.columns) ? candidate.value.columns.filter(
|
|
6441
6443
|
(column) => typeof column === "string"
|
|
6442
6444
|
) : [];
|
|
@@ -6532,12 +6534,12 @@ function collectDatasetCandidates(input) {
|
|
|
6532
6534
|
}
|
|
6533
6535
|
function collectCanonicalRowsInfos(statusOrResult) {
|
|
6534
6536
|
const root = isRecord2(statusOrResult) ? statusOrResult : null;
|
|
6535
|
-
const result = isRecord2(_optionalChain([root, 'optionalAccess',
|
|
6537
|
+
const result = isRecord2(_optionalChain([root, 'optionalAccess', _167 => _167.result])) ? root.result : root;
|
|
6536
6538
|
if (!result) {
|
|
6537
6539
|
return [];
|
|
6538
6540
|
}
|
|
6539
6541
|
const metadata = isRecord2(result._metadata) ? result._metadata : null;
|
|
6540
|
-
const totalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess',
|
|
6542
|
+
const totalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _168 => _168.totalRows]), () => ( _optionalChain([metadata, 'optionalAccess', _169 => _169.rowCount]))), () => ( _optionalChain([metadata, 'optionalAccess', _170 => _170.count])));
|
|
6541
6543
|
const candidates = [
|
|
6542
6544
|
{
|
|
6543
6545
|
source: "result.contacts",
|
|
@@ -6562,7 +6564,7 @@ function collectCanonicalRowsInfos(statusOrResult) {
|
|
|
6562
6564
|
];
|
|
6563
6565
|
if (isRecord2(result.output)) {
|
|
6564
6566
|
const outputMetadata = isRecord2(result.output._metadata) ? result.output._metadata : null;
|
|
6565
|
-
const outputTotalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([outputMetadata, 'optionalAccess',
|
|
6567
|
+
const outputTotalFromMetadata = _nullishCoalesce(_nullishCoalesce(_optionalChain([outputMetadata, 'optionalAccess', _171 => _171.totalRows]), () => ( _optionalChain([outputMetadata, 'optionalAccess', _172 => _172.rowCount]))), () => ( _optionalChain([outputMetadata, 'optionalAccess', _173 => _173.count])));
|
|
6566
6568
|
candidates.push(
|
|
6567
6569
|
{
|
|
6568
6570
|
source: "result.output.contacts",
|
|
@@ -6651,14 +6653,14 @@ function collectPackagedStepDatasetCandidates(statusOrResult) {
|
|
|
6651
6653
|
{
|
|
6652
6654
|
source,
|
|
6653
6655
|
value: step.output,
|
|
6654
|
-
total: _nullishCoalesce(_nullishCoalesce(step.output.rowCount, () => ( _optionalChain([step, 'access',
|
|
6656
|
+
total: _nullishCoalesce(_nullishCoalesce(step.output.rowCount, () => ( _optionalChain([step, 'access', _174 => _174.output, 'access', _175 => _175.preview, 'optionalAccess', _176 => _176.totalRows]))), () => ( void 0))
|
|
6655
6657
|
}
|
|
6656
6658
|
] : [];
|
|
6657
6659
|
});
|
|
6658
6660
|
}
|
|
6659
6661
|
function collectSerializedDatasetRowsInfos(statusOrResult) {
|
|
6660
6662
|
const root = isRecord2(statusOrResult) ? statusOrResult : null;
|
|
6661
|
-
const result = root && "result" in root ? isRecord2(root.result) ? root.result : null : _optionalChain([root, 'optionalAccess',
|
|
6663
|
+
const result = root && "result" in root ? isRecord2(root.result) ? root.result : null : _optionalChain([root, 'optionalAccess', _177 => _177.kind]) === "play_run" || isRecord2(_optionalChain([root, 'optionalAccess', _178 => _178.package])) ? null : root;
|
|
6662
6664
|
const candidates = [];
|
|
6663
6665
|
if (result) {
|
|
6664
6666
|
collectDatasetCandidates({
|
|
@@ -6771,7 +6773,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
|
|
|
6771
6773
|
* a Run returns its sole returned Dataset, or its sole recovered Dataset.
|
|
6772
6774
|
*/
|
|
6773
6775
|
choose(path) {
|
|
6774
|
-
const requested = _optionalChain([path, 'optionalAccess',
|
|
6776
|
+
const requested = _optionalChain([path, 'optionalAccess', _179 => _179.trim, 'call', _180 => _180()]);
|
|
6775
6777
|
if (requested) {
|
|
6776
6778
|
const info = uniqueDatasetMatch(
|
|
6777
6779
|
this.#available.filter((dataset) => dataset.matches(requested)).map((dataset) => dataset.info()),
|
|
@@ -6779,7 +6781,7 @@ var RunDatasetCatalog = class _RunDatasetCatalog {
|
|
|
6779
6781
|
);
|
|
6780
6782
|
return info ? RunDataset.from({
|
|
6781
6783
|
...info,
|
|
6782
|
-
source: _optionalChain([info, 'access',
|
|
6784
|
+
source: _optionalChain([info, 'access', _181 => _181.sourceAliases, 'optionalAccess', _182 => _182.includes, 'call', _183 => _183(requested)]) ? requested : info.source
|
|
6783
6785
|
}) : null;
|
|
6784
6786
|
}
|
|
6785
6787
|
if (this.#returned.length === 1) return this.#returned[0];
|
|
@@ -6822,7 +6824,7 @@ var RunDataset = class _RunDataset {
|
|
|
6822
6824
|
return this.#info.exportUnavailableMessage;
|
|
6823
6825
|
}
|
|
6824
6826
|
matches(path) {
|
|
6825
|
-
return this.source === path || _optionalChain([this, 'access',
|
|
6827
|
+
return this.source === path || _optionalChain([this, 'access', _184 => _184.#info, 'access', _185 => _185.sourceAliases, 'optionalAccess', _186 => _186.includes, 'call', _187 => _187(path)]) === true || this.#info.name === path || this.datasetId === path || this.tableNamespace === path || _optionalChain([this, 'access', _188 => _188.#info, 'access', _189 => _189.recoveredReturnPaths, 'optionalAccess', _190 => _190.includes, 'call', _191 => _191(path)]) === true;
|
|
6826
6828
|
}
|
|
6827
6829
|
/** Return a new Handle when its preview has been replaced by fetched rows. */
|
|
6828
6830
|
withRows(info) {
|
|
@@ -6861,7 +6863,7 @@ var RunDataset = class _RunDataset {
|
|
|
6861
6863
|
}
|
|
6862
6864
|
};
|
|
6863
6865
|
function resolveDatasetByName(available, datasetPath) {
|
|
6864
|
-
return _nullishCoalesce(_optionalChain([RunDatasetCatalog, 'access',
|
|
6866
|
+
return _nullishCoalesce(_optionalChain([RunDatasetCatalog, 'access', _192 => _192.from, 'call', _193 => _193({ runPackage: null, datasets: available }), 'access', _194 => _194.choose, 'call', _195 => _195(datasetPath), 'optionalAccess', _196 => _196.info, 'call', _197 => _197()]), () => ( null));
|
|
6865
6867
|
}
|
|
6866
6868
|
function uniqueDatasetMatch(infos, selector) {
|
|
6867
6869
|
const matches = distinctCanonicalRowsInfos(infos);
|
|
@@ -6885,11 +6887,11 @@ function uniqueDatasetMatch(infos, selector) {
|
|
|
6885
6887
|
function packageForDatasetSelection(runPackage) {
|
|
6886
6888
|
const root = recordValue(runPackage);
|
|
6887
6889
|
const nested = recordValue(root.package);
|
|
6888
|
-
if (_optionalChain([nested, 'optionalAccess',
|
|
6890
|
+
if (_optionalChain([nested, 'optionalAccess', _198 => _198.kind]) === "play_run") return nested;
|
|
6889
6891
|
return root.kind === "play_run" ? root : null;
|
|
6890
6892
|
}
|
|
6891
6893
|
function withReturnedDatasetAliases(runPackage, available) {
|
|
6892
|
-
const outputs = recordValue(_optionalChain([packageForDatasetSelection, 'call',
|
|
6894
|
+
const outputs = recordValue(_optionalChain([packageForDatasetSelection, 'call', _199 => _199(runPackage), 'optionalAccess', _200 => _200.outputs]));
|
|
6893
6895
|
if (Object.keys(outputs).length === 0) return available;
|
|
6894
6896
|
const expanded = [...available];
|
|
6895
6897
|
for (const outputValue of Object.values(outputs)) {
|
|
@@ -6903,7 +6905,7 @@ function withReturnedDatasetAliases(runPackage, available) {
|
|
|
6903
6905
|
return expanded;
|
|
6904
6906
|
}
|
|
6905
6907
|
function returnedRunDatasets(runPackage, available) {
|
|
6906
|
-
const rawOutputs = _optionalChain([packageForDatasetSelection, 'call',
|
|
6908
|
+
const rawOutputs = _optionalChain([packageForDatasetSelection, 'call', _201 => _201(runPackage), 'optionalAccess', _202 => _202.outputs]);
|
|
6907
6909
|
const outputs = recordValue(rawOutputs);
|
|
6908
6910
|
if (rawOutputs && typeof rawOutputs === "object" && !Array.isArray(rawOutputs)) {
|
|
6909
6911
|
const selected = [];
|
|
@@ -6922,7 +6924,7 @@ function returnedRunDatasets(runPackage, available) {
|
|
|
6922
6924
|
return distinctCanonicalRowsInfos(
|
|
6923
6925
|
available.filter(
|
|
6924
6926
|
(info) => info.returned || [info.source, ..._nullishCoalesce(info.sourceAliases, () => ( []))].some(
|
|
6925
|
-
(path) => _optionalChain([path, 'optionalAccess',
|
|
6927
|
+
(path) => _optionalChain([path, 'optionalAccess', _203 => _203.startsWith, 'call', _204 => _204("result.")])
|
|
6926
6928
|
) && !info.recovered
|
|
6927
6929
|
)
|
|
6928
6930
|
);
|
|
@@ -6952,7 +6954,7 @@ function resolveReturnedDataset(output, available) {
|
|
|
6952
6954
|
}
|
|
6953
6955
|
const legacy = path ? uniqueDatasetMatch(
|
|
6954
6956
|
available.filter(
|
|
6955
|
-
(info) => info.source === path || _optionalChain([info, 'access',
|
|
6957
|
+
(info) => info.source === path || _optionalChain([info, 'access', _205 => _205.sourceAliases, 'optionalAccess', _206 => _206.includes, 'call', _207 => _207(path)])
|
|
6956
6958
|
),
|
|
6957
6959
|
path
|
|
6958
6960
|
) : null;
|
|
@@ -6982,7 +6984,7 @@ var RUN_PLAY_SIGNATURE_HINT = "Deepline hint: ctx.runPlay uses a stable key plus
|
|
|
6982
6984
|
var MAP_BACKED_CHILD_HINT = "Deepline hint: dataset-backed child plays own durable table state and cannot be called from another play. Run that play directly, export its dataset, then pass the CSV to the next play.";
|
|
6983
6985
|
function sourceLineForError(sourceCode, error) {
|
|
6984
6986
|
const match = error.match(/:(\d+):(\d+)\s/);
|
|
6985
|
-
const lineNumber = _optionalChain([match, 'optionalAccess',
|
|
6987
|
+
const lineNumber = _optionalChain([match, 'optionalAccess', _208 => _208[1]]) ? Number(match[1]) : NaN;
|
|
6986
6988
|
if (!Number.isInteger(lineNumber) || lineNumber < 1) return "";
|
|
6987
6989
|
return _nullishCoalesce(sourceCode.split(/\r?\n/)[lineNumber - 1], () => ( ""));
|
|
6988
6990
|
}
|
|
@@ -7906,7 +7908,7 @@ async function discoverDeploymentFiles(input) {
|
|
|
7906
7908
|
}
|
|
7907
7909
|
}
|
|
7908
7910
|
const rootStat = await _promises.stat.call(void 0, input.projectRoot).catch(() => null);
|
|
7909
|
-
if (!_optionalChain([rootStat, 'optionalAccess',
|
|
7911
|
+
if (!_optionalChain([rootStat, 'optionalAccess', _209 => _209.isDirectory, 'call', _210 => _210()])) {
|
|
7910
7912
|
throw new DeeplineManifestError(
|
|
7911
7913
|
`Project root directory does not exist in the repo: ${input.projectRoot}`
|
|
7912
7914
|
);
|
|
@@ -8008,33 +8010,33 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
8008
8010
|
if (parsed.kind !== "org") {
|
|
8009
8011
|
return null;
|
|
8010
8012
|
}
|
|
8011
|
-
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess',
|
|
8013
|
+
const normalizedOwnerSlug = _nullishCoalesce(_optionalChain([ownerSlug, 'optionalAccess', _211 => _211.trim, 'call', _212 => _212(), 'access', _213 => _213.toLowerCase, 'call', _214 => _214()]), () => ( ""));
|
|
8012
8014
|
return normalizedOwnerSlug && parsed.ownerSlug.trim().toLowerCase() === normalizedOwnerSlug ? parsed.name : null;
|
|
8013
8015
|
}
|
|
8014
8016
|
|
|
8015
8017
|
// ../plays/deploy/run-deployment.ts
|
|
8016
8018
|
var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
|
|
8017
8019
|
function isRunPlayReceiver(node) {
|
|
8018
|
-
return
|
|
8020
|
+
return _chunkXSEMQ4IIjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
|
|
8019
8021
|
}
|
|
8020
8022
|
function stringLiteralValue(node) {
|
|
8021
|
-
if (!
|
|
8023
|
+
if (!_chunkXSEMQ4IIjs.isAstNode.call(void 0, node)) return null;
|
|
8022
8024
|
if (node.type === "Literal" && typeof node.value === "string") {
|
|
8023
8025
|
return node.value;
|
|
8024
8026
|
}
|
|
8025
8027
|
if (node.type === "TemplateLiteral" && Array.isArray(node.expressions) && node.expressions.length === 0 && Array.isArray(node.quasis) && node.quasis.length === 1) {
|
|
8026
|
-
const cooked = _optionalChain([node, 'access',
|
|
8028
|
+
const cooked = _optionalChain([node, 'access', _215 => _215.quasis, 'access', _216 => _216[0], 'access', _217 => _217.value, 'optionalAccess', _218 => _218.cooked]);
|
|
8027
8029
|
return typeof cooked === "string" ? cooked : null;
|
|
8028
8030
|
}
|
|
8029
8031
|
return null;
|
|
8030
8032
|
}
|
|
8031
8033
|
async function extractRunPlayStringTargets(sourceCode) {
|
|
8032
|
-
const program =
|
|
8034
|
+
const program = _chunkXSEMQ4IIjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
|
|
8033
8035
|
if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
|
|
8034
8036
|
const targets = /* @__PURE__ */ new Set();
|
|
8035
8037
|
const visit = (node) => {
|
|
8036
8038
|
const callee = node.callee;
|
|
8037
|
-
if (node.type === "CallExpression" &&
|
|
8039
|
+
if (node.type === "CallExpression" && _chunkXSEMQ4IIjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkXSEMQ4IIjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
|
|
8038
8040
|
const playRef = stringLiteralValue(node.arguments[1]);
|
|
8039
8041
|
const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
|
|
8040
8042
|
if (ownedName) targets.add(ownedName);
|
|
@@ -8042,7 +8044,7 @@ async function extractRunPlayStringTargets(sourceCode) {
|
|
|
8042
8044
|
for (const [key, value] of Object.entries(node)) {
|
|
8043
8045
|
if (key === "loc") continue;
|
|
8044
8046
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
8045
|
-
if (
|
|
8047
|
+
if (_chunkXSEMQ4IIjs.isAstNode.call(void 0, child)) visit(child);
|
|
8046
8048
|
}
|
|
8047
8049
|
}
|
|
8048
8050
|
};
|
|
@@ -8147,7 +8149,7 @@ async function runDeployment(params, hooks) {
|
|
|
8147
8149
|
`Deployment ${params.deploymentId} has no linked repository and no target directory was given.`
|
|
8148
8150
|
);
|
|
8149
8151
|
}
|
|
8150
|
-
const checkRunName = _optionalChain([state, 'access',
|
|
8152
|
+
const checkRunName = _optionalChain([state, 'access', _219 => _219.checkRunName, 'optionalAccess', _220 => _220.trim, 'call', _221 => _221()]) || void 0;
|
|
8151
8153
|
let mergedPullRequestNumber = null;
|
|
8152
8154
|
let promoted = false;
|
|
8153
8155
|
const setStatus = (input) => client.setStatus({
|
|
@@ -8218,7 +8220,7 @@ async function runDeployment(params, hooks) {
|
|
|
8218
8220
|
finalStatus,
|
|
8219
8221
|
outcomes,
|
|
8220
8222
|
...monitorRunResult(),
|
|
8221
|
-
checkRunId: _optionalChain([checkRun, 'optionalAccess',
|
|
8223
|
+
checkRunId: _optionalChain([checkRun, 'optionalAccess', _222 => _222.checkRunId])
|
|
8222
8224
|
};
|
|
8223
8225
|
};
|
|
8224
8226
|
await _promises.mkdir.call(void 0, hooks.workRoot, { recursive: true });
|
|
@@ -8244,7 +8246,7 @@ async function runDeployment(params, hooks) {
|
|
|
8244
8246
|
const source = await hooks.openSource({ client, deployment });
|
|
8245
8247
|
if (deployment.isProduction) {
|
|
8246
8248
|
try {
|
|
8247
|
-
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access',
|
|
8249
|
+
mergedPullRequestNumber = await _asyncNullishCoalesce(await _optionalChain([source, 'access', _223 => _223.findMergedPullRequest, 'optionalCall', _224 => _224()]), async () => ( null));
|
|
8248
8250
|
} catch (error) {
|
|
8249
8251
|
console.warn("[deploy-worker] merged PR lookup failed", {
|
|
8250
8252
|
deploymentId: params.deploymentId,
|
|
@@ -8314,15 +8316,15 @@ async function runDeployment(params, hooks) {
|
|
|
8314
8316
|
return finishFailed({
|
|
8315
8317
|
error: input.error,
|
|
8316
8318
|
outcomes: input.outcomes,
|
|
8317
|
-
checkRunId: _optionalChain([checkRun2, 'optionalAccess',
|
|
8319
|
+
checkRunId: _optionalChain([checkRun2, 'optionalAccess', _225 => _225.checkRunId])
|
|
8318
8320
|
});
|
|
8319
8321
|
};
|
|
8320
8322
|
postFailureCheck = async (summary) => await _asyncOptionalChain([(await postCheckOrNull({
|
|
8321
8323
|
conclusion: "failure",
|
|
8322
8324
|
title: "Deploy failed",
|
|
8323
8325
|
summary
|
|
8324
|
-
})), 'optionalAccess', async
|
|
8325
|
-
const deploymentBranch = _optionalChain([deployment, 'access',
|
|
8326
|
+
})), 'optionalAccess', async _226 => _226.checkRunId]);
|
|
8327
|
+
const deploymentBranch = _optionalChain([deployment, 'access', _227 => _227.ref, 'optionalAccess', _228 => _228.startsWith, 'call', _229 => _229("refs/heads/")]) ? deployment.ref.slice("refs/heads/".length) : _nullishCoalesce(_optionalChain([project, 'optionalAccess', _230 => _230.productionBranch]), () => ( null));
|
|
8326
8328
|
const supersedeIfHeadMoved = async () => {
|
|
8327
8329
|
if (!deployment.isProduction || !source.branchHead || !deploymentBranch) {
|
|
8328
8330
|
return null;
|
|
@@ -8336,7 +8338,7 @@ async function runDeployment(params, hooks) {
|
|
|
8336
8338
|
});
|
|
8337
8339
|
await setStatus({
|
|
8338
8340
|
status: "superseded",
|
|
8339
|
-
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess',
|
|
8341
|
+
error: `Branch ${deploymentBranch} is now at ${_nullishCoalesce(_optionalChain([head, 'optionalAccess', _231 => _231.slice, 'call', _232 => _232(0, 12)]), () => ( "<deleted>"))}; this deployment's commit is no longer the head.`,
|
|
8340
8342
|
buildSeconds: buildSeconds(),
|
|
8341
8343
|
...monitorOutcomes.length > 0 ? { results: monitorResults() } : {},
|
|
8342
8344
|
...head ? { observedHeadSha: head } : {}
|
|
@@ -8452,7 +8454,7 @@ async function runDeployment(params, hooks) {
|
|
|
8452
8454
|
failPlay(file, repoRelativeFile, message);
|
|
8453
8455
|
continue;
|
|
8454
8456
|
}
|
|
8455
|
-
const name = _nullishCoalesce(_optionalChain([result, 'access',
|
|
8457
|
+
const name = _nullishCoalesce(_optionalChain([result, 'access', _233 => _233.playName, 'optionalAccess', _234 => _234.trim, 'call', _235 => _235()]), () => ( ""));
|
|
8456
8458
|
if (!name) {
|
|
8457
8459
|
failPlay(
|
|
8458
8460
|
file,
|
|
@@ -8471,7 +8473,7 @@ async function runDeployment(params, hooks) {
|
|
|
8471
8473
|
continue;
|
|
8472
8474
|
}
|
|
8473
8475
|
seenNames.set(name, file);
|
|
8474
|
-
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access',
|
|
8476
|
+
const disallowed = (_nullishCoalesce(_optionalChain([result, 'access', _236 => _236.artifact, 'access', _237 => _237.importPolicy, 'optionalAccess', _238 => _238.packages]), () => ( []))).map(
|
|
8475
8477
|
(pkg) => typeof pkg === "string" ? pkg : _nullishCoalesce(pkg.name, () => ( ""))
|
|
8476
8478
|
).filter((pkgName) => pkgName && pkgName !== "deepline");
|
|
8477
8479
|
if (disallowed.length > 0) {
|
|
@@ -8555,7 +8557,7 @@ async function runDeployment(params, hooks) {
|
|
|
8555
8557
|
const conflicts = [];
|
|
8556
8558
|
for (const play of ordered) {
|
|
8557
8559
|
const owner = stateByName.get(play.name);
|
|
8558
|
-
if (!project || !_optionalChain([owner, 'optionalAccess',
|
|
8560
|
+
if (!project || !_optionalChain([owner, 'optionalAccess', _239 => _239.playProjectRepo]) || owner.playProjectRepo === _optionalChain([project, 'optionalAccess', _240 => _240.repoFullName]) || owner.playProjectDisabled) {
|
|
8559
8561
|
continue;
|
|
8560
8562
|
}
|
|
8561
8563
|
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.`;
|
|
@@ -8578,16 +8580,16 @@ async function runDeployment(params, hooks) {
|
|
|
8578
8580
|
}
|
|
8579
8581
|
const playByName = new Map(ordered.map((play) => [play.name, play]));
|
|
8580
8582
|
const sdkUpdated = (name) => {
|
|
8581
|
-
const artifact = _optionalChain([playByName, 'access',
|
|
8582
|
-
const live = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
8583
|
+
const artifact = _optionalChain([playByName, 'access', _241 => _241.get, 'call', _242 => _242(name), 'optionalAccess', _243 => _243.result, 'access', _244 => _244.artifact]);
|
|
8584
|
+
const live = _nullishCoalesce(_optionalChain([stateByName, 'access', _245 => _245.get, 'call', _246 => _246(name), 'optionalAccess', _247 => _247.liveRevision]), () => ( null));
|
|
8583
8585
|
return artifact && isSdkUpdated(live, artifact) ? { sdkUpdated: true } : {};
|
|
8584
8586
|
};
|
|
8585
8587
|
const outcomes = [];
|
|
8586
8588
|
const toRegister = [];
|
|
8587
8589
|
const toPromote = [];
|
|
8588
8590
|
const takeoverWarning = (state2) => {
|
|
8589
|
-
const owner = _optionalChain([state2, 'optionalAccess',
|
|
8590
|
-
if (!owner || owner === _optionalChain([project, 'optionalAccess',
|
|
8591
|
+
const owner = _optionalChain([state2, 'optionalAccess', _248 => _248.playProjectRepo]);
|
|
8592
|
+
if (!owner || owner === _optionalChain([project, 'optionalAccess', _249 => _249.repoFullName])) return void 0;
|
|
8591
8593
|
if (!project) {
|
|
8592
8594
|
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.`;
|
|
8593
8595
|
}
|
|
@@ -8599,8 +8601,8 @@ async function runDeployment(params, hooks) {
|
|
|
8599
8601
|
const artifact = play.result.artifact;
|
|
8600
8602
|
const importsOtherPlays = (_nullishCoalesce(play.result.importedPlayDependencies, () => ( []))).length > 0;
|
|
8601
8603
|
const matches = (revision) => !importsOtherPlays && carriesArtifact(revision, artifact);
|
|
8602
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8603
|
-
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess',
|
|
8604
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _250 => _250.liveRevision]), () => ( null)))) {
|
|
8605
|
+
if (deployment.isProduction && project && (_optionalChain([playState, 'optionalAccess', _251 => _251.playProjectId]) !== project.id || _optionalChain([playState, 'optionalAccess', _252 => _252.driftFromGit]))) {
|
|
8604
8606
|
toPromote.push({
|
|
8605
8607
|
name: play.name,
|
|
8606
8608
|
revisionId: playState.liveRevision.revisionId
|
|
@@ -8611,12 +8613,12 @@ async function runDeployment(params, hooks) {
|
|
|
8611
8613
|
name: play.name,
|
|
8612
8614
|
file: play.file,
|
|
8613
8615
|
status: "unchanged",
|
|
8614
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8616
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _253 => _253.liveRevision, 'optionalAccess', _254 => _254.version]), () => ( void 0)),
|
|
8615
8617
|
...warning ? { warning } : {}
|
|
8616
8618
|
});
|
|
8617
8619
|
continue;
|
|
8618
8620
|
}
|
|
8619
|
-
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8621
|
+
if (matches(_nullishCoalesce(_optionalChain([playState, 'optionalAccess', _255 => _255.workingRevision]), () => ( null)))) {
|
|
8620
8622
|
if (deployment.isProduction) {
|
|
8621
8623
|
toPromote.push({
|
|
8622
8624
|
name: play.name,
|
|
@@ -8627,7 +8629,7 @@ async function runDeployment(params, hooks) {
|
|
|
8627
8629
|
name: play.name,
|
|
8628
8630
|
file: play.file,
|
|
8629
8631
|
status: "registered",
|
|
8630
|
-
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess',
|
|
8632
|
+
version: _nullishCoalesce(_optionalChain([playState, 'optionalAccess', _256 => _256.workingRevision, 'optionalAccess', _257 => _257.version]), () => ( void 0)),
|
|
8631
8633
|
...sdkUpdated(play.name),
|
|
8632
8634
|
...warning ? { warning } : {}
|
|
8633
8635
|
});
|
|
@@ -8754,11 +8756,11 @@ async function runDeployment(params, hooks) {
|
|
|
8754
8756
|
const promotion = await client.promote(toPromote);
|
|
8755
8757
|
promoted = true;
|
|
8756
8758
|
for (const outcome of promotion.outcomes) {
|
|
8757
|
-
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access',
|
|
8759
|
+
const previousVersion = _nullishCoalesce(_optionalChain([stateByName, 'access', _258 => _258.get, 'call', _259 => _259(outcome.name), 'optionalAccess', _260 => _260.liveRevision, 'optionalAccess', _261 => _261.version]), () => ( null));
|
|
8758
8760
|
const warning = takeoverWarning(stateByName.get(outcome.name));
|
|
8759
8761
|
outcomes.push({
|
|
8760
8762
|
name: outcome.name,
|
|
8761
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
8763
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _262 => _262.get, 'call', _263 => _263(outcome.name), 'optionalAccess', _264 => _264.file]), () => ( outcome.name)),
|
|
8762
8764
|
status: outcome.status === "promoted" ? "promoted" : "failed",
|
|
8763
8765
|
version: outcome.version,
|
|
8764
8766
|
...outcome.status === "promoted" && typeof previousVersion === "number" && previousVersion !== outcome.version ? { previousVersion } : {},
|
|
@@ -8770,7 +8772,7 @@ async function runDeployment(params, hooks) {
|
|
|
8770
8772
|
} catch (error) {
|
|
8771
8773
|
if (revokedFinalStatus(error)) throw error;
|
|
8772
8774
|
const body = error instanceof DeployApiError ? error.body : null;
|
|
8773
|
-
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
8775
|
+
const errorText = _nullishCoalesce(_optionalChain([body, 'optionalAccess', _265 => _265.error]), () => ( (error instanceof Error ? error.message : String(error))));
|
|
8774
8776
|
if (/PLAY_DEPLOYMENT_NOT_ACTIVE/.test(errorText)) {
|
|
8775
8777
|
console.info("[deploy-worker] cancelled at promote", {
|
|
8776
8778
|
deploymentId: params.deploymentId
|
|
@@ -8794,9 +8796,9 @@ async function runDeployment(params, hooks) {
|
|
|
8794
8796
|
error: errorText,
|
|
8795
8797
|
outcomes: [
|
|
8796
8798
|
...outcomes,
|
|
8797
|
-
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess',
|
|
8799
|
+
...(_nullishCoalesce(_optionalChain([body, 'optionalAccess', _266 => _266.outcomes]), () => ( toPromote))).map((entry) => ({
|
|
8798
8800
|
name: entry.name,
|
|
8799
|
-
file: _nullishCoalesce(_optionalChain([playByName, 'access',
|
|
8801
|
+
file: _nullishCoalesce(_optionalChain([playByName, 'access', _267 => _267.get, 'call', _268 => _268(entry.name), 'optionalAccess', _269 => _269.file]), () => ( entry.name)),
|
|
8800
8802
|
status: "failed",
|
|
8801
8803
|
error: _nullishCoalesce(("error" in entry ? entry.error : void 0), () => ( errorText))
|
|
8802
8804
|
}))
|
|
@@ -8840,7 +8842,7 @@ async function runDeployment(params, hooks) {
|
|
|
8840
8842
|
});
|
|
8841
8843
|
let checkRunId;
|
|
8842
8844
|
try {
|
|
8843
|
-
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall',
|
|
8845
|
+
checkRunId = await _optionalChain([postFailureCheck, 'optionalCall', _270 => _270(message.slice(0, 2e3))]);
|
|
8844
8846
|
} catch (checkError) {
|
|
8845
8847
|
const revokedAtCheck = revokedFinalStatus(checkError);
|
|
8846
8848
|
if (revokedAtCheck) {
|
|
@@ -8908,7 +8910,7 @@ function renderOutcome(outcome) {
|
|
|
8908
8910
|
function printResult2(input) {
|
|
8909
8911
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
8910
8912
|
if (failed) process.exitCode = 1;
|
|
8911
|
-
|
|
8913
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
8912
8914
|
{
|
|
8913
8915
|
deployment: { ...input.deployment, status: input.status },
|
|
8914
8916
|
plays: input.outcomes,
|
|
@@ -8933,7 +8935,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8933
8935
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
8934
8936
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
8935
8937
|
});
|
|
8936
|
-
const { http, config } =
|
|
8938
|
+
const { http, config } = _chunkGHLWDXUBjs.getAuthedHttpClient.call(void 0, );
|
|
8937
8939
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
8938
8940
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
8939
8941
|
deliveryId,
|
|
@@ -8960,14 +8962,14 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8960
8962
|
},
|
|
8961
8963
|
{
|
|
8962
8964
|
bundle: bundleDeployPlayFile,
|
|
8963
|
-
fetchImpl:
|
|
8965
|
+
fetchImpl: _chunkMCPHK7AFjs.fetchWithDeploymentProtection,
|
|
8964
8966
|
// The plays are already here: "opening" the source is naming it.
|
|
8965
8967
|
openSource: async () => ({
|
|
8966
8968
|
open: async () => ({ repoRoot: root })
|
|
8967
8969
|
}),
|
|
8968
8970
|
target: {
|
|
8969
8971
|
rootDirectory: "",
|
|
8970
|
-
manifestPath: _nullishCoalesce(_optionalChain([options, 'access',
|
|
8972
|
+
manifestPath: _nullishCoalesce(_optionalChain([options, 'access', _271 => _271.manifest, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]), () => ( ""))
|
|
8971
8973
|
},
|
|
8972
8974
|
workRoot
|
|
8973
8975
|
}
|
|
@@ -9127,7 +9129,7 @@ async function preflightRunIdFile(path) {
|
|
|
9127
9129
|
`Cannot write --run-id-file destination ${destination}: ${error instanceof Error ? error.message : String(error)}`
|
|
9128
9130
|
);
|
|
9129
9131
|
} finally {
|
|
9130
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
9132
|
+
await _optionalChain([handle, 'optionalAccess', _274 => _274.close, 'call', _275 => _275()]);
|
|
9131
9133
|
await removeRunIdTempFile(tempPath);
|
|
9132
9134
|
}
|
|
9133
9135
|
return destination;
|
|
@@ -9181,9 +9183,9 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
9181
9183
|
} catch (error) {
|
|
9182
9184
|
if (error.code !== "EEXIST") throw error;
|
|
9183
9185
|
const raced = await readRunIdFile(destination);
|
|
9184
|
-
if (_optionalChain([raced, 'optionalAccess',
|
|
9186
|
+
if (_optionalChain([raced, 'optionalAccess', _276 => _276.runId]) !== runId) {
|
|
9185
9187
|
throw new Error(
|
|
9186
|
-
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess',
|
|
9188
|
+
`--run-id-file destination already records run ${_nullishCoalesce(_optionalChain([raced, 'optionalAccess', _277 => _277.runId]), () => ( "<invalid>"))}; refusing to replace it with ${runId}: ${destination}`
|
|
9187
9189
|
);
|
|
9188
9190
|
}
|
|
9189
9191
|
if (!options.launchConfirmed || raced.launchConfirmed) return;
|
|
@@ -9199,7 +9201,7 @@ async function writePlayRunIdFile(destination, runId, options = {}) {
|
|
|
9199
9201
|
}
|
|
9200
9202
|
}
|
|
9201
9203
|
} finally {
|
|
9202
|
-
await _optionalChain([handle, 'optionalAccess',
|
|
9204
|
+
await _optionalChain([handle, 'optionalAccess', _278 => _278.close, 'call', _279 => _279()]);
|
|
9203
9205
|
await removeRunIdTempFile(tempPath);
|
|
9204
9206
|
}
|
|
9205
9207
|
}
|
|
@@ -9268,10 +9270,10 @@ function playReferenceMatchTokens(value) {
|
|
|
9268
9270
|
return normalizePlayReferenceForMatch(value).split("-").filter((token) => token.length > 1 && token !== "to" && token !== "and");
|
|
9269
9271
|
}
|
|
9270
9272
|
function playSuggestionReference(play) {
|
|
9271
|
-
if (_optionalChain([play, 'access',
|
|
9273
|
+
if (_optionalChain([play, 'access', _280 => _280.reference, 'optionalAccess', _281 => _281.trim, 'call', _282 => _282()])) {
|
|
9272
9274
|
return play.reference.trim();
|
|
9273
9275
|
}
|
|
9274
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
9276
|
+
const ownerSlug = _optionalChain([play, 'access', _283 => _283.ownerSlug, 'optionalAccess', _284 => _284.trim, 'call', _285 => _285()]);
|
|
9275
9277
|
return ownerSlug ? `${ownerSlug}/${play.name}` : play.name;
|
|
9276
9278
|
}
|
|
9277
9279
|
function scorePlayReferenceSuggestion(requested, play) {
|
|
@@ -9287,8 +9289,8 @@ function scorePlayReferenceSuggestion(requested, play) {
|
|
|
9287
9289
|
const reference = playSuggestionReference(play);
|
|
9288
9290
|
const referenceNorm = normalizePlayReferenceForMatch(reference);
|
|
9289
9291
|
const nameNorm = normalizePlayReferenceForMatch(play.name);
|
|
9290
|
-
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access',
|
|
9291
|
-
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access',
|
|
9292
|
+
const candidateNamespace = reference.includes("/") ? _optionalChain([reference, 'access', _286 => _286.split, 'call', _287 => _287("/"), 'access', _288 => _288[0], 'optionalAccess', _289 => _289.toLowerCase, 'call', _290 => _290()]) : null;
|
|
9293
|
+
const requestedNamespace = _nullishCoalesce(_optionalChain([parsed, 'access', _291 => _291.ownerSlug, 'optionalAccess', _292 => _292.toLowerCase, 'call', _293 => _293()]), () => ( null));
|
|
9292
9294
|
const aliases = (_nullishCoalesce(play.aliases, () => ( []))).map(normalizePlayReferenceForMatch);
|
|
9293
9295
|
const searchable = [referenceNorm, nameNorm, ...aliases].filter(Boolean);
|
|
9294
9296
|
const requestedTokens = playReferenceMatchTokens(requestedName);
|
|
@@ -9410,16 +9412,16 @@ async function buildPlayReferenceNotFoundError(input) {
|
|
|
9410
9412
|
suggestions = [];
|
|
9411
9413
|
}
|
|
9412
9414
|
const sourceError = input.sourceError instanceof _chunk7P5AA3SNjs.DeeplineError ? input.sourceError : null;
|
|
9413
|
-
const code = _optionalChain([sourceError, 'optionalAccess',
|
|
9415
|
+
const code = _optionalChain([sourceError, 'optionalAccess', _294 => _294.code]) && sourceError.code !== "API_ERROR" ? sourceError.code : "PLAY_NOT_FOUND";
|
|
9414
9416
|
return new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
9415
9417
|
buildPlayReferenceNotFoundMessage({
|
|
9416
9418
|
requested: input.target,
|
|
9417
9419
|
command: input.command,
|
|
9418
9420
|
suggestions
|
|
9419
9421
|
}),
|
|
9420
|
-
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess',
|
|
9422
|
+
_nullishCoalesce(_optionalChain([sourceError, 'optionalAccess', _295 => _295.statusCode]), () => ( 404)),
|
|
9421
9423
|
code,
|
|
9422
|
-
_optionalChain([sourceError, 'optionalAccess',
|
|
9424
|
+
_optionalChain([sourceError, 'optionalAccess', _296 => _296.details])
|
|
9423
9425
|
);
|
|
9424
9426
|
}
|
|
9425
9427
|
async function isMissingRunPlayReferenceError(input) {
|
|
@@ -9471,7 +9473,7 @@ function formatPlayReference(play) {
|
|
|
9471
9473
|
if (play.reference) {
|
|
9472
9474
|
return play.reference;
|
|
9473
9475
|
}
|
|
9474
|
-
const ownerSlug = _optionalChain([play, 'access',
|
|
9476
|
+
const ownerSlug = _optionalChain([play, 'access', _297 => _297.ownerSlug, 'optionalAccess', _298 => _298.trim, 'call', _299 => _299()]) || "org";
|
|
9475
9477
|
return `${ownerSlug}/${play.name}`;
|
|
9476
9478
|
}
|
|
9477
9479
|
function formatPlayListReference(play) {
|
|
@@ -9501,7 +9503,7 @@ function materializeRemotePlaySource(input) {
|
|
|
9501
9503
|
return null;
|
|
9502
9504
|
}
|
|
9503
9505
|
const entrySource = input.source.files[input.source.entryFile];
|
|
9504
|
-
if (!_optionalChain([entrySource, 'optionalAccess',
|
|
9506
|
+
if (!_optionalChain([entrySource, 'optionalAccess', _300 => _300.trim, 'call', _301 => _301()])) {
|
|
9505
9507
|
return null;
|
|
9506
9508
|
}
|
|
9507
9509
|
const files = Object.entries(input.source.files);
|
|
@@ -9585,7 +9587,7 @@ function buildMissingDefinePlayError(filePath) {
|
|
|
9585
9587
|
);
|
|
9586
9588
|
}
|
|
9587
9589
|
function extractPlayName(code, filePath) {
|
|
9588
|
-
const definedPlayName =
|
|
9590
|
+
const definedPlayName = _chunkXSEMQ4IIjs.extractDefinedPlayName.call(void 0, code);
|
|
9589
9591
|
if (definedPlayName) {
|
|
9590
9592
|
return definedPlayName;
|
|
9591
9593
|
}
|
|
@@ -9860,11 +9862,11 @@ function formatUnresolvedPackagedFiles(filePath, unresolvedFileReferences) {
|
|
|
9860
9862
|
const details = unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
9861
9863
|
return `Failed to package local ctx.csv(...) files in ${filePath}: ${details}`;
|
|
9862
9864
|
}
|
|
9863
|
-
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName =
|
|
9865
|
+
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkXSEMQ4IIjs.PLAY_DEFAULT_EXPORT) {
|
|
9864
9866
|
const playBundler = await loadPlayBundler();
|
|
9865
9867
|
const nodes = /* @__PURE__ */ new Map();
|
|
9866
9868
|
const visiting = /* @__PURE__ */ new Set();
|
|
9867
|
-
const artifactKind =
|
|
9869
|
+
const artifactKind = _chunkXSEMQ4IIjs.resolveEnabledExecutionProfile.call(void 0, profile).artifactKind;
|
|
9868
9870
|
const rootPath = normalizePlayPath(entryFile);
|
|
9869
9871
|
const visit = async (filePath) => {
|
|
9870
9872
|
const absolutePath = normalizePlayPath(filePath);
|
|
@@ -9881,7 +9883,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
|
|
|
9881
9883
|
try {
|
|
9882
9884
|
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
9883
9885
|
target: artifactKind,
|
|
9884
|
-
...absolutePath === rootPath && entryExportName !==
|
|
9886
|
+
...absolutePath === rootPath && entryExportName !== _chunkXSEMQ4IIjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
9885
9887
|
});
|
|
9886
9888
|
if (bundleResult.success === false) {
|
|
9887
9889
|
throw new Error(
|
|
@@ -9940,7 +9942,7 @@ async function compileBundledPlayGraphManifests(client, graph) {
|
|
|
9940
9942
|
const child = graph.nodes.get(
|
|
9941
9943
|
normalizePlayPath(dependency.filePath)
|
|
9942
9944
|
);
|
|
9943
|
-
if (!_optionalChain([child, 'optionalAccess',
|
|
9945
|
+
if (!_optionalChain([child, 'optionalAccess', _302 => _302.compilerManifest])) {
|
|
9944
9946
|
throw new Error(
|
|
9945
9947
|
`Missing compiler manifest for imported dependency ${dependency.filePath}.`
|
|
9946
9948
|
);
|
|
@@ -9974,7 +9976,7 @@ function missingPlayDescriptionMessage(node) {
|
|
|
9974
9976
|
].join(" ");
|
|
9975
9977
|
}
|
|
9976
9978
|
function collectMissingPlayDescriptionErrors(graph) {
|
|
9977
|
-
return [...graph.nodes.values()].filter((node) => !_optionalChain([node, 'access',
|
|
9979
|
+
return [...graph.nodes.values()].filter((node) => !_optionalChain([node, 'access', _303 => _303.playDescription, 'optionalAccess', _304 => _304.trim, 'call', _305 => _305()])).map(missingPlayDescriptionMessage);
|
|
9978
9980
|
}
|
|
9979
9981
|
function assertBundledPlayGraphDescriptions(graph) {
|
|
9980
9982
|
const errors = collectMissingPlayDescriptionErrors(graph);
|
|
@@ -10026,7 +10028,7 @@ function formatTimestamp(value) {
|
|
|
10026
10028
|
return date.toISOString();
|
|
10027
10029
|
}
|
|
10028
10030
|
function isoTimestamp(value) {
|
|
10029
|
-
return _nullishCoalesce(_optionalChain([timestampDate, 'call',
|
|
10031
|
+
return _nullishCoalesce(_optionalChain([timestampDate, 'call', _306 => _306(value), 'optionalAccess', _307 => _307.toISOString, 'call', _308 => _308()]), () => ( null));
|
|
10030
10032
|
}
|
|
10031
10033
|
function formatRunLine(run) {
|
|
10032
10034
|
const credits = typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount2(run.billingTotalCredits)} credits` : "\u2014";
|
|
@@ -10034,7 +10036,7 @@ function formatRunLine(run) {
|
|
|
10034
10036
|
}
|
|
10035
10037
|
function playStatusErrorText(status) {
|
|
10036
10038
|
const chunks = [];
|
|
10037
|
-
const progressError = _optionalChain([status, 'access',
|
|
10039
|
+
const progressError = _optionalChain([status, 'access', _309 => _309.progress, 'optionalAccess', _310 => _310.error]);
|
|
10038
10040
|
if (typeof progressError === "string" && progressError.trim()) {
|
|
10039
10041
|
chunks.push(progressError.trim());
|
|
10040
10042
|
}
|
|
@@ -10060,7 +10062,7 @@ function playStatusErrorText(status) {
|
|
|
10060
10062
|
function isRetryablePendingStartFailure(status) {
|
|
10061
10063
|
if (status.status !== "failed") return false;
|
|
10062
10064
|
if (status.runId && status.runId !== "pending") return false;
|
|
10063
|
-
return
|
|
10065
|
+
return _chunkK3BIRBT3js.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
10064
10066
|
}
|
|
10065
10067
|
function pendingStartFailureStatus(input) {
|
|
10066
10068
|
const message = input.error instanceof Error ? input.error.message : String(input.error);
|
|
@@ -10087,13 +10089,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
|
10087
10089
|
var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
10088
10090
|
function watchSurfaceReaches(state, provenance, level) {
|
|
10089
10091
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
10090
|
-
if (!
|
|
10092
|
+
if (!_chunkK3BIRBT3js.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
10091
10093
|
return false;
|
|
10092
10094
|
}
|
|
10093
|
-
if (
|
|
10095
|
+
if (_chunkK3BIRBT3js.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
10094
10096
|
return true;
|
|
10095
10097
|
}
|
|
10096
|
-
return state.verbose === true &&
|
|
10098
|
+
return state.verbose === true && _chunkK3BIRBT3js.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
10097
10099
|
}
|
|
10098
10100
|
function getEventPayload(event) {
|
|
10099
10101
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -10116,7 +10118,7 @@ function getRunIdFromLiveEvent(event) {
|
|
|
10116
10118
|
if (typeof directRunId === "string" && directRunId.trim()) {
|
|
10117
10119
|
return directRunId;
|
|
10118
10120
|
}
|
|
10119
|
-
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call',
|
|
10121
|
+
const packageRunId = _optionalChain([getRunRecordFromPackage, 'call', _311 => _311(payload), 'optionalAccess', _312 => _312.id]);
|
|
10120
10122
|
return typeof packageRunId === "string" && packageRunId.trim() ? packageRunId : null;
|
|
10121
10123
|
}
|
|
10122
10124
|
function eventConfirmsPlayRunLaunch(event) {
|
|
@@ -10137,19 +10139,19 @@ function getStatusFromLiveEvent(event) {
|
|
|
10137
10139
|
return null;
|
|
10138
10140
|
}
|
|
10139
10141
|
const payload = getEventPayload(event);
|
|
10140
|
-
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call',
|
|
10142
|
+
return _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([getRunRecordFromPackage, 'call', _313 => _313(payload), 'optionalAccess', _314 => _314.status]))));
|
|
10141
10143
|
}
|
|
10142
10144
|
function readLiveRunField(event, field) {
|
|
10143
10145
|
const payload = getEventPayload(event);
|
|
10144
10146
|
if (field === "waitKind") {
|
|
10145
|
-
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call',
|
|
10147
|
+
const wait = _nullishCoalesce(payload.wait, () => ( _optionalChain([getRunRecordFromPackage, 'call', _315 => _315(payload), 'optionalAccess', _316 => _316.wait])));
|
|
10146
10148
|
if (wait && typeof wait === "object" && !Array.isArray(wait)) {
|
|
10147
10149
|
const kind = wait.kind;
|
|
10148
10150
|
if (typeof kind === "string" && kind.trim()) return kind.trim();
|
|
10149
10151
|
}
|
|
10150
10152
|
}
|
|
10151
10153
|
const run = getRunRecordFromPackage(payload);
|
|
10152
|
-
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess',
|
|
10154
|
+
const records = [payload, payload.progress, run, _optionalChain([run, 'optionalAccess', _317 => _317.progress])].filter(
|
|
10153
10155
|
(value) => Boolean(value && typeof value === "object" && !Array.isArray(value))
|
|
10154
10156
|
);
|
|
10155
10157
|
for (const record3 of records) {
|
|
@@ -10164,7 +10166,7 @@ function getLiveRunStringField(event, field) {
|
|
|
10164
10166
|
function getLiveRunActivity(event) {
|
|
10165
10167
|
const payload = getEventPayload(event);
|
|
10166
10168
|
const run = getRunRecordFromPackage(payload);
|
|
10167
|
-
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess',
|
|
10169
|
+
const candidates = [payload.activity, _optionalChain([run, 'optionalAccess', _318 => _318.activity])];
|
|
10168
10170
|
for (const candidate of candidates) {
|
|
10169
10171
|
if (candidate && typeof candidate === "object" && !Array.isArray(candidate) && typeof candidate.summary === "string" && candidate.observation && typeof candidate.observation === "object") {
|
|
10170
10172
|
return candidate;
|
|
@@ -10179,9 +10181,9 @@ function getRunLifecycleHint(input) {
|
|
|
10179
10181
|
return null;
|
|
10180
10182
|
}
|
|
10181
10183
|
const activity = getLiveRunActivity(input.event);
|
|
10182
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
10184
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _319 => _319.observation, 'access', _320 => _320.state, 'access', _321 => _321.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
10183
10185
|
const inspect = `'deepline runs get ${runId} --full --json'`;
|
|
10184
|
-
const sleepState = _optionalChain([activity, 'optionalAccess',
|
|
10186
|
+
const sleepState = _optionalChain([activity, 'optionalAccess', _322 => _322.observation, 'access', _323 => _323.state, 'access', _324 => _324.kind]) === "scheduled" && activity.observation.state.reason === "sleep" ? activity.observation.state : null;
|
|
10185
10187
|
if (status === "waiting" && (sleepState !== null || getLiveRunStringField(input.event, "waitKind") === "sleep")) {
|
|
10186
10188
|
const recordedWake = readLiveRunField(input.event, "waitUntil");
|
|
10187
10189
|
const projectedWake = sleepState && sleepState.resumeAt > activity.observation.observedAt ? sleepState.resumeAt : null;
|
|
@@ -10192,7 +10194,7 @@ function getRunLifecycleHint(input) {
|
|
|
10192
10194
|
};
|
|
10193
10195
|
}
|
|
10194
10196
|
const typedEventWaitKind = getLiveRunStringField(input.event, "waitKind");
|
|
10195
|
-
const activityEventWait = _optionalChain([activity, 'optionalAccess',
|
|
10197
|
+
const activityEventWait = _optionalChain([activity, 'optionalAccess', _325 => _325.observation, 'access', _326 => _326.state, 'access', _327 => _327.kind]) === "waiting" && activity.observation.state.reason.kind === "external_event";
|
|
10196
10198
|
if (status === "waiting" && (typedEventWaitKind === "integration_event" || typedEventWaitKind === "integration_event_batch" || activityEventWait)) {
|
|
10197
10199
|
return {
|
|
10198
10200
|
signature: [
|
|
@@ -10265,12 +10267,12 @@ function getFinalStatusFromLiveEvent(event) {
|
|
|
10265
10267
|
}
|
|
10266
10268
|
const payload = getEventPayload(event);
|
|
10267
10269
|
const packageRun = getRunRecordFromPackage(payload);
|
|
10268
|
-
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess',
|
|
10270
|
+
const status = _nullishCoalesce(playStatusValue(payload.status), () => ( playStatusValue(_optionalChain([packageRun, 'optionalAccess', _328 => _328.status]))));
|
|
10269
10271
|
if (status !== "completed" && status !== "failed" && status !== "cancelled") {
|
|
10270
10272
|
return null;
|
|
10271
10273
|
}
|
|
10272
|
-
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
10273
|
-
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
10274
|
+
const runId = typeof payload.runId === "string" ? payload.runId : typeof _optionalChain([packageRun, 'optionalAccess', _329 => _329.id]) === "string" ? packageRun.id : "";
|
|
10275
|
+
const error = typeof payload.error === "string" ? payload.error : typeof _optionalChain([packageRun, 'optionalAccess', _330 => _330.error]) === "string" ? packageRun.error : void 0;
|
|
10274
10276
|
return {
|
|
10275
10277
|
...payload,
|
|
10276
10278
|
runId,
|
|
@@ -10505,7 +10507,7 @@ function getProgressLinesFromLiveEvent(event) {
|
|
|
10505
10507
|
(count2) => typeof count2 === "number" && Number.isSafeInteger(count2) && count2 >= 0
|
|
10506
10508
|
)) {
|
|
10507
10509
|
lines.push(
|
|
10508
|
-
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess',
|
|
10510
|
+
`progress calls: ${formatInteger(callCounts[0])} logical, ${formatInteger(callCounts[1])} provider requests, ${formatInteger(callCounts[2])} provider 429s${_optionalChain([calls, 'optionalAccess', _331 => _331.confirmed]) === true ? "" : " (observed)"}`
|
|
10509
10511
|
);
|
|
10510
10512
|
}
|
|
10511
10513
|
const rowOutcomes = readRowOutcomeSummary({
|
|
@@ -10556,7 +10558,7 @@ function getRunningHeartbeatLine(input) {
|
|
|
10556
10558
|
return null;
|
|
10557
10559
|
}
|
|
10558
10560
|
const activity = getLiveRunActivity(input.event);
|
|
10559
|
-
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess',
|
|
10561
|
+
const activityConflictsWithDurableWait = status === "waiting" && _optionalChain([activity, 'optionalAccess', _332 => _332.observation, 'access', _333 => _333.state, 'access', _334 => _334.kind]) === "active" && activity.observation.target.kind !== "runner";
|
|
10560
10562
|
if (activity && activity.classified !== false && !activityConflictsWithDurableWait) {
|
|
10561
10563
|
return `activity ${input.playName}: ${activity.summary}`;
|
|
10562
10564
|
}
|
|
@@ -10595,7 +10597,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
10595
10597
|
}
|
|
10596
10598
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
10597
10599
|
if (open2 && dashboardUrl) {
|
|
10598
|
-
|
|
10600
|
+
_chunkGHLWDXUBjs.openInBrowser.call(void 0, dashboardUrl);
|
|
10599
10601
|
}
|
|
10600
10602
|
}
|
|
10601
10603
|
function printPlayLogLines(input) {
|
|
@@ -10647,7 +10649,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
10647
10649
|
const confirmAdmission = async () => {
|
|
10648
10650
|
if (admissionConfirmed) return;
|
|
10649
10651
|
admissionConfirmed = true;
|
|
10650
|
-
await _optionalChain([input, 'access',
|
|
10652
|
+
await _optionalChain([input, 'access', _335 => _335.onRunAdmitted, 'optionalCall', _336 => _336(input.workflowId)]);
|
|
10651
10653
|
};
|
|
10652
10654
|
const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
|
|
10653
10655
|
const fetchTerminalStatus = async () => {
|
|
@@ -10657,7 +10659,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
10657
10659
|
billing: false
|
|
10658
10660
|
});
|
|
10659
10661
|
} catch (error) {
|
|
10660
|
-
if (
|
|
10662
|
+
if (_chunkK3BIRBT3js.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
10661
10663
|
return null;
|
|
10662
10664
|
}
|
|
10663
10665
|
throw error;
|
|
@@ -10819,14 +10821,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10819
10821
|
let timedOut = false;
|
|
10820
10822
|
let emittedDashboardUrl = false;
|
|
10821
10823
|
let lastKnownWorkflowId = "";
|
|
10822
|
-
let launchedRevisionId = _optionalChain([input, 'access',
|
|
10824
|
+
let launchedRevisionId = _optionalChain([input, 'access', _337 => _337.request, 'access', _338 => _338.revisionId, 'optionalAccess', _339 => _339.trim, 'call', _340 => _340()]) || null;
|
|
10823
10825
|
let eventCount = 0;
|
|
10824
10826
|
let firstRunIdMs = null;
|
|
10825
10827
|
let launchConfirmed = false;
|
|
10826
10828
|
const confirmAdmission = async (runId) => {
|
|
10827
10829
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
10828
10830
|
launchConfirmed = true;
|
|
10829
|
-
await _optionalChain([input, 'access',
|
|
10831
|
+
await _optionalChain([input, 'access', _341 => _341.onRunAdmitted, 'optionalCall', _342 => _342(runId)]);
|
|
10830
10832
|
};
|
|
10831
10833
|
let lastPhase = null;
|
|
10832
10834
|
const timeout = input.waitTimeoutMs === null ? null : setTimeout(
|
|
@@ -10846,7 +10848,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10846
10848
|
billing: false
|
|
10847
10849
|
});
|
|
10848
10850
|
} catch (error) {
|
|
10849
|
-
if (
|
|
10851
|
+
if (_chunkK3BIRBT3js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
10850
10852
|
return null;
|
|
10851
10853
|
}
|
|
10852
10854
|
throw error;
|
|
@@ -10878,7 +10880,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10878
10880
|
lastKnownWorkflowId = eventRunId;
|
|
10879
10881
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
10880
10882
|
if (runStartedNow) {
|
|
10881
|
-
await _optionalChain([input, 'access',
|
|
10883
|
+
await _optionalChain([input, 'access', _343 => _343.onRunStarted, 'optionalCall', _344 => _344(eventRunId)]);
|
|
10882
10884
|
}
|
|
10883
10885
|
}
|
|
10884
10886
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -11054,7 +11056,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11054
11056
|
lastPhase
|
|
11055
11057
|
});
|
|
11056
11058
|
}
|
|
11057
|
-
if (lastKnownWorkflowId &&
|
|
11059
|
+
if (lastKnownWorkflowId && _chunkK3BIRBT3js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11058
11060
|
if (timeout) {
|
|
11059
11061
|
clearTimeout(timeout);
|
|
11060
11062
|
}
|
|
@@ -11090,7 +11092,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11090
11092
|
onRunAdmitted: confirmAdmission
|
|
11091
11093
|
});
|
|
11092
11094
|
}
|
|
11093
|
-
if (!lastKnownWorkflowId &&
|
|
11095
|
+
if (!lastKnownWorkflowId && _chunkK3BIRBT3js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11094
11096
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
11095
11097
|
phase: "cli.play_start_stream_transient_failure",
|
|
11096
11098
|
ms: Date.now() - startedAt,
|
|
@@ -11189,29 +11191,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
11189
11191
|
"logs"
|
|
11190
11192
|
]);
|
|
11191
11193
|
function formatPlayLogLine(rawLine, state) {
|
|
11192
|
-
const classified =
|
|
11194
|
+
const classified = _chunkK3BIRBT3js.classifyLogLine.call(void 0, rawLine);
|
|
11193
11195
|
const line = classified.line;
|
|
11194
11196
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
11195
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
11197
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _345 => _345[1]]) ? new Date(timestampMatch[1]) : null;
|
|
11196
11198
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
11197
11199
|
hour12: false,
|
|
11198
11200
|
hour: "2-digit",
|
|
11199
11201
|
minute: "2-digit",
|
|
11200
11202
|
second: "2-digit"
|
|
11201
11203
|
}) : null;
|
|
11202
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
11204
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _346 => _346[2]]), () => ( line));
|
|
11203
11205
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
11204
11206
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
11205
11207
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
11206
11208
|
if (providerWait && !state.verbose) {
|
|
11207
|
-
return
|
|
11209
|
+
return _chunkK3BIRBT3js.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
11208
11210
|
}
|
|
11209
11211
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
11210
11212
|
if (mapProgress && !state.verbose) {
|
|
11211
|
-
return
|
|
11213
|
+
return _chunkK3BIRBT3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
11212
11214
|
}
|
|
11213
11215
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
11214
|
-
if (!
|
|
11216
|
+
if (!_chunkK3BIRBT3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11215
11217
|
return null;
|
|
11216
11218
|
}
|
|
11217
11219
|
if (state.emittedRunnerStarted) {
|
|
@@ -11224,7 +11226,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11224
11226
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
11225
11227
|
);
|
|
11226
11228
|
if (mapStart) {
|
|
11227
|
-
if (!
|
|
11229
|
+
if (!_chunkK3BIRBT3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11228
11230
|
return null;
|
|
11229
11231
|
}
|
|
11230
11232
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -11234,7 +11236,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11234
11236
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
11235
11237
|
);
|
|
11236
11238
|
if (mapDone) {
|
|
11237
|
-
if (!
|
|
11239
|
+
if (!_chunkK3BIRBT3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11238
11240
|
return null;
|
|
11239
11241
|
}
|
|
11240
11242
|
const [, results, executed, cached] = mapDone;
|
|
@@ -11416,20 +11418,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
11416
11418
|
function buildRunWarnings(status, rowsInfo) {
|
|
11417
11419
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
11418
11420
|
const result = readRecord(status.result);
|
|
11419
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
11420
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
11421
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _347 => _347._metadata]));
|
|
11422
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _348 => _348.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
11421
11423
|
if (!warning) return false;
|
|
11422
11424
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
11423
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
11425
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _349 => _349.message])).filter(
|
|
11424
11426
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
11425
11427
|
).slice(0, 16) : [];
|
|
11426
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
11428
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _350 => _350.hasRowFailures]) ? [
|
|
11427
11429
|
`${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.`
|
|
11428
11430
|
] : [];
|
|
11429
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11431
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _351 => _351.supersededRows]), () => ( 0))) > 0 ? [
|
|
11430
11432
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
11431
11433
|
] : [];
|
|
11432
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
11434
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _352 => _352.totalRows]) === 0) {
|
|
11433
11435
|
return [
|
|
11434
11436
|
...rowOutcomeWarnings,
|
|
11435
11437
|
...supersededRowNotices,
|
|
@@ -11448,7 +11450,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
11448
11450
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
11449
11451
|
}
|
|
11450
11452
|
function buildRunNextCommands(status) {
|
|
11451
|
-
const runId = _optionalChain([status, 'access',
|
|
11453
|
+
const runId = _optionalChain([status, 'access', _353 => _353.runId, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]);
|
|
11452
11454
|
if (!runId) {
|
|
11453
11455
|
const playName = extractRunPlayName(status);
|
|
11454
11456
|
return playName ? {
|
|
@@ -11601,14 +11603,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
11601
11603
|
return null;
|
|
11602
11604
|
}
|
|
11603
11605
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
11604
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
11606
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _356 => _356[1]])) {
|
|
11605
11607
|
return lowerToolMatch[1];
|
|
11606
11608
|
}
|
|
11607
11609
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
11608
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
11610
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _357 => _357[1]]), () => ( null));
|
|
11609
11611
|
}
|
|
11610
11612
|
function isInsufficientCreditsBilling(billing) {
|
|
11611
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
11613
|
+
return _optionalChain([billing, 'optionalAccess', _358 => _358.kind]) === "insufficient_credits";
|
|
11612
11614
|
}
|
|
11613
11615
|
function extractBillingForStatus(status, error) {
|
|
11614
11616
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -11648,8 +11650,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
11648
11650
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
11649
11651
|
const progress = input.status.progress;
|
|
11650
11652
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
11651
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
11652
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
11653
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _359 => _359.rows, 'access', _360 => _360.length]))), () => ( null));
|
|
11654
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _361 => _361.totalRows]))), () => ( null));
|
|
11653
11655
|
const lines = [
|
|
11654
11656
|
" status: stopped_insufficient_credits",
|
|
11655
11657
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -11668,7 +11670,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
11668
11670
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
11669
11671
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
11670
11672
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
11671
|
-
const runId = _optionalChain([input, 'access',
|
|
11673
|
+
const runId = _optionalChain([input, 'access', _362 => _362.status, 'access', _363 => _363.runId, 'optionalAccess', _364 => _364.trim, 'call', _365 => _365()]);
|
|
11672
11674
|
if (runId) {
|
|
11673
11675
|
lines.push(` inspect: deepline runs get ${runId} --json`);
|
|
11674
11676
|
lines.push(
|
|
@@ -11750,10 +11752,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
11750
11752
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
11751
11753
|
const progress = status.progress;
|
|
11752
11754
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
11753
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11754
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11755
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11756
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
11755
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _366 => _366.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _367 => _367.totalRows]))), () => ( null));
|
|
11756
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _368 => _368.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
11757
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _369 => _369.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
11758
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _370 => _370.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
11757
11759
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
11758
11760
|
const progressPending = getNumericField(progress, "pending");
|
|
11759
11761
|
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)));
|
|
@@ -11823,7 +11825,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
11823
11825
|
];
|
|
11824
11826
|
}
|
|
11825
11827
|
function normalizeLogsForEnvelope(status) {
|
|
11826
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
11828
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _371 => _371.progress, 'optionalAccess', _372 => _372.logs])) ? status.progress.logs : [];
|
|
11827
11829
|
const totalCount = logs.length;
|
|
11828
11830
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
11829
11831
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -11880,7 +11882,7 @@ function compactPlayStatus(status) {
|
|
|
11880
11882
|
const packaged = getPlayRunPackage(status);
|
|
11881
11883
|
if (packaged) {
|
|
11882
11884
|
const packagedRun = readRecord(packaged.run);
|
|
11883
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
11885
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _373 => _373.error]) === "string" ? packagedRun.error : null;
|
|
11884
11886
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
11885
11887
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
11886
11888
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -12031,7 +12033,7 @@ function formatTopValuesPart(value) {
|
|
|
12031
12033
|
}
|
|
12032
12034
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
12033
12035
|
const record3 = readRecord(summary);
|
|
12034
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12036
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _374 => _374.columnStats]));
|
|
12035
12037
|
if (!record3 || !columnStats) {
|
|
12036
12038
|
return [];
|
|
12037
12039
|
}
|
|
@@ -12119,7 +12121,7 @@ function packageDatasetRecords(packaged) {
|
|
|
12119
12121
|
if (catalog.length > 0) return catalog;
|
|
12120
12122
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
12121
12123
|
const output = readRecord(step.output);
|
|
12122
|
-
return _optionalChain([output, 'optionalAccess',
|
|
12124
|
+
return _optionalChain([output, 'optionalAccess', _375 => _375.kind]) === "dataset" ? [output] : [];
|
|
12123
12125
|
});
|
|
12124
12126
|
}
|
|
12125
12127
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -12128,7 +12130,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
12128
12130
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
12129
12131
|
for (const outputValue of Object.values(outputs)) {
|
|
12130
12132
|
const output = readRecord(outputValue);
|
|
12131
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
12133
|
+
if (_optionalChain([output, 'optionalAccess', _376 => _376.kind]) !== "dataset") continue;
|
|
12132
12134
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
12133
12135
|
datasetIds.add(output.datasetId.trim());
|
|
12134
12136
|
}
|
|
@@ -12164,7 +12166,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
12164
12166
|
}
|
|
12165
12167
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
12166
12168
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
12167
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
12169
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _377 => _377.includeSummary]), () => ( true));
|
|
12168
12170
|
const lines = [];
|
|
12169
12171
|
const steps = readRecordArray(packaged.steps);
|
|
12170
12172
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -12173,10 +12175,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
12173
12175
|
for (const step of steps) {
|
|
12174
12176
|
if (step.kind !== "dataset") continue;
|
|
12175
12177
|
const output = readRecord(step.output);
|
|
12176
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
12178
|
+
if (typeof _optionalChain([output, 'optionalAccess', _378 => _378.datasetId]) === "string") {
|
|
12177
12179
|
stepsByDatasetId.set(output.datasetId, step);
|
|
12178
12180
|
}
|
|
12179
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
12181
|
+
if (typeof _optionalChain([output, 'optionalAccess', _379 => _379.path]) === "string") {
|
|
12180
12182
|
stepsByPath.set(output.path, step);
|
|
12181
12183
|
}
|
|
12182
12184
|
if (typeof step.id === "string") {
|
|
@@ -12190,8 +12192,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
12190
12192
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
12191
12193
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
12192
12194
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
12193
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
12194
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
12195
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _380 => _380.complete]) === false;
|
|
12196
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _381 => _381.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
12195
12197
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
12196
12198
|
if (countUnconfirmed) {
|
|
12197
12199
|
lines.push(
|
|
@@ -12209,7 +12211,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
12209
12211
|
}
|
|
12210
12212
|
}
|
|
12211
12213
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
12212
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
12214
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _382 => _382.progress]));
|
|
12213
12215
|
if (progress) {
|
|
12214
12216
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
12215
12217
|
}
|
|
@@ -12223,10 +12225,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
12223
12225
|
}
|
|
12224
12226
|
const exportAction = readRecord(actions2.exportCsv);
|
|
12225
12227
|
const exportCommand = actionToCommand(exportAction);
|
|
12226
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
12228
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _383 => _383.scope]));
|
|
12227
12229
|
const queryAction = readRecord(actions2.query);
|
|
12228
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
12229
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
12230
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _384 => _384.scope]));
|
|
12231
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _385 => _385.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
12230
12232
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
12231
12233
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
12232
12234
|
if (runQueryCommand) {
|
|
@@ -12238,11 +12240,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
12238
12240
|
}
|
|
12239
12241
|
if (exportCommand) {
|
|
12240
12242
|
lines.push(
|
|
12241
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
12243
|
+
_optionalChain([exportScope, 'optionalAccess', _386 => _386.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
12242
12244
|
);
|
|
12243
12245
|
}
|
|
12244
12246
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
12245
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
12247
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _387 => _387.reason]) === "string" && typeof unavailable.message === "string") {
|
|
12246
12248
|
lines.push(
|
|
12247
12249
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
12248
12250
|
);
|
|
@@ -12259,7 +12261,7 @@ function packageSavedRowCount(packaged) {
|
|
|
12259
12261
|
}
|
|
12260
12262
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
12261
12263
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
12262
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
12264
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _388 => _388.exec, 'call', _389 => _389(message), 'optionalAccess', _390 => _390[1]]);
|
|
12263
12265
|
if (configuredSeconds) {
|
|
12264
12266
|
const seconds = Number(configuredSeconds);
|
|
12265
12267
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -12306,7 +12308,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
12306
12308
|
if (!outputs) return [];
|
|
12307
12309
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
12308
12310
|
const record3 = readRecord(output);
|
|
12309
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
12311
|
+
return _optionalChain([record3, 'optionalAccess', _391 => _391.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _392 => _392.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
12310
12312
|
});
|
|
12311
12313
|
if (returned.length === 0) return [];
|
|
12312
12314
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -12326,10 +12328,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
12326
12328
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
12327
12329
|
);
|
|
12328
12330
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
12329
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
12331
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _393 => _393.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _394 => _394.path]) === path
|
|
12330
12332
|
);
|
|
12331
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
12332
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
12333
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _395 => _395.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _396 => _396.preview]))));
|
|
12334
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _397 => _397.rows])) ? preview.rows.slice(0, 2) : [];
|
|
12333
12335
|
if (rows.length > 0) {
|
|
12334
12336
|
lines.push(` sample rows (${rows.length}):`);
|
|
12335
12337
|
lines.push(
|
|
@@ -12355,7 +12357,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
12355
12357
|
return lines;
|
|
12356
12358
|
}
|
|
12357
12359
|
function authoredPackageStackFrames(packaged) {
|
|
12358
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
12360
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _398 => _398.trim, 'call', _399 => _399()])));
|
|
12359
12361
|
if (!stack) return [];
|
|
12360
12362
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
12361
12363
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -12387,9 +12389,9 @@ function activityIsoTimestamp(value) {
|
|
|
12387
12389
|
}
|
|
12388
12390
|
function buildRunActivityTextLines(run) {
|
|
12389
12391
|
const activity = readRecord(run.activity);
|
|
12390
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
12391
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
12392
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
12392
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _400 => _400.observation]));
|
|
12393
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _401 => _401.state]));
|
|
12394
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _402 => _402.target]));
|
|
12393
12395
|
if (!activity || !observation || !state) return [];
|
|
12394
12396
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
12395
12397
|
if (kind === "completed") return [];
|
|
@@ -12434,11 +12436,11 @@ function buildRunActivityTextLines(run) {
|
|
|
12434
12436
|
}
|
|
12435
12437
|
function formatObservedRunCounter(value) {
|
|
12436
12438
|
const counter = readRecord(value);
|
|
12437
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
12439
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _403 => _403.value]);
|
|
12438
12440
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
12439
12441
|
return "unknown";
|
|
12440
12442
|
}
|
|
12441
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
12443
|
+
return _optionalChain([counter, 'optionalAccess', _404 => _404.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
12442
12444
|
}
|
|
12443
12445
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
12444
12446
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -12451,13 +12453,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
12451
12453
|
);
|
|
12452
12454
|
}
|
|
12453
12455
|
const source = readRecord(evidence.source);
|
|
12454
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
12456
|
+
if (_optionalChain([source, 'optionalAccess', _405 => _405.aligned]) === false) {
|
|
12455
12457
|
lines.push(
|
|
12456
12458
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
12457
12459
|
);
|
|
12458
12460
|
}
|
|
12459
12461
|
const focus = readRecord(evidence.focusStep);
|
|
12460
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
12462
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _406 => _406.rows]));
|
|
12461
12463
|
if (focus) {
|
|
12462
12464
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
12463
12465
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -12465,7 +12467,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
12465
12467
|
const known = readRecordArray(packaged.steps).find(
|
|
12466
12468
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
12467
12469
|
);
|
|
12468
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
12470
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _407 => _407.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
12469
12471
|
deriveNodeExecutionState({
|
|
12470
12472
|
reported: {
|
|
12471
12473
|
status: focus.status.trim(),
|
|
@@ -12475,7 +12477,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
12475
12477
|
total: rows.total
|
|
12476
12478
|
} : null
|
|
12477
12479
|
},
|
|
12478
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
12480
|
+
runStatus: _optionalChain([run, 'optionalAccess', _408 => _408.status])
|
|
12479
12481
|
})
|
|
12480
12482
|
) : null;
|
|
12481
12483
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -12523,7 +12525,7 @@ function formatRecentRunLogLines(value) {
|
|
|
12523
12525
|
(line) => typeof line === "string"
|
|
12524
12526
|
);
|
|
12525
12527
|
if (tail.length === 0) return [];
|
|
12526
|
-
const shown = tail.map((line) =>
|
|
12528
|
+
const shown = tail.map((line) => _chunkK3BIRBT3js.classifyLogLine.call(void 0, line)).filter(
|
|
12527
12529
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
12528
12530
|
).slice(-8);
|
|
12529
12531
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -12567,7 +12569,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12567
12569
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
12568
12570
|
}
|
|
12569
12571
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
12570
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
12572
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _409 => _409.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
12571
12573
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
12572
12574
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
12573
12575
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -12578,11 +12580,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12578
12580
|
}
|
|
12579
12581
|
}
|
|
12580
12582
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
12581
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
12583
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _410 => _410.entries])) ? failedLogs.entries.filter(
|
|
12582
12584
|
(entry) => typeof entry === "string"
|
|
12583
12585
|
) : [];
|
|
12584
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
12585
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
12586
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _411 => _411.association]) === "string" ? failedLogs.association : null;
|
|
12587
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _412 => _412.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
12586
12588
|
if (failedLogEntries.length > 0) {
|
|
12587
12589
|
lines.push(" failed logs:");
|
|
12588
12590
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -12601,8 +12603,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12601
12603
|
)
|
|
12602
12604
|
).slice(0, 16) : [];
|
|
12603
12605
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
12604
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
12605
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
12606
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _413 => _413.next]));
|
|
12607
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _414 => _414.logs]) === "string") {
|
|
12606
12608
|
lines.push(
|
|
12607
12609
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
12608
12610
|
);
|
|
@@ -12630,20 +12632,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
12630
12632
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
12631
12633
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
12632
12634
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
12633
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
12634
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
12635
|
+
const preview = _optionalChain([output, 'optionalAccess', _415 => _415.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
12636
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _416 => _416.rows])) ? preview.rows.length : null;
|
|
12635
12637
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
12636
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
12638
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _417 => _417.summary])));
|
|
12637
12639
|
if (previewRows !== null) {
|
|
12638
12640
|
lines.push(
|
|
12639
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
12641
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _418 => _418.truncated]) ? " truncated" : ""}`
|
|
12640
12642
|
);
|
|
12641
12643
|
}
|
|
12642
12644
|
}
|
|
12643
12645
|
const inspectCommand = actionToCommand(next.inspect);
|
|
12644
12646
|
const fullResultCommand = actionToCommand(next.full);
|
|
12645
12647
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
12646
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
12648
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _419 => _419(dataset.actions), 'optionalAccess', _420 => _420.exportCsv])))
|
|
12647
12649
|
);
|
|
12648
12650
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
12649
12651
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -12706,7 +12708,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
12706
12708
|
}
|
|
12707
12709
|
function buildBillingRollupTextLines(status) {
|
|
12708
12710
|
const billing = status.billing;
|
|
12709
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
12711
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _421 => _421.rollup]);
|
|
12710
12712
|
if (!rollup) return [];
|
|
12711
12713
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
12712
12714
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -12751,7 +12753,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
12751
12753
|
const overview = buildRunOverview(status);
|
|
12752
12754
|
const { run } = overview;
|
|
12753
12755
|
const failed = run.status === "failed";
|
|
12754
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
12756
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _422 => _422.rowOutcomes, 'optionalAccess', _423 => _423.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
12755
12757
|
const lines = [
|
|
12756
12758
|
`${label} ${_nullishCoalesce(_nullishCoalesce(run.playName, () => ( status.playName)), () => ( "Play"))}`,
|
|
12757
12759
|
`Run: ${run.id}`
|
|
@@ -12771,7 +12773,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
12771
12773
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
12772
12774
|
);
|
|
12773
12775
|
}
|
|
12774
|
-
if (_optionalChain([overview, 'access',
|
|
12776
|
+
if (_optionalChain([overview, 'access', _424 => _424.rowOutcomes, 'optionalAccess', _425 => _425.hasRowFailures])) {
|
|
12775
12777
|
lines.push(
|
|
12776
12778
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
12777
12779
|
);
|
|
@@ -12800,16 +12802,16 @@ function buildPlayCompletionTextLines(status) {
|
|
|
12800
12802
|
}
|
|
12801
12803
|
function writePlayResult(status, jsonOutput, options) {
|
|
12802
12804
|
const packaged = getPlayRunPackage(status);
|
|
12803
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
12805
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _426 => _426.hits]), () => ( null));
|
|
12804
12806
|
if (jsonOutput) {
|
|
12805
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
12806
|
-
|
|
12807
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _427 => _427.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
12808
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
12807
12809
|
hits ? { ...payload2, hits } : payload2,
|
|
12808
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
12810
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _428 => _428.jsonFields]) }
|
|
12809
12811
|
);
|
|
12810
12812
|
return;
|
|
12811
12813
|
}
|
|
12812
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
12814
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _429 => _429.fullJson])) {
|
|
12813
12815
|
const {
|
|
12814
12816
|
logs: _logs,
|
|
12815
12817
|
failedLogs: _failedLogs,
|
|
@@ -12819,7 +12821,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12819
12821
|
...buildPlayCompletionTextLines(status),
|
|
12820
12822
|
...formatRunHitsLines(hits)
|
|
12821
12823
|
];
|
|
12822
|
-
|
|
12824
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
12823
12825
|
json: false,
|
|
12824
12826
|
text: `${lines2.join("\n")}
|
|
12825
12827
|
`
|
|
@@ -12869,8 +12871,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12869
12871
|
lines.push(...renderedServerView.actions);
|
|
12870
12872
|
lines.push(...buildBillingRollupTextLines(status));
|
|
12871
12873
|
const compact = compactPlayStatus(status);
|
|
12872
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
12873
|
-
|
|
12874
|
+
const payload = _optionalChain([options, 'optionalAccess', _430 => _430.fullJson]) ? status : compact;
|
|
12875
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
12874
12876
|
{
|
|
12875
12877
|
...payload,
|
|
12876
12878
|
render: {
|
|
@@ -13026,14 +13028,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
13026
13028
|
return columns;
|
|
13027
13029
|
}
|
|
13028
13030
|
function sqlSafeExportColumnName(id) {
|
|
13029
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
13031
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _431 => _431.trim, 'call', _432 => _432(), 'access', _433 => _433.match, 'call', _434 => _434(/^_+/), 'optionalAccess', _435 => _435[0]]), () => ( ""));
|
|
13030
13032
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
13031
13033
|
const safe = `${prefix}${normalized || "column"}`;
|
|
13032
13034
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
13033
13035
|
}
|
|
13034
13036
|
async function fetchBackingDatasetRows(input) {
|
|
13035
13037
|
const playName = extractRunPlayName(input.status);
|
|
13036
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
13038
|
+
const tableNamespace = _optionalChain([input, 'access', _436 => _436.rowsInfo, 'access', _437 => _437.tableNamespace, 'optionalAccess', _438 => _438.trim, 'call', _439 => _439()]);
|
|
13037
13039
|
if (!playName || !tableNamespace) {
|
|
13038
13040
|
return null;
|
|
13039
13041
|
}
|
|
@@ -13072,7 +13074,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
13072
13074
|
seenEnvelopeKeys.add(key);
|
|
13073
13075
|
}
|
|
13074
13076
|
sheetRows.push(...page.rows);
|
|
13075
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
13077
|
+
const summaryTotal = _optionalChain([page, 'access', _440 => _440.summary, 'optionalAccess', _441 => _441.stats, 'optionalAccess', _442 => _442.total]);
|
|
13076
13078
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
13077
13079
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
13078
13080
|
}
|
|
@@ -13232,8 +13234,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
13232
13234
|
path: dataset.exportFile(outPath, options),
|
|
13233
13235
|
rowsInfo: dataset.info(),
|
|
13234
13236
|
currentTable: false,
|
|
13235
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
13236
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
13237
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _443 => _443.source]), () => ( null)),
|
|
13238
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _444 => _444.info, 'call', _445 => _445()]), () => ( null))
|
|
13237
13239
|
};
|
|
13238
13240
|
};
|
|
13239
13241
|
const run = Run.open({
|
|
@@ -13245,7 +13247,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
13245
13247
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
13246
13248
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
13247
13249
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
13248
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
13250
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _446 => _446.info, 'call', _447 => _447()]), () => ( null));
|
|
13249
13251
|
if (!selectedDataset && options.datasetPath) {
|
|
13250
13252
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
13251
13253
|
const commands = datasetChoiceLines({
|
|
@@ -13357,7 +13359,7 @@ ${commands.join("\n")}`,
|
|
|
13357
13359
|
throw error;
|
|
13358
13360
|
}
|
|
13359
13361
|
}
|
|
13360
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
13362
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _448 => _448.complete])) {
|
|
13361
13363
|
const guarded2 = assertDatasetHasExportableRows({
|
|
13362
13364
|
rowsInfo: fetchedRowsInfo,
|
|
13363
13365
|
status,
|
|
@@ -13416,7 +13418,7 @@ function extractActiveRunsFromError(error) {
|
|
|
13416
13418
|
if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError)) {
|
|
13417
13419
|
return [];
|
|
13418
13420
|
}
|
|
13419
|
-
const response = _optionalChain([error, 'access',
|
|
13421
|
+
const response = _optionalChain([error, 'access', _449 => _449.details, 'optionalAccess', _450 => _450.response]);
|
|
13420
13422
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
13421
13423
|
return [];
|
|
13422
13424
|
}
|
|
@@ -13537,8 +13539,8 @@ function renderServerResultView(value) {
|
|
|
13537
13539
|
return { lines: [], actions: [] };
|
|
13538
13540
|
}
|
|
13539
13541
|
const view = value;
|
|
13540
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
13541
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
13542
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _451 => _451.render, 'optionalAccess', _452 => _452.sections])) ? view.render.sections : [];
|
|
13543
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _453 => _453.render, 'optionalAccess', _454 => _454.actions])) ? view.render.actions : [];
|
|
13542
13544
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
13543
13545
|
const lines2 = [];
|
|
13544
13546
|
for (const section of renderedSections) {
|
|
@@ -13576,7 +13578,7 @@ function renderServerResultView(value) {
|
|
|
13576
13578
|
}
|
|
13577
13579
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
13578
13580
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
13579
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
13581
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _455 => _455.queryCommand]) === "string") {
|
|
13580
13582
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
13581
13583
|
}
|
|
13582
13584
|
if (tables.length > 0) {
|
|
@@ -13630,7 +13632,7 @@ function writeStartedPlayRun(input) {
|
|
|
13630
13632
|
dashboardUrl: input.dashboardUrl,
|
|
13631
13633
|
package: input.package
|
|
13632
13634
|
};
|
|
13633
|
-
|
|
13635
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
13634
13636
|
json: true,
|
|
13635
13637
|
fields: input.jsonFields
|
|
13636
13638
|
});
|
|
@@ -13652,7 +13654,7 @@ function writeStartedPlayRun(input) {
|
|
|
13652
13654
|
input.progress.writeLine(output2, process.stdout);
|
|
13653
13655
|
return;
|
|
13654
13656
|
}
|
|
13655
|
-
|
|
13657
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, input.package, {
|
|
13656
13658
|
json: false,
|
|
13657
13659
|
text: `${output2}
|
|
13658
13660
|
`
|
|
@@ -13681,7 +13683,7 @@ function writeStartedPlayRun(input) {
|
|
|
13681
13683
|
) ? [`Stop: deepline runs stop ${shellSingleQuote(input.runId)} --json`] : []
|
|
13682
13684
|
];
|
|
13683
13685
|
if (input.jsonOutput) {
|
|
13684
|
-
|
|
13686
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
13685
13687
|
return;
|
|
13686
13688
|
}
|
|
13687
13689
|
if (input.dashboardUrl) {
|
|
@@ -13692,7 +13694,7 @@ function writeStartedPlayRun(input) {
|
|
|
13692
13694
|
input.progress.writeLine(output, process.stdout);
|
|
13693
13695
|
return;
|
|
13694
13696
|
}
|
|
13695
|
-
|
|
13697
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
13696
13698
|
{
|
|
13697
13699
|
...payload,
|
|
13698
13700
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -13702,7 +13704,7 @@ function writeStartedPlayRun(input) {
|
|
|
13702
13704
|
);
|
|
13703
13705
|
}
|
|
13704
13706
|
function parsePlayRunOptions(args) {
|
|
13705
|
-
const selection =
|
|
13707
|
+
const selection = _chunkGHLWDXUBjs.parseJsonFields.call(void 0, args, "run");
|
|
13706
13708
|
args = selection.args;
|
|
13707
13709
|
const usage2 = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
|
|
13708
13710
|
let filePath = null;
|
|
@@ -13711,7 +13713,7 @@ function parsePlayRunOptions(args) {
|
|
|
13711
13713
|
let revisionId = null;
|
|
13712
13714
|
let revisionSelector = null;
|
|
13713
13715
|
const watch = !args.includes("--no-wait");
|
|
13714
|
-
let jsonOutput = watch ? args.includes("--json") :
|
|
13716
|
+
let jsonOutput = watch ? args.includes("--json") : _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
13715
13717
|
const fullJson = args.includes("--full");
|
|
13716
13718
|
const force = args.includes("--force");
|
|
13717
13719
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -13758,7 +13760,7 @@ function parsePlayRunOptions(args) {
|
|
|
13758
13760
|
"--log-level requires one of: debug, info, warn, error."
|
|
13759
13761
|
);
|
|
13760
13762
|
}
|
|
13761
|
-
const parsed =
|
|
13763
|
+
const parsed = _chunkK3BIRBT3js.parseLogLevel.call(void 0, value);
|
|
13762
13764
|
if (!parsed) {
|
|
13763
13765
|
throw new Error(
|
|
13764
13766
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13795,7 +13797,7 @@ function parsePlayRunOptions(args) {
|
|
|
13795
13797
|
throw new Error("--profile requires an execution profile id.");
|
|
13796
13798
|
}
|
|
13797
13799
|
profile = value.trim();
|
|
13798
|
-
|
|
13800
|
+
_chunkXSEMQ4IIjs.resolveEnabledExecutionProfile.call(void 0, profile);
|
|
13799
13801
|
index += 1;
|
|
13800
13802
|
continue;
|
|
13801
13803
|
}
|
|
@@ -13985,7 +13987,7 @@ function parsePlayRunOptions(args) {
|
|
|
13985
13987
|
};
|
|
13986
13988
|
}
|
|
13987
13989
|
function parsePlayCheckOptions(args) {
|
|
13988
|
-
const selection =
|
|
13990
|
+
const selection = _chunkGHLWDXUBjs.parseJsonFields.call(void 0, args, "check");
|
|
13989
13991
|
args = selection.args;
|
|
13990
13992
|
const target = args[0];
|
|
13991
13993
|
if (!target || target.startsWith("-")) {
|
|
@@ -13997,7 +13999,7 @@ function parsePlayCheckOptions(args) {
|
|
|
13997
13999
|
if (arg !== "--json" && arg !== "--full")
|
|
13998
14000
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
13999
14001
|
}
|
|
14000
|
-
const jsonOutput =
|
|
14002
|
+
const jsonOutput = _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
14001
14003
|
return {
|
|
14002
14004
|
target,
|
|
14003
14005
|
jsonOutput,
|
|
@@ -14073,7 +14075,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
14073
14075
|
useLatest,
|
|
14074
14076
|
expectedArtifactHash,
|
|
14075
14077
|
dryRun,
|
|
14076
|
-
jsonOutput:
|
|
14078
|
+
jsonOutput: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args)
|
|
14077
14079
|
};
|
|
14078
14080
|
}
|
|
14079
14081
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -14114,7 +14116,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
14114
14116
|
target,
|
|
14115
14117
|
expectedArtifactHash,
|
|
14116
14118
|
dryRun,
|
|
14117
|
-
jsonOutput:
|
|
14119
|
+
jsonOutput: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args)
|
|
14118
14120
|
};
|
|
14119
14121
|
}
|
|
14120
14122
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -14167,7 +14169,7 @@ function checkHintExpression(value) {
|
|
|
14167
14169
|
return stringValue3(value).replace(/^toolExecutionResult\./, "result.");
|
|
14168
14170
|
}
|
|
14169
14171
|
function checkHintRawPath(value) {
|
|
14170
|
-
return _optionalChain([value, 'optionalAccess',
|
|
14172
|
+
return _optionalChain([value, 'optionalAccess', _456 => _456.startsWith, 'call', _457 => _457("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
14171
14173
|
}
|
|
14172
14174
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
14173
14175
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -14242,30 +14244,30 @@ function cronExecutionLabel(status) {
|
|
|
14242
14244
|
}
|
|
14243
14245
|
function readLiveCronMetadata(play) {
|
|
14244
14246
|
const record3 = readRecord(play);
|
|
14245
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
14247
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _458 => _458.triggerMetadata]));
|
|
14246
14248
|
return {
|
|
14247
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14248
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14249
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14250
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14251
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14249
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _459 => _459.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
14250
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _460 => _460.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
14251
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _461 => _461.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
14252
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _462 => _462.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
14253
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _463 => _463.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
14252
14254
|
};
|
|
14253
14255
|
}
|
|
14254
14256
|
function liveTriggerStatusLines(status, play) {
|
|
14255
14257
|
const cron = readLiveCronMetadata(play);
|
|
14256
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
14258
|
+
if (!_optionalChain([status, 'optionalAccess', _464 => _464.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _465 => _465.webhook])) return [];
|
|
14257
14259
|
const lines = [];
|
|
14258
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
14260
|
+
if (_optionalChain([status, 'optionalAccess', _466 => _466.cron]) || cron.schedule) {
|
|
14259
14261
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
14260
14262
|
lines.push(
|
|
14261
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
14263
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _467 => _467.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
14262
14264
|
);
|
|
14263
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
14265
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _468 => _468.cron]) === "active") {
|
|
14264
14266
|
lines.push(
|
|
14265
14267
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
14266
14268
|
);
|
|
14267
14269
|
}
|
|
14268
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
14270
|
+
if (_optionalChain([status, 'optionalAccess', _469 => _469.blockedReason])) {
|
|
14269
14271
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
14270
14272
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
14271
14273
|
lines.push(
|
|
@@ -14281,7 +14283,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
14281
14283
|
);
|
|
14282
14284
|
}
|
|
14283
14285
|
}
|
|
14284
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
14286
|
+
if (_optionalChain([status, 'optionalAccess', _470 => _470.webhook])) {
|
|
14285
14287
|
lines.push(` Webhook: ${status.webhook}`);
|
|
14286
14288
|
}
|
|
14287
14289
|
return lines;
|
|
@@ -14289,11 +14291,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
14289
14291
|
function triggerStatusFromMetadata(value) {
|
|
14290
14292
|
const metadata = readRecord(value);
|
|
14291
14293
|
return {
|
|
14292
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14293
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14294
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14295
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14296
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
14294
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _471 => _471.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
14295
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _472 => _472.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
14296
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _473 => _473.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
14297
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _474 => _474.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
14298
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _475 => _475.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
14297
14299
|
};
|
|
14298
14300
|
}
|
|
14299
14301
|
function printPublishReceipt(input) {
|
|
@@ -14325,7 +14327,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
14325
14327
|
async function handlePlayCheck(args) {
|
|
14326
14328
|
const options = parsePlayCheckOptions(args);
|
|
14327
14329
|
if (!isFileTarget(options.target)) {
|
|
14328
|
-
const client = new (0,
|
|
14330
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
14329
14331
|
try {
|
|
14330
14332
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
14331
14333
|
command: "check"
|
|
@@ -14354,7 +14356,7 @@ async function handlePlayCheck(args) {
|
|
|
14354
14356
|
},
|
|
14355
14357
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
14356
14358
|
};
|
|
14357
|
-
|
|
14359
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, result, {
|
|
14358
14360
|
json: options.jsonOutput,
|
|
14359
14361
|
fields: options.jsonFields,
|
|
14360
14362
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -14364,7 +14366,7 @@ async function handlePlayCheck(args) {
|
|
|
14364
14366
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
14365
14367
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
14366
14368
|
if (options.jsonOutput) {
|
|
14367
|
-
|
|
14369
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
14368
14370
|
{
|
|
14369
14371
|
kind: "play_check",
|
|
14370
14372
|
checked: "named_contract",
|
|
@@ -14397,16 +14399,16 @@ async function handlePlayCheck(args) {
|
|
|
14397
14399
|
);
|
|
14398
14400
|
}
|
|
14399
14401
|
const primary = outcomes.find(
|
|
14400
|
-
(outcome) => outcome.exportName ===
|
|
14402
|
+
(outcome) => outcome.exportName === _chunkXSEMQ4IIjs.PLAY_DEFAULT_EXPORT
|
|
14401
14403
|
);
|
|
14402
14404
|
const output = buildPlayCheckOutput({
|
|
14403
14405
|
outcomes,
|
|
14404
14406
|
target: options.target,
|
|
14405
14407
|
full: options.full,
|
|
14406
14408
|
detailsCommand: `deepline plays check ${shellQuote3(options.target)} --full --json`,
|
|
14407
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
14409
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _476 => _476.result, 'access', _477 => _477.artifactHash]) ? `deepline plays publish ${shellQuote3(options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
14408
14410
|
});
|
|
14409
|
-
|
|
14411
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, output, {
|
|
14410
14412
|
json: options.jsonOutput,
|
|
14411
14413
|
fields: options.jsonFields,
|
|
14412
14414
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -14414,12 +14416,12 @@ async function handlePlayCheck(args) {
|
|
|
14414
14416
|
return output.valid ? 0 : 1;
|
|
14415
14417
|
}
|
|
14416
14418
|
function resolvePlayCheckExportNames(sourceCode) {
|
|
14417
|
-
const exports =
|
|
14418
|
-
if (!exports || exports.length === 0) return [
|
|
14419
|
+
const exports = _chunkXSEMQ4IIjs.listPlayFileExports.call(void 0, sourceCode);
|
|
14420
|
+
if (!exports || exports.length === 0) return [_chunkXSEMQ4IIjs.PLAY_DEFAULT_EXPORT];
|
|
14419
14421
|
return exports.map((entry) => entry.name);
|
|
14420
14422
|
}
|
|
14421
14423
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
14422
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
14424
|
+
const rawEdition = _optionalChain([process, 'access', _478 => _478.env, 'access', _479 => _479.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _480 => _480.trim, 'call', _481 => _481()]);
|
|
14423
14425
|
if (!rawEdition) return artifact;
|
|
14424
14426
|
if (!/^\d+$/.test(rawEdition)) {
|
|
14425
14427
|
throw new Error(
|
|
@@ -14468,7 +14470,7 @@ async function checkOneExportedPlay(input) {
|
|
|
14468
14470
|
result: { valid: false, errors: descriptionErrors }
|
|
14469
14471
|
};
|
|
14470
14472
|
}
|
|
14471
|
-
const client = new (0,
|
|
14473
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
14472
14474
|
const integrationMode = resolveEvalIntegrationMode();
|
|
14473
14475
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
14474
14476
|
playName: node.playName,
|
|
@@ -14481,7 +14483,7 @@ async function checkOneExportedPlay(input) {
|
|
|
14481
14483
|
sourceFiles: graph.root.sourceFiles,
|
|
14482
14484
|
description: _nullishCoalesce(graph.root.playDescription, () => ( void 0)),
|
|
14483
14485
|
artifact: artifactForProductionCompatibilityCheck(graph.root.artifact),
|
|
14484
|
-
...exportName ===
|
|
14486
|
+
...exportName === _chunkXSEMQ4IIjs.PLAY_DEFAULT_EXPORT ? {} : { exportName },
|
|
14485
14487
|
...importedPlays.length > 0 ? { importedPlays } : {},
|
|
14486
14488
|
...integrationMode ? { integrationMode } : {}
|
|
14487
14489
|
});
|
|
@@ -14505,7 +14507,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14505
14507
|
if (options.target.kind !== "file") {
|
|
14506
14508
|
throw new Error("Expected a file-backed play run target.");
|
|
14507
14509
|
}
|
|
14508
|
-
const client = new (0,
|
|
14510
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)(playRunClientOptions(options));
|
|
14509
14511
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14510
14512
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
14511
14513
|
progress.phase("compiling play");
|
|
@@ -14577,7 +14579,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14577
14579
|
);
|
|
14578
14580
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
14579
14581
|
const fileInputBindings = _chunkLA46MMTLjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
14580
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
14582
|
+
_optionalChain([compilerManifest, 'optionalAccess', _482 => _482.staticPipeline])
|
|
14581
14583
|
);
|
|
14582
14584
|
const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
14583
14585
|
"cli.play_stage_inputs",
|
|
@@ -14637,8 +14639,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14637
14639
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
14638
14640
|
open: options.open,
|
|
14639
14641
|
progress,
|
|
14640
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
14641
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
14642
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _483 => _483.onRunStarted]),
|
|
14643
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _484 => _484.onRunAdmitted])
|
|
14642
14644
|
}).catch(async (error) => {
|
|
14643
14645
|
throw await normalizePlayStartError(client, error, playName);
|
|
14644
14646
|
})
|
|
@@ -14660,7 +14662,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14660
14662
|
),
|
|
14661
14663
|
options
|
|
14662
14664
|
);
|
|
14663
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
14665
|
+
_optionalChain([hooks, 'optionalAccess', _485 => _485.onTerminalStatus, 'optionalCall', _486 => _486(outputStatus)]);
|
|
14664
14666
|
traceCliSync(
|
|
14665
14667
|
"cli.play_write_result",
|
|
14666
14668
|
{ targetKind: "file", playName },
|
|
@@ -14679,8 +14681,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14679
14681
|
throw await normalizePlayStartError(client, error, playName);
|
|
14680
14682
|
})
|
|
14681
14683
|
);
|
|
14682
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14683
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14684
|
+
await _optionalChain([hooks, 'optionalAccess', _487 => _487.onRunStarted, 'optionalCall', _488 => _488(started.workflowId)]);
|
|
14685
|
+
await _optionalChain([hooks, 'optionalAccess', _489 => _489.onRunAdmitted, 'optionalCall', _490 => _490(started.workflowId)]);
|
|
14684
14686
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
14685
14687
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
14686
14688
|
progress.phase("started run");
|
|
@@ -14708,7 +14710,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
14708
14710
|
if (input.selector === "latest") {
|
|
14709
14711
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
14710
14712
|
const latest = versions[0];
|
|
14711
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
14713
|
+
if (!_optionalChain([latest, 'optionalAccess', _491 => _491._id])) {
|
|
14712
14714
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
14713
14715
|
}
|
|
14714
14716
|
return latest._id;
|
|
@@ -14719,7 +14721,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
14719
14721
|
if (options.target.kind !== "name") {
|
|
14720
14722
|
throw new Error("Expected a named play run target.");
|
|
14721
14723
|
}
|
|
14722
|
-
const client = new (0,
|
|
14724
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)(playRunClientOptions(options));
|
|
14723
14725
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14724
14726
|
const playName = options.target.name;
|
|
14725
14727
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
@@ -14825,8 +14827,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
14825
14827
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
14826
14828
|
open: options.open,
|
|
14827
14829
|
progress,
|
|
14828
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
14829
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
14830
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _492 => _492.onRunStarted]),
|
|
14831
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _493 => _493.onRunAdmitted])
|
|
14830
14832
|
}).catch(async (error) => {
|
|
14831
14833
|
throw await normalizePlayStartError(client, error, playName, {
|
|
14832
14834
|
suggestMissingPlay: true
|
|
@@ -14851,7 +14853,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
14851
14853
|
options,
|
|
14852
14854
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
14853
14855
|
);
|
|
14854
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
14856
|
+
_optionalChain([hooks, 'optionalAccess', _494 => _494.onTerminalStatus, 'optionalCall', _495 => _495(outputStatus)]);
|
|
14855
14857
|
traceCliSync(
|
|
14856
14858
|
"cli.play_write_result",
|
|
14857
14859
|
{ targetKind: "name", playName },
|
|
@@ -14872,8 +14874,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
14872
14874
|
});
|
|
14873
14875
|
})
|
|
14874
14876
|
);
|
|
14875
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14876
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14877
|
+
await _optionalChain([hooks, 'optionalAccess', _496 => _496.onRunStarted, 'optionalCall', _497 => _497(started.workflowId)]);
|
|
14878
|
+
await _optionalChain([hooks, 'optionalAccess', _498 => _498.onRunAdmitted, 'optionalCall', _499 => _499(started.workflowId)]);
|
|
14877
14879
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
14878
14880
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
14879
14881
|
progress.phase("started run");
|
|
@@ -14911,7 +14913,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
14911
14913
|
{ cause: error }
|
|
14912
14914
|
);
|
|
14913
14915
|
}
|
|
14914
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14916
|
+
await _optionalChain([hooks, 'optionalAccess', _500 => _500.onRunStarted, 'optionalCall', _501 => _501(runId)]);
|
|
14915
14917
|
},
|
|
14916
14918
|
onRunAdmitted: async (runId) => {
|
|
14917
14919
|
try {
|
|
@@ -14924,7 +14926,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
14924
14926
|
{ cause: error }
|
|
14925
14927
|
);
|
|
14926
14928
|
}
|
|
14927
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
14929
|
+
await _optionalChain([hooks, 'optionalAccess', _502 => _502.onRunAdmitted, 'optionalCall', _503 => _503(runId)]);
|
|
14928
14930
|
}
|
|
14929
14931
|
} : hooks;
|
|
14930
14932
|
if (options.target.kind === "file") {
|
|
@@ -15002,10 +15004,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
15002
15004
|
...buildRunActivityTextLines(run),
|
|
15003
15005
|
...buildRunStatusEvidenceTextLines(overview)
|
|
15004
15006
|
];
|
|
15005
|
-
if (_optionalChain([overview, 'access',
|
|
15007
|
+
if (_optionalChain([overview, 'access', _504 => _504.runStatus, 'optionalAccess', _505 => _505.available]) === false)
|
|
15006
15008
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
15007
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
15008
|
-
if (work && !_optionalChain([overview, 'access',
|
|
15009
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _506 => _506(run), 'optionalAccess', _507 => _507.work]));
|
|
15010
|
+
if (work && !_optionalChain([overview, 'access', _508 => _508.runStatus, 'optionalAccess', _509 => _509.available]))
|
|
15009
15011
|
lines.push(
|
|
15010
15012
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
15011
15013
|
);
|
|
@@ -15056,7 +15058,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
15056
15058
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
15057
15059
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
15058
15060
|
...overview.failedLogs.entries,
|
|
15059
|
-
..._optionalChain([overview, 'access',
|
|
15061
|
+
..._optionalChain([overview, 'access', _510 => _510.failedLogs, 'access', _511 => _511.next, 'optionalAccess', _512 => _512.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
15060
15062
|
]
|
|
15061
15063
|
});
|
|
15062
15064
|
sections.push({
|
|
@@ -15116,10 +15118,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
15116
15118
|
);
|
|
15117
15119
|
return `${lines.join("\n")}
|
|
15118
15120
|
|
|
15119
|
-
${
|
|
15121
|
+
${_chunkGHLWDXUBjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
15120
15122
|
}
|
|
15121
15123
|
async function handleRunGet(args) {
|
|
15122
|
-
const selection =
|
|
15124
|
+
const selection = _chunkGHLWDXUBjs.parseJsonFields.call(void 0,
|
|
15123
15125
|
args,
|
|
15124
15126
|
args.includes("--config") ? "config" : "get"
|
|
15125
15127
|
);
|
|
@@ -15132,7 +15134,7 @@ async function handleRunGet(args) {
|
|
|
15132
15134
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15133
15135
|
return 1;
|
|
15134
15136
|
}
|
|
15135
|
-
const client = new (0,
|
|
15137
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
15136
15138
|
if (args.includes("--config")) {
|
|
15137
15139
|
if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
|
|
15138
15140
|
console.error(
|
|
@@ -15146,7 +15148,7 @@ async function handleRunGet(args) {
|
|
|
15146
15148
|
"This server does not support recorded configuration reads."
|
|
15147
15149
|
);
|
|
15148
15150
|
}
|
|
15149
|
-
|
|
15151
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
15150
15152
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
15151
15153
|
{ json: true, fields: selection.fields }
|
|
15152
15154
|
);
|
|
@@ -15154,7 +15156,7 @@ async function handleRunGet(args) {
|
|
|
15154
15156
|
}
|
|
15155
15157
|
if (args.includes("--input")) {
|
|
15156
15158
|
const input = await client.getRunInput(runId);
|
|
15157
|
-
|
|
15159
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
15158
15160
|
return 0;
|
|
15159
15161
|
}
|
|
15160
15162
|
const full = args.includes("--full");
|
|
@@ -15167,8 +15169,8 @@ async function handleRunGet(args) {
|
|
|
15167
15169
|
full: true,
|
|
15168
15170
|
failedLogs: args.includes("--log-failed")
|
|
15169
15171
|
}) : status;
|
|
15170
|
-
if (
|
|
15171
|
-
|
|
15172
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
15173
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
15172
15174
|
full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
15173
15175
|
{ json: true, fields: selection.fields }
|
|
15174
15176
|
);
|
|
@@ -15184,8 +15186,8 @@ async function handleRunGet(args) {
|
|
|
15184
15186
|
readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
|
|
15185
15187
|
]);
|
|
15186
15188
|
const hitLines = formatRunHitsLines(hits);
|
|
15187
|
-
const json =
|
|
15188
|
-
|
|
15189
|
+
const json = _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
15190
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
15189
15191
|
{
|
|
15190
15192
|
...overview,
|
|
15191
15193
|
credits,
|
|
@@ -15288,9 +15290,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
15288
15290
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15289
15291
|
return 1;
|
|
15290
15292
|
}
|
|
15291
|
-
const status = await new (0,
|
|
15292
|
-
if (
|
|
15293
|
-
|
|
15293
|
+
const status = await new (0, _chunkK3BIRBT3js.DeeplineClient)().runs.status(runId);
|
|
15294
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
15295
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
15294
15296
|
return 0;
|
|
15295
15297
|
}
|
|
15296
15298
|
if (!status.available) {
|
|
@@ -15364,12 +15366,12 @@ async function handleRunsRerun(args) {
|
|
|
15364
15366
|
index += 1;
|
|
15365
15367
|
}
|
|
15366
15368
|
}
|
|
15367
|
-
const result = await new (0,
|
|
15369
|
+
const result = await new (0, _chunkK3BIRBT3js.DeeplineClient)().runs.rerun(runId, {
|
|
15368
15370
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
15369
15371
|
...inputOverrides ? { inputOverrides } : {}
|
|
15370
15372
|
});
|
|
15371
|
-
if (
|
|
15372
|
-
|
|
15373
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
15374
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
15373
15375
|
} else {
|
|
15374
15376
|
console.log(
|
|
15375
15377
|
result.deduplicated === true ? `
|
|
@@ -15385,8 +15387,9 @@ Rerun started from ${runId}${inputOverrides ? " with input overrides" : ""}.`
|
|
|
15385
15387
|
return 0;
|
|
15386
15388
|
}
|
|
15387
15389
|
async function handleRunsList(args) {
|
|
15388
|
-
const usage2 = "Usage: deepline runs list [--play <play-name>] [--status <status>] [--limit <count>] [--offset <count>] [--json]";
|
|
15390
|
+
const usage2 = "Usage: deepline runs list [--play <play-name>] [--node <mermaid-node-id>] [--status <status>] [--limit <count>] [--offset <count>] [--json]";
|
|
15389
15391
|
let playName = null;
|
|
15392
|
+
let nodeId = null;
|
|
15390
15393
|
let statusFilter = null;
|
|
15391
15394
|
let limit;
|
|
15392
15395
|
let offset;
|
|
@@ -15396,6 +15399,10 @@ async function handleRunsList(args) {
|
|
|
15396
15399
|
playName = args[++index].trim();
|
|
15397
15400
|
continue;
|
|
15398
15401
|
}
|
|
15402
|
+
if (arg === "--node" && args[index + 1]) {
|
|
15403
|
+
nodeId = args[++index].trim();
|
|
15404
|
+
continue;
|
|
15405
|
+
}
|
|
15399
15406
|
if (arg === "--status" && args[index + 1]) {
|
|
15400
15407
|
statusFilter = args[++index].trim().toLowerCase();
|
|
15401
15408
|
continue;
|
|
@@ -15434,22 +15441,27 @@ ${usage2}
|
|
|
15434
15441
|
Discover Plays: ${next.discover}
|
|
15435
15442
|
Active runs: ${next.running}`
|
|
15436
15443
|
);
|
|
15437
|
-
if (
|
|
15438
|
-
|
|
15444
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
15445
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
15439
15446
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
15440
15447
|
{ json: true }
|
|
15441
15448
|
);
|
|
15442
15449
|
}
|
|
15443
15450
|
return 1;
|
|
15444
15451
|
}
|
|
15452
|
+
if (nodeId && !playName) {
|
|
15453
|
+
console.error("--node requires --play.");
|
|
15454
|
+
return 1;
|
|
15455
|
+
}
|
|
15445
15456
|
if ((_nullishCoalesce(offset, () => ( 0))) > 0 && !playName) {
|
|
15446
15457
|
console.error("--offset requires --play.");
|
|
15447
15458
|
return 1;
|
|
15448
15459
|
}
|
|
15449
|
-
const client = new (0,
|
|
15460
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
15450
15461
|
const page = await client.runs.listPage({
|
|
15451
15462
|
...playName ? { play: playName } : {},
|
|
15452
15463
|
...statusFilter ? { status: statusFilter } : {},
|
|
15464
|
+
...nodeId ? { node: nodeId } : {},
|
|
15453
15465
|
...limit !== void 0 ? { limit } : {},
|
|
15454
15466
|
...offset !== void 0 ? { offset } : {}
|
|
15455
15467
|
});
|
|
@@ -15474,7 +15486,8 @@ Active runs: ${next.running}`
|
|
|
15474
15486
|
executionTime: run.executionTime,
|
|
15475
15487
|
billingTotalCredits: run.billingTotalCredits,
|
|
15476
15488
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
15477
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
15489
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _513 => _513.memo, 'optionalAccess', _514 => _514.playName]))), () => ( playName)), () => ( null)),
|
|
15490
|
+
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
15478
15491
|
}));
|
|
15479
15492
|
const lines = runs.length === 0 ? [
|
|
15480
15493
|
playName ? `No runs found for ${playName}.` : `No runs found for status ${statusFilter}.`
|
|
@@ -15489,6 +15502,19 @@ Active runs: ${next.running}`
|
|
|
15489
15502
|
];
|
|
15490
15503
|
if (run.parentRunId) lines2.push(` parent: ${run.parentRunId}`);
|
|
15491
15504
|
if (run.rootRunId) lines2.push(` root: ${run.rootRunId}`);
|
|
15505
|
+
if (nodeId && run.nodeObservation) {
|
|
15506
|
+
lines2.push(
|
|
15507
|
+
` node ${nodeId} (${run.nodeObservation.status}, attempt ${run.nodeObservation.attempt})`
|
|
15508
|
+
);
|
|
15509
|
+
lines2.push(
|
|
15510
|
+
` input: ${JSON.stringify(_nullishCoalesce(run.nodeObservation.inputs, () => ( {})))}`
|
|
15511
|
+
);
|
|
15512
|
+
lines2.push(
|
|
15513
|
+
` output: ${JSON.stringify(_nullishCoalesce(run.nodeObservation.outputs, () => ( {})))}`
|
|
15514
|
+
);
|
|
15515
|
+
} else if (nodeId) {
|
|
15516
|
+
lines2.push(` node ${nodeId}: not recorded`);
|
|
15517
|
+
}
|
|
15492
15518
|
return lines2.join("\n");
|
|
15493
15519
|
});
|
|
15494
15520
|
const nextOffset = (_nullishCoalesce(_nullishCoalesce(page.offset, () => ( offset)), () => ( 0))) + runs.length;
|
|
@@ -15499,7 +15525,7 @@ Active runs: ${next.running}`
|
|
|
15499
15525
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
15500
15526
|
);
|
|
15501
15527
|
}
|
|
15502
|
-
|
|
15528
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
15503
15529
|
{
|
|
15504
15530
|
runs,
|
|
15505
15531
|
count: runs.length,
|
|
@@ -15509,11 +15535,11 @@ Active runs: ${next.running}`
|
|
|
15509
15535
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
15510
15536
|
next: {
|
|
15511
15537
|
page: nextPage,
|
|
15512
|
-
get: _optionalChain([runs, 'access',
|
|
15538
|
+
get: _optionalChain([runs, 'access', _515 => _515[0], 'optionalAccess', _516 => _516.runId]) ? `deepline runs get ${runs[0].runId} --json` : null
|
|
15513
15539
|
},
|
|
15514
15540
|
render: { sections: [{ title: "runs", lines }] }
|
|
15515
15541
|
},
|
|
15516
|
-
{ json:
|
|
15542
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args) }
|
|
15517
15543
|
);
|
|
15518
15544
|
return 0;
|
|
15519
15545
|
}
|
|
@@ -15543,7 +15569,7 @@ async function handleRunTail(args) {
|
|
|
15543
15569
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15544
15570
|
return 1;
|
|
15545
15571
|
}
|
|
15546
|
-
const parsed =
|
|
15572
|
+
const parsed = _chunkK3BIRBT3js.parseLogLevel.call(void 0, value);
|
|
15547
15573
|
if (!parsed) {
|
|
15548
15574
|
console.error(
|
|
15549
15575
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15581,9 +15607,9 @@ async function handleRunTail(args) {
|
|
|
15581
15607
|
);
|
|
15582
15608
|
return 1;
|
|
15583
15609
|
}
|
|
15584
|
-
const client = new (0,
|
|
15610
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
15585
15611
|
const jsonLines = args.includes("--jsonl");
|
|
15586
|
-
const jsonOutput = !jsonLines &&
|
|
15612
|
+
const jsonOutput = !jsonLines && _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
15587
15613
|
const compact = args.includes("--compact");
|
|
15588
15614
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
15589
15615
|
const compactState = {
|
|
@@ -15664,7 +15690,7 @@ async function handleRunLogs(args) {
|
|
|
15664
15690
|
]);
|
|
15665
15691
|
const cursorIndex = args.indexOf("--cursor");
|
|
15666
15692
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
15667
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
15693
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkK3BIRBT3js.isRunLogsCursor.call(void 0, cursorValue));
|
|
15668
15694
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
15669
15695
|
return handleRunEventSearch(args);
|
|
15670
15696
|
}
|
|
@@ -15698,7 +15724,7 @@ async function handleRunLogs(args) {
|
|
|
15698
15724
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15699
15725
|
return 1;
|
|
15700
15726
|
}
|
|
15701
|
-
const parsed =
|
|
15727
|
+
const parsed = _chunkK3BIRBT3js.parseLogLevel.call(void 0, value);
|
|
15702
15728
|
if (!parsed) {
|
|
15703
15729
|
console.error(
|
|
15704
15730
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15745,12 +15771,12 @@ async function handleRunLogs(args) {
|
|
|
15745
15771
|
);
|
|
15746
15772
|
return 1;
|
|
15747
15773
|
}
|
|
15748
|
-
const client = new (0,
|
|
15774
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
15749
15775
|
if (outPath) {
|
|
15750
15776
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
15751
|
-
const logs = result2.entries.filter((line) =>
|
|
15777
|
+
const logs = result2.entries.filter((line) => _chunkK3BIRBT3js.logLevelReaches.call(void 0, _chunkK3BIRBT3js.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkK3BIRBT3js.classifyLogLine.call(void 0, line).line);
|
|
15752
15778
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
15753
|
-
|
|
15779
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
15754
15780
|
{
|
|
15755
15781
|
runId: result2.runId,
|
|
15756
15782
|
log_path: outPath,
|
|
@@ -15773,7 +15799,7 @@ async function handleRunLogs(args) {
|
|
|
15773
15799
|
]
|
|
15774
15800
|
}
|
|
15775
15801
|
},
|
|
15776
|
-
{ json:
|
|
15802
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args) }
|
|
15777
15803
|
);
|
|
15778
15804
|
return 0;
|
|
15779
15805
|
}
|
|
@@ -15804,7 +15830,7 @@ async function handleRunLogs(args) {
|
|
|
15804
15830
|
}
|
|
15805
15831
|
};
|
|
15806
15832
|
const text = buildRunLogsText(filteredResult);
|
|
15807
|
-
|
|
15833
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
15808
15834
|
{
|
|
15809
15835
|
runId: result.runId,
|
|
15810
15836
|
totalCount: result.totalCount,
|
|
@@ -15828,7 +15854,7 @@ async function handleRunLogs(args) {
|
|
|
15828
15854
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
15829
15855
|
},
|
|
15830
15856
|
{
|
|
15831
|
-
json:
|
|
15857
|
+
json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args),
|
|
15832
15858
|
text
|
|
15833
15859
|
}
|
|
15834
15860
|
);
|
|
@@ -15852,17 +15878,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
15852
15878
|
);
|
|
15853
15879
|
}
|
|
15854
15880
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
15855
|
-
(entry) =>
|
|
15881
|
+
(entry) => _chunkK3BIRBT3js.logLevelReaches.call(void 0, _chunkK3BIRBT3js.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
15856
15882
|
);
|
|
15857
15883
|
const selected = matching.slice(-limit);
|
|
15858
15884
|
const olderMatchesExist = matching.length > selected.length;
|
|
15859
15885
|
return {
|
|
15860
15886
|
entries: selected.map((entry) => entry.line),
|
|
15861
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
15862
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
15887
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _517 => _517[0], 'optionalAccess', _518 => _518.seq]), () => ( null)),
|
|
15888
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _519 => _519.at, 'call', _520 => _520(-1), 'optionalAccess', _521 => _521.seq]), () => ( null)),
|
|
15863
15889
|
truncated: result.truncated || olderMatchesExist,
|
|
15864
15890
|
hasMore: olderMatchesExist,
|
|
15865
|
-
nextCursor: olderMatchesExist ?
|
|
15891
|
+
nextCursor: olderMatchesExist ? _chunkK3BIRBT3js.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
15866
15892
|
};
|
|
15867
15893
|
}
|
|
15868
15894
|
async function handleRunEventSearch(args) {
|
|
@@ -15929,7 +15955,7 @@ ${usage2}`);
|
|
|
15929
15955
|
namespace,
|
|
15930
15956
|
...backend ? { backend } : {}
|
|
15931
15957
|
} : void 0;
|
|
15932
|
-
const client = new (0,
|
|
15958
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
15933
15959
|
const result = await client.runs.searchEvents({
|
|
15934
15960
|
...runId ? { runId } : {},
|
|
15935
15961
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -16002,7 +16028,7 @@ ${renderedDetails}` : ""}`;
|
|
|
16002
16028
|
String(limit),
|
|
16003
16029
|
"--json"
|
|
16004
16030
|
].join(" ") : null;
|
|
16005
|
-
|
|
16031
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
16006
16032
|
{
|
|
16007
16033
|
events,
|
|
16008
16034
|
nextCursor: result.nextCursor,
|
|
@@ -16013,19 +16039,19 @@ ${renderedDetails}` : ""}`;
|
|
|
16013
16039
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
16014
16040
|
},
|
|
16015
16041
|
{
|
|
16016
|
-
json:
|
|
16042
|
+
json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args),
|
|
16017
16043
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
16018
16044
|
}
|
|
16019
16045
|
);
|
|
16020
16046
|
return 0;
|
|
16021
16047
|
}
|
|
16022
16048
|
function buildRunLogsText(result) {
|
|
16023
|
-
const lines = result.entries.map((line) =>
|
|
16049
|
+
const lines = result.entries.map((line) => _chunkK3BIRBT3js.classifyLogLine.call(void 0, line).line);
|
|
16024
16050
|
if (result.warning) {
|
|
16025
16051
|
if (lines.length > 0) lines.push("");
|
|
16026
16052
|
lines.push(`warning: ${result.warning}`);
|
|
16027
16053
|
lines.push(
|
|
16028
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
16054
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _522 => _522.next, 'optionalAccess', _523 => _523.logs]), () => ( `deepline runs logs ${result.runId} --out run.log --json`))}`
|
|
16029
16055
|
);
|
|
16030
16056
|
}
|
|
16031
16057
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -16054,7 +16080,7 @@ async function handleRunStop(args) {
|
|
|
16054
16080
|
reason = args[++index];
|
|
16055
16081
|
}
|
|
16056
16082
|
}
|
|
16057
|
-
const client = new (0,
|
|
16083
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16058
16084
|
const result = await client.runs.stop(runId, { reason });
|
|
16059
16085
|
const state = resolveRunStopState(result);
|
|
16060
16086
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -16069,7 +16095,7 @@ async function handleRunStop(args) {
|
|
|
16069
16095
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
16070
16096
|
`inspect: deepline runs get ${runId} --full --json`
|
|
16071
16097
|
];
|
|
16072
|
-
|
|
16098
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
16073
16099
|
{
|
|
16074
16100
|
...cancelling,
|
|
16075
16101
|
state,
|
|
@@ -16084,7 +16110,7 @@ async function handleRunStop(args) {
|
|
|
16084
16110
|
]
|
|
16085
16111
|
}
|
|
16086
16112
|
},
|
|
16087
|
-
{ json:
|
|
16113
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args) }
|
|
16088
16114
|
);
|
|
16089
16115
|
return 0;
|
|
16090
16116
|
}
|
|
@@ -16101,7 +16127,7 @@ async function handleRunStop(args) {
|
|
|
16101
16127
|
];
|
|
16102
16128
|
process.stderr.write(`${lines2.join("\n")}
|
|
16103
16129
|
`);
|
|
16104
|
-
|
|
16130
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
16105
16131
|
{
|
|
16106
16132
|
...result,
|
|
16107
16133
|
render: {
|
|
@@ -16116,7 +16142,7 @@ async function handleRunStop(args) {
|
|
|
16116
16142
|
]
|
|
16117
16143
|
}
|
|
16118
16144
|
},
|
|
16119
|
-
{ json:
|
|
16145
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args) }
|
|
16120
16146
|
);
|
|
16121
16147
|
return 1;
|
|
16122
16148
|
}
|
|
@@ -16127,12 +16153,12 @@ async function handleRunStop(args) {
|
|
|
16127
16153
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
16128
16154
|
] : []
|
|
16129
16155
|
];
|
|
16130
|
-
|
|
16156
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
16131
16157
|
{
|
|
16132
16158
|
...result,
|
|
16133
16159
|
render: { sections: [{ title: "run stop", lines }] }
|
|
16134
16160
|
},
|
|
16135
|
-
{ json:
|
|
16161
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args) }
|
|
16136
16162
|
);
|
|
16137
16163
|
return 0;
|
|
16138
16164
|
}
|
|
@@ -16182,18 +16208,18 @@ async function handleRunStopAll(args) {
|
|
|
16182
16208
|
reason = args[++index];
|
|
16183
16209
|
}
|
|
16184
16210
|
}
|
|
16185
|
-
const client = new (0,
|
|
16211
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16186
16212
|
if (dryRun) {
|
|
16187
16213
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
16188
16214
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
16189
|
-
|
|
16215
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
16190
16216
|
{
|
|
16191
16217
|
...result2,
|
|
16192
16218
|
render: {
|
|
16193
16219
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
16194
16220
|
}
|
|
16195
16221
|
},
|
|
16196
|
-
{ json:
|
|
16222
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
16197
16223
|
` }
|
|
16198
16224
|
);
|
|
16199
16225
|
return 0;
|
|
@@ -16206,17 +16232,17 @@ async function handleRunStopAll(args) {
|
|
|
16206
16232
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
16207
16233
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
16208
16234
|
];
|
|
16209
|
-
|
|
16235
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
16210
16236
|
{
|
|
16211
16237
|
...result,
|
|
16212
16238
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
16213
16239
|
},
|
|
16214
|
-
{ json:
|
|
16240
|
+
{ json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args) }
|
|
16215
16241
|
);
|
|
16216
16242
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
16217
16243
|
}
|
|
16218
16244
|
async function handleRunExport(args) {
|
|
16219
|
-
const selection =
|
|
16245
|
+
const selection = _chunkGHLWDXUBjs.parseJsonFields.call(void 0, args, "export");
|
|
16220
16246
|
args = selection.args;
|
|
16221
16247
|
const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--json]";
|
|
16222
16248
|
let runId;
|
|
@@ -16275,16 +16301,16 @@ async function handleRunExport(args) {
|
|
|
16275
16301
|
"INVALID_ARGUMENT"
|
|
16276
16302
|
);
|
|
16277
16303
|
}
|
|
16278
|
-
const client = new (0,
|
|
16304
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16279
16305
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
16280
16306
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
16281
|
-
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !
|
|
16307
|
+
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkGHLWDXUBjs.argsWantJson.call(void 0, args));
|
|
16282
16308
|
try {
|
|
16283
16309
|
await waitForPlayCompletionByWatch({
|
|
16284
16310
|
client,
|
|
16285
16311
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
16286
16312
|
workflowId: runId,
|
|
16287
|
-
jsonOutput:
|
|
16313
|
+
jsonOutput: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args),
|
|
16288
16314
|
emitLogs: false,
|
|
16289
16315
|
waitTimeoutMs,
|
|
16290
16316
|
startedAt: Date.now(),
|
|
@@ -16307,26 +16333,26 @@ async function handleRunExport(args) {
|
|
|
16307
16333
|
datasetPath,
|
|
16308
16334
|
format
|
|
16309
16335
|
});
|
|
16310
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16311
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
16336
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _524 => _524.rowsInfo, 'access', _525 => _525.source]), () => ( datasetPath)), () => ( null));
|
|
16337
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _526 => _526.currentTable]) ? {
|
|
16312
16338
|
code: "CURRENT_SHARED_DATASET",
|
|
16313
16339
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
16314
16340
|
full_run_output_command: `deepline runs get ${status.runId} --full --json`
|
|
16315
16341
|
} : null;
|
|
16316
16342
|
const navigation = buildRunNavigation(status);
|
|
16317
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
16343
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _527 => _527.datasetInfo]);
|
|
16318
16344
|
const identity = navigation.datasets.find(
|
|
16319
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
16345
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _528 => _528.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _529 => _529.tableNamespace])
|
|
16320
16346
|
);
|
|
16321
16347
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
16322
16348
|
const exportCommand = runExportRetryCommand(
|
|
16323
16349
|
status.runId,
|
|
16324
16350
|
outPath,
|
|
16325
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
16351
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _530 => _530.datasetPath]))),
|
|
16326
16352
|
{ format }
|
|
16327
16353
|
);
|
|
16328
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16329
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
16354
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _531 => _531.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _532 => _532.path]), () => ( null)) };
|
|
16355
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _533 => _533.rowsInfo, 'access', _534 => _534.exportedRowOutcomes]);
|
|
16330
16356
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
16331
16357
|
count: exportedRowOutcomes.failed,
|
|
16332
16358
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -16346,17 +16372,17 @@ async function handleRunExport(args) {
|
|
|
16346
16372
|
...fileLocation,
|
|
16347
16373
|
format,
|
|
16348
16374
|
source,
|
|
16349
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16375
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _535 => _535.rowsInfo, 'access', _536 => _536.totalRows]), () => ( null)),
|
|
16350
16376
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
16351
16377
|
...rowFailures ? { rowFailures } : {},
|
|
16352
|
-
columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16378
|
+
columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _537 => _537.rowsInfo, 'access', _538 => _538.columns]), () => ( []))),
|
|
16353
16379
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
16354
16380
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
16355
16381
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
16356
16382
|
};
|
|
16357
16383
|
const lines = withRunNavigationLines(
|
|
16358
16384
|
[
|
|
16359
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
16385
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _539 => _539.path]), () => ( outPath))}`,
|
|
16360
16386
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
16361
16387
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
16362
16388
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -16383,8 +16409,8 @@ async function handleRunExport(args) {
|
|
|
16383
16409
|
"utf-8"
|
|
16384
16410
|
);
|
|
16385
16411
|
}
|
|
16386
|
-
|
|
16387
|
-
json:
|
|
16412
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0, payload, {
|
|
16413
|
+
json: _chunkGHLWDXUBjs.argsWantJson.call(void 0, args),
|
|
16388
16414
|
fields: selection.fields,
|
|
16389
16415
|
text: `${lines.join("\n")}
|
|
16390
16416
|
`
|
|
@@ -16405,10 +16431,10 @@ async function handlePlayGet(args) {
|
|
|
16405
16431
|
);
|
|
16406
16432
|
return 2;
|
|
16407
16433
|
}
|
|
16408
|
-
const client = new (0,
|
|
16434
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16409
16435
|
const explicitJson = args.includes("--json");
|
|
16410
16436
|
const sourceOutput = args.includes("--source");
|
|
16411
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
16437
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
16412
16438
|
const requestedRevisionFlags = [
|
|
16413
16439
|
args.includes("--working"),
|
|
16414
16440
|
args.includes("--live"),
|
|
@@ -16458,7 +16484,7 @@ async function handlePlayGet(args) {
|
|
|
16458
16484
|
...includeSource ? { source: sourceSelector } : {}
|
|
16459
16485
|
});
|
|
16460
16486
|
const source = detail.source;
|
|
16461
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
16487
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _540 => _540.files, 'access', _541 => _541[source.entryFile]]), () => ( ""));
|
|
16462
16488
|
let materializedFile = null;
|
|
16463
16489
|
try {
|
|
16464
16490
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -16468,7 +16494,7 @@ async function handlePlayGet(args) {
|
|
|
16468
16494
|
}
|
|
16469
16495
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
16470
16496
|
if (jsonOutput) {
|
|
16471
|
-
|
|
16497
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, {
|
|
16472
16498
|
...detail,
|
|
16473
16499
|
...materializedFile ? {
|
|
16474
16500
|
message: loadedMessage,
|
|
@@ -16509,11 +16535,11 @@ async function handlePlayGet(args) {
|
|
|
16509
16535
|
}
|
|
16510
16536
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
16511
16537
|
console.log(
|
|
16512
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
16538
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _542 => _542.play, 'access', _543 => _543.workingRevision, 'optionalAccess', _544 => _544.version]), () => ( "\u2014"))}`
|
|
16513
16539
|
);
|
|
16514
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
16540
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _545 => _545.play, 'access', _546 => _546.liveRevision, 'optionalAccess', _547 => _547.version]), () => ( "\u2014"))}`);
|
|
16515
16541
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
16516
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
16542
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _548 => _548.play, 'access', _549 => _549.liveRevision, 'optionalAccess', _550 => _550.version])) {
|
|
16517
16543
|
console.log(
|
|
16518
16544
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
16519
16545
|
);
|
|
@@ -16525,7 +16551,7 @@ async function handlePlayGet(args) {
|
|
|
16525
16551
|
console.log(line);
|
|
16526
16552
|
}
|
|
16527
16553
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
16528
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
16554
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _551 => _551.sheetSummary, 'optionalAccess', _552 => _552.stats, 'optionalAccess', _553 => _553.total]), () => ( 0))}`);
|
|
16529
16555
|
if (detail.customerDbUrl) {
|
|
16530
16556
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
16531
16557
|
}
|
|
@@ -16541,7 +16567,7 @@ async function handlePlayGet(args) {
|
|
|
16541
16567
|
return 0;
|
|
16542
16568
|
}
|
|
16543
16569
|
function formatVersionLine(version) {
|
|
16544
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
16570
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _554 => _554.artifactHash, 'optionalAccess', _555 => _555.slice, 'call', _556 => _556(0, 12)]), () => ( "unknown-revision"));
|
|
16545
16571
|
const state = [
|
|
16546
16572
|
version.isLive ? "live" : null,
|
|
16547
16573
|
version.isWorking ? "working" : null
|
|
@@ -16555,8 +16581,8 @@ async function handlePlayVersions(args) {
|
|
|
16555
16581
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
16556
16582
|
return 1;
|
|
16557
16583
|
}
|
|
16558
|
-
const client = new (0,
|
|
16559
|
-
const jsonOutput =
|
|
16584
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16585
|
+
const jsonOutput = _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
16560
16586
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16561
16587
|
command: "versions"
|
|
16562
16588
|
});
|
|
@@ -16564,7 +16590,7 @@ async function handlePlayVersions(args) {
|
|
|
16564
16590
|
parseReferencedPlayTarget2(playName).playName
|
|
16565
16591
|
);
|
|
16566
16592
|
if (jsonOutput) {
|
|
16567
|
-
|
|
16593
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, { versions });
|
|
16568
16594
|
return 0;
|
|
16569
16595
|
}
|
|
16570
16596
|
if (versions.length === 0) {
|
|
@@ -16596,11 +16622,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
16596
16622
|
"signals"
|
|
16597
16623
|
];
|
|
16598
16624
|
async function handlePlayList(args) {
|
|
16599
|
-
const jsonOutput =
|
|
16625
|
+
const jsonOutput = _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
16600
16626
|
const showCost = args.includes("--show-cost");
|
|
16601
|
-
const client = new (0,
|
|
16627
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16602
16628
|
const categoriesIndex = args.indexOf("--categories");
|
|
16603
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
16629
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _557 => _557[categoriesIndex + 1], 'optionalAccess', _558 => _558.trim, 'call', _559 => _559()]) : void 0;
|
|
16604
16630
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
16605
16631
|
if (args.includes("--tag") && tags.length === 0) {
|
|
16606
16632
|
console.error(
|
|
@@ -16621,7 +16647,7 @@ async function handlePlayList(args) {
|
|
|
16621
16647
|
const cursorIndex = args.indexOf("--cursor");
|
|
16622
16648
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
16623
16649
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
16624
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
16650
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _560 => _560.trim, 'call', _561 => _561()])) {
|
|
16625
16651
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
16626
16652
|
return 2;
|
|
16627
16653
|
}
|
|
@@ -16661,7 +16687,7 @@ async function handlePlayList(args) {
|
|
|
16661
16687
|
if (play.inputSchema || play.hasInputSchema) {
|
|
16662
16688
|
lines.push(" inputSchema: yes");
|
|
16663
16689
|
}
|
|
16664
|
-
if (_optionalChain([play, 'access',
|
|
16690
|
+
if (_optionalChain([play, 'access', _562 => _562.triggerStatus, 'optionalAccess', _563 => _563.cron])) {
|
|
16665
16691
|
lines.push(
|
|
16666
16692
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
16667
16693
|
);
|
|
@@ -16681,7 +16707,7 @@ async function handlePlayList(args) {
|
|
|
16681
16707
|
} else {
|
|
16682
16708
|
lines.push(" scheduled execution: not configured");
|
|
16683
16709
|
}
|
|
16684
|
-
if (_optionalChain([play, 'access',
|
|
16710
|
+
if (_optionalChain([play, 'access', _564 => _564.triggerStatus, 'optionalAccess', _565 => _565.webhook])) {
|
|
16685
16711
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
16686
16712
|
}
|
|
16687
16713
|
if (showCost) {
|
|
@@ -16695,7 +16721,7 @@ async function handlePlayList(args) {
|
|
|
16695
16721
|
lines.push("List truncated \u2014 more plays are available.");
|
|
16696
16722
|
lines.push(`Next page: ${nextPage}`);
|
|
16697
16723
|
}
|
|
16698
|
-
|
|
16724
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
16699
16725
|
{
|
|
16700
16726
|
plays,
|
|
16701
16727
|
count: plays.length,
|
|
@@ -16712,8 +16738,8 @@ async function handlePlayList(args) {
|
|
|
16712
16738
|
return 0;
|
|
16713
16739
|
}
|
|
16714
16740
|
async function handlePlayPin(args, pinned) {
|
|
16715
|
-
const target = _optionalChain([args, 'access',
|
|
16716
|
-
const jsonOutput =
|
|
16741
|
+
const target = _optionalChain([args, 'access', _566 => _566.find, 'call', _567 => _567((arg) => !arg.startsWith("-")), 'optionalAccess', _568 => _568.trim, 'call', _569 => _569()]);
|
|
16742
|
+
const jsonOutput = _chunkGHLWDXUBjs.argsWantJson.call(void 0, args);
|
|
16717
16743
|
const dryRun = args.includes("--dry-run");
|
|
16718
16744
|
if (!target) {
|
|
16719
16745
|
console.error(
|
|
@@ -16731,11 +16757,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
16731
16757
|
const name = parsedTarget.playName;
|
|
16732
16758
|
const plan = { name, pinned, dryRun };
|
|
16733
16759
|
if (dryRun) {
|
|
16734
|
-
|
|
16760
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, plan);
|
|
16735
16761
|
return 0;
|
|
16736
16762
|
}
|
|
16737
|
-
const result = await new (0,
|
|
16738
|
-
if (jsonOutput)
|
|
16763
|
+
const result = await new (0, _chunkK3BIRBT3js.DeeplineClient)().setPlayPinned(name, pinned);
|
|
16764
|
+
if (jsonOutput) _chunkGHLWDXUBjs.printCompactJson.call(void 0, result);
|
|
16739
16765
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
16740
16766
|
return 0;
|
|
16741
16767
|
}
|
|
@@ -16751,7 +16777,7 @@ function csvColumnLines(csvInput) {
|
|
|
16751
16777
|
const headers = [defaults[column]].flat().filter((header) => header && header !== column);
|
|
16752
16778
|
return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
|
|
16753
16779
|
}),
|
|
16754
|
-
|
|
16780
|
+
_chunkK3BIRBT3js.CSV_HEADER_MATCHING_NOTE
|
|
16755
16781
|
];
|
|
16756
16782
|
}
|
|
16757
16783
|
function describedPlay(play) {
|
|
@@ -16819,7 +16845,7 @@ function printPlayDescription(play) {
|
|
|
16819
16845
|
console.log(` ${line}`);
|
|
16820
16846
|
}
|
|
16821
16847
|
}
|
|
16822
|
-
if (_optionalChain([play, 'access',
|
|
16848
|
+
if (_optionalChain([play, 'access', _570 => _570.toolCategories, 'optionalAccess', _571 => _571.length])) {
|
|
16823
16849
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
16824
16850
|
}
|
|
16825
16851
|
if (play.aliases.length > 0) {
|
|
@@ -16864,7 +16890,7 @@ function printPlayDescription(play) {
|
|
|
16864
16890
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
16865
16891
|
if (runtimeLimit) {
|
|
16866
16892
|
console.log(
|
|
16867
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
16893
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _572 => _572.runtimeLimit, 'optionalAccess', _573 => _573.source]), () => ( "live"))})`
|
|
16868
16894
|
);
|
|
16869
16895
|
}
|
|
16870
16896
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -16890,17 +16916,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
16890
16916
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
16891
16917
|
}
|
|
16892
16918
|
async function handlePlayGrep(args) {
|
|
16893
|
-
const query = _optionalChain([args, 'access',
|
|
16919
|
+
const query = _optionalChain([args, 'access', _574 => _574[0], 'optionalAccess', _575 => _575.trim, 'call', _576 => _576()]);
|
|
16894
16920
|
if (!query) {
|
|
16895
16921
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
16896
16922
|
return 1;
|
|
16897
16923
|
}
|
|
16898
|
-
const client = new (0,
|
|
16924
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16899
16925
|
const results = (await client.listPlays({ grep: query })).map(
|
|
16900
16926
|
summarizePlayGrepResult
|
|
16901
16927
|
);
|
|
16902
|
-
if (
|
|
16903
|
-
|
|
16928
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
16929
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, {
|
|
16904
16930
|
plays: results,
|
|
16905
16931
|
count: results.length,
|
|
16906
16932
|
query,
|
|
@@ -16914,7 +16940,7 @@ async function handlePlayGrep(args) {
|
|
|
16914
16940
|
`
|
|
16915
16941
|
);
|
|
16916
16942
|
for (const result of results) {
|
|
16917
|
-
console.log(_optionalChain([result, 'access',
|
|
16943
|
+
console.log(_optionalChain([result, 'access', _577 => _577.displayName, 'optionalAccess', _578 => _578.trim, 'call', _579 => _579()]) || result.name);
|
|
16918
16944
|
const matches = formatPlayGrepMatches(result.matches);
|
|
16919
16945
|
if (matches) console.log(` Matched: ${matches}`);
|
|
16920
16946
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -16923,7 +16949,7 @@ async function handlePlayGrep(args) {
|
|
|
16923
16949
|
return 0;
|
|
16924
16950
|
}
|
|
16925
16951
|
async function handlePlayDescribe(args) {
|
|
16926
|
-
const selection =
|
|
16952
|
+
const selection = _chunkGHLWDXUBjs.parseJsonFields.call(void 0, args, "describe");
|
|
16927
16953
|
args = selection.args;
|
|
16928
16954
|
const playName = args[0];
|
|
16929
16955
|
if (!playName) {
|
|
@@ -16957,8 +16983,8 @@ async function handlePlayDescribe(args) {
|
|
|
16957
16983
|
`deepline plays check ${playName}`,
|
|
16958
16984
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
16959
16985
|
];
|
|
16960
|
-
if (
|
|
16961
|
-
|
|
16986
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
16987
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, {
|
|
16962
16988
|
ok: false,
|
|
16963
16989
|
error: { message },
|
|
16964
16990
|
next
|
|
@@ -16972,7 +16998,7 @@ async function handlePlayDescribe(args) {
|
|
|
16972
16998
|
}
|
|
16973
16999
|
return 2;
|
|
16974
17000
|
}
|
|
16975
|
-
const client = new (0,
|
|
17001
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
16976
17002
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16977
17003
|
command: "describe"
|
|
16978
17004
|
});
|
|
@@ -16982,9 +17008,9 @@ async function handlePlayDescribe(args) {
|
|
|
16982
17008
|
compact: args.includes("--compact")
|
|
16983
17009
|
}
|
|
16984
17010
|
);
|
|
16985
|
-
if (
|
|
16986
|
-
if (selection.fields)
|
|
16987
|
-
else
|
|
17011
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
17012
|
+
if (selection.fields) _chunkGHLWDXUBjs.printJson.call(void 0, play, selection.fields);
|
|
17013
|
+
else _chunkGHLWDXUBjs.printCompactJson.call(void 0, play);
|
|
16988
17014
|
return 0;
|
|
16989
17015
|
}
|
|
16990
17016
|
printPlayDescription(play);
|
|
@@ -17028,7 +17054,7 @@ async function handlePlaySave(args) {
|
|
|
17028
17054
|
next: `deepline plays check ${shellQuote3(options.target)}`
|
|
17029
17055
|
};
|
|
17030
17056
|
if (options.jsonOutput) {
|
|
17031
|
-
|
|
17057
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result);
|
|
17032
17058
|
} else {
|
|
17033
17059
|
console.error(result.message);
|
|
17034
17060
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -17050,7 +17076,7 @@ async function handlePlaySave(args) {
|
|
|
17050
17076
|
};
|
|
17051
17077
|
if (options.dryRun) {
|
|
17052
17078
|
if (options.jsonOutput) {
|
|
17053
|
-
|
|
17079
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, dryRun);
|
|
17054
17080
|
} else {
|
|
17055
17081
|
console.log(`Dry run: ${playName}`);
|
|
17056
17082
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17059,7 +17085,7 @@ async function handlePlaySave(args) {
|
|
|
17059
17085
|
}
|
|
17060
17086
|
return 0;
|
|
17061
17087
|
}
|
|
17062
|
-
const client = new (0,
|
|
17088
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
17063
17089
|
try {
|
|
17064
17090
|
await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
17065
17091
|
"cli.play_save_compile_manifests",
|
|
@@ -17095,7 +17121,7 @@ async function handlePlaySave(args) {
|
|
|
17095
17121
|
}
|
|
17096
17122
|
};
|
|
17097
17123
|
if (options.jsonOutput) {
|
|
17098
|
-
|
|
17124
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result);
|
|
17099
17125
|
} else {
|
|
17100
17126
|
console.log(
|
|
17101
17127
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -17121,7 +17147,7 @@ async function handlePlayPublish(args) {
|
|
|
17121
17147
|
}
|
|
17122
17148
|
const { target: playName, useLatest } = options;
|
|
17123
17149
|
let revisionId = options.revisionId;
|
|
17124
|
-
const client = new (0,
|
|
17150
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
17125
17151
|
if (isFileTarget(playName)) {
|
|
17126
17152
|
if (revisionId || useLatest) {
|
|
17127
17153
|
console.error(
|
|
@@ -17153,7 +17179,7 @@ async function handlePlayPublish(args) {
|
|
|
17153
17179
|
next: `deepline plays check ${shellQuote3(playName)}`
|
|
17154
17180
|
};
|
|
17155
17181
|
if (options.jsonOutput) {
|
|
17156
|
-
|
|
17182
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result3);
|
|
17157
17183
|
} else {
|
|
17158
17184
|
console.error(result3.message);
|
|
17159
17185
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -17176,7 +17202,7 @@ async function handlePlayPublish(args) {
|
|
|
17176
17202
|
};
|
|
17177
17203
|
if (options.dryRun) {
|
|
17178
17204
|
if (options.jsonOutput) {
|
|
17179
|
-
|
|
17205
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, dryRun);
|
|
17180
17206
|
} else {
|
|
17181
17207
|
console.log(`Dry run: ${rootPlayName}`);
|
|
17182
17208
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17234,17 +17260,17 @@ async function handlePlayPublish(args) {
|
|
|
17234
17260
|
artifactHash,
|
|
17235
17261
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
17236
17262
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
17237
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
17238
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
17263
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _580 => _580.version]), () => ( null)),
|
|
17264
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _581 => _581.artifactHash]), () => ( null)),
|
|
17239
17265
|
sourceBytes: {
|
|
17240
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
17266
|
+
before: _optionalChain([previousLive, 'optionalAccess', _582 => _582.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
17241
17267
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
17242
17268
|
},
|
|
17243
17269
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
17244
17270
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
17245
17271
|
};
|
|
17246
17272
|
if (options.jsonOutput) {
|
|
17247
|
-
|
|
17273
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result2);
|
|
17248
17274
|
} else {
|
|
17249
17275
|
printPublishReceipt({
|
|
17250
17276
|
name: rootPlayName,
|
|
@@ -17275,14 +17301,14 @@ async function handlePlayPublish(args) {
|
|
|
17275
17301
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
17276
17302
|
latest: useLatest
|
|
17277
17303
|
};
|
|
17278
|
-
|
|
17304
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result2);
|
|
17279
17305
|
return 0;
|
|
17280
17306
|
}
|
|
17281
17307
|
const resolvedName = parseReferencedPlayTarget2(playName).playName;
|
|
17282
17308
|
if (useLatest) {
|
|
17283
17309
|
const versions = await client.listPlayVersions(resolvedName);
|
|
17284
17310
|
const latest = versions[0];
|
|
17285
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
17311
|
+
if (!_optionalChain([latest, 'optionalAccess', _583 => _583._id])) {
|
|
17286
17312
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
17287
17313
|
return 1;
|
|
17288
17314
|
}
|
|
@@ -17299,7 +17325,7 @@ async function handlePlayPublish(args) {
|
|
|
17299
17325
|
revisionId ? { revisionId } : {}
|
|
17300
17326
|
);
|
|
17301
17327
|
if (options.jsonOutput) {
|
|
17302
|
-
|
|
17328
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result);
|
|
17303
17329
|
} else {
|
|
17304
17330
|
printPublishReceipt({
|
|
17305
17331
|
name: result.name,
|
|
@@ -17339,7 +17365,7 @@ async function handlePlayDelete(args) {
|
|
|
17339
17365
|
);
|
|
17340
17366
|
return 2;
|
|
17341
17367
|
}
|
|
17342
|
-
const client = new (0,
|
|
17368
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
17343
17369
|
let detail;
|
|
17344
17370
|
try {
|
|
17345
17371
|
detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
|
|
@@ -17363,8 +17389,8 @@ async function handlePlayDelete(args) {
|
|
|
17363
17389
|
name: resolvedName,
|
|
17364
17390
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
17365
17391
|
};
|
|
17366
|
-
if (
|
|
17367
|
-
|
|
17392
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
17393
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result2);
|
|
17368
17394
|
} else {
|
|
17369
17395
|
process.stdout.write(
|
|
17370
17396
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -17374,8 +17400,8 @@ async function handlePlayDelete(args) {
|
|
|
17374
17400
|
return 0;
|
|
17375
17401
|
}
|
|
17376
17402
|
const result = await client.deletePlay(resolvedName);
|
|
17377
|
-
if (
|
|
17378
|
-
|
|
17403
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
17404
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result);
|
|
17379
17405
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
17380
17406
|
}
|
|
17381
17407
|
if (result.alreadyArchived) {
|
|
@@ -17414,13 +17440,13 @@ async function handlePlayRestore(args) {
|
|
|
17414
17440
|
);
|
|
17415
17441
|
return 2;
|
|
17416
17442
|
}
|
|
17417
|
-
const client = new (0,
|
|
17443
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
17418
17444
|
try {
|
|
17419
17445
|
const result = await client.restorePlay(
|
|
17420
17446
|
parseReferencedPlayTarget2(playName).playName
|
|
17421
17447
|
);
|
|
17422
|
-
if (
|
|
17423
|
-
|
|
17448
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
17449
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, result);
|
|
17424
17450
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
17425
17451
|
}
|
|
17426
17452
|
if (result.alreadyActive) {
|
|
@@ -17525,7 +17551,7 @@ Examples:
|
|
|
17525
17551
|
).action(async (target, options) => {
|
|
17526
17552
|
process.exitCode = await handlePlayCheck([
|
|
17527
17553
|
target,
|
|
17528
|
-
...
|
|
17554
|
+
..._chunkGHLWDXUBjs.jsonFieldArgs.call(void 0, options.json),
|
|
17529
17555
|
...options.full ? ["--full"] : []
|
|
17530
17556
|
]);
|
|
17531
17557
|
});
|
|
@@ -17712,7 +17738,7 @@ JSON field selection:
|
|
|
17712
17738
|
...options.maxConcurrentRows ? ["--max-concurrent-rows", options.maxConcurrentRows] : [],
|
|
17713
17739
|
...options.open ? ["--open"] : [],
|
|
17714
17740
|
...options.debugMapLatency ? ["--debug-map-latency"] : [],
|
|
17715
|
-
...
|
|
17741
|
+
..._chunkGHLWDXUBjs.jsonFieldArgs.call(void 0, options.json),
|
|
17716
17742
|
...options.full ? ["--full"] : [],
|
|
17717
17743
|
...passthroughArgs
|
|
17718
17744
|
]);
|
|
@@ -17767,9 +17793,9 @@ Examples:
|
|
|
17767
17793
|
const limit = Number(options.historyLimit);
|
|
17768
17794
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
17769
17795
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
17770
|
-
const client = new (0,
|
|
17796
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
17771
17797
|
if (options.binding) {
|
|
17772
|
-
|
|
17798
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0,
|
|
17773
17799
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
17774
17800
|
);
|
|
17775
17801
|
return;
|
|
@@ -17777,7 +17803,7 @@ Examples:
|
|
|
17777
17803
|
const result = await client.listPlayTriggerInventory({
|
|
17778
17804
|
cursor: options.cursor
|
|
17779
17805
|
});
|
|
17780
|
-
|
|
17806
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, {
|
|
17781
17807
|
...result,
|
|
17782
17808
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
|
|
17783
17809
|
});
|
|
@@ -17824,7 +17850,7 @@ Examples:
|
|
|
17824
17850
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
17825
17851
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
17826
17852
|
}
|
|
17827
|
-
const result = await new (0,
|
|
17853
|
+
const result = await new (0, _chunkK3BIRBT3js.DeeplineClient)().getPlaysActivity({
|
|
17828
17854
|
timeZone: options.timeZone,
|
|
17829
17855
|
days,
|
|
17830
17856
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -17838,7 +17864,7 @@ Examples:
|
|
|
17838
17864
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
17839
17865
|
);
|
|
17840
17866
|
}
|
|
17841
|
-
|
|
17867
|
+
_chunkGHLWDXUBjs.printCommandEnvelope.call(void 0,
|
|
17842
17868
|
{ ...result },
|
|
17843
17869
|
{
|
|
17844
17870
|
json: options.json || !process.stdout.isTTY,
|
|
@@ -17867,7 +17893,7 @@ Examples:
|
|
|
17867
17893
|
false
|
|
17868
17894
|
);
|
|
17869
17895
|
});
|
|
17870
|
-
|
|
17896
|
+
_chunkPJERS5VWjs.registerDeprecatedSearchCommand.call(void 0,
|
|
17871
17897
|
play,
|
|
17872
17898
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
17873
17899
|
);
|
|
@@ -17911,7 +17937,7 @@ Examples:
|
|
|
17911
17937
|
);
|
|
17912
17938
|
_chunkXNL3SEMCjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
17913
17939
|
async (target, options) => {
|
|
17914
|
-
const ownView = () => handlePlayDescribe(
|
|
17940
|
+
const ownView = () => handlePlayDescribe(_chunkGHLWDXUBjs.describeArgs.call(void 0, target, options));
|
|
17915
17941
|
const [flagText] = [options.json].filter(
|
|
17916
17942
|
(value) => typeof value === "string"
|
|
17917
17943
|
);
|
|
@@ -17922,7 +17948,7 @@ Examples:
|
|
|
17922
17948
|
process.exitCode = await ownView();
|
|
17923
17949
|
return;
|
|
17924
17950
|
}
|
|
17925
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
17951
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-UKFV376D.js")));
|
|
17926
17952
|
process.exitCode = await describeAnything(
|
|
17927
17953
|
name,
|
|
17928
17954
|
{
|
|
@@ -18039,7 +18065,7 @@ Examples:
|
|
|
18039
18065
|
deepline plays deployments <deployment-id>
|
|
18040
18066
|
`
|
|
18041
18067
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
|
|
18042
|
-
async (id, options) => id ?
|
|
18068
|
+
async (id, options) => id ? _chunk35YXDTOBjs.handleDeploymentGet.call(void 0, id, options) : _chunk35YXDTOBjs.handleDeploymentsList.call(void 0, options)
|
|
18043
18069
|
);
|
|
18044
18070
|
addPublishHelp(
|
|
18045
18071
|
play.command("publish <target>").description(
|
|
@@ -18219,7 +18245,7 @@ Examples:
|
|
|
18219
18245
|
).action(async (runId, options) => {
|
|
18220
18246
|
process.exitCode = await handleRunGet([
|
|
18221
18247
|
runId,
|
|
18222
|
-
...
|
|
18248
|
+
..._chunkGHLWDXUBjs.jsonFieldArgs.call(void 0, options.json),
|
|
18223
18249
|
...options.full ? ["--full"] : [],
|
|
18224
18250
|
...options.input ? ["--input"] : [],
|
|
18225
18251
|
...options.config ? ["--config"] : [],
|
|
@@ -18494,7 +18520,7 @@ Examples:
|
|
|
18494
18520
|
...options.metadataOut ? ["--metadata-out", options.metadataOut] : [],
|
|
18495
18521
|
...options.wait ? ["--wait"] : [],
|
|
18496
18522
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
18497
|
-
...
|
|
18523
|
+
..._chunkGHLWDXUBjs.jsonFieldArgs.call(void 0, options.json)
|
|
18498
18524
|
]);
|
|
18499
18525
|
});
|
|
18500
18526
|
const share = play.command("share").description(
|
|
@@ -18635,8 +18661,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
18635
18661
|
}
|
|
18636
18662
|
function shareUrlFields(status) {
|
|
18637
18663
|
return {
|
|
18638
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
18639
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
18664
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _584 => _584.share, 'optionalAccess', _585 => _585.publicPath])),
|
|
18665
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _586 => _586.share, 'optionalAccess', _587 => _587.canonicalPath]))
|
|
18640
18666
|
};
|
|
18641
18667
|
}
|
|
18642
18668
|
function shareStatusForOutput(status) {
|
|
@@ -18660,10 +18686,10 @@ async function handlePlayShareStatus(args) {
|
|
|
18660
18686
|
return 2;
|
|
18661
18687
|
}
|
|
18662
18688
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18663
|
-
const status = await new (0,
|
|
18689
|
+
const status = await new (0, _chunkK3BIRBT3js.DeeplineClient)().getSharePage(name);
|
|
18664
18690
|
const outputStatus = shareStatusForOutput(status);
|
|
18665
|
-
if (
|
|
18666
|
-
|
|
18691
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
18692
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, outputStatus);
|
|
18667
18693
|
return 0;
|
|
18668
18694
|
}
|
|
18669
18695
|
if (!outputStatus.share) {
|
|
@@ -18702,7 +18728,7 @@ async function handlePlaySharePublish(args) {
|
|
|
18702
18728
|
return 2;
|
|
18703
18729
|
}
|
|
18704
18730
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18705
|
-
const client = new (0,
|
|
18731
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
18706
18732
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18707
18733
|
let resolvedVersion;
|
|
18708
18734
|
if (!revisionId) {
|
|
@@ -18733,8 +18759,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18733
18759
|
);
|
|
18734
18760
|
if (!hasCompleted) {
|
|
18735
18761
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
18736
|
-
if (
|
|
18737
|
-
|
|
18762
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
18763
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, {
|
|
18738
18764
|
ok: false,
|
|
18739
18765
|
code: "NO_SUCCESSFUL_RUN",
|
|
18740
18766
|
message,
|
|
@@ -18758,8 +18784,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18758
18784
|
};
|
|
18759
18785
|
if (args.includes("--dry-run")) {
|
|
18760
18786
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
18761
|
-
if (
|
|
18762
|
-
|
|
18787
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
18788
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, plan);
|
|
18763
18789
|
} else {
|
|
18764
18790
|
console.log(
|
|
18765
18791
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -18769,13 +18795,13 @@ async function handlePlaySharePublish(args) {
|
|
|
18769
18795
|
}
|
|
18770
18796
|
const status = await client.publishSharePage(name, request);
|
|
18771
18797
|
const outputStatus = shareStatusForOutput(status);
|
|
18772
|
-
if (
|
|
18773
|
-
|
|
18798
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
18799
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, outputStatus);
|
|
18774
18800
|
return 0;
|
|
18775
18801
|
}
|
|
18776
18802
|
const urls = shareUrlFields(outputStatus);
|
|
18777
18803
|
console.log(
|
|
18778
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
18804
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _588 => _588.share, 'optionalAccess', _589 => _589.publicPath]))), () => ( ""))}`
|
|
18779
18805
|
);
|
|
18780
18806
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
18781
18807
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -18801,9 +18827,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
18801
18827
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
18802
18828
|
...seoIndexing ? { seoIndexing } : {}
|
|
18803
18829
|
};
|
|
18804
|
-
const status = await new (0,
|
|
18805
|
-
if (
|
|
18806
|
-
|
|
18830
|
+
const status = await new (0, _chunkK3BIRBT3js.DeeplineClient)().updateSharePage(name, request);
|
|
18831
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
18832
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, status);
|
|
18807
18833
|
return 0;
|
|
18808
18834
|
}
|
|
18809
18835
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -18818,13 +18844,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18818
18844
|
return 2;
|
|
18819
18845
|
}
|
|
18820
18846
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18821
|
-
const client = new (0,
|
|
18847
|
+
const client = new (0, _chunkK3BIRBT3js.DeeplineClient)();
|
|
18822
18848
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18823
18849
|
const versionFlag = shareFlagValue(args, "--version");
|
|
18824
18850
|
if (!revisionId && versionFlag) {
|
|
18825
18851
|
const versions = await client.listPlayVersions(name);
|
|
18826
18852
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
18827
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
18853
|
+
if (!_optionalChain([chosen, 'optionalAccess', _590 => _590._id])) {
|
|
18828
18854
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
18829
18855
|
return 4;
|
|
18830
18856
|
}
|
|
@@ -18835,12 +18861,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18835
18861
|
revisionId ? { revisionId } : {}
|
|
18836
18862
|
);
|
|
18837
18863
|
const outputStatus = shareStatusForOutput(status);
|
|
18838
|
-
if (
|
|
18839
|
-
|
|
18864
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
18865
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, outputStatus);
|
|
18840
18866
|
return 0;
|
|
18841
18867
|
}
|
|
18842
18868
|
const urls = shareUrlFields(outputStatus);
|
|
18843
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
18869
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _591 => _591.share, 'optionalAccess', _592 => _592.publishedRevisionId]) === revisionId;
|
|
18844
18870
|
console.log(
|
|
18845
18871
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
18846
18872
|
);
|
|
@@ -18861,9 +18887,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
18861
18887
|
return 2;
|
|
18862
18888
|
}
|
|
18863
18889
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18864
|
-
const status = await new (0,
|
|
18865
|
-
if (
|
|
18866
|
-
|
|
18890
|
+
const status = await new (0, _chunkK3BIRBT3js.DeeplineClient)().unpublishSharePage(name);
|
|
18891
|
+
if (_chunkGHLWDXUBjs.argsWantJson.call(void 0, args)) {
|
|
18892
|
+
_chunkGHLWDXUBjs.printCompactJson.call(void 0, status);
|
|
18867
18893
|
return 0;
|
|
18868
18894
|
}
|
|
18869
18895
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|