deepline 0.3.340 → 0.3.341
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/cli/auth-R7MYOAIT.js +31 -0
- package/dist/cli/{auth-AAHQCTJW.mjs → auth-VIQ6WBU5.mjs} +4 -4
- package/dist/cli/{billing-2X4SP44P.mjs → billing-7MIYVDBJ.mjs} +4 -4
- package/dist/cli/{billing-SBU4F4VS.js → billing-FW5TG3CQ.js} +71 -71
- package/dist/cli/{chunk-WDB7AIXJ.mjs → chunk-24RQUGMX.mjs} +6 -6
- package/dist/cli/{chunk-YODUXBLR.js → chunk-2DFZELZG.js} +225 -225
- package/dist/cli/{chunk-2IZ6RE5L.mjs → chunk-4LXK5CMK.mjs} +1 -1
- package/dist/cli/{chunk-YLDIZ7A3.js → chunk-5GQQMICZ.js} +9 -9
- package/dist/cli/{chunk-OD7LIBSF.mjs → chunk-5RSBKWF6.mjs} +2 -2
- package/dist/cli/{chunk-VLV2PVA2.js → chunk-7IT3B2BL.js} +8 -8
- package/dist/cli/{chunk-77YWQTE6.mjs → chunk-7ZBSHTYB.mjs} +4 -4
- package/dist/cli/{chunk-YAYAOUH3.js → chunk-AFCZAA2Y.js} +8 -8
- package/dist/cli/{chunk-URO52CD6.js → chunk-ASW2NN7E.js} +2 -2
- package/dist/cli/{chunk-XCB2WE4D.js → chunk-ATLE7AKN.js} +15 -15
- package/dist/cli/{chunk-DX37W6IS.mjs → chunk-BX6GJWBS.mjs} +3 -3
- package/dist/cli/{chunk-B2HJ2OFH.js → chunk-FH6IVCYY.js} +48 -48
- package/dist/cli/{chunk-N3X2DMF2.mjs → chunk-IWSPBSV7.mjs} +1 -1
- package/dist/cli/{chunk-M3KIBSVO.mjs → chunk-KIGZU235.mjs} +2 -2
- package/dist/cli/{chunk-A4LUPRGL.js → chunk-LT33BWLY.js} +6 -6
- package/dist/cli/{chunk-EQFYORNR.js → chunk-MGYI6JH2.js} +26 -26
- package/dist/cli/{chunk-NPPD5XT6.js → chunk-NUIPBZVP.js} +45 -45
- package/dist/cli/{chunk-AYAEVVB5.js → chunk-PIVZA4GI.js} +4 -4
- package/dist/cli/{chunk-6D77EBSR.mjs → chunk-TU3WZZG4.mjs} +5 -5
- package/dist/cli/{chunk-VMEJLJJD.mjs → chunk-TVNBP3CX.mjs} +1 -1
- package/dist/cli/{chunk-YRDTRTU4.mjs → chunk-U4VULGDJ.mjs} +2 -2
- package/dist/cli/{chunk-PLSVHYRC.mjs → chunk-VO4RF766.mjs} +1 -1
- package/dist/cli/{chunk-X6A7PAR6.js → chunk-WQ5LPOFC.js} +60 -60
- package/dist/cli/{chunk-6ONNP4XL.js → chunk-XQD53NOJ.js} +1 -1
- package/dist/cli/{chunk-LR66EFVU.mjs → chunk-Y2BTWBO7.mjs} +1 -1
- package/dist/cli/{chunk-AN3X5XIR.mjs → chunk-ZK7BK7OD.mjs} +2 -2
- package/dist/cli/{client-LKEH3EYO.mjs → client-5FQFKJS3.mjs} +3 -3
- package/dist/cli/client-HTXSC666.js +20 -0
- package/dist/cli/{csv-WDWQGVDN.mjs → csv-J7CGFUZO.mjs} +3 -3
- package/dist/cli/{csv-ZQIEH4Q3.js → csv-X5GUUDBX.js} +12 -12
- package/dist/cli/{db-KKC6CT3W.mjs → db-DXPCEPTU.mjs} +4 -4
- package/dist/cli/{db-CRQSATVK.js → db-SQXA3O74.js} +29 -29
- package/dist/cli/{describe-HGYOEBYE.js → describe-EQTSIVVZ.js} +15 -15
- package/dist/cli/{describe-YEVXHHHH.mjs → describe-VHW7FVBJ.mjs} +8 -8
- package/dist/cli/{executions-ISG5EEOO.js → executions-4XLP2D45.js} +6 -6
- package/dist/cli/{executions-MMNCPQNE.mjs → executions-OSF7KBAM.mjs} +4 -4
- package/dist/cli/{feedback-U5SC3CAL.js → feedback-7EBKMWNP.js} +7 -7
- package/dist/cli/{feedback-3HNMWGJA.mjs → feedback-HM4OG6GJ.mjs} +3 -3
- package/dist/cli/git-4VXVJGO6.js +23 -0
- package/dist/cli/{git-REGKM36C.mjs → git-LXIXK5ZP.mjs} +4 -4
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-KUIQG6VC.mjs → legacy-noops-HEDDLUOF.mjs} +4 -4
- package/dist/cli/{legacy-noops-GTUAF7TM.js → legacy-noops-O5TQI3GH.js} +7 -7
- package/dist/cli/{monitors-V5RFXFO5.js → monitors-334IBGT6.js} +85 -85
- package/dist/cli/{monitors-7IYKWVMJ.mjs → monitors-6EX3T2US.mjs} +4 -4
- package/dist/cli/{org-77BRBYNS.js → org-VWLMFKI7.js} +60 -60
- package/dist/cli/{org-RSN7GZN4.mjs → org-ZMKKQ5EY.mjs} +4 -4
- package/dist/cli/play-4OUTDB4O.js +153 -0
- package/dist/cli/{play-ZPWFRN3I.mjs → play-CSMPSPXC.mjs} +7 -7
- package/dist/cli/{providers-TVELPXNI.mjs → providers-PE4K7ZNQ.mjs} +4 -4
- package/dist/cli/{providers-2LD2BJUO.js → providers-Z3F3M67Z.js} +7 -7
- package/dist/cli/{quickstart-CYL2GNSK.js → quickstart-BBO4ZMFA.js} +5 -5
- package/dist/cli/{quickstart-7RUT33IL.mjs → quickstart-P6Q5NLOI.mjs} +3 -3
- package/dist/cli/search-6MGGRBOO.js +26 -0
- package/dist/cli/{search-GJURFP4W.mjs → search-WLQSHUO5.mjs} +5 -5
- package/dist/cli/{secrets-KWBPK5GP.js → secrets-IITTIRV2.js} +13 -13
- package/dist/cli/{secrets-L5LNMMSB.mjs → secrets-JAYFSPQL.mjs} +4 -4
- package/dist/cli/{sessions-5DWIUOGX.js → sessions-EAWCTMCB.js} +5 -5
- package/dist/cli/{sessions-5EAEXNJY.mjs → sessions-XIGZKWJG.mjs} +4 -4
- package/dist/cli/{settings-KBPJL4KI.js → settings-S6CF5T6U.js} +74 -74
- package/dist/cli/{settings-OPD6MT4Q.mjs → settings-XOZ3IVRT.mjs} +7 -7
- package/dist/cli/{setup-B5UDLN32.js → setup-PO6TJJ5P.js} +41 -41
- package/dist/cli/{setup-GFHBMHWJ.mjs → setup-QGS4YTRD.mjs} +6 -6
- package/dist/cli/skills-2LS3SJP6.js +28 -0
- package/dist/cli/{skills-3245BDMO.mjs → skills-I6ZYMTOV.mjs} +4 -4
- package/dist/cli/tools-JEO4GEFK.js +40 -0
- package/dist/cli/{tools-ZKXMREZU.mjs → tools-XLYFZCRO.mjs} +6 -6
- package/dist/cli/{update-NBHQD6N6.mjs → update-JTTZPF4K.mjs} +6 -6
- package/dist/cli/update-NYIWSIRQ.js +28 -0
- package/dist/cli/{workflow-5XYAE4BX.mjs → workflow-2R4X2YR5.mjs} +5 -5
- package/dist/cli/{workflow-T3IWKJI2.js → workflow-D2YLWJDP.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +74 -74
- 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/viewer/viewer.js +86 -11
- package/package.json +1 -1
- package/dist/cli/auth-WDM5N7LQ.js +0 -31
- package/dist/cli/client-2MTAJ6XW.js +0 -20
- package/dist/cli/git-BULAJZKJ.js +0 -23
- package/dist/cli/play-IKPMX4VZ.js +0 -153
- package/dist/cli/search-2ZFU42IA.js +0 -26
- package/dist/cli/skills-I5MHLBGC.js +0 -28
- package/dist/cli/tools-QQVNDK7W.js +0 -40
- package/dist/cli/update-6OCUCA4T.js +0 -28
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkLT33BWLYjs = require('./chunk-LT33BWLY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkA4LUPRGLjs = require('./chunk-A4LUPRGL.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkPIVZA4GIjs = require('./chunk-PIVZA4GI.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ function statusBannerLine(value) {
|
|
|
52
52
|
return `Service notice: ${banner.message}`;
|
|
53
53
|
}
|
|
54
54
|
function envFilePath(baseUrl) {
|
|
55
|
-
return
|
|
55
|
+
return _chunkPIVZA4GIjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
56
56
|
}
|
|
57
57
|
function normalizeAuthScope(value) {
|
|
58
58
|
if (!value || value === "global") return "global";
|
|
@@ -65,7 +65,7 @@ function parseAuthScope(args) {
|
|
|
65
65
|
}
|
|
66
66
|
function pendingClaimPath(baseUrl, scope) {
|
|
67
67
|
if (scope === "folder") {
|
|
68
|
-
const target =
|
|
68
|
+
const target = _chunkPIVZA4GIjs.resolveProjectPinTarget.call(void 0, );
|
|
69
69
|
if (!target.ok) {
|
|
70
70
|
throw new Error(
|
|
71
71
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -75,10 +75,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
75
75
|
}
|
|
76
76
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
77
77
|
}
|
|
78
|
-
return `${
|
|
78
|
+
return `${_chunkPIVZA4GIjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkPIVZA4GIjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
82
82
|
}
|
|
83
83
|
function savePendingClaim(baseUrl, claim) {
|
|
84
84
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -180,21 +180,21 @@ function parseRegisterWaitMode(args) {
|
|
|
180
180
|
function shouldWaitForRegisterClaim(mode) {
|
|
181
181
|
if (mode === "yes") return true;
|
|
182
182
|
if (mode === "no") return false;
|
|
183
|
-
return
|
|
183
|
+
return _chunkPIVZA4GIjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
184
184
|
}
|
|
185
185
|
function saveEnvValues(values, baseUrl, scope) {
|
|
186
186
|
const filtered = {
|
|
187
|
-
...values[
|
|
188
|
-
...values[
|
|
189
|
-
...values[
|
|
190
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
187
|
+
...values[_chunkPIVZA4GIjs.HOST_URL_ENV] ? { [_chunkPIVZA4GIjs.HOST_URL_ENV]: values[_chunkPIVZA4GIjs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkPIVZA4GIjs.API_KEY_ENV] ? { [_chunkPIVZA4GIjs.API_KEY_ENV]: values[_chunkPIVZA4GIjs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkPIVZA4GIjs.ACTIVE_ORG_ID_ENV] ? { [_chunkPIVZA4GIjs.ACTIVE_ORG_ID_ENV]: values[_chunkPIVZA4GIjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkPIVZA4GIjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkPIVZA4GIjs.ACTIVE_ORG_NAME_ENV]: values[_chunkPIVZA4GIjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
191
191
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkPIVZA4GIjs.FEATURES_ENV) ? { [_chunkPIVZA4GIjs.FEATURES_ENV]: values[_chunkPIVZA4GIjs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkPIVZA4GIjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkPIVZA4GIjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
function activeOrgEnvValues(data) {
|
|
@@ -202,21 +202,21 @@ function activeOrgEnvValues(data) {
|
|
|
202
202
|
if (!orgId) return {};
|
|
203
203
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
204
204
|
return {
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
...
|
|
205
|
+
[_chunkPIVZA4GIjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkPIVZA4GIjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkPIVZA4GIjs.featureEnvValues.call(void 0, data)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
211
211
|
const headers = {
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
213
|
+
"User-Agent": `deepline-ts-sdk/${_chunkPIVZA4GIjs.SDK_VERSION}`,
|
|
214
214
|
"X-Deepline-Client-Family": "sdk",
|
|
215
215
|
"X-Deepline-CLI-Family": "sdk",
|
|
216
|
-
"X-Deepline-Agent-Runtime":
|
|
217
|
-
"X-Deepline-CLI-Version":
|
|
218
|
-
"X-Deepline-SDK-Version":
|
|
219
|
-
"X-Deepline-API-Contract":
|
|
216
|
+
"X-Deepline-Agent-Runtime": _chunkPIVZA4GIjs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkPIVZA4GIjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkPIVZA4GIjs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkPIVZA4GIjs.SDK_API_CONTRACT
|
|
220
220
|
};
|
|
221
221
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
222
222
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -254,7 +254,7 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
254
254
|
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
255
255
|
}
|
|
256
256
|
async function reportSetupCompleted(input) {
|
|
257
|
-
const apiKey = input.authScope === "folder" ?
|
|
257
|
+
const apiKey = input.authScope === "folder" ? _chunkPIVZA4GIjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkPIVZA4GIjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
258
258
|
if (!apiKey) return;
|
|
259
259
|
try {
|
|
260
260
|
await httpJson(
|
|
@@ -351,7 +351,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
async function handleRegister(args) {
|
|
354
|
-
const baseUrl =
|
|
354
|
+
const baseUrl = _chunkPIVZA4GIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
355
355
|
let orgName = "";
|
|
356
356
|
let orgId = "";
|
|
357
357
|
let agentName = "";
|
|
@@ -406,19 +406,19 @@ async function handleRegister(args) {
|
|
|
406
406
|
});
|
|
407
407
|
saveEnvValues(
|
|
408
408
|
{
|
|
409
|
-
[
|
|
409
|
+
[_chunkPIVZA4GIjs.HOST_URL_ENV]: baseUrl
|
|
410
410
|
},
|
|
411
411
|
baseUrl,
|
|
412
412
|
authScope
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
if (claimUrl) {
|
|
416
|
-
const shouldOpen = waitMode !== "no" &&
|
|
416
|
+
const shouldOpen = waitMode !== "no" && _chunkPIVZA4GIjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
417
417
|
console.log(
|
|
418
418
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
419
419
|
);
|
|
420
420
|
console.log(` ${claimUrl}`);
|
|
421
|
-
if (shouldOpen)
|
|
421
|
+
if (shouldOpen) _chunkLT33BWLYjs.openInBrowser.call(void 0, claimUrl);
|
|
422
422
|
}
|
|
423
423
|
if (data.cli_message) {
|
|
424
424
|
console.log(String(data.cli_message));
|
|
@@ -461,8 +461,8 @@ async function handleRegister(args) {
|
|
|
461
461
|
if (apiKey) {
|
|
462
462
|
saveEnvValues(
|
|
463
463
|
{
|
|
464
|
-
[
|
|
465
|
-
[
|
|
464
|
+
[_chunkPIVZA4GIjs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkPIVZA4GIjs.API_KEY_ENV]: apiKey,
|
|
466
466
|
...activeOrgEnvValues(statusData)
|
|
467
467
|
},
|
|
468
468
|
baseUrl,
|
|
@@ -484,7 +484,7 @@ async function handleRegister(args) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
async function handleWait(args) {
|
|
487
|
-
const baseUrl =
|
|
487
|
+
const baseUrl = _chunkPIVZA4GIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
488
488
|
let timeoutSeconds = 300;
|
|
489
489
|
let requestedScope;
|
|
490
490
|
if (args.includes("--auth-scope")) {
|
|
@@ -508,7 +508,7 @@ async function handleWait(args) {
|
|
|
508
508
|
const authScope = resumed.scope;
|
|
509
509
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _11 => _11.claimToken]), () => ( ""));
|
|
510
510
|
if (!pendingClaim) {
|
|
511
|
-
const scopedApiKey = authScope === "folder" ?
|
|
511
|
+
const scopedApiKey = authScope === "folder" ? _chunkPIVZA4GIjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkPIVZA4GIjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
512
512
|
if (scopedApiKey) {
|
|
513
513
|
console.log("Already connected.");
|
|
514
514
|
return EXIT_OK;
|
|
@@ -551,8 +551,8 @@ async function handleWait(args) {
|
|
|
551
551
|
if (apiKey) {
|
|
552
552
|
saveEnvValues(
|
|
553
553
|
{
|
|
554
|
-
[
|
|
555
|
-
[
|
|
554
|
+
[_chunkPIVZA4GIjs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkPIVZA4GIjs.API_KEY_ENV]: apiKey,
|
|
556
556
|
...activeOrgEnvValues(data)
|
|
557
557
|
},
|
|
558
558
|
baseUrl,
|
|
@@ -576,9 +576,9 @@ async function handleWait(args) {
|
|
|
576
576
|
return EXIT_AUTH;
|
|
577
577
|
}
|
|
578
578
|
async function handleStatus(args) {
|
|
579
|
-
const baseUrl =
|
|
579
|
+
const baseUrl = _chunkPIVZA4GIjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkLT33BWLYjs.argsWantJson.call(void 0, args);
|
|
582
582
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
583
583
|
let authScope = null;
|
|
584
584
|
if (hasExplicitAuthScope) {
|
|
@@ -618,14 +618,14 @@ async function handleStatus(args) {
|
|
|
618
618
|
};
|
|
619
619
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
620
620
|
}
|
|
621
|
-
const apiKey = authScope === "folder" ?
|
|
621
|
+
const apiKey = authScope === "folder" ? _chunkPIVZA4GIjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkPIVZA4GIjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkPIVZA4GIjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
622
622
|
if (!apiKey) {
|
|
623
623
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
624
624
|
baseUrl,
|
|
625
625
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
626
626
|
);
|
|
627
627
|
if (pendingClaim) {
|
|
628
|
-
|
|
628
|
+
_chunkLT33BWLYjs.printCommandEnvelope.call(void 0,
|
|
629
629
|
{
|
|
630
630
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
631
631
|
status: "pending",
|
|
@@ -646,7 +646,7 @@ async function handleStatus(args) {
|
|
|
646
646
|
);
|
|
647
647
|
return EXIT_OK;
|
|
648
648
|
}
|
|
649
|
-
|
|
649
|
+
_chunkLT33BWLYjs.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -682,7 +682,7 @@ async function handleStatus(args) {
|
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
if (status === 401 || status === 403) {
|
|
685
|
-
|
|
685
|
+
_chunkLT33BWLYjs.printCommandEnvelope.call(void 0,
|
|
686
686
|
{
|
|
687
687
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
688
688
|
status: "unauthorized",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
console.error(`Auth status error (status ${status}).`);
|
|
713
713
|
return EXIT_SERVER;
|
|
714
714
|
}
|
|
715
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
715
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkPIVZA4GIjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
716
716
|
clearSatisfiedPendingClaim(
|
|
717
717
|
baseUrl,
|
|
718
718
|
resolvedAuthScope,
|
|
@@ -740,28 +740,28 @@ async function handleStatus(args) {
|
|
|
740
740
|
if (apiKeyResp) {
|
|
741
741
|
saveEnvValues(
|
|
742
742
|
{
|
|
743
|
-
[
|
|
744
|
-
[
|
|
743
|
+
[_chunkPIVZA4GIjs.HOST_URL_ENV]: baseUrl,
|
|
744
|
+
[_chunkPIVZA4GIjs.API_KEY_ENV]: apiKeyResp,
|
|
745
745
|
...activeOrgEnvValues(data)
|
|
746
746
|
},
|
|
747
747
|
baseUrl,
|
|
748
748
|
resolvedAuthScope
|
|
749
749
|
);
|
|
750
750
|
if (resolvedAuthScope === "folder") {
|
|
751
|
-
const target =
|
|
751
|
+
const target = _chunkPIVZA4GIjs.resolveProjectPinTarget.call(void 0, );
|
|
752
752
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
753
753
|
} else {
|
|
754
754
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
758
|
-
saveEnvValues(
|
|
757
|
+
} else if (resolvedAuthScope === "folder" || _chunkPIVZA4GIjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
758
|
+
saveEnvValues(_chunkPIVZA4GIjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
_chunkLT33BWLYjs.printCommandEnvelope.call(void 0,
|
|
761
761
|
{
|
|
762
762
|
...payload,
|
|
763
|
-
...
|
|
764
|
-
command_context:
|
|
763
|
+
..._chunkPIVZA4GIjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
764
|
+
command_context: _chunkPIVZA4GIjs.resolveCliCommandContext.call(void 0,
|
|
765
765
|
{ baseUrl, apiKey },
|
|
766
766
|
resolvedAuthScope
|
|
767
767
|
)
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IWSPBSV7.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VO4RF766.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkPIVZA4GIjs = require('./chunk-PIVZA4GI.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -136,8 +136,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
136
136
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
137
137
|
var defaultBrowserCommandRunner = childProcess;
|
|
138
138
|
function getAuthedHttpClient() {
|
|
139
|
-
const config =
|
|
140
|
-
return { config, http: new (0,
|
|
139
|
+
const config = _chunkPIVZA4GIjs.resolveConfig.call(void 0, );
|
|
140
|
+
return { config, http: new (0, _chunkPIVZA4GIjs.HttpClient)(config) };
|
|
141
141
|
}
|
|
142
142
|
function stableOsUserId() {
|
|
143
143
|
try {
|
|
@@ -477,7 +477,7 @@ function collectLocalEnvInfo() {
|
|
|
477
477
|
os: `${process.platform} ${process.arch}`,
|
|
478
478
|
node_version: process.version,
|
|
479
479
|
home_dir: homeDir,
|
|
480
|
-
agent_runtime:
|
|
480
|
+
agent_runtime: _chunkPIVZA4GIjs.detectAgentRuntime.call(void 0, )
|
|
481
481
|
};
|
|
482
482
|
const env = process.env;
|
|
483
483
|
const optional = {
|
|
@@ -725,9 +725,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
725
725
|
}
|
|
726
726
|
function withAgentCommandContext(value) {
|
|
727
727
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
728
|
-
return
|
|
728
|
+
return _chunkPIVZA4GIjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
729
729
|
...valueRecord,
|
|
730
|
-
command_context:
|
|
730
|
+
command_context: _chunkPIVZA4GIjs.resolveCliCommandContext.call(void 0, )
|
|
731
731
|
} : value;
|
|
732
732
|
}
|
|
733
733
|
function printJson(value, fields) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkLT33BWLYjs = require('./chunk-LT33BWLY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkPIVZA4GIjs = require('./chunk-PIVZA4GI.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 } = _chunkLT33BWLYjs.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
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.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
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.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
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.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
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.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
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkLT33BWLYjs.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 = _chunkPIVZA4GIjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkLT33BWLYjs.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.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
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.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
|
+
_chunkLT33BWLYjs.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 } = _chunkLT33BWLYjs.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkLT33BWLYjs.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|