@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,735 @@
|
|
|
1
|
+
import { Dt as e, Kn as t, Ot as n, at as r, dt as i, ft as a, ht as o, lt as s, pt as c, ut as l, xt as ee } from "./connector-ui-CG9kLZ5s.js";
|
|
2
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
3
|
+
// src/team-form.mjs
|
|
4
|
+
var p = (e) => Array.isArray(e) ? e : [], m = (e) => typeof e == "string" ? e : "", h = (e) => m(e).trim(), g = "project", _ = {
|
|
5
|
+
project: {
|
|
6
|
+
key: "project",
|
|
7
|
+
title: "Project"
|
|
8
|
+
},
|
|
9
|
+
sources: {
|
|
10
|
+
key: "sources",
|
|
11
|
+
title: "Other sources"
|
|
12
|
+
},
|
|
13
|
+
roles: {
|
|
14
|
+
key: "roles",
|
|
15
|
+
title: "Roles and harnesses"
|
|
16
|
+
},
|
|
17
|
+
tasks: {
|
|
18
|
+
key: "tasks",
|
|
19
|
+
title: "Tasks and schedules"
|
|
20
|
+
},
|
|
21
|
+
credentials: {
|
|
22
|
+
key: "credentials",
|
|
23
|
+
title: "Credentials"
|
|
24
|
+
},
|
|
25
|
+
review: {
|
|
26
|
+
key: "review",
|
|
27
|
+
title: "Review"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function v(e) {
|
|
31
|
+
return (e === "edit" ? [
|
|
32
|
+
"sources",
|
|
33
|
+
"roles",
|
|
34
|
+
"tasks",
|
|
35
|
+
"credentials",
|
|
36
|
+
"review"
|
|
37
|
+
] : [
|
|
38
|
+
"project",
|
|
39
|
+
"sources",
|
|
40
|
+
"roles",
|
|
41
|
+
"tasks",
|
|
42
|
+
"credentials",
|
|
43
|
+
"review"
|
|
44
|
+
]).map((e) => _[e]);
|
|
45
|
+
}
|
|
46
|
+
var y = [
|
|
47
|
+
"address",
|
|
48
|
+
"stored",
|
|
49
|
+
"file"
|
|
50
|
+
];
|
|
51
|
+
function b() {
|
|
52
|
+
return {
|
|
53
|
+
mode: "address",
|
|
54
|
+
address: "",
|
|
55
|
+
stored: "",
|
|
56
|
+
file: "",
|
|
57
|
+
refKind: "branch",
|
|
58
|
+
ref: "",
|
|
59
|
+
identity: "",
|
|
60
|
+
name: "",
|
|
61
|
+
useRepoFile: !0
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function x(e) {
|
|
65
|
+
let t = y.includes(e?.mode) ? e.mode : "address", r = {};
|
|
66
|
+
return h(e?.name) && (r.name = h(e.name)), t === "file" ? r.declaration = m(e?.file) : (r.source = h(t === "stored" ? e?.stored : e?.address), n(r, e?.refKind, e?.ref), t === "address" && h(e?.identity) && (r.identity = h(e.identity)), r.useRepoFile = e?.useRepoFile !== !1), r;
|
|
67
|
+
}
|
|
68
|
+
function S(t) {
|
|
69
|
+
let n = [], r = t?.mode;
|
|
70
|
+
return r === "file" && !h(t?.file) && n.push("Paste a kuketeam.yaml."), r === "stored" && !h(t?.stored) && n.push("Choose a stored Source."), r !== "address" && r || h(t?.address) || n.push("Repository address is required."), r !== "file" && n.push(...a(t?.refKind, t?.ref)), h(t?.name) && !e(t.name) && n.push("A team name is lowercase letters, digits, dots and hyphens."), n;
|
|
71
|
+
}
|
|
72
|
+
function C(t, n) {
|
|
73
|
+
let r = [], i = /* @__PURE__ */ new Set([g]);
|
|
74
|
+
return p(t?.sources).forEach((t, o) => {
|
|
75
|
+
let s = h(t.alias), c = s || `source ${o + 1}`;
|
|
76
|
+
s ? e(s) ? i.has(s) && r.push(`Source ${c} is listed twice.`) : r.push(`Source ${c}: a name is lowercase letters, digits, dots and hyphens.`) : r.push(`Source ${o + 1} needs a name.`), i.add(s), t.url !== void 0 && !h(t.url) && r.push(`Source ${c} needs an address.`), h(t.clonePath) && !h(t.clonePath).startsWith("/") && r.push(`Source ${c}: a clone path is absolute.`), h(t.stored) && !e(t.stored) && r.push(`Source ${c}: the stored name is lowercase letters, digits, dots and hyphens.`), r.push(...a(t.refKind, t.ref).map((e) => `Source ${c}: ${e}`));
|
|
77
|
+
let l = p(n).find((e) => e.alias === s);
|
|
78
|
+
l?.state === "conflict" && h(t.url) && w(t) === l.stored && r.push(`Source ${c}: a stored Source ${l.stored} holds another repository (${l.have}); store this one under another name.`);
|
|
79
|
+
}), r;
|
|
80
|
+
}
|
|
81
|
+
function w(e) {
|
|
82
|
+
return h(e?.stored) || h(e?.alias);
|
|
83
|
+
}
|
|
84
|
+
function T(e) {
|
|
85
|
+
return e ? {
|
|
86
|
+
alias: h(e.name),
|
|
87
|
+
stored: "",
|
|
88
|
+
refKind: "",
|
|
89
|
+
ref: "",
|
|
90
|
+
clonePath: ""
|
|
91
|
+
} : {
|
|
92
|
+
alias: "",
|
|
93
|
+
stored: "",
|
|
94
|
+
url: "",
|
|
95
|
+
refKind: "branch",
|
|
96
|
+
ref: "",
|
|
97
|
+
clonePath: "",
|
|
98
|
+
identity: ""
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function te(e, t, n) {
|
|
102
|
+
let r = [...p(e?.sources)];
|
|
103
|
+
return t === void 0 ? r.push({
|
|
104
|
+
...T(),
|
|
105
|
+
...n
|
|
106
|
+
}) : n === null ? r.splice(t, 1) : r[t] = {
|
|
107
|
+
...r[t],
|
|
108
|
+
...n
|
|
109
|
+
}, {
|
|
110
|
+
...e,
|
|
111
|
+
sources: r
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function E(e, t) {
|
|
115
|
+
return {
|
|
116
|
+
...e,
|
|
117
|
+
project: {
|
|
118
|
+
...e?.project ?? { alias: "project" },
|
|
119
|
+
...t
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function D(e, t) {
|
|
124
|
+
let n = [], r = /* @__PURE__ */ new Set();
|
|
125
|
+
if (e?.project) {
|
|
126
|
+
let i = h(e.project.stored) ? p(t).find((t) => t.name === h(e.project.stored)) : void 0;
|
|
127
|
+
n.push({
|
|
128
|
+
alias: g,
|
|
129
|
+
stored: h(e.project.stored),
|
|
130
|
+
url: h(e.project.url) || m(i?.url),
|
|
131
|
+
refKind: m(e.project.refKind),
|
|
132
|
+
ref: m(e.project.ref),
|
|
133
|
+
identity: m(e.project.identity),
|
|
134
|
+
declared: !0
|
|
135
|
+
}), r.add(g);
|
|
136
|
+
}
|
|
137
|
+
for (let i of p(e?.sources)) {
|
|
138
|
+
let e = h(i.alias);
|
|
139
|
+
if (!e || r.has(e)) continue;
|
|
140
|
+
r.add(e);
|
|
141
|
+
let a = p(t).find((e) => e.name === w(i));
|
|
142
|
+
n.push({
|
|
143
|
+
alias: e,
|
|
144
|
+
stored: h(i.url) ? "" : w(i),
|
|
145
|
+
url: h(i.url) || m(a?.url),
|
|
146
|
+
refKind: m(i.refKind),
|
|
147
|
+
ref: m(i.ref),
|
|
148
|
+
identity: h(i.url) ? m(i.identity) : m(a?.identity),
|
|
149
|
+
declared: !0
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
for (let e of p(t)) {
|
|
153
|
+
if (r.has(e.name)) continue;
|
|
154
|
+
r.add(e.name);
|
|
155
|
+
let t = o(e);
|
|
156
|
+
n.push({
|
|
157
|
+
alias: e.name,
|
|
158
|
+
stored: e.name,
|
|
159
|
+
url: m(e.url),
|
|
160
|
+
refKind: t.kind,
|
|
161
|
+
ref: t.value,
|
|
162
|
+
identity: m(e.identity),
|
|
163
|
+
declared: !1
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return n;
|
|
167
|
+
}
|
|
168
|
+
function O(e) {
|
|
169
|
+
if (!h(e?.stored) && h(e?.url)) {
|
|
170
|
+
let t = n({ url: h(e.url) }, e.refKind, e.ref);
|
|
171
|
+
return h(e.identity) && (t.identity = h(e.identity)), {
|
|
172
|
+
path: r,
|
|
173
|
+
body: t
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
path: ee(h(e?.stored) || h(e?.alias), "inspect"),
|
|
178
|
+
body: {}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function k(e) {
|
|
182
|
+
let t = m(e);
|
|
183
|
+
if (!t) return ".";
|
|
184
|
+
let n = t.startsWith("/"), r = [];
|
|
185
|
+
for (let e of t.split("/")) e && e !== "." && (e === ".." ? r.length && r[r.length - 1] !== ".." ? r.pop() : n || r.push("..") : r.push(e));
|
|
186
|
+
let i = r.join("/");
|
|
187
|
+
return n ? `/${i}` : i || ".";
|
|
188
|
+
}
|
|
189
|
+
var A = (e) => ({
|
|
190
|
+
transport: "other",
|
|
191
|
+
host: "",
|
|
192
|
+
path: e
|
|
193
|
+
}), j = (e) => /[\s\p{Cc}]/u.test(e);
|
|
194
|
+
function ne(e) {
|
|
195
|
+
if (!e || e.includes("://") || e.startsWith(".")) return "";
|
|
196
|
+
let t = e.indexOf("/");
|
|
197
|
+
if (t < 0) return "";
|
|
198
|
+
let n = e.slice(0, t);
|
|
199
|
+
return !e.slice(t + 1).replace(/^\/+|\/+$/g, "") || !n.includes(".") || /[:@]/.test(n) || j(e) ? "" : n;
|
|
200
|
+
}
|
|
201
|
+
function M(e) {
|
|
202
|
+
let t = h(ne(m(e)) ? `https://${m(e)}` : e), n = t.indexOf("://");
|
|
203
|
+
if (n >= 0) {
|
|
204
|
+
let e = {
|
|
205
|
+
ssh: "ssh",
|
|
206
|
+
"git+ssh": "ssh",
|
|
207
|
+
"ssh+git": "ssh",
|
|
208
|
+
https: "https",
|
|
209
|
+
http: "http"
|
|
210
|
+
}[t.slice(0, n).toLowerCase()];
|
|
211
|
+
if (!e) return A(t);
|
|
212
|
+
let r;
|
|
213
|
+
try {
|
|
214
|
+
r = new URL(t);
|
|
215
|
+
} catch {
|
|
216
|
+
return A(t);
|
|
217
|
+
}
|
|
218
|
+
let i = r.hostname.replace(/^\[|\]$/g, "").toLowerCase();
|
|
219
|
+
if (!i) return A(t);
|
|
220
|
+
let a = r.pathname;
|
|
221
|
+
try {
|
|
222
|
+
a = decodeURIComponent(a);
|
|
223
|
+
} catch {}
|
|
224
|
+
return {
|
|
225
|
+
transport: e,
|
|
226
|
+
host: i,
|
|
227
|
+
path: a.replace(/^\//, "")
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
let r = t.indexOf(":"), i = t.indexOf("/");
|
|
231
|
+
if (r <= 0 || i >= 0 && i < r || t.startsWith(".")) return A(t);
|
|
232
|
+
let a = t.slice(0, r), o = a.lastIndexOf("@"), s = o >= 0 ? a.slice(0, o) : "";
|
|
233
|
+
return o >= 0 && (a = a.slice(o + 1)), !a || j(s + a) ? A(t) : {
|
|
234
|
+
transport: "ssh",
|
|
235
|
+
host: a.toLowerCase(),
|
|
236
|
+
path: t.slice(r + 1).replace(/^\//, "")
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
var N = (e) => e.replace(/^\/+|\/+$/g, "").replace(/\.git$/, "");
|
|
240
|
+
function P(e, t) {
|
|
241
|
+
let n = M(e), r = M(t);
|
|
242
|
+
return n.transport === "other" || r.transport === "other" ? h(e) === h(t) : n.host === r.host && N(n.path) === N(r.path);
|
|
243
|
+
}
|
|
244
|
+
function F(e, t) {
|
|
245
|
+
return !e || !t ? !1 : e.alias === t.alias || h(e.stored) && h(e.stored) === h(t.stored) ? !0 : !!h(e.url) && !!h(t.url) && P(e.url, t.url);
|
|
246
|
+
}
|
|
247
|
+
function I(e, t, n, r = []) {
|
|
248
|
+
let i = p(r).find((e) => e.alias === t), a = k(n);
|
|
249
|
+
return p(e).findIndex((e) => k(e.path) === a && (e.source === t || !!i && F(i, p(r).find((t) => t.alias === e.source))));
|
|
250
|
+
}
|
|
251
|
+
function L(e, t, n, r = [], i) {
|
|
252
|
+
let a = e?.[t] ?? {
|
|
253
|
+
inherit: !0,
|
|
254
|
+
items: []
|
|
255
|
+
};
|
|
256
|
+
if (n) return {
|
|
257
|
+
...e,
|
|
258
|
+
[t]: {
|
|
259
|
+
inherit: !0,
|
|
260
|
+
items: []
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
let o = a.inherit ? p(r).map((e) => t === "roles" ? z(R(e), i) : {
|
|
264
|
+
name: m(e.name),
|
|
265
|
+
source: m(e.source),
|
|
266
|
+
path: m(e.path)
|
|
267
|
+
}) : p(a.items);
|
|
268
|
+
return {
|
|
269
|
+
...e,
|
|
270
|
+
[t]: {
|
|
271
|
+
inherit: !1,
|
|
272
|
+
items: o
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function R(e) {
|
|
277
|
+
return {
|
|
278
|
+
name: m(e?.name),
|
|
279
|
+
source: m(e?.source),
|
|
280
|
+
path: m(e?.path),
|
|
281
|
+
harness: m(e?.harness),
|
|
282
|
+
initialPath: m(e?.initialPath),
|
|
283
|
+
image: p(e?.image),
|
|
284
|
+
tasks: e?.tasks ?? {
|
|
285
|
+
all: !0,
|
|
286
|
+
items: []
|
|
287
|
+
},
|
|
288
|
+
connectors: p(e?.connectors).map((e) => ({
|
|
289
|
+
name: m(e?.name),
|
|
290
|
+
enabled: !!e?.enabled,
|
|
291
|
+
identity: m(e?.identity)
|
|
292
|
+
}))
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function z(e, t) {
|
|
296
|
+
if (!t) return e;
|
|
297
|
+
let n = p(e?.connectors), r = p(t).filter($).map((e) => m(e.name)).filter((e) => e && !n.some((t) => t.name === e));
|
|
298
|
+
return r.length ? {
|
|
299
|
+
...e,
|
|
300
|
+
connectors: [...n, ...r.map((e) => ({
|
|
301
|
+
name: e,
|
|
302
|
+
enabled: !0,
|
|
303
|
+
identity: ""
|
|
304
|
+
}))]
|
|
305
|
+
} : e;
|
|
306
|
+
}
|
|
307
|
+
function B(e, t, n, r = [], i, a = []) {
|
|
308
|
+
let o = L(e, "roles", !1, r, i), s = [...o.roles.items], c = I(s, t.source, t.path, a);
|
|
309
|
+
return n && c < 0 && s.push(z(R({
|
|
310
|
+
name: t.name,
|
|
311
|
+
source: t.source,
|
|
312
|
+
path: t.path
|
|
313
|
+
}), i)), !n && c >= 0 && s.splice(c, 1), {
|
|
314
|
+
...o,
|
|
315
|
+
roles: {
|
|
316
|
+
inherit: !1,
|
|
317
|
+
items: s
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function V(e, t, n) {
|
|
322
|
+
let r = p(e?.roles?.items).map((e, r) => r === t ? {
|
|
323
|
+
...e,
|
|
324
|
+
...n
|
|
325
|
+
} : e);
|
|
326
|
+
return {
|
|
327
|
+
...e,
|
|
328
|
+
roles: {
|
|
329
|
+
...e.roles,
|
|
330
|
+
items: r
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function H(e, t, n, r = [], i = []) {
|
|
335
|
+
let a = L(e, "harnesses", !1, r), o = [...a.harnesses.items], s = I(o, t.source, t.path, i);
|
|
336
|
+
return n && s < 0 && o.push({
|
|
337
|
+
name: t.name,
|
|
338
|
+
source: t.source,
|
|
339
|
+
path: t.path
|
|
340
|
+
}), !n && s >= 0 && o.splice(s, 1), {
|
|
341
|
+
...a,
|
|
342
|
+
harnesses: {
|
|
343
|
+
inherit: !1,
|
|
344
|
+
items: o
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
function U(e) {
|
|
349
|
+
return m(e).split(",").map((e) => e.trim()).filter(Boolean);
|
|
350
|
+
}
|
|
351
|
+
function W(e) {
|
|
352
|
+
return e?.suspend === !0 ? "off" : e?.suspend === !1 ? "on" : "role";
|
|
353
|
+
}
|
|
354
|
+
function G(e) {
|
|
355
|
+
return e === "off" || e !== "on" && null;
|
|
356
|
+
}
|
|
357
|
+
function K(e, t, n, r = [], i = []) {
|
|
358
|
+
let a;
|
|
359
|
+
if (m(t?.harness)) a = [m(t.harness)];
|
|
360
|
+
else {
|
|
361
|
+
a = (e?.harnesses?.inherit ? p(r) : p(e?.harnesses?.items)).map((e) => m(e?.name)).filter(Boolean);
|
|
362
|
+
let o = p(n?.harnesses).map(m).filter(Boolean), s = p(i).filter((e) => !e?.role || e.role === t?.name).map((e) => m(e?.harness)).filter(Boolean), c = o.length ? o : s;
|
|
363
|
+
c.length && (a = a.filter((e) => c.includes(e)));
|
|
364
|
+
}
|
|
365
|
+
for (let e of p(t?.tasks?.items)) for (let t of Object.keys(e?.harnesses ?? {})) a.includes(t) || a.push(t);
|
|
366
|
+
return [...new Set(a)];
|
|
367
|
+
}
|
|
368
|
+
function q(e) {
|
|
369
|
+
let t = W(e);
|
|
370
|
+
return t === "role" ? "same" : t;
|
|
371
|
+
}
|
|
372
|
+
function J(e, t, n, r = []) {
|
|
373
|
+
let i = [], a = (e) => {
|
|
374
|
+
e && !i.includes(e) && i.push(e);
|
|
375
|
+
};
|
|
376
|
+
p(t).forEach((e) => a(m(e?.name))), p(n).forEach((e) => a(m(e?.task ?? e?.name)));
|
|
377
|
+
let o = p(e?.tasks?.items);
|
|
378
|
+
o.forEach((e) => a(m(e.name)));
|
|
379
|
+
let s = e?.tasks?.all !== !1;
|
|
380
|
+
return i.map((e) => {
|
|
381
|
+
let i = p(t).find((t) => t.name === e) ?? {}, a = p(n).find((t) => m(t?.task ?? t?.name) === e), c = o.find((t) => t.name === e);
|
|
382
|
+
return {
|
|
383
|
+
name: e,
|
|
384
|
+
selected: s || !!c,
|
|
385
|
+
schedule: m(c?.schedule),
|
|
386
|
+
switch: W(c),
|
|
387
|
+
args: m(c?.args),
|
|
388
|
+
roleSchedule: m(i.schedule) || m(a?.schedule?.cron),
|
|
389
|
+
roleSuspend: i.schedule ? !!i.suspend : !!a?.schedule?.suspend,
|
|
390
|
+
roleArgs: m(i.args),
|
|
391
|
+
harnesses: p(r).map((e) => ({
|
|
392
|
+
name: e,
|
|
393
|
+
switch: q(c?.harnesses?.[e]),
|
|
394
|
+
schedule: m(c?.harnesses?.[e]?.schedule)
|
|
395
|
+
}))
|
|
396
|
+
};
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
function Y(e, t, n, r, i) {
|
|
400
|
+
return V(e, t, { tasks: X(e.roles.items[t].tasks, n, r, i) });
|
|
401
|
+
}
|
|
402
|
+
function X(e, t, n, r) {
|
|
403
|
+
let i = e?.all === !1 ? p(e?.items).map((e) => ({ ...e })) : p(r).map((e) => ({
|
|
404
|
+
name: m(e),
|
|
405
|
+
suspend: null
|
|
406
|
+
})), a = i.findIndex((e) => e.name === t);
|
|
407
|
+
if (n.selected === !1) return i = i.filter((e) => e.name !== t), {
|
|
408
|
+
all: !1,
|
|
409
|
+
items: i
|
|
410
|
+
};
|
|
411
|
+
let o = { ...a >= 0 ? i[a] : {
|
|
412
|
+
name: t,
|
|
413
|
+
suspend: null
|
|
414
|
+
} };
|
|
415
|
+
return "schedule" in n && (o.schedule = m(n.schedule)), "args" in n && (o.args = m(n.args)), "harness" in n ? Object.assign(o, Z(o.harnesses, n.harness, n.switch)) : "switch" in n && (o.suspend = G(n.switch)), a >= 0 ? i[a] = o : i.push(o), {
|
|
416
|
+
all: !1,
|
|
417
|
+
items: i
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function Z(e, t, n) {
|
|
421
|
+
let r = { ...e ?? {} }, i = m(r[t]?.schedule), a = G(n === "same" ? "role" : n);
|
|
422
|
+
return a === null && !i ? delete r[t] : r[t] = i ? {
|
|
423
|
+
schedule: i,
|
|
424
|
+
suspend: a
|
|
425
|
+
} : { suspend: a }, { harnesses: Object.keys(r).length ? r : void 0 };
|
|
426
|
+
}
|
|
427
|
+
function re(e, t) {
|
|
428
|
+
return V(e, t, { tasks: {
|
|
429
|
+
all: !0,
|
|
430
|
+
items: []
|
|
431
|
+
} });
|
|
432
|
+
}
|
|
433
|
+
var ie = [
|
|
434
|
+
"@hourly",
|
|
435
|
+
"@daily",
|
|
436
|
+
"@weekly",
|
|
437
|
+
"@monthly"
|
|
438
|
+
];
|
|
439
|
+
function Q(e) {
|
|
440
|
+
let t = h(e);
|
|
441
|
+
if (!t || ie.includes(t)) return [];
|
|
442
|
+
let n = t.split(/\s+/);
|
|
443
|
+
return n.length !== 5 || !n.every((e) => /^[0-9*,/\-A-Za-z?]+$/.test(e)) ? [`"${t}" is not a five-field cron expression or @hourly, @daily, @weekly, @monthly.`] : [];
|
|
444
|
+
}
|
|
445
|
+
function ae(t) {
|
|
446
|
+
let n = [];
|
|
447
|
+
t?.roles && !t.roles.inherit && !p(t.roles.items).length && n.push("Select at least one role, or use the default roles."), t?.harnesses && !t.harnesses.inherit && !p(t.harnesses.items).length && n.push("Select at least one harness, or use the default harnesses.");
|
|
448
|
+
let r = /* @__PURE__ */ new Set();
|
|
449
|
+
for (let i of p(t?.roles?.items)) e(i.name) ? r.has(i.name) && n.push(`Role ${i.name} is selected twice; rename one.`) : n.push(`Role ${i.name || i.path}: a name is lowercase letters, digits, dots and hyphens.`), r.add(i.name), se(h(i.initialPath)) || n.push(`Role ${i.name}: the initial path is $HOME, $HOME/<directory> or a clean absolute path (letters, digits, _, ., / and -).`);
|
|
450
|
+
let i = /* @__PURE__ */ new Set();
|
|
451
|
+
for (let e of p(t?.harnesses?.items)) i.has(e.name) && n.push(`Harness ${e.name} is selected twice; remove one.`), i.add(e.name);
|
|
452
|
+
return n;
|
|
453
|
+
}
|
|
454
|
+
function oe(e) {
|
|
455
|
+
return /^\/[A-Za-z0-9_./-]+$/.test(e) && e.slice(1).split("/").every((e) => e && e !== "." && e !== "..");
|
|
456
|
+
}
|
|
457
|
+
function se(e) {
|
|
458
|
+
return e === "" || e === "$HOME" || e === "/" || oe(e.startsWith("$HOME/") ? e.slice(5) : e);
|
|
459
|
+
}
|
|
460
|
+
function ce(e) {
|
|
461
|
+
let t = [];
|
|
462
|
+
for (let n of p(e?.roles?.items)) for (let e of p(n.tasks?.items)) {
|
|
463
|
+
t.push(...Q(e.schedule).map((t) => `${n.name} / ${e.name}: ${t}`));
|
|
464
|
+
for (let [r, i] of Object.entries(e.harnesses ?? {})) t.push(...Q(i?.schedule).map((t) => `${n.name} / ${e.name} on ${r}: ${t}`));
|
|
465
|
+
}
|
|
466
|
+
return t;
|
|
467
|
+
}
|
|
468
|
+
function le(e, t) {
|
|
469
|
+
switch (e) {
|
|
470
|
+
case "project": return [...S(t?.project), ...t?.draft ? [] : ["Read the repository first."]];
|
|
471
|
+
case "sources": return [...t?.form?.project ? a(t.form.project.refKind, t.form.project.ref) : [], ...C(t?.form, t?.draft?.sources)];
|
|
472
|
+
case "roles": return ae(t?.form);
|
|
473
|
+
case "tasks": return ce(t?.form);
|
|
474
|
+
default: return [];
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
function ue(e, t, n, r = {}) {
|
|
478
|
+
let i = e?.connectors ?? {
|
|
479
|
+
inherit: !0,
|
|
480
|
+
items: {}
|
|
481
|
+
}, a = { ...i.inherit ? r : i.items ?? {} }, o = {
|
|
482
|
+
...a[t] ?? {},
|
|
483
|
+
...n
|
|
484
|
+
};
|
|
485
|
+
return !h(o.method) && !h(o.identity) && !h(o.state) ? delete a[t] : a[t] = {
|
|
486
|
+
method: h(o.method),
|
|
487
|
+
identity: h(o.identity),
|
|
488
|
+
...h(o.state) ? { state: h(o.state) } : {}
|
|
489
|
+
}, {
|
|
490
|
+
...e,
|
|
491
|
+
connectors: {
|
|
492
|
+
inherit: !1,
|
|
493
|
+
items: a
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
function $(e) {
|
|
498
|
+
return !!e && !h(e.harness) && e.delivery !== "registry";
|
|
499
|
+
}
|
|
500
|
+
function de(e, t, n = []) {
|
|
501
|
+
let r = p(e?.connectors);
|
|
502
|
+
return p(t).filter($).map((t) => {
|
|
503
|
+
let i = m(t.name), a = r.find((e) => e.name === i), o = p(n).filter((t) => t.role === m(e?.name) && t.connector === i);
|
|
504
|
+
return {
|
|
505
|
+
name: i,
|
|
506
|
+
title: m(t.title) || i,
|
|
507
|
+
enabled: !!a?.enabled,
|
|
508
|
+
identity: m(a?.identity),
|
|
509
|
+
required: !a?.enabled && o.some((e) => !e.setByTeam),
|
|
510
|
+
states: o.map((e) => ({
|
|
511
|
+
config: m(e.config),
|
|
512
|
+
state: m(e.state),
|
|
513
|
+
fill: m(e.fill)
|
|
514
|
+
}))
|
|
515
|
+
};
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
function fe(e, t, n, r) {
|
|
519
|
+
let i = p(e?.roles?.items)[t];
|
|
520
|
+
if (!i) return e;
|
|
521
|
+
let a = p(i.connectors).map((e) => ({ ...e })), o = a.findIndex((e) => e.name === n), s = { ...o >= 0 ? a[o] : {
|
|
522
|
+
name: n,
|
|
523
|
+
enabled: !1,
|
|
524
|
+
identity: ""
|
|
525
|
+
} };
|
|
526
|
+
return "enabled" in r && (s.enabled = !!r.enabled), "identity" in r && (s.identity = h(r.identity)), o >= 0 ? a[o] = s : a.push(s), V(e, t, { connectors: a });
|
|
527
|
+
}
|
|
528
|
+
function pe(e, t, n = {}) {
|
|
529
|
+
if (t) return {
|
|
530
|
+
...e,
|
|
531
|
+
connectors: {
|
|
532
|
+
inherit: !0,
|
|
533
|
+
items: {}
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
let r = e?.connectors ?? {
|
|
537
|
+
inherit: !0,
|
|
538
|
+
items: {}
|
|
539
|
+
}, i = r.inherit ? Object.fromEntries(Object.entries(n ?? {}).map(([e, t]) => [e, { ...t }])) : { ...r.items ?? {} };
|
|
540
|
+
return {
|
|
541
|
+
...e,
|
|
542
|
+
connectors: {
|
|
543
|
+
inherit: !1,
|
|
544
|
+
items: i
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
function me(e, t, n, r = !1) {
|
|
549
|
+
let i = x(e);
|
|
550
|
+
return delete i.useRepoFile, delete i.declaration, i.name = h(n?.name) || h(t?.name), i.form = {
|
|
551
|
+
...n,
|
|
552
|
+
name: i.name
|
|
553
|
+
}, i.declaration = m(t?.declaration), r && (i.force = !0), i;
|
|
554
|
+
}
|
|
555
|
+
function he(e, t) {
|
|
556
|
+
return {
|
|
557
|
+
name: h(e),
|
|
558
|
+
form: {
|
|
559
|
+
...t,
|
|
560
|
+
name: h(e)
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
function ge(e, t) {
|
|
565
|
+
let n = p(t).filter((e) => e?.delivery === "git").map((e) => m(e.name));
|
|
566
|
+
return p(e).filter((e) => n.includes(m(e?.spec?.connector)) && m(e?.metadata?.realm) === "default" && !h(e?.metadata?.space) && !h(e?.metadata?.cell) && h(e?.metadata?.name)).map((e) => e.metadata.name).sort();
|
|
567
|
+
}
|
|
568
|
+
function _e(e) {
|
|
569
|
+
return {
|
|
570
|
+
stored: "stored",
|
|
571
|
+
new: "new Source",
|
|
572
|
+
conflict: "conflict",
|
|
573
|
+
missing: "not stored"
|
|
574
|
+
}[e] ?? m(e);
|
|
575
|
+
}
|
|
576
|
+
// src/team-plan.tsx
|
|
577
|
+
function ve({ plan: e, title: t }) {
|
|
578
|
+
let n = l(e);
|
|
579
|
+
return /* @__PURE__ */ f("section", {
|
|
580
|
+
className: "panel team-plan",
|
|
581
|
+
"aria-label": t,
|
|
582
|
+
children: [/* @__PURE__ */ f("div", {
|
|
583
|
+
className: "panel-heading",
|
|
584
|
+
children: [/* @__PURE__ */ d("h2", { children: t }), /* @__PURE__ */ d("span", {
|
|
585
|
+
className: "badge",
|
|
586
|
+
children: s(e.origin)
|
|
587
|
+
})]
|
|
588
|
+
}), /* @__PURE__ */ f("div", {
|
|
589
|
+
className: "panel-body",
|
|
590
|
+
children: [
|
|
591
|
+
!!e.sources?.length && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("h3", { children: "Sources" }), /* @__PURE__ */ d("ul", {
|
|
592
|
+
className: "state-list",
|
|
593
|
+
children: e.sources.map((e) => /* @__PURE__ */ f("li", { children: [
|
|
594
|
+
/* @__PURE__ */ d("code", { children: e.name }),
|
|
595
|
+
" ",
|
|
596
|
+
e.url,
|
|
597
|
+
" ",
|
|
598
|
+
/* @__PURE__ */ f("span", {
|
|
599
|
+
className: "description",
|
|
600
|
+
children: [e.ref, e.commit ? ` at ${e.commit.slice(0, 12)}` : ""]
|
|
601
|
+
})
|
|
602
|
+
] }, e.name))
|
|
603
|
+
})] }),
|
|
604
|
+
/* @__PURE__ */ d("h3", { children: "Role × harness" }),
|
|
605
|
+
n.length ? /* @__PURE__ */ d("div", {
|
|
606
|
+
className: "table-scroll",
|
|
607
|
+
children: /* @__PURE__ */ f("table", {
|
|
608
|
+
"aria-label": "Role and harness pairs",
|
|
609
|
+
children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ f("tr", { children: [
|
|
610
|
+
/* @__PURE__ */ d("th", { children: "Role" }),
|
|
611
|
+
/* @__PURE__ */ d("th", { children: "Harness" }),
|
|
612
|
+
/* @__PURE__ */ d("th", { children: "Config" }),
|
|
613
|
+
/* @__PURE__ */ d("th", { children: "Image" }),
|
|
614
|
+
/* @__PURE__ */ d("th", { children: "Tasks" }),
|
|
615
|
+
/* @__PURE__ */ d("th", { children: "Connectors and components" })
|
|
616
|
+
] }) }), /* @__PURE__ */ d("tbody", { children: n.map((e) => /* @__PURE__ */ f("tr", { children: [
|
|
617
|
+
/* @__PURE__ */ d("td", { children: e.role }),
|
|
618
|
+
/* @__PURE__ */ d("td", { children: e.harness }),
|
|
619
|
+
/* @__PURE__ */ d("td", {
|
|
620
|
+
className: "mono-id",
|
|
621
|
+
children: e.config
|
|
622
|
+
}),
|
|
623
|
+
/* @__PURE__ */ d("td", {
|
|
624
|
+
className: "mono-id",
|
|
625
|
+
children: e.image
|
|
626
|
+
}),
|
|
627
|
+
/* @__PURE__ */ d("td", { children: e.tasks.join(", ") || "—" }),
|
|
628
|
+
/* @__PURE__ */ d("td", { children: e.components.join(", ") || "—" })
|
|
629
|
+
] }, e.key)) })]
|
|
630
|
+
})
|
|
631
|
+
}) : /* @__PURE__ */ d("p", {
|
|
632
|
+
className: "description",
|
|
633
|
+
children: "No role × harness pair."
|
|
634
|
+
}),
|
|
635
|
+
i(e).map((e) => /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h3", { children: e.title }), /* @__PURE__ */ d("ul", {
|
|
636
|
+
className: "state-list",
|
|
637
|
+
"aria-label": e.title,
|
|
638
|
+
children: e.items.map((e) => /* @__PURE__ */ d("li", {
|
|
639
|
+
className: "mono-id",
|
|
640
|
+
children: e
|
|
641
|
+
}, e))
|
|
642
|
+
})] }, e.key)),
|
|
643
|
+
e.declaration && /* @__PURE__ */ f("details", {
|
|
644
|
+
className: "health-body",
|
|
645
|
+
children: [/* @__PURE__ */ d("summary", { children: "Declaration" }), /* @__PURE__ */ d("pre", {
|
|
646
|
+
tabIndex: 0,
|
|
647
|
+
"aria-label": "Composed declaration",
|
|
648
|
+
children: e.declaration
|
|
649
|
+
})]
|
|
650
|
+
})
|
|
651
|
+
]
|
|
652
|
+
})]
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
function ye({ outcome: e }) {
|
|
656
|
+
let t = e.result;
|
|
657
|
+
return t ? /* @__PURE__ */ f("div", {
|
|
658
|
+
className: "health-sweep-started",
|
|
659
|
+
role: "status",
|
|
660
|
+
children: [
|
|
661
|
+
/* @__PURE__ */ f("p", { children: [
|
|
662
|
+
"Team ",
|
|
663
|
+
/* @__PURE__ */ d("code", { children: t.team }),
|
|
664
|
+
" applied: ",
|
|
665
|
+
t.resources,
|
|
666
|
+
" resources",
|
|
667
|
+
t.pruned.length ? `; pruned ${t.pruned.join(", ")}` : "",
|
|
668
|
+
"."
|
|
669
|
+
] }),
|
|
670
|
+
!!t.missingSecrets.length && /* @__PURE__ */ f("p", { children: [
|
|
671
|
+
"Missing secrets: ",
|
|
672
|
+
t.missingSecrets.join(", "),
|
|
673
|
+
"."
|
|
674
|
+
] }),
|
|
675
|
+
!!t.notes.length && /* @__PURE__ */ d("ul", {
|
|
676
|
+
className: "description",
|
|
677
|
+
children: t.notes.map((e) => /* @__PURE__ */ d("li", { children: e }, e))
|
|
678
|
+
})
|
|
679
|
+
]
|
|
680
|
+
}) : null;
|
|
681
|
+
}
|
|
682
|
+
function be({ kind: e, value: t, disabled: n, label: r = "Ref", allowNone: i = !1, onChange: a }) {
|
|
683
|
+
let o = i ? ["", ...c] : c;
|
|
684
|
+
return /* @__PURE__ */ f("label", {
|
|
685
|
+
className: "schema-field",
|
|
686
|
+
children: [/* @__PURE__ */ d("span", { children: r }), /* @__PURE__ */ f("span", {
|
|
687
|
+
className: "team-ref",
|
|
688
|
+
children: [/* @__PURE__ */ d("select", {
|
|
689
|
+
value: e,
|
|
690
|
+
disabled: n,
|
|
691
|
+
"aria-label": `${r} kind`,
|
|
692
|
+
onChange: (e) => a(e.target.value, e.target.value ? t : ""),
|
|
693
|
+
children: o.map((e) => /* @__PURE__ */ d("option", {
|
|
694
|
+
value: e,
|
|
695
|
+
children: e || "the Source's"
|
|
696
|
+
}, e))
|
|
697
|
+
}), /* @__PURE__ */ d("input", {
|
|
698
|
+
value: t,
|
|
699
|
+
disabled: n || !e,
|
|
700
|
+
placeholder: e ? e === "branch" ? "default branch" : e === "tag" ? "v1.2.3" : "full commit SHA" : "the stored Source's ref",
|
|
701
|
+
spellCheck: !1,
|
|
702
|
+
autoComplete: "off",
|
|
703
|
+
"aria-label": r,
|
|
704
|
+
onChange: (t) => a(e, t.target.value)
|
|
705
|
+
})]
|
|
706
|
+
})]
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
function xe({ value: e, disabled: n, label: r = "Git identity", onChange: i }) {
|
|
710
|
+
let a = t("/catalog/secrets", 0), o = t("/connectors", 0), s = ge(a.data, o.data), c = e && !s.includes(e) ? [e, ...s] : s;
|
|
711
|
+
return /* @__PURE__ */ f("label", {
|
|
712
|
+
className: "schema-field",
|
|
713
|
+
children: [
|
|
714
|
+
/* @__PURE__ */ d("span", { children: r }),
|
|
715
|
+
/* @__PURE__ */ f("select", {
|
|
716
|
+
value: e,
|
|
717
|
+
disabled: n,
|
|
718
|
+
onChange: (e) => i(e.target.value),
|
|
719
|
+
children: [/* @__PURE__ */ d("option", {
|
|
720
|
+
value: "",
|
|
721
|
+
children: "Default"
|
|
722
|
+
}), c.map((e) => /* @__PURE__ */ d("option", {
|
|
723
|
+
value: e,
|
|
724
|
+
children: e
|
|
725
|
+
}, e))]
|
|
726
|
+
}),
|
|
727
|
+
/* @__PURE__ */ f("small", { children: [
|
|
728
|
+
"A stored git identity of realm default fetches the repository; Default uses the realm's git default for the host, else the account running ",
|
|
729
|
+
/* @__PURE__ */ d("code", { children: "kuke serve" }),
|
|
730
|
+
"."
|
|
731
|
+
] })
|
|
732
|
+
]
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
export { fe as A, re as C, L as D, H as E, te as M, Y as N, E as O, J as S, pe as T, K as _, D as a, le as b, x as c, T as d, U as f, de as g, S as h, be as i, V as j, B as k, he as l, g as m, ye as n, k as o, O as p, ve as r, me as s, xe as t, b as u, I as v, ue as w, v as x, _e as y };
|