deepline 0.3.495 → 0.3.496
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 +91 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +5 -19
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +79 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-control.ts +19 -3
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-gateway-drain.ts +110 -66
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +57 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +19 -10
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +26 -6
- package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +4 -1
- package/dist/cli/{auth-B2YUNFQ6.mjs → auth-EU4EFRDJ.mjs} +5 -5
- package/dist/cli/auth-SHWC5FMY.js +43 -0
- package/dist/cli/{billing-2Q7TMNRE.js → billing-4JJLTVK4.js} +80 -80
- package/dist/cli/{billing-5TR7ZBZM.mjs → billing-GMVH3RBX.mjs} +7 -7
- package/dist/cli/{chunk-ACVT5LPN.js → chunk-3HIPDJWJ.js} +53 -53
- package/dist/cli/{chunk-DFK5IJMT.mjs → chunk-3KA466RV.mjs} +1 -1
- package/dist/cli/{chunk-SC5GHGFD.mjs → chunk-4NKAM4GX.mjs} +2 -2
- package/dist/cli/{chunk-Z33PZUWG.js → chunk-5GK6J7MH.js} +5 -5
- package/dist/cli/{chunk-TSKVPEVZ.mjs → chunk-5M4PLPTR.mjs} +46 -3
- package/dist/cli/{chunk-CTFR52JC.js → chunk-5YSIHOGV.js} +26 -26
- package/dist/cli/{chunk-RBBOUPME.mjs → chunk-6QIAEXRH.mjs} +1 -1
- package/dist/cli/{chunk-CKLJAQIV.mjs → chunk-6UUZM4FY.mjs} +5 -5
- package/dist/cli/{chunk-T4PGA6UD.js → chunk-73CBLBNP.js} +1 -1
- package/dist/cli/{chunk-FC4JGTFC.mjs → chunk-7NBDLK3N.mjs} +1 -1
- package/dist/cli/{chunk-HJ5LYO6U.mjs → chunk-7Q7VPFPR.mjs} +2 -2
- package/dist/cli/{chunk-I66IWCY4.mjs → chunk-7U6W3CKT.mjs} +4 -4
- package/dist/cli/{chunk-TUAEM76Y.js → chunk-AOBAVBSX.js} +108 -65
- package/dist/cli/{chunk-KG2FUYWB.mjs → chunk-CNMIYEB4.mjs} +3 -3
- package/dist/cli/{chunk-DVQHG6AM.mjs → chunk-CS2AEAD6.mjs} +63 -11
- package/dist/cli/{chunk-MG3WST3Z.mjs → chunk-DFW6P6ZN.mjs} +2 -2
- package/dist/cli/{chunk-L5ZXEYTQ.mjs → chunk-E3KXXJWR.mjs} +6 -6
- package/dist/cli/{chunk-PKV5CD3W.js → chunk-EQR5O2D2.js} +87 -35
- package/dist/cli/{chunk-CAWE3MS2.js → chunk-EX4JEFYI.js} +16 -16
- package/dist/cli/{chunk-S2QARJLX.mjs → chunk-FXPICCUU.mjs} +1 -1
- package/dist/cli/{chunk-7OGADAAA.js → chunk-GKZUGHDK.js} +6 -6
- package/dist/cli/{chunk-PHO53W67.js → chunk-GRIHMNYM.js} +4 -4
- package/dist/cli/{chunk-UKGOZOTT.js → chunk-HIAFBOYA.js} +8 -8
- package/dist/cli/{chunk-FLJSK32S.mjs → chunk-IMWJRBV5.mjs} +1 -1
- package/dist/cli/{chunk-OFBDI5S3.mjs → chunk-IXPZROZX.mjs} +2 -2
- package/dist/cli/{chunk-ZBQBH4IT.js → chunk-J55ZM5CK.js} +3 -3
- package/dist/cli/{chunk-TCNILHMS.js → chunk-JEPNE4N5.js} +5 -5
- package/dist/cli/{chunk-5OKQPDYJ.js → chunk-JU4LIA2T.js} +7 -7
- package/dist/cli/{chunk-UMFZQREB.js → chunk-KKI5GWED.js} +94 -94
- package/dist/cli/{chunk-UDFO2MWA.js → chunk-MWQ3WQ4Q.js} +41 -41
- package/dist/cli/{chunk-XR6RCBB3.mjs → chunk-O36ZPHJG.mjs} +10 -10
- package/dist/cli/{chunk-XAOLMEN5.js → chunk-PHVRS56F.js} +14 -14
- package/dist/cli/{chunk-WVL5HGUG.js → chunk-QEBQIGXP.js} +2 -2
- package/dist/cli/{chunk-LQKZG5RN.js → chunk-QN6IULFT.js} +53 -53
- package/dist/cli/{chunk-SR6VS5PG.mjs → chunk-QYXUZX5N.mjs} +4 -4
- package/dist/cli/{chunk-B3ROCZ5Y.js → chunk-QZ7I4NZZ.js} +2 -2
- package/dist/cli/{chunk-7LLUJQM5.mjs → chunk-R4H5MCG4.mjs} +4 -4
- package/dist/cli/{chunk-H5L2Q2GI.mjs → chunk-SH6HOR25.mjs} +2 -2
- package/dist/cli/{chunk-TMO7W4P2.mjs → chunk-U6SE6757.mjs} +1 -1
- package/dist/cli/{chunk-7YNZRALI.mjs → chunk-UT3ORL35.mjs} +3 -3
- package/dist/cli/{chunk-PEIOQKTA.js → chunk-UTG3STCR.js} +3 -3
- package/dist/cli/{chunk-XKYQR3QK.js → chunk-W7DZ6UGP.js} +3 -3
- package/dist/cli/{chunk-ZB6UYG5I.mjs → chunk-WCBZHSC4.mjs} +5 -5
- package/dist/cli/{chunk-Y2DUGUUU.js → chunk-WEGGJMNF.js} +21 -21
- package/dist/cli/{chunk-JRBQC6L4.mjs → chunk-WTZ7Y3IZ.mjs} +2 -2
- package/dist/cli/{chunk-TFMV3NKL.mjs → chunk-YHFW7MBT.mjs} +1 -1
- package/dist/cli/{chunk-XX6PRYFI.js → chunk-Z27R2BG7.js} +16 -16
- package/dist/cli/{chunk-MAMEKGLI.js → chunk-ZL4Q4T3G.js} +7 -7
- package/dist/cli/{csv-5UQXKWLE.mjs → csv-ET7ESAPM.mjs} +4 -4
- package/dist/cli/{csv-DZQ77T67.js → csv-JWBLNEPC.js} +13 -13
- package/dist/cli/{db-JIPLUHA6.js → db-3ZGQXWTQ.js} +28 -28
- package/dist/cli/{db-F62BVFTP.mjs → db-4PIWQPR6.mjs} +7 -7
- package/dist/cli/describe-KO3OQBIR.js +50 -0
- package/dist/cli/{describe-J7KYHONJ.mjs → describe-OREUCFC2.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-XB4F2KZD.mjs → executions-HW6PMZOF.mjs} +7 -7
- package/dist/cli/{executions-XQ4FNJ27.js → executions-YR545MRU.js} +9 -9
- package/dist/cli/{feedback-5CR4CJ6W.mjs → feedback-B2FJ6HPA.mjs} +4 -4
- package/dist/cli/{feedback-Q6JRCMDV.js → feedback-FNVHJQEC.js} +8 -8
- package/dist/cli/{git-P5WBBUT3.mjs → git-CCNPW3CA.mjs} +5 -5
- package/dist/cli/git-X2QJ2B5O.js +25 -0
- package/dist/cli/index.js +137 -137
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-EJAB6III.js → legacy-noops-2EBZS45D.js} +8 -8
- package/dist/cli/{legacy-noops-H5JJVYZ2.mjs → legacy-noops-VJLCXTPB.mjs} +5 -5
- package/dist/cli/{monitors-QPFAT2J5.mjs → monitors-4AMETRW7.mjs} +190 -8
- package/dist/cli/{monitors-7DOGM7RO.js → monitors-JNWKPCN5.js} +318 -136
- package/dist/cli/{org-QOBB4IN3.js → org-7FUHVFYU.js} +73 -73
- package/dist/cli/{org-BH7ATDIJ.mjs → org-LO6GSCCG.mjs} +7 -7
- package/dist/cli/{pages-PJH2TXZQ.mjs → pages-PJ32M2PU.mjs} +7 -7
- package/dist/cli/{pages-PLTE54KM.js → pages-TT4TZOOV.js} +19 -19
- package/dist/cli/{play-ULTJ3LPA.mjs → play-QJEZAIZB.mjs} +19 -48
- package/dist/cli/{play-XZAPTF3T.js → play-VN7DFYDP.js} +618 -647
- package/dist/cli/{providers-6NUTRVE4.mjs → providers-24ER3SND.mjs} +7 -7
- package/dist/cli/{providers-SKXLW7M3.js → providers-IDFN2FCR.js} +10 -10
- package/dist/cli/{quickstart-JFCIIGII.js → quickstart-AQDCRVUQ.js} +6 -6
- package/dist/cli/{quickstart-5HMJMXVT.mjs → quickstart-FKENQU34.mjs} +4 -4
- package/dist/cli/{run-BRAXLCBC.js → run-HCASJQZY.js} +37 -37
- package/dist/cli/{run-2BJZPY4K.mjs → run-KXMRE5ZD.mjs} +23 -23
- package/dist/cli/{search-IDXSB2CV.mjs → search-3F2T33OE.mjs} +8 -8
- package/dist/cli/search-OGY6SQDJ.js +32 -0
- package/dist/cli/{search-output-CJ4TNYF7.js → search-output-GFCEGNCJ.js} +6 -6
- package/dist/cli/{search-output-AATMH4QG.mjs → search-output-U6PM5KAH.mjs} +4 -4
- package/dist/cli/{secrets-6SMKTBFT.js → secrets-KYVUP755.js} +16 -16
- package/dist/cli/{secrets-UQNEJSNG.mjs → secrets-ZZSOVXOX.mjs} +7 -7
- package/dist/cli/{sessions-MHTUVPSR.mjs → sessions-4Z62CVHL.mjs} +5 -5
- package/dist/cli/{sessions-W3KU4Q4X.js → sessions-7JFKTUQS.js} +6 -6
- package/dist/cli/{settings-KNYJ6GXK.mjs → settings-OXG7IRVC.mjs} +12 -12
- package/dist/cli/{settings-BA52NEU5.js → settings-X4PSK4EW.js} +79 -79
- package/dist/cli/{setup-D5HCJAVU.js → setup-NCJEDW4W.js} +49 -49
- package/dist/cli/{setup-TLTZ2YCO.mjs → setup-RB7JE6KA.mjs} +9 -9
- package/dist/cli/{skills-DPLM4EGS.mjs → skills-D4BR2WU2.mjs} +7 -7
- package/dist/cli/skills-WWWFRDCA.js +36 -0
- package/dist/cli/{tools-I4ZOJV23.mjs → tools-CEOD7VD5.mjs} +17 -17
- package/dist/cli/tools-QMSAA3LC.js +57 -0
- package/dist/cli/update-HTDFPN7L.js +34 -0
- package/dist/cli/{update-VIFS7IK5.mjs → update-UKUMQ6FC.mjs} +9 -9
- package/dist/cli/{workflow-TAQBNDV7.mjs → workflow-EKKTTSCJ.mjs} +8 -8
- package/dist/cli/{workflow-7REPOHXM.js → workflow-LFWQWZKS.js} +18 -18
- package/dist/{client-CKVH6tmp.d.ts → client-Cj3UqrCZ.d.ts} +1 -1
- package/dist/{client-BDT_LwuM.d.mts → client-DSCTVVRj.d.mts} +1 -1
- package/dist/{client-core-CEixe_C0.d.mts → client-core-B-8DTIN1.d.mts} +44 -3
- package/dist/{client-core-RS-d-vtY.d.ts → client-core-dI4KTuWS.d.ts} +44 -3
- package/dist/{compiler-manifest-CPEF48NM.d.mts → compiler-manifest-DlXDyndN.d.mts} +2 -0
- package/dist/{compiler-manifest-CPEF48NM.d.ts → compiler-manifest-DlXDyndN.d.ts} +2 -0
- package/dist/{errors-BWbPzqwo.d.mts → errors-BtriA2ld.d.mts} +1 -1
- package/dist/{errors-B-PJXveg.d.ts → errors-DmcLykM7.d.ts} +1 -1
- package/dist/{index-CvVxPpE8.d.ts → index--Jw-slHY.d.ts} +1 -1
- package/dist/{index-BJ8AA1F9.d.mts → index-DI0sR_fX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +110 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +2 -2
- package/dist/plays/run-request.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-GAOWVOK4.js +0 -43
- package/dist/cli/describe-BA4RAZ7J.js +0 -50
- package/dist/cli/git-EAO432S2.js +0 -25
- package/dist/cli/search-4MU2G6HV.js +0 -32
- package/dist/cli/skills-SVUWVXCE.js +0 -36
- package/dist/cli/tools-RJSP76HX.js +0 -57
- package/dist/cli/update-YT6JPIC6.js +0 -34
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.496",
|
|
53
53
|
updateSummary: {
|
|
54
54
|
introducedIn: "0.3.90",
|
|
55
55
|
summary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release."
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7NBDLK3N.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-5AEDYVB6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4NKAM4GX.mjs";
|
|
7
7
|
import {
|
|
8
8
|
printCommandEnvelope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
resolveConfig,
|
|
12
12
|
sdkCliStateDirPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7NBDLK3N.mjs";
|
|
14
14
|
|
|
15
15
|
// src/cli/commands/search.ts
|
|
16
16
|
import { Option } from "commander";
|
|
@@ -133,7 +133,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
133
133
|
});
|
|
134
134
|
if (searchRef) rememberSearchRef(searchRef);
|
|
135
135
|
pointAtDescribe(result);
|
|
136
|
-
const { renderSearchResults } = await import("./search-output-
|
|
136
|
+
const { renderSearchResults } = await import("./search-output-U6PM5KAH.mjs");
|
|
137
137
|
printCommandEnvelope(result, {
|
|
138
138
|
json: options.json === true,
|
|
139
139
|
text: renderSearchResults(result, summaryWidth)
|
|
@@ -20,7 +20,7 @@ var _chunkE4CABWXLjs = require('./chunk-E4CABWXL.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkEQR5O2D2js = require('./chunk-EQR5O2D2.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -31,7 +31,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkGRIHMNYMjs = require('./chunk-GRIHMNYM.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
|
|
@@ -652,7 +652,7 @@ var ToolCalls = class {
|
|
|
652
652
|
idempotencyKey,
|
|
653
653
|
onResponse: (response2) => {
|
|
654
654
|
lastResponse = null;
|
|
655
|
-
atomicToolsSupported = response2.headers.get(
|
|
655
|
+
atomicToolsSupported = response2.headers.get(_chunkGRIHMNYMjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
|
|
656
656
|
recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
|
|
657
657
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
|
|
658
658
|
try {
|
|
@@ -1031,8 +1031,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1033
1033
|
return {
|
|
1034
|
-
[
|
|
1035
|
-
...receivers ? { [
|
|
1034
|
+
[_chunkGRIHMNYMjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1035
|
+
...receivers ? { [_chunkGRIHMNYMjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
1038
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1066,10 +1066,10 @@ function isRecord2(value) {
|
|
|
1066
1066
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
1067
1067
|
}
|
|
1068
1068
|
function normalizePlayStatus(raw) {
|
|
1069
|
-
const runPackage =
|
|
1069
|
+
const runPackage = _chunkEQR5O2D2js.isPlayRunPackage.call(void 0, raw) ? raw : _chunkEQR5O2D2js.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
|
|
1070
1070
|
const packageRun = _optionalChain([runPackage, 'optionalAccess', _57 => _57.run]);
|
|
1071
1071
|
const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _58 => _58.status]) === "string" ? packageRun.status : null;
|
|
1072
|
-
const status =
|
|
1072
|
+
const status = _chunkEQR5O2D2js.decodePlayRunPublicStatus.call(void 0, rawStatus);
|
|
1073
1073
|
if (!status) {
|
|
1074
1074
|
throw new Error(
|
|
1075
1075
|
`Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
|
|
@@ -1100,10 +1100,10 @@ var PlayClient = class {
|
|
|
1100
1100
|
async startPlayRun(request, options) {
|
|
1101
1101
|
const resolved = resolveStartPlayRunRequest(request, this.environment);
|
|
1102
1102
|
const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
|
|
1103
|
-
return
|
|
1103
|
+
return _chunkEQR5O2D2js.startPlayRun.call(void 0,
|
|
1104
1104
|
this.http,
|
|
1105
1105
|
resolved.request,
|
|
1106
|
-
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1106
|
+
_optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkGRIHMNYMjs.SDK_API_MAJOR) } : headers,
|
|
1107
1107
|
options
|
|
1108
1108
|
);
|
|
1109
1109
|
}
|
|
@@ -2669,7 +2669,7 @@ var TERMINAL_STATUS_BY_EVENT_TYPE = {
|
|
|
2669
2669
|
|
|
2670
2670
|
// ../play-runtime/run-snapshot-stream.ts
|
|
2671
2671
|
function isTerminalPlayRunLiveStatus(status) {
|
|
2672
|
-
return
|
|
2672
|
+
return _chunkEQR5O2D2js.isTerminalPlayRunLifecycleStatus.call(void 0, status);
|
|
2673
2673
|
}
|
|
2674
2674
|
function makeRunStreamEvent(input) {
|
|
2675
2675
|
return {
|
|
@@ -3200,7 +3200,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3200
3200
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3201
3201
|
);
|
|
3202
3202
|
}
|
|
3203
|
-
return { [
|
|
3203
|
+
return { [_chunkGRIHMNYMjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3204
3204
|
}
|
|
3205
3205
|
function sleep(ms) {
|
|
3206
3206
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3331,7 +3331,7 @@ function playLiveRunStatus(event) {
|
|
|
3331
3331
|
return null;
|
|
3332
3332
|
}
|
|
3333
3333
|
const payload = getPlayLiveEventPayload(event);
|
|
3334
|
-
return _nullishCoalesce(
|
|
3334
|
+
return _nullishCoalesce(_chunkEQR5O2D2js.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkEQR5O2D2js.isPlayRunPackage.call(void 0, payload) ? _chunkEQR5O2D2js.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
|
|
3335
3335
|
}
|
|
3336
3336
|
function appendPlayLiveLogLines(state, payload) {
|
|
3337
3337
|
const lines = readStringArray(payload.lines);
|
|
@@ -3363,7 +3363,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3363
3363
|
if (event.type !== "play.run.snapshot" && event.type !== "play.run.status" && event.type !== "play.run.final_status") {
|
|
3364
3364
|
return null;
|
|
3365
3365
|
}
|
|
3366
|
-
const runId = typeof payload.runId === "string" && payload.runId ? payload.runId :
|
|
3366
|
+
const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkEQR5O2D2js.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
|
|
3367
3367
|
const status = _nullishCoalesce(playLiveRunStatus(event), () => ( state.status));
|
|
3368
3368
|
const progressPayload = isRecord3(payload.progress) ? payload.progress : {};
|
|
3369
3369
|
if (event.type === "play.run.final_status" && state.logs.length === 0 && state.lastLogSeq === 0) {
|
|
@@ -3376,7 +3376,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3376
3376
|
}
|
|
3377
3377
|
if ("result" in payload) {
|
|
3378
3378
|
state.result = payload.result;
|
|
3379
|
-
} else if (
|
|
3379
|
+
} else if (_chunkEQR5O2D2js.isPlayRunPackage.call(void 0, payload)) {
|
|
3380
3380
|
state.result = payload;
|
|
3381
3381
|
}
|
|
3382
3382
|
if (typeof payload.error === "string" && payload.error.trim()) {
|
|
@@ -3389,7 +3389,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3389
3389
|
...payload,
|
|
3390
3390
|
runId,
|
|
3391
3391
|
status,
|
|
3392
|
-
...
|
|
3392
|
+
..._chunkEQR5O2D2js.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
|
|
3393
3393
|
progress: {
|
|
3394
3394
|
...progressRecord,
|
|
3395
3395
|
status: typeof progressRecord.status === "string" ? progressRecord.status : status,
|
|
@@ -3541,6 +3541,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3541
3541
|
deploy: (definition, options) => this.deployMonitor(definition, options),
|
|
3542
3542
|
sync: (definition, options) => _optionalChain([options, 'optionalAccess', _156 => _156.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options),
|
|
3543
3543
|
list: (options) => this.listMonitors(options),
|
|
3544
|
+
ledger: (options) => this.listMonitorLedger(options),
|
|
3545
|
+
ledgerGet: (key) => this.getMonitorLedgerEntry(key),
|
|
3546
|
+
ledgerFindings: (key, options) => this.listMonitorLedgerFindings(key, options),
|
|
3544
3547
|
get: (key) => this.getMonitor(key),
|
|
3545
3548
|
test: (key, payload, options) => this.testMonitorWebhook(key, payload, options),
|
|
3546
3549
|
validate: (key) => this.validateMonitor(key),
|
|
@@ -3995,7 +3998,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3995
3998
|
*/
|
|
3996
3999
|
async preparePlayRunAdmission(request, options) {
|
|
3997
4000
|
const resolved = resolveStartPlayRunRequest(request, this.environment);
|
|
3998
|
-
const prepared = await
|
|
4001
|
+
const prepared = await _chunkEQR5O2D2js.preparePlayRunAdmission.call(void 0,
|
|
3999
4002
|
this.http,
|
|
4000
4003
|
resolved.request,
|
|
4001
4004
|
_optionalChain([options, 'optionalAccess', _180 => _180.onSubmission]),
|
|
@@ -4008,7 +4011,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4008
4011
|
);
|
|
4009
4012
|
const headers = _optionalChain([options, 'optionalAccess', _181 => _181.cliAdmission]) ? {
|
|
4010
4013
|
...runtimeHeaders,
|
|
4011
|
-
"X-Deepline-API-Major": String(
|
|
4014
|
+
"X-Deepline-API-Major": String(_chunkGRIHMNYMjs.SDK_API_MAJOR)
|
|
4012
4015
|
} : runtimeHeaders;
|
|
4013
4016
|
const http = this.http;
|
|
4014
4017
|
let submitted = false;
|
|
@@ -4024,7 +4027,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4024
4027
|
}
|
|
4025
4028
|
if (submitted) {
|
|
4026
4029
|
if (!_optionalChain([options, 'optionalAccess', _182 => _182.callerIntentV2])) {
|
|
4027
|
-
await
|
|
4030
|
+
await _chunkEQR5O2D2js.preparePlayRunAdmission.call(void 0,
|
|
4028
4031
|
http,
|
|
4029
4032
|
JSON.parse(bodyJson),
|
|
4030
4033
|
void 0,
|
|
@@ -4034,7 +4037,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4034
4037
|
}
|
|
4035
4038
|
submitted = true;
|
|
4036
4039
|
try {
|
|
4037
|
-
return await
|
|
4040
|
+
return await _chunkEQR5O2D2js.submitPreparedPlayRunAdmission.call(void 0,
|
|
4038
4041
|
http,
|
|
4039
4042
|
JSON.parse(bodyJson),
|
|
4040
4043
|
prepared.workflowId,
|
|
@@ -4047,7 +4050,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4047
4050
|
}
|
|
4048
4051
|
);
|
|
4049
4052
|
} catch (error) {
|
|
4050
|
-
if (error instanceof
|
|
4053
|
+
if (error instanceof _chunkEQR5O2D2js.CliPlayAdmissionUnsupportedError || error instanceof _chunkEQR5O2D2js.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
4051
4054
|
submitted = false;
|
|
4052
4055
|
}
|
|
4053
4056
|
throw error;
|
|
@@ -4063,7 +4066,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4063
4066
|
}
|
|
4064
4067
|
if (submitted) {
|
|
4065
4068
|
if (!_optionalChain([options, 'optionalAccess', _190 => _190.callerIntentV2])) {
|
|
4066
|
-
await
|
|
4069
|
+
await _chunkEQR5O2D2js.preparePlayRunAdmission.call(void 0,
|
|
4067
4070
|
http,
|
|
4068
4071
|
JSON.parse(bodyJson),
|
|
4069
4072
|
void 0,
|
|
@@ -4072,7 +4075,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4072
4075
|
}
|
|
4073
4076
|
}
|
|
4074
4077
|
submitted = true;
|
|
4075
|
-
const streamPath = _optionalChain([options, 'optionalAccess', _192 => _192.callerIntentV2]) ?
|
|
4078
|
+
const streamPath = _optionalChain([options, 'optionalAccess', _192 => _192.callerIntentV2]) ? _chunkEQR5O2D2js.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _193 => _193.cliAdmission]) ? _chunkEQR5O2D2js.CLI_PLAY_RUN_START_STREAM_PATH : _chunkEQR5O2D2js.PLAY_RUN_START_STREAM_PATH;
|
|
4076
4079
|
let cliAdmissionSupported = false;
|
|
4077
4080
|
try {
|
|
4078
4081
|
for await (const event of http.streamSse(streamPath, {
|
|
@@ -4083,7 +4086,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4083
4086
|
exactUrlOnly: true,
|
|
4084
4087
|
..._optionalChain([options, 'optionalAccess', _195 => _195.cliAdmission]) ? {
|
|
4085
4088
|
onResponse: (response) => {
|
|
4086
|
-
cliAdmissionSupported = response.headers.get(
|
|
4089
|
+
cliAdmissionSupported = response.headers.get(_chunkEQR5O2D2js.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
4087
4090
|
}
|
|
4088
4091
|
} : {}
|
|
4089
4092
|
})) {
|
|
@@ -4093,12 +4096,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4093
4096
|
if (_optionalChain([options, 'optionalAccess', _196 => _196.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4094
4097
|
if (options.callerIntentV2) {
|
|
4095
4098
|
submitted = false;
|
|
4096
|
-
throw new (0,
|
|
4099
|
+
throw new (0, _chunkEQR5O2D2js.CliPlayAdmissionCallerIntentV2UnsupportedError)(
|
|
4097
4100
|
error.statusCode
|
|
4098
4101
|
);
|
|
4099
4102
|
}
|
|
4100
4103
|
submitted = false;
|
|
4101
|
-
throw new (0,
|
|
4104
|
+
throw new (0, _chunkEQR5O2D2js.CliPlayAdmissionUnsupportedError)(error.statusCode);
|
|
4102
4105
|
}
|
|
4103
4106
|
throw error;
|
|
4104
4107
|
}
|
|
@@ -4111,7 +4114,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4111
4114
|
* @internal
|
|
4112
4115
|
*/
|
|
4113
4116
|
async prefetchPlayRunAdmissionCapability(options) {
|
|
4114
|
-
return
|
|
4117
|
+
return _chunkEQR5O2D2js.readPlayRunAdmissionCapability.call(void 0, this.http, options);
|
|
4115
4118
|
}
|
|
4116
4119
|
/**
|
|
4117
4120
|
* Submit a play run through the legacy event response.
|
|
@@ -4385,7 +4388,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4385
4388
|
* ```
|
|
4386
4389
|
*/
|
|
4387
4390
|
async stagePlayFiles(files) {
|
|
4388
|
-
return
|
|
4391
|
+
return _chunkEQR5O2D2js.stagePlayFiles.call(void 0, this.http, files);
|
|
4389
4392
|
}
|
|
4390
4393
|
/**
|
|
4391
4394
|
* Mint short-lived presigned upload targets for staged play files.
|
|
@@ -4394,7 +4397,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4394
4397
|
* For other files, the server returns a presigned PUT URL. Upload the file body to that URL.
|
|
4395
4398
|
*/
|
|
4396
4399
|
async mintStagedPlayFileUploads(files) {
|
|
4397
|
-
return
|
|
4400
|
+
return _chunkEQR5O2D2js.mintStagedPlayFileUploads.call(void 0, this.http, files);
|
|
4398
4401
|
}
|
|
4399
4402
|
/**
|
|
4400
4403
|
* Resolve staged play files by content hash without uploading bytes.
|
|
@@ -4505,7 +4508,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4505
4508
|
}
|
|
4506
4509
|
})) {
|
|
4507
4510
|
_optionalChain([options, 'optionalAccess', _234 => _234.onEvent, 'optionalCall', _235 => _235(event)]);
|
|
4508
|
-
if (
|
|
4511
|
+
if (_chunkEQR5O2D2js.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4509
4512
|
terminalObserved = true;
|
|
4510
4513
|
}
|
|
4511
4514
|
}
|
|
@@ -4513,7 +4516,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4513
4516
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4514
4517
|
}
|
|
4515
4518
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
4516
|
-
if (terminalObserved ||
|
|
4519
|
+
if (terminalObserved || _chunkEQR5O2D2js.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
|
|
4517
4520
|
return refreshed;
|
|
4518
4521
|
}
|
|
4519
4522
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
@@ -5994,7 +5997,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5994
5997
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5995
5998
|
_optionalChain([options, 'optionalAccess', _336 => _336.onProgress, 'optionalCall', _337 => _337(status)]);
|
|
5996
5999
|
}
|
|
5997
|
-
if (
|
|
6000
|
+
if (_chunkEQR5O2D2js.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
5998
6001
|
terminalObserved = status;
|
|
5999
6002
|
}
|
|
6000
6003
|
}
|
|
@@ -6617,6 +6620,41 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6617
6620
|
{ method: "GET" }
|
|
6618
6621
|
);
|
|
6619
6622
|
}
|
|
6623
|
+
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
6624
|
+
async listMonitorLedger(options) {
|
|
6625
|
+
const params = new URLSearchParams();
|
|
6626
|
+
if (_optionalChain([options, 'optionalAccess', _362 => _362.search])) params.set("q", options.search);
|
|
6627
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _363 => _363.states]), () => ( []))) params.append("state", state);
|
|
6628
|
+
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _364 => _364.signals]), () => ( [])))
|
|
6629
|
+
params.append("signal", signal);
|
|
6630
|
+
if (_optionalChain([options, 'optionalAccess', _365 => _365.play])) params.set("play", options.play);
|
|
6631
|
+
if (_optionalChain([options, 'optionalAccess', _366 => _366.sort])) params.set("sort", options.sort);
|
|
6632
|
+
if (_optionalChain([options, 'optionalAccess', _367 => _367.window])) params.set("window", options.window);
|
|
6633
|
+
if (_optionalChain([options, 'optionalAccess', _368 => _368.limit]) !== void 0)
|
|
6634
|
+
params.set("limit", String(options.limit));
|
|
6635
|
+
if (_optionalChain([options, 'optionalAccess', _369 => _369.cursor])) params.set("cursor", options.cursor);
|
|
6636
|
+
const query = params.toString();
|
|
6637
|
+
const suffix = query ? `?${query}` : "";
|
|
6638
|
+
return this.http.request(
|
|
6639
|
+
`/api/v2/monitors/ledger${suffix}`,
|
|
6640
|
+
{ method: "GET" }
|
|
6641
|
+
);
|
|
6642
|
+
}
|
|
6643
|
+
/** One Monitors list entry. Prefer `client.monitors.ledgerGet(...)`. */
|
|
6644
|
+
async getMonitorLedgerEntry(key) {
|
|
6645
|
+
return this.http.request(
|
|
6646
|
+
`/api/v2/monitors/ledger/${encodeURIComponent(key)}`,
|
|
6647
|
+
{ method: "GET" }
|
|
6648
|
+
);
|
|
6649
|
+
}
|
|
6650
|
+
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
6651
|
+
async listMonitorLedgerFindings(key, options) {
|
|
6652
|
+
const suffix = _optionalChain([options, 'optionalAccess', _370 => _370.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
6653
|
+
return this.http.request(
|
|
6654
|
+
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
6655
|
+
{ method: "GET" }
|
|
6656
|
+
);
|
|
6657
|
+
}
|
|
6620
6658
|
/** Fetch one deployed monitor by public key. Prefer `client.monitors.get(...)`. */
|
|
6621
6659
|
async getMonitor(key) {
|
|
6622
6660
|
return this.http.request(
|
|
@@ -6625,7 +6663,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6625
6663
|
);
|
|
6626
6664
|
}
|
|
6627
6665
|
async testMonitorWebhook(key, payload, options) {
|
|
6628
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6666
|
+
if (_optionalChain([options, 'optionalAccess', _371 => _371.dispatch]) === true || _optionalChain([options, 'optionalAccess', _372 => _372.validationOnly]) === false) {
|
|
6629
6667
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6630
6668
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6631
6669
|
void 0,
|
|
@@ -6680,7 +6718,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6680
6718
|
}
|
|
6681
6719
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6682
6720
|
async deleteMonitor(key, options) {
|
|
6683
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6721
|
+
if (_optionalChain([options, 'optionalAccess', _373 => _373.localOnly]) === true) {
|
|
6684
6722
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6685
6723
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6686
6724
|
void 0,
|
|
@@ -6688,11 +6726,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6688
6726
|
);
|
|
6689
6727
|
}
|
|
6690
6728
|
const params = new URLSearchParams();
|
|
6691
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6729
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.dryRun])) params.set("dry_run", "true");
|
|
6692
6730
|
const query = params.toString();
|
|
6693
6731
|
return this.http.request(
|
|
6694
6732
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6695
|
-
_optionalChain([options, 'optionalAccess',
|
|
6733
|
+
_optionalChain([options, 'optionalAccess', _375 => _375.dryRun]) ? { method: "DELETE" } : {
|
|
6696
6734
|
method: "DELETE",
|
|
6697
6735
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6698
6736
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6705,10 +6743,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6705
6743
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6706
6744
|
*/
|
|
6707
6745
|
async reactivateMonitor(key, options) {
|
|
6708
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6746
|
+
const query = _optionalChain([options, 'optionalAccess', _376 => _376.dryRun]) ? "?dry_run=true" : "";
|
|
6709
6747
|
return this.http.request(
|
|
6710
6748
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6711
|
-
_optionalChain([options, 'optionalAccess',
|
|
6749
|
+
_optionalChain([options, 'optionalAccess', _377 => _377.dryRun]) ? { method: "POST", body: {} } : {
|
|
6712
6750
|
method: "POST",
|
|
6713
6751
|
body: {},
|
|
6714
6752
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6722,7 +6760,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6722
6760
|
// ——————————————————————————————————————————————————————————
|
|
6723
6761
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6724
6762
|
monitorJobIdempotencyKey(operation) {
|
|
6725
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6763
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _378 => _378.crypto, 'optionalAccess', _379 => _379.randomUUID, 'optionalCall', _380 => _380()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6726
6764
|
const prefix = "monitor-job-";
|
|
6727
6765
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6728
6766
|
const maxOperationLength = Math.max(
|
|
@@ -6733,7 +6771,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6733
6771
|
}
|
|
6734
6772
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6735
6773
|
return {
|
|
6736
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6774
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _381 => _381.trim, 'call', _382 => _382()]) || this.monitorJobIdempotencyKey(operation)
|
|
6737
6775
|
};
|
|
6738
6776
|
}
|
|
6739
6777
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6744,7 +6782,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6744
6782
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6745
6783
|
headers: this.monitorJobHeaders(
|
|
6746
6784
|
"batch-deploy",
|
|
6747
|
-
_optionalChain([options, 'optionalAccess',
|
|
6785
|
+
_optionalChain([options, 'optionalAccess', _383 => _383.idempotencyKey])
|
|
6748
6786
|
),
|
|
6749
6787
|
maxRetries: 0,
|
|
6750
6788
|
exactUrlOnly: true
|
|
@@ -6763,11 +6801,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6763
6801
|
version: 1,
|
|
6764
6802
|
kind: "batch",
|
|
6765
6803
|
monitors: definitions,
|
|
6766
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6804
|
+
..._optionalChain([options, 'optionalAccess', _384 => _384.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6767
6805
|
},
|
|
6768
6806
|
headers: this.monitorJobHeaders(
|
|
6769
6807
|
`batch-sync-${batchId}`,
|
|
6770
|
-
_optionalChain([options, 'optionalAccess',
|
|
6808
|
+
_optionalChain([options, 'optionalAccess', _385 => _385.idempotencyKey])
|
|
6771
6809
|
),
|
|
6772
6810
|
maxRetries: 0,
|
|
6773
6811
|
exactUrlOnly: true
|
|
@@ -6782,7 +6820,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6782
6820
|
body: {},
|
|
6783
6821
|
headers: this.monitorJobHeaders(
|
|
6784
6822
|
`batch-start-${batchId}`,
|
|
6785
|
-
_optionalChain([options, 'optionalAccess',
|
|
6823
|
+
_optionalChain([options, 'optionalAccess', _386 => _386.idempotencyKey])
|
|
6786
6824
|
),
|
|
6787
6825
|
maxRetries: 0,
|
|
6788
6826
|
exactUrlOnly: true
|
|
@@ -6797,7 +6835,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6797
6835
|
body: {},
|
|
6798
6836
|
headers: this.monitorJobHeaders(
|
|
6799
6837
|
`batch-stop-${batchId}`,
|
|
6800
|
-
_optionalChain([options, 'optionalAccess',
|
|
6838
|
+
_optionalChain([options, 'optionalAccess', _387 => _387.idempotencyKey])
|
|
6801
6839
|
),
|
|
6802
6840
|
maxRetries: 0,
|
|
6803
6841
|
exactUrlOnly: true
|
|
@@ -6818,7 +6856,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6818
6856
|
body: {},
|
|
6819
6857
|
headers: this.monitorJobHeaders(
|
|
6820
6858
|
`${action}-${monitorKey}`,
|
|
6821
|
-
_optionalChain([options, 'optionalAccess',
|
|
6859
|
+
_optionalChain([options, 'optionalAccess', _388 => _388.idempotencyKey])
|
|
6822
6860
|
),
|
|
6823
6861
|
maxRetries: 0,
|
|
6824
6862
|
exactUrlOnly: true
|
|
@@ -6831,7 +6869,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6831
6869
|
body: definition,
|
|
6832
6870
|
headers: this.monitorJobHeaders(
|
|
6833
6871
|
`sync-${definition.key}`,
|
|
6834
|
-
_optionalChain([options, 'optionalAccess',
|
|
6872
|
+
_optionalChain([options, 'optionalAccess', _389 => _389.idempotencyKey])
|
|
6835
6873
|
),
|
|
6836
6874
|
maxRetries: 0,
|
|
6837
6875
|
exactUrlOnly: true
|
|
@@ -6844,7 +6882,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6844
6882
|
);
|
|
6845
6883
|
}
|
|
6846
6884
|
async getMonitorJobLogs(jobId, options) {
|
|
6847
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6885
|
+
const query = _optionalChain([options, 'optionalAccess', _390 => _390.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6848
6886
|
return this.http.request(
|
|
6849
6887
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6850
6888
|
{ method: "GET" }
|
|
@@ -6857,15 +6895,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6857
6895
|
);
|
|
6858
6896
|
}
|
|
6859
6897
|
async waitForMonitorJob(jobId, options) {
|
|
6860
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6861
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6898
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _391 => _391.timeoutMs]), () => ( 10 * 6e4)));
|
|
6899
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _392 => _392.pollIntervalMs]), () => ( 2e3)));
|
|
6862
6900
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6863
6901
|
const startedAt = Date.now();
|
|
6864
6902
|
let latest = await this.getMonitorJob(jobId);
|
|
6865
6903
|
while (true) {
|
|
6866
|
-
_optionalChain([options, 'optionalAccess',
|
|
6904
|
+
_optionalChain([options, 'optionalAccess', _393 => _393.onProgress, 'optionalCall', _394 => _394(latest)]);
|
|
6867
6905
|
const job = latest.job;
|
|
6868
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6906
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _395 => _395.state]) === "string" ? job.state : void 0;
|
|
6869
6907
|
if (state && terminal.has(state)) return latest;
|
|
6870
6908
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6871
6909
|
await sleep(pollIntervalMs);
|
|
@@ -6876,12 +6914,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6876
6914
|
// Monitor Fleets
|
|
6877
6915
|
// ——————————————————————————————————————————————————————————
|
|
6878
6916
|
monitorFleetIdempotencyKey(operation) {
|
|
6879
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6917
|
+
const uuid = _optionalChain([globalThis, 'access', _396 => _396.crypto, 'optionalAccess', _397 => _397.randomUUID, 'optionalCall', _398 => _398()]);
|
|
6880
6918
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6881
6919
|
}
|
|
6882
6920
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6883
6921
|
return {
|
|
6884
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6922
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _399 => _399.trim, 'call', _400 => _400()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6885
6923
|
};
|
|
6886
6924
|
}
|
|
6887
6925
|
monitorFleetPath(fleetId) {
|
|
@@ -6901,15 +6939,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6901
6939
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6902
6940
|
const body = {
|
|
6903
6941
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6904
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6905
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6942
|
+
..._optionalChain([options, 'optionalAccess', _401 => _401.dryRun]) ? { dry_run: true } : {},
|
|
6943
|
+
..._optionalChain([options, 'optionalAccess', _402 => _402.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
6906
6944
|
};
|
|
6907
6945
|
return this.http.request(
|
|
6908
6946
|
this.monitorFleetPath(fleetId),
|
|
6909
6947
|
{
|
|
6910
6948
|
method: "PUT",
|
|
6911
6949
|
body,
|
|
6912
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
6950
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _403 => _403.idempotencyKey])),
|
|
6913
6951
|
maxRetries: 0,
|
|
6914
6952
|
exactUrlOnly: true
|
|
6915
6953
|
}
|
|
@@ -6922,8 +6960,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6922
6960
|
}
|
|
6923
6961
|
async getMonitorFleet(fleetId, options) {
|
|
6924
6962
|
const params = new URLSearchParams();
|
|
6925
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6926
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6963
|
+
if (_optionalChain([options, 'optionalAccess', _404 => _404.drift])) params.set("drift", "1");
|
|
6964
|
+
if (_optionalChain([options, 'optionalAccess', _405 => _405.limit]) !== void 0)
|
|
6927
6965
|
params.set("limit", String(options.limit));
|
|
6928
6966
|
const query = params.toString();
|
|
6929
6967
|
return this.http.request(
|
|
@@ -6936,10 +6974,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6936
6974
|
this.monitorFleetPath(fleetId),
|
|
6937
6975
|
{
|
|
6938
6976
|
method: "DELETE",
|
|
6939
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
6977
|
+
body: _optionalChain([options, 'optionalAccess', _406 => _406.dryRun]) ? { dry_run: true } : {},
|
|
6940
6978
|
headers: this.monitorFleetHeaders(
|
|
6941
6979
|
"deactivate",
|
|
6942
|
-
_optionalChain([options, 'optionalAccess',
|
|
6980
|
+
_optionalChain([options, 'optionalAccess', _407 => _407.idempotencyKey])
|
|
6943
6981
|
),
|
|
6944
6982
|
maxRetries: 0,
|
|
6945
6983
|
exactUrlOnly: true
|
|
@@ -6954,7 +6992,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6954
6992
|
body: {},
|
|
6955
6993
|
headers: this.monitorFleetHeaders(
|
|
6956
6994
|
"reactivate",
|
|
6957
|
-
_optionalChain([options, 'optionalAccess',
|
|
6995
|
+
_optionalChain([options, 'optionalAccess', _408 => _408.idempotencyKey])
|
|
6958
6996
|
),
|
|
6959
6997
|
maxRetries: 0,
|
|
6960
6998
|
exactUrlOnly: true
|
|
@@ -6971,13 +7009,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6971
7009
|
* identical to "the request failed".
|
|
6972
7010
|
*/
|
|
6973
7011
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
6974
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6975
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6976
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7012
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _409 => _409.timeoutMs]), () => ( 10 * 6e4)));
|
|
7013
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _410 => _410.pollIntervalMs]), () => ( 2e3)));
|
|
7014
|
+
const terminal = _optionalChain([options, 'optionalAccess', _411 => _411.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7015
|
+
"converged",
|
|
7016
|
+
"degraded",
|
|
7017
|
+
"deactivated",
|
|
7018
|
+
"billing_suspended"
|
|
7019
|
+
]);
|
|
6977
7020
|
const startedAt = Date.now();
|
|
6978
7021
|
let latest = await this.getMonitorFleet(fleetId);
|
|
6979
7022
|
while (true) {
|
|
6980
|
-
_optionalChain([options, 'optionalAccess',
|
|
7023
|
+
_optionalChain([options, 'optionalAccess', _412 => _412.onProgress, 'optionalCall', _413 => _413(latest)]);
|
|
6981
7024
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
6982
7025
|
if (status && terminal.has(status)) return latest;
|
|
6983
7026
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-F6QV42MC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
parseLogLevel
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5M4PLPTR.mjs";
|
|
7
7
|
import {
|
|
8
8
|
setDottedInputValue
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CS2AEAD6.mjs";
|
|
10
10
|
import {
|
|
11
11
|
argsWantJson,
|
|
12
12
|
jsonFieldArgs,
|
|
13
13
|
parseJsonFields
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineError
|
|
17
17
|
} from "./chunk-HBL4PM5Q.mjs";
|