deepline 0.3.508 → 0.3.510
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +7 -2
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/db-session-plan.ts +47 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +94 -43
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +111 -27
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +79 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +80 -6
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-transient-retry.ts +571 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -0
- package/dist/cli/auth-S2Z5YMU3.js +43 -0
- package/dist/cli/{auth-2URIN52G.mjs → auth-USS2W3UV.mjs} +5 -5
- package/dist/cli/{billing-IW23GSR5.mjs → billing-JCUWM5XB.mjs} +7 -7
- package/dist/cli/{billing-R2HY2ZVJ.js → billing-LQQHU443.js} +82 -82
- package/dist/cli/{chunk-7PELFO3C.js → chunk-2JXEZAJF.js} +21 -21
- package/dist/cli/chunk-3LXU22UZ.js +77 -0
- package/dist/cli/{chunk-74UO7THC.js → chunk-4NJK6P5T.js} +4 -4
- package/dist/cli/{chunk-FXKKFM7J.js → chunk-4ZIIS6KG.js} +9 -9
- package/dist/cli/{chunk-63MCLOR2.mjs → chunk-563HM4D2.mjs} +6 -6
- package/dist/cli/{chunk-XSOLA2ED.mjs → chunk-5DU7RXDW.mjs} +4 -4
- package/dist/cli/{chunk-OWH7SSBO.mjs → chunk-5MYXW6M6.mjs} +2 -2
- package/dist/cli/{chunk-3BZ74K27.js → chunk-5N2HFB3G.js} +16 -16
- package/dist/cli/{chunk-2YOM5J3G.js → chunk-63DHG7BM.js} +26 -26
- package/dist/cli/{chunk-P7GOQTUN.js → chunk-6AL2VF3E.js} +14 -14
- package/dist/cli/{chunk-QBZECLNG.mjs → chunk-7BF4R26M.mjs} +3 -3
- package/dist/cli/{chunk-JRHMPZJX.js → chunk-7VQKU6MS.js} +7 -7
- package/dist/cli/{chunk-3C6VBHNW.mjs → chunk-7VT7RMZ2.mjs} +2 -2
- package/dist/cli/{chunk-M37I4A2Z.js → chunk-ASBWPRBN.js} +16 -16
- package/dist/cli/{chunk-3ZNPIJX6.js → chunk-B2T7PBS6.js} +41 -41
- package/dist/cli/{chunk-NC2FIUPX.mjs → chunk-B2U3LVSO.mjs} +1 -1
- package/dist/cli/{chunk-RNZQ7RDW.mjs → chunk-B6Q6BHSY.mjs} +2 -2
- package/dist/cli/{chunk-IZZ7FFWP.js → chunk-BPGFNVH2.js} +44 -44
- package/dist/cli/{chunk-2PYFXXYA.mjs → chunk-CLV4T5FN.mjs} +2 -2
- package/dist/cli/{chunk-JEB6BNIU.mjs → chunk-DEPBCRKG.mjs} +15 -4
- package/dist/cli/{chunk-DZ7JCRAL.mjs → chunk-DMF56C6D.mjs} +2 -2
- package/dist/cli/{chunk-RWXHMG6F.js → chunk-EEQ2QQOH.js} +21 -10
- package/dist/cli/{chunk-UDH3YMBI.mjs → chunk-EJ57CA2L.mjs} +1 -1
- package/dist/cli/{chunk-JYNHHO3J.js → chunk-F6IXWFPF.js} +6 -6
- package/dist/cli/{chunk-DWV7KM6H.mjs → chunk-FFPLCSTZ.mjs} +10 -10
- package/dist/cli/{chunk-VXNL4HLE.mjs → chunk-FND6GZZ4.mjs} +5 -5
- package/dist/cli/{chunk-D73YB5NQ.js → chunk-HC27PYJM.js} +2 -2
- package/dist/cli/{chunk-FRT5MFLF.mjs → chunk-HOKOJGQW.mjs} +1 -1
- package/dist/cli/{chunk-AYNO4VFW.js → chunk-JNECQ5QF.js} +11 -11
- package/dist/cli/chunk-JVEU6MXD.mjs +77 -0
- package/dist/cli/{chunk-ZLIAUR2E.js → chunk-JY73USD7.js} +2 -2
- package/dist/cli/{chunk-K4RME7AV.mjs → chunk-KXSOZYCS.mjs} +1 -1
- package/dist/cli/{chunk-ESVK4Z7S.js → chunk-LF3FF2B2.js} +1 -1
- package/dist/cli/{chunk-63BGKU3A.js → chunk-N7FV7OM3.js} +96 -96
- package/dist/cli/{chunk-Q4I5YKN4.mjs → chunk-OEG6VCK4.mjs} +1 -1
- package/dist/cli/{chunk-2LY42EZJ.mjs → chunk-PQ56GE55.mjs} +1 -1
- package/dist/cli/{chunk-GRGZKXLL.mjs → chunk-Q5EJO4TE.mjs} +5 -5
- package/dist/cli/{chunk-N5HRBS4K.js → chunk-QRQBKLOM.js} +3 -3
- package/dist/cli/{chunk-4DAR2GYV.mjs → chunk-RHKFNEV2.mjs} +2 -2
- package/dist/cli/{chunk-C6TP4DR3.mjs → chunk-UV524JZ5.mjs} +1 -1
- package/dist/cli/{chunk-KSQO32L5.mjs → chunk-V6DLYRSO.mjs} +1 -1
- package/dist/cli/{chunk-J3LJ37WD.js → chunk-VPJSQMWQ.js} +3 -3
- package/dist/cli/{chunk-3XBI4KZM.mjs → chunk-WAOLTP6R.mjs} +2 -2
- package/dist/cli/{chunk-JXYVBF5L.mjs → chunk-WC5754QJ.mjs} +5 -5
- package/dist/cli/{chunk-RUD77W2Y.js → chunk-XJZU7KO4.js} +5 -5
- package/dist/cli/{chunk-GDHLL5EQ.js → chunk-XK3AJFYQ.js} +35 -10
- package/dist/cli/{chunk-JUYW6TSU.js → chunk-XL4FFVWL.js} +7 -7
- package/dist/cli/{chunk-ZL2ME3UT.js → chunk-XRLE2FPE.js} +6 -6
- package/dist/cli/{chunk-R4S2AK3Q.js → chunk-YDALHHUC.js} +53 -53
- package/dist/cli/{chunk-IF242BIJ.mjs → chunk-YYUVOUEH.mjs} +5 -5
- package/dist/cli/{chunk-TVADI7K5.js → chunk-ZCYV6MZH.js} +5 -5
- package/dist/cli/{chunk-AFSYNOG4.mjs → chunk-ZRACZKEE.mjs} +35 -10
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-CMJSMC2I.mjs → csv-MTFVEDPU.mjs} +4 -4
- package/dist/cli/{csv-DPDO6BU6.js → csv-UXFQZLZM.js} +13 -13
- package/dist/cli/{db-SL3EFN6V.mjs → db-3WPUYCCI.mjs} +6 -6
- package/dist/cli/{db-PPPKNTT5.js → db-RGWT6B7K.js} +27 -27
- package/dist/cli/describe-LNCLA2LA.js +50 -0
- package/dist/cli/{describe-XLN33FJX.mjs → describe-XJY5654F.mjs} +18 -18
- package/dist/cli/{executions-6YDTV2J6.js → executions-IWTALFNB.js} +8 -8
- package/dist/cli/{executions-O6Z5B5NY.mjs → executions-PDE4V5YH.mjs} +6 -6
- package/dist/cli/{feedback-DP7LPWAD.mjs → feedback-BMOVTPC4.mjs} +11 -7
- package/dist/cli/{feedback-BZ434BN4.js → feedback-I72P4XZS.js} +15 -11
- package/dist/cli/{git-MI7E5WGL.mjs → git-QJG3EF4P.mjs} +5 -5
- package/dist/cli/git-QWH7SPGF.js +25 -0
- package/dist/cli/index.js +173 -156
- package/dist/cli/index.mjs +76 -59
- package/dist/cli/{legacy-noops-65WNPQVZ.js → legacy-noops-5P75CQC7.js} +9 -8
- package/dist/cli/{legacy-noops-6VYXF2MG.mjs → legacy-noops-MZ45GDMK.mjs} +6 -5
- package/dist/cli/{monitors-BYUCTVSC.js → monitors-5PHQZDZM.js} +100 -100
- package/dist/cli/{monitors-Y7I5ZVCN.mjs → monitors-VIOBUG2X.mjs} +7 -7
- package/dist/cli/{org-F2ASWTFY.js → org-B5LDVP2P.js} +72 -72
- package/dist/cli/{org-IW3YD6JZ.mjs → org-D5RTFJNY.mjs} +6 -6
- package/dist/cli/{pages-X6HLRQNV.js → pages-BUJYG3JL.js} +18 -18
- package/dist/cli/{pages-H2CXNIDB.mjs → pages-XWZL3YV2.mjs} +6 -6
- package/dist/cli/{play-LLEEDXRX.mjs → play-OSXLGCLZ.mjs} +93 -54
- package/dist/cli/{play-H2EM7DTI.js → play-SEC3EE7H.js} +468 -429
- package/dist/cli/{providers-BZR5JONN.mjs → providers-ENSURIW6.mjs} +6 -6
- package/dist/cli/{providers-6R2SPOEV.js → providers-RQPUASLI.js} +9 -9
- package/dist/cli/{quickstart-KVES7R6D.mjs → quickstart-HJTK6XWI.mjs} +4 -4
- package/dist/cli/{quickstart-PW7ONQUH.js → quickstart-XDTU4MAT.js} +6 -6
- package/dist/cli/{run-HVUQROBE.js → run-GX2SU5AT.js} +41 -41
- package/dist/cli/{run-RDI3Q6GO.mjs → run-ZMWSQAR2.mjs} +23 -23
- package/dist/cli/search-7WPABWYO.js +33 -0
- package/dist/cli/{search-3TJ24CUF.mjs → search-DZHZBHWT.mjs} +8 -8
- package/dist/cli/{search-output-JHT553SL.js → search-output-3JVZERNV.js} +6 -6
- package/dist/cli/{search-output-Y57OBQXX.mjs → search-output-MNHAR754.mjs} +4 -4
- package/dist/cli/{secrets-OZK7GRD5.mjs → secrets-VALVNVXB.mjs} +6 -6
- package/dist/cli/{secrets-U5JHWAXU.js → secrets-WO2LMDQ2.js} +15 -15
- package/dist/cli/sessions-2IA2DGWO.js +18 -0
- package/dist/cli/{sessions-D6DSEQ2T.mjs → sessions-EPYCH3AY.mjs} +6 -5
- package/dist/cli/{settings-DLPEHYGS.js → settings-OSF4O5HM.js} +109 -82
- package/dist/cli/{settings-ITLSLT2R.mjs → settings-W2ABZUD4.mjs} +39 -12
- package/dist/cli/{setup-Y5ZYEC6U.js → setup-DCXNQG6R.js} +50 -50
- package/dist/cli/{setup-XTYLF2CF.mjs → setup-XI2ERSMQ.mjs} +10 -10
- package/dist/cli/skills-QMD2WARJ.js +37 -0
- package/dist/cli/{skills-C4WCAVII.mjs → skills-ZO4AH2YR.mjs} +8 -8
- package/dist/cli/tools-53E6GBQU.js +57 -0
- package/dist/cli/{tools-ZESAPVOW.mjs → tools-FTECXZYA.mjs} +17 -17
- package/dist/cli/update-PPPNR6J5.js +35 -0
- package/dist/cli/{update-4PCKVDCS.mjs → update-WPFZO2JE.mjs} +10 -10
- package/dist/cli/{workflow-42CL4TVR.mjs → workflow-7X75IP3D.mjs} +7 -7
- package/dist/cli/{workflow-XXKXMPTI.js → workflow-PKMU33LV.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +105 -102
- 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.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-LFU77QDI.js +0 -43
- package/dist/cli/describe-JKZ67X3E.js +0 -50
- package/dist/cli/git-U5N6CTML.js +0 -25
- package/dist/cli/search-NKEEGLY6.js +0 -33
- package/dist/cli/sessions-PNMYAJNB.js +0 -17
- package/dist/cli/skills-K6FVG3BX.js +0 -37
- package/dist/cli/tools-LSALTN7I.js +0 -57
- package/dist/cli/update-P5KGNFNL.js +0 -35
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkASBWPRBNjs = require('./chunk-ASBWPRBN.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkBPGFNVH2js = require('./chunk-BPGFNVH2.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkXL4FFVWLjs = require('./chunk-XL4FFVWL.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkVPJSQMWQjs = require('./chunk-VPJSQMWQ.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk4NJK6P5Tjs = require('./chunk-4NJK6P5T.js');
|
|
21
21
|
|
|
22
22
|
// src/cli/compatibility-catalog.ts
|
|
23
23
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -44,7 +44,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
44
44
|
async function reportAutoUpdateEvent(input) {
|
|
45
45
|
let apiKey = "";
|
|
46
46
|
try {
|
|
47
|
-
apiKey =
|
|
47
|
+
apiKey = _chunkVPJSQMWQjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
48
48
|
} catch (e2) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -60,15 +60,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
60
60
|
headers: {
|
|
61
61
|
Authorization: `Bearer ${apiKey}`,
|
|
62
62
|
"Content-Type": "application/json",
|
|
63
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
63
|
+
"User-Agent": `deepline-ts-sdk/${_chunk4NJK6P5Tjs.SDK_VERSION}`,
|
|
64
64
|
"X-Deepline-Client-Family": "sdk",
|
|
65
65
|
"X-Deepline-CLI-Family": "sdk",
|
|
66
|
-
"X-Deepline-CLI-Version":
|
|
67
|
-
"X-Deepline-SDK-Version":
|
|
66
|
+
"X-Deepline-CLI-Version": _chunk4NJK6P5Tjs.SDK_VERSION,
|
|
67
|
+
"X-Deepline-SDK-Version": _chunk4NJK6P5Tjs.SDK_VERSION
|
|
68
68
|
},
|
|
69
69
|
body: JSON.stringify({
|
|
70
70
|
event: input.event,
|
|
71
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
71
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunk4NJK6P5Tjs.SDK_VERSION,
|
|
72
72
|
target_version: input.response.latest,
|
|
73
73
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
74
74
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -87,13 +87,13 @@ function envTruthy(name) {
|
|
|
87
87
|
return value === "1" || value === "true" || value === "yes";
|
|
88
88
|
}
|
|
89
89
|
function shouldSkipSelfUpdate(policy) {
|
|
90
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
90
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkASBWPRBNjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkBPGFNVH2js.isCiEnvironment.call(void 0, );
|
|
91
91
|
}
|
|
92
92
|
function isDowngradeAutoUpdateResponse(response) {
|
|
93
93
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
94
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
94
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunk4NJK6P5Tjs.SDK_VERSION;
|
|
95
95
|
if (!target) return false;
|
|
96
|
-
return
|
|
96
|
+
return _chunkASBWPRBNjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
97
97
|
}
|
|
98
98
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
99
99
|
return new Promise((resolve) => {
|
|
@@ -146,7 +146,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
146
146
|
}
|
|
147
147
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
148
148
|
const target = response.latest;
|
|
149
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
149
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunk4NJK6P5Tjs.SDK_VERSION;
|
|
150
150
|
process.stderr.write(
|
|
151
151
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
152
152
|
`
|
|
@@ -154,21 +154,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
157
|
-
const plan =
|
|
157
|
+
const plan = _chunkASBWPRBNjs.resolveUpdatePlan.call(void 0, {
|
|
158
158
|
packageSpec,
|
|
159
159
|
requireVerifiedNpmOwnership: true,
|
|
160
160
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
161
161
|
});
|
|
162
|
-
if (!
|
|
162
|
+
if (!_chunkASBWPRBNjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
166
166
|
deferredAutoUpdate = async () => {
|
|
167
167
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
168
168
|
};
|
|
169
|
-
if (
|
|
169
|
+
if (_chunkXL4FFVWLjs.isJsonOutputMode.call(void 0, )) {
|
|
170
170
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
171
|
-
|
|
171
|
+
_chunkXL4FFVWLjs.addJsonNotice.call(void 0, {
|
|
172
172
|
code: "sdk_update_queued",
|
|
173
173
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
174
174
|
});
|
|
@@ -181,7 +181,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
181
181
|
return true;
|
|
182
182
|
}
|
|
183
183
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
184
|
-
if (!
|
|
184
|
+
if (!_chunkASBWPRBNjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
185
185
|
const autoUpdate = response.auto_update;
|
|
186
186
|
const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
|
|
187
187
|
process.stderr.write(
|
|
@@ -194,7 +194,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
194
194
|
event: "started",
|
|
195
195
|
installKind: plan.kind
|
|
196
196
|
});
|
|
197
|
-
const updateResult = await
|
|
197
|
+
const updateResult = await _chunkASBWPRBNjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
198
198
|
if (updateResult.status === "skipped_previous_failure") {
|
|
199
199
|
void reportAutoUpdateEvent({
|
|
200
200
|
baseUrl,
|
|
@@ -245,7 +245,7 @@ var _crypto = require('crypto');
|
|
|
245
245
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
246
246
|
var activeToolExecuteCommand = null;
|
|
247
247
|
function progressLine(line) {
|
|
248
|
-
if (!
|
|
248
|
+
if (!_chunkXL4FFVWLjs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
249
249
|
}
|
|
250
250
|
function beginToolExecuteCommand() {
|
|
251
251
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkXL4FFVWLjs = require('./chunk-XL4FFVWL.js');
|
|
4
|
+
|
|
5
|
+
// src/cli/feedback-preferences.ts
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _fs = require('fs');
|
|
13
|
+
var _os = require('os');
|
|
14
|
+
var _path = require('path');
|
|
15
|
+
function feedbackSettingPath() {
|
|
16
|
+
return _path.join.call(void 0,
|
|
17
|
+
_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.HOME, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) || _os.homedir.call(void 0, ),
|
|
18
|
+
".local",
|
|
19
|
+
"deepline",
|
|
20
|
+
"sdk-cli",
|
|
21
|
+
"feedback-setting"
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function readFeedbackSetting() {
|
|
25
|
+
let setting;
|
|
26
|
+
try {
|
|
27
|
+
setting = _fs.readFileSync.call(void 0, feedbackSettingPath(), "utf8").trim();
|
|
28
|
+
} catch (error) {
|
|
29
|
+
if (error.code === "ENOENT") return "ask";
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
if (setting === "ask" || setting === "on" || setting === "off")
|
|
33
|
+
return setting;
|
|
34
|
+
throw new Error(
|
|
35
|
+
"Invalid feedback setting. Run deepline settings feedback ask to reset it."
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function writeFeedbackSetting(setting) {
|
|
39
|
+
const path = feedbackSettingPath();
|
|
40
|
+
const tempPath = `${path}.${process.pid}.tmp`;
|
|
41
|
+
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, path), { recursive: true });
|
|
42
|
+
try {
|
|
43
|
+
_fs.writeFileSync.call(void 0, tempPath, `${setting}
|
|
44
|
+
`, { mode: 384 });
|
|
45
|
+
_fs.renameSync.call(void 0, tempPath, path);
|
|
46
|
+
} finally {
|
|
47
|
+
_fs.rmSync.call(void 0, tempPath, { force: true });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function feedbackSendRestriction(requested) {
|
|
51
|
+
const setting = readFeedbackSetting();
|
|
52
|
+
return requested || setting === "on" ? null : setting;
|
|
53
|
+
}
|
|
54
|
+
function rejectRestrictedFeedback(options) {
|
|
55
|
+
const restriction = feedbackSendRestriction(options.requested);
|
|
56
|
+
if (!restriction) return false;
|
|
57
|
+
const code = restriction === "off" ? "FEEDBACK_DISABLED" : "FEEDBACK_APPROVAL_REQUIRED";
|
|
58
|
+
const message = restriction === "off" ? 'Feedback is in mode "off". Do not ask the user if they want to send feedback. Use --requested only if they explicitly request it without being prompted.' : "Ask the user if they wish to send feedback. If they agree, rerun the send command with --requested. To change the setting, run deepline settings feedback --help. Agents must get user approval before turning feedback on.";
|
|
59
|
+
if (options.json) {
|
|
60
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
61
|
+
{ ok: false, code, exitCode: 2, message },
|
|
62
|
+
{ json: true }
|
|
63
|
+
);
|
|
64
|
+
} else {
|
|
65
|
+
process.stderr.write(`${message}
|
|
66
|
+
`);
|
|
67
|
+
}
|
|
68
|
+
process.exitCode = 2;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
exports.readFeedbackSetting = readFeedbackSetting; exports.writeFeedbackSetting = writeFeedbackSetting; exports.feedbackSendRestriction = feedbackSendRestriction; exports.rejectRestrictedFeedback = rejectRestrictedFeedback;
|
|
@@ -16,12 +16,12 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
16
16
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkLF3FF2B2js = require('./chunk-LF3FF2B2.js');
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var SDK_VERSION =
|
|
23
|
-
var SDK_API_MAJOR =
|
|
24
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
22
|
+
var SDK_VERSION = _chunkLF3FF2B2js.SDK_RELEASE.version;
|
|
23
|
+
var SDK_API_MAJOR = _chunkLF3FF2B2js.SDK_RELEASE.contracts.api.currentMajor;
|
|
24
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunkLF3FF2B2js.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
25
25
|
|
|
26
26
|
// src/agent-runtime.ts
|
|
27
27
|
var _os = require('os');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7VQKU6MSjs = require('./chunk-7VQKU6MS.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 _chunkXL4FFVWLjs = require('./chunk-XL4FFVWL.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 = _chunkXL4FFVWLjs.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 ? _chunkXL4FFVWLjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkXL4FFVWLjs.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 = _chunk7VQKU6MSjs.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 : _chunk7VQKU6MSjs.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 : _chunkXL4FFVWLjs.parseJsonFields.call(void 0,
|
|
992
|
+
[...fullJson ? ["--full"] : [], ..._chunkXL4FFVWLjs.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 || _chunkXL4FFVWLjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
998
998
|
const verboseLogs = Boolean(
|
|
999
999
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
1000
1000
|
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedToolListScript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FFPLCSTZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
addDescribeOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UV524JZ5.mjs";
|
|
7
7
|
import {
|
|
8
8
|
describeLookupsFor,
|
|
9
9
|
describeName,
|
|
@@ -14,18 +14,18 @@ import {
|
|
|
14
14
|
} from "./chunk-ITJ7NB2D.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5MYXW6M6.mjs";
|
|
18
18
|
import {
|
|
19
19
|
failureReportHeaders,
|
|
20
20
|
isFailureReportingDisabled
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WAOLTP6R.mjs";
|
|
22
22
|
import {
|
|
23
23
|
printCommandEnvelope
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DMF56C6D.mjs";
|
|
25
25
|
import {
|
|
26
26
|
autoDetectBaseUrl,
|
|
27
27
|
resolveApiKeyForBaseUrl
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-HOKOJGQW.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/describe.ts
|
|
31
31
|
import { writeFileSync } from "fs";
|
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
skillsInstallLeasePath,
|
|
12
12
|
skillsSourceUrl,
|
|
13
13
|
syncSdkSkillsIfNeeded
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Q5EJO4TE.mjs";
|
|
15
15
|
import {
|
|
16
16
|
printCommandEnvelope
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DMF56C6D.mjs";
|
|
18
18
|
import {
|
|
19
19
|
autoDetectBaseUrl,
|
|
20
20
|
ensureProjectPrivatePathsIgnored,
|
|
21
21
|
resolveProjectPinTarget,
|
|
22
22
|
sdkCliStateDirPath
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HOKOJGQW.mjs";
|
|
24
24
|
import {
|
|
25
25
|
SDK_VERSION,
|
|
26
26
|
detectAgentRuntime
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-PQ56GE55.mjs";
|
|
28
28
|
import {
|
|
29
29
|
DEEPLINE_GTM_GLOBAL_SKILL_ROOTS
|
|
30
30
|
} from "./chunk-5JPKRDFC.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OEG6VCK4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HOKOJGQW.mjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var DeeplineClient2 = class extends DeeplineClient {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkN7FV7OM3js = require('./chunk-N7FV7OM3.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkXRLE2FPEjs = require('./chunk-XRLE2FPE.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -14,18 +14,18 @@ var _chunkTMQUMILMjs = require('./chunk-TMQUMILM.js');
|
|
|
14
14
|
var _chunkNTLBZUHDjs = require('./chunk-NTLBZUHD.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkZCYV6MZHjs = require('./chunk-ZCYV6MZH.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk6AL2VF3Ejs = require('./chunk-6AL2VF3E.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkXL4FFVWLjs = require('./chunk-XL4FFVWL.js');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkVPJSQMWQjs = require('./chunk-VPJSQMWQ.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/describe.ts
|
|
31
31
|
var _fs = require('fs');
|
|
@@ -34,14 +34,14 @@ var _path = require('path');
|
|
|
34
34
|
// src/cli/doc-read-reporting.ts
|
|
35
35
|
var REPORT_TIMEOUT_MS = 1e3;
|
|
36
36
|
async function reportDocRead(docId) {
|
|
37
|
-
if (
|
|
37
|
+
if (_chunk6AL2VF3Ejs.isFailureReportingDisabled.call(void 0, )) return;
|
|
38
38
|
try {
|
|
39
|
-
const baseUrl =
|
|
40
|
-
const apiKey =
|
|
39
|
+
const baseUrl = _chunkVPJSQMWQjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
40
|
+
const apiKey = _chunkVPJSQMWQjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
41
41
|
if (!apiKey) return;
|
|
42
42
|
await fetch(new URL("/api/v2/telemetry/doc-read", baseUrl), {
|
|
43
43
|
method: "POST",
|
|
44
|
-
headers:
|
|
44
|
+
headers: _chunk6AL2VF3Ejs.failureReportHeaders.call(void 0, apiKey),
|
|
45
45
|
body: JSON.stringify({ doc_id: docId }),
|
|
46
46
|
signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
|
|
47
47
|
});
|
|
@@ -54,16 +54,16 @@ function nothingNamed(name) {
|
|
|
54
54
|
return `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`;
|
|
55
55
|
}
|
|
56
56
|
function findNamed2(name, options) {
|
|
57
|
-
return _chunkTMQUMILMjs.findNamed.call(void 0, name, options, _chunkTMQUMILMjs.describeLookupsFor.call(void 0, new (0,
|
|
57
|
+
return _chunkTMQUMILMjs.findNamed.call(void 0, name, options, _chunkTMQUMILMjs.describeLookupsFor.call(void 0, new (0, _chunkZCYV6MZHjs.DeeplineClient)()));
|
|
58
58
|
}
|
|
59
59
|
async function describeAnything(name, options, onMissing) {
|
|
60
|
-
const client = new (0,
|
|
60
|
+
const client = new (0, _chunkZCYV6MZHjs.DeeplineClient)();
|
|
61
61
|
const lookups = _chunkTMQUMILMjs.describeLookupsFor.call(void 0, client);
|
|
62
62
|
const outcome = await _chunkTMQUMILMjs.describeName.call(void 0, name, options, {
|
|
63
63
|
...lookups,
|
|
64
64
|
// `tools describe` has already fetched the tool for its compatibility check.
|
|
65
65
|
tool: async (toolName) => _nullishCoalesce(options.fetchedTool, () => ( lookups.tool(toolName))),
|
|
66
|
-
seedStarterScript:
|
|
66
|
+
seedStarterScript: _chunkN7FV7OM3js.seedToolListScript
|
|
67
67
|
});
|
|
68
68
|
if (outcome.status === "missing") {
|
|
69
69
|
if (onMissing) return onMissing();
|
|
@@ -89,18 +89,18 @@ function deliver(envelope, lines, { json, out }) {
|
|
|
89
89
|
` : text;
|
|
90
90
|
_fs.writeFileSync.call(void 0, path, content);
|
|
91
91
|
const bytes = Buffer.byteLength(content);
|
|
92
|
-
|
|
92
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
93
93
|
{ path, bytes },
|
|
94
94
|
{ json, text: `Wrote ${path} (${bytes} bytes)
|
|
95
95
|
` }
|
|
96
96
|
);
|
|
97
97
|
return 0;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0, envelope, { json, text });
|
|
100
100
|
return 0;
|
|
101
101
|
}
|
|
102
102
|
function registerDescribeCommand(program) {
|
|
103
|
-
|
|
103
|
+
_chunkXRLE2FPEjs.addDescribeOptions.call(void 0, program.command("describe <name>")).option("--web-url", "Print only a play's play page URL").description(
|
|
104
104
|
"Describe anything search returns: a tool, monitor type, or play."
|
|
105
105
|
).addHelpText(
|
|
106
106
|
"after",
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkXL4FFVWLjs = require('./chunk-XL4FFVWL.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkVPJSQMWQjs = require('./chunk-VPJSQMWQ.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 } = _chunkXL4FFVWLjs.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
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.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
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.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
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.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
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.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
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkXL4FFVWLjs.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 = _chunkVPJSQMWQjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkXL4FFVWLjs.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.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
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.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
|
+
_chunkXL4FFVWLjs.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 } = _chunkXL4FFVWLjs.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkXL4FFVWLjs.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|