deepline 0.3.311 → 0.3.312
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/play.ts +7 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +100 -25
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +23 -1
- package/dist/bundling-sources/shared_libs/plays/core.ts +7 -1
- package/dist/bundling-sources/shared_libs/plays/settings-contract.ts +29 -3
- package/dist/cli/{auth-2A7OYHFJ.mjs → auth-ACDTPM3M.mjs} +4 -4
- package/dist/cli/auth-TFDGA24W.js +31 -0
- package/dist/cli/{billing-P7GIAP3U.mjs → billing-FVBBJ77L.mjs} +5 -5
- package/dist/cli/{billing-2PQ4VDRR.js → billing-YTJFHEGU.js} +71 -71
- package/dist/cli/{chunk-5IBHISKA.js → chunk-6KKETQSI.js} +6 -6
- package/dist/cli/{chunk-XDUQQTIS.js → chunk-6LLJWMYH.js} +6 -6
- package/dist/cli/{chunk-HOCPOTDX.mjs → chunk-6OGNRAS7.mjs} +2 -2
- package/dist/cli/chunk-76VKBPOC.mjs +406 -0
- package/dist/cli/{chunk-7TT4LZIR.js → chunk-7SW43OAX.js} +60 -60
- package/dist/cli/{chunk-SGTSJCOA.mjs → chunk-AA66YTS7.mjs} +1 -1
- package/dist/cli/{chunk-QO3GH6UP.js → chunk-BRJOVSTH.js} +2 -2
- package/dist/cli/{chunk-4WFNAWVO.mjs → chunk-EHVJ7XXD.mjs} +2 -2
- package/dist/cli/{chunk-G3QP2WYR.mjs → chunk-ENSDO4SG.mjs} +4 -4
- package/dist/cli/{chunk-VODJJUKE.js → chunk-FQVTHBEH.js} +15 -15
- package/dist/cli/{chunk-DUEHAEPM.mjs → chunk-GTEDCRKC.mjs} +1 -1
- package/dist/cli/{play-SOG5Q2GE.mjs → chunk-I25C4KL7.mjs} +166 -90
- package/dist/cli/{chunk-W7INSYJS.js → chunk-IALPYID6.js} +3 -3
- package/dist/cli/{chunk-ICZB4GTY.mjs → chunk-MK4K5MQU.mjs} +23 -3
- package/dist/cli/{chunk-WB6Z2Q44.mjs → chunk-N5V2SBB2.mjs} +19 -1
- package/dist/cli/{chunk-TBX7AA7Y.mjs → chunk-NJNYWVEF.mjs} +2 -2
- package/dist/cli/{chunk-QJA6SJHA.mjs → chunk-NMZPK7LM.mjs} +1 -1
- package/dist/cli/{chunk-5OVNL6LS.mjs → chunk-NWFE4PGX.mjs} +1 -1
- package/dist/cli/{chunk-ZDO3TO3M.js → chunk-OJ243ZA5.js} +19 -1
- package/dist/cli/{tools-G4HGCHNQ.mjs → chunk-OV6IFAXH.mjs} +180 -36
- package/dist/cli/{play-BCMGFYTF.js → chunk-QFSLMI42.js} +342 -266
- package/dist/cli/{chunk-LRI2FQF2.js → chunk-T4IJQKRE.js} +26 -26
- package/dist/cli/{chunk-RNJ74JDH.js → chunk-TID5XLTZ.js} +4 -4
- package/dist/cli/{chunk-QYL5ZV4U.js → chunk-ULI6UVV6.js} +6 -6
- package/dist/cli/{chunk-4NIQA6S7.mjs → chunk-US4S3E4Y.mjs} +1 -1
- package/dist/cli/{tools-WN7T25LW.js → chunk-V7N6BJQD.js} +231 -87
- package/dist/cli/{chunk-IB7OGQGH.js → chunk-VJDKV5RU.js} +29 -9
- package/dist/cli/{chunk-Q3LYQTSO.mjs → chunk-WPTUKXIF.mjs} +1 -1
- package/dist/cli/chunk-XNL3SEMC.js +406 -0
- package/dist/cli/{chunk-GCX3343L.js → chunk-YYU3PYVK.js} +48 -48
- package/dist/cli/{chunk-SPUTBCUR.mjs → chunk-ZH7KTVAB.mjs} +1 -1
- package/dist/cli/{chunk-FYPZ43Y4.js → chunk-ZQJDRSR5.js} +1 -1
- package/dist/cli/{client-PNLDT2M3.mjs → client-ENGOMTTU.mjs} +3 -3
- package/dist/cli/client-T6YGH6TT.js +20 -0
- package/dist/cli/{csv-L5DN7F45.js → csv-6WOJC6NZ.js} +12 -12
- package/dist/cli/{csv-KUAATBZQ.mjs → csv-ENKTPYAJ.mjs} +3 -3
- package/dist/cli/{db-6NIH4KTZ.js → db-BAEVP4QK.js} +20 -20
- package/dist/cli/{db-WZOD6NP5.mjs → db-DSCJZYJU.mjs} +4 -4
- package/dist/cli/describe-PAUHJF7H.mjs +236 -0
- package/dist/cli/describe-X2AFAC4B.js +236 -0
- package/dist/cli/{executions-TQ5WRHDS.js → executions-LXS6NLCV.js} +6 -6
- package/dist/cli/{executions-RDDXGT2Y.mjs → executions-R6JOR67D.mjs} +4 -4
- package/dist/cli/{feedback-ZB4WKBSS.mjs → feedback-CYRVNCGT.mjs} +3 -3
- package/dist/cli/{feedback-NYKLEQB6.js → feedback-HXP2D7K6.js} +6 -6
- package/dist/cli/git-JOE2RM3Q.js +23 -0
- package/dist/cli/{git-E6DKAX3X.mjs → git-XBYBZB4R.mjs} +4 -4
- package/dist/cli/index.js +82 -78
- package/dist/cli/index.mjs +45 -41
- package/dist/cli/{legacy-noops-26Y5NSU6.js → legacy-noops-AUNAFEZP.js} +7 -7
- package/dist/cli/{legacy-noops-25B7JCOZ.mjs → legacy-noops-OQP6VZKE.mjs} +4 -4
- package/dist/cli/{monitors-WRTHO7DT.mjs → monitors-L2HAAPAL.mjs} +7 -7
- package/dist/cli/{monitors-L3GFT4MG.js → monitors-QSIZG3CJ.js} +88 -88
- package/dist/cli/{org-BNCTGPWF.js → org-JUHQGBQE.js} +60 -60
- package/dist/cli/{org-ZTHOFVEO.mjs → org-UCSN5XRC.mjs} +4 -4
- package/dist/cli/play-2SNMTZGK.js +152 -0
- package/dist/cli/play-5AT2RB3M.mjs +152 -0
- package/dist/cli/{providers-MLOKTD6O.js → providers-CVG4L3VR.js} +7 -7
- package/dist/cli/{providers-SLAPPVMU.mjs → providers-GVPAPZ4L.mjs} +4 -4
- package/dist/cli/{quickstart-IWJLGET3.js → quickstart-7OIFIQG3.js} +5 -5
- package/dist/cli/{quickstart-LZRKZLNQ.mjs → quickstart-Y6ZU27LE.mjs} +3 -3
- package/dist/cli/{search-RCDGSNWW.mjs → search-4I2Y2NKK.mjs} +13 -5
- package/dist/cli/search-DS36UHOX.js +26 -0
- package/dist/cli/{secrets-GDPYV6OC.mjs → secrets-3Z4IUEBA.mjs} +4 -4
- package/dist/cli/{secrets-24KEMSCU.js → secrets-O2UFLU52.js} +13 -13
- package/dist/cli/{sessions-ST5XQQZN.mjs → sessions-OMAXRY5I.mjs} +4 -4
- package/dist/cli/{sessions-QOUUGVP3.js → sessions-T6MWWQRH.js} +5 -5
- package/dist/cli/{settings-V6Z775TO.mjs → settings-C47WXZY5.mjs} +7 -7
- package/dist/cli/{settings-4XWDMAA2.js → settings-R4LO5NMY.js} +74 -74
- package/dist/cli/{setup-W7SPZTUL.js → setup-FIUTV4DD.js} +41 -41
- package/dist/cli/{setup-QPZLP25U.mjs → setup-JPJVTIQ6.mjs} +6 -6
- package/dist/cli/{skills-QG22R2EI.mjs → skills-6WVTMKP5.mjs} +4 -4
- package/dist/cli/skills-GLPKPF7R.js +28 -0
- package/dist/cli/tools-L3YLQ7BR.js +38 -0
- package/dist/cli/tools-TKS77TNU.mjs +38 -0
- package/dist/cli/{update-5PSYBGVU.mjs → update-GD754XMA.mjs} +6 -6
- package/dist/cli/update-HXI35NME.js +28 -0
- package/dist/cli/{workflow-ZEQ46MGG.js → workflow-OCUQCNXA.js} +16 -16
- package/dist/cli/{workflow-EK7DV4AQ.mjs → workflow-YKQSPXQZ.mjs} +6 -6
- package/dist/{client-DpnkGBn-.d.mts → client-CtVdLZux.d.mts} +21 -4
- package/dist/{client-ypdBvf1o.d.ts → client-OBwghxPC.d.ts} +21 -4
- package/dist/{compiler-manifest-qtTNYvBl.d.ts → compiler-manifest-wOKNiXpa.d.mts} +21 -0
- package/dist/{compiler-manifest-qtTNYvBl.d.mts → compiler-manifest-wOKNiXpa.d.ts} +21 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -10
- package/dist/index.mjs +16 -13
- package/dist/install-integrity.json +84 -76
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-66JFXP6C.js +0 -31
- package/dist/cli/client-ADWRS22F.js +0 -20
- package/dist/cli/git-E56KOYJR.js +0 -23
- package/dist/cli/search-6FBDSA3K.js +0 -18
- package/dist/cli/skills-WKOQBJY7.js +0 -28
- package/dist/cli/update-WKVCWGYY.js +0 -28
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXNL3SEMCjs = require('./chunk-XNL3SEMC.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk5JLQPVNXjs = require('./chunk-5JLQPVNX.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkVJDKV5RUjs = require('./chunk-VJDKV5RU.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunkT4IJQKREjs = require('./chunk-T4IJQKRE.js');
|
|
11
15
|
|
|
12
16
|
|
|
13
17
|
|
|
@@ -30,7 +34,7 @@ var _chunkSDK3ZA2Cjs = require('./chunk-SDK3ZA2C.js');
|
|
|
30
34
|
|
|
31
35
|
|
|
32
36
|
|
|
33
|
-
var
|
|
37
|
+
var _chunkULI6UVV6js = require('./chunk-ULI6UVV6.js');
|
|
34
38
|
|
|
35
39
|
|
|
36
40
|
|
|
@@ -62,12 +66,10 @@ var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
|
62
66
|
|
|
63
67
|
|
|
64
68
|
|
|
65
|
-
var
|
|
69
|
+
var _chunk6LLJWMYHjs = require('./chunk-6LLJWMYH.js');
|
|
66
70
|
|
|
67
71
|
|
|
68
|
-
var
|
|
69
|
-
require('./chunk-XNYIZMNQ.js');
|
|
70
|
-
require('./chunk-FYPZ43Y4.js');
|
|
72
|
+
var _chunkTID5XLTZjs = require('./chunk-TID5XLTZ.js');
|
|
71
73
|
|
|
72
74
|
|
|
73
75
|
|
|
@@ -75,14 +77,10 @@ require('./chunk-FYPZ43Y4.js');
|
|
|
75
77
|
|
|
76
78
|
|
|
77
79
|
|
|
78
|
-
var
|
|
79
|
-
require('./chunk-3KC45UVF.js');
|
|
80
|
-
require('./chunk-ZDO3TO3M.js');
|
|
81
|
-
require('./chunk-S6R3OX7B.js');
|
|
80
|
+
var _chunkIALPYID6js = require('./chunk-IALPYID6.js');
|
|
82
81
|
|
|
83
82
|
|
|
84
83
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
85
|
-
require('./chunk-OG64RBAC.js');
|
|
86
84
|
|
|
87
85
|
|
|
88
86
|
|
|
@@ -1917,6 +1915,7 @@ function displayPlayPath(path, ownerName) {
|
|
|
1917
1915
|
..._nullishCoalesce(_optionalChain([path, 'optionalAccess', _6 => _6.folders]), () => ( []))
|
|
1918
1916
|
].join(" / ");
|
|
1919
1917
|
}
|
|
1918
|
+
var playDisplayNameSchema = _zod.z.string().trim().nullable().transform((value) => value || null);
|
|
1920
1919
|
var PLAY_SETTING_FIELDS = {
|
|
1921
1920
|
path: {
|
|
1922
1921
|
schema: playPathSchema.default(null).describe(
|
|
@@ -1937,9 +1936,26 @@ var PLAY_SETTING_FIELDS = {
|
|
|
1937
1936
|
"null"
|
|
1938
1937
|
],
|
|
1939
1938
|
parse: (value) => value === "null" ? null : parsePlayPath(value),
|
|
1940
|
-
format: formatPlayPath
|
|
1939
|
+
format: (value) => formatPlayPath(playPathSchema.parse(value))
|
|
1941
1940
|
},
|
|
1942
1941
|
ui: { control: "play-location-picker" }
|
|
1942
|
+
},
|
|
1943
|
+
displayName: {
|
|
1944
|
+
schema: playDisplayNameSchema.default(null).describe(
|
|
1945
|
+
"Optional human-readable Play name. Null uses the name derived from the identifier."
|
|
1946
|
+
),
|
|
1947
|
+
label: "Display name",
|
|
1948
|
+
description: "Optional name shown in the UI. Leave empty to use the name derived from the Play identifier.",
|
|
1949
|
+
get defaultValue() {
|
|
1950
|
+
return this.schema.parse(void 0);
|
|
1951
|
+
},
|
|
1952
|
+
cli: {
|
|
1953
|
+
valueSyntax: "text | null",
|
|
1954
|
+
examples: ["Find verified emails", "null"],
|
|
1955
|
+
parse: (value) => value === "null" ? null : value,
|
|
1956
|
+
format: (value) => _nullishCoalesce(playDisplayNameSchema.parse(value), () => ( "null"))
|
|
1957
|
+
},
|
|
1958
|
+
ui: { control: "text" }
|
|
1943
1959
|
}
|
|
1944
1960
|
};
|
|
1945
1961
|
var playSettingsSchema = _zod.z.object(
|
|
@@ -2043,8 +2059,9 @@ function resolveField(key, command) {
|
|
|
2043
2059
|
return entry[1];
|
|
2044
2060
|
}
|
|
2045
2061
|
function printSettings(result, json, name) {
|
|
2062
|
+
result = { ...result, settings: parsePlaySettings(result.settings) };
|
|
2046
2063
|
const selected = fields.filter(([key]) => !name || key === name);
|
|
2047
|
-
|
|
2064
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2048
2065
|
{
|
|
2049
2066
|
...result,
|
|
2050
2067
|
settings: Object.fromEntries(
|
|
@@ -2088,7 +2105,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2088
2105
|
valueSyntax: field.cli.valueSyntax,
|
|
2089
2106
|
examples: field.cli.examples
|
|
2090
2107
|
}));
|
|
2091
|
-
|
|
2108
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2092
2109
|
{
|
|
2093
2110
|
fields: descriptions,
|
|
2094
2111
|
render: {
|
|
@@ -2113,7 +2130,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2113
2130
|
async (options, command) => {
|
|
2114
2131
|
if (options.name !== void 0) resolveField(options.name, command);
|
|
2115
2132
|
printSettings(
|
|
2116
|
-
await new (0,
|
|
2133
|
+
await new (0, _chunkULI6UVV6js.DeeplineClient)().getPlaySettings(options.play),
|
|
2117
2134
|
options.json,
|
|
2118
2135
|
options.name
|
|
2119
2136
|
);
|
|
@@ -2144,7 +2161,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2144
2161
|
);
|
|
2145
2162
|
}
|
|
2146
2163
|
if (options.dryRun) {
|
|
2147
|
-
|
|
2164
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2148
2165
|
{
|
|
2149
2166
|
dryRun: true,
|
|
2150
2167
|
play,
|
|
@@ -2165,7 +2182,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2165
2182
|
return;
|
|
2166
2183
|
}
|
|
2167
2184
|
printSettings(
|
|
2168
|
-
await new (0,
|
|
2185
|
+
await new (0, _chunkULI6UVV6js.DeeplineClient)().updatePlaySettings(play, patch),
|
|
2169
2186
|
options.json
|
|
2170
2187
|
);
|
|
2171
2188
|
};
|
|
@@ -2191,13 +2208,13 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2191
2208
|
"--root must be person or team; --limit must be 1\u2013100.",
|
|
2192
2209
|
{ exitCode: 2 }
|
|
2193
2210
|
);
|
|
2194
|
-
const page = await new (0,
|
|
2211
|
+
const page = await new (0, _chunkULI6UVV6js.DeeplineClient)().listPlaySettingsPaths({
|
|
2195
2212
|
root: options.root,
|
|
2196
2213
|
limit,
|
|
2197
2214
|
cursor: options.cursor
|
|
2198
2215
|
});
|
|
2199
2216
|
const nextCommand = page.hasMore ? `deepline plays settings paths --cursor '${page.cursor}'${options.root ? ` --root ${options.root}` : ""} --json` : null;
|
|
2200
|
-
|
|
2217
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2201
2218
|
{
|
|
2202
2219
|
...page,
|
|
2203
2220
|
nextCommand,
|
|
@@ -2248,7 +2265,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2248
2265
|
root: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _13 => _13.root]), () => ( "person")),
|
|
2249
2266
|
folders: _nullishCoalesce(_optionalChain([toPath, 'optionalAccess', _14 => _14.folders]), () => ( []))
|
|
2250
2267
|
};
|
|
2251
|
-
const client = new (0,
|
|
2268
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
2252
2269
|
const paths = [];
|
|
2253
2270
|
let cursor;
|
|
2254
2271
|
do {
|
|
@@ -2310,7 +2327,7 @@ function registerPlaySettingsCommands(plays) {
|
|
|
2310
2327
|
moved.push(move.playName);
|
|
2311
2328
|
}
|
|
2312
2329
|
}
|
|
2313
|
-
|
|
2330
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2314
2331
|
{
|
|
2315
2332
|
dryRun: Boolean(options.dryRun),
|
|
2316
2333
|
from: options.from,
|
|
@@ -2438,7 +2455,7 @@ function triggerLines(view) {
|
|
|
2438
2455
|
return lines;
|
|
2439
2456
|
}
|
|
2440
2457
|
function printView(view, json) {
|
|
2441
|
-
|
|
2458
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2442
2459
|
{
|
|
2443
2460
|
...view,
|
|
2444
2461
|
render: {
|
|
@@ -2451,7 +2468,7 @@ function printView(view, json) {
|
|
|
2451
2468
|
);
|
|
2452
2469
|
}
|
|
2453
2470
|
function printResult(result, json) {
|
|
2454
|
-
|
|
2471
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2455
2472
|
{
|
|
2456
2473
|
...result,
|
|
2457
2474
|
render: {
|
|
@@ -2481,7 +2498,7 @@ async function mutate(command, options, build) {
|
|
|
2481
2498
|
usage(command, `Invalid trigger: ${formatPlayTriggerConfigError(error)}`);
|
|
2482
2499
|
}
|
|
2483
2500
|
if (options.dryRun) {
|
|
2484
|
-
|
|
2501
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
2485
2502
|
{
|
|
2486
2503
|
dryRun: true,
|
|
2487
2504
|
play: options.play,
|
|
@@ -2500,7 +2517,7 @@ async function mutate(command, options, build) {
|
|
|
2500
2517
|
return;
|
|
2501
2518
|
}
|
|
2502
2519
|
printResult(
|
|
2503
|
-
await new (0,
|
|
2520
|
+
await new (0, _chunkULI6UVV6js.DeeplineClient)().updatePlayTriggerConfig(options.play, update),
|
|
2504
2521
|
options.json
|
|
2505
2522
|
);
|
|
2506
2523
|
}
|
|
@@ -2533,7 +2550,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2533
2550
|
}).addHelpText("after", help2);
|
|
2534
2551
|
trigger.command("get").description("Show the cron and webhook triggers of a Play.").requiredOption("--play <play>", "Play to read").option("--json", "Emit JSON; automatic when piped").addHelpText("after", help2).action(async (options) => {
|
|
2535
2552
|
printView(
|
|
2536
|
-
await new (0,
|
|
2553
|
+
await new (0, _chunkULI6UVV6js.DeeplineClient)().getPlayTriggerConfig(options.play),
|
|
2537
2554
|
options.json
|
|
2538
2555
|
);
|
|
2539
2556
|
});
|
|
@@ -2577,7 +2594,7 @@ function registerPlayTriggerConfigCommands(plays) {
|
|
|
2577
2594
|
if (options.auth === void 0) {
|
|
2578
2595
|
if (secrets.length || options.header || options.signaturePrefix)
|
|
2579
2596
|
usage(setWebhook, "--secret/--header need --auth.");
|
|
2580
|
-
const current = await new (0,
|
|
2597
|
+
const current = await new (0, _chunkULI6UVV6js.DeeplineClient)().getPlayTriggerConfig(
|
|
2581
2598
|
options.play
|
|
2582
2599
|
);
|
|
2583
2600
|
return {
|
|
@@ -2654,7 +2671,7 @@ var KIND_DESCRIPTIONS = {
|
|
|
2654
2671
|
"receipt.skipped": "Saved work result: skipped.",
|
|
2655
2672
|
"runtime.event": "Other event."
|
|
2656
2673
|
};
|
|
2657
|
-
var RUN_LOGS_KIND_HELP =
|
|
2674
|
+
var RUN_LOGS_KIND_HELP = _chunkULI6UVV6js.RUN_EVENT_SEARCH_KIND_VALUES.map((kind) => ({
|
|
2658
2675
|
kind,
|
|
2659
2676
|
description: KIND_DESCRIPTIONS[kind]
|
|
2660
2677
|
}));
|
|
@@ -2791,9 +2808,9 @@ function configureRunQueryCommandErrors(command, resource) {
|
|
|
2791
2808
|
const args = program.args;
|
|
2792
2809
|
if (error.exitCode !== 0 && (resource === "events" || requestsStructuredLogs(args))) {
|
|
2793
2810
|
error.exitCode = 2;
|
|
2794
|
-
if (
|
|
2795
|
-
|
|
2796
|
-
Object.assign(new (0,
|
|
2811
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args) || command.optsWithGlobals().json === true) {
|
|
2812
|
+
_chunk6LLJWMYHjs.printJsonError.call(void 0,
|
|
2813
|
+
Object.assign(new (0, _chunkULI6UVV6js.RunEventQueryInputError)(error.message), {
|
|
2797
2814
|
exitCode: 2,
|
|
2798
2815
|
retryable: false
|
|
2799
2816
|
})
|
|
@@ -2837,14 +2854,14 @@ function parseQuery(args, resource) {
|
|
|
2837
2854
|
if (VALUE_FLAGS.has(flag)) {
|
|
2838
2855
|
const value = equals > 0 ? arg.slice(equals + 1) : args[++index];
|
|
2839
2856
|
if (!value || equals < 0 && value.startsWith("--") && flag !== "--query" && flag !== "--where") {
|
|
2840
|
-
throw new (0,
|
|
2857
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2841
2858
|
`${flag} requires a value. Use ${flag} <value>.`
|
|
2842
2859
|
);
|
|
2843
2860
|
}
|
|
2844
2861
|
if (flag === "--sum") sums.push(value);
|
|
2845
2862
|
else {
|
|
2846
2863
|
if (values[flag] !== void 0) {
|
|
2847
|
-
throw new (0,
|
|
2864
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2848
2865
|
`${flag} may only be supplied once.`
|
|
2849
2866
|
);
|
|
2850
2867
|
}
|
|
@@ -2858,12 +2875,12 @@ function parseQuery(args, resource) {
|
|
|
2858
2875
|
}
|
|
2859
2876
|
if (arg.startsWith("-")) {
|
|
2860
2877
|
const correction = flag === "--log-level" ? "Use --level for structured severity filtering." : flag === "--out" || flag === "--failed" || flag === "--all" ? "Use this flag with a plain runs logs <run-id> text read." : "Use --step, --level, --query, --where, --count, --group-by or --fields; see runs logs --help.";
|
|
2861
|
-
throw new (0,
|
|
2878
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2862
2879
|
`Unsupported query flag ${flag}. ${correction}`
|
|
2863
2880
|
);
|
|
2864
2881
|
}
|
|
2865
2882
|
if (runId !== void 0) {
|
|
2866
|
-
throw new (0,
|
|
2883
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2867
2884
|
`Unexpected argument ${JSON.stringify(arg)}. Supply one run ID.`
|
|
2868
2885
|
);
|
|
2869
2886
|
}
|
|
@@ -2871,7 +2888,7 @@ function parseQuery(args, resource) {
|
|
|
2871
2888
|
}
|
|
2872
2889
|
if (switches.has("--fields")) {
|
|
2873
2890
|
if (runId !== void 0) {
|
|
2874
|
-
throw new (0,
|
|
2891
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2875
2892
|
"--fields does not use a run ID. Omit the positional run ID."
|
|
2876
2893
|
);
|
|
2877
2894
|
}
|
|
@@ -2884,18 +2901,18 @@ function parseQuery(args, resource) {
|
|
|
2884
2901
|
)
|
|
2885
2902
|
];
|
|
2886
2903
|
if (incompatible.length) {
|
|
2887
|
-
throw new (0,
|
|
2904
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2888
2905
|
`--fields cannot be combined with ${incompatible.join(", ")}. Use --fields alone to discover the query contract.`
|
|
2889
2906
|
);
|
|
2890
2907
|
}
|
|
2891
2908
|
}
|
|
2892
2909
|
if (switches.has("--count") && values["--group-by"] !== void 0) {
|
|
2893
|
-
throw new (0,
|
|
2910
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2894
2911
|
"--count cannot be combined with --group-by. Use --group-by for counts per group."
|
|
2895
2912
|
);
|
|
2896
2913
|
}
|
|
2897
2914
|
if (sums.length && switches.has("--count")) {
|
|
2898
|
-
throw new (0,
|
|
2915
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2899
2916
|
"--sum cannot be combined with --count. Use --sum for the exact count and numeric total."
|
|
2900
2917
|
);
|
|
2901
2918
|
}
|
|
@@ -2903,7 +2920,7 @@ function parseQuery(args, resource) {
|
|
|
2903
2920
|
if (operation === "count") {
|
|
2904
2921
|
for (const flag of ["--limit", "--cursor", "--payloads"]) {
|
|
2905
2922
|
if (values[flag] !== void 0 || switches.has(flag)) {
|
|
2906
|
-
throw new (0,
|
|
2923
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2907
2924
|
`--count cannot be combined with ${flag}. Remove ${flag} to count all matching retained records.`
|
|
2908
2925
|
);
|
|
2909
2926
|
}
|
|
@@ -2938,16 +2955,16 @@ function parseQuery(args, resource) {
|
|
|
2938
2955
|
];
|
|
2939
2956
|
}
|
|
2940
2957
|
}
|
|
2941
|
-
const request =
|
|
2958
|
+
const request = _chunkULI6UVV6js.normalizeRunEventOperationRequest.call(void 0, body);
|
|
2942
2959
|
const namespace = _nullishCoalesce(values["--runtime-namespace"], () => ( (process.env.DEEPLINE_RUNTIME_ENVIRONMENT === "preview" ? process.env.DEEPLINE_RUNTIME_NAMESPACE : void 0)));
|
|
2943
2960
|
const backend = values["--runtime-backend"];
|
|
2944
2961
|
if (backend && backend !== "daytona" && backend !== "modal") {
|
|
2945
|
-
throw new (0,
|
|
2962
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2946
2963
|
"--runtime-backend must be daytona or modal."
|
|
2947
2964
|
);
|
|
2948
2965
|
}
|
|
2949
2966
|
if (backend && !namespace) {
|
|
2950
|
-
throw new (0,
|
|
2967
|
+
throw new (0, _chunkULI6UVV6js.RunEventQueryInputError)(
|
|
2951
2968
|
"--runtime-backend requires --runtime-namespace."
|
|
2952
2969
|
);
|
|
2953
2970
|
}
|
|
@@ -2995,12 +3012,12 @@ async function handleRunEventQuery(args, resource = "logs") {
|
|
|
2995
3012
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
2996
3013
|
const record3 = failure;
|
|
2997
3014
|
const status = record3.statusCode;
|
|
2998
|
-
const exitCode = error instanceof
|
|
3015
|
+
const exitCode = error instanceof _chunkULI6UVV6js.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;
|
|
2999
3016
|
const diagnostic = Object.assign(failure, {
|
|
3000
3017
|
exitCode,
|
|
3001
3018
|
retryable: exitCode === 5
|
|
3002
3019
|
});
|
|
3003
|
-
if (
|
|
3020
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) _chunk6LLJWMYHjs.printJsonError.call(void 0, diagnostic);
|
|
3004
3021
|
else console.error(`Error: ${diagnostic.message}`);
|
|
3005
3022
|
return exitCode;
|
|
3006
3023
|
}
|
|
@@ -3015,7 +3032,7 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3015
3032
|
...criteria
|
|
3016
3033
|
} = request;
|
|
3017
3034
|
const options = { ...criteria, ...runtime ? { runtime } : {} };
|
|
3018
|
-
const client = new (0,
|
|
3035
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
3019
3036
|
let result;
|
|
3020
3037
|
if (request.operation === "fields") {
|
|
3021
3038
|
result = await client.runs[resource].fields(runtime ? { runtime } : {});
|
|
@@ -3080,13 +3097,13 @@ async function executeRunEventQuery(args, resource) {
|
|
|
3080
3097
|
lines.push(`Next page: ${nextPage}`);
|
|
3081
3098
|
}
|
|
3082
3099
|
}
|
|
3083
|
-
|
|
3100
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
3084
3101
|
{
|
|
3085
3102
|
...result,
|
|
3086
3103
|
...nextPage ? { next: { page: nextPage } } : {},
|
|
3087
3104
|
render: { sections: [{ title: `run ${resource}`, lines }] }
|
|
3088
3105
|
},
|
|
3089
|
-
{ json:
|
|
3106
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args), text: `${lines.join("\n")}
|
|
3090
3107
|
` }
|
|
3091
3108
|
);
|
|
3092
3109
|
return 0;
|
|
@@ -3904,7 +3921,7 @@ function checkedRunExample(plays, target) {
|
|
|
3904
3921
|
const quote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
3905
3922
|
const base = `deepline plays run --file ${quote(target)}`;
|
|
3906
3923
|
return {
|
|
3907
|
-
command: `${base}${
|
|
3924
|
+
command: `${base}${_chunkULI6UVV6js.playInputExampleArgs.call(void 0, schema)} --json`,
|
|
3908
3925
|
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."
|
|
3909
3926
|
};
|
|
3910
3927
|
}
|
|
@@ -4295,7 +4312,7 @@ Example: deepline plays bootstrap people-email --from csv:data/leads.csv --using
|
|
|
4295
4312
|
`Unknown plays bootstrap template: ${rawTemplate}
|
|
4296
4313
|
Supported templates: ${_chunkSDK3ZA2Cjs.formatPlayBootstrapTemplates.call(void 0, )}|${MONITOR_BOOTSTRAP_TEMPLATE}` + (looksLikePlayReference ? `
|
|
4297
4314
|
|
|
4298
|
-
"${rawTemplate}" looks like an existing play reference or file, not a bootstrap template. Do not run plays bootstrap on prebuilt/<play-name>. Use "deepline plays run ${rawTemplate} --input '{...}'" to run it directly, "deepline
|
|
4315
|
+
"${rawTemplate}" looks like an existing play reference or file, not a bootstrap template. Do not run plays bootstrap on prebuilt/<play-name>. Use "deepline plays run ${rawTemplate} --input '{...}'" to run it directly, "deepline describe ${rawTemplate}" to inspect its contract, or "deepline plays get ${rawTemplate} --source --out scratchpad.play.ts" to clone/edit it.` : "")
|
|
4299
4316
|
);
|
|
4300
4317
|
}
|
|
4301
4318
|
return rawTemplate;
|
|
@@ -4798,7 +4815,7 @@ function generateSourceProviderInputObject(input) {
|
|
|
4798
4815
|
);
|
|
4799
4816
|
const lines = [
|
|
4800
4817
|
`${indent}// TODO: fill ${entity} source inputs for ${label}.`,
|
|
4801
|
-
`${indent}// Inspect: deepline
|
|
4818
|
+
`${indent}// Inspect: deepline describe ${label}`
|
|
4802
4819
|
];
|
|
4803
4820
|
for (const field of required) {
|
|
4804
4821
|
lines.push(`${indent}// ${field}: ${exampleValueComment(field)},`);
|
|
@@ -4891,7 +4908,7 @@ function safeIdentifier(value) {
|
|
|
4891
4908
|
return value.replace(/[^A-Za-z0-9_]+/g, "_");
|
|
4892
4909
|
}
|
|
4893
4910
|
function playInspectionComments(playRef, indent) {
|
|
4894
|
-
return [`${indent}// Inspect: deepline
|
|
4911
|
+
return [`${indent}// Inspect: deepline describe ${playRef}`];
|
|
4895
4912
|
}
|
|
4896
4913
|
function accessorExpression(base, field) {
|
|
4897
4914
|
return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(field) ? `${base}.${field}` : `${base}[${jsString(field)}]`;
|
|
@@ -5005,7 +5022,7 @@ function validateBootstrapRoutes(input) {
|
|
|
5005
5022
|
}
|
|
5006
5023
|
if (getterNamesFromTool(tool, "list").length === 0) {
|
|
5007
5024
|
throw new PlayBootstrapValidationError(
|
|
5008
|
-
`Cannot use ${tool.toolId} as a ${config.sourceEntity} source: it exposes no extracted list getters. Run: deepline
|
|
5025
|
+
`Cannot use ${tool.toolId} as a ${config.sourceEntity} source: it exposes no extracted list getters. Run: deepline describe ${tool.toolId}`
|
|
5009
5026
|
);
|
|
5010
5027
|
}
|
|
5011
5028
|
}
|
|
@@ -5034,7 +5051,7 @@ function validateBootstrapRoutes(input) {
|
|
|
5034
5051
|
}
|
|
5035
5052
|
if (getterNamesFromTool(tool, "value").length === 0) {
|
|
5036
5053
|
throw new PlayBootstrapValidationError(
|
|
5037
|
-
`Cannot use ${tool.toolId} as a ${finder}: it exposes no extracted value getters. Run: deepline
|
|
5054
|
+
`Cannot use ${tool.toolId} as a ${finder}: it exposes no extracted value getters. Run: deepline describe ${tool.toolId}`
|
|
5038
5055
|
);
|
|
5039
5056
|
}
|
|
5040
5057
|
}
|
|
@@ -5522,7 +5539,7 @@ async function runPlayBootstrap(args) {
|
|
|
5522
5539
|
return runMonitorBootstrap(args);
|
|
5523
5540
|
}
|
|
5524
5541
|
const options = parsePlayBootstrapOptions(args);
|
|
5525
|
-
const client = new (0,
|
|
5542
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
5526
5543
|
const contracts = await loadBootstrapContracts(client, options);
|
|
5527
5544
|
const csvContext = loadCsvContext(options.from);
|
|
5528
5545
|
const source = generateBootstrapPlaySource({
|
|
@@ -5677,7 +5694,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5677
5694
|
...text.split(/\r?\n/).map((key) => key.trim()).filter(Boolean)
|
|
5678
5695
|
);
|
|
5679
5696
|
}
|
|
5680
|
-
const response = await new (0,
|
|
5697
|
+
const response = await new (0, _chunkULI6UVV6js.DeeplineClient)().runs.getReceipts(runId, {
|
|
5681
5698
|
keys
|
|
5682
5699
|
});
|
|
5683
5700
|
const failed = response.receipts.filter(
|
|
@@ -5689,7 +5706,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5689
5706
|
JSON.stringify(response, null, 2) + "\n",
|
|
5690
5707
|
{ flag: "wx", mode: 384 }
|
|
5691
5708
|
);
|
|
5692
|
-
|
|
5709
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
5693
5710
|
{
|
|
5694
5711
|
runId,
|
|
5695
5712
|
out: options.out,
|
|
@@ -5699,7 +5716,7 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
5699
5716
|
{ json: true }
|
|
5700
5717
|
);
|
|
5701
5718
|
} else {
|
|
5702
|
-
|
|
5719
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, { ...response }, { json: true });
|
|
5703
5720
|
}
|
|
5704
5721
|
if (failed)
|
|
5705
5722
|
process.exitCode = response.receipts.some(
|
|
@@ -5738,7 +5755,7 @@ includes nextCommand when another page is available.
|
|
|
5738
5755
|
{ exitCode: 2 }
|
|
5739
5756
|
);
|
|
5740
5757
|
}
|
|
5741
|
-
const page = await new (0,
|
|
5758
|
+
const page = await new (0, _chunkULI6UVV6js.DeeplineClient)().runs.children(parentRunId, {
|
|
5742
5759
|
launchKey: options.launchKey,
|
|
5743
5760
|
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
5744
5761
|
limit
|
|
@@ -5754,7 +5771,7 @@ includes nextCommand when another page is available.
|
|
|
5754
5771
|
String(limit),
|
|
5755
5772
|
"--json"
|
|
5756
5773
|
].join(" ") : null;
|
|
5757
|
-
|
|
5774
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
5758
5775
|
{
|
|
5759
5776
|
parentRunId,
|
|
5760
5777
|
launchKey: options.launchKey,
|
|
@@ -5790,7 +5807,7 @@ async function handleRunsHistory(options) {
|
|
|
5790
5807
|
throw new Error("--limit must be a positive integer.");
|
|
5791
5808
|
}
|
|
5792
5809
|
}
|
|
5793
|
-
const page = await new (0,
|
|
5810
|
+
const page = await new (0, _chunkULI6UVV6js.DeeplineClient)().runs.history({
|
|
5794
5811
|
cursor: options.cursor,
|
|
5795
5812
|
orgId: options.org,
|
|
5796
5813
|
search: options.search,
|
|
@@ -5806,7 +5823,7 @@ async function handleRunsHistory(options) {
|
|
|
5806
5823
|
);
|
|
5807
5824
|
}
|
|
5808
5825
|
if (page.hasMore) lines.push(`Next cursor: ${page.nextCursor}`);
|
|
5809
|
-
|
|
5826
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
5810
5827
|
{ ...page, render: { sections: [{ title: "Run history", lines }] } },
|
|
5811
5828
|
options.json ? { json: true } : {}
|
|
5812
5829
|
);
|
|
@@ -6082,7 +6099,7 @@ function projectRunDatasetCell(value) {
|
|
|
6082
6099
|
const logicalValue = parseSerializedDatasetValue(value);
|
|
6083
6100
|
if (logicalValue === null || logicalValue === void 0) return logicalValue;
|
|
6084
6101
|
if (typeof logicalValue === "object") {
|
|
6085
|
-
return
|
|
6102
|
+
return _chunk6LLJWMYHjs.csvSafeJsonString.call(void 0, canonicalDatasetJson(logicalValue));
|
|
6086
6103
|
}
|
|
6087
6104
|
return logicalValue;
|
|
6088
6105
|
}
|
|
@@ -6956,7 +6973,7 @@ function stringValue2(value) {
|
|
|
6956
6973
|
}
|
|
6957
6974
|
|
|
6958
6975
|
// src/cli/play-check-hints.ts
|
|
6959
|
-
var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline
|
|
6976
|
+
var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline describe <tool>`. Read tool-specific fields from `toolExecutionResult.toolResponse.rawV2` using the nesting shown in the response example, and use `toolExecutionResult.extractedLists.<name>.get()` for declared row/list outputs.";
|
|
6960
6977
|
var DATASET_API_HINT = "Deepline hint: PlayDataset is lazy, durable, and async-only. Use `.count()`, `.first()`, `.at(index)`, `.peek(n)`, `.materialize(limit)`, or async iteration; do not use `.length`, numeric indexing, spread, synchronous iteration, `.rows`, or `.toArray()`.";
|
|
6961
6978
|
var ROW_PROPERTY_HINT = "Deepline hint: this row type only contains fields produced by the CSV/schema and previous map steps. Check source column casing and the exact output field names from earlier steps before scaling.";
|
|
6962
6979
|
var TOOLS_EXECUTE_SIGNATURE_HINT = "Deepline hint: ctx.tools.execute requires a request object: `ctx.tools.execute({ id, tool, input, description })`. The stable `id` is required for logs, metadata, and result-cache identity; terminal cache reuse is based on play, tool, semantic input, auth scope, provider action version, and cache policy.";
|
|
@@ -7997,10 +8014,10 @@ function resolveOwnedPlayReferenceName(reference, ownerSlug) {
|
|
|
7997
8014
|
// ../plays/deploy/run-deployment.ts
|
|
7998
8015
|
var RUN_PLAY_METHOD_NAMES = /* @__PURE__ */ new Set(["runPlay", "runPlayAsync"]);
|
|
7999
8016
|
function isRunPlayReceiver(node) {
|
|
8000
|
-
return
|
|
8017
|
+
return _chunkIALPYID6js.isAstNode.call(void 0, node) && node.type === "Identifier" && typeof node.name === "string" && (node.name === "ctx" || node.name.endsWith("Ctx"));
|
|
8001
8018
|
}
|
|
8002
8019
|
function stringLiteralValue(node) {
|
|
8003
|
-
if (!
|
|
8020
|
+
if (!_chunkIALPYID6js.isAstNode.call(void 0, node)) return null;
|
|
8004
8021
|
if (node.type === "Literal" && typeof node.value === "string") {
|
|
8005
8022
|
return node.value;
|
|
8006
8023
|
}
|
|
@@ -8011,12 +8028,12 @@ function stringLiteralValue(node) {
|
|
|
8011
8028
|
return null;
|
|
8012
8029
|
}
|
|
8013
8030
|
async function extractRunPlayStringTargets(sourceCode) {
|
|
8014
|
-
const program =
|
|
8031
|
+
const program = _chunkIALPYID6js.parsePlaySourceForAnalysis.call(void 0, sourceCode);
|
|
8015
8032
|
if (!program) return await _asyncNullishCoalesce(await extractWithCompiler(sourceCode), async () => ( []));
|
|
8016
8033
|
const targets = /* @__PURE__ */ new Set();
|
|
8017
8034
|
const visit = (node) => {
|
|
8018
8035
|
const callee = node.callee;
|
|
8019
|
-
if (node.type === "CallExpression" &&
|
|
8036
|
+
if (node.type === "CallExpression" && _chunkIALPYID6js.isAstNode.call(void 0, callee) && callee.type === "MemberExpression" && callee.computed !== true && _chunkIALPYID6js.isAstNode.call(void 0, callee.property) && RUN_PLAY_METHOD_NAMES.has(String(callee.property.name)) && isRunPlayReceiver(callee.object) && Array.isArray(node.arguments)) {
|
|
8020
8037
|
const playRef = stringLiteralValue(node.arguments[1]);
|
|
8021
8038
|
const ownedName = playRef === null ? null : resolveOwnedPlayReferenceName(playRef);
|
|
8022
8039
|
if (ownedName) targets.add(ownedName);
|
|
@@ -8024,7 +8041,7 @@ async function extractRunPlayStringTargets(sourceCode) {
|
|
|
8024
8041
|
for (const [key, value] of Object.entries(node)) {
|
|
8025
8042
|
if (key === "loc") continue;
|
|
8026
8043
|
for (const child of Array.isArray(value) ? value : [value]) {
|
|
8027
|
-
if (
|
|
8044
|
+
if (_chunkIALPYID6js.isAstNode.call(void 0, child)) visit(child);
|
|
8028
8045
|
}
|
|
8029
8046
|
}
|
|
8030
8047
|
};
|
|
@@ -8890,7 +8907,7 @@ function renderOutcome(outcome) {
|
|
|
8890
8907
|
function printResult2(input) {
|
|
8891
8908
|
const failed = input.status === "failed" || input.status === "cancelled";
|
|
8892
8909
|
if (failed) process.exitCode = 1;
|
|
8893
|
-
|
|
8910
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
8894
8911
|
{
|
|
8895
8912
|
deployment: { ...input.deployment, status: input.status },
|
|
8896
8913
|
plays: input.outcomes,
|
|
@@ -8915,7 +8932,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8915
8932
|
const root = await _promises.realpath.call(void 0, _path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))).catch(() => {
|
|
8916
8933
|
throw new Error(`No such directory: ${_path.resolve.call(void 0, _nullishCoalesce(directory, () => ( ".")))}`);
|
|
8917
8934
|
});
|
|
8918
|
-
const { http, config } =
|
|
8935
|
+
const { http, config } = _chunk6LLJWMYHjs.getAuthedHttpClient.call(void 0, );
|
|
8919
8936
|
const deliveryId = `local:${_crypto.randomUUID.call(void 0, )}`;
|
|
8920
8937
|
const startDeployment = () => http.post("/api/v2/deployments", {
|
|
8921
8938
|
deliveryId,
|
|
@@ -8942,7 +8959,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
8942
8959
|
},
|
|
8943
8960
|
{
|
|
8944
8961
|
bundle: bundleDeployPlayFile,
|
|
8945
|
-
fetchImpl:
|
|
8962
|
+
fetchImpl: _chunkTID5XLTZjs.fetchWithDeploymentProtection,
|
|
8946
8963
|
// The plays are already here: "opening" the source is naming it.
|
|
8947
8964
|
openSource: async () => ({
|
|
8948
8965
|
open: async () => ({ repoRoot: root })
|
|
@@ -9359,9 +9376,7 @@ function buildPlayReferenceNotFoundMessage(input) {
|
|
|
9359
9376
|
` deepline plays versions --name ${suggestion.reference} --json`
|
|
9360
9377
|
);
|
|
9361
9378
|
} else {
|
|
9362
|
-
lines.push(
|
|
9363
|
-
` deepline plays describe ${suggestion.reference} --json`
|
|
9364
|
-
);
|
|
9379
|
+
lines.push(` deepline describe ${suggestion.reference}`);
|
|
9365
9380
|
}
|
|
9366
9381
|
}
|
|
9367
9382
|
}
|
|
@@ -9569,7 +9584,7 @@ function buildMissingDefinePlayError(filePath) {
|
|
|
9569
9584
|
);
|
|
9570
9585
|
}
|
|
9571
9586
|
function extractPlayName(code, filePath) {
|
|
9572
|
-
const definedPlayName =
|
|
9587
|
+
const definedPlayName = _chunkIALPYID6js.extractDefinedPlayName.call(void 0, code);
|
|
9573
9588
|
if (definedPlayName) {
|
|
9574
9589
|
return definedPlayName;
|
|
9575
9590
|
}
|
|
@@ -9611,7 +9626,7 @@ function parseJsonInput(raw, flag = "--input") {
|
|
|
9611
9626
|
parsed = JSON.parse(source);
|
|
9612
9627
|
} catch (e9) {
|
|
9613
9628
|
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
9614
|
-
`${flag} expects a valid JSON object or @input.json. A bare file path is not JSON.${flag === "--input" ? " Use the field names and run example from plays check <file> or
|
|
9629
|
+
`${flag} expects a valid JSON object or @input.json. A bare file path is not JSON.${flag === "--input" ? " Use the field names and run example from plays check <file> or deepline describe <play>. --csv contacts.csv supplies input.csv only when the Play declares that field." : ""}`,
|
|
9615
9630
|
void 0,
|
|
9616
9631
|
"INVALID_JSON"
|
|
9617
9632
|
);
|
|
@@ -9844,11 +9859,11 @@ function formatUnresolvedPackagedFiles(filePath, unresolvedFileReferences) {
|
|
|
9844
9859
|
const details = unresolvedFileReferences.map((unresolved) => `${unresolved.sourceFragment}: ${unresolved.message}`).join("; ");
|
|
9845
9860
|
return `Failed to package local ctx.csv(...) files in ${filePath}: ${details}`;
|
|
9846
9861
|
}
|
|
9847
|
-
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName =
|
|
9862
|
+
async function collectBundledPlayGraph(entryFile, profile = null, entryExportName = _chunkIALPYID6js.PLAY_DEFAULT_EXPORT) {
|
|
9848
9863
|
const playBundler = await loadPlayBundler();
|
|
9849
9864
|
const nodes = /* @__PURE__ */ new Map();
|
|
9850
9865
|
const visiting = /* @__PURE__ */ new Set();
|
|
9851
|
-
const artifactKind =
|
|
9866
|
+
const artifactKind = _chunkIALPYID6js.resolveEnabledExecutionProfile.call(void 0, profile).artifactKind;
|
|
9852
9867
|
const rootPath = normalizePlayPath(entryFile);
|
|
9853
9868
|
const visit = async (filePath) => {
|
|
9854
9869
|
const absolutePath = normalizePlayPath(filePath);
|
|
@@ -9865,7 +9880,7 @@ async function collectBundledPlayGraph(entryFile, profile = null, entryExportNam
|
|
|
9865
9880
|
try {
|
|
9866
9881
|
const bundleResult = await playBundler.bundlePlayFile(absolutePath, {
|
|
9867
9882
|
target: artifactKind,
|
|
9868
|
-
...absolutePath === rootPath && entryExportName !==
|
|
9883
|
+
...absolutePath === rootPath && entryExportName !== _chunkIALPYID6js.PLAY_DEFAULT_EXPORT ? { exportName: entryExportName } : {}
|
|
9869
9884
|
});
|
|
9870
9885
|
if (bundleResult.success === false) {
|
|
9871
9886
|
throw new Error(
|
|
@@ -10044,7 +10059,7 @@ function playStatusErrorText(status) {
|
|
|
10044
10059
|
function isRetryablePendingStartFailure(status) {
|
|
10045
10060
|
if (status.status !== "failed") return false;
|
|
10046
10061
|
if (status.runId && status.runId !== "pending") return false;
|
|
10047
|
-
return
|
|
10062
|
+
return _chunkULI6UVV6js.isTransientPlayRunReadError.call(void 0, new Error(playStatusErrorText(status)));
|
|
10048
10063
|
}
|
|
10049
10064
|
function pendingStartFailureStatus(input) {
|
|
10050
10065
|
const message = input.error instanceof Error ? input.error.message : String(input.error);
|
|
@@ -10071,13 +10086,13 @@ var PLAY_PROGRESS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
|
10071
10086
|
var PLAY_STATUS_HEARTBEAT_INTERVAL_MS = 15e3;
|
|
10072
10087
|
function watchSurfaceReaches(state, provenance, level) {
|
|
10073
10088
|
const minimumLevel = _nullishCoalesce(state.logLevel, () => ( (state.verbose ? "debug" : "info")));
|
|
10074
|
-
if (!
|
|
10089
|
+
if (!_chunkULI6UVV6js.logLevelReaches.call(void 0, level, minimumLevel)) {
|
|
10075
10090
|
return false;
|
|
10076
10091
|
}
|
|
10077
|
-
if (
|
|
10092
|
+
if (_chunkULI6UVV6js.logProvenanceReaches.call(void 0, provenance, "watch")) {
|
|
10078
10093
|
return true;
|
|
10079
10094
|
}
|
|
10080
|
-
return state.verbose === true &&
|
|
10095
|
+
return state.verbose === true && _chunkULI6UVV6js.logProvenanceReaches.call(void 0, provenance, "debug");
|
|
10081
10096
|
}
|
|
10082
10097
|
function getEventPayload(event) {
|
|
10083
10098
|
return event.payload && typeof event.payload === "object" ? event.payload : {};
|
|
@@ -10579,7 +10594,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
10579
10594
|
}
|
|
10580
10595
|
function openPlayDashboard(dashboardUrl, open2) {
|
|
10581
10596
|
if (open2 && dashboardUrl) {
|
|
10582
|
-
|
|
10597
|
+
_chunk6LLJWMYHjs.openInBrowser.call(void 0, dashboardUrl);
|
|
10583
10598
|
}
|
|
10584
10599
|
}
|
|
10585
10600
|
function printPlayLogLines(input) {
|
|
@@ -10641,7 +10656,7 @@ async function waitForPlayCompletionByWatch(input) {
|
|
|
10641
10656
|
billing: false
|
|
10642
10657
|
});
|
|
10643
10658
|
} catch (error) {
|
|
10644
|
-
if (
|
|
10659
|
+
if (_chunkULI6UVV6js.isTransientPlayRunReadError.call(void 0, error) || isAdmittedRunVisibilityDelay(error)) {
|
|
10645
10660
|
return null;
|
|
10646
10661
|
}
|
|
10647
10662
|
throw error;
|
|
@@ -10830,7 +10845,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
10830
10845
|
billing: false
|
|
10831
10846
|
});
|
|
10832
10847
|
} catch (error) {
|
|
10833
|
-
if (
|
|
10848
|
+
if (_chunkULI6UVV6js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
10834
10849
|
return null;
|
|
10835
10850
|
}
|
|
10836
10851
|
throw error;
|
|
@@ -11038,7 +11053,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11038
11053
|
lastPhase
|
|
11039
11054
|
});
|
|
11040
11055
|
}
|
|
11041
|
-
if (lastKnownWorkflowId &&
|
|
11056
|
+
if (lastKnownWorkflowId && _chunkULI6UVV6js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11042
11057
|
if (timeout) {
|
|
11043
11058
|
clearTimeout(timeout);
|
|
11044
11059
|
}
|
|
@@ -11074,7 +11089,7 @@ async function startAndWaitForPlayCompletionByStreamOnce(input) {
|
|
|
11074
11089
|
onRunAdmitted: confirmAdmission
|
|
11075
11090
|
});
|
|
11076
11091
|
}
|
|
11077
|
-
if (!lastKnownWorkflowId &&
|
|
11092
|
+
if (!lastKnownWorkflowId && _chunkULI6UVV6js.isTransientPlayRunReadError.call(void 0, error)) {
|
|
11078
11093
|
_chunkAYHLUHE5js.recordCliTrace.call(void 0, {
|
|
11079
11094
|
phase: "cli.play_start_stream_transient_failure",
|
|
11080
11095
|
ms: Date.now() - startedAt,
|
|
@@ -11173,7 +11188,7 @@ var BULKY_RETURN_KEYS = /* @__PURE__ */ new Set([
|
|
|
11173
11188
|
"logs"
|
|
11174
11189
|
]);
|
|
11175
11190
|
function formatPlayLogLine(rawLine, state) {
|
|
11176
|
-
const classified =
|
|
11191
|
+
const classified = _chunkULI6UVV6js.classifyLogLine.call(void 0, rawLine);
|
|
11177
11192
|
const line = classified.line;
|
|
11178
11193
|
const timestampMatch = line.match(/^\[([^\]]+)\]\s*(.*)$/);
|
|
11179
11194
|
const parsedTimestamp = _optionalChain([timestampMatch, 'optionalAccess', _344 => _344[1]]) ? new Date(timestampMatch[1]) : null;
|
|
@@ -11188,14 +11203,14 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11188
11203
|
if (!state.verbose && isProviderRowWaitLogLine(line)) return null;
|
|
11189
11204
|
const providerWait = formatProviderCapacityWaitLogLine(line);
|
|
11190
11205
|
if (providerWait && !state.verbose) {
|
|
11191
|
-
return
|
|
11206
|
+
return _chunkULI6UVV6js.logLevelReaches.call(void 0, "warn", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${providerWait}` : null;
|
|
11192
11207
|
}
|
|
11193
11208
|
const mapProgress = formatMapProgressDiagnosticLogLine(line);
|
|
11194
11209
|
if (mapProgress && !state.verbose) {
|
|
11195
|
-
return
|
|
11210
|
+
return _chunkULI6UVV6js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info"))) ? `${prefix}${mapProgress}` : null;
|
|
11196
11211
|
}
|
|
11197
11212
|
if (/\[worker\] picked up run\b/.test(message)) {
|
|
11198
|
-
if (!
|
|
11213
|
+
if (!_chunkULI6UVV6js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11199
11214
|
return null;
|
|
11200
11215
|
}
|
|
11201
11216
|
if (state.emittedRunnerStarted) {
|
|
@@ -11208,7 +11223,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11208
11223
|
/^Starting map over (\d+) items with (\d+) fields \(key: ([^;]+); (\d+) already satisfied; (\d+) pending\)$/
|
|
11209
11224
|
);
|
|
11210
11225
|
if (mapStart) {
|
|
11211
|
-
if (!
|
|
11226
|
+
if (!_chunkULI6UVV6js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11212
11227
|
return null;
|
|
11213
11228
|
}
|
|
11214
11229
|
const [, rows, fields2, namespace, cached, pending] = mapStart;
|
|
@@ -11218,7 +11233,7 @@ function formatPlayLogLine(rawLine, state) {
|
|
|
11218
11233
|
/^Map completed: (\d+) results \((\d+) executed, (\d+) already satisfied\)$/
|
|
11219
11234
|
);
|
|
11220
11235
|
if (mapDone) {
|
|
11221
|
-
if (!
|
|
11236
|
+
if (!_chunkULI6UVV6js.logLevelReaches.call(void 0, "info", _nullishCoalesce(state.logLevel, () => ( "info")))) {
|
|
11222
11237
|
return null;
|
|
11223
11238
|
}
|
|
11224
11239
|
const [, results, executed, cached] = mapDone;
|
|
@@ -12507,7 +12522,7 @@ function formatRecentRunLogLines(value) {
|
|
|
12507
12522
|
(line) => typeof line === "string"
|
|
12508
12523
|
);
|
|
12509
12524
|
if (tail.length === 0) return [];
|
|
12510
|
-
const shown = tail.map((line) =>
|
|
12525
|
+
const shown = tail.map((line) => _chunkULI6UVV6js.classifyLogLine.call(void 0, line)).filter(
|
|
12511
12526
|
(entry) => entry.level !== "debug" && !isProviderRowWaitLogLine(entry.line)
|
|
12512
12527
|
).slice(-8);
|
|
12513
12528
|
const total = readNonNegativeInteger(logs.totalCount);
|
|
@@ -12787,7 +12802,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12787
12802
|
const hits = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _425 => _425.hits]), () => ( null));
|
|
12788
12803
|
if (jsonOutput) {
|
|
12789
12804
|
const payload2 = _optionalChain([options, 'optionalAccess', _426 => _426.fullJson]) ? status.package ? buildRunOverview(status, status) : { ...buildRunLaunch(status), diagnostics: status } : buildRunLaunch(status);
|
|
12790
|
-
|
|
12805
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
12791
12806
|
hits ? { ...payload2, hits } : payload2,
|
|
12792
12807
|
{ json: true, fields: _optionalChain([options, 'optionalAccess', _427 => _427.jsonFields]) }
|
|
12793
12808
|
);
|
|
@@ -12803,7 +12818,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12803
12818
|
...buildPlayCompletionTextLines(status),
|
|
12804
12819
|
...formatRunHitsLines(hits)
|
|
12805
12820
|
];
|
|
12806
|
-
|
|
12821
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, displayPackage, {
|
|
12807
12822
|
json: false,
|
|
12808
12823
|
text: `${lines2.join("\n")}
|
|
12809
12824
|
`
|
|
@@ -12854,7 +12869,7 @@ function writePlayResult(status, jsonOutput, options) {
|
|
|
12854
12869
|
lines.push(...buildBillingRollupTextLines(status));
|
|
12855
12870
|
const compact = compactPlayStatus(status);
|
|
12856
12871
|
const payload = _optionalChain([options, 'optionalAccess', _429 => _429.fullJson]) ? status : compact;
|
|
12857
|
-
|
|
12872
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
12858
12873
|
{
|
|
12859
12874
|
...payload,
|
|
12860
12875
|
render: {
|
|
@@ -13614,7 +13629,7 @@ function writeStartedPlayRun(input) {
|
|
|
13614
13629
|
dashboardUrl: input.dashboardUrl,
|
|
13615
13630
|
package: input.package
|
|
13616
13631
|
};
|
|
13617
|
-
|
|
13632
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, buildRunLaunch(status), {
|
|
13618
13633
|
json: true,
|
|
13619
13634
|
fields: input.jsonFields
|
|
13620
13635
|
});
|
|
@@ -13636,7 +13651,7 @@ function writeStartedPlayRun(input) {
|
|
|
13636
13651
|
input.progress.writeLine(output2, process.stdout);
|
|
13637
13652
|
return;
|
|
13638
13653
|
}
|
|
13639
|
-
|
|
13654
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, input.package, {
|
|
13640
13655
|
json: false,
|
|
13641
13656
|
text: `${output2}
|
|
13642
13657
|
`
|
|
@@ -13665,7 +13680,7 @@ function writeStartedPlayRun(input) {
|
|
|
13665
13680
|
) ? [`Stop: deepline runs stop ${shellSingleQuote(input.runId)} --json`] : []
|
|
13666
13681
|
];
|
|
13667
13682
|
if (input.jsonOutput) {
|
|
13668
|
-
|
|
13683
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, payload, { json: true, fields: input.jsonFields });
|
|
13669
13684
|
return;
|
|
13670
13685
|
}
|
|
13671
13686
|
if (input.dashboardUrl) {
|
|
@@ -13676,7 +13691,7 @@ function writeStartedPlayRun(input) {
|
|
|
13676
13691
|
input.progress.writeLine(output, process.stdout);
|
|
13677
13692
|
return;
|
|
13678
13693
|
}
|
|
13679
|
-
|
|
13694
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
13680
13695
|
{
|
|
13681
13696
|
...payload,
|
|
13682
13697
|
render: { sections: [{ title: "play run", lines }] }
|
|
@@ -13686,7 +13701,7 @@ function writeStartedPlayRun(input) {
|
|
|
13686
13701
|
);
|
|
13687
13702
|
}
|
|
13688
13703
|
function parsePlayRunOptions(args) {
|
|
13689
|
-
const selection =
|
|
13704
|
+
const selection = _chunk6LLJWMYHjs.parseJsonFields.call(void 0, args, "run");
|
|
13690
13705
|
args = selection.args;
|
|
13691
13706
|
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.";
|
|
13692
13707
|
let filePath = null;
|
|
@@ -13695,7 +13710,7 @@ function parsePlayRunOptions(args) {
|
|
|
13695
13710
|
let revisionId = null;
|
|
13696
13711
|
let revisionSelector = null;
|
|
13697
13712
|
const watch = !args.includes("--no-wait");
|
|
13698
|
-
let jsonOutput = watch ? args.includes("--json") :
|
|
13713
|
+
let jsonOutput = watch ? args.includes("--json") : _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
13699
13714
|
const fullJson = args.includes("--full");
|
|
13700
13715
|
const force = args.includes("--force");
|
|
13701
13716
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -13742,7 +13757,7 @@ function parsePlayRunOptions(args) {
|
|
|
13742
13757
|
"--log-level requires one of: debug, info, warn, error."
|
|
13743
13758
|
);
|
|
13744
13759
|
}
|
|
13745
|
-
const parsed =
|
|
13760
|
+
const parsed = _chunkULI6UVV6js.parseLogLevel.call(void 0, value);
|
|
13746
13761
|
if (!parsed) {
|
|
13747
13762
|
throw new Error(
|
|
13748
13763
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -13779,7 +13794,7 @@ function parsePlayRunOptions(args) {
|
|
|
13779
13794
|
throw new Error("--profile requires an execution profile id.");
|
|
13780
13795
|
}
|
|
13781
13796
|
profile = value.trim();
|
|
13782
|
-
|
|
13797
|
+
_chunkIALPYID6js.resolveEnabledExecutionProfile.call(void 0, profile);
|
|
13783
13798
|
index += 1;
|
|
13784
13799
|
continue;
|
|
13785
13800
|
}
|
|
@@ -13969,7 +13984,7 @@ function parsePlayRunOptions(args) {
|
|
|
13969
13984
|
};
|
|
13970
13985
|
}
|
|
13971
13986
|
function parsePlayCheckOptions(args) {
|
|
13972
|
-
const selection =
|
|
13987
|
+
const selection = _chunk6LLJWMYHjs.parseJsonFields.call(void 0, args, "check");
|
|
13973
13988
|
args = selection.args;
|
|
13974
13989
|
const target = args[0];
|
|
13975
13990
|
if (!target || target.startsWith("-")) {
|
|
@@ -13981,7 +13996,7 @@ function parsePlayCheckOptions(args) {
|
|
|
13981
13996
|
if (arg !== "--json" && arg !== "--full")
|
|
13982
13997
|
throw new Error(`Unknown plays check option: ${arg}`);
|
|
13983
13998
|
}
|
|
13984
|
-
const jsonOutput =
|
|
13999
|
+
const jsonOutput = _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
13985
14000
|
return {
|
|
13986
14001
|
target,
|
|
13987
14002
|
jsonOutput,
|
|
@@ -14057,7 +14072,7 @@ ${PLAY_PUBLISH_USAGE}`
|
|
|
14057
14072
|
useLatest,
|
|
14058
14073
|
expectedArtifactHash,
|
|
14059
14074
|
dryRun,
|
|
14060
|
-
jsonOutput:
|
|
14075
|
+
jsonOutput: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args)
|
|
14061
14076
|
};
|
|
14062
14077
|
}
|
|
14063
14078
|
var PLAY_SAVE_USAGE = "Usage: deepline plays save <play-file.ts> [--expected-artifact <hash>] [--dry-run] [--json]";
|
|
@@ -14098,7 +14113,7 @@ ${PLAY_SAVE_USAGE}`);
|
|
|
14098
14113
|
target,
|
|
14099
14114
|
expectedArtifactHash,
|
|
14100
14115
|
dryRun,
|
|
14101
|
-
jsonOutput:
|
|
14116
|
+
jsonOutput: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args)
|
|
14102
14117
|
};
|
|
14103
14118
|
}
|
|
14104
14119
|
function printScheduledPlayCapacity(capacity) {
|
|
@@ -14309,7 +14324,7 @@ function printBundledRuntimeWarning(bundle) {
|
|
|
14309
14324
|
async function handlePlayCheck(args) {
|
|
14310
14325
|
const options = parsePlayCheckOptions(args);
|
|
14311
14326
|
if (!isFileTarget(options.target)) {
|
|
14312
|
-
const client = new (0,
|
|
14327
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
14313
14328
|
try {
|
|
14314
14329
|
await assertCanonicalNamedPlayReference(client, options.target, {
|
|
14315
14330
|
command: "check"
|
|
@@ -14338,7 +14353,7 @@ async function handlePlayCheck(args) {
|
|
|
14338
14353
|
},
|
|
14339
14354
|
...options.full ? { diagnostics: { staticPipeline: _nullishCoalesce(play.staticPipeline, () => ( null)) } } : {}
|
|
14340
14355
|
};
|
|
14341
|
-
|
|
14356
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, result, {
|
|
14342
14357
|
json: options.jsonOutput,
|
|
14343
14358
|
fields: options.jsonFields,
|
|
14344
14359
|
text: renderPlayCheckOutput(result) + "\n"
|
|
@@ -14348,7 +14363,7 @@ async function handlePlayCheck(args) {
|
|
|
14348
14363
|
const resolved = _path.resolve.call(void 0, options.target);
|
|
14349
14364
|
const message = error instanceof Error && error.message ? error.message : `File not found: ${resolved}`;
|
|
14350
14365
|
if (options.jsonOutput) {
|
|
14351
|
-
|
|
14366
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
14352
14367
|
{
|
|
14353
14368
|
kind: "play_check",
|
|
14354
14369
|
checked: "named_contract",
|
|
@@ -14381,7 +14396,7 @@ async function handlePlayCheck(args) {
|
|
|
14381
14396
|
);
|
|
14382
14397
|
}
|
|
14383
14398
|
const primary = outcomes.find(
|
|
14384
|
-
(outcome) => outcome.exportName ===
|
|
14399
|
+
(outcome) => outcome.exportName === _chunkIALPYID6js.PLAY_DEFAULT_EXPORT
|
|
14385
14400
|
);
|
|
14386
14401
|
const output = buildPlayCheckOutput({
|
|
14387
14402
|
outcomes,
|
|
@@ -14390,7 +14405,7 @@ async function handlePlayCheck(args) {
|
|
|
14390
14405
|
detailsCommand: `deepline plays check ${shellQuote3(options.target)} --full --json`,
|
|
14391
14406
|
publishCommand: _optionalChain([primary, 'optionalAccess', _475 => _475.result, 'access', _476 => _476.artifactHash]) ? `deepline plays publish ${shellQuote3(options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
14392
14407
|
});
|
|
14393
|
-
|
|
14408
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, output, {
|
|
14394
14409
|
json: options.jsonOutput,
|
|
14395
14410
|
fields: options.jsonFields,
|
|
14396
14411
|
text: renderPlayCheckOutput(output) + "\n"
|
|
@@ -14398,8 +14413,8 @@ async function handlePlayCheck(args) {
|
|
|
14398
14413
|
return output.valid ? 0 : 1;
|
|
14399
14414
|
}
|
|
14400
14415
|
function resolvePlayCheckExportNames(sourceCode) {
|
|
14401
|
-
const exports =
|
|
14402
|
-
if (!exports || exports.length === 0) return [
|
|
14416
|
+
const exports = _chunkIALPYID6js.listPlayFileExports.call(void 0, sourceCode);
|
|
14417
|
+
if (!exports || exports.length === 0) return [_chunkIALPYID6js.PLAY_DEFAULT_EXPORT];
|
|
14403
14418
|
return exports.map((entry) => entry.name);
|
|
14404
14419
|
}
|
|
14405
14420
|
function artifactForProductionCompatibilityCheck(artifact) {
|
|
@@ -14452,7 +14467,7 @@ async function checkOneExportedPlay(input) {
|
|
|
14452
14467
|
result: { valid: false, errors: descriptionErrors }
|
|
14453
14468
|
};
|
|
14454
14469
|
}
|
|
14455
|
-
const client = new (0,
|
|
14470
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
14456
14471
|
const integrationMode = resolveEvalIntegrationMode();
|
|
14457
14472
|
const importedPlays = [...graph.nodes.values()].filter((node) => node.filePath !== graph.root.filePath).map((node) => ({
|
|
14458
14473
|
playName: node.playName,
|
|
@@ -14465,7 +14480,7 @@ async function checkOneExportedPlay(input) {
|
|
|
14465
14480
|
sourceFiles: graph.root.sourceFiles,
|
|
14466
14481
|
description: _nullishCoalesce(graph.root.playDescription, () => ( void 0)),
|
|
14467
14482
|
artifact: artifactForProductionCompatibilityCheck(graph.root.artifact),
|
|
14468
|
-
...exportName ===
|
|
14483
|
+
...exportName === _chunkIALPYID6js.PLAY_DEFAULT_EXPORT ? {} : { exportName },
|
|
14469
14484
|
...importedPlays.length > 0 ? { importedPlays } : {},
|
|
14470
14485
|
...integrationMode ? { integrationMode } : {}
|
|
14471
14486
|
});
|
|
@@ -14489,7 +14504,7 @@ async function handleFileBackedRun(options, hooks) {
|
|
|
14489
14504
|
if (options.target.kind !== "file") {
|
|
14490
14505
|
throw new Error("Expected a file-backed play run target.");
|
|
14491
14506
|
}
|
|
14492
|
-
const client = new (0,
|
|
14507
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)(playRunClientOptions(options));
|
|
14493
14508
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14494
14509
|
const absolutePlayPath = _path.resolve.call(void 0, options.target.path);
|
|
14495
14510
|
progress.phase("compiling play");
|
|
@@ -14703,7 +14718,7 @@ async function handleNamedRun(options, hooks) {
|
|
|
14703
14718
|
if (options.target.kind !== "name") {
|
|
14704
14719
|
throw new Error("Expected a named play run target.");
|
|
14705
14720
|
}
|
|
14706
|
-
const client = new (0,
|
|
14721
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)(playRunClientOptions(options));
|
|
14707
14722
|
const progress = _nullishCoalesce(_chunkWJYPBHTEjs.getActiveCliProgress.call(void 0, ), () => ( _chunkWJYPBHTEjs.createCliProgress.call(void 0, !options.jsonOutput)));
|
|
14708
14723
|
const playName = options.target.name;
|
|
14709
14724
|
const runtimeInput = options.input ? { ...options.input } : {};
|
|
@@ -15100,10 +15115,10 @@ function renderRunOverviewText(overview, extras = {}) {
|
|
|
15100
15115
|
);
|
|
15101
15116
|
return `${lines.join("\n")}
|
|
15102
15117
|
|
|
15103
|
-
${
|
|
15118
|
+
${_chunk6LLJWMYHjs.renderCommandEnvelopeText.call(void 0, { render: { sections, actions: actions2 } })}`;
|
|
15104
15119
|
}
|
|
15105
15120
|
async function handleRunGet(args) {
|
|
15106
|
-
const selection =
|
|
15121
|
+
const selection = _chunk6LLJWMYHjs.parseJsonFields.call(void 0,
|
|
15107
15122
|
args,
|
|
15108
15123
|
args.includes("--config") ? "config" : "get"
|
|
15109
15124
|
);
|
|
@@ -15116,7 +15131,7 @@ async function handleRunGet(args) {
|
|
|
15116
15131
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15117
15132
|
return 1;
|
|
15118
15133
|
}
|
|
15119
|
-
const client = new (0,
|
|
15134
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
15120
15135
|
if (args.includes("--config")) {
|
|
15121
15136
|
if (args.some((arg) => ["--input", "--full", "--log-failed"].includes(arg))) {
|
|
15122
15137
|
console.error(
|
|
@@ -15130,7 +15145,7 @@ async function handleRunGet(args) {
|
|
|
15130
15145
|
"This server does not support recorded configuration reads."
|
|
15131
15146
|
);
|
|
15132
15147
|
}
|
|
15133
|
-
|
|
15148
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15134
15149
|
{ runId, contract: _nullishCoalesce(status2.contract, () => ( null)) },
|
|
15135
15150
|
{ json: true, fields: selection.fields }
|
|
15136
15151
|
);
|
|
@@ -15138,7 +15153,7 @@ async function handleRunGet(args) {
|
|
|
15138
15153
|
}
|
|
15139
15154
|
if (args.includes("--input")) {
|
|
15140
15155
|
const input = await client.getRunInput(runId);
|
|
15141
|
-
|
|
15156
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, input, { json: true });
|
|
15142
15157
|
return 0;
|
|
15143
15158
|
}
|
|
15144
15159
|
const full = args.includes("--full");
|
|
@@ -15151,8 +15166,8 @@ async function handleRunGet(args) {
|
|
|
15151
15166
|
full: true,
|
|
15152
15167
|
failedLogs: args.includes("--log-failed")
|
|
15153
15168
|
}) : status;
|
|
15154
|
-
if (
|
|
15155
|
-
|
|
15169
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
15170
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15156
15171
|
full ? legacyStatus : compactPlayStatus(legacyStatus),
|
|
15157
15172
|
{ json: true, fields: selection.fields }
|
|
15158
15173
|
);
|
|
@@ -15168,8 +15183,8 @@ async function handleRunGet(args) {
|
|
|
15168
15183
|
readRunCredits(client, runId, !TERMINAL_PLAY_STATUSES.has(status.status))
|
|
15169
15184
|
]);
|
|
15170
15185
|
const hitLines = formatRunHitsLines(hits);
|
|
15171
|
-
const json =
|
|
15172
|
-
|
|
15186
|
+
const json = _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
15187
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15173
15188
|
{
|
|
15174
15189
|
...overview,
|
|
15175
15190
|
credits,
|
|
@@ -15272,9 +15287,9 @@ async function handleRunLifecycleStatus(args) {
|
|
|
15272
15287
|
console.error(error instanceof Error ? error.message : usage2);
|
|
15273
15288
|
return 1;
|
|
15274
15289
|
}
|
|
15275
|
-
const status = await new (0,
|
|
15276
|
-
if (
|
|
15277
|
-
|
|
15290
|
+
const status = await new (0, _chunkULI6UVV6js.DeeplineClient)().runs.status(runId);
|
|
15291
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
15292
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, status, { json: true });
|
|
15278
15293
|
return 0;
|
|
15279
15294
|
}
|
|
15280
15295
|
if (!status.available) {
|
|
@@ -15348,12 +15363,12 @@ async function handleRunsRerun(args) {
|
|
|
15348
15363
|
index += 1;
|
|
15349
15364
|
}
|
|
15350
15365
|
}
|
|
15351
|
-
const result = await new (0,
|
|
15366
|
+
const result = await new (0, _chunkULI6UVV6js.DeeplineClient)().runs.rerun(runId, {
|
|
15352
15367
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
15353
15368
|
...inputOverrides ? { inputOverrides } : {}
|
|
15354
15369
|
});
|
|
15355
|
-
if (
|
|
15356
|
-
|
|
15370
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
15371
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, result, { json: true });
|
|
15357
15372
|
} else {
|
|
15358
15373
|
console.log(
|
|
15359
15374
|
result.deduplicated === true ? `
|
|
@@ -15418,8 +15433,8 @@ ${usage2}
|
|
|
15418
15433
|
Discover Plays: ${next.discover}
|
|
15419
15434
|
Active runs: ${next.running}`
|
|
15420
15435
|
);
|
|
15421
|
-
if (
|
|
15422
|
-
|
|
15436
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
15437
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15423
15438
|
{ ok: false, exitCode: 1, code: "RUN_FILTER_REQUIRED", message, next },
|
|
15424
15439
|
{ json: true }
|
|
15425
15440
|
);
|
|
@@ -15430,7 +15445,7 @@ Active runs: ${next.running}`
|
|
|
15430
15445
|
console.error("--offset requires --play.");
|
|
15431
15446
|
return 1;
|
|
15432
15447
|
}
|
|
15433
|
-
const client = new (0,
|
|
15448
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
15434
15449
|
const page = await client.runs.listPage({
|
|
15435
15450
|
...playName ? { play: playName } : {},
|
|
15436
15451
|
...statusFilter ? { status: statusFilter } : {},
|
|
@@ -15483,7 +15498,7 @@ Active runs: ${next.running}`
|
|
|
15483
15498
|
nextPage ? `Next page: ${nextPage}` : "Narrow with --play <play-name> to page through runs."
|
|
15484
15499
|
);
|
|
15485
15500
|
}
|
|
15486
|
-
|
|
15501
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15487
15502
|
{
|
|
15488
15503
|
runs,
|
|
15489
15504
|
count: runs.length,
|
|
@@ -15497,7 +15512,7 @@ Active runs: ${next.running}`
|
|
|
15497
15512
|
},
|
|
15498
15513
|
render: { sections: [{ title: "runs", lines }] }
|
|
15499
15514
|
},
|
|
15500
|
-
{ json:
|
|
15515
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args) }
|
|
15501
15516
|
);
|
|
15502
15517
|
return 0;
|
|
15503
15518
|
}
|
|
@@ -15527,7 +15542,7 @@ async function handleRunTail(args) {
|
|
|
15527
15542
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15528
15543
|
return 1;
|
|
15529
15544
|
}
|
|
15530
|
-
const parsed =
|
|
15545
|
+
const parsed = _chunkULI6UVV6js.parseLogLevel.call(void 0, value);
|
|
15531
15546
|
if (!parsed) {
|
|
15532
15547
|
console.error(
|
|
15533
15548
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15565,9 +15580,9 @@ async function handleRunTail(args) {
|
|
|
15565
15580
|
);
|
|
15566
15581
|
return 1;
|
|
15567
15582
|
}
|
|
15568
|
-
const client = new (0,
|
|
15583
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
15569
15584
|
const jsonLines = args.includes("--jsonl");
|
|
15570
|
-
const jsonOutput = !jsonLines &&
|
|
15585
|
+
const jsonOutput = !jsonLines && _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
15571
15586
|
const compact = args.includes("--compact");
|
|
15572
15587
|
const showLiveLogs = debug || hasExplicitLogLevel || !jsonOutput && !compact;
|
|
15573
15588
|
const compactState = {
|
|
@@ -15648,7 +15663,7 @@ async function handleRunLogs(args) {
|
|
|
15648
15663
|
]);
|
|
15649
15664
|
const cursorIndex = args.indexOf("--cursor");
|
|
15650
15665
|
const cursorValue = cursorIndex >= 0 ? args[cursorIndex + 1] : void 0;
|
|
15651
|
-
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue &&
|
|
15666
|
+
const continuesEventSearch = cursorIndex >= 0 && !(cursorValue && _chunkULI6UVV6js.isRunLogsCursor.call(void 0, cursorValue));
|
|
15652
15667
|
if (!args[0] || args[0].startsWith("--") || continuesEventSearch || args.some((arg) => searchFlags.has(arg))) {
|
|
15653
15668
|
return handleRunEventSearch(args);
|
|
15654
15669
|
}
|
|
@@ -15682,7 +15697,7 @@ async function handleRunLogs(args) {
|
|
|
15682
15697
|
console.error("--log-level requires one of: debug, info, warn, error.");
|
|
15683
15698
|
return 1;
|
|
15684
15699
|
}
|
|
15685
|
-
const parsed =
|
|
15700
|
+
const parsed = _chunkULI6UVV6js.parseLogLevel.call(void 0, value);
|
|
15686
15701
|
if (!parsed) {
|
|
15687
15702
|
console.error(
|
|
15688
15703
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -15729,12 +15744,12 @@ async function handleRunLogs(args) {
|
|
|
15729
15744
|
);
|
|
15730
15745
|
return 1;
|
|
15731
15746
|
}
|
|
15732
|
-
const client = new (0,
|
|
15747
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
15733
15748
|
if (outPath) {
|
|
15734
15749
|
const result2 = await client.runs.logs(runId, { all: true });
|
|
15735
|
-
const logs = result2.entries.filter((line) =>
|
|
15750
|
+
const logs = result2.entries.filter((line) => _chunkULI6UVV6js.logLevelReaches.call(void 0, _chunkULI6UVV6js.classifyLogLine.call(void 0, line).level, logLevel)).map((line) => _chunkULI6UVV6js.classifyLogLine.call(void 0, line).line);
|
|
15736
15751
|
_fs.writeFileSync.call(void 0, outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
|
15737
|
-
|
|
15752
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15738
15753
|
{
|
|
15739
15754
|
runId: result2.runId,
|
|
15740
15755
|
log_path: outPath,
|
|
@@ -15757,7 +15772,7 @@ async function handleRunLogs(args) {
|
|
|
15757
15772
|
]
|
|
15758
15773
|
}
|
|
15759
15774
|
},
|
|
15760
|
-
{ json:
|
|
15775
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args) }
|
|
15761
15776
|
);
|
|
15762
15777
|
return 0;
|
|
15763
15778
|
}
|
|
@@ -15788,7 +15803,7 @@ async function handleRunLogs(args) {
|
|
|
15788
15803
|
}
|
|
15789
15804
|
};
|
|
15790
15805
|
const text = buildRunLogsText(filteredResult);
|
|
15791
|
-
|
|
15806
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15792
15807
|
{
|
|
15793
15808
|
runId: result.runId,
|
|
15794
15809
|
totalCount: result.totalCount,
|
|
@@ -15812,7 +15827,7 @@ async function handleRunLogs(args) {
|
|
|
15812
15827
|
render: { sections: [{ title: "run logs", lines: entries }] }
|
|
15813
15828
|
},
|
|
15814
15829
|
{
|
|
15815
|
-
json:
|
|
15830
|
+
json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args),
|
|
15816
15831
|
text
|
|
15817
15832
|
}
|
|
15818
15833
|
);
|
|
@@ -15836,7 +15851,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
15836
15851
|
);
|
|
15837
15852
|
}
|
|
15838
15853
|
const matching = result.entries.map((line, index) => ({ line, seq: first + index })).filter(
|
|
15839
|
-
(entry) =>
|
|
15854
|
+
(entry) => _chunkULI6UVV6js.logLevelReaches.call(void 0, _chunkULI6UVV6js.classifyLogLine.call(void 0, entry.line).level, logLevel)
|
|
15840
15855
|
);
|
|
15841
15856
|
const selected = matching.slice(-limit);
|
|
15842
15857
|
const olderMatchesExist = matching.length > selected.length;
|
|
@@ -15846,7 +15861,7 @@ function selectRunLogTailPage(result, logLevel, limit) {
|
|
|
15846
15861
|
lastSequence: _nullishCoalesce(_optionalChain([selected, 'access', _518 => _518.at, 'call', _519 => _519(-1), 'optionalAccess', _520 => _520.seq]), () => ( null)),
|
|
15847
15862
|
truncated: result.truncated || olderMatchesExist,
|
|
15848
15863
|
hasMore: olderMatchesExist,
|
|
15849
|
-
nextCursor: olderMatchesExist ?
|
|
15864
|
+
nextCursor: olderMatchesExist ? _chunkULI6UVV6js.encodeRunLogsCursor.call(void 0, selected[0].seq) : null
|
|
15850
15865
|
};
|
|
15851
15866
|
}
|
|
15852
15867
|
async function handleRunEventSearch(args) {
|
|
@@ -15913,7 +15928,7 @@ ${usage2}`);
|
|
|
15913
15928
|
namespace,
|
|
15914
15929
|
...backend ? { backend } : {}
|
|
15915
15930
|
} : void 0;
|
|
15916
|
-
const client = new (0,
|
|
15931
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
15917
15932
|
const result = await client.runs.searchEvents({
|
|
15918
15933
|
...runId ? { runId } : {},
|
|
15919
15934
|
...values["--since"] ? { since: values["--since"] } : {},
|
|
@@ -15986,7 +16001,7 @@ ${renderedDetails}` : ""}`;
|
|
|
15986
16001
|
String(limit),
|
|
15987
16002
|
"--json"
|
|
15988
16003
|
].join(" ") : null;
|
|
15989
|
-
|
|
16004
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
15990
16005
|
{
|
|
15991
16006
|
events,
|
|
15992
16007
|
nextCursor: result.nextCursor,
|
|
@@ -15997,14 +16012,14 @@ ${renderedDetails}` : ""}`;
|
|
|
15997
16012
|
render: { sections: [{ title: "runtime events", lines }] }
|
|
15998
16013
|
},
|
|
15999
16014
|
{
|
|
16000
|
-
json:
|
|
16015
|
+
json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args),
|
|
16001
16016
|
text: `${lines.join("\n")}${lines.length ? "\n" : ""}`
|
|
16002
16017
|
}
|
|
16003
16018
|
);
|
|
16004
16019
|
return 0;
|
|
16005
16020
|
}
|
|
16006
16021
|
function buildRunLogsText(result) {
|
|
16007
|
-
const lines = result.entries.map((line) =>
|
|
16022
|
+
const lines = result.entries.map((line) => _chunkULI6UVV6js.classifyLogLine.call(void 0, line).line);
|
|
16008
16023
|
if (result.warning) {
|
|
16009
16024
|
if (lines.length > 0) lines.push("");
|
|
16010
16025
|
lines.push(`warning: ${result.warning}`);
|
|
@@ -16038,7 +16053,7 @@ async function handleRunStop(args) {
|
|
|
16038
16053
|
reason = args[++index];
|
|
16039
16054
|
}
|
|
16040
16055
|
}
|
|
16041
|
-
const client = new (0,
|
|
16056
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16042
16057
|
const result = await client.runs.stop(runId, { reason });
|
|
16043
16058
|
const state = resolveRunStopState(result);
|
|
16044
16059
|
const hitlCleanupIncomplete = state === "cancelling" && result.hitlCancellationPending === true;
|
|
@@ -16053,7 +16068,7 @@ async function handleRunStop(args) {
|
|
|
16053
16068
|
...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
|
|
16054
16069
|
`inspect: deepline runs get ${runId} --full --json`
|
|
16055
16070
|
];
|
|
16056
|
-
|
|
16071
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
16057
16072
|
{
|
|
16058
16073
|
...cancelling,
|
|
16059
16074
|
state,
|
|
@@ -16068,7 +16083,7 @@ async function handleRunStop(args) {
|
|
|
16068
16083
|
]
|
|
16069
16084
|
}
|
|
16070
16085
|
},
|
|
16071
|
-
{ json:
|
|
16086
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args) }
|
|
16072
16087
|
);
|
|
16073
16088
|
return 0;
|
|
16074
16089
|
}
|
|
@@ -16085,7 +16100,7 @@ async function handleRunStop(args) {
|
|
|
16085
16100
|
];
|
|
16086
16101
|
process.stderr.write(`${lines2.join("\n")}
|
|
16087
16102
|
`);
|
|
16088
|
-
|
|
16103
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
16089
16104
|
{
|
|
16090
16105
|
...result,
|
|
16091
16106
|
render: {
|
|
@@ -16100,7 +16115,7 @@ async function handleRunStop(args) {
|
|
|
16100
16115
|
]
|
|
16101
16116
|
}
|
|
16102
16117
|
},
|
|
16103
|
-
{ json:
|
|
16118
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args) }
|
|
16104
16119
|
);
|
|
16105
16120
|
return 1;
|
|
16106
16121
|
}
|
|
@@ -16111,12 +16126,12 @@ async function handleRunStop(args) {
|
|
|
16111
16126
|
`warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
|
|
16112
16127
|
] : []
|
|
16113
16128
|
];
|
|
16114
|
-
|
|
16129
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
16115
16130
|
{
|
|
16116
16131
|
...result,
|
|
16117
16132
|
render: { sections: [{ title: "run stop", lines }] }
|
|
16118
16133
|
},
|
|
16119
|
-
{ json:
|
|
16134
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args) }
|
|
16120
16135
|
);
|
|
16121
16136
|
return 0;
|
|
16122
16137
|
}
|
|
@@ -16166,18 +16181,18 @@ async function handleRunStopAll(args) {
|
|
|
16166
16181
|
reason = args[++index];
|
|
16167
16182
|
}
|
|
16168
16183
|
}
|
|
16169
|
-
const client = new (0,
|
|
16184
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16170
16185
|
if (dryRun) {
|
|
16171
16186
|
const result2 = await client.runs.stopAll({ dryRun: true, reason });
|
|
16172
16187
|
const lines2 = buildStopAllDryRunTextLines(result2);
|
|
16173
|
-
|
|
16188
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
16174
16189
|
{
|
|
16175
16190
|
...result2,
|
|
16176
16191
|
render: {
|
|
16177
16192
|
sections: [{ title: "workspace stop-all (dry run)", lines: lines2 }]
|
|
16178
16193
|
}
|
|
16179
16194
|
},
|
|
16180
|
-
{ json:
|
|
16195
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args), text: `${lines2.join("\n")}
|
|
16181
16196
|
` }
|
|
16182
16197
|
);
|
|
16183
16198
|
return 0;
|
|
@@ -16190,17 +16205,17 @@ async function handleRunStopAll(args) {
|
|
|
16190
16205
|
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
16191
16206
|
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
16192
16207
|
];
|
|
16193
|
-
|
|
16208
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
16194
16209
|
{
|
|
16195
16210
|
...result,
|
|
16196
16211
|
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
16197
16212
|
},
|
|
16198
|
-
{ json:
|
|
16213
|
+
{ json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args) }
|
|
16199
16214
|
);
|
|
16200
16215
|
return result.failed > 0 || result.partial ? 1 : 0;
|
|
16201
16216
|
}
|
|
16202
16217
|
async function handleRunExport(args) {
|
|
16203
|
-
const selection =
|
|
16218
|
+
const selection = _chunk6LLJWMYHjs.parseJsonFields.call(void 0, args, "export");
|
|
16204
16219
|
args = selection.args;
|
|
16205
16220
|
const usage2 = "Usage: deepline runs export <run-id> [--dataset result.rows] --out <path> [--format csv|json] [--wait] [--timeout-ms 300000] [--metadata-out export.json] [--json]";
|
|
16206
16221
|
let runId;
|
|
@@ -16259,16 +16274,16 @@ async function handleRunExport(args) {
|
|
|
16259
16274
|
"INVALID_ARGUMENT"
|
|
16260
16275
|
);
|
|
16261
16276
|
}
|
|
16262
|
-
const client = new (0,
|
|
16277
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16263
16278
|
let status = await client.getPlayStatus(runId, { full: true });
|
|
16264
16279
|
if (wait && !TERMINAL_PLAY_STATUSES.has(status.status)) {
|
|
16265
|
-
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !
|
|
16280
|
+
const progress = _chunkWJYPBHTEjs.createCliProgress.call(void 0, !_chunk6LLJWMYHjs.argsWantJson.call(void 0, args));
|
|
16266
16281
|
try {
|
|
16267
16282
|
await waitForPlayCompletionByWatch({
|
|
16268
16283
|
client,
|
|
16269
16284
|
playName: _nullishCoalesce(extractRunPlayName(status), () => ( runId)),
|
|
16270
16285
|
workflowId: runId,
|
|
16271
|
-
jsonOutput:
|
|
16286
|
+
jsonOutput: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args),
|
|
16272
16287
|
emitLogs: false,
|
|
16273
16288
|
waitTimeoutMs,
|
|
16274
16289
|
startedAt: Date.now(),
|
|
@@ -16367,8 +16382,8 @@ async function handleRunExport(args) {
|
|
|
16367
16382
|
"utf-8"
|
|
16368
16383
|
);
|
|
16369
16384
|
}
|
|
16370
|
-
|
|
16371
|
-
json:
|
|
16385
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, payload, {
|
|
16386
|
+
json: _chunk6LLJWMYHjs.argsWantJson.call(void 0, args),
|
|
16372
16387
|
fields: selection.fields,
|
|
16373
16388
|
text: `${lines.join("\n")}
|
|
16374
16389
|
`
|
|
@@ -16389,10 +16404,10 @@ async function handlePlayGet(args) {
|
|
|
16389
16404
|
);
|
|
16390
16405
|
return 2;
|
|
16391
16406
|
}
|
|
16392
|
-
const client = new (0,
|
|
16407
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16393
16408
|
const explicitJson = args.includes("--json");
|
|
16394
16409
|
const sourceOutput = args.includes("--source");
|
|
16395
|
-
const jsonOutput = sourceOutput ? explicitJson :
|
|
16410
|
+
const jsonOutput = sourceOutput ? explicitJson : _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
16396
16411
|
const requestedRevisionFlags = [
|
|
16397
16412
|
args.includes("--working"),
|
|
16398
16413
|
args.includes("--live"),
|
|
@@ -16452,7 +16467,7 @@ async function handlePlayGet(args) {
|
|
|
16452
16467
|
}
|
|
16453
16468
|
const loadedMessage = materializedFile ? formatLoadedPlayMessage(materializedFile) : null;
|
|
16454
16469
|
if (jsonOutput) {
|
|
16455
|
-
|
|
16470
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, {
|
|
16456
16471
|
...detail,
|
|
16457
16472
|
...materializedFile ? {
|
|
16458
16473
|
message: loadedMessage,
|
|
@@ -16539,8 +16554,8 @@ async function handlePlayVersions(args) {
|
|
|
16539
16554
|
console.error("Usage: deepline plays versions --name <name> [--json]");
|
|
16540
16555
|
return 1;
|
|
16541
16556
|
}
|
|
16542
|
-
const client = new (0,
|
|
16543
|
-
const jsonOutput =
|
|
16557
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16558
|
+
const jsonOutput = _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
16544
16559
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16545
16560
|
command: "versions"
|
|
16546
16561
|
});
|
|
@@ -16548,7 +16563,7 @@ async function handlePlayVersions(args) {
|
|
|
16548
16563
|
parseReferencedPlayTarget2(playName).playName
|
|
16549
16564
|
);
|
|
16550
16565
|
if (jsonOutput) {
|
|
16551
|
-
|
|
16566
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, { versions });
|
|
16552
16567
|
return 0;
|
|
16553
16568
|
}
|
|
16554
16569
|
if (versions.length === 0) {
|
|
@@ -16580,9 +16595,9 @@ var PREBUILT_PLAY_TAG_KEYS = [
|
|
|
16580
16595
|
"signals"
|
|
16581
16596
|
];
|
|
16582
16597
|
async function handlePlayList(args) {
|
|
16583
|
-
const jsonOutput =
|
|
16598
|
+
const jsonOutput = _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
16584
16599
|
const showCost = args.includes("--show-cost");
|
|
16585
|
-
const client = new (0,
|
|
16600
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16586
16601
|
const categoriesIndex = args.indexOf("--categories");
|
|
16587
16602
|
const categories = categoriesIndex >= 0 ? _optionalChain([args, 'access', _556 => _556[categoriesIndex + 1], 'optionalAccess', _557 => _557.trim, 'call', _558 => _558()]) : void 0;
|
|
16588
16603
|
const tags = args.flatMap((arg, index) => arg === "--tag" ? [args[index + 1]] : []).flatMap((value) => (_nullishCoalesce(value, () => ( ""))).split(",")).map((value) => value.trim()).filter(Boolean);
|
|
@@ -16679,7 +16694,7 @@ async function handlePlayList(args) {
|
|
|
16679
16694
|
lines.push("List truncated \u2014 more plays are available.");
|
|
16680
16695
|
lines.push(`Next page: ${nextPage}`);
|
|
16681
16696
|
}
|
|
16682
|
-
|
|
16697
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
16683
16698
|
{
|
|
16684
16699
|
plays,
|
|
16685
16700
|
count: plays.length,
|
|
@@ -16697,7 +16712,7 @@ async function handlePlayList(args) {
|
|
|
16697
16712
|
}
|
|
16698
16713
|
async function handlePlayPin(args, pinned) {
|
|
16699
16714
|
const target = _optionalChain([args, 'access', _565 => _565.find, 'call', _566 => _566((arg) => !arg.startsWith("-")), 'optionalAccess', _567 => _567.trim, 'call', _568 => _568()]);
|
|
16700
|
-
const jsonOutput =
|
|
16715
|
+
const jsonOutput = _chunk6LLJWMYHjs.argsWantJson.call(void 0, args);
|
|
16701
16716
|
const dryRun = args.includes("--dry-run");
|
|
16702
16717
|
if (!target) {
|
|
16703
16718
|
console.error(
|
|
@@ -16715,11 +16730,11 @@ async function handlePlayPin(args, pinned) {
|
|
|
16715
16730
|
const name = parsedTarget.playName;
|
|
16716
16731
|
const plan = { name, pinned, dryRun };
|
|
16717
16732
|
if (dryRun) {
|
|
16718
|
-
|
|
16733
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, plan);
|
|
16719
16734
|
return 0;
|
|
16720
16735
|
}
|
|
16721
|
-
const result = await new (0,
|
|
16722
|
-
if (jsonOutput)
|
|
16736
|
+
const result = await new (0, _chunkULI6UVV6js.DeeplineClient)().setPlayPinned(name, pinned);
|
|
16737
|
+
if (jsonOutput) _chunk6LLJWMYHjs.printCompactJson.call(void 0, result);
|
|
16723
16738
|
else console.log(`${result.pinned ? "Pinned" : "Unpinned"} ${result.name}.`);
|
|
16724
16739
|
return 0;
|
|
16725
16740
|
}
|
|
@@ -16735,9 +16750,45 @@ function csvColumnLines(csvInput) {
|
|
|
16735
16750
|
const headers = [defaults[column]].flat().filter((header) => header && header !== column);
|
|
16736
16751
|
return `${column}${required.has(column) ? " (required)" : ""}${headers.length > 0 ? `, default header: ${headers.join(" or ")}` : ""}`;
|
|
16737
16752
|
}),
|
|
16738
|
-
|
|
16753
|
+
_chunkULI6UVV6js.CSV_HEADER_MATCHING_NOTE
|
|
16739
16754
|
];
|
|
16740
16755
|
}
|
|
16756
|
+
function describedPlay(play) {
|
|
16757
|
+
const reference = formatPlayListReference(play);
|
|
16758
|
+
const starter = _nullishCoalesce(play.cloneEditStarter, () => ( buildCloneEditStarter(play)));
|
|
16759
|
+
const csv = _nullishCoalesce(play.csvInput, () => ( {}));
|
|
16760
|
+
const headers = isRecord3(csv.defaultColumns) ? csv.defaultColumns : {};
|
|
16761
|
+
const rowInputs = _chunkXNL3SEMCjs.schemaFields.call(void 0, csv.rowInputSchema).map((field) => {
|
|
16762
|
+
const header = [headers[field.name]].flat().filter((name) => name && name !== field.name).join(" or ");
|
|
16763
|
+
return header ? {
|
|
16764
|
+
...field,
|
|
16765
|
+
description: [field.description, `CSV header: ${header}`].filter(Boolean).join(" - ")
|
|
16766
|
+
} : field;
|
|
16767
|
+
});
|
|
16768
|
+
const rowOutput = _nullishCoalesce(play.rowOutputSchema, () => ( {}));
|
|
16769
|
+
const added = isRecord3(rowOutput.addedColumns) ? rowOutput.addedColumns : {};
|
|
16770
|
+
const rowOutputs = _chunkXNL3SEMCjs.schemaFields.call(void 0,
|
|
16771
|
+
Object.keys(added).length ? { properties: added } : rowOutput
|
|
16772
|
+
).map((field) => ({ ...field, required: true }));
|
|
16773
|
+
return {
|
|
16774
|
+
kind: play.ownerType === "deepline" ? "prebuilt_play" : "custom_play",
|
|
16775
|
+
id: reference,
|
|
16776
|
+
...play.displayName && play.displayName !== play.name ? { displayName: play.displayName } : {},
|
|
16777
|
+
...play.description ? { description: play.description } : {},
|
|
16778
|
+
guidance: [],
|
|
16779
|
+
inputs: _chunkXNL3SEMCjs.schemaFields.call(void 0, play.inputSchema),
|
|
16780
|
+
outputs: _chunkXNL3SEMCjs.schemaFields.call(void 0, play.outputSchema),
|
|
16781
|
+
...rowInputs.length ? { rowInputs } : {},
|
|
16782
|
+
...rowOutputs.length ? { rowOutputs } : {},
|
|
16783
|
+
runner: {
|
|
16784
|
+
via: "play",
|
|
16785
|
+
reference,
|
|
16786
|
+
// A CSV play's run command is built by the server around its columns.
|
|
16787
|
+
...play.csvInput ? { cli: play.runCommand } : {}
|
|
16788
|
+
},
|
|
16789
|
+
...starter ? { source: starter.command } : {}
|
|
16790
|
+
};
|
|
16791
|
+
}
|
|
16741
16792
|
function printPlayDescription(play) {
|
|
16742
16793
|
const reference = formatPlayListReference(play);
|
|
16743
16794
|
const labels = [
|
|
@@ -16816,7 +16867,7 @@ function printPlayDescription(play) {
|
|
|
16816
16867
|
);
|
|
16817
16868
|
}
|
|
16818
16869
|
printScheduledPlayCapacity(play.activeScheduledPlays);
|
|
16819
|
-
console.log(` Describe: deepline
|
|
16870
|
+
console.log(` Describe: deepline describe ${reference}`);
|
|
16820
16871
|
console.log(` Run: ${play.runCommand}`);
|
|
16821
16872
|
const cloneEditStarter = _nullishCoalesce(play.cloneEditStarter, () => ( buildCloneEditStarter(play)));
|
|
16822
16873
|
if (cloneEditStarter) {
|
|
@@ -16827,27 +16878,28 @@ function printPlayDescription(play) {
|
|
|
16827
16878
|
function summarizePlayGrepResult(play) {
|
|
16828
16879
|
const reference = formatPlayListReference(play);
|
|
16829
16880
|
return {
|
|
16830
|
-
name:
|
|
16881
|
+
name: play.name,
|
|
16882
|
+
...play.displayName ? { displayName: play.displayName } : {},
|
|
16831
16883
|
reference,
|
|
16832
16884
|
matches: _nullishCoalesce(play.matches, () => ( [])),
|
|
16833
|
-
describe: `deepline
|
|
16885
|
+
describe: `deepline describe ${reference}`
|
|
16834
16886
|
};
|
|
16835
16887
|
}
|
|
16836
16888
|
function formatPlayGrepMatches(matches) {
|
|
16837
16889
|
return matches.map((match) => `${match.field}: ${match.terms.join(", ")}`).join("; ");
|
|
16838
16890
|
}
|
|
16839
16891
|
async function handlePlayGrep(args) {
|
|
16840
|
-
const query = _optionalChain([args, 'access',
|
|
16892
|
+
const query = _optionalChain([args, 'access', _573 => _573[0], 'optionalAccess', _574 => _574.trim, 'call', _575 => _575()]);
|
|
16841
16893
|
if (!query) {
|
|
16842
16894
|
console.error("Usage: deepline plays grep <query> [--json]");
|
|
16843
16895
|
return 1;
|
|
16844
16896
|
}
|
|
16845
|
-
const client = new (0,
|
|
16897
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16846
16898
|
const results = (await client.listPlays({ grep: query })).map(
|
|
16847
16899
|
summarizePlayGrepResult
|
|
16848
16900
|
);
|
|
16849
|
-
if (
|
|
16850
|
-
|
|
16901
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
16902
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, {
|
|
16851
16903
|
plays: results,
|
|
16852
16904
|
count: results.length,
|
|
16853
16905
|
query,
|
|
@@ -16861,7 +16913,7 @@ async function handlePlayGrep(args) {
|
|
|
16861
16913
|
`
|
|
16862
16914
|
);
|
|
16863
16915
|
for (const result of results) {
|
|
16864
|
-
console.log(result.name);
|
|
16916
|
+
console.log(_optionalChain([result, 'access', _576 => _576.displayName, 'optionalAccess', _577 => _577.trim, 'call', _578 => _578()]) || result.name);
|
|
16865
16917
|
const matches = formatPlayGrepMatches(result.matches);
|
|
16866
16918
|
if (matches) console.log(` Matched: ${matches}`);
|
|
16867
16919
|
console.log(` Describe: ${result.describe}`);
|
|
@@ -16870,7 +16922,7 @@ async function handlePlayGrep(args) {
|
|
|
16870
16922
|
return 0;
|
|
16871
16923
|
}
|
|
16872
16924
|
async function handlePlayDescribe(args) {
|
|
16873
|
-
const selection =
|
|
16925
|
+
const selection = _chunk6LLJWMYHjs.parseJsonFields.call(void 0, args, "describe");
|
|
16874
16926
|
args = selection.args;
|
|
16875
16927
|
const playName = args[0];
|
|
16876
16928
|
if (!playName) {
|
|
@@ -16902,10 +16954,10 @@ async function handlePlayDescribe(args) {
|
|
|
16902
16954
|
})() : null;
|
|
16903
16955
|
const next = [
|
|
16904
16956
|
`deepline plays check ${playName}`,
|
|
16905
|
-
...definedName ? [`deepline
|
|
16957
|
+
...definedName ? [`deepline describe <workspace>/${definedName}`] : []
|
|
16906
16958
|
];
|
|
16907
|
-
if (
|
|
16908
|
-
|
|
16959
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
16960
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, {
|
|
16909
16961
|
ok: false,
|
|
16910
16962
|
error: { message },
|
|
16911
16963
|
next
|
|
@@ -16919,7 +16971,7 @@ async function handlePlayDescribe(args) {
|
|
|
16919
16971
|
}
|
|
16920
16972
|
return 2;
|
|
16921
16973
|
}
|
|
16922
|
-
const client = new (0,
|
|
16974
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
16923
16975
|
await assertCanonicalNamedPlayReference(client, playName, {
|
|
16924
16976
|
command: "describe"
|
|
16925
16977
|
});
|
|
@@ -16929,9 +16981,9 @@ async function handlePlayDescribe(args) {
|
|
|
16929
16981
|
compact: args.includes("--compact")
|
|
16930
16982
|
}
|
|
16931
16983
|
);
|
|
16932
|
-
if (
|
|
16933
|
-
if (selection.fields)
|
|
16934
|
-
else
|
|
16984
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
16985
|
+
if (selection.fields) _chunk6LLJWMYHjs.printJson.call(void 0, play, selection.fields);
|
|
16986
|
+
else _chunk6LLJWMYHjs.printCompactJson.call(void 0, play);
|
|
16935
16987
|
return 0;
|
|
16936
16988
|
}
|
|
16937
16989
|
printPlayDescription(play);
|
|
@@ -16975,7 +17027,7 @@ async function handlePlaySave(args) {
|
|
|
16975
17027
|
next: `deepline plays check ${shellQuote3(options.target)}`
|
|
16976
17028
|
};
|
|
16977
17029
|
if (options.jsonOutput) {
|
|
16978
|
-
|
|
17030
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result);
|
|
16979
17031
|
} else {
|
|
16980
17032
|
console.error(result.message);
|
|
16981
17033
|
console.error(` checked artifact: ${result.expectedArtifactHash}`);
|
|
@@ -16997,7 +17049,7 @@ async function handlePlaySave(args) {
|
|
|
16997
17049
|
};
|
|
16998
17050
|
if (options.dryRun) {
|
|
16999
17051
|
if (options.jsonOutput) {
|
|
17000
|
-
|
|
17052
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, dryRun);
|
|
17001
17053
|
} else {
|
|
17002
17054
|
console.log(`Dry run: ${playName}`);
|
|
17003
17055
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17006,7 +17058,7 @@ async function handlePlaySave(args) {
|
|
|
17006
17058
|
}
|
|
17007
17059
|
return 0;
|
|
17008
17060
|
}
|
|
17009
|
-
const client = new (0,
|
|
17061
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
17010
17062
|
try {
|
|
17011
17063
|
await _chunkAYHLUHE5js.traceCliSpan.call(void 0,
|
|
17012
17064
|
"cli.play_save_compile_manifests",
|
|
@@ -17042,7 +17094,7 @@ async function handlePlaySave(args) {
|
|
|
17042
17094
|
}
|
|
17043
17095
|
};
|
|
17044
17096
|
if (options.jsonOutput) {
|
|
17045
|
-
|
|
17097
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result);
|
|
17046
17098
|
} else {
|
|
17047
17099
|
console.log(
|
|
17048
17100
|
`\u2713 Saved ${playName} working draft as v${_nullishCoalesce(result.version, () => ( "?"))}`
|
|
@@ -17068,7 +17120,7 @@ async function handlePlayPublish(args) {
|
|
|
17068
17120
|
}
|
|
17069
17121
|
const { target: playName, useLatest } = options;
|
|
17070
17122
|
let revisionId = options.revisionId;
|
|
17071
|
-
const client = new (0,
|
|
17123
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
17072
17124
|
if (isFileTarget(playName)) {
|
|
17073
17125
|
if (revisionId || useLatest) {
|
|
17074
17126
|
console.error(
|
|
@@ -17100,7 +17152,7 @@ async function handlePlayPublish(args) {
|
|
|
17100
17152
|
next: `deepline plays check ${shellQuote3(playName)}`
|
|
17101
17153
|
};
|
|
17102
17154
|
if (options.jsonOutput) {
|
|
17103
|
-
|
|
17155
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result3);
|
|
17104
17156
|
} else {
|
|
17105
17157
|
console.error(result3.message);
|
|
17106
17158
|
console.error(` checked artifact: ${result3.expectedArtifactHash}`);
|
|
@@ -17123,7 +17175,7 @@ async function handlePlayPublish(args) {
|
|
|
17123
17175
|
};
|
|
17124
17176
|
if (options.dryRun) {
|
|
17125
17177
|
if (options.jsonOutput) {
|
|
17126
|
-
|
|
17178
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, dryRun);
|
|
17127
17179
|
} else {
|
|
17128
17180
|
console.log(`Dry run: ${rootPlayName}`);
|
|
17129
17181
|
console.log(` source: ${dryRun.sourceHash}`);
|
|
@@ -17191,7 +17243,7 @@ async function handlePlayPublish(args) {
|
|
|
17191
17243
|
triggerBindings: _nullishCoalesce(published.triggerBindings, () => ( []))
|
|
17192
17244
|
};
|
|
17193
17245
|
if (options.jsonOutput) {
|
|
17194
|
-
|
|
17246
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result2);
|
|
17195
17247
|
} else {
|
|
17196
17248
|
printPublishReceipt({
|
|
17197
17249
|
name: rootPlayName,
|
|
@@ -17222,7 +17274,7 @@ async function handlePlayPublish(args) {
|
|
|
17222
17274
|
revisionId: _nullishCoalesce(revisionId, () => ( null)),
|
|
17223
17275
|
latest: useLatest
|
|
17224
17276
|
};
|
|
17225
|
-
|
|
17277
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result2);
|
|
17226
17278
|
return 0;
|
|
17227
17279
|
}
|
|
17228
17280
|
const resolvedName = parseReferencedPlayTarget2(playName).playName;
|
|
@@ -17246,7 +17298,7 @@ async function handlePlayPublish(args) {
|
|
|
17246
17298
|
revisionId ? { revisionId } : {}
|
|
17247
17299
|
);
|
|
17248
17300
|
if (options.jsonOutput) {
|
|
17249
|
-
|
|
17301
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result);
|
|
17250
17302
|
} else {
|
|
17251
17303
|
printPublishReceipt({
|
|
17252
17304
|
name: result.name,
|
|
@@ -17286,7 +17338,7 @@ async function handlePlayDelete(args) {
|
|
|
17286
17338
|
);
|
|
17287
17339
|
return 2;
|
|
17288
17340
|
}
|
|
17289
|
-
const client = new (0,
|
|
17341
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
17290
17342
|
let detail;
|
|
17291
17343
|
try {
|
|
17292
17344
|
detail = await client.getPlay(parseReferencedPlayTarget2(playName).playName);
|
|
@@ -17310,8 +17362,8 @@ async function handlePlayDelete(args) {
|
|
|
17310
17362
|
name: resolvedName,
|
|
17311
17363
|
plannedMutation: "move saved org-owned play to Trash and stop triggers"
|
|
17312
17364
|
};
|
|
17313
|
-
if (
|
|
17314
|
-
|
|
17365
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
17366
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result2);
|
|
17315
17367
|
} else {
|
|
17316
17368
|
process.stdout.write(
|
|
17317
17369
|
`Dry run: would move ${result2.name} to Trash and stop its active triggers.
|
|
@@ -17321,8 +17373,8 @@ async function handlePlayDelete(args) {
|
|
|
17321
17373
|
return 0;
|
|
17322
17374
|
}
|
|
17323
17375
|
const result = await client.deletePlay(resolvedName);
|
|
17324
|
-
if (
|
|
17325
|
-
|
|
17376
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
17377
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result);
|
|
17326
17378
|
return result.archived || result.alreadyArchived ? 0 : 4;
|
|
17327
17379
|
}
|
|
17328
17380
|
if (result.alreadyArchived) {
|
|
@@ -17361,13 +17413,13 @@ async function handlePlayRestore(args) {
|
|
|
17361
17413
|
);
|
|
17362
17414
|
return 2;
|
|
17363
17415
|
}
|
|
17364
|
-
const client = new (0,
|
|
17416
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
17365
17417
|
try {
|
|
17366
17418
|
const result = await client.restorePlay(
|
|
17367
17419
|
parseReferencedPlayTarget2(playName).playName
|
|
17368
17420
|
);
|
|
17369
|
-
if (
|
|
17370
|
-
|
|
17421
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
17422
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, result);
|
|
17371
17423
|
return result.restored || result.alreadyActive ? 0 : 4;
|
|
17372
17424
|
}
|
|
17373
17425
|
if (result.alreadyActive) {
|
|
@@ -17404,7 +17456,7 @@ Concepts:
|
|
|
17404
17456
|
|
|
17405
17457
|
Run and retrieve results:
|
|
17406
17458
|
1. Discover a Play: deepline plays search email --json
|
|
17407
|
-
Inspect its input contract: deepline
|
|
17459
|
+
Inspect its input contract: deepline describe <play-name>
|
|
17408
17460
|
2. Start and follow a new run: deepline plays run workflow.play.ts --csv contacts.csv
|
|
17409
17461
|
This example requires input.csv. Use the selected Play's actual input fields.
|
|
17410
17462
|
Run waits and shows progress by default; --no-wait returns immediately.
|
|
@@ -17439,7 +17491,7 @@ Authoring:
|
|
|
17439
17491
|
|
|
17440
17492
|
Common commands:
|
|
17441
17493
|
deepline search --type prebuilts email --json
|
|
17442
|
-
deepline
|
|
17494
|
+
deepline describe prebuilt/person-linkedin-to-email
|
|
17443
17495
|
deepline plays check prebuilt/name-and-domain-to-email-waterfall-batch
|
|
17444
17496
|
deepline plays run prebuilt/person-linkedin-to-email --input '{"linkedin_url":"..."}'
|
|
17445
17497
|
deepline plays get prebuilt/person-linkedin-to-email --json
|
|
@@ -17472,7 +17524,7 @@ Examples:
|
|
|
17472
17524
|
).action(async (target, options) => {
|
|
17473
17525
|
process.exitCode = await handlePlayCheck([
|
|
17474
17526
|
target,
|
|
17475
|
-
...
|
|
17527
|
+
..._chunk6LLJWMYHjs.jsonFieldArgs.call(void 0, options.json),
|
|
17476
17528
|
...options.full ? ["--full"] : []
|
|
17477
17529
|
]);
|
|
17478
17530
|
});
|
|
@@ -17659,7 +17711,7 @@ JSON field selection:
|
|
|
17659
17711
|
...options.maxConcurrentRows ? ["--max-concurrent-rows", options.maxConcurrentRows] : [],
|
|
17660
17712
|
...options.open ? ["--open"] : [],
|
|
17661
17713
|
...options.debugMapLatency ? ["--debug-map-latency"] : [],
|
|
17662
|
-
...
|
|
17714
|
+
..._chunk6LLJWMYHjs.jsonFieldArgs.call(void 0, options.json),
|
|
17663
17715
|
...options.full ? ["--full"] : [],
|
|
17664
17716
|
...passthroughArgs
|
|
17665
17717
|
]);
|
|
@@ -17714,9 +17766,9 @@ Examples:
|
|
|
17714
17766
|
const limit = Number(options.historyLimit);
|
|
17715
17767
|
if (!Number.isInteger(limit) || limit < 1 || limit > 30)
|
|
17716
17768
|
throw new Error("--history-limit must be an integer from 1 to 30.");
|
|
17717
|
-
const client = new (0,
|
|
17769
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
17718
17770
|
if (options.binding) {
|
|
17719
|
-
|
|
17771
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0,
|
|
17720
17772
|
await client.getPlayTriggerHistory(options.binding, { limit })
|
|
17721
17773
|
);
|
|
17722
17774
|
return;
|
|
@@ -17724,7 +17776,7 @@ Examples:
|
|
|
17724
17776
|
const result = await client.listPlayTriggerInventory({
|
|
17725
17777
|
cursor: options.cursor
|
|
17726
17778
|
});
|
|
17727
|
-
|
|
17779
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, {
|
|
17728
17780
|
...result,
|
|
17729
17781
|
next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
|
|
17730
17782
|
});
|
|
@@ -17771,7 +17823,7 @@ Examples:
|
|
|
17771
17823
|
if (options.groupBy !== "kind" && options.groupBy !== "trigger_source") {
|
|
17772
17824
|
throw new Error("--group-by must be kind or trigger_source.");
|
|
17773
17825
|
}
|
|
17774
|
-
const result = await new (0,
|
|
17826
|
+
const result = await new (0, _chunkULI6UVV6js.DeeplineClient)().getPlaysActivity({
|
|
17775
17827
|
timeZone: options.timeZone,
|
|
17776
17828
|
days,
|
|
17777
17829
|
...options.endDate ? { endDate: options.endDate } : {},
|
|
@@ -17785,7 +17837,7 @@ Examples:
|
|
|
17785
17837
|
`${bucket.key} ${groups} failed_play_runs=${bucket.failedPlayRuns} ${coverage}`
|
|
17786
17838
|
);
|
|
17787
17839
|
}
|
|
17788
|
-
|
|
17840
|
+
_chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
|
|
17789
17841
|
{ ...result },
|
|
17790
17842
|
{
|
|
17791
17843
|
json: options.json || !process.stdout.isTTY,
|
|
@@ -17814,7 +17866,7 @@ Examples:
|
|
|
17814
17866
|
false
|
|
17815
17867
|
);
|
|
17816
17868
|
});
|
|
17817
|
-
|
|
17869
|
+
_chunkVJDKV5RUjs.registerDeprecatedSearchCommand.call(void 0,
|
|
17818
17870
|
play,
|
|
17819
17871
|
(options) => options.all ? ["plays"] : ["prebuilts"]
|
|
17820
17872
|
);
|
|
@@ -17829,7 +17881,7 @@ Notes:
|
|
|
17829
17881
|
|
|
17830
17882
|
Examples:
|
|
17831
17883
|
deepline plays grep email --json
|
|
17832
|
-
deepline
|
|
17884
|
+
deepline describe prebuilt/company-to-contact
|
|
17833
17885
|
`
|
|
17834
17886
|
).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (query, options) => {
|
|
17835
17887
|
process.exitCode = await handlePlayGrep([
|
|
@@ -17837,7 +17889,7 @@ Examples:
|
|
|
17837
17889
|
...options.json ? ["--json"] : []
|
|
17838
17890
|
]);
|
|
17839
17891
|
});
|
|
17840
|
-
play.command("describe [target]").usage("<target> [options]").description("Describe a play contract and how to run it.").addHelpText(
|
|
17892
|
+
const describeCommand = play.command("describe [target]", { hidden: true }).usage("<target> [options]").description("Describe a play contract and how to run it.").addHelpText(
|
|
17841
17893
|
"after",
|
|
17842
17894
|
`
|
|
17843
17895
|
Notes:
|
|
@@ -17855,11 +17907,33 @@ Examples:
|
|
|
17855
17907
|
).option("--compact", "Emit compact schemas").option(
|
|
17856
17908
|
"--json [fields]",
|
|
17857
17909
|
"JSON output; optionally select comma-separated dotted paths"
|
|
17858
|
-
)
|
|
17859
|
-
|
|
17860
|
-
|
|
17861
|
-
|
|
17862
|
-
|
|
17910
|
+
);
|
|
17911
|
+
_chunkXNL3SEMCjs.addDescribeOptions.call(void 0, describeCommand, { json: false }).action(
|
|
17912
|
+
async (target, options) => {
|
|
17913
|
+
const ownView = () => handlePlayDescribe(_chunk6LLJWMYHjs.describeArgs.call(void 0, target, options));
|
|
17914
|
+
const [flagText] = [options.json].filter(
|
|
17915
|
+
(value) => typeof value === "string"
|
|
17916
|
+
);
|
|
17917
|
+
const name = target || flagText;
|
|
17918
|
+
const selectsFields = Boolean(target && flagText);
|
|
17919
|
+
const own = !name || options.compact || selectsFields || looksLikeRunId(name) || isFileTarget(name) || looksLikeFilePath(name);
|
|
17920
|
+
if (own) {
|
|
17921
|
+
process.exitCode = await ownView();
|
|
17922
|
+
return;
|
|
17923
|
+
}
|
|
17924
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-X2AFAC4B.js")));
|
|
17925
|
+
process.exitCode = await describeAnything(
|
|
17926
|
+
name,
|
|
17927
|
+
{
|
|
17928
|
+
...options,
|
|
17929
|
+
kinds: ["prebuilts", "custom"],
|
|
17930
|
+
json: Boolean(options.json)
|
|
17931
|
+
},
|
|
17932
|
+
// An unknown play keeps this command's suggestions.
|
|
17933
|
+
ownView
|
|
17934
|
+
);
|
|
17935
|
+
}
|
|
17936
|
+
);
|
|
17863
17937
|
play.command("versions").description("List revisions for a named play.").addHelpText(
|
|
17864
17938
|
"after",
|
|
17865
17939
|
`
|
|
@@ -17964,7 +18038,7 @@ Examples:
|
|
|
17964
18038
|
deepline plays deployments <deployment-id>
|
|
17965
18039
|
`
|
|
17966
18040
|
).option("--limit <n>", "Max rows (default 50)").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(
|
|
17967
|
-
async (id, options) => id ?
|
|
18041
|
+
async (id, options) => id ? _chunkT4IJQKREjs.handleDeploymentGet.call(void 0, id, options) : _chunkT4IJQKREjs.handleDeploymentsList.call(void 0, options)
|
|
17968
18042
|
);
|
|
17969
18043
|
addPublishHelp(
|
|
17970
18044
|
play.command("publish <target>").description(
|
|
@@ -18144,7 +18218,7 @@ Examples:
|
|
|
18144
18218
|
).action(async (runId, options) => {
|
|
18145
18219
|
process.exitCode = await handleRunGet([
|
|
18146
18220
|
runId,
|
|
18147
|
-
...
|
|
18221
|
+
..._chunk6LLJWMYHjs.jsonFieldArgs.call(void 0, options.json),
|
|
18148
18222
|
...options.full ? ["--full"] : [],
|
|
18149
18223
|
...options.input ? ["--input"] : [],
|
|
18150
18224
|
...options.config ? ["--config"] : [],
|
|
@@ -18419,7 +18493,7 @@ Examples:
|
|
|
18419
18493
|
...options.metadataOut ? ["--metadata-out", options.metadataOut] : [],
|
|
18420
18494
|
...options.wait ? ["--wait"] : [],
|
|
18421
18495
|
...options.timeoutMs ? ["--timeout-ms", options.timeoutMs] : [],
|
|
18422
|
-
...
|
|
18496
|
+
..._chunk6LLJWMYHjs.jsonFieldArgs.call(void 0, options.json)
|
|
18423
18497
|
]);
|
|
18424
18498
|
});
|
|
18425
18499
|
const share = play.command("share").description(
|
|
@@ -18585,10 +18659,10 @@ async function handlePlayShareStatus(args) {
|
|
|
18585
18659
|
return 2;
|
|
18586
18660
|
}
|
|
18587
18661
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18588
|
-
const status = await new (0,
|
|
18662
|
+
const status = await new (0, _chunkULI6UVV6js.DeeplineClient)().getSharePage(name);
|
|
18589
18663
|
const outputStatus = shareStatusForOutput(status);
|
|
18590
|
-
if (
|
|
18591
|
-
|
|
18664
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
18665
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, outputStatus);
|
|
18592
18666
|
return 0;
|
|
18593
18667
|
}
|
|
18594
18668
|
if (!outputStatus.share) {
|
|
@@ -18627,7 +18701,7 @@ async function handlePlaySharePublish(args) {
|
|
|
18627
18701
|
return 2;
|
|
18628
18702
|
}
|
|
18629
18703
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18630
|
-
const client = new (0,
|
|
18704
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
18631
18705
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18632
18706
|
let resolvedVersion;
|
|
18633
18707
|
if (!revisionId) {
|
|
@@ -18658,8 +18732,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18658
18732
|
);
|
|
18659
18733
|
if (!hasCompleted) {
|
|
18660
18734
|
const message = `No completed run for ${name}. Publish a play only after it has run successfully. (Override with --no-run-check.)`;
|
|
18661
|
-
if (
|
|
18662
|
-
|
|
18735
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
18736
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, {
|
|
18663
18737
|
ok: false,
|
|
18664
18738
|
code: "NO_SUCCESSFUL_RUN",
|
|
18665
18739
|
message,
|
|
@@ -18683,8 +18757,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18683
18757
|
};
|
|
18684
18758
|
if (args.includes("--dry-run")) {
|
|
18685
18759
|
const plan = { dryRun: true, name, version: resolvedVersion, ...request };
|
|
18686
|
-
if (
|
|
18687
|
-
|
|
18760
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
18761
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, plan);
|
|
18688
18762
|
} else {
|
|
18689
18763
|
console.log(
|
|
18690
18764
|
`Would publish ${name}${resolvedVersion ? ` v${resolvedVersion}` : ""} (revision ${revisionId}).`
|
|
@@ -18694,8 +18768,8 @@ async function handlePlaySharePublish(args) {
|
|
|
18694
18768
|
}
|
|
18695
18769
|
const status = await client.publishSharePage(name, request);
|
|
18696
18770
|
const outputStatus = shareStatusForOutput(status);
|
|
18697
|
-
if (
|
|
18698
|
-
|
|
18771
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
18772
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, outputStatus);
|
|
18699
18773
|
return 0;
|
|
18700
18774
|
}
|
|
18701
18775
|
const urls = shareUrlFields(outputStatus);
|
|
@@ -18726,9 +18800,9 @@ async function handlePlayShareUpdate(args) {
|
|
|
18726
18800
|
...args.includes("--show-latency") ? { showAverageLatency: true } : args.includes("--hide-latency") ? { showAverageLatency: false } : {},
|
|
18727
18801
|
...seoIndexing ? { seoIndexing } : {}
|
|
18728
18802
|
};
|
|
18729
|
-
const status = await new (0,
|
|
18730
|
-
if (
|
|
18731
|
-
|
|
18803
|
+
const status = await new (0, _chunkULI6UVV6js.DeeplineClient)().updateSharePage(name, request);
|
|
18804
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
18805
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, status);
|
|
18732
18806
|
return 0;
|
|
18733
18807
|
}
|
|
18734
18808
|
console.log(`Updated ${name} share settings.`);
|
|
@@ -18743,7 +18817,7 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18743
18817
|
return 2;
|
|
18744
18818
|
}
|
|
18745
18819
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18746
|
-
const client = new (0,
|
|
18820
|
+
const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
|
|
18747
18821
|
let revisionId = shareFlagValue(args, "--revision-id");
|
|
18748
18822
|
const versionFlag = shareFlagValue(args, "--version");
|
|
18749
18823
|
if (!revisionId && versionFlag) {
|
|
@@ -18760,8 +18834,8 @@ async function handlePlayShareRegenerate(args) {
|
|
|
18760
18834
|
revisionId ? { revisionId } : {}
|
|
18761
18835
|
);
|
|
18762
18836
|
const outputStatus = shareStatusForOutput(status);
|
|
18763
|
-
if (
|
|
18764
|
-
|
|
18837
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
18838
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, outputStatus);
|
|
18765
18839
|
return 0;
|
|
18766
18840
|
}
|
|
18767
18841
|
const urls = shareUrlFields(outputStatus);
|
|
@@ -18786,9 +18860,9 @@ async function handlePlayShareUnpublish(args) {
|
|
|
18786
18860
|
return 2;
|
|
18787
18861
|
}
|
|
18788
18862
|
const name = parseReferencedPlayTarget2(target).playName;
|
|
18789
|
-
const status = await new (0,
|
|
18790
|
-
if (
|
|
18791
|
-
|
|
18863
|
+
const status = await new (0, _chunkULI6UVV6js.DeeplineClient)().unpublishSharePage(name);
|
|
18864
|
+
if (_chunk6LLJWMYHjs.argsWantJson.call(void 0, args)) {
|
|
18865
|
+
_chunk6LLJWMYHjs.printCompactJson.call(void 0, status);
|
|
18792
18866
|
return 0;
|
|
18793
18867
|
}
|
|
18794
18868
|
console.log(`Unpublished ${name}; the public page has been removed.`);
|
|
@@ -18858,4 +18932,6 @@ async function handlePlayShareUnpublish(args) {
|
|
|
18858
18932
|
|
|
18859
18933
|
|
|
18860
18934
|
|
|
18861
|
-
|
|
18935
|
+
|
|
18936
|
+
|
|
18937
|
+
exports.resolveDatasetByName = resolveDatasetByName; exports.loadPlayBundler = loadPlayBundler; exports.parsePlayRunHeaderFlag = parsePlayRunHeaderFlag; exports.writePlayRunIdFile = writePlayRunIdFile; exports.preflightLocalFileInputs = preflightLocalFileInputs; exports.describeSleepUntil = describeSleepUntil; exports.getFinalStatusFromLiveEvent = getFinalStatusFromLiveEvent; exports.formatStepLabelFromNodeId = formatStepLabelFromNodeId; exports.getStepTransitionLineFromLiveEvent = getStepTransitionLineFromLiveEvent; exports.getProgressLinesFromLiveEvent = getProgressLinesFromLiveEvent; exports.shouldPrintPlayProgressLine = shouldPrintPlayProgressLine; exports.getRunningHeartbeatLine = getRunningHeartbeatLine; exports.waitForPlayCompletionByWatch = waitForPlayCompletionByWatch; exports.startAndWaitForPlayCompletionByStream = startAndWaitForPlayCompletionByStream; exports.truncateErrorForDisplay = truncateErrorForDisplay; exports.clampJsonPreviewText = clampJsonPreviewText; exports.withTerminalPlayIdentity = withTerminalPlayIdentity; exports.compactPlayStatus = compactPlayStatus; exports.buildRunActivityTextLines = buildRunActivityTextLines; exports.buildRunPackageTextLines = buildRunPackageTextLines; exports.buildRunLaunch = buildRunLaunch; exports.buildPlayCompletionTextLines = buildPlayCompletionTextLines; exports.resolvePlayRunOutputStatus = resolvePlayRunOutputStatus; exports.assertDatasetHasExportableRows = assertDatasetHasExportableRows; exports.exportPlayStatusRows = exportPlayStatusRows; exports.parsePlayRunOptions = parsePlayRunOptions; exports.parsePlayPublishOptions = parsePlayPublishOptions; exports.formatPlaySandboxRuntimeWarning = formatPlaySandboxRuntimeWarning; exports.handlePlayCheck = handlePlayCheck; exports.handlePlayRun = handlePlayRun; exports.renderRunOverviewText = renderRunOverviewText; exports.handleRunGet = handleRunGet; exports.handleRunLifecycleStatus = handleRunLifecycleStatus; exports.handleRunsRerun = handleRunsRerun; exports.handleRunsList = handleRunsList; exports.handleRunTail = handleRunTail; exports.handleRunLogs = handleRunLogs; exports.selectRunLogTailPage = selectRunLogTailPage; exports.handleRunEventSearch = handleRunEventSearch; exports.buildRunLogsText = buildRunLogsText; exports.resolveRunStopState = resolveRunStopState; exports.handleRunStop = handleRunStop; exports.buildStopAllDryRunTextLines = buildStopAllDryRunTextLines; exports.handleRunStopAll = handleRunStopAll; exports.handleRunExport = handleRunExport; exports.handlePlayGet = handlePlayGet; exports.handlePlayVersions = handlePlayVersions; exports.PREBUILT_PLAY_TAG_KEYS = PREBUILT_PLAY_TAG_KEYS; exports.handlePlayList = handlePlayList; exports.handlePlayPin = handlePlayPin; exports.csvColumnLines = csvColumnLines; exports.describedPlay = describedPlay; exports.handlePlayGrep = handlePlayGrep; exports.handlePlayDescribe = handlePlayDescribe; exports.handlePlaySave = handlePlaySave; exports.handlePlayPublish = handlePlayPublish; exports.handlePlayDelete = handlePlayDelete; exports.handlePlayRestore = handlePlayRestore; exports.registerPlayCommands = registerPlayCommands; exports.handlePlayShareStatus = handlePlayShareStatus; exports.handlePlaySharePublish = handlePlaySharePublish; exports.handlePlayShareUpdate = handlePlayShareUpdate; exports.handlePlayShareRegenerate = handlePlayShareRegenerate; exports.handlePlayShareUnpublish = handlePlayShareUnpublish;
|