@kukeon/console 0.0.0-stage → 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/auth.d.ts +39 -0
- package/dist/bulk-ui.d.ts +49 -0
- package/dist/bulk.d.mts +14 -0
- package/dist/catalog-B29wwZiy.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-ZyuSRdHC.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-CLdOLhDb.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-CyW0d5n2.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-p7giptj3.js +3782 -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/recording-source.d.ts +37 -0
- package/dist/recording.d.mts +24 -0
- package/dist/registry-credentials.d.ts +13 -0
- package/dist/relationships.d.mts +12 -0
- package/dist/replay.d.ts +14 -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,129 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type Failure } from "./request";
|
|
3
|
+
import type { InventoryResource } from "./inventory";
|
|
4
|
+
import type { ConfigMetadata, Connector, ConnectorStatus, Identity, IdentityForm as IdentityFormState, LoginIdentity, Scope, SecretRef, VolumeRef } from "./connectors.mjs";
|
|
5
|
+
export declare function toFailure(caught: unknown): Failure;
|
|
6
|
+
export declare function sendJSON<T>(path: string, body: unknown): Promise<T>;
|
|
7
|
+
export declare function connectorAPI(connector: string, action: "defaults" | "identities" | "import" | "logins" | "login"): string;
|
|
8
|
+
export declare function connectorCatalogLink(connector?: string): string;
|
|
9
|
+
export declare function identitiesLink(connector?: string, scope?: Partial<Scope>): string;
|
|
10
|
+
export declare function newIdentityLink(connector: string, scope?: Partial<Scope>): string;
|
|
11
|
+
export declare function newLoginIdentityLink(connector: string, scope?: Partial<Scope>): string;
|
|
12
|
+
export declare function rotateIdentityLink(connector: string, identity: Partial<SecretRef>, scope?: Partial<Scope>): string;
|
|
13
|
+
export declare function levelLabel(level: string, scope: Partial<Scope>): string;
|
|
14
|
+
export declare function ConnectorStateBadge({ status }: {
|
|
15
|
+
status: ConnectorStatus;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export declare function volumeLink(ref: VolumeRef): string;
|
|
18
|
+
export declare function LoginStateBadge({ state }: {
|
|
19
|
+
state: string | undefined;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export declare function StatusIdentity({ status, team }: {
|
|
22
|
+
status: ConnectorStatus;
|
|
23
|
+
team?: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
25
|
+
export declare function startLogin(connector: string, volume: Partial<SecretRef>, method?: string): Promise<LoginIdentity | undefined>;
|
|
26
|
+
export declare function LoginButton({ connector, title, volume, state, running, method, disabled, idle, className, onStarted }: {
|
|
27
|
+
connector: string;
|
|
28
|
+
title: string;
|
|
29
|
+
volume: Partial<SecretRef>;
|
|
30
|
+
state?: string;
|
|
31
|
+
running?: boolean;
|
|
32
|
+
method?: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
idle?: string;
|
|
35
|
+
className?: string;
|
|
36
|
+
onStarted?: () => void;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
export declare function LoginIdentitySelect({ label, identities, value, onChange, emptyLabel, extra, disabled, help }: {
|
|
39
|
+
label: string;
|
|
40
|
+
identities: LoginIdentity[];
|
|
41
|
+
value: Partial<SecretRef> | undefined;
|
|
42
|
+
onChange: (value: SecretRef | undefined) => void;
|
|
43
|
+
emptyLabel: string;
|
|
44
|
+
extra?: Array<SecretRef | undefined>;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
help?: ReactNode;
|
|
47
|
+
}): import("react").JSX.Element;
|
|
48
|
+
export declare function IdentitySelect({ label, identities, value, onChange, emptyLabel, extra, disabled, required, help, realm, id: fixedId, invalid }: {
|
|
49
|
+
id?: string;
|
|
50
|
+
invalid?: boolean;
|
|
51
|
+
label: string;
|
|
52
|
+
identities: Identity[];
|
|
53
|
+
value: Partial<SecretRef> | undefined;
|
|
54
|
+
onChange: (value: Partial<SecretRef> | undefined) => void;
|
|
55
|
+
emptyLabel: string;
|
|
56
|
+
extra?: Array<SecretRef | undefined>;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
required?: boolean;
|
|
59
|
+
help?: ReactNode;
|
|
60
|
+
realm?: string;
|
|
61
|
+
}): import("react").JSX.Element;
|
|
62
|
+
export declare function ScopeGroup({ title, description, children }: {
|
|
63
|
+
title: string;
|
|
64
|
+
description: ReactNode;
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
}): import("react").JSX.Element;
|
|
67
|
+
export declare function ScopePicker({ label, inventory, levels, value, onChange, disabled }: {
|
|
68
|
+
label: string;
|
|
69
|
+
inventory: InventoryResource;
|
|
70
|
+
levels: string[];
|
|
71
|
+
value: Scope;
|
|
72
|
+
onChange: (scope: Scope) => void;
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
}): import("react").JSX.Element;
|
|
75
|
+
export declare function ScopeRadio({ label, connector, inventory, value, onChange, disabled }: {
|
|
76
|
+
label: string;
|
|
77
|
+
connector: Connector;
|
|
78
|
+
inventory: InventoryResource;
|
|
79
|
+
value: Scope;
|
|
80
|
+
onChange: (scope: Scope) => void;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
}): import("react").JSX.Element;
|
|
83
|
+
export declare function SecretMaterialFields({ type, form, set, pending, authorOnly, valueLabel }: {
|
|
84
|
+
type: string;
|
|
85
|
+
form: IdentityFormState;
|
|
86
|
+
set: (next: Partial<IdentityFormState>) => void;
|
|
87
|
+
pending: boolean;
|
|
88
|
+
authorOnly?: boolean;
|
|
89
|
+
valueLabel?: string;
|
|
90
|
+
}): import("react").JSX.Element;
|
|
91
|
+
export declare function IdentityForm({ connector, scope, existing, secrets, onSaved, onCancel, offerDefault }: {
|
|
92
|
+
connector: Connector;
|
|
93
|
+
scope: Scope;
|
|
94
|
+
existing?: Identity;
|
|
95
|
+
secrets?: unknown[];
|
|
96
|
+
onSaved: (ref: SecretRef, action: string) => void;
|
|
97
|
+
onCancel?: () => void;
|
|
98
|
+
offerDefault?: boolean;
|
|
99
|
+
}): import("react").JSX.Element;
|
|
100
|
+
export declare function ConnectorFixes({ status, connector, config, identities, logins, secrets, onChanged }: {
|
|
101
|
+
status: ConnectorStatus;
|
|
102
|
+
connector: Connector | undefined;
|
|
103
|
+
config: ConfigMetadata;
|
|
104
|
+
identities: Identity[];
|
|
105
|
+
logins?: LoginIdentity[];
|
|
106
|
+
secrets: unknown[] | undefined;
|
|
107
|
+
onChanged: () => void;
|
|
108
|
+
}): import("react").JSX.Element | null;
|
|
109
|
+
export declare function NeedsConnectorBadge({ config }: {
|
|
110
|
+
config: unknown;
|
|
111
|
+
}): import("react").JSX.Element | null;
|
|
112
|
+
type ConfigDoc = {
|
|
113
|
+
metadata: ConfigMetadata;
|
|
114
|
+
status?: unknown;
|
|
115
|
+
};
|
|
116
|
+
export declare function ConnectorWarning({ warning }: {
|
|
117
|
+
warning?: string;
|
|
118
|
+
}): import("react").JSX.Element | null;
|
|
119
|
+
export declare function ConnectorIdentities({ statuses, team }: {
|
|
120
|
+
statuses: ConnectorStatus[];
|
|
121
|
+
team?: string;
|
|
122
|
+
}): import("react").JSX.Element | null;
|
|
123
|
+
export declare function ConfigConnectors({ doc, revision, onChanged }: {
|
|
124
|
+
doc: ConfigDoc;
|
|
125
|
+
scope?: string[];
|
|
126
|
+
revision: number;
|
|
127
|
+
onChanged: () => void;
|
|
128
|
+
}): import("react").JSX.Element | null;
|
|
129
|
+
export {};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { Jt as e, Kn as t, R as n, Rt as r, Un as i, Wt as a, an as o, cn as s, en as c, rn as l, un as u, v as d, y as f } from "./connector-ui-CG9kLZ5s.js";
|
|
2
|
+
import { r as p } from "./daemon-CLdOLhDb.js";
|
|
3
|
+
import { o as m, r as h } from "./onboarding-oZBJXTy0.js";
|
|
4
|
+
import { useEffect as g } from "react";
|
|
5
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
6
|
+
// src/connectors-page.tsx
|
|
7
|
+
function b(e) {
|
|
8
|
+
let n = t("/catalog/secrets", e), r = t("/connectors/logins", e);
|
|
9
|
+
if (n.data && r.data) return {
|
|
10
|
+
count: (e) => c(n.data, e).length + s(r.data, e).length,
|
|
11
|
+
setUp: (e) => h(e, n.data, r.data)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function x({ connector: e, counts: t }) {
|
|
15
|
+
let n = e.title || e.name;
|
|
16
|
+
if (!t) return /* @__PURE__ */ v(_, { children: "—" });
|
|
17
|
+
let r = t.count(e.name);
|
|
18
|
+
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("a", {
|
|
19
|
+
href: f(e.name),
|
|
20
|
+
"aria-label": `${r} ${n} ${r === 1 ? "identity" : "identities"}`,
|
|
21
|
+
children: r
|
|
22
|
+
}), !t.setUp(e) && /* @__PURE__ */ y(_, { children: [" ", /* @__PURE__ */ v("span", {
|
|
23
|
+
className: "badge not-set-up",
|
|
24
|
+
title: m(e),
|
|
25
|
+
children: "Not set up — recommended"
|
|
26
|
+
})] })] });
|
|
27
|
+
}
|
|
28
|
+
function S(e) {
|
|
29
|
+
let t = u(e);
|
|
30
|
+
return [l(e) || a(e).length > 0 ? `${e.secretTypes.join(" or ")} Secret${e.fields.length ? ` with ${e.fields.map((e) => e.name).join(", ")}` : ""}` : "", t.length ? `a login identity (a Volume) for the ${t.map((e) => e.name).join(", ")} method` : ""].filter(Boolean).join(", or ") || "None";
|
|
31
|
+
}
|
|
32
|
+
function C({ connectors: t, counts: n }) {
|
|
33
|
+
return /* @__PURE__ */ y("section", {
|
|
34
|
+
className: "panel",
|
|
35
|
+
"aria-label": "Connectors list",
|
|
36
|
+
children: [/* @__PURE__ */ v("div", {
|
|
37
|
+
className: "table-scroll",
|
|
38
|
+
children: /* @__PURE__ */ y("table", { children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", { children: [
|
|
39
|
+
/* @__PURE__ */ v("th", { children: "Connector" }),
|
|
40
|
+
/* @__PURE__ */ v("th", { children: "Delivered as" }),
|
|
41
|
+
/* @__PURE__ */ v("th", { children: "Identity" }),
|
|
42
|
+
/* @__PURE__ */ v("th", { children: "Default scopes" }),
|
|
43
|
+
/* @__PURE__ */ v("th", { children: "Harness" }),
|
|
44
|
+
/* @__PURE__ */ v("th", { children: "Identities" })
|
|
45
|
+
] }) }), /* @__PURE__ */ v("tbody", { children: t.map((t) => /* @__PURE__ */ y("tr", { children: [
|
|
46
|
+
/* @__PURE__ */ y("td", { children: [
|
|
47
|
+
/* @__PURE__ */ v("a", {
|
|
48
|
+
className: "resource-name",
|
|
49
|
+
href: d(t.name),
|
|
50
|
+
children: t.title || t.name
|
|
51
|
+
}),
|
|
52
|
+
" ",
|
|
53
|
+
/* @__PURE__ */ v("span", {
|
|
54
|
+
className: "badge",
|
|
55
|
+
children: t.name
|
|
56
|
+
}),
|
|
57
|
+
t.description && /* @__PURE__ */ v("p", {
|
|
58
|
+
className: "description",
|
|
59
|
+
children: t.description
|
|
60
|
+
})
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ v("td", { children: t.methods.length ? t.methods.map((t) => /* @__PURE__ */ y("div", { children: [
|
|
63
|
+
/* @__PURE__ */ v("code", { children: t.name }),
|
|
64
|
+
" — ",
|
|
65
|
+
e(t)
|
|
66
|
+
] }, t.name)) : e({ delivery: t.delivery ?? "" }) }),
|
|
67
|
+
/* @__PURE__ */ v("td", { children: S(t) }),
|
|
68
|
+
/* @__PURE__ */ v("td", { children: r(t).join(", ") }),
|
|
69
|
+
/* @__PURE__ */ v("td", { children: t.harness || /* @__PURE__ */ v("span", {
|
|
70
|
+
className: "description",
|
|
71
|
+
children: "—"
|
|
72
|
+
}) }),
|
|
73
|
+
/* @__PURE__ */ v("td", { children: /* @__PURE__ */ v(x, {
|
|
74
|
+
connector: t,
|
|
75
|
+
counts: n
|
|
76
|
+
}) })
|
|
77
|
+
] }, t.name)) })] })
|
|
78
|
+
}), !t.length && /* @__PURE__ */ v("div", {
|
|
79
|
+
className: "empty-state",
|
|
80
|
+
children: /* @__PURE__ */ v("h3", { children: "No connectors are defined" })
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function w({ connector: t, counts: i }) {
|
|
85
|
+
let a = t.title || t.name;
|
|
86
|
+
return /* @__PURE__ */ y(_, { children: [
|
|
87
|
+
/* @__PURE__ */ v("div", {
|
|
88
|
+
className: "detail-actions",
|
|
89
|
+
children: /* @__PURE__ */ v("a", {
|
|
90
|
+
href: d(),
|
|
91
|
+
children: "← Back to connectors"
|
|
92
|
+
})
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ y("section", {
|
|
95
|
+
className: "panel",
|
|
96
|
+
"aria-label": `${a} connector`,
|
|
97
|
+
children: [/* @__PURE__ */ y("div", {
|
|
98
|
+
className: "panel-heading",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ v("h2", { children: a }),
|
|
101
|
+
/* @__PURE__ */ v("span", {
|
|
102
|
+
className: "badge",
|
|
103
|
+
children: t.name
|
|
104
|
+
}),
|
|
105
|
+
!l(t) && /* @__PURE__ */ y("a", {
|
|
106
|
+
className: "document-action",
|
|
107
|
+
href: f(t.name),
|
|
108
|
+
children: [
|
|
109
|
+
"Manage ",
|
|
110
|
+
a,
|
|
111
|
+
" identities"
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
}), /* @__PURE__ */ y("div", {
|
|
116
|
+
className: "panel-body",
|
|
117
|
+
children: [
|
|
118
|
+
t.description && /* @__PURE__ */ v("p", { children: t.description }),
|
|
119
|
+
i && !i.setUp(t) && /* @__PURE__ */ v("p", {
|
|
120
|
+
className: "connector-not-set-up",
|
|
121
|
+
role: "note",
|
|
122
|
+
children: m(t)
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ y("dl", {
|
|
125
|
+
className: "details-grid",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ v("dt", { children: "Name" }),
|
|
128
|
+
/* @__PURE__ */ v("dd", { children: /* @__PURE__ */ v("code", { children: t.name }) }),
|
|
129
|
+
/* @__PURE__ */ v("dt", { children: "Delivered as" }),
|
|
130
|
+
/* @__PURE__ */ v("dd", { children: t.methods.length ? /* @__PURE__ */ v("ul", {
|
|
131
|
+
className: "connector-methods",
|
|
132
|
+
children: t.methods.map((t) => /* @__PURE__ */ y("li", { children: [
|
|
133
|
+
/* @__PURE__ */ v("code", { children: t.name }),
|
|
134
|
+
t.default && /* @__PURE__ */ y(_, { children: [" ", /* @__PURE__ */ v("span", {
|
|
135
|
+
className: "badge",
|
|
136
|
+
children: "default method"
|
|
137
|
+
})] }),
|
|
138
|
+
" — ",
|
|
139
|
+
e(t),
|
|
140
|
+
t.description && /* @__PURE__ */ y("span", {
|
|
141
|
+
className: "description",
|
|
142
|
+
children: [" ", t.description]
|
|
143
|
+
})
|
|
144
|
+
] }, t.name))
|
|
145
|
+
}) : e({ delivery: t.delivery ?? "" }) }),
|
|
146
|
+
/* @__PURE__ */ v("dt", { children: "Identity" }),
|
|
147
|
+
/* @__PURE__ */ v("dd", { children: S(t) }),
|
|
148
|
+
/* @__PURE__ */ v("dt", { children: "Default scopes" }),
|
|
149
|
+
/* @__PURE__ */ v("dd", { children: r(t).join(", ") }),
|
|
150
|
+
t.harness && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("dt", { children: "Harness" }), /* @__PURE__ */ v("dd", { children: t.harness })] }),
|
|
151
|
+
t.group && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("dt", { children: "Method group" }), /* @__PURE__ */ y("dd", { children: [t.group, " — a Config enables exactly one method"] })] }),
|
|
152
|
+
t.optional && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("dt", { children: "Optional" }), /* @__PURE__ */ v("dd", { children: "A cell starts without it" })] }),
|
|
153
|
+
!l(t) && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("dt", { children: "Identities" }), /* @__PURE__ */ v("dd", { children: /* @__PURE__ */ v(x, {
|
|
154
|
+
connector: t,
|
|
155
|
+
counts: i
|
|
156
|
+
}) })] })
|
|
157
|
+
]
|
|
158
|
+
})
|
|
159
|
+
]
|
|
160
|
+
})]
|
|
161
|
+
}),
|
|
162
|
+
l(t) && /* @__PURE__ */ v("section", {
|
|
163
|
+
className: "panel connector-registry-notice",
|
|
164
|
+
"aria-label": `${a} on the Images page`,
|
|
165
|
+
children: /* @__PURE__ */ v("div", {
|
|
166
|
+
className: "panel-body",
|
|
167
|
+
children: /* @__PURE__ */ y("p", {
|
|
168
|
+
role: "note",
|
|
169
|
+
children: [
|
|
170
|
+
"A registry credential authenticates a Realm's image pulls; nothing of it is injected into a cell. Registry credentials are listed and added on the ",
|
|
171
|
+
/* @__PURE__ */ v("a", {
|
|
172
|
+
href: n(),
|
|
173
|
+
children: "Images"
|
|
174
|
+
}),
|
|
175
|
+
" page, per Realm."
|
|
176
|
+
]
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
] });
|
|
181
|
+
}
|
|
182
|
+
function T({ name: e, revision: n, onTitle: r }) {
|
|
183
|
+
let a = t("/connectors", n), s = b(n), c = e ? a.data?.find((t) => t.name === e) : void 0, l = c?.name, u = c?.title;
|
|
184
|
+
return g(() => {
|
|
185
|
+
l && r?.({
|
|
186
|
+
name: l,
|
|
187
|
+
title: u || l
|
|
188
|
+
});
|
|
189
|
+
}, [
|
|
190
|
+
l,
|
|
191
|
+
u,
|
|
192
|
+
r
|
|
193
|
+
]), /* @__PURE__ */ y(_, { children: [
|
|
194
|
+
/* @__PURE__ */ v(p, { current: "connectors" }),
|
|
195
|
+
a.loading && !a.data && /* @__PURE__ */ v("p", {
|
|
196
|
+
role: "status",
|
|
197
|
+
children: "Loading connectors…"
|
|
198
|
+
}),
|
|
199
|
+
a.error && /* @__PURE__ */ v(i, {
|
|
200
|
+
error: a.error,
|
|
201
|
+
kind: "Connector"
|
|
202
|
+
}),
|
|
203
|
+
a.error && a.data && /* @__PURE__ */ v("p", {
|
|
204
|
+
className: "stale",
|
|
205
|
+
children: "Stale connector catalog — refresh failed."
|
|
206
|
+
}),
|
|
207
|
+
!e && /* @__PURE__ */ y("p", {
|
|
208
|
+
className: "description connectors-intro",
|
|
209
|
+
children: [
|
|
210
|
+
"A connector is a kind of access a cell needs: the catalog is built into kuke and read-only here. An identity is the stored credential that fills it; identities are listed, created and set as defaults on the ",
|
|
211
|
+
/* @__PURE__ */ v("a", {
|
|
212
|
+
href: f(),
|
|
213
|
+
children: "Identities"
|
|
214
|
+
}),
|
|
215
|
+
" page."
|
|
216
|
+
]
|
|
217
|
+
}),
|
|
218
|
+
a.data && !e && /* @__PURE__ */ v(C, {
|
|
219
|
+
connectors: o(a.data),
|
|
220
|
+
counts: s
|
|
221
|
+
}),
|
|
222
|
+
a.data && e && !c && /* @__PURE__ */ y("div", {
|
|
223
|
+
className: "error",
|
|
224
|
+
role: "alert",
|
|
225
|
+
children: [/* @__PURE__ */ v("strong", { children: "Unknown connector" }), /* @__PURE__ */ y("p", { children: [
|
|
226
|
+
"No connector named ",
|
|
227
|
+
e,
|
|
228
|
+
" is defined. ",
|
|
229
|
+
/* @__PURE__ */ v("a", {
|
|
230
|
+
href: d(),
|
|
231
|
+
children: "Back to connectors"
|
|
232
|
+
})
|
|
233
|
+
] })]
|
|
234
|
+
}),
|
|
235
|
+
c && /* @__PURE__ */ v(w, {
|
|
236
|
+
connector: c,
|
|
237
|
+
counts: s
|
|
238
|
+
}, c.name)
|
|
239
|
+
] });
|
|
240
|
+
}
|
|
241
|
+
export { T as ConnectorCatalogPage };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
export const deliveryEnv: string;
|
|
2
|
+
export const deliveryFile: string;
|
|
3
|
+
export const deliveryStateVolume: string;
|
|
4
|
+
export const deliveryGit: string;
|
|
5
|
+
export const deliveryRegistry: string;
|
|
6
|
+
export const fieldString: string;
|
|
7
|
+
export const fieldList: string;
|
|
8
|
+
export const fieldPerson: string;
|
|
9
|
+
export const fieldSecret: string;
|
|
10
|
+
export const secretOpaque: string;
|
|
11
|
+
export const secretBasicAuth: string;
|
|
12
|
+
export const secretSSHKey: string;
|
|
13
|
+
export const scopeLevels: string[];
|
|
14
|
+
export const stateResolved: string;
|
|
15
|
+
export const statePending: string;
|
|
16
|
+
export const teamLabel: string;
|
|
17
|
+
export const defaultScopeName: string;
|
|
18
|
+
export const loginLoggedIn: string;
|
|
19
|
+
export const loginEmpty: string;
|
|
20
|
+
export const harnessPersistent: string;
|
|
21
|
+
export const harnessEphemeral: string;
|
|
22
|
+
export const harnessStates: string[];
|
|
23
|
+
|
|
24
|
+
export type SecretRef = { name: string; realm: string; space?: string; stack?: string };
|
|
25
|
+
export type Scope = { realm: string; space?: string; stack?: string };
|
|
26
|
+
export type ConnectorField = { name: string; type?: string; required?: boolean; help?: string; enum?: string[]; secretTypes?: string[] };
|
|
27
|
+
export type FormField = { name: string; type: string; required: boolean; help: string; enum: string[] };
|
|
28
|
+
export type ConnectorMethod = { name: string; component: string; description?: string; default?: boolean; delivery: string; slot?: string; envName?: string; mountPath?: string; login?: boolean };
|
|
29
|
+
export type Connector = {
|
|
30
|
+
name: string; title: string; description?: string; delivery?: string; group?: string; harness?: string; optional?: boolean;
|
|
31
|
+
scopes: string[]; secretTypes: string[]; fields: ConnectorField[]; methods: ConnectorMethod[];
|
|
32
|
+
tokenForGit?: TokenForGit;
|
|
33
|
+
};
|
|
34
|
+
// A connector whose token can also be stored as a git identity (#1693).
|
|
35
|
+
export type TokenForGit = { connector: string; hosts: string[]; username: string; name: string; tokenName: string };
|
|
36
|
+
export type GitForm = { git: boolean; gitAuthorName: string; gitAuthorEmail: string; gitUsername: string };
|
|
37
|
+
export type SecretTypeChoice = { type: string; label: string; description: string };
|
|
38
|
+
export type ScopeChoice = { level: string; label: string; recommended: boolean };
|
|
39
|
+
export type ConnectorStatus = {
|
|
40
|
+
connector: string; title?: string; component: string; method?: string; delivery: string; slot?: string; state: string;
|
|
41
|
+
required?: boolean; identity?: SecretRef; origin?: string; volume?: string; volumeRef?: VolumeRef; message?: string;
|
|
42
|
+
login?: { state: string; since?: string }; harnessState?: string;
|
|
43
|
+
// warning names a risk the cell is created with, such as a login identity
|
|
44
|
+
// another role uses (#1789); the connector still resolves.
|
|
45
|
+
warning?: string;
|
|
46
|
+
};
|
|
47
|
+
export type LoginSession = { realm: string; space: string; stack: string; cell: string; container: string };
|
|
48
|
+
export type ConfigRef = { name: string; realm: string; space?: string; stack?: string };
|
|
49
|
+
export type LoginIdentity = { connector: string; method: string; volume: SecretRef; exists: boolean; tagged: boolean; state: string; since: string; usedBy: ConfigRef[]; session?: LoginSession };
|
|
50
|
+
export type LoginResult = { identity: unknown; created: boolean; attached?: boolean };
|
|
51
|
+
export type VolumeRef = { name: string; realm: string; space?: string; stack?: string };
|
|
52
|
+
export type ConfigMetadata = { name: string; realm?: string; space?: string; stack?: string; labels?: Record<string, string> };
|
|
53
|
+
export type ConnectorMissing = { config: ConfigMetadata; component: string; method?: string; slot?: string; delivery: string; message?: string };
|
|
54
|
+
export type ConnectorUsage = { connector: string; configs: number; missing: ConnectorMissing[] };
|
|
55
|
+
export type ConnectorDefault = { connector: string; method?: string; component?: string; delivery: string; slot?: string; levels: Record<string, SecretRef>; effective?: SecretRef; origin?: string };
|
|
56
|
+
export type DefaultTarget = { method: string; component: string; delivery: string; slot: string; description: string };
|
|
57
|
+
export type Identity = { name: string; realm: string; space: string; stack: string; type: string; identity: Record<string, string> };
|
|
58
|
+
export type IdentityForm = {
|
|
59
|
+
name: string; type: string; fields: Record<string, string>;
|
|
60
|
+
value: string; username: string; password: string; privateKey: string; passphrase: string; publicKey: string; certificate: string; knownHosts: string;
|
|
61
|
+
};
|
|
62
|
+
export type GroupMember = { name: string; optional: boolean; group: string; description: string; connector: { name: string; method: string } | null };
|
|
63
|
+
export type RegistryEntry = { server: string; username: string; secret?: SecretRef };
|
|
64
|
+
// Any document that may carry status.connectors: a CellConfig, or nothing.
|
|
65
|
+
type StatusCarrier = unknown;
|
|
66
|
+
|
|
67
|
+
export function takesIdentity(delivery: string | undefined): boolean;
|
|
68
|
+
export function deliveryText(item: { delivery?: string; envName?: string; mountPath?: string } | undefined): string;
|
|
69
|
+
export function secretRef(value: Partial<SecretRef> | undefined | null): SecretRef | undefined;
|
|
70
|
+
export function refKey(value: Partial<SecretRef> | undefined | null): string;
|
|
71
|
+
export function sameRef(a: Partial<SecretRef> | undefined | null, b: Partial<SecretRef> | undefined | null): boolean;
|
|
72
|
+
export function refScope(value: Partial<SecretRef> | undefined | null): string[];
|
|
73
|
+
export function refLabel(value: Partial<SecretRef> | undefined | null): string;
|
|
74
|
+
export function formatSecretReference(value: Partial<SecretRef> | undefined | null): string;
|
|
75
|
+
export function identitiesFor(secrets: unknown[] | undefined, connector: string): Identity[];
|
|
76
|
+
export function connectorStatuses(config: StatusCarrier): ConnectorStatus[];
|
|
77
|
+
export function blocksCells(status: ConnectorStatus | undefined): boolean;
|
|
78
|
+
export function blockingConnectors(config: StatusCarrier): ConnectorStatus[];
|
|
79
|
+
export function connectorTitle(status: { title?: string; connector?: string } | undefined): string;
|
|
80
|
+
export function originLabel(origin: string | undefined, team?: string): string;
|
|
81
|
+
export function teamOf(config: { metadata?: { labels?: Record<string, string> } } | undefined): string;
|
|
82
|
+
export function targetScope(metadata: { realm?: string; space?: string; stack?: string } | undefined): Required<Scope>;
|
|
83
|
+
export function scopeAt(scope: Partial<Scope> | undefined, level: string): Scope;
|
|
84
|
+
export function scopeLevel(scope: Partial<Scope> | undefined): string;
|
|
85
|
+
export function scopeParts(scope: Partial<Scope> | undefined): string[];
|
|
86
|
+
export function scopeFromParts(parts: string[] | undefined): Scope;
|
|
87
|
+
export function connectorLevels(connector: { scopes?: string[] } | undefined): string[];
|
|
88
|
+
export function allowedLevels(connector: { scopes?: string[] } | undefined, scope: Partial<Scope> | undefined): string[];
|
|
89
|
+
export function scopeQuery(scope: Partial<Scope> | undefined): string;
|
|
90
|
+
export function defaultTargets(connector: Connector | undefined): DefaultTarget[];
|
|
91
|
+
export function defaultRow(defaults: ConnectorDefault[] | unknown[] | undefined, target: { connector: string; component?: string; method?: string }): ConnectorDefault | undefined;
|
|
92
|
+
export function loginMethods(connector: Connector | undefined): ConnectorMethod[];
|
|
93
|
+
export function isRegistry(connector: Connector | undefined): boolean;
|
|
94
|
+
export function usageFor(usage: ConnectorUsage[] | undefined, connector: string): { configs: number; missing: ConnectorMissing[] };
|
|
95
|
+
export function groupComponents<T extends GroupMember>(components: T[] | undefined): { groups: Array<{ group: string; members: T[] }>; ungrouped: T[] };
|
|
96
|
+
export function defaultGroupChoices(components: GroupMember[] | undefined, connectors: Connector[] | undefined): Record<string, string>;
|
|
97
|
+
export function keepsLogin(status: { delivery?: string } | undefined): boolean;
|
|
98
|
+
export function picksIdentity(status: { delivery?: string } | undefined): boolean;
|
|
99
|
+
export function statusIdentity(status: ConnectorStatus | undefined): SecretRef | undefined;
|
|
100
|
+
export function loginIdentitiesFor(logins: unknown[] | undefined, connector: string): LoginIdentity[];
|
|
101
|
+
export function loginStateText(state: string | undefined): string;
|
|
102
|
+
export function loginTone(state: string | undefined): string;
|
|
103
|
+
export function sessionScope(session: LoginSession | undefined): string[];
|
|
104
|
+
export function loginBody(name: string, scope: Partial<Scope> | undefined, method?: string): { name: string; scope: Scope; method?: string };
|
|
105
|
+
export function loginNameError(name: string | undefined): string;
|
|
106
|
+
export function stateText(status: ConnectorStatus | undefined): string;
|
|
107
|
+
export function pickableStatuses(statuses: ConnectorStatus[] | undefined): ConnectorStatus[];
|
|
108
|
+
export function changedPicks(statuses: ConnectorStatus[] | undefined, picks: Record<string, Partial<SecretRef> | undefined> | undefined): Record<string, SecretRef>;
|
|
109
|
+
export function methodChoices(connector: Connector | undefined): ConnectorMethod[];
|
|
110
|
+
export function changedMethods(statuses: ConnectorStatus[] | undefined, picks: Record<string, string | undefined> | undefined): Record<string, string>;
|
|
111
|
+
export function methodStatuses(statuses: ConnectorStatus[] | undefined, connectors: Connector[] | undefined, picks: Record<string, string | undefined> | undefined): ConnectorStatus[];
|
|
112
|
+
export function unresolvedConnectors(statuses: ConnectorStatus[] | undefined, picks: Record<string, Partial<SecretRef> | undefined> | undefined): ConnectorStatus[];
|
|
113
|
+
export function identityFields(connector: { fields?: ConnectorField[] } | undefined, type: string): FormField[];
|
|
114
|
+
export function secretTypesOf(connector: { secretTypes?: string[] } | undefined): string[];
|
|
115
|
+
export function storesNoValue(connector: { methods?: unknown[]; delivery?: string } | undefined, type: string | undefined): boolean;
|
|
116
|
+
export function importsFromHost(connector: { methods?: unknown[]; delivery?: string } | undefined): boolean;
|
|
117
|
+
export type ImportForm = { realm: string; hosts: string; name: string; key: string; passphraseFile: string; makeDefault: boolean };
|
|
118
|
+
export type ImportResult = {
|
|
119
|
+
home: string; name: string; realm: string; type: string; identity: Record<string, string>; keyPath?: string; allowedSignersPath?: string; notes?: string[];
|
|
120
|
+
secrets: Array<{ name: string; realm: string; action: string }>;
|
|
121
|
+
default?: { realm: string; identity: SecretRef | null; previous?: SecretRef; action: string };
|
|
122
|
+
};
|
|
123
|
+
export function importPayload(form: Partial<ImportForm> | undefined): Record<string, unknown>;
|
|
124
|
+
export function emptyIdentityForm(connector: { secretTypes?: string[]; tokenForGit?: unknown } | undefined, existing?: { name?: string; type?: string; identity?: Record<string, string> }): IdentityForm;
|
|
125
|
+
export function parseList(value: string | undefined): string[];
|
|
126
|
+
export function identityErrors(connector: { fields?: ConnectorField[]; secretTypes?: string[]; methods?: unknown[]; delivery?: string } | undefined, form: IdentityForm): string[];
|
|
127
|
+
export function identityPayload(connector: { fields?: ConnectorField[]; secretTypes?: string[]; methods?: unknown[]; delivery?: string; tokenForGit?: unknown } | undefined, scope: Partial<Scope>, form: IdentityForm, options?: { makeDefault?: boolean; method?: string; git?: Record<string, string> }): Record<string, unknown>;
|
|
128
|
+
export const reservedIdentityPrefix: string;
|
|
129
|
+
export const identityTokenFrom: string;
|
|
130
|
+
export function tokenForGit(connector: { tokenForGit?: unknown } | undefined): TokenForGit | undefined;
|
|
131
|
+
export function tokenConnectors(connectors: Connector[] | undefined): Connector[];
|
|
132
|
+
export function linkedGitIdentity(secrets: unknown[] | undefined, connector: Connector | undefined, identity: Partial<SecretRef> | undefined): Identity | undefined;
|
|
133
|
+
export const sharedLoginNote: string;
|
|
134
|
+
export function responseWarnings(result: unknown): string[];
|
|
135
|
+
export function connectorWarnings(statuses: ConnectorStatus[] | undefined): string[];
|
|
136
|
+
export function staleGitNotice(result: { staleGit?: Partial<SecretRef> } | undefined): string | undefined;
|
|
137
|
+
export function emptyGitForm(on: boolean): GitForm;
|
|
138
|
+
export function tokenGitPayload(form: Partial<GitForm> | undefined): Record<string, string>;
|
|
139
|
+
export function tokenGitErrors(form: Partial<GitForm> | undefined): string[];
|
|
140
|
+
export function splitPerson(value: string | undefined): { name: string; email: string };
|
|
141
|
+
export function joinPerson(name: string | undefined, email: string | undefined): string;
|
|
142
|
+
export function personError(label: string, value: string | undefined): string | undefined;
|
|
143
|
+
export function secretTypeChoices(connector: { secretTypes?: string[]; methods?: unknown[]; delivery?: string } | undefined): SecretTypeChoice[];
|
|
144
|
+
export function scopeChoices(connector: { scopes?: string[] } | undefined, realm: string | undefined): ScopeChoice[];
|
|
145
|
+
export function scopeAtLevel(scope: Partial<Scope> | undefined, level: string, spaces?: (realm: string) => string[], stacks?: (realm: string, space: string) => string[]): Scope | undefined;
|
|
146
|
+
export function identityDefaultOn(defaults: unknown[] | undefined, connector: Connector | undefined, target: DefaultTarget | undefined): boolean;
|
|
147
|
+
export function clearMaterial(form: IdentityForm): IdentityForm;
|
|
148
|
+
export function registryEntries(realm: unknown): RegistryEntry[];
|
|
149
|
+
export const secretTypes: string[];
|
|
150
|
+
export function secretTypeOf(doc: { spec?: { type?: string } } | undefined): string;
|
|
151
|
+
export function emptySecretForm(existing?: { metadata?: { name?: string }; spec?: { type?: string } }): IdentityForm;
|
|
152
|
+
export function secretErrors(form: IdentityForm, replace?: boolean): string[];
|
|
153
|
+
export function secretPayload(form: IdentityForm, replace?: boolean): Record<string, string | boolean>;
|
|
154
|
+
export function listedConnectors(connectors: Connector[] | undefined): Connector[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Theme } from "./terminal";
|
|
2
|
+
export declare function ContainerLog({ scope, container, attachable, live, cellState, revision, theme, expanded }: {
|
|
3
|
+
scope: string[];
|
|
4
|
+
container: string;
|
|
5
|
+
attachable: boolean;
|
|
6
|
+
live: boolean;
|
|
7
|
+
cellState?: string;
|
|
8
|
+
revision: number;
|
|
9
|
+
theme: Theme;
|
|
10
|
+
expanded: boolean;
|
|
11
|
+
}): import("react").JSX.Element;
|
package/dist/create.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type Field = {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
kind: "text" | "number" | "boolean" | "enum" | "strings" | "env" | "map" | "object" | "objects";
|
|
5
|
+
required?: boolean;
|
|
6
|
+
advanced?: boolean;
|
|
7
|
+
options?: string[];
|
|
8
|
+
fields?: Field[];
|
|
9
|
+
itemLabel?: string;
|
|
10
|
+
help?: string;
|
|
11
|
+
// sourcePicker puts a "From source" select above each item (#1644): a stored Source fills the item.
|
|
12
|
+
sourcePicker?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export const containerFields: Field[];
|
|
15
|
+
export const cellAdvanced: Field[];
|