deepline 0.3.471 → 0.3.472
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +9 -0
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +7 -0
- package/dist/cli/{auth-MUCIXHJF.mjs → auth-35DAEPHC.mjs} +5 -5
- package/dist/cli/auth-Q5TM66UI.js +41 -0
- package/dist/cli/{billing-BQQNTCTV.js → billing-5ED5X2IO.js} +79 -79
- package/dist/cli/{billing-QGCTDE2N.mjs → billing-CXVBJEC4.mjs} +6 -6
- package/dist/cli/{chunk-RUWBAU6V.js → chunk-2DND7LLL.js} +8 -8
- package/dist/cli/{chunk-WDXJUZCY.js → chunk-2G4R4APL.js} +2 -2
- package/dist/cli/{chunk-ZAF54BQK.mjs → chunk-2S36YV2K.mjs} +1 -1
- package/dist/cli/{chunk-NPJY5QRC.js → chunk-3L76SFGN.js} +53 -53
- package/dist/cli/{chunk-OYHCMKZM.mjs → chunk-4NFBYW7X.mjs} +2 -2
- package/dist/cli/{chunk-FJBGBPYY.mjs → chunk-52VOORHM.mjs} +2 -2
- package/dist/cli/{chunk-MLQJVAVS.js → chunk-5FHU67AT.js} +3 -3
- package/dist/cli/{chunk-SIQV6UYG.mjs → chunk-6PKONIIP.mjs} +4 -4
- package/dist/cli/{chunk-6DTW6JND.js → chunk-6ZTSHKJF.js} +19 -5
- package/dist/cli/{chunk-J2NYCUTK.js → chunk-7KAS4QOW.js} +94 -89
- package/dist/cli/{chunk-IE5KAVTI.mjs → chunk-C5PY2PP6.mjs} +3 -3
- package/dist/cli/{chunk-U5RGCQWJ.mjs → chunk-CFDQZQE2.mjs} +2 -2
- package/dist/cli/{chunk-4OAA43RX.mjs → chunk-FHIO7WI2.mjs} +2 -2
- package/dist/cli/{chunk-NBPNYD54.js → chunk-GJPRBELO.js} +16 -16
- package/dist/cli/{chunk-YRM5TPXL.js → chunk-H7YFUC3J.js} +7 -7
- package/dist/cli/{chunk-KSUGLTX3.js → chunk-HBVT4FW5.js} +6 -6
- package/dist/cli/{chunk-VGIAOWCD.js → chunk-IIQ6O5F3.js} +5 -5
- package/dist/cli/{chunk-ATKFOOVD.mjs → chunk-IPJ27SD2.mjs} +5 -5
- package/dist/cli/{chunk-3PT2HJKC.mjs → chunk-JRZW4LWK.mjs} +1 -1
- package/dist/cli/{chunk-FVGT5EBA.mjs → chunk-KQJHIVCE.mjs} +1 -1
- package/dist/cli/{chunk-DFMFYOML.js → chunk-L3AXQXNT.js} +10 -10
- package/dist/cli/{chunk-CR2F3JZN.js → chunk-LQUOZGM6.js} +51 -51
- package/dist/cli/{chunk-RWCTGSD7.js → chunk-M475BQ77.js} +3 -3
- package/dist/cli/{chunk-K5USD25Z.mjs → chunk-MRZ7AO72.mjs} +10 -10
- package/dist/cli/{chunk-IPFUDUSY.mjs → chunk-NZBZFEVA.mjs} +4 -4
- package/dist/cli/{chunk-TWRK4NOU.js → chunk-ODAARZSK.js} +36 -36
- package/dist/cli/{chunk-ZMJOSD7R.mjs → chunk-OMPW5ELS.mjs} +1 -1
- package/dist/cli/{chunk-4PT2WZD2.js → chunk-QLVYYDUI.js} +26 -26
- package/dist/cli/{chunk-PVEEGJFN.mjs → chunk-QSCLOPWR.mjs} +1 -1
- package/dist/cli/{chunk-VVY3HGFM.mjs → chunk-R6L6JRDR.mjs} +2 -2
- package/dist/cli/{chunk-EHVVDHNU.mjs → chunk-R73LE2IM.mjs} +1 -1
- package/dist/cli/{chunk-FX3QM6WN.js → chunk-RDOPZK7A.js} +3 -3
- package/dist/cli/{chunk-E3WTQ3JI.js → chunk-RMQB72WW.js} +9 -9
- package/dist/cli/{chunk-5QWGL2QO.js → chunk-SBPI7AEB.js} +93 -93
- package/dist/cli/{chunk-VDRGX2XL.js → chunk-SKVMC6K6.js} +5 -5
- package/dist/cli/{chunk-DK5Y5BD3.js → chunk-SYWOSAW7.js} +4 -4
- package/dist/cli/{chunk-EYKMITTY.mjs → chunk-T5H7ETIM.mjs} +4 -4
- package/dist/cli/{chunk-AMUSZHCE.mjs → chunk-TMMODGPV.mjs} +2 -2
- package/dist/cli/{chunk-G6RQXAJ2.js → chunk-UKKCS6Z4.js} +1 -1
- package/dist/cli/{chunk-ZHM7VCKH.js → chunk-UPXGN62E.js} +21 -21
- package/dist/cli/{chunk-DV4V5IWI.mjs → chunk-UXFUD2MB.mjs} +5 -5
- package/dist/cli/{chunk-NLT3CFVJ.js → chunk-VDHDTXCK.js} +2 -2
- package/dist/cli/{chunk-GPSVXVDZ.js → chunk-XSSIBO74.js} +8 -8
- package/dist/cli/{chunk-MV6HL67R.mjs → chunk-YK64LQPQ.mjs} +6 -1
- package/dist/cli/{chunk-RYGJWMWL.mjs → chunk-YMB2CD55.mjs} +1 -1
- package/dist/cli/{chunk-E2SHDT7T.mjs → chunk-YNW47NOJ.mjs} +2 -2
- package/dist/cli/{chunk-V2WMJXU6.mjs → chunk-YUNPYX5T.mjs} +19 -5
- package/dist/cli/{chunk-2KBRY5CA.mjs → chunk-ZZQIS3TH.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-Q6BSRCBJ.mjs → csv-OSDYY3QW.mjs} +4 -4
- package/dist/cli/{csv-UE7RZDUV.js → csv-SQJQM3B2.js} +13 -13
- package/dist/cli/{db-FI6XXB2H.mjs → db-2M6BU6G5.mjs} +6 -6
- package/dist/cli/{db-T7A7EE3D.js → db-ATDYXAD5.js} +27 -27
- package/dist/cli/describe-37QXXDCF.js +48 -0
- package/dist/cli/{describe-4GGU6NU3.mjs → describe-WIAJCWF3.mjs} +17 -17
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-S46XI7NX.mjs → executions-2J6CCJL2.mjs} +6 -6
- package/dist/cli/{executions-4I6F5RMS.js → executions-Y32LMYH6.js} +8 -8
- package/dist/cli/{feedback-3LJ7NZE7.mjs → feedback-L4AVIMGI.mjs} +4 -4
- package/dist/cli/{feedback-VEGUNKSP.js → feedback-RXQLS6QU.js} +8 -8
- package/dist/cli/git-JGUR335T.js +25 -0
- package/dist/cli/{git-W7SFD7AA.mjs → git-V3K77AWH.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-3EMB5SJH.js → legacy-noops-B2KJT4CZ.js} +8 -8
- package/dist/cli/{legacy-noops-FIR5PSHG.mjs → legacy-noops-LOGMYOY5.mjs} +5 -5
- package/dist/cli/{monitors-4DKW25PV.mjs → monitors-5ETSB7S7.mjs} +7 -7
- package/dist/cli/{monitors-53LPJH6R.js → monitors-A5WYUCGD.js} +91 -91
- package/dist/cli/{org-CYLJFX4Q.js → org-7EZDWYKK.js} +72 -72
- package/dist/cli/{org-6ZV2DBGI.mjs → org-BJOAUSXL.mjs} +6 -6
- package/dist/cli/{pages-V3LEXCRL.mjs → pages-3BYGBTVK.mjs} +6 -6
- package/dist/cli/{pages-42E3WIMH.js → pages-45VNTEQU.js} +17 -17
- package/dist/cli/{play-O3OY556F.js → play-5KER3JFU.js} +334 -306
- package/dist/cli/{play-X7REMNNG.mjs → play-R7JQV533.mjs} +47 -19
- package/dist/cli/{providers-NZ7TISS3.js → providers-OHMZ6QIF.js} +9 -9
- package/dist/cli/{providers-L2DJVAXN.mjs → providers-RMFCE6MM.mjs} +6 -6
- package/dist/cli/{quickstart-IKNGAQRO.js → quickstart-GNRE4SAT.js} +6 -6
- package/dist/cli/{quickstart-ROWMAUXQ.mjs → quickstart-IHR4VC5K.mjs} +4 -4
- package/dist/cli/{run-JG6DLOYR.js → run-77QIMUUV.js} +36 -36
- package/dist/cli/{run-PJI577J2.mjs → run-Y4MIRFJY.mjs} +22 -22
- package/dist/cli/{search-DOVJ745X.mjs → search-24YKTHMK.mjs} +7 -7
- package/dist/cli/search-S3VO2UKV.js +32 -0
- package/dist/cli/{secrets-OKDFNCRJ.mjs → secrets-KHX62AWC.mjs} +6 -6
- package/dist/cli/{secrets-R5LWXIG6.js → secrets-SSEBT3IS.js} +15 -15
- package/dist/cli/{sessions-L3DSAY2T.js → sessions-E6KNWYEH.js} +6 -6
- package/dist/cli/{sessions-KX4C2CKS.mjs → sessions-H7T25HGE.mjs} +5 -5
- package/dist/cli/{settings-NKTNNTAP.js → settings-GXUYF5G7.js} +78 -78
- package/dist/cli/{settings-W3SMDBYS.mjs → settings-XSJG6M32.mjs} +11 -11
- package/dist/cli/{setup-7KFKKW2W.mjs → setup-GD7IOD4U.mjs} +9 -9
- package/dist/cli/{setup-5WZEXWQR.js → setup-JP5YPIA4.js} +44 -44
- package/dist/cli/skills-C4KTW3US.js +31 -0
- package/dist/cli/{skills-X5TLATOL.mjs → skills-HLHE3ENN.mjs} +7 -7
- package/dist/cli/tools-KS7JMRK6.js +55 -0
- package/dist/cli/{tools-27J5EOKO.mjs → tools-Q4XIQX7W.mjs} +16 -16
- package/dist/cli/{update-EWL477FJ.mjs → update-3KRMR2QJ.mjs} +9 -9
- package/dist/cli/update-GYTQYK2W.js +33 -0
- package/dist/cli/{workflow-GFNGGHJE.js → workflow-NMUESL3O.js} +17 -17
- package/dist/cli/{workflow-YXR6YMT2.mjs → workflow-NOZ7WFEY.mjs} +7 -7
- package/dist/{client-DitOgp8N.d.mts → client-C9bJ0QXu.d.mts} +1 -1
- package/dist/{client-DIpVmXcj.d.ts → client-CuNH54w3.d.ts} +1 -1
- package/dist/{client-core-k543Fg6D.d.ts → client-core-C8Q6DKga.d.ts} +11 -1
- package/dist/{client-core-COZteOww.d.mts → client-core-CSiXbe2n.d.mts} +11 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +102 -102
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-2MMOFS3O.js +0 -41
- package/dist/cli/describe-UM2VGRY7.js +0 -48
- package/dist/cli/git-EVWKNIUA.js +0 -25
- package/dist/cli/search-RHKW5GSR.js +0 -32
- package/dist/cli/skills-UFAABPCQ.js +0 -31
- package/dist/cli/tools-IVU3BCIY.js +0 -55
- package/dist/cli/update-G7HFHKPG.js +0 -33
|
@@ -26,7 +26,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkSYWOSAW7js = require('./chunk-SYWOSAW7.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -647,7 +647,7 @@ var ToolCalls = class {
|
|
|
647
647
|
idempotencyKey,
|
|
648
648
|
onResponse: (response2) => {
|
|
649
649
|
lastResponse = null;
|
|
650
|
-
atomicToolsSupported = response2.headers.get(
|
|
650
|
+
atomicToolsSupported = response2.headers.get(_chunkSYWOSAW7js.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
651
651
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
652
652
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
653
653
|
try {
|
|
@@ -1026,8 +1026,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1028
1028
|
return {
|
|
1029
|
-
[
|
|
1030
|
-
...receivers ? { [
|
|
1029
|
+
[_chunkSYWOSAW7js.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1030
|
+
...receivers ? { [_chunkSYWOSAW7js.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
1033
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1098,7 +1098,7 @@ var PlayClient = class {
|
|
|
1098
1098
|
return _chunkJDMR33HSjs.startPlayRun.call(void 0,
|
|
1099
1099
|
this.http,
|
|
1100
1100
|
resolved.request,
|
|
1101
|
-
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1101
|
+
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkSYWOSAW7js.SDK_API_MAJOR) } : headers,
|
|
1102
1102
|
options
|
|
1103
1103
|
);
|
|
1104
1104
|
}
|
|
@@ -3175,7 +3175,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3175
3175
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3176
3176
|
);
|
|
3177
3177
|
}
|
|
3178
|
-
return { [
|
|
3178
|
+
return { [_chunkSYWOSAW7js.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3179
3179
|
}
|
|
3180
3180
|
function sleep(ms) {
|
|
3181
3181
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -5195,42 +5195,43 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5195
5195
|
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _272 => _272.grep, 'optionalAccess', _273 => _273.trim, 'call', _274 => _274()]))
|
|
5196
5196
|
params.set("inventory_paginated", "1");
|
|
5197
5197
|
if (_optionalChain([options, 'optionalAccess', _275 => _275.origin])) params.set("origin", options.origin);
|
|
5198
|
-
if (_optionalChain([options, 'optionalAccess', _276 => _276.
|
|
5198
|
+
if (_optionalChain([options, 'optionalAccess', _276 => _276.summaryOnly])) params.set("summary_only", "1");
|
|
5199
|
+
if (_optionalChain([options, 'optionalAccess', _277 => _277.categories])) {
|
|
5199
5200
|
params.set(
|
|
5200
5201
|
"categories",
|
|
5201
5202
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
5202
5203
|
);
|
|
5203
5204
|
}
|
|
5204
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5205
|
+
if (_optionalChain([options, 'optionalAccess', _278 => _278.categories]) || _optionalChain([options, 'optionalAccess', _279 => _279.includeToolCategories])) {
|
|
5205
5206
|
params.set("include_tool_categories", "1");
|
|
5206
5207
|
}
|
|
5207
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5208
|
+
if (_optionalChain([options, 'optionalAccess', _280 => _280.tags])) {
|
|
5208
5209
|
params.set(
|
|
5209
5210
|
"tags",
|
|
5210
5211
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
5211
5212
|
);
|
|
5212
5213
|
}
|
|
5213
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5214
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5214
|
+
if (_optionalChain([options, 'optionalAccess', _281 => _281.includeArchived])) params.set("include_archived", "1");
|
|
5215
|
+
if (_optionalChain([options, 'optionalAccess', _282 => _282.includeCostEstimates])) {
|
|
5215
5216
|
params.set("include_cost_estimates", "1");
|
|
5216
5217
|
}
|
|
5217
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5218
|
+
if (_optionalChain([options, 'optionalAccess', _283 => _283.grep, 'optionalAccess', _284 => _284.trim, 'call', _285 => _285()])) {
|
|
5218
5219
|
params.set("grep", options.grep.trim());
|
|
5219
5220
|
params.set("limit", "60");
|
|
5220
5221
|
}
|
|
5221
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5222
|
+
if (_optionalChain([options, 'optionalAccess', _286 => _286.limit]) !== void 0) {
|
|
5222
5223
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
5223
5224
|
throw new Error("Play page limit must be a positive integer");
|
|
5224
5225
|
}
|
|
5225
5226
|
params.set("limit", String(options.limit));
|
|
5226
5227
|
}
|
|
5227
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5228
|
+
if (_optionalChain([options, 'optionalAccess', _287 => _287.cursor])) params.set("cursor", options.cursor);
|
|
5228
5229
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
5229
5230
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
5230
5231
|
return {
|
|
5231
5232
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
5232
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5233
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5233
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _288 => _288.pagination, 'optionalAccess', _289 => _289.cursor]), () => ( response.cursor)), () => ( null)),
|
|
5234
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _290 => _290.pagination, 'optionalAccess', _291 => _291.hasMore]), () => ( response.hasMore)))
|
|
5234
5235
|
};
|
|
5235
5236
|
}
|
|
5236
5237
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -5284,7 +5285,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5284
5285
|
}
|
|
5285
5286
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5286
5287
|
async startIntegrationOAuth(provider, options = {}) {
|
|
5287
|
-
const scopes = _optionalChain([options, 'access',
|
|
5288
|
+
const scopes = _optionalChain([options, 'access', _292 => _292.scopes, 'optionalAccess', _293 => _293.map, 'call', _294 => _294((scope) => scope.trim()), 'access', _295 => _295.filter, 'call', _296 => _296(Boolean)]);
|
|
5288
5289
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
5289
5290
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5290
5291
|
}
|
|
@@ -5300,8 +5301,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5300
5301
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5301
5302
|
provider: "slack",
|
|
5302
5303
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
5303
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5304
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5304
|
+
..._optionalChain([options, 'optionalAccess', _297 => _297.successUrl]) ? { success_url: options.successUrl } : {},
|
|
5305
|
+
..._optionalChain([options, 'optionalAccess', _298 => _298.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
5305
5306
|
});
|
|
5306
5307
|
}
|
|
5307
5308
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -5376,7 +5377,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5376
5377
|
}
|
|
5377
5378
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
5378
5379
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
5379
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5380
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _299 => _299[0], 'optionalAccess', _300 => _300.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
5380
5381
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
5381
5382
|
throw new Error(
|
|
5382
5383
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -5412,7 +5413,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5412
5413
|
const existingGroup = current.configuration.groups.find(
|
|
5413
5414
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
5414
5415
|
);
|
|
5415
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5416
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _301 => _301.groupKey]), () => ( notificationObjectKey("group")));
|
|
5416
5417
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
5417
5418
|
groupKey,
|
|
5418
5419
|
name,
|
|
@@ -5633,10 +5634,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5633
5634
|
async getPlay(name, options) {
|
|
5634
5635
|
return this.playClient.getPlay(name, options);
|
|
5635
5636
|
}
|
|
5637
|
+
/** Estimate one Play without reading the rest of the workspace catalog. */
|
|
5638
|
+
async getPlayCostEstimate(name) {
|
|
5639
|
+
return this.http.get(`/api/v2/plays/${encodeURIComponent(name)}/cost`);
|
|
5640
|
+
}
|
|
5636
5641
|
/** Read one trigger inventory page without loading run histories. */
|
|
5637
5642
|
async listPlayTriggerInventory(options) {
|
|
5638
5643
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5639
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5644
|
+
if (_optionalChain([options, 'optionalAccess', _302 => _302.cursor])) params.set("cursor", options.cursor);
|
|
5640
5645
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5641
5646
|
}
|
|
5642
5647
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5645,7 +5650,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5645
5650
|
view: "history",
|
|
5646
5651
|
binding_id: bindingId
|
|
5647
5652
|
});
|
|
5648
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5653
|
+
if (_optionalChain([options, 'optionalAccess', _303 => _303.limit]) !== void 0)
|
|
5649
5654
|
params.set("history_limit", String(options.limit));
|
|
5650
5655
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5651
5656
|
}
|
|
@@ -5833,14 +5838,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5833
5838
|
*/
|
|
5834
5839
|
async runPlay(code, csvPath, name, options) {
|
|
5835
5840
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
5836
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
5837
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
5838
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
5839
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
5840
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
5841
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
5842
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
5843
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
5841
|
+
input: _optionalChain([options, 'optionalAccess', _304 => _304.input]),
|
|
5842
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _305 => _305.sourceCode]),
|
|
5843
|
+
artifact: _optionalChain([options, 'optionalAccess', _306 => _306.artifact]),
|
|
5844
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _307 => _307.compilerManifest]),
|
|
5845
|
+
inputFile: _optionalChain([options, 'optionalAccess', _308 => _308.inputFile]),
|
|
5846
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _309 => _309.packagedFiles]),
|
|
5847
|
+
force: _optionalChain([options, 'optionalAccess', _310 => _310.force]),
|
|
5848
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _311 => _311.forceToolRefresh])
|
|
5844
5849
|
});
|
|
5845
5850
|
const start = Date.now();
|
|
5846
5851
|
const state = {
|
|
@@ -5851,7 +5856,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5851
5856
|
latest: null
|
|
5852
5857
|
};
|
|
5853
5858
|
let terminalObserved = null;
|
|
5854
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5859
|
+
if (_optionalChain([options, 'optionalAccess', _312 => _312.signal, 'optionalAccess', _313 => _313.aborted])) {
|
|
5855
5860
|
await this.cancelPlay(workflowId);
|
|
5856
5861
|
return {
|
|
5857
5862
|
success: false,
|
|
@@ -5862,9 +5867,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5862
5867
|
};
|
|
5863
5868
|
}
|
|
5864
5869
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
5865
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
5870
|
+
signal: _optionalChain([options, 'optionalAccess', _314 => _314.signal])
|
|
5866
5871
|
})) {
|
|
5867
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5872
|
+
if (_optionalChain([options, 'optionalAccess', _315 => _315.signal, 'optionalAccess', _316 => _316.aborted])) {
|
|
5868
5873
|
await this.cancelPlay(workflowId);
|
|
5869
5874
|
return {
|
|
5870
5875
|
success: false,
|
|
@@ -5874,19 +5879,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5874
5879
|
error: "Cancelled by user"
|
|
5875
5880
|
};
|
|
5876
5881
|
}
|
|
5877
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
5882
|
+
const previousStatus = _optionalChain([state, 'access', _317 => _317.latest, 'optionalAccess', _318 => _318.status]);
|
|
5878
5883
|
const status = updatePlayLiveStatusState(state, event);
|
|
5879
5884
|
if (!status) {
|
|
5880
5885
|
continue;
|
|
5881
5886
|
}
|
|
5882
5887
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5883
|
-
_optionalChain([options, 'optionalAccess',
|
|
5888
|
+
_optionalChain([options, 'optionalAccess', _319 => _319.onProgress, 'optionalCall', _320 => _320(status)]);
|
|
5884
5889
|
}
|
|
5885
5890
|
if (_chunkJDMR33HSjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
5886
5891
|
terminalObserved = status;
|
|
5887
5892
|
}
|
|
5888
5893
|
}
|
|
5889
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5894
|
+
if (_optionalChain([options, 'optionalAccess', _321 => _321.signal, 'optionalAccess', _322 => _322.aborted])) {
|
|
5890
5895
|
await this.cancelPlay(workflowId);
|
|
5891
5896
|
return {
|
|
5892
5897
|
success: false,
|
|
@@ -5939,7 +5944,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5939
5944
|
const response = await this.http.get(
|
|
5940
5945
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
5941
5946
|
);
|
|
5942
|
-
const event = _optionalChain([response, 'access',
|
|
5947
|
+
const event = _optionalChain([response, 'access', _323 => _323.entries, 'optionalAccess', _324 => _324[0]]);
|
|
5943
5948
|
if (!event) {
|
|
5944
5949
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5945
5950
|
"No usage event was found for this request_id.",
|
|
@@ -6113,7 +6118,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6113
6118
|
async cancelBillingSubscription(options) {
|
|
6114
6119
|
return this.http.post(
|
|
6115
6120
|
"/api/v2/billing/subscription/cancel",
|
|
6116
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6121
|
+
{ action: _optionalChain([options, 'optionalAccess', _325 => _325.undo]) ? "undo_cancel" : "cancel" }
|
|
6117
6122
|
);
|
|
6118
6123
|
}
|
|
6119
6124
|
/**
|
|
@@ -6125,7 +6130,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6125
6130
|
*/
|
|
6126
6131
|
async listBillingInvoices(options) {
|
|
6127
6132
|
const params = new URLSearchParams();
|
|
6128
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6133
|
+
if (_optionalChain([options, 'optionalAccess', _326 => _326.limit]) !== void 0) {
|
|
6129
6134
|
params.set("limit", String(options.limit));
|
|
6130
6135
|
}
|
|
6131
6136
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6235,7 +6240,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6235
6240
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6236
6241
|
async createTargetBillingPortalSession(options) {
|
|
6237
6242
|
const response = await this.http.post(
|
|
6238
|
-
_optionalChain([options, 'optionalAccess',
|
|
6243
|
+
_optionalChain([options, 'optionalAccess', _327 => _327.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
6239
6244
|
{}
|
|
6240
6245
|
);
|
|
6241
6246
|
return response.data;
|
|
@@ -6285,8 +6290,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6285
6290
|
return this.http.request("/api/v2/monitors/audit", {
|
|
6286
6291
|
method: "POST",
|
|
6287
6292
|
body: {
|
|
6288
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6289
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6293
|
+
..._optionalChain([options, 'optionalAccess', _328 => _328.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6294
|
+
..._optionalChain([options, 'optionalAccess', _329 => _329.cursor]) ? { cursor: options.cursor } : {}
|
|
6290
6295
|
},
|
|
6291
6296
|
maxRetries: 0
|
|
6292
6297
|
});
|
|
@@ -6296,8 +6301,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6296
6301
|
return this.http.request("/api/v2/monitors/repair", {
|
|
6297
6302
|
method: "POST",
|
|
6298
6303
|
body: {
|
|
6299
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6300
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6304
|
+
..._optionalChain([options, 'optionalAccess', _330 => _330.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6305
|
+
..._optionalChain([options, 'optionalAccess', _331 => _331.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
6301
6306
|
},
|
|
6302
6307
|
maxRetries: 0
|
|
6303
6308
|
});
|
|
@@ -6305,7 +6310,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6305
6310
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
6306
6311
|
async readMonitorsHealth(options) {
|
|
6307
6312
|
const params = new URLSearchParams();
|
|
6308
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6313
|
+
if (_optionalChain([options, 'optionalAccess', _332 => _332.fleetId])) params.set("fleet_id", options.fleetId);
|
|
6309
6314
|
const query = params.toString();
|
|
6310
6315
|
const suffix = query ? `?${query}` : "";
|
|
6311
6316
|
return this.http.request(
|
|
@@ -6378,7 +6383,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6378
6383
|
);
|
|
6379
6384
|
}
|
|
6380
6385
|
const params = new URLSearchParams();
|
|
6381
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6386
|
+
if (_optionalChain([options, 'optionalAccess', _333 => _333.cursor])) params.set("cursor", options.cursor);
|
|
6382
6387
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
6383
6388
|
return this.http.request(
|
|
6384
6389
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -6425,7 +6430,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6425
6430
|
* a second charge. The submission is never replayed automatically.
|
|
6426
6431
|
*/
|
|
6427
6432
|
async previewMonitor(definition, options) {
|
|
6428
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6433
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _334 => _334.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _335 => _335.crypto, 'optionalAccess', _336 => _336.randomUUID, 'optionalCall', _337 => _337()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
6429
6434
|
try {
|
|
6430
6435
|
const result = await this.http.request(
|
|
6431
6436
|
"/api/v2/monitors/preview",
|
|
@@ -6433,7 +6438,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6433
6438
|
method: "POST",
|
|
6434
6439
|
body: {
|
|
6435
6440
|
...definition,
|
|
6436
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6441
|
+
..._optionalChain([options, 'optionalAccess', _338 => _338.limit]) === void 0 ? {} : { limit: options.limit }
|
|
6437
6442
|
},
|
|
6438
6443
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
6439
6444
|
maxRetries: 0,
|
|
@@ -6455,7 +6460,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6455
6460
|
* `client.monitors.deploy(...)`.
|
|
6456
6461
|
*/
|
|
6457
6462
|
async deployMonitor(definition, options) {
|
|
6458
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6463
|
+
if (_optionalChain([options, 'optionalAccess', _339 => _339.dryRun])) {
|
|
6459
6464
|
return this.http.request("/api/v2/monitors/check", {
|
|
6460
6465
|
method: "POST",
|
|
6461
6466
|
body: definition
|
|
@@ -6491,12 +6496,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6491
6496
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
6492
6497
|
async listMonitors(options) {
|
|
6493
6498
|
const params = new URLSearchParams();
|
|
6494
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6495
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
6496
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6499
|
+
if (_optionalChain([options, 'optionalAccess', _340 => _340.state])) params.set("state", options.state);
|
|
6500
|
+
else if (_optionalChain([options, 'optionalAccess', _341 => _341.status])) params.set("status", options.status);
|
|
6501
|
+
if (_optionalChain([options, 'optionalAccess', _342 => _342.limit]) !== void 0)
|
|
6497
6502
|
params.set("limit", String(options.limit));
|
|
6498
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6499
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6503
|
+
if (_optionalChain([options, 'optionalAccess', _343 => _343.cursor])) params.set("cursor", options.cursor);
|
|
6504
|
+
if (_optionalChain([options, 'optionalAccess', _344 => _344.includeConsumers])) params.set("include_consumers", "true");
|
|
6500
6505
|
const query = params.toString();
|
|
6501
6506
|
const suffix = query ? `?${query}` : "";
|
|
6502
6507
|
return this.http.request(
|
|
@@ -6512,7 +6517,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6512
6517
|
);
|
|
6513
6518
|
}
|
|
6514
6519
|
async testMonitorWebhook(key, payload, options) {
|
|
6515
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6520
|
+
if (_optionalChain([options, 'optionalAccess', _345 => _345.dispatch]) === true || _optionalChain([options, 'optionalAccess', _346 => _346.validationOnly]) === false) {
|
|
6516
6521
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6517
6522
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6518
6523
|
void 0,
|
|
@@ -6567,7 +6572,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6567
6572
|
}
|
|
6568
6573
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6569
6574
|
async deleteMonitor(key, options) {
|
|
6570
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6575
|
+
if (_optionalChain([options, 'optionalAccess', _347 => _347.localOnly]) === true) {
|
|
6571
6576
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6572
6577
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6573
6578
|
void 0,
|
|
@@ -6575,11 +6580,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6575
6580
|
);
|
|
6576
6581
|
}
|
|
6577
6582
|
const params = new URLSearchParams();
|
|
6578
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6583
|
+
if (_optionalChain([options, 'optionalAccess', _348 => _348.dryRun])) params.set("dry_run", "true");
|
|
6579
6584
|
const query = params.toString();
|
|
6580
6585
|
return this.http.request(
|
|
6581
6586
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6582
|
-
_optionalChain([options, 'optionalAccess',
|
|
6587
|
+
_optionalChain([options, 'optionalAccess', _349 => _349.dryRun]) ? { method: "DELETE" } : {
|
|
6583
6588
|
method: "DELETE",
|
|
6584
6589
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6585
6590
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6592,10 +6597,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6592
6597
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6593
6598
|
*/
|
|
6594
6599
|
async reactivateMonitor(key, options) {
|
|
6595
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6600
|
+
const query = _optionalChain([options, 'optionalAccess', _350 => _350.dryRun]) ? "?dry_run=true" : "";
|
|
6596
6601
|
return this.http.request(
|
|
6597
6602
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6598
|
-
_optionalChain([options, 'optionalAccess',
|
|
6603
|
+
_optionalChain([options, 'optionalAccess', _351 => _351.dryRun]) ? { method: "POST", body: {} } : {
|
|
6599
6604
|
method: "POST",
|
|
6600
6605
|
body: {},
|
|
6601
6606
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6609,7 +6614,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6609
6614
|
// ——————————————————————————————————————————————————————————
|
|
6610
6615
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6611
6616
|
monitorJobIdempotencyKey(operation) {
|
|
6612
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6617
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _352 => _352.crypto, 'optionalAccess', _353 => _353.randomUUID, 'optionalCall', _354 => _354()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6613
6618
|
const prefix = "monitor-job-";
|
|
6614
6619
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6615
6620
|
const maxOperationLength = Math.max(
|
|
@@ -6620,7 +6625,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6620
6625
|
}
|
|
6621
6626
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6622
6627
|
return {
|
|
6623
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6628
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _355 => _355.trim, 'call', _356 => _356()]) || this.monitorJobIdempotencyKey(operation)
|
|
6624
6629
|
};
|
|
6625
6630
|
}
|
|
6626
6631
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6631,7 +6636,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6631
6636
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6632
6637
|
headers: this.monitorJobHeaders(
|
|
6633
6638
|
"batch-deploy",
|
|
6634
|
-
_optionalChain([options, 'optionalAccess',
|
|
6639
|
+
_optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
|
|
6635
6640
|
),
|
|
6636
6641
|
maxRetries: 0,
|
|
6637
6642
|
exactUrlOnly: true
|
|
@@ -6650,11 +6655,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6650
6655
|
version: 1,
|
|
6651
6656
|
kind: "batch",
|
|
6652
6657
|
monitors: definitions,
|
|
6653
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6658
|
+
..._optionalChain([options, 'optionalAccess', _358 => _358.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6654
6659
|
},
|
|
6655
6660
|
headers: this.monitorJobHeaders(
|
|
6656
6661
|
`batch-sync-${batchId}`,
|
|
6657
|
-
_optionalChain([options, 'optionalAccess',
|
|
6662
|
+
_optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
|
|
6658
6663
|
),
|
|
6659
6664
|
maxRetries: 0,
|
|
6660
6665
|
exactUrlOnly: true
|
|
@@ -6669,7 +6674,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6669
6674
|
body: {},
|
|
6670
6675
|
headers: this.monitorJobHeaders(
|
|
6671
6676
|
`batch-start-${batchId}`,
|
|
6672
|
-
_optionalChain([options, 'optionalAccess',
|
|
6677
|
+
_optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
|
|
6673
6678
|
),
|
|
6674
6679
|
maxRetries: 0,
|
|
6675
6680
|
exactUrlOnly: true
|
|
@@ -6684,7 +6689,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6684
6689
|
body: {},
|
|
6685
6690
|
headers: this.monitorJobHeaders(
|
|
6686
6691
|
`batch-stop-${batchId}`,
|
|
6687
|
-
_optionalChain([options, 'optionalAccess',
|
|
6692
|
+
_optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
|
|
6688
6693
|
),
|
|
6689
6694
|
maxRetries: 0,
|
|
6690
6695
|
exactUrlOnly: true
|
|
@@ -6705,7 +6710,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6705
6710
|
body: {},
|
|
6706
6711
|
headers: this.monitorJobHeaders(
|
|
6707
6712
|
`${action}-${monitorKey}`,
|
|
6708
|
-
_optionalChain([options, 'optionalAccess',
|
|
6713
|
+
_optionalChain([options, 'optionalAccess', _362 => _362.idempotencyKey])
|
|
6709
6714
|
),
|
|
6710
6715
|
maxRetries: 0,
|
|
6711
6716
|
exactUrlOnly: true
|
|
@@ -6718,7 +6723,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6718
6723
|
body: definition,
|
|
6719
6724
|
headers: this.monitorJobHeaders(
|
|
6720
6725
|
`sync-${definition.key}`,
|
|
6721
|
-
_optionalChain([options, 'optionalAccess',
|
|
6726
|
+
_optionalChain([options, 'optionalAccess', _363 => _363.idempotencyKey])
|
|
6722
6727
|
),
|
|
6723
6728
|
maxRetries: 0,
|
|
6724
6729
|
exactUrlOnly: true
|
|
@@ -6731,7 +6736,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6731
6736
|
);
|
|
6732
6737
|
}
|
|
6733
6738
|
async getMonitorJobLogs(jobId, options) {
|
|
6734
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6739
|
+
const query = _optionalChain([options, 'optionalAccess', _364 => _364.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6735
6740
|
return this.http.request(
|
|
6736
6741
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6737
6742
|
{ method: "GET" }
|
|
@@ -6744,15 +6749,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6744
6749
|
);
|
|
6745
6750
|
}
|
|
6746
6751
|
async waitForMonitorJob(jobId, options) {
|
|
6747
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6748
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6752
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _365 => _365.timeoutMs]), () => ( 10 * 6e4)));
|
|
6753
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _366 => _366.pollIntervalMs]), () => ( 2e3)));
|
|
6749
6754
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6750
6755
|
const startedAt = Date.now();
|
|
6751
6756
|
let latest = await this.getMonitorJob(jobId);
|
|
6752
6757
|
while (true) {
|
|
6753
|
-
_optionalChain([options, 'optionalAccess',
|
|
6758
|
+
_optionalChain([options, 'optionalAccess', _367 => _367.onProgress, 'optionalCall', _368 => _368(latest)]);
|
|
6754
6759
|
const job = latest.job;
|
|
6755
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6760
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _369 => _369.state]) === "string" ? job.state : void 0;
|
|
6756
6761
|
if (state && terminal.has(state)) return latest;
|
|
6757
6762
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6758
6763
|
await sleep(pollIntervalMs);
|
|
@@ -6763,12 +6768,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6763
6768
|
// Monitor Fleets
|
|
6764
6769
|
// ——————————————————————————————————————————————————————————
|
|
6765
6770
|
monitorFleetIdempotencyKey(operation) {
|
|
6766
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6771
|
+
const uuid = _optionalChain([globalThis, 'access', _370 => _370.crypto, 'optionalAccess', _371 => _371.randomUUID, 'optionalCall', _372 => _372()]);
|
|
6767
6772
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6768
6773
|
}
|
|
6769
6774
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6770
6775
|
return {
|
|
6771
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6776
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _373 => _373.trim, 'call', _374 => _374()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6772
6777
|
};
|
|
6773
6778
|
}
|
|
6774
6779
|
monitorFleetPath(fleetId) {
|
|
@@ -6788,15 +6793,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6788
6793
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6789
6794
|
const body = {
|
|
6790
6795
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6791
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6792
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6796
|
+
..._optionalChain([options, 'optionalAccess', _375 => _375.dryRun]) ? { dry_run: true } : {},
|
|
6797
|
+
..._optionalChain([options, 'optionalAccess', _376 => _376.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
6793
6798
|
};
|
|
6794
6799
|
return this.http.request(
|
|
6795
6800
|
this.monitorFleetPath(fleetId),
|
|
6796
6801
|
{
|
|
6797
6802
|
method: "PUT",
|
|
6798
6803
|
body,
|
|
6799
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
6804
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _377 => _377.idempotencyKey])),
|
|
6800
6805
|
maxRetries: 0,
|
|
6801
6806
|
exactUrlOnly: true
|
|
6802
6807
|
}
|
|
@@ -6809,8 +6814,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6809
6814
|
}
|
|
6810
6815
|
async getMonitorFleet(fleetId, options) {
|
|
6811
6816
|
const params = new URLSearchParams();
|
|
6812
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6813
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6817
|
+
if (_optionalChain([options, 'optionalAccess', _378 => _378.drift])) params.set("drift", "1");
|
|
6818
|
+
if (_optionalChain([options, 'optionalAccess', _379 => _379.limit]) !== void 0)
|
|
6814
6819
|
params.set("limit", String(options.limit));
|
|
6815
6820
|
const query = params.toString();
|
|
6816
6821
|
return this.http.request(
|
|
@@ -6823,10 +6828,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6823
6828
|
this.monitorFleetPath(fleetId),
|
|
6824
6829
|
{
|
|
6825
6830
|
method: "DELETE",
|
|
6826
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
6831
|
+
body: _optionalChain([options, 'optionalAccess', _380 => _380.dryRun]) ? { dry_run: true } : {},
|
|
6827
6832
|
headers: this.monitorFleetHeaders(
|
|
6828
6833
|
"deactivate",
|
|
6829
|
-
_optionalChain([options, 'optionalAccess',
|
|
6834
|
+
_optionalChain([options, 'optionalAccess', _381 => _381.idempotencyKey])
|
|
6830
6835
|
),
|
|
6831
6836
|
maxRetries: 0,
|
|
6832
6837
|
exactUrlOnly: true
|
|
@@ -6841,7 +6846,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6841
6846
|
body: {},
|
|
6842
6847
|
headers: this.monitorFleetHeaders(
|
|
6843
6848
|
"reactivate",
|
|
6844
|
-
_optionalChain([options, 'optionalAccess',
|
|
6849
|
+
_optionalChain([options, 'optionalAccess', _382 => _382.idempotencyKey])
|
|
6845
6850
|
),
|
|
6846
6851
|
maxRetries: 0,
|
|
6847
6852
|
exactUrlOnly: true
|
|
@@ -6858,13 +6863,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6858
6863
|
* identical to "the request failed".
|
|
6859
6864
|
*/
|
|
6860
6865
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
6861
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6862
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6863
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
6866
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _383 => _383.timeoutMs]), () => ( 10 * 6e4)));
|
|
6867
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _384 => _384.pollIntervalMs]), () => ( 2e3)));
|
|
6868
|
+
const terminal = _optionalChain([options, 'optionalAccess', _385 => _385.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
|
|
6864
6869
|
const startedAt = Date.now();
|
|
6865
6870
|
let latest = await this.getMonitorFleet(fleetId);
|
|
6866
6871
|
while (true) {
|
|
6867
|
-
_optionalChain([options, 'optionalAccess',
|
|
6872
|
+
_optionalChain([options, 'optionalAccess', _386 => _386.onProgress, 'optionalCall', _387 => _387(latest)]);
|
|
6868
6873
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
6869
6874
|
if (status && terminal.has(status)) return latest;
|
|
6870
6875
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-LJ5747UC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CFDQZQE2.mjs";
|
|
7
7
|
import {
|
|
8
8
|
printCommandEnvelope,
|
|
9
9
|
renderCommandEnvelopeText
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4NFBYW7X.mjs";
|
|
11
11
|
import {
|
|
12
12
|
resolveConfig,
|
|
13
13
|
sdkCliStateDirPath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KQJHIVCE.mjs";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__toESM
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YK64LQPQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KQJHIVCE.mjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var DeeplineClient2 = class extends DeeplineClient {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-F6QV42MC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
parseLogLevel
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YK64LQPQ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
setDottedInputValue
|
|
9
9
|
} from "./chunk-NELMCOWK.mjs";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
argsWantJson,
|
|
12
12
|
jsonFieldArgs,
|
|
13
13
|
parseJsonFields
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4NFBYW7X.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineError
|
|
17
17
|
} from "./chunk-HBL4PM5Q.mjs";
|