@kukeon/console 0.0.0-stage → 0.10.0-edge.gaa95c2af
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/auth.d.ts +39 -0
- package/dist/bulk-ui.d.ts +49 -0
- package/dist/bulk.d.mts +14 -0
- package/dist/catalog-ChPGZP2a.js +1949 -0
- package/dist/catalog-url-Dr9e92Yq.js +19 -0
- package/dist/catalog-url.d.mts +4 -0
- package/dist/catalog.d.ts +40 -0
- package/dist/cell-filter.d.ts +10 -0
- package/dist/cell-sidebar.d.ts +26 -0
- package/dist/cells.d.mts +29 -0
- package/dist/cgroup-format.d.ts +17 -0
- package/dist/cgroup.d.ts +4 -0
- package/dist/config-form.d.mts +66 -0
- package/dist/connector-ui-CG9kLZ5s.js +2716 -0
- package/dist/connector-ui.d.ts +129 -0
- package/dist/connectors-page-C8459TcH.js +241 -0
- package/dist/connectors-page.d.ts +8 -0
- package/dist/connectors.d.mts +154 -0
- package/dist/container-log.d.ts +11 -0
- package/dist/create.d.ts +11 -0
- package/dist/creation-schema.d.mts +15 -0
- package/dist/daemon-DxP5hn4p.js +394 -0
- package/dist/daemon.d.ts +24 -0
- package/dist/display-name.d.ts +10 -0
- package/dist/drift-diff.d.ts +4 -0
- package/dist/exec.d.ts +15 -0
- package/dist/extensions.d.ts +111 -0
- package/dist/get-started.d.ts +9 -0
- package/dist/health.d.ts +22 -0
- package/dist/identities-page-CJ_ukj0Q.js +2137 -0
- package/dist/identities-page.d.ts +15 -0
- package/dist/identities.d.mts +24 -0
- package/dist/image-format.d.ts +6 -0
- package/dist/image-inventory.d.ts +12 -0
- package/dist/images.d.ts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5241 -0
- package/dist/initialize-CAOkMhlL.js +146 -0
- package/dist/initialize.d.ts +21 -0
- package/dist/inventory.d.ts +66 -0
- package/dist/lifecycle-policy.d.ts +11 -0
- package/dist/lifecycle.d.ts +24 -0
- package/dist/log-buffer.d.ts +8 -0
- package/dist/main.d.ts +13 -0
- package/dist/majordomo-CikLz0g9.js +3064 -0
- package/dist/majordomo.d.ts +102 -0
- package/dist/manage-nav.d.ts +4 -0
- package/dist/manifest-diff.d.mts +11 -0
- package/dist/merged-values-CBzWsNOS.js +739 -0
- package/dist/merged-values.d.ts +24 -0
- package/dist/network-format.d.ts +30 -0
- package/dist/network.d.ts +13 -0
- package/dist/new-agent-BweyzBnY.js +201 -0
- package/dist/new-agent.d.ts +27 -0
- package/dist/new-cell-Iceq2Zfv.js +1985 -0
- package/dist/new-cell.d.ts +29 -0
- package/dist/new-config-C9NSC9Ou.js +1541 -0
- package/dist/new-config.d.ts +7 -0
- package/dist/notifications.d.ts +26 -0
- package/dist/onboarding-oZBJXTy0.js +395 -0
- package/dist/onboarding.d.mts +40 -0
- package/dist/panel-cells.d.mts +8 -0
- package/dist/registry-credentials.d.ts +13 -0
- package/dist/relationships.d.mts +12 -0
- package/dist/request.d.ts +16 -0
- package/dist/router.d.ts +12 -0
- package/dist/routes.d.ts +43 -0
- package/dist/schedule-DzQ3Homi.js +113 -0
- package/dist/schedule-format.d.mts +9 -0
- package/dist/schedule.d.ts +16 -0
- package/dist/scope-actions.d.ts +9 -0
- package/dist/screens.d.ts +6 -0
- package/dist/secret-form.d.ts +24 -0
- package/dist/settings-nav.d.ts +5 -0
- package/dist/settings-page.d.ts +4 -0
- package/dist/settings-values.d.mts +18 -0
- package/dist/settings.d.ts +50 -0
- package/dist/sidebar-shell.d.ts +55 -0
- package/dist/sources-page-CxMSM-sz.js +423 -0
- package/dist/sources-page.d.ts +5 -0
- package/dist/space-subnets.d.ts +3 -0
- package/dist/style.css +2 -0
- package/dist/team-form.d.mts +56 -0
- package/dist/team-plan-CFOIv1lN.js +735 -0
- package/dist/team-plan.d.ts +22 -0
- package/dist/team-wizard.d.ts +8 -0
- package/dist/teams-page-C6UGy4Fw.js +2216 -0
- package/dist/teams-page.d.ts +9 -0
- package/dist/teams.d.mts +114 -0
- package/dist/terminal-palette.d.ts +8 -0
- package/dist/terminal.d.ts +98 -0
- package/dist/unread.d.mts +19 -0
- package/dist/use-unread.d.ts +4 -0
- package/dist/user-menu.d.ts +7 -0
- package/dist/views.d.mts +8 -0
- package/dist/workbench.d.ts +16 -0
- package/package.json +45 -4
- package/README.md +0 -3
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
import { Bt as e, Pn as t, Zt as n, _n as r, a as i, g as a, mn as o, qt as s } from "./connector-ui-CG9kLZ5s.js";
|
|
2
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
3
|
+
// src/config-form.mjs
|
|
4
|
+
var d = [
|
|
5
|
+
"STATE_VOLUME",
|
|
6
|
+
"STATE_VOLUME_REALM",
|
|
7
|
+
"STATE_VOLUME_SPACE",
|
|
8
|
+
"STATE_VOLUME_STACK"
|
|
9
|
+
], f = (e) => Array.isArray(e) ? e : [], p = (e) => typeof e == "string" ? e : "", m = (e) => p(e).trim(), h = (e) => [...new Set(e.map(m).filter(Boolean))];
|
|
10
|
+
function g(e) {
|
|
11
|
+
return {
|
|
12
|
+
name: p(e?.name),
|
|
13
|
+
description: p(e?.description),
|
|
14
|
+
hasDefault: typeof e?.default == "string",
|
|
15
|
+
default: p(e?.default),
|
|
16
|
+
required: e?.required === !0,
|
|
17
|
+
type: [
|
|
18
|
+
"enum",
|
|
19
|
+
"path",
|
|
20
|
+
"image",
|
|
21
|
+
"bool"
|
|
22
|
+
].includes(e?.type) ? e.type : "string",
|
|
23
|
+
enum: f(e?.enum).filter((e) => typeof e == "string"),
|
|
24
|
+
group: p(e?.group)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function _(e) {
|
|
28
|
+
return f(e).map(g).filter((e) => e.name);
|
|
29
|
+
}
|
|
30
|
+
function v(e) {
|
|
31
|
+
return f(e).filter((e) => p(e?.name)).map((e) => ({
|
|
32
|
+
name: e.name,
|
|
33
|
+
envName: p(e.envName),
|
|
34
|
+
required: e.required === !0
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
function y(e) {
|
|
38
|
+
return !e || typeof e != "object" || !p(e.name) ? null : {
|
|
39
|
+
name: e.name,
|
|
40
|
+
title: p(e.title),
|
|
41
|
+
method: p(e.method),
|
|
42
|
+
delivery: p(e.delivery),
|
|
43
|
+
optional: e.optional === !0,
|
|
44
|
+
harness: p(e.harness),
|
|
45
|
+
secretTypes: f(e.secretTypes).filter((e) => typeof e == "string"),
|
|
46
|
+
scopes: f(e.scopes).filter((e) => typeof e == "string")
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function b(e) {
|
|
50
|
+
let t = e?.spec ?? {}, n = f(t.components).filter((e) => p(e?.name)).map((e) => ({
|
|
51
|
+
kind: p(e.kind),
|
|
52
|
+
name: e.name,
|
|
53
|
+
description: p(e.description),
|
|
54
|
+
optional: e.optional === !0,
|
|
55
|
+
group: p(e.group),
|
|
56
|
+
connector: y(e.connector),
|
|
57
|
+
requires: h(f(e.requires)),
|
|
58
|
+
parameters: _(e.parameters),
|
|
59
|
+
secrets: v(e.secrets),
|
|
60
|
+
modes: Object.keys(e.modes ?? {}).sort().map((t) => ({
|
|
61
|
+
name: t,
|
|
62
|
+
description: p(e.modes[t]?.description),
|
|
63
|
+
parameters: _(e.modes[t]?.parameters),
|
|
64
|
+
secrets: v(e.modes[t]?.secrets)
|
|
65
|
+
}))
|
|
66
|
+
})), r = [], i = [];
|
|
67
|
+
for (let e of f(t.cell?.containers)) {
|
|
68
|
+
for (let t of f(e?.repos)) {
|
|
69
|
+
if (!p(t?.name) || p(t.url)) continue;
|
|
70
|
+
let e = r.find((e) => e.name === t.name);
|
|
71
|
+
e ? e.required ||= t.required === !0 : r.push({
|
|
72
|
+
name: t.name,
|
|
73
|
+
target: p(t.target),
|
|
74
|
+
required: t.required === !0
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
for (let t of v(e?.secrets)) {
|
|
78
|
+
let e = i.find((e) => e.name === t.name);
|
|
79
|
+
e ? e.required ||= t.required : i.push(t);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
requires: h(f(t.requires)),
|
|
84
|
+
parameters: _(t.parameters),
|
|
85
|
+
components: n,
|
|
86
|
+
modes: h(n.flatMap((e) => e.modes.map((e) => e.name))).sort(),
|
|
87
|
+
repoSlots: r,
|
|
88
|
+
secretSlots: i
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function x(e) {
|
|
92
|
+
return {
|
|
93
|
+
values: {},
|
|
94
|
+
components: [],
|
|
95
|
+
groups: {},
|
|
96
|
+
connectors: {},
|
|
97
|
+
requires: "",
|
|
98
|
+
prefix: "",
|
|
99
|
+
modes: {
|
|
100
|
+
enabled: [...e.modes],
|
|
101
|
+
default: ""
|
|
102
|
+
},
|
|
103
|
+
repos: {},
|
|
104
|
+
secrets: {},
|
|
105
|
+
git: null,
|
|
106
|
+
state: ""
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function S(e, t, n) {
|
|
110
|
+
let r = e.components.filter((e) => e.optional && e.group === n), i = t?.groups?.[n];
|
|
111
|
+
return r.some((e) => e.name === i) ? i : r[0]?.name ?? "";
|
|
112
|
+
}
|
|
113
|
+
function C(e, t) {
|
|
114
|
+
let n = f(t?.modes?.enabled).filter((t) => e.modes.includes(t));
|
|
115
|
+
return n.length ? e.modes.filter((e) => n.includes(e)) : [...e.modes];
|
|
116
|
+
}
|
|
117
|
+
function w(e, t, n = "") {
|
|
118
|
+
let r = C(e, t);
|
|
119
|
+
if (!r.length) return "";
|
|
120
|
+
if (r.includes(n)) return n;
|
|
121
|
+
let i = m(t?.modes?.default);
|
|
122
|
+
return r.includes(i) ? i : r.length === 1 || !r.includes("interactive") ? r[0] : "interactive";
|
|
123
|
+
}
|
|
124
|
+
function T(e, t) {
|
|
125
|
+
let n = f(t?.components);
|
|
126
|
+
return e.components.filter((r) => !r.optional || (r.group ? S(e, t, r.group) === r.name : n.includes(r.name)));
|
|
127
|
+
}
|
|
128
|
+
function E(e, t) {
|
|
129
|
+
for (let n of e) {
|
|
130
|
+
if (n.connector?.delivery !== "stateVolume") continue;
|
|
131
|
+
let e = F(t?.connectors?.[n.name]);
|
|
132
|
+
if (e) return e;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function D(e, t) {
|
|
136
|
+
return T(e, t).some((e) => e.connector?.delivery === s);
|
|
137
|
+
}
|
|
138
|
+
function O(e, t) {
|
|
139
|
+
return !D(e, t) && T(e, t).some((e) => !!e.connector?.harness);
|
|
140
|
+
}
|
|
141
|
+
function k(e, t) {
|
|
142
|
+
return O(e, t) && t?.state === "ephemeral" ? n : "";
|
|
143
|
+
}
|
|
144
|
+
function A(e) {
|
|
145
|
+
return e?.delivery === "env" || e?.delivery === "file";
|
|
146
|
+
}
|
|
147
|
+
function j(e, t, n = "") {
|
|
148
|
+
let r = [], i = [];
|
|
149
|
+
for (let t of e.parameters) {
|
|
150
|
+
let e = t.group || "general", n = i.find((t) => t.name === e);
|
|
151
|
+
n || i.push(n = {
|
|
152
|
+
name: e,
|
|
153
|
+
parameters: []
|
|
154
|
+
}), n.parameters.push(t);
|
|
155
|
+
}
|
|
156
|
+
for (let e of i) r.push({
|
|
157
|
+
key: `group:${e.name}`,
|
|
158
|
+
title: e.name,
|
|
159
|
+
kind: "group",
|
|
160
|
+
parameters: e.parameters,
|
|
161
|
+
secrets: []
|
|
162
|
+
});
|
|
163
|
+
e.secretSlots.length && r.push({
|
|
164
|
+
key: "secrets",
|
|
165
|
+
title: "secrets",
|
|
166
|
+
kind: "group",
|
|
167
|
+
parameters: [],
|
|
168
|
+
secrets: e.secretSlots
|
|
169
|
+
});
|
|
170
|
+
let a = w(e, t, n);
|
|
171
|
+
for (let n of T(e, t)) {
|
|
172
|
+
let e = n.modes.find((e) => e.name === a);
|
|
173
|
+
(n.parameters.length || n.secrets.length || n.connector) && r.push({
|
|
174
|
+
key: `component:${n.name}`,
|
|
175
|
+
title: n.name,
|
|
176
|
+
kind: n.kind || "component",
|
|
177
|
+
description: n.description,
|
|
178
|
+
parameters: n.parameters,
|
|
179
|
+
secrets: n.secrets,
|
|
180
|
+
...n.connector ? {
|
|
181
|
+
connector: n.connector,
|
|
182
|
+
component: n.name
|
|
183
|
+
} : {}
|
|
184
|
+
}), e && (e.parameters.length || e.secrets.length) && r.push({
|
|
185
|
+
key: `mode:${n.name}:${e.name}`,
|
|
186
|
+
title: `${n.name} · ${e.name} mode`,
|
|
187
|
+
kind: "mode",
|
|
188
|
+
description: e.description,
|
|
189
|
+
parameters: e.parameters,
|
|
190
|
+
secrets: e.secrets
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return r;
|
|
194
|
+
}
|
|
195
|
+
function M(e, t) {
|
|
196
|
+
return h([
|
|
197
|
+
...e.requires,
|
|
198
|
+
...T(e, t).flatMap((e) => e.requires),
|
|
199
|
+
...p(t?.requires).split(/[\s,]+/)
|
|
200
|
+
]).sort();
|
|
201
|
+
}
|
|
202
|
+
function N(e, t) {
|
|
203
|
+
let n = [];
|
|
204
|
+
for (let r of f(e)) {
|
|
205
|
+
if (!p(r?.name)) continue;
|
|
206
|
+
let e = f(r.capabilities).filter((e) => typeof e == "string");
|
|
207
|
+
e.length ? t.every((t) => e.includes(t)) && n.push({
|
|
208
|
+
name: r.name,
|
|
209
|
+
capabilities: e,
|
|
210
|
+
status: "match"
|
|
211
|
+
}) : n.push({
|
|
212
|
+
name: r.name,
|
|
213
|
+
capabilities: e,
|
|
214
|
+
status: "unknown"
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
return n.sort((e, t) => e.status === t.status ? e.name.localeCompare(t.name) : e.status === "match" ? -1 : 1);
|
|
218
|
+
}
|
|
219
|
+
function P(e, t, n) {
|
|
220
|
+
let r = f(e).find((e) => e?.name === m(t));
|
|
221
|
+
if (!m(t) || !r) return {
|
|
222
|
+
status: "absent",
|
|
223
|
+
missing: []
|
|
224
|
+
};
|
|
225
|
+
let i = f(r.capabilities);
|
|
226
|
+
if (!i.length) return {
|
|
227
|
+
status: "unknown",
|
|
228
|
+
missing: []
|
|
229
|
+
};
|
|
230
|
+
let a = n.filter((e) => !i.includes(e));
|
|
231
|
+
return {
|
|
232
|
+
status: a.length ? "missing" : "match",
|
|
233
|
+
missing: a
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function F(e) {
|
|
237
|
+
let t = m(e?.name), n = m(e?.realm);
|
|
238
|
+
if (!t || !n) return;
|
|
239
|
+
let r = {
|
|
240
|
+
name: t,
|
|
241
|
+
realm: n
|
|
242
|
+
};
|
|
243
|
+
for (let t of [
|
|
244
|
+
"space",
|
|
245
|
+
"stack",
|
|
246
|
+
"cell"
|
|
247
|
+
]) m(e[t]) && (r[t] = m(e[t]));
|
|
248
|
+
return r;
|
|
249
|
+
}
|
|
250
|
+
function I(e) {
|
|
251
|
+
let t = m(e?.name), n = m(e?.email);
|
|
252
|
+
return t || n ? {
|
|
253
|
+
name: t,
|
|
254
|
+
email: n
|
|
255
|
+
} : void 0;
|
|
256
|
+
}
|
|
257
|
+
function L(e) {
|
|
258
|
+
let t = F(e?.secretRef);
|
|
259
|
+
if (!t) return;
|
|
260
|
+
let n = F(e?.allowedSignersRef);
|
|
261
|
+
return n ? {
|
|
262
|
+
secretRef: t,
|
|
263
|
+
allowedSignersRef: n
|
|
264
|
+
} : { secretRef: t };
|
|
265
|
+
}
|
|
266
|
+
function R(e) {
|
|
267
|
+
let t = {};
|
|
268
|
+
m(e?.user) && (t.user = m(e.user));
|
|
269
|
+
let n = Number(e?.port);
|
|
270
|
+
return Number.isInteger(n) && n > 0 && (t.port = n), (e?.hostKeyPolicy === "strict" || e?.hostKeyPolicy === "accept-new") && (t.hostKeyPolicy = e.hostKeyPolicy), t;
|
|
271
|
+
}
|
|
272
|
+
function z(e) {
|
|
273
|
+
return ["commits", "tags"].filter((t) => f(e).includes(t));
|
|
274
|
+
}
|
|
275
|
+
function B(e) {
|
|
276
|
+
if (!e || e.enabled === !1) return;
|
|
277
|
+
let t = {};
|
|
278
|
+
I(e.author) && (t.author = I(e.author)), I(e.committer) && (t.committer = I(e.committer));
|
|
279
|
+
let n = F(e.credential?.secretRef);
|
|
280
|
+
return n && (t.credential = {
|
|
281
|
+
secretRef: n,
|
|
282
|
+
...R(e.credential)
|
|
283
|
+
}), L(e.signing) && (t.signing = L(e.signing), z(e.sign).length && (t.sign = z(e.sign))), Object.keys(t).length ? t : void 0;
|
|
284
|
+
}
|
|
285
|
+
function V(e) {
|
|
286
|
+
if (!e || e.enabled === !1) return;
|
|
287
|
+
let t = {};
|
|
288
|
+
I(e.author) && (t.author = I(e.author)), I(e.committer) && (t.committer = I(e.committer));
|
|
289
|
+
let n = f(e.credentials).map((e) => {
|
|
290
|
+
let t = F(e?.secretRef);
|
|
291
|
+
return m(e?.host) && t ? {
|
|
292
|
+
host: m(e.host),
|
|
293
|
+
secretRef: t,
|
|
294
|
+
...R(e)
|
|
295
|
+
} : void 0;
|
|
296
|
+
}).filter(Boolean);
|
|
297
|
+
return n.length && (t.credentials = n), L(e.signing) && (t.signing = L(e.signing), z(e.sign).length && (t.sign = z(e.sign))), Object.keys(t).length ? t : void 0;
|
|
298
|
+
}
|
|
299
|
+
function H(e, t, r) {
|
|
300
|
+
let i = { blueprint: {} };
|
|
301
|
+
for (let t of [
|
|
302
|
+
"name",
|
|
303
|
+
"realm",
|
|
304
|
+
"space",
|
|
305
|
+
"stack"
|
|
306
|
+
]) m(e?.[t]) && (i.blueprint[t] = m(e[t]));
|
|
307
|
+
m(r.prefix) && (i.prefix = m(r.prefix));
|
|
308
|
+
let a = T(t, r), o = C(t, r), s = [...t.parameters, ...a.flatMap((e) => [...e.parameters, ...e.modes.filter((e) => o.includes(e.name)).flatMap((e) => e.parameters)])], c = {};
|
|
309
|
+
for (let e of s) {
|
|
310
|
+
let t = r.values?.[e.name];
|
|
311
|
+
e.type === "bool" ? (t === !0 || t === !1) && (c[e.name] = String(t)) : typeof t == "string" && t !== "" && (c[e.name] = t);
|
|
312
|
+
}
|
|
313
|
+
let l = E(a, r);
|
|
314
|
+
if (l) {
|
|
315
|
+
let [e, t, n, r] = d;
|
|
316
|
+
Object.assign(c, {
|
|
317
|
+
[e]: l.name,
|
|
318
|
+
[t]: l.realm,
|
|
319
|
+
[n]: l.space ?? "",
|
|
320
|
+
[r]: l.stack ?? ""
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
Object.keys(c).length && (i.values = c), k(t, r) === "ephemeral" && (i.state = n);
|
|
324
|
+
let u = {};
|
|
325
|
+
for (let e of t.repoSlots) {
|
|
326
|
+
let t = r.repos?.[e.name];
|
|
327
|
+
if (!m(t?.url)) continue;
|
|
328
|
+
let n = { url: m(t.url) };
|
|
329
|
+
t.revision === "ref" ? m(t.ref) && (n.ref = m(t.ref)) : m(t.branch) && (n.branch = m(t.branch));
|
|
330
|
+
let i = B(t.git);
|
|
331
|
+
i && (n.git = i), u[e.name] = n;
|
|
332
|
+
}
|
|
333
|
+
Object.keys(u).length && (i.repos = u);
|
|
334
|
+
let f = [...t.secretSlots, ...a.flatMap((e) => [...e.secrets, ...e.modes.filter((e) => o.includes(e.name)).flatMap((e) => e.secrets)])], g = {};
|
|
335
|
+
for (let e of f) {
|
|
336
|
+
let t = F(r.secrets?.[e.name]);
|
|
337
|
+
t && (g[e.name] = { secretRef: t });
|
|
338
|
+
}
|
|
339
|
+
let _;
|
|
340
|
+
for (let e of a) {
|
|
341
|
+
let t = F(r.connectors?.[e.name]);
|
|
342
|
+
e.connector && t && (delete t.cell, A(e.connector) && e.secrets[0] ? g[e.secrets[0].name] = { secretRef: t } : e.connector.delivery === "git" && (_ = t));
|
|
343
|
+
}
|
|
344
|
+
Object.keys(g).length && (i.secrets = g);
|
|
345
|
+
let v = h(p(r.requires).split(/[\s,]+/));
|
|
346
|
+
v.length && (i.requires = v);
|
|
347
|
+
let y = a.filter((e) => e.optional).map((e) => e.name);
|
|
348
|
+
if (y.length && (i.components = y), t.modes.length) {
|
|
349
|
+
let e = o.includes(m(r.modes?.default)) ? m(r.modes.default) : "";
|
|
350
|
+
(o.length < t.modes.length || e) && (i.modes = {
|
|
351
|
+
...o.length < t.modes.length ? { enabled: o } : {},
|
|
352
|
+
...e ? { default: e } : {}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
let b = V(r.git);
|
|
356
|
+
return (b || _) && (i.git = {
|
|
357
|
+
..._ ? { identityRef: _ } : {},
|
|
358
|
+
...b
|
|
359
|
+
}), i;
|
|
360
|
+
}
|
|
361
|
+
function U(e, t, n = "") {
|
|
362
|
+
let r = [], i = E(T(e, t), t);
|
|
363
|
+
for (let a of j(e, t, n)) {
|
|
364
|
+
for (let e of a.parameters) {
|
|
365
|
+
let n = t.values?.[e.name];
|
|
366
|
+
i && d.includes(e.name) || e.required && !e.hasDefault && e.type !== "bool" && (typeof n != "string" || n === "") && r.push(e.name);
|
|
367
|
+
}
|
|
368
|
+
if (!(a.connector && A(a.connector))) for (let e of a.secrets) e.required && !F(t.secrets?.[e.name]) && r.push(e.name);
|
|
369
|
+
}
|
|
370
|
+
for (let n of e.repoSlots) n.required && !m(t.repos?.[n.name]?.url) && r.push(n.name);
|
|
371
|
+
return r;
|
|
372
|
+
}
|
|
373
|
+
var W = [
|
|
374
|
+
"author",
|
|
375
|
+
"committer",
|
|
376
|
+
"credential",
|
|
377
|
+
"signing"
|
|
378
|
+
];
|
|
379
|
+
function G(e) {
|
|
380
|
+
let t = [], n = [], r = [], i = [];
|
|
381
|
+
for (let t of f(e)) (t?.kind === "git" ? i : r).push(t);
|
|
382
|
+
let a = i.map((e) => p(e.key)).filter((e) => e.endsWith(".url")).map((e) => e.slice(0, -4)).sort((e, t) => t.length - e.length), o = (e) => {
|
|
383
|
+
let n = t.find((t) => t.repo === e);
|
|
384
|
+
return n || t.push(n = {
|
|
385
|
+
repo: e,
|
|
386
|
+
url: "",
|
|
387
|
+
fields: []
|
|
388
|
+
}), n;
|
|
389
|
+
};
|
|
390
|
+
for (let e of i) {
|
|
391
|
+
let t = p(e.key), r = {
|
|
392
|
+
value: p(e.value),
|
|
393
|
+
origin: p(e.origin)
|
|
394
|
+
}, i = /^default\.credential\[.*\]$/.test(t) ? void 0 : a.find((e) => t.startsWith(`${e}.`));
|
|
395
|
+
if (i !== void 0) {
|
|
396
|
+
let e = t.slice(i.length + 1);
|
|
397
|
+
e === "url" ? o(i).url = r.value : o(i).fields.push({
|
|
398
|
+
field: e,
|
|
399
|
+
...r
|
|
400
|
+
});
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
if (t.startsWith("default.")) {
|
|
404
|
+
let e = t.slice(8), i = /^credential\[(.*)\]$/.exec(e);
|
|
405
|
+
n.push(i ? {
|
|
406
|
+
field: "credential",
|
|
407
|
+
host: i[1],
|
|
408
|
+
...r
|
|
409
|
+
} : {
|
|
410
|
+
field: e,
|
|
411
|
+
host: "",
|
|
412
|
+
...r
|
|
413
|
+
});
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
let s = t.lastIndexOf(".");
|
|
417
|
+
o(s > 0 ? t.slice(0, s) : t).fields.push({
|
|
418
|
+
field: s > 0 ? t.slice(s + 1) : "",
|
|
419
|
+
...r
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
let s = (e) => W.indexOf(e.field);
|
|
423
|
+
for (let e of t) e.fields.sort((e, t) => s(e) - s(t));
|
|
424
|
+
return n.sort((e, t) => s(e) - s(t) || e.host.localeCompare(t.host)), {
|
|
425
|
+
repos: t,
|
|
426
|
+
defaults: n,
|
|
427
|
+
rest: r
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
var K = [
|
|
431
|
+
"blueprint",
|
|
432
|
+
"config",
|
|
433
|
+
"connectors",
|
|
434
|
+
"realm",
|
|
435
|
+
"space",
|
|
436
|
+
"stack",
|
|
437
|
+
"cell"
|
|
438
|
+
];
|
|
439
|
+
function q(e, t) {
|
|
440
|
+
let n = new Map(K.map((e) => [e, []])), r = [];
|
|
441
|
+
for (let t of f(e)) ((t && t.origin !== "connectors" ? n.get(p(t.origin)) : void 0) ?? r).push(t);
|
|
442
|
+
n.set("connectors", f(t).slice());
|
|
443
|
+
let i = K.map((e) => ({
|
|
444
|
+
source: e,
|
|
445
|
+
rows: n.get(e)
|
|
446
|
+
})).filter((e) => e.rows.length > 0);
|
|
447
|
+
return r.length && i.push({
|
|
448
|
+
source: "other",
|
|
449
|
+
rows: r
|
|
450
|
+
}), i;
|
|
451
|
+
}
|
|
452
|
+
function J(e, t) {
|
|
453
|
+
return f(e).filter((e) => p(e?.metadata?.name) && p(e.metadata.realm)).map((e) => ({
|
|
454
|
+
name: e.metadata.name,
|
|
455
|
+
realm: e.metadata.realm,
|
|
456
|
+
space: p(e.metadata.space),
|
|
457
|
+
stack: p(e.metadata.stack),
|
|
458
|
+
cell: p(e.metadata.cell),
|
|
459
|
+
type: p(e.spec?.type) || "opaque"
|
|
460
|
+
})).filter((e) => !t?.length || t.includes(e.type)).sort((e, t) => [
|
|
461
|
+
e.realm,
|
|
462
|
+
e.space,
|
|
463
|
+
e.stack,
|
|
464
|
+
e.cell,
|
|
465
|
+
e.name
|
|
466
|
+
].join("/").localeCompare([
|
|
467
|
+
t.realm,
|
|
468
|
+
t.space,
|
|
469
|
+
t.stack,
|
|
470
|
+
t.cell,
|
|
471
|
+
t.name
|
|
472
|
+
].join("/")));
|
|
473
|
+
}
|
|
474
|
+
function Y(e, t, n = "") {
|
|
475
|
+
return j(e, t, n).filter((e) => e.connector);
|
|
476
|
+
}
|
|
477
|
+
function X(e, t, n, r = "") {
|
|
478
|
+
if (!Array.isArray(n)) return [];
|
|
479
|
+
let i = [];
|
|
480
|
+
for (let a of Y(e, t, r)) {
|
|
481
|
+
let { connector: e } = a, r = a.component;
|
|
482
|
+
e.optional || !A(e) && e.delivery !== "git" || F(t.connectors?.[r]) || n.find((t) => t?.connector === e.name && t.component === r)?.effective || i.push(r);
|
|
483
|
+
}
|
|
484
|
+
return i;
|
|
485
|
+
}
|
|
486
|
+
function Z(e, t, n, r = "") {
|
|
487
|
+
let i = X(e, t, n, r);
|
|
488
|
+
if (i.length === 0) return [];
|
|
489
|
+
let a = new Map(Y(e, t, r).map((e) => [e.component, e.connector.title || e.connector.name]));
|
|
490
|
+
return i.map((e) => a.get(e));
|
|
491
|
+
}
|
|
492
|
+
// src/merged-values.tsx
|
|
493
|
+
function Q({ values: e }) {
|
|
494
|
+
let { repos: t, defaults: n } = G(e);
|
|
495
|
+
return !t.length && !n.length ? null : /* @__PURE__ */ u("div", {
|
|
496
|
+
className: "merged-values source-identities",
|
|
497
|
+
children: [
|
|
498
|
+
n.length > 0 && /* @__PURE__ */ u("section", {
|
|
499
|
+
className: "source-identity",
|
|
500
|
+
"aria-label": "Default git identity",
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ l("h4", { children: "Default git identity" }),
|
|
503
|
+
/* @__PURE__ */ l("p", {
|
|
504
|
+
className: "description",
|
|
505
|
+
children: "What the Realm, Space, Stack and Config merge to. Every repository uses it unless it states its own; a credential applies to the repositories on its host."
|
|
506
|
+
}),
|
|
507
|
+
/* @__PURE__ */ u("table", {
|
|
508
|
+
"aria-label": "Default git identity",
|
|
509
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
510
|
+
/* @__PURE__ */ l("th", {
|
|
511
|
+
scope: "col",
|
|
512
|
+
children: "Field"
|
|
513
|
+
}),
|
|
514
|
+
/* @__PURE__ */ l("th", {
|
|
515
|
+
scope: "col",
|
|
516
|
+
children: "Value"
|
|
517
|
+
}),
|
|
518
|
+
/* @__PURE__ */ l("th", {
|
|
519
|
+
scope: "col",
|
|
520
|
+
children: "Decided by"
|
|
521
|
+
})
|
|
522
|
+
] }) }), /* @__PURE__ */ l("tbody", { children: n.map((e) => /* @__PURE__ */ u("tr", { children: [
|
|
523
|
+
/* @__PURE__ */ u("td", { children: [e.field, e.host && /* @__PURE__ */ u(c, { children: [" for ", /* @__PURE__ */ l("code", { children: e.host })] })] }),
|
|
524
|
+
/* @__PURE__ */ l("td", { children: /* @__PURE__ */ l("code", { children: e.value }) }),
|
|
525
|
+
/* @__PURE__ */ l("td", { children: /* @__PURE__ */ l("span", {
|
|
526
|
+
className: "badge",
|
|
527
|
+
children: e.origin
|
|
528
|
+
}) })
|
|
529
|
+
] }, `${e.field}:${e.host}`)) })]
|
|
530
|
+
})
|
|
531
|
+
]
|
|
532
|
+
}),
|
|
533
|
+
t.length > 0 && /* @__PURE__ */ l("h4", { children: "Git identity per repository" }),
|
|
534
|
+
/* @__PURE__ */ l("p", {
|
|
535
|
+
className: "description",
|
|
536
|
+
children: "Each repository clones, pushes and signs with the identity below. A field the source does not state itself falls back to the default inherited from the Realm, Space, Stack or Config; a repository with no credential uses anonymous access. Only stored secrets are named — no key material is shown."
|
|
537
|
+
}),
|
|
538
|
+
t.map((e) => /* @__PURE__ */ u("section", {
|
|
539
|
+
className: "source-identity",
|
|
540
|
+
"aria-label": `Git identity for ${e.repo}`,
|
|
541
|
+
children: [/* @__PURE__ */ u("h5", { children: [/* @__PURE__ */ l("code", { children: e.repo }), e.url && /* @__PURE__ */ u("span", {
|
|
542
|
+
className: "description",
|
|
543
|
+
children: [" ", e.url]
|
|
544
|
+
})] }), e.fields.length ? /* @__PURE__ */ u("table", {
|
|
545
|
+
"aria-label": `Git identity for ${e.repo}`,
|
|
546
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
547
|
+
/* @__PURE__ */ l("th", {
|
|
548
|
+
scope: "col",
|
|
549
|
+
children: "Field"
|
|
550
|
+
}),
|
|
551
|
+
/* @__PURE__ */ l("th", {
|
|
552
|
+
scope: "col",
|
|
553
|
+
children: "Value"
|
|
554
|
+
}),
|
|
555
|
+
/* @__PURE__ */ l("th", {
|
|
556
|
+
scope: "col",
|
|
557
|
+
children: "Decided by"
|
|
558
|
+
})
|
|
559
|
+
] }) }), /* @__PURE__ */ l("tbody", { children: e.fields.map((e) => /* @__PURE__ */ u("tr", { children: [
|
|
560
|
+
/* @__PURE__ */ l("td", { children: e.field }),
|
|
561
|
+
/* @__PURE__ */ l("td", { children: /* @__PURE__ */ l("code", { children: e.value }) }),
|
|
562
|
+
/* @__PURE__ */ l("td", { children: /* @__PURE__ */ l("span", {
|
|
563
|
+
className: "badge",
|
|
564
|
+
children: e.origin
|
|
565
|
+
}) })
|
|
566
|
+
] }, e.field)) })]
|
|
567
|
+
}) : /* @__PURE__ */ l("p", {
|
|
568
|
+
className: "description",
|
|
569
|
+
children: "No identity or credential: commits use the image's git configuration and the clone is anonymous."
|
|
570
|
+
})]
|
|
571
|
+
}, e.repo))
|
|
572
|
+
]
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
function $({ values: e, digest: t }) {
|
|
576
|
+
let { rest: n } = G(e);
|
|
577
|
+
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Q, { values: e }), /* @__PURE__ */ u("div", {
|
|
578
|
+
className: "merged-values",
|
|
579
|
+
children: [
|
|
580
|
+
/* @__PURE__ */ l("h4", { children: "Merged values" }),
|
|
581
|
+
/* @__PURE__ */ u("p", {
|
|
582
|
+
className: "description",
|
|
583
|
+
children: [
|
|
584
|
+
"Realm, Space and Stack defaults merge under the Config, deeper levels winning per key. Scalar values are hidden in the browser; use ",
|
|
585
|
+
/* @__PURE__ */ l("code", { children: "kuke create cell --from-config … --dry-run --explain" }),
|
|
586
|
+
" to see them."
|
|
587
|
+
]
|
|
588
|
+
}),
|
|
589
|
+
n.length ? /* @__PURE__ */ u("table", {
|
|
590
|
+
"aria-label": "Merged values and their origin",
|
|
591
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
592
|
+
/* @__PURE__ */ l("th", {
|
|
593
|
+
scope: "col",
|
|
594
|
+
children: "Kind"
|
|
595
|
+
}),
|
|
596
|
+
/* @__PURE__ */ l("th", {
|
|
597
|
+
scope: "col",
|
|
598
|
+
children: "Key"
|
|
599
|
+
}),
|
|
600
|
+
/* @__PURE__ */ l("th", {
|
|
601
|
+
scope: "col",
|
|
602
|
+
children: "Value"
|
|
603
|
+
}),
|
|
604
|
+
/* @__PURE__ */ l("th", {
|
|
605
|
+
scope: "col",
|
|
606
|
+
children: "Origin"
|
|
607
|
+
})
|
|
608
|
+
] }) }), /* @__PURE__ */ l("tbody", { children: n.map((e) => /* @__PURE__ */ u("tr", { children: [
|
|
609
|
+
/* @__PURE__ */ l("td", { children: e.kind }),
|
|
610
|
+
/* @__PURE__ */ l("td", { children: /* @__PURE__ */ l("code", { children: e.key }) }),
|
|
611
|
+
/* @__PURE__ */ l("td", { children: e.value ? /* @__PURE__ */ l("code", { children: e.value }) : /* @__PURE__ */ l("span", {
|
|
612
|
+
className: "description",
|
|
613
|
+
children: "hidden"
|
|
614
|
+
}) }),
|
|
615
|
+
/* @__PURE__ */ l("td", { children: /* @__PURE__ */ l("span", {
|
|
616
|
+
className: "badge",
|
|
617
|
+
children: e.origin
|
|
618
|
+
}) })
|
|
619
|
+
] }, `${e.kind}:${e.key}`)) })]
|
|
620
|
+
}) : /* @__PURE__ */ l("p", { children: "No values, repositories, secrets or images were merged." }),
|
|
621
|
+
t && /* @__PURE__ */ u("p", {
|
|
622
|
+
className: "description",
|
|
623
|
+
children: ["Render digest: ", /* @__PURE__ */ l("code", { children: t })]
|
|
624
|
+
})
|
|
625
|
+
]
|
|
626
|
+
})] });
|
|
627
|
+
}
|
|
628
|
+
var ee = {
|
|
629
|
+
blueprint: "From the Blueprint",
|
|
630
|
+
config: "From the Config",
|
|
631
|
+
connectors: "Connectors",
|
|
632
|
+
realm: "Realm defaults",
|
|
633
|
+
space: "Space defaults",
|
|
634
|
+
stack: "Stack defaults",
|
|
635
|
+
cell: "Set for this cell",
|
|
636
|
+
other: "Other"
|
|
637
|
+
};
|
|
638
|
+
function te({ values: n, connectors: s, sources: d = {}, team: f = "" }) {
|
|
639
|
+
let p = q(n, s);
|
|
640
|
+
if (!p.length) return /* @__PURE__ */ l("p", {
|
|
641
|
+
className: "description",
|
|
642
|
+
children: "No values, repositories, secrets or images were merged."
|
|
643
|
+
});
|
|
644
|
+
let m = {
|
|
645
|
+
blueprint: d.blueprint,
|
|
646
|
+
config: d.config,
|
|
647
|
+
realm: d.realm,
|
|
648
|
+
space: d.space,
|
|
649
|
+
stack: d.stack
|
|
650
|
+
};
|
|
651
|
+
return /* @__PURE__ */ l("div", {
|
|
652
|
+
className: "merged-values source-groups",
|
|
653
|
+
role: "group",
|
|
654
|
+
"aria-label": "Preview sources",
|
|
655
|
+
children: p.map((n) => {
|
|
656
|
+
let s = ee[n.source];
|
|
657
|
+
return /* @__PURE__ */ u("div", {
|
|
658
|
+
role: "group",
|
|
659
|
+
"aria-label": s,
|
|
660
|
+
children: [/* @__PURE__ */ u("h4", { children: [s, m[n.source] && /* @__PURE__ */ u(c, { children: [" ", /* @__PURE__ */ l("span", {
|
|
661
|
+
className: "description",
|
|
662
|
+
children: m[n.source]
|
|
663
|
+
})] })] }), n.source === "connectors" ? /* @__PURE__ */ u("table", {
|
|
664
|
+
"aria-label": s,
|
|
665
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
666
|
+
/* @__PURE__ */ l("th", {
|
|
667
|
+
scope: "col",
|
|
668
|
+
children: "Connector"
|
|
669
|
+
}),
|
|
670
|
+
/* @__PURE__ */ l("th", {
|
|
671
|
+
scope: "col",
|
|
672
|
+
children: "Method"
|
|
673
|
+
}),
|
|
674
|
+
/* @__PURE__ */ l("th", {
|
|
675
|
+
scope: "col",
|
|
676
|
+
children: "Identity"
|
|
677
|
+
}),
|
|
678
|
+
/* @__PURE__ */ l("th", {
|
|
679
|
+
scope: "col",
|
|
680
|
+
children: "Decided by"
|
|
681
|
+
})
|
|
682
|
+
] }) }), /* @__PURE__ */ l("tbody", { children: n.rows.map((n) => /* @__PURE__ */ u("tr", { children: [
|
|
683
|
+
/* @__PURE__ */ l("td", { children: e(n) }),
|
|
684
|
+
/* @__PURE__ */ l("td", { children: n.method || /* @__PURE__ */ l("span", {
|
|
685
|
+
className: "description",
|
|
686
|
+
children: "—"
|
|
687
|
+
}) }),
|
|
688
|
+
/* @__PURE__ */ u("td", { children: [n.identity ? /* @__PURE__ */ u(c, { children: [
|
|
689
|
+
/* @__PURE__ */ l("code", { children: n.identity.name }),
|
|
690
|
+
" ",
|
|
691
|
+
/* @__PURE__ */ l("span", {
|
|
692
|
+
className: "description",
|
|
693
|
+
children: r(n.identity).join(" / ")
|
|
694
|
+
}),
|
|
695
|
+
t(n) && /* @__PURE__ */ u("span", {
|
|
696
|
+
className: "connector-harness-state",
|
|
697
|
+
children: [" · State: ", t(n)]
|
|
698
|
+
})
|
|
699
|
+
] }) : /* @__PURE__ */ l(a, {
|
|
700
|
+
status: n,
|
|
701
|
+
team: f
|
|
702
|
+
}), /* @__PURE__ */ l(i, { warning: n.warning })] }),
|
|
703
|
+
/* @__PURE__ */ l("td", { children: n.origin ? /* @__PURE__ */ l("span", {
|
|
704
|
+
className: "badge",
|
|
705
|
+
children: o(n.origin, f)
|
|
706
|
+
}) : /* @__PURE__ */ l("span", {
|
|
707
|
+
className: "description",
|
|
708
|
+
children: "—"
|
|
709
|
+
}) })
|
|
710
|
+
] }, `${n.connector}:${n.component}`)) })]
|
|
711
|
+
}) : /* @__PURE__ */ u("table", {
|
|
712
|
+
"aria-label": s,
|
|
713
|
+
children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ u("tr", { children: [
|
|
714
|
+
/* @__PURE__ */ l("th", {
|
|
715
|
+
scope: "col",
|
|
716
|
+
children: "Kind"
|
|
717
|
+
}),
|
|
718
|
+
/* @__PURE__ */ l("th", {
|
|
719
|
+
scope: "col",
|
|
720
|
+
children: "Key"
|
|
721
|
+
}),
|
|
722
|
+
/* @__PURE__ */ l("th", {
|
|
723
|
+
scope: "col",
|
|
724
|
+
children: "Value"
|
|
725
|
+
})
|
|
726
|
+
] }) }), /* @__PURE__ */ l("tbody", { children: n.rows.map((e) => /* @__PURE__ */ u("tr", { children: [
|
|
727
|
+
/* @__PURE__ */ l("td", { children: e.kind }),
|
|
728
|
+
/* @__PURE__ */ l("td", { children: /* @__PURE__ */ l("code", { children: e.key }) }),
|
|
729
|
+
/* @__PURE__ */ l("td", { children: e.value ? /* @__PURE__ */ l("code", { children: e.value }) : /* @__PURE__ */ l("span", {
|
|
730
|
+
className: "description",
|
|
731
|
+
children: "hidden"
|
|
732
|
+
}) })
|
|
733
|
+
] }, `${e.kind}:${e.key}`)) })]
|
|
734
|
+
})]
|
|
735
|
+
}, n.source);
|
|
736
|
+
})
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
export { M as _, H as a, x as c, G as d, N as f, w as g, O as h, b as i, j as l, U as m, te as n, X as o, P as p, Q as r, Z as s, $ as t, S as u, J as v, k as y };
|