deepline 0.3.522 → 0.3.524
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +178 -60
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +60 -14
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +9 -3
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +406 -40
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/db-session-renewal.ts +209 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +16 -6
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +388 -13
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +38 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +92 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +96 -25
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +139 -17
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +26 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +145 -5
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +190 -10
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +85 -5
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +21 -11
- package/dist/cli/auth-OKPHHMMP.js +43 -0
- package/dist/cli/{auth-YIBY5IKT.mjs → auth-QXJMVLPN.mjs} +5 -5
- package/dist/cli/{billing-UDKL53GI.js → billing-N5R4HTHT.js} +82 -82
- package/dist/cli/{billing-G3IX3SNY.mjs → billing-SNSIFM4B.mjs} +7 -7
- package/dist/cli/{chunk-EJBW7Y6Z.js → chunk-2ZWNIS54.js} +108 -96
- package/dist/cli/{chunk-3KMGVOBM.mjs → chunk-2ZX7XSAQ.mjs} +4 -4
- package/dist/cli/{chunk-4TUMKJZX.mjs → chunk-3WWTBQHC.mjs} +2 -2
- package/dist/cli/{chunk-MD524MRB.mjs → chunk-536TGWR6.mjs} +1 -1
- package/dist/cli/{chunk-37SXIFIU.js → chunk-66N76YZG.js} +44 -44
- package/dist/cli/{chunk-BZY335JP.js → chunk-7E6B7VMS.js} +5 -5
- package/dist/cli/{chunk-HYR34KFA.js → chunk-7OQGZBDG.js} +109 -24
- package/dist/cli/{chunk-GVKW3LCA.js → chunk-7QM6DNR4.js} +11 -11
- package/dist/cli/{chunk-DNJJ3ULJ.js → chunk-ANKD3AIR.js} +2 -2
- package/dist/cli/{chunk-4DFWDA2Q.js → chunk-ATATJNJ6.js} +9 -9
- package/dist/cli/{chunk-ZZ7U4YJS.mjs → chunk-BXIQD2IY.mjs} +1 -1
- package/dist/cli/{chunk-XT25FX6T.js → chunk-BXVYVIMB.js} +3 -3
- package/dist/cli/{chunk-XR6TN5DT.mjs → chunk-CH7JVSA7.mjs} +6 -6
- package/dist/cli/{chunk-RKE5YTHY.mjs → chunk-EO55Y4QW.mjs} +5 -5
- package/dist/cli/{chunk-RI672VNY.js → chunk-EQNAQENZ.js} +2 -2
- package/dist/cli/{chunk-LFSOBW7E.mjs → chunk-FXTV5B3D.mjs} +22 -10
- package/dist/cli/{chunk-C6WGMODR.mjs → chunk-GMO3JDZA.mjs} +2 -2
- package/dist/cli/{chunk-DRDZBRXV.js → chunk-GTGJBZVH.js} +7 -7
- package/dist/cli/{chunk-SFMCKB57.mjs → chunk-HLAFGQPV.mjs} +76 -34
- package/dist/cli/{chunk-534YYHIF.js → chunk-HTYT2OHB.js} +6 -6
- package/dist/cli/{chunk-ZZLZCO6Y.js → chunk-I75VRGQG.js} +22 -22
- package/dist/cli/{chunk-Y3LDRCMB.mjs → chunk-II3BJKCH.mjs} +2 -2
- package/dist/cli/{chunk-5BQPEHEP.js → chunk-JDIQBZ6O.js} +14 -14
- package/dist/cli/{chunk-ENWJFUWK.mjs → chunk-KKPBCB6D.mjs} +2 -2
- package/dist/cli/{chunk-BONXEWYF.mjs → chunk-KSQXBLRW.mjs} +3 -3
- package/dist/cli/{chunk-7JEN3FX4.js → chunk-LRWDZDBS.js} +5 -5
- package/dist/cli/{chunk-5477PEHL.mjs → chunk-MW3YMPD2.mjs} +1 -1
- package/dist/cli/{chunk-VFCVH2LV.mjs → chunk-NUC7ZVDG.mjs} +5 -5
- package/dist/cli/{chunk-DLDWAPA5.js → chunk-OCT4SUJA.js} +4 -4
- package/dist/cli/{chunk-FQQAAR3Q.mjs → chunk-OQ5G7RFQ.mjs} +1 -1
- package/dist/cli/{chunk-VIM6I7RC.js → chunk-PFKKZVFK.js} +41 -41
- package/dist/cli/{chunk-OAQIVJFY.mjs → chunk-PFKWKWUJ.mjs} +2 -2
- package/dist/cli/{chunk-52MHE7B4.mjs → chunk-R457IMHJ.mjs} +1 -1
- package/dist/cli/{chunk-UV6XCHOZ.mjs → chunk-RIX26ZJD.mjs} +1 -1
- package/dist/cli/{chunk-RDJTCW3I.mjs → chunk-RTDX5NNN.mjs} +3 -3
- package/dist/cli/{chunk-FNHUDCJE.js → chunk-RUULUCBP.js} +10 -10
- package/dist/cli/{chunk-GMYDVW7Z.js → chunk-SF4QJVBE.js} +3 -3
- package/dist/cli/{chunk-DARD7TJ7.js → chunk-SMWFOGUT.js} +53 -53
- package/dist/cli/{chunk-XXY4E57R.mjs → chunk-T43FF5PF.mjs} +2 -2
- package/dist/cli/{chunk-ZUAKRBZB.js → chunk-TZTWH53O.js} +1 -1
- package/dist/cli/{chunk-7J5PLHII.mjs → chunk-V2YIBBVT.mjs} +1 -1
- package/dist/cli/{chunk-6SJPZV5E.js → chunk-V4RJ57MA.js} +2 -2
- package/dist/cli/{chunk-4MF44THR.js → chunk-V7KUBDEB.js} +82 -40
- package/dist/cli/{chunk-ISUUSSS4.js → chunk-VHTVXS5A.js} +16 -16
- package/dist/cli/{chunk-NDNG3MAT.mjs → chunk-WCVIPZWX.mjs} +5 -5
- package/dist/cli/{chunk-F5D623KO.js → chunk-WOEPDSO3.js} +26 -26
- package/dist/cli/{chunk-VE6FHVXZ.mjs → chunk-XURWFEXM.mjs} +109 -24
- package/dist/cli/{chunk-G65FJ5JX.mjs → chunk-YCIXY66B.mjs} +2 -2
- package/dist/cli/{chunk-CFXERH7F.mjs → chunk-YGOI5ZE5.mjs} +1 -1
- package/dist/cli/{chunk-PDLRUZ42.mjs → chunk-YKFW3NNA.mjs} +5 -5
- package/dist/cli/{chunk-5H22VJPE.js → chunk-YXVYPYIP.js} +6 -6
- package/dist/cli/{chunk-KMBF3N2Z.js → chunk-Z4MOEQSY.js} +16 -16
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-PE35WGRO.mjs → csv-HT2JBCW2.mjs} +4 -4
- package/dist/cli/{csv-3HIE4VCO.js → csv-Q2LWKXAV.js} +13 -13
- package/dist/cli/{db-L7ZMMQKW.mjs → db-CS3XQ2LX.mjs} +6 -6
- package/dist/cli/{db-O2YRTTDO.js → db-XEV4WEE4.js} +27 -27
- package/dist/cli/describe-5G5NXO5E.js +50 -0
- package/dist/cli/{describe-NI324Y2M.mjs → describe-OUTXLDGZ.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-VH4DKLFI.js → executions-JCC34WAD.js} +8 -8
- package/dist/cli/{executions-T6KU2OKK.mjs → executions-L6XFG5MP.mjs} +6 -6
- package/dist/cli/{feedback-SCSJC3FX.mjs → feedback-AWBDO5I6.mjs} +5 -5
- package/dist/cli/{feedback-ZLC6G5OK.js → feedback-HV2M2G7N.js} +10 -10
- package/dist/cli/git-GDPTG52F.js +25 -0
- package/dist/cli/{git-I4LVQCID.mjs → git-S4LRXTRX.mjs} +5 -5
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{legacy-noops-44FQ2256.mjs → legacy-noops-7MOKBL4O.mjs} +6 -6
- package/dist/cli/{legacy-noops-UPFWEHPG.js → legacy-noops-RGSZUD6V.js} +9 -9
- package/dist/cli/{monitors-JN6IQGK6.js → monitors-JEFM2C5W.js} +100 -100
- package/dist/cli/{monitors-LMSASWXE.mjs → monitors-XQNXDZPQ.mjs} +7 -7
- package/dist/cli/{org-F7O3ZU5O.js → org-GYLA5V32.js} +235 -72
- package/dist/cli/{org-QYLVEE7A.mjs → org-KTMJZGTN.mjs} +169 -6
- package/dist/cli/{pages-KEL3Y4L4.js → pages-RY4U7OCL.js} +18 -18
- package/dist/cli/{pages-5XE4LBZN.mjs → pages-WOMU2T2O.mjs} +6 -6
- package/dist/cli/{play-OURHH6KV.js → play-2Q6MWJ3D.js} +363 -323
- package/dist/cli/{play-MWQG3G32.mjs → play-KOYGGNYS.mjs} +64 -24
- package/dist/cli/{providers-IQY7LUBB.mjs → providers-7YKDITJC.mjs} +6 -6
- package/dist/cli/{providers-ZCBWPE3C.js → providers-HOIRHMN2.js} +9 -9
- package/dist/cli/{quickstart-O53OXTN6.js → quickstart-OWCJOSQA.js} +6 -6
- package/dist/cli/{quickstart-L45NGRMI.mjs → quickstart-RDXHSMVX.mjs} +4 -4
- package/dist/cli/{run-W745Z3Z5.js → run-MT2ABKO5.js} +41 -41
- package/dist/cli/{run-VCSIWLEU.mjs → run-RT73NDP5.mjs} +23 -23
- package/dist/cli/search-7VBA6IGS.js +33 -0
- package/dist/cli/{search-THELKULN.mjs → search-CJPKIGSA.mjs} +8 -8
- package/dist/cli/{search-output-N7MJLYYD.mjs → search-output-AREMA544.mjs} +4 -4
- package/dist/cli/{search-output-SJW7LEOM.js → search-output-OSBZ7WK6.js} +6 -6
- package/dist/cli/{secrets-44ST3FJH.mjs → secrets-BTIY2FEJ.mjs} +6 -6
- package/dist/cli/{secrets-GDXPX3KB.js → secrets-OV6KH633.js} +15 -15
- package/dist/cli/{sessions-LYCBI77S.mjs → sessions-3CO3ZFOD.mjs} +6 -6
- package/dist/cli/sessions-B3WNEWRW.js +18 -0
- package/dist/cli/{settings-GXPDMJFG.mjs → settings-7BQIC7QN.mjs} +13 -13
- package/dist/cli/{settings-3WOFF642.js → settings-LBIECYDB.js} +86 -86
- package/dist/cli/{setup-YHLMBJP4.js → setup-QZE7QR3F.js} +50 -50
- package/dist/cli/{setup-YM6JEB64.mjs → setup-XPTSNNES.mjs} +10 -10
- package/dist/cli/{skills-WX4XWEAT.mjs → skills-TGGKIQLT.mjs} +8 -8
- package/dist/cli/skills-TXBRTWEV.js +37 -0
- package/dist/cli/{tools-K24VSQ7S.mjs → tools-MKIFX2TQ.mjs} +17 -17
- package/dist/cli/tools-RZJV4X3J.js +57 -0
- package/dist/cli/{update-PSSCF5AT.mjs → update-5R3D3WNH.mjs} +10 -10
- package/dist/cli/update-YWGGPWUA.js +35 -0
- package/dist/cli/{artifacts-RY2MK74N.mjs → views-VHKDHHUP.mjs} +76 -76
- package/dist/cli/views-VPWEINIA.js +270 -0
- package/dist/cli/{workflow-FPVI3NIA.js → workflow-7K2VEQ4V.js} +17 -17
- package/dist/cli/{workflow-DGOPYATO.mjs → workflow-D5DF65N6.mjs} +7 -7
- package/dist/{client-DA71-2_u.d.mts → client-C5_6W8yd.d.mts} +1 -1
- package/dist/{client-core-C0IzDKMJ.d.ts → client-core-B-GPfmaC.d.ts} +121 -44
- package/dist/{client-core-BXbds1cb.d.mts → client-core-Dob428Z4.d.mts} +121 -44
- package/dist/{client-B-2Am2y6.d.ts → client-iXW4TOat.d.ts} +1 -1
- package/dist/{compiler-manifest-B4mIIbw7.d.mts → compiler-manifest-DsxsQP-T.d.mts} +14 -7
- package/dist/{compiler-manifest-B4mIIbw7.d.ts → compiler-manifest-DsxsQP-T.d.ts} +14 -7
- package/dist/{errors-Gj9i5Rkd.d.ts → errors-Bk5h1D-C.d.ts} +1 -1
- package/dist/{errors-C2F4qzAq.d.mts → errors-qdJUVQ3g.d.mts} +1 -1
- package/dist/{index-5JZBufdF.d.mts → index-PaupwX1B.d.mts} +1 -1
- package/dist/{index-BXtSj8bv.d.ts → index-bL66eHYz.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +117 -116
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +7 -5
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/artifacts-GIZZH5VA.js +0 -270
- package/dist/cli/auth-JSES2JOQ.js +0 -43
- package/dist/cli/describe-EB336DAO.js +0 -50
- package/dist/cli/git-23T7TXAH.js +0 -25
- package/dist/cli/search-R6K7ZAMU.js +0 -33
- package/dist/cli/sessions-2V5ZFOWL.js +0 -18
- package/dist/cli/skills-XNGADDO6.js +0 -37
- package/dist/cli/tools-ROUMCB7B.js +0 -57
- package/dist/cli/update-RXURGIRW.js +0 -35
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./chunk-EXMLR72R.mjs";
|
|
2
2
|
import {
|
|
3
3
|
DeeplineClient
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-YCIXY66B.mjs";
|
|
5
|
+
import "./chunk-HLAFGQPV.mjs";
|
|
6
6
|
import "./chunk-L2VKAASU.mjs";
|
|
7
7
|
import "./chunk-FKD3KL5Q.mjs";
|
|
8
8
|
import "./chunk-S3A4IXBQ.mjs";
|
|
@@ -17,15 +17,15 @@ import {
|
|
|
17
17
|
} from "./chunk-MI6ZP7XI.mjs";
|
|
18
18
|
import {
|
|
19
19
|
createCliProgress
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BXIQD2IY.mjs";
|
|
21
21
|
import {
|
|
22
22
|
errorToJsonPayload,
|
|
23
23
|
printCommandEnvelope,
|
|
24
24
|
printJson,
|
|
25
25
|
shouldEmitJson
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-3WWTBQHC.mjs";
|
|
27
|
+
import "./chunk-MW3YMPD2.mjs";
|
|
28
|
+
import "./chunk-OQ5G7RFQ.mjs";
|
|
29
29
|
import {
|
|
30
30
|
AuthError
|
|
31
31
|
} from "./chunk-QNHHZ63P.mjs";
|
|
@@ -33,7 +33,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-ZPGGW27Q.mjs";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-RIX26ZJD.mjs";
|
|
37
37
|
import "./chunk-WZYKRD7T.mjs";
|
|
38
38
|
import "./chunk-KRD6H754.mjs";
|
|
39
39
|
|
|
@@ -1,14 +1,14 @@
|
|
|
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
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkLRWDZDBSjs = require('./chunk-LRWDZDBS.js');
|
|
4
|
+
require('./chunk-V7KUBDEB.js');
|
|
5
5
|
require('./chunk-E4CABWXL.js');
|
|
6
6
|
require('./chunk-2KHUFWTK.js');
|
|
7
7
|
require('./chunk-NMU3VR5U.js');
|
|
8
8
|
require('./chunk-XDVT3GOM.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkGTGJBZVHjs = require('./chunk-GTGJBZVH.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -28,14 +28,14 @@ var _chunkDRDZBRXVjs = require('./chunk-DRDZBRXV.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkSF4QJVBEjs = require('./chunk-SF4QJVBE.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkOCT4SUJAjs = require('./chunk-OCT4SUJA.js');
|
|
35
35
|
require('./chunk-T2N3B7IQ.js');
|
|
36
36
|
require('./chunk-XNYIZMNQ.js');
|
|
37
37
|
require('./chunk-SQWET4SL.js');
|
|
38
|
-
require('./chunk-
|
|
38
|
+
require('./chunk-TZTWH53O.js');
|
|
39
39
|
require('./chunk-OG64RBAC.js');
|
|
40
40
|
require('./chunk-COGTRVWW.js');
|
|
41
41
|
|
|
@@ -51,7 +51,7 @@ var _fs = require('fs');
|
|
|
51
51
|
var _path = require('path');
|
|
52
52
|
function pendingOrgCreatePath(baseUrl, accountId, sourceOrgId, name) {
|
|
53
53
|
const intent = _crypto.createHash.call(void 0, "sha256").update(accountId).update("\0").update(sourceOrgId).update("\0").update(name).digest("hex");
|
|
54
|
-
return _path.join.call(void 0,
|
|
54
|
+
return _path.join.call(void 0, _chunkSF4QJVBEjs.sdkCliStateDirPath.call(void 0, baseUrl), `pending-org-create-${intent}.json`);
|
|
55
55
|
}
|
|
56
56
|
function readPendingOrgCreate(path, accountId, sourceOrgId, name) {
|
|
57
57
|
let value;
|
|
@@ -70,7 +70,7 @@ function readPendingOrgCreate(path, accountId, sourceOrgId, name) {
|
|
|
70
70
|
return value;
|
|
71
71
|
}
|
|
72
72
|
function loadOrCreatePendingOrgCreate(input) {
|
|
73
|
-
const stateDir =
|
|
73
|
+
const stateDir = _chunkSF4QJVBEjs.sdkCliStateDirPath.call(void 0, input.baseUrl);
|
|
74
74
|
const path = pendingOrgCreatePath(
|
|
75
75
|
input.baseUrl,
|
|
76
76
|
input.accountId,
|
|
@@ -155,11 +155,11 @@ function processEnvValue(name) {
|
|
|
155
155
|
}
|
|
156
156
|
function organizationAuthValues(input) {
|
|
157
157
|
return {
|
|
158
|
-
[
|
|
159
|
-
[
|
|
160
|
-
[
|
|
161
|
-
[
|
|
162
|
-
...
|
|
158
|
+
[_chunkSF4QJVBEjs.HOST_URL_ENV]: input.baseUrl,
|
|
159
|
+
[_chunkSF4QJVBEjs.API_KEY_ENV]: input.apiKey,
|
|
160
|
+
[_chunkSF4QJVBEjs.ACTIVE_ORG_ID_ENV]: input.orgId,
|
|
161
|
+
[_chunkSF4QJVBEjs.ACTIVE_ORG_NAME_ENV]: input.orgName,
|
|
162
|
+
..._chunkSF4QJVBEjs.featureEnvValues.call(void 0, input)
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
165
|
function organizationCommandContext(input) {
|
|
@@ -173,14 +173,14 @@ function organizationCommandContext(input) {
|
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
function agentCommandContext(commandContext) {
|
|
176
|
-
return
|
|
176
|
+
return _chunkOCT4SUJAjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? { command_context: commandContext } : {};
|
|
177
177
|
}
|
|
178
178
|
function resolveOrgSwitchAuthTarget(scope, config) {
|
|
179
|
-
const activeProject =
|
|
179
|
+
const activeProject = _chunkSF4QJVBEjs.getResolvedProjectAuthSource.call(void 0,
|
|
180
180
|
config.baseUrl,
|
|
181
181
|
config.apiKey
|
|
182
182
|
);
|
|
183
|
-
const folderTarget =
|
|
183
|
+
const folderTarget = _chunkSF4QJVBEjs.resolveProjectPinTarget.call(void 0, );
|
|
184
184
|
const globalOverrideWarning = activeProject && scope === "global" ? [
|
|
185
185
|
`Folder auth in ${activeProject.filePath} overrides global auth for commands run here.`
|
|
186
186
|
] : [];
|
|
@@ -252,10 +252,10 @@ function resolveOrgSwitchAuthTarget(scope, config) {
|
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
async function handleOrgList(options) {
|
|
255
|
-
const config =
|
|
256
|
-
const http = new (0,
|
|
255
|
+
const config = _chunkSF4QJVBEjs.resolveConfig.call(void 0, );
|
|
256
|
+
const http = new (0, _chunkSF4QJVBEjs.HttpClient)(config);
|
|
257
257
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
258
|
-
|
|
258
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
259
259
|
{
|
|
260
260
|
...payload,
|
|
261
261
|
render: {
|
|
@@ -271,22 +271,22 @@ async function handleOrgList(options) {
|
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
async function handleOrgStatus(options) {
|
|
274
|
-
const config =
|
|
275
|
-
const http = new (0,
|
|
274
|
+
const config = _chunkSF4QJVBEjs.resolveConfig.call(void 0, );
|
|
275
|
+
const http = new (0, _chunkSF4QJVBEjs.HttpClient)(config);
|
|
276
276
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
277
277
|
const current = _nullishCoalesce(_nullishCoalesce(payload.organizations.find((org) => org.is_current), () => ( payload.organizations.find(
|
|
278
278
|
(org) => org.org_id === payload.current_org_id
|
|
279
279
|
))), () => ( null));
|
|
280
|
-
const projectCandidate =
|
|
281
|
-
const activeProject =
|
|
280
|
+
const projectCandidate = _chunkSF4QJVBEjs.getActiveProjectAuthSource.call(void 0, );
|
|
281
|
+
const activeProject = _chunkSF4QJVBEjs.getResolvedProjectAuthSource.call(void 0,
|
|
282
282
|
config.baseUrl,
|
|
283
283
|
config.apiKey
|
|
284
284
|
);
|
|
285
|
-
const folderTarget =
|
|
286
|
-
const provenance =
|
|
287
|
-
const hostPath =
|
|
288
|
-
const envApiKey = processEnvValue(
|
|
289
|
-
const envHostUrl = processEnvValue(
|
|
285
|
+
const folderTarget = _chunkSF4QJVBEjs.resolveProjectPinTarget.call(void 0, );
|
|
286
|
+
const provenance = _chunkSF4QJVBEjs.resolveCliAuthProvenance.call(void 0, config);
|
|
287
|
+
const hostPath = _chunkSF4QJVBEjs.hostEnvFilePath.call(void 0, config.baseUrl);
|
|
288
|
+
const envApiKey = processEnvValue(_chunkSF4QJVBEjs.API_KEY_ENV);
|
|
289
|
+
const envHostUrl = processEnvValue(_chunkSF4QJVBEjs.HOST_URL_ENV);
|
|
290
290
|
const authSource = envApiKey ? {
|
|
291
291
|
scope: "env",
|
|
292
292
|
source: "process",
|
|
@@ -327,17 +327,17 @@ async function handleOrgStatus(options) {
|
|
|
327
327
|
if (authSource.path) {
|
|
328
328
|
lines.push(`Auth file: ${authSource.path}`);
|
|
329
329
|
} else {
|
|
330
|
-
lines.push(`Auth source: ${
|
|
330
|
+
lines.push(`Auth source: ${_chunkSF4QJVBEjs.API_KEY_ENV} process environment`);
|
|
331
331
|
}
|
|
332
332
|
if (envApiKey) {
|
|
333
|
-
lines.push(`${
|
|
333
|
+
lines.push(`${_chunkSF4QJVBEjs.API_KEY_ENV} overrides saved auth for this process.`);
|
|
334
334
|
} else if (activeProject) {
|
|
335
335
|
lines.push("Global auth is overridden in this folder.");
|
|
336
336
|
} else if (provenance.scope === "global" && provenance.project.state === "project") {
|
|
337
337
|
lines.push("Cloud mutations are blocked until this project is pinned.");
|
|
338
338
|
lines.push("Pin it: deepline org set --auth-scope folder");
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
341
341
|
{
|
|
342
342
|
ok: true,
|
|
343
343
|
host: config.baseUrl,
|
|
@@ -371,25 +371,25 @@ async function handleOrgStatus(options) {
|
|
|
371
371
|
}
|
|
372
372
|
async function handleOrgSwitch(selection, options) {
|
|
373
373
|
const authScope = normalizeAuthScope(options.authScope);
|
|
374
|
-
const config =
|
|
375
|
-
const provenance =
|
|
374
|
+
const config = _chunkSF4QJVBEjs.resolveConfig.call(void 0, );
|
|
375
|
+
const provenance = _chunkSF4QJVBEjs.resolveCliAuthProvenance.call(void 0, config);
|
|
376
376
|
if (!selection && !options.orgId && authScope === "folder" && provenance.scope === "global" && provenance.project.state === "project") {
|
|
377
|
-
const commandContext =
|
|
377
|
+
const commandContext = _chunkSF4QJVBEjs.resolveCliCommandContext.call(void 0, config);
|
|
378
378
|
const activeOrganization = commandContext.active_organization;
|
|
379
|
-
const pinnedFeatures =
|
|
380
|
-
const project_env_paths2 =
|
|
379
|
+
const pinnedFeatures = _chunkSF4QJVBEjs.storedHostFeatures.call(void 0, config.baseUrl);
|
|
380
|
+
const project_env_paths2 = _chunkSF4QJVBEjs.saveProjectDeeplineEnvValues.call(void 0,
|
|
381
381
|
{
|
|
382
|
-
[
|
|
383
|
-
[
|
|
382
|
+
[_chunkSF4QJVBEjs.HOST_URL_ENV]: config.baseUrl,
|
|
383
|
+
[_chunkSF4QJVBEjs.API_KEY_ENV]: config.apiKey,
|
|
384
384
|
...activeOrganization ? {
|
|
385
|
-
[
|
|
386
|
-
[
|
|
385
|
+
[_chunkSF4QJVBEjs.ACTIVE_ORG_ID_ENV]: activeOrganization.org_id,
|
|
386
|
+
[_chunkSF4QJVBEjs.ACTIVE_ORG_NAME_ENV]: _nullishCoalesce(activeOrganization.org_name, () => ( ""))
|
|
387
387
|
} : {},
|
|
388
|
-
...pinnedFeatures !== void 0 ? { [
|
|
388
|
+
...pinnedFeatures !== void 0 ? { [_chunkSF4QJVBEjs.FEATURES_ENV]: pinnedFeatures } : {}
|
|
389
389
|
},
|
|
390
390
|
provenance.project.dir
|
|
391
391
|
);
|
|
392
|
-
|
|
392
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
ok: true,
|
|
395
395
|
unchanged: true,
|
|
@@ -401,7 +401,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
401
401
|
orgId: activeOrganization.org_id,
|
|
402
402
|
orgName: activeOrganization.org_name,
|
|
403
403
|
authScope: "folder"
|
|
404
|
-
}) :
|
|
404
|
+
}) : _chunkSF4QJVBEjs.resolveCliCommandContext.call(void 0, config, "folder")
|
|
405
405
|
),
|
|
406
406
|
project_env_paths: project_env_paths2,
|
|
407
407
|
next: { status: "deepline org status" },
|
|
@@ -422,10 +422,10 @@ async function handleOrgSwitch(selection, options) {
|
|
|
422
422
|
);
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
|
-
const http = new (0,
|
|
425
|
+
const http = new (0, _chunkSF4QJVBEjs.HttpClient)(config);
|
|
426
426
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
427
427
|
if (!selection && !options.orgId) {
|
|
428
|
-
|
|
428
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
429
429
|
{
|
|
430
430
|
...payload,
|
|
431
431
|
next: { set: "deepline org set <number>" },
|
|
@@ -476,9 +476,9 @@ async function handleOrgSwitch(selection, options) {
|
|
|
476
476
|
features
|
|
477
477
|
});
|
|
478
478
|
if (authTarget.kind === "folder") {
|
|
479
|
-
project_env_paths2 =
|
|
479
|
+
project_env_paths2 = _chunkSF4QJVBEjs.saveProjectDeeplineEnvValues.call(void 0, authValues2);
|
|
480
480
|
} else {
|
|
481
|
-
|
|
481
|
+
_chunkSF4QJVBEjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues2);
|
|
482
482
|
}
|
|
483
483
|
const renderLines2 = [`Already on ${target.name}.`];
|
|
484
484
|
for (const projectPath of project_env_paths2) {
|
|
@@ -486,7 +486,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
486
486
|
}
|
|
487
487
|
if (authTarget.kind === "global") {
|
|
488
488
|
renderLines2.push(
|
|
489
|
-
`Saved global auth in ${
|
|
489
|
+
`Saved global auth in ${_chunkSF4QJVBEjs.hostEnvFilePath.call(void 0, config.baseUrl)}`
|
|
490
490
|
);
|
|
491
491
|
}
|
|
492
492
|
renderLines2.push(
|
|
@@ -502,7 +502,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
502
502
|
...options.deprecatedSwitch ? ["org switch is deprecated; use org set."] : [],
|
|
503
503
|
...authTarget.warnings
|
|
504
504
|
];
|
|
505
|
-
|
|
505
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
506
506
|
{
|
|
507
507
|
ok: true,
|
|
508
508
|
unchanged: true,
|
|
@@ -518,7 +518,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
518
518
|
authScope: authTarget.effective_scope
|
|
519
519
|
})
|
|
520
520
|
),
|
|
521
|
-
host_env_path: authTarget.kind === "global" ?
|
|
521
|
+
host_env_path: authTarget.kind === "global" ? _chunkSF4QJVBEjs.hostEnvFilePath.call(void 0, config.baseUrl) : null,
|
|
522
522
|
project_env_paths: project_env_paths2,
|
|
523
523
|
deprecated_command: options.deprecatedSwitch ? "org switch" : null,
|
|
524
524
|
replacement_command: options.deprecatedSwitch ? "deepline org set" : null,
|
|
@@ -544,9 +544,9 @@ async function handleOrgSwitch(selection, options) {
|
|
|
544
544
|
features: switched.features
|
|
545
545
|
});
|
|
546
546
|
if (authTarget.kind === "folder") {
|
|
547
|
-
project_env_paths =
|
|
547
|
+
project_env_paths = _chunkSF4QJVBEjs.saveProjectDeeplineEnvValues.call(void 0, authValues);
|
|
548
548
|
} else {
|
|
549
|
-
|
|
549
|
+
_chunkSF4QJVBEjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues);
|
|
550
550
|
}
|
|
551
551
|
const { api_key: _apiKey, ...publicSwitched } = switched;
|
|
552
552
|
const renderLines = [`Switched to ${switched.org_name}.`];
|
|
@@ -555,7 +555,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
555
555
|
renderLines.push(`Saved folder auth in ${projectPath}`);
|
|
556
556
|
}
|
|
557
557
|
} else {
|
|
558
|
-
renderLines.push(`Saved global auth in ${
|
|
558
|
+
renderLines.push(`Saved global auth in ${_chunkSF4QJVBEjs.hostEnvFilePath.call(void 0, config.baseUrl)}`);
|
|
559
559
|
}
|
|
560
560
|
renderLines.push(
|
|
561
561
|
`Scope: ${authTarget.requested_scope} -> ${authTarget.effective_scope} (${authTarget.reason})`
|
|
@@ -570,10 +570,10 @@ async function handleOrgSwitch(selection, options) {
|
|
|
570
570
|
...options.deprecatedSwitch ? ["org switch is deprecated; use org set."] : [],
|
|
571
571
|
...authTarget.warnings
|
|
572
572
|
];
|
|
573
|
-
|
|
573
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
574
574
|
{
|
|
575
575
|
ok: true,
|
|
576
|
-
host_env_path: authTarget.kind === "global" ?
|
|
576
|
+
host_env_path: authTarget.kind === "global" ? _chunkSF4QJVBEjs.hostEnvFilePath.call(void 0, config.baseUrl) : null,
|
|
577
577
|
project_env_paths,
|
|
578
578
|
...publicSwitched,
|
|
579
579
|
api_key_saved: true,
|
|
@@ -604,12 +604,12 @@ async function handleOrgSwitch(selection, options) {
|
|
|
604
604
|
);
|
|
605
605
|
}
|
|
606
606
|
async function handleOrgCreate(name, options) {
|
|
607
|
-
const config =
|
|
607
|
+
const config = _chunkSF4QJVBEjs.resolveConfig.call(void 0, );
|
|
608
608
|
const normalizedName = name.trim();
|
|
609
609
|
if (!normalizedName) {
|
|
610
610
|
throw new Error("Workspace name is required.");
|
|
611
611
|
}
|
|
612
|
-
const http = new (0,
|
|
612
|
+
const http = new (0, _chunkSF4QJVBEjs.HttpClient)(config);
|
|
613
613
|
const identity = await fetchWorkspaceCreationIdentity(http, config.apiKey);
|
|
614
614
|
let created;
|
|
615
615
|
let workspaceApiKey;
|
|
@@ -635,7 +635,7 @@ async function handleOrgCreate(name, options) {
|
|
|
635
635
|
sourceOrgId: identity.orgId,
|
|
636
636
|
name: normalizedName
|
|
637
637
|
});
|
|
638
|
-
const workspace = await new (0,
|
|
638
|
+
const workspace = await new (0, _chunkLRWDZDBSjs.DeeplineClient)({
|
|
639
639
|
apiKey: config.apiKey,
|
|
640
640
|
baseUrl: config.baseUrl
|
|
641
641
|
}).workspaces.create({
|
|
@@ -658,16 +658,16 @@ async function handleOrgCreate(name, options) {
|
|
|
658
658
|
orgName: created.org_name,
|
|
659
659
|
features: workspaceFeatures
|
|
660
660
|
});
|
|
661
|
-
|
|
661
|
+
_chunkSF4QJVBEjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues);
|
|
662
662
|
if (pendingIntentPath) _fs.unlinkSync.call(void 0, pendingIntentPath);
|
|
663
|
-
|
|
663
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
664
664
|
{
|
|
665
665
|
ok: true,
|
|
666
666
|
...created,
|
|
667
667
|
initial_credits: typeof created.initial_credits === "number" ? created.initial_credits : 0,
|
|
668
668
|
api_key_saved: true,
|
|
669
669
|
switched: true,
|
|
670
|
-
host_env_path:
|
|
670
|
+
host_env_path: _chunkSF4QJVBEjs.hostEnvFilePath.call(void 0, config.baseUrl),
|
|
671
671
|
...agentCommandContext(
|
|
672
672
|
organizationCommandContext({
|
|
673
673
|
orgId: created.org_id,
|
|
@@ -682,7 +682,7 @@ async function handleOrgCreate(name, options) {
|
|
|
682
682
|
lines: [
|
|
683
683
|
`Created organization: ${created.org_name}.`,
|
|
684
684
|
`Switched to ${created.org_name}.`,
|
|
685
|
-
`Saved host auth in ${
|
|
685
|
+
`Saved host auth in ${_chunkSF4QJVBEjs.hostEnvFilePath.call(void 0, config.baseUrl)}`
|
|
686
686
|
]
|
|
687
687
|
}
|
|
688
688
|
]
|
|
@@ -734,8 +734,8 @@ Examples:
|
|
|
734
734
|
);
|
|
735
735
|
const members = org.command("members").description("List workspace members and manage their grants.");
|
|
736
736
|
members.command("list").description("List one page of memberships and effective grants.").option("--cursor <cursor>", "Continue from the previous page").option("--json", "Output JSON").action(async (options) => {
|
|
737
|
-
const result = await new (0,
|
|
738
|
-
|
|
737
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.members(options);
|
|
738
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
739
739
|
{
|
|
740
740
|
...result,
|
|
741
741
|
render: {
|
|
@@ -756,11 +756,11 @@ Examples:
|
|
|
756
756
|
"Replace a member\u2019s grants (read, run, admin). Requires admin."
|
|
757
757
|
).option("--json", "Output JSON").action(
|
|
758
758
|
async (memberId, grants, options) => {
|
|
759
|
-
const result = await new (0,
|
|
759
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.setMemberGrants(
|
|
760
760
|
memberId,
|
|
761
761
|
grants
|
|
762
762
|
);
|
|
763
|
-
|
|
763
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
764
764
|
{
|
|
765
765
|
...result,
|
|
766
766
|
render: {
|
|
@@ -776,9 +776,172 @@ Examples:
|
|
|
776
776
|
);
|
|
777
777
|
}
|
|
778
778
|
);
|
|
779
|
+
const serviceAccounts = org.command("service-accounts").description(
|
|
780
|
+
"Manage service accounts: members that are not people and own API keys."
|
|
781
|
+
);
|
|
782
|
+
const renderServiceAccount = (account) => `${account.id} ${account.name} role=${_nullishCoalesce(account.role, () => ( "none"))} keys=${account.activeKeyCount}`;
|
|
783
|
+
serviceAccounts.command("list").description("List service accounts and, for admins, their keys.").option("--json", "Output JSON").action(async (options) => {
|
|
784
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.serviceAccounts.list();
|
|
785
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
786
|
+
{
|
|
787
|
+
...result,
|
|
788
|
+
render: {
|
|
789
|
+
sections: [
|
|
790
|
+
{
|
|
791
|
+
title: "Service accounts",
|
|
792
|
+
lines: result.serviceAccounts.flatMap((account) => [
|
|
793
|
+
renderServiceAccount(account),
|
|
794
|
+
...(_nullishCoalesce(account.keys, () => ( []))).map(
|
|
795
|
+
(key) => ` key ${key.id} ${key.keyPrefix}\u2026${key.keyLast4}`
|
|
796
|
+
)
|
|
797
|
+
])
|
|
798
|
+
}
|
|
799
|
+
]
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
{ json: options.json }
|
|
803
|
+
);
|
|
804
|
+
});
|
|
805
|
+
serviceAccounts.command("create <name>").description("Create a service account. Requires admin.").requiredOption("--role <role>", "read, run, or member").option("--json", "Output JSON").action(async (name, options) => {
|
|
806
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.serviceAccounts.create({
|
|
807
|
+
name,
|
|
808
|
+
role: options.role
|
|
809
|
+
});
|
|
810
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
811
|
+
{
|
|
812
|
+
...result,
|
|
813
|
+
render: {
|
|
814
|
+
sections: [
|
|
815
|
+
{
|
|
816
|
+
title: "Service account created",
|
|
817
|
+
lines: [renderServiceAccount(result.serviceAccount)]
|
|
818
|
+
}
|
|
819
|
+
]
|
|
820
|
+
},
|
|
821
|
+
next: {
|
|
822
|
+
createKey: `deepline org service-accounts keys create ${result.serviceAccount.id}`
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
{ json: options.json }
|
|
826
|
+
);
|
|
827
|
+
});
|
|
828
|
+
serviceAccounts.command("set-role <service-account-id> <role>").description("Change a service account\u2019s role. Requires admin.").option("--json", "Output JSON").action(
|
|
829
|
+
async (serviceAccountId, role, options) => {
|
|
830
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.serviceAccounts.setRole(
|
|
831
|
+
serviceAccountId,
|
|
832
|
+
role
|
|
833
|
+
);
|
|
834
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
835
|
+
{
|
|
836
|
+
...result,
|
|
837
|
+
render: {
|
|
838
|
+
sections: [
|
|
839
|
+
{
|
|
840
|
+
title: "Service account role",
|
|
841
|
+
lines: [renderServiceAccount(result.serviceAccount)]
|
|
842
|
+
}
|
|
843
|
+
]
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
{ json: options.json }
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
);
|
|
850
|
+
serviceAccounts.command("delete <service-account-id>").description(
|
|
851
|
+
"Delete a service account and revoke its keys. Requires admin."
|
|
852
|
+
).option("--json", "Output JSON").action(async (serviceAccountId, options) => {
|
|
853
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.serviceAccounts.delete(
|
|
854
|
+
serviceAccountId
|
|
855
|
+
);
|
|
856
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
857
|
+
{
|
|
858
|
+
...result,
|
|
859
|
+
render: {
|
|
860
|
+
sections: [
|
|
861
|
+
{
|
|
862
|
+
title: "Service account deleted",
|
|
863
|
+
lines: [`${result.id} revoked keys=${result.revokedKeyCount}`]
|
|
864
|
+
}
|
|
865
|
+
]
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
{ json: options.json }
|
|
869
|
+
);
|
|
870
|
+
});
|
|
871
|
+
const serviceAccountKeys = serviceAccounts.command("keys").description(
|
|
872
|
+
"Create, rotate and revoke a service account\u2019s API key. A service account holds one active key."
|
|
873
|
+
);
|
|
874
|
+
serviceAccountKeys.command("create <service-account-id>").description(
|
|
875
|
+
"Create the API key for a service account that has none. Requires admin."
|
|
876
|
+
).option("--json", "Output JSON").action(async (serviceAccountId, options) => {
|
|
877
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.serviceAccounts.createKey(
|
|
878
|
+
serviceAccountId
|
|
879
|
+
);
|
|
880
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
881
|
+
{
|
|
882
|
+
...result,
|
|
883
|
+
render: {
|
|
884
|
+
sections: [
|
|
885
|
+
{
|
|
886
|
+
title: "Service account key (shown once)",
|
|
887
|
+
lines: [result.apiKey, `id ${result.key.id}`]
|
|
888
|
+
}
|
|
889
|
+
]
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
{ json: options.json }
|
|
893
|
+
);
|
|
894
|
+
});
|
|
895
|
+
serviceAccountKeys.command("rotate <service-account-id>").description(
|
|
896
|
+
"Replace a service account\u2019s API key: the old key stops working and the new one is shown once. Requires admin."
|
|
897
|
+
).option("--json", "Output JSON").action(async (serviceAccountId, options) => {
|
|
898
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.serviceAccounts.rotateKey(
|
|
899
|
+
serviceAccountId
|
|
900
|
+
);
|
|
901
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
902
|
+
{
|
|
903
|
+
...result,
|
|
904
|
+
render: {
|
|
905
|
+
sections: [
|
|
906
|
+
{
|
|
907
|
+
title: "Service account key rotated (shown once)",
|
|
908
|
+
lines: [
|
|
909
|
+
result.apiKey,
|
|
910
|
+
`id ${result.key.id}`,
|
|
911
|
+
`revoked ${result.revokedKeyIds.join(", ")}`
|
|
912
|
+
]
|
|
913
|
+
}
|
|
914
|
+
]
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
{ json: options.json }
|
|
918
|
+
);
|
|
919
|
+
});
|
|
920
|
+
serviceAccountKeys.command("revoke <service-account-id> <key-id>").description("Revoke a service account API key. Requires admin.").option("--json", "Output JSON").action(
|
|
921
|
+
async (serviceAccountId, keyId, options) => {
|
|
922
|
+
const result = await new (0, _chunkLRWDZDBSjs.DeeplineClient)().workspaces.serviceAccounts.revokeKey(
|
|
923
|
+
serviceAccountId,
|
|
924
|
+
keyId
|
|
925
|
+
);
|
|
926
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
927
|
+
{
|
|
928
|
+
...result,
|
|
929
|
+
render: {
|
|
930
|
+
sections: [
|
|
931
|
+
{
|
|
932
|
+
title: "Service account key revoked",
|
|
933
|
+
lines: [`${result.keyId} ${result.status}`]
|
|
934
|
+
}
|
|
935
|
+
]
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
{ json: options.json }
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
|
+
);
|
|
779
942
|
const sso = org.command("sso").description("Manage Enterprise workspace SSO.");
|
|
780
943
|
const ssoPath = "/api/v2/auth/workspace/sso";
|
|
781
|
-
const printSso = (payload, json) =>
|
|
944
|
+
const printSso = (payload, json) => _chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
782
945
|
{
|
|
783
946
|
...payload,
|
|
784
947
|
render: {
|
|
@@ -802,7 +965,7 @@ Examples:
|
|
|
802
965
|
},
|
|
803
966
|
{ json }
|
|
804
967
|
);
|
|
805
|
-
const ssoHttp = () => new (0,
|
|
968
|
+
const ssoHttp = () => new (0, _chunkSF4QJVBEjs.HttpClient)(_chunkSF4QJVBEjs.resolveConfig.call(void 0, ));
|
|
806
969
|
sso.command("status").description("Show this workspace's SSO connection and plan eligibility.").option("--json", "Emit JSON output").action(async (options) => {
|
|
807
970
|
printSso(await ssoHttp().get(ssoPath), options.json);
|
|
808
971
|
});
|
|
@@ -833,8 +996,8 @@ Examples:
|
|
|
833
996
|
"Identity provider metadata XML file"
|
|
834
997
|
).option("--json", "Emit JSON output").action(
|
|
835
998
|
async (options) => {
|
|
836
|
-
const config =
|
|
837
|
-
const http = new (0,
|
|
999
|
+
const config = _chunkSF4QJVBEjs.resolveConfig.call(void 0, );
|
|
1000
|
+
const http = new (0, _chunkSF4QJVBEjs.HttpClient)(config);
|
|
838
1001
|
const identity = await fetchWorkspaceCreationIdentity(
|
|
839
1002
|
http,
|
|
840
1003
|
config.apiKey
|
|
@@ -898,13 +1061,13 @@ Examples:
|
|
|
898
1061
|
if (chosen.length > 1) {
|
|
899
1062
|
throw new Error("Pass one of a logo URL, --domain, or --remove.");
|
|
900
1063
|
}
|
|
901
|
-
const http = new (0,
|
|
1064
|
+
const http = new (0, _chunkSF4QJVBEjs.HttpClient)(_chunkSF4QJVBEjs.resolveConfig.call(void 0, ));
|
|
902
1065
|
const path = "/api/v2/auth/workspace/logo";
|
|
903
1066
|
const payload = chosen.length === 0 ? await http.get(path) : await http.patch(
|
|
904
1067
|
path,
|
|
905
1068
|
options.domain ? { domain: options.domain } : { logo: _nullishCoalesce(url, () => ( null)) }
|
|
906
1069
|
);
|
|
907
|
-
|
|
1070
|
+
_chunkGTGJBZVHjs.printCommandEnvelope.call(void 0,
|
|
908
1071
|
{
|
|
909
1072
|
...payload,
|
|
910
1073
|
render: {
|