deepline 0.3.423 → 0.3.425
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.ts +13 -6
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +11 -1
- package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +38 -4
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +12 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-control-plane-capability.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +201 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +42 -5
- package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +5 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/cli/auth-PTKVFEIT.js +40 -0
- package/dist/cli/{auth-L7Q53QKK.mjs → auth-RF5WGHBC.mjs} +4 -4
- package/dist/cli/{billing-QNP6YGI2.js → billing-E4G4QVR5.js} +73 -73
- package/dist/cli/{billing-IH7AKDR2.mjs → billing-P4RUJ4UT.mjs} +4 -4
- package/dist/cli/{chunk-2F5ULM2F.js → chunk-2ACYJZHU.js} +1 -1
- package/dist/cli/{chunk-FJRFSBWO.mjs → chunk-2J2I5A7K.mjs} +4 -4
- package/dist/cli/{chunk-RAL75ND3.js → chunk-53DTOGNJ.js} +2 -2
- package/dist/cli/{chunk-EWWWOKX2.js → chunk-7F6KTNUP.js} +6 -6
- package/dist/cli/{chunk-QN6DG4JO.mjs → chunk-BFVDDMRH.mjs} +2 -2
- package/dist/cli/{chunk-4WT5RISA.js → chunk-CSP5CXTC.js} +20 -20
- package/dist/cli/{chunk-S6KG7JCR.mjs → chunk-E7RPU3VG.mjs} +2 -2
- package/dist/cli/{chunk-44US3EL2.mjs → chunk-FDM3BUIB.mjs} +5 -5
- package/dist/cli/{chunk-OPI7UCQG.mjs → chunk-HT3UBTXV.mjs} +1 -1
- package/dist/cli/{chunk-2U3AMRHF.js → chunk-IJPWBQEA.js} +8 -8
- package/dist/cli/{chunk-YCHR57TD.js → chunk-J6FKYOFB.js} +35 -35
- package/dist/cli/{chunk-YNT7PJND.mjs → chunk-MWR452MP.mjs} +3 -3
- package/dist/cli/{chunk-OZLMMMZH.js → chunk-NC5DYZ36.js} +6 -6
- package/dist/cli/{chunk-6FFORGD2.mjs → chunk-NUET45RU.mjs} +1 -1
- package/dist/cli/{chunk-NFIZ5YED.mjs → chunk-ODO6ZIHB.mjs} +2 -2
- package/dist/cli/{chunk-IW5QK3K6.mjs → chunk-P7SNOFPA.mjs} +3 -3
- package/dist/cli/{chunk-DRK6FYJU.js → chunk-RH2N5JUT.js} +26 -26
- package/dist/cli/{chunk-MHG3NND4.mjs → chunk-RTFXD5ZX.mjs} +3 -3
- package/dist/cli/{chunk-XSERB7H2.mjs → chunk-S5FCTT3E.mjs} +1 -1
- package/dist/cli/{chunk-PQ4G6MKI.js → chunk-SBPPCMZD.js} +16 -16
- package/dist/cli/{chunk-W42SSVM7.js → chunk-U42S2GAF.js} +4 -4
- package/dist/cli/{chunk-PH4BP6KM.mjs → chunk-UDRNGM3S.mjs} +2 -2
- package/dist/cli/{chunk-AVOBDFQ5.js → chunk-UXLJZ4XQ.js} +10 -10
- package/dist/cli/{chunk-QWJJMQNE.mjs → chunk-VYO6TLWN.mjs} +1 -1
- package/dist/cli/{chunk-ARTGL3FM.mjs → chunk-WNXYRODJ.mjs} +1 -1
- package/dist/cli/{chunk-WJO7KIFT.js → chunk-WZLGL37A.js} +50 -50
- package/dist/cli/{chunk-JDAXVQV7.mjs → chunk-XC3J4P5W.mjs} +1 -1
- package/dist/cli/{chunk-H662SHPT.mjs → chunk-XLEA2CGA.mjs} +8 -8
- package/dist/cli/{chunk-5DGR3TB6.js → chunk-XN25EAP6.js} +2 -2
- package/dist/cli/{chunk-NA6SGG7X.js → chunk-XO5RJ3PF.js} +79 -79
- package/dist/cli/{chunk-MMI2DXCW.js → chunk-XSC2FG4V.js} +8 -8
- package/dist/cli/{chunk-OMWO2JLC.js → chunk-ZYUKNQO4.js} +52 -52
- package/dist/cli/{csv-GF7VRES5.js → csv-P32NU7IS.js} +12 -12
- package/dist/cli/{csv-5KW7M6ZS.mjs → csv-XKCR2MB6.mjs} +3 -3
- package/dist/cli/{db-AEDXKB4F.js → db-AHFQJ7ZN.js} +25 -25
- package/dist/cli/{db-NN4JQAC4.mjs → db-ZJQPREBZ.mjs} +4 -4
- package/dist/cli/{describe-RX6VROHQ.mjs → describe-IZNT6RGY.mjs} +12 -12
- package/dist/cli/{describe-5RLXW332.js → describe-YE2WIS23.js} +16 -16
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/{executions-PGIGFDDS.js → executions-EZDFYAWW.js} +6 -6
- package/dist/cli/{executions-EJZ34VUB.mjs → executions-WLRZODFZ.mjs} +4 -4
- package/dist/cli/{feedback-L2ODMANV.js → feedback-A62XZMY2.js} +7 -7
- package/dist/cli/{feedback-6MWOKE7H.mjs → feedback-M6TNBIUP.mjs} +3 -3
- package/dist/cli/git-62FZH46U.js +24 -0
- package/dist/cli/{git-456RF3AT.mjs → git-XYDEA57G.mjs} +4 -4
- package/dist/cli/index.js +131 -131
- package/dist/cli/index.mjs +36 -36
- package/dist/cli/{legacy-noops-MDPB3MIS.js → legacy-noops-D34K4LWU.js} +7 -7
- package/dist/cli/{legacy-noops-ZPRBXQDE.mjs → legacy-noops-S4XSVXIN.mjs} +4 -4
- package/dist/cli/{monitors-TXKR5XYW.js → monitors-VUSDOVGA.js} +97 -91
- package/dist/cli/{monitors-ZLP6A7FT.mjs → monitors-YDHQJMMQ.mjs} +17 -11
- package/dist/cli/{org-YZ62BIGM.mjs → org-EF7Q22GZ.mjs} +4 -4
- package/dist/cli/{org-73SQ3AT2.js → org-IRWGFW3I.js} +64 -64
- package/dist/cli/{play-M75EBXEV.js → play-D54PEGMK.js} +283 -283
- package/dist/cli/{play-VCYQKCKF.mjs → play-Y4O3WFYH.mjs} +10 -10
- package/dist/cli/{providers-GIINJPWQ.js → providers-2NPEOE22.js} +7 -7
- package/dist/cli/{providers-JLA6LST3.mjs → providers-PX672XRG.mjs} +4 -4
- package/dist/cli/{quickstart-HHHLYCHT.js → quickstart-3XXUIDVF.js} +5 -5
- package/dist/cli/{quickstart-AHCU75GG.mjs → quickstart-KSFYOZGU.mjs} +3 -3
- package/dist/cli/{search-5GACUIAX.mjs → search-DIATDWNB.mjs} +5 -5
- package/dist/cli/search-TW7PGWYR.js +30 -0
- package/dist/cli/{secrets-S2NBKAEN.mjs → secrets-HSZNYSHN.mjs} +4 -4
- package/dist/cli/{secrets-PI7IPCOE.js → secrets-S7J53N4D.js} +13 -13
- package/dist/cli/{sessions-IBKYGTBD.mjs → sessions-BLJ5AZ2O.mjs} +4 -4
- package/dist/cli/{sessions-BK4CSRFS.js → sessions-ECOJWISN.js} +5 -5
- package/dist/cli/{settings-JY6UN4KO.mjs → settings-4X2OSKMC.mjs} +8 -8
- package/dist/cli/{settings-2G7TUDM7.js → settings-BMKHMIN2.js} +75 -75
- package/dist/cli/{setup-R424FIBF.js → setup-GOT6Y2E3.js} +42 -42
- package/dist/cli/{setup-HS5X3OSN.mjs → setup-NUEJ22OI.mjs} +7 -7
- package/dist/cli/skills-DCOMWBDX.js +29 -0
- package/dist/cli/{skills-UIBUDTGN.mjs → skills-FCLEKW4O.mjs} +5 -5
- package/dist/cli/{tools-SB4FREB6.mjs → tools-IVCHIOIY.mjs} +12 -12
- package/dist/cli/tools-OAYJGYL7.js +44 -0
- package/dist/cli/update-2DBL37AU.js +31 -0
- package/dist/cli/{update-NJSUE2YU.mjs → update-Y5RO5LSX.mjs} +7 -7
- package/dist/cli/{workflow-HBG76XYX.mjs → workflow-CSVQCXJZ.mjs} +5 -5
- package/dist/cli/{workflow-3AZWZ4J3.js → workflow-XGN3FZAE.js} +15 -15
- package/dist/{client-BTUOYGID.d.mts → client-BcfFWD4Z.d.mts} +9 -6
- package/dist/{client-C668iUhZ.d.ts → client-DH-fmT69.d.ts} +9 -6
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +80 -80
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -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 +1 -1
- package/dist/cli/auth-SUNY477Y.js +0 -40
- package/dist/cli/git-2ZDCRTBD.js +0 -24
- package/dist/cli/search-W2PGBXQO.js +0 -30
- package/dist/cli/skills-M3RZAN4A.js +0 -29
- package/dist/cli/tools-K2GII2PA.js +0 -44
- package/dist/cli/update-C2ORJRXN.js +0 -31
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./chunk-EXMLR72R.mjs";
|
|
2
2
|
import {
|
|
3
3
|
DeeplineClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NUET45RU.mjs";
|
|
5
5
|
import "./chunk-L2VKAASU.mjs";
|
|
6
6
|
import "./chunk-KCC3FKIW.mjs";
|
|
7
7
|
import "./chunk-EIMG75BT.mjs";
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
printCommandEnvelope,
|
|
20
20
|
printJson,
|
|
21
21
|
shouldEmitJson
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-VYO6TLWN.mjs";
|
|
23
|
+
import "./chunk-S5FCTT3E.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AuthError
|
|
26
26
|
} from "./chunk-MAMVGOSC.mjs";
|
|
@@ -28,7 +28,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
28
28
|
import {
|
|
29
29
|
DeeplineError
|
|
30
30
|
} from "./chunk-E4IXDAZI.mjs";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-XC3J4P5W.mjs";
|
|
32
32
|
import "./chunk-WZYKRD7T.mjs";
|
|
33
33
|
import "./chunk-KRD6H754.mjs";
|
|
34
34
|
|
|
@@ -199,6 +199,7 @@ function asString(value) {
|
|
|
199
199
|
}
|
|
200
200
|
var MONITOR_STATES = /* @__PURE__ */ new Set([
|
|
201
201
|
"active",
|
|
202
|
+
"provisioning",
|
|
202
203
|
"billing_suspended",
|
|
203
204
|
"disabled"
|
|
204
205
|
]);
|
|
@@ -698,7 +699,7 @@ async function handleMonitorsList(options) {
|
|
|
698
699
|
const state = options.state ? monitorStateFilter(options.state) : void 0;
|
|
699
700
|
if (options.state !== void 0 && !state) {
|
|
700
701
|
throw new MonitorsUsageError(
|
|
701
|
-
`--state must be active, billing_suspended, disabled, or all; received ${options.state}.`
|
|
702
|
+
`--state must be active, provisioning, billing_suspended, disabled, or all; received ${options.state}.`
|
|
702
703
|
);
|
|
703
704
|
}
|
|
704
705
|
if (options.compact) {
|
|
@@ -2710,8 +2711,10 @@ Examples:
|
|
|
2710
2711
|
"after",
|
|
2711
2712
|
`
|
|
2712
2713
|
Notes:
|
|
2713
|
-
Read-only. A monitor has one of
|
|
2714
|
-
billing_suspended, or disabled.
|
|
2714
|
+
Read-only. A monitor has one of four customer states: active, provisioning,
|
|
2715
|
+
billing_suspended, or disabled. provisioning means the create was recorded
|
|
2716
|
+
but the provider has not confirmed the monitor yet; it delivers no events and
|
|
2717
|
+
does not bill until it becomes active. Cleanup, retries, and failures
|
|
2715
2718
|
are reported by Monitor Jobs; provider disagreement is reported separately by
|
|
2716
2719
|
audit/health. The output echoes the canonical state filter that was applied.
|
|
2717
2720
|
The legacy --status flag remains accepted for installed clients. The response reports
|
|
@@ -2726,6 +2729,7 @@ Notes:
|
|
|
2726
2729
|
|
|
2727
2730
|
Examples:
|
|
2728
2731
|
deepline monitors list
|
|
2732
|
+
deepline monitors list --state provisioning
|
|
2729
2733
|
deepline monitors list --state billing_suspended
|
|
2730
2734
|
deepline monitors list --state all
|
|
2731
2735
|
deepline monitors list --status all
|
|
@@ -2734,10 +2738,10 @@ Examples:
|
|
|
2734
2738
|
`
|
|
2735
2739
|
).option(
|
|
2736
2740
|
"--state <state>",
|
|
2737
|
-
"Filter by customer state: active (default), billing_suspended, disabled, or all"
|
|
2741
|
+
"Filter by customer state: active (default), provisioning, billing_suspended, disabled, or all"
|
|
2738
2742
|
).option(
|
|
2739
2743
|
"--status <status>",
|
|
2740
|
-
"Deprecated compatibility filter; use --state (active, billing_suspended, disabled, or all)"
|
|
2744
|
+
"Deprecated compatibility filter; use --state (active, provisioning, billing_suspended, disabled, or all)"
|
|
2741
2745
|
).option("--limit <n>", "Limit the number of deployed monitors returned").option(
|
|
2742
2746
|
"--cursor <cursor>",
|
|
2743
2747
|
"Page past a truncated result using the next_cursor from a prior list response"
|
|
@@ -2901,6 +2905,8 @@ Notes:
|
|
|
2901
2905
|
DESTRUCTIVE. Deprovisions the upstream provider resource and removes its
|
|
2902
2906
|
Deepline-managed monitor. Retries are safe: a delete that already reached its requested terminal state
|
|
2903
2907
|
returns already_deleted without making another upstream call.
|
|
2908
|
+
A delete of a provisioning monitor returns delete_pending: true; the monitor
|
|
2909
|
+
is deleted as soon as its create settles.
|
|
2904
2910
|
--dry-run shows the delete plan without deleting anything.
|
|
2905
2911
|
Interactive terminals get a y/N confirmation; non-interactive runs (agents,
|
|
2906
2912
|
scripts, pipes) must pass --yes.
|
|
@@ -3204,10 +3210,10 @@ Example:
|
|
|
3204
3210
|
const deployed = withJsonOption(
|
|
3205
3211
|
monitors.command("deployed", { hidden: true }).description("Alias of `monitors list` (plus get/update/delete aliases).").option(
|
|
3206
3212
|
"--state <state>",
|
|
3207
|
-
"Filter by customer state: active (default), billing_suspended, disabled, or all"
|
|
3213
|
+
"Filter by customer state: active (default), provisioning, billing_suspended, disabled, or all"
|
|
3208
3214
|
).option(
|
|
3209
3215
|
"--status <status>",
|
|
3210
|
-
"Deprecated compatibility filter; use --state (active, billing_suspended, disabled, or all)"
|
|
3216
|
+
"Deprecated compatibility filter; use --state (active, provisioning, billing_suspended, disabled, or all)"
|
|
3211
3217
|
).option("--limit <n>", "Limit the number of deployed monitors returned").option(
|
|
3212
3218
|
"--cursor <cursor>",
|
|
3213
3219
|
"Page past a truncated result using the next_cursor from a prior list response"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NUET45RU.mjs";
|
|
4
4
|
import "./chunk-L2VKAASU.mjs";
|
|
5
5
|
import "./chunk-KCC3FKIW.mjs";
|
|
6
6
|
import "./chunk-EIMG75BT.mjs";
|
|
7
7
|
import "./chunk-UBKA33KY.mjs";
|
|
8
8
|
import {
|
|
9
9
|
printCommandEnvelope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VYO6TLWN.mjs";
|
|
11
11
|
import {
|
|
12
12
|
ACTIVE_ORG_ID_ENV,
|
|
13
13
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
saveProjectDeeplineEnvValues,
|
|
29
29
|
sdkCliStateDirPath,
|
|
30
30
|
storedHostFeatures
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-S5FCTT3E.mjs";
|
|
32
32
|
import "./chunk-MAMVGOSC.mjs";
|
|
33
33
|
import "./chunk-DLIRSHV6.mjs";
|
|
34
34
|
import "./chunk-E4IXDAZI.mjs";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-XC3J4P5W.mjs";
|
|
36
36
|
import "./chunk-WZYKRD7T.mjs";
|
|
37
37
|
import "./chunk-KRD6H754.mjs";
|
|
38
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 _chunkUXLJZ4XQjs = require('./chunk-UXLJZ4XQ.js');
|
|
4
4
|
require('./chunk-E4CABWXL.js');
|
|
5
5
|
require('./chunk-2H4EY7KH.js');
|
|
6
6
|
require('./chunk-KXMNM4AQ.js');
|
|
7
7
|
require('./chunk-XDVT3GOM.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk7F6KTNUPjs = require('./chunk-7F6KTNUP.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -28,11 +28,11 @@ var _chunkEWWWOKX2js = require('./chunk-EWWWOKX2.js');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkU42S2GAFjs = require('./chunk-U42S2GAF.js');
|
|
32
32
|
require('./chunk-NPBJI7RE.js');
|
|
33
33
|
require('./chunk-XNYIZMNQ.js');
|
|
34
34
|
require('./chunk-PPDBRJRW.js');
|
|
35
|
-
require('./chunk-
|
|
35
|
+
require('./chunk-2ACYJZHU.js');
|
|
36
36
|
require('./chunk-OG64RBAC.js');
|
|
37
37
|
require('./chunk-COGTRVWW.js');
|
|
38
38
|
|
|
@@ -48,7 +48,7 @@ var _fs = require('fs');
|
|
|
48
48
|
var _path = require('path');
|
|
49
49
|
function pendingOrgCreatePath(baseUrl, accountId, sourceOrgId, name) {
|
|
50
50
|
const intent = _crypto.createHash.call(void 0, "sha256").update(accountId).update("\0").update(sourceOrgId).update("\0").update(name).digest("hex");
|
|
51
|
-
return _path.join.call(void 0,
|
|
51
|
+
return _path.join.call(void 0, _chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, baseUrl), `pending-org-create-${intent}.json`);
|
|
52
52
|
}
|
|
53
53
|
function readPendingOrgCreate(path, accountId, sourceOrgId, name) {
|
|
54
54
|
let value;
|
|
@@ -67,7 +67,7 @@ function readPendingOrgCreate(path, accountId, sourceOrgId, name) {
|
|
|
67
67
|
return value;
|
|
68
68
|
}
|
|
69
69
|
function loadOrCreatePendingOrgCreate(input) {
|
|
70
|
-
const stateDir =
|
|
70
|
+
const stateDir = _chunkU42S2GAFjs.sdkCliStateDirPath.call(void 0, input.baseUrl);
|
|
71
71
|
const path = pendingOrgCreatePath(
|
|
72
72
|
input.baseUrl,
|
|
73
73
|
input.accountId,
|
|
@@ -152,11 +152,11 @@ function processEnvValue(name) {
|
|
|
152
152
|
}
|
|
153
153
|
function organizationAuthValues(input) {
|
|
154
154
|
return {
|
|
155
|
-
[
|
|
156
|
-
[
|
|
157
|
-
[
|
|
158
|
-
[
|
|
159
|
-
...
|
|
155
|
+
[_chunkU42S2GAFjs.HOST_URL_ENV]: input.baseUrl,
|
|
156
|
+
[_chunkU42S2GAFjs.API_KEY_ENV]: input.apiKey,
|
|
157
|
+
[_chunkU42S2GAFjs.ACTIVE_ORG_ID_ENV]: input.orgId,
|
|
158
|
+
[_chunkU42S2GAFjs.ACTIVE_ORG_NAME_ENV]: input.orgName,
|
|
159
|
+
..._chunkU42S2GAFjs.featureEnvValues.call(void 0, input)
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
162
|
function organizationCommandContext(input) {
|
|
@@ -170,14 +170,14 @@ function organizationCommandContext(input) {
|
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
function agentCommandContext(commandContext) {
|
|
173
|
-
return
|
|
173
|
+
return _chunkU42S2GAFjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? { command_context: commandContext } : {};
|
|
174
174
|
}
|
|
175
175
|
function resolveOrgSwitchAuthTarget(scope, config) {
|
|
176
|
-
const activeProject =
|
|
176
|
+
const activeProject = _chunkU42S2GAFjs.getResolvedProjectAuthSource.call(void 0,
|
|
177
177
|
config.baseUrl,
|
|
178
178
|
config.apiKey
|
|
179
179
|
);
|
|
180
|
-
const folderTarget =
|
|
180
|
+
const folderTarget = _chunkU42S2GAFjs.resolveProjectPinTarget.call(void 0, );
|
|
181
181
|
const globalOverrideWarning = activeProject && scope === "global" ? [
|
|
182
182
|
`Folder auth in ${activeProject.filePath} overrides global auth for commands run here.`
|
|
183
183
|
] : [];
|
|
@@ -249,10 +249,10 @@ function resolveOrgSwitchAuthTarget(scope, config) {
|
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
251
|
async function handleOrgList(options) {
|
|
252
|
-
const config =
|
|
253
|
-
const http = new (0,
|
|
252
|
+
const config = _chunkU42S2GAFjs.resolveConfig.call(void 0, );
|
|
253
|
+
const http = new (0, _chunkU42S2GAFjs.HttpClient)(config);
|
|
254
254
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
255
|
-
|
|
255
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
256
256
|
{
|
|
257
257
|
...payload,
|
|
258
258
|
render: {
|
|
@@ -268,22 +268,22 @@ async function handleOrgList(options) {
|
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
270
|
async function handleOrgStatus(options) {
|
|
271
|
-
const config =
|
|
272
|
-
const http = new (0,
|
|
271
|
+
const config = _chunkU42S2GAFjs.resolveConfig.call(void 0, );
|
|
272
|
+
const http = new (0, _chunkU42S2GAFjs.HttpClient)(config);
|
|
273
273
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
274
274
|
const current = _nullishCoalesce(_nullishCoalesce(payload.organizations.find((org) => org.is_current), () => ( payload.organizations.find(
|
|
275
275
|
(org) => org.org_id === payload.current_org_id
|
|
276
276
|
))), () => ( null));
|
|
277
|
-
const projectCandidate =
|
|
278
|
-
const activeProject =
|
|
277
|
+
const projectCandidate = _chunkU42S2GAFjs.getActiveProjectAuthSource.call(void 0, );
|
|
278
|
+
const activeProject = _chunkU42S2GAFjs.getResolvedProjectAuthSource.call(void 0,
|
|
279
279
|
config.baseUrl,
|
|
280
280
|
config.apiKey
|
|
281
281
|
);
|
|
282
|
-
const folderTarget =
|
|
283
|
-
const provenance =
|
|
284
|
-
const hostPath =
|
|
285
|
-
const envApiKey = processEnvValue(
|
|
286
|
-
const envHostUrl = processEnvValue(
|
|
282
|
+
const folderTarget = _chunkU42S2GAFjs.resolveProjectPinTarget.call(void 0, );
|
|
283
|
+
const provenance = _chunkU42S2GAFjs.resolveCliAuthProvenance.call(void 0, config);
|
|
284
|
+
const hostPath = _chunkU42S2GAFjs.hostEnvFilePath.call(void 0, config.baseUrl);
|
|
285
|
+
const envApiKey = processEnvValue(_chunkU42S2GAFjs.API_KEY_ENV);
|
|
286
|
+
const envHostUrl = processEnvValue(_chunkU42S2GAFjs.HOST_URL_ENV);
|
|
287
287
|
const authSource = envApiKey ? {
|
|
288
288
|
scope: "env",
|
|
289
289
|
source: "process",
|
|
@@ -324,17 +324,17 @@ async function handleOrgStatus(options) {
|
|
|
324
324
|
if (authSource.path) {
|
|
325
325
|
lines.push(`Auth file: ${authSource.path}`);
|
|
326
326
|
} else {
|
|
327
|
-
lines.push(`Auth source: ${
|
|
327
|
+
lines.push(`Auth source: ${_chunkU42S2GAFjs.API_KEY_ENV} process environment`);
|
|
328
328
|
}
|
|
329
329
|
if (envApiKey) {
|
|
330
|
-
lines.push(`${
|
|
330
|
+
lines.push(`${_chunkU42S2GAFjs.API_KEY_ENV} overrides saved auth for this process.`);
|
|
331
331
|
} else if (activeProject) {
|
|
332
332
|
lines.push("Global auth is overridden in this folder.");
|
|
333
333
|
} else if (provenance.scope === "global" && provenance.project.state === "project") {
|
|
334
334
|
lines.push("Cloud mutations are blocked until this project is pinned.");
|
|
335
335
|
lines.push("Pin it: deepline org set --auth-scope folder");
|
|
336
336
|
}
|
|
337
|
-
|
|
337
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
338
338
|
{
|
|
339
339
|
ok: true,
|
|
340
340
|
host: config.baseUrl,
|
|
@@ -368,25 +368,25 @@ async function handleOrgStatus(options) {
|
|
|
368
368
|
}
|
|
369
369
|
async function handleOrgSwitch(selection, options) {
|
|
370
370
|
const authScope = normalizeAuthScope(options.authScope);
|
|
371
|
-
const config =
|
|
372
|
-
const provenance =
|
|
371
|
+
const config = _chunkU42S2GAFjs.resolveConfig.call(void 0, );
|
|
372
|
+
const provenance = _chunkU42S2GAFjs.resolveCliAuthProvenance.call(void 0, config);
|
|
373
373
|
if (!selection && !options.orgId && authScope === "folder" && provenance.scope === "global" && provenance.project.state === "project") {
|
|
374
|
-
const commandContext =
|
|
374
|
+
const commandContext = _chunkU42S2GAFjs.resolveCliCommandContext.call(void 0, config);
|
|
375
375
|
const activeOrganization = commandContext.active_organization;
|
|
376
|
-
const pinnedFeatures =
|
|
377
|
-
const project_env_paths2 =
|
|
376
|
+
const pinnedFeatures = _chunkU42S2GAFjs.storedHostFeatures.call(void 0, config.baseUrl);
|
|
377
|
+
const project_env_paths2 = _chunkU42S2GAFjs.saveProjectDeeplineEnvValues.call(void 0,
|
|
378
378
|
{
|
|
379
|
-
[
|
|
380
|
-
[
|
|
379
|
+
[_chunkU42S2GAFjs.HOST_URL_ENV]: config.baseUrl,
|
|
380
|
+
[_chunkU42S2GAFjs.API_KEY_ENV]: config.apiKey,
|
|
381
381
|
...activeOrganization ? {
|
|
382
|
-
[
|
|
383
|
-
[
|
|
382
|
+
[_chunkU42S2GAFjs.ACTIVE_ORG_ID_ENV]: activeOrganization.org_id,
|
|
383
|
+
[_chunkU42S2GAFjs.ACTIVE_ORG_NAME_ENV]: _nullishCoalesce(activeOrganization.org_name, () => ( ""))
|
|
384
384
|
} : {},
|
|
385
|
-
...pinnedFeatures !== void 0 ? { [
|
|
385
|
+
...pinnedFeatures !== void 0 ? { [_chunkU42S2GAFjs.FEATURES_ENV]: pinnedFeatures } : {}
|
|
386
386
|
},
|
|
387
387
|
provenance.project.dir
|
|
388
388
|
);
|
|
389
|
-
|
|
389
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
390
390
|
{
|
|
391
391
|
ok: true,
|
|
392
392
|
unchanged: true,
|
|
@@ -398,7 +398,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
398
398
|
orgId: activeOrganization.org_id,
|
|
399
399
|
orgName: activeOrganization.org_name,
|
|
400
400
|
authScope: "folder"
|
|
401
|
-
}) :
|
|
401
|
+
}) : _chunkU42S2GAFjs.resolveCliCommandContext.call(void 0, config, "folder")
|
|
402
402
|
),
|
|
403
403
|
project_env_paths: project_env_paths2,
|
|
404
404
|
next: { status: "deepline org status" },
|
|
@@ -419,10 +419,10 @@ async function handleOrgSwitch(selection, options) {
|
|
|
419
419
|
);
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
|
-
const http = new (0,
|
|
422
|
+
const http = new (0, _chunkU42S2GAFjs.HttpClient)(config);
|
|
423
423
|
const payload = await fetchOrganizations(http, config.apiKey);
|
|
424
424
|
if (!selection && !options.orgId) {
|
|
425
|
-
|
|
425
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
426
426
|
{
|
|
427
427
|
...payload,
|
|
428
428
|
next: { set: "deepline org set <number>" },
|
|
@@ -473,9 +473,9 @@ async function handleOrgSwitch(selection, options) {
|
|
|
473
473
|
features
|
|
474
474
|
});
|
|
475
475
|
if (authTarget.kind === "folder") {
|
|
476
|
-
project_env_paths2 =
|
|
476
|
+
project_env_paths2 = _chunkU42S2GAFjs.saveProjectDeeplineEnvValues.call(void 0, authValues2);
|
|
477
477
|
} else {
|
|
478
|
-
|
|
478
|
+
_chunkU42S2GAFjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues2);
|
|
479
479
|
}
|
|
480
480
|
const renderLines2 = [`Already on ${target.name}.`];
|
|
481
481
|
for (const projectPath of project_env_paths2) {
|
|
@@ -483,7 +483,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
483
483
|
}
|
|
484
484
|
if (authTarget.kind === "global") {
|
|
485
485
|
renderLines2.push(
|
|
486
|
-
`Saved global auth in ${
|
|
486
|
+
`Saved global auth in ${_chunkU42S2GAFjs.hostEnvFilePath.call(void 0, config.baseUrl)}`
|
|
487
487
|
);
|
|
488
488
|
}
|
|
489
489
|
renderLines2.push(
|
|
@@ -499,7 +499,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
499
499
|
...options.deprecatedSwitch ? ["org switch is deprecated; use org set."] : [],
|
|
500
500
|
...authTarget.warnings
|
|
501
501
|
];
|
|
502
|
-
|
|
502
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
503
503
|
{
|
|
504
504
|
ok: true,
|
|
505
505
|
unchanged: true,
|
|
@@ -515,7 +515,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
515
515
|
authScope: authTarget.effective_scope
|
|
516
516
|
})
|
|
517
517
|
),
|
|
518
|
-
host_env_path: authTarget.kind === "global" ?
|
|
518
|
+
host_env_path: authTarget.kind === "global" ? _chunkU42S2GAFjs.hostEnvFilePath.call(void 0, config.baseUrl) : null,
|
|
519
519
|
project_env_paths: project_env_paths2,
|
|
520
520
|
deprecated_command: options.deprecatedSwitch ? "org switch" : null,
|
|
521
521
|
replacement_command: options.deprecatedSwitch ? "deepline org set" : null,
|
|
@@ -541,9 +541,9 @@ async function handleOrgSwitch(selection, options) {
|
|
|
541
541
|
features: switched.features
|
|
542
542
|
});
|
|
543
543
|
if (authTarget.kind === "folder") {
|
|
544
|
-
project_env_paths =
|
|
544
|
+
project_env_paths = _chunkU42S2GAFjs.saveProjectDeeplineEnvValues.call(void 0, authValues);
|
|
545
545
|
} else {
|
|
546
|
-
|
|
546
|
+
_chunkU42S2GAFjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues);
|
|
547
547
|
}
|
|
548
548
|
const { api_key: _apiKey, ...publicSwitched } = switched;
|
|
549
549
|
const renderLines = [`Switched to ${switched.org_name}.`];
|
|
@@ -552,7 +552,7 @@ async function handleOrgSwitch(selection, options) {
|
|
|
552
552
|
renderLines.push(`Saved folder auth in ${projectPath}`);
|
|
553
553
|
}
|
|
554
554
|
} else {
|
|
555
|
-
renderLines.push(`Saved global auth in ${
|
|
555
|
+
renderLines.push(`Saved global auth in ${_chunkU42S2GAFjs.hostEnvFilePath.call(void 0, config.baseUrl)}`);
|
|
556
556
|
}
|
|
557
557
|
renderLines.push(
|
|
558
558
|
`Scope: ${authTarget.requested_scope} -> ${authTarget.effective_scope} (${authTarget.reason})`
|
|
@@ -567,10 +567,10 @@ async function handleOrgSwitch(selection, options) {
|
|
|
567
567
|
...options.deprecatedSwitch ? ["org switch is deprecated; use org set."] : [],
|
|
568
568
|
...authTarget.warnings
|
|
569
569
|
];
|
|
570
|
-
|
|
570
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
571
571
|
{
|
|
572
572
|
ok: true,
|
|
573
|
-
host_env_path: authTarget.kind === "global" ?
|
|
573
|
+
host_env_path: authTarget.kind === "global" ? _chunkU42S2GAFjs.hostEnvFilePath.call(void 0, config.baseUrl) : null,
|
|
574
574
|
project_env_paths,
|
|
575
575
|
...publicSwitched,
|
|
576
576
|
api_key_saved: true,
|
|
@@ -601,12 +601,12 @@ async function handleOrgSwitch(selection, options) {
|
|
|
601
601
|
);
|
|
602
602
|
}
|
|
603
603
|
async function handleOrgCreate(name, options) {
|
|
604
|
-
const config =
|
|
604
|
+
const config = _chunkU42S2GAFjs.resolveConfig.call(void 0, );
|
|
605
605
|
const normalizedName = name.trim();
|
|
606
606
|
if (!normalizedName) {
|
|
607
607
|
throw new Error("Workspace name is required.");
|
|
608
608
|
}
|
|
609
|
-
const http = new (0,
|
|
609
|
+
const http = new (0, _chunkU42S2GAFjs.HttpClient)(config);
|
|
610
610
|
const identity = await fetchWorkspaceCreationIdentity(http, config.apiKey);
|
|
611
611
|
let created;
|
|
612
612
|
let workspaceApiKey;
|
|
@@ -632,7 +632,7 @@ async function handleOrgCreate(name, options) {
|
|
|
632
632
|
sourceOrgId: identity.orgId,
|
|
633
633
|
name: normalizedName
|
|
634
634
|
});
|
|
635
|
-
const workspace = await new (0,
|
|
635
|
+
const workspace = await new (0, _chunkUXLJZ4XQjs.DeeplineClient)({
|
|
636
636
|
apiKey: config.apiKey,
|
|
637
637
|
baseUrl: config.baseUrl
|
|
638
638
|
}).workspaces.create({
|
|
@@ -655,16 +655,16 @@ async function handleOrgCreate(name, options) {
|
|
|
655
655
|
orgName: created.org_name,
|
|
656
656
|
features: workspaceFeatures
|
|
657
657
|
});
|
|
658
|
-
|
|
658
|
+
_chunkU42S2GAFjs.saveHostEnvValues.call(void 0, config.baseUrl, authValues);
|
|
659
659
|
if (pendingIntentPath) _fs.unlinkSync.call(void 0, pendingIntentPath);
|
|
660
|
-
|
|
660
|
+
_chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
661
661
|
{
|
|
662
662
|
ok: true,
|
|
663
663
|
...created,
|
|
664
664
|
initial_credits: typeof created.initial_credits === "number" ? created.initial_credits : 0,
|
|
665
665
|
api_key_saved: true,
|
|
666
666
|
switched: true,
|
|
667
|
-
host_env_path:
|
|
667
|
+
host_env_path: _chunkU42S2GAFjs.hostEnvFilePath.call(void 0, config.baseUrl),
|
|
668
668
|
...agentCommandContext(
|
|
669
669
|
organizationCommandContext({
|
|
670
670
|
orgId: created.org_id,
|
|
@@ -679,7 +679,7 @@ async function handleOrgCreate(name, options) {
|
|
|
679
679
|
lines: [
|
|
680
680
|
`Created organization: ${created.org_name}.`,
|
|
681
681
|
`Switched to ${created.org_name}.`,
|
|
682
|
-
`Saved host auth in ${
|
|
682
|
+
`Saved host auth in ${_chunkU42S2GAFjs.hostEnvFilePath.call(void 0, config.baseUrl)}`
|
|
683
683
|
]
|
|
684
684
|
}
|
|
685
685
|
]
|
|
@@ -731,7 +731,7 @@ Examples:
|
|
|
731
731
|
);
|
|
732
732
|
const sso = org.command("sso").description("Manage Enterprise workspace SSO.");
|
|
733
733
|
const ssoPath = "/api/v2/auth/workspace/sso";
|
|
734
|
-
const printSso = (payload, json) =>
|
|
734
|
+
const printSso = (payload, json) => _chunk7F6KTNUPjs.printCommandEnvelope.call(void 0,
|
|
735
735
|
{
|
|
736
736
|
...payload,
|
|
737
737
|
render: {
|
|
@@ -755,7 +755,7 @@ Examples:
|
|
|
755
755
|
},
|
|
756
756
|
{ json }
|
|
757
757
|
);
|
|
758
|
-
const ssoHttp = () => new (0,
|
|
758
|
+
const ssoHttp = () => new (0, _chunkU42S2GAFjs.HttpClient)(_chunkU42S2GAFjs.resolveConfig.call(void 0, ));
|
|
759
759
|
sso.command("status").description("Show this workspace's SSO connection and plan eligibility.").option("--json", "Emit JSON output").action(async (options) => {
|
|
760
760
|
printSso(await ssoHttp().get(ssoPath), options.json);
|
|
761
761
|
});
|
|
@@ -786,8 +786,8 @@ Examples:
|
|
|
786
786
|
"Identity provider metadata XML file"
|
|
787
787
|
).option("--json", "Emit JSON output").action(
|
|
788
788
|
async (options) => {
|
|
789
|
-
const config =
|
|
790
|
-
const http = new (0,
|
|
789
|
+
const config = _chunkU42S2GAFjs.resolveConfig.call(void 0, );
|
|
790
|
+
const http = new (0, _chunkU42S2GAFjs.HttpClient)(config);
|
|
791
791
|
const identity = await fetchWorkspaceCreationIdentity(
|
|
792
792
|
http,
|
|
793
793
|
config.apiKey
|