deepline 0.3.494 → 0.3.496
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 +103 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +5 -19
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +79 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-control.ts +19 -3
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-gateway-drain.ts +110 -66
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +57 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +8 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +19 -10
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +26 -6
- package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +4 -1
- package/dist/cli/{auth-6X5YXMFN.mjs → auth-EU4EFRDJ.mjs} +5 -5
- package/dist/cli/auth-SHWC5FMY.js +43 -0
- package/dist/cli/{billing-5F5PZB77.js → billing-4JJLTVK4.js} +80 -80
- package/dist/cli/{billing-IN74SDSC.mjs → billing-GMVH3RBX.mjs} +7 -7
- package/dist/cli/{chunk-H46X7YDU.mjs → chunk-2HCZHIMT.mjs} +20 -0
- package/dist/cli/{chunk-3KVFOKPR.js → chunk-3HIPDJWJ.js} +53 -53
- package/dist/cli/{chunk-QOEI42IU.mjs → chunk-3KA466RV.mjs} +1 -1
- package/dist/cli/{chunk-GNSGDIA4.mjs → chunk-4NKAM4GX.mjs} +2 -2
- package/dist/cli/{chunk-BU5Y7HOD.js → chunk-5GK6J7MH.js} +5 -5
- package/dist/cli/{chunk-J2HOVZOE.mjs → chunk-5M4PLPTR.mjs} +53 -3
- package/dist/cli/{chunk-CAWOSHEC.js → chunk-5YSIHOGV.js} +26 -26
- package/dist/cli/{chunk-RPFNIMUO.mjs → chunk-6QIAEXRH.mjs} +1 -1
- package/dist/cli/{chunk-4RWH4LRQ.mjs → chunk-6UUZM4FY.mjs} +5 -5
- package/dist/cli/{chunk-S3XQH7DW.js → chunk-73CBLBNP.js} +1 -1
- package/dist/cli/{chunk-KR2XEI5T.mjs → chunk-7NBDLK3N.mjs} +1 -1
- package/dist/cli/{chunk-MWZNMWR2.mjs → chunk-7Q7VPFPR.mjs} +2 -2
- package/dist/cli/{chunk-6XZR2642.mjs → chunk-7U6W3CKT.mjs} +4 -4
- package/dist/cli/{chunk-CK5MA6S6.js → chunk-AOBAVBSX.js} +115 -65
- package/dist/cli/{chunk-L4QPBQUX.mjs → chunk-CNMIYEB4.mjs} +3 -3
- package/dist/cli/{chunk-DVQHG6AM.mjs → chunk-CS2AEAD6.mjs} +63 -11
- package/dist/cli/{chunk-ODWTFVE4.mjs → chunk-DFW6P6ZN.mjs} +2 -2
- package/dist/cli/{chunk-L2P2XRPO.mjs → chunk-E3KXXJWR.mjs} +6 -6
- package/dist/cli/{chunk-PKV5CD3W.js → chunk-EQR5O2D2.js} +87 -35
- package/dist/cli/{chunk-L6KA4ENU.js → chunk-EX4JEFYI.js} +16 -16
- package/dist/cli/{chunk-IPWYDANJ.mjs → chunk-FXPICCUU.mjs} +1 -1
- package/dist/cli/{chunk-5WYH2LAP.js → chunk-GKZUGHDK.js} +6 -6
- package/dist/cli/{chunk-HINVMRGQ.js → chunk-GRIHMNYM.js} +4 -4
- package/dist/cli/{chunk-VMPM2FKT.js → chunk-HIAFBOYA.js} +8 -8
- package/dist/cli/{chunk-FAT6CUZK.mjs → chunk-IMWJRBV5.mjs} +1 -1
- package/dist/cli/{chunk-IZJSX3SZ.mjs → chunk-IXPZROZX.mjs} +2 -2
- package/dist/cli/{chunk-Y4GRL533.js → chunk-J55ZM5CK.js} +3 -3
- package/dist/cli/{chunk-X6HIIHQO.js → chunk-JEPNE4N5.js} +5 -5
- package/dist/cli/{chunk-QSRWBOPV.js → chunk-JU4LIA2T.js} +7 -7
- package/dist/cli/{chunk-GSCCDGGT.js → chunk-KKI5GWED.js} +94 -94
- package/dist/cli/{chunk-WP45PUPW.js → chunk-MWQ3WQ4Q.js} +41 -41
- package/dist/cli/{chunk-AARXOBVD.js → chunk-N3T3L3WW.js} +20 -0
- package/dist/cli/{chunk-TLQXN4ZZ.mjs → chunk-O36ZPHJG.mjs} +10 -10
- package/dist/cli/{chunk-7B7A36XZ.js → chunk-PHVRS56F.js} +14 -14
- package/dist/cli/{chunk-GDNQXLBM.js → chunk-QEBQIGXP.js} +2 -2
- package/dist/cli/{chunk-USWLB4KV.js → chunk-QN6IULFT.js} +53 -53
- package/dist/cli/{chunk-BLHQRETG.mjs → chunk-QYXUZX5N.mjs} +4 -4
- package/dist/cli/{chunk-J3UHNUWI.js → chunk-QZ7I4NZZ.js} +2 -2
- package/dist/cli/{chunk-KVCQL6SP.mjs → chunk-R4H5MCG4.mjs} +4 -4
- package/dist/cli/{chunk-L6L57RSG.mjs → chunk-SH6HOR25.mjs} +2 -2
- package/dist/cli/{chunk-EG3OSUBO.mjs → chunk-U6SE6757.mjs} +1 -1
- package/dist/cli/{chunk-65NMOP4T.mjs → chunk-UT3ORL35.mjs} +3 -3
- package/dist/cli/{chunk-4ZKZS43N.js → chunk-UTG3STCR.js} +3 -3
- package/dist/cli/{chunk-GLDBMKTV.js → chunk-W7DZ6UGP.js} +3 -3
- package/dist/cli/{chunk-DKKAJ3U2.mjs → chunk-WCBZHSC4.mjs} +5 -5
- package/dist/cli/{chunk-BNI653WN.js → chunk-WEGGJMNF.js} +21 -21
- package/dist/cli/{chunk-6DMLWM7L.mjs → chunk-WTZ7Y3IZ.mjs} +2 -2
- package/dist/cli/{chunk-WCZBIE5L.mjs → chunk-YHFW7MBT.mjs} +1 -1
- package/dist/cli/{chunk-4A5WXQJK.js → chunk-Z27R2BG7.js} +16 -16
- package/dist/cli/{chunk-ZZD245Z2.js → chunk-ZL4Q4T3G.js} +7 -7
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-UBW4ID5D.mjs → csv-ET7ESAPM.mjs} +4 -4
- package/dist/cli/{csv-QD7JJGSP.js → csv-JWBLNEPC.js} +13 -13
- package/dist/cli/{db-AARR3WYD.js → db-3ZGQXWTQ.js} +28 -28
- package/dist/cli/{db-QFDXKIVD.mjs → db-4PIWQPR6.mjs} +7 -7
- package/dist/cli/describe-KO3OQBIR.js +50 -0
- package/dist/cli/{describe-OBVIAC2H.mjs → describe-OREUCFC2.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-IZYUDYTZ.mjs → executions-HW6PMZOF.mjs} +7 -7
- package/dist/cli/{executions-KXY7KMZY.js → executions-YR545MRU.js} +9 -9
- package/dist/cli/{feedback-IVCVBERN.mjs → feedback-B2FJ6HPA.mjs} +4 -4
- package/dist/cli/{feedback-3334HBPD.js → feedback-FNVHJQEC.js} +8 -8
- package/dist/cli/{git-JHNVET5A.mjs → git-CCNPW3CA.mjs} +5 -5
- package/dist/cli/git-X2QJ2B5O.js +25 -0
- package/dist/cli/index.js +141 -141
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-DBA32JCV.js → legacy-noops-2EBZS45D.js} +8 -8
- package/dist/cli/{legacy-noops-WGVBUOCC.mjs → legacy-noops-VJLCXTPB.mjs} +5 -5
- package/dist/cli/{monitors-ZGANC7JY.mjs → monitors-4AMETRW7.mjs} +190 -8
- package/dist/cli/{monitors-GHWZ5AZS.js → monitors-JNWKPCN5.js} +318 -136
- package/dist/cli/{org-S7JWP264.js → org-7FUHVFYU.js} +73 -73
- package/dist/cli/{org-CUS42N2T.mjs → org-LO6GSCCG.mjs} +7 -7
- package/dist/cli/{pages-IH56T6L6.mjs → pages-PJ32M2PU.mjs} +21 -7
- package/dist/cli/{pages-QXRZDEJW.js → pages-TT4TZOOV.js} +33 -19
- package/dist/cli/{play-Z65ZFOQH.mjs → play-QJEZAIZB.mjs} +19 -48
- package/dist/cli/{play-4C5PYS62.js → play-VN7DFYDP.js} +618 -647
- package/dist/cli/{providers-FSZSJX4Z.mjs → providers-24ER3SND.mjs} +7 -7
- package/dist/cli/{providers-XYQGYF3O.js → providers-IDFN2FCR.js} +10 -10
- package/dist/cli/{quickstart-ZA25RJT3.js → quickstart-AQDCRVUQ.js} +6 -6
- package/dist/cli/{quickstart-DHWVE32I.mjs → quickstart-FKENQU34.mjs} +4 -4
- package/dist/cli/{run-5MP6LEHM.js → run-HCASJQZY.js} +37 -37
- package/dist/cli/{run-WRPPEPLG.mjs → run-KXMRE5ZD.mjs} +23 -23
- package/dist/cli/{search-A6NVJPKX.mjs → search-3F2T33OE.mjs} +8 -8
- package/dist/cli/search-OGY6SQDJ.js +32 -0
- package/dist/cli/{search-output-YA6TXWGO.js → search-output-GFCEGNCJ.js} +6 -6
- package/dist/cli/{search-output-PAOUMVXY.mjs → search-output-U6PM5KAH.mjs} +4 -4
- package/dist/cli/{secrets-AZYOGH3I.js → secrets-KYVUP755.js} +16 -16
- package/dist/cli/{secrets-ZGF7JOBI.mjs → secrets-ZZSOVXOX.mjs} +7 -7
- package/dist/cli/{sessions-RNEAXZPV.mjs → sessions-4Z62CVHL.mjs} +5 -5
- package/dist/cli/{sessions-GCIN5VXT.js → sessions-7JFKTUQS.js} +6 -6
- package/dist/cli/{settings-NO5KXQJF.mjs → settings-OXG7IRVC.mjs} +12 -12
- package/dist/cli/{settings-LMEZNLBB.js → settings-X4PSK4EW.js} +79 -79
- package/dist/cli/{setup-XKTZPYYH.js → setup-NCJEDW4W.js} +49 -49
- package/dist/cli/{setup-GCYB4IFS.mjs → setup-RB7JE6KA.mjs} +9 -9
- package/dist/cli/{skills-TY4HHIKH.mjs → skills-D4BR2WU2.mjs} +7 -7
- package/dist/cli/skills-WWWFRDCA.js +36 -0
- package/dist/cli/{tools-RDTHHYJ3.mjs → tools-CEOD7VD5.mjs} +17 -17
- package/dist/cli/tools-QMSAA3LC.js +57 -0
- package/dist/cli/update-HTDFPN7L.js +34 -0
- package/dist/cli/{update-BRLLTTCS.mjs → update-UKUMQ6FC.mjs} +9 -9
- package/dist/cli/{workflow-F72EVZWM.mjs → workflow-EKKTTSCJ.mjs} +8 -8
- package/dist/cli/{workflow-YHA4WE3K.js → workflow-LFWQWZKS.js} +18 -18
- package/dist/{client-97yTcdLl.d.ts → client-Cj3UqrCZ.d.ts} +1 -1
- package/dist/{client-CFo9qalW.d.mts → client-DSCTVVRj.d.mts} +1 -1
- package/dist/{client-core-Dl6xgfLq.d.mts → client-core-B-8DTIN1.d.mts} +49 -3
- package/dist/{client-core-BRZrY13B.d.ts → client-core-dI4KTuWS.d.ts} +49 -3
- package/dist/{compiler-manifest-CPEF48NM.d.ts → compiler-manifest-DlXDyndN.d.mts} +2 -0
- package/dist/{compiler-manifest-CPEF48NM.d.mts → compiler-manifest-DlXDyndN.d.ts} +2 -0
- package/dist/{errors-BWbPzqwo.d.mts → errors-BtriA2ld.d.mts} +1 -1
- package/dist/{errors-B-PJXveg.d.ts → errors-DmcLykM7.d.ts} +1 -1
- package/dist/{index-CvVxPpE8.d.ts → index--Jw-slHY.d.ts} +1 -1
- package/dist/{index-BJ8AA1F9.d.mts → index-DI0sR_fX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +112 -112
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +2 -2
- package/dist/plays/run-request.mjs +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/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-RWLCLMDY.js +0 -43
- package/dist/cli/describe-RYJ6HDYD.js +0 -50
- package/dist/cli/git-4VLYFHNU.js +0 -25
- package/dist/cli/search-4SQFVNTB.js +0 -32
- package/dist/cli/skills-V4APQA2I.js +0 -36
- package/dist/cli/tools-HKQLQ7HT.js +0 -57
- package/dist/cli/update-Z4MUAHWM.js +0 -34
|
@@ -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 _chunk5GK6J7MHjs = require('./chunk-5GK6J7MH.js');
|
|
4
|
+
require('./chunk-AOBAVBSX.js');
|
|
5
5
|
require('./chunk-E4CABWXL.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-EQR5O2D2.js');
|
|
7
7
|
require('./chunk-NMU3VR5U.js');
|
|
8
8
|
require('./chunk-XDVT3GOM.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkZL4Q4T3Gjs = require('./chunk-ZL4Q4T3G.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -28,14 +28,14 @@ var _chunkZZD245Z2js = require('./chunk-ZZD245Z2.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkJ55ZM5CKjs = require('./chunk-J55ZM5CK.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkGRIHMNYMjs = require('./chunk-GRIHMNYM.js');
|
|
35
35
|
require('./chunk-ALJJRZNJ.js');
|
|
36
36
|
require('./chunk-XNYIZMNQ.js');
|
|
37
37
|
require('./chunk-DIAWYWT5.js');
|
|
38
|
-
require('./chunk-
|
|
38
|
+
require('./chunk-73CBLBNP.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, _chunkJ55ZM5CKjs.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 = _chunkJ55ZM5CKjs.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
|
+
[_chunkJ55ZM5CKjs.HOST_URL_ENV]: input.baseUrl,
|
|
159
|
+
[_chunkJ55ZM5CKjs.API_KEY_ENV]: input.apiKey,
|
|
160
|
+
[_chunkJ55ZM5CKjs.ACTIVE_ORG_ID_ENV]: input.orgId,
|
|
161
|
+
[_chunkJ55ZM5CKjs.ACTIVE_ORG_NAME_ENV]: input.orgName,
|
|
162
|
+
..._chunkJ55ZM5CKjs.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 _chunkGRIHMNYMjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? { command_context: commandContext } : {};
|
|
177
177
|
}
|
|
178
178
|
function resolveOrgSwitchAuthTarget(scope, config) {
|
|
179
|
-
const activeProject =
|
|
179
|
+
const activeProject = _chunkJ55ZM5CKjs.getResolvedProjectAuthSource.call(void 0,
|
|
180
180
|
config.baseUrl,
|
|
181
181
|
config.apiKey
|
|
182
182
|
);
|
|
183
|
-
const folderTarget =
|
|
183
|
+
const folderTarget = _chunkJ55ZM5CKjs.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 = _chunkJ55ZM5CKjs.resolveConfig.call(void 0, );
|
|
256
|
+
const http = new (0, _chunkJ55ZM5CKjs.HttpClient)(config);
|
|
257
257
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
258
|
-
|
|
258
|
+
_chunkZL4Q4T3Gjs.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 = _chunkJ55ZM5CKjs.resolveConfig.call(void 0, );
|
|
275
|
+
const http = new (0, _chunkJ55ZM5CKjs.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 = _chunkJ55ZM5CKjs.getActiveProjectAuthSource.call(void 0, );
|
|
281
|
+
const activeProject = _chunkJ55ZM5CKjs.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 = _chunkJ55ZM5CKjs.resolveProjectPinTarget.call(void 0, );
|
|
286
|
+
const provenance = _chunkJ55ZM5CKjs.resolveCliAuthProvenance.call(void 0, config);
|
|
287
|
+
const hostPath = _chunkJ55ZM5CKjs.hostEnvFilePath.call(void 0, config.baseUrl);
|
|
288
|
+
const envApiKey = processEnvValue(_chunkJ55ZM5CKjs.API_KEY_ENV);
|
|
289
|
+
const envHostUrl = processEnvValue(_chunkJ55ZM5CKjs.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: ${_chunkJ55ZM5CKjs.API_KEY_ENV} process environment`);
|
|
331
331
|
}
|
|
332
332
|
if (envApiKey) {
|
|
333
|
-
lines.push(`${
|
|
333
|
+
lines.push(`${_chunkJ55ZM5CKjs.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
|
+
_chunkZL4Q4T3Gjs.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 = _chunkJ55ZM5CKjs.resolveConfig.call(void 0, );
|
|
375
|
+
const provenance = _chunkJ55ZM5CKjs.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 = _chunkJ55ZM5CKjs.resolveCliCommandContext.call(void 0, config);
|
|
378
378
|
const activeOrganization = commandContext.active_organization;
|
|
379
|
-
const pinnedFeatures =
|
|
380
|
-
const project_env_paths2 =
|
|
379
|
+
const pinnedFeatures = _chunkJ55ZM5CKjs.storedHostFeatures.call(void 0, config.baseUrl);
|
|
380
|
+
const project_env_paths2 = _chunkJ55ZM5CKjs.saveProjectDeeplineEnvValues.call(void 0,
|
|
381
381
|
{
|
|
382
|
-
[
|
|
383
|
-
[
|
|
382
|
+
[_chunkJ55ZM5CKjs.HOST_URL_ENV]: config.baseUrl,
|
|
383
|
+
[_chunkJ55ZM5CKjs.API_KEY_ENV]: config.apiKey,
|
|
384
384
|
...activeOrganization ? {
|
|
385
|
-
[
|
|
386
|
-
[
|
|
385
|
+
[_chunkJ55ZM5CKjs.ACTIVE_ORG_ID_ENV]: activeOrganization.org_id,
|
|
386
|
+
[_chunkJ55ZM5CKjs.ACTIVE_ORG_NAME_ENV]: _nullishCoalesce(activeOrganization.org_name, () => ( ""))
|
|
387
387
|
} : {},
|
|
388
|
-
...pinnedFeatures !== void 0 ? { [
|
|
388
|
+
...pinnedFeatures !== void 0 ? { [_chunkJ55ZM5CKjs.FEATURES_ENV]: pinnedFeatures } : {}
|
|
389
389
|
},
|
|
390
390
|
provenance.project.dir
|
|
391
391
|
);
|
|
392
|
-
|
|
392
|
+
_chunkZL4Q4T3Gjs.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
|
+
}) : _chunkJ55ZM5CKjs.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, _chunkJ55ZM5CKjs.HttpClient)(config);
|
|
426
426
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
427
427
|
if (!selection && !options.orgId) {
|
|
428
|
-
|
|
428
|
+
_chunkZL4Q4T3Gjs.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 = _chunkJ55ZM5CKjs.saveProjectDeeplineEnvValues.call(void 0, authValues2);
|
|
480
480
|
} else {
|
|
481
|
-
|
|
481
|
+
_chunkJ55ZM5CKjs.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 ${_chunkJ55ZM5CKjs.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
|
+
_chunkZL4Q4T3Gjs.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" ? _chunkJ55ZM5CKjs.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 = _chunkJ55ZM5CKjs.saveProjectDeeplineEnvValues.call(void 0, authValues);
|
|
548
548
|
} else {
|
|
549
|
-
|
|
549
|
+
_chunkJ55ZM5CKjs.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 ${_chunkJ55ZM5CKjs.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
|
+
_chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0,
|
|
574
574
|
{
|
|
575
575
|
ok: true,
|
|
576
|
-
host_env_path: authTarget.kind === "global" ?
|
|
576
|
+
host_env_path: authTarget.kind === "global" ? _chunkJ55ZM5CKjs.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 = _chunkJ55ZM5CKjs.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, _chunkJ55ZM5CKjs.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, _chunk5GK6J7MHjs.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
|
+
_chunkJ55ZM5CKjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues);
|
|
662
662
|
if (pendingIntentPath) _fs.unlinkSync.call(void 0, pendingIntentPath);
|
|
663
|
-
|
|
663
|
+
_chunkZL4Q4T3Gjs.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: _chunkJ55ZM5CKjs.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 ${_chunkJ55ZM5CKjs.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, _chunk5GK6J7MHjs.DeeplineClient)().workspaces.members(options);
|
|
738
|
+
_chunkZL4Q4T3Gjs.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, _chunk5GK6J7MHjs.DeeplineClient)().workspaces.setMemberGrants(
|
|
760
760
|
memberId,
|
|
761
761
|
grants
|
|
762
762
|
);
|
|
763
|
-
|
|
763
|
+
_chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0,
|
|
764
764
|
{
|
|
765
765
|
...result,
|
|
766
766
|
render: {
|
|
@@ -778,7 +778,7 @@ Examples:
|
|
|
778
778
|
);
|
|
779
779
|
const sso = org.command("sso").description("Manage Enterprise workspace SSO.");
|
|
780
780
|
const ssoPath = "/api/v2/auth/workspace/sso";
|
|
781
|
-
const printSso = (payload, json) =>
|
|
781
|
+
const printSso = (payload, json) => _chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0,
|
|
782
782
|
{
|
|
783
783
|
...payload,
|
|
784
784
|
render: {
|
|
@@ -802,7 +802,7 @@ Examples:
|
|
|
802
802
|
},
|
|
803
803
|
{ json }
|
|
804
804
|
);
|
|
805
|
-
const ssoHttp = () => new (0,
|
|
805
|
+
const ssoHttp = () => new (0, _chunkJ55ZM5CKjs.HttpClient)(_chunkJ55ZM5CKjs.resolveConfig.call(void 0, ));
|
|
806
806
|
sso.command("status").description("Show this workspace's SSO connection and plan eligibility.").option("--json", "Emit JSON output").action(async (options) => {
|
|
807
807
|
printSso(await ssoHttp().get(ssoPath), options.json);
|
|
808
808
|
});
|
|
@@ -833,8 +833,8 @@ Examples:
|
|
|
833
833
|
"Identity provider metadata XML file"
|
|
834
834
|
).option("--json", "Emit JSON output").action(
|
|
835
835
|
async (options) => {
|
|
836
|
-
const config =
|
|
837
|
-
const http = new (0,
|
|
836
|
+
const config = _chunkJ55ZM5CKjs.resolveConfig.call(void 0, );
|
|
837
|
+
const http = new (0, _chunkJ55ZM5CKjs.HttpClient)(config);
|
|
838
838
|
const identity = await fetchWorkspaceCreationIdentity(
|
|
839
839
|
http,
|
|
840
840
|
config.apiKey
|
|
@@ -898,13 +898,13 @@ Examples:
|
|
|
898
898
|
if (chosen.length > 1) {
|
|
899
899
|
throw new Error("Pass one of a logo URL, --domain, or --remove.");
|
|
900
900
|
}
|
|
901
|
-
const http = new (0,
|
|
901
|
+
const http = new (0, _chunkJ55ZM5CKjs.HttpClient)(_chunkJ55ZM5CKjs.resolveConfig.call(void 0, ));
|
|
902
902
|
const path = "/api/v2/auth/workspace/logo";
|
|
903
903
|
const payload = chosen.length === 0 ? await http.get(path) : await http.patch(
|
|
904
904
|
path,
|
|
905
905
|
options.domain ? { domain: options.domain } : { logo: _nullishCoalesce(url, () => ( null)) }
|
|
906
906
|
);
|
|
907
|
-
|
|
907
|
+
_chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0,
|
|
908
908
|
{
|
|
909
909
|
...payload,
|
|
910
910
|
render: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4NKAM4GX.mjs";
|
|
4
|
+
import "./chunk-5M4PLPTR.mjs";
|
|
5
5
|
import "./chunk-L2VKAASU.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-CS2AEAD6.mjs";
|
|
7
7
|
import "./chunk-S3A4IXBQ.mjs";
|
|
8
8
|
import "./chunk-UBKA33KY.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
ACTIVE_ORG_ID_ENV,
|
|
14
14
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
saveProjectDeeplineEnvValues,
|
|
29
29
|
sdkCliStateDirPath,
|
|
30
30
|
storedHostFeatures
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7NBDLK3N.mjs";
|
|
32
32
|
import {
|
|
33
33
|
detectAgentRuntime
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-IMWJRBV5.mjs";
|
|
35
35
|
import "./chunk-4QF2K7TM.mjs";
|
|
36
36
|
import "./chunk-DLIRSHV6.mjs";
|
|
37
37
|
import "./chunk-HBL4PM5Q.mjs";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-3KA466RV.mjs";
|
|
39
39
|
import "./chunk-WZYKRD7T.mjs";
|
|
40
40
|
import "./chunk-KRD6H754.mjs";
|
|
41
41
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4NKAM4GX.mjs";
|
|
4
|
+
import "./chunk-5M4PLPTR.mjs";
|
|
5
5
|
import "./chunk-L2VKAASU.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-CS2AEAD6.mjs";
|
|
7
7
|
import "./chunk-S3A4IXBQ.mjs";
|
|
8
8
|
import "./chunk-UBKA33KY.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WTZ7Y3IZ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
cliFeatureEnabled
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-7NBDLK3N.mjs";
|
|
15
|
+
import "./chunk-IMWJRBV5.mjs";
|
|
16
16
|
import "./chunk-4QF2K7TM.mjs";
|
|
17
17
|
import "./chunk-DLIRSHV6.mjs";
|
|
18
18
|
import "./chunk-HBL4PM5Q.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-3KA466RV.mjs";
|
|
20
20
|
import "./chunk-WZYKRD7T.mjs";
|
|
21
21
|
import "./chunk-KRD6H754.mjs";
|
|
22
22
|
|
|
@@ -62,6 +62,7 @@ function pageLines(page) {
|
|
|
62
62
|
`${page.name}${page.state === "deleting" ? " (deleting)" : ""}`,
|
|
63
63
|
` ${page.url}`,
|
|
64
64
|
` visible to: ${audience(page)}`,
|
|
65
|
+
...page.allowed_origins?.length ? [` allowed origins: ${page.allowed_origins.join(", ")}`] : [],
|
|
65
66
|
...page.description ? [` ${page.description}`] : [],
|
|
66
67
|
` ${page.has_document ? `${page.content_type}, ${page.size_bytes} bytes, revision ${page.revision}` : "no content yet"}`,
|
|
67
68
|
` created ${new Date(page.created_at).toISOString()}, updated ${new Date(page.updated_at).toISOString()}`
|
|
@@ -155,6 +156,19 @@ Examples:
|
|
|
155
156
|
print("pages get", options.json, page, pageLines(page));
|
|
156
157
|
})
|
|
157
158
|
);
|
|
159
|
+
pages.command("set-origins <name> [origins...]").description(
|
|
160
|
+
"Replace the HTTPS origins that can read a public page. Omit origins to clear the list."
|
|
161
|
+
).option("--json", "Emit raw JSON response").action(
|
|
162
|
+
async (name, origins, options) => run(async () => {
|
|
163
|
+
const result = await new DeeplineClient().setPageAllowedOrigins(
|
|
164
|
+
name,
|
|
165
|
+
origins
|
|
166
|
+
);
|
|
167
|
+
print("pages set-origins", options.json, result, [
|
|
168
|
+
result.allowed_origins.length ? `Allowed origins for ${name}: ${result.allowed_origins.join(", ")}` : `Cleared allowed origins for ${name}.`
|
|
169
|
+
]);
|
|
170
|
+
})
|
|
171
|
+
);
|
|
158
172
|
pages.command("set-public <name>").description("Make a page visible to anyone with its URL.").option("--json", "Emit raw JSON response").addHelpText(
|
|
159
173
|
"after",
|
|
160
174
|
`
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
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 _chunk5GK6J7MHjs = require('./chunk-5GK6J7MH.js');
|
|
4
|
+
require('./chunk-AOBAVBSX.js');
|
|
5
5
|
require('./chunk-E4CABWXL.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-EQR5O2D2.js');
|
|
7
7
|
require('./chunk-NMU3VR5U.js');
|
|
8
8
|
require('./chunk-XDVT3GOM.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkZL4Q4T3Gjs = require('./chunk-ZL4Q4T3G.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
require('./chunk-
|
|
14
|
+
var _chunkJ55ZM5CKjs = require('./chunk-J55ZM5CK.js');
|
|
15
|
+
require('./chunk-GRIHMNYM.js');
|
|
16
16
|
require('./chunk-ALJJRZNJ.js');
|
|
17
17
|
require('./chunk-XNYIZMNQ.js');
|
|
18
18
|
require('./chunk-DIAWYWT5.js');
|
|
19
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-73CBLBNP.js');
|
|
20
20
|
require('./chunk-OG64RBAC.js');
|
|
21
21
|
require('./chunk-COGTRVWW.js');
|
|
22
22
|
|
|
@@ -62,6 +62,7 @@ function pageLines(page) {
|
|
|
62
62
|
`${page.name}${page.state === "deleting" ? " (deleting)" : ""}`,
|
|
63
63
|
` ${page.url}`,
|
|
64
64
|
` visible to: ${audience(page)}`,
|
|
65
|
+
..._optionalChain([page, 'access', _ => _.allowed_origins, 'optionalAccess', _2 => _2.length]) ? [` allowed origins: ${page.allowed_origins.join(", ")}`] : [],
|
|
65
66
|
...page.description ? [` ${page.description}`] : [],
|
|
66
67
|
` ${page.has_document ? `${page.content_type}, ${page.size_bytes} bytes, revision ${page.revision}` : "no content yet"}`,
|
|
67
68
|
` created ${new Date(page.created_at).toISOString()}, updated ${new Date(page.updated_at).toISOString()}`
|
|
@@ -72,7 +73,7 @@ function linkLine(link) {
|
|
|
72
73
|
return `${link.id} ${expiry}${link.label ? ` ${link.label}` : ""}`;
|
|
73
74
|
}
|
|
74
75
|
function print(command, json, data, lines) {
|
|
75
|
-
|
|
76
|
+
_chunkZL4Q4T3Gjs.printCommandEnvelope.call(void 0,
|
|
76
77
|
{ command, ...data, render: { sections: [{ title: command, lines }] } },
|
|
77
78
|
{ json: Boolean(json), text: `${lines.join("\n")}
|
|
78
79
|
` }
|
|
@@ -88,7 +89,7 @@ async function run(action) {
|
|
|
88
89
|
}
|
|
89
90
|
var HOSTED_PAGES_FEATURE = "hosted-pages";
|
|
90
91
|
function registerPagesCommands(program) {
|
|
91
|
-
const pages = program.command("pages", { hidden: !
|
|
92
|
+
const pages = program.command("pages", { hidden: !_chunkJ55ZM5CKjs.cliFeatureEnabled.call(void 0, HOSTED_PAGES_FEATURE) }).description(
|
|
92
93
|
"Publish documents at stable URLs on deepline.page and share them."
|
|
93
94
|
).addHelpText(
|
|
94
95
|
"after",
|
|
@@ -114,7 +115,7 @@ Examples:
|
|
|
114
115
|
throw new Error("Pass exactly one of --public or --private.");
|
|
115
116
|
}
|
|
116
117
|
const content = await _promises.readFile.call(void 0, options.file);
|
|
117
|
-
const result = await new (0,
|
|
118
|
+
const result = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().writePage(name, {
|
|
118
119
|
public: Boolean(options.public),
|
|
119
120
|
contentBase64: content.toString("base64"),
|
|
120
121
|
contentType: _nullishCoalesce(options.contentType, () => ( inferPageContentType(options.file))),
|
|
@@ -137,7 +138,7 @@ Examples:
|
|
|
137
138
|
`
|
|
138
139
|
).action(
|
|
139
140
|
async (options) => run(async () => {
|
|
140
|
-
const result = await new (0,
|
|
141
|
+
const result = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().listPages({
|
|
141
142
|
cursor: options.cursor,
|
|
142
143
|
limit: options.limit
|
|
143
144
|
});
|
|
@@ -151,10 +152,23 @@ Examples:
|
|
|
151
152
|
);
|
|
152
153
|
pages.command("get <name>").description("Show one page's details.").option("--json", "Emit raw JSON response").action(
|
|
153
154
|
async (name, options) => run(async () => {
|
|
154
|
-
const page = await new (0,
|
|
155
|
+
const page = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().getPage(name);
|
|
155
156
|
print("pages get", options.json, page, pageLines(page));
|
|
156
157
|
})
|
|
157
158
|
);
|
|
159
|
+
pages.command("set-origins <name> [origins...]").description(
|
|
160
|
+
"Replace the HTTPS origins that can read a public page. Omit origins to clear the list."
|
|
161
|
+
).option("--json", "Emit raw JSON response").action(
|
|
162
|
+
async (name, origins, options) => run(async () => {
|
|
163
|
+
const result = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().setPageAllowedOrigins(
|
|
164
|
+
name,
|
|
165
|
+
origins
|
|
166
|
+
);
|
|
167
|
+
print("pages set-origins", options.json, result, [
|
|
168
|
+
result.allowed_origins.length ? `Allowed origins for ${name}: ${result.allowed_origins.join(", ")}` : `Cleared allowed origins for ${name}.`
|
|
169
|
+
]);
|
|
170
|
+
})
|
|
171
|
+
);
|
|
158
172
|
pages.command("set-public <name>").description("Make a page visible to anyone with its URL.").option("--json", "Emit raw JSON response").addHelpText(
|
|
159
173
|
"after",
|
|
160
174
|
`
|
|
@@ -165,7 +179,7 @@ Notes:
|
|
|
165
179
|
`
|
|
166
180
|
).action(
|
|
167
181
|
async (name, options) => run(async () => {
|
|
168
|
-
const page = await new (0,
|
|
182
|
+
const page = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().setPageVisibility(name, true);
|
|
169
183
|
print("pages set-public", options.json, page, [
|
|
170
184
|
`${page.name} is now visible to anyone with its URL.`,
|
|
171
185
|
page.url
|
|
@@ -180,7 +194,7 @@ Notes:
|
|
|
180
194
|
`
|
|
181
195
|
).action(
|
|
182
196
|
async (name, options) => run(async () => {
|
|
183
|
-
const page = await new (0,
|
|
197
|
+
const page = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().setPageVisibility(name, false);
|
|
184
198
|
print("pages set-private", options.json, page, [
|
|
185
199
|
`${page.name} is now visible to workspace members only.`
|
|
186
200
|
]);
|
|
@@ -196,7 +210,7 @@ Notes:
|
|
|
196
210
|
`
|
|
197
211
|
).action(
|
|
198
212
|
async (name, options) => run(async () => {
|
|
199
|
-
const result = await new (0,
|
|
213
|
+
const result = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().deletePage(name);
|
|
200
214
|
print("pages delete", options.json, result, [`Deleted ${name}.`]);
|
|
201
215
|
})
|
|
202
216
|
);
|
|
@@ -213,7 +227,7 @@ Examples:
|
|
|
213
227
|
if (Boolean(options.expiresIn) === Boolean(options.permanent)) {
|
|
214
228
|
throw new Error("Pass exactly one of --expires-in or --permanent.");
|
|
215
229
|
}
|
|
216
|
-
const link = await new (0,
|
|
230
|
+
const link = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().createPageLink(name, {
|
|
217
231
|
expiresInSeconds: options.expiresIn ? parseExpiresIn(options.expiresIn) : void 0,
|
|
218
232
|
permanent: options.permanent ? true : void 0,
|
|
219
233
|
label: options.label
|
|
@@ -227,7 +241,7 @@ Examples:
|
|
|
227
241
|
);
|
|
228
242
|
links.command("list <name>").description("List a page's links. Their URLs cannot be shown again.").option("--json", "Emit raw JSON response").action(
|
|
229
243
|
async (name, options) => run(async () => {
|
|
230
|
-
const result = await new (0,
|
|
244
|
+
const result = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().listPageLinks(name);
|
|
231
245
|
print(
|
|
232
246
|
"pages links list",
|
|
233
247
|
options.json,
|
|
@@ -238,7 +252,7 @@ Examples:
|
|
|
238
252
|
);
|
|
239
253
|
links.command("revoke <name> <link-id>").description("Stop a link working.").option("--json", "Emit raw JSON response").action(
|
|
240
254
|
async (name, linkId, options) => run(async () => {
|
|
241
|
-
const result = await new (0,
|
|
255
|
+
const result = await new (0, _chunk5GK6J7MHjs.DeeplineClient)().revokePageLink(name, linkId);
|
|
242
256
|
print("pages links revoke", options.json, result, [
|
|
243
257
|
`Revoked ${linkId}.`
|
|
244
258
|
]);
|