deepline 0.3.494 → 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 +103 -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/execution-capabilities.ts +8 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +2 -2
- 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-6X5YXMFN.mjs → auth-EU4EFRDJ.mjs} +5 -5
- package/dist/cli/auth-SHWC5FMY.js +43 -0
- package/dist/cli/{billing-5F5PZB77.js → billing-4JJLTVK4.js} +80 -80
- package/dist/cli/{billing-IN74SDSC.mjs → billing-GMVH3RBX.mjs} +7 -7
- package/dist/cli/{chunk-H46X7YDU.mjs → chunk-2HCZHIMT.mjs} +20 -0
- package/dist/cli/{chunk-3KVFOKPR.js → chunk-3HIPDJWJ.js} +53 -53
- package/dist/cli/{chunk-QOEI42IU.mjs → chunk-3KA466RV.mjs} +1 -1
- package/dist/cli/{chunk-GNSGDIA4.mjs → chunk-4NKAM4GX.mjs} +2 -2
- package/dist/cli/{chunk-BU5Y7HOD.js → chunk-5GK6J7MH.js} +5 -5
- package/dist/cli/{chunk-J2HOVZOE.mjs → chunk-5M4PLPTR.mjs} +53 -3
- package/dist/cli/{chunk-CAWOSHEC.js → chunk-5YSIHOGV.js} +26 -26
- package/dist/cli/{chunk-RPFNIMUO.mjs → chunk-6QIAEXRH.mjs} +1 -1
- package/dist/cli/{chunk-4RWH4LRQ.mjs → chunk-6UUZM4FY.mjs} +5 -5
- package/dist/cli/{chunk-S3XQH7DW.js → chunk-73CBLBNP.js} +1 -1
- package/dist/cli/{chunk-KR2XEI5T.mjs → chunk-7NBDLK3N.mjs} +1 -1
- package/dist/cli/{chunk-MWZNMWR2.mjs → chunk-7Q7VPFPR.mjs} +2 -2
- package/dist/cli/{chunk-6XZR2642.mjs → chunk-7U6W3CKT.mjs} +4 -4
- package/dist/cli/{chunk-CK5MA6S6.js → chunk-AOBAVBSX.js} +115 -65
- package/dist/cli/{chunk-L4QPBQUX.mjs → chunk-CNMIYEB4.mjs} +3 -3
- package/dist/cli/{chunk-DVQHG6AM.mjs → chunk-CS2AEAD6.mjs} +63 -11
- package/dist/cli/{chunk-ODWTFVE4.mjs → chunk-DFW6P6ZN.mjs} +2 -2
- package/dist/cli/{chunk-L2P2XRPO.mjs → chunk-E3KXXJWR.mjs} +6 -6
- package/dist/cli/{chunk-PKV5CD3W.js → chunk-EQR5O2D2.js} +87 -35
- package/dist/cli/{chunk-L6KA4ENU.js → chunk-EX4JEFYI.js} +16 -16
- package/dist/cli/{chunk-IPWYDANJ.mjs → chunk-FXPICCUU.mjs} +1 -1
- package/dist/cli/{chunk-5WYH2LAP.js → chunk-GKZUGHDK.js} +6 -6
- package/dist/cli/{chunk-HINVMRGQ.js → chunk-GRIHMNYM.js} +4 -4
- package/dist/cli/{chunk-VMPM2FKT.js → chunk-HIAFBOYA.js} +8 -8
- package/dist/cli/{chunk-FAT6CUZK.mjs → chunk-IMWJRBV5.mjs} +1 -1
- package/dist/cli/{chunk-IZJSX3SZ.mjs → chunk-IXPZROZX.mjs} +2 -2
- package/dist/cli/{chunk-Y4GRL533.js → chunk-J55ZM5CK.js} +3 -3
- package/dist/cli/{chunk-X6HIIHQO.js → chunk-JEPNE4N5.js} +5 -5
- package/dist/cli/{chunk-QSRWBOPV.js → chunk-JU4LIA2T.js} +7 -7
- package/dist/cli/{chunk-GSCCDGGT.js → chunk-KKI5GWED.js} +94 -94
- package/dist/cli/{chunk-WP45PUPW.js → chunk-MWQ3WQ4Q.js} +41 -41
- package/dist/cli/{chunk-AARXOBVD.js → chunk-N3T3L3WW.js} +20 -0
- package/dist/cli/{chunk-TLQXN4ZZ.mjs → chunk-O36ZPHJG.mjs} +10 -10
- package/dist/cli/{chunk-7B7A36XZ.js → chunk-PHVRS56F.js} +14 -14
- package/dist/cli/{chunk-GDNQXLBM.js → chunk-QEBQIGXP.js} +2 -2
- package/dist/cli/{chunk-USWLB4KV.js → chunk-QN6IULFT.js} +53 -53
- package/dist/cli/{chunk-BLHQRETG.mjs → chunk-QYXUZX5N.mjs} +4 -4
- package/dist/cli/{chunk-J3UHNUWI.js → chunk-QZ7I4NZZ.js} +2 -2
- package/dist/cli/{chunk-KVCQL6SP.mjs → chunk-R4H5MCG4.mjs} +4 -4
- package/dist/cli/{chunk-L6L57RSG.mjs → chunk-SH6HOR25.mjs} +2 -2
- package/dist/cli/{chunk-EG3OSUBO.mjs → chunk-U6SE6757.mjs} +1 -1
- package/dist/cli/{chunk-65NMOP4T.mjs → chunk-UT3ORL35.mjs} +3 -3
- package/dist/cli/{chunk-4ZKZS43N.js → chunk-UTG3STCR.js} +3 -3
- package/dist/cli/{chunk-GLDBMKTV.js → chunk-W7DZ6UGP.js} +3 -3
- package/dist/cli/{chunk-DKKAJ3U2.mjs → chunk-WCBZHSC4.mjs} +5 -5
- package/dist/cli/{chunk-BNI653WN.js → chunk-WEGGJMNF.js} +21 -21
- package/dist/cli/{chunk-6DMLWM7L.mjs → chunk-WTZ7Y3IZ.mjs} +2 -2
- package/dist/cli/{chunk-WCZBIE5L.mjs → chunk-YHFW7MBT.mjs} +1 -1
- package/dist/cli/{chunk-4A5WXQJK.js → chunk-Z27R2BG7.js} +16 -16
- package/dist/cli/{chunk-ZZD245Z2.js → chunk-ZL4Q4T3G.js} +7 -7
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-UBW4ID5D.mjs → csv-ET7ESAPM.mjs} +4 -4
- package/dist/cli/{csv-QD7JJGSP.js → csv-JWBLNEPC.js} +13 -13
- package/dist/cli/{db-AARR3WYD.js → db-3ZGQXWTQ.js} +28 -28
- package/dist/cli/{db-QFDXKIVD.mjs → db-4PIWQPR6.mjs} +7 -7
- package/dist/cli/describe-KO3OQBIR.js +50 -0
- package/dist/cli/{describe-OBVIAC2H.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-IZYUDYTZ.mjs → executions-HW6PMZOF.mjs} +7 -7
- package/dist/cli/{executions-KXY7KMZY.js → executions-YR545MRU.js} +9 -9
- package/dist/cli/{feedback-IVCVBERN.mjs → feedback-B2FJ6HPA.mjs} +4 -4
- package/dist/cli/{feedback-3334HBPD.js → feedback-FNVHJQEC.js} +8 -8
- package/dist/cli/{git-JHNVET5A.mjs → git-CCNPW3CA.mjs} +5 -5
- package/dist/cli/git-X2QJ2B5O.js +25 -0
- package/dist/cli/index.js +141 -141
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-DBA32JCV.js → legacy-noops-2EBZS45D.js} +8 -8
- package/dist/cli/{legacy-noops-WGVBUOCC.mjs → legacy-noops-VJLCXTPB.mjs} +5 -5
- package/dist/cli/{monitors-ZGANC7JY.mjs → monitors-4AMETRW7.mjs} +190 -8
- package/dist/cli/{monitors-GHWZ5AZS.js → monitors-JNWKPCN5.js} +318 -136
- package/dist/cli/{org-S7JWP264.js → org-7FUHVFYU.js} +73 -73
- package/dist/cli/{org-CUS42N2T.mjs → org-LO6GSCCG.mjs} +7 -7
- package/dist/cli/{pages-IH56T6L6.mjs → pages-PJ32M2PU.mjs} +21 -7
- package/dist/cli/{pages-QXRZDEJW.js → pages-TT4TZOOV.js} +33 -19
- package/dist/cli/{play-Z65ZFOQH.mjs → play-QJEZAIZB.mjs} +19 -48
- package/dist/cli/{play-4C5PYS62.js → play-VN7DFYDP.js} +618 -647
- package/dist/cli/{providers-FSZSJX4Z.mjs → providers-24ER3SND.mjs} +7 -7
- package/dist/cli/{providers-XYQGYF3O.js → providers-IDFN2FCR.js} +10 -10
- package/dist/cli/{quickstart-ZA25RJT3.js → quickstart-AQDCRVUQ.js} +6 -6
- package/dist/cli/{quickstart-DHWVE32I.mjs → quickstart-FKENQU34.mjs} +4 -4
- package/dist/cli/{run-5MP6LEHM.js → run-HCASJQZY.js} +37 -37
- package/dist/cli/{run-WRPPEPLG.mjs → run-KXMRE5ZD.mjs} +23 -23
- package/dist/cli/{search-A6NVJPKX.mjs → search-3F2T33OE.mjs} +8 -8
- package/dist/cli/search-OGY6SQDJ.js +32 -0
- package/dist/cli/{search-output-YA6TXWGO.js → search-output-GFCEGNCJ.js} +6 -6
- package/dist/cli/{search-output-PAOUMVXY.mjs → search-output-U6PM5KAH.mjs} +4 -4
- package/dist/cli/{secrets-AZYOGH3I.js → secrets-KYVUP755.js} +16 -16
- package/dist/cli/{secrets-ZGF7JOBI.mjs → secrets-ZZSOVXOX.mjs} +7 -7
- package/dist/cli/{sessions-RNEAXZPV.mjs → sessions-4Z62CVHL.mjs} +5 -5
- package/dist/cli/{sessions-GCIN5VXT.js → sessions-7JFKTUQS.js} +6 -6
- package/dist/cli/{settings-NO5KXQJF.mjs → settings-OXG7IRVC.mjs} +12 -12
- package/dist/cli/{settings-LMEZNLBB.js → settings-X4PSK4EW.js} +79 -79
- package/dist/cli/{setup-XKTZPYYH.js → setup-NCJEDW4W.js} +49 -49
- package/dist/cli/{setup-GCYB4IFS.mjs → setup-RB7JE6KA.mjs} +9 -9
- package/dist/cli/{skills-TY4HHIKH.mjs → skills-D4BR2WU2.mjs} +7 -7
- package/dist/cli/skills-WWWFRDCA.js +36 -0
- package/dist/cli/{tools-RDTHHYJ3.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-BRLLTTCS.mjs → update-UKUMQ6FC.mjs} +9 -9
- package/dist/cli/{workflow-F72EVZWM.mjs → workflow-EKKTTSCJ.mjs} +8 -8
- package/dist/cli/{workflow-YHA4WE3K.js → workflow-LFWQWZKS.js} +18 -18
- package/dist/{client-97yTcdLl.d.ts → client-Cj3UqrCZ.d.ts} +1 -1
- package/dist/{client-CFo9qalW.d.mts → client-DSCTVVRj.d.mts} +1 -1
- package/dist/{client-core-Dl6xgfLq.d.mts → client-core-B-8DTIN1.d.mts} +49 -3
- package/dist/{client-core-BRZrY13B.d.ts → client-core-dI4KTuWS.d.ts} +49 -3
- package/dist/{compiler-manifest-CPEF48NM.d.ts → compiler-manifest-DlXDyndN.d.mts} +2 -0
- package/dist/{compiler-manifest-CPEF48NM.d.mts → 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 +112 -112
- 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-RWLCLMDY.js +0 -43
- package/dist/cli/describe-RYJ6HDYD.js +0 -50
- package/dist/cli/git-4VLYFHNU.js +0 -25
- package/dist/cli/search-4SQFVNTB.js +0 -32
- package/dist/cli/skills-V4APQA2I.js +0 -36
- package/dist/cli/tools-HKQLQ7HT.js +0 -57
- package/dist/cli/update-Z4MUAHWM.js +0 -34
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
resolveUpdatePlan,
|
|
5
5
|
runAutomaticUpdatePlan,
|
|
6
6
|
shouldRunCliAutoUpdate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WCBZHSC4.mjs";
|
|
8
8
|
import {
|
|
9
9
|
isCiEnvironment
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QYXUZX5N.mjs";
|
|
11
11
|
import {
|
|
12
12
|
addJsonNotice,
|
|
13
13
|
isJsonOutputMode
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
15
15
|
import {
|
|
16
16
|
resolveApiKeyForBaseUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7NBDLK3N.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SDK_VERSION
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IMWJRBV5.mjs";
|
|
21
21
|
|
|
22
22
|
// src/cli/compatibility-catalog.ts
|
|
23
23
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -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),
|
|
@@ -3632,6 +3635,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3632
3635
|
`/api/v2/pages/${encodeURIComponent(name)}`
|
|
3633
3636
|
);
|
|
3634
3637
|
}
|
|
3638
|
+
/** Replace the origins allowed to read this page in a browser when public. */
|
|
3639
|
+
async setPageAllowedOrigins(name, origins) {
|
|
3640
|
+
return await this.http.put(
|
|
3641
|
+
`/api/v2/pages/${encodeURIComponent(name)}/origins`,
|
|
3642
|
+
{ allowed_origins: origins }
|
|
3643
|
+
);
|
|
3644
|
+
}
|
|
3635
3645
|
/** The explicit way to change who can see an existing page. */
|
|
3636
3646
|
async setPageVisibility(name, isPublic) {
|
|
3637
3647
|
return await this.http.post(
|
|
@@ -3988,7 +3998,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3988
3998
|
*/
|
|
3989
3999
|
async preparePlayRunAdmission(request, options) {
|
|
3990
4000
|
const resolved = resolveStartPlayRunRequest(request, this.environment);
|
|
3991
|
-
const prepared = await
|
|
4001
|
+
const prepared = await _chunkEQR5O2D2js.preparePlayRunAdmission.call(void 0,
|
|
3992
4002
|
this.http,
|
|
3993
4003
|
resolved.request,
|
|
3994
4004
|
_optionalChain([options, 'optionalAccess', _180 => _180.onSubmission]),
|
|
@@ -4001,7 +4011,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4001
4011
|
);
|
|
4002
4012
|
const headers = _optionalChain([options, 'optionalAccess', _181 => _181.cliAdmission]) ? {
|
|
4003
4013
|
...runtimeHeaders,
|
|
4004
|
-
"X-Deepline-API-Major": String(
|
|
4014
|
+
"X-Deepline-API-Major": String(_chunkGRIHMNYMjs.SDK_API_MAJOR)
|
|
4005
4015
|
} : runtimeHeaders;
|
|
4006
4016
|
const http = this.http;
|
|
4007
4017
|
let submitted = false;
|
|
@@ -4017,7 +4027,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4017
4027
|
}
|
|
4018
4028
|
if (submitted) {
|
|
4019
4029
|
if (!_optionalChain([options, 'optionalAccess', _182 => _182.callerIntentV2])) {
|
|
4020
|
-
await
|
|
4030
|
+
await _chunkEQR5O2D2js.preparePlayRunAdmission.call(void 0,
|
|
4021
4031
|
http,
|
|
4022
4032
|
JSON.parse(bodyJson),
|
|
4023
4033
|
void 0,
|
|
@@ -4027,7 +4037,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4027
4037
|
}
|
|
4028
4038
|
submitted = true;
|
|
4029
4039
|
try {
|
|
4030
|
-
return await
|
|
4040
|
+
return await _chunkEQR5O2D2js.submitPreparedPlayRunAdmission.call(void 0,
|
|
4031
4041
|
http,
|
|
4032
4042
|
JSON.parse(bodyJson),
|
|
4033
4043
|
prepared.workflowId,
|
|
@@ -4040,7 +4050,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4040
4050
|
}
|
|
4041
4051
|
);
|
|
4042
4052
|
} catch (error) {
|
|
4043
|
-
if (error instanceof
|
|
4053
|
+
if (error instanceof _chunkEQR5O2D2js.CliPlayAdmissionUnsupportedError || error instanceof _chunkEQR5O2D2js.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
4044
4054
|
submitted = false;
|
|
4045
4055
|
}
|
|
4046
4056
|
throw error;
|
|
@@ -4056,7 +4066,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4056
4066
|
}
|
|
4057
4067
|
if (submitted) {
|
|
4058
4068
|
if (!_optionalChain([options, 'optionalAccess', _190 => _190.callerIntentV2])) {
|
|
4059
|
-
await
|
|
4069
|
+
await _chunkEQR5O2D2js.preparePlayRunAdmission.call(void 0,
|
|
4060
4070
|
http,
|
|
4061
4071
|
JSON.parse(bodyJson),
|
|
4062
4072
|
void 0,
|
|
@@ -4065,7 +4075,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4065
4075
|
}
|
|
4066
4076
|
}
|
|
4067
4077
|
submitted = true;
|
|
4068
|
-
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;
|
|
4069
4079
|
let cliAdmissionSupported = false;
|
|
4070
4080
|
try {
|
|
4071
4081
|
for await (const event of http.streamSse(streamPath, {
|
|
@@ -4076,7 +4086,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4076
4086
|
exactUrlOnly: true,
|
|
4077
4087
|
..._optionalChain([options, 'optionalAccess', _195 => _195.cliAdmission]) ? {
|
|
4078
4088
|
onResponse: (response) => {
|
|
4079
|
-
cliAdmissionSupported = response.headers.get(
|
|
4089
|
+
cliAdmissionSupported = response.headers.get(_chunkEQR5O2D2js.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
4080
4090
|
}
|
|
4081
4091
|
} : {}
|
|
4082
4092
|
})) {
|
|
@@ -4086,12 +4096,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4086
4096
|
if (_optionalChain([options, 'optionalAccess', _196 => _196.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4087
4097
|
if (options.callerIntentV2) {
|
|
4088
4098
|
submitted = false;
|
|
4089
|
-
throw new (0,
|
|
4099
|
+
throw new (0, _chunkEQR5O2D2js.CliPlayAdmissionCallerIntentV2UnsupportedError)(
|
|
4090
4100
|
error.statusCode
|
|
4091
4101
|
);
|
|
4092
4102
|
}
|
|
4093
4103
|
submitted = false;
|
|
4094
|
-
throw new (0,
|
|
4104
|
+
throw new (0, _chunkEQR5O2D2js.CliPlayAdmissionUnsupportedError)(error.statusCode);
|
|
4095
4105
|
}
|
|
4096
4106
|
throw error;
|
|
4097
4107
|
}
|
|
@@ -4104,7 +4114,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4104
4114
|
* @internal
|
|
4105
4115
|
*/
|
|
4106
4116
|
async prefetchPlayRunAdmissionCapability(options) {
|
|
4107
|
-
return
|
|
4117
|
+
return _chunkEQR5O2D2js.readPlayRunAdmissionCapability.call(void 0, this.http, options);
|
|
4108
4118
|
}
|
|
4109
4119
|
/**
|
|
4110
4120
|
* Submit a play run through the legacy event response.
|
|
@@ -4378,7 +4388,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4378
4388
|
* ```
|
|
4379
4389
|
*/
|
|
4380
4390
|
async stagePlayFiles(files) {
|
|
4381
|
-
return
|
|
4391
|
+
return _chunkEQR5O2D2js.stagePlayFiles.call(void 0, this.http, files);
|
|
4382
4392
|
}
|
|
4383
4393
|
/**
|
|
4384
4394
|
* Mint short-lived presigned upload targets for staged play files.
|
|
@@ -4387,7 +4397,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4387
4397
|
* For other files, the server returns a presigned PUT URL. Upload the file body to that URL.
|
|
4388
4398
|
*/
|
|
4389
4399
|
async mintStagedPlayFileUploads(files) {
|
|
4390
|
-
return
|
|
4400
|
+
return _chunkEQR5O2D2js.mintStagedPlayFileUploads.call(void 0, this.http, files);
|
|
4391
4401
|
}
|
|
4392
4402
|
/**
|
|
4393
4403
|
* Resolve staged play files by content hash without uploading bytes.
|
|
@@ -4498,7 +4508,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4498
4508
|
}
|
|
4499
4509
|
})) {
|
|
4500
4510
|
_optionalChain([options, 'optionalAccess', _234 => _234.onEvent, 'optionalCall', _235 => _235(event)]);
|
|
4501
|
-
if (
|
|
4511
|
+
if (_chunkEQR5O2D2js.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4502
4512
|
terminalObserved = true;
|
|
4503
4513
|
}
|
|
4504
4514
|
}
|
|
@@ -4506,7 +4516,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4506
4516
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4507
4517
|
}
|
|
4508
4518
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
4509
|
-
if (terminalObserved ||
|
|
4519
|
+
if (terminalObserved || _chunkEQR5O2D2js.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
|
|
4510
4520
|
return refreshed;
|
|
4511
4521
|
}
|
|
4512
4522
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
@@ -5987,7 +5997,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5987
5997
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5988
5998
|
_optionalChain([options, 'optionalAccess', _336 => _336.onProgress, 'optionalCall', _337 => _337(status)]);
|
|
5989
5999
|
}
|
|
5990
|
-
if (
|
|
6000
|
+
if (_chunkEQR5O2D2js.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
5991
6001
|
terminalObserved = status;
|
|
5992
6002
|
}
|
|
5993
6003
|
}
|
|
@@ -6610,6 +6620,41 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6610
6620
|
{ method: "GET" }
|
|
6611
6621
|
);
|
|
6612
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
|
+
}
|
|
6613
6658
|
/** Fetch one deployed monitor by public key. Prefer `client.monitors.get(...)`. */
|
|
6614
6659
|
async getMonitor(key) {
|
|
6615
6660
|
return this.http.request(
|
|
@@ -6618,7 +6663,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6618
6663
|
);
|
|
6619
6664
|
}
|
|
6620
6665
|
async testMonitorWebhook(key, payload, options) {
|
|
6621
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6666
|
+
if (_optionalChain([options, 'optionalAccess', _371 => _371.dispatch]) === true || _optionalChain([options, 'optionalAccess', _372 => _372.validationOnly]) === false) {
|
|
6622
6667
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6623
6668
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6624
6669
|
void 0,
|
|
@@ -6673,7 +6718,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6673
6718
|
}
|
|
6674
6719
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6675
6720
|
async deleteMonitor(key, options) {
|
|
6676
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6721
|
+
if (_optionalChain([options, 'optionalAccess', _373 => _373.localOnly]) === true) {
|
|
6677
6722
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6678
6723
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6679
6724
|
void 0,
|
|
@@ -6681,11 +6726,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6681
6726
|
);
|
|
6682
6727
|
}
|
|
6683
6728
|
const params = new URLSearchParams();
|
|
6684
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6729
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.dryRun])) params.set("dry_run", "true");
|
|
6685
6730
|
const query = params.toString();
|
|
6686
6731
|
return this.http.request(
|
|
6687
6732
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6688
|
-
_optionalChain([options, 'optionalAccess',
|
|
6733
|
+
_optionalChain([options, 'optionalAccess', _375 => _375.dryRun]) ? { method: "DELETE" } : {
|
|
6689
6734
|
method: "DELETE",
|
|
6690
6735
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6691
6736
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6698,10 +6743,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6698
6743
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6699
6744
|
*/
|
|
6700
6745
|
async reactivateMonitor(key, options) {
|
|
6701
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6746
|
+
const query = _optionalChain([options, 'optionalAccess', _376 => _376.dryRun]) ? "?dry_run=true" : "";
|
|
6702
6747
|
return this.http.request(
|
|
6703
6748
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6704
|
-
_optionalChain([options, 'optionalAccess',
|
|
6749
|
+
_optionalChain([options, 'optionalAccess', _377 => _377.dryRun]) ? { method: "POST", body: {} } : {
|
|
6705
6750
|
method: "POST",
|
|
6706
6751
|
body: {},
|
|
6707
6752
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6715,7 +6760,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6715
6760
|
// ——————————————————————————————————————————————————————————
|
|
6716
6761
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6717
6762
|
monitorJobIdempotencyKey(operation) {
|
|
6718
|
-
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)}`));
|
|
6719
6764
|
const prefix = "monitor-job-";
|
|
6720
6765
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6721
6766
|
const maxOperationLength = Math.max(
|
|
@@ -6726,7 +6771,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6726
6771
|
}
|
|
6727
6772
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6728
6773
|
return {
|
|
6729
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6774
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _381 => _381.trim, 'call', _382 => _382()]) || this.monitorJobIdempotencyKey(operation)
|
|
6730
6775
|
};
|
|
6731
6776
|
}
|
|
6732
6777
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6737,7 +6782,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6737
6782
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6738
6783
|
headers: this.monitorJobHeaders(
|
|
6739
6784
|
"batch-deploy",
|
|
6740
|
-
_optionalChain([options, 'optionalAccess',
|
|
6785
|
+
_optionalChain([options, 'optionalAccess', _383 => _383.idempotencyKey])
|
|
6741
6786
|
),
|
|
6742
6787
|
maxRetries: 0,
|
|
6743
6788
|
exactUrlOnly: true
|
|
@@ -6756,11 +6801,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6756
6801
|
version: 1,
|
|
6757
6802
|
kind: "batch",
|
|
6758
6803
|
monitors: definitions,
|
|
6759
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6804
|
+
..._optionalChain([options, 'optionalAccess', _384 => _384.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6760
6805
|
},
|
|
6761
6806
|
headers: this.monitorJobHeaders(
|
|
6762
6807
|
`batch-sync-${batchId}`,
|
|
6763
|
-
_optionalChain([options, 'optionalAccess',
|
|
6808
|
+
_optionalChain([options, 'optionalAccess', _385 => _385.idempotencyKey])
|
|
6764
6809
|
),
|
|
6765
6810
|
maxRetries: 0,
|
|
6766
6811
|
exactUrlOnly: true
|
|
@@ -6775,7 +6820,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6775
6820
|
body: {},
|
|
6776
6821
|
headers: this.monitorJobHeaders(
|
|
6777
6822
|
`batch-start-${batchId}`,
|
|
6778
|
-
_optionalChain([options, 'optionalAccess',
|
|
6823
|
+
_optionalChain([options, 'optionalAccess', _386 => _386.idempotencyKey])
|
|
6779
6824
|
),
|
|
6780
6825
|
maxRetries: 0,
|
|
6781
6826
|
exactUrlOnly: true
|
|
@@ -6790,7 +6835,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6790
6835
|
body: {},
|
|
6791
6836
|
headers: this.monitorJobHeaders(
|
|
6792
6837
|
`batch-stop-${batchId}`,
|
|
6793
|
-
_optionalChain([options, 'optionalAccess',
|
|
6838
|
+
_optionalChain([options, 'optionalAccess', _387 => _387.idempotencyKey])
|
|
6794
6839
|
),
|
|
6795
6840
|
maxRetries: 0,
|
|
6796
6841
|
exactUrlOnly: true
|
|
@@ -6811,7 +6856,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6811
6856
|
body: {},
|
|
6812
6857
|
headers: this.monitorJobHeaders(
|
|
6813
6858
|
`${action}-${monitorKey}`,
|
|
6814
|
-
_optionalChain([options, 'optionalAccess',
|
|
6859
|
+
_optionalChain([options, 'optionalAccess', _388 => _388.idempotencyKey])
|
|
6815
6860
|
),
|
|
6816
6861
|
maxRetries: 0,
|
|
6817
6862
|
exactUrlOnly: true
|
|
@@ -6824,7 +6869,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6824
6869
|
body: definition,
|
|
6825
6870
|
headers: this.monitorJobHeaders(
|
|
6826
6871
|
`sync-${definition.key}`,
|
|
6827
|
-
_optionalChain([options, 'optionalAccess',
|
|
6872
|
+
_optionalChain([options, 'optionalAccess', _389 => _389.idempotencyKey])
|
|
6828
6873
|
),
|
|
6829
6874
|
maxRetries: 0,
|
|
6830
6875
|
exactUrlOnly: true
|
|
@@ -6837,7 +6882,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6837
6882
|
);
|
|
6838
6883
|
}
|
|
6839
6884
|
async getMonitorJobLogs(jobId, options) {
|
|
6840
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6885
|
+
const query = _optionalChain([options, 'optionalAccess', _390 => _390.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6841
6886
|
return this.http.request(
|
|
6842
6887
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6843
6888
|
{ method: "GET" }
|
|
@@ -6850,15 +6895,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6850
6895
|
);
|
|
6851
6896
|
}
|
|
6852
6897
|
async waitForMonitorJob(jobId, options) {
|
|
6853
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6854
|
-
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)));
|
|
6855
6900
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6856
6901
|
const startedAt = Date.now();
|
|
6857
6902
|
let latest = await this.getMonitorJob(jobId);
|
|
6858
6903
|
while (true) {
|
|
6859
|
-
_optionalChain([options, 'optionalAccess',
|
|
6904
|
+
_optionalChain([options, 'optionalAccess', _393 => _393.onProgress, 'optionalCall', _394 => _394(latest)]);
|
|
6860
6905
|
const job = latest.job;
|
|
6861
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6906
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _395 => _395.state]) === "string" ? job.state : void 0;
|
|
6862
6907
|
if (state && terminal.has(state)) return latest;
|
|
6863
6908
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6864
6909
|
await sleep(pollIntervalMs);
|
|
@@ -6869,12 +6914,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6869
6914
|
// Monitor Fleets
|
|
6870
6915
|
// ——————————————————————————————————————————————————————————
|
|
6871
6916
|
monitorFleetIdempotencyKey(operation) {
|
|
6872
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6917
|
+
const uuid = _optionalChain([globalThis, 'access', _396 => _396.crypto, 'optionalAccess', _397 => _397.randomUUID, 'optionalCall', _398 => _398()]);
|
|
6873
6918
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6874
6919
|
}
|
|
6875
6920
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6876
6921
|
return {
|
|
6877
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6922
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _399 => _399.trim, 'call', _400 => _400()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6878
6923
|
};
|
|
6879
6924
|
}
|
|
6880
6925
|
monitorFleetPath(fleetId) {
|
|
@@ -6894,15 +6939,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6894
6939
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6895
6940
|
const body = {
|
|
6896
6941
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6897
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6898
|
-
..._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 } : {}
|
|
6899
6944
|
};
|
|
6900
6945
|
return this.http.request(
|
|
6901
6946
|
this.monitorFleetPath(fleetId),
|
|
6902
6947
|
{
|
|
6903
6948
|
method: "PUT",
|
|
6904
6949
|
body,
|
|
6905
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
6950
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _403 => _403.idempotencyKey])),
|
|
6906
6951
|
maxRetries: 0,
|
|
6907
6952
|
exactUrlOnly: true
|
|
6908
6953
|
}
|
|
@@ -6915,8 +6960,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6915
6960
|
}
|
|
6916
6961
|
async getMonitorFleet(fleetId, options) {
|
|
6917
6962
|
const params = new URLSearchParams();
|
|
6918
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6919
|
-
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)
|
|
6920
6965
|
params.set("limit", String(options.limit));
|
|
6921
6966
|
const query = params.toString();
|
|
6922
6967
|
return this.http.request(
|
|
@@ -6929,10 +6974,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6929
6974
|
this.monitorFleetPath(fleetId),
|
|
6930
6975
|
{
|
|
6931
6976
|
method: "DELETE",
|
|
6932
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
6977
|
+
body: _optionalChain([options, 'optionalAccess', _406 => _406.dryRun]) ? { dry_run: true } : {},
|
|
6933
6978
|
headers: this.monitorFleetHeaders(
|
|
6934
6979
|
"deactivate",
|
|
6935
|
-
_optionalChain([options, 'optionalAccess',
|
|
6980
|
+
_optionalChain([options, 'optionalAccess', _407 => _407.idempotencyKey])
|
|
6936
6981
|
),
|
|
6937
6982
|
maxRetries: 0,
|
|
6938
6983
|
exactUrlOnly: true
|
|
@@ -6947,7 +6992,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6947
6992
|
body: {},
|
|
6948
6993
|
headers: this.monitorFleetHeaders(
|
|
6949
6994
|
"reactivate",
|
|
6950
|
-
_optionalChain([options, 'optionalAccess',
|
|
6995
|
+
_optionalChain([options, 'optionalAccess', _408 => _408.idempotencyKey])
|
|
6951
6996
|
),
|
|
6952
6997
|
maxRetries: 0,
|
|
6953
6998
|
exactUrlOnly: true
|
|
@@ -6964,13 +7009,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6964
7009
|
* identical to "the request failed".
|
|
6965
7010
|
*/
|
|
6966
7011
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
6967
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6968
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6969
|
-
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
|
+
]);
|
|
6970
7020
|
const startedAt = Date.now();
|
|
6971
7021
|
let latest = await this.getMonitorFleet(fleetId);
|
|
6972
7022
|
while (true) {
|
|
6973
|
-
_optionalChain([options, 'optionalAccess',
|
|
7023
|
+
_optionalChain([options, 'optionalAccess', _412 => _412.onProgress, 'optionalCall', _413 => _413(latest)]);
|
|
6974
7024
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
6975
7025
|
if (status && terminal.has(status)) return latest;
|
|
6976
7026
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|