deepline 0.3.338 → 0.3.340
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/bundling-sources/shared_libs/observability/scheduled-jobs.json +20 -2
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +20 -7
- package/dist/cli/{auth-MTF2TRBC.mjs → auth-AAHQCTJW.mjs} +4 -4
- package/dist/cli/auth-WDM5N7LQ.js +31 -0
- package/dist/cli/{billing-HXXPKDYV.mjs → billing-2X4SP44P.mjs} +4 -4
- package/dist/cli/{billing-OXEY6DAU.js → billing-SBU4F4VS.js} +71 -71
- package/dist/cli/{chunk-7WL23HDH.mjs → chunk-2IZ6RE5L.mjs} +1 -1
- package/dist/cli/{chunk-OTJMWSIK.mjs → chunk-6D77EBSR.mjs} +5 -5
- package/dist/cli/{chunk-FOODYFMR.js → chunk-6ONNP4XL.js} +1 -1
- package/dist/cli/{chunk-6CEPAFCE.mjs → chunk-77YWQTE6.mjs} +4 -4
- package/dist/cli/{chunk-BYIWZOSA.js → chunk-A4LUPRGL.js} +6 -6
- package/dist/cli/{chunk-FBU4A2ZE.mjs → chunk-AN3X5XIR.mjs} +2 -2
- package/dist/cli/{chunk-NUJIZBLA.js → chunk-AYAEVVB5.js} +4 -4
- package/dist/cli/{chunk-CVSUI4Z2.js → chunk-B2HJ2OFH.js} +48 -48
- package/dist/cli/{chunk-ID5OGCLU.mjs → chunk-DX37W6IS.mjs} +3 -3
- package/dist/cli/{chunk-XWTEOTGL.js → chunk-EQFYORNR.js} +26 -26
- package/dist/cli/{chunk-EV4QJE4J.mjs → chunk-IIOBMOMH.mjs} +18 -7
- package/dist/cli/{chunk-SSRGN56V.mjs → chunk-LR66EFVU.mjs} +1 -1
- package/dist/cli/{chunk-MIHJFRGP.mjs → chunk-M3KIBSVO.mjs} +2 -2
- package/dist/cli/{chunk-J47TX67H.mjs → chunk-N3X2DMF2.mjs} +1 -1
- package/dist/cli/{chunk-5OHHWYOV.js → chunk-NPPD5XT6.js} +45 -45
- package/dist/cli/{chunk-N3EOKUQV.mjs → chunk-OD7LIBSF.mjs} +2 -2
- package/dist/cli/{chunk-UQV5M6HN.js → chunk-OJVAVQLB.js} +18 -7
- package/dist/cli/{chunk-YMLGJ2B7.mjs → chunk-PLSVHYRC.mjs} +1 -1
- package/dist/cli/{chunk-NR5ILIKI.js → chunk-URO52CD6.js} +2 -2
- package/dist/cli/{chunk-HJEHCSFH.js → chunk-VLV2PVA2.js} +8 -8
- package/dist/cli/{chunk-CGVCELEC.mjs → chunk-VMEJLJJD.mjs} +1 -1
- package/dist/cli/{chunk-UVGGJ2CV.mjs → chunk-WDB7AIXJ.mjs} +59 -74
- package/dist/cli/{chunk-KLAWLBSP.js → chunk-X6A7PAR6.js} +60 -60
- package/dist/cli/{chunk-AHO5IXHM.js → chunk-XCB2WE4D.js} +15 -15
- package/dist/cli/{chunk-KRZDVQZH.js → chunk-YAYAOUH3.js} +8 -8
- package/dist/cli/{chunk-7EQ3WFD2.js → chunk-YLDIZ7A3.js} +9 -9
- package/dist/cli/{chunk-FYR7GGUF.js → chunk-YODUXBLR.js} +293 -308
- package/dist/cli/{chunk-NHTICK5G.mjs → chunk-YRDTRTU4.mjs} +2 -2
- package/dist/cli/client-2MTAJ6XW.js +20 -0
- package/dist/cli/{client-LXBODS53.mjs → client-LKEH3EYO.mjs} +3 -3
- package/dist/cli/{csv-3346Z7MA.mjs → csv-WDWQGVDN.mjs} +3 -3
- package/dist/cli/{csv-5UMO4TMZ.js → csv-ZQIEH4Q3.js} +12 -12
- package/dist/cli/{db-RBWIVEB3.js → db-CRQSATVK.js} +29 -29
- package/dist/cli/{db-HVAQDN7U.mjs → db-KKC6CT3W.mjs} +4 -4
- package/dist/cli/{describe-LAAOJYI2.js → describe-HGYOEBYE.js} +16 -16
- package/dist/cli/{describe-OKSZOU3V.mjs → describe-YEVXHHHH.mjs} +9 -9
- package/dist/cli/{executions-5WENZ6MO.js → executions-ISG5EEOO.js} +6 -6
- package/dist/cli/{executions-T56YNXAC.mjs → executions-MMNCPQNE.mjs} +4 -4
- package/dist/cli/{feedback-RU4EKJYX.mjs → feedback-3HNMWGJA.mjs} +3 -3
- package/dist/cli/{feedback-YZILULGJ.js → feedback-U5SC3CAL.js} +7 -7
- package/dist/cli/git-BULAJZKJ.js +23 -0
- package/dist/cli/{git-LX7NYWDT.mjs → git-REGKM36C.mjs} +4 -4
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-K6W26TQA.js → legacy-noops-GTUAF7TM.js} +7 -7
- package/dist/cli/{legacy-noops-SN44IUWD.mjs → legacy-noops-KUIQG6VC.mjs} +4 -4
- package/dist/cli/{monitors-BQ5SXRDD.mjs → monitors-7IYKWVMJ.mjs} +4 -4
- package/dist/cli/{monitors-R4D7X7PL.js → monitors-V5RFXFO5.js} +85 -85
- package/dist/cli/{org-6GWQHHLF.js → org-77BRBYNS.js} +60 -60
- package/dist/cli/{org-RNR3CGVL.mjs → org-RSN7GZN4.mjs} +4 -4
- package/dist/cli/play-IKPMX4VZ.js +153 -0
- package/dist/cli/{play-CPG4HFXR.mjs → play-ZPWFRN3I.mjs} +8 -8
- package/dist/cli/{providers-AP5NBYJF.js → providers-2LD2BJUO.js} +7 -7
- package/dist/cli/{providers-YEFPQW3K.mjs → providers-TVELPXNI.mjs} +4 -4
- package/dist/cli/{quickstart-IT43KYUN.mjs → quickstart-7RUT33IL.mjs} +3 -3
- package/dist/cli/{quickstart-5D6WSPKU.js → quickstart-CYL2GNSK.js} +5 -5
- package/dist/cli/search-2ZFU42IA.js +26 -0
- package/dist/cli/{search-BVTZBNF3.mjs → search-GJURFP4W.mjs} +5 -5
- package/dist/cli/{secrets-L6Q2JJNX.js → secrets-KWBPK5GP.js} +13 -13
- package/dist/cli/{secrets-7HG77SLP.mjs → secrets-L5LNMMSB.mjs} +4 -4
- package/dist/cli/{sessions-TNXYON2R.js → sessions-5DWIUOGX.js} +5 -5
- package/dist/cli/{sessions-SSBDCVQN.mjs → sessions-5EAEXNJY.mjs} +4 -4
- package/dist/cli/{settings-4FKK3LUF.js → settings-KBPJL4KI.js} +74 -74
- package/dist/cli/{settings-5L23COY7.mjs → settings-OPD6MT4Q.mjs} +7 -7
- package/dist/cli/{setup-EB5JLUFH.js → setup-B5UDLN32.js} +41 -41
- package/dist/cli/{setup-GXXWJFRV.mjs → setup-GFHBMHWJ.mjs} +6 -6
- package/dist/cli/{skills-ETEFVVPT.mjs → skills-3245BDMO.mjs} +4 -4
- package/dist/cli/skills-I5MHLBGC.js +28 -0
- package/dist/cli/tools-QQVNDK7W.js +40 -0
- package/dist/cli/{tools-HDTU55RW.mjs → tools-ZKXMREZU.mjs} +6 -6
- package/dist/cli/update-6OCUCA4T.js +28 -0
- package/dist/cli/{update-FR5QUV5I.mjs → update-NBHQD6N6.mjs} +6 -6
- package/dist/cli/{workflow-BE77YVLP.mjs → workflow-5XYAE4BX.mjs} +5 -5
- package/dist/cli/{workflow-OFWWX4ZP.js → workflow-T3IWKJI2.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-LVTYDMEL.js +0 -31
- package/dist/cli/client-V4OIXTP6.js +0 -20
- package/dist/cli/git-XASJHFDR.js +0 -23
- package/dist/cli/play-2V2Y4P3P.js +0 -153
- package/dist/cli/search-O66KVPGA.js +0 -26
- package/dist/cli/skills-XFMWA4WX.js +0 -28
- package/dist/cli/tools-3TWNYKZY.js +0 -40
- package/dist/cli/update-AEBCM2LT.js +0 -28
|
@@ -10,11 +10,11 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
10
10
|
var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkVLV2PVA2js = require('./chunk-VLV2PVA2.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkEQFYORNRjs = require('./chunk-EQFYORNR.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -39,7 +39,7 @@ var _chunkLVEDPCLJjs = require('./chunk-LVEDPCLJ.js');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkYLDIZ7A3js = require('./chunk-YLDIZ7A3.js');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
@@ -72,10 +72,10 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
var
|
|
75
|
+
var _chunkA4LUPRGLjs = require('./chunk-A4LUPRGL.js');
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
var
|
|
78
|
+
var _chunkAYAEVVB5js = require('./chunk-AYAEVVB5.js');
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
@@ -83,7 +83,7 @@ var _chunkNUJIZBLAjs = require('./chunk-NUJIZBLA.js');
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
var
|
|
86
|
+
var _chunkOJVAVQLBjs = require('./chunk-OJVAVQLB.js');
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -2067,7 +2067,7 @@ function resolveField(key, command) {
|
|
|
2067
2067
|
function printSettings(result, json, name) {
|
|
2068
2068
|
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2069
2069
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2070
|
-
|
|
2070
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2071
2071
|
{
|
|
2072
2072
|
...result,
|
|
2073
2073
|
settings: Object.fromEntries(
|
|
@@ -2111,7 +2111,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2111
2111
|
valueSyntax: field.cli.valueSyntax,
|
|
2112
2112
|
examples: field.cli.examples
|
|
2113
2113
|
}));
|
|
2114
|
-
|
|
2114
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2115
2115
|
{
|
|
2116
2116
|
fields: descriptions,
|
|
2117
2117
|
render: {
|
|
@@ -2136,7 +2136,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2136
2136
|
async (options, command) => {
|
|
2137
2137
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2138
2138
|
printSettings(
|
|
2139
|
-
await new (0,
|
|
2139
|
+
await new (0, _chunkYLDIZ7A3js.DeeplineClient)().getPlaySettings(options.play),
|
|
2140
2140
|
options.json,
|
|
2141
2141
|
options.name
|
|
2142
2142
|
);
|
|
@@ -2167,7 +2167,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2167
2167
|
);
|
|
2168
2168
|
}
|
|
2169
2169
|
if (options.dryRun) {
|
|
2170
|
-
|
|
2170
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2171
2171
|
{
|
|
2172
2172
|
dryRun: true,
|
|
2173
2173
|
play,
|
|
@@ -2188,7 +2188,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2188
2188
|
return;
|
|
2189
2189
|
}
|
|
2190
2190
|
printSettings(
|
|
2191
|
-
await new (0,
|
|
2191
|
+
await new (0, _chunkYLDIZ7A3js.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2192
2192
|
options.json
|
|
2193
2193
|
);
|
|
2194
2194
|
};
|
|
@@ -2214,13 +2214,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2214
2214
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2215
2215
|
{ exitCode: 2 }
|
|
2216
2216
|
);
|
|
2217
|
-
const page = await new (0,
|
|
2217
|
+
const page = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().listPlaySettingsPaths({
|
|
2218
2218
|
root: options.root,
|
|
2219
2219
|
limit,
|
|
2220
2220
|
cursor: options.cursor
|
|
2221
2221
|
});
|
|
2222
2222
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""} --json` : null;
|
|
2223
|
-
|
|
2223
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2224
2224
|
{
|
|
2225
2225
|
...page,
|
|
2226
2226
|
nextCommand,
|
|
@@ -2271,7 +2271,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2271
2271
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
|
|
2272
2272
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
|
|
2273
2273
|
};
|
|
2274
|
-
const client = new (0,
|
|
2274
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
2275
2275
|
const paths = [];
|
|
2276
2276
|
let cursor;
|
|
2277
2277
|
do {
|
|
@@ -2333,7 +2333,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2333
2333
|
moved.push(move.playName);
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
2336
|
-
|
|
2336
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2337
2337
|
{
|
|
2338
2338
|
dryRun: Boolean(options.dryRun),
|
|
2339
2339
|
from: options.from,
|
|
@@ -2461,7 +2461,7 @@ function triggerLines(view) {
|
|
|
2461
2461
|
return lines;
|
|
2462
2462
|
}
|
|
2463
2463
|
function printView(view, json) {
|
|
2464
|
-
|
|
2464
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2465
2465
|
{
|
|
2466
2466
|
...view,
|
|
2467
2467
|
render: {
|
|
@@ -2474,7 +2474,7 @@ function printView(view, json) {
|
|
|
2474
2474
|
);
|
|
2475
2475
|
}
|
|
2476
2476
|
function printResult(result, json) {
|
|
2477
|
-
|
|
2477
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2478
2478
|
{
|
|
2479
2479
|
...result,
|
|
2480
2480
|
render: {
|
|
@@ -2504,7 +2504,7 @@ async function mutate(command, options, build) {
|
|
|
2504
2504
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2505
2505
|
}
|
|
2506
2506
|
if (options.dryRun) {
|
|
2507
|
-
|
|
2507
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
2508
2508
|
{
|
|
2509
2509
|
dryRun: true,
|
|
2510
2510
|
play: options.play,
|
|
@@ -2523,7 +2523,7 @@ async function mutate(command, options, build) {
|
|
|
2523
2523
|
return;
|
|
2524
2524
|
}
|
|
2525
2525
|
printResult(
|
|
2526
|
-
await new (0,
|
|
2526
|
+
await new (0, _chunkYLDIZ7A3js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2527
2527
|
options.json
|
|
2528
2528
|
);
|
|
2529
2529
|
}
|
|
@@ -2556,7 +2556,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2556
2556
|
}).addHelpText("after", help2);
|
|
2557
2557
|
trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON; automatic when piped").addHelpText("after", help2).action(async (options) => {
|
|
2558
2558
|
printView(
|
|
2559
|
-
await new (0,
|
|
2559
|
+
await new (0, _chunkYLDIZ7A3js.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2560
2560
|
options.json
|
|
2561
2561
|
);
|
|
2562
2562
|
});
|
|
@@ -2600,7 +2600,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2600
2600
|
if (options.auth === void 0) {
|
|
2601
2601
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2602
2602
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2603
|
-
const current = await new (0,
|
|
2603
|
+
const current = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().getPlayTriggerConfig(
|
|
2604
2604
|
options.play
|
|
2605
2605
|
);
|
|
2606
2606
|
return {
|
|
@@ -2677,7 +2677,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2677
2677
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2678
2678
|
"runtime.event": "Other event."
|
|
2679
2679
|
};
|
|
2680
|
-
var RUN_LOGS_KIND_HELP =
|
|
2680
|
+
var RUN_LOGS_KIND_HELP = _chunkYLDIZ7A3js.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2681
2681
|
kind,
|
|
2682
2682
|
description: KIND_DESCRIPTIONS[kind]
|
|
2683
2683
|
}));
|
|
@@ -2814,9 +2814,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2814
2814
|
const args = program.args;
|
|
2815
2815
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2816
2816
|
error.exitCode = 2;
|
|
2817
|
-
if (
|
|
2818
|
-
|
|
2819
|
-
Object.assign(new (0,
|
|
2817
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2818
|
+
_chunkA4LUPRGLjs.printJsonError.call(void 0,
|
|
2819
|
+
Object.assign(new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(error.message), {
|
|
2820
2820
|
exitCode: 2,
|
|
2821
2821
|
retryable: false
|
|
2822
2822
|
})
|
|
@@ -2860,14 +2860,14 @@ function parseQuery(args, resource) {
|
|
|
2860
2860
|
if (VALUE_FLAGS.has(flag)) {
|
|
2861
2861
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2862
2862
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2863
|
-
throw new (0,
|
|
2863
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2864
2864
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2865
2865
|
);
|
|
2866
2866
|
}
|
|
2867
2867
|
if (flag === "--sum") sums.push(value);
|
|
2868
2868
|
else {
|
|
2869
2869
|
if (values[flag] !== void 0) {
|
|
2870
|
-
throw new (0,
|
|
2870
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2871
2871
|
`${flag} may only be supplied once.`
|
|
2872
2872
|
);
|
|
2873
2873
|
}
|
|
@@ -2881,12 +2881,12 @@ function parseQuery(args, resource) {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
if (arg.startsWith("-")) {
|
|
2883
2883
|
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.";
|
|
2884
|
-
throw new (0,
|
|
2884
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2885
2885
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2886
2886
|
);
|
|
2887
2887
|
}
|
|
2888
2888
|
if (runId !== void 0) {
|
|
2889
|
-
throw new (0,
|
|
2889
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2890
2890
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2891
2891
|
);
|
|
2892
2892
|
}
|
|
@@ -2894,7 +2894,7 @@ function parseQuery(args, resource) {
|
|
|
2894
2894
|
}
|
|
2895
2895
|
if (switches.has("--fields")) {
|
|
2896
2896
|
if (runId !== void 0) {
|
|
2897
|
-
throw new (0,
|
|
2897
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2898
2898
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2899
2899
|
);
|
|
2900
2900
|
}
|
|
@@ -2907,18 +2907,18 @@ function parseQuery(args, resource) {
|
|
|
2907
2907
|
)
|
|
2908
2908
|
];
|
|
2909
2909
|
if (incompatible.length) {
|
|
2910
|
-
throw new (0,
|
|
2910
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2911
2911
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2912
2912
|
);
|
|
2913
2913
|
}
|
|
2914
2914
|
}
|
|
2915
2915
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2916
|
-
throw new (0,
|
|
2916
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2917
2917
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2918
2918
|
);
|
|
2919
2919
|
}
|
|
2920
2920
|
if (sums.length && switches.has("--count")) {
|
|
2921
|
-
throw new (0,
|
|
2921
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2922
2922
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2923
2923
|
);
|
|
2924
2924
|
}
|
|
@@ -2926,7 +2926,7 @@ function parseQuery(args, resource) {
|
|
|
2926
2926
|
if (operation === "count") {
|
|
2927
2927
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2928
2928
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2929
|
-
throw new (0,
|
|
2929
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2930
2930
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2931
2931
|
);
|
|
2932
2932
|
}
|
|
@@ -2961,16 +2961,16 @@ function parseQuery(args, resource) {
|
|
|
2961
2961
|
];
|
|
2962
2962
|
}
|
|
2963
2963
|
}
|
|
2964
|
-
const request =
|
|
2964
|
+
const request = _chunkYLDIZ7A3js.normalizeRunEventOperationRequest.call(void 0, body);
|
|
2965
2965
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
2966
2966
|
const backend = values["--runtime-backend"];
|
|
2967
2967
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
2968
|
-
throw new (0,
|
|
2968
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2969
2969
|
"--runtime-backend must be daytona or modal."
|
|
2970
2970
|
);
|
|
2971
2971
|
}
|
|
2972
2972
|
if (backend && !namespace) {
|
|
2973
|
-
throw new (0,
|
|
2973
|
+
throw new (0, _chunkYLDIZ7A3js.RunEventQueryInputError)(
|
|
2974
2974
|
"--runtime-backend requires --runtime-namespace."
|
|
2975
2975
|
);
|
|
2976
2976
|
}
|
|
@@ -3018,12 +3018,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
3018
3018
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
3019
3019
|
const record3 = failure;
|
|
3020
3020
|
const status = record3.statusCode;
|
|
3021
|
-
const exitCode = error instanceof
|
|
3021
|
+
const exitCode = error instanceof _chunkYLDIZ7A3js.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;
|
|
3022
3022
|
const diagnostic = Object.assign(failure, {
|
|
3023
3023
|
exitCode,
|
|
3024
3024
|
retryable: exitCode === 5
|
|
3025
3025
|
});
|
|
3026
|
-
if (
|
|
3026
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) _chunkA4LUPRGLjs.printJsonError.call(void 0, diagnostic);
|
|
3027
3027
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3028
3028
|
return exitCode;
|
|
3029
3029
|
}
|
|
@@ -3038,7 +3038,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3038
3038
|
...criteria
|
|
3039
3039
|
} = request;
|
|
3040
3040
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3041
|
-
const client = new (0,
|
|
3041
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
3042
3042
|
let result;
|
|
3043
3043
|
if (request.operation === "fields") {
|
|
3044
3044
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3104,13 +3104,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3104
3104
|
lines.push(`Next page: ${nextPage}`);
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
|
-
|
|
3107
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
3108
3108
|
{
|
|
3109
3109
|
...result,
|
|
3110
3110
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3111
3111
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3112
3112
|
},
|
|
3113
|
-
{ json:
|
|
3113
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3114
3114
|
` }
|
|
3115
3115
|
);
|
|
3116
3116
|
return 0;
|
|
@@ -3930,7 +3930,7 @@ function checkedRunExample(plays, target) {
|
|
|
3930
3930
|
const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
3931
3931
|
const base = `deepline plays run --file ${quote(target)}`;
|
|
3932
3932
|
return {
|
|
3933
|
-
command: `${base}${
|
|
3933
|
+
command: `${base}${_chunkYLDIZ7A3js.playInputExampleArgs.call(void 0, schema)} --json`,
|
|
3934
3934
|
note: "Runs the local file without publishing and may spend credits. Supply the indicated file; JSON input must match inputSchema. Keep stderr separate from JSON stdout."
|
|
3935
3935
|
};
|
|
3936
3936
|
}
|
|
@@ -5553,7 +5553,7 @@ async function runPlayBootstrap(args) {
|
|
|
5553
5553
|
return runMonitorBootstrap(args);
|
|
5554
5554
|
}
|
|
5555
5555
|
const options = parsePlayBootstrapOptions(args);
|
|
5556
|
-
const client = new (0,
|
|
5556
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
5557
5557
|
const contracts = await loadBootstrapContracts(client, options);
|
|
5558
5558
|
const csvContext = loadCsvContext(options.from);
|
|
5559
5559
|
const source = generateBootstrapPlaySource({
|
|
@@ -5708,7 +5708,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5708
5708
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
5709
5709
|
);
|
|
5710
5710
|
}
|
|
5711
|
-
const response = await new (0,
|
|
5711
|
+
const response = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().runs.getReceipts(runId, {
|
|
5712
5712
|
keys
|
|
5713
5713
|
});
|
|
5714
5714
|
const failed = response.receipts.filter(
|
|
@@ -5720,7 +5720,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5720
5720
|
JSON.stringify(response, null, 2) + "\n",
|
|
5721
5721
|
{ flag: "wx", mode: 384 }
|
|
5722
5722
|
);
|
|
5723
|
-
|
|
5723
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
5724
5724
|
{
|
|
5725
5725
|
runId,
|
|
5726
5726
|
out: options.out,
|
|
@@ -5730,7 +5730,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5730
5730
|
{ json: true }
|
|
5731
5731
|
);
|
|
5732
5732
|
} else {
|
|
5733
|
-
|
|
5733
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
5734
5734
|
}
|
|
5735
5735
|
if (failed)
|
|
5736
5736
|
process.exitCode = response.receipts.some(
|
|
@@ -5769,7 +5769,7 @@ includes nextCommand when another page is available.
|
|
|
5769
5769
|
{ exitCode: 2 }
|
|
5770
5770
|
);
|
|
5771
5771
|
}
|
|
5772
|
-
const page = await new (0,
|
|
5772
|
+
const page = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().runs.children(parentRunId, {
|
|
5773
5773
|
launchKey: options.launchKey,
|
|
5774
5774
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
5775
5775
|
limit
|
|
@@ -5785,7 +5785,7 @@ includes nextCommand when another page is available.
|
|
|
5785
5785
|
String(limit),
|
|
5786
5786
|
"--json"
|
|
5787
5787
|
].join(" ") : null;
|
|
5788
|
-
|
|
5788
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
5789
5789
|
{
|
|
5790
5790
|
parentRunId,
|
|
5791
5791
|
launchKey: options.launchKey,
|
|
@@ -5821,7 +5821,7 @@ async function handleRunsHistory(options) {
|
|
|
5821
5821
|
throw new Error("--limit must be a positive integer.");
|
|
5822
5822
|
}
|
|
5823
5823
|
}
|
|
5824
|
-
const page = await new (0,
|
|
5824
|
+
const page = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().runs.history({
|
|
5825
5825
|
cursor: options.cursor,
|
|
5826
5826
|
orgId: options.org,
|
|
5827
5827
|
search: options.search,
|
|
@@ -5837,7 +5837,7 @@ async function handleRunsHistory(options) {
|
|
|
5837
5837
|
);
|
|
5838
5838
|
}
|
|
5839
5839
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
5840
|
-
|
|
5840
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
5841
5841
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
5842
5842
|
options.json ? { json: true } : {}
|
|
5843
5843
|
);
|
|
@@ -5889,12 +5889,12 @@ async function runRunsRerunCommand(runId, options) {
|
|
|
5889
5889
|
return 1;
|
|
5890
5890
|
}
|
|
5891
5891
|
}
|
|
5892
|
-
const result = await new (0,
|
|
5892
|
+
const result = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().runs.rerun(runId, {
|
|
5893
5893
|
...idempotencyKey === void 0 ? {} : { idempotencyKey },
|
|
5894
5894
|
...inputOverrides === void 0 ? {} : { inputOverrides }
|
|
5895
5895
|
});
|
|
5896
|
-
if (
|
|
5897
|
-
|
|
5896
|
+
if (_chunkA4LUPRGLjs.shouldEmitJson.call(void 0, options.json)) {
|
|
5897
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
5898
5898
|
} else {
|
|
5899
5899
|
console.log(
|
|
5900
5900
|
result.deduplicated === true ? `
|
|
@@ -6162,7 +6162,7 @@ function projectRunDatasetCell(value) {
|
|
|
6162
6162
|
const logicalValue = parseSerializedDatasetValue(value);
|
|
6163
6163
|
if (logicalValue === null || logicalValue === void 0) return logicalValue;
|
|
6164
6164
|
if (typeof logicalValue === "object") {
|
|
6165
|
-
return
|
|
6165
|
+
return _chunkA4LUPRGLjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
|
|
6166
6166
|
}
|
|
6167
6167
|
return logicalValue;
|
|
6168
6168
|
}
|
|
@@ -7686,10 +7686,10 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
7686
7686
|
// ../plays/deploy/run-deployment.ts
|
|
7687
7687
|
var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
|
|
7688
7688
|
function isRunPlayReceiver(node) {
|
|
7689
|
-
return
|
|
7689
|
+
return _chunkOJVAVQLBjs.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
|
|
7690
7690
|
}
|
|
7691
7691
|
function stringLiteralValue(node) {
|
|
7692
|
-
if (!
|
|
7692
|
+
if (!_chunkOJVAVQLBjs.isAstNode.call(void 0, node)) return null;
|
|
7693
7693
|
if (node.type === "Literal" && typeof node.value === "string") {
|
|
7694
7694
|
return node.value;
|
|
7695
7695
|
}
|
|
@@ -7700,12 +7700,12 @@ function stringLiteralValue(node) {
|
|
|
7700
7700
|
return null;
|
|
7701
7701
|
}
|
|
7702
7702
|
async function extractRunPlayStringTargets(sourceCode) {
|
|
7703
|
-
const program =
|
|
7703
|
+
const program = _chunkOJVAVQLBjs.parsePlaySourceForAnalysis.call(void 0, sourceCode);
|
|
7704
7704
|
if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
|
|
7705
7705
|
const targets = /* @__PURE__ */ new Set();
|
|
7706
7706
|
const visit = (node) => {
|
|
7707
7707
|
const callee = node.callee;
|
|
7708
|
-
if (node.type === "CallExpression" &&
|
|
7708
|
+
if (node.type === "CallExpression" && _chunkOJVAVQLBjs.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkOJVAVQLBjs.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
|
|
7709
7709
|
const playRef = stringLiteralValue(node.arguments[1]);
|
|
7710
7710
|
const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
|
|
7711
7711
|
if (ownedName) targets.add(ownedName);
|
|
@@ -7713,7 +7713,7 @@ async function extractRunPlayStringTargets(sourceCode) {
|
|
|
7713
7713
|
for (const [key, value] of Object.entries(node)) {
|
|
7714
7714
|
if (key === "loc") continue;
|
|
7715
7715
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
7716
|
-
if (
|
|
7716
|
+
if (_chunkOJVAVQLBjs.isAstNode.call(void 0, child)) visit(child);
|
|
7717
7717
|
}
|
|
7718
7718
|
}
|
|
7719
7719
|
};
|
|
@@ -8579,7 +8579,7 @@ function renderOutcome(outcome) {
|
|
|
8579
8579
|
function printResult2(input) {
|
|
8580
8580
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
8581
8581
|
if (failed) process.exitCode = 1;
|
|
8582
|
-
|
|
8582
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
8583
8583
|
{
|
|
8584
8584
|
deployment: { ...input.deployment, status: input.status },
|
|
8585
8585
|
plays: input.outcomes,
|
|
@@ -8604,7 +8604,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8604
8604
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
8605
8605
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
8606
8606
|
});
|
|
8607
|
-
const { http, config } =
|
|
8607
|
+
const { http, config } = _chunkA4LUPRGLjs.getAuthedHttpClient.call(void 0, );
|
|
8608
8608
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
8609
8609
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
8610
8610
|
deliveryId,
|
|
@@ -8631,7 +8631,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8631
8631
|
},
|
|
8632
8632
|
{
|
|
8633
8633
|
bundle: bundleDeployPlayFile,
|
|
8634
|
-
fetchImpl:
|
|
8634
|
+
fetchImpl: _chunkAYAEVVB5js.fetchWithDeploymentProtection,
|
|
8635
8635
|
// The plays are already here: "opening" the source is naming it.
|
|
8636
8636
|
openSource: async () => ({
|
|
8637
8637
|
open: async () => ({ repoRoot: root })
|
|
@@ -9199,7 +9199,7 @@ function parseInputFlagValue(raw) {
|
|
|
9199
9199
|
return raw;
|
|
9200
9200
|
}
|
|
9201
9201
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
9202
|
-
const selection =
|
|
9202
|
+
const selection = _chunkA4LUPRGLjs.parseJsonFields.call(void 0, args, "run");
|
|
9203
9203
|
args = selection.args;
|
|
9204
9204
|
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.";
|
|
9205
9205
|
let filePath = null;
|
|
@@ -9209,7 +9209,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
9209
9209
|
let revisionSelector = null;
|
|
9210
9210
|
const watch = !args.includes("--no-wait");
|
|
9211
9211
|
const dryRun = args.includes("--dry-run");
|
|
9212
|
-
let jsonOutput = dryRun ?
|
|
9212
|
+
let jsonOutput = dryRun ? _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
9213
9213
|
const fullJson = args.includes("--full");
|
|
9214
9214
|
const force = args.includes("--force");
|
|
9215
9215
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -9256,7 +9256,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
9256
9256
|
"--log-level requires one of: debug, info, warn, error."
|
|
9257
9257
|
);
|
|
9258
9258
|
}
|
|
9259
|
-
const parsed =
|
|
9259
|
+
const parsed = _chunkYLDIZ7A3js.parseLogLevel.call(void 0, value);
|
|
9260
9260
|
if (!parsed) {
|
|
9261
9261
|
throw new Error(
|
|
9262
9262
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -9293,7 +9293,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
9293
9293
|
throw new Error("--profile requires an execution profile id.");
|
|
9294
9294
|
}
|
|
9295
9295
|
profile = value.trim();
|
|
9296
|
-
|
|
9296
|
+
_chunkOJVAVQLBjs.resolveEnabledExecutionProfile.call(void 0, profile);
|
|
9297
9297
|
index += 1;
|
|
9298
9298
|
continue;
|
|
9299
9299
|
}
|
|
@@ -9531,7 +9531,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
|
|
|
9531
9531
|
if (dryRun && resolvedTarget.kind !== "file")
|
|
9532
9532
|
throw new Error("--dry-run currently requires a local Play file.");
|
|
9533
9533
|
const profile = _nullishCoalesce(_optionalChain([stringOption, 'call', _277 => _277(options.profile, "--profile"), 'optionalAccess', _278 => _278.trim, 'call', _279 => _279()]), () => ( base.profile));
|
|
9534
|
-
if (profile !== null)
|
|
9534
|
+
if (profile !== null) _chunkOJVAVQLBjs.resolveEnabledExecutionProfile.call(void 0, profile);
|
|
9535
9535
|
const countOption = (value, flag) => {
|
|
9536
9536
|
if (value === void 0) return void 0;
|
|
9537
9537
|
if (!/^[1-9]\d*$/.test(value))
|
|
@@ -9563,7 +9563,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
|
|
|
9563
9563
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
9564
9564
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
9565
9565
|
);
|
|
9566
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
9566
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkYLDIZ7A3js.parseLogLevel.call(void 0, options.logLevel);
|
|
9567
9567
|
if (!logLevel)
|
|
9568
9568
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
9569
9569
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -9577,13 +9577,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = []) {
|
|
|
9577
9577
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
9578
9578
|
logLevel = "debug";
|
|
9579
9579
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
9580
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
9581
|
-
[...fullJson ? ["--full"] : [], ...
|
|
9580
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunkA4LUPRGLjs.parseJsonFields.call(void 0,
|
|
9581
|
+
[...fullJson ? ["--full"] : [], ..._chunkA4LUPRGLjs.jsonFieldArgs.call(void 0, options.json)],
|
|
9582
9582
|
"run"
|
|
9583
9583
|
).fields;
|
|
9584
9584
|
const watch = options.wait === false ? false : base.watch;
|
|
9585
9585
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
9586
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
9586
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunkA4LUPRGLjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
9587
9587
|
const verboseLogs = Boolean(
|
|
9588
9588
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
9589
9589
|
);
|
|
@@ -9627,7 +9627,7 @@ function playAuthoringGraphPath(parent, filePath) {
|
|
|
9627
9627
|
// src/cli/renderers/local-play-execution.ts
|
|
9628
9628
|
function renderLocalPlayExecutionPlan(plan, options = {}) {
|
|
9629
9629
|
if (options.dryRun) {
|
|
9630
|
-
|
|
9630
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, { dryRun: true, ...plan }, { json: options.json });
|
|
9631
9631
|
return;
|
|
9632
9632
|
}
|
|
9633
9633
|
process.stderr.write(`Local Play execution plan: ${JSON.stringify(plan)}
|
|
@@ -10166,7 +10166,7 @@ function buildMissingDefinePlayError(filePath) {
|
|
|
10166
10166
|
);
|
|
10167
10167
|
}
|
|
10168
10168
|
function extractPlayName(code, filePath) {
|
|
10169
|
-
const definedPlayName =
|
|
10169
|
+
const definedPlayName = _chunkOJVAVQLBjs.extractDefinedPlayName.call(void 0, code);
|
|
10170
10170
|
if (definedPlayName) {
|
|
10171
10171
|
return definedPlayName;
|
|
10172
10172
|
}
|
|
@@ -10385,66 +10385,53 @@ function normalizePlayPath(filePath) {
|
|
|
10385
10385
|
return _path.resolve.call(void 0, filePath);
|
|
10386
10386
|
}
|
|
10387
10387
|
}
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10388
|
+
var PlayBundleGraphError = class extends Error {
|
|
10389
|
+
constructor(diagnostics) {
|
|
10390
|
+
super(diagnostics.join("\n"));
|
|
10391
|
+
this.diagnostics = diagnostics;
|
|
10392
|
+
}
|
|
10393
|
+
};
|
|
10394
|
+
function unresolvedPackagedFilesMessage(node) {
|
|
10395
|
+
const details = node.unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
10396
|
+
return `Failed to package local ctx.csv(...) files in ${node.filePath}: ${details}`;
|
|
10394
10397
|
}
|
|
10395
|
-
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName =
|
|
10398
|
+
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkOJVAVQLBjs.PLAY_DEFAULT_EXPORT, options = {}) {
|
|
10396
10399
|
const playBundler = await loadPlayBundler();
|
|
10397
10400
|
const nodes = /* @__PURE__ */ new Map();
|
|
10398
|
-
const
|
|
10399
|
-
const
|
|
10401
|
+
const diagnostics = [];
|
|
10402
|
+
const visited = /* @__PURE__ */ new Set();
|
|
10403
|
+
const artifactKind = _chunkOJVAVQLBjs.resolveEnabledExecutionProfile.call(void 0, profile).artifactKind;
|
|
10400
10404
|
const rootPath = normalizePlayPath(entryFile);
|
|
10401
10405
|
const visit = async (filePath) => {
|
|
10402
10406
|
const absolutePath = normalizePlayPath(filePath);
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10407
|
+
if (visited.has(absolutePath)) return;
|
|
10408
|
+
visited.add(absolutePath);
|
|
10409
|
+
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
10410
|
+
target: artifactKind,
|
|
10411
|
+
...options.cache === false ? { cache: false } : {},
|
|
10412
|
+
...absolutePath === rootPath && entryExportName !== _chunkOJVAVQLBjs.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
10413
|
+
});
|
|
10414
|
+
if (bundleResult.success === false) {
|
|
10415
|
+
diagnostics.push(
|
|
10416
|
+
...bundleResult.errors.map(
|
|
10417
|
+
(error) => `Failed to bundle ${absolutePath}: ${error}`
|
|
10418
|
+
)
|
|
10410
10419
|
);
|
|
10420
|
+
return;
|
|
10411
10421
|
}
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
});
|
|
10419
|
-
if (bundleResult.success === false) {
|
|
10420
|
-
throw new Error(
|
|
10421
|
-
formatBundlingErrors(absolutePath, bundleResult.errors)
|
|
10422
|
-
);
|
|
10423
|
-
}
|
|
10424
|
-
if (bundleResult.unresolvedFileReferences.length > 0) {
|
|
10425
|
-
throw new Error(
|
|
10426
|
-
formatUnresolvedPackagedFiles(
|
|
10427
|
-
absolutePath,
|
|
10428
|
-
bundleResult.unresolvedFileReferences
|
|
10429
|
-
)
|
|
10430
|
-
);
|
|
10431
|
-
}
|
|
10432
|
-
const bundledNode = {
|
|
10433
|
-
...bundleResult,
|
|
10434
|
-
artifact: artifactForProductionCompatibilityCheck(
|
|
10435
|
-
bundleResult.artifact
|
|
10436
|
-
)
|
|
10437
|
-
};
|
|
10438
|
-
nodes.set(absolutePath, bundledNode);
|
|
10439
|
-
for (const dependency of bundledNode.importedPlayDependencies) {
|
|
10440
|
-
await visit(dependency.filePath);
|
|
10441
|
-
}
|
|
10442
|
-
return bundledNode;
|
|
10443
|
-
} finally {
|
|
10444
|
-
visiting.delete(absolutePath);
|
|
10422
|
+
nodes.set(absolutePath, {
|
|
10423
|
+
...bundleResult,
|
|
10424
|
+
artifact: artifactForProductionCompatibilityCheck(bundleResult.artifact)
|
|
10425
|
+
});
|
|
10426
|
+
for (const dependency of bundleResult.importedPlayDependencies) {
|
|
10427
|
+
await visit(dependency.filePath);
|
|
10445
10428
|
}
|
|
10446
10429
|
};
|
|
10447
|
-
|
|
10430
|
+
await visit(rootPath);
|
|
10431
|
+
const root = nodes.get(rootPath);
|
|
10432
|
+
if (!root || diagnostics.length > 0) {
|
|
10433
|
+
throw new PlayBundleGraphError(diagnostics);
|
|
10434
|
+
}
|
|
10448
10435
|
return { root, nodes };
|
|
10449
10436
|
}
|
|
10450
10437
|
async function compileBundledPlayGraphManifests(client, graph) {
|
|
@@ -10506,11 +10493,14 @@ function missingPlayDescriptionMessage(node) {
|
|
|
10506
10493
|
`Object form: definePlay({ id: "${playName}", description: "Look up company details from a domain.", input, run })`
|
|
10507
10494
|
].join(" ");
|
|
10508
10495
|
}
|
|
10509
|
-
function
|
|
10510
|
-
return [...graph.nodes.values()].
|
|
10496
|
+
function collectPlayGraphAuthoringErrors(graph) {
|
|
10497
|
+
return [...graph.nodes.values()].flatMap((node) => [
|
|
10498
|
+
...node.unresolvedFileReferences.length > 0 ? [unresolvedPackagedFilesMessage(node)] : [],
|
|
10499
|
+
..._optionalChain([node, 'access', _309 => _309.playDescription, 'optionalAccess', _310 => _310.trim, 'call', _311 => _311()]) ? [] : [missingPlayDescriptionMessage(node)]
|
|
10500
|
+
]);
|
|
10511
10501
|
}
|
|
10512
|
-
function
|
|
10513
|
-
const errors =
|
|
10502
|
+
function assertPlayGraphAuthoring(graph) {
|
|
10503
|
+
const errors = collectPlayGraphAuthoringErrors(graph);
|
|
10514
10504
|
if (errors.length > 0) {
|
|
10515
10505
|
throw new Error(errors.join("\n"));
|
|
10516
10506
|
}
|
|
@@ -10593,7 +10583,7 @@ function playStatusErrorText(status) {
|
|
|
10593
10583
|
function isRetryablePendingStartFailure(status) {
|
|
10594
10584
|
if (status.status !== "failed") return false;
|
|
10595
10585
|
if (status.runId && status.runId !== "pending") return false;
|
|
10596
|
-
return
|
|
10586
|
+
return _chunkYLDIZ7A3js.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
10597
10587
|
}
|
|
10598
10588
|
function pendingStartFailureStatus(input) {
|
|
10599
10589
|
const message = input.error instanceof Error ? input.error.message : String(input.error);
|
|
@@ -10620,13 +10610,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
|
10620
10610
|
var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
10621
10611
|
function watchSurfaceReaches(state, provenance, level) {
|
|
10622
10612
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
10623
|
-
if (!
|
|
10613
|
+
if (!_chunkYLDIZ7A3js.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
10624
10614
|
return false;
|
|
10625
10615
|
}
|
|
10626
|
-
if (
|
|
10616
|
+
if (_chunkYLDIZ7A3js.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
10627
10617
|
return true;
|
|
10628
10618
|
}
|
|
10629
|
-
return state.verbose === true &&
|
|
10619
|
+
return state.verbose === true && _chunkYLDIZ7A3js.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
10630
10620
|
}
|
|
10631
10621
|
function getEventPayload(event) {
|
|
10632
10622
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -11128,7 +11118,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
11128
11118
|
}
|
|
11129
11119
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
11130
11120
|
if (open2 && dashboardUrl) {
|
|
11131
|
-
|
|
11121
|
+
_chunkA4LUPRGLjs.openInBrowser.call(void 0, dashboardUrl);
|
|
11132
11122
|
}
|
|
11133
11123
|
}
|
|
11134
11124
|
function printPlayLogLines(input) {
|
|
@@ -11190,7 +11180,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
11190
11180
|
billing: false
|
|
11191
11181
|
});
|
|
11192
11182
|
} catch (error) {
|
|
11193
|
-
if (
|
|
11183
|
+
if (_chunkYLDIZ7A3js.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
11194
11184
|
return null;
|
|
11195
11185
|
}
|
|
11196
11186
|
throw error;
|
|
@@ -11379,7 +11369,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11379
11369
|
billing: false
|
|
11380
11370
|
});
|
|
11381
11371
|
} catch (error) {
|
|
11382
|
-
if (
|
|
11372
|
+
if (_chunkYLDIZ7A3js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11383
11373
|
return null;
|
|
11384
11374
|
}
|
|
11385
11375
|
throw error;
|
|
@@ -11587,7 +11577,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11587
11577
|
lastPhase
|
|
11588
11578
|
});
|
|
11589
11579
|
}
|
|
11590
|
-
if (lastKnownWorkflowId &&
|
|
11580
|
+
if (lastKnownWorkflowId && _chunkYLDIZ7A3js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11591
11581
|
if (timeout) {
|
|
11592
11582
|
clearTimeout(timeout);
|
|
11593
11583
|
}
|
|
@@ -11623,7 +11613,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11623
11613
|
onRunAdmitted: confirmAdmission
|
|
11624
11614
|
});
|
|
11625
11615
|
}
|
|
11626
|
-
if (!lastKnownWorkflowId &&
|
|
11616
|
+
if (!lastKnownWorkflowId && _chunkYLDIZ7A3js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11627
11617
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
11628
11618
|
phase: "cli.play_start_stream_transient_failure",
|
|
11629
11619
|
ms: Date.now() - startedAt,
|
|
@@ -11722,7 +11712,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
11722
11712
|
"logs"
|
|
11723
11713
|
]);
|
|
11724
11714
|
function formatPlayLogLine(rawLine, state) {
|
|
11725
|
-
const classified =
|
|
11715
|
+
const classified = _chunkYLDIZ7A3js.classifyLogLine.call(void 0, rawLine);
|
|
11726
11716
|
const line = classified.line;
|
|
11727
11717
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
11728
11718
|
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _351 => _351[1]]) ? new Date(timestampMatch[1]) : null;
|
|
@@ -11737,14 +11727,14 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11737
11727
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
11738
11728
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
11739
11729
|
if (providerWait && !state.verbose) {
|
|
11740
|
-
return
|
|
11730
|
+
return _chunkYLDIZ7A3js.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
11741
11731
|
}
|
|
11742
11732
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
11743
11733
|
if (mapProgress && !state.verbose) {
|
|
11744
|
-
return
|
|
11734
|
+
return _chunkYLDIZ7A3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
11745
11735
|
}
|
|
11746
11736
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
11747
|
-
if (!
|
|
11737
|
+
if (!_chunkYLDIZ7A3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11748
11738
|
return null;
|
|
11749
11739
|
}
|
|
11750
11740
|
if (state.emittedRunnerStarted) {
|
|
@@ -11757,7 +11747,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11757
11747
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
11758
11748
|
);
|
|
11759
11749
|
if (mapStart) {
|
|
11760
|
-
if (!
|
|
11750
|
+
if (!_chunkYLDIZ7A3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11761
11751
|
return null;
|
|
11762
11752
|
}
|
|
11763
11753
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -11767,7 +11757,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11767
11757
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
11768
11758
|
);
|
|
11769
11759
|
if (mapDone) {
|
|
11770
|
-
if (!
|
|
11760
|
+
if (!_chunkYLDIZ7A3js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11771
11761
|
return null;
|
|
11772
11762
|
}
|
|
11773
11763
|
const [, results, executed, cached] = mapDone;
|
|
@@ -13056,7 +13046,7 @@ function formatRecentRunLogLines(value) {
|
|
|
13056
13046
|
(line) => typeof line === "string"
|
|
13057
13047
|
);
|
|
13058
13048
|
if (tail.length === 0) return [];
|
|
13059
|
-
const shown = tail.map((line) =>
|
|
13049
|
+
const shown = tail.map((line) => _chunkYLDIZ7A3js.classifyLogLine.call(void 0, line)).filter(
|
|
13060
13050
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
13061
13051
|
).slice(-8);
|
|
13062
13052
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -13335,7 +13325,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
13335
13325
|
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _432 => _432.hits]), () => ( null));
|
|
13336
13326
|
if (jsonOutput) {
|
|
13337
13327
|
const payload2 = _optionalChain([options, 'optionalAccess', _433 => _433.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
13338
|
-
|
|
13328
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
13339
13329
|
hits ? { ...payload2, hits } : payload2,
|
|
13340
13330
|
{ json: true, fields: _optionalChain([options, 'optionalAccess', _434 => _434.jsonFields]) }
|
|
13341
13331
|
);
|
|
@@ -13351,7 +13341,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
13351
13341
|
...buildPlayCompletionTextLines(status),
|
|
13352
13342
|
...formatRunHitsLines(hits)
|
|
13353
13343
|
];
|
|
13354
|
-
|
|
13344
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
13355
13345
|
json: false,
|
|
13356
13346
|
text: `${lines2.join("\n")}
|
|
13357
13347
|
`
|
|
@@ -13402,7 +13392,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
13402
13392
|
lines.push(...buildBillingRollupTextLines(status));
|
|
13403
13393
|
const compact = compactPlayStatus(status);
|
|
13404
13394
|
const payload = _optionalChain([options, 'optionalAccess', _436 => _436.fullJson]) ? status : compact;
|
|
13405
|
-
|
|
13395
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
13406
13396
|
{
|
|
13407
13397
|
...payload,
|
|
13408
13398
|
render: {
|
|
@@ -14168,7 +14158,7 @@ function writeStartedPlayRun(input) {
|
|
|
14168
14158
|
dashboardUrl: input.dashboardUrl,
|
|
14169
14159
|
package: input.package
|
|
14170
14160
|
};
|
|
14171
|
-
|
|
14161
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
14172
14162
|
json: true,
|
|
14173
14163
|
fields: input.jsonFields
|
|
14174
14164
|
});
|
|
@@ -14190,7 +14180,7 @@ function writeStartedPlayRun(input) {
|
|
|
14190
14180
|
input.progress.writeLine(output2, process.stdout);
|
|
14191
14181
|
return;
|
|
14192
14182
|
}
|
|
14193
|
-
|
|
14183
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, input.package, {
|
|
14194
14184
|
json: false,
|
|
14195
14185
|
text: `${output2}
|
|
14196
14186
|
`
|
|
@@ -14219,7 +14209,7 @@ function writeStartedPlayRun(input) {
|
|
|
14219
14209
|
) ? [`Stop: deepline runs stop ${_chunkAID3OYVJjs.shellQuote.call(void 0, input.runId)} --json`] : []
|
|
14220
14210
|
];
|
|
14221
14211
|
if (input.jsonOutput) {
|
|
14222
|
-
|
|
14212
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
14223
14213
|
return;
|
|
14224
14214
|
}
|
|
14225
14215
|
if (input.dashboardUrl) {
|
|
@@ -14230,7 +14220,7 @@ function writeStartedPlayRun(input) {
|
|
|
14230
14220
|
input.progress.writeLine(output, process.stdout);
|
|
14231
14221
|
return;
|
|
14232
14222
|
}
|
|
14233
|
-
|
|
14223
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
14234
14224
|
{
|
|
14235
14225
|
...payload,
|
|
14236
14226
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -14240,7 +14230,7 @@ function writeStartedPlayRun(input) {
|
|
|
14240
14230
|
);
|
|
14241
14231
|
}
|
|
14242
14232
|
function parsePlayCheckOptions(args) {
|
|
14243
|
-
const selection =
|
|
14233
|
+
const selection = _chunkA4LUPRGLjs.parseJsonFields.call(void 0, args, "check");
|
|
14244
14234
|
args = selection.args;
|
|
14245
14235
|
const target = args[0];
|
|
14246
14236
|
if (!target || target.startsWith("-")) {
|
|
@@ -14252,7 +14242,7 @@ function parsePlayCheckOptions(args) {
|
|
|
14252
14242
|
if (arg !== "--json" && arg !== "--full")
|
|
14253
14243
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
14254
14244
|
}
|
|
14255
|
-
const jsonOutput =
|
|
14245
|
+
const jsonOutput = _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
14256
14246
|
return {
|
|
14257
14247
|
target,
|
|
14258
14248
|
jsonOutput,
|
|
@@ -14328,7 +14318,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
14328
14318
|
useLatest,
|
|
14329
14319
|
expectedArtifactHash,
|
|
14330
14320
|
dryRun,
|
|
14331
|
-
jsonOutput:
|
|
14321
|
+
jsonOutput: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args)
|
|
14332
14322
|
};
|
|
14333
14323
|
}
|
|
14334
14324
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -14369,7 +14359,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
14369
14359
|
target,
|
|
14370
14360
|
expectedArtifactHash,
|
|
14371
14361
|
dryRun,
|
|
14372
|
-
jsonOutput:
|
|
14362
|
+
jsonOutput: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args)
|
|
14373
14363
|
};
|
|
14374
14364
|
}
|
|
14375
14365
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -14580,7 +14570,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
14580
14570
|
async function handlePlayCheck(args) {
|
|
14581
14571
|
const options = parsePlayCheckOptions(args);
|
|
14582
14572
|
if (!isFileTarget2(options.target)) {
|
|
14583
|
-
const client = new (0,
|
|
14573
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
14584
14574
|
try {
|
|
14585
14575
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
14586
14576
|
command: "check"
|
|
@@ -14609,7 +14599,7 @@ async function handlePlayCheck(args) {
|
|
|
14609
14599
|
},
|
|
14610
14600
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
14611
14601
|
};
|
|
14612
|
-
|
|
14602
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, result, {
|
|
14613
14603
|
json: options.jsonOutput,
|
|
14614
14604
|
fields: options.jsonFields,
|
|
14615
14605
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -14619,7 +14609,7 @@ async function handlePlayCheck(args) {
|
|
|
14619
14609
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
14620
14610
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
14621
14611
|
if (options.jsonOutput) {
|
|
14622
|
-
|
|
14612
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
14623
14613
|
{
|
|
14624
14614
|
kind: "play_check",
|
|
14625
14615
|
checked: "named_contract",
|
|
@@ -14652,7 +14642,7 @@ async function handlePlayCheck(args) {
|
|
|
14652
14642
|
);
|
|
14653
14643
|
}
|
|
14654
14644
|
const primary = outcomes.find(
|
|
14655
|
-
(outcome) => outcome.exportName ===
|
|
14645
|
+
(outcome) => outcome.exportName === _chunkOJVAVQLBjs.PLAY_DEFAULT_EXPORT
|
|
14656
14646
|
);
|
|
14657
14647
|
const output = buildPlayCheckOutput({
|
|
14658
14648
|
outcomes,
|
|
@@ -14661,7 +14651,7 @@ async function handlePlayCheck(args) {
|
|
|
14661
14651
|
detailsCommand: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --full --json`,
|
|
14662
14652
|
publishCommand: _optionalChain([primary, 'optionalAccess', _483 => _483.result, 'access', _484 => _484.artifactHash]) ? `deepline plays publish ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
14663
14653
|
});
|
|
14664
|
-
|
|
14654
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, output, {
|
|
14665
14655
|
json: options.jsonOutput,
|
|
14666
14656
|
fields: options.jsonFields,
|
|
14667
14657
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -14669,8 +14659,8 @@ async function handlePlayCheck(args) {
|
|
|
14669
14659
|
return output.valid ? 0 : 1;
|
|
14670
14660
|
}
|
|
14671
14661
|
function resolvePlayCheckExportNames(sourceCode) {
|
|
14672
|
-
const exports =
|
|
14673
|
-
if (!exports || exports.length === 0) return [
|
|
14662
|
+
const exports = _chunkOJVAVQLBjs.listPlayFileExports.call(void 0, sourceCode);
|
|
14663
|
+
if (!exports || exports.length === 0) return [_chunkOJVAVQLBjs.PLAY_DEFAULT_EXPORT];
|
|
14674
14664
|
return exports.map((entry) => entry.name);
|
|
14675
14665
|
}
|
|
14676
14666
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
@@ -14709,21 +14699,13 @@ async function checkOneExportedPlay(input) {
|
|
|
14709
14699
|
stage: "bundle",
|
|
14710
14700
|
result: {
|
|
14711
14701
|
valid: false,
|
|
14712
|
-
errors: [error instanceof Error ? error.message : String(error)]
|
|
14702
|
+
errors: error instanceof PlayBundleGraphError ? error.diagnostics : [error instanceof Error ? error.message : String(error)]
|
|
14713
14703
|
}
|
|
14714
14704
|
};
|
|
14715
14705
|
}
|
|
14716
14706
|
const playName = _nullishCoalesce(graph.root.playName, () => ( fallbackName));
|
|
14717
|
-
const
|
|
14718
|
-
|
|
14719
|
-
return {
|
|
14720
|
-
exportName,
|
|
14721
|
-
playName,
|
|
14722
|
-
stage: "authoring",
|
|
14723
|
-
result: { valid: false, errors: descriptionErrors }
|
|
14724
|
-
};
|
|
14725
|
-
}
|
|
14726
|
-
const client = new (0, _chunk7EQ3WFD2js.DeeplineClient)();
|
|
14707
|
+
const authoringErrors = collectPlayGraphAuthoringErrors(graph);
|
|
14708
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
14727
14709
|
const integrationMode = resolveEvalIntegrationMode();
|
|
14728
14710
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
14729
14711
|
playName: node.playName,
|
|
@@ -14736,17 +14718,20 @@ async function checkOneExportedPlay(input) {
|
|
|
14736
14718
|
sourceFiles: graph.root.sourceFiles,
|
|
14737
14719
|
description: _nullishCoalesce(graph.root.playDescription, () => ( void 0)),
|
|
14738
14720
|
artifact: artifactForProductionCompatibilityCheck(graph.root.artifact),
|
|
14739
|
-
...exportName ===
|
|
14721
|
+
...exportName === _chunkOJVAVQLBjs.PLAY_DEFAULT_EXPORT ? {} : { exportName },
|
|
14740
14722
|
...importedPlays.length > 0 ? { importedPlays } : {},
|
|
14741
14723
|
...integrationMode ? { integrationMode } : {}
|
|
14742
14724
|
});
|
|
14725
|
+
const valid = result.valid && authoringErrors.length === 0;
|
|
14743
14726
|
return {
|
|
14744
14727
|
exportName,
|
|
14745
14728
|
playName,
|
|
14729
|
+
...authoringErrors.length > 0 ? { stage: "authoring" } : {},
|
|
14746
14730
|
result: {
|
|
14747
14731
|
...result,
|
|
14748
|
-
|
|
14749
|
-
|
|
14732
|
+
valid,
|
|
14733
|
+
errors: valid ? result.errors : addPlayCheckRepairHints({
|
|
14734
|
+
errors: [...authoringErrors, ...result.errors],
|
|
14750
14735
|
sourceCode: graph.root.sourceCode
|
|
14751
14736
|
}),
|
|
14752
14737
|
toolGetterHints: await _asyncNullishCoalesce(result.toolGetterHints, async () => ( await buildToolGetterHints(client, result.staticPipeline)))
|
|
@@ -14784,11 +14769,11 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14784
14769
|
() => collectBundledPlayGraph(
|
|
14785
14770
|
absolutePlayPath,
|
|
14786
14771
|
options.profile,
|
|
14787
|
-
|
|
14772
|
+
_chunkOJVAVQLBjs.PLAY_DEFAULT_EXPORT,
|
|
14788
14773
|
{ cache: !options.dryRun }
|
|
14789
14774
|
)
|
|
14790
14775
|
);
|
|
14791
|
-
|
|
14776
|
+
assertPlayGraphAuthoring(graph);
|
|
14792
14777
|
if (options.dryRun) {
|
|
14793
14778
|
progress.complete();
|
|
14794
14779
|
renderLocalPlayExecutionPlan(
|
|
@@ -14797,7 +14782,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14797
14782
|
);
|
|
14798
14783
|
return 0;
|
|
14799
14784
|
}
|
|
14800
|
-
client = new (0,
|
|
14785
|
+
client = new (0, _chunkYLDIZ7A3js.DeeplineClient)(playRunClientOptions(options));
|
|
14801
14786
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
14802
14787
|
if (canDeferCompilerManifest) {
|
|
14803
14788
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
@@ -14992,7 +14977,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
14992
14977
|
if (options.target.kind !== "name") {
|
|
14993
14978
|
throw new Error("Expected a named play run target.");
|
|
14994
14979
|
}
|
|
14995
|
-
const client = new (0,
|
|
14980
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)(playRunClientOptions(options));
|
|
14996
14981
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14997
14982
|
const playName = options.target.name;
|
|
14998
14983
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
@@ -15389,10 +15374,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
15389
15374
|
);
|
|
15390
15375
|
return `${lines.join("\n")}
|
|
15391
15376
|
|
|
15392
|
-
${
|
|
15377
|
+
${_chunkA4LUPRGLjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
15393
15378
|
}
|
|
15394
15379
|
async function handleRunGet(args) {
|
|
15395
|
-
const selection =
|
|
15380
|
+
const selection = _chunkA4LUPRGLjs.parseJsonFields.call(void 0,
|
|
15396
15381
|
args,
|
|
15397
15382
|
args.includes("--config") ? "config" : "get"
|
|
15398
15383
|
);
|
|
@@ -15405,7 +15390,7 @@ async function handleRunGet(args) {
|
|
|
15405
15390
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15406
15391
|
return 1;
|
|
15407
15392
|
}
|
|
15408
|
-
const client = new (0,
|
|
15393
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
15409
15394
|
if (args.includes("--config")) {
|
|
15410
15395
|
if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
|
|
15411
15396
|
console.error(
|
|
@@ -15419,7 +15404,7 @@ async function handleRunGet(args) {
|
|
|
15419
15404
|
"This server does not support recorded configuration reads."
|
|
15420
15405
|
);
|
|
15421
15406
|
}
|
|
15422
|
-
|
|
15407
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
15423
15408
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
15424
15409
|
{ json: true, fields: selection.fields }
|
|
15425
15410
|
);
|
|
@@ -15427,7 +15412,7 @@ async function handleRunGet(args) {
|
|
|
15427
15412
|
}
|
|
15428
15413
|
if (args.includes("--input")) {
|
|
15429
15414
|
const input = await client.getRunInput(runId);
|
|
15430
|
-
|
|
15415
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
15431
15416
|
return 0;
|
|
15432
15417
|
}
|
|
15433
15418
|
const full = args.includes("--full");
|
|
@@ -15440,8 +15425,8 @@ async function handleRunGet(args) {
|
|
|
15440
15425
|
full: true,
|
|
15441
15426
|
failedLogs: args.includes("--log-failed")
|
|
15442
15427
|
}) : status;
|
|
15443
|
-
if (
|
|
15444
|
-
|
|
15428
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
15429
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
15445
15430
|
full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
15446
15431
|
{ json: true, fields: selection.fields }
|
|
15447
15432
|
);
|
|
@@ -15457,8 +15442,8 @@ async function handleRunGet(args) {
|
|
|
15457
15442
|
readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
|
|
15458
15443
|
]);
|
|
15459
15444
|
const hitLines = formatRunHitsLines(hits);
|
|
15460
|
-
const json =
|
|
15461
|
-
|
|
15445
|
+
const json = _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
15446
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
15462
15447
|
{
|
|
15463
15448
|
...overview,
|
|
15464
15449
|
credits,
|
|
@@ -15561,9 +15546,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
15561
15546
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15562
15547
|
return 1;
|
|
15563
15548
|
}
|
|
15564
|
-
const status = await new (0,
|
|
15565
|
-
if (
|
|
15566
|
-
|
|
15549
|
+
const status = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().runs.status(runId);
|
|
15550
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
15551
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
15567
15552
|
return 0;
|
|
15568
15553
|
}
|
|
15569
15554
|
if (!status.available) {
|
|
@@ -15603,7 +15588,7 @@ async function handleRunsRerun(args) {
|
|
|
15603
15588
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15604
15589
|
return 1;
|
|
15605
15590
|
}
|
|
15606
|
-
const options = { json:
|
|
15591
|
+
const options = { json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) };
|
|
15607
15592
|
for (let index = 0; index < args.length; index += 1) {
|
|
15608
15593
|
if (args[index] === "--idempotency-key") {
|
|
15609
15594
|
options.idempotencyKey = _nullishCoalesce(args[++index], () => ( ""));
|
|
@@ -15668,8 +15653,8 @@ ${usage2}
|
|
|
15668
15653
|
Discover Plays: ${next.discover}
|
|
15669
15654
|
Active runs: ${next.running}`
|
|
15670
15655
|
);
|
|
15671
|
-
if (
|
|
15672
|
-
|
|
15656
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
15657
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
15673
15658
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
15674
15659
|
{ json: true }
|
|
15675
15660
|
);
|
|
@@ -15684,7 +15669,7 @@ Active runs: ${next.running}`
|
|
|
15684
15669
|
console.error("--offset requires --play.");
|
|
15685
15670
|
return 1;
|
|
15686
15671
|
}
|
|
15687
|
-
const client = new (0,
|
|
15672
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
15688
15673
|
const page = await client.runs.listPage({
|
|
15689
15674
|
...playName ? { play: playName } : {},
|
|
15690
15675
|
...statusFilter ? { status: statusFilter } : {},
|
|
@@ -15753,7 +15738,7 @@ Active runs: ${next.running}`
|
|
|
15753
15738
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
15754
15739
|
);
|
|
15755
15740
|
}
|
|
15756
|
-
|
|
15741
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
15757
15742
|
{
|
|
15758
15743
|
runs,
|
|
15759
15744
|
count: runs.length,
|
|
@@ -15767,7 +15752,7 @@ Active runs: ${next.running}`
|
|
|
15767
15752
|
},
|
|
15768
15753
|
render: { sections: [{ title: "runs", lines }] }
|
|
15769
15754
|
},
|
|
15770
|
-
{ json:
|
|
15755
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) }
|
|
15771
15756
|
);
|
|
15772
15757
|
return 0;
|
|
15773
15758
|
}
|
|
@@ -15797,7 +15782,7 @@ async function handleRunTail(args) {
|
|
|
15797
15782
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15798
15783
|
return 1;
|
|
15799
15784
|
}
|
|
15800
|
-
const parsed =
|
|
15785
|
+
const parsed = _chunkYLDIZ7A3js.parseLogLevel.call(void 0, value);
|
|
15801
15786
|
if (!parsed) {
|
|
15802
15787
|
console.error(
|
|
15803
15788
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15835,9 +15820,9 @@ async function handleRunTail(args) {
|
|
|
15835
15820
|
);
|
|
15836
15821
|
return 1;
|
|
15837
15822
|
}
|
|
15838
|
-
const client = new (0,
|
|
15823
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
15839
15824
|
const jsonLines = args.includes("--jsonl");
|
|
15840
|
-
const jsonOutput = !jsonLines &&
|
|
15825
|
+
const jsonOutput = !jsonLines && _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
15841
15826
|
const compact = args.includes("--compact");
|
|
15842
15827
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
15843
15828
|
const compactState = {
|
|
@@ -15918,7 +15903,7 @@ async function handleRunLogs(args) {
|
|
|
15918
15903
|
]);
|
|
15919
15904
|
const cursorIndex = args.indexOf("--cursor");
|
|
15920
15905
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
15921
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
15906
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkYLDIZ7A3js.isRunLogsCursor.call(void 0, cursorValue));
|
|
15922
15907
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
15923
15908
|
return handleRunEventSearch(args);
|
|
15924
15909
|
}
|
|
@@ -15952,7 +15937,7 @@ async function handleRunLogs(args) {
|
|
|
15952
15937
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15953
15938
|
return 1;
|
|
15954
15939
|
}
|
|
15955
|
-
const parsed =
|
|
15940
|
+
const parsed = _chunkYLDIZ7A3js.parseLogLevel.call(void 0, value);
|
|
15956
15941
|
if (!parsed) {
|
|
15957
15942
|
console.error(
|
|
15958
15943
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15999,12 +15984,12 @@ async function handleRunLogs(args) {
|
|
|
15999
15984
|
);
|
|
16000
15985
|
return 1;
|
|
16001
15986
|
}
|
|
16002
|
-
const client = new (0,
|
|
15987
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16003
15988
|
if (outPath) {
|
|
16004
15989
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
16005
|
-
const logs = result2.entries.filter((line) =>
|
|
15990
|
+
const logs = result2.entries.filter((line) => _chunkYLDIZ7A3js.logLevelReaches.call(void 0, _chunkYLDIZ7A3js.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkYLDIZ7A3js.classifyLogLine.call(void 0, line).line);
|
|
16006
15991
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
16007
|
-
|
|
15992
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16008
15993
|
{
|
|
16009
15994
|
runId: result2.runId,
|
|
16010
15995
|
log_path: outPath,
|
|
@@ -16027,7 +16012,7 @@ async function handleRunLogs(args) {
|
|
|
16027
16012
|
]
|
|
16028
16013
|
}
|
|
16029
16014
|
},
|
|
16030
|
-
{ json:
|
|
16015
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) }
|
|
16031
16016
|
);
|
|
16032
16017
|
return 0;
|
|
16033
16018
|
}
|
|
@@ -16058,7 +16043,7 @@ async function handleRunLogs(args) {
|
|
|
16058
16043
|
}
|
|
16059
16044
|
};
|
|
16060
16045
|
const text = buildRunLogsText(filteredResult);
|
|
16061
|
-
|
|
16046
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16062
16047
|
{
|
|
16063
16048
|
runId: result.runId,
|
|
16064
16049
|
totalCount: result.totalCount,
|
|
@@ -16082,7 +16067,7 @@ async function handleRunLogs(args) {
|
|
|
16082
16067
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
16083
16068
|
},
|
|
16084
16069
|
{
|
|
16085
|
-
json:
|
|
16070
|
+
json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args),
|
|
16086
16071
|
text
|
|
16087
16072
|
}
|
|
16088
16073
|
);
|
|
@@ -16106,7 +16091,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
16106
16091
|
);
|
|
16107
16092
|
}
|
|
16108
16093
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
16109
|
-
(entry) =>
|
|
16094
|
+
(entry) => _chunkYLDIZ7A3js.logLevelReaches.call(void 0, _chunkYLDIZ7A3js.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
16110
16095
|
);
|
|
16111
16096
|
const selected = matching.slice(-limit);
|
|
16112
16097
|
const olderMatchesExist = matching.length > selected.length;
|
|
@@ -16116,7 +16101,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
16116
16101
|
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _526 => _526.at, 'call', _527 => _527(-1), 'optionalAccess', _528 => _528.seq]), () => ( null)),
|
|
16117
16102
|
truncated: result.truncated || olderMatchesExist,
|
|
16118
16103
|
hasMore: olderMatchesExist,
|
|
16119
|
-
nextCursor: olderMatchesExist ?
|
|
16104
|
+
nextCursor: olderMatchesExist ? _chunkYLDIZ7A3js.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
16120
16105
|
};
|
|
16121
16106
|
}
|
|
16122
16107
|
async function handleRunEventSearch(args) {
|
|
@@ -16183,7 +16168,7 @@ ${usage2}`);
|
|
|
16183
16168
|
namespace,
|
|
16184
16169
|
...backend ? { backend } : {}
|
|
16185
16170
|
} : void 0;
|
|
16186
|
-
const client = new (0,
|
|
16171
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16187
16172
|
const result = await client.runs.searchEvents({
|
|
16188
16173
|
...runId ? { runId } : {},
|
|
16189
16174
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -16256,7 +16241,7 @@ ${renderedDetails}` : ""}`;
|
|
|
16256
16241
|
String(limit),
|
|
16257
16242
|
"--json"
|
|
16258
16243
|
].join(" ") : null;
|
|
16259
|
-
|
|
16244
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16260
16245
|
{
|
|
16261
16246
|
events,
|
|
16262
16247
|
nextCursor: result.nextCursor,
|
|
@@ -16267,14 +16252,14 @@ ${renderedDetails}` : ""}`;
|
|
|
16267
16252
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
16268
16253
|
},
|
|
16269
16254
|
{
|
|
16270
|
-
json:
|
|
16255
|
+
json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args),
|
|
16271
16256
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
16272
16257
|
}
|
|
16273
16258
|
);
|
|
16274
16259
|
return 0;
|
|
16275
16260
|
}
|
|
16276
16261
|
function buildRunLogsText(result) {
|
|
16277
|
-
const lines = result.entries.map((line) =>
|
|
16262
|
+
const lines = result.entries.map((line) => _chunkYLDIZ7A3js.classifyLogLine.call(void 0, line).line);
|
|
16278
16263
|
if (result.warning) {
|
|
16279
16264
|
if (lines.length > 0) lines.push("");
|
|
16280
16265
|
lines.push(`warning: ${result.warning}`);
|
|
@@ -16308,7 +16293,7 @@ async function handleRunStop(args) {
|
|
|
16308
16293
|
reason = args[++index];
|
|
16309
16294
|
}
|
|
16310
16295
|
}
|
|
16311
|
-
const client = new (0,
|
|
16296
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16312
16297
|
const result = await client.runs.stop(runId, { reason });
|
|
16313
16298
|
const state = resolveRunStopState(result);
|
|
16314
16299
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -16323,7 +16308,7 @@ async function handleRunStop(args) {
|
|
|
16323
16308
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
16324
16309
|
`inspect: deepline runs get ${runId} --full --json`
|
|
16325
16310
|
];
|
|
16326
|
-
|
|
16311
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16327
16312
|
{
|
|
16328
16313
|
...cancelling,
|
|
16329
16314
|
state,
|
|
@@ -16338,7 +16323,7 @@ async function handleRunStop(args) {
|
|
|
16338
16323
|
]
|
|
16339
16324
|
}
|
|
16340
16325
|
},
|
|
16341
|
-
{ json:
|
|
16326
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) }
|
|
16342
16327
|
);
|
|
16343
16328
|
return 0;
|
|
16344
16329
|
}
|
|
@@ -16355,7 +16340,7 @@ async function handleRunStop(args) {
|
|
|
16355
16340
|
];
|
|
16356
16341
|
process.stderr.write(`${lines2.join("\n")}
|
|
16357
16342
|
`);
|
|
16358
|
-
|
|
16343
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16359
16344
|
{
|
|
16360
16345
|
...result,
|
|
16361
16346
|
render: {
|
|
@@ -16370,7 +16355,7 @@ async function handleRunStop(args) {
|
|
|
16370
16355
|
]
|
|
16371
16356
|
}
|
|
16372
16357
|
},
|
|
16373
|
-
{ json:
|
|
16358
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) }
|
|
16374
16359
|
);
|
|
16375
16360
|
return 1;
|
|
16376
16361
|
}
|
|
@@ -16381,12 +16366,12 @@ async function handleRunStop(args) {
|
|
|
16381
16366
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
16382
16367
|
] : []
|
|
16383
16368
|
];
|
|
16384
|
-
|
|
16369
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16385
16370
|
{
|
|
16386
16371
|
...result,
|
|
16387
16372
|
render: { sections: [{ title: "run stop", lines }] }
|
|
16388
16373
|
},
|
|
16389
|
-
{ json:
|
|
16374
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) }
|
|
16390
16375
|
);
|
|
16391
16376
|
return 0;
|
|
16392
16377
|
}
|
|
@@ -16436,18 +16421,18 @@ async function handleRunStopAll(args) {
|
|
|
16436
16421
|
reason = args[++index];
|
|
16437
16422
|
}
|
|
16438
16423
|
}
|
|
16439
|
-
const client = new (0,
|
|
16424
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16440
16425
|
if (dryRun) {
|
|
16441
16426
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
16442
16427
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
16443
|
-
|
|
16428
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16444
16429
|
{
|
|
16445
16430
|
...result2,
|
|
16446
16431
|
render: {
|
|
16447
16432
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
16448
16433
|
}
|
|
16449
16434
|
},
|
|
16450
|
-
{ json:
|
|
16435
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
16451
16436
|
` }
|
|
16452
16437
|
);
|
|
16453
16438
|
return 0;
|
|
@@ -16460,17 +16445,17 @@ async function handleRunStopAll(args) {
|
|
|
16460
16445
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
16461
16446
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
16462
16447
|
];
|
|
16463
|
-
|
|
16448
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16464
16449
|
{
|
|
16465
16450
|
...result,
|
|
16466
16451
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
16467
16452
|
},
|
|
16468
|
-
{ json:
|
|
16453
|
+
{ json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args) }
|
|
16469
16454
|
);
|
|
16470
16455
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
16471
16456
|
}
|
|
16472
16457
|
async function handleRunExport(args) {
|
|
16473
|
-
const selection =
|
|
16458
|
+
const selection = _chunkA4LUPRGLjs.parseJsonFields.call(void 0, args, "export");
|
|
16474
16459
|
args = selection.args;
|
|
16475
16460
|
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]";
|
|
16476
16461
|
let runId;
|
|
@@ -16529,16 +16514,16 @@ async function handleRunExport(args) {
|
|
|
16529
16514
|
"INVALID_ARGUMENT"
|
|
16530
16515
|
);
|
|
16531
16516
|
}
|
|
16532
|
-
const client = new (0,
|
|
16517
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16533
16518
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
16534
16519
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
16535
|
-
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !
|
|
16520
|
+
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunkA4LUPRGLjs.argsWantJson.call(void 0, args));
|
|
16536
16521
|
try {
|
|
16537
16522
|
await waitForPlayCompletionByWatch({
|
|
16538
16523
|
client,
|
|
16539
16524
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
16540
16525
|
workflowId: runId,
|
|
16541
|
-
jsonOutput:
|
|
16526
|
+
jsonOutput: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args),
|
|
16542
16527
|
emitLogs: false,
|
|
16543
16528
|
waitTimeoutMs,
|
|
16544
16529
|
startedAt: Date.now(),
|
|
@@ -16638,8 +16623,8 @@ async function handleRunExport(args) {
|
|
|
16638
16623
|
"utf-8"
|
|
16639
16624
|
);
|
|
16640
16625
|
}
|
|
16641
|
-
|
|
16642
|
-
json:
|
|
16626
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0, payload, {
|
|
16627
|
+
json: _chunkA4LUPRGLjs.argsWantJson.call(void 0, args),
|
|
16643
16628
|
fields: selection.fields,
|
|
16644
16629
|
text: `${lines.join("\n")}
|
|
16645
16630
|
`
|
|
@@ -16660,10 +16645,10 @@ async function handlePlayGet(args) {
|
|
|
16660
16645
|
);
|
|
16661
16646
|
return 2;
|
|
16662
16647
|
}
|
|
16663
|
-
const client = new (0,
|
|
16648
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16664
16649
|
const explicitJson = args.includes("--json");
|
|
16665
16650
|
const sourceOutput = args.includes("--source");
|
|
16666
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
16651
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
16667
16652
|
const requestedRevisionFlags = [
|
|
16668
16653
|
args.includes("--working"),
|
|
16669
16654
|
args.includes("--live"),
|
|
@@ -16723,7 +16708,7 @@ async function handlePlayGet(args) {
|
|
|
16723
16708
|
}
|
|
16724
16709
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
16725
16710
|
if (jsonOutput) {
|
|
16726
|
-
|
|
16711
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, {
|
|
16727
16712
|
...detail,
|
|
16728
16713
|
...materializedFile ? {
|
|
16729
16714
|
message: loadedMessage,
|
|
@@ -16810,8 +16795,8 @@ async function handlePlayVersions(args) {
|
|
|
16810
16795
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
16811
16796
|
return 1;
|
|
16812
16797
|
}
|
|
16813
|
-
const client = new (0,
|
|
16814
|
-
const jsonOutput =
|
|
16798
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16799
|
+
const jsonOutput = _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
16815
16800
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16816
16801
|
command: "versions"
|
|
16817
16802
|
});
|
|
@@ -16819,7 +16804,7 @@ async function handlePlayVersions(args) {
|
|
|
16819
16804
|
parseReferencedPlayTarget3(playName).playName
|
|
16820
16805
|
);
|
|
16821
16806
|
if (jsonOutput) {
|
|
16822
|
-
|
|
16807
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, { versions });
|
|
16823
16808
|
return 0;
|
|
16824
16809
|
}
|
|
16825
16810
|
if (versions.length === 0) {
|
|
@@ -16851,9 +16836,9 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
16851
16836
|
"signals"
|
|
16852
16837
|
];
|
|
16853
16838
|
async function handlePlayList(args) {
|
|
16854
|
-
const jsonOutput =
|
|
16839
|
+
const jsonOutput = _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
16855
16840
|
const showCost = args.includes("--show-cost");
|
|
16856
|
-
const client = new (0,
|
|
16841
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
16857
16842
|
const categoriesIndex = args.indexOf("--categories");
|
|
16858
16843
|
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _564 => _564[categoriesIndex + 1], 'optionalAccess', _565 => _565.trim, 'call', _566 => _566()]) : void 0;
|
|
16859
16844
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
@@ -16950,7 +16935,7 @@ async function handlePlayList(args) {
|
|
|
16950
16935
|
lines.push("List truncated \u2014 more plays are available.");
|
|
16951
16936
|
lines.push(`Next page: ${nextPage}`);
|
|
16952
16937
|
}
|
|
16953
|
-
|
|
16938
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
16954
16939
|
{
|
|
16955
16940
|
plays,
|
|
16956
16941
|
count: plays.length,
|
|
@@ -16968,7 +16953,7 @@ async function handlePlayList(args) {
|
|
|
16968
16953
|
}
|
|
16969
16954
|
async function handlePlayPin(args, pinned) {
|
|
16970
16955
|
const target = _optionalChain([args, 'access', _573 => _573.find, 'call', _574 => _574((arg) => !arg.startsWith("-")), 'optionalAccess', _575 => _575.trim, 'call', _576 => _576()]);
|
|
16971
|
-
const jsonOutput =
|
|
16956
|
+
const jsonOutput = _chunkA4LUPRGLjs.argsWantJson.call(void 0, args);
|
|
16972
16957
|
const dryRun = args.includes("--dry-run");
|
|
16973
16958
|
if (!target) {
|
|
16974
16959
|
console.error(
|
|
@@ -16986,11 +16971,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
16986
16971
|
const name = parsedTarget.playName;
|
|
16987
16972
|
const plan = { name, pinned, dryRun };
|
|
16988
16973
|
if (dryRun) {
|
|
16989
|
-
|
|
16974
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, plan);
|
|
16990
16975
|
return 0;
|
|
16991
16976
|
}
|
|
16992
|
-
const result = await new (0,
|
|
16993
|
-
if (jsonOutput)
|
|
16977
|
+
const result = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().setPlayPinned(name, pinned);
|
|
16978
|
+
if (jsonOutput) _chunkA4LUPRGLjs.printCompactJson.call(void 0, result);
|
|
16994
16979
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
16995
16980
|
return 0;
|
|
16996
16981
|
}
|
|
@@ -17006,7 +16991,7 @@ function csvColumnLines(csvInput) {
|
|
|
17006
16991
|
const headers = [defaults[column]].flat().filter((header) => header && header !== column);
|
|
17007
16992
|
return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
|
|
17008
16993
|
}),
|
|
17009
|
-
|
|
16994
|
+
_chunkYLDIZ7A3js.CSV_HEADER_MATCHING_NOTE
|
|
17010
16995
|
];
|
|
17011
16996
|
}
|
|
17012
16997
|
function describedPlay(play) {
|
|
@@ -17150,12 +17135,12 @@ async function handlePlayGrep(args) {
|
|
|
17150
17135
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
17151
17136
|
return 1;
|
|
17152
17137
|
}
|
|
17153
|
-
const client = new (0,
|
|
17138
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
17154
17139
|
const results = (await client.listPlays({ grep: query })).map(
|
|
17155
17140
|
summarizePlayGrepResult
|
|
17156
17141
|
);
|
|
17157
|
-
if (
|
|
17158
|
-
|
|
17142
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
17143
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, {
|
|
17159
17144
|
plays: results,
|
|
17160
17145
|
count: results.length,
|
|
17161
17146
|
query,
|
|
@@ -17178,7 +17163,7 @@ async function handlePlayGrep(args) {
|
|
|
17178
17163
|
return 0;
|
|
17179
17164
|
}
|
|
17180
17165
|
async function handlePlayDescribe(args) {
|
|
17181
|
-
const selection =
|
|
17166
|
+
const selection = _chunkA4LUPRGLjs.parseJsonFields.call(void 0, args, "describe");
|
|
17182
17167
|
args = selection.args;
|
|
17183
17168
|
const playName = args[0];
|
|
17184
17169
|
if (!playName) {
|
|
@@ -17212,8 +17197,8 @@ async function handlePlayDescribe(args) {
|
|
|
17212
17197
|
`deepline plays check ${playName}`,
|
|
17213
17198
|
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
17214
17199
|
];
|
|
17215
|
-
if (
|
|
17216
|
-
|
|
17200
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
17201
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, {
|
|
17217
17202
|
ok: false,
|
|
17218
17203
|
error: { message },
|
|
17219
17204
|
next
|
|
@@ -17227,7 +17212,7 @@ async function handlePlayDescribe(args) {
|
|
|
17227
17212
|
}
|
|
17228
17213
|
return 2;
|
|
17229
17214
|
}
|
|
17230
|
-
const client = new (0,
|
|
17215
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
17231
17216
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
17232
17217
|
command: "describe"
|
|
17233
17218
|
});
|
|
@@ -17237,9 +17222,9 @@ async function handlePlayDescribe(args) {
|
|
|
17237
17222
|
compact: args.includes("--compact")
|
|
17238
17223
|
}
|
|
17239
17224
|
);
|
|
17240
|
-
if (
|
|
17241
|
-
if (selection.fields)
|
|
17242
|
-
else
|
|
17225
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
17226
|
+
if (selection.fields) _chunkA4LUPRGLjs.printJson.call(void 0, play, selection.fields);
|
|
17227
|
+
else _chunkA4LUPRGLjs.printCompactJson.call(void 0, play);
|
|
17243
17228
|
return 0;
|
|
17244
17229
|
}
|
|
17245
17230
|
printPlayDescription(play);
|
|
@@ -17266,7 +17251,7 @@ async function handlePlaySave(args) {
|
|
|
17266
17251
|
{ targetKind: "file" },
|
|
17267
17252
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, options.target))
|
|
17268
17253
|
);
|
|
17269
|
-
|
|
17254
|
+
assertPlayGraphAuthoring(graph);
|
|
17270
17255
|
} catch (error) {
|
|
17271
17256
|
console.error(error instanceof Error ? error.message : String(error));
|
|
17272
17257
|
return 7;
|
|
@@ -17283,7 +17268,7 @@ async function handlePlaySave(args) {
|
|
|
17283
17268
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, options.target)}`
|
|
17284
17269
|
};
|
|
17285
17270
|
if (options.jsonOutput) {
|
|
17286
|
-
|
|
17271
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result);
|
|
17287
17272
|
} else {
|
|
17288
17273
|
console.error(result.message);
|
|
17289
17274
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -17305,7 +17290,7 @@ async function handlePlaySave(args) {
|
|
|
17305
17290
|
};
|
|
17306
17291
|
if (options.dryRun) {
|
|
17307
17292
|
if (options.jsonOutput) {
|
|
17308
|
-
|
|
17293
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, dryRun);
|
|
17309
17294
|
} else {
|
|
17310
17295
|
console.log(`Dry run: ${playName}`);
|
|
17311
17296
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17314,7 +17299,7 @@ async function handlePlaySave(args) {
|
|
|
17314
17299
|
}
|
|
17315
17300
|
return 0;
|
|
17316
17301
|
}
|
|
17317
|
-
const client = new (0,
|
|
17302
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
17318
17303
|
try {
|
|
17319
17304
|
await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
17320
17305
|
"cli.play_save_compile_manifests",
|
|
@@ -17350,7 +17335,7 @@ async function handlePlaySave(args) {
|
|
|
17350
17335
|
}
|
|
17351
17336
|
};
|
|
17352
17337
|
if (options.jsonOutput) {
|
|
17353
|
-
|
|
17338
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result);
|
|
17354
17339
|
} else {
|
|
17355
17340
|
console.log(
|
|
17356
17341
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -17376,7 +17361,7 @@ async function handlePlayPublish(args) {
|
|
|
17376
17361
|
}
|
|
17377
17362
|
const { target: playName, useLatest } = options;
|
|
17378
17363
|
let revisionId = options.revisionId;
|
|
17379
|
-
const client = new (0,
|
|
17364
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
17380
17365
|
if (isFileTarget2(playName)) {
|
|
17381
17366
|
if (revisionId || useLatest) {
|
|
17382
17367
|
console.error(
|
|
@@ -17391,7 +17376,7 @@ async function handlePlayPublish(args) {
|
|
|
17391
17376
|
{ targetKind: "file" },
|
|
17392
17377
|
() => collectBundledPlayGraph(_path.resolve.call(void 0, playName))
|
|
17393
17378
|
);
|
|
17394
|
-
|
|
17379
|
+
assertPlayGraphAuthoring(graph);
|
|
17395
17380
|
} catch (error) {
|
|
17396
17381
|
console.error(error instanceof Error ? error.message : String(error));
|
|
17397
17382
|
return 1;
|
|
@@ -17408,7 +17393,7 @@ async function handlePlayPublish(args) {
|
|
|
17408
17393
|
next: `deepline plays check ${_chunkAID3OYVJjs.shellQuote.call(void 0, playName)}`
|
|
17409
17394
|
};
|
|
17410
17395
|
if (options.jsonOutput) {
|
|
17411
|
-
|
|
17396
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result3);
|
|
17412
17397
|
} else {
|
|
17413
17398
|
console.error(result3.message);
|
|
17414
17399
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -17431,7 +17416,7 @@ async function handlePlayPublish(args) {
|
|
|
17431
17416
|
};
|
|
17432
17417
|
if (options.dryRun) {
|
|
17433
17418
|
if (options.jsonOutput) {
|
|
17434
|
-
|
|
17419
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, dryRun);
|
|
17435
17420
|
} else {
|
|
17436
17421
|
console.log(`Dry run: ${rootPlayName}`);
|
|
17437
17422
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17499,7 +17484,7 @@ async function handlePlayPublish(args) {
|
|
|
17499
17484
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
17500
17485
|
};
|
|
17501
17486
|
if (options.jsonOutput) {
|
|
17502
|
-
|
|
17487
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result2);
|
|
17503
17488
|
} else {
|
|
17504
17489
|
printPublishReceipt({
|
|
17505
17490
|
name: rootPlayName,
|
|
@@ -17530,7 +17515,7 @@ async function handlePlayPublish(args) {
|
|
|
17530
17515
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
17531
17516
|
latest: useLatest
|
|
17532
17517
|
};
|
|
17533
|
-
|
|
17518
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result2);
|
|
17534
17519
|
return 0;
|
|
17535
17520
|
}
|
|
17536
17521
|
const resolvedName = parseReferencedPlayTarget3(playName).playName;
|
|
@@ -17554,7 +17539,7 @@ async function handlePlayPublish(args) {
|
|
|
17554
17539
|
revisionId ? { revisionId } : {}
|
|
17555
17540
|
);
|
|
17556
17541
|
if (options.jsonOutput) {
|
|
17557
|
-
|
|
17542
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result);
|
|
17558
17543
|
} else {
|
|
17559
17544
|
printPublishReceipt({
|
|
17560
17545
|
name: result.name,
|
|
@@ -17594,7 +17579,7 @@ async function handlePlayDelete(args) {
|
|
|
17594
17579
|
);
|
|
17595
17580
|
return 2;
|
|
17596
17581
|
}
|
|
17597
|
-
const client = new (0,
|
|
17582
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
17598
17583
|
let detail;
|
|
17599
17584
|
try {
|
|
17600
17585
|
detail = await client.getPlay(parseReferencedPlayTarget3(playName).playName);
|
|
@@ -17618,8 +17603,8 @@ async function handlePlayDelete(args) {
|
|
|
17618
17603
|
name: resolvedName,
|
|
17619
17604
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
17620
17605
|
};
|
|
17621
|
-
if (
|
|
17622
|
-
|
|
17606
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
17607
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result2);
|
|
17623
17608
|
} else {
|
|
17624
17609
|
process.stdout.write(
|
|
17625
17610
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -17629,8 +17614,8 @@ async function handlePlayDelete(args) {
|
|
|
17629
17614
|
return 0;
|
|
17630
17615
|
}
|
|
17631
17616
|
const result = await client.deletePlay(resolvedName);
|
|
17632
|
-
if (
|
|
17633
|
-
|
|
17617
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
17618
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result);
|
|
17634
17619
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
17635
17620
|
}
|
|
17636
17621
|
if (result.alreadyArchived) {
|
|
@@ -17669,13 +17654,13 @@ async function handlePlayRestore(args) {
|
|
|
17669
17654
|
);
|
|
17670
17655
|
return 2;
|
|
17671
17656
|
}
|
|
17672
|
-
const client = new (0,
|
|
17657
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
17673
17658
|
try {
|
|
17674
17659
|
const result = await client.restorePlay(
|
|
17675
17660
|
parseReferencedPlayTarget3(playName).playName
|
|
17676
17661
|
);
|
|
17677
|
-
if (
|
|
17678
|
-
|
|
17662
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
17663
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, result);
|
|
17679
17664
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
17680
17665
|
}
|
|
17681
17666
|
if (result.alreadyActive) {
|
|
@@ -17782,7 +17767,7 @@ Examples:
|
|
|
17782
17767
|
).action(async (target, options) => {
|
|
17783
17768
|
process.exitCode = await handlePlayCheck([
|
|
17784
17769
|
target,
|
|
17785
|
-
...
|
|
17770
|
+
..._chunkA4LUPRGLjs.jsonFieldArgs.call(void 0, options.json),
|
|
17786
17771
|
...options.full ? ["--full"] : []
|
|
17787
17772
|
]);
|
|
17788
17773
|
});
|
|
@@ -18011,9 +17996,9 @@ Examples:
|
|
|
18011
17996
|
const limit = Number(options.historyLimit);
|
|
18012
17997
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
18013
17998
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
18014
|
-
const client = new (0,
|
|
17999
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
18015
18000
|
if (options.binding) {
|
|
18016
|
-
|
|
18001
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0,
|
|
18017
18002
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
18018
18003
|
);
|
|
18019
18004
|
return;
|
|
@@ -18021,7 +18006,7 @@ Examples:
|
|
|
18021
18006
|
const result = await client.listPlayTriggerInventory({
|
|
18022
18007
|
cursor: options.cursor
|
|
18023
18008
|
});
|
|
18024
|
-
|
|
18009
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, {
|
|
18025
18010
|
...result,
|
|
18026
18011
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
|
|
18027
18012
|
});
|
|
@@ -18068,7 +18053,7 @@ Examples:
|
|
|
18068
18053
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
18069
18054
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
18070
18055
|
}
|
|
18071
|
-
const result = await new (0,
|
|
18056
|
+
const result = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().getPlaysActivity({
|
|
18072
18057
|
timeZone: options.timeZone,
|
|
18073
18058
|
days,
|
|
18074
18059
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -18082,7 +18067,7 @@ Examples:
|
|
|
18082
18067
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
18083
18068
|
);
|
|
18084
18069
|
}
|
|
18085
|
-
|
|
18070
|
+
_chunkA4LUPRGLjs.printCommandEnvelope.call(void 0,
|
|
18086
18071
|
{ ...result },
|
|
18087
18072
|
{
|
|
18088
18073
|
json: options.json || !process.stdout.isTTY,
|
|
@@ -18111,7 +18096,7 @@ Examples:
|
|
|
18111
18096
|
false
|
|
18112
18097
|
);
|
|
18113
18098
|
});
|
|
18114
|
-
|
|
18099
|
+
_chunkVLV2PVA2js.registerDeprecatedSearchCommand.call(void 0,
|
|
18115
18100
|
play,
|
|
18116
18101
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
18117
18102
|
);
|
|
@@ -18155,7 +18140,7 @@ Examples:
|
|
|
18155
18140
|
);
|
|
18156
18141
|
_chunkAFNEQ43Jjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
18157
18142
|
async (target, options) => {
|
|
18158
|
-
const ownView = () => handlePlayDescribe(
|
|
18143
|
+
const ownView = () => handlePlayDescribe(_chunkA4LUPRGLjs.describeArgs.call(void 0, target, options));
|
|
18159
18144
|
const [flagText] = [options.json].filter(
|
|
18160
18145
|
(value) => typeof value === "string"
|
|
18161
18146
|
);
|
|
@@ -18166,7 +18151,7 @@ Examples:
|
|
|
18166
18151
|
process.exitCode = await ownView();
|
|
18167
18152
|
return;
|
|
18168
18153
|
}
|
|
18169
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
18154
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-HGYOEBYE.js")));
|
|
18170
18155
|
process.exitCode = await describeAnything(
|
|
18171
18156
|
name,
|
|
18172
18157
|
{
|
|
@@ -18283,7 +18268,7 @@ Examples:
|
|
|
18283
18268
|
deepline plays deployments <deployment-id>
|
|
18284
18269
|
`
|
|
18285
18270
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
|
|
18286
|
-
async (id, options) => id ?
|
|
18271
|
+
async (id, options) => id ? _chunkEQFYORNRjs.handleDeploymentGet.call(void 0, id, options) : _chunkEQFYORNRjs.handleDeploymentsList.call(void 0, options)
|
|
18287
18272
|
);
|
|
18288
18273
|
addPublishHelp(
|
|
18289
18274
|
play.command("publish <target>").description(
|
|
@@ -18463,7 +18448,7 @@ Examples:
|
|
|
18463
18448
|
).action(async (runId, options) => {
|
|
18464
18449
|
process.exitCode = await handleRunGet([
|
|
18465
18450
|
runId,
|
|
18466
|
-
...
|
|
18451
|
+
..._chunkA4LUPRGLjs.jsonFieldArgs.call(void 0, options.json),
|
|
18467
18452
|
...options.full ? ["--full"] : [],
|
|
18468
18453
|
...options.input ? ["--input"] : [],
|
|
18469
18454
|
...options.config ? ["--config"] : [],
|
|
@@ -18739,7 +18724,7 @@ Examples:
|
|
|
18739
18724
|
...options.allowEmpty ? ["--allow-empty"] : [],
|
|
18740
18725
|
...options.wait ? ["--wait"] : [],
|
|
18741
18726
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
18742
|
-
...
|
|
18727
|
+
..._chunkA4LUPRGLjs.jsonFieldArgs.call(void 0, options.json)
|
|
18743
18728
|
]);
|
|
18744
18729
|
});
|
|
18745
18730
|
const share = play.command("share").description(
|
|
@@ -18905,10 +18890,10 @@ async function handlePlayShareStatus(args) {
|
|
|
18905
18890
|
return 2;
|
|
18906
18891
|
}
|
|
18907
18892
|
const name = parseReferencedPlayTarget3(target).playName;
|
|
18908
|
-
const status = await new (0,
|
|
18893
|
+
const status = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().getSharePage(name);
|
|
18909
18894
|
const outputStatus = shareStatusForOutput(status);
|
|
18910
|
-
if (
|
|
18911
|
-
|
|
18895
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
18896
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, outputStatus);
|
|
18912
18897
|
return 0;
|
|
18913
18898
|
}
|
|
18914
18899
|
if (!outputStatus.share) {
|
|
@@ -18947,7 +18932,7 @@ async function handlePlaySharePublish(args) {
|
|
|
18947
18932
|
return 2;
|
|
18948
18933
|
}
|
|
18949
18934
|
const name = parseReferencedPlayTarget3(target).playName;
|
|
18950
|
-
const client = new (0,
|
|
18935
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
18951
18936
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18952
18937
|
let resolvedVersion;
|
|
18953
18938
|
if (!revisionId) {
|
|
@@ -18978,8 +18963,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18978
18963
|
);
|
|
18979
18964
|
if (!hasCompleted) {
|
|
18980
18965
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
18981
|
-
if (
|
|
18982
|
-
|
|
18966
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
18967
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, {
|
|
18983
18968
|
ok: false,
|
|
18984
18969
|
code: "NO_SUCCESSFUL_RUN",
|
|
18985
18970
|
message,
|
|
@@ -19003,8 +18988,8 @@ async function handlePlaySharePublish(args) {
|
|
|
19003
18988
|
};
|
|
19004
18989
|
if (args.includes("--dry-run")) {
|
|
19005
18990
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
19006
|
-
if (
|
|
19007
|
-
|
|
18991
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
18992
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, plan);
|
|
19008
18993
|
} else {
|
|
19009
18994
|
console.log(
|
|
19010
18995
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -19014,8 +18999,8 @@ async function handlePlaySharePublish(args) {
|
|
|
19014
18999
|
}
|
|
19015
19000
|
const status = await client.publishSharePage(name, request);
|
|
19016
19001
|
const outputStatus = shareStatusForOutput(status);
|
|
19017
|
-
if (
|
|
19018
|
-
|
|
19002
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
19003
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, outputStatus);
|
|
19019
19004
|
return 0;
|
|
19020
19005
|
}
|
|
19021
19006
|
const urls = shareUrlFields(outputStatus);
|
|
@@ -19046,9 +19031,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
19046
19031
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
19047
19032
|
...seoIndexing ? { seoIndexing } : {}
|
|
19048
19033
|
};
|
|
19049
|
-
const status = await new (0,
|
|
19050
|
-
if (
|
|
19051
|
-
|
|
19034
|
+
const status = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().updateSharePage(name, request);
|
|
19035
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
19036
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, status);
|
|
19052
19037
|
return 0;
|
|
19053
19038
|
}
|
|
19054
19039
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -19063,7 +19048,7 @@ async function handlePlayShareRegenerate(args) {
|
|
|
19063
19048
|
return 2;
|
|
19064
19049
|
}
|
|
19065
19050
|
const name = parseReferencedPlayTarget3(target).playName;
|
|
19066
|
-
const client = new (0,
|
|
19051
|
+
const client = new (0, _chunkYLDIZ7A3js.DeeplineClient)();
|
|
19067
19052
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
19068
19053
|
const versionFlag = shareFlagValue(args, "--version");
|
|
19069
19054
|
if (!revisionId && versionFlag) {
|
|
@@ -19080,8 +19065,8 @@ async function handlePlayShareRegenerate(args) {
|
|
|
19080
19065
|
revisionId ? { revisionId } : {}
|
|
19081
19066
|
);
|
|
19082
19067
|
const outputStatus = shareStatusForOutput(status);
|
|
19083
|
-
if (
|
|
19084
|
-
|
|
19068
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
19069
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, outputStatus);
|
|
19085
19070
|
return 0;
|
|
19086
19071
|
}
|
|
19087
19072
|
const urls = shareUrlFields(outputStatus);
|
|
@@ -19106,9 +19091,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
19106
19091
|
return 2;
|
|
19107
19092
|
}
|
|
19108
19093
|
const name = parseReferencedPlayTarget3(target).playName;
|
|
19109
|
-
const status = await new (0,
|
|
19110
|
-
if (
|
|
19111
|
-
|
|
19094
|
+
const status = await new (0, _chunkYLDIZ7A3js.DeeplineClient)().unpublishSharePage(name);
|
|
19095
|
+
if (_chunkA4LUPRGLjs.argsWantJson.call(void 0, args)) {
|
|
19096
|
+
_chunkA4LUPRGLjs.printCompactJson.call(void 0, status);
|
|
19112
19097
|
return 0;
|
|
19113
19098
|
}
|
|
19114
19099
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|