deepline 0.3.395 → 0.3.397
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +2 -2
- package/dist/cli/{auth-NMQXZRS7.mjs → auth-AZJFXGKP.mjs} +5 -4
- package/dist/cli/auth-CZJQU7B5.js +40 -0
- package/dist/cli/{billing-Z4JTGUU3.js → billing-MQV5AGDJ.js} +77 -76
- package/dist/cli/{billing-5MVXZRS6.mjs → billing-MZAAUHGH.mjs} +6 -5
- package/dist/cli/{chunk-6D7A2FSL.mjs → chunk-2LDADJNO.mjs} +7 -107
- package/dist/cli/{chunk-UKU6JM3S.js → chunk-3VP34TAU.js} +8 -8
- package/dist/cli/{chunk-7XAM7KDW.mjs → chunk-4D745XZO.mjs} +21 -108
- package/dist/cli/chunk-7DRPTGCK.js +930 -0
- package/dist/cli/{chunk-ZMVJSS6N.js → chunk-BQR6UN3C.js} +62 -78
- package/dist/cli/{chunk-HRWUQJ4K.js → chunk-DQ65ZVHN.js} +6 -6
- package/dist/cli/{chunk-5VCZ3WRH.mjs → chunk-EIMG75BT.mjs} +1 -0
- package/dist/cli/{chunk-EFLQHJZ6.mjs → chunk-F3BUFYKE.mjs} +182 -1031
- package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
- package/dist/cli/{describe-DBRY5BNK.mjs → chunk-HFYQBC2D.mjs} +51 -171
- package/dist/cli/chunk-HGFFYVXN.js +210 -0
- package/dist/cli/{chunk-VB6KECLU.mjs → chunk-IHG7UAHD.mjs} +63 -79
- package/dist/cli/{chunk-TO2MWPGR.js → chunk-IZ74ABSX.js} +1 -1
- package/dist/cli/{chunk-G4IWGRMK.mjs → chunk-J7ABTQQ7.mjs} +5 -3
- package/dist/cli/{chunk-LZLBR2SF.js → chunk-K33MXVXQ.js} +323 -1172
- package/dist/cli/{chunk-DRM3CMHL.js → chunk-KXMNM4AQ.js} +2 -1
- package/dist/cli/chunk-LJ5747UC.mjs +107 -0
- package/dist/cli/{chunk-BON3DRC6.mjs → chunk-MRXMMERY.mjs} +1 -1
- package/dist/cli/{chunk-7MVWUXOD.mjs → chunk-MV7QRALK.mjs} +3 -3
- package/dist/cli/{chunk-WCCKMLHL.mjs → chunk-MYPH2LUU.mjs} +2 -2
- package/dist/cli/{chunk-RDXFGPJU.js → chunk-NA4T3B62.js} +64 -272
- package/dist/cli/{chunk-BLYL3KOC.mjs → chunk-NOX2TCBP.mjs} +1 -1
- package/dist/cli/chunk-OSDXE27V.mjs +88 -0
- package/dist/cli/{chunk-R4XZO6Z5.js → chunk-PSGEDGLT.js} +28 -115
- package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
- package/dist/cli/chunk-RFG3MRAC.js +286 -0
- package/dist/cli/{chunk-47M6HPGP.mjs → chunk-RNSWDKBM.mjs} +1 -1
- package/dist/cli/{chunk-56IFFVIB.js → chunk-RYW4HPSM.js} +21 -121
- package/dist/cli/{chunk-K5T3EN6D.js → chunk-SO7RUVTY.js} +26 -26
- package/dist/cli/{chunk-KZZC33PY.mjs → chunk-TXZVVBQZ.mjs} +63 -271
- package/dist/cli/{chunk-36ML3YKA.js → chunk-UVXBVUZQ.js} +15 -13
- package/dist/cli/{chunk-PZ5BZ76S.js → chunk-VTF4RRWJ.js} +50 -50
- package/dist/cli/{chunk-3TRY7KAC.mjs → chunk-W3HMGKMI.mjs} +2 -2
- package/dist/cli/{chunk-ZWH2TFA7.mjs → chunk-WM2QEHZL.mjs} +2 -2
- package/dist/cli/chunk-YHPYUZZX.mjs +112 -0
- package/dist/cli/chunk-YHZUZO3U.mjs +930 -0
- package/dist/cli/{chunk-UCXK2DS4.js → chunk-YLRME7MK.js} +15 -15
- package/dist/cli/{chunk-MYIBHORT.js → chunk-YSVORIEW.js} +2 -2
- package/dist/cli/{chunk-OCSG6X67.mjs → chunk-YUDKBQUD.mjs} +4 -4
- package/dist/cli/chunk-ZAAKSJAS.js +88 -0
- package/dist/cli/{chunk-VYLJJQ7Y.js → chunk-ZHUMDMOS.js} +65 -65
- package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
- package/dist/cli/{csv-HTS5ZYQ4.js → csv-AQBQ5O3I.js} +13 -12
- package/dist/cli/{csv-SVOD5UBH.mjs → csv-MB7PJMYQ.mjs} +4 -3
- package/dist/cli/{db-7AP4P52N.js → db-JPUYC5RB.js} +31 -30
- package/dist/cli/{db-7QLNI3Q4.mjs → db-L5IEI2AU.mjs} +6 -5
- package/dist/cli/describe-6WT74AOR.js +164 -0
- package/dist/cli/describe-S6BFANVI.mjs +164 -0
- package/dist/cli/describe-core.d.mts +100 -0
- package/dist/cli/describe-core.d.ts +100 -0
- package/dist/cli/describe-core.js +18 -0
- package/dist/cli/describe-core.mjs +18 -0
- package/dist/cli/{executions-GRQXTB2P.js → executions-6TMQTFP4.js} +8 -7
- package/dist/cli/{executions-QNZTPNG4.mjs → executions-L7I2ZW4Z.mjs} +6 -5
- package/dist/cli/{feedback-JMCSR624.mjs → feedback-DSJ63HK6.mjs} +4 -3
- package/dist/cli/{feedback-ZOLA2KY7.js → feedback-XF7CQGMD.js} +8 -7
- package/dist/cli/{git-LJGL2IHS.mjs → git-C3ENM67D.mjs} +5 -4
- package/dist/cli/git-HYDZK2QR.js +24 -0
- package/dist/cli/index.js +96 -94
- package/dist/cli/index.mjs +41 -39
- package/dist/cli/{legacy-noops-YSCIR2SD.js → legacy-noops-B2NHWIVD.js} +8 -7
- package/dist/cli/{legacy-noops-F23PKVBN.mjs → legacy-noops-VFG2K6HK.mjs} +5 -4
- package/dist/cli/{monitors-WMZ6HJZX.js → monitors-ORFWOVZB.js} +87 -86
- package/dist/cli/{monitors-S4LOEL7W.mjs → monitors-TCEDBDGY.mjs} +6 -5
- package/dist/cli/{org-U3WA2NQM.mjs → org-45KREIKZ.mjs} +6 -5
- package/dist/cli/{org-PFHM5ZLY.js → org-T74CJESN.js} +66 -65
- package/dist/cli/{chunk-XMAPE2KH.mjs → play-MU7MYBIM.mjs} +78 -131
- package/dist/cli/{chunk-4KLCLLTO.js → play-XHK2LPON.js} +273 -326
- package/dist/cli/{providers-XYMHLKCA.js → providers-4MGQKYFD.js} +9 -8
- package/dist/cli/{providers-QBBRFBOH.mjs → providers-VYCXIJT5.mjs} +6 -5
- package/dist/cli/{quickstart-IYGD6ZY3.js → quickstart-47G3VEOT.js} +6 -5
- package/dist/cli/{quickstart-5JTDGISY.mjs → quickstart-H724EFM2.mjs} +4 -3
- package/dist/cli/search-3356ENLD.js +30 -0
- package/dist/cli/{search-X6W6GRHS.mjs → search-VQHXEFQ4.mjs} +8 -6
- package/dist/cli/{secrets-UHG6OQFD.js → secrets-ALLKCU35.js} +15 -14
- package/dist/cli/{secrets-N55B67H6.mjs → secrets-CPBNGA44.mjs} +6 -5
- package/dist/cli/{sessions-JTRSTDSS.mjs → sessions-7RSQB7IX.mjs} +5 -4
- package/dist/cli/sessions-FKGAY7WQ.js +16 -0
- package/dist/cli/{settings-Q24HRAQI.mjs → settings-UYSGV4IC.mjs} +9 -8
- package/dist/cli/{settings-ATX4U5AS.js → settings-Y5BI42P7.js} +76 -75
- package/dist/cli/{setup-77ZWLVHT.mjs → setup-L3ZBBTS4.mjs} +7 -6
- package/dist/cli/{setup-EJCNOUCE.js → setup-VXQPEU3E.js} +42 -41
- package/dist/cli/skills-DUZQTDTE.js +29 -0
- package/dist/cli/{skills-XIS5AWQI.mjs → skills-QHVDLSFE.mjs} +5 -4
- package/dist/cli/{tools-WCKLYEGQ.mjs → tools-LSCEK4K2.mjs} +16 -19
- package/dist/cli/tools-YWU5QOQ5.js +39 -0
- package/dist/cli/update-5LYQAI55.js +29 -0
- package/dist/cli/{update-UT5WANMV.mjs → update-CU22OTBM.mjs} +7 -6
- package/dist/cli/{workflow-226QYUN2.js → workflow-ERFLTRNX.js} +17 -16
- package/dist/cli/{workflow-ZMX3L4ML.mjs → workflow-KQARK5BZ.mjs} +7 -6
- package/dist/{client-hdFtwhTm.d.mts → client-D0j-_aaa.d.mts} +2 -1
- package/dist/{client-CivP-PAI.d.ts → client-DflfVyj6.d.ts} +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -11
- package/dist/index.mjs +19 -15
- package/dist/install-integrity.json +94 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/play-description.js +4 -2
- package/dist/plays/play-description.mjs +3 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +6 -1
- package/dist/cli/auth-UYCOBAL5.js +0 -39
- package/dist/cli/describe-YKOE54ZO.js +0 -406
- package/dist/cli/git-EJQLRK27.js +0 -23
- package/dist/cli/play-AGSECQFN.mjs +0 -159
- package/dist/cli/play-BR2LWGXK.js +0 -159
- package/dist/cli/search-ZVSYH5GY.js +0 -28
- package/dist/cli/sessions-57L5MGHN.js +0 -15
- package/dist/cli/skills-SPXUBLII.js +0 -28
- package/dist/cli/tools-DBHUUZJX.js +0 -42
- package/dist/cli/update-VSNFXRHJ.js +0 -28
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J7ABTQQ7.mjs";
|
|
4
4
|
import "./chunk-6IKARAYD.mjs";
|
|
5
5
|
import "./chunk-JI2B4RZP.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-EIMG75BT.mjs";
|
|
7
7
|
import "./chunk-UBKA33KY.mjs";
|
|
8
8
|
import {
|
|
9
9
|
printCommandEnvelope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RNSWDKBM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
ACTIVE_ORG_ID_ENV,
|
|
13
13
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -28,10 +28,11 @@ import {
|
|
|
28
28
|
saveProjectDeeplineEnvValues,
|
|
29
29
|
sdkCliStateDirPath,
|
|
30
30
|
storedHostFeatures
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2LDADJNO.mjs";
|
|
32
|
+
import "./chunk-YHPYUZZX.mjs";
|
|
32
33
|
import "./chunk-DLIRSHV6.mjs";
|
|
33
34
|
import "./chunk-NXGCO4JB.mjs";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-MRXMMERY.mjs";
|
|
35
36
|
import "./chunk-WZYKRD7T.mjs";
|
|
36
37
|
import "./chunk-KRD6H754.mjs";
|
|
37
38
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUVXBVUZQjs = require('./chunk-UVXBVUZQ.js');
|
|
4
4
|
require('./chunk-S6R3OX7B.js');
|
|
5
5
|
require('./chunk-UHNDVD3P.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-KXMNM4AQ.js');
|
|
7
7
|
require('./chunk-XDVT3GOM.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkDQ65ZVHNjs = require('./chunk-DQ65ZVHN.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -28,10 +28,11 @@ var _chunkHRWUQJ4Kjs = require('./chunk-HRWUQJ4K.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkRYW4HPSMjs = require('./chunk-RYW4HPSM.js');
|
|
32
|
+
require('./chunk-Q2E4E4FJ.js');
|
|
32
33
|
require('./chunk-XNYIZMNQ.js');
|
|
33
34
|
require('./chunk-7P5AA3SN.js');
|
|
34
|
-
require('./chunk-
|
|
35
|
+
require('./chunk-IZ74ABSX.js');
|
|
35
36
|
require('./chunk-OG64RBAC.js');
|
|
36
37
|
require('./chunk-COGTRVWW.js');
|
|
37
38
|
|
|
@@ -47,7 +48,7 @@ var _fs = require('fs');
|
|
|
47
48
|
var _path = require('path');
|
|
48
49
|
function pendingOrgCreatePath(baseUrl, accountId, sourceOrgId, name) {
|
|
49
50
|
const intent = _crypto.createHash.call(void 0, "sha256").update(accountId).update("\0").update(sourceOrgId).update("\0").update(name).digest("hex");
|
|
50
|
-
return _path.join.call(void 0,
|
|
51
|
+
return _path.join.call(void 0, _chunkRYW4HPSMjs.sdkCliStateDirPath.call(void 0, baseUrl), `pending-org-create-${intent}.json`);
|
|
51
52
|
}
|
|
52
53
|
function readPendingOrgCreate(path, accountId, sourceOrgId, name) {
|
|
53
54
|
let value;
|
|
@@ -66,7 +67,7 @@ function readPendingOrgCreate(path, accountId, sourceOrgId, name) {
|
|
|
66
67
|
return value;
|
|
67
68
|
}
|
|
68
69
|
function loadOrCreatePendingOrgCreate(input) {
|
|
69
|
-
const stateDir =
|
|
70
|
+
const stateDir = _chunkRYW4HPSMjs.sdkCliStateDirPath.call(void 0, input.baseUrl);
|
|
70
71
|
const path = pendingOrgCreatePath(
|
|
71
72
|
input.baseUrl,
|
|
72
73
|
input.accountId,
|
|
@@ -151,11 +152,11 @@ function processEnvValue(name) {
|
|
|
151
152
|
}
|
|
152
153
|
function organizationAuthValues(input) {
|
|
153
154
|
return {
|
|
154
|
-
[
|
|
155
|
-
[
|
|
156
|
-
[
|
|
157
|
-
[
|
|
158
|
-
...
|
|
155
|
+
[_chunkRYW4HPSMjs.HOST_URL_ENV]: input.baseUrl,
|
|
156
|
+
[_chunkRYW4HPSMjs.API_KEY_ENV]: input.apiKey,
|
|
157
|
+
[_chunkRYW4HPSMjs.ACTIVE_ORG_ID_ENV]: input.orgId,
|
|
158
|
+
[_chunkRYW4HPSMjs.ACTIVE_ORG_NAME_ENV]: input.orgName,
|
|
159
|
+
..._chunkRYW4HPSMjs.featureEnvValues.call(void 0, input)
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
162
|
function organizationCommandContext(input) {
|
|
@@ -169,14 +170,14 @@ function organizationCommandContext(input) {
|
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
172
|
function agentCommandContext(commandContext) {
|
|
172
|
-
return
|
|
173
|
+
return _chunkRYW4HPSMjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? { command_context: commandContext } : {};
|
|
173
174
|
}
|
|
174
175
|
function resolveOrgSwitchAuthTarget(scope, config) {
|
|
175
|
-
const activeProject =
|
|
176
|
+
const activeProject = _chunkRYW4HPSMjs.getResolvedProjectAuthSource.call(void 0,
|
|
176
177
|
config.baseUrl,
|
|
177
178
|
config.apiKey
|
|
178
179
|
);
|
|
179
|
-
const folderTarget =
|
|
180
|
+
const folderTarget = _chunkRYW4HPSMjs.resolveProjectPinTarget.call(void 0, );
|
|
180
181
|
const globalOverrideWarning = activeProject && scope === "global" ? [
|
|
181
182
|
`Folder auth in ${activeProject.filePath} overrides global auth for commands run here.`
|
|
182
183
|
] : [];
|
|
@@ -248,10 +249,10 @@ function resolveOrgSwitchAuthTarget(scope, config) {
|
|
|
248
249
|
};
|
|
249
250
|
}
|
|
250
251
|
async function handleOrgList(options) {
|
|
251
|
-
const config =
|
|
252
|
-
const http = new (0,
|
|
252
|
+
const config = _chunkRYW4HPSMjs.resolveConfig.call(void 0, );
|
|
253
|
+
const http = new (0, _chunkRYW4HPSMjs.HttpClient)(config);
|
|
253
254
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
254
|
-
|
|
255
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
255
256
|
{
|
|
256
257
|
...payload,
|
|
257
258
|
render: {
|
|
@@ -267,22 +268,22 @@ async function handleOrgList(options) {
|
|
|
267
268
|
);
|
|
268
269
|
}
|
|
269
270
|
async function handleOrgStatus(options) {
|
|
270
|
-
const config =
|
|
271
|
-
const http = new (0,
|
|
271
|
+
const config = _chunkRYW4HPSMjs.resolveConfig.call(void 0, );
|
|
272
|
+
const http = new (0, _chunkRYW4HPSMjs.HttpClient)(config);
|
|
272
273
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
273
274
|
const current = _nullishCoalesce(_nullishCoalesce(payload.organizations.find((org) => org.is_current), () => ( payload.organizations.find(
|
|
274
275
|
(org) => org.org_id === payload.current_org_id
|
|
275
276
|
))), () => ( null));
|
|
276
|
-
const projectCandidate =
|
|
277
|
-
const activeProject =
|
|
277
|
+
const projectCandidate = _chunkRYW4HPSMjs.getActiveProjectAuthSource.call(void 0, );
|
|
278
|
+
const activeProject = _chunkRYW4HPSMjs.getResolvedProjectAuthSource.call(void 0,
|
|
278
279
|
config.baseUrl,
|
|
279
280
|
config.apiKey
|
|
280
281
|
);
|
|
281
|
-
const folderTarget =
|
|
282
|
-
const provenance =
|
|
283
|
-
const hostPath =
|
|
284
|
-
const envApiKey = processEnvValue(
|
|
285
|
-
const envHostUrl = processEnvValue(
|
|
282
|
+
const folderTarget = _chunkRYW4HPSMjs.resolveProjectPinTarget.call(void 0, );
|
|
283
|
+
const provenance = _chunkRYW4HPSMjs.resolveCliAuthProvenance.call(void 0, config);
|
|
284
|
+
const hostPath = _chunkRYW4HPSMjs.hostEnvFilePath.call(void 0, config.baseUrl);
|
|
285
|
+
const envApiKey = processEnvValue(_chunkRYW4HPSMjs.API_KEY_ENV);
|
|
286
|
+
const envHostUrl = processEnvValue(_chunkRYW4HPSMjs.HOST_URL_ENV);
|
|
286
287
|
const authSource = envApiKey ? {
|
|
287
288
|
scope: "env",
|
|
288
289
|
source: "process",
|
|
@@ -323,17 +324,17 @@ async function handleOrgStatus(options) {
|
|
|
323
324
|
if (authSource.path) {
|
|
324
325
|
lines.push(`Auth file: ${authSource.path}`);
|
|
325
326
|
} else {
|
|
326
|
-
lines.push(`Auth source: ${
|
|
327
|
+
lines.push(`Auth source: ${_chunkRYW4HPSMjs.API_KEY_ENV} process environment`);
|
|
327
328
|
}
|
|
328
329
|
if (envApiKey) {
|
|
329
|
-
lines.push(`${
|
|
330
|
+
lines.push(`${_chunkRYW4HPSMjs.API_KEY_ENV} overrides saved auth for this process.`);
|
|
330
331
|
} else if (activeProject) {
|
|
331
332
|
lines.push("Global auth is overridden in this folder.");
|
|
332
333
|
} else if (provenance.scope === "global" && provenance.project.state === "project") {
|
|
333
334
|
lines.push("Cloud mutations are blocked until this project is pinned.");
|
|
334
335
|
lines.push("Pin it: deepline org set --auth-scope folder");
|
|
335
336
|
}
|
|
336
|
-
|
|
337
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
337
338
|
{
|
|
338
339
|
ok: true,
|
|
339
340
|
host: config.baseUrl,
|
|
@@ -367,25 +368,25 @@ async function handleOrgStatus(options) {
|
|
|
367
368
|
}
|
|
368
369
|
async function handleOrgSwitch(selection, options) {
|
|
369
370
|
const authScope = normalizeAuthScope(options.authScope);
|
|
370
|
-
const config =
|
|
371
|
-
const provenance =
|
|
371
|
+
const config = _chunkRYW4HPSMjs.resolveConfig.call(void 0, );
|
|
372
|
+
const provenance = _chunkRYW4HPSMjs.resolveCliAuthProvenance.call(void 0, config);
|
|
372
373
|
if (!selection && !options.orgId && authScope === "folder" && provenance.scope === "global" && provenance.project.state === "project") {
|
|
373
|
-
const commandContext =
|
|
374
|
+
const commandContext = _chunkRYW4HPSMjs.resolveCliCommandContext.call(void 0, config);
|
|
374
375
|
const activeOrganization = commandContext.active_organization;
|
|
375
|
-
const pinnedFeatures =
|
|
376
|
-
const project_env_paths2 =
|
|
376
|
+
const pinnedFeatures = _chunkRYW4HPSMjs.storedHostFeatures.call(void 0, config.baseUrl);
|
|
377
|
+
const project_env_paths2 = _chunkRYW4HPSMjs.saveProjectDeeplineEnvValues.call(void 0,
|
|
377
378
|
{
|
|
378
|
-
[
|
|
379
|
-
[
|
|
379
|
+
[_chunkRYW4HPSMjs.HOST_URL_ENV]: config.baseUrl,
|
|
380
|
+
[_chunkRYW4HPSMjs.API_KEY_ENV]: config.apiKey,
|
|
380
381
|
...activeOrganization ? {
|
|
381
|
-
[
|
|
382
|
-
[
|
|
382
|
+
[_chunkRYW4HPSMjs.ACTIVE_ORG_ID_ENV]: activeOrganization.org_id,
|
|
383
|
+
[_chunkRYW4HPSMjs.ACTIVE_ORG_NAME_ENV]: _nullishCoalesce(activeOrganization.org_name, () => ( ""))
|
|
383
384
|
} : {},
|
|
384
|
-
...pinnedFeatures !== void 0 ? { [
|
|
385
|
+
...pinnedFeatures !== void 0 ? { [_chunkRYW4HPSMjs.FEATURES_ENV]: pinnedFeatures } : {}
|
|
385
386
|
},
|
|
386
387
|
provenance.project.dir
|
|
387
388
|
);
|
|
388
|
-
|
|
389
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
389
390
|
{
|
|
390
391
|
ok: true,
|
|
391
392
|
unchanged: true,
|
|
@@ -397,7 +398,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
397
398
|
orgId: activeOrganization.org_id,
|
|
398
399
|
orgName: activeOrganization.org_name,
|
|
399
400
|
authScope: "folder"
|
|
400
|
-
}) :
|
|
401
|
+
}) : _chunkRYW4HPSMjs.resolveCliCommandContext.call(void 0, config, "folder")
|
|
401
402
|
),
|
|
402
403
|
project_env_paths: project_env_paths2,
|
|
403
404
|
next: { status: "deepline org status" },
|
|
@@ -418,10 +419,10 @@ async function handleOrgSwitch(selection, options) {
|
|
|
418
419
|
);
|
|
419
420
|
return;
|
|
420
421
|
}
|
|
421
|
-
const http = new (0,
|
|
422
|
+
const http = new (0, _chunkRYW4HPSMjs.HttpClient)(config);
|
|
422
423
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
423
424
|
if (!selection && !options.orgId) {
|
|
424
|
-
|
|
425
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
425
426
|
{
|
|
426
427
|
...payload,
|
|
427
428
|
next: { set: "deepline org set <number>" },
|
|
@@ -472,9 +473,9 @@ async function handleOrgSwitch(selection, options) {
|
|
|
472
473
|
features
|
|
473
474
|
});
|
|
474
475
|
if (authTarget.kind === "folder") {
|
|
475
|
-
project_env_paths2 =
|
|
476
|
+
project_env_paths2 = _chunkRYW4HPSMjs.saveProjectDeeplineEnvValues.call(void 0, authValues2);
|
|
476
477
|
} else {
|
|
477
|
-
|
|
478
|
+
_chunkRYW4HPSMjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues2);
|
|
478
479
|
}
|
|
479
480
|
const renderLines2 = [`Already on ${target.name}.`];
|
|
480
481
|
for (const projectPath of project_env_paths2) {
|
|
@@ -482,7 +483,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
482
483
|
}
|
|
483
484
|
if (authTarget.kind === "global") {
|
|
484
485
|
renderLines2.push(
|
|
485
|
-
`Saved global auth in ${
|
|
486
|
+
`Saved global auth in ${_chunkRYW4HPSMjs.hostEnvFilePath.call(void 0, config.baseUrl)}`
|
|
486
487
|
);
|
|
487
488
|
}
|
|
488
489
|
renderLines2.push(
|
|
@@ -498,7 +499,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
498
499
|
...options.deprecatedSwitch ? ["org switch is deprecated; use org set."] : [],
|
|
499
500
|
...authTarget.warnings
|
|
500
501
|
];
|
|
501
|
-
|
|
502
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
502
503
|
{
|
|
503
504
|
ok: true,
|
|
504
505
|
unchanged: true,
|
|
@@ -514,7 +515,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
514
515
|
authScope: authTarget.effective_scope
|
|
515
516
|
})
|
|
516
517
|
),
|
|
517
|
-
host_env_path: authTarget.kind === "global" ?
|
|
518
|
+
host_env_path: authTarget.kind === "global" ? _chunkRYW4HPSMjs.hostEnvFilePath.call(void 0, config.baseUrl) : null,
|
|
518
519
|
project_env_paths: project_env_paths2,
|
|
519
520
|
deprecated_command: options.deprecatedSwitch ? "org switch" : null,
|
|
520
521
|
replacement_command: options.deprecatedSwitch ? "deepline org set" : null,
|
|
@@ -540,9 +541,9 @@ async function handleOrgSwitch(selection, options) {
|
|
|
540
541
|
features: switched.features
|
|
541
542
|
});
|
|
542
543
|
if (authTarget.kind === "folder") {
|
|
543
|
-
project_env_paths =
|
|
544
|
+
project_env_paths = _chunkRYW4HPSMjs.saveProjectDeeplineEnvValues.call(void 0, authValues);
|
|
544
545
|
} else {
|
|
545
|
-
|
|
546
|
+
_chunkRYW4HPSMjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues);
|
|
546
547
|
}
|
|
547
548
|
const { api_key: _apiKey, ...publicSwitched } = switched;
|
|
548
549
|
const renderLines = [`Switched to ${switched.org_name}.`];
|
|
@@ -551,7 +552,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
551
552
|
renderLines.push(`Saved folder auth in ${projectPath}`);
|
|
552
553
|
}
|
|
553
554
|
} else {
|
|
554
|
-
renderLines.push(`Saved global auth in ${
|
|
555
|
+
renderLines.push(`Saved global auth in ${_chunkRYW4HPSMjs.hostEnvFilePath.call(void 0, config.baseUrl)}`);
|
|
555
556
|
}
|
|
556
557
|
renderLines.push(
|
|
557
558
|
`Scope: ${authTarget.requested_scope} -> ${authTarget.effective_scope} (${authTarget.reason})`
|
|
@@ -566,10 +567,10 @@ async function handleOrgSwitch(selection, options) {
|
|
|
566
567
|
...options.deprecatedSwitch ? ["org switch is deprecated; use org set."] : [],
|
|
567
568
|
...authTarget.warnings
|
|
568
569
|
];
|
|
569
|
-
|
|
570
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
570
571
|
{
|
|
571
572
|
ok: true,
|
|
572
|
-
host_env_path: authTarget.kind === "global" ?
|
|
573
|
+
host_env_path: authTarget.kind === "global" ? _chunkRYW4HPSMjs.hostEnvFilePath.call(void 0, config.baseUrl) : null,
|
|
573
574
|
project_env_paths,
|
|
574
575
|
...publicSwitched,
|
|
575
576
|
api_key_saved: true,
|
|
@@ -600,12 +601,12 @@ async function handleOrgSwitch(selection, options) {
|
|
|
600
601
|
);
|
|
601
602
|
}
|
|
602
603
|
async function handleOrgCreate(name, options) {
|
|
603
|
-
const config =
|
|
604
|
+
const config = _chunkRYW4HPSMjs.resolveConfig.call(void 0, );
|
|
604
605
|
const normalizedName = name.trim();
|
|
605
606
|
if (!normalizedName) {
|
|
606
607
|
throw new Error("Workspace name is required.");
|
|
607
608
|
}
|
|
608
|
-
const http = new (0,
|
|
609
|
+
const http = new (0, _chunkRYW4HPSMjs.HttpClient)(config);
|
|
609
610
|
const identity = await fetchWorkspaceCreationIdentity(http, config.apiKey);
|
|
610
611
|
let created;
|
|
611
612
|
let workspaceApiKey;
|
|
@@ -631,7 +632,7 @@ async function handleOrgCreate(name, options) {
|
|
|
631
632
|
sourceOrgId: identity.orgId,
|
|
632
633
|
name: normalizedName
|
|
633
634
|
});
|
|
634
|
-
const workspace = await new (0,
|
|
635
|
+
const workspace = await new (0, _chunkUVXBVUZQjs.DeeplineClient)({
|
|
635
636
|
apiKey: config.apiKey,
|
|
636
637
|
baseUrl: config.baseUrl
|
|
637
638
|
}).workspaces.create({
|
|
@@ -654,16 +655,16 @@ async function handleOrgCreate(name, options) {
|
|
|
654
655
|
orgName: created.org_name,
|
|
655
656
|
features: workspaceFeatures
|
|
656
657
|
});
|
|
657
|
-
|
|
658
|
+
_chunkRYW4HPSMjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues);
|
|
658
659
|
if (pendingIntentPath) _fs.unlinkSync.call(void 0, pendingIntentPath);
|
|
659
|
-
|
|
660
|
+
_chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
660
661
|
{
|
|
661
662
|
ok: true,
|
|
662
663
|
...created,
|
|
663
664
|
initial_credits: typeof created.initial_credits === "number" ? created.initial_credits : 0,
|
|
664
665
|
api_key_saved: true,
|
|
665
666
|
switched: true,
|
|
666
|
-
host_env_path:
|
|
667
|
+
host_env_path: _chunkRYW4HPSMjs.hostEnvFilePath.call(void 0, config.baseUrl),
|
|
667
668
|
...agentCommandContext(
|
|
668
669
|
organizationCommandContext({
|
|
669
670
|
orgId: created.org_id,
|
|
@@ -678,7 +679,7 @@ async function handleOrgCreate(name, options) {
|
|
|
678
679
|
lines: [
|
|
679
680
|
`Created organization: ${created.org_name}.`,
|
|
680
681
|
`Switched to ${created.org_name}.`,
|
|
681
|
-
`Saved host auth in ${
|
|
682
|
+
`Saved host auth in ${_chunkRYW4HPSMjs.hostEnvFilePath.call(void 0, config.baseUrl)}`
|
|
682
683
|
]
|
|
683
684
|
}
|
|
684
685
|
]
|
|
@@ -730,7 +731,7 @@ Examples:
|
|
|
730
731
|
);
|
|
731
732
|
const sso = org.command("sso").description("Manage Enterprise workspace SSO.");
|
|
732
733
|
const ssoPath = "/api/v2/auth/workspace/sso";
|
|
733
|
-
const printSso = (payload, json) =>
|
|
734
|
+
const printSso = (payload, json) => _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
|
|
734
735
|
{
|
|
735
736
|
...payload,
|
|
736
737
|
render: {
|
|
@@ -754,7 +755,7 @@ Examples:
|
|
|
754
755
|
},
|
|
755
756
|
{ json }
|
|
756
757
|
);
|
|
757
|
-
const ssoHttp = () => new (0,
|
|
758
|
+
const ssoHttp = () => new (0, _chunkRYW4HPSMjs.HttpClient)(_chunkRYW4HPSMjs.resolveConfig.call(void 0, ));
|
|
758
759
|
sso.command("status").description("Show this workspace's SSO connection and plan eligibility.").option("--json", "Emit JSON output").action(async (options) => {
|
|
759
760
|
printSso(await ssoHttp().get(ssoPath), options.json);
|
|
760
761
|
});
|
|
@@ -785,8 +786,8 @@ Examples:
|
|
|
785
786
|
"Identity provider metadata XML file"
|
|
786
787
|
).option("--json", "Emit JSON output").action(
|
|
787
788
|
async (options) => {
|
|
788
|
-
const config =
|
|
789
|
-
const http = new (0,
|
|
789
|
+
const config = _chunkRYW4HPSMjs.resolveConfig.call(void 0, );
|
|
790
|
+
const http = new (0, _chunkRYW4HPSMjs.HttpClient)(config);
|
|
790
791
|
const identity = await fetchWorkspaceCreationIdentity(
|
|
791
792
|
http,
|
|
792
793
|
config.apiKey
|