deepline 0.3.500 → 0.3.501
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/plays/client-core.ts +45 -7
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +155 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +54 -1
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +21 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +9 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +31 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +226 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +41 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-app-transport.ts +374 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +49 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-oidc.ts +25 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-profile.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-sandbox-credential.ts +338 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-staging.ts +417 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +184 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +17 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +18 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +176 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-attempt.ts +81 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-journal.ts +708 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-teardown.ts +160 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +4 -0
- package/dist/cli/{auth-WK3FDPRP.mjs → auth-6ECHXOI4.mjs} +5 -5
- package/dist/cli/auth-VP7PMXKQ.js +43 -0
- package/dist/cli/{billing-O3LVKXE7.mjs → billing-75NZYRXA.mjs} +8 -8
- package/dist/cli/{billing-K7UHZUF4.js → billing-QRR7O6BD.js} +81 -81
- package/dist/cli/{chunk-RAZ3TMOS.js → chunk-463ZOO2L.js} +7 -7
- package/dist/cli/{chunk-W64Y7GE7.js → chunk-4OXHLTCP.js} +1 -1
- package/dist/cli/{chunk-5TVY5OEH.mjs → chunk-5S7MLAI7.mjs} +11 -11
- package/dist/cli/{chunk-SNJNPRIV.js → chunk-5X4AUFYW.js} +7 -7
- package/dist/cli/{chunk-CIV5GJAE.mjs → chunk-66XDYH5T.mjs} +2 -2
- package/dist/cli/{chunk-SRS2D27G.mjs → chunk-7L6QNHUL.mjs} +1 -1
- package/dist/cli/{chunk-GBRI644Y.js → chunk-APAHMCGR.js} +53 -53
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-BMCRTI6Z.mjs} +22 -1
- package/dist/cli/{chunk-K3BHKRMS.js → chunk-BOFCF4L7.js} +3 -3
- package/dist/cli/{chunk-KEBNXJSK.js → chunk-CJJ7JBM2.js} +16 -16
- package/dist/cli/{chunk-5JXGYSXH.mjs → chunk-EHVFBD36.mjs} +1 -1
- package/dist/cli/{chunk-5KAZGZG7.js → chunk-EKF4DKUA.js} +5 -5
- package/dist/cli/{chunk-IX2DPYIV.js → chunk-EKZQ5LQO.js} +3 -3
- package/dist/cli/{chunk-JHNFUCVT.mjs → chunk-EOO7OSS4.mjs} +4 -4
- package/dist/cli/{chunk-GOO4VI5M.js → chunk-FS7XYDOF.js} +16 -16
- package/dist/cli/{chunk-G3NA4R7M.js → chunk-HDKXSHGA.js} +53 -53
- package/dist/cli/{chunk-PHGMC33I.js → chunk-J6SVNKRP.js} +2 -2
- package/dist/cli/{chunk-L7X6ADNM.mjs → chunk-J74N375S.mjs} +4 -4
- package/dist/cli/{chunk-X7ODM2LK.js → chunk-KTOAJP4N.js} +6 -6
- package/dist/cli/{chunk-CBZTKDXW.mjs → chunk-MADTHS56.mjs} +1 -1
- package/dist/cli/{chunk-IZ6YWXIK.mjs → chunk-MSLXAVVK.mjs} +2 -2
- package/dist/cli/{chunk-Q2FXZ4Z5.js → chunk-N2TJJNCW.js} +96 -96
- package/dist/cli/{chunk-CS2AEAD6.mjs → chunk-N4TR6QRI.mjs} +1 -1
- package/dist/cli/{chunk-XCBOOB73.mjs → chunk-NA3J3F2Z.mjs} +1 -1
- package/dist/cli/{chunk-QRKCCY4L.mjs → chunk-O3DDVP7Z.mjs} +1 -1
- package/dist/cli/{chunk-XUOZYAP5.mjs → chunk-OKOXB3LY.mjs} +2 -2
- package/dist/cli/{chunk-SNPZ2QWL.js → chunk-PNF2ZU4R.js} +8 -8
- package/dist/cli/{chunk-X5SO7RV5.mjs → chunk-PXIF74UJ.mjs} +4 -4
- package/dist/cli/{chunk-74VKLBJD.js → chunk-QQ3JJYE2.js} +14 -14
- package/dist/cli/{chunk-4CJWOLOS.mjs → chunk-RFV7PPLS.mjs} +3 -3
- package/dist/cli/{chunk-EQR5O2D2.js → chunk-RNSHCJME.js} +3 -3
- package/dist/cli/{chunk-REIKJREB.js → chunk-RU5ROUFO.js} +5 -5
- package/dist/cli/{chunk-TOGCDNMH.js → chunk-SV2TEZ2M.js} +4 -4
- package/dist/cli/{chunk-MAHLIWOF.mjs → chunk-T4U245E4.mjs} +2 -2
- package/dist/cli/{chunk-T4AGTOKQ.mjs → chunk-T7E3XEPG.mjs} +6 -6
- package/dist/cli/{chunk-RHE4YI4H.js → chunk-TOE7LHEA.js} +6 -6
- package/dist/cli/{chunk-FJZUG633.mjs → chunk-UJRN6YP6.mjs} +3 -3
- package/dist/cli/{chunk-BIE57V6K.js → chunk-UR7JOSLT.js} +360 -300
- package/dist/cli/{chunk-5AC7NUQN.mjs → chunk-V5NHEYU7.mjs} +5 -5
- package/dist/cli/{chunk-PGRPNRP6.mjs → chunk-VD2374K7.mjs} +1 -1
- package/dist/cli/{chunk-VLCY4F6E.js → chunk-VL72UKNW.js} +26 -26
- package/dist/cli/{chunk-56QAHX2K.mjs → chunk-VTDAJZIJ.mjs} +90 -30
- package/dist/cli/{chunk-Z5LE7NXM.js → chunk-VVEMPC2I.js} +2 -2
- package/dist/cli/{chunk-U5GFP26N.js → chunk-W6JTHVPF.js} +21 -21
- package/dist/cli/{chunk-C7355NMU.mjs → chunk-WJUDAHIQ.mjs} +1 -1
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-WSGXBROE.js} +22 -1
- package/dist/cli/{chunk-LNMY2T5S.js → chunk-XEBFJ2PH.js} +41 -41
- package/dist/cli/{chunk-HI2BFS5S.mjs → chunk-Z6AUOV7D.mjs} +2 -2
- package/dist/cli/{chunk-VPVEPGYS.mjs → chunk-ZUOKIBLJ.mjs} +2 -2
- package/dist/cli/{chunk-V7MZYIA7.mjs → chunk-ZUQHQGC5.mjs} +5 -5
- package/dist/cli/{csv-MWCWNIBJ.js → csv-JXX2LXK5.js} +13 -13
- package/dist/cli/{csv-DEUOSTEB.mjs → csv-RZJ4SOIL.mjs} +4 -4
- package/dist/cli/{db-QM5R5BRY.mjs → db-MUTT2NWI.mjs} +8 -8
- package/dist/cli/{db-Q6IRXTTG.js → db-T2KJNONM.js} +29 -29
- package/dist/cli/{describe-CQZ7TBOG.mjs → describe-K3UMAAVO.mjs} +19 -19
- package/dist/cli/describe-SEXUJLE4.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-DCCDXSQI.js → executions-7HSLDRHR.js} +10 -10
- package/dist/cli/{executions-SWBKFCY2.mjs → executions-PHS4R2OX.mjs} +8 -8
- package/dist/cli/{feedback-EU3EYF4V.js → feedback-BJZRM637.js} +8 -8
- package/dist/cli/{feedback-Q27HN3SB.mjs → feedback-RWMDCIDF.mjs} +4 -4
- package/dist/cli/git-VNS7UQWN.js +25 -0
- package/dist/cli/{git-SEQFTQ4N.mjs → git-YW6VHYZG.mjs} +5 -5
- package/dist/cli/index.js +137 -137
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-LCQDEVA3.js → legacy-noops-2WUV2XD7.js} +8 -8
- package/dist/cli/{legacy-noops-XKH4VREG.mjs → legacy-noops-5UBSUPGG.mjs} +5 -5
- package/dist/cli/{monitors-4XWBV46I.mjs → monitors-HWOQO3OK.mjs} +9 -9
- package/dist/cli/{monitors-DJCID6X5.js → monitors-YZZRKSTG.js} +97 -97
- package/dist/cli/{org-BU4FG5PN.js → org-JY7HLHBA.js} +74 -74
- package/dist/cli/{org-PSBGXBRW.mjs → org-NCXT6RB4.mjs} +8 -8
- package/dist/cli/{pages-3PHJYXYB.js → pages-6ZOHXL6X.js} +20 -20
- package/dist/cli/{pages-7QLXLJGQ.mjs → pages-QJO53QAT.mjs} +8 -8
- package/dist/cli/{play-4OLYXRCG.mjs → play-SQRS7JN3.mjs} +20 -20
- package/dist/cli/{play-S3CWPQKB.js → play-TAYGSR35.js} +336 -336
- package/dist/cli/{providers-JT7C2QTC.mjs → providers-3IR3N5DT.mjs} +8 -8
- package/dist/cli/{providers-U4JUMLB2.js → providers-4Q5LOIQ5.js} +11 -11
- package/dist/cli/{quickstart-OUSMXLYZ.js → quickstart-ITNUZENY.js} +6 -6
- package/dist/cli/{quickstart-DQF5CF2I.mjs → quickstart-KCZCYO6B.mjs} +4 -4
- package/dist/cli/{run-RECNI77K.mjs → run-JCWRWDSK.mjs} +24 -24
- package/dist/cli/{run-6XXHLB4X.js → run-YQ57LMKN.js} +42 -42
- package/dist/cli/run-identity-HFYABUJS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MNRZS2N3.mjs} +9 -3
- package/dist/cli/{search-JN7K3GC6.mjs → search-FUM27HQP.mjs} +9 -9
- package/dist/cli/search-I425FRTK.js +32 -0
- package/dist/cli/{search-output-L6PC5SPM.mjs → search-output-EWEYT34M.mjs} +4 -4
- package/dist/cli/{search-output-JGNYXDWZ.js → search-output-XAMWKRJH.js} +6 -6
- package/dist/cli/{secrets-TX6PCZ77.js → secrets-2IRRRZBL.js} +17 -17
- package/dist/cli/{secrets-UOXZWHBY.mjs → secrets-YTI4IAKR.mjs} +8 -8
- package/dist/cli/{sessions-DTE733EH.mjs → sessions-EFS4KUPF.mjs} +5 -5
- package/dist/cli/{sessions-GCEIX4KB.js → sessions-HWTRDXBQ.js} +6 -6
- package/dist/cli/{settings-UGXSDHR5.js → settings-FRVEIOKR.js} +80 -80
- package/dist/cli/{settings-ZGIMRCTC.mjs → settings-NTOO42DY.mjs} +13 -13
- package/dist/cli/{setup-JYB6Z376.js → setup-6ZIOAE2V.js} +49 -49
- package/dist/cli/{setup-UT7AO53D.mjs → setup-PAVQPALX.mjs} +9 -9
- package/dist/cli/{skills-4QJCMN7J.mjs → skills-3O3XTPUM.mjs} +7 -7
- package/dist/cli/skills-6ZNMO2PR.js +36 -0
- package/dist/cli/{tools-RGNXIAA6.mjs → tools-7QSB65UL.mjs} +18 -18
- package/dist/cli/tools-DPV2JES6.js +57 -0
- package/dist/cli/update-Q5GUDEAW.js +34 -0
- package/dist/cli/{update-Q62EVSXZ.mjs → update-T6CYS5ZT.mjs} +9 -9
- package/dist/cli/{workflow-GENV47RD.js → workflow-4KMJBMGX.js} +19 -19
- package/dist/cli/{workflow-YNIOWM7J.mjs → workflow-OMSXZ73T.mjs} +9 -9
- package/dist/{client-Cj3UqrCZ.d.ts → client-Bn8FwKGO.d.ts} +1 -1
- package/dist/{client-DSCTVVRj.d.mts → client-CfNRmjLK.d.mts} +1 -1
- package/dist/{client-core-dI4KTuWS.d.ts → client-core-B91EV0WS.d.ts} +19 -0
- package/dist/{client-core-B-8DTIN1.d.mts → client-core-BG8Cgrmk.d.mts} +19 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -19
- package/dist/index.mjs +8 -8
- package/dist/install-integrity.json +114 -108
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +7 -7
- package/dist/server.mjs +5 -5
- package/package.json +1 -1
- package/dist/cli/auth-H4PCVUN3.js +0 -43
- package/dist/cli/describe-BZ544347.js +0 -50
- package/dist/cli/git-NW6BAXX2.js +0 -25
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-BIQ62ZBE.js +0 -32
- package/dist/cli/skills-53LCPB5R.js +0 -36
- package/dist/cli/tools-HKJK6UNJ.js +0 -57
- package/dist/cli/update-QMZSFTFZ.js +0 -34
|
@@ -20,7 +20,7 @@ var _chunkE4CABWXLjs = require('./chunk-E4CABWXL.js');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkRNSHCJMEjs = require('./chunk-RNSHCJME.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 _chunkSV2TEZ2Mjs = require('./chunk-SV2TEZ2M.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(_chunkSV2TEZ2Mjs.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 {
|
|
@@ -844,8 +844,52 @@ var ToolCalls = class {
|
|
|
844
844
|
}
|
|
845
845
|
};
|
|
846
846
|
|
|
847
|
+
// ../play-runtime/output-size-limits.ts
|
|
848
|
+
var TERMINAL_RUN_RESULT_MAX_BYTES = 6 * 1024 * 1024;
|
|
849
|
+
var LEDGER_TERMINAL_RESULT_MAX_BYTES = 256 * 1024;
|
|
850
|
+
var CUSTOMER_OUTPUT_VALUE_MAX_BYTES = 5 * 1024 * 1024;
|
|
851
|
+
var CUSTOMER_OUTPUT_TOTAL_MAX_BYTES = 5 * 1024 * 1024;
|
|
852
|
+
var RUNTIME_RECEIPT_OUTPUT_MAX_BYTES = 10 * 1024 * 1024;
|
|
853
|
+
var RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES = 32 * 1024 * 1024;
|
|
854
|
+
var RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_BYTES = 2 * 1024 * 1024;
|
|
855
|
+
var RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
|
|
856
|
+
var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
|
|
857
|
+
var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
|
|
858
|
+
var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
|
|
859
|
+
var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
|
|
860
|
+
var JSON_SIZE_LIMIT_REACHED = Symbol("JSON_SIZE_LIMIT_REACHED");
|
|
861
|
+
var OMIT_JSON_OUTPUT_VALUE = Symbol("OMIT_JSON_OUTPUT_VALUE");
|
|
862
|
+
|
|
863
|
+
// ../play-runtime/runtime-gateway-profile.ts
|
|
864
|
+
var RUNTIME_GATEWAY_PROFILE_IDS = {
|
|
865
|
+
vercelApp: "vercel_app@1"
|
|
866
|
+
};
|
|
867
|
+
var RUNTIME_GATEWAY_PROFILES = Object.freeze({
|
|
868
|
+
[RUNTIME_GATEWAY_PROFILE_IDS.vercelApp]: Object.freeze({
|
|
869
|
+
id: RUNTIME_GATEWAY_PROFILE_IDS.vercelApp,
|
|
870
|
+
hosting: "admitting_app_deployment",
|
|
871
|
+
receiptPath: "/api/receipt",
|
|
872
|
+
executionPath: "/api/execution",
|
|
873
|
+
maxPinAgeMs: 6 * 60 * 60 * 1e3,
|
|
874
|
+
poolMaxClients: 2,
|
|
875
|
+
requestBodyMaxBytes: RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES
|
|
876
|
+
})
|
|
877
|
+
});
|
|
878
|
+
var RUNTIME_GATEWAY_PROFILE_ID_SET = new Set(
|
|
879
|
+
Object.values(RUNTIME_GATEWAY_PROFILE_IDS)
|
|
880
|
+
);
|
|
881
|
+
function normalizeRuntimeGatewayProfileId(value) {
|
|
882
|
+
if (typeof value !== "string") return void 0;
|
|
883
|
+
const normalized = value.trim();
|
|
884
|
+
return RUNTIME_GATEWAY_PROFILE_ID_SET.has(normalized) ? normalized : void 0;
|
|
885
|
+
}
|
|
886
|
+
|
|
847
887
|
// ../play-runtime/runtime-environment.ts
|
|
848
888
|
var PLAY_RUNTIME_ENVIRONMENTS = ["preview"];
|
|
889
|
+
function selectedGatewayProfile(value) {
|
|
890
|
+
if (value === void 0) return void 0;
|
|
891
|
+
return _nullishCoalesce(normalizeRuntimeGatewayProfileId(value), () => ( null));
|
|
892
|
+
}
|
|
849
893
|
var PLAY_RUNTIME_NAMESPACE_PATTERN = /^[a-z][a-z0-9-]{0,30}$/;
|
|
850
894
|
var PLAY_RUNTIME_SANDBOX_PLACEMENT_POLICY_PATTERN = /^[a-z][a-z0-9_]*@[1-9][0-9]*$/;
|
|
851
895
|
function normalizePlayRuntimeNamespace(value) {
|
|
@@ -862,10 +906,12 @@ function normalizePlayRuntimeSelection(value) {
|
|
|
862
906
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
863
907
|
const record = value;
|
|
864
908
|
if (Object.keys(record).some(
|
|
865
|
-
(key) => key !== "environment" && key !== "namespace" && key !== "backend" && key !== "sandboxPlacementPolicy"
|
|
909
|
+
(key) => key !== "environment" && key !== "namespace" && key !== "backend" && key !== "sandboxPlacementPolicy" && key !== "gatewayProfile"
|
|
866
910
|
) || record.environment !== "preview") {
|
|
867
911
|
return null;
|
|
868
912
|
}
|
|
913
|
+
const gatewayProfile = selectedGatewayProfile(record.gatewayProfile);
|
|
914
|
+
if (gatewayProfile === null) return null;
|
|
869
915
|
const namespace = normalizePlayRuntimeNamespace(record.namespace);
|
|
870
916
|
if (!namespace) return null;
|
|
871
917
|
const sandboxPlacementPolicy = record.sandboxPlacementPolicy === void 0 ? void 0 : normalizePlayRuntimeSandboxPlacementPolicy(
|
|
@@ -881,7 +927,8 @@ function normalizePlayRuntimeSelection(value) {
|
|
|
881
927
|
environment: "preview",
|
|
882
928
|
namespace,
|
|
883
929
|
...record.backend === void 0 ? {} : { backend: record.backend },
|
|
884
|
-
...sandboxPlacementPolicy ? { sandboxPlacementPolicy } : {}
|
|
930
|
+
...sandboxPlacementPolicy ? { sandboxPlacementPolicy } : {},
|
|
931
|
+
...gatewayProfile ? { gatewayProfile } : {}
|
|
885
932
|
};
|
|
886
933
|
}
|
|
887
934
|
function normalizePlayRunRuntimeSelection(value) {
|
|
@@ -891,14 +938,24 @@ function normalizePlayRunRuntimeSelection(value) {
|
|
|
891
938
|
return normalizePlayRuntimeSelection(value);
|
|
892
939
|
}
|
|
893
940
|
if (Object.keys(record).some(
|
|
894
|
-
(key) => key !== "environment" && key !== "sandboxPlacementPolicy"
|
|
941
|
+
(key) => key !== "environment" && key !== "sandboxPlacementPolicy" && key !== "gatewayProfile"
|
|
895
942
|
)) {
|
|
896
943
|
return null;
|
|
897
944
|
}
|
|
945
|
+
const gatewayProfile = selectedGatewayProfile(record.gatewayProfile);
|
|
946
|
+
if (gatewayProfile === null) return null;
|
|
947
|
+
if (record.sandboxPlacementPolicy === void 0) {
|
|
948
|
+
return gatewayProfile ? { environment: "native", gatewayProfile } : null;
|
|
949
|
+
}
|
|
898
950
|
const sandboxPlacementPolicy = normalizePlayRuntimeSandboxPlacementPolicy(
|
|
899
951
|
record.sandboxPlacementPolicy
|
|
900
952
|
);
|
|
901
|
-
|
|
953
|
+
if (!sandboxPlacementPolicy) return null;
|
|
954
|
+
return {
|
|
955
|
+
environment: "native",
|
|
956
|
+
sandboxPlacementPolicy,
|
|
957
|
+
...gatewayProfile ? { gatewayProfile } : {}
|
|
958
|
+
};
|
|
902
959
|
}
|
|
903
960
|
function normalizePlayRuntimeEnvironment(value) {
|
|
904
961
|
return typeof value === "string" && PLAY_RUNTIME_ENVIRONMENTS.includes(value) ? value : null;
|
|
@@ -932,14 +989,18 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
932
989
|
const configuredNamespace = _optionalChain([env, 'access', _37 => _37.DEEPLINE_RUNTIME_NAMESPACE, 'optionalAccess', _38 => _38.trim, 'call', _39 => _39()]);
|
|
933
990
|
const configuredToken = _optionalChain([env, 'access', _40 => _40.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _41 => _41.trim, 'call', _42 => _42()]);
|
|
934
991
|
const configuredPlacementPolicy = _optionalChain([env, 'access', _43 => _43.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
|
|
992
|
+
const configuredGatewayProfile = _optionalChain([env, 'access', _46 => _46.DEEPLINE_RUNTIME_GATEWAY_PROFILE, 'optionalAccess', _47 => _47.trim, 'call', _48 => _48()]);
|
|
935
993
|
if (!configured) {
|
|
936
|
-
if (configuredNamespace || configuredToken || configuredPlacementPolicy) {
|
|
994
|
+
if (configuredNamespace || configuredToken || configuredPlacementPolicy || configuredGatewayProfile) {
|
|
937
995
|
const present = [];
|
|
938
996
|
if (configuredNamespace) present.push("DEEPLINE_RUNTIME_NAMESPACE");
|
|
939
997
|
if (configuredToken) present.push("DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN");
|
|
940
998
|
if (configuredPlacementPolicy) {
|
|
941
999
|
present.push("DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY");
|
|
942
1000
|
}
|
|
1001
|
+
if (configuredGatewayProfile) {
|
|
1002
|
+
present.push("DEEPLINE_RUNTIME_GATEWAY_PROFILE");
|
|
1003
|
+
}
|
|
943
1004
|
const isPlural = present.length > 1;
|
|
944
1005
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
945
1006
|
[
|
|
@@ -954,18 +1015,32 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
954
1015
|
}
|
|
955
1016
|
return void 0;
|
|
956
1017
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1018
|
+
const selectedGatewayProfile2 = configuredGatewayProfile ? normalizeRuntimeGatewayProfileId(configuredGatewayProfile) : void 0;
|
|
1019
|
+
if (configuredGatewayProfile && !selectedGatewayProfile2) {
|
|
1020
|
+
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1021
|
+
`DEEPLINE_RUNTIME_GATEWAY_PROFILE must be a supported versioned gateway profile id such as vercel_app@1. Received "${configuredGatewayProfile}".`,
|
|
1022
|
+
void 0,
|
|
1023
|
+
"INVALID_RUNTIME_GATEWAY_PROFILE"
|
|
960
1024
|
);
|
|
961
|
-
|
|
1025
|
+
}
|
|
1026
|
+
const gatewayProfile = selectedGatewayProfile2 ? { gatewayProfile: selectedGatewayProfile2 } : {};
|
|
1027
|
+
if (configured === "native") {
|
|
1028
|
+
const sandboxPlacementPolicy = configuredPlacementPolicy ? normalizePlayRuntimeSandboxPlacementPolicy(configuredPlacementPolicy) : void 0;
|
|
1029
|
+
if (configuredNamespace || configuredPlacementPolicy && !sandboxPlacementPolicy || !sandboxPlacementPolicy && !selectedGatewayProfile2) {
|
|
962
1030
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
963
|
-
"DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and no DEEPLINE_RUNTIME_NAMESPACE.",
|
|
1031
|
+
"DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and/or DEEPLINE_RUNTIME_GATEWAY_PROFILE (such as vercel_app@1), and no DEEPLINE_RUNTIME_NAMESPACE.",
|
|
964
1032
|
void 0,
|
|
965
1033
|
"INVALID_RUNTIME_ENVIRONMENT"
|
|
966
1034
|
);
|
|
967
1035
|
}
|
|
968
|
-
|
|
1036
|
+
if (sandboxPlacementPolicy) {
|
|
1037
|
+
return {
|
|
1038
|
+
environment: "native",
|
|
1039
|
+
sandboxPlacementPolicy,
|
|
1040
|
+
...gatewayProfile
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
return { environment: "native", gatewayProfile: selectedGatewayProfile2 };
|
|
969
1044
|
}
|
|
970
1045
|
const environment = normalizePlayRuntimeEnvironment(configured);
|
|
971
1046
|
if (!environment) {
|
|
@@ -983,7 +1058,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
983
1058
|
"INVALID_RUNTIME_NAMESPACE"
|
|
984
1059
|
);
|
|
985
1060
|
}
|
|
986
|
-
const configuredBackendValue = _optionalChain([env, 'access',
|
|
1061
|
+
const configuredBackendValue = _optionalChain([env, 'access', _49 => _49.DEEPLINE_PLAY_RUNNER_BACKEND, 'optionalAccess', _50 => _50.trim, 'call', _51 => _51()]);
|
|
987
1062
|
const configuredBackend = configuredBackendValue === "daytona" || configuredBackendValue === "modal" ? configuredBackendValue : void 0;
|
|
988
1063
|
if (configuredBackendValue && !configuredBackend) {
|
|
989
1064
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
@@ -1003,7 +1078,8 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
1003
1078
|
environment,
|
|
1004
1079
|
namespace,
|
|
1005
1080
|
...configuredBackend ? { backend: configuredBackend } : {},
|
|
1006
|
-
...configuredPlacementPolicy ? { sandboxPlacementPolicy: configuredPlacementPolicy } : {}
|
|
1081
|
+
...configuredPlacementPolicy ? { sandboxPlacementPolicy: configuredPlacementPolicy } : {},
|
|
1082
|
+
...gatewayProfile
|
|
1007
1083
|
};
|
|
1008
1084
|
}
|
|
1009
1085
|
function resolveStartPlayRunRequest(request, env) {
|
|
@@ -1021,7 +1097,7 @@ function resolveStartPlayRunRequest(request, env) {
|
|
|
1021
1097
|
}
|
|
1022
1098
|
function runtimeSelectionHeaders(runtime, env) {
|
|
1023
1099
|
if (!runtime || runtime.environment === "native") return void 0;
|
|
1024
|
-
const token = _optionalChain([env, 'access',
|
|
1100
|
+
const token = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
|
|
1025
1101
|
if (!token) {
|
|
1026
1102
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
1027
1103
|
"DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN is required for explicit preview runtime selection.",
|
|
@@ -1029,10 +1105,10 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1029
1105
|
"RUNTIME_ENVIRONMENT_TOKEN_REQUIRED"
|
|
1030
1106
|
);
|
|
1031
1107
|
}
|
|
1032
|
-
const receivers = _optionalChain([env, 'access',
|
|
1108
|
+
const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
|
|
1033
1109
|
return {
|
|
1034
|
-
[
|
|
1035
|
-
...receivers ? { [
|
|
1110
|
+
[_chunkSV2TEZ2Mjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1111
|
+
...receivers ? { [_chunkSV2TEZ2Mjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1036
1112
|
};
|
|
1037
1113
|
}
|
|
1038
1114
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1047,7 +1123,7 @@ function normalizeTestPolicyOverrides(value, source) {
|
|
|
1047
1123
|
}
|
|
1048
1124
|
function parseEnvTestPolicyOverrides(env) {
|
|
1049
1125
|
const raw = env.DEEPLINE_TEST_POLICY_OVERRIDES;
|
|
1050
|
-
const trimmed = _optionalChain([raw, 'optionalAccess',
|
|
1126
|
+
const trimmed = _optionalChain([raw, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59()]);
|
|
1051
1127
|
if (!trimmed) return void 0;
|
|
1052
1128
|
let parsed;
|
|
1053
1129
|
try {
|
|
@@ -1066,18 +1142,18 @@ function isRecord2(value) {
|
|
|
1066
1142
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
1067
1143
|
}
|
|
1068
1144
|
function normalizePlayStatus(raw) {
|
|
1069
|
-
const runPackage =
|
|
1070
|
-
const packageRun = _optionalChain([runPackage, 'optionalAccess',
|
|
1071
|
-
const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess',
|
|
1072
|
-
const status =
|
|
1145
|
+
const runPackage = _chunkRNSHCJMEjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkRNSHCJMEjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
|
|
1146
|
+
const packageRun = _optionalChain([runPackage, 'optionalAccess', _60 => _60.run]);
|
|
1147
|
+
const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _61 => _61.status]) === "string" ? packageRun.status : null;
|
|
1148
|
+
const status = _chunkRNSHCJMEjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
|
|
1073
1149
|
if (!status) {
|
|
1074
1150
|
throw new Error(
|
|
1075
1151
|
`Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
|
|
1076
1152
|
);
|
|
1077
1153
|
}
|
|
1078
|
-
const runId = typeof raw.runId === "string" ? raw.runId : typeof raw.workflowId === "string" ? raw.workflowId : _nullishCoalesce(_optionalChain([packageRun, 'optionalAccess',
|
|
1079
|
-
const legacyOverview = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess',
|
|
1080
|
-
const runStatus = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess',
|
|
1154
|
+
const runId = typeof raw.runId === "string" ? raw.runId : typeof raw.workflowId === "string" ? raw.workflowId : _nullishCoalesce(_optionalChain([packageRun, 'optionalAccess', _62 => _62.id]), () => ( ""));
|
|
1155
|
+
const legacyOverview = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _63 => _63.overview]), () => ( raw.overview));
|
|
1156
|
+
const runStatus = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _64 => _64.runStatus]), () => ( raw.runStatus));
|
|
1081
1157
|
return {
|
|
1082
1158
|
...raw,
|
|
1083
1159
|
runId,
|
|
@@ -1100,25 +1176,25 @@ var PlayClient = class {
|
|
|
1100
1176
|
async startPlayRun(request, options) {
|
|
1101
1177
|
const resolved = resolveStartPlayRunRequest(request, this.environment);
|
|
1102
1178
|
const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
|
|
1103
|
-
return
|
|
1179
|
+
return _chunkRNSHCJMEjs.startPlayRun.call(void 0,
|
|
1104
1180
|
this.http,
|
|
1105
1181
|
resolved.request,
|
|
1106
|
-
_optionalChain([options, 'optionalAccess',
|
|
1182
|
+
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkSV2TEZ2Mjs.SDK_API_MAJOR) } : headers,
|
|
1107
1183
|
options
|
|
1108
1184
|
);
|
|
1109
1185
|
}
|
|
1110
1186
|
async getPlayStatus(workflowId, options) {
|
|
1111
1187
|
const params = new URLSearchParams();
|
|
1112
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1188
|
+
if (_optionalChain([options, 'optionalAccess', _66 => _66.billing]) === false) {
|
|
1113
1189
|
params.set("billing", "false");
|
|
1114
1190
|
}
|
|
1115
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
1191
|
+
if (_optionalChain([options, 'optionalAccess', _67 => _67.full]) === true) {
|
|
1116
1192
|
params.set("full", "true");
|
|
1117
1193
|
}
|
|
1118
1194
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
1119
1195
|
const response = await this.http.get(
|
|
1120
1196
|
`/api/v2/runs/${encodeURIComponent(workflowId)}${query}`,
|
|
1121
|
-
_optionalChain([options, 'optionalAccess',
|
|
1197
|
+
_optionalChain([options, 'optionalAccess', _68 => _68.runStatus]) === true ? { headers: { "x-deepline-run-status": "1" } } : void 0
|
|
1122
1198
|
);
|
|
1123
1199
|
return normalizePlayStatus(response);
|
|
1124
1200
|
}
|
|
@@ -1131,7 +1207,7 @@ var PlayClient = class {
|
|
|
1131
1207
|
async stopPlay(workflowId, options) {
|
|
1132
1208
|
return this.http.post(
|
|
1133
1209
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1134
|
-
_optionalChain([options, 'optionalAccess',
|
|
1210
|
+
_optionalChain([options, 'optionalAccess', _69 => _69.reason]) ? { reason: options.reason } : {}
|
|
1135
1211
|
);
|
|
1136
1212
|
}
|
|
1137
1213
|
async listPlayRuns(playName) {
|
|
@@ -1143,7 +1219,7 @@ var PlayClient = class {
|
|
|
1143
1219
|
}
|
|
1144
1220
|
async getPlay(name, options) {
|
|
1145
1221
|
const encodedName = encodeURIComponent(name);
|
|
1146
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
1222
|
+
const query = _optionalChain([options, 'optionalAccess', _70 => _70.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _71 => _71.guidance]) ? "?include=guidance" : "";
|
|
1147
1223
|
return this.http.get(`/api/v2/plays/${encodedName}${query}`);
|
|
1148
1224
|
}
|
|
1149
1225
|
async clearPlayHistory(name, request = {}) {
|
|
@@ -1155,7 +1231,7 @@ var PlayClient = class {
|
|
|
1155
1231
|
}
|
|
1156
1232
|
async listPlayVersions(name, options) {
|
|
1157
1233
|
const encodedName = encodeURIComponent(name);
|
|
1158
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
1234
|
+
const suffix = _optionalChain([options, 'optionalAccess', _72 => _72.full]) ? "?full=true" : "";
|
|
1159
1235
|
const response = await this.http.get(
|
|
1160
1236
|
`/api/v2/plays/${encodedName}/versions${suffix}`
|
|
1161
1237
|
);
|
|
@@ -2112,7 +2188,7 @@ function parseDsl(input) {
|
|
|
2112
2188
|
input.slice(position)
|
|
2113
2189
|
);
|
|
2114
2190
|
if (!operation) {
|
|
2115
|
-
const token = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^(?:[=!<>~]+|[A-Za-z_]+)/, 'access',
|
|
2191
|
+
const token = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^(?:[=!<>~]+|[A-Za-z_]+)/, 'access', _73 => _73.exec, 'call', _74 => _74(input.slice(position)), 'optionalAccess', _75 => _75[0]]), () => ( input[position])), () => ( "<end>"));
|
|
2116
2192
|
if (token === "=") {
|
|
2117
2193
|
const corrected = `${input.slice(0, position)}==${input.slice(position + 1)}`;
|
|
2118
2194
|
fail(
|
|
@@ -2191,7 +2267,7 @@ function normalizeRunEventQueryTimestamp(value) {
|
|
|
2191
2267
|
return /[1-9]/.test(extraMicros) ? canonical2.replace(/Z$/, `${extraMicros}Z`) : canonical2;
|
|
2192
2268
|
}
|
|
2193
2269
|
function timestampMicros(value) {
|
|
2194
|
-
const fraction = _nullishCoalesce(_optionalChain([/\.(\d+)Z$/, 'access',
|
|
2270
|
+
const fraction = _nullishCoalesce(_optionalChain([/\.(\d+)Z$/, 'access', _76 => _76.exec, 'call', _77 => _77(value), 'optionalAccess', _78 => _78[1]]), () => ( ""));
|
|
2195
2271
|
return BigInt(Date.parse(value)) * BigInt(1e3) + BigInt(fraction.padEnd(6, "0").slice(3));
|
|
2196
2272
|
}
|
|
2197
2273
|
function time(value, nowMs, fallback) {
|
|
@@ -2464,22 +2540,6 @@ var REDACTION_TRIGGER_RE = new RegExp(
|
|
|
2464
2540
|
"i"
|
|
2465
2541
|
);
|
|
2466
2542
|
|
|
2467
|
-
// ../play-runtime/output-size-limits.ts
|
|
2468
|
-
var TERMINAL_RUN_RESULT_MAX_BYTES = 6 * 1024 * 1024;
|
|
2469
|
-
var LEDGER_TERMINAL_RESULT_MAX_BYTES = 256 * 1024;
|
|
2470
|
-
var CUSTOMER_OUTPUT_VALUE_MAX_BYTES = 5 * 1024 * 1024;
|
|
2471
|
-
var CUSTOMER_OUTPUT_TOTAL_MAX_BYTES = 5 * 1024 * 1024;
|
|
2472
|
-
var RUNTIME_RECEIPT_OUTPUT_MAX_BYTES = 10 * 1024 * 1024;
|
|
2473
|
-
var RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES = 32 * 1024 * 1024;
|
|
2474
|
-
var RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_BYTES = 2 * 1024 * 1024;
|
|
2475
|
-
var RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
|
|
2476
|
-
var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
|
|
2477
|
-
var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
|
|
2478
|
-
var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
|
|
2479
|
-
var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
|
|
2480
|
-
var JSON_SIZE_LIMIT_REACHED = Symbol("JSON_SIZE_LIMIT_REACHED");
|
|
2481
|
-
var OMIT_JSON_OUTPUT_VALUE = Symbol("OMIT_JSON_OUTPUT_VALUE");
|
|
2482
|
-
|
|
2483
2543
|
// ../play-runtime/docflow-node-io.ts
|
|
2484
2544
|
var utf8Encoder = new TextEncoder();
|
|
2485
2545
|
var PLAY_DATASET_BRAND = Symbol.for("deepline.play.dataset");
|
|
@@ -2669,7 +2729,7 @@ var TERMINAL_STATUS_BY_EVENT_TYPE = {
|
|
|
2669
2729
|
|
|
2670
2730
|
// ../play-runtime/run-snapshot-stream.ts
|
|
2671
2731
|
function isTerminalPlayRunLiveStatus(status) {
|
|
2672
|
-
return
|
|
2732
|
+
return _chunkRNSHCJMEjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
|
|
2673
2733
|
}
|
|
2674
2734
|
function makeRunStreamEvent(input) {
|
|
2675
2735
|
return {
|
|
@@ -2699,10 +2759,10 @@ function getStepStatusSignature(snapshot) {
|
|
|
2699
2759
|
_nullishCoalesce(state.artifactTableNamespace, () => ( "")),
|
|
2700
2760
|
_nullishCoalesce(state.startedAt, () => ( "")),
|
|
2701
2761
|
_nullishCoalesce(state.completedAt, () => ( "")),
|
|
2702
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2703
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2762
|
+
_nullishCoalesce(_optionalChain([state, 'access', _79 => _79.progress, 'optionalAccess', _80 => _80.startedAt]), () => ( "")),
|
|
2763
|
+
_nullishCoalesce(_optionalChain([state, 'access', _81 => _81.progress, 'optionalAccess', _82 => _82.completedAt]), () => ( "")),
|
|
2704
2764
|
_nullishCoalesce(state.updatedAt, () => ( "")),
|
|
2705
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2765
|
+
_nullishCoalesce(_optionalChain([state, 'access', _83 => _83.progress, 'optionalAccess', _84 => _84.updatedAt]), () => ( ""))
|
|
2706
2766
|
].join(":")
|
|
2707
2767
|
).join("|");
|
|
2708
2768
|
}
|
|
@@ -2711,11 +2771,11 @@ function getStepProgressSignature(snapshot) {
|
|
|
2711
2771
|
snapshot.nodeStates.map((state) => [
|
|
2712
2772
|
state.nodeId,
|
|
2713
2773
|
projectPlayStepProgressCounters(_nullishCoalesce(state.progress, () => ( {}))),
|
|
2714
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2715
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2716
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2717
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2718
|
-
_nullishCoalesce(_optionalChain([state, 'access',
|
|
2774
|
+
_nullishCoalesce(_optionalChain([state, 'access', _85 => _85.progress, 'optionalAccess', _86 => _86.artifactTableNamespace]), () => ( "")),
|
|
2775
|
+
_nullishCoalesce(_optionalChain([state, 'access', _87 => _87.progress, 'optionalAccess', _88 => _88.startedAt]), () => ( "")),
|
|
2776
|
+
_nullishCoalesce(_optionalChain([state, 'access', _89 => _89.progress, 'optionalAccess', _90 => _90.completedAt]), () => ( "")),
|
|
2777
|
+
_nullishCoalesce(_optionalChain([state, 'access', _91 => _91.progress, 'optionalAccess', _92 => _92.updatedAt]), () => ( "")),
|
|
2778
|
+
_nullishCoalesce(_optionalChain([state, 'access', _93 => _93.progress, 'optionalAccess', _94 => _94.message]), () => ( ""))
|
|
2719
2779
|
])
|
|
2720
2780
|
);
|
|
2721
2781
|
}
|
|
@@ -2785,8 +2845,8 @@ function diffPlayRunStreamEvents(input) {
|
|
|
2785
2845
|
if (state.status === "idle") {
|
|
2786
2846
|
continue;
|
|
2787
2847
|
}
|
|
2788
|
-
const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access',
|
|
2789
|
-
const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access',
|
|
2848
|
+
const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _95 => _95.progress, 'optionalAccess', _96 => _96.startedAt]))), () => ( null));
|
|
2849
|
+
const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _97 => _97.progress, 'optionalAccess', _98 => _98.completedAt]))), () => ( null));
|
|
2790
2850
|
events.push(
|
|
2791
2851
|
makeRunStreamEvent({
|
|
2792
2852
|
cursor,
|
|
@@ -2800,7 +2860,7 @@ function diffPlayRunStreamEvents(input) {
|
|
|
2800
2860
|
...resolveTimingWindow({
|
|
2801
2861
|
startedAt: persistedStartedAt,
|
|
2802
2862
|
completedAt: persistedCompletedAt,
|
|
2803
|
-
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access',
|
|
2863
|
+
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _99 => _99.progress, 'optionalAccess', _100 => _100.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
|
|
2804
2864
|
})
|
|
2805
2865
|
}
|
|
2806
2866
|
})
|
|
@@ -2854,9 +2914,9 @@ function diffPlayRunStreamEvents(input) {
|
|
|
2854
2914
|
if (next.snapshotSignature !== previous.snapshotSignature) {
|
|
2855
2915
|
const enrichedNodeStates = snapshot.nodeStates.map((state) => {
|
|
2856
2916
|
const timing = resolveTimingWindow({
|
|
2857
|
-
startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access',
|
|
2858
|
-
completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access',
|
|
2859
|
-
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access',
|
|
2917
|
+
startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _101 => _101.progress, 'optionalAccess', _102 => _102.startedAt]))), () => ( null)),
|
|
2918
|
+
completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _103 => _103.progress, 'optionalAccess', _104 => _104.completedAt]))), () => ( null)),
|
|
2919
|
+
updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _105 => _105.progress, 'optionalAccess', _106 => _106.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
|
|
2860
2920
|
});
|
|
2861
2921
|
return {
|
|
2862
2922
|
...state,
|
|
@@ -2904,18 +2964,18 @@ var RUN_WATCH_STARTUP_POLL_INTERVAL_MS = 300;
|
|
|
2904
2964
|
var RUN_WATCH_STARTUP_WINDOW_MS = 6e3;
|
|
2905
2965
|
var TERMINAL_LOG_PROJECTION_RETRY_LIMIT = 3;
|
|
2906
2966
|
function waitForNextPoll(ms, signal) {
|
|
2907
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
2967
|
+
if (_optionalChain([signal, 'optionalAccess', _107 => _107.aborted])) {
|
|
2908
2968
|
return Promise.resolve(false);
|
|
2909
2969
|
}
|
|
2910
2970
|
return new Promise((resolve) => {
|
|
2911
2971
|
const finish = (elapsed) => {
|
|
2912
2972
|
clearTimeout(timeout);
|
|
2913
|
-
_optionalChain([signal, 'optionalAccess',
|
|
2973
|
+
_optionalChain([signal, 'optionalAccess', _108 => _108.removeEventListener, 'call', _109 => _109("abort", onAbort)]);
|
|
2914
2974
|
resolve(elapsed);
|
|
2915
2975
|
};
|
|
2916
2976
|
const onAbort = () => finish(false);
|
|
2917
2977
|
const timeout = setTimeout(() => finish(true), ms);
|
|
2918
|
-
_optionalChain([signal, 'optionalAccess',
|
|
2978
|
+
_optionalChain([signal, 'optionalAccess', _110 => _110.addEventListener, 'call', _111 => _111("abort", onAbort, { once: true })]);
|
|
2919
2979
|
});
|
|
2920
2980
|
}
|
|
2921
2981
|
function readSnapshotResponse(response, runId) {
|
|
@@ -2996,7 +3056,7 @@ async function* watchRunEvents(options) {
|
|
|
2996
3056
|
let outageNoticeSent = false;
|
|
2997
3057
|
let pollCount = 0;
|
|
2998
3058
|
let terminalLogProjectionRetries = 0;
|
|
2999
|
-
while (!_optionalChain([signal, 'optionalAccess',
|
|
3059
|
+
while (!_optionalChain([signal, 'optionalAccess', _112 => _112.aborted])) {
|
|
3000
3060
|
const pollStartedAt = Date.now();
|
|
3001
3061
|
const poll = ++pollCount;
|
|
3002
3062
|
const pollIntervalMs = _nullishCoalesce(options.pollIntervalMs, () => ( (pollStartedAt - watchStartedAt < RUN_WATCH_STARTUP_WINDOW_MS ? RUN_WATCH_STARTUP_POLL_INTERVAL_MS : RUN_WATCH_POLL_INTERVAL_MS)));
|
|
@@ -3040,7 +3100,7 @@ async function* watchRunEvents(options) {
|
|
|
3040
3100
|
reportPoll();
|
|
3041
3101
|
} catch (error) {
|
|
3042
3102
|
reportPoll();
|
|
3043
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
3103
|
+
if (_optionalChain([signal, 'optionalAccess', _113 => _113.aborted])) {
|
|
3044
3104
|
return;
|
|
3045
3105
|
}
|
|
3046
3106
|
if (!isTransientPlayRunReadError(error)) {
|
|
@@ -3049,12 +3109,12 @@ async function* watchRunEvents(options) {
|
|
|
3049
3109
|
consecutiveFailures += 1;
|
|
3050
3110
|
const reason = error instanceof Error ? error.message : String(error);
|
|
3051
3111
|
if (!outageNoticeSent) {
|
|
3052
|
-
_optionalChain([options, 'access',
|
|
3112
|
+
_optionalChain([options, 'access', _114 => _114.onRetry, 'optionalCall', _115 => _115({
|
|
3053
3113
|
attempt: consecutiveFailures,
|
|
3054
3114
|
delayMs: pollIntervalMs,
|
|
3055
3115
|
reason
|
|
3056
3116
|
})]);
|
|
3057
|
-
_optionalChain([options, 'access',
|
|
3117
|
+
_optionalChain([options, 'access', _116 => _116.onNotice, 'optionalCall', _117 => _117(
|
|
3058
3118
|
`[watch] run snapshot request failed; retrying snapshot polling (${reason})`
|
|
3059
3119
|
)]);
|
|
3060
3120
|
outageNoticeSent = true;
|
|
@@ -3069,7 +3129,7 @@ async function* watchRunEvents(options) {
|
|
|
3069
3129
|
continue;
|
|
3070
3130
|
}
|
|
3071
3131
|
if (outageNoticeSent) {
|
|
3072
|
-
_optionalChain([options, 'access',
|
|
3132
|
+
_optionalChain([options, 'access', _118 => _118.onNotice, 'optionalCall', _119 => _119("[watch] run snapshot polling recovered")]);
|
|
3073
3133
|
outageNoticeSent = false;
|
|
3074
3134
|
}
|
|
3075
3135
|
consecutiveFailures = 0;
|
|
@@ -3084,14 +3144,14 @@ async function* watchRunEvents(options) {
|
|
|
3084
3144
|
if (!await waitForNextPoll(remaining2, signal)) return;
|
|
3085
3145
|
continue;
|
|
3086
3146
|
}
|
|
3087
|
-
_optionalChain([options, 'access',
|
|
3147
|
+
_optionalChain([options, 'access', _120 => _120.onNotice, 'optionalCall', _121 => _121(
|
|
3088
3148
|
`[watch] terminal status is complete, but final logs are unavailable in this watch; fetch retained logs with deepline runs logs ${runId}`
|
|
3089
3149
|
)]);
|
|
3090
3150
|
} else {
|
|
3091
3151
|
terminalLogProjectionRetries = 0;
|
|
3092
3152
|
}
|
|
3093
3153
|
if (terminalStatus) {
|
|
3094
|
-
await _optionalChain([options, 'access',
|
|
3154
|
+
await _optionalChain([options, 'access', _122 => _122.terminalStatus, 'optionalAccess', _123 => _123.onStatus, 'call', _124 => _124(terminalStatus, snapshot.status)]);
|
|
3095
3155
|
}
|
|
3096
3156
|
const diff = diffPlayRunStreamEvents({
|
|
3097
3157
|
streamId,
|
|
@@ -3155,7 +3215,7 @@ function parseNotificationGroupTarget(value) {
|
|
|
3155
3215
|
}
|
|
3156
3216
|
return { kind: "email", email };
|
|
3157
3217
|
}
|
|
3158
|
-
const slack = _optionalChain([/^slack:(.+)$/i, 'access',
|
|
3218
|
+
const slack = _optionalChain([/^slack:(.+)$/i, 'access', _125 => _125.exec, 'call', _126 => _126(normalized), 'optionalAccess', _127 => _127[1], 'optionalAccess', _128 => _128.trim, 'call', _129 => _129()]);
|
|
3159
3219
|
if (!slack) {
|
|
3160
3220
|
const provider = normalized.split(":", 1)[0] || normalized;
|
|
3161
3221
|
throw new Error(
|
|
@@ -3163,7 +3223,7 @@ function parseNotificationGroupTarget(value) {
|
|
|
3163
3223
|
);
|
|
3164
3224
|
}
|
|
3165
3225
|
const member = /^member:([UW][A-Z0-9]{8,})$/i.exec(slack);
|
|
3166
|
-
if (_optionalChain([member, 'optionalAccess',
|
|
3226
|
+
if (_optionalChain([member, 'optionalAccess', _130 => _130[1]])) {
|
|
3167
3227
|
return { kind: "slack", memberId: member[1].toUpperCase() };
|
|
3168
3228
|
}
|
|
3169
3229
|
if (slack.toLowerCase().startsWith("member:")) {
|
|
@@ -3188,11 +3248,11 @@ var REGISTER_PLAY_ARTIFACTS_COMPILE_CONCURRENCY = 3;
|
|
|
3188
3248
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_COUNT = 3;
|
|
3189
3249
|
var REGISTER_PLAY_ARTIFACTS_MAX_BATCH_BYTES = 25e5;
|
|
3190
3250
|
function isolatedCiRuntimeEventReadHeaders(env) {
|
|
3191
|
-
const schema = _optionalChain([env, 'access',
|
|
3192
|
-
if (_optionalChain([env, 'access',
|
|
3251
|
+
const schema = _optionalChain([env, 'access', _131 => _131.DEEPLINE_RUNTIME_SCHEDULER_SCHEMA, 'optionalAccess', _132 => _132.trim, 'call', _133 => _133()]);
|
|
3252
|
+
if (_optionalChain([env, 'access', _134 => _134.DEEPLINE_SYNTHETIC_RUN, 'optionalAccess', _135 => _135.trim, 'call', _136 => _136()]) !== "1" || !schema || !/^fly_absurd_pr_\d+_\d+(?:_\d+)?$/.test(schema)) {
|
|
3193
3253
|
return void 0;
|
|
3194
3254
|
}
|
|
3195
|
-
const token = _optionalChain([env, 'access',
|
|
3255
|
+
const token = _optionalChain([env, 'access', _137 => _137.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _138 => _138.trim, 'call', _139 => _139()]);
|
|
3196
3256
|
if (!token) {
|
|
3197
3257
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
3198
3258
|
"DEEPLINE_INTERNAL_TOKEN is required for isolated CI runtime event reads.",
|
|
@@ -3200,7 +3260,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3200
3260
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3201
3261
|
);
|
|
3202
3262
|
}
|
|
3203
|
-
return { [
|
|
3263
|
+
return { [_chunkSV2TEZ2Mjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3204
3264
|
}
|
|
3205
3265
|
function sleep(ms) {
|
|
3206
3266
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3215,7 +3275,7 @@ function isTransientCompileManifestError(error) {
|
|
|
3215
3275
|
);
|
|
3216
3276
|
}
|
|
3217
3277
|
function requireCompileManifestResponse(response, playName) {
|
|
3218
|
-
const compilerManifest = _optionalChain([response, 'optionalAccess',
|
|
3278
|
+
const compilerManifest = _optionalChain([response, 'optionalAccess', _140 => _140.compilerManifest]);
|
|
3219
3279
|
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
3220
3280
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
3221
3281
|
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
@@ -3267,7 +3327,7 @@ function chunkRegisterPlayArtifacts(artifacts) {
|
|
|
3267
3327
|
}
|
|
3268
3328
|
function searchParams(options) {
|
|
3269
3329
|
const params = new URLSearchParams();
|
|
3270
|
-
params.set("q", _nullishCoalesce(_optionalChain([options, 'access',
|
|
3330
|
+
params.set("q", _nullishCoalesce(_optionalChain([options, 'access', _141 => _141.query, 'optionalAccess', _142 => _142.trim, 'call', _143 => _143()]), () => ( "")));
|
|
3271
3331
|
params.set(
|
|
3272
3332
|
"include_search_debug",
|
|
3273
3333
|
options.includeSearchDebug ? "true" : "false"
|
|
@@ -3277,13 +3337,13 @@ function searchParams(options) {
|
|
|
3277
3337
|
if (options.offset !== void 0) {
|
|
3278
3338
|
params.set("offset", String(options.offset));
|
|
3279
3339
|
}
|
|
3280
|
-
if (_optionalChain([options, 'access',
|
|
3340
|
+
if (_optionalChain([options, 'access', _144 => _144.categories, 'optionalAccess', _145 => _145.trim, 'call', _146 => _146()])) {
|
|
3281
3341
|
params.set("categories", options.categories.trim());
|
|
3282
3342
|
}
|
|
3283
|
-
if (_optionalChain([options, 'access',
|
|
3343
|
+
if (_optionalChain([options, 'access', _147 => _147.searchTerms, 'optionalAccess', _148 => _148.trim, 'call', _149 => _149()])) {
|
|
3284
3344
|
params.set("search_terms", options.searchTerms.trim());
|
|
3285
3345
|
}
|
|
3286
|
-
if (_optionalChain([options, 'access',
|
|
3346
|
+
if (_optionalChain([options, 'access', _150 => _150.task, 'optionalAccess', _151 => _151.trim, 'call', _152 => _152()])) params.set("task", options.task.trim());
|
|
3287
3347
|
return params;
|
|
3288
3348
|
}
|
|
3289
3349
|
var RUNS_FAILED_LOG_LIMIT = 20;
|
|
@@ -3331,7 +3391,7 @@ function playLiveRunStatus(event) {
|
|
|
3331
3391
|
return null;
|
|
3332
3392
|
}
|
|
3333
3393
|
const payload = getPlayLiveEventPayload(event);
|
|
3334
|
-
return _nullishCoalesce(
|
|
3394
|
+
return _nullishCoalesce(_chunkRNSHCJMEjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkRNSHCJMEjs.isPlayRunPackage.call(void 0, payload) ? _chunkRNSHCJMEjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
|
|
3335
3395
|
}
|
|
3336
3396
|
function appendPlayLiveLogLines(state, payload) {
|
|
3337
3397
|
const lines = readStringArray(payload.lines);
|
|
@@ -3363,7 +3423,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3363
3423
|
if (event.type !== "play.run.snapshot" && event.type !== "play.run.status" && event.type !== "play.run.final_status") {
|
|
3364
3424
|
return null;
|
|
3365
3425
|
}
|
|
3366
|
-
const runId = typeof payload.runId === "string" && payload.runId ? payload.runId :
|
|
3426
|
+
const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkRNSHCJMEjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
|
|
3367
3427
|
const status = _nullishCoalesce(playLiveRunStatus(event), () => ( state.status));
|
|
3368
3428
|
const progressPayload = isRecord3(payload.progress) ? payload.progress : {};
|
|
3369
3429
|
if (event.type === "play.run.final_status" && state.logs.length === 0 && state.lastLogSeq === 0) {
|
|
@@ -3376,7 +3436,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3376
3436
|
}
|
|
3377
3437
|
if ("result" in payload) {
|
|
3378
3438
|
state.result = payload.result;
|
|
3379
|
-
} else if (
|
|
3439
|
+
} else if (_chunkRNSHCJMEjs.isPlayRunPackage.call(void 0, payload)) {
|
|
3380
3440
|
state.result = payload;
|
|
3381
3441
|
}
|
|
3382
3442
|
if (typeof payload.error === "string" && payload.error.trim()) {
|
|
@@ -3389,7 +3449,7 @@ function updatePlayLiveStatusState(state, event) {
|
|
|
3389
3449
|
...payload,
|
|
3390
3450
|
runId,
|
|
3391
3451
|
status,
|
|
3392
|
-
...
|
|
3452
|
+
..._chunkRNSHCJMEjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
|
|
3393
3453
|
progress: {
|
|
3394
3454
|
...progressRecord,
|
|
3395
3455
|
status: typeof progressRecord.status === "string" ? progressRecord.status : status,
|
|
@@ -3407,9 +3467,9 @@ function playRunResultFromStatus(status, startedAt, fallbackRunId) {
|
|
|
3407
3467
|
runId: status.runId || fallbackRunId,
|
|
3408
3468
|
result: _nullishCoalesce(status.package, () => ( status.result)),
|
|
3409
3469
|
...status.package ? { package: status.package } : {},
|
|
3410
|
-
logs: _nullishCoalesce(_optionalChain([status, 'access',
|
|
3470
|
+
logs: _nullishCoalesce(_optionalChain([status, 'access', _153 => _153.progress, 'optionalAccess', _154 => _154.logs]), () => ( [])),
|
|
3411
3471
|
durationMs: Date.now() - startedAt,
|
|
3412
|
-
error: _nullishCoalesce(_optionalChain([status, 'access',
|
|
3472
|
+
error: _nullishCoalesce(_optionalChain([status, 'access', _155 => _155.progress, 'optionalAccess', _156 => _156.error]), () => ( (status.status !== "completed" ? status.status : void 0)))
|
|
3413
3473
|
};
|
|
3414
3474
|
}
|
|
3415
3475
|
var DeeplineClient = (_class = class _DeeplineClient {
|
|
@@ -3511,7 +3571,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3511
3571
|
{},
|
|
3512
3572
|
{
|
|
3513
3573
|
"Idempotency-Key": requireBillingIdempotencyKey(
|
|
3514
|
-
_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3574
|
+
_nullishCoalesce(_optionalChain([options, 'optionalAccess', _157 => _157.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
|
|
3515
3575
|
)
|
|
3516
3576
|
}
|
|
3517
3577
|
),
|
|
@@ -3524,7 +3584,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3524
3584
|
};
|
|
3525
3585
|
this.workspaces = {
|
|
3526
3586
|
members: (options) => {
|
|
3527
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
3587
|
+
const query = _optionalChain([options, 'optionalAccess', _158 => _158.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
3528
3588
|
return this.http.get(`/api/v2/auth/workspace/members${query}`);
|
|
3529
3589
|
},
|
|
3530
3590
|
setMemberGrants: (memberId, grants) => this.http.patch(
|
|
@@ -3539,7 +3599,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3539
3599
|
check: (definition) => this.checkMonitor(definition),
|
|
3540
3600
|
preview: (definition, options) => this.previewMonitor(definition, options),
|
|
3541
3601
|
deploy: (definition, options) => this.deployMonitor(definition, options),
|
|
3542
|
-
sync: (definition, options) => _optionalChain([options, 'optionalAccess',
|
|
3602
|
+
sync: (definition, options) => _optionalChain([options, 'optionalAccess', _159 => _159.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options),
|
|
3543
3603
|
list: (options) => this.listMonitors(options),
|
|
3544
3604
|
ledger: (options) => this.listMonitorLedger(options),
|
|
3545
3605
|
ledgerGet: (key) => this.getMonitorLedgerEntry(key),
|
|
@@ -3551,13 +3611,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3551
3611
|
update: (key, patch) => this.updateMonitor(key, patch),
|
|
3552
3612
|
delete: (key, options) => this.deleteMonitor(key, options),
|
|
3553
3613
|
reactivate: (key, options) => this.reactivateMonitor(key, options),
|
|
3554
|
-
start: (key, options) => _optionalChain([options, 'optionalAccess',
|
|
3614
|
+
start: (key, options) => _optionalChain([options, 'optionalAccess', _160 => _160.dryRun]) ? this.submitMonitorBatch({
|
|
3555
3615
|
kind: "reactivate",
|
|
3556
3616
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3557
3617
|
dryRun: true,
|
|
3558
3618
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
|
|
3559
3619
|
}) : this.submitScalarMonitorLifecycle(key, "start", options),
|
|
3560
|
-
stop: (key, options) => _optionalChain([options, 'optionalAccess',
|
|
3620
|
+
stop: (key, options) => _optionalChain([options, 'optionalAccess', _161 => _161.dryRun]) ? this.submitMonitorBatch({
|
|
3561
3621
|
kind: "deactivate",
|
|
3562
3622
|
scope: { kind: "keys", monitorKeys: [key] },
|
|
3563
3623
|
dryRun: true,
|
|
@@ -3606,8 +3666,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3606
3666
|
/** List this workspace's hosted pages, newest update first. */
|
|
3607
3667
|
async listPages(input) {
|
|
3608
3668
|
const params = new URLSearchParams();
|
|
3609
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3610
|
-
if (_optionalChain([input, 'optionalAccess',
|
|
3669
|
+
if (_optionalChain([input, 'optionalAccess', _162 => _162.cursor])) params.set("cursor", input.cursor);
|
|
3670
|
+
if (_optionalChain([input, 'optionalAccess', _163 => _163.limit])) params.set("limit", String(input.limit));
|
|
3611
3671
|
const query = params.size > 0 ? `?${params}` : "";
|
|
3612
3672
|
return await this.http.get(`/api/v2/pages${query}`);
|
|
3613
3673
|
}
|
|
@@ -3730,17 +3790,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3730
3790
|
*/
|
|
3731
3791
|
async listTools(options) {
|
|
3732
3792
|
const params = new URLSearchParams();
|
|
3733
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3793
|
+
if (_optionalChain([options, 'optionalAccess', _164 => _164.categories, 'optionalAccess', _165 => _165.trim, 'call', _166 => _166()])) {
|
|
3734
3794
|
params.set("categories", options.categories.trim());
|
|
3735
3795
|
}
|
|
3736
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3796
|
+
if (_optionalChain([options, 'optionalAccess', _167 => _167.tags, 'optionalAccess', _168 => _168.trim, 'call', _169 => _169()])) {
|
|
3737
3797
|
params.set("tags", options.tags.trim());
|
|
3738
3798
|
}
|
|
3739
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3799
|
+
if (_optionalChain([options, 'optionalAccess', _170 => _170.grep, 'optionalAccess', _171 => _171.trim, 'call', _172 => _172()])) {
|
|
3740
3800
|
params.set("grep", options.grep.trim());
|
|
3741
3801
|
params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
|
|
3742
3802
|
}
|
|
3743
|
-
params.set("compact", _optionalChain([options, 'optionalAccess',
|
|
3803
|
+
params.set("compact", _optionalChain([options, 'optionalAccess', _173 => _173.compact]) === true ? "true" : "false");
|
|
3744
3804
|
const suffix = params.toString() ? `?${params.toString()}` : "";
|
|
3745
3805
|
const res = await this.http.get(
|
|
3746
3806
|
`/api/v2/tools${suffix}`
|
|
@@ -3773,7 +3833,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3773
3833
|
const params = new URLSearchParams({
|
|
3774
3834
|
view: "category",
|
|
3775
3835
|
categories: normalizedCategory,
|
|
3776
|
-
compact: _optionalChain([options, 'optionalAccess',
|
|
3836
|
+
compact: _optionalChain([options, 'optionalAccess', _174 => _174.compact]) === true ? "true" : "false"
|
|
3777
3837
|
});
|
|
3778
3838
|
const response = await this.http.get(
|
|
3779
3839
|
`/api/v2/tools?${params}`
|
|
@@ -3788,7 +3848,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3788
3848
|
}
|
|
3789
3849
|
/** List discoverable providers without requiring a local plugin catalog. */
|
|
3790
3850
|
async listProviders(options) {
|
|
3791
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
3851
|
+
const suffix = _optionalChain([options, 'optionalAccess', _175 => _175.changed]) ? "?changed=true" : "";
|
|
3792
3852
|
const res = await this.http.get(
|
|
3793
3853
|
`/api/v2/tools/providers${suffix}`
|
|
3794
3854
|
);
|
|
@@ -3819,8 +3879,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3819
3879
|
*/
|
|
3820
3880
|
async search(options = {}) {
|
|
3821
3881
|
const params = searchParams(options);
|
|
3822
|
-
if (_optionalChain([options, 'access',
|
|
3823
|
-
if (_optionalChain([options, 'access',
|
|
3882
|
+
if (_optionalChain([options, 'access', _176 => _176.types, 'optionalAccess', _177 => _177.length])) params.set("types", options.types.join(","));
|
|
3883
|
+
if (_optionalChain([options, 'access', _178 => _178.exclude, 'optionalAccess', _179 => _179.length])) {
|
|
3824
3884
|
params.set("exclude", options.exclude.join(","));
|
|
3825
3885
|
}
|
|
3826
3886
|
return this.http.get(`/api/v2/search?${params.toString()}`);
|
|
@@ -3842,7 +3902,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3842
3902
|
* ```
|
|
3843
3903
|
*/
|
|
3844
3904
|
async getTool(toolId, options) {
|
|
3845
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
3905
|
+
if (_optionalChain([options, 'optionalAccess', _180 => _180.cliInvocationId]) !== void 0) {
|
|
3846
3906
|
validateCliInvocationId(options.cliInvocationId);
|
|
3847
3907
|
}
|
|
3848
3908
|
return this.http.request(
|
|
@@ -3855,7 +3915,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3855
3915
|
retryApiErrors: true,
|
|
3856
3916
|
headers: {
|
|
3857
3917
|
"x-deepline-tool-meta-only": "1",
|
|
3858
|
-
..._optionalChain([options, 'optionalAccess',
|
|
3918
|
+
..._optionalChain([options, 'optionalAccess', _181 => _181.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
3859
3919
|
}
|
|
3860
3920
|
}
|
|
3861
3921
|
);
|
|
@@ -3946,7 +4006,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3946
4006
|
return this.http.post(
|
|
3947
4007
|
"/api/v2/ingestion/repair",
|
|
3948
4008
|
{
|
|
3949
|
-
..._optionalChain([input, 'optionalAccess',
|
|
4009
|
+
..._optionalChain([input, 'optionalAccess', _182 => _182.provider]) ? { provider: input.provider } : {}
|
|
3950
4010
|
}
|
|
3951
4011
|
);
|
|
3952
4012
|
}
|
|
@@ -3998,10 +4058,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3998
4058
|
*/
|
|
3999
4059
|
async preparePlayRunAdmission(request, options) {
|
|
4000
4060
|
const resolved = resolveStartPlayRunRequest(request, this.environment);
|
|
4001
|
-
const prepared = await
|
|
4061
|
+
const prepared = await _chunkRNSHCJMEjs.preparePlayRunAdmission.call(void 0,
|
|
4002
4062
|
this.http,
|
|
4003
4063
|
resolved.request,
|
|
4004
|
-
_optionalChain([options, 'optionalAccess',
|
|
4064
|
+
_optionalChain([options, 'optionalAccess', _183 => _183.onSubmission]),
|
|
4005
4065
|
options
|
|
4006
4066
|
);
|
|
4007
4067
|
const bodyJson = JSON.stringify(prepared.body);
|
|
@@ -4009,9 +4069,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4009
4069
|
resolved.runtime,
|
|
4010
4070
|
this.environment
|
|
4011
4071
|
);
|
|
4012
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4072
|
+
const headers = _optionalChain([options, 'optionalAccess', _184 => _184.cliAdmission]) ? {
|
|
4013
4073
|
...runtimeHeaders,
|
|
4014
|
-
"X-Deepline-API-Major": String(
|
|
4074
|
+
"X-Deepline-API-Major": String(_chunkSV2TEZ2Mjs.SDK_API_MAJOR)
|
|
4015
4075
|
} : runtimeHeaders;
|
|
4016
4076
|
const http = this.http;
|
|
4017
4077
|
let submitted = false;
|
|
@@ -4026,31 +4086,31 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4026
4086
|
);
|
|
4027
4087
|
}
|
|
4028
4088
|
if (submitted) {
|
|
4029
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4030
|
-
await
|
|
4089
|
+
if (!_optionalChain([options, 'optionalAccess', _185 => _185.callerIntentV2])) {
|
|
4090
|
+
await _chunkRNSHCJMEjs.preparePlayRunAdmission.call(void 0,
|
|
4031
4091
|
http,
|
|
4032
4092
|
JSON.parse(bodyJson),
|
|
4033
4093
|
void 0,
|
|
4034
|
-
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4094
|
+
{ signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _186 => _186.signal]), () => ( _optionalChain([options, 'optionalAccess', _187 => _187.signal]))) }
|
|
4035
4095
|
);
|
|
4036
4096
|
}
|
|
4037
4097
|
}
|
|
4038
4098
|
submitted = true;
|
|
4039
4099
|
try {
|
|
4040
|
-
return await
|
|
4100
|
+
return await _chunkRNSHCJMEjs.submitPreparedPlayRunAdmission.call(void 0,
|
|
4041
4101
|
http,
|
|
4042
4102
|
JSON.parse(bodyJson),
|
|
4043
4103
|
prepared.workflowId,
|
|
4044
4104
|
prepared.supportsCallerIntent,
|
|
4045
4105
|
headers,
|
|
4046
4106
|
{
|
|
4047
|
-
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4048
|
-
callerIntentV2: _optionalChain([options, 'optionalAccess',
|
|
4049
|
-
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess',
|
|
4107
|
+
cliAdmission: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _188 => _188.cliAdmission]), () => ( _optionalChain([options, 'optionalAccess', _189 => _189.cliAdmission]))),
|
|
4108
|
+
callerIntentV2: _optionalChain([options, 'optionalAccess', _190 => _190.callerIntentV2]),
|
|
4109
|
+
signal: _nullishCoalesce(_optionalChain([startOptions, 'optionalAccess', _191 => _191.signal]), () => ( _optionalChain([options, 'optionalAccess', _192 => _192.signal])))
|
|
4050
4110
|
}
|
|
4051
4111
|
);
|
|
4052
4112
|
} catch (error) {
|
|
4053
|
-
if (error instanceof
|
|
4113
|
+
if (error instanceof _chunkRNSHCJMEjs.CliPlayAdmissionUnsupportedError || error instanceof _chunkRNSHCJMEjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
|
|
4054
4114
|
submitted = false;
|
|
4055
4115
|
}
|
|
4056
4116
|
throw error;
|
|
@@ -4065,43 +4125,43 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4065
4125
|
);
|
|
4066
4126
|
}
|
|
4067
4127
|
if (submitted) {
|
|
4068
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
4069
|
-
await
|
|
4128
|
+
if (!_optionalChain([options, 'optionalAccess', _193 => _193.callerIntentV2])) {
|
|
4129
|
+
await _chunkRNSHCJMEjs.preparePlayRunAdmission.call(void 0,
|
|
4070
4130
|
http,
|
|
4071
4131
|
JSON.parse(bodyJson),
|
|
4072
4132
|
void 0,
|
|
4073
|
-
{ signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4133
|
+
{ signal: _optionalChain([streamOptions, 'optionalAccess', _194 => _194.signal]) }
|
|
4074
4134
|
);
|
|
4075
4135
|
}
|
|
4076
4136
|
}
|
|
4077
4137
|
submitted = true;
|
|
4078
|
-
const streamPath = _optionalChain([options, 'optionalAccess',
|
|
4138
|
+
const streamPath = _optionalChain([options, 'optionalAccess', _195 => _195.callerIntentV2]) ? _chunkRNSHCJMEjs.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _196 => _196.cliAdmission]) ? _chunkRNSHCJMEjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkRNSHCJMEjs.PLAY_RUN_START_STREAM_PATH;
|
|
4079
4139
|
let cliAdmissionSupported = false;
|
|
4080
4140
|
try {
|
|
4081
4141
|
for await (const event of http.streamSse(streamPath, {
|
|
4082
4142
|
method: "POST",
|
|
4083
4143
|
body: JSON.parse(bodyJson),
|
|
4084
4144
|
headers,
|
|
4085
|
-
signal: _optionalChain([streamOptions, 'optionalAccess',
|
|
4145
|
+
signal: _optionalChain([streamOptions, 'optionalAccess', _197 => _197.signal]),
|
|
4086
4146
|
exactUrlOnly: true,
|
|
4087
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4147
|
+
..._optionalChain([options, 'optionalAccess', _198 => _198.cliAdmission]) ? {
|
|
4088
4148
|
onResponse: (response) => {
|
|
4089
|
-
cliAdmissionSupported = response.headers.get(
|
|
4149
|
+
cliAdmissionSupported = response.headers.get(_chunkRNSHCJMEjs.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
|
|
4090
4150
|
}
|
|
4091
4151
|
} : {}
|
|
4092
4152
|
})) {
|
|
4093
4153
|
if (event.scope === "play") yield event;
|
|
4094
4154
|
}
|
|
4095
4155
|
} catch (error) {
|
|
4096
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4156
|
+
if (_optionalChain([options, 'optionalAccess', _199 => _199.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
4097
4157
|
if (options.callerIntentV2) {
|
|
4098
4158
|
submitted = false;
|
|
4099
|
-
throw new (0,
|
|
4159
|
+
throw new (0, _chunkRNSHCJMEjs.CliPlayAdmissionCallerIntentV2UnsupportedError)(
|
|
4100
4160
|
error.statusCode
|
|
4101
4161
|
);
|
|
4102
4162
|
}
|
|
4103
4163
|
submitted = false;
|
|
4104
|
-
throw new (0,
|
|
4164
|
+
throw new (0, _chunkRNSHCJMEjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
|
|
4105
4165
|
}
|
|
4106
4166
|
throw error;
|
|
4107
4167
|
}
|
|
@@ -4114,7 +4174,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4114
4174
|
* @internal
|
|
4115
4175
|
*/
|
|
4116
4176
|
async prefetchPlayRunAdmissionCapability(options) {
|
|
4117
|
-
return
|
|
4177
|
+
return _chunkRNSHCJMEjs.readPlayRunAdmissionCapability.call(void 0, this.http, options);
|
|
4118
4178
|
}
|
|
4119
4179
|
/**
|
|
4120
4180
|
* Submit a play run through the legacy event response.
|
|
@@ -4131,7 +4191,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4131
4191
|
*/
|
|
4132
4192
|
async *startPlayRunStream(request, options) {
|
|
4133
4193
|
const prepared = await this.preparePlayRunAdmission(request, options);
|
|
4134
|
-
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess',
|
|
4194
|
+
yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _200 => _200.signal]) });
|
|
4135
4195
|
}
|
|
4136
4196
|
/**
|
|
4137
4197
|
* Register a bundled play artifact.
|
|
@@ -4284,7 +4344,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4284
4344
|
compilerManifest,
|
|
4285
4345
|
...input.input ? { input: input.input } : {},
|
|
4286
4346
|
...input.inputFile ? { inputFile: input.inputFile } : {},
|
|
4287
|
-
..._optionalChain([input, 'access',
|
|
4347
|
+
..._optionalChain([input, 'access', _201 => _201.packagedFiles, 'optionalAccess', _202 => _202.length]) ? { packagedFiles: input.packagedFiles } : {},
|
|
4288
4348
|
...input.force ? { force: true } : {},
|
|
4289
4349
|
...input.forceToolRefresh ? { forceToolRefresh: true } : {}
|
|
4290
4350
|
});
|
|
@@ -4314,29 +4374,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4314
4374
|
* ```
|
|
4315
4375
|
*/
|
|
4316
4376
|
async submitPlay(code, csvPath, name, options) {
|
|
4317
|
-
const runtimeInput = _optionalChain([options, 'optionalAccess',
|
|
4377
|
+
const runtimeInput = _optionalChain([options, 'optionalAccess', _203 => _203.input]) ? { ...options.input } : {};
|
|
4318
4378
|
if (csvPath) {
|
|
4319
4379
|
runtimeInput.file = csvPath;
|
|
4320
4380
|
}
|
|
4321
|
-
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4322
|
-
const artifact = _optionalChain([options, 'optionalAccess',
|
|
4323
|
-
if (!_optionalChain([name, 'optionalAccess',
|
|
4381
|
+
const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _204 => _204.sourceCode]), () => ( code));
|
|
4382
|
+
const artifact = _optionalChain([options, 'optionalAccess', _205 => _205.artifact]);
|
|
4383
|
+
if (!_optionalChain([name, 'optionalAccess', _206 => _206.trim, 'call', _207 => _207()])) {
|
|
4324
4384
|
throw new Error("submitPlay requires a play name.");
|
|
4325
4385
|
}
|
|
4326
4386
|
if (!artifact) {
|
|
4327
4387
|
throw new Error("submitPlay requires a bundled play artifact.");
|
|
4328
4388
|
}
|
|
4329
|
-
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async
|
|
4389
|
+
const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _208 => _208.compilerManifest]), async () => ( await this.compilePlayManifest({
|
|
4330
4390
|
name,
|
|
4331
4391
|
sourceCode,
|
|
4332
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4392
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _209 => _209.sourceFiles]),
|
|
4333
4393
|
artifact
|
|
4334
4394
|
})));
|
|
4335
4395
|
const registeredArtifact = await this.registerPlayArtifact({
|
|
4336
4396
|
name,
|
|
4337
4397
|
sourceCode,
|
|
4338
|
-
sourceFiles: _optionalChain([options, 'optionalAccess',
|
|
4339
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4398
|
+
sourceFiles: _optionalChain([options, 'optionalAccess', _210 => _210.sourceFiles]),
|
|
4399
|
+
description: _optionalChain([options, 'optionalAccess', _211 => _211.description]),
|
|
4340
4400
|
artifact,
|
|
4341
4401
|
compilerManifest,
|
|
4342
4402
|
publish: false
|
|
@@ -4350,17 +4410,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4350
4410
|
name,
|
|
4351
4411
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
4352
4412
|
sourceCode,
|
|
4353
|
-
description: _optionalChain([options, 'optionalAccess',
|
|
4413
|
+
description: _optionalChain([options, 'optionalAccess', _212 => _212.description]),
|
|
4354
4414
|
staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
|
|
4355
4415
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
4356
4416
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
4357
4417
|
runtimeArtifact: artifact,
|
|
4358
4418
|
compilerManifest,
|
|
4359
4419
|
...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
|
|
4360
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4361
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4362
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4363
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4420
|
+
..._optionalChain([options, 'optionalAccess', _213 => _213.inputFile]) ? { inputFile: options.inputFile } : {},
|
|
4421
|
+
..._optionalChain([options, 'optionalAccess', _214 => _214.packagedFiles, 'optionalAccess', _215 => _215.length]) ? { packagedFiles: options.packagedFiles } : {},
|
|
4422
|
+
..._optionalChain([options, 'optionalAccess', _216 => _216.force]) ? { force: true } : {},
|
|
4423
|
+
..._optionalChain([options, 'optionalAccess', _217 => _217.forceToolRefresh]) ? { forceToolRefresh: true } : {}
|
|
4364
4424
|
});
|
|
4365
4425
|
}
|
|
4366
4426
|
/**
|
|
@@ -4388,7 +4448,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4388
4448
|
* ```
|
|
4389
4449
|
*/
|
|
4390
4450
|
async stagePlayFiles(files) {
|
|
4391
|
-
return
|
|
4451
|
+
return _chunkRNSHCJMEjs.stagePlayFiles.call(void 0, this.http, files);
|
|
4392
4452
|
}
|
|
4393
4453
|
/**
|
|
4394
4454
|
* Mint short-lived presigned upload targets for staged play files.
|
|
@@ -4397,7 +4457,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4397
4457
|
* For other files, the server returns a presigned PUT URL. Upload the file body to that URL.
|
|
4398
4458
|
*/
|
|
4399
4459
|
async mintStagedPlayFileUploads(files) {
|
|
4400
|
-
return
|
|
4460
|
+
return _chunkRNSHCJMEjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
|
|
4401
4461
|
}
|
|
4402
4462
|
/**
|
|
4403
4463
|
* Resolve staged play files by content hash without uploading bytes.
|
|
@@ -4436,13 +4496,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4436
4496
|
for await (const event of watchRunEvents({
|
|
4437
4497
|
http: this.http,
|
|
4438
4498
|
runId: workflowId,
|
|
4439
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4440
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4441
|
-
onRetry: _optionalChain([options, 'optionalAccess',
|
|
4442
|
-
deferLogs: _optionalChain([options, 'optionalAccess',
|
|
4443
|
-
omitTerminalLogs: _optionalChain([options, 'optionalAccess',
|
|
4444
|
-
onPoll: _optionalChain([options, 'optionalAccess',
|
|
4445
|
-
..._optionalChain([options, 'optionalAccess',
|
|
4499
|
+
signal: _optionalChain([options, 'optionalAccess', _218 => _218.signal]),
|
|
4500
|
+
onNotice: _optionalChain([options, 'optionalAccess', _219 => _219.onNotice]),
|
|
4501
|
+
onRetry: _optionalChain([options, 'optionalAccess', _220 => _220.onRetry]),
|
|
4502
|
+
deferLogs: _optionalChain([options, 'optionalAccess', _221 => _221.deferLogs]),
|
|
4503
|
+
omitTerminalLogs: _optionalChain([options, 'optionalAccess', _222 => _222.omitTerminalLogs]),
|
|
4504
|
+
onPoll: _optionalChain([options, 'optionalAccess', _223 => _223.onPoll]),
|
|
4505
|
+
..._optionalChain([options, 'optionalAccess', _224 => _224.terminalStatus]) ? {
|
|
4446
4506
|
terminalStatus: {
|
|
4447
4507
|
...options.terminalStatus,
|
|
4448
4508
|
onStatus: async (raw, expectedStatus) => {
|
|
@@ -4452,7 +4512,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4452
4512
|
`Run watch returned a mismatched terminal status for ${workflowId}.`
|
|
4453
4513
|
);
|
|
4454
4514
|
}
|
|
4455
|
-
await _optionalChain([options, 'access',
|
|
4515
|
+
await _optionalChain([options, 'access', _225 => _225.terminalStatus, 'optionalAccess', _226 => _226.onStatus, 'call', _227 => _227(status)]);
|
|
4456
4516
|
}
|
|
4457
4517
|
}
|
|
4458
4518
|
} : {}
|
|
@@ -4467,12 +4527,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4467
4527
|
* @deprecated Use `watchRunEvents` for ordinary run watching.
|
|
4468
4528
|
*/
|
|
4469
4529
|
async *streamPlayRunEvents(workflowId, options) {
|
|
4470
|
-
const headers = _optionalChain([options, 'optionalAccess',
|
|
4530
|
+
const headers = _optionalChain([options, 'optionalAccess', _228 => _228.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
4471
4531
|
const params = new URLSearchParams();
|
|
4472
|
-
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4532
|
+
params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _229 => _229.mode]), () => ( "cli")));
|
|
4473
4533
|
for await (const event of this.http.streamSse(
|
|
4474
4534
|
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
4475
|
-
{ signal: _optionalChain([options, 'optionalAccess',
|
|
4535
|
+
{ signal: _optionalChain([options, 'optionalAccess', _230 => _230.signal]), headers }
|
|
4476
4536
|
)) {
|
|
4477
4537
|
if (event.scope === "play") {
|
|
4478
4538
|
yield event;
|
|
@@ -4488,8 +4548,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4488
4548
|
*/
|
|
4489
4549
|
async *observeRunEvents(runId, options) {
|
|
4490
4550
|
yield* this.watchRunEvents(runId, {
|
|
4491
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4492
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4551
|
+
signal: _optionalChain([options, 'optionalAccess', _231 => _231.signal]),
|
|
4552
|
+
onNotice: _optionalChain([options, 'optionalAccess', _232 => _232.onNotice])
|
|
4493
4553
|
});
|
|
4494
4554
|
}
|
|
4495
4555
|
/** Poll snapshots to terminal status and return the durable package. */
|
|
@@ -4497,9 +4557,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4497
4557
|
let terminalObserved = false;
|
|
4498
4558
|
let terminalStatus = null;
|
|
4499
4559
|
for await (const event of this.watchRunEvents(runId, {
|
|
4500
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
4501
|
-
onNotice: _optionalChain([options, 'optionalAccess',
|
|
4502
|
-
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4560
|
+
signal: _optionalChain([options, 'optionalAccess', _233 => _233.signal]),
|
|
4561
|
+
onNotice: _optionalChain([options, 'optionalAccess', _234 => _234.onNotice]),
|
|
4562
|
+
onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _235 => _235.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _236 => _236.onReconnect]))),
|
|
4503
4563
|
terminalStatus: {
|
|
4504
4564
|
runStatus: true,
|
|
4505
4565
|
onStatus: (status) => {
|
|
@@ -4507,16 +4567,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4507
4567
|
}
|
|
4508
4568
|
}
|
|
4509
4569
|
})) {
|
|
4510
|
-
_optionalChain([options, 'optionalAccess',
|
|
4511
|
-
if (
|
|
4570
|
+
_optionalChain([options, 'optionalAccess', _237 => _237.onEvent, 'optionalCall', _238 => _238(event)]);
|
|
4571
|
+
if (_chunkRNSHCJMEjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
|
|
4512
4572
|
terminalObserved = true;
|
|
4513
4573
|
}
|
|
4514
4574
|
}
|
|
4515
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4575
|
+
if (_optionalChain([options, 'optionalAccess', _239 => _239.signal, 'optionalAccess', _240 => _240.aborted])) {
|
|
4516
4576
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
|
|
4517
4577
|
}
|
|
4518
4578
|
const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
|
|
4519
|
-
if (terminalObserved ||
|
|
4579
|
+
if (terminalObserved || _chunkRNSHCJMEjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
|
|
4520
4580
|
return refreshed;
|
|
4521
4581
|
}
|
|
4522
4582
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
@@ -4592,7 +4652,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4592
4652
|
/** List the org's workflows. `GET /api/v2/workflows`. */
|
|
4593
4653
|
async listWorkflows(options) {
|
|
4594
4654
|
const params = new URLSearchParams();
|
|
4595
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4655
|
+
if (typeof _optionalChain([options, 'optionalAccess', _241 => _241.limit]) === "number") {
|
|
4596
4656
|
params.set("limit", String(options.limit));
|
|
4597
4657
|
}
|
|
4598
4658
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4645,7 +4705,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4645
4705
|
/** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
|
|
4646
4706
|
async listWorkflowRuns(id, options) {
|
|
4647
4707
|
const params = new URLSearchParams();
|
|
4648
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
4708
|
+
if (typeof _optionalChain([options, 'optionalAccess', _242 => _242.limit]) === "number") {
|
|
4649
4709
|
params.set("limit", String(options.limit));
|
|
4650
4710
|
}
|
|
4651
4711
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4681,13 +4741,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4681
4741
|
*/
|
|
4682
4742
|
async getRunStatus(runId, options) {
|
|
4683
4743
|
const params = new URLSearchParams();
|
|
4684
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4744
|
+
if (_optionalChain([options, 'optionalAccess', _243 => _243.full]) === true) {
|
|
4685
4745
|
params.set("full", "true");
|
|
4686
4746
|
}
|
|
4687
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4747
|
+
if (_optionalChain([options, 'optionalAccess', _244 => _244.configuration]) === true) {
|
|
4688
4748
|
params.append("include", "configuration");
|
|
4689
4749
|
}
|
|
4690
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4750
|
+
if (_optionalChain([options, 'optionalAccess', _245 => _245.performance]) === true) {
|
|
4691
4751
|
params.append("include", "performance");
|
|
4692
4752
|
}
|
|
4693
4753
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
@@ -4695,7 +4755,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4695
4755
|
`/api/v2/runs/${encodeURIComponent(runId)}${query}`,
|
|
4696
4756
|
{ headers: { "x-deepline-run-status": "1" } }
|
|
4697
4757
|
);
|
|
4698
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4758
|
+
if (_optionalChain([options, 'optionalAccess', _246 => _246.configuration]) === true && !Object.hasOwn(response, "contract")) {
|
|
4699
4759
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4700
4760
|
"This server does not support recorded configuration reads.",
|
|
4701
4761
|
void 0,
|
|
@@ -4703,7 +4763,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4703
4763
|
);
|
|
4704
4764
|
}
|
|
4705
4765
|
const status = normalizePlayStatus(response);
|
|
4706
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4766
|
+
if (_optionalChain([options, 'optionalAccess', _247 => _247.failedLogs]) !== true || status.status !== "failed") {
|
|
4707
4767
|
return status;
|
|
4708
4768
|
}
|
|
4709
4769
|
const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
|
|
@@ -4792,7 +4852,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4792
4852
|
/** The same tenant-scoped run history searched by the dashboard and CLI. */
|
|
4793
4853
|
async getRunsHistory(options = {}) {
|
|
4794
4854
|
const params = new URLSearchParams();
|
|
4795
|
-
const search = _optionalChain([options, 'access',
|
|
4855
|
+
const search = _optionalChain([options, 'access', _248 => _248.search, 'optionalAccess', _249 => _249.trim, 'call', _250 => _250()]);
|
|
4796
4856
|
if (search && search.length > 200) {
|
|
4797
4857
|
throw new Error("Run search must be at most 200 characters.");
|
|
4798
4858
|
}
|
|
@@ -4818,16 +4878,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4818
4878
|
}
|
|
4819
4879
|
/** Read one run page without discarding server pagination metadata. */
|
|
4820
4880
|
async listRunsPage(options) {
|
|
4821
|
-
const playName = _optionalChain([options, 'access',
|
|
4881
|
+
const playName = _optionalChain([options, 'access', _251 => _251.play, 'optionalAccess', _252 => _252.trim, 'call', _253 => _253()]);
|
|
4822
4882
|
const params = new URLSearchParams();
|
|
4823
4883
|
if (playName) {
|
|
4824
4884
|
params.set("play", playName);
|
|
4825
4885
|
}
|
|
4826
|
-
const status = _optionalChain([options, 'access',
|
|
4886
|
+
const status = _optionalChain([options, 'access', _254 => _254.status, 'optionalAccess', _255 => _255.trim, 'call', _256 => _256()]);
|
|
4827
4887
|
if (status) {
|
|
4828
4888
|
params.set("status", status);
|
|
4829
4889
|
}
|
|
4830
|
-
const node = _optionalChain([options, 'access',
|
|
4890
|
+
const node = _optionalChain([options, 'access', _257 => _257.node, 'optionalAccess', _258 => _258.trim, 'call', _259 => _259()]);
|
|
4831
4891
|
if (node) {
|
|
4832
4892
|
if (!playName)
|
|
4833
4893
|
throw new Error("runs.list options.node requires options.play.");
|
|
@@ -4901,8 +4961,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4901
4961
|
* A different key starts another rerun.
|
|
4902
4962
|
*/
|
|
4903
4963
|
async rerun(runId, options) {
|
|
4904
|
-
const idempotencyKey = _optionalChain([options, 'optionalAccess',
|
|
4905
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4964
|
+
const idempotencyKey = _optionalChain([options, 'optionalAccess', _260 => _260.idempotencyKey, 'optionalAccess', _261 => _261.trim, 'call', _262 => _262()]);
|
|
4965
|
+
if (_optionalChain([options, 'optionalAccess', _263 => _263.idempotencyKey]) !== void 0 && !idempotencyKey) {
|
|
4906
4966
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4907
4967
|
"runs.rerun idempotencyKey must not be empty.",
|
|
4908
4968
|
void 0,
|
|
@@ -4911,7 +4971,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4911
4971
|
}
|
|
4912
4972
|
return this.http.post(
|
|
4913
4973
|
`/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
|
|
4914
|
-
_optionalChain([options, 'optionalAccess',
|
|
4974
|
+
_optionalChain([options, 'optionalAccess', _264 => _264.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
|
|
4915
4975
|
{ "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
|
|
4916
4976
|
);
|
|
4917
4977
|
}
|
|
@@ -4925,21 +4985,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4925
4985
|
* ```
|
|
4926
4986
|
*/
|
|
4927
4987
|
async getRunLogs(runId, options) {
|
|
4928
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4988
|
+
if (_optionalChain([options, 'optionalAccess', _265 => _265.all]) === true && options.failed === true) {
|
|
4929
4989
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4930
4990
|
"runs.logs cannot combine all and failed views.",
|
|
4931
4991
|
void 0,
|
|
4932
4992
|
"INVALID_RUN_LOG_VIEW"
|
|
4933
4993
|
);
|
|
4934
4994
|
}
|
|
4935
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
4995
|
+
if (_optionalChain([options, 'optionalAccess', _266 => _266.cursor]) !== void 0 && options.failed === true) {
|
|
4936
4996
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
4937
4997
|
"runs.logs cannot combine failed with cursor.",
|
|
4938
4998
|
void 0,
|
|
4939
4999
|
"INVALID_RUN_LOG_VIEW"
|
|
4940
5000
|
);
|
|
4941
5001
|
}
|
|
4942
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5002
|
+
if (_optionalChain([options, 'optionalAccess', _267 => _267.failed]) === true) {
|
|
4943
5003
|
const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
|
|
4944
5004
|
const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
|
|
4945
5005
|
const page = await this.http.get(
|
|
@@ -4964,18 +5024,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4964
5024
|
...page.logsTruncated ? { logsTruncated: true } : {}
|
|
4965
5025
|
};
|
|
4966
5026
|
}
|
|
4967
|
-
const beforeSequence = _optionalChain([options, 'optionalAccess',
|
|
4968
|
-
const limit = _optionalChain([options, 'optionalAccess',
|
|
5027
|
+
const beforeSequence = _optionalChain([options, 'optionalAccess', _268 => _268.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
|
|
5028
|
+
const limit = _optionalChain([options, 'optionalAccess', _269 => _269.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _270 => _270.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
|
|
4969
5029
|
const fetchPage = (afterSeq2, pageLimit) => this.http.get(
|
|
4970
5030
|
`/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
|
|
4971
5031
|
{ retryApiErrors: true }
|
|
4972
5032
|
);
|
|
4973
5033
|
const probe = await fetchPage(0, 1);
|
|
4974
5034
|
const lastStoredSeq = probe.lastStoredSeq;
|
|
4975
|
-
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access',
|
|
5035
|
+
const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _271 => _271.entries, 'access', _272 => _272[0], 'optionalAccess', _273 => _273.seq]), () => ( null));
|
|
4976
5036
|
const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
|
|
4977
5037
|
const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
|
|
4978
|
-
let afterSeq = _optionalChain([options, 'optionalAccess',
|
|
5038
|
+
let afterSeq = _optionalChain([options, 'optionalAccess', _274 => _274.all]) ? 0 : Math.max(0, windowEndSeq - limit);
|
|
4979
5039
|
const entries = [];
|
|
4980
5040
|
while (entries.length < limit && afterSeq < upperSeq) {
|
|
4981
5041
|
const page = await fetchPage(
|
|
@@ -5009,7 +5069,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5009
5069
|
hasMore: olderLinesExist,
|
|
5010
5070
|
nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
|
|
5011
5071
|
entries: entries.map((entry) => entry.line),
|
|
5012
|
-
view: _optionalChain([options, 'optionalAccess',
|
|
5072
|
+
view: _optionalChain([options, 'optionalAccess', _275 => _275.all]) ? "all" : "tail",
|
|
5013
5073
|
...probe.logsTruncated ? { logsTruncated: true } : {}
|
|
5014
5074
|
};
|
|
5015
5075
|
}
|
|
@@ -5185,7 +5245,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5185
5245
|
limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
|
|
5186
5246
|
offset: String(_nullishCoalesce(input.offset, () => ( 0)))
|
|
5187
5247
|
});
|
|
5188
|
-
if (_optionalChain([input, 'access',
|
|
5248
|
+
if (_optionalChain([input, 'access', _276 => _276.runId, 'optionalAccess', _277 => _277.trim, 'call', _278 => _278()])) {
|
|
5189
5249
|
params.set("runId", input.runId.trim());
|
|
5190
5250
|
}
|
|
5191
5251
|
if (input.rowMode === "all" || input.rowMode === "live") {
|
|
@@ -5198,9 +5258,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5198
5258
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
5199
5259
|
{ signal: input.signal }
|
|
5200
5260
|
);
|
|
5201
|
-
const requestedRunId = _optionalChain([input, 'access',
|
|
5261
|
+
const requestedRunId = _optionalChain([input, 'access', _279 => _279.runId, 'optionalAccess', _280 => _280.trim, 'call', _281 => _281()]) || "";
|
|
5202
5262
|
if (requestedRunId) {
|
|
5203
|
-
const confirmedRunId = _optionalChain([result, 'access',
|
|
5263
|
+
const confirmedRunId = _optionalChain([result, 'access', _282 => _282.scope, 'optionalAccess', _283 => _283.kind]) === "run" ? result.scope.runId.trim() : "";
|
|
5204
5264
|
const foreignRowRunIds = [
|
|
5205
5265
|
...new Set(
|
|
5206
5266
|
result.rows.map(
|
|
@@ -5208,7 +5268,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5208
5268
|
).filter((runId) => runId && runId !== requestedRunId)
|
|
5209
5269
|
)
|
|
5210
5270
|
];
|
|
5211
|
-
if (_optionalChain([result, 'access',
|
|
5271
|
+
if (_optionalChain([result, 'access', _284 => _284.scope, 'optionalAccess', _285 => _285.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
|
|
5212
5272
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
5213
5273
|
`Run-scoped dataset export was not confirmed for ${requestedRunId}; no rows were returned to the caller. Update Deepline, then retry the same export command. Do not rerun the play.`,
|
|
5214
5274
|
void 0,
|
|
@@ -5237,7 +5297,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5237
5297
|
async stopRun(runId, options) {
|
|
5238
5298
|
return this.http.post(
|
|
5239
5299
|
`/api/v2/runs/${encodeURIComponent(runId)}/stop`,
|
|
5240
|
-
_optionalChain([options, 'optionalAccess',
|
|
5300
|
+
_optionalChain([options, 'optionalAccess', _286 => _286.reason]) ? { reason: options.reason } : {}
|
|
5241
5301
|
);
|
|
5242
5302
|
}
|
|
5243
5303
|
/**
|
|
@@ -5255,11 +5315,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5255
5315
|
* The method clears workspace run-slot state without requiring each run ID.
|
|
5256
5316
|
*/
|
|
5257
5317
|
async stopAllRuns(options) {
|
|
5258
|
-
const dryRun = _optionalChain([options, 'optionalAccess',
|
|
5318
|
+
const dryRun = _optionalChain([options, 'optionalAccess', _287 => _287.dryRun]) === true;
|
|
5259
5319
|
const result = await this.http.post(
|
|
5260
5320
|
"/api/v2/runs/stop-all",
|
|
5261
5321
|
{
|
|
5262
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5322
|
+
..._optionalChain([options, 'optionalAccess', _288 => _288.reason]) ? { reason: options.reason } : {},
|
|
5263
5323
|
...dryRun ? { dryRun: true } : {}
|
|
5264
5324
|
}
|
|
5265
5325
|
);
|
|
@@ -5280,7 +5340,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5280
5340
|
* `origin: "owned"` for org-owned plays.
|
|
5281
5341
|
*/
|
|
5282
5342
|
async listPlays(options) {
|
|
5283
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
5343
|
+
if (!_optionalChain([options, 'optionalAccess', _289 => _289.grep, 'optionalAccess', _290 => _290.trim, 'call', _291 => _291()])) {
|
|
5284
5344
|
return (await this.requestPlaysPage(options, false)).plays;
|
|
5285
5345
|
}
|
|
5286
5346
|
const plays = [];
|
|
@@ -5302,46 +5362,46 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5302
5362
|
}
|
|
5303
5363
|
async requestPlaysPage(options, paginateInventory = true) {
|
|
5304
5364
|
const params = new URLSearchParams();
|
|
5305
|
-
if (paginateInventory && !_optionalChain([options, 'optionalAccess',
|
|
5365
|
+
if (paginateInventory && !_optionalChain([options, 'optionalAccess', _292 => _292.grep, 'optionalAccess', _293 => _293.trim, 'call', _294 => _294()]))
|
|
5306
5366
|
params.set("inventory_paginated", "1");
|
|
5307
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5308
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5309
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5367
|
+
if (_optionalChain([options, 'optionalAccess', _295 => _295.origin])) params.set("origin", options.origin);
|
|
5368
|
+
if (_optionalChain([options, 'optionalAccess', _296 => _296.summaryOnly])) params.set("summary_only", "1");
|
|
5369
|
+
if (_optionalChain([options, 'optionalAccess', _297 => _297.categories])) {
|
|
5310
5370
|
params.set(
|
|
5311
5371
|
"categories",
|
|
5312
5372
|
Array.isArray(options.categories) ? options.categories.join(",") : options.categories
|
|
5313
5373
|
);
|
|
5314
5374
|
}
|
|
5315
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5375
|
+
if (_optionalChain([options, 'optionalAccess', _298 => _298.categories]) || _optionalChain([options, 'optionalAccess', _299 => _299.includeToolCategories])) {
|
|
5316
5376
|
params.set("include_tool_categories", "1");
|
|
5317
5377
|
}
|
|
5318
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5378
|
+
if (_optionalChain([options, 'optionalAccess', _300 => _300.tags])) {
|
|
5319
5379
|
params.set(
|
|
5320
5380
|
"tags",
|
|
5321
5381
|
Array.isArray(options.tags) ? options.tags.join(",") : options.tags
|
|
5322
5382
|
);
|
|
5323
5383
|
}
|
|
5324
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5325
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5384
|
+
if (_optionalChain([options, 'optionalAccess', _301 => _301.includeArchived])) params.set("include_archived", "1");
|
|
5385
|
+
if (_optionalChain([options, 'optionalAccess', _302 => _302.includeCostEstimates])) {
|
|
5326
5386
|
params.set("include_cost_estimates", "1");
|
|
5327
5387
|
}
|
|
5328
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5388
|
+
if (_optionalChain([options, 'optionalAccess', _303 => _303.grep, 'optionalAccess', _304 => _304.trim, 'call', _305 => _305()])) {
|
|
5329
5389
|
params.set("grep", options.grep.trim());
|
|
5330
5390
|
params.set("limit", "60");
|
|
5331
5391
|
}
|
|
5332
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5392
|
+
if (_optionalChain([options, 'optionalAccess', _306 => _306.limit]) !== void 0) {
|
|
5333
5393
|
if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
|
|
5334
5394
|
throw new Error("Play page limit must be a positive integer");
|
|
5335
5395
|
}
|
|
5336
5396
|
params.set("limit", String(options.limit));
|
|
5337
5397
|
}
|
|
5338
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5398
|
+
if (_optionalChain([options, 'optionalAccess', _307 => _307.cursor])) params.set("cursor", options.cursor);
|
|
5339
5399
|
const suffix = params.size ? `?${params.toString()}` : "";
|
|
5340
5400
|
const response = await this.http.get(`/api/v2/plays${suffix}`);
|
|
5341
5401
|
return {
|
|
5342
5402
|
plays: _nullishCoalesce(response.plays, () => ( [])),
|
|
5343
|
-
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5344
|
-
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access',
|
|
5403
|
+
cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _308 => _308.pagination, 'optionalAccess', _309 => _309.cursor]), () => ( response.cursor)), () => ( null)),
|
|
5404
|
+
hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _310 => _310.pagination, 'optionalAccess', _311 => _311.hasMore]), () => ( response.hasMore)))
|
|
5345
5405
|
};
|
|
5346
5406
|
}
|
|
5347
5407
|
/** Read definition-level settings, independently of code revisions. */
|
|
@@ -5395,7 +5455,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5395
5455
|
}
|
|
5396
5456
|
/** Start provider OAuth and return the URL to open in a browser. */
|
|
5397
5457
|
async startIntegrationOAuth(provider, options = {}) {
|
|
5398
|
-
const scopes = _optionalChain([options, 'access',
|
|
5458
|
+
const scopes = _optionalChain([options, 'access', _312 => _312.scopes, 'optionalAccess', _313 => _313.map, 'call', _314 => _314((scope) => scope.trim()), 'access', _315 => _315.filter, 'call', _316 => _316(Boolean)]);
|
|
5399
5459
|
if (scopes !== void 0 && scopes.length === 0) {
|
|
5400
5460
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
5401
5461
|
}
|
|
@@ -5411,8 +5471,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5411
5471
|
return this.http.post("/api/v2/integrations/connect", {
|
|
5412
5472
|
provider: "slack",
|
|
5413
5473
|
scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
|
|
5414
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5415
|
-
..._optionalChain([options, 'optionalAccess',
|
|
5474
|
+
..._optionalChain([options, 'optionalAccess', _317 => _317.successUrl]) ? { success_url: options.successUrl } : {},
|
|
5475
|
+
..._optionalChain([options, 'optionalAccess', _318 => _318.failureUrl]) ? { failure_url: options.failureUrl } : {}
|
|
5416
5476
|
});
|
|
5417
5477
|
}
|
|
5418
5478
|
/** List Slack channels visible to the connected Deepline Slack app. */
|
|
@@ -5487,7 +5547,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5487
5547
|
}
|
|
5488
5548
|
const targets = input.targets.map(parseNotificationGroupTarget);
|
|
5489
5549
|
const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
|
|
5490
|
-
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access',
|
|
5550
|
+
const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _319 => _319[0], 'optionalAccess', _320 => _320.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
|
|
5491
5551
|
if (legacyEvents.length > 0 && !legacyTarget) {
|
|
5492
5552
|
throw new Error(
|
|
5493
5553
|
"--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
|
|
@@ -5523,7 +5583,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5523
5583
|
const existingGroup = current.configuration.groups.find(
|
|
5524
5584
|
(candidate) => candidate.name.toLowerCase() === name.toLowerCase()
|
|
5525
5585
|
);
|
|
5526
|
-
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess',
|
|
5586
|
+
const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _321 => _321.groupKey]), () => ( notificationObjectKey("group")));
|
|
5527
5587
|
const group = _nullishCoalesce(existingGroup, () => ( {
|
|
5528
5588
|
groupKey,
|
|
5529
5589
|
name,
|
|
@@ -5751,7 +5811,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5751
5811
|
/** Read one trigger inventory page without loading run histories. */
|
|
5752
5812
|
async listPlayTriggerInventory(options) {
|
|
5753
5813
|
const params = new URLSearchParams({ view: "inventory" });
|
|
5754
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5814
|
+
if (_optionalChain([options, 'optionalAccess', _322 => _322.cursor])) params.set("cursor", options.cursor);
|
|
5755
5815
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5756
5816
|
}
|
|
5757
5817
|
/** Read one trigger's recent runs, with an explicit partial-history flag. */
|
|
@@ -5760,7 +5820,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5760
5820
|
view: "history",
|
|
5761
5821
|
binding_id: bindingId
|
|
5762
5822
|
});
|
|
5763
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
5823
|
+
if (_optionalChain([options, 'optionalAccess', _323 => _323.limit]) !== void 0)
|
|
5764
5824
|
params.set("history_limit", String(options.limit));
|
|
5765
5825
|
return this.http.get(`/api/v2/plays/triggers?${params}`);
|
|
5766
5826
|
}
|
|
@@ -5948,14 +6008,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5948
6008
|
*/
|
|
5949
6009
|
async runPlay(code, csvPath, name, options) {
|
|
5950
6010
|
const { workflowId } = await this.submitPlay(code, csvPath, name, {
|
|
5951
|
-
input: _optionalChain([options, 'optionalAccess',
|
|
5952
|
-
sourceCode: _optionalChain([options, 'optionalAccess',
|
|
5953
|
-
artifact: _optionalChain([options, 'optionalAccess',
|
|
5954
|
-
compilerManifest: _optionalChain([options, 'optionalAccess',
|
|
5955
|
-
inputFile: _optionalChain([options, 'optionalAccess',
|
|
5956
|
-
packagedFiles: _optionalChain([options, 'optionalAccess',
|
|
5957
|
-
force: _optionalChain([options, 'optionalAccess',
|
|
5958
|
-
forceToolRefresh: _optionalChain([options, 'optionalAccess',
|
|
6011
|
+
input: _optionalChain([options, 'optionalAccess', _324 => _324.input]),
|
|
6012
|
+
sourceCode: _optionalChain([options, 'optionalAccess', _325 => _325.sourceCode]),
|
|
6013
|
+
artifact: _optionalChain([options, 'optionalAccess', _326 => _326.artifact]),
|
|
6014
|
+
compilerManifest: _optionalChain([options, 'optionalAccess', _327 => _327.compilerManifest]),
|
|
6015
|
+
inputFile: _optionalChain([options, 'optionalAccess', _328 => _328.inputFile]),
|
|
6016
|
+
packagedFiles: _optionalChain([options, 'optionalAccess', _329 => _329.packagedFiles]),
|
|
6017
|
+
force: _optionalChain([options, 'optionalAccess', _330 => _330.force]),
|
|
6018
|
+
forceToolRefresh: _optionalChain([options, 'optionalAccess', _331 => _331.forceToolRefresh])
|
|
5959
6019
|
});
|
|
5960
6020
|
const start = Date.now();
|
|
5961
6021
|
const state = {
|
|
@@ -5966,7 +6026,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5966
6026
|
latest: null
|
|
5967
6027
|
};
|
|
5968
6028
|
let terminalObserved = null;
|
|
5969
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6029
|
+
if (_optionalChain([options, 'optionalAccess', _332 => _332.signal, 'optionalAccess', _333 => _333.aborted])) {
|
|
5970
6030
|
await this.cancelPlay(workflowId);
|
|
5971
6031
|
return {
|
|
5972
6032
|
success: false,
|
|
@@ -5977,9 +6037,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5977
6037
|
};
|
|
5978
6038
|
}
|
|
5979
6039
|
for await (const event of this.watchRunEvents(workflowId, {
|
|
5980
|
-
signal: _optionalChain([options, 'optionalAccess',
|
|
6040
|
+
signal: _optionalChain([options, 'optionalAccess', _334 => _334.signal])
|
|
5981
6041
|
})) {
|
|
5982
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6042
|
+
if (_optionalChain([options, 'optionalAccess', _335 => _335.signal, 'optionalAccess', _336 => _336.aborted])) {
|
|
5983
6043
|
await this.cancelPlay(workflowId);
|
|
5984
6044
|
return {
|
|
5985
6045
|
success: false,
|
|
@@ -5989,19 +6049,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5989
6049
|
error: "Cancelled by user"
|
|
5990
6050
|
};
|
|
5991
6051
|
}
|
|
5992
|
-
const previousStatus = _optionalChain([state, 'access',
|
|
6052
|
+
const previousStatus = _optionalChain([state, 'access', _337 => _337.latest, 'optionalAccess', _338 => _338.status]);
|
|
5993
6053
|
const status = updatePlayLiveStatusState(state, event);
|
|
5994
6054
|
if (!status) {
|
|
5995
6055
|
continue;
|
|
5996
6056
|
}
|
|
5997
6057
|
if (event.type !== "play.run.status" || status.status !== previousStatus) {
|
|
5998
|
-
_optionalChain([options, 'optionalAccess',
|
|
6058
|
+
_optionalChain([options, 'optionalAccess', _339 => _339.onProgress, 'optionalCall', _340 => _340(status)]);
|
|
5999
6059
|
}
|
|
6000
|
-
if (
|
|
6060
|
+
if (_chunkRNSHCJMEjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
|
|
6001
6061
|
terminalObserved = status;
|
|
6002
6062
|
}
|
|
6003
6063
|
}
|
|
6004
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6064
|
+
if (_optionalChain([options, 'optionalAccess', _341 => _341.signal, 'optionalAccess', _342 => _342.aborted])) {
|
|
6005
6065
|
await this.cancelPlay(workflowId);
|
|
6006
6066
|
return {
|
|
6007
6067
|
success: false,
|
|
@@ -6054,7 +6114,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6054
6114
|
const response = await this.http.get(
|
|
6055
6115
|
`/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
|
|
6056
6116
|
);
|
|
6057
|
-
const event = _optionalChain([response, 'access',
|
|
6117
|
+
const event = _optionalChain([response, 'access', _343 => _343.entries, 'optionalAccess', _344 => _344[0]]);
|
|
6058
6118
|
if (!event) {
|
|
6059
6119
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6060
6120
|
"No usage event was found for this request_id.",
|
|
@@ -6229,7 +6289,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6229
6289
|
async cancelBillingSubscription(options) {
|
|
6230
6290
|
return this.http.post(
|
|
6231
6291
|
"/api/v2/billing/subscription/cancel",
|
|
6232
|
-
{ action: _optionalChain([options, 'optionalAccess',
|
|
6292
|
+
{ action: _optionalChain([options, 'optionalAccess', _345 => _345.undo]) ? "undo_cancel" : "cancel" }
|
|
6233
6293
|
);
|
|
6234
6294
|
}
|
|
6235
6295
|
/**
|
|
@@ -6241,7 +6301,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6241
6301
|
*/
|
|
6242
6302
|
async listBillingInvoices(options) {
|
|
6243
6303
|
const params = new URLSearchParams();
|
|
6244
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6304
|
+
if (_optionalChain([options, 'optionalAccess', _346 => _346.limit]) !== void 0) {
|
|
6245
6305
|
params.set("limit", String(options.limit));
|
|
6246
6306
|
}
|
|
6247
6307
|
const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
|
|
@@ -6351,7 +6411,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6351
6411
|
/** Create a Stripe-hosted portal session for payment recovery and invoices. */
|
|
6352
6412
|
async createTargetBillingPortalSession(options) {
|
|
6353
6413
|
const response = await this.http.post(
|
|
6354
|
-
_optionalChain([options, 'optionalAccess',
|
|
6414
|
+
_optionalChain([options, 'optionalAccess', _347 => _347.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
|
|
6355
6415
|
{}
|
|
6356
6416
|
);
|
|
6357
6417
|
return response.data;
|
|
@@ -6401,8 +6461,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6401
6461
|
return this.http.request("/api/v2/monitors/audit", {
|
|
6402
6462
|
method: "POST",
|
|
6403
6463
|
body: {
|
|
6404
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6405
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6464
|
+
..._optionalChain([options, 'optionalAccess', _348 => _348.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6465
|
+
..._optionalChain([options, 'optionalAccess', _349 => _349.cursor]) ? { cursor: options.cursor } : {}
|
|
6406
6466
|
},
|
|
6407
6467
|
maxRetries: 0
|
|
6408
6468
|
});
|
|
@@ -6412,8 +6472,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6412
6472
|
return this.http.request("/api/v2/monitors/repair", {
|
|
6413
6473
|
method: "POST",
|
|
6414
6474
|
body: {
|
|
6415
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6416
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6475
|
+
..._optionalChain([options, 'optionalAccess', _350 => _350.fleetId]) ? { fleet_id: options.fleetId } : {},
|
|
6476
|
+
..._optionalChain([options, 'optionalAccess', _351 => _351.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
|
|
6417
6477
|
},
|
|
6418
6478
|
maxRetries: 0
|
|
6419
6479
|
});
|
|
@@ -6421,7 +6481,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6421
6481
|
/** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
|
|
6422
6482
|
async readMonitorsHealth(options) {
|
|
6423
6483
|
const params = new URLSearchParams();
|
|
6424
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6484
|
+
if (_optionalChain([options, 'optionalAccess', _352 => _352.fleetId])) params.set("fleet_id", options.fleetId);
|
|
6425
6485
|
const query = params.toString();
|
|
6426
6486
|
const suffix = query ? `?${query}` : "";
|
|
6427
6487
|
return this.http.request(
|
|
@@ -6494,7 +6554,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6494
6554
|
);
|
|
6495
6555
|
}
|
|
6496
6556
|
const params = new URLSearchParams();
|
|
6497
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6557
|
+
if (_optionalChain([options, 'optionalAccess', _353 => _353.cursor])) params.set("cursor", options.cursor);
|
|
6498
6558
|
const suffix = params.size > 0 ? `?${params}` : "";
|
|
6499
6559
|
return this.http.request(
|
|
6500
6560
|
`/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
|
|
@@ -6541,7 +6601,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6541
6601
|
* a second charge. The submission is never replayed automatically.
|
|
6542
6602
|
*/
|
|
6543
6603
|
async previewMonitor(definition, options) {
|
|
6544
|
-
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6604
|
+
const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _354 => _354.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _355 => _355.crypto, 'optionalAccess', _356 => _356.randomUUID, 'optionalCall', _357 => _357()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
|
|
6545
6605
|
try {
|
|
6546
6606
|
const result = await this.http.request(
|
|
6547
6607
|
"/api/v2/monitors/preview",
|
|
@@ -6549,7 +6609,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6549
6609
|
method: "POST",
|
|
6550
6610
|
body: {
|
|
6551
6611
|
...definition,
|
|
6552
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6612
|
+
..._optionalChain([options, 'optionalAccess', _358 => _358.limit]) === void 0 ? {} : { limit: options.limit }
|
|
6553
6613
|
},
|
|
6554
6614
|
headers: { "Idempotency-Key": idempotencyKey },
|
|
6555
6615
|
maxRetries: 0,
|
|
@@ -6571,7 +6631,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6571
6631
|
* `client.monitors.deploy(...)`.
|
|
6572
6632
|
*/
|
|
6573
6633
|
async deployMonitor(definition, options) {
|
|
6574
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6634
|
+
if (_optionalChain([options, 'optionalAccess', _359 => _359.dryRun])) {
|
|
6575
6635
|
return this.http.request("/api/v2/monitors/check", {
|
|
6576
6636
|
method: "POST",
|
|
6577
6637
|
body: definition
|
|
@@ -6607,12 +6667,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6607
6667
|
/** List deployed monitors. Prefer `client.monitors.list(...)`. */
|
|
6608
6668
|
async listMonitors(options) {
|
|
6609
6669
|
const params = new URLSearchParams();
|
|
6610
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6611
|
-
else if (_optionalChain([options, 'optionalAccess',
|
|
6612
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6670
|
+
if (_optionalChain([options, 'optionalAccess', _360 => _360.state])) params.set("state", options.state);
|
|
6671
|
+
else if (_optionalChain([options, 'optionalAccess', _361 => _361.status])) params.set("status", options.status);
|
|
6672
|
+
if (_optionalChain([options, 'optionalAccess', _362 => _362.limit]) !== void 0)
|
|
6613
6673
|
params.set("limit", String(options.limit));
|
|
6614
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6615
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6674
|
+
if (_optionalChain([options, 'optionalAccess', _363 => _363.cursor])) params.set("cursor", options.cursor);
|
|
6675
|
+
if (_optionalChain([options, 'optionalAccess', _364 => _364.includeConsumers])) params.set("include_consumers", "true");
|
|
6616
6676
|
const query = params.toString();
|
|
6617
6677
|
const suffix = query ? `?${query}` : "";
|
|
6618
6678
|
return this.http.request(
|
|
@@ -6623,16 +6683,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6623
6683
|
/** The Monitors list. Prefer `client.monitors.ledger(...)`. */
|
|
6624
6684
|
async listMonitorLedger(options) {
|
|
6625
6685
|
const params = new URLSearchParams();
|
|
6626
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6627
|
-
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6628
|
-
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6686
|
+
if (_optionalChain([options, 'optionalAccess', _365 => _365.search])) params.set("q", options.search);
|
|
6687
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _366 => _366.states]), () => ( []))) params.append("state", state);
|
|
6688
|
+
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _367 => _367.signals]), () => ( [])))
|
|
6629
6689
|
params.append("signal", signal);
|
|
6630
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6631
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6632
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6633
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6690
|
+
if (_optionalChain([options, 'optionalAccess', _368 => _368.play])) params.set("play", options.play);
|
|
6691
|
+
if (_optionalChain([options, 'optionalAccess', _369 => _369.sort])) params.set("sort", options.sort);
|
|
6692
|
+
if (_optionalChain([options, 'optionalAccess', _370 => _370.window])) params.set("window", options.window);
|
|
6693
|
+
if (_optionalChain([options, 'optionalAccess', _371 => _371.limit]) !== void 0)
|
|
6634
6694
|
params.set("limit", String(options.limit));
|
|
6635
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6695
|
+
if (_optionalChain([options, 'optionalAccess', _372 => _372.cursor])) params.set("cursor", options.cursor);
|
|
6636
6696
|
const query = params.toString();
|
|
6637
6697
|
const suffix = query ? `?${query}` : "";
|
|
6638
6698
|
return this.http.request(
|
|
@@ -6649,7 +6709,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6649
6709
|
}
|
|
6650
6710
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
6651
6711
|
async listMonitorLedgerFindings(key, options) {
|
|
6652
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
6712
|
+
const suffix = _optionalChain([options, 'optionalAccess', _373 => _373.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
6653
6713
|
return this.http.request(
|
|
6654
6714
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
6655
6715
|
{ method: "GET" }
|
|
@@ -6663,7 +6723,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6663
6723
|
);
|
|
6664
6724
|
}
|
|
6665
6725
|
async testMonitorWebhook(key, payload, options) {
|
|
6666
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6726
|
+
if (_optionalChain([options, 'optionalAccess', _374 => _374.dispatch]) === true || _optionalChain([options, 'optionalAccess', _375 => _375.validationOnly]) === false) {
|
|
6667
6727
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6668
6728
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6669
6729
|
void 0,
|
|
@@ -6718,7 +6778,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6718
6778
|
}
|
|
6719
6779
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6720
6780
|
async deleteMonitor(key, options) {
|
|
6721
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6781
|
+
if (_optionalChain([options, 'optionalAccess', _376 => _376.localOnly]) === true) {
|
|
6722
6782
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6723
6783
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6724
6784
|
void 0,
|
|
@@ -6726,11 +6786,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6726
6786
|
);
|
|
6727
6787
|
}
|
|
6728
6788
|
const params = new URLSearchParams();
|
|
6729
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6789
|
+
if (_optionalChain([options, 'optionalAccess', _377 => _377.dryRun])) params.set("dry_run", "true");
|
|
6730
6790
|
const query = params.toString();
|
|
6731
6791
|
return this.http.request(
|
|
6732
6792
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6733
|
-
_optionalChain([options, 'optionalAccess',
|
|
6793
|
+
_optionalChain([options, 'optionalAccess', _378 => _378.dryRun]) ? { method: "DELETE" } : {
|
|
6734
6794
|
method: "DELETE",
|
|
6735
6795
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6736
6796
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6743,10 +6803,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6743
6803
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6744
6804
|
*/
|
|
6745
6805
|
async reactivateMonitor(key, options) {
|
|
6746
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6806
|
+
const query = _optionalChain([options, 'optionalAccess', _379 => _379.dryRun]) ? "?dry_run=true" : "";
|
|
6747
6807
|
return this.http.request(
|
|
6748
6808
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6749
|
-
_optionalChain([options, 'optionalAccess',
|
|
6809
|
+
_optionalChain([options, 'optionalAccess', _380 => _380.dryRun]) ? { method: "POST", body: {} } : {
|
|
6750
6810
|
method: "POST",
|
|
6751
6811
|
body: {},
|
|
6752
6812
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6760,7 +6820,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6760
6820
|
// ——————————————————————————————————————————————————————————
|
|
6761
6821
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6762
6822
|
monitorJobIdempotencyKey(operation) {
|
|
6763
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6823
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _381 => _381.crypto, 'optionalAccess', _382 => _382.randomUUID, 'optionalCall', _383 => _383()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6764
6824
|
const prefix = "monitor-job-";
|
|
6765
6825
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6766
6826
|
const maxOperationLength = Math.max(
|
|
@@ -6771,7 +6831,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6771
6831
|
}
|
|
6772
6832
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6773
6833
|
return {
|
|
6774
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6834
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _384 => _384.trim, 'call', _385 => _385()]) || this.monitorJobIdempotencyKey(operation)
|
|
6775
6835
|
};
|
|
6776
6836
|
}
|
|
6777
6837
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6782,7 +6842,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6782
6842
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6783
6843
|
headers: this.monitorJobHeaders(
|
|
6784
6844
|
"batch-deploy",
|
|
6785
|
-
_optionalChain([options, 'optionalAccess',
|
|
6845
|
+
_optionalChain([options, 'optionalAccess', _386 => _386.idempotencyKey])
|
|
6786
6846
|
),
|
|
6787
6847
|
maxRetries: 0,
|
|
6788
6848
|
exactUrlOnly: true
|
|
@@ -6801,11 +6861,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6801
6861
|
version: 1,
|
|
6802
6862
|
kind: "batch",
|
|
6803
6863
|
monitors: definitions,
|
|
6804
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6864
|
+
..._optionalChain([options, 'optionalAccess', _387 => _387.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6805
6865
|
},
|
|
6806
6866
|
headers: this.monitorJobHeaders(
|
|
6807
6867
|
`batch-sync-${batchId}`,
|
|
6808
|
-
_optionalChain([options, 'optionalAccess',
|
|
6868
|
+
_optionalChain([options, 'optionalAccess', _388 => _388.idempotencyKey])
|
|
6809
6869
|
),
|
|
6810
6870
|
maxRetries: 0,
|
|
6811
6871
|
exactUrlOnly: true
|
|
@@ -6820,7 +6880,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6820
6880
|
body: {},
|
|
6821
6881
|
headers: this.monitorJobHeaders(
|
|
6822
6882
|
`batch-start-${batchId}`,
|
|
6823
|
-
_optionalChain([options, 'optionalAccess',
|
|
6883
|
+
_optionalChain([options, 'optionalAccess', _389 => _389.idempotencyKey])
|
|
6824
6884
|
),
|
|
6825
6885
|
maxRetries: 0,
|
|
6826
6886
|
exactUrlOnly: true
|
|
@@ -6835,7 +6895,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6835
6895
|
body: {},
|
|
6836
6896
|
headers: this.monitorJobHeaders(
|
|
6837
6897
|
`batch-stop-${batchId}`,
|
|
6838
|
-
_optionalChain([options, 'optionalAccess',
|
|
6898
|
+
_optionalChain([options, 'optionalAccess', _390 => _390.idempotencyKey])
|
|
6839
6899
|
),
|
|
6840
6900
|
maxRetries: 0,
|
|
6841
6901
|
exactUrlOnly: true
|
|
@@ -6856,7 +6916,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6856
6916
|
body: {},
|
|
6857
6917
|
headers: this.monitorJobHeaders(
|
|
6858
6918
|
`${action}-${monitorKey}`,
|
|
6859
|
-
_optionalChain([options, 'optionalAccess',
|
|
6919
|
+
_optionalChain([options, 'optionalAccess', _391 => _391.idempotencyKey])
|
|
6860
6920
|
),
|
|
6861
6921
|
maxRetries: 0,
|
|
6862
6922
|
exactUrlOnly: true
|
|
@@ -6869,7 +6929,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6869
6929
|
body: definition,
|
|
6870
6930
|
headers: this.monitorJobHeaders(
|
|
6871
6931
|
`sync-${definition.key}`,
|
|
6872
|
-
_optionalChain([options, 'optionalAccess',
|
|
6932
|
+
_optionalChain([options, 'optionalAccess', _392 => _392.idempotencyKey])
|
|
6873
6933
|
),
|
|
6874
6934
|
maxRetries: 0,
|
|
6875
6935
|
exactUrlOnly: true
|
|
@@ -6882,7 +6942,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6882
6942
|
);
|
|
6883
6943
|
}
|
|
6884
6944
|
async getMonitorJobLogs(jobId, options) {
|
|
6885
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6945
|
+
const query = _optionalChain([options, 'optionalAccess', _393 => _393.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6886
6946
|
return this.http.request(
|
|
6887
6947
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6888
6948
|
{ method: "GET" }
|
|
@@ -6895,15 +6955,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6895
6955
|
);
|
|
6896
6956
|
}
|
|
6897
6957
|
async waitForMonitorJob(jobId, options) {
|
|
6898
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6899
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6958
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _394 => _394.timeoutMs]), () => ( 10 * 6e4)));
|
|
6959
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _395 => _395.pollIntervalMs]), () => ( 2e3)));
|
|
6900
6960
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6901
6961
|
const startedAt = Date.now();
|
|
6902
6962
|
let latest = await this.getMonitorJob(jobId);
|
|
6903
6963
|
while (true) {
|
|
6904
|
-
_optionalChain([options, 'optionalAccess',
|
|
6964
|
+
_optionalChain([options, 'optionalAccess', _396 => _396.onProgress, 'optionalCall', _397 => _397(latest)]);
|
|
6905
6965
|
const job = latest.job;
|
|
6906
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6966
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _398 => _398.state]) === "string" ? job.state : void 0;
|
|
6907
6967
|
if (state && terminal.has(state)) return latest;
|
|
6908
6968
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6909
6969
|
await sleep(pollIntervalMs);
|
|
@@ -6914,12 +6974,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6914
6974
|
// Monitor Fleets
|
|
6915
6975
|
// ——————————————————————————————————————————————————————————
|
|
6916
6976
|
monitorFleetIdempotencyKey(operation) {
|
|
6917
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
6977
|
+
const uuid = _optionalChain([globalThis, 'access', _399 => _399.crypto, 'optionalAccess', _400 => _400.randomUUID, 'optionalCall', _401 => _401()]);
|
|
6918
6978
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6919
6979
|
}
|
|
6920
6980
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
6921
6981
|
return {
|
|
6922
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6982
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _402 => _402.trim, 'call', _403 => _403()]) || this.monitorFleetIdempotencyKey(operation)
|
|
6923
6983
|
};
|
|
6924
6984
|
}
|
|
6925
6985
|
monitorFleetPath(fleetId) {
|
|
@@ -6939,15 +6999,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6939
6999
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
6940
7000
|
const body = {
|
|
6941
7001
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
6942
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6943
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7002
|
+
..._optionalChain([options, 'optionalAccess', _404 => _404.dryRun]) ? { dry_run: true } : {},
|
|
7003
|
+
..._optionalChain([options, 'optionalAccess', _405 => _405.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
6944
7004
|
};
|
|
6945
7005
|
return this.http.request(
|
|
6946
7006
|
this.monitorFleetPath(fleetId),
|
|
6947
7007
|
{
|
|
6948
7008
|
method: "PUT",
|
|
6949
7009
|
body,
|
|
6950
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7010
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _406 => _406.idempotencyKey])),
|
|
6951
7011
|
maxRetries: 0,
|
|
6952
7012
|
exactUrlOnly: true
|
|
6953
7013
|
}
|
|
@@ -6960,8 +7020,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6960
7020
|
}
|
|
6961
7021
|
async getMonitorFleet(fleetId, options) {
|
|
6962
7022
|
const params = new URLSearchParams();
|
|
6963
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6964
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7023
|
+
if (_optionalChain([options, 'optionalAccess', _407 => _407.drift])) params.set("drift", "1");
|
|
7024
|
+
if (_optionalChain([options, 'optionalAccess', _408 => _408.limit]) !== void 0)
|
|
6965
7025
|
params.set("limit", String(options.limit));
|
|
6966
7026
|
const query = params.toString();
|
|
6967
7027
|
return this.http.request(
|
|
@@ -6974,10 +7034,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6974
7034
|
this.monitorFleetPath(fleetId),
|
|
6975
7035
|
{
|
|
6976
7036
|
method: "DELETE",
|
|
6977
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7037
|
+
body: _optionalChain([options, 'optionalAccess', _409 => _409.dryRun]) ? { dry_run: true } : {},
|
|
6978
7038
|
headers: this.monitorFleetHeaders(
|
|
6979
7039
|
"deactivate",
|
|
6980
|
-
_optionalChain([options, 'optionalAccess',
|
|
7040
|
+
_optionalChain([options, 'optionalAccess', _410 => _410.idempotencyKey])
|
|
6981
7041
|
),
|
|
6982
7042
|
maxRetries: 0,
|
|
6983
7043
|
exactUrlOnly: true
|
|
@@ -6992,7 +7052,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6992
7052
|
body: {},
|
|
6993
7053
|
headers: this.monitorFleetHeaders(
|
|
6994
7054
|
"reactivate",
|
|
6995
|
-
_optionalChain([options, 'optionalAccess',
|
|
7055
|
+
_optionalChain([options, 'optionalAccess', _411 => _411.idempotencyKey])
|
|
6996
7056
|
),
|
|
6997
7057
|
maxRetries: 0,
|
|
6998
7058
|
exactUrlOnly: true
|
|
@@ -7009,9 +7069,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7009
7069
|
* identical to "the request failed".
|
|
7010
7070
|
*/
|
|
7011
7071
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7012
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7013
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7014
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7072
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _412 => _412.timeoutMs]), () => ( 10 * 6e4)));
|
|
7073
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _413 => _413.pollIntervalMs]), () => ( 2e3)));
|
|
7074
|
+
const terminal = _optionalChain([options, 'optionalAccess', _414 => _414.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7015
7075
|
"converged",
|
|
7016
7076
|
"degraded",
|
|
7017
7077
|
"deactivated",
|
|
@@ -7020,7 +7080,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7020
7080
|
const startedAt = Date.now();
|
|
7021
7081
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7022
7082
|
while (true) {
|
|
7023
|
-
_optionalChain([options, 'optionalAccess',
|
|
7083
|
+
_optionalChain([options, 'optionalAccess', _415 => _415.onProgress, 'optionalCall', _416 => _416(latest)]);
|
|
7024
7084
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7025
7085
|
if (status && terminal.has(status)) return latest;
|
|
7026
7086
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|