deepline 0.3.381 → 0.3.382
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/release.ts +1 -1
- package/dist/cli/auth-GFQMA47B.js +39 -0
- package/dist/cli/{auth-M2WCVLXM.mjs → auth-K7TZOYYE.mjs} +4 -4
- package/dist/cli/{billing-J5FSVZB4.js → billing-4P4N53UW.js} +73 -73
- package/dist/cli/{billing-B4XB5L63.mjs → billing-TDW5SHSL.mjs} +4 -4
- package/dist/cli/{chunk-D2G6W7ES.js → chunk-3BRXZZNU.js} +50 -50
- package/dist/cli/{chunk-RJDYOGD3.mjs → chunk-3QHSILOH.mjs} +2 -2
- package/dist/cli/{chunk-OKGOQKW7.js → chunk-5WVT7NHI.js} +48 -48
- package/dist/cli/{chunk-Z2EKAUHJ.mjs → chunk-5XYEFAFI.mjs} +1 -1
- package/dist/cli/{chunk-QOK7SKSZ.mjs → chunk-ANHZWK2M.mjs} +3 -3
- package/dist/cli/{chunk-CFHQRESG.mjs → chunk-BNRRVGGW.mjs} +1 -1
- package/dist/cli/{chunk-PPO4FG7O.js → chunk-BSPOALWK.js} +432 -392
- package/dist/cli/{chunk-Y3FOW4TU.mjs → chunk-DHV54G6M.mjs} +5 -5
- package/dist/cli/{chunk-RWSPU3RI.js → chunk-ERGADEMS.js} +2 -2
- package/dist/cli/{chunk-IXRQGX74.mjs → chunk-FEIKELZA.mjs} +4 -4
- package/dist/cli/{chunk-4Q4SQJBF.mjs → chunk-H4Q2JRPD.mjs} +1 -1
- package/dist/cli/{chunk-2IB2RBCY.js → chunk-ID57OQBZ.js} +1 -1
- package/dist/cli/{chunk-5UC6VEXF.js → chunk-IMKWP4UQ.js} +4 -4
- package/dist/cli/{chunk-SPJI6J44.js → chunk-IWNJYV27.js} +8 -8
- package/dist/cli/{chunk-Q7VDVBZW.mjs → chunk-J6253YWF.mjs} +3 -3
- package/dist/cli/{chunk-AQ4HP2GF.js → chunk-JLNMJAWS.js} +9 -9
- package/dist/cli/{chunk-N36BQUUU.mjs → chunk-LFY4APCO.mjs} +3 -2
- package/dist/cli/{chunk-NEU3YVPF.mjs → chunk-NYS7324H.mjs} +50 -10
- package/dist/cli/{chunk-IX6IEN5B.mjs → chunk-QGBXUPY3.mjs} +2 -2
- package/dist/cli/{chunk-RK72YKI7.js → chunk-SGG4X23E.js} +26 -26
- package/dist/cli/{chunk-KQFDSP5O.js → chunk-SK6KH37M.js} +8 -8
- package/dist/cli/{chunk-UTVDVZTM.js → chunk-TOLORRDI.js} +62 -61
- package/dist/cli/{chunk-4P35MBCK.mjs → chunk-UKG2DJLZ.mjs} +1 -1
- package/dist/cli/{chunk-FDB2YGWF.js → chunk-YYHROETZ.js} +15 -15
- package/dist/cli/{chunk-HJWXXZVG.js → chunk-ZP7Z3TZ3.js} +8 -8
- package/dist/cli/{chunk-PWCQM4SD.mjs → chunk-ZPD4NZKT.mjs} +2 -2
- package/dist/cli/{csv-RG6EPZAF.js → csv-GJB3PQ6I.js} +12 -12
- package/dist/cli/{csv-XK2U7OOP.mjs → csv-T4A374D5.mjs} +3 -3
- package/dist/cli/{db-LVXEM4JK.mjs → db-CMXCGD3G.mjs} +4 -4
- package/dist/cli/{db-LVFZMURX.js → db-J2J5BJOH.js} +29 -29
- package/dist/cli/{describe-F52KVIU5.js → describe-HW2SROYB.js} +44 -18
- package/dist/cli/{describe-CGNNGI7D.mjs → describe-MN4MJ6DD.mjs} +36 -10
- package/dist/cli/{executions-QVNYM6G5.js → executions-DZB6R7OV.js} +6 -6
- package/dist/cli/{executions-IFQ4VFOW.mjs → executions-O4CCBVC4.mjs} +4 -4
- package/dist/cli/{feedback-GE2HJ3RV.js → feedback-N6HDCLQ6.js} +7 -7
- package/dist/cli/{feedback-XQZGZLJD.mjs → feedback-YMOM6INL.mjs} +3 -3
- package/dist/cli/git-FCDTBBB3.js +23 -0
- package/dist/cli/{git-VHYPESNC.mjs → git-LEC7GJLK.mjs} +4 -4
- package/dist/cli/index.js +174 -83
- package/dist/cli/index.mjs +123 -32
- package/dist/cli/{legacy-noops-MEVZKOQO.js → legacy-noops-GFXVUEHX.js} +7 -7
- package/dist/cli/{legacy-noops-H3LBMAJD.mjs → legacy-noops-K27TS7LE.mjs} +4 -4
- package/dist/cli/{monitors-6LBPWRV2.js → monitors-HFT37OOR.js} +85 -85
- package/dist/cli/{monitors-QCDXTRJG.mjs → monitors-QCLSYMKW.mjs} +4 -4
- package/dist/cli/{org-ZCGJFGH2.js → org-4CADZYFV.js} +64 -64
- package/dist/cli/{org-R3Q75N6B.mjs → org-UXQ6LVOX.mjs} +4 -4
- package/dist/cli/play-2EJN5QAI.js +157 -0
- package/dist/cli/{play-AQ6P4KHZ.mjs → play-FOQPC7BY.mjs} +9 -7
- package/dist/cli/{providers-DD7F2EB3.mjs → providers-HG3GZRFS.mjs} +4 -4
- package/dist/cli/{providers-HQRVMENG.js → providers-W3RK2G2A.js} +7 -7
- package/dist/cli/{quickstart-IHSZ24SF.js → quickstart-7VXWMWC6.js} +5 -5
- package/dist/cli/{quickstart-IQOBN4JH.mjs → quickstart-DQKAUJFG.mjs} +3 -3
- package/dist/cli/{search-DQERH2AR.mjs → search-LDGEJTLL.mjs} +5 -5
- package/dist/cli/search-MLQXX25Z.js +26 -0
- package/dist/cli/{secrets-XY5226V2.js → secrets-3NHMB236.js} +13 -13
- package/dist/cli/{secrets-WNAU3O75.mjs → secrets-VEOZ5FT6.mjs} +4 -4
- package/dist/cli/{sessions-R53JPCM4.js → sessions-I4FKREEM.js} +5 -5
- package/dist/cli/{sessions-P7UZU5LC.mjs → sessions-UYLIL756.mjs} +4 -4
- package/dist/cli/{settings-5QHIIX4A.js → settings-BLNPNNLM.js} +74 -74
- package/dist/cli/{settings-JQLWULCE.mjs → settings-RA3XIJWS.mjs} +7 -7
- package/dist/cli/{setup-BKCG5BRF.mjs → setup-OAU6HQOG.mjs} +6 -6
- package/dist/cli/{setup-3UXOGSKW.js → setup-YFJJQF6T.js} +41 -41
- package/dist/cli/skills-P3HX4XRQ.js +28 -0
- package/dist/cli/{skills-5BBTJHXZ.mjs → skills-XF7YND7M.mjs} +4 -4
- package/dist/cli/{tools-7EQFFGWU.mjs → tools-7CJTNQDV.mjs} +6 -6
- package/dist/cli/tools-SHVTCQ2K.js +40 -0
- package/dist/cli/update-TI6YJEOZ.js +28 -0
- package/dist/cli/{update-KFMOWN7F.mjs → update-WD2X3EZD.mjs} +6 -6
- package/dist/cli/{workflow-PGSPHWFA.js → workflow-32EMNRWX.js} +15 -15
- package/dist/cli/{workflow-JMBTBZGY.mjs → workflow-AW6GZHG2.mjs} +5 -5
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +72 -72
- 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-T3F2NI55.js +0 -39
- package/dist/cli/git-QADGD7ZL.js +0 -23
- package/dist/cli/play-AFDVNXFL.js +0 -155
- package/dist/cli/search-KQNM6AHE.js +0 -26
- package/dist/cli/skills-7X24WLXD.js +0 -28
- package/dist/cli/tools-HQFR3CYC.js +0 -40
- package/dist/cli/update-MP6SY5LY.js +0 -28
|
@@ -19,11 +19,11 @@ var _chunkQGKPTBRRjs = require('./chunk-QGKPTBRR.js');
|
|
|
19
19
|
var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkIWNJYV27js = require('./chunk-IWNJYV27.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkSGG4X23Ejs = require('./chunk-SGG4X23E.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -42,7 +42,7 @@ var _chunkGEJDBXXMjs = require('./chunk-GEJDBXXM.js');
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _chunkJLNMJAWSjs = require('./chunk-JLNMJAWS.js');
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
@@ -75,10 +75,10 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
var
|
|
78
|
+
var _chunkSK6KH37Mjs = require('./chunk-SK6KH37M.js');
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
var
|
|
81
|
+
var _chunkIMKWP4UQjs = require('./chunk-IMKWP4UQ.js');
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -2062,7 +2062,7 @@ function resolveField(key, command) {
|
|
|
2062
2062
|
function printSettings(result, json, name) {
|
|
2063
2063
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2064
2064
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2065
|
-
|
|
2065
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2066
2066
|
{
|
|
2067
2067
|
...result,
|
|
2068
2068
|
settings: Object.fromEntries(
|
|
@@ -2106,7 +2106,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2106
2106
|
valueSyntax: field.cli.valueSyntax,
|
|
2107
2107
|
examples: field.cli.examples
|
|
2108
2108
|
}));
|
|
2109
|
-
|
|
2109
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2110
2110
|
{
|
|
2111
2111
|
fields: descriptions,
|
|
2112
2112
|
render: {
|
|
@@ -2131,7 +2131,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2131
2131
|
async (options, command) => {
|
|
2132
2132
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2133
2133
|
printSettings(
|
|
2134
|
-
await new (0,
|
|
2134
|
+
await new (0, _chunkJLNMJAWSjs.DeeplineClient)().getPlaySettings(options.play),
|
|
2135
2135
|
options.json,
|
|
2136
2136
|
options.name
|
|
2137
2137
|
);
|
|
@@ -2162,7 +2162,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2162
2162
|
);
|
|
2163
2163
|
}
|
|
2164
2164
|
if (options.dryRun) {
|
|
2165
|
-
|
|
2165
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2166
2166
|
{
|
|
2167
2167
|
dryRun: true,
|
|
2168
2168
|
play,
|
|
@@ -2183,7 +2183,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2183
2183
|
return;
|
|
2184
2184
|
}
|
|
2185
2185
|
printSettings(
|
|
2186
|
-
await new (0,
|
|
2186
|
+
await new (0, _chunkJLNMJAWSjs.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2187
2187
|
options.json
|
|
2188
2188
|
);
|
|
2189
2189
|
};
|
|
@@ -2209,13 +2209,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2209
2209
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2210
2210
|
{ exitCode: 2 }
|
|
2211
2211
|
);
|
|
2212
|
-
const page = await new (0,
|
|
2212
|
+
const page = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().listPlaySettingsPaths({
|
|
2213
2213
|
root: options.root,
|
|
2214
2214
|
limit,
|
|
2215
2215
|
cursor: options.cursor
|
|
2216
2216
|
});
|
|
2217
2217
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""}` : null;
|
|
2218
|
-
|
|
2218
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2219
2219
|
{
|
|
2220
2220
|
...page,
|
|
2221
2221
|
nextCommand,
|
|
@@ -2266,7 +2266,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2266
2266
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
|
|
2267
2267
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
|
|
2268
2268
|
};
|
|
2269
|
-
const client = new (0,
|
|
2269
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
2270
2270
|
const paths = [];
|
|
2271
2271
|
let cursor;
|
|
2272
2272
|
do {
|
|
@@ -2328,7 +2328,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2328
2328
|
moved.push(move.playName);
|
|
2329
2329
|
}
|
|
2330
2330
|
}
|
|
2331
|
-
|
|
2331
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2332
2332
|
{
|
|
2333
2333
|
dryRun: Boolean(options.dryRun),
|
|
2334
2334
|
from: options.from,
|
|
@@ -2456,7 +2456,7 @@ function triggerLines(view) {
|
|
|
2456
2456
|
return lines;
|
|
2457
2457
|
}
|
|
2458
2458
|
function printView(view, json) {
|
|
2459
|
-
|
|
2459
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2460
2460
|
{
|
|
2461
2461
|
...view,
|
|
2462
2462
|
render: {
|
|
@@ -2469,7 +2469,7 @@ function printView(view, json) {
|
|
|
2469
2469
|
);
|
|
2470
2470
|
}
|
|
2471
2471
|
function printResult(result, json) {
|
|
2472
|
-
|
|
2472
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2473
2473
|
{
|
|
2474
2474
|
...result,
|
|
2475
2475
|
render: {
|
|
@@ -2499,7 +2499,7 @@ async function mutate(command, options, build) {
|
|
|
2499
2499
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2500
2500
|
}
|
|
2501
2501
|
if (options.dryRun) {
|
|
2502
|
-
|
|
2502
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
2503
2503
|
{
|
|
2504
2504
|
dryRun: true,
|
|
2505
2505
|
play: options.play,
|
|
@@ -2518,7 +2518,7 @@ async function mutate(command, options, build) {
|
|
|
2518
2518
|
return;
|
|
2519
2519
|
}
|
|
2520
2520
|
printResult(
|
|
2521
|
-
await new (0,
|
|
2521
|
+
await new (0, _chunkJLNMJAWSjs.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2522
2522
|
options.json
|
|
2523
2523
|
);
|
|
2524
2524
|
}
|
|
@@ -2551,7 +2551,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2551
2551
|
}).addHelpText("after", help2);
|
|
2552
2552
|
trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON").addHelpText("after", help2).action(async (options) => {
|
|
2553
2553
|
printView(
|
|
2554
|
-
await new (0,
|
|
2554
|
+
await new (0, _chunkJLNMJAWSjs.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2555
2555
|
options.json
|
|
2556
2556
|
);
|
|
2557
2557
|
});
|
|
@@ -2595,7 +2595,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2595
2595
|
if (options.auth === void 0) {
|
|
2596
2596
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2597
2597
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2598
|
-
const current = await new (0,
|
|
2598
|
+
const current = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().getPlayTriggerConfig(
|
|
2599
2599
|
options.play
|
|
2600
2600
|
);
|
|
2601
2601
|
return {
|
|
@@ -2672,7 +2672,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2672
2672
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2673
2673
|
"runtime.event": "Other event."
|
|
2674
2674
|
};
|
|
2675
|
-
var RUN_LOGS_KIND_HELP =
|
|
2675
|
+
var RUN_LOGS_KIND_HELP = _chunkJLNMJAWSjs.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2676
2676
|
kind,
|
|
2677
2677
|
description: KIND_DESCRIPTIONS[kind]
|
|
2678
2678
|
}));
|
|
@@ -2809,9 +2809,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2809
2809
|
const args = program.args;
|
|
2810
2810
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2811
2811
|
error.exitCode = 2;
|
|
2812
|
-
if (
|
|
2813
|
-
|
|
2814
|
-
Object.assign(new (0,
|
|
2812
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2813
|
+
_chunkSK6KH37Mjs.printJsonError.call(void 0,
|
|
2814
|
+
Object.assign(new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(error.message), {
|
|
2815
2815
|
exitCode: 2,
|
|
2816
2816
|
retryable: false
|
|
2817
2817
|
})
|
|
@@ -2855,14 +2855,14 @@ function parseQuery(args, resource) {
|
|
|
2855
2855
|
if (VALUE_FLAGS.has(flag)) {
|
|
2856
2856
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2857
2857
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2858
|
-
throw new (0,
|
|
2858
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2859
2859
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2860
2860
|
);
|
|
2861
2861
|
}
|
|
2862
2862
|
if (flag === "--sum") sums.push(value);
|
|
2863
2863
|
else {
|
|
2864
2864
|
if (values[flag] !== void 0) {
|
|
2865
|
-
throw new (0,
|
|
2865
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2866
2866
|
`${flag} may only be supplied once.`
|
|
2867
2867
|
);
|
|
2868
2868
|
}
|
|
@@ -2876,12 +2876,12 @@ function parseQuery(args, resource) {
|
|
|
2876
2876
|
}
|
|
2877
2877
|
if (arg.startsWith("-")) {
|
|
2878
2878
|
const correction = flag === "--log-level" ? "Use --level for structured severity filtering." : flag === "--out" || flag === "--failed" || flag === "--all" ? "Use this flag with a plain runs logs <run-id> text read." : "Use --step, --level, --query, --where, --count, --group-by or --fields; see runs logs --help.";
|
|
2879
|
-
throw new (0,
|
|
2879
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2880
2880
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2881
2881
|
);
|
|
2882
2882
|
}
|
|
2883
2883
|
if (runId !== void 0) {
|
|
2884
|
-
throw new (0,
|
|
2884
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2885
2885
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2886
2886
|
);
|
|
2887
2887
|
}
|
|
@@ -2889,7 +2889,7 @@ function parseQuery(args, resource) {
|
|
|
2889
2889
|
}
|
|
2890
2890
|
if (switches.has("--fields")) {
|
|
2891
2891
|
if (runId !== void 0) {
|
|
2892
|
-
throw new (0,
|
|
2892
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2893
2893
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2894
2894
|
);
|
|
2895
2895
|
}
|
|
@@ -2902,18 +2902,18 @@ function parseQuery(args, resource) {
|
|
|
2902
2902
|
)
|
|
2903
2903
|
];
|
|
2904
2904
|
if (incompatible.length) {
|
|
2905
|
-
throw new (0,
|
|
2905
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2906
2906
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2907
2907
|
);
|
|
2908
2908
|
}
|
|
2909
2909
|
}
|
|
2910
2910
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2911
|
-
throw new (0,
|
|
2911
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2912
2912
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2913
2913
|
);
|
|
2914
2914
|
}
|
|
2915
2915
|
if (sums.length && switches.has("--count")) {
|
|
2916
|
-
throw new (0,
|
|
2916
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2917
2917
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2918
2918
|
);
|
|
2919
2919
|
}
|
|
@@ -2921,7 +2921,7 @@ function parseQuery(args, resource) {
|
|
|
2921
2921
|
if (operation === "count") {
|
|
2922
2922
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2923
2923
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2924
|
-
throw new (0,
|
|
2924
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2925
2925
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2926
2926
|
);
|
|
2927
2927
|
}
|
|
@@ -2956,16 +2956,16 @@ function parseQuery(args, resource) {
|
|
|
2956
2956
|
];
|
|
2957
2957
|
}
|
|
2958
2958
|
}
|
|
2959
|
-
const request =
|
|
2959
|
+
const request = _chunkJLNMJAWSjs.normalizeRunEventOperationRequest.call(void 0, body);
|
|
2960
2960
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
2961
2961
|
const backend = values["--runtime-backend"];
|
|
2962
2962
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
2963
|
-
throw new (0,
|
|
2963
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2964
2964
|
"--runtime-backend must be daytona or modal."
|
|
2965
2965
|
);
|
|
2966
2966
|
}
|
|
2967
2967
|
if (backend && !namespace) {
|
|
2968
|
-
throw new (0,
|
|
2968
|
+
throw new (0, _chunkJLNMJAWSjs.RunEventQueryInputError)(
|
|
2969
2969
|
"--runtime-backend requires --runtime-namespace."
|
|
2970
2970
|
);
|
|
2971
2971
|
}
|
|
@@ -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 _chunkJLNMJAWSjs.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 (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) _chunkSK6KH37Mjs.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, _chunkJLNMJAWSjs.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
|
+
_chunkSK6KH37Mjs.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: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3108
3108
|
` }
|
|
3109
3109
|
);
|
|
3110
3110
|
return 0;
|
|
@@ -3924,7 +3924,7 @@ function checkedRunExample(plays, target) {
|
|
|
3924
3924
|
const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
3925
3925
|
const base = `deepline plays run --file ${quote(target)}`;
|
|
3926
3926
|
return {
|
|
3927
|
-
command: `${base}${
|
|
3927
|
+
command: `${base}${_chunkJLNMJAWSjs.playInputExampleArgs.call(void 0, schema)}`,
|
|
3928
3928
|
note: "Runs the local file without publishing and may spend credits. Supply the indicated file; JSON input must match inputSchema."
|
|
3929
3929
|
};
|
|
3930
3930
|
}
|
|
@@ -4022,7 +4022,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4022
4022
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
4023
4023
|
);
|
|
4024
4024
|
}
|
|
4025
|
-
const response = await new (0,
|
|
4025
|
+
const response = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().runs.getReceipts(runId, {
|
|
4026
4026
|
keys
|
|
4027
4027
|
});
|
|
4028
4028
|
const failed = response.receipts.filter(
|
|
@@ -4034,7 +4034,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4034
4034
|
JSON.stringify(response, null, 2) + "\n",
|
|
4035
4035
|
{ flag: "wx", mode: 384 }
|
|
4036
4036
|
);
|
|
4037
|
-
|
|
4037
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
4038
4038
|
{
|
|
4039
4039
|
runId,
|
|
4040
4040
|
out: options.out,
|
|
@@ -4044,7 +4044,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
4044
4044
|
{ json: true }
|
|
4045
4045
|
);
|
|
4046
4046
|
} else {
|
|
4047
|
-
|
|
4047
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
4048
4048
|
}
|
|
4049
4049
|
if (failed)
|
|
4050
4050
|
process.exitCode = response.receipts.some(
|
|
@@ -4083,7 +4083,7 @@ includes nextCommand when another page is available.
|
|
|
4083
4083
|
{ exitCode: 2 }
|
|
4084
4084
|
);
|
|
4085
4085
|
}
|
|
4086
|
-
const page = await new (0,
|
|
4086
|
+
const page = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().runs.children(parentRunId, {
|
|
4087
4087
|
launchKey: options.launchKey,
|
|
4088
4088
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
4089
4089
|
limit
|
|
@@ -4098,7 +4098,7 @@ includes nextCommand when another page is available.
|
|
|
4098
4098
|
"--limit",
|
|
4099
4099
|
String(limit)
|
|
4100
4100
|
].join(" ") : null;
|
|
4101
|
-
|
|
4101
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
4102
4102
|
{
|
|
4103
4103
|
parentRunId,
|
|
4104
4104
|
launchKey: options.launchKey,
|
|
@@ -4134,7 +4134,7 @@ async function handleRunsHistory(options) {
|
|
|
4134
4134
|
throw new Error("--limit must be a positive integer.");
|
|
4135
4135
|
}
|
|
4136
4136
|
}
|
|
4137
|
-
const page = await new (0,
|
|
4137
|
+
const page = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().runs.history({
|
|
4138
4138
|
cursor: options.cursor,
|
|
4139
4139
|
orgId: options.org,
|
|
4140
4140
|
search: options.search,
|
|
@@ -4150,7 +4150,7 @@ async function handleRunsHistory(options) {
|
|
|
4150
4150
|
);
|
|
4151
4151
|
}
|
|
4152
4152
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
4153
|
-
|
|
4153
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
4154
4154
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
4155
4155
|
options.json ? { json: true } : {}
|
|
4156
4156
|
);
|
|
@@ -4202,12 +4202,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
4202
4202
|
return 1;
|
|
4203
4203
|
}
|
|
4204
4204
|
}
|
|
4205
|
-
const result = await new (0,
|
|
4205
|
+
const result = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().runs.rerun(runId, {
|
|
4206
4206
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
4207
4207
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
4208
4208
|
});
|
|
4209
|
-
if (
|
|
4210
|
-
|
|
4209
|
+
if (_chunkSK6KH37Mjs.shouldEmitJson.call(void 0, options.json)) {
|
|
4210
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
4211
4211
|
} else {
|
|
4212
4212
|
console.log(
|
|
4213
4213
|
result.deduplicated === true ? `
|
|
@@ -4475,7 +4475,7 @@ function projectRunDatasetCell(value) {
|
|
|
4475
4475
|
const logicalValue = parseSerializedDatasetValue(value);
|
|
4476
4476
|
if (logicalValue === null || logicalValue === void 0) return logicalValue;
|
|
4477
4477
|
if (typeof logicalValue === "object") {
|
|
4478
|
-
return
|
|
4478
|
+
return _chunkSK6KH37Mjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
|
|
4479
4479
|
}
|
|
4480
4480
|
return logicalValue;
|
|
4481
4481
|
}
|
|
@@ -6892,7 +6892,7 @@ function renderOutcome(outcome) {
|
|
|
6892
6892
|
function printResult2(input) {
|
|
6893
6893
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
6894
6894
|
if (failed) process.exitCode = 1;
|
|
6895
|
-
|
|
6895
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
6896
6896
|
{
|
|
6897
6897
|
deployment: { ...input.deployment, status: input.status },
|
|
6898
6898
|
plays: input.outcomes,
|
|
@@ -6917,7 +6917,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6917
6917
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
6918
6918
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
6919
6919
|
});
|
|
6920
|
-
const { http, config } =
|
|
6920
|
+
const { http, config } = _chunkSK6KH37Mjs.getAuthedHttpClient.call(void 0, );
|
|
6921
6921
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
6922
6922
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
6923
6923
|
deliveryId,
|
|
@@ -6944,7 +6944,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
6944
6944
|
},
|
|
6945
6945
|
{
|
|
6946
6946
|
bundle: bundleDeployPlayFile,
|
|
6947
|
-
fetchImpl:
|
|
6947
|
+
fetchImpl: _chunkIMKWP4UQjs.fetchWithDeploymentProtection,
|
|
6948
6948
|
// The plays are already here: "opening" the source is naming it.
|
|
6949
6949
|
openSource: async () => ({
|
|
6950
6950
|
open: async () => ({ repoRoot: root })
|
|
@@ -7512,7 +7512,7 @@ function parseInputFlagValue(raw) {
|
|
|
7512
7512
|
return raw;
|
|
7513
7513
|
}
|
|
7514
7514
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
7515
|
-
const selection =
|
|
7515
|
+
const selection = _chunkSK6KH37Mjs.parseJsonFields.call(void 0, args, "run");
|
|
7516
7516
|
args = selection.args;
|
|
7517
7517
|
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.";
|
|
7518
7518
|
let filePath = null;
|
|
@@ -7522,7 +7522,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
7522
7522
|
let revisionSelector = null;
|
|
7523
7523
|
const watch = !args.includes("--no-wait");
|
|
7524
7524
|
const dryRun = args.includes("--dry-run");
|
|
7525
|
-
let jsonOutput = dryRun ?
|
|
7525
|
+
let jsonOutput = dryRun ? _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
7526
7526
|
const fullJson = args.includes("--full");
|
|
7527
7527
|
const force = args.includes("--force");
|
|
7528
7528
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -7569,7 +7569,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
7569
7569
|
"--log-level requires one of: debug, info, warn, error."
|
|
7570
7570
|
);
|
|
7571
7571
|
}
|
|
7572
|
-
const parsed =
|
|
7572
|
+
const parsed = _chunkJLNMJAWSjs.parseLogLevel.call(void 0, value);
|
|
7573
7573
|
if (!parsed) {
|
|
7574
7574
|
throw new Error(
|
|
7575
7575
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -7880,7 +7880,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
|
|
|
7880
7880
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
7881
7881
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
7882
7882
|
);
|
|
7883
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
7883
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkJLNMJAWSjs.parseLogLevel.call(void 0, options.logLevel);
|
|
7884
7884
|
if (!logLevel)
|
|
7885
7885
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
7886
7886
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -7894,13 +7894,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
|
|
|
7894
7894
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
7895
7895
|
logLevel = "debug";
|
|
7896
7896
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
7897
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
7898
|
-
[...fullJson ? ["--full"] : [], ...
|
|
7897
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunkSK6KH37Mjs.parseJsonFields.call(void 0,
|
|
7898
|
+
[...fullJson ? ["--full"] : [], ..._chunkSK6KH37Mjs.jsonFieldArgs.call(void 0, options.json)],
|
|
7899
7899
|
"run"
|
|
7900
7900
|
).fields;
|
|
7901
7901
|
const watch = options.wait === false ? false : base.watch;
|
|
7902
7902
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
7903
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
7903
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunkSK6KH37Mjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
7904
7904
|
const verboseLogs = Boolean(
|
|
7905
7905
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
7906
7906
|
);
|
|
@@ -7945,7 +7945,7 @@ function playAuthoringGraphPath(parent, filePath) {
|
|
|
7945
7945
|
// src/cli/renderers/local-play-execution.ts
|
|
7946
7946
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
7947
7947
|
if (options.dryRun) {
|
|
7948
|
-
|
|
7948
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
7949
7949
|
return;
|
|
7950
7950
|
}
|
|
7951
7951
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -8909,7 +8909,7 @@ function playStatusErrorText(status) {
|
|
|
8909
8909
|
function isRetryablePendingStartFailure(status) {
|
|
8910
8910
|
if (status.status !== "failed") return false;
|
|
8911
8911
|
if (status.runId && status.runId !== "pending") return false;
|
|
8912
|
-
return
|
|
8912
|
+
return _chunkJLNMJAWSjs.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
8913
8913
|
}
|
|
8914
8914
|
function pendingStartFailureStatus(input) {
|
|
8915
8915
|
const message = input.error instanceof Error ? input.error.message : String(input.error);
|
|
@@ -8936,13 +8936,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
|
8936
8936
|
var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
8937
8937
|
function watchSurfaceReaches(state, provenance, level) {
|
|
8938
8938
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
8939
|
-
if (!
|
|
8939
|
+
if (!_chunkJLNMJAWSjs.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
8940
8940
|
return false;
|
|
8941
8941
|
}
|
|
8942
|
-
if (
|
|
8942
|
+
if (_chunkJLNMJAWSjs.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
8943
8943
|
return true;
|
|
8944
8944
|
}
|
|
8945
|
-
return state.verbose === true &&
|
|
8945
|
+
return state.verbose === true && _chunkJLNMJAWSjs.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
8946
8946
|
}
|
|
8947
8947
|
function getEventPayload(event) {
|
|
8948
8948
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -9442,9 +9442,14 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
9442
9442
|
const encodedPlayName = encodeURIComponent(playName);
|
|
9443
9443
|
return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
|
|
9444
9444
|
}
|
|
9445
|
+
function resolveRunPlayName(status, runId) {
|
|
9446
|
+
const packaged = _optionalChain([status, 'access', _298 => _298.package, 'optionalAccess', _299 => _299.run, 'optionalAccess', _300 => _300.playName]);
|
|
9447
|
+
if (typeof packaged === "string" && packaged.trim()) return packaged.trim();
|
|
9448
|
+
return _nullishCoalesce(_nullishCoalesce(extractRunPlayName(status), () => ( _optionalChain([/^play\/(.+)\/(?:run|webhook)\//, 'access', _301 => _301.exec, 'call', _302 => _302(runId), 'optionalAccess', _303 => _303[1]]))), () => ( null));
|
|
9449
|
+
}
|
|
9445
9450
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
9446
9451
|
if (open2 && dashboardUrl) {
|
|
9447
|
-
|
|
9452
|
+
_chunkSK6KH37Mjs.openInBrowser.call(void 0, dashboardUrl);
|
|
9448
9453
|
}
|
|
9449
9454
|
}
|
|
9450
9455
|
function printPlayLogLines(input) {
|
|
@@ -9496,7 +9501,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
9496
9501
|
const confirmAdmission = async () => {
|
|
9497
9502
|
if (admissionConfirmed) return;
|
|
9498
9503
|
admissionConfirmed = true;
|
|
9499
|
-
await _optionalChain([input, 'access',
|
|
9504
|
+
await _optionalChain([input, 'access', _304 => _304.onRunAdmitted, 'optionalCall', _305 => _305(input.workflowId)]);
|
|
9500
9505
|
};
|
|
9501
9506
|
const withDashboardUrl = (status) => input.dashboardUrl ? { ...status, dashboardUrl: input.dashboardUrl } : status;
|
|
9502
9507
|
const fetchTerminalStatus = async () => {
|
|
@@ -9506,7 +9511,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
9506
9511
|
billing: false
|
|
9507
9512
|
});
|
|
9508
9513
|
} catch (error) {
|
|
9509
|
-
if (
|
|
9514
|
+
if (_chunkJLNMJAWSjs.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
9510
9515
|
return null;
|
|
9511
9516
|
}
|
|
9512
9517
|
throw error;
|
|
@@ -9668,14 +9673,14 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9668
9673
|
let timedOut = false;
|
|
9669
9674
|
let emittedDashboardUrl = false;
|
|
9670
9675
|
let lastKnownWorkflowId = "";
|
|
9671
|
-
let launchedRevisionId = _optionalChain([input, 'access',
|
|
9676
|
+
let launchedRevisionId = _optionalChain([input, 'access', _306 => _306.request, 'access', _307 => _307.revisionId, 'optionalAccess', _308 => _308.trim, 'call', _309 => _309()]) || null;
|
|
9672
9677
|
let eventCount = 0;
|
|
9673
9678
|
let firstRunIdMs = null;
|
|
9674
9679
|
let launchConfirmed = false;
|
|
9675
9680
|
const confirmAdmission = async (runId) => {
|
|
9676
9681
|
if (launchConfirmed || !runId || runId === "pending") return;
|
|
9677
9682
|
launchConfirmed = true;
|
|
9678
|
-
await _optionalChain([input, 'access',
|
|
9683
|
+
await _optionalChain([input, 'access', _310 => _310.onRunAdmitted, 'optionalCall', _311 => _311(runId)]);
|
|
9679
9684
|
};
|
|
9680
9685
|
let lastPhase = null;
|
|
9681
9686
|
const timeout = input.waitTimeoutMs === null ? null : setTimeout(
|
|
@@ -9695,7 +9700,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9695
9700
|
billing: false
|
|
9696
9701
|
});
|
|
9697
9702
|
} catch (error) {
|
|
9698
|
-
if (
|
|
9703
|
+
if (_chunkJLNMJAWSjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9699
9704
|
return null;
|
|
9700
9705
|
}
|
|
9701
9706
|
throw error;
|
|
@@ -9727,7 +9732,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9727
9732
|
lastKnownWorkflowId = eventRunId;
|
|
9728
9733
|
firstRunIdMs ??= Date.now() - startedAt;
|
|
9729
9734
|
if (runStartedNow) {
|
|
9730
|
-
await _optionalChain([input, 'access',
|
|
9735
|
+
await _optionalChain([input, 'access', _312 => _312.onRunStarted, 'optionalCall', _313 => _313(eventRunId)]);
|
|
9731
9736
|
}
|
|
9732
9737
|
}
|
|
9733
9738
|
if (!launchConfirmed && eventConfirmsPlayRunLaunch(event) && eventRunId === lastKnownWorkflowId) {
|
|
@@ -9903,7 +9908,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9903
9908
|
lastPhase
|
|
9904
9909
|
});
|
|
9905
9910
|
}
|
|
9906
|
-
if (lastKnownWorkflowId &&
|
|
9911
|
+
if (lastKnownWorkflowId && _chunkJLNMJAWSjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9907
9912
|
if (timeout) {
|
|
9908
9913
|
clearTimeout(timeout);
|
|
9909
9914
|
}
|
|
@@ -9939,7 +9944,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
9939
9944
|
onRunAdmitted: confirmAdmission
|
|
9940
9945
|
});
|
|
9941
9946
|
}
|
|
9942
|
-
if (!lastKnownWorkflowId &&
|
|
9947
|
+
if (!lastKnownWorkflowId && _chunkJLNMJAWSjs.isTransientPlayRunReadError.call(void 0, error)) {
|
|
9943
9948
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
9944
9949
|
phase: "cli.play_start_stream_transient_failure",
|
|
9945
9950
|
ms: Date.now() - startedAt,
|
|
@@ -10038,29 +10043,29 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
10038
10043
|
"logs"
|
|
10039
10044
|
]);
|
|
10040
10045
|
function formatPlayLogLine(rawLine, state) {
|
|
10041
|
-
const classified =
|
|
10046
|
+
const classified = _chunkJLNMJAWSjs.classifyLogLine.call(void 0, rawLine);
|
|
10042
10047
|
const line = classified.line;
|
|
10043
10048
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
10044
|
-
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess',
|
|
10049
|
+
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _314 => _314[1]]) ? new Date(timestampMatch[1]) : null;
|
|
10045
10050
|
const timestamp = parsedTimestamp && !Number.isNaN(parsedTimestamp.getTime()) ? parsedTimestamp.toLocaleTimeString("en-US", {
|
|
10046
10051
|
hour12: false,
|
|
10047
10052
|
hour: "2-digit",
|
|
10048
10053
|
minute: "2-digit",
|
|
10049
10054
|
second: "2-digit"
|
|
10050
10055
|
}) : null;
|
|
10051
|
-
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess',
|
|
10056
|
+
const message = _nullishCoalesce(_optionalChain([timestampMatch, 'optionalAccess', _315 => _315[2]]), () => ( line));
|
|
10052
10057
|
const prefix = timestamp ? `${timestamp} ` : "";
|
|
10053
10058
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
10054
10059
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
10055
10060
|
if (providerWait && !state.verbose) {
|
|
10056
|
-
return
|
|
10061
|
+
return _chunkJLNMJAWSjs.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
10057
10062
|
}
|
|
10058
10063
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
10059
10064
|
if (mapProgress && !state.verbose) {
|
|
10060
|
-
return
|
|
10065
|
+
return _chunkJLNMJAWSjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
10061
10066
|
}
|
|
10062
10067
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
10063
|
-
if (!
|
|
10068
|
+
if (!_chunkJLNMJAWSjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10064
10069
|
return null;
|
|
10065
10070
|
}
|
|
10066
10071
|
if (state.emittedRunnerStarted) {
|
|
@@ -10073,7 +10078,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
10073
10078
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
10074
10079
|
);
|
|
10075
10080
|
if (mapStart) {
|
|
10076
|
-
if (!
|
|
10081
|
+
if (!_chunkJLNMJAWSjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10077
10082
|
return null;
|
|
10078
10083
|
}
|
|
10079
10084
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -10083,7 +10088,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
10083
10088
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
10084
10089
|
);
|
|
10085
10090
|
if (mapDone) {
|
|
10086
|
-
if (!
|
|
10091
|
+
if (!_chunkJLNMJAWSjs.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
10087
10092
|
return null;
|
|
10088
10093
|
}
|
|
10089
10094
|
const [, results, executed, cached] = mapDone;
|
|
@@ -10265,20 +10270,20 @@ function collectDatasetHandleLines(value, path = "result") {
|
|
|
10265
10270
|
function buildRunWarnings(status, rowsInfo) {
|
|
10266
10271
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
10267
10272
|
const result = readRecord(status.result);
|
|
10268
|
-
const metadata = readRecord(_optionalChain([result, 'optionalAccess',
|
|
10269
|
-
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess',
|
|
10273
|
+
const metadata = readRecord(_optionalChain([result, 'optionalAccess', _316 => _316._metadata]));
|
|
10274
|
+
const outputWarnings = Array.isArray(_optionalChain([metadata, 'optionalAccess', _317 => _317.outputWarnings])) ? metadata.outputWarnings.map((warning) => readRecord(warning)).filter((warning) => {
|
|
10270
10275
|
if (!warning) return false;
|
|
10271
10276
|
return !(rowsInfo && !rowsInfo.complete && warning.reason === "array_preview_limit" && warning.originalItems === rowsInfo.totalRows && warning.retainedItems === rowsInfo.rows.length);
|
|
10272
|
-
}).map((warning) => _optionalChain([warning, 'optionalAccess',
|
|
10277
|
+
}).map((warning) => _optionalChain([warning, 'optionalAccess', _318 => _318.message])).filter(
|
|
10273
10278
|
(message) => typeof message === "string" && message.trim().length > 0
|
|
10274
10279
|
).slice(0, 16) : [];
|
|
10275
|
-
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess',
|
|
10280
|
+
const rowOutcomeWarnings = _optionalChain([rowOutcomes, 'optionalAccess', _319 => _319.hasRowFailures]) ? [
|
|
10276
10281
|
`${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.`
|
|
10277
10282
|
] : [];
|
|
10278
|
-
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10283
|
+
const supersededRowNotices = (_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _320 => _320.supersededRows]), () => ( 0))) > 0 ? [
|
|
10279
10284
|
`Latest-write-wins: ${formatSupersededRowsNotice(_nullishCoalesce(rowOutcomes.supersededRows, () => ( 0)))}; the newer write still owns that Runtime Sheet row.`
|
|
10280
10285
|
] : [];
|
|
10281
|
-
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess',
|
|
10286
|
+
if (status.status === "completed" && _optionalChain([rowsInfo, 'optionalAccess', _321 => _321.totalRows]) === 0) {
|
|
10282
10287
|
return [
|
|
10283
10288
|
...rowOutcomeWarnings,
|
|
10284
10289
|
...supersededRowNotices,
|
|
@@ -10297,7 +10302,7 @@ function buildRunWarnings(status, rowsInfo) {
|
|
|
10297
10302
|
return [...rowOutcomeWarnings, ...supersededRowNotices, ...outputWarnings];
|
|
10298
10303
|
}
|
|
10299
10304
|
function buildRunNextCommands(status) {
|
|
10300
|
-
const runId = _optionalChain([status, 'access',
|
|
10305
|
+
const runId = _optionalChain([status, 'access', _322 => _322.runId, 'optionalAccess', _323 => _323.trim, 'call', _324 => _324()]);
|
|
10301
10306
|
if (!runId) {
|
|
10302
10307
|
const playName = extractRunPlayName(status);
|
|
10303
10308
|
return playName ? {
|
|
@@ -10448,14 +10453,14 @@ function extractToolIdFromErrorText(text) {
|
|
|
10448
10453
|
return null;
|
|
10449
10454
|
}
|
|
10450
10455
|
const lowerToolMatch = /\btool\s+([A-Za-z0-9_.:-]+)\s+\d{3}\b/.exec(text);
|
|
10451
|
-
if (_optionalChain([lowerToolMatch, 'optionalAccess',
|
|
10456
|
+
if (_optionalChain([lowerToolMatch, 'optionalAccess', _325 => _325[1]])) {
|
|
10452
10457
|
return lowerToolMatch[1];
|
|
10453
10458
|
}
|
|
10454
10459
|
const upperToolMatch = /\bTool\s+([A-Za-z0-9_.:-]+)\s+failed\b/.exec(text);
|
|
10455
|
-
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess',
|
|
10460
|
+
return _nullishCoalesce(_optionalChain([upperToolMatch, 'optionalAccess', _326 => _326[1]]), () => ( null));
|
|
10456
10461
|
}
|
|
10457
10462
|
function isInsufficientCreditsBilling(billing) {
|
|
10458
|
-
return _optionalChain([billing, 'optionalAccess',
|
|
10463
|
+
return _optionalChain([billing, 'optionalAccess', _327 => _327.kind]) === "insufficient_credits";
|
|
10459
10464
|
}
|
|
10460
10465
|
function extractBillingForStatus(status, error) {
|
|
10461
10466
|
const errorBilling = getObjectField(status, "errorBilling");
|
|
@@ -10495,8 +10500,8 @@ function formatInsufficientCreditsMessage(input) {
|
|
|
10495
10500
|
function buildInsufficientCreditsSummaryLines(input) {
|
|
10496
10501
|
const progress = input.status.progress;
|
|
10497
10502
|
const rowsInfo = extractCanonicalRowsInfo(input.status);
|
|
10498
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
10499
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess',
|
|
10503
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "completed"), () => ( getNumericField(progress, "completedRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _328 => _328.rows, 'access', _329 => _329.length]))), () => ( null));
|
|
10504
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(getNumericField(progress, "total"), () => ( getNumericField(progress, "totalRows"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _330 => _330.totalRows]))), () => ( null));
|
|
10500
10505
|
const lines = [
|
|
10501
10506
|
" status: stopped_insufficient_credits",
|
|
10502
10507
|
completed === null ? " completed rows: unknown" : ` completed rows: ${formatInteger(completed)}${total !== null ? ` of ${formatInteger(total)}` : ""}`,
|
|
@@ -10515,7 +10520,7 @@ function buildInsufficientCreditsSummaryLines(input) {
|
|
|
10515
10520
|
lines.push(" ask user: ask whether they want to add Deepline credits");
|
|
10516
10521
|
lines.push(` top up after approval: ${recovery.topUp}`);
|
|
10517
10522
|
lines.push(` checkout fallback: ${recovery.checkout}`);
|
|
10518
|
-
const runId = _optionalChain([input, 'access',
|
|
10523
|
+
const runId = _optionalChain([input, 'access', _331 => _331.status, 'access', _332 => _332.runId, 'optionalAccess', _333 => _333.trim, 'call', _334 => _334()]);
|
|
10519
10524
|
if (runId) {
|
|
10520
10525
|
lines.push(` inspect: deepline runs get ${runId}`);
|
|
10521
10526
|
lines.push(
|
|
@@ -10597,10 +10602,10 @@ function normalizeRunStatusForEnvelope(status) {
|
|
|
10597
10602
|
function normalizeProgressForEnvelope(status, rowsInfo) {
|
|
10598
10603
|
const progress = status.progress;
|
|
10599
10604
|
const rowOutcomes = readRowOutcomeSummary(status);
|
|
10600
|
-
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10601
|
-
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10602
|
-
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10603
|
-
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess',
|
|
10605
|
+
const total = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _335 => _335.totalRows]), () => ( getNumericField(progress, "totalRows"))), () => ( getNumericField(progress, "total"))), () => ( _optionalChain([rowsInfo, 'optionalAccess', _336 => _336.totalRows]))), () => ( null));
|
|
10606
|
+
const failed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _337 => _337.failedRows]), () => ( getNumericField(progress, "failed"))), () => ( getNumericField(progress, "failedRows"))), () => ( null));
|
|
10607
|
+
const completed = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _338 => _338.completedRows]), () => ( getNumericField(progress, "completed"))), () => ( getNumericField(progress, "completedRows"))), () => ( (status.status === "completed" ? total : null)));
|
|
10608
|
+
const supersededRows = _nullishCoalesce(_optionalChain([rowOutcomes, 'optionalAccess', _339 => _339.supersededRows]), () => ( getNumericField(progress, "supersededRows")));
|
|
10604
10609
|
const supersededOffset = _nullishCoalesce(supersededRows, () => ( 0));
|
|
10605
10610
|
const progressPending = getNumericField(progress, "pending");
|
|
10606
10611
|
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)));
|
|
@@ -10670,7 +10675,7 @@ function normalizeErrorsForEnvelope(status, error) {
|
|
|
10670
10675
|
];
|
|
10671
10676
|
}
|
|
10672
10677
|
function normalizeLogsForEnvelope(status) {
|
|
10673
|
-
const logs = Array.isArray(_optionalChain([status, 'access',
|
|
10678
|
+
const logs = Array.isArray(_optionalChain([status, 'access', _340 => _340.progress, 'optionalAccess', _341 => _341.logs])) ? status.progress.logs : [];
|
|
10674
10679
|
const totalCount = logs.length;
|
|
10675
10680
|
const entries = logs.slice(Math.max(0, logs.length - RUN_LOG_PREVIEW_LIMIT));
|
|
10676
10681
|
const firstSequence = entries.length === 0 ? null : logs.length - entries.length + 1;
|
|
@@ -10727,7 +10732,7 @@ function compactPlayStatus(status) {
|
|
|
10727
10732
|
const packaged = getPlayRunPackage(status);
|
|
10728
10733
|
if (packaged) {
|
|
10729
10734
|
const packagedRun = readRecord(packaged.run);
|
|
10730
|
-
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess',
|
|
10735
|
+
const packagedError = typeof _optionalChain([packagedRun, 'optionalAccess', _342 => _342.error]) === "string" ? packagedRun.error : null;
|
|
10731
10736
|
const error2 = _nullishCoalesce(selectRunErrorForDisplay(status), () => ( (typeof status.error === "string" ? String(status.error) : packagedError)));
|
|
10732
10737
|
const compactError = error2 ? compactRunErrorForEnvelope(error2, status.runId) : null;
|
|
10733
10738
|
const rowOutcomes2 = readRowOutcomeSummary(status);
|
|
@@ -10878,7 +10883,7 @@ function formatTopValuesPart(value) {
|
|
|
10878
10883
|
}
|
|
10879
10884
|
function formatPackageDatasetSummaryLines(summary, indent = " ") {
|
|
10880
10885
|
const record3 = readRecord(summary);
|
|
10881
|
-
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
10886
|
+
const columnStats = readRecord(_optionalChain([record3, 'optionalAccess', _343 => _343.columnStats]));
|
|
10882
10887
|
if (!record3 || !columnStats) {
|
|
10883
10888
|
return [];
|
|
10884
10889
|
}
|
|
@@ -10966,7 +10971,7 @@ function packageDatasetRecords(packaged) {
|
|
|
10966
10971
|
if (catalog.length > 0) return catalog;
|
|
10967
10972
|
return readRecordArray(packaged.steps).flatMap((step) => {
|
|
10968
10973
|
const output = readRecord(step.output);
|
|
10969
|
-
return _optionalChain([output, 'optionalAccess',
|
|
10974
|
+
return _optionalChain([output, 'optionalAccess', _344 => _344.kind]) === "dataset" ? [output] : [];
|
|
10970
10975
|
});
|
|
10971
10976
|
}
|
|
10972
10977
|
function packageReturnedDatasetIdentity(packaged) {
|
|
@@ -10975,7 +10980,7 @@ function packageReturnedDatasetIdentity(packaged) {
|
|
|
10975
10980
|
const outputs = _nullishCoalesce(readRecord(packaged.outputs), () => ( {}));
|
|
10976
10981
|
for (const outputValue of Object.values(outputs)) {
|
|
10977
10982
|
const output = readRecord(outputValue);
|
|
10978
|
-
if (_optionalChain([output, 'optionalAccess',
|
|
10983
|
+
if (_optionalChain([output, 'optionalAccess', _345 => _345.kind]) !== "dataset") continue;
|
|
10979
10984
|
if (typeof output.datasetId === "string" && output.datasetId.trim()) {
|
|
10980
10985
|
datasetIds.add(output.datasetId.trim());
|
|
10981
10986
|
}
|
|
@@ -11011,7 +11016,7 @@ function formatRunStepProgress(progress, includeRowOutcomes = false) {
|
|
|
11011
11016
|
}
|
|
11012
11017
|
function formatPackageDatasetActionLines(packaged, options) {
|
|
11013
11018
|
const returned = packageReturnedDatasetIdentity(packaged);
|
|
11014
|
-
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11019
|
+
const includeSummary = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _346 => _346.includeSummary]), () => ( true));
|
|
11015
11020
|
const lines = [];
|
|
11016
11021
|
const steps = readRecordArray(packaged.steps);
|
|
11017
11022
|
const stepsByDatasetId = /* @__PURE__ */ new Map();
|
|
@@ -11020,10 +11025,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11020
11025
|
for (const step of steps) {
|
|
11021
11026
|
if (step.kind !== "dataset") continue;
|
|
11022
11027
|
const output = readRecord(step.output);
|
|
11023
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
11028
|
+
if (typeof _optionalChain([output, 'optionalAccess', _347 => _347.datasetId]) === "string") {
|
|
11024
11029
|
stepsByDatasetId.set(output.datasetId, step);
|
|
11025
11030
|
}
|
|
11026
|
-
if (typeof _optionalChain([output, 'optionalAccess',
|
|
11031
|
+
if (typeof _optionalChain([output, 'optionalAccess', _348 => _348.path]) === "string") {
|
|
11027
11032
|
stepsByPath.set(output.path, step);
|
|
11028
11033
|
}
|
|
11029
11034
|
if (typeof step.id === "string") {
|
|
@@ -11037,8 +11042,8 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11037
11042
|
const category = isReturned ? "returned" : dataset.recovered === true ? "recovered" : "persisted";
|
|
11038
11043
|
const rowCount = typeof dataset.rowCount === "number" && Number.isFinite(dataset.rowCount) ? Math.max(0, Math.trunc(dataset.rowCount)) : null;
|
|
11039
11044
|
const lifecycle = readRecord(dataset.lifecycle);
|
|
11040
|
-
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess',
|
|
11041
|
-
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess',
|
|
11045
|
+
const countUnconfirmed = _optionalChain([lifecycle, 'optionalAccess', _349 => _349.complete]) === false;
|
|
11046
|
+
const persistedLowerBound = typeof _optionalChain([lifecycle, 'optionalAccess', _350 => _350.persistedRowsAtLeast]) === "number" && Number.isFinite(lifecycle.persistedRowsAtLeast) ? Math.max(0, Math.trunc(lifecycle.persistedRowsAtLeast)) : 0;
|
|
11042
11047
|
const actions2 = _nullishCoalesce(readRecord(dataset.actions), () => ( {}));
|
|
11043
11048
|
if (countUnconfirmed) {
|
|
11044
11049
|
lines.push(
|
|
@@ -11056,7 +11061,7 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11056
11061
|
}
|
|
11057
11062
|
}
|
|
11058
11063
|
const step = _nullishCoalesce(_nullishCoalesce((datasetId ? stepsByDatasetId.get(datasetId) : void 0), () => ( stepsByPath.get(path))), () => ( (typeof dataset.tableNamespace === "string" ? stepsByNamespace.get(dataset.tableNamespace) : void 0)));
|
|
11059
|
-
const progress = readRecord(_optionalChain([step, 'optionalAccess',
|
|
11064
|
+
const progress = readRecord(_optionalChain([step, 'optionalAccess', _351 => _351.progress]));
|
|
11060
11065
|
if (progress) {
|
|
11061
11066
|
lines.push(` progress: ${formatRunStepProgress(progress)}`);
|
|
11062
11067
|
}
|
|
@@ -11070,10 +11075,10 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11070
11075
|
}
|
|
11071
11076
|
const exportAction = readRecord(actions2.exportCsv);
|
|
11072
11077
|
const exportCommand = actionToCommand(exportAction);
|
|
11073
|
-
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess',
|
|
11078
|
+
const exportScope = readRecord(_optionalChain([exportAction, 'optionalAccess', _352 => _352.scope]));
|
|
11074
11079
|
const queryAction = readRecord(actions2.query);
|
|
11075
|
-
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess',
|
|
11076
|
-
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess',
|
|
11080
|
+
const queryScope = readRecord(_optionalChain([queryAction, 'optionalAccess', _353 => _353.scope]));
|
|
11081
|
+
const runQueryCommand = _optionalChain([queryScope, 'optionalAccess', _354 => _354.kind]) === "run" ? actionToCommand(queryAction) : null;
|
|
11077
11082
|
const currentQueryCommand = actionToCommand(actions2.queryCurrentTable);
|
|
11078
11083
|
const legacyQueryCommand = actionToCommand(actions2.query);
|
|
11079
11084
|
if (runQueryCommand) {
|
|
@@ -11085,11 +11090,11 @@ function formatPackageDatasetActionLines(packaged, options) {
|
|
|
11085
11090
|
}
|
|
11086
11091
|
if (exportCommand) {
|
|
11087
11092
|
lines.push(
|
|
11088
|
-
_optionalChain([exportScope, 'optionalAccess',
|
|
11093
|
+
_optionalChain([exportScope, 'optionalAccess', _355 => _355.kind]) === "database" ? ` export current table (may include other runs): ${exportCommand}` : ` export this run: ${exportCommand}`
|
|
11089
11094
|
);
|
|
11090
11095
|
}
|
|
11091
11096
|
const unavailable = readRecord(dataset.exportUnavailable);
|
|
11092
|
-
if (typeof _optionalChain([unavailable, 'optionalAccess',
|
|
11097
|
+
if (typeof _optionalChain([unavailable, 'optionalAccess', _356 => _356.reason]) === "string" && typeof unavailable.message === "string") {
|
|
11093
11098
|
lines.push(
|
|
11094
11099
|
` export unavailable (${unavailable.reason}): ${unavailable.message}`
|
|
11095
11100
|
);
|
|
@@ -11106,7 +11111,7 @@ function packageSavedRowCount(packaged) {
|
|
|
11106
11111
|
}
|
|
11107
11112
|
function runtimeLimitWindowLabel(runtimeLimitFailure) {
|
|
11108
11113
|
const message = _nullishCoalesce(getStringField(runtimeLimitFailure, "message"), () => ( ""));
|
|
11109
|
-
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access',
|
|
11114
|
+
const configuredSeconds = _optionalChain([/\bconfigured\s+(\d+)\s+second(?:s)?\s+runtime limit\b/i, 'access', _357 => _357.exec, 'call', _358 => _358(message), 'optionalAccess', _359 => _359[1]]);
|
|
11110
11115
|
if (configuredSeconds) {
|
|
11111
11116
|
const seconds = Number(configuredSeconds);
|
|
11112
11117
|
if (Number.isSafeInteger(seconds) && seconds > 0) {
|
|
@@ -11153,7 +11158,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
11153
11158
|
if (!outputs) return [];
|
|
11154
11159
|
const returned = Object.entries(outputs).filter(([, output]) => {
|
|
11155
11160
|
const record3 = readRecord(output);
|
|
11156
|
-
return _optionalChain([record3, 'optionalAccess',
|
|
11161
|
+
return _optionalChain([record3, 'optionalAccess', _360 => _360.kind]) === "dataset" || _optionalChain([record3, 'optionalAccess', _361 => _361.kind]) === "value" && Object.prototype.hasOwnProperty.call(record3, "value");
|
|
11157
11162
|
});
|
|
11158
11163
|
if (returned.length === 0) return [];
|
|
11159
11164
|
const datasets = packageDatasetRecords(packaged);
|
|
@@ -11173,10 +11178,10 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
11173
11178
|
(candidate) => typeof output.datasetId === "string" && candidate.datasetId === output.datasetId || candidate.path === path
|
|
11174
11179
|
);
|
|
11175
11180
|
const stepOutput = datasetSteps.map((step) => readRecord(step.output)).find(
|
|
11176
|
-
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess',
|
|
11181
|
+
(candidate) => typeof output.datasetId === "string" && _optionalChain([candidate, 'optionalAccess', _362 => _362.datasetId]) === output.datasetId || _optionalChain([candidate, 'optionalAccess', _363 => _363.path]) === path
|
|
11177
11182
|
);
|
|
11178
|
-
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess',
|
|
11179
|
-
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
11183
|
+
const preview = readRecord(_nullishCoalesce(_optionalChain([stepOutput, 'optionalAccess', _364 => _364.preview]), () => ( _optionalChain([dataset, 'optionalAccess', _365 => _365.preview]))));
|
|
11184
|
+
const rows = Array.isArray(_optionalChain([preview, 'optionalAccess', _366 => _366.rows])) ? preview.rows.slice(0, 2) : [];
|
|
11180
11185
|
if (rows.length > 0) {
|
|
11181
11186
|
lines.push(` sample rows (${rows.length}):`);
|
|
11182
11187
|
lines.push(
|
|
@@ -11202,7 +11207,7 @@ function formatPackageValueOutputLines(packaged) {
|
|
|
11202
11207
|
return lines;
|
|
11203
11208
|
}
|
|
11204
11209
|
function authoredPackageStackFrames(packaged) {
|
|
11205
|
-
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess',
|
|
11210
|
+
const stack = readRecordArray(packaged.errors).map((entry) => typeof entry.stack === "string" ? entry.stack : null).find((candidate) => Boolean(_optionalChain([candidate, 'optionalAccess', _367 => _367.trim, 'call', _368 => _368()])));
|
|
11206
11211
|
if (!stack) return [];
|
|
11207
11212
|
return stack.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("at ")).filter(
|
|
11208
11213
|
(line) => !line.includes("/virtual/deepline-plays/") && !line.includes("/apps/play-runner/") && !line.includes("/shared_libs/play-runtime/") && !line.includes("node:internal")
|
|
@@ -11234,9 +11239,9 @@ function activityIsoTimestamp(value) {
|
|
|
11234
11239
|
}
|
|
11235
11240
|
function buildRunActivityTextLines(run) {
|
|
11236
11241
|
const activity = readRecord(run.activity);
|
|
11237
|
-
const observation = readRecord(_optionalChain([activity, 'optionalAccess',
|
|
11238
|
-
const state = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
11239
|
-
const target = readRecord(_optionalChain([observation, 'optionalAccess',
|
|
11242
|
+
const observation = readRecord(_optionalChain([activity, 'optionalAccess', _369 => _369.observation]));
|
|
11243
|
+
const state = readRecord(_optionalChain([observation, 'optionalAccess', _370 => _370.state]));
|
|
11244
|
+
const target = readRecord(_optionalChain([observation, 'optionalAccess', _371 => _371.target]));
|
|
11240
11245
|
if (!activity || !observation || !state) return [];
|
|
11241
11246
|
const kind = typeof state.kind === "string" ? state.kind : "unknown";
|
|
11242
11247
|
if (kind === "completed") return [];
|
|
@@ -11281,11 +11286,11 @@ function buildRunActivityTextLines(run) {
|
|
|
11281
11286
|
}
|
|
11282
11287
|
function formatObservedRunCounter(value) {
|
|
11283
11288
|
const counter = readRecord(value);
|
|
11284
|
-
const count2 = _optionalChain([counter, 'optionalAccess',
|
|
11289
|
+
const count2 = _optionalChain([counter, 'optionalAccess', _372 => _372.value]);
|
|
11285
11290
|
if (typeof count2 !== "number" || !Number.isSafeInteger(count2) || count2 < 0) {
|
|
11286
11291
|
return "unknown";
|
|
11287
11292
|
}
|
|
11288
|
-
return _optionalChain([counter, 'optionalAccess',
|
|
11293
|
+
return _optionalChain([counter, 'optionalAccess', _373 => _373.confirmed]) === true ? formatInteger(count2) : `${formatInteger(count2)} observed`;
|
|
11289
11294
|
}
|
|
11290
11295
|
function buildRunStatusEvidenceTextLines(packaged) {
|
|
11291
11296
|
const evidence = readRecord(packaged.runStatus);
|
|
@@ -11298,13 +11303,13 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
11298
11303
|
);
|
|
11299
11304
|
}
|
|
11300
11305
|
const source = readRecord(evidence.source);
|
|
11301
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
11306
|
+
if (_optionalChain([source, 'optionalAccess', _374 => _374.aligned]) === false) {
|
|
11302
11307
|
lines.push(
|
|
11303
11308
|
` consistency: run snapshot event ${String(source.runSnapshotLedgerNextSeq)} and progress event ${String(source.ledgerNextSeq)} differ; retry this read to align them`
|
|
11304
11309
|
);
|
|
11305
11310
|
}
|
|
11306
11311
|
const focus = readRecord(evidence.focusStep);
|
|
11307
|
-
const rows = readRecord(_optionalChain([focus, 'optionalAccess',
|
|
11312
|
+
const rows = readRecord(_optionalChain([focus, 'optionalAccess', _375 => _375.rows]));
|
|
11308
11313
|
if (focus) {
|
|
11309
11314
|
const id = typeof focus.id === "string" && focus.id.trim() ? focus.id.trim() : "unknown step";
|
|
11310
11315
|
const label = typeof focus.label === "string" && focus.label.trim() ? ` (${focus.label.trim()})` : "";
|
|
@@ -11312,7 +11317,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
11312
11317
|
const known = readRecordArray(packaged.steps).find(
|
|
11313
11318
|
(step) => typeof step.id === "string" && (id === step.id || id.endsWith(`:${step.id}`)) && typeof step.label === "string"
|
|
11314
11319
|
);
|
|
11315
|
-
const state = typeof _optionalChain([known, 'optionalAccess',
|
|
11320
|
+
const state = typeof _optionalChain([known, 'optionalAccess', _376 => _376.label]) === "string" ? known.label : typeof focus.status === "string" && focus.status.trim() ? formatNodeExecutionState(
|
|
11316
11321
|
deriveNodeExecutionState({
|
|
11317
11322
|
reported: {
|
|
11318
11323
|
status: focus.status.trim(),
|
|
@@ -11322,7 +11327,7 @@ function buildRunStatusEvidenceTextLines(packaged) {
|
|
|
11322
11327
|
total: rows.total
|
|
11323
11328
|
} : null
|
|
11324
11329
|
},
|
|
11325
|
-
runStatus: _optionalChain([run, 'optionalAccess',
|
|
11330
|
+
runStatus: _optionalChain([run, 'optionalAccess', _377 => _377.status])
|
|
11326
11331
|
})
|
|
11327
11332
|
) : null;
|
|
11328
11333
|
lines.push(` current step: ${id}${label}${state ? `: ${state}` : ""}`);
|
|
@@ -11370,7 +11375,7 @@ function formatRecentRunLogLines(value) {
|
|
|
11370
11375
|
(line) => typeof line === "string"
|
|
11371
11376
|
);
|
|
11372
11377
|
if (tail.length === 0) return [];
|
|
11373
|
-
const shown = tail.map((line) =>
|
|
11378
|
+
const shown = tail.map((line) => _chunkJLNMJAWSjs.classifyLogLine.call(void 0, line)).filter(
|
|
11374
11379
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
11375
11380
|
).slice(-8);
|
|
11376
11381
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -11414,7 +11419,7 @@ function buildRunPackageTextLines(packaged) {
|
|
|
11414
11419
|
lines.push(` recovery: ${mode}${sourceRunId}`);
|
|
11415
11420
|
}
|
|
11416
11421
|
const runError = typeof run.error === "string" && run.error.trim() ? run.error.trim() : null;
|
|
11417
|
-
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess',
|
|
11422
|
+
const structuredRuntimeLimitMessage = typeof _optionalChain([runtimeLimitFailure, 'optionalAccess', _378 => _378.message]) === "string" && runtimeLimitFailure.message.trim() ? `${typeof runtimeLimitFailure.code === "string" ? runtimeLimitFailure.code : "RUNTIME_LIMIT_EXCEEDED"}: ${runtimeLimitFailure.message.trim()}` : null;
|
|
11418
11423
|
const displayRunError = _nullishCoalesce(structuredRuntimeLimitMessage, () => ( runError));
|
|
11419
11424
|
if (!isRuntimeLimitCheckpoint && displayRunError && (status === "failed" || status === "cancelled")) {
|
|
11420
11425
|
lines.push(` error: ${truncateErrorForDisplay(displayRunError, runId)}`);
|
|
@@ -11425,11 +11430,11 @@ function buildRunPackageTextLines(packaged) {
|
|
|
11425
11430
|
}
|
|
11426
11431
|
}
|
|
11427
11432
|
const failedLogs = readRecord(packaged.failedLogs);
|
|
11428
|
-
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess',
|
|
11433
|
+
const failedLogEntries = Array.isArray(_optionalChain([failedLogs, 'optionalAccess', _379 => _379.entries])) ? failedLogs.entries.filter(
|
|
11429
11434
|
(entry) => typeof entry === "string"
|
|
11430
11435
|
) : [];
|
|
11431
|
-
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
11432
|
-
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess',
|
|
11436
|
+
const failedLogAssociation = typeof _optionalChain([failedLogs, 'optionalAccess', _380 => _380.association]) === "string" ? failedLogs.association : null;
|
|
11437
|
+
const failedLogWarning = typeof _optionalChain([failedLogs, 'optionalAccess', _381 => _381.warning]) === "string" && failedLogs.warning.trim() ? failedLogs.warning.trim() : null;
|
|
11433
11438
|
if (failedLogEntries.length > 0) {
|
|
11434
11439
|
lines.push(" failed logs:");
|
|
11435
11440
|
lines.push(...failedLogEntries.map((entry) => ` ${entry}`));
|
|
@@ -11448,8 +11453,8 @@ function buildRunPackageTextLines(packaged) {
|
|
|
11448
11453
|
)
|
|
11449
11454
|
).slice(0, 16) : [];
|
|
11450
11455
|
lines.push(...packageWarnings.map((warning) => ` warning: ${warning}`));
|
|
11451
|
-
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess',
|
|
11452
|
-
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess',
|
|
11456
|
+
const failedLogNext = readRecord(_optionalChain([failedLogs, 'optionalAccess', _382 => _382.next]));
|
|
11457
|
+
if (failedLogWarning && typeof _optionalChain([failedLogNext, 'optionalAccess', _383 => _383.logs]) === "string") {
|
|
11453
11458
|
lines.push(
|
|
11454
11459
|
failedLogAssociation === "retained_before_truncation" ? ` retained logs: ${failedLogNext.logs}` : ` retry failed logs: ${failedLogNext.logs}`
|
|
11455
11460
|
);
|
|
@@ -11477,20 +11482,20 @@ function buildRunPackageTextLines(packaged) {
|
|
|
11477
11482
|
const stepStatus = typeof step.status === "string" ? step.status : status;
|
|
11478
11483
|
const output = step.output && typeof step.output === "object" && !Array.isArray(step.output) ? step.output : null;
|
|
11479
11484
|
const rowCount = output && typeof output.rowCount === "number" ? ` rows=${formatInteger(output.rowCount)}` : "";
|
|
11480
|
-
const preview = _optionalChain([output, 'optionalAccess',
|
|
11481
|
-
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess',
|
|
11485
|
+
const preview = _optionalChain([output, 'optionalAccess', _384 => _384.preview]) && typeof output.preview === "object" && !Array.isArray(output.preview) ? output.preview : null;
|
|
11486
|
+
const previewRows = Array.isArray(_optionalChain([preview, 'optionalAccess', _385 => _385.rows])) ? preview.rows.length : null;
|
|
11482
11487
|
lines.push(` ${kind} ${id}: ${stepStatus}${rowCount}`);
|
|
11483
|
-
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess',
|
|
11488
|
+
lines.push(...formatPackageDatasetSummaryLines(_optionalChain([output, 'optionalAccess', _386 => _386.summary])));
|
|
11484
11489
|
if (previewRows !== null) {
|
|
11485
11490
|
lines.push(
|
|
11486
|
-
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess',
|
|
11491
|
+
` preview=${previewRows}${_optionalChain([preview, 'optionalAccess', _387 => _387.truncated]) ? " truncated" : ""}`
|
|
11487
11492
|
);
|
|
11488
11493
|
}
|
|
11489
11494
|
}
|
|
11490
11495
|
const inspectCommand = actionToCommand(next.inspect);
|
|
11491
11496
|
const fullResultCommand = actionToCommand(next.full);
|
|
11492
11497
|
const hasCatalogExportAction = packageDatasetRecords(packaged).some(
|
|
11493
|
-
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call',
|
|
11498
|
+
(dataset) => Boolean(actionToCommand(_optionalChain([readRecord, 'call', _388 => _388(dataset.actions), 'optionalAccess', _389 => _389.exportCsv])))
|
|
11494
11499
|
);
|
|
11495
11500
|
const legacyExportCommand = hasCatalogExportAction ? null : actionToCommand(next.export);
|
|
11496
11501
|
const runAgainCommand = typeof next.run === "string" && next.run.trim() ? next.run.trim() : null;
|
|
@@ -11555,7 +11560,7 @@ function withOrdinaryRunAgainCommand(status, options, resolvedRevisionId) {
|
|
|
11555
11560
|
}
|
|
11556
11561
|
function buildBillingRollupTextLines(status) {
|
|
11557
11562
|
const billing = status.billing;
|
|
11558
|
-
const rollup = _optionalChain([billing, 'optionalAccess',
|
|
11563
|
+
const rollup = _optionalChain([billing, 'optionalAccess', _390 => _390.rollup]);
|
|
11559
11564
|
if (!rollup) return [];
|
|
11560
11565
|
const total = formatCreditAmount2(rollup.totalCreditsRollup);
|
|
11561
11566
|
if (rollup.childCredits > 0 && rollup.descendantRunCount > 0) {
|
|
@@ -11600,7 +11605,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11600
11605
|
const overview = buildRunOverview(status);
|
|
11601
11606
|
const { run } = overview;
|
|
11602
11607
|
const failed = run.status === "failed";
|
|
11603
|
-
const label = run.status === "completed" ? _optionalChain([overview, 'access',
|
|
11608
|
+
const label = run.status === "completed" ? _optionalChain([overview, 'access', _391 => _391.rowOutcomes, 'optionalAccess', _392 => _392.hasRowFailures]) ? "Completed with row failures" : "Completed" : failed ? "Failed" : run.status;
|
|
11604
11609
|
const lines = [
|
|
11605
11610
|
`${label} ${_nullishCoalesce(_nullishCoalesce(run.playName, () => ( status.playName)), () => ( "Play"))}`,
|
|
11606
11611
|
`Run: ${run.id}`
|
|
@@ -11620,7 +11625,7 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11620
11625
|
...formatJsonPreview(compactReturnValue(overview.result))
|
|
11621
11626
|
);
|
|
11622
11627
|
}
|
|
11623
|
-
if (_optionalChain([overview, 'access',
|
|
11628
|
+
if (_optionalChain([overview, 'access', _393 => _393.rowOutcomes, 'optionalAccess', _394 => _394.hasRowFailures])) {
|
|
11624
11629
|
lines.push(
|
|
11625
11630
|
`Rows: ${overview.rowOutcomes.completedRows} completed, ${overview.rowOutcomes.failedRows} failed`
|
|
11626
11631
|
);
|
|
@@ -11650,16 +11655,16 @@ function buildPlayCompletionTextLines(status) {
|
|
|
11650
11655
|
function writePlayResult(status, jsonOutput, options) {
|
|
11651
11656
|
const packaged = getPlayRunPackage(status);
|
|
11652
11657
|
if (status.package) _chunkZMVJSS6Njs.recordPlayTermination.call(void 0, buildRunOverview(status).run);
|
|
11653
|
-
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
11658
|
+
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _395 => _395.hits]), () => ( null));
|
|
11654
11659
|
if (jsonOutput) {
|
|
11655
|
-
const payload2 = _optionalChain([options, 'optionalAccess',
|
|
11656
|
-
|
|
11660
|
+
const payload2 = _optionalChain([options, 'optionalAccess', _396 => _396.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
11661
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
11657
11662
|
hits ? { ...payload2, hits } : payload2,
|
|
11658
|
-
{ json: true, fields: _optionalChain([options, 'optionalAccess',
|
|
11663
|
+
{ json: true, fields: _optionalChain([options, 'optionalAccess', _397 => _397.jsonFields]) }
|
|
11659
11664
|
);
|
|
11660
11665
|
return;
|
|
11661
11666
|
}
|
|
11662
|
-
if (packaged && !_optionalChain([options, 'optionalAccess',
|
|
11667
|
+
if (packaged && !_optionalChain([options, 'optionalAccess', _398 => _398.fullJson])) {
|
|
11663
11668
|
const {
|
|
11664
11669
|
logs: _logs,
|
|
11665
11670
|
failedLogs: _failedLogs,
|
|
@@ -11669,7 +11674,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11669
11674
|
...buildPlayCompletionTextLines(status),
|
|
11670
11675
|
...formatRunHitsLines(hits)
|
|
11671
11676
|
];
|
|
11672
|
-
|
|
11677
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
11673
11678
|
json: false,
|
|
11674
11679
|
text: `${lines2.join("\n")}
|
|
11675
11680
|
`
|
|
@@ -11719,8 +11724,8 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
11719
11724
|
lines.push(...renderedServerView.actions);
|
|
11720
11725
|
lines.push(...buildBillingRollupTextLines(status));
|
|
11721
11726
|
const compact = compactPlayStatus(status);
|
|
11722
|
-
const payload = _optionalChain([options, 'optionalAccess',
|
|
11723
|
-
|
|
11727
|
+
const payload = _optionalChain([options, 'optionalAccess', _399 => _399.fullJson]) ? status : compact;
|
|
11728
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
11724
11729
|
{
|
|
11725
11730
|
...payload,
|
|
11726
11731
|
render: {
|
|
@@ -11873,14 +11878,14 @@ function mergeExportColumns(preferredColumns, rows) {
|
|
|
11873
11878
|
return columns;
|
|
11874
11879
|
}
|
|
11875
11880
|
function sqlSafeExportColumnName(id) {
|
|
11876
|
-
const prefix = _nullishCoalesce(_optionalChain([id, 'access',
|
|
11881
|
+
const prefix = _nullishCoalesce(_optionalChain([id, 'access', _400 => _400.trim, 'call', _401 => _401(), 'access', _402 => _402.match, 'call', _403 => _403(/^_+/), 'optionalAccess', _404 => _404[0]]), () => ( ""));
|
|
11877
11882
|
const normalized = id.trim().replace(/\.+/g, "__").replace(/[^A-Za-z0-9_]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
11878
11883
|
const safe = `${prefix}${normalized || "column"}`;
|
|
11879
11884
|
return /^[A-Za-z_]/.test(safe) ? safe : `c_${safe}`;
|
|
11880
11885
|
}
|
|
11881
11886
|
async function fetchBackingDatasetRows(input) {
|
|
11882
11887
|
const playName = extractRunPlayName(input.status);
|
|
11883
|
-
const tableNamespace = _optionalChain([input, 'access',
|
|
11888
|
+
const tableNamespace = _optionalChain([input, 'access', _405 => _405.rowsInfo, 'access', _406 => _406.tableNamespace, 'optionalAccess', _407 => _407.trim, 'call', _408 => _408()]);
|
|
11884
11889
|
if (!playName || !tableNamespace) {
|
|
11885
11890
|
return null;
|
|
11886
11891
|
}
|
|
@@ -11919,7 +11924,7 @@ async function fetchBackingDatasetRows(input) {
|
|
|
11919
11924
|
seenEnvelopeKeys.add(key);
|
|
11920
11925
|
}
|
|
11921
11926
|
sheetRows.push(...page.rows);
|
|
11922
|
-
const summaryTotal = _optionalChain([page, 'access',
|
|
11927
|
+
const summaryTotal = _optionalChain([page, 'access', _409 => _409.summary, 'optionalAccess', _410 => _410.stats, 'optionalAccess', _411 => _411.total]);
|
|
11923
11928
|
if (typeof summaryTotal === "number" && Number.isFinite(summaryTotal)) {
|
|
11924
11929
|
settledTotal = Math.max(_nullishCoalesce(settledTotal, () => ( 0)), Math.trunc(summaryTotal));
|
|
11925
11930
|
}
|
|
@@ -12013,7 +12018,7 @@ function assertDatasetHasExportableRows(input) {
|
|
|
12013
12018
|
const rowOutcomes = _nullishCoalesce(readRowOutcomeSummary(input.status), () => ( readRowOutcomeSummary(
|
|
12014
12019
|
getRecordField(getRecordField(input.status, "result"), "_metadata")
|
|
12015
12020
|
)));
|
|
12016
|
-
if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess',
|
|
12021
|
+
if (input.allowEmpty === true && input.status.status === "completed" && !getRecordField(input.status, "error") && !getRecordField(input.status.progress, "error") && structuredErrorsForStatus(input.status).length === 0 && input.rowsInfo.complete && input.rowsInfo.totalRows === 0 && _optionalChain([rowOutcomes, 'optionalAccess', _412 => _412.failedRows]) === 0 && !rowOutcomes.hasRowFailures) {
|
|
12017
12022
|
return input.rowsInfo;
|
|
12018
12023
|
}
|
|
12019
12024
|
const datasetLabel = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.datasetPath, () => ( input.rowsInfo.tableNamespace)), () => ( input.rowsInfo.source)), () => ( "result.rows"));
|
|
@@ -12085,8 +12090,8 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
12085
12090
|
path: dataset.exportFile(outPath, options),
|
|
12086
12091
|
rowsInfo: dataset.info(),
|
|
12087
12092
|
currentTable: false,
|
|
12088
|
-
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
12089
|
-
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
12093
|
+
datasetPath: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _413 => _413.source]), () => ( null)),
|
|
12094
|
+
datasetInfo: _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _414 => _414.info, 'call', _415 => _415()]), () => ( null))
|
|
12090
12095
|
};
|
|
12091
12096
|
};
|
|
12092
12097
|
const run = Run.open({
|
|
@@ -12098,7 +12103,7 @@ async function exportPlayStatusRows(client, status, outPath, options = {}) {
|
|
|
12098
12103
|
const returnedRows = datasets.returned().map((dataset) => dataset.info());
|
|
12099
12104
|
const recoveredRows = datasets.recovered().map((dataset) => dataset.info());
|
|
12100
12105
|
const selectedDataset = run.dataset(options.datasetPath);
|
|
12101
|
-
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess',
|
|
12106
|
+
const rowsInfo = _nullishCoalesce(_optionalChain([selectedDataset, 'optionalAccess', _416 => _416.info, 'call', _417 => _417()]), () => ( null));
|
|
12102
12107
|
if (!selectedDataset && options.datasetPath) {
|
|
12103
12108
|
const available = availableRows.map((info) => info.source).filter((source) => typeof source === "string");
|
|
12104
12109
|
const commands = datasetChoiceLines({
|
|
@@ -12210,7 +12215,7 @@ ${commands.join("\n")}`,
|
|
|
12210
12215
|
throw error;
|
|
12211
12216
|
}
|
|
12212
12217
|
}
|
|
12213
|
-
if (_optionalChain([fetchedRowsInfo, 'optionalAccess',
|
|
12218
|
+
if (_optionalChain([fetchedRowsInfo, 'optionalAccess', _418 => _418.complete])) {
|
|
12214
12219
|
const guarded2 = assertDatasetHasExportableRows({
|
|
12215
12220
|
rowsInfo: fetchedRowsInfo,
|
|
12216
12221
|
status,
|
|
@@ -12272,7 +12277,7 @@ function extractActiveRunsFromError(error) {
|
|
|
12272
12277
|
if (!(error instanceof _chunk7P5AA3SNjs.DeeplineError)) {
|
|
12273
12278
|
return [];
|
|
12274
12279
|
}
|
|
12275
|
-
const response = _optionalChain([error, 'access',
|
|
12280
|
+
const response = _optionalChain([error, 'access', _419 => _419.details, 'optionalAccess', _420 => _420.response]);
|
|
12276
12281
|
if (!response || typeof response !== "object" || Array.isArray(response)) {
|
|
12277
12282
|
return [];
|
|
12278
12283
|
}
|
|
@@ -12391,8 +12396,8 @@ function renderServerResultView(value) {
|
|
|
12391
12396
|
return { lines: [], actions: [] };
|
|
12392
12397
|
}
|
|
12393
12398
|
const view = value;
|
|
12394
|
-
const renderedSections = Array.isArray(_optionalChain([view, 'access',
|
|
12395
|
-
const renderedActions = Array.isArray(_optionalChain([view, 'access',
|
|
12399
|
+
const renderedSections = Array.isArray(_optionalChain([view, 'access', _421 => _421.render, 'optionalAccess', _422 => _422.sections])) ? view.render.sections : [];
|
|
12400
|
+
const renderedActions = Array.isArray(_optionalChain([view, 'access', _423 => _423.render, 'optionalAccess', _424 => _424.actions])) ? view.render.actions : [];
|
|
12396
12401
|
if (renderedSections.length > 0 || renderedActions.length > 0) {
|
|
12397
12402
|
const lines2 = [];
|
|
12398
12403
|
for (const section of renderedSections) {
|
|
@@ -12430,7 +12435,7 @@ function renderServerResultView(value) {
|
|
|
12430
12435
|
}
|
|
12431
12436
|
const tables = Array.isArray(view.tables) ? view.tables : [];
|
|
12432
12437
|
const topLevelOutputTable = view.topLevelOutputTable && typeof view.topLevelOutputTable === "object" && !Array.isArray(view.topLevelOutputTable) ? view.topLevelOutputTable : null;
|
|
12433
|
-
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess',
|
|
12438
|
+
if (typeof _optionalChain([topLevelOutputTable, 'optionalAccess', _425 => _425.queryCommand]) === "string") {
|
|
12434
12439
|
lines.push(` top-level outputs: ${topLevelOutputTable.queryCommand}`);
|
|
12435
12440
|
}
|
|
12436
12441
|
if (tables.length > 0) {
|
|
@@ -12490,7 +12495,7 @@ function writeStartedPlayRun(input) {
|
|
|
12490
12495
|
dashboardUrl: input.dashboardUrl,
|
|
12491
12496
|
package: input.package
|
|
12492
12497
|
};
|
|
12493
|
-
|
|
12498
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
12494
12499
|
json: true,
|
|
12495
12500
|
fields: input.jsonFields
|
|
12496
12501
|
});
|
|
@@ -12512,7 +12517,7 @@ function writeStartedPlayRun(input) {
|
|
|
12512
12517
|
input.progress.writeLine(output2, process.stdout);
|
|
12513
12518
|
return;
|
|
12514
12519
|
}
|
|
12515
|
-
|
|
12520
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, input.package, {
|
|
12516
12521
|
json: false,
|
|
12517
12522
|
text: `${output2}
|
|
12518
12523
|
`
|
|
@@ -12541,7 +12546,7 @@ function writeStartedPlayRun(input) {
|
|
|
12541
12546
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)}`] : []
|
|
12542
12547
|
];
|
|
12543
12548
|
if (input.jsonOutput) {
|
|
12544
|
-
|
|
12549
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
12545
12550
|
return;
|
|
12546
12551
|
}
|
|
12547
12552
|
if (input.dashboardUrl) {
|
|
@@ -12552,7 +12557,7 @@ function writeStartedPlayRun(input) {
|
|
|
12552
12557
|
input.progress.writeLine(output, process.stdout);
|
|
12553
12558
|
return;
|
|
12554
12559
|
}
|
|
12555
|
-
|
|
12560
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
12556
12561
|
{
|
|
12557
12562
|
...payload,
|
|
12558
12563
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -12562,7 +12567,7 @@ function writeStartedPlayRun(input) {
|
|
|
12562
12567
|
);
|
|
12563
12568
|
}
|
|
12564
12569
|
function parsePlayCheckOptions(args) {
|
|
12565
|
-
const selection =
|
|
12570
|
+
const selection = _chunkSK6KH37Mjs.parseJsonFields.call(void 0, args, "check");
|
|
12566
12571
|
args = selection.args;
|
|
12567
12572
|
const target = args[0];
|
|
12568
12573
|
if (!target || target.startsWith("-")) {
|
|
@@ -12574,7 +12579,7 @@ function parsePlayCheckOptions(args) {
|
|
|
12574
12579
|
if (arg !== "--json" && arg !== "--full")
|
|
12575
12580
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
12576
12581
|
}
|
|
12577
|
-
const jsonOutput =
|
|
12582
|
+
const jsonOutput = _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
12578
12583
|
return {
|
|
12579
12584
|
target,
|
|
12580
12585
|
jsonOutput,
|
|
@@ -12650,7 +12655,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
12650
12655
|
useLatest,
|
|
12651
12656
|
expectedArtifactHash,
|
|
12652
12657
|
dryRun,
|
|
12653
|
-
jsonOutput:
|
|
12658
|
+
jsonOutput: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args)
|
|
12654
12659
|
};
|
|
12655
12660
|
}
|
|
12656
12661
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -12691,7 +12696,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
12691
12696
|
target,
|
|
12692
12697
|
expectedArtifactHash,
|
|
12693
12698
|
dryRun,
|
|
12694
|
-
jsonOutput:
|
|
12699
|
+
jsonOutput: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args)
|
|
12695
12700
|
};
|
|
12696
12701
|
}
|
|
12697
12702
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -12744,7 +12749,7 @@ function checkHintExpression(value) {
|
|
|
12744
12749
|
return stringValue2(value).replace(/^toolExecutionResult\./, "result.");
|
|
12745
12750
|
}
|
|
12746
12751
|
function checkHintRawPath(value) {
|
|
12747
|
-
return _optionalChain([value, 'optionalAccess',
|
|
12752
|
+
return _optionalChain([value, 'optionalAccess', _426 => _426.startsWith, 'call', _427 => _427("toolResponse.rawV2")]) ? value.replace(/^toolResponse\./, "result.toolResponse.") : void 0;
|
|
12748
12753
|
}
|
|
12749
12754
|
function collectStaticPipelineToolIds(staticPipeline) {
|
|
12750
12755
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12819,30 +12824,30 @@ function cronExecutionLabel(status) {
|
|
|
12819
12824
|
}
|
|
12820
12825
|
function readLiveCronMetadata(play) {
|
|
12821
12826
|
const record3 = readRecord(play);
|
|
12822
|
-
const metadata = readRecord(_optionalChain([record3, 'optionalAccess',
|
|
12827
|
+
const metadata = readRecord(_optionalChain([record3, 'optionalAccess', _428 => _428.triggerMetadata]));
|
|
12823
12828
|
return {
|
|
12824
|
-
schedule: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12825
|
-
timezone: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12826
|
-
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12827
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12828
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12829
|
+
schedule: typeof _optionalChain([metadata, 'optionalAccess', _429 => _429.cronSchedule]) === "string" ? metadata.cronSchedule : null,
|
|
12830
|
+
timezone: typeof _optionalChain([metadata, 'optionalAccess', _430 => _430.cronTimezone]) === "string" ? metadata.cronTimezone : null,
|
|
12831
|
+
nextScheduledAt: typeof _optionalChain([metadata, 'optionalAccess', _431 => _431.nextScheduledAt]) === "number" ? metadata.nextScheduledAt : null,
|
|
12832
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _432 => _432.blockedAt]) === "number" ? metadata.blockedAt : null,
|
|
12833
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _433 => _433.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null
|
|
12829
12834
|
};
|
|
12830
12835
|
}
|
|
12831
12836
|
function liveTriggerStatusLines(status, play) {
|
|
12832
12837
|
const cron = readLiveCronMetadata(play);
|
|
12833
|
-
if (!_optionalChain([status, 'optionalAccess',
|
|
12838
|
+
if (!_optionalChain([status, 'optionalAccess', _434 => _434.cron]) && !cron.schedule && !_optionalChain([status, 'optionalAccess', _435 => _435.webhook])) return [];
|
|
12834
12839
|
const lines = [];
|
|
12835
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12840
|
+
if (_optionalChain([status, 'optionalAccess', _436 => _436.cron]) || cron.schedule) {
|
|
12836
12841
|
const timezone = cron.timezone ? ` (${cron.timezone})` : "";
|
|
12837
12842
|
lines.push(
|
|
12838
|
-
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
12843
|
+
` Scheduled execution: ${cronExecutionLabel(_nullishCoalesce(_optionalChain([status, 'optionalAccess', _437 => _437.cron]), () => ( null)))}${cron.schedule ? ` \u2014 ${cron.schedule}${timezone}` : ""}`
|
|
12839
12844
|
);
|
|
12840
|
-
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess',
|
|
12845
|
+
if (cron.nextScheduledAt !== null && _optionalChain([status, 'optionalAccess', _438 => _438.cron]) === "active") {
|
|
12841
12846
|
lines.push(
|
|
12842
12847
|
` Next scheduled run: ${formatTimestamp(cron.nextScheduledAt)}`
|
|
12843
12848
|
);
|
|
12844
12849
|
}
|
|
12845
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12850
|
+
if (_optionalChain([status, 'optionalAccess', _439 => _439.blockedReason])) {
|
|
12846
12851
|
lines.push(` Schedule issue: ${status.blockedReason}`);
|
|
12847
12852
|
if (status.blockedReasonCode || cron.blockedReasonCode) {
|
|
12848
12853
|
lines.push(
|
|
@@ -12858,7 +12863,7 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12858
12863
|
);
|
|
12859
12864
|
}
|
|
12860
12865
|
}
|
|
12861
|
-
if (_optionalChain([status, 'optionalAccess',
|
|
12866
|
+
if (_optionalChain([status, 'optionalAccess', _440 => _440.webhook])) {
|
|
12862
12867
|
lines.push(` Webhook: ${status.webhook}`);
|
|
12863
12868
|
}
|
|
12864
12869
|
return lines;
|
|
@@ -12866,11 +12871,11 @@ function liveTriggerStatusLines(status, play) {
|
|
|
12866
12871
|
function triggerStatusFromMetadata(value) {
|
|
12867
12872
|
const metadata = readRecord(value);
|
|
12868
12873
|
return {
|
|
12869
|
-
cron: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12870
|
-
webhook: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12871
|
-
blockedReason: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12872
|
-
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12873
|
-
blockedAt: typeof _optionalChain([metadata, 'optionalAccess',
|
|
12874
|
+
cron: typeof _optionalChain([metadata, 'optionalAccess', _441 => _441.cronStatus]) === "string" ? metadata.cronStatus : null,
|
|
12875
|
+
webhook: typeof _optionalChain([metadata, 'optionalAccess', _442 => _442.webhookStatus]) === "string" ? metadata.webhookStatus : null,
|
|
12876
|
+
blockedReason: typeof _optionalChain([metadata, 'optionalAccess', _443 => _443.blockedReason]) === "string" ? metadata.blockedReason : null,
|
|
12877
|
+
blockedReasonCode: typeof _optionalChain([metadata, 'optionalAccess', _444 => _444.blockedReasonCode]) === "string" ? metadata.blockedReasonCode : null,
|
|
12878
|
+
blockedAt: typeof _optionalChain([metadata, 'optionalAccess', _445 => _445.blockedAt]) === "number" ? metadata.blockedAt : null
|
|
12874
12879
|
};
|
|
12875
12880
|
}
|
|
12876
12881
|
function printPublishReceipt(input) {
|
|
@@ -12902,7 +12907,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
12902
12907
|
async function handlePlayCheck(args) {
|
|
12903
12908
|
const options = parsePlayCheckOptions(args);
|
|
12904
12909
|
if (!isFileTarget2(options.target)) {
|
|
12905
|
-
const client = new (0,
|
|
12910
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
12906
12911
|
try {
|
|
12907
12912
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
12908
12913
|
command: "check"
|
|
@@ -12931,7 +12936,7 @@ async function handlePlayCheck(args) {
|
|
|
12931
12936
|
},
|
|
12932
12937
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
12933
12938
|
};
|
|
12934
|
-
|
|
12939
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, result, {
|
|
12935
12940
|
json: options.jsonOutput,
|
|
12936
12941
|
fields: options.jsonFields,
|
|
12937
12942
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -12941,7 +12946,7 @@ async function handlePlayCheck(args) {
|
|
|
12941
12946
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
12942
12947
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
12943
12948
|
if (options.jsonOutput) {
|
|
12944
|
-
|
|
12949
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
12945
12950
|
{
|
|
12946
12951
|
kind: "play_check",
|
|
12947
12952
|
checked: "named_contract",
|
|
@@ -12981,9 +12986,9 @@ async function handlePlayCheck(args) {
|
|
|
12981
12986
|
target: options.target,
|
|
12982
12987
|
full: options.full,
|
|
12983
12988
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full`,
|
|
12984
|
-
publishCommand: _optionalChain([primary, 'optionalAccess',
|
|
12989
|
+
publishCommand: _optionalChain([primary, 'optionalAccess', _446 => _446.result, 'access', _447 => _447.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
12985
12990
|
});
|
|
12986
|
-
|
|
12991
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, output, {
|
|
12987
12992
|
json: options.jsonOutput,
|
|
12988
12993
|
fields: options.jsonFields,
|
|
12989
12994
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -12996,7 +13001,7 @@ function resolvePlayCheckExportNames(sourceCode) {
|
|
|
12996
13001
|
return exports.map((entry) => entry.name);
|
|
12997
13002
|
}
|
|
12998
13003
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
12999
|
-
const rawEdition = _optionalChain([process, 'access',
|
|
13004
|
+
const rawEdition = _optionalChain([process, 'access', _448 => _448.env, 'access', _449 => _449.DEEPLINE_PROD_CHECK_AUTHORING_CONTRACT_EDITION, 'optionalAccess', _450 => _450.trim, 'call', _451 => _451()]);
|
|
13000
13005
|
if (!rawEdition) return artifact;
|
|
13001
13006
|
if (!/^\d+$/.test(rawEdition)) {
|
|
13002
13007
|
throw new Error(
|
|
@@ -13037,7 +13042,7 @@ async function checkOneExportedPlay(input) {
|
|
|
13037
13042
|
}
|
|
13038
13043
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
13039
13044
|
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
13040
|
-
const client = new (0,
|
|
13045
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
13041
13046
|
const integrationMode = resolveEvalIntegrationMode();
|
|
13042
13047
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
13043
13048
|
playName: node.playName,
|
|
@@ -13114,7 +13119,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13114
13119
|
);
|
|
13115
13120
|
return 0;
|
|
13116
13121
|
}
|
|
13117
|
-
client = new (0,
|
|
13122
|
+
client = new (0, _chunkJLNMJAWSjs.DeeplineClient)(playRunClientOptions(options));
|
|
13118
13123
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
13119
13124
|
if (canDeferCompilerManifest) {
|
|
13120
13125
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
@@ -13167,7 +13172,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13167
13172
|
);
|
|
13168
13173
|
const compilerManifest = _nullishCoalesce(bundleResult.compilerManifest, () => ( null));
|
|
13169
13174
|
const fileInputBindings = _chunkPAIMOGCMjs.fileInputBindingsFromStaticPipeline.call(void 0,
|
|
13170
|
-
_optionalChain([compilerManifest, 'optionalAccess',
|
|
13175
|
+
_optionalChain([compilerManifest, 'optionalAccess', _452 => _452.staticPipeline])
|
|
13171
13176
|
);
|
|
13172
13177
|
const stagedFileInputs = await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
13173
13178
|
"cli.play_stage_inputs",
|
|
@@ -13228,8 +13233,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13228
13233
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
13229
13234
|
open: options.open,
|
|
13230
13235
|
progress,
|
|
13231
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
13232
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
13236
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _453 => _453.onRunStarted]),
|
|
13237
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _454 => _454.onRunAdmitted])
|
|
13233
13238
|
}).catch(async (error) => {
|
|
13234
13239
|
throw await normalizePlayStartError(client, error, playName);
|
|
13235
13240
|
})
|
|
@@ -13251,7 +13256,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13251
13256
|
),
|
|
13252
13257
|
options
|
|
13253
13258
|
);
|
|
13254
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
13259
|
+
_optionalChain([hooks, 'optionalAccess', _455 => _455.onTerminalStatus, 'optionalCall', _456 => _456(outputStatus)]);
|
|
13255
13260
|
traceCliSync(
|
|
13256
13261
|
"cli.play_write_result",
|
|
13257
13262
|
{ targetKind: "file", playName },
|
|
@@ -13270,8 +13275,8 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
13270
13275
|
throw await normalizePlayStartError(client, error, playName);
|
|
13271
13276
|
})
|
|
13272
13277
|
);
|
|
13273
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13274
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13278
|
+
await _optionalChain([hooks, 'optionalAccess', _457 => _457.onRunStarted, 'optionalCall', _458 => _458(started.workflowId)]);
|
|
13279
|
+
await _optionalChain([hooks, 'optionalAccess', _459 => _459.onRunAdmitted, 'optionalCall', _460 => _460(started.workflowId)]);
|
|
13275
13280
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
13276
13281
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
13277
13282
|
progress.phase("started run");
|
|
@@ -13299,7 +13304,7 @@ async function resolveNamedRunRevisionId(input) {
|
|
|
13299
13304
|
if (input.selector === "latest") {
|
|
13300
13305
|
const versions = await input.client.listPlayVersions(input.playName);
|
|
13301
13306
|
const latest = versions[0];
|
|
13302
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
13307
|
+
if (!_optionalChain([latest, 'optionalAccess', _461 => _461._id])) {
|
|
13303
13308
|
throw new Error(`No saved revisions found for ${input.playName}.`);
|
|
13304
13309
|
}
|
|
13305
13310
|
return latest._id;
|
|
@@ -13310,7 +13315,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
13310
13315
|
if (options.target.kind !== "name") {
|
|
13311
13316
|
throw new Error("Expected a named play run target.");
|
|
13312
13317
|
}
|
|
13313
|
-
const client = new (0,
|
|
13318
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)(playRunClientOptions(options));
|
|
13314
13319
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
13315
13320
|
const playName = options.target.name;
|
|
13316
13321
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
@@ -13417,8 +13422,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
13417
13422
|
waitTimeoutMs: options.waitTimeoutMs,
|
|
13418
13423
|
open: options.open,
|
|
13419
13424
|
progress,
|
|
13420
|
-
onRunStarted: _optionalChain([hooks, 'optionalAccess',
|
|
13421
|
-
onRunAdmitted: _optionalChain([hooks, 'optionalAccess',
|
|
13425
|
+
onRunStarted: _optionalChain([hooks, 'optionalAccess', _462 => _462.onRunStarted]),
|
|
13426
|
+
onRunAdmitted: _optionalChain([hooks, 'optionalAccess', _463 => _463.onRunAdmitted])
|
|
13422
13427
|
}).catch(async (error) => {
|
|
13423
13428
|
throw await normalizePlayStartError(client, error, playName, {
|
|
13424
13429
|
suggestMissingPlay: true
|
|
@@ -13443,7 +13448,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
13443
13448
|
options,
|
|
13444
13449
|
_nullishCoalesce(finalStatus.revisionId, () => ( selectedRevisionId))
|
|
13445
13450
|
);
|
|
13446
|
-
_optionalChain([hooks, 'optionalAccess',
|
|
13451
|
+
_optionalChain([hooks, 'optionalAccess', _464 => _464.onTerminalStatus, 'optionalCall', _465 => _465(outputStatus)]);
|
|
13447
13452
|
traceCliSync(
|
|
13448
13453
|
"cli.play_write_result",
|
|
13449
13454
|
{ targetKind: "name", playName },
|
|
@@ -13464,8 +13469,8 @@ async function handleNamedRun(options, hooks) {
|
|
|
13464
13469
|
});
|
|
13465
13470
|
})
|
|
13466
13471
|
);
|
|
13467
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13468
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13472
|
+
await _optionalChain([hooks, 'optionalAccess', _466 => _466.onRunStarted, 'optionalCall', _467 => _467(started.workflowId)]);
|
|
13473
|
+
await _optionalChain([hooks, 'optionalAccess', _468 => _468.onRunAdmitted, 'optionalCall', _469 => _469(started.workflowId)]);
|
|
13469
13474
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
13470
13475
|
openPlayDashboard(resolvedDashboardUrl, options.open);
|
|
13471
13476
|
progress.phase("started run");
|
|
@@ -13503,7 +13508,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13503
13508
|
{ cause: error }
|
|
13504
13509
|
);
|
|
13505
13510
|
}
|
|
13506
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13511
|
+
await _optionalChain([hooks, 'optionalAccess', _470 => _470.onRunStarted, 'optionalCall', _471 => _471(runId)]);
|
|
13507
13512
|
},
|
|
13508
13513
|
onRunAdmitted: async (runId) => {
|
|
13509
13514
|
try {
|
|
@@ -13516,7 +13521,7 @@ async function handlePlayRun(args, hooks) {
|
|
|
13516
13521
|
{ cause: error }
|
|
13517
13522
|
);
|
|
13518
13523
|
}
|
|
13519
|
-
await _optionalChain([hooks, 'optionalAccess',
|
|
13524
|
+
await _optionalChain([hooks, 'optionalAccess', _472 => _472.onRunAdmitted, 'optionalCall', _473 => _473(runId)]);
|
|
13520
13525
|
}
|
|
13521
13526
|
} : hooks;
|
|
13522
13527
|
if (options.target.kind === "file") {
|
|
@@ -13589,15 +13594,16 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13589
13594
|
const lines = [
|
|
13590
13595
|
`${runGlyph} ${runLabel.word} ${run.id}`,
|
|
13591
13596
|
` play: ${run.playName}`,
|
|
13597
|
+
...extras.dashboardUrl ? [` play page: ${extras.dashboardUrl}`] : [],
|
|
13592
13598
|
...extras.credits ? [` credits: ${formatRunCreditsLine(extras.credits)}`] : [],
|
|
13593
13599
|
...formatRunTimingTextLines(run),
|
|
13594
13600
|
...buildRunActivityTextLines(run),
|
|
13595
13601
|
...buildRunStatusEvidenceTextLines(overview)
|
|
13596
13602
|
];
|
|
13597
|
-
if (_optionalChain([overview, 'access',
|
|
13603
|
+
if (_optionalChain([overview, 'access', _474 => _474.runStatus, 'optionalAccess', _475 => _475.available]) === false)
|
|
13598
13604
|
lines.push(` call progress: unavailable (${overview.runStatus.reason})`);
|
|
13599
|
-
const work = readRecord(_optionalChain([readRecord, 'call',
|
|
13600
|
-
if (work && !_optionalChain([overview, 'access',
|
|
13605
|
+
const work = readRecord(_optionalChain([readRecord, 'call', _476 => _476(run), 'optionalAccess', _477 => _477.work]));
|
|
13606
|
+
if (work && !_optionalChain([overview, 'access', _478 => _478.runStatus, 'optionalAccess', _479 => _479.available]))
|
|
13601
13607
|
lines.push(
|
|
13602
13608
|
` calls (${_nullishCoalesce(work.scope, () => ( "attempt scope unknown"))}): ${formatObservedRunCounter({ value: work.logicalCalls, confirmed: true })} logical, ${formatObservedRunCounter({ value: work.providerRequests, confirmed: true })} provider requests`
|
|
13603
13609
|
);
|
|
@@ -13648,7 +13654,7 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13648
13654
|
...overview.failedLogs.warning ? [`warning: ${overview.failedLogs.warning}`] : [],
|
|
13649
13655
|
...overview.failedLogs.logsTruncated ? ["Older log bodies were not retained."] : [],
|
|
13650
13656
|
...overview.failedLogs.entries,
|
|
13651
|
-
..._optionalChain([overview, 'access',
|
|
13657
|
+
..._optionalChain([overview, 'access', _480 => _480.failedLogs, 'access', _481 => _481.next, 'optionalAccess', _482 => _482.logs]) ? [`More logs: ${overview.failedLogs.next.logs}`] : []
|
|
13652
13658
|
]
|
|
13653
13659
|
});
|
|
13654
13660
|
sections.push({
|
|
@@ -13708,15 +13714,15 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
13708
13714
|
);
|
|
13709
13715
|
return `${lines.join("\n")}
|
|
13710
13716
|
|
|
13711
|
-
${
|
|
13717
|
+
${_chunkSK6KH37Mjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
13712
13718
|
}
|
|
13713
13719
|
async function handleRunGet(args) {
|
|
13714
|
-
const selection =
|
|
13720
|
+
const selection = _chunkSK6KH37Mjs.parseJsonFields.call(void 0,
|
|
13715
13721
|
args,
|
|
13716
13722
|
args.includes("--config") ? "config" : "get"
|
|
13717
13723
|
);
|
|
13718
13724
|
args = selection.args;
|
|
13719
|
-
const usage2 = "Usage: deepline runs get <run-id> [--json] [--full] [--input] [--config]";
|
|
13725
|
+
const usage2 = "Usage: deepline runs get <run-id> [--json] [--full] [--input] [--config] [--web-url]";
|
|
13720
13726
|
let runId;
|
|
13721
13727
|
try {
|
|
13722
13728
|
runId = parseRunIdPositional(args, usage2);
|
|
@@ -13724,7 +13730,22 @@ async function handleRunGet(args) {
|
|
|
13724
13730
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13725
13731
|
return 1;
|
|
13726
13732
|
}
|
|
13727
|
-
const client = new (0,
|
|
13733
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
13734
|
+
if (args.includes("--web-url")) {
|
|
13735
|
+
const status2 = await client.runs.get(runId, { full: false });
|
|
13736
|
+
const playName2 = resolveRunPlayName(status2, runId);
|
|
13737
|
+
if (!playName2) {
|
|
13738
|
+
console.error(`Run ${runId} does not name its play; no play page URL.`);
|
|
13739
|
+
return 1;
|
|
13740
|
+
}
|
|
13741
|
+
const dashboardUrl2 = buildPlayDashboardUrl(client.baseUrl, playName2);
|
|
13742
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
13743
|
+
{ dashboardUrl: dashboardUrl2 },
|
|
13744
|
+
{ json: args.includes("--json"), text: `${dashboardUrl2}
|
|
13745
|
+
` }
|
|
13746
|
+
);
|
|
13747
|
+
return 0;
|
|
13748
|
+
}
|
|
13728
13749
|
if (args.includes("--config")) {
|
|
13729
13750
|
if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
|
|
13730
13751
|
console.error(
|
|
@@ -13738,7 +13759,7 @@ async function handleRunGet(args) {
|
|
|
13738
13759
|
"This server does not support recorded configuration reads."
|
|
13739
13760
|
);
|
|
13740
13761
|
}
|
|
13741
|
-
|
|
13762
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
13742
13763
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
13743
13764
|
{ json: true, fields: selection.fields }
|
|
13744
13765
|
);
|
|
@@ -13746,7 +13767,7 @@ async function handleRunGet(args) {
|
|
|
13746
13767
|
}
|
|
13747
13768
|
if (args.includes("--input")) {
|
|
13748
13769
|
const input = await client.getRunInput(runId);
|
|
13749
|
-
|
|
13770
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
13750
13771
|
return 0;
|
|
13751
13772
|
}
|
|
13752
13773
|
const full = args.includes("--full");
|
|
@@ -13760,13 +13781,24 @@ async function handleRunGet(args) {
|
|
|
13760
13781
|
full: true,
|
|
13761
13782
|
failedLogs: args.includes("--log-failed")
|
|
13762
13783
|
}) : status;
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
13784
|
+
const legacyPlayName = resolveRunPlayName(legacyStatus, runId);
|
|
13785
|
+
const legacyDashboardUrl = legacyPlayName ? buildPlayDashboardUrl(client.baseUrl, legacyPlayName) : null;
|
|
13786
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
13787
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
13788
|
+
{
|
|
13789
|
+
...full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
13790
|
+
...legacyDashboardUrl ? { dashboardUrl: legacyDashboardUrl } : {}
|
|
13791
|
+
},
|
|
13766
13792
|
{ json: true, fields: selection.fields }
|
|
13767
13793
|
);
|
|
13768
13794
|
} else {
|
|
13769
13795
|
writePlayResult(legacyStatus, false, { fullJson: full });
|
|
13796
|
+
if (legacyDashboardUrl)
|
|
13797
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
13798
|
+
{ dashboardUrl: legacyDashboardUrl },
|
|
13799
|
+
{ json: false, text: `play page: ${legacyDashboardUrl}
|
|
13800
|
+
` }
|
|
13801
|
+
);
|
|
13770
13802
|
}
|
|
13771
13803
|
return 0;
|
|
13772
13804
|
}
|
|
@@ -13777,17 +13809,20 @@ async function handleRunGet(args) {
|
|
|
13777
13809
|
readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
|
|
13778
13810
|
]);
|
|
13779
13811
|
const hitLines = formatRunHitsLines(hits);
|
|
13780
|
-
const json =
|
|
13781
|
-
|
|
13812
|
+
const json = _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
13813
|
+
const playName = resolveRunPlayName(status, runId);
|
|
13814
|
+
const dashboardUrl = playName ? buildPlayDashboardUrl(client.baseUrl, playName) : void 0;
|
|
13815
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
13782
13816
|
{
|
|
13783
13817
|
...overview,
|
|
13818
|
+
...dashboardUrl ? { dashboardUrl } : {},
|
|
13784
13819
|
credits,
|
|
13785
13820
|
...hits ? { hits } : {}
|
|
13786
13821
|
},
|
|
13787
13822
|
{
|
|
13788
13823
|
json,
|
|
13789
13824
|
...json ? {} : {
|
|
13790
|
-
text: `${renderRunOverviewText(overview, { credits })}${hitLines.length > 0 ? `${hitLines.join("\n")}
|
|
13825
|
+
text: `${renderRunOverviewText(overview, { credits, dashboardUrl })}${hitLines.length > 0 ? `${hitLines.join("\n")}
|
|
13791
13826
|
` : ""}`
|
|
13792
13827
|
},
|
|
13793
13828
|
fields: selection.fields
|
|
@@ -13881,9 +13916,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
13881
13916
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13882
13917
|
return 1;
|
|
13883
13918
|
}
|
|
13884
|
-
const status = await new (0,
|
|
13885
|
-
if (
|
|
13886
|
-
|
|
13919
|
+
const status = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().runs.status(runId);
|
|
13920
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
13921
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
13887
13922
|
return 0;
|
|
13888
13923
|
}
|
|
13889
13924
|
if (!status.available) {
|
|
@@ -13923,7 +13958,7 @@ async function handleRunsRerun(args) {
|
|
|
13923
13958
|
console.error(error instanceof Error ? error.message : usage2);
|
|
13924
13959
|
return 1;
|
|
13925
13960
|
}
|
|
13926
|
-
const options = { json:
|
|
13961
|
+
const options = { json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) };
|
|
13927
13962
|
for (let index = 0; index < args.length; index += 1) {
|
|
13928
13963
|
if (args[index] === "--idempotency-key") {
|
|
13929
13964
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -13988,8 +14023,8 @@ ${usage2}
|
|
|
13988
14023
|
Discover Plays: ${next.discover}
|
|
13989
14024
|
Active runs: ${next.running}`
|
|
13990
14025
|
);
|
|
13991
|
-
if (
|
|
13992
|
-
|
|
14026
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
14027
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
13993
14028
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
13994
14029
|
{ json: true }
|
|
13995
14030
|
);
|
|
@@ -14004,7 +14039,7 @@ Active runs: ${next.running}`
|
|
|
14004
14039
|
console.error("--offset requires --play.");
|
|
14005
14040
|
return 1;
|
|
14006
14041
|
}
|
|
14007
|
-
const client = new (0,
|
|
14042
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14008
14043
|
const page = await client.runs.listPage({
|
|
14009
14044
|
...playName ? { play: playName } : {},
|
|
14010
14045
|
...statusFilter ? { status: statusFilter } : {},
|
|
@@ -14034,7 +14069,7 @@ Active runs: ${next.running}`
|
|
|
14034
14069
|
executionTime: run.executionTime,
|
|
14035
14070
|
billingTotalCredits: run.billingTotalCredits,
|
|
14036
14071
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
14037
|
-
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access',
|
|
14072
|
+
playName: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(run.playName, () => ( _optionalChain([run, 'access', _483 => _483.memo, 'optionalAccess', _484 => _484.playName]))), () => ( playName)), () => ( null)),
|
|
14038
14073
|
...nodeId ? { nodeObservation: _nullishCoalesce(run.nodeObservation, () => ( null)) } : {}
|
|
14039
14074
|
}));
|
|
14040
14075
|
const lines = runs.length === 0 ? [
|
|
@@ -14073,7 +14108,7 @@ Active runs: ${next.running}`
|
|
|
14073
14108
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
14074
14109
|
);
|
|
14075
14110
|
}
|
|
14076
|
-
|
|
14111
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14077
14112
|
{
|
|
14078
14113
|
runs,
|
|
14079
14114
|
count: runs.length,
|
|
@@ -14083,11 +14118,11 @@ Active runs: ${next.running}`
|
|
|
14083
14118
|
...page.hasMore !== void 0 ? { has_more: page.hasMore, is_truncated: page.hasMore } : {},
|
|
14084
14119
|
next: {
|
|
14085
14120
|
page: nextPage,
|
|
14086
|
-
get: _optionalChain([runs, 'access',
|
|
14121
|
+
get: _optionalChain([runs, 'access', _485 => _485[0], 'optionalAccess', _486 => _486.id]) ? `deepline runs get ${runs[0].id}` : null
|
|
14087
14122
|
},
|
|
14088
14123
|
render: { sections: [{ title: "runs", lines }] }
|
|
14089
14124
|
},
|
|
14090
|
-
{ json:
|
|
14125
|
+
{ json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) }
|
|
14091
14126
|
);
|
|
14092
14127
|
return 0;
|
|
14093
14128
|
}
|
|
@@ -14117,7 +14152,7 @@ async function handleRunTail(args) {
|
|
|
14117
14152
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14118
14153
|
return 1;
|
|
14119
14154
|
}
|
|
14120
|
-
const parsed =
|
|
14155
|
+
const parsed = _chunkJLNMJAWSjs.parseLogLevel.call(void 0, value);
|
|
14121
14156
|
if (!parsed) {
|
|
14122
14157
|
console.error(
|
|
14123
14158
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14155,9 +14190,9 @@ async function handleRunTail(args) {
|
|
|
14155
14190
|
);
|
|
14156
14191
|
return 1;
|
|
14157
14192
|
}
|
|
14158
|
-
const client = new (0,
|
|
14193
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14159
14194
|
const jsonLines = args.includes("--jsonl");
|
|
14160
|
-
const jsonOutput = !jsonLines &&
|
|
14195
|
+
const jsonOutput = !jsonLines && _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
14161
14196
|
const compact = args.includes("--compact");
|
|
14162
14197
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
14163
14198
|
const compactState = {
|
|
@@ -14238,7 +14273,7 @@ async function handleRunLogs(args) {
|
|
|
14238
14273
|
]);
|
|
14239
14274
|
const cursorIndex = args.indexOf("--cursor");
|
|
14240
14275
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
14241
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
14276
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkJLNMJAWSjs.isRunLogsCursor.call(void 0, cursorValue));
|
|
14242
14277
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
14243
14278
|
return handleRunEventSearch(args);
|
|
14244
14279
|
}
|
|
@@ -14272,7 +14307,7 @@ async function handleRunLogs(args) {
|
|
|
14272
14307
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
14273
14308
|
return 1;
|
|
14274
14309
|
}
|
|
14275
|
-
const parsed =
|
|
14310
|
+
const parsed = _chunkJLNMJAWSjs.parseLogLevel.call(void 0, value);
|
|
14276
14311
|
if (!parsed) {
|
|
14277
14312
|
console.error(
|
|
14278
14313
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -14319,12 +14354,12 @@ async function handleRunLogs(args) {
|
|
|
14319
14354
|
);
|
|
14320
14355
|
return 1;
|
|
14321
14356
|
}
|
|
14322
|
-
const client = new (0,
|
|
14357
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14323
14358
|
if (outPath) {
|
|
14324
14359
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
14325
|
-
const logs = result2.entries.filter((line) =>
|
|
14360
|
+
const logs = result2.entries.filter((line) => _chunkJLNMJAWSjs.logLevelReaches.call(void 0, _chunkJLNMJAWSjs.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkJLNMJAWSjs.classifyLogLine.call(void 0, line).line);
|
|
14326
14361
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
14327
|
-
|
|
14362
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14328
14363
|
{
|
|
14329
14364
|
runId: result2.runId,
|
|
14330
14365
|
log_path: outPath,
|
|
@@ -14347,7 +14382,7 @@ async function handleRunLogs(args) {
|
|
|
14347
14382
|
]
|
|
14348
14383
|
}
|
|
14349
14384
|
},
|
|
14350
|
-
{ json:
|
|
14385
|
+
{ json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) }
|
|
14351
14386
|
);
|
|
14352
14387
|
return 0;
|
|
14353
14388
|
}
|
|
@@ -14378,7 +14413,7 @@ async function handleRunLogs(args) {
|
|
|
14378
14413
|
}
|
|
14379
14414
|
};
|
|
14380
14415
|
const text = buildRunLogsText(filteredResult);
|
|
14381
|
-
|
|
14416
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14382
14417
|
{
|
|
14383
14418
|
runId: result.runId,
|
|
14384
14419
|
totalCount: result.totalCount,
|
|
@@ -14402,7 +14437,7 @@ async function handleRunLogs(args) {
|
|
|
14402
14437
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
14403
14438
|
},
|
|
14404
14439
|
{
|
|
14405
|
-
json:
|
|
14440
|
+
json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args),
|
|
14406
14441
|
text
|
|
14407
14442
|
}
|
|
14408
14443
|
);
|
|
@@ -14426,17 +14461,17 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
14426
14461
|
);
|
|
14427
14462
|
}
|
|
14428
14463
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
14429
|
-
(entry) =>
|
|
14464
|
+
(entry) => _chunkJLNMJAWSjs.logLevelReaches.call(void 0, _chunkJLNMJAWSjs.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
14430
14465
|
);
|
|
14431
14466
|
const selected = matching.slice(-limit);
|
|
14432
14467
|
const olderMatchesExist = matching.length > selected.length;
|
|
14433
14468
|
return {
|
|
14434
14469
|
entries: selected.map((entry) => entry.line),
|
|
14435
|
-
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14436
|
-
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access',
|
|
14470
|
+
firstSequence: _nullishCoalesce(_optionalChain([selected, 'access', _487 => _487[0], 'optionalAccess', _488 => _488.seq]), () => ( null)),
|
|
14471
|
+
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _489 => _489.at, 'call', _490 => _490(-1), 'optionalAccess', _491 => _491.seq]), () => ( null)),
|
|
14437
14472
|
truncated: result.truncated || olderMatchesExist,
|
|
14438
14473
|
hasMore: olderMatchesExist,
|
|
14439
|
-
nextCursor: olderMatchesExist ?
|
|
14474
|
+
nextCursor: olderMatchesExist ? _chunkJLNMJAWSjs.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
14440
14475
|
};
|
|
14441
14476
|
}
|
|
14442
14477
|
async function handleRunEventSearch(args) {
|
|
@@ -14503,7 +14538,7 @@ ${usage2}`);
|
|
|
14503
14538
|
namespace,
|
|
14504
14539
|
...backend ? { backend } : {}
|
|
14505
14540
|
} : void 0;
|
|
14506
|
-
const client = new (0,
|
|
14541
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14507
14542
|
const result = await client.runs.searchEvents({
|
|
14508
14543
|
...runId ? { runId } : {},
|
|
14509
14544
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -14575,7 +14610,7 @@ ${renderedDetails}` : ""}`;
|
|
|
14575
14610
|
"--limit",
|
|
14576
14611
|
String(limit)
|
|
14577
14612
|
].join(" ") : null;
|
|
14578
|
-
|
|
14613
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14579
14614
|
{
|
|
14580
14615
|
events,
|
|
14581
14616
|
nextCursor: result.nextCursor,
|
|
@@ -14586,19 +14621,19 @@ ${renderedDetails}` : ""}`;
|
|
|
14586
14621
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
14587
14622
|
},
|
|
14588
14623
|
{
|
|
14589
|
-
json:
|
|
14624
|
+
json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args),
|
|
14590
14625
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
14591
14626
|
}
|
|
14592
14627
|
);
|
|
14593
14628
|
return 0;
|
|
14594
14629
|
}
|
|
14595
14630
|
function buildRunLogsText(result) {
|
|
14596
|
-
const lines = result.entries.map((line) =>
|
|
14631
|
+
const lines = result.entries.map((line) => _chunkJLNMJAWSjs.classifyLogLine.call(void 0, line).line);
|
|
14597
14632
|
if (result.warning) {
|
|
14598
14633
|
if (lines.length > 0) lines.push("");
|
|
14599
14634
|
lines.push(`warning: ${result.warning}`);
|
|
14600
14635
|
lines.push(
|
|
14601
|
-
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access',
|
|
14636
|
+
`retained logs: ${_nullishCoalesce(_optionalChain([result, 'access', _492 => _492.next, 'optionalAccess', _493 => _493.logs]), () => ( `deepline runs logs ${result.runId} --out run.log`))}`
|
|
14602
14637
|
);
|
|
14603
14638
|
}
|
|
14604
14639
|
return `${lines.join("\n")}${lines.length > 0 ? "\n" : ""}`;
|
|
@@ -14627,7 +14662,7 @@ async function handleRunStop(args) {
|
|
|
14627
14662
|
reason = args[++index];
|
|
14628
14663
|
}
|
|
14629
14664
|
}
|
|
14630
|
-
const client = new (0,
|
|
14665
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14631
14666
|
const result = await client.runs.stop(runId, { reason });
|
|
14632
14667
|
const state = resolveRunStopState(result);
|
|
14633
14668
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -14642,7 +14677,7 @@ async function handleRunStop(args) {
|
|
|
14642
14677
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
14643
14678
|
`inspect: deepline runs get ${runId} --full`
|
|
14644
14679
|
];
|
|
14645
|
-
|
|
14680
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14646
14681
|
{
|
|
14647
14682
|
...cancelling,
|
|
14648
14683
|
state,
|
|
@@ -14657,7 +14692,7 @@ async function handleRunStop(args) {
|
|
|
14657
14692
|
]
|
|
14658
14693
|
}
|
|
14659
14694
|
},
|
|
14660
|
-
{ json:
|
|
14695
|
+
{ json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) }
|
|
14661
14696
|
);
|
|
14662
14697
|
return 0;
|
|
14663
14698
|
}
|
|
@@ -14674,7 +14709,7 @@ async function handleRunStop(args) {
|
|
|
14674
14709
|
];
|
|
14675
14710
|
process.stderr.write(`${lines2.join("\n")}
|
|
14676
14711
|
`);
|
|
14677
|
-
|
|
14712
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14678
14713
|
{
|
|
14679
14714
|
...result,
|
|
14680
14715
|
render: {
|
|
@@ -14689,7 +14724,7 @@ async function handleRunStop(args) {
|
|
|
14689
14724
|
]
|
|
14690
14725
|
}
|
|
14691
14726
|
},
|
|
14692
|
-
{ json:
|
|
14727
|
+
{ json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) }
|
|
14693
14728
|
);
|
|
14694
14729
|
return 1;
|
|
14695
14730
|
}
|
|
@@ -14700,12 +14735,12 @@ async function handleRunStop(args) {
|
|
|
14700
14735
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
14701
14736
|
] : []
|
|
14702
14737
|
];
|
|
14703
|
-
|
|
14738
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14704
14739
|
{
|
|
14705
14740
|
...result,
|
|
14706
14741
|
render: { sections: [{ title: "run stop", lines }] }
|
|
14707
14742
|
},
|
|
14708
|
-
{ json:
|
|
14743
|
+
{ json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) }
|
|
14709
14744
|
);
|
|
14710
14745
|
return 0;
|
|
14711
14746
|
}
|
|
@@ -14755,18 +14790,18 @@ async function handleRunStopAll(args) {
|
|
|
14755
14790
|
reason = args[++index];
|
|
14756
14791
|
}
|
|
14757
14792
|
}
|
|
14758
|
-
const client = new (0,
|
|
14793
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14759
14794
|
if (dryRun) {
|
|
14760
14795
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
14761
14796
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
14762
|
-
|
|
14797
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14763
14798
|
{
|
|
14764
14799
|
...result2,
|
|
14765
14800
|
render: {
|
|
14766
14801
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
14767
14802
|
}
|
|
14768
14803
|
},
|
|
14769
|
-
{ json:
|
|
14804
|
+
{ json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
14770
14805
|
` }
|
|
14771
14806
|
);
|
|
14772
14807
|
return 0;
|
|
@@ -14779,17 +14814,17 @@ async function handleRunStopAll(args) {
|
|
|
14779
14814
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
14780
14815
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
14781
14816
|
];
|
|
14782
|
-
|
|
14817
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
14783
14818
|
{
|
|
14784
14819
|
...result,
|
|
14785
14820
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
14786
14821
|
},
|
|
14787
|
-
{ json:
|
|
14822
|
+
{ json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args) }
|
|
14788
14823
|
);
|
|
14789
14824
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
14790
14825
|
}
|
|
14791
14826
|
async function handleRunExport(args) {
|
|
14792
|
-
const selection =
|
|
14827
|
+
const selection = _chunkSK6KH37Mjs.parseJsonFields.call(void 0, args, "export");
|
|
14793
14828
|
args = selection.args;
|
|
14794
14829
|
const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--allow-empty] [--json]";
|
|
14795
14830
|
let runId;
|
|
@@ -14848,16 +14883,16 @@ async function handleRunExport(args) {
|
|
|
14848
14883
|
"INVALID_ARGUMENT"
|
|
14849
14884
|
);
|
|
14850
14885
|
}
|
|
14851
|
-
const client = new (0,
|
|
14886
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14852
14887
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
14853
14888
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
14854
|
-
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !
|
|
14889
|
+
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkSK6KH37Mjs.argsWantJson.call(void 0, args));
|
|
14855
14890
|
try {
|
|
14856
14891
|
await waitForPlayCompletionByWatch({
|
|
14857
14892
|
client,
|
|
14858
14893
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
14859
14894
|
workflowId: runId,
|
|
14860
|
-
jsonOutput:
|
|
14895
|
+
jsonOutput: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args),
|
|
14861
14896
|
emitLogs: false,
|
|
14862
14897
|
waitTimeoutMs,
|
|
14863
14898
|
startedAt: Date.now(),
|
|
@@ -14881,26 +14916,26 @@ async function handleRunExport(args) {
|
|
|
14881
14916
|
allowEmpty: args.includes("--allow-empty"),
|
|
14882
14917
|
format
|
|
14883
14918
|
});
|
|
14884
|
-
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14885
|
-
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess',
|
|
14919
|
+
const source = _nullishCoalesce(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _494 => _494.rowsInfo, 'access', _495 => _495.source]), () => ( datasetPath)), () => ( null));
|
|
14920
|
+
const currentTableNotice = _optionalChain([exportResult, 'optionalAccess', _496 => _496.currentTable]) ? {
|
|
14886
14921
|
code: "CURRENT_SHARED_DATASET",
|
|
14887
14922
|
message: "This export is the current shared dataset and may include writes from another run.",
|
|
14888
14923
|
full_run_output_command: `deepline runs get ${status.runId} --full`
|
|
14889
14924
|
} : null;
|
|
14890
14925
|
const navigation = buildRunNavigation(status);
|
|
14891
|
-
const resolved = _optionalChain([exportResult, 'optionalAccess',
|
|
14926
|
+
const resolved = _optionalChain([exportResult, 'optionalAccess', _497 => _497.datasetInfo]);
|
|
14892
14927
|
const identity = navigation.datasets.find(
|
|
14893
|
-
(dataset) => _optionalChain([resolved, 'optionalAccess',
|
|
14928
|
+
(dataset) => _optionalChain([resolved, 'optionalAccess', _498 => _498.datasetId]) ? dataset.datasetId === resolved.datasetId : dataset.name === _optionalChain([resolved, 'optionalAccess', _499 => _499.tableNamespace])
|
|
14894
14929
|
);
|
|
14895
14930
|
const unambiguousName = identity && !identity.exportUnavailable && navigation.datasets.filter((dataset) => dataset.name === identity.name).length === 1 ? identity.name : void 0;
|
|
14896
14931
|
const exportCommand = runExportRetryCommand(
|
|
14897
14932
|
status.runId,
|
|
14898
14933
|
outPath,
|
|
14899
|
-
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess',
|
|
14934
|
+
_nullishCoalesce(_nullishCoalesce(unambiguousName, () => ( datasetPath)), () => ( _optionalChain([exportResult, 'optionalAccess', _500 => _500.datasetPath]))),
|
|
14900
14935
|
{ format }
|
|
14901
14936
|
) + (args.includes("--allow-empty") ? " --allow-empty" : "");
|
|
14902
|
-
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14903
|
-
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess',
|
|
14937
|
+
const fileLocation = format === "json" ? { json_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _501 => _501.path]), () => ( null)) } : { csv_path: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _502 => _502.path]), () => ( null)) };
|
|
14938
|
+
const exportedRowOutcomes = _optionalChain([exportResult, 'optionalAccess', _503 => _503.rowsInfo, 'access', _504 => _504.exportedRowOutcomes]);
|
|
14904
14939
|
const rowFailures = exportedRowOutcomes && exportedRowOutcomes.failed > 0 ? {
|
|
14905
14940
|
count: exportedRowOutcomes.failed,
|
|
14906
14941
|
message: "Failed rows can retain values from stages that completed earlier; those values do not prove the row succeeded.",
|
|
@@ -14920,17 +14955,17 @@ async function handleRunExport(args) {
|
|
|
14920
14955
|
...fileLocation,
|
|
14921
14956
|
format,
|
|
14922
14957
|
source,
|
|
14923
|
-
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14958
|
+
rowCount: _nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _505 => _505.rowsInfo, 'access', _506 => _506.totalRows]), () => ( null)),
|
|
14924
14959
|
...exportedRowOutcomes ? { rowOutcomes: exportedRowOutcomes } : {},
|
|
14925
14960
|
...rowFailures ? { rowFailures } : {},
|
|
14926
|
-
columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14961
|
+
columns: underscoreKeysLast(_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _507 => _507.rowsInfo, 'access', _508 => _508.columns]), () => ( []))),
|
|
14927
14962
|
...currentTableNotice ? { notice: currentTableNotice } : {},
|
|
14928
14963
|
...metadataOutPath ? { metadata_path: metadataOutPath } : {},
|
|
14929
14964
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? { completionCommand: `${exportCommand} --wait` } : {}
|
|
14930
14965
|
};
|
|
14931
14966
|
const lines = withRunNavigationLines(
|
|
14932
14967
|
[
|
|
14933
|
-
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess',
|
|
14968
|
+
`Exported ${status.runId} to ${_nullishCoalesce(_optionalChain([exportResult, 'optionalAccess', _509 => _509.path]), () => ( outPath))}`,
|
|
14934
14969
|
...!TERMINAL_PLAY_STATUSES.has(status.status) ? [
|
|
14935
14970
|
`Partial export: run is ${status.status}; more rows may be saved.`,
|
|
14936
14971
|
`Export after completion: ${exportCommand} --wait`
|
|
@@ -14957,8 +14992,8 @@ async function handleRunExport(args) {
|
|
|
14957
14992
|
"utf-8"
|
|
14958
14993
|
);
|
|
14959
14994
|
}
|
|
14960
|
-
|
|
14961
|
-
json:
|
|
14995
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0, payload, {
|
|
14996
|
+
json: _chunkSK6KH37Mjs.argsWantJson.call(void 0, args),
|
|
14962
14997
|
fields: selection.fields,
|
|
14963
14998
|
text: `${lines.join("\n")}
|
|
14964
14999
|
`
|
|
@@ -14979,10 +15014,10 @@ async function handlePlayGet(args) {
|
|
|
14979
15014
|
);
|
|
14980
15015
|
return 2;
|
|
14981
15016
|
}
|
|
14982
|
-
const client = new (0,
|
|
15017
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
14983
15018
|
const explicitJson = args.includes("--json");
|
|
14984
15019
|
const sourceOutput = args.includes("--source");
|
|
14985
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
15020
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
14986
15021
|
const requestedRevisionFlags = [
|
|
14987
15022
|
args.includes("--working"),
|
|
14988
15023
|
args.includes("--live"),
|
|
@@ -15032,7 +15067,7 @@ async function handlePlayGet(args) {
|
|
|
15032
15067
|
...includeSource ? { source: sourceSelector } : {}
|
|
15033
15068
|
});
|
|
15034
15069
|
const source = detail.source;
|
|
15035
|
-
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
15070
|
+
const resolvedSource = _nullishCoalesce(_optionalChain([source, 'optionalAccess', _510 => _510.files, 'access', _511 => _511[source.entryFile]]), () => ( ""));
|
|
15036
15071
|
let materializedFile = null;
|
|
15037
15072
|
try {
|
|
15038
15073
|
materializedFile = outPath && source ? materializeRemotePlaySource({ target, playName, source, outPath }) : null;
|
|
@@ -15042,7 +15077,7 @@ async function handlePlayGet(args) {
|
|
|
15042
15077
|
}
|
|
15043
15078
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
15044
15079
|
if (jsonOutput) {
|
|
15045
|
-
|
|
15080
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, {
|
|
15046
15081
|
...detail,
|
|
15047
15082
|
...materializedFile ? {
|
|
15048
15083
|
message: loadedMessage,
|
|
@@ -15083,16 +15118,16 @@ async function handlePlayGet(args) {
|
|
|
15083
15118
|
}
|
|
15084
15119
|
console.log(`Play: ${formatPlayReference(detail.play)}`);
|
|
15085
15120
|
console.log(
|
|
15086
|
-
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15121
|
+
`Working version: ${_nullishCoalesce(_optionalChain([detail, 'access', _512 => _512.play, 'access', _513 => _513.workingRevision, 'optionalAccess', _514 => _514.version]), () => ( "\u2014"))}`
|
|
15087
15122
|
);
|
|
15088
|
-
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15123
|
+
console.log(`Live version: ${_nullishCoalesce(_optionalChain([detail, 'access', _515 => _515.play, 'access', _516 => _516.liveRevision, 'optionalAccess', _517 => _517.version]), () => ( "\u2014"))}`);
|
|
15089
15124
|
if (detail.play.liveRevision) {
|
|
15090
15125
|
console.log(
|
|
15091
15126
|
`Live max credits per run: ${liveMaxCreditsPerRun(detail.play.liveRevision.sourceCode)}`
|
|
15092
15127
|
);
|
|
15093
15128
|
}
|
|
15094
15129
|
console.log(`Draft dirty: ${detail.play.isDraftDirty ? "yes" : "no"}`);
|
|
15095
|
-
if (detail.play.isDraftDirty && _optionalChain([detail, 'access',
|
|
15130
|
+
if (detail.play.isDraftDirty && _optionalChain([detail, 'access', _518 => _518.play, 'access', _519 => _519.liveRevision, 'optionalAccess', _520 => _520.version])) {
|
|
15096
15131
|
console.log(
|
|
15097
15132
|
` Scheduled and named runs continue to use live v${detail.play.liveRevision.version}.`
|
|
15098
15133
|
);
|
|
@@ -15104,7 +15139,7 @@ async function handlePlayGet(args) {
|
|
|
15104
15139
|
console.log(line);
|
|
15105
15140
|
}
|
|
15106
15141
|
console.log(`Updated: ${formatTimestamp(detail.play.updatedAt)}`);
|
|
15107
|
-
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access',
|
|
15142
|
+
console.log(`Sheet rows: ${_nullishCoalesce(_optionalChain([detail, 'access', _521 => _521.sheetSummary, 'optionalAccess', _522 => _522.stats, 'optionalAccess', _523 => _523.total]), () => ( 0))}`);
|
|
15108
15143
|
if (detail.customerDbUrl) {
|
|
15109
15144
|
console.log(`Customer DB: ${detail.customerDbUrl}`);
|
|
15110
15145
|
}
|
|
@@ -15120,7 +15155,7 @@ async function handlePlayGet(args) {
|
|
|
15120
15155
|
return 0;
|
|
15121
15156
|
}
|
|
15122
15157
|
function formatVersionLine(version) {
|
|
15123
|
-
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access',
|
|
15158
|
+
const revisionLabel = _nullishCoalesce(_optionalChain([version, 'access', _524 => _524.artifactHash, 'optionalAccess', _525 => _525.slice, 'call', _526 => _526(0, 12)]), () => ( "unknown-revision"));
|
|
15124
15159
|
const state = [
|
|
15125
15160
|
version.isLive ? "live" : null,
|
|
15126
15161
|
version.isWorking ? "working" : null
|
|
@@ -15134,8 +15169,8 @@ async function handlePlayVersions(args) {
|
|
|
15134
15169
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
15135
15170
|
return 1;
|
|
15136
15171
|
}
|
|
15137
|
-
const client = new (0,
|
|
15138
|
-
const jsonOutput =
|
|
15172
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
15173
|
+
const jsonOutput = _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
15139
15174
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15140
15175
|
command: "versions"
|
|
15141
15176
|
});
|
|
@@ -15143,7 +15178,7 @@ async function handlePlayVersions(args) {
|
|
|
15143
15178
|
parseReferencedPlayTarget2(playName).playName
|
|
15144
15179
|
);
|
|
15145
15180
|
if (jsonOutput) {
|
|
15146
|
-
|
|
15181
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, { versions });
|
|
15147
15182
|
return 0;
|
|
15148
15183
|
}
|
|
15149
15184
|
if (versions.length === 0) {
|
|
@@ -15175,11 +15210,11 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
15175
15210
|
"signals"
|
|
15176
15211
|
];
|
|
15177
15212
|
async function handlePlayList(args) {
|
|
15178
|
-
const jsonOutput =
|
|
15213
|
+
const jsonOutput = _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
15179
15214
|
const showCost = args.includes("--show-cost");
|
|
15180
|
-
const client = new (0,
|
|
15215
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
15181
15216
|
const categoriesIndex = args.indexOf("--categories");
|
|
15182
|
-
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access',
|
|
15217
|
+
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _527 => _527[categoriesIndex + 1], 'optionalAccess', _528 => _528.trim, 'call', _529 => _529()]) : void 0;
|
|
15183
15218
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
15184
15219
|
if (args.includes("--tag") && tags.length === 0) {
|
|
15185
15220
|
console.error(
|
|
@@ -15200,7 +15235,7 @@ async function handlePlayList(args) {
|
|
|
15200
15235
|
const cursorIndex = args.indexOf("--cursor");
|
|
15201
15236
|
const limit = limitIndex >= 0 ? Number(args[limitIndex + 1]) : void 0;
|
|
15202
15237
|
const cursor = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
15203
|
-
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess',
|
|
15238
|
+
if (limitIndex >= 0 && (!Number.isSafeInteger(limit) || limit < 1) || cursorIndex >= 0 && !_optionalChain([cursor, 'optionalAccess', _530 => _530.trim, 'call', _531 => _531()])) {
|
|
15204
15239
|
console.error("Pass a positive --limit and a non-empty --cursor.");
|
|
15205
15240
|
return 2;
|
|
15206
15241
|
}
|
|
@@ -15240,7 +15275,7 @@ async function handlePlayList(args) {
|
|
|
15240
15275
|
if (play.inputSchema || play.hasInputSchema) {
|
|
15241
15276
|
lines.push(" inputSchema: yes");
|
|
15242
15277
|
}
|
|
15243
|
-
if (_optionalChain([play, 'access',
|
|
15278
|
+
if (_optionalChain([play, 'access', _532 => _532.triggerStatus, 'optionalAccess', _533 => _533.cron])) {
|
|
15244
15279
|
lines.push(
|
|
15245
15280
|
` scheduled execution: ${cronExecutionLabel(play.triggerStatus.cron)}`
|
|
15246
15281
|
);
|
|
@@ -15260,7 +15295,7 @@ async function handlePlayList(args) {
|
|
|
15260
15295
|
} else {
|
|
15261
15296
|
lines.push(" scheduled execution: not configured");
|
|
15262
15297
|
}
|
|
15263
|
-
if (_optionalChain([play, 'access',
|
|
15298
|
+
if (_optionalChain([play, 'access', _534 => _534.triggerStatus, 'optionalAccess', _535 => _535.webhook])) {
|
|
15264
15299
|
lines.push(` webhook: ${play.triggerStatus.webhook}`);
|
|
15265
15300
|
}
|
|
15266
15301
|
if (showCost) {
|
|
@@ -15274,7 +15309,7 @@ async function handlePlayList(args) {
|
|
|
15274
15309
|
lines.push("List truncated \u2014 more plays are available.");
|
|
15275
15310
|
lines.push(`Next page: ${nextPage}`);
|
|
15276
15311
|
}
|
|
15277
|
-
|
|
15312
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
15278
15313
|
{
|
|
15279
15314
|
plays,
|
|
15280
15315
|
count: plays.length,
|
|
@@ -15291,8 +15326,8 @@ async function handlePlayList(args) {
|
|
|
15291
15326
|
return 0;
|
|
15292
15327
|
}
|
|
15293
15328
|
async function handlePlayPin(args, pinned) {
|
|
15294
|
-
const target = _optionalChain([args, 'access',
|
|
15295
|
-
const jsonOutput =
|
|
15329
|
+
const target = _optionalChain([args, 'access', _536 => _536.find, 'call', _537 => _537((arg) => !arg.startsWith("-")), 'optionalAccess', _538 => _538.trim, 'call', _539 => _539()]);
|
|
15330
|
+
const jsonOutput = _chunkSK6KH37Mjs.argsWantJson.call(void 0, args);
|
|
15296
15331
|
const dryRun = args.includes("--dry-run");
|
|
15297
15332
|
if (!target) {
|
|
15298
15333
|
console.error(
|
|
@@ -15310,11 +15345,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
15310
15345
|
const name = parsedTarget.playName;
|
|
15311
15346
|
const plan = { name, pinned, dryRun };
|
|
15312
15347
|
if (dryRun) {
|
|
15313
|
-
|
|
15348
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, plan);
|
|
15314
15349
|
return 0;
|
|
15315
15350
|
}
|
|
15316
|
-
const result = await new (0,
|
|
15317
|
-
if (jsonOutput)
|
|
15351
|
+
const result = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().setPlayPinned(name, pinned);
|
|
15352
|
+
if (jsonOutput) _chunkSK6KH37Mjs.printCompactJson.call(void 0, result);
|
|
15318
15353
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
15319
15354
|
return 0;
|
|
15320
15355
|
}
|
|
@@ -15330,7 +15365,7 @@ function csvColumnLines(csvInput) {
|
|
|
15330
15365
|
const headers = [defaults[column]].flat().filter((header) => header && header !== column);
|
|
15331
15366
|
return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
|
|
15332
15367
|
}),
|
|
15333
|
-
|
|
15368
|
+
_chunkJLNMJAWSjs.CSV_HEADER_MATCHING_NOTE
|
|
15334
15369
|
];
|
|
15335
15370
|
}
|
|
15336
15371
|
function describedPlay(play) {
|
|
@@ -15386,7 +15421,7 @@ function describedPlay(play) {
|
|
|
15386
15421
|
...starter ? { source: starter.command } : {},
|
|
15387
15422
|
...exclusive ? { exclusive } : {},
|
|
15388
15423
|
// A prebuilt's cost is what its recent runs were charged; there is no rate.
|
|
15389
|
-
..._optionalChain([play, 'access',
|
|
15424
|
+
..._optionalChain([play, 'access', _540 => _540.observedCost, 'optionalAccess', _541 => _541.displayText]) ? { cost: play.observedCost.displayText } : {}
|
|
15390
15425
|
};
|
|
15391
15426
|
}
|
|
15392
15427
|
function printPlayDescription(play) {
|
|
@@ -15418,7 +15453,7 @@ function printPlayDescription(play) {
|
|
|
15418
15453
|
console.log(` ${line}`);
|
|
15419
15454
|
}
|
|
15420
15455
|
}
|
|
15421
|
-
if (_optionalChain([play, 'access',
|
|
15456
|
+
if (_optionalChain([play, 'access', _542 => _542.toolCategories, 'optionalAccess', _543 => _543.length])) {
|
|
15422
15457
|
console.log(` Tool categories: ${play.toolCategories.join(", ")}`);
|
|
15423
15458
|
}
|
|
15424
15459
|
if (play.aliases.length > 0) {
|
|
@@ -15463,7 +15498,7 @@ function printPlayDescription(play) {
|
|
|
15463
15498
|
const runtimeLimit = formatPlayRuntimeLimit(play.runtimeLimit);
|
|
15464
15499
|
if (runtimeLimit) {
|
|
15465
15500
|
console.log(
|
|
15466
|
-
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access',
|
|
15501
|
+
` Runtime limit: ${runtimeLimit} (${_nullishCoalesce(_optionalChain([play, 'access', _544 => _544.runtimeLimit, 'optionalAccess', _545 => _545.source]), () => ( "live"))})`
|
|
15467
15502
|
);
|
|
15468
15503
|
}
|
|
15469
15504
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
@@ -15491,17 +15526,17 @@ function formatPlayGrepMatches(matches) {
|
|
|
15491
15526
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
15492
15527
|
}
|
|
15493
15528
|
async function handlePlayGrep(args) {
|
|
15494
|
-
const query = _optionalChain([args, 'access',
|
|
15529
|
+
const query = _optionalChain([args, 'access', _546 => _546[0], 'optionalAccess', _547 => _547.trim, 'call', _548 => _548()]);
|
|
15495
15530
|
if (!query) {
|
|
15496
15531
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
15497
15532
|
return 1;
|
|
15498
15533
|
}
|
|
15499
|
-
const client = new (0,
|
|
15534
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
15500
15535
|
const results = (await client.listPlays({ grep: query })).map(
|
|
15501
15536
|
summarizePlayGrepResult
|
|
15502
15537
|
);
|
|
15503
|
-
if (
|
|
15504
|
-
|
|
15538
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
15539
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, {
|
|
15505
15540
|
plays: results,
|
|
15506
15541
|
count: results.length,
|
|
15507
15542
|
query,
|
|
@@ -15515,7 +15550,7 @@ async function handlePlayGrep(args) {
|
|
|
15515
15550
|
`
|
|
15516
15551
|
);
|
|
15517
15552
|
for (const result of results) {
|
|
15518
|
-
console.log(_optionalChain([result, 'access',
|
|
15553
|
+
console.log(_optionalChain([result, 'access', _549 => _549.displayName, 'optionalAccess', _550 => _550.trim, 'call', _551 => _551()]) || result.name);
|
|
15519
15554
|
const matches = formatPlayGrepMatches(result.matches);
|
|
15520
15555
|
if (matches) console.log(` Matched: ${matches}`);
|
|
15521
15556
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -15524,7 +15559,7 @@ async function handlePlayGrep(args) {
|
|
|
15524
15559
|
return 0;
|
|
15525
15560
|
}
|
|
15526
15561
|
async function handlePlayDescribe(args) {
|
|
15527
|
-
const selection =
|
|
15562
|
+
const selection = _chunkSK6KH37Mjs.parseJsonFields.call(void 0, args, "describe");
|
|
15528
15563
|
args = selection.args;
|
|
15529
15564
|
const playName = args[0];
|
|
15530
15565
|
if (!playName) {
|
|
@@ -15558,8 +15593,8 @@ async function handlePlayDescribe(args) {
|
|
|
15558
15593
|
`deepline plays check ${playName}`,
|
|
15559
15594
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
15560
15595
|
];
|
|
15561
|
-
if (
|
|
15562
|
-
|
|
15596
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
15597
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, {
|
|
15563
15598
|
ok: false,
|
|
15564
15599
|
error: { message },
|
|
15565
15600
|
next
|
|
@@ -15573,7 +15608,7 @@ async function handlePlayDescribe(args) {
|
|
|
15573
15608
|
}
|
|
15574
15609
|
return 2;
|
|
15575
15610
|
}
|
|
15576
|
-
const client = new (0,
|
|
15611
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
15577
15612
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
15578
15613
|
command: "describe"
|
|
15579
15614
|
});
|
|
@@ -15583,9 +15618,9 @@ async function handlePlayDescribe(args) {
|
|
|
15583
15618
|
compact: args.includes("--compact")
|
|
15584
15619
|
}
|
|
15585
15620
|
);
|
|
15586
|
-
if (
|
|
15587
|
-
if (selection.fields)
|
|
15588
|
-
else
|
|
15621
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
15622
|
+
if (selection.fields) _chunkSK6KH37Mjs.printJson.call(void 0, play, selection.fields);
|
|
15623
|
+
else _chunkSK6KH37Mjs.printCompactJson.call(void 0, play);
|
|
15589
15624
|
return 0;
|
|
15590
15625
|
}
|
|
15591
15626
|
printPlayDescription(play);
|
|
@@ -15629,7 +15664,7 @@ async function handlePlaySave(args) {
|
|
|
15629
15664
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
15630
15665
|
};
|
|
15631
15666
|
if (options.jsonOutput) {
|
|
15632
|
-
|
|
15667
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result);
|
|
15633
15668
|
} else {
|
|
15634
15669
|
console.error(result.message);
|
|
15635
15670
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -15651,7 +15686,7 @@ async function handlePlaySave(args) {
|
|
|
15651
15686
|
};
|
|
15652
15687
|
if (options.dryRun) {
|
|
15653
15688
|
if (options.jsonOutput) {
|
|
15654
|
-
|
|
15689
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, dryRun);
|
|
15655
15690
|
} else {
|
|
15656
15691
|
console.log(`Dry run: ${playName}`);
|
|
15657
15692
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15660,7 +15695,7 @@ async function handlePlaySave(args) {
|
|
|
15660
15695
|
}
|
|
15661
15696
|
return 0;
|
|
15662
15697
|
}
|
|
15663
|
-
const client = new (0,
|
|
15698
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
15664
15699
|
try {
|
|
15665
15700
|
await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
15666
15701
|
"cli.play_save_compile_manifests",
|
|
@@ -15696,7 +15731,7 @@ async function handlePlaySave(args) {
|
|
|
15696
15731
|
}
|
|
15697
15732
|
};
|
|
15698
15733
|
if (options.jsonOutput) {
|
|
15699
|
-
|
|
15734
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result);
|
|
15700
15735
|
} else {
|
|
15701
15736
|
console.log(
|
|
15702
15737
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -15722,7 +15757,7 @@ async function handlePlayPublish(args) {
|
|
|
15722
15757
|
}
|
|
15723
15758
|
const { target: playName, useLatest } = options;
|
|
15724
15759
|
let revisionId = options.revisionId;
|
|
15725
|
-
const client = new (0,
|
|
15760
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
15726
15761
|
if (isFileTarget2(playName)) {
|
|
15727
15762
|
if (revisionId || useLatest) {
|
|
15728
15763
|
console.error(
|
|
@@ -15754,7 +15789,7 @@ async function handlePlayPublish(args) {
|
|
|
15754
15789
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
15755
15790
|
};
|
|
15756
15791
|
if (options.jsonOutput) {
|
|
15757
|
-
|
|
15792
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result3);
|
|
15758
15793
|
} else {
|
|
15759
15794
|
console.error(result3.message);
|
|
15760
15795
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -15777,7 +15812,7 @@ async function handlePlayPublish(args) {
|
|
|
15777
15812
|
};
|
|
15778
15813
|
if (options.dryRun) {
|
|
15779
15814
|
if (options.jsonOutput) {
|
|
15780
|
-
|
|
15815
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, dryRun);
|
|
15781
15816
|
} else {
|
|
15782
15817
|
console.log(`Dry run: ${rootPlayName}`);
|
|
15783
15818
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -15835,17 +15870,17 @@ async function handlePlayPublish(args) {
|
|
|
15835
15870
|
artifactHash,
|
|
15836
15871
|
liveVersion: _nullishCoalesce(published.version, () => ( null)),
|
|
15837
15872
|
revisionId: _nullishCoalesce(published.revisionId, () => ( null)),
|
|
15838
|
-
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15839
|
-
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess',
|
|
15873
|
+
previousLiveVersion: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _552 => _552.version]), () => ( null)),
|
|
15874
|
+
previousArtifactHash: _nullishCoalesce(_optionalChain([previousLive, 'optionalAccess', _553 => _553.artifactHash]), () => ( null)),
|
|
15840
15875
|
sourceBytes: {
|
|
15841
|
-
before: _optionalChain([previousLive, 'optionalAccess',
|
|
15876
|
+
before: _optionalChain([previousLive, 'optionalAccess', _554 => _554.sourceCode]) ? Buffer.byteLength(previousLive.sourceCode, "utf8") : null,
|
|
15842
15877
|
after: Buffer.byteLength(graph.root.sourceCode, "utf8")
|
|
15843
15878
|
},
|
|
15844
15879
|
triggerMetadata: _nullishCoalesce(published.triggerMetadata, () => ( null)),
|
|
15845
15880
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
15846
15881
|
};
|
|
15847
15882
|
if (options.jsonOutput) {
|
|
15848
|
-
|
|
15883
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result2);
|
|
15849
15884
|
} else {
|
|
15850
15885
|
printPublishReceipt({
|
|
15851
15886
|
name: rootPlayName,
|
|
@@ -15876,14 +15911,14 @@ async function handlePlayPublish(args) {
|
|
|
15876
15911
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
15877
15912
|
latest: useLatest
|
|
15878
15913
|
};
|
|
15879
|
-
|
|
15914
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result2);
|
|
15880
15915
|
return 0;
|
|
15881
15916
|
}
|
|
15882
15917
|
const resolvedName = parseReferencedPlayTarget2(playName).playName;
|
|
15883
15918
|
if (useLatest) {
|
|
15884
15919
|
const versions = await client.listPlayVersions(resolvedName);
|
|
15885
15920
|
const latest = versions[0];
|
|
15886
|
-
if (!_optionalChain([latest, 'optionalAccess',
|
|
15921
|
+
if (!_optionalChain([latest, 'optionalAccess', _555 => _555._id])) {
|
|
15887
15922
|
console.error(`No saved revisions found for ${resolvedName}.`);
|
|
15888
15923
|
return 1;
|
|
15889
15924
|
}
|
|
@@ -15900,7 +15935,7 @@ async function handlePlayPublish(args) {
|
|
|
15900
15935
|
revisionId ? { revisionId } : {}
|
|
15901
15936
|
);
|
|
15902
15937
|
if (options.jsonOutput) {
|
|
15903
|
-
|
|
15938
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result);
|
|
15904
15939
|
} else {
|
|
15905
15940
|
printPublishReceipt({
|
|
15906
15941
|
name: result.name,
|
|
@@ -15940,7 +15975,7 @@ async function handlePlayDelete(args) {
|
|
|
15940
15975
|
);
|
|
15941
15976
|
return 2;
|
|
15942
15977
|
}
|
|
15943
|
-
const client = new (0,
|
|
15978
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
15944
15979
|
let detail;
|
|
15945
15980
|
try {
|
|
15946
15981
|
detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
|
|
@@ -15964,8 +15999,8 @@ async function handlePlayDelete(args) {
|
|
|
15964
15999
|
name: resolvedName,
|
|
15965
16000
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
15966
16001
|
};
|
|
15967
|
-
if (
|
|
15968
|
-
|
|
16002
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
16003
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result2);
|
|
15969
16004
|
} else {
|
|
15970
16005
|
process.stdout.write(
|
|
15971
16006
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -15975,8 +16010,8 @@ async function handlePlayDelete(args) {
|
|
|
15975
16010
|
return 0;
|
|
15976
16011
|
}
|
|
15977
16012
|
const result = await client.deletePlay(resolvedName);
|
|
15978
|
-
if (
|
|
15979
|
-
|
|
16013
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
16014
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result);
|
|
15980
16015
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
15981
16016
|
}
|
|
15982
16017
|
if (result.alreadyArchived) {
|
|
@@ -16015,13 +16050,13 @@ async function handlePlayRestore(args) {
|
|
|
16015
16050
|
);
|
|
16016
16051
|
return 2;
|
|
16017
16052
|
}
|
|
16018
|
-
const client = new (0,
|
|
16053
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
16019
16054
|
try {
|
|
16020
16055
|
const result = await client.restorePlay(
|
|
16021
16056
|
parseReferencedPlayTarget2(playName).playName
|
|
16022
16057
|
);
|
|
16023
|
-
if (
|
|
16024
|
-
|
|
16058
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
16059
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, result);
|
|
16025
16060
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
16026
16061
|
}
|
|
16027
16062
|
if (result.alreadyActive) {
|
|
@@ -16127,7 +16162,7 @@ Examples:
|
|
|
16127
16162
|
).action(async (target, options) => {
|
|
16128
16163
|
process.exitCode = await handlePlayCheck([
|
|
16129
16164
|
target,
|
|
16130
|
-
...
|
|
16165
|
+
..._chunkSK6KH37Mjs.jsonFieldArgs.call(void 0, options.json),
|
|
16131
16166
|
...options.full ? ["--full"] : []
|
|
16132
16167
|
]);
|
|
16133
16168
|
});
|
|
@@ -16357,9 +16392,9 @@ Examples:
|
|
|
16357
16392
|
const limit = Number(options.historyLimit);
|
|
16358
16393
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
16359
16394
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
16360
|
-
const client = new (0,
|
|
16395
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
16361
16396
|
if (options.binding) {
|
|
16362
|
-
|
|
16397
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0,
|
|
16363
16398
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
16364
16399
|
);
|
|
16365
16400
|
return;
|
|
@@ -16367,7 +16402,7 @@ Examples:
|
|
|
16367
16402
|
const result = await client.listPlayTriggerInventory({
|
|
16368
16403
|
cursor: options.cursor
|
|
16369
16404
|
});
|
|
16370
|
-
|
|
16405
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, {
|
|
16371
16406
|
...result,
|
|
16372
16407
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)}`
|
|
16373
16408
|
});
|
|
@@ -16414,7 +16449,7 @@ Examples:
|
|
|
16414
16449
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
16415
16450
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
16416
16451
|
}
|
|
16417
|
-
const result = await new (0,
|
|
16452
|
+
const result = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().getPlaysActivity({
|
|
16418
16453
|
timeZone: options.timeZone,
|
|
16419
16454
|
days,
|
|
16420
16455
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -16428,7 +16463,7 @@ Examples:
|
|
|
16428
16463
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
16429
16464
|
);
|
|
16430
16465
|
}
|
|
16431
|
-
|
|
16466
|
+
_chunkSK6KH37Mjs.printCommandEnvelope.call(void 0,
|
|
16432
16467
|
{ ...result },
|
|
16433
16468
|
{
|
|
16434
16469
|
json: Boolean(options.json),
|
|
@@ -16457,7 +16492,7 @@ Examples:
|
|
|
16457
16492
|
false
|
|
16458
16493
|
);
|
|
16459
16494
|
});
|
|
16460
|
-
|
|
16495
|
+
_chunkIWNJYV27js.registerDeprecatedSearchCommand.call(void 0,
|
|
16461
16496
|
play,
|
|
16462
16497
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
16463
16498
|
);
|
|
@@ -16500,7 +16535,7 @@ Examples:
|
|
|
16500
16535
|
);
|
|
16501
16536
|
_chunkZMVJSS6Njs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
16502
16537
|
async (target, options) => {
|
|
16503
|
-
const ownView = () => handlePlayDescribe(
|
|
16538
|
+
const ownView = () => handlePlayDescribe(_chunkSK6KH37Mjs.describeArgs.call(void 0, target, options));
|
|
16504
16539
|
const [flagText] = [options.json].filter(
|
|
16505
16540
|
(value) => typeof value === "string"
|
|
16506
16541
|
);
|
|
@@ -16511,7 +16546,7 @@ Examples:
|
|
|
16511
16546
|
process.exitCode = await ownView();
|
|
16512
16547
|
return;
|
|
16513
16548
|
}
|
|
16514
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
16549
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-HW2SROYB.js")));
|
|
16515
16550
|
process.exitCode = await describeAnything(
|
|
16516
16551
|
name,
|
|
16517
16552
|
{
|
|
@@ -16629,7 +16664,7 @@ Examples:
|
|
|
16629
16664
|
deepline plays deployments <deployment-id>
|
|
16630
16665
|
`
|
|
16631
16666
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output").action(
|
|
16632
|
-
async (id, options) => id ?
|
|
16667
|
+
async (id, options) => id ? _chunkSGG4X23Ejs.handleDeploymentGet.call(void 0, id, options) : _chunkSGG4X23Ejs.handleDeploymentsList.call(void 0, options)
|
|
16633
16668
|
);
|
|
16634
16669
|
addPublishHelp(
|
|
16635
16670
|
play.command("publish <target>").description(
|
|
@@ -16782,10 +16817,13 @@ Notes:
|
|
|
16782
16817
|
--json run.status,datasets.name,actions selects fields without flattening.
|
|
16783
16818
|
Selection changes stdout only, not the server query. Optional missing paths
|
|
16784
16819
|
are omitted; array positions are preserved. --json diagnostics needs --full.
|
|
16820
|
+
dashboardUrl (text: "play page:") links the run's play page; link it in a
|
|
16821
|
+
final answer. --web-url prints only that URL (with --json: {"dashboardUrl"}).
|
|
16785
16822
|
|
|
16786
16823
|
Examples:
|
|
16787
16824
|
deepline runs get play/my-play/run/20260501t000000-000
|
|
16788
16825
|
deepline runs get play/my-play/run/20260501t000000-000
|
|
16826
|
+
deepline runs get play/my-play/run/20260501t000000-000 --web-url
|
|
16789
16827
|
deepline runs logs play/my-play/run/20260501t000000-000 --failed
|
|
16790
16828
|
deepline runs get play/my-play/run/20260501t000000-000 --full
|
|
16791
16829
|
deepline runs get play/my-play/run/20260501t000000-000 --input
|
|
@@ -16803,12 +16841,13 @@ Examples:
|
|
|
16803
16841
|
).option(
|
|
16804
16842
|
"--config",
|
|
16805
16843
|
"Explicitly print the recorded configuration, without full results"
|
|
16806
|
-
).addOption(
|
|
16844
|
+
).option("--web-url", "Print only the run's play page URL").addOption(
|
|
16807
16845
|
new (0, _commander.Option)("--log-failed", "Attach terminal-failure logs").hideHelp()
|
|
16808
16846
|
).action(async (runId, options) => {
|
|
16809
16847
|
process.exitCode = await handleRunGet([
|
|
16810
16848
|
runId,
|
|
16811
|
-
...
|
|
16849
|
+
..._chunkSK6KH37Mjs.jsonFieldArgs.call(void 0, options.json),
|
|
16850
|
+
...options.webUrl ? ["--web-url"] : [],
|
|
16812
16851
|
...options.full ? ["--full"] : [],
|
|
16813
16852
|
...options.input ? ["--input"] : [],
|
|
16814
16853
|
...options.config ? ["--config"] : [],
|
|
@@ -17083,7 +17122,7 @@ Examples:
|
|
|
17083
17122
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
17084
17123
|
...options.wait ? ["--wait"] : [],
|
|
17085
17124
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
17086
|
-
...
|
|
17125
|
+
..._chunkSK6KH37Mjs.jsonFieldArgs.call(void 0, options.json)
|
|
17087
17126
|
]);
|
|
17088
17127
|
});
|
|
17089
17128
|
const share = play.command("share").description(
|
|
@@ -17224,8 +17263,8 @@ function absolutePublicPlayUrl(path) {
|
|
|
17224
17263
|
}
|
|
17225
17264
|
function shareUrlFields(status) {
|
|
17226
17265
|
return {
|
|
17227
|
-
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17228
|
-
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access',
|
|
17266
|
+
publicUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _556 => _556.share, 'optionalAccess', _557 => _557.publicPath])),
|
|
17267
|
+
canonicalUrl: absolutePublicPlayUrl(_optionalChain([status, 'access', _558 => _558.share, 'optionalAccess', _559 => _559.canonicalPath]))
|
|
17229
17268
|
};
|
|
17230
17269
|
}
|
|
17231
17270
|
function shareStatusForOutput(status) {
|
|
@@ -17249,10 +17288,10 @@ async function handlePlayShareStatus(args) {
|
|
|
17249
17288
|
return 2;
|
|
17250
17289
|
}
|
|
17251
17290
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17252
|
-
const status = await new (0,
|
|
17291
|
+
const status = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().getSharePage(name);
|
|
17253
17292
|
const outputStatus = shareStatusForOutput(status);
|
|
17254
|
-
if (
|
|
17255
|
-
|
|
17293
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
17294
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, outputStatus);
|
|
17256
17295
|
return 0;
|
|
17257
17296
|
}
|
|
17258
17297
|
if (!outputStatus.share) {
|
|
@@ -17291,7 +17330,7 @@ async function handlePlaySharePublish(args) {
|
|
|
17291
17330
|
return 2;
|
|
17292
17331
|
}
|
|
17293
17332
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17294
|
-
const client = new (0,
|
|
17333
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
17295
17334
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17296
17335
|
let resolvedVersion;
|
|
17297
17336
|
if (!revisionId) {
|
|
@@ -17322,8 +17361,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17322
17361
|
);
|
|
17323
17362
|
if (!hasCompleted) {
|
|
17324
17363
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
17325
|
-
if (
|
|
17326
|
-
|
|
17364
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
17365
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, {
|
|
17327
17366
|
ok: false,
|
|
17328
17367
|
code: "NO_SUCCESSFUL_RUN",
|
|
17329
17368
|
message,
|
|
@@ -17347,8 +17386,8 @@ async function handlePlaySharePublish(args) {
|
|
|
17347
17386
|
};
|
|
17348
17387
|
if (args.includes("--dry-run")) {
|
|
17349
17388
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
17350
|
-
if (
|
|
17351
|
-
|
|
17389
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
17390
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, plan);
|
|
17352
17391
|
} else {
|
|
17353
17392
|
console.log(
|
|
17354
17393
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -17358,13 +17397,13 @@ async function handlePlaySharePublish(args) {
|
|
|
17358
17397
|
}
|
|
17359
17398
|
const status = await client.publishSharePage(name, request);
|
|
17360
17399
|
const outputStatus = shareStatusForOutput(status);
|
|
17361
|
-
if (
|
|
17362
|
-
|
|
17400
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
17401
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, outputStatus);
|
|
17363
17402
|
return 0;
|
|
17364
17403
|
}
|
|
17365
17404
|
const urls = shareUrlFields(outputStatus);
|
|
17366
17405
|
console.log(
|
|
17367
|
-
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access',
|
|
17406
|
+
`Published ${name}${outputStatus.share ? ` v${outputStatus.share.publishedVersion}` : ""}: ${_nullishCoalesce(_nullishCoalesce(urls.publicUrl, () => ( _optionalChain([outputStatus, 'access', _560 => _560.share, 'optionalAccess', _561 => _561.publicPath]))), () => ( ""))}`
|
|
17368
17407
|
);
|
|
17369
17408
|
if (urls.canonicalUrl && urls.canonicalUrl !== urls.publicUrl) {
|
|
17370
17409
|
console.log(`Version URL: ${urls.canonicalUrl}`);
|
|
@@ -17390,9 +17429,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
17390
17429
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
17391
17430
|
...seoIndexing ? { seoIndexing } : {}
|
|
17392
17431
|
};
|
|
17393
|
-
const status = await new (0,
|
|
17394
|
-
if (
|
|
17395
|
-
|
|
17432
|
+
const status = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().updateSharePage(name, request);
|
|
17433
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
17434
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, status);
|
|
17396
17435
|
return 0;
|
|
17397
17436
|
}
|
|
17398
17437
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -17407,13 +17446,13 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17407
17446
|
return 2;
|
|
17408
17447
|
}
|
|
17409
17448
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17410
|
-
const client = new (0,
|
|
17449
|
+
const client = new (0, _chunkJLNMJAWSjs.DeeplineClient)();
|
|
17411
17450
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
17412
17451
|
const versionFlag = shareFlagValue(args, "--version");
|
|
17413
17452
|
if (!revisionId && versionFlag) {
|
|
17414
17453
|
const versions = await client.listPlayVersions(name);
|
|
17415
17454
|
const chosen = versions.find((r) => r.version === Number(versionFlag));
|
|
17416
|
-
if (!_optionalChain([chosen, 'optionalAccess',
|
|
17455
|
+
if (!_optionalChain([chosen, 'optionalAccess', _562 => _562._id])) {
|
|
17417
17456
|
console.error(`Version ${versionFlag} not found for ${name}.`);
|
|
17418
17457
|
return 4;
|
|
17419
17458
|
}
|
|
@@ -17424,12 +17463,12 @@ async function handlePlayShareRegenerate(args) {
|
|
|
17424
17463
|
revisionId ? { revisionId } : {}
|
|
17425
17464
|
);
|
|
17426
17465
|
const outputStatus = shareStatusForOutput(status);
|
|
17427
|
-
if (
|
|
17428
|
-
|
|
17466
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
17467
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, outputStatus);
|
|
17429
17468
|
return 0;
|
|
17430
17469
|
}
|
|
17431
17470
|
const urls = shareUrlFields(outputStatus);
|
|
17432
|
-
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access',
|
|
17471
|
+
const regeneratedPublishedRevision = !revisionId || _optionalChain([outputStatus, 'access', _563 => _563.share, 'optionalAccess', _564 => _564.publishedRevisionId]) === revisionId;
|
|
17433
17472
|
console.log(
|
|
17434
17473
|
`Regenerated public copy for ${name}${regeneratedPublishedRevision && urls.publicUrl ? `: ${urls.publicUrl}` : "."}`
|
|
17435
17474
|
);
|
|
@@ -17450,9 +17489,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17450
17489
|
return 2;
|
|
17451
17490
|
}
|
|
17452
17491
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
17453
|
-
const status = await new (0,
|
|
17454
|
-
if (
|
|
17455
|
-
|
|
17492
|
+
const status = await new (0, _chunkJLNMJAWSjs.DeeplineClient)().unpublishSharePage(name);
|
|
17493
|
+
if (_chunkSK6KH37Mjs.argsWantJson.call(void 0, args)) {
|
|
17494
|
+
_chunkSK6KH37Mjs.printCompactJson.call(void 0, status);
|
|
17456
17495
|
return 0;
|
|
17457
17496
|
}
|
|
17458
17497
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -17525,4 +17564,5 @@ async function handlePlayShareUnpublish(args) {
|
|
|
17525
17564
|
|
|
17526
17565
|
|
|
17527
17566
|
|
|
17528
|
-
|
|
17567
|
+
|
|
17568
|
+
exports.resolveDatasetByName = resolveDatasetByName; exports.parsePlayRunHeaderFlag = parsePlayRunHeaderFlag; exports.parsePlayRunOptions = parsePlayRunOptions; exports.loadPlayBundler = loadPlayBundler; exports.liveMaxCreditsPerRun = liveMaxCreditsPerRun; exports.writePlayRunIdFile = writePlayRunIdFile; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.describeSleepUntil = describeSleepUntil; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.buildPlayDashboardUrl = buildPlayDashboardUrl; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.clampJsonPreviewText = clampJsonPreviewText; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.compactPlayStatus = compactPlayStatus; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.exportPlayStatusRows = exportPlayStatusRows; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayRun = handlePlayRun; exports.renderRunOverviewText = renderRunOverviewText; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunsRerun = handleRunsRerun; exports.handleRunsList = handleRunsList; exports.handleRunTail = handleRunTail; exports.handleRunLogs = handleRunLogs; exports.selectRunLogTailPage = selectRunLogTailPage; exports.handleRunEventSearch = handleRunEventSearch; exports.buildRunLogsText = buildRunLogsText; exports.resolveRunStopState = resolveRunStopState; exports.handleRunStop = handleRunStop; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.handleRunStopAll = handleRunStopAll; exports.handleRunExport = handleRunExport; exports.handlePlayGet = handlePlayGet; exports.handlePlayVersions = handlePlayVersions; exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.csvColumnLines = csvColumnLines; exports.describedPlay = describedPlay; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlaySave = handlePlaySave; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayRestore = handlePlayRestore; exports.registerPlayCommands = registerPlayCommands; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareUnpublish = handlePlayShareUnpublish;
|