ankka-console 0.11.0 → 0.12.0

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.
@@ -0,0 +1,3 @@
1
+ import type { GrantTarget } from "../client/schemas.ts";
2
+ /** A grant's target in one line, as the CLI shows it: `route wallet POST /v1/…`, `topic casino.players consume`. */
3
+ export declare function targetText(t: GrantTarget): string;
@@ -0,0 +1,13 @@
1
+ /** A grant's target in one line, as the CLI shows it: `route wallet POST /v1/…`, `topic casino.players consume`. */
2
+ export function targetText(t) {
3
+ switch (t.kind) {
4
+ case "route":
5
+ return `route ${t.service ?? ""} ${t.method ?? ""} ${t.path ?? ""}`;
6
+ case "method":
7
+ return `method ${t.service ?? ""} ${t.method ?? ""}`;
8
+ case "topic":
9
+ return `topic ${t.topic ?? ""} ${t.right ?? ""}${t.decrypt ? " decrypt" : ""}`;
10
+ default:
11
+ return t.kind;
12
+ }
13
+ }
@@ -35,7 +35,7 @@ export declare function Bar({ wordmark, children, end }: {
35
35
  end?: ReactNode;
36
36
  }): import("react").JSX.Element;
37
37
  /**
38
- * The rail: the console's areas, the one the page belongs to marked. Members and deploy tokens open
38
+ * The rail: the console's areas, the one the page belongs to marked. Members, deploy tokens and machines open
39
39
  * those of the organization the page belongs to; with no organization in view they are shown and
40
40
  * unavailable. Signing out is at its foot.
41
41
  */
package/dist/ui/shell.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { clsx } from "clsx";
3
- import { Box, Building2, Folder, KeyRound, LogOut, Plus, Users } from "lucide-react";
3
+ import { Bot, Box, Building2, Folder, KeyRound, LogOut, Plus, Users } from "lucide-react";
4
4
  import { Breadcrumbs, ConsoleForm, ConsoleLink, useConsole } from "./console.js";
5
5
  import { Lifecycle } from "./status.js";
6
6
  import { button } from "./primitives/button.js";
@@ -37,7 +37,7 @@ export function Bar({ wordmark, children, end }) {
37
37
  (name ? (_jsxs("span", { className: "ac-person", title: name, children: [_jsx("span", { "aria-hidden": "true", children: initials(name) }), _jsxs("span", { className: "ac-visually-hidden", children: ["You are ", name] })] })) : null)] })] }));
38
38
  }
39
39
  /**
40
- * The rail: the console's areas, the one the page belongs to marked. Members and deploy tokens open
40
+ * The rail: the console's areas, the one the page belongs to marked. Members, deploy tokens and machines open
41
41
  * those of the organization the page belongs to; with no organization in view they are shown and
42
42
  * unavailable. Signing out is at its foot.
43
43
  */
@@ -64,6 +64,13 @@ export function Rail() {
64
64
  to: orgPath && org?.manages ? `${orgPath}/tokens` : undefined,
65
65
  unavailable: org ? "Deploy tokens: only an owner manages them" : "Deploy tokens: open an organization first",
66
66
  },
67
+ {
68
+ area: "machines",
69
+ label: org ? `Machines of ${org.name}` : "Machines",
70
+ icon: Bot,
71
+ to: orgPath && `${orgPath}/machines`,
72
+ unavailable: "Machines: open an organization first",
73
+ },
67
74
  ];
68
75
  return (_jsxs("nav", { className: "ac-rail", "aria-label": "Console", children: [_jsx(ConsoleLink, { to: "", className: "ac-mark", "aria-label": "ankka console", title: "ankka console", children: _jsx(Mark, {}) }), _jsx("ul", { className: "ac-rail-areas", children: entries.map((e) => {
69
76
  const Icon = e.icon;
@@ -27,6 +27,19 @@ export declare function useProjectStream(projectId: string, initial: ServiceStat
27
27
  processPort: number | undefined;
28
28
  broker: string | undefined;
29
29
  undeclaredTopics: string[] | undefined;
30
+ secretStore: {
31
+ backend: string;
32
+ keyRead: boolean;
33
+ move: {
34
+ phase: string;
35
+ outcome: string;
36
+ names: {
37
+ name: string;
38
+ state: string;
39
+ }[];
40
+ detail: string | undefined;
41
+ } | undefined;
42
+ } | undefined;
30
43
  topicChecks: {
31
44
  topic: string | undefined;
32
45
  service: string;
@@ -48,10 +61,54 @@ export declare function useProjectStream(projectId: string, initial: ServiceStat
48
61
  contract: string | undefined;
49
62
  lag: number | undefined;
50
63
  failing: string | undefined;
64
+ gap: {
65
+ partitions: {
66
+ partition: number;
67
+ beginning: number;
68
+ earliestRetained: string | undefined;
69
+ }[];
70
+ compacted: boolean;
71
+ gone: boolean;
72
+ readAt: string | undefined;
73
+ } | undefined;
74
+ }[] | undefined;
75
+ warnings: {
76
+ kind: string;
77
+ component: string;
78
+ topic: string;
79
+ message: string;
51
80
  }[] | undefined;
52
81
  objectStorage: string | undefined;
53
82
  bucket: string | undefined;
54
83
  bucketAddress: string | undefined;
84
+ objectStore: string | undefined;
85
+ bucketLocation: string | undefined;
86
+ softDeleteDays: number | undefined;
87
+ storageMove: string | undefined;
88
+ databaseCluster: string | undefined;
89
+ grants: string | undefined;
90
+ crossProjectTopics: {
91
+ project: string;
92
+ topic: string;
93
+ right: string;
94
+ status: string;
95
+ }[] | undefined;
96
+ customHostnames: {
97
+ hostname: string;
98
+ state: string;
99
+ reason: string | undefined;
100
+ record: {
101
+ name: string;
102
+ kind: string;
103
+ value: string;
104
+ } | undefined;
105
+ note: string | undefined;
106
+ }[];
107
+ proofRecord: {
108
+ name: string;
109
+ kind: string;
110
+ value: string;
111
+ } | undefined;
55
112
  }[];
56
113
  state: StreamState;
57
114
  };
@@ -93,6 +150,19 @@ export declare function useServiceStream(projectId: string, name: string, initia
93
150
  processPort: number | undefined;
94
151
  broker: string | undefined;
95
152
  undeclaredTopics: string[] | undefined;
153
+ secretStore: {
154
+ backend: string;
155
+ keyRead: boolean;
156
+ move: {
157
+ phase: string;
158
+ outcome: string;
159
+ names: {
160
+ name: string;
161
+ state: string;
162
+ }[];
163
+ detail: string | undefined;
164
+ } | undefined;
165
+ } | undefined;
96
166
  topicChecks: {
97
167
  topic: string | undefined;
98
168
  service: string;
@@ -114,10 +184,54 @@ export declare function useServiceStream(projectId: string, name: string, initia
114
184
  contract: string | undefined;
115
185
  lag: number | undefined;
116
186
  failing: string | undefined;
187
+ gap: {
188
+ partitions: {
189
+ partition: number;
190
+ beginning: number;
191
+ earliestRetained: string | undefined;
192
+ }[];
193
+ compacted: boolean;
194
+ gone: boolean;
195
+ readAt: string | undefined;
196
+ } | undefined;
197
+ }[] | undefined;
198
+ warnings: {
199
+ kind: string;
200
+ component: string;
201
+ topic: string;
202
+ message: string;
117
203
  }[] | undefined;
118
204
  objectStorage: string | undefined;
119
205
  bucket: string | undefined;
120
206
  bucketAddress: string | undefined;
207
+ objectStore: string | undefined;
208
+ bucketLocation: string | undefined;
209
+ softDeleteDays: number | undefined;
210
+ storageMove: string | undefined;
211
+ databaseCluster: string | undefined;
212
+ grants: string | undefined;
213
+ crossProjectTopics: {
214
+ project: string;
215
+ topic: string;
216
+ right: string;
217
+ status: string;
218
+ }[] | undefined;
219
+ customHostnames: {
220
+ hostname: string;
221
+ state: string;
222
+ reason: string | undefined;
223
+ record: {
224
+ name: string;
225
+ kind: string;
226
+ value: string;
227
+ } | undefined;
228
+ note: string | undefined;
229
+ }[];
230
+ proofRecord: {
231
+ name: string;
232
+ kind: string;
233
+ value: string;
234
+ } | undefined;
121
235
  };
122
236
  byInstance: Record<string, {
123
237
  lines: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ankka-console",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "The ankka console as a package: the control plane client, sign-in and sessions, and the pages as routes a React Router host mounts.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",