@kukeon/console 0.10.0-edge.g21af9f59 → 0.10.0-edge.g4f69f964
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/assignments-Biqg1AT0.js +257 -0
- package/dist/assignments-tab.d.ts +4 -0
- package/dist/assignments.d.mts +40 -0
- package/dist/catalog-B29wwZiy.js +1949 -0
- package/dist/{connector-ui-lYy-1M3l.js → connector-ui-CG9kLZ5s.js} +329 -305
- package/dist/connector-ui.d.ts +3 -1
- package/dist/connectors-page-ZyuSRdHC.js +241 -0
- package/dist/connectors-page.d.ts +1 -7
- package/dist/connectors.d.mts +1 -0
- package/dist/daemon-CLdOLhDb.js +394 -0
- package/dist/daemon.d.ts +1 -1
- package/dist/identities-page-CyW0d5n2.js +2137 -0
- package/dist/identities-page.d.ts +15 -0
- package/dist/identities.d.mts +24 -0
- package/dist/index.js +1433 -1787
- package/dist/{initialize-CGmYWoaj.js → initialize-CAOkMhlL.js} +12 -12
- package/dist/majordomo-p7giptj3.js +3782 -0
- package/dist/{merged-values-BhW2-nlA.js → merged-values-CBzWsNOS.js} +38 -38
- package/dist/{new-agent-24Fcf0PI.js → new-agent-BweyzBnY.js} +6 -6
- package/dist/{new-cell-u87hB9wV.js → new-cell-Iceq2Zfv.js} +501 -501
- package/dist/{new-config-B_uf4R4e.js → new-config-C9NSC9Ou.js} +99 -99
- package/dist/{onboarding-CPDpnS7K.js → onboarding-oZBJXTy0.js} +12 -12
- package/dist/recording-source.d.ts +37 -0
- package/dist/recording.d.mts +24 -0
- package/dist/replay.d.ts +14 -0
- package/dist/routes.d.ts +3 -1
- package/dist/{schedule-B08uvsJe.js → schedule-DzQ3Homi.js} +1 -1
- package/dist/{sources-page-C4t29wxJ.js → sources-page-CxMSM-sz.js} +90 -90
- package/dist/style.css +1 -1
- package/dist/{team-plan-CaBIrof0.js → team-plan-CFOIv1lN.js} +36 -36
- package/dist/teams-page-C6UGy4Fw.js +2216 -0
- package/dist/teams.d.mts +5 -3
- package/package.json +4 -4
- package/dist/catalog-CBVxh9uQ.js +0 -5005
- package/dist/connectors-page-Z7acjRvr.js +0 -1460
- package/dist/teams-page-CLdQhhgo.js +0 -2206
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { hn as e, kn as t, qt as n, un as r } from "./connector-ui-CG9kLZ5s.js";
|
|
2
|
+
// src/assignments.mjs
|
|
3
|
+
var i = (e) => Array.isArray(e) ? e : [], a = (e) => typeof e == "string" ? e.trim() : "", o = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : {}, s = "inherit", c = "system", l = "method:";
|
|
4
|
+
function u(e) {
|
|
5
|
+
return i(e).filter((e) => a(e?.harness));
|
|
6
|
+
}
|
|
7
|
+
function d(e) {
|
|
8
|
+
let t = i(e?.methods);
|
|
9
|
+
return t.find((e) => e?.default) ?? t[0];
|
|
10
|
+
}
|
|
11
|
+
function f(e, t) {
|
|
12
|
+
return t ? i(e?.methods).find((e) => e?.name === t) : d(e);
|
|
13
|
+
}
|
|
14
|
+
function p(e, t) {
|
|
15
|
+
return f(e, t)?.delivery === n;
|
|
16
|
+
}
|
|
17
|
+
function m(e) {
|
|
18
|
+
let n = t(e);
|
|
19
|
+
return n ? `${n.name}@${[
|
|
20
|
+
n.realm,
|
|
21
|
+
n.space,
|
|
22
|
+
n.stack
|
|
23
|
+
].filter(Boolean).join("/")}` : "";
|
|
24
|
+
}
|
|
25
|
+
function h(e, n = "default") {
|
|
26
|
+
let r = a(e);
|
|
27
|
+
if (!r) return;
|
|
28
|
+
let [i, o] = r.split("@"), [s, c, l] = (o ?? n).split("/");
|
|
29
|
+
return t({
|
|
30
|
+
name: i,
|
|
31
|
+
realm: s,
|
|
32
|
+
space: c,
|
|
33
|
+
stack: l
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
var g = (t, n, r) => !!t && !!n && e(h(t, r)) === e(h(n, r));
|
|
37
|
+
function _(e) {
|
|
38
|
+
let t = o(e), n = {};
|
|
39
|
+
for (let e of [
|
|
40
|
+
"method",
|
|
41
|
+
"identity",
|
|
42
|
+
"state"
|
|
43
|
+
]) a(t[e]) && (n[e] = a(t[e]));
|
|
44
|
+
return n;
|
|
45
|
+
}
|
|
46
|
+
function v(e, t) {
|
|
47
|
+
return JSON.stringify(_(e)) === JSON.stringify(_(t));
|
|
48
|
+
}
|
|
49
|
+
function y(e, t) {
|
|
50
|
+
let n = _(e), r = _(t);
|
|
51
|
+
return r.method ? r : _({
|
|
52
|
+
method: n.method,
|
|
53
|
+
identity: r.identity || n.identity,
|
|
54
|
+
state: r.state || n.state
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function b({ name: e, defaults: t, team: n, role: r }) {
|
|
58
|
+
let i = (n?.inherit ? o(t) : o(n?.items))[e];
|
|
59
|
+
return r?.set ? {
|
|
60
|
+
found: !0,
|
|
61
|
+
choice: i ? y(i, r) : _(r),
|
|
62
|
+
from: "role"
|
|
63
|
+
} : i ? {
|
|
64
|
+
found: !0,
|
|
65
|
+
choice: _(i),
|
|
66
|
+
from: n?.inherit ? "defaults" : "team"
|
|
67
|
+
} : {
|
|
68
|
+
found: !1,
|
|
69
|
+
choice: {},
|
|
70
|
+
from: ""
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function x(e, t) {
|
|
74
|
+
let n = i(e).find((e) => e?.connector === t?.name && i(e.usedBy).some((e) => e?.role === "default/agent"));
|
|
75
|
+
return n ? m(n.volume) : "";
|
|
76
|
+
}
|
|
77
|
+
function S(e, t, n, r = "default") {
|
|
78
|
+
let i = _(e);
|
|
79
|
+
return p(t, i.method) ? i.identity ? n && g(i.identity, n, r) ? c : `id:${i.identity}` : "own" : `${l}${i.method ?? d(t)?.name ?? ""}`;
|
|
80
|
+
}
|
|
81
|
+
function C(e, t, n, i = "") {
|
|
82
|
+
let a = r(t)[0]?.name ?? "";
|
|
83
|
+
return e === "own" ? { method: a } : e === "system" ? {
|
|
84
|
+
method: a,
|
|
85
|
+
identity: n
|
|
86
|
+
} : e.startsWith("id:") ? {
|
|
87
|
+
method: a,
|
|
88
|
+
identity: e.slice(3)
|
|
89
|
+
} : e.startsWith("method:") ? _({
|
|
90
|
+
method: e.slice(7),
|
|
91
|
+
state: i
|
|
92
|
+
}) : {};
|
|
93
|
+
}
|
|
94
|
+
function w(e, t, n, r = "default") {
|
|
95
|
+
if (!e?.found) return "own per role";
|
|
96
|
+
let i = S(e.choice, t, n, r);
|
|
97
|
+
if (i === "own") return "own per role";
|
|
98
|
+
if (i === "system") return "System default";
|
|
99
|
+
if (i.startsWith("id:")) return i.slice(3).split("@")[0];
|
|
100
|
+
let a = e.choice.state ? ` · ${e.choice.state}` : "";
|
|
101
|
+
return `${i.slice(7)}${a}`;
|
|
102
|
+
}
|
|
103
|
+
function T(e, t, n) {
|
|
104
|
+
let r = a(n?.harness);
|
|
105
|
+
return a(e?.harness) ? a(e.harness) === r : i(t).some((e) => a(e?.name ?? e) === r);
|
|
106
|
+
}
|
|
107
|
+
function E(e, t) {
|
|
108
|
+
let n = [{
|
|
109
|
+
key: "defaults",
|
|
110
|
+
kind: "defaults",
|
|
111
|
+
label: "All teams (defaults)"
|
|
112
|
+
}];
|
|
113
|
+
for (let e of i(t)) {
|
|
114
|
+
let t = a(e?.summary?.name);
|
|
115
|
+
if (t && e.form) {
|
|
116
|
+
n.push({
|
|
117
|
+
key: `team:${t}`,
|
|
118
|
+
kind: "team",
|
|
119
|
+
team: t,
|
|
120
|
+
label: t,
|
|
121
|
+
system: !!e.summary.system
|
|
122
|
+
});
|
|
123
|
+
for (let r of i(e.view?.roles?.items)) n.push({
|
|
124
|
+
key: `role:${t}/${r.name}`,
|
|
125
|
+
kind: "role",
|
|
126
|
+
team: t,
|
|
127
|
+
role: a(r.name),
|
|
128
|
+
label: a(r.name),
|
|
129
|
+
harness: a(r.harness)
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return n;
|
|
134
|
+
}
|
|
135
|
+
function D(e, t, n) {
|
|
136
|
+
return i(i(e?.roles?.items).find((e) => e?.name === t)?.harnessConnectors).find((e) => e?.name === n);
|
|
137
|
+
}
|
|
138
|
+
function O({ row: e, connector: t, defaults: n, team: r, system: i }) {
|
|
139
|
+
let a = t.name;
|
|
140
|
+
if (e.kind === "defaults") {
|
|
141
|
+
let e = o(n)[a];
|
|
142
|
+
return {
|
|
143
|
+
own: e ? _(e) : void 0,
|
|
144
|
+
resolved: {
|
|
145
|
+
found: !!e,
|
|
146
|
+
choice: e ? _(e) : {},
|
|
147
|
+
from: e ? "defaults" : ""
|
|
148
|
+
},
|
|
149
|
+
pick: e ? S(e, t, i) : s
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
let c = r?.form, l = {
|
|
153
|
+
inherit: !!c?.connectors?.inherit,
|
|
154
|
+
items: o(c?.connectors?.items)
|
|
155
|
+
};
|
|
156
|
+
if (e.kind === "team") {
|
|
157
|
+
let e = l.inherit ? void 0 : l.items[a];
|
|
158
|
+
return {
|
|
159
|
+
own: e ? _(e) : void 0,
|
|
160
|
+
resolved: b({
|
|
161
|
+
name: a,
|
|
162
|
+
defaults: n,
|
|
163
|
+
team: l
|
|
164
|
+
}),
|
|
165
|
+
pick: e ? S(e, t, i) : s
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
let u = D(c, e.role, a), d = u?.set ? _(u) : void 0;
|
|
169
|
+
return {
|
|
170
|
+
own: d,
|
|
171
|
+
resolved: b({
|
|
172
|
+
name: a,
|
|
173
|
+
defaults: n,
|
|
174
|
+
team: l,
|
|
175
|
+
role: u
|
|
176
|
+
}),
|
|
177
|
+
pick: d ? S(d, t, i) : s
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function k(e, t) {
|
|
181
|
+
return { connectors: { [e]: t && Object.keys(_(t)).length ? _(t) : null } };
|
|
182
|
+
}
|
|
183
|
+
function A(e, t, n) {
|
|
184
|
+
let r = { ...o(e) };
|
|
185
|
+
return n ? r[t] = _(n) : delete r[t], r;
|
|
186
|
+
}
|
|
187
|
+
var j = (e, t) => [.../* @__PURE__ */ new Set([...Object.keys(o(e)), ...Object.keys(o(t))])].every((n) => o(e)[n] && o(t)[n] && v(o(e)[n], o(t)[n]));
|
|
188
|
+
function M(e, t, n, r) {
|
|
189
|
+
let i = e.connectors.inherit ? { ...o(r) } : { ...o(e.connectors.items) };
|
|
190
|
+
n ? i[t] = _(n) : o(r)[t] ? i[t] = _(o(r)[t]) : delete i[t];
|
|
191
|
+
let a = j(i, r);
|
|
192
|
+
return {
|
|
193
|
+
...e,
|
|
194
|
+
connectors: {
|
|
195
|
+
inherit: a,
|
|
196
|
+
items: a ? {} : i
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function N(e, t, n, r, a) {
|
|
201
|
+
let o = e.roles.inherit ? {
|
|
202
|
+
inherit: !1,
|
|
203
|
+
items: structuredClone(i(a))
|
|
204
|
+
} : {
|
|
205
|
+
...e.roles,
|
|
206
|
+
items: i(e.roles.items)
|
|
207
|
+
}, s = o.items.map((e) => {
|
|
208
|
+
if (e?.name !== t) return e;
|
|
209
|
+
let a = i(e.harnessConnectors).some((e) => e?.name === n) ? i(e.harnessConnectors) : [...i(e.harnessConnectors), {
|
|
210
|
+
name: n,
|
|
211
|
+
set: !1
|
|
212
|
+
}];
|
|
213
|
+
return {
|
|
214
|
+
...e,
|
|
215
|
+
harnessConnectors: a.map((e) => e?.name === n ? r ? {
|
|
216
|
+
name: n,
|
|
217
|
+
set: !0,
|
|
218
|
+
..._(r)
|
|
219
|
+
} : {
|
|
220
|
+
name: n,
|
|
221
|
+
set: !1
|
|
222
|
+
} : e)
|
|
223
|
+
};
|
|
224
|
+
});
|
|
225
|
+
return {
|
|
226
|
+
...e,
|
|
227
|
+
roles: {
|
|
228
|
+
...o,
|
|
229
|
+
items: s
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function P(e) {
|
|
234
|
+
return i(e).filter((e) => e?.form?.connectors?.inherit).map((e) => a(e.summary?.name)).filter(Boolean);
|
|
235
|
+
}
|
|
236
|
+
function F(e, n, r) {
|
|
237
|
+
return i(e).filter((e) => e?.connector === n?.name && t(e.volume)).map((e) => ({
|
|
238
|
+
value: m(e.volume),
|
|
239
|
+
label: e.volume.name,
|
|
240
|
+
state: a(e.login?.state)
|
|
241
|
+
})).filter((e) => e.value !== r).sort((e, t) => e.value.localeCompare(t.value));
|
|
242
|
+
}
|
|
243
|
+
function I(e, t, n) {
|
|
244
|
+
let r = [];
|
|
245
|
+
for (let o of i(e)) {
|
|
246
|
+
let e = a(o?.summary?.name);
|
|
247
|
+
if (!(!e || t.kind !== "defaults" && e !== t.team) && (t.kind !== "defaults" || o.form?.connectors?.inherit)) for (let a of i(o.view?.roles?.items)) t.kind === "role" && a.name !== t.role || !T(a, o.view?.harnesses?.items, n) || t.kind !== "role" && D(o.form, a.name, n.name)?.set || r.push(`${e}/${a.name}`);
|
|
248
|
+
}
|
|
249
|
+
return r;
|
|
250
|
+
}
|
|
251
|
+
function L(t, n, r) {
|
|
252
|
+
let o = h(n);
|
|
253
|
+
if (!o) return [];
|
|
254
|
+
let s = i(t).find((t) => e(t?.volume) === e(o));
|
|
255
|
+
return [...new Set([...i(s?.usedBy).map((e) => a(e?.role)), ...i(r)].filter(Boolean))].sort();
|
|
256
|
+
}
|
|
257
|
+
export { L as _, k as a, M as b, F as c, A as d, s as f, T as g, b as h, C as i, P as l, c as m, O as n, E as o, l as p, w as r, u as s, I as t, p as u, x as v, N as y };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Connector, ConnectorMethod, SecretRef } from "./connectors.mjs";
|
|
2
|
+
import type { FormConnector, FormHarnessConnector, FormRole, TeamForm, TeamView } from "./teams.mjs";
|
|
3
|
+
|
|
4
|
+
export const pickInherit: string;
|
|
5
|
+
export const pickOwn: string;
|
|
6
|
+
export const pickSystem: string;
|
|
7
|
+
export const pickIdentity: string;
|
|
8
|
+
export const pickMethod: string;
|
|
9
|
+
export type Choice = { method?: string; identity?: string; state?: string };
|
|
10
|
+
export type Resolved = { found: boolean; choice: Choice; from: string };
|
|
11
|
+
export type GridRow = { key: string; kind: "defaults" | "team" | "role"; label: string; team?: string; role?: string; harness?: string; system?: boolean };
|
|
12
|
+
export type CellState = { own?: Choice; resolved: Resolved; pick: string };
|
|
13
|
+
export type IdentityOption = { value: string; label: string; state: string };
|
|
14
|
+
|
|
15
|
+
export function harnessConnectors(connectors: Connector[] | undefined): Connector[];
|
|
16
|
+
export function defaultMethod(connector: Connector | undefined): ConnectorMethod | undefined;
|
|
17
|
+
export function methodOf(connector: Connector | undefined, name: string | undefined): ConnectorMethod | undefined;
|
|
18
|
+
export function keepsLoginMethod(connector: Connector | undefined, name: string | undefined): boolean;
|
|
19
|
+
export function identityNotation(ref: Partial<SecretRef> | undefined): string;
|
|
20
|
+
export function parseNotation(value: string | undefined, realm?: string): SecretRef | undefined;
|
|
21
|
+
export function normalChoice(choice: unknown): Choice;
|
|
22
|
+
export function sameChoice(a: unknown, b: unknown): boolean;
|
|
23
|
+
export function mergeChoice(team: unknown, role: unknown): Choice;
|
|
24
|
+
export function resolve(input: { name: string; defaults: Record<string, FormConnector> | undefined; team: { inherit: boolean; items: Record<string, FormConnector> } | undefined; role?: FormHarnessConnector }): Resolved;
|
|
25
|
+
export function systemNotation(logins: unknown[] | undefined, connector: Connector | undefined): string;
|
|
26
|
+
export function pickOf(choice: unknown, connector: Connector | undefined, system: string, realm?: string): string;
|
|
27
|
+
export function choiceOf(pick: string, connector: Connector | undefined, system: string, state?: string): Choice;
|
|
28
|
+
export function cellText(resolved: Resolved | undefined, connector: Connector | undefined, system: string, realm?: string): string;
|
|
29
|
+
export function roleRuns(role: { harness?: string } | undefined, teamHarnesses: unknown[] | undefined, connector: Connector | undefined): boolean;
|
|
30
|
+
export function gridRows(defaults: Record<string, FormConnector> | undefined, teams: TeamView[] | undefined): GridRow[];
|
|
31
|
+
export function formRoleChoice(form: TeamForm | undefined, role: string | undefined, connector: string): FormHarnessConnector | undefined;
|
|
32
|
+
export function cellState(input: { row: GridRow; connector: Connector; defaults: Record<string, FormConnector> | undefined; team: TeamView | undefined; system: string }): CellState;
|
|
33
|
+
export function defaultsBody(name: string, choice: Choice | undefined): { connectors: Record<string, Choice | null> };
|
|
34
|
+
export function nextDefaults(defaults: Record<string, FormConnector> | undefined, name: string, choice: Choice | undefined): Record<string, FormConnector>;
|
|
35
|
+
export function withTeamChoice(form: TeamForm, name: string, choice: Choice | undefined, defaults: Record<string, FormConnector> | undefined): TeamForm;
|
|
36
|
+
export function withRoleChoice(form: TeamForm, role: string, name: string, choice: Choice | undefined, inheritedRoles: FormRole[] | undefined): TeamForm;
|
|
37
|
+
export function inheritingTeams(teams: TeamView[] | undefined): string[];
|
|
38
|
+
export function identityOptions(logins: unknown[] | undefined, connector: Connector | undefined, system: string): IdentityOption[];
|
|
39
|
+
export function affectedRoles(teams: TeamView[] | undefined, row: GridRow, connector: Connector): string[];
|
|
40
|
+
export function sharedRoles(logins: unknown[] | undefined, notation: string, affected: string[]): string[];
|