deepline 0.3.505 → 0.3.507
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +148 -11
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +38 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +176 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +17 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/overview.ts +118 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +29 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +4 -2
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +29 -10
- package/dist/bundling-sources/shared_libs/monitors/package.json +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +15 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +24 -4
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +405 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +8 -8
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +52 -5
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +48 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +13 -40
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +36 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-egress.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +66 -0
- package/dist/cli/auth-6PJ4G5PC.js +43 -0
- package/dist/cli/{auth-AHE2EDQA.mjs → auth-BNP3M27C.mjs} +5 -5
- package/dist/cli/{billing-JOIZPHON.js → billing-7HIVX4YJ.js} +101 -91
- package/dist/cli/{billing-7CPWTGGI.mjs → billing-JKJ2AEZ6.mjs} +27 -17
- package/dist/cli/{chunk-PDLOPF5L.mjs → chunk-2OKEMB5A.mjs} +1 -1
- package/dist/cli/{chunk-HASFFOSU.js → chunk-2ZINJVWW.js} +16 -16
- package/dist/cli/{chunk-MHZAG2ZQ.js → chunk-3D5ZNYYI.js} +93 -60
- package/dist/cli/{chunk-7DDACLMX.js → chunk-56SRWY5F.js} +16 -16
- package/dist/cli/{chunk-QGNNAZ5M.mjs → chunk-5A66OJZD.mjs} +1 -1
- package/dist/cli/{chunk-UZ24SF7N.mjs → chunk-5I2XKXLS.mjs} +5 -5
- package/dist/cli/{chunk-SPN7U3MV.js → chunk-5PXGAA2M.js} +4 -4
- package/dist/cli/{chunk-EMUFF6EU.js → chunk-6AQO5OJ5.js} +7 -7
- package/dist/cli/{chunk-WTQLUULB.js → chunk-76R5I7HR.js} +6 -6
- package/dist/cli/{chunk-OMEDQ77C.mjs → chunk-7TZA6LJI.mjs} +5 -5
- package/dist/cli/{chunk-JVKEZT7L.mjs → chunk-AFSYNOG4.mjs} +22 -1
- package/dist/cli/{chunk-OORPAQVC.js → chunk-AXYLMDU3.js} +8 -8
- package/dist/cli/{chunk-FIQ5UEIF.mjs → chunk-D2T4W5LR.mjs} +2 -2
- package/dist/cli/{chunk-Y52XY56V.js → chunk-E5HGDYU3.js} +41 -41
- package/dist/cli/{chunk-3YEOOXD4.js → chunk-E7YIIEZU.js} +11 -11
- package/dist/cli/{chunk-NARJWXBR.mjs → chunk-EEJLV77L.mjs} +2 -2
- package/dist/cli/{chunk-7DDKLFOY.mjs → chunk-EYZJDHXA.mjs} +3 -3
- package/dist/cli/{chunk-K26YOPDO.js → chunk-GDHLL5EQ.js} +22 -1
- package/dist/cli/{chunk-WTUC5VKB.mjs → chunk-GMRWVXU2.mjs} +2 -2
- package/dist/cli/{chunk-PZN24YQQ.mjs → chunk-H334EFON.mjs} +2 -2
- package/dist/cli/{chunk-RT3HJBIH.mjs → chunk-H6PABDS4.mjs} +10 -10
- package/dist/cli/{chunk-7QLK2GHL.js → chunk-HPZONIDF.js} +5 -5
- package/dist/cli/{chunk-5XT4DZQL.mjs → chunk-IBKWVFWP.mjs} +2 -2
- package/dist/cli/{chunk-45XYW477.js → chunk-ILUZ7IHP.js} +21 -21
- package/dist/cli/{chunk-SHKRL7CW.mjs → chunk-IWZRQ6YW.mjs} +1 -1
- package/dist/cli/{chunk-ACI6CUDX.mjs → chunk-JCE2JNGD.mjs} +78 -45
- package/dist/cli/{chunk-XHPB6RGY.js → chunk-JPN6OBPW.js} +1 -1
- package/dist/cli/{chunk-W6I4N4JN.mjs → chunk-LSONU2E2.mjs} +6 -6
- package/dist/cli/{chunk-VXKWF3AD.js → chunk-MN5HO2PN.js} +9 -9
- package/dist/cli/{chunk-6FEN6VWZ.js → chunk-MQRT5NYP.js} +26 -26
- package/dist/cli/{chunk-52FPW2RD.mjs → chunk-NJRJGXVF.mjs} +2 -2
- package/dist/cli/{chunk-BWAYMJ23.js → chunk-OBATCFZO.js} +91 -48
- package/dist/cli/{chunk-YBIVVAL7.mjs → chunk-OPEJASMJ.mjs} +3 -3
- package/dist/cli/{chunk-GXMNOUHP.js → chunk-QWRSWQ7Z.js} +7 -7
- package/dist/cli/{chunk-GAUNJCXQ.js → chunk-REFT4DMJ.js} +96 -96
- package/dist/cli/{chunk-QYGYVCRI.js → chunk-RFJANXCC.js} +14 -14
- package/dist/cli/{chunk-4OFSAZN6.mjs → chunk-RTLWYERT.mjs} +46 -3
- package/dist/cli/{chunk-CSLLQWAB.mjs → chunk-T6FUNWXX.mjs} +1 -1
- package/dist/cli/{chunk-JA7YBRP4.mjs → chunk-TVR4R2E6.mjs} +1 -1
- package/dist/cli/{chunk-ZLN2B5YA.js → chunk-TZ7APOBM.js} +3 -3
- package/dist/cli/{chunk-JSTKLYYD.js → chunk-V2K34NAO.js} +2 -2
- package/dist/cli/{chunk-WPCF7C6B.js → chunk-V4GGTOCX.js} +3 -3
- package/dist/cli/{chunk-IZYOYXG7.mjs → chunk-VGEBRTHF.mjs} +4 -4
- package/dist/cli/{chunk-OA6U5NVB.mjs → chunk-VQLD5M43.mjs} +5 -5
- package/dist/cli/{chunk-LC4FG34E.js → chunk-WOPWSAGS.js} +53 -53
- package/dist/cli/{chunk-MAFZ64RN.mjs → chunk-WQAHMVBT.mjs} +2 -2
- package/dist/cli/{chunk-IDAE5VDH.js → chunk-WTY2R4R3.js} +5 -5
- package/dist/cli/{chunk-6U3AGJWI.mjs → chunk-XKGNEN4P.mjs} +1 -1
- package/dist/cli/{chunk-7AD565DO.mjs → chunk-YAAJHS6W.mjs} +1 -1
- package/dist/cli/{chunk-CA3SYXCS.js → chunk-ZCNGMQVD.js} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-WTPI6ZON.mjs → csv-LZTQOPP2.mjs} +4 -4
- package/dist/cli/{csv-DZHVIW3G.js → csv-WYJVU5HV.js} +13 -13
- package/dist/cli/{db-NR4PJ6AF.mjs → db-D6XFOQP3.mjs} +6 -6
- package/dist/cli/{db-D7LPPNCC.js → db-UCUXPY7S.js} +27 -27
- package/dist/cli/{describe-NCKAJPUG.mjs → describe-HKL2XK67.mjs} +18 -18
- package/dist/cli/describe-XS4OIASD.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-UQG6LWEN.js → executions-5CF5NM7V.js} +8 -8
- package/dist/cli/{executions-RQVJ4LAB.mjs → executions-AFHYXH73.mjs} +6 -6
- package/dist/cli/{feedback-TCHA67IA.js → feedback-GJAX3JZE.js} +8 -8
- package/dist/cli/{feedback-RD4Y3YQR.mjs → feedback-MLKQ572F.mjs} +4 -4
- package/dist/cli/{git-Z7434B7Y.mjs → git-BMLROZOU.mjs} +5 -5
- package/dist/cli/git-RIXUHRDL.js +25 -0
- package/dist/cli/index.js +145 -149
- package/dist/cli/index.mjs +46 -50
- package/dist/cli/{legacy-noops-23WRA7DH.js → legacy-noops-FHRDF7MC.js} +8 -8
- package/dist/cli/{legacy-noops-LQJU4UIV.mjs → legacy-noops-Y7JSQVLQ.mjs} +5 -5
- package/dist/cli/{monitors-KOWN7M3V.js → monitors-Z6RPIQIH.js} +450 -138
- package/dist/cli/{monitors-Z6VYUZ2W.mjs → monitors-ZEVK3UD7.mjs} +332 -20
- package/dist/cli/{org-UBNRO5XO.mjs → org-PFLVANIN.mjs} +6 -6
- package/dist/cli/{org-2T5K2VP5.js → org-TXJ3RES5.js} +72 -72
- package/dist/cli/{pages-GHPJBVV3.mjs → pages-BKEMQ2J7.mjs} +6 -6
- package/dist/cli/{pages-SRXTU7XO.js → pages-ESKKBK5Y.js} +18 -18
- package/dist/cli/{play-HRQKGTXA.mjs → play-4Z6Z7KVY.mjs} +18 -18
- package/dist/cli/{play-2HMZ57EZ.js → play-AAFOZJKQ.js} +317 -317
- package/dist/cli/{providers-JWJRFRR5.mjs → providers-KYP2UWDV.mjs} +6 -6
- package/dist/cli/{providers-P5O676MZ.js → providers-WEU4UNKY.js} +9 -9
- package/dist/cli/{quickstart-S7NZUQRO.mjs → quickstart-7EUDF4IL.mjs} +4 -4
- package/dist/cli/{quickstart-YCY72TAO.js → quickstart-DXYZCOJY.js} +6 -6
- package/dist/cli/{run-MHLLGF4G.js → run-3YN6P26W.js} +41 -41
- package/dist/cli/{run-QWMRIUIU.mjs → run-MB2R5PQ7.mjs} +23 -23
- package/dist/cli/{search-4BFTQUEP.mjs → search-MIFBESRE.mjs} +8 -8
- package/dist/cli/search-Z7GUKVFE.js +33 -0
- package/dist/cli/{search-output-LIYHDTBP.mjs → search-output-2IR3UA4W.mjs} +4 -4
- package/dist/cli/{search-output-62LBVZHN.js → search-output-NUWL47SR.js} +6 -6
- package/dist/cli/{secrets-KKKHVSOO.js → secrets-6UT6BIDJ.js} +15 -15
- package/dist/cli/{secrets-GW27V77E.mjs → secrets-E6WIYONW.mjs} +6 -6
- package/dist/cli/{sessions-R75LBGIL.mjs → sessions-AP7L6YCL.mjs} +5 -5
- package/dist/cli/{sessions-R3OEINAR.js → sessions-NF2RBXMJ.js} +6 -6
- package/dist/cli/{settings-MQIHAEZN.js → settings-FZWXYP4W.js} +106 -79
- package/dist/cli/{settings-I3AQZSYG.mjs → settings-MMLHJ5E5.mjs} +39 -12
- package/dist/cli/{setup-2YA5MYMS.mjs → setup-WJNN2CZZ.mjs} +10 -10
- package/dist/cli/{setup-X3QRJERP.js → setup-YHXAAJNZ.js} +50 -50
- package/dist/cli/skills-4YYUFNMS.js +37 -0
- package/dist/cli/{skills-7252FOOI.mjs → skills-KXZ5PJU2.mjs} +8 -8
- package/dist/cli/{tools-SKQTSVGE.mjs → tools-K6S7RX7B.mjs} +17 -17
- package/dist/cli/tools-OCYEMMUP.js +57 -0
- package/dist/cli/{update-GNBBSKTB.mjs → update-2SFWEVM6.mjs} +10 -10
- package/dist/cli/update-WQIPUQ4K.js +35 -0
- package/dist/cli/{workflow-OJSAL5FO.mjs → workflow-IR3RCVHZ.mjs} +7 -7
- package/dist/cli/{workflow-QB7YYWPP.js → workflow-SM3Q45X5.js} +17 -17
- package/dist/{client-B3GSaSFn.d.ts → client-BlwD-G4v.d.ts} +1 -1
- package/dist/{client-DEJg0CZn.d.mts → client-DMpsMNH9.d.mts} +1 -1
- package/dist/{client-core-C404E33V.d.mts → client-core-CITtRTbB.d.mts} +77 -11
- package/dist/{client-core-GQmy3N8y.d.ts → client-core-DwBLuEkm.d.ts} +77 -11
- package/dist/{compiler-manifest-DaJrA2KV.d.mts → compiler-manifest-BeURaD5Y.d.mts} +2 -0
- package/dist/{compiler-manifest-DaJrA2KV.d.ts → compiler-manifest-BeURaD5Y.d.ts} +2 -0
- package/dist/{errors-KLga4bLr.d.ts → errors-BoPXPrSy.d.ts} +1 -1
- package/dist/{errors-BKnSYueU.d.mts → errors-kBuT4kGK.d.mts} +1 -1
- package/dist/{index-C5nAZ-VS.d.ts → index-D0crdGM1.d.ts} +1 -1
- package/dist/{index-C-8AFpWy.d.mts → index-DC7oRAAC.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +116 -112
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-SEPKNRHV.js +0 -43
- package/dist/cli/describe-HVQBTKFM.js +0 -50
- package/dist/cli/git-TUB2ZUEH.js +0 -25
- package/dist/cli/search-QPUHOEIL.js +0 -33
- package/dist/cli/skills-BPZWMZSL.js +0 -37
- package/dist/cli/tools-F7RVQ3IK.js +0 -57
- package/dist/cli/update-TLSY6LC2.js +0 -35
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkOBATCFZOjs = require('./chunk-OBATCFZO.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkRNSHCJMEjs = require('./chunk-RNSHCJME.js');
|
|
@@ -11,7 +11,7 @@ var _chunkRNSHCJMEjs = require('./chunk-RNSHCJME.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk6AQO5OJ5js = require('./chunk-6AQO5OJ5.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -581,7 +581,7 @@ function parseInputFlagValue(raw) {
|
|
|
581
581
|
return raw;
|
|
582
582
|
}
|
|
583
583
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
584
|
-
const selection =
|
|
584
|
+
const selection = _chunk6AQO5OJ5js.parseJsonFields.call(void 0, args, "run");
|
|
585
585
|
args = selection.args;
|
|
586
586
|
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and deepline.dataset guidance.";
|
|
587
587
|
let filePath = null;
|
|
@@ -593,7 +593,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
593
593
|
let revisionSelector = null;
|
|
594
594
|
const watch = !args.includes("--no-wait");
|
|
595
595
|
const dryRun = args.includes("--dry-run");
|
|
596
|
-
let jsonOutput = dryRun ?
|
|
596
|
+
let jsonOutput = dryRun ? _chunk6AQO5OJ5js.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunk6AQO5OJ5js.argsWantJson.call(void 0, args);
|
|
597
597
|
const fullJson = args.includes("--full");
|
|
598
598
|
const force = args.includes("--force") || args.includes("--from-start");
|
|
599
599
|
const forceToolRefresh = args.includes("--force-tool-refresh") || args.includes("--refresh-cache");
|
|
@@ -656,7 +656,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
656
656
|
"--log-level requires one of: debug, info, warn, error."
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
|
-
const parsed =
|
|
659
|
+
const parsed = _chunkOBATCFZOjs.parseLogLevel.call(void 0, value);
|
|
660
660
|
if (!parsed) {
|
|
661
661
|
throw new Error(
|
|
662
662
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -974,7 +974,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
974
974
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
975
975
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
976
976
|
);
|
|
977
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
977
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkOBATCFZOjs.parseLogLevel.call(void 0, options.logLevel);
|
|
978
978
|
if (!logLevel)
|
|
979
979
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
980
980
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -988,13 +988,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
988
988
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
989
989
|
logLevel = "debug";
|
|
990
990
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
991
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
992
|
-
[...fullJson ? ["--full"] : [], ...
|
|
991
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunk6AQO5OJ5js.parseJsonFields.call(void 0,
|
|
992
|
+
[...fullJson ? ["--full"] : [], ..._chunk6AQO5OJ5js.jsonFieldArgs.call(void 0, options.json)],
|
|
993
993
|
"run"
|
|
994
994
|
).fields;
|
|
995
995
|
const watch = options.wait === false ? false : base.watch;
|
|
996
996
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
997
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
997
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunk6AQO5OJ5js.argsWantJson.call(void 0, []) : explicitJson;
|
|
998
998
|
const verboseLogs = Boolean(
|
|
999
999
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
1000
1000
|
);
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk6AQO5OJ5js = require('./chunk-6AQO5OJ5.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkTZ7APOBMjs = require('./chunk-TZ7APOBM.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
|
|
|
32
32
|
return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
|
|
33
33
|
}
|
|
34
34
|
async function handleList(options) {
|
|
35
|
-
const { http } =
|
|
35
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
36
36
|
const payload = await http.get(
|
|
37
37
|
`/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
40
40
|
{
|
|
41
41
|
projects: payload.projects,
|
|
42
42
|
count: payload.projects.length,
|
|
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
async function handleStatus(options) {
|
|
76
|
-
const { http } =
|
|
76
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
77
77
|
const payload = await http.get("/api/v2/github/installation");
|
|
78
78
|
const installation = payload.installation;
|
|
79
79
|
const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
|
|
@@ -136,7 +136,7 @@ async function handleStatus(options) {
|
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
140
140
|
{
|
|
141
141
|
installation,
|
|
142
142
|
installations: _nullishCoalesce(payload.installations, () => ( [])),
|
|
@@ -147,10 +147,10 @@ async function handleStatus(options) {
|
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
async function handleRepos(options) {
|
|
150
|
-
const { http } =
|
|
150
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
151
151
|
const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
|
|
152
152
|
const payload = await http.get(`/api/v2/github/repos${query}`);
|
|
153
|
-
|
|
153
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
154
154
|
{
|
|
155
155
|
installation: payload.installation,
|
|
156
156
|
repositories: payload.repositories,
|
|
@@ -171,7 +171,7 @@ async function handleRepos(options) {
|
|
|
171
171
|
}
|
|
172
172
|
async function resolveRepoId(repo, installation) {
|
|
173
173
|
if (/^\d+$/.test(repo)) return Number(repo);
|
|
174
|
-
const { http } =
|
|
174
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
175
175
|
const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
|
|
176
176
|
const payload = await http.get(
|
|
177
177
|
`/api/v2/github/repos${query}`
|
|
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
|
|
|
188
188
|
}
|
|
189
189
|
async function handleLink(repo, options) {
|
|
190
190
|
const repoId = await resolveRepoId(repo, options.installation);
|
|
191
|
-
const { http } =
|
|
191
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
192
192
|
const payload = await http.post("/api/v2/play-projects", {
|
|
193
193
|
repoId,
|
|
194
194
|
...options.installation !== void 0 ? { installationId: options.installation } : {},
|
|
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
|
|
|
197
197
|
...options.branch !== void 0 ? { productionBranch: options.branch } : {},
|
|
198
198
|
...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
|
|
199
199
|
});
|
|
200
|
-
|
|
200
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
201
201
|
{
|
|
202
202
|
project: payload.project,
|
|
203
203
|
render: {
|
|
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
async function handleGet(id, options) {
|
|
223
|
-
const { http } =
|
|
223
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
228
228
|
{
|
|
229
229
|
project: payload.project,
|
|
230
230
|
render: {
|
|
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
async function handleSet(id, options) {
|
|
243
|
-
const { http } =
|
|
243
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
244
244
|
const payload = await http.patch(
|
|
245
245
|
`/api/v2/play-projects/${encodeURIComponent(id)}`,
|
|
246
246
|
{
|
|
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
|
|
|
251
251
|
...options.disabled !== void 0 ? { disabled: options.disabled } : {}
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
|
-
|
|
254
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
255
255
|
{
|
|
256
256
|
project: payload.project,
|
|
257
257
|
render: {
|
|
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
async function handleUnlink(id, options) {
|
|
267
|
-
const { http } =
|
|
267
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
270
270
|
{
|
|
271
271
|
ok: true,
|
|
272
272
|
id,
|
|
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
|
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
async function handleConnect(options) {
|
|
289
|
-
const baseUrl =
|
|
289
|
+
const baseUrl = _chunkTZ7APOBMjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunk6AQO5OJ5js.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
293
293
|
{
|
|
294
294
|
connectUrl,
|
|
295
295
|
browser: opened,
|
|
@@ -311,7 +311,7 @@ async function handleConnect(options) {
|
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
313
|
async function handleDeploymentsList(options) {
|
|
314
|
-
const { http } =
|
|
314
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
315
315
|
const query = new URLSearchParams();
|
|
316
316
|
if (options.repo) query.set("projectId", options.repo);
|
|
317
317
|
if (options.limit) query.set("limit", options.limit);
|
|
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
|
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
`/api/v2/deployments${suffix}`
|
|
321
321
|
);
|
|
322
|
-
|
|
322
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
deployments: payload.deployments,
|
|
325
325
|
count: payload.deployments.length,
|
|
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
|
|
|
363
363
|
]);
|
|
364
364
|
}
|
|
365
365
|
async function handleDeploymentGet(id, options) {
|
|
366
|
-
const { http } =
|
|
366
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
367
367
|
const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
|
|
368
368
|
const playLines = renderDeploymentPlayLines(payload.deployment.results);
|
|
369
369
|
const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
|
|
370
370
|
const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
|
|
371
|
-
|
|
371
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
372
372
|
{
|
|
373
373
|
deployment: payload.deployment,
|
|
374
374
|
project: payload.project,
|
|
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
|
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
async function handleDeploymentCancel(id, options) {
|
|
390
|
-
const { http } =
|
|
390
|
+
const { http } = _chunk6AQO5OJ5js.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RTLWYERT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IWZRQ6YW.mjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var DeeplineClient2 = class extends DeeplineClient {
|
|
@@ -31,7 +31,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk5PXGAA2Mjs = require('./chunk-5PXGAA2M.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(_chunk5PXGAA2Mjs.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 {
|
|
@@ -1107,8 +1107,8 @@ function runtimeSelectionHeaders(runtime, env) {
|
|
|
1107
1107
|
}
|
|
1108
1108
|
const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
|
|
1109
1109
|
return {
|
|
1110
|
-
[
|
|
1111
|
-
...receivers ? { [
|
|
1110
|
+
[_chunk5PXGAA2Mjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
1111
|
+
...receivers ? { [_chunk5PXGAA2Mjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
1114
|
function normalizeTestPolicyOverrides(value, source) {
|
|
@@ -1179,7 +1179,7 @@ var PlayClient = class {
|
|
|
1179
1179
|
return _chunkRNSHCJMEjs.startPlayRun.call(void 0,
|
|
1180
1180
|
this.http,
|
|
1181
1181
|
resolved.request,
|
|
1182
|
-
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(
|
|
1182
|
+
_optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunk5PXGAA2Mjs.SDK_API_MAJOR) } : headers,
|
|
1183
1183
|
options
|
|
1184
1184
|
);
|
|
1185
1185
|
}
|
|
@@ -3260,7 +3260,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
|
|
|
3260
3260
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
3261
3261
|
);
|
|
3262
3262
|
}
|
|
3263
|
-
return { [
|
|
3263
|
+
return { [_chunk5PXGAA2Mjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
3264
3264
|
}
|
|
3265
3265
|
function sleep(ms) {
|
|
3266
3266
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -3548,8 +3548,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3548
3548
|
this.billing = {
|
|
3549
3549
|
quote: (input) => this.http.post("/api/v2/billing/quote", input),
|
|
3550
3550
|
entitlements: () => this.http.get("/api/v2/billing/entitlements"),
|
|
3551
|
-
includedCompute: () => this.http.get(
|
|
3552
|
-
|
|
3551
|
+
includedCompute: ({ includeOverage } = {}) => this.http.get(
|
|
3552
|
+
includeOverage ? "/api/v2/billing/included-compute?include_overage=true" : "/api/v2/billing/included-compute"
|
|
3553
|
+
),
|
|
3554
|
+
enableIncludedCompute: ({ includeOverage } = {}) => this.http.post(
|
|
3555
|
+
includeOverage ? "/api/v2/billing/included-compute?include_overage=true" : "/api/v2/billing/included-compute",
|
|
3556
|
+
{}
|
|
3557
|
+
),
|
|
3553
3558
|
topUp: (options) => this.topUpBillingBalance(options),
|
|
3554
3559
|
topUpWithReceipt: (options) => this.topUpBillingBalanceWithReceipt(options),
|
|
3555
3560
|
plans: () => this.getBillingPlans(),
|
|
@@ -3649,6 +3654,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3649
3654
|
sync: (definitionOrId, options) => this.syncMonitorFleet(definitionOrId, options),
|
|
3650
3655
|
get: (fleetId, options) => fleetId === void 0 ? this.listMonitorFleets() : this.getMonitorFleet(fleetId, options),
|
|
3651
3656
|
list: () => this.listMonitorFleets(),
|
|
3657
|
+
overview: (fleetId, options) => fleetId === void 0 ? this.listMonitorFleetOverviews(options) : this.getMonitorFleetOverview(fleetId, options),
|
|
3658
|
+
issues: (fleetId, options) => this.listMonitorFleetIssues(fleetId, options),
|
|
3652
3659
|
deactivate: (fleetId, options) => this.deactivateMonitorFleet(fleetId, options),
|
|
3653
3660
|
reactivate: (fleetId, options) => this.reactivateMonitorFleet(fleetId, options),
|
|
3654
3661
|
start: (fleetId, options) => this.reactivateMonitorFleet(fleetId, options),
|
|
@@ -4072,7 +4079,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
4072
4079
|
);
|
|
4073
4080
|
const headers = _optionalChain([options, 'optionalAccess', _184 => _184.cliAdmission]) ? {
|
|
4074
4081
|
...runtimeHeaders,
|
|
4075
|
-
"X-Deepline-API-Major": String(
|
|
4082
|
+
"X-Deepline-API-Major": String(_chunk5PXGAA2Mjs.SDK_API_MAJOR)
|
|
4076
4083
|
} : runtimeHeaders;
|
|
4077
4084
|
const http = this.http;
|
|
4078
4085
|
let submitted = false;
|
|
@@ -6707,11 +6714,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6707
6714
|
for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _367 => _367.signals]), () => ( [])))
|
|
6708
6715
|
params.append("signal", signal);
|
|
6709
6716
|
if (_optionalChain([options, 'optionalAccess', _368 => _368.play])) params.set("play", options.play);
|
|
6710
|
-
if (_optionalChain([options, 'optionalAccess', _369 => _369.
|
|
6711
|
-
if (_optionalChain([options, 'optionalAccess', _370 => _370.
|
|
6712
|
-
if (_optionalChain([options, 'optionalAccess', _371 => _371.
|
|
6717
|
+
if (_optionalChain([options, 'optionalAccess', _369 => _369.fleet])) params.set("fleet", options.fleet);
|
|
6718
|
+
if (_optionalChain([options, 'optionalAccess', _370 => _370.sort])) params.set("sort", options.sort);
|
|
6719
|
+
if (_optionalChain([options, 'optionalAccess', _371 => _371.window])) params.set("window", options.window);
|
|
6720
|
+
if (_optionalChain([options, 'optionalAccess', _372 => _372.limit]) !== void 0)
|
|
6713
6721
|
params.set("limit", String(options.limit));
|
|
6714
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6722
|
+
if (_optionalChain([options, 'optionalAccess', _373 => _373.cursor])) params.set("cursor", options.cursor);
|
|
6715
6723
|
const query = params.toString();
|
|
6716
6724
|
const suffix = query ? `?${query}` : "";
|
|
6717
6725
|
return this.http.request(
|
|
@@ -6728,7 +6736,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6728
6736
|
}
|
|
6729
6737
|
/** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
|
|
6730
6738
|
async listMonitorLedgerFindings(key, options) {
|
|
6731
|
-
const suffix = _optionalChain([options, 'optionalAccess',
|
|
6739
|
+
const suffix = _optionalChain([options, 'optionalAccess', _374 => _374.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
|
|
6732
6740
|
return this.http.request(
|
|
6733
6741
|
`/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
|
|
6734
6742
|
{ method: "GET" }
|
|
@@ -6742,7 +6750,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6742
6750
|
);
|
|
6743
6751
|
}
|
|
6744
6752
|
async testMonitorWebhook(key, payload, options) {
|
|
6745
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6753
|
+
if (_optionalChain([options, 'optionalAccess', _375 => _375.dispatch]) === true || _optionalChain([options, 'optionalAccess', _376 => _376.validationOnly]) === false) {
|
|
6746
6754
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6747
6755
|
"Monitor tests are validation-only and cannot dispatch events.",
|
|
6748
6756
|
void 0,
|
|
@@ -6797,7 +6805,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6797
6805
|
}
|
|
6798
6806
|
/** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
|
|
6799
6807
|
async deleteMonitor(key, options) {
|
|
6800
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6808
|
+
if (_optionalChain([options, 'optionalAccess', _377 => _377.localOnly]) === true) {
|
|
6801
6809
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
6802
6810
|
"localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
|
|
6803
6811
|
void 0,
|
|
@@ -6805,11 +6813,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6805
6813
|
);
|
|
6806
6814
|
}
|
|
6807
6815
|
const params = new URLSearchParams();
|
|
6808
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
6816
|
+
if (_optionalChain([options, 'optionalAccess', _378 => _378.dryRun])) params.set("dry_run", "true");
|
|
6809
6817
|
const query = params.toString();
|
|
6810
6818
|
return this.http.request(
|
|
6811
6819
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
|
|
6812
|
-
_optionalChain([options, 'optionalAccess',
|
|
6820
|
+
_optionalChain([options, 'optionalAccess', _379 => _379.dryRun]) ? { method: "DELETE" } : {
|
|
6813
6821
|
method: "DELETE",
|
|
6814
6822
|
// Deletion is a provider lifecycle operation. A timeout is an
|
|
6815
6823
|
// unknown outcome, not authority to begin another delete attempt.
|
|
@@ -6822,10 +6830,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6822
6830
|
* Prefer `client.monitors.reactivate(...)`.
|
|
6823
6831
|
*/
|
|
6824
6832
|
async reactivateMonitor(key, options) {
|
|
6825
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6833
|
+
const query = _optionalChain([options, 'optionalAccess', _380 => _380.dryRun]) ? "?dry_run=true" : "";
|
|
6826
6834
|
return this.http.request(
|
|
6827
6835
|
`/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
|
|
6828
|
-
_optionalChain([options, 'optionalAccess',
|
|
6836
|
+
_optionalChain([options, 'optionalAccess', _381 => _381.dryRun]) ? { method: "POST", body: {} } : {
|
|
6829
6837
|
method: "POST",
|
|
6830
6838
|
body: {},
|
|
6831
6839
|
// Reactivation can create an upstream resource, so it must not use
|
|
@@ -6839,7 +6847,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6839
6847
|
// ——————————————————————————————————————————————————————————
|
|
6840
6848
|
static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
|
|
6841
6849
|
monitorJobIdempotencyKey(operation) {
|
|
6842
|
-
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access',
|
|
6850
|
+
const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _382 => _382.crypto, 'optionalAccess', _383 => _383.randomUUID, 'optionalCall', _384 => _384()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
|
|
6843
6851
|
const prefix = "monitor-job-";
|
|
6844
6852
|
const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
|
|
6845
6853
|
const maxOperationLength = Math.max(
|
|
@@ -6850,7 +6858,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6850
6858
|
}
|
|
6851
6859
|
monitorJobHeaders(operation, idempotencyKey) {
|
|
6852
6860
|
return {
|
|
6853
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
6861
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _385 => _385.trim, 'call', _386 => _386()]) || this.monitorJobIdempotencyKey(operation)
|
|
6854
6862
|
};
|
|
6855
6863
|
}
|
|
6856
6864
|
async deployMonitorBatch(definitions, options) {
|
|
@@ -6861,7 +6869,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6861
6869
|
body: { version: 1, kind: "batch", monitors: definitions },
|
|
6862
6870
|
headers: this.monitorJobHeaders(
|
|
6863
6871
|
"batch-deploy",
|
|
6864
|
-
_optionalChain([options, 'optionalAccess',
|
|
6872
|
+
_optionalChain([options, 'optionalAccess', _387 => _387.idempotencyKey])
|
|
6865
6873
|
),
|
|
6866
6874
|
maxRetries: 0,
|
|
6867
6875
|
exactUrlOnly: true
|
|
@@ -6880,11 +6888,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6880
6888
|
version: 1,
|
|
6881
6889
|
kind: "batch",
|
|
6882
6890
|
monitors: definitions,
|
|
6883
|
-
..._optionalChain([options, 'optionalAccess',
|
|
6891
|
+
..._optionalChain([options, 'optionalAccess', _388 => _388.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
|
|
6884
6892
|
},
|
|
6885
6893
|
headers: this.monitorJobHeaders(
|
|
6886
6894
|
`batch-sync-${batchId}`,
|
|
6887
|
-
_optionalChain([options, 'optionalAccess',
|
|
6895
|
+
_optionalChain([options, 'optionalAccess', _389 => _389.idempotencyKey])
|
|
6888
6896
|
),
|
|
6889
6897
|
maxRetries: 0,
|
|
6890
6898
|
exactUrlOnly: true
|
|
@@ -6899,7 +6907,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6899
6907
|
body: {},
|
|
6900
6908
|
headers: this.monitorJobHeaders(
|
|
6901
6909
|
`batch-start-${batchId}`,
|
|
6902
|
-
_optionalChain([options, 'optionalAccess',
|
|
6910
|
+
_optionalChain([options, 'optionalAccess', _390 => _390.idempotencyKey])
|
|
6903
6911
|
),
|
|
6904
6912
|
maxRetries: 0,
|
|
6905
6913
|
exactUrlOnly: true
|
|
@@ -6914,7 +6922,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6914
6922
|
body: {},
|
|
6915
6923
|
headers: this.monitorJobHeaders(
|
|
6916
6924
|
`batch-stop-${batchId}`,
|
|
6917
|
-
_optionalChain([options, 'optionalAccess',
|
|
6925
|
+
_optionalChain([options, 'optionalAccess', _391 => _391.idempotencyKey])
|
|
6918
6926
|
),
|
|
6919
6927
|
maxRetries: 0,
|
|
6920
6928
|
exactUrlOnly: true
|
|
@@ -6935,7 +6943,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6935
6943
|
body: {},
|
|
6936
6944
|
headers: this.monitorJobHeaders(
|
|
6937
6945
|
`${action}-${monitorKey}`,
|
|
6938
|
-
_optionalChain([options, 'optionalAccess',
|
|
6946
|
+
_optionalChain([options, 'optionalAccess', _392 => _392.idempotencyKey])
|
|
6939
6947
|
),
|
|
6940
6948
|
maxRetries: 0,
|
|
6941
6949
|
exactUrlOnly: true
|
|
@@ -6948,7 +6956,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6948
6956
|
body: definition,
|
|
6949
6957
|
headers: this.monitorJobHeaders(
|
|
6950
6958
|
`sync-${definition.key}`,
|
|
6951
|
-
_optionalChain([options, 'optionalAccess',
|
|
6959
|
+
_optionalChain([options, 'optionalAccess', _393 => _393.idempotencyKey])
|
|
6952
6960
|
),
|
|
6953
6961
|
maxRetries: 0,
|
|
6954
6962
|
exactUrlOnly: true
|
|
@@ -6961,7 +6969,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6961
6969
|
);
|
|
6962
6970
|
}
|
|
6963
6971
|
async getMonitorJobLogs(jobId, options) {
|
|
6964
|
-
const query = _optionalChain([options, 'optionalAccess',
|
|
6972
|
+
const query = _optionalChain([options, 'optionalAccess', _394 => _394.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
|
|
6965
6973
|
return this.http.request(
|
|
6966
6974
|
`/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
|
|
6967
6975
|
{ method: "GET" }
|
|
@@ -6974,15 +6982,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6974
6982
|
);
|
|
6975
6983
|
}
|
|
6976
6984
|
async waitForMonitorJob(jobId, options) {
|
|
6977
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6978
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
6985
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _395 => _395.timeoutMs]), () => ( 10 * 6e4)));
|
|
6986
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _396 => _396.pollIntervalMs]), () => ( 2e3)));
|
|
6979
6987
|
const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
6980
6988
|
const startedAt = Date.now();
|
|
6981
6989
|
let latest = await this.getMonitorJob(jobId);
|
|
6982
6990
|
while (true) {
|
|
6983
|
-
_optionalChain([options, 'optionalAccess',
|
|
6991
|
+
_optionalChain([options, 'optionalAccess', _397 => _397.onProgress, 'optionalCall', _398 => _398(latest)]);
|
|
6984
6992
|
const job = latest.job;
|
|
6985
|
-
const state = typeof _optionalChain([job, 'optionalAccess',
|
|
6993
|
+
const state = typeof _optionalChain([job, 'optionalAccess', _399 => _399.state]) === "string" ? job.state : void 0;
|
|
6986
6994
|
if (state && terminal.has(state)) return latest;
|
|
6987
6995
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|
|
6988
6996
|
await sleep(pollIntervalMs);
|
|
@@ -6993,12 +7001,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6993
7001
|
// Monitor Fleets
|
|
6994
7002
|
// ——————————————————————————————————————————————————————————
|
|
6995
7003
|
monitorFleetIdempotencyKey(operation) {
|
|
6996
|
-
const uuid = _optionalChain([globalThis, 'access',
|
|
7004
|
+
const uuid = _optionalChain([globalThis, 'access', _400 => _400.crypto, 'optionalAccess', _401 => _401.randomUUID, 'optionalCall', _402 => _402()]);
|
|
6997
7005
|
return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
|
|
6998
7006
|
}
|
|
6999
7007
|
monitorFleetHeaders(operation, idempotencyKey) {
|
|
7000
7008
|
return {
|
|
7001
|
-
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess',
|
|
7009
|
+
"Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _403 => _403.trim, 'call', _404 => _404()]) || this.monitorFleetIdempotencyKey(operation)
|
|
7002
7010
|
};
|
|
7003
7011
|
}
|
|
7004
7012
|
monitorFleetPath(fleetId) {
|
|
@@ -7018,15 +7026,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7018
7026
|
const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
|
|
7019
7027
|
const body = {
|
|
7020
7028
|
...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
|
|
7021
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7022
|
-
..._optionalChain([options, 'optionalAccess',
|
|
7029
|
+
..._optionalChain([options, 'optionalAccess', _405 => _405.dryRun]) ? { dry_run: true } : {},
|
|
7030
|
+
..._optionalChain([options, 'optionalAccess', _406 => _406.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
|
|
7023
7031
|
};
|
|
7024
7032
|
return this.http.request(
|
|
7025
7033
|
this.monitorFleetPath(fleetId),
|
|
7026
7034
|
{
|
|
7027
7035
|
method: "PUT",
|
|
7028
7036
|
body,
|
|
7029
|
-
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess',
|
|
7037
|
+
headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _407 => _407.idempotencyKey])),
|
|
7030
7038
|
maxRetries: 0,
|
|
7031
7039
|
exactUrlOnly: true
|
|
7032
7040
|
}
|
|
@@ -7037,10 +7045,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7037
7045
|
method: "GET"
|
|
7038
7046
|
});
|
|
7039
7047
|
}
|
|
7048
|
+
/** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
|
|
7049
|
+
async listMonitorFleetOverviews(options) {
|
|
7050
|
+
const params = new URLSearchParams({ view: "overview" });
|
|
7051
|
+
if (_optionalChain([options, 'optionalAccess', _408 => _408.q])) params.set("q", options.q);
|
|
7052
|
+
for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _409 => _409.states]), () => ( []))) params.append("state", state);
|
|
7053
|
+
if (_optionalChain([options, 'optionalAccess', _410 => _410.sort])) params.set("sort", options.sort);
|
|
7054
|
+
if (_optionalChain([options, 'optionalAccess', _411 => _411.window])) params.set("window", options.window);
|
|
7055
|
+
return this.http.request(
|
|
7056
|
+
`/api/v2/monitors/fleets?${params.toString()}`,
|
|
7057
|
+
{ method: "GET" }
|
|
7058
|
+
);
|
|
7059
|
+
}
|
|
7060
|
+
/** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
|
|
7061
|
+
async getMonitorFleetOverview(fleetId, options) {
|
|
7062
|
+
const params = new URLSearchParams({ view: "overview" });
|
|
7063
|
+
if (_optionalChain([options, 'optionalAccess', _412 => _412.window])) params.set("window", options.window);
|
|
7064
|
+
return this.http.request(
|
|
7065
|
+
`${this.monitorFleetPath(fleetId)}?${params.toString()}`,
|
|
7066
|
+
{ method: "GET" }
|
|
7067
|
+
);
|
|
7068
|
+
}
|
|
7069
|
+
/** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
|
|
7070
|
+
async listMonitorFleetIssues(fleetId, options) {
|
|
7071
|
+
const params = new URLSearchParams();
|
|
7072
|
+
if (_optionalChain([options, 'optionalAccess', _413 => _413.group])) params.set("group", options.group);
|
|
7073
|
+
if (_optionalChain([options, 'optionalAccess', _414 => _414.cause])) params.set("cause", options.cause);
|
|
7074
|
+
if (_optionalChain([options, 'optionalAccess', _415 => _415.cursor])) params.set("cursor", options.cursor);
|
|
7075
|
+
if (_optionalChain([options, 'optionalAccess', _416 => _416.limit]) !== void 0)
|
|
7076
|
+
params.set("limit", String(options.limit));
|
|
7077
|
+
const query = params.toString();
|
|
7078
|
+
return this.http.request(
|
|
7079
|
+
`${this.monitorFleetPath(fleetId)}/issues${query ? `?${query}` : ""}`,
|
|
7080
|
+
{ method: "GET" }
|
|
7081
|
+
);
|
|
7082
|
+
}
|
|
7040
7083
|
async getMonitorFleet(fleetId, options) {
|
|
7041
7084
|
const params = new URLSearchParams();
|
|
7042
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7043
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
7085
|
+
if (_optionalChain([options, 'optionalAccess', _417 => _417.drift])) params.set("drift", "1");
|
|
7086
|
+
if (_optionalChain([options, 'optionalAccess', _418 => _418.limit]) !== void 0)
|
|
7044
7087
|
params.set("limit", String(options.limit));
|
|
7045
7088
|
const query = params.toString();
|
|
7046
7089
|
return this.http.request(
|
|
@@ -7053,10 +7096,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7053
7096
|
this.monitorFleetPath(fleetId),
|
|
7054
7097
|
{
|
|
7055
7098
|
method: "DELETE",
|
|
7056
|
-
body: _optionalChain([options, 'optionalAccess',
|
|
7099
|
+
body: _optionalChain([options, 'optionalAccess', _419 => _419.dryRun]) ? { dry_run: true } : {},
|
|
7057
7100
|
headers: this.monitorFleetHeaders(
|
|
7058
7101
|
"deactivate",
|
|
7059
|
-
_optionalChain([options, 'optionalAccess',
|
|
7102
|
+
_optionalChain([options, 'optionalAccess', _420 => _420.idempotencyKey])
|
|
7060
7103
|
),
|
|
7061
7104
|
maxRetries: 0,
|
|
7062
7105
|
exactUrlOnly: true
|
|
@@ -7071,7 +7114,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7071
7114
|
body: {},
|
|
7072
7115
|
headers: this.monitorFleetHeaders(
|
|
7073
7116
|
"reactivate",
|
|
7074
|
-
_optionalChain([options, 'optionalAccess',
|
|
7117
|
+
_optionalChain([options, 'optionalAccess', _421 => _421.idempotencyKey])
|
|
7075
7118
|
),
|
|
7076
7119
|
maxRetries: 0,
|
|
7077
7120
|
exactUrlOnly: true
|
|
@@ -7088,9 +7131,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7088
7131
|
* identical to "the request failed".
|
|
7089
7132
|
*/
|
|
7090
7133
|
async waitForMonitorFleetConvergence(fleetId, options) {
|
|
7091
|
-
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7092
|
-
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7093
|
-
const terminal = _optionalChain([options, 'optionalAccess',
|
|
7134
|
+
const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _422 => _422.timeoutMs]), () => ( 10 * 6e4)));
|
|
7135
|
+
const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _423 => _423.pollIntervalMs]), () => ( 2e3)));
|
|
7136
|
+
const terminal = _optionalChain([options, 'optionalAccess', _424 => _424.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
|
|
7094
7137
|
"converged",
|
|
7095
7138
|
"degraded",
|
|
7096
7139
|
"deactivated",
|
|
@@ -7099,7 +7142,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
7099
7142
|
const startedAt = Date.now();
|
|
7100
7143
|
let latest = await this.getMonitorFleet(fleetId);
|
|
7101
7144
|
while (true) {
|
|
7102
|
-
_optionalChain([options, 'optionalAccess',
|
|
7145
|
+
_optionalChain([options, 'optionalAccess', _425 => _425.onProgress, 'optionalCall', _426 => _426(latest)]);
|
|
7103
7146
|
const status = typeof latest.status === "string" ? latest.status : void 0;
|
|
7104
7147
|
if (status && terminal.has(status)) return latest;
|
|
7105
7148
|
if (Date.now() - startedAt >= timeoutMs) return latest;
|