@venturekit/cli 0.0.0-dev.20260430161503 → 0.0.0-dev.20260504234126
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/README.md +65 -0
- package/dist/commands/cert.d.ts +25 -0
- package/dist/commands/cert.d.ts.map +1 -0
- package/dist/commands/cert.js +371 -0
- package/dist/commands/cert.js.map +1 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +70 -0
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +28 -0
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/gha.d.ts +32 -0
- package/dist/commands/gha.d.ts.map +1 -0
- package/dist/commands/gha.js +645 -0
- package/dist/commands/gha.js.map +1 -0
- package/dist/commands/help.js +1 -1
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +104 -3
- package/dist/commands/open.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/cognito-local.d.ts +18 -2
- package/dist/utils/cognito-local.d.ts.map +1 -1
- package/dist/utils/cognito-local.js +19 -0
- package/dist/utils/cognito-local.js.map +1 -1
- package/dist/utils/dev-cognito-ui-page.d.ts +18 -0
- package/dist/utils/dev-cognito-ui-page.d.ts.map +1 -0
- package/dist/utils/dev-cognito-ui-page.js +858 -0
- package/dist/utils/dev-cognito-ui-page.js.map +1 -0
- package/dist/utils/dev-cognito-ui.d.ts +91 -0
- package/dist/utils/dev-cognito-ui.d.ts.map +1 -0
- package/dist/utils/dev-cognito-ui.js +546 -0
- package/dist/utils/dev-cognito-ui.js.map +1 -0
- package/dist/utils/dev-server-discovery.d.ts +52 -0
- package/dist/utils/dev-server-discovery.d.ts.map +1 -0
- package/dist/utils/dev-server-discovery.js +128 -0
- package/dist/utils/dev-server-discovery.js.map +1 -0
- package/dist/utils/local-server.d.ts +9 -0
- package/dist/utils/local-server.d.ts.map +1 -1
- package/dist/utils/local-server.js +41 -0
- package/dist/utils/local-server.js.map +1 -1
- package/package.json +7 -4
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-contained HTML page for the `/_dev/users` cognito-local admin UI.
|
|
3
|
+
*
|
|
4
|
+
* Kept in a separate file so the markup + vanilla JS are easy to read
|
|
5
|
+
* without scrolling past the API handler logic. No build step — the
|
|
6
|
+
* page is pure HTML/CSS/JS served as a string from `dev-cognito-ui.ts`.
|
|
7
|
+
*
|
|
8
|
+
* Design constraints:
|
|
9
|
+
* - Zero external runtime deps (no CDN, no fonts, no analytics) so
|
|
10
|
+
* the UI works on a flight / behind a corporate proxy.
|
|
11
|
+
* - Dark theme by default to match VentureKit's aesthetic.
|
|
12
|
+
* - Vanilla JS only — this is a dev tool and we want it to keep
|
|
13
|
+
* working when React / framework tooling regresses.
|
|
14
|
+
* - All requests go to same-origin `/_dev/cognito/*` so cookies /
|
|
15
|
+
* CORS aren't a concern.
|
|
16
|
+
*/
|
|
17
|
+
export const COGNITO_UI_HTML = `<!doctype html>
|
|
18
|
+
<html lang="en">
|
|
19
|
+
<head>
|
|
20
|
+
<meta charset="utf-8" />
|
|
21
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
22
|
+
<title>Cognito Users · VentureKit dev</title>
|
|
23
|
+
<style>
|
|
24
|
+
:root {
|
|
25
|
+
--bg: #0b0d10;
|
|
26
|
+
--bg-2: #11151a;
|
|
27
|
+
--bg-3: #1a2029;
|
|
28
|
+
--border: #232a35;
|
|
29
|
+
--border-2: #2e3744;
|
|
30
|
+
--text: #e6edf3;
|
|
31
|
+
--text-2: #9aa7b4;
|
|
32
|
+
--text-3: #6b7785;
|
|
33
|
+
--accent: #4f9eff;
|
|
34
|
+
--accent-2: #2563eb;
|
|
35
|
+
--green: #2ecc71;
|
|
36
|
+
--yellow: #f5c542;
|
|
37
|
+
--red: #ff5d5d;
|
|
38
|
+
--orange: #ff9933;
|
|
39
|
+
}
|
|
40
|
+
* { box-sizing: border-box; }
|
|
41
|
+
html, body { height: 100%; }
|
|
42
|
+
body {
|
|
43
|
+
margin: 0;
|
|
44
|
+
font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
45
|
+
color: var(--text);
|
|
46
|
+
background: var(--bg);
|
|
47
|
+
}
|
|
48
|
+
a { color: var(--accent); text-decoration: none; }
|
|
49
|
+
a:hover { text-decoration: underline; }
|
|
50
|
+
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
|
|
51
|
+
|
|
52
|
+
header {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 16px;
|
|
56
|
+
padding: 14px 24px;
|
|
57
|
+
border-bottom: 1px solid var(--border);
|
|
58
|
+
background: var(--bg-2);
|
|
59
|
+
}
|
|
60
|
+
header h1 {
|
|
61
|
+
margin: 0;
|
|
62
|
+
font-size: 16px;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
letter-spacing: 0.2px;
|
|
65
|
+
}
|
|
66
|
+
header .meta {
|
|
67
|
+
color: var(--text-3);
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
}
|
|
70
|
+
header .spacer { flex: 1; }
|
|
71
|
+
|
|
72
|
+
main { padding: 24px; max-width: 1200px; margin: 0 auto; }
|
|
73
|
+
|
|
74
|
+
.toolbar {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 12px;
|
|
78
|
+
margin-bottom: 16px;
|
|
79
|
+
flex-wrap: wrap;
|
|
80
|
+
}
|
|
81
|
+
.toolbar .grow { flex: 1; min-width: 200px; }
|
|
82
|
+
|
|
83
|
+
.input, select, button {
|
|
84
|
+
font: inherit;
|
|
85
|
+
color: var(--text);
|
|
86
|
+
background: var(--bg-2);
|
|
87
|
+
border: 1px solid var(--border);
|
|
88
|
+
border-radius: 6px;
|
|
89
|
+
padding: 7px 10px;
|
|
90
|
+
outline: none;
|
|
91
|
+
}
|
|
92
|
+
.input:focus, select:focus { border-color: var(--accent); }
|
|
93
|
+
.input { width: 100%; }
|
|
94
|
+
button {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition: border-color 0.12s, background 0.12s;
|
|
97
|
+
}
|
|
98
|
+
button:hover { border-color: var(--border-2); background: var(--bg-3); }
|
|
99
|
+
button.primary {
|
|
100
|
+
background: var(--accent-2);
|
|
101
|
+
border-color: var(--accent-2);
|
|
102
|
+
color: white;
|
|
103
|
+
}
|
|
104
|
+
button.primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
|
|
105
|
+
button.danger {
|
|
106
|
+
color: var(--red);
|
|
107
|
+
border-color: #3a2226;
|
|
108
|
+
background: #1a1416;
|
|
109
|
+
}
|
|
110
|
+
button.danger:hover { background: #2b1a1d; }
|
|
111
|
+
button.ghost {
|
|
112
|
+
background: transparent;
|
|
113
|
+
border-color: transparent;
|
|
114
|
+
color: var(--text-2);
|
|
115
|
+
padding: 4px 8px;
|
|
116
|
+
}
|
|
117
|
+
button.ghost:hover {
|
|
118
|
+
color: var(--text);
|
|
119
|
+
background: var(--bg-3);
|
|
120
|
+
border-color: var(--border);
|
|
121
|
+
}
|
|
122
|
+
button:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
123
|
+
|
|
124
|
+
/* Users table */
|
|
125
|
+
.users {
|
|
126
|
+
background: var(--bg-2);
|
|
127
|
+
border: 1px solid var(--border);
|
|
128
|
+
border-radius: 8px;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
}
|
|
131
|
+
.user-row {
|
|
132
|
+
display: grid;
|
|
133
|
+
grid-template-columns: 1fr 140px 160px 220px;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 12px;
|
|
136
|
+
padding: 14px 16px;
|
|
137
|
+
border-bottom: 1px solid var(--border);
|
|
138
|
+
}
|
|
139
|
+
.user-row:last-child { border-bottom: 0; }
|
|
140
|
+
.user-row.head {
|
|
141
|
+
background: var(--bg-3);
|
|
142
|
+
color: var(--text-3);
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
text-transform: uppercase;
|
|
145
|
+
letter-spacing: 0.4px;
|
|
146
|
+
padding: 10px 16px;
|
|
147
|
+
}
|
|
148
|
+
.user-row.expanded { background: #0f1418; }
|
|
149
|
+
.user-row .email { font-weight: 500; }
|
|
150
|
+
.user-row .sub { color: var(--text-3); font-size: 12px; }
|
|
151
|
+
.user-row .actions {
|
|
152
|
+
display: flex;
|
|
153
|
+
gap: 6px;
|
|
154
|
+
justify-content: flex-end;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.badge {
|
|
158
|
+
display: inline-block;
|
|
159
|
+
padding: 2px 8px;
|
|
160
|
+
border-radius: 999px;
|
|
161
|
+
font-size: 11px;
|
|
162
|
+
font-weight: 600;
|
|
163
|
+
letter-spacing: 0.3px;
|
|
164
|
+
border: 1px solid var(--border);
|
|
165
|
+
background: var(--bg-3);
|
|
166
|
+
color: var(--text-2);
|
|
167
|
+
}
|
|
168
|
+
.badge.green { color: var(--green); border-color: #1f3a2a; background: #0f1f17; }
|
|
169
|
+
.badge.yellow { color: var(--yellow); border-color: #3a311a; background: #1f1a0f; }
|
|
170
|
+
.badge.red { color: var(--red); border-color: #3a2222; background: #1f0f0f; }
|
|
171
|
+
.badge.gray { color: var(--text-3); }
|
|
172
|
+
|
|
173
|
+
.attrs {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-wrap: wrap;
|
|
176
|
+
gap: 6px;
|
|
177
|
+
margin-top: 8px;
|
|
178
|
+
}
|
|
179
|
+
.attr-pill {
|
|
180
|
+
font-size: 11px;
|
|
181
|
+
color: var(--text-2);
|
|
182
|
+
background: var(--bg-3);
|
|
183
|
+
border: 1px solid var(--border);
|
|
184
|
+
padding: 2px 8px;
|
|
185
|
+
border-radius: 4px;
|
|
186
|
+
font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
|
187
|
+
}
|
|
188
|
+
.attr-pill .k { color: var(--text-3); }
|
|
189
|
+
.attr-pill .v { color: var(--text); }
|
|
190
|
+
|
|
191
|
+
.empty {
|
|
192
|
+
padding: 60px 24px;
|
|
193
|
+
text-align: center;
|
|
194
|
+
color: var(--text-3);
|
|
195
|
+
}
|
|
196
|
+
.empty h3 { margin: 0 0 8px; color: var(--text-2); font-weight: 500; }
|
|
197
|
+
.empty code {
|
|
198
|
+
background: var(--bg-3);
|
|
199
|
+
padding: 2px 6px;
|
|
200
|
+
border-radius: 4px;
|
|
201
|
+
color: var(--text);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Banner */
|
|
205
|
+
.banner {
|
|
206
|
+
background: #1f1a0f;
|
|
207
|
+
border: 1px solid #3a311a;
|
|
208
|
+
border-left-width: 3px;
|
|
209
|
+
color: var(--yellow);
|
|
210
|
+
padding: 12px 14px;
|
|
211
|
+
border-radius: 6px;
|
|
212
|
+
margin-bottom: 16px;
|
|
213
|
+
font-size: 13px;
|
|
214
|
+
}
|
|
215
|
+
.banner.error {
|
|
216
|
+
background: #1f0f0f;
|
|
217
|
+
border-color: #3a2222;
|
|
218
|
+
color: var(--red);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Modal */
|
|
222
|
+
.modal-bg {
|
|
223
|
+
position: fixed;
|
|
224
|
+
inset: 0;
|
|
225
|
+
background: rgba(0,0,0,0.5);
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
padding: 24px;
|
|
230
|
+
z-index: 100;
|
|
231
|
+
}
|
|
232
|
+
.modal {
|
|
233
|
+
background: var(--bg-2);
|
|
234
|
+
border: 1px solid var(--border-2);
|
|
235
|
+
border-radius: 10px;
|
|
236
|
+
padding: 20px;
|
|
237
|
+
width: 100%;
|
|
238
|
+
max-width: 520px;
|
|
239
|
+
max-height: 90vh;
|
|
240
|
+
overflow: auto;
|
|
241
|
+
}
|
|
242
|
+
.modal h2 {
|
|
243
|
+
margin: 0 0 4px;
|
|
244
|
+
font-size: 15px;
|
|
245
|
+
font-weight: 600;
|
|
246
|
+
}
|
|
247
|
+
.modal .sub {
|
|
248
|
+
color: var(--text-3);
|
|
249
|
+
font-size: 12px;
|
|
250
|
+
margin-bottom: 16px;
|
|
251
|
+
}
|
|
252
|
+
.field { margin-bottom: 12px; }
|
|
253
|
+
.field label {
|
|
254
|
+
display: block;
|
|
255
|
+
font-size: 12px;
|
|
256
|
+
color: var(--text-2);
|
|
257
|
+
margin-bottom: 4px;
|
|
258
|
+
}
|
|
259
|
+
.modal .actions {
|
|
260
|
+
display: flex;
|
|
261
|
+
gap: 8px;
|
|
262
|
+
justify-content: flex-end;
|
|
263
|
+
margin-top: 18px;
|
|
264
|
+
}
|
|
265
|
+
.attr-row {
|
|
266
|
+
display: grid;
|
|
267
|
+
grid-template-columns: 1fr 1fr 32px;
|
|
268
|
+
gap: 6px;
|
|
269
|
+
margin-bottom: 6px;
|
|
270
|
+
align-items: center;
|
|
271
|
+
}
|
|
272
|
+
.attr-row .input { padding: 5px 8px; font-size: 13px; }
|
|
273
|
+
.attr-row button { padding: 4px 8px; }
|
|
274
|
+
|
|
275
|
+
/* Toast */
|
|
276
|
+
.toast {
|
|
277
|
+
position: fixed;
|
|
278
|
+
bottom: 24px;
|
|
279
|
+
right: 24px;
|
|
280
|
+
background: var(--bg-2);
|
|
281
|
+
border: 1px solid var(--border-2);
|
|
282
|
+
border-left: 3px solid var(--accent);
|
|
283
|
+
padding: 10px 14px;
|
|
284
|
+
border-radius: 6px;
|
|
285
|
+
font-size: 13px;
|
|
286
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.4);
|
|
287
|
+
z-index: 200;
|
|
288
|
+
max-width: 360px;
|
|
289
|
+
}
|
|
290
|
+
.toast.success { border-left-color: var(--green); }
|
|
291
|
+
.toast.error { border-left-color: var(--red); }
|
|
292
|
+
|
|
293
|
+
/* Spinner */
|
|
294
|
+
.spinner {
|
|
295
|
+
display: inline-block;
|
|
296
|
+
width: 12px;
|
|
297
|
+
height: 12px;
|
|
298
|
+
border: 2px solid var(--border-2);
|
|
299
|
+
border-top-color: var(--accent);
|
|
300
|
+
border-radius: 50%;
|
|
301
|
+
animation: spin 0.6s linear infinite;
|
|
302
|
+
}
|
|
303
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
304
|
+
|
|
305
|
+
/* Header pool select */
|
|
306
|
+
.pool-select {
|
|
307
|
+
display: flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
gap: 6px;
|
|
310
|
+
}
|
|
311
|
+
.pool-select label { font-size: 12px; color: var(--text-3); }
|
|
312
|
+
|
|
313
|
+
/* Status dot */
|
|
314
|
+
.dot {
|
|
315
|
+
display: inline-block;
|
|
316
|
+
width: 7px;
|
|
317
|
+
height: 7px;
|
|
318
|
+
border-radius: 50%;
|
|
319
|
+
margin-right: 5px;
|
|
320
|
+
vertical-align: middle;
|
|
321
|
+
}
|
|
322
|
+
.dot.green { background: var(--green); }
|
|
323
|
+
.dot.yellow { background: var(--yellow); }
|
|
324
|
+
.dot.red { background: var(--red); }
|
|
325
|
+
.dot.gray { background: var(--text-3); }
|
|
326
|
+
</style>
|
|
327
|
+
</head>
|
|
328
|
+
<body>
|
|
329
|
+
<header>
|
|
330
|
+
<h1>👥 Cognito Users</h1>
|
|
331
|
+
<span class="meta" id="ctx-label">loading…</span>
|
|
332
|
+
<div class="spacer"></div>
|
|
333
|
+
<div class="pool-select" id="pool-select" hidden>
|
|
334
|
+
<label for="pool">Pool</label>
|
|
335
|
+
<select id="pool"></select>
|
|
336
|
+
</div>
|
|
337
|
+
<button id="btn-refresh" title="Refresh (R)">↻</button>
|
|
338
|
+
<button class="primary" id="btn-create">+ Create user</button>
|
|
339
|
+
</header>
|
|
340
|
+
|
|
341
|
+
<main>
|
|
342
|
+
<div id="banner-slot"></div>
|
|
343
|
+
<div class="toolbar">
|
|
344
|
+
<input class="input grow" id="search" placeholder="Search by email, sub, or attribute…" />
|
|
345
|
+
<span class="meta mono" id="count">—</span>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
<div class="users" id="users">
|
|
349
|
+
<div class="empty"><div class="spinner"></div></div>
|
|
350
|
+
</div>
|
|
351
|
+
</main>
|
|
352
|
+
|
|
353
|
+
<div id="modal-slot"></div>
|
|
354
|
+
<div id="toast-slot"></div>
|
|
355
|
+
|
|
356
|
+
<script>
|
|
357
|
+
(() => {
|
|
358
|
+
// ── State ─────────────────────────────────────────────────────────
|
|
359
|
+
const state = {
|
|
360
|
+
project: '',
|
|
361
|
+
intents: [],
|
|
362
|
+
pools: {},
|
|
363
|
+
selectedIntent: null,
|
|
364
|
+
customAttributes: [],
|
|
365
|
+
users: [],
|
|
366
|
+
filter: '',
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// ── DOM helpers ───────────────────────────────────────────────────
|
|
370
|
+
const $ = (id) => document.getElementById(id);
|
|
371
|
+
const el = (tag, attrs = {}, ...kids) => {
|
|
372
|
+
const e = document.createElement(tag);
|
|
373
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
374
|
+
if (k === 'class') e.className = v;
|
|
375
|
+
else if (k === 'html') e.innerHTML = v;
|
|
376
|
+
else if (k.startsWith('on') && typeof v === 'function') e.addEventListener(k.slice(2), v);
|
|
377
|
+
else if (v === true) e.setAttribute(k, '');
|
|
378
|
+
else if (v !== false && v != null) e.setAttribute(k, String(v));
|
|
379
|
+
}
|
|
380
|
+
for (const kid of kids) {
|
|
381
|
+
if (kid == null) continue;
|
|
382
|
+
e.appendChild(typeof kid === 'string' ? document.createTextNode(kid) : kid);
|
|
383
|
+
}
|
|
384
|
+
return e;
|
|
385
|
+
};
|
|
386
|
+
const escapeHtml = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({
|
|
387
|
+
'&': '&', '<': '<', '>': '>', '"': '"', "'": ''',
|
|
388
|
+
}[c]));
|
|
389
|
+
|
|
390
|
+
// ── HTTP ──────────────────────────────────────────────────────────
|
|
391
|
+
async function api(path, opts = {}) {
|
|
392
|
+
const res = await fetch(path, {
|
|
393
|
+
headers: { 'Content-Type': 'application/json' },
|
|
394
|
+
...opts,
|
|
395
|
+
body: opts.body ? JSON.stringify(opts.body) : undefined,
|
|
396
|
+
});
|
|
397
|
+
const text = await res.text();
|
|
398
|
+
let data;
|
|
399
|
+
try { data = text ? JSON.parse(text) : {}; } catch { data = { raw: text }; }
|
|
400
|
+
if (!res.ok) {
|
|
401
|
+
const msg = data?.error?.message || data?.message || \`HTTP \${res.status}\`;
|
|
402
|
+
const err = new Error(msg);
|
|
403
|
+
err.code = data?.error?.code;
|
|
404
|
+
err.status = res.status;
|
|
405
|
+
throw err;
|
|
406
|
+
}
|
|
407
|
+
return data;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// ── Toasts ────────────────────────────────────────────────────────
|
|
411
|
+
let toastTimer = null;
|
|
412
|
+
function toast(msg, kind = 'info') {
|
|
413
|
+
clearTimeout(toastTimer);
|
|
414
|
+
const slot = $('toast-slot');
|
|
415
|
+
slot.innerHTML = '';
|
|
416
|
+
const t = el('div', { class: \`toast \${kind}\` }, msg);
|
|
417
|
+
slot.appendChild(t);
|
|
418
|
+
toastTimer = setTimeout(() => { slot.innerHTML = ''; }, kind === 'error' ? 6000 : 2500);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// ── Banner ────────────────────────────────────────────────────────
|
|
422
|
+
function setBanner(msg, kind = 'warn') {
|
|
423
|
+
const slot = $('banner-slot');
|
|
424
|
+
if (!msg) { slot.innerHTML = ''; return; }
|
|
425
|
+
slot.innerHTML = '';
|
|
426
|
+
slot.appendChild(el('div', { class: \`banner \${kind === 'error' ? 'error' : ''}\` }, msg));
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// ── Pools / users loading ─────────────────────────────────────────
|
|
430
|
+
async function loadPools() {
|
|
431
|
+
try {
|
|
432
|
+
const data = await api('/_dev/cognito/pools');
|
|
433
|
+
state.project = data.project;
|
|
434
|
+
state.intents = data.intents || [];
|
|
435
|
+
state.pools = data.pools || {};
|
|
436
|
+
$('ctx-label').textContent = \`\${data.project} · endpoint \${data.endpoint || '—'}\`;
|
|
437
|
+
|
|
438
|
+
// Pool selector
|
|
439
|
+
const sel = $('pool');
|
|
440
|
+
const intentIds = state.intents.map((i) => i.id);
|
|
441
|
+
const wrap = $('pool-select');
|
|
442
|
+
if (intentIds.length > 1) {
|
|
443
|
+
wrap.hidden = false;
|
|
444
|
+
sel.innerHTML = '';
|
|
445
|
+
for (const id of intentIds) {
|
|
446
|
+
sel.appendChild(el('option', { value: id }, id));
|
|
447
|
+
}
|
|
448
|
+
if (!state.selectedIntent || !intentIds.includes(state.selectedIntent)) {
|
|
449
|
+
state.selectedIntent = intentIds[0];
|
|
450
|
+
}
|
|
451
|
+
sel.value = state.selectedIntent;
|
|
452
|
+
} else {
|
|
453
|
+
wrap.hidden = true;
|
|
454
|
+
state.selectedIntent = intentIds[0] || null;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// Custom attributes for the selected intent (drives the create modal).
|
|
458
|
+
const intent = state.intents.find((i) => i.id === state.selectedIntent);
|
|
459
|
+
state.customAttributes = intent?.customAttributes || [];
|
|
460
|
+
|
|
461
|
+
if (!state.selectedIntent) {
|
|
462
|
+
setBanner('No auth intent declared in vk.config.ts. Add an \`auth\` intent and restart \`vk dev\`.', 'error');
|
|
463
|
+
renderUsers([]);
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
const pool = state.pools[state.selectedIntent];
|
|
467
|
+
if (!pool) {
|
|
468
|
+
setBanner(\`No cognito-local pool provisioned for intent "\${state.selectedIntent}". Run \\\`vk dev\\\` first.\`, 'error');
|
|
469
|
+
renderUsers([]);
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
setBanner('');
|
|
473
|
+
} catch (err) {
|
|
474
|
+
setBanner(\`Failed to load pools: \${err.message}\`, 'error');
|
|
475
|
+
throw err;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
async function loadUsers() {
|
|
480
|
+
if (!state.selectedIntent) return;
|
|
481
|
+
try {
|
|
482
|
+
const data = await api(\`/_dev/cognito/users?intent=\${encodeURIComponent(state.selectedIntent)}\`);
|
|
483
|
+
state.users = data.users || [];
|
|
484
|
+
renderUsers(state.users);
|
|
485
|
+
} catch (err) {
|
|
486
|
+
setBanner(\`Failed to list users: \${err.message}\`, 'error');
|
|
487
|
+
renderUsers([]);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// ── Render ────────────────────────────────────────────────────────
|
|
492
|
+
function attrMap(attrs) {
|
|
493
|
+
const m = {};
|
|
494
|
+
for (const a of attrs || []) m[a.Name] = a.Value;
|
|
495
|
+
return m;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
function statusBadge(u) {
|
|
499
|
+
const status = u.UserStatus || 'UNKNOWN';
|
|
500
|
+
const enabled = u.Enabled !== false;
|
|
501
|
+
if (!enabled) return el('span', { class: 'badge red' }, '● DISABLED');
|
|
502
|
+
if (status === 'CONFIRMED') return el('span', { class: 'badge green' }, '● CONFIRMED');
|
|
503
|
+
if (status === 'FORCE_CHANGE_PASSWORD') return el('span', { class: 'badge yellow' }, '● PASSWORD RESET REQUIRED');
|
|
504
|
+
if (status === 'RESET_REQUIRED') return el('span', { class: 'badge yellow' }, '● RESET REQUIRED');
|
|
505
|
+
if (status === 'UNCONFIRMED') return el('span', { class: 'badge yellow' }, '● UNCONFIRMED');
|
|
506
|
+
return el('span', { class: 'badge gray' }, '● ' + status);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
function timeAgo(iso) {
|
|
510
|
+
if (!iso) return '—';
|
|
511
|
+
const ms = Date.now() - new Date(iso).getTime();
|
|
512
|
+
if (ms < 60000) return 'just now';
|
|
513
|
+
if (ms < 3600000) return Math.round(ms / 60000) + 'm ago';
|
|
514
|
+
if (ms < 86400000) return Math.round(ms / 3600000) + 'h ago';
|
|
515
|
+
return Math.round(ms / 86400000) + 'd ago';
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
function userMatchesFilter(u, q) {
|
|
519
|
+
if (!q) return true;
|
|
520
|
+
const lo = q.toLowerCase();
|
|
521
|
+
if ((u.Username || '').toLowerCase().includes(lo)) return true;
|
|
522
|
+
for (const a of u.Attributes || []) {
|
|
523
|
+
if ((a.Value || '').toLowerCase().includes(lo)) return true;
|
|
524
|
+
if ((a.Name || '').toLowerCase().includes(lo)) return true;
|
|
525
|
+
}
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
function renderUsers(users) {
|
|
530
|
+
const root = $('users');
|
|
531
|
+
root.innerHTML = '';
|
|
532
|
+
|
|
533
|
+
const filtered = users.filter((u) => userMatchesFilter(u, state.filter));
|
|
534
|
+
$('count').textContent = users.length === 0
|
|
535
|
+
? 'no users'
|
|
536
|
+
: filtered.length === users.length
|
|
537
|
+
? \`\${users.length} user\${users.length === 1 ? '' : 's'}\`
|
|
538
|
+
: \`\${filtered.length} of \${users.length}\`;
|
|
539
|
+
|
|
540
|
+
if (users.length === 0) {
|
|
541
|
+
root.appendChild(el('div', { class: 'empty' },
|
|
542
|
+
el('h3', {}, 'No users yet'),
|
|
543
|
+
el('div', {}, 'Click ', el('code', {}, '+ Create user'), ' to add the first one.'),
|
|
544
|
+
));
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
if (filtered.length === 0) {
|
|
549
|
+
root.appendChild(el('div', { class: 'empty' }, 'No users match your filter.'));
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
root.appendChild(
|
|
554
|
+
el('div', { class: 'user-row head' },
|
|
555
|
+
el('div', {}, 'User'),
|
|
556
|
+
el('div', {}, 'Status'),
|
|
557
|
+
el('div', {}, 'Created'),
|
|
558
|
+
el('div', { style: 'text-align:right' }, 'Actions'),
|
|
559
|
+
),
|
|
560
|
+
);
|
|
561
|
+
|
|
562
|
+
for (const u of filtered) {
|
|
563
|
+
const m = attrMap(u.Attributes);
|
|
564
|
+
const email = m['email'] || u.Username;
|
|
565
|
+
const created = u.UserCreateDate ? new Date(u.UserCreateDate).toLocaleString() : '—';
|
|
566
|
+
|
|
567
|
+
// Custom attrs (the ones devs care about — \`custom:tenantId\`,
|
|
568
|
+
// \`custom:role\`, \`email_verified\`, etc.) shown as small pills.
|
|
569
|
+
const attrPills = [];
|
|
570
|
+
for (const a of u.Attributes || []) {
|
|
571
|
+
if (a.Name === 'sub') continue;
|
|
572
|
+
if (a.Name === 'email') continue; // already in header
|
|
573
|
+
attrPills.push(
|
|
574
|
+
el('span', { class: 'attr-pill' },
|
|
575
|
+
el('span', { class: 'k' }, a.Name + ' = '),
|
|
576
|
+
el('span', { class: 'v' }, a.Value || ''),
|
|
577
|
+
),
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
const userCol = el('div', {},
|
|
582
|
+
el('div', { class: 'email' }, email),
|
|
583
|
+
el('div', { class: 'sub mono' }, 'sub: ' + (u.Username || '')),
|
|
584
|
+
attrPills.length > 0 ? el('div', { class: 'attrs' }, ...attrPills) : null,
|
|
585
|
+
);
|
|
586
|
+
|
|
587
|
+
const actions = el('div', { class: 'actions' },
|
|
588
|
+
el('button', { class: 'ghost', title: 'Set password',
|
|
589
|
+
onclick: () => openSetPasswordModal(u) }, '🔑'),
|
|
590
|
+
el('button', { class: 'ghost', title: 'Edit attributes',
|
|
591
|
+
onclick: () => openSetAttributesModal(u) }, '✎'),
|
|
592
|
+
u.Enabled === false
|
|
593
|
+
? el('button', { class: 'ghost', title: 'Enable',
|
|
594
|
+
onclick: () => doAction(u, 'enable', 'Enabled') }, '▶')
|
|
595
|
+
: el('button', { class: 'ghost', title: 'Disable',
|
|
596
|
+
onclick: () => doAction(u, 'disable', 'Disabled') }, '⏸'),
|
|
597
|
+
u.UserStatus === 'UNCONFIRMED'
|
|
598
|
+
? el('button', { class: 'ghost', title: 'Confirm',
|
|
599
|
+
onclick: () => doAction(u, 'confirm', 'Confirmed') }, '✓')
|
|
600
|
+
: null,
|
|
601
|
+
el('button', { class: 'danger', title: 'Delete',
|
|
602
|
+
onclick: () => doDelete(u) }, '×'),
|
|
603
|
+
);
|
|
604
|
+
|
|
605
|
+
root.appendChild(
|
|
606
|
+
el('div', { class: 'user-row' },
|
|
607
|
+
userCol,
|
|
608
|
+
el('div', {}, statusBadge(u)),
|
|
609
|
+
el('div', { title: created }, timeAgo(u.UserCreateDate)),
|
|
610
|
+
actions,
|
|
611
|
+
),
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
// ── Actions ───────────────────────────────────────────────────────
|
|
617
|
+
async function doAction(u, op, label) {
|
|
618
|
+
try {
|
|
619
|
+
await api(\`/_dev/cognito/users/\${encodeURIComponent(u.Username)}/\${op}?intent=\${encodeURIComponent(state.selectedIntent)}\`, { method: 'POST' });
|
|
620
|
+
toast(\`\${label} \${u.Username}\`, 'success');
|
|
621
|
+
await loadUsers();
|
|
622
|
+
} catch (err) {
|
|
623
|
+
toast(err.message, 'error');
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
async function doDelete(u) {
|
|
628
|
+
const m = attrMap(u.Attributes);
|
|
629
|
+
const label = m['email'] || u.Username;
|
|
630
|
+
if (!confirm(\`Delete user "\${label}"?\\n\\nThis cannot be undone.\`)) return;
|
|
631
|
+
try {
|
|
632
|
+
await api(\`/_dev/cognito/users/\${encodeURIComponent(u.Username)}?intent=\${encodeURIComponent(state.selectedIntent)}\`, { method: 'DELETE' });
|
|
633
|
+
toast(\`Deleted \${label}\`, 'success');
|
|
634
|
+
await loadUsers();
|
|
635
|
+
} catch (err) {
|
|
636
|
+
toast(err.message, 'error');
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// ── Modals ────────────────────────────────────────────────────────
|
|
641
|
+
function closeModal() { $('modal-slot').innerHTML = ''; }
|
|
642
|
+
|
|
643
|
+
function openModal(node) {
|
|
644
|
+
const slot = $('modal-slot');
|
|
645
|
+
slot.innerHTML = '';
|
|
646
|
+
slot.appendChild(el('div', { class: 'modal-bg', onclick: (e) => {
|
|
647
|
+
if (e.target.classList.contains('modal-bg')) closeModal();
|
|
648
|
+
} }, node));
|
|
649
|
+
setTimeout(() => {
|
|
650
|
+
const first = node.querySelector('input, select, textarea, button');
|
|
651
|
+
if (first) first.focus();
|
|
652
|
+
}, 0);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
function openCreateModal() {
|
|
656
|
+
if (!state.selectedIntent) {
|
|
657
|
+
toast('No pool available. Start \`vk dev\` first.', 'error');
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
const emailInput = el('input', { class: 'input', type: 'email', required: true, placeholder: 'admin@example.com' });
|
|
661
|
+
const pwInput = el('input', { class: 'input', type: 'text', required: true, placeholder: 'Permanent password (set immediately)' });
|
|
662
|
+
|
|
663
|
+
// Pre-fill rows for declared customAttributes (strip 'custom:' prefix
|
|
664
|
+
// when user types — we add it back on submit).
|
|
665
|
+
const attrsHost = el('div', {});
|
|
666
|
+
function addAttrRow(name = '', value = '') {
|
|
667
|
+
const nameInput = el('input', { class: 'input', placeholder: 'attribute (e.g. tenantId)', value: name });
|
|
668
|
+
const valueInput = el('input', { class: 'input', placeholder: 'value', value });
|
|
669
|
+
const rmBtn = el('button', { class: 'ghost', onclick: () => row.remove(), title: 'Remove' }, '×');
|
|
670
|
+
const row = el('div', { class: 'attr-row' }, nameInput, valueInput, rmBtn);
|
|
671
|
+
attrsHost.appendChild(row);
|
|
672
|
+
}
|
|
673
|
+
if (state.customAttributes.length > 0) {
|
|
674
|
+
for (const a of state.customAttributes) addAttrRow(a, '');
|
|
675
|
+
} else {
|
|
676
|
+
addAttrRow();
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
const modal = el('div', { class: 'modal' },
|
|
680
|
+
el('h2', {}, 'Create user'),
|
|
681
|
+
el('div', { class: 'sub' }, \`Pool: \${state.pools[state.selectedIntent]?.userPoolId || '—'}\`),
|
|
682
|
+
|
|
683
|
+
el('div', { class: 'field' }, el('label', {}, 'Email'), emailInput),
|
|
684
|
+
el('div', { class: 'field' }, el('label', {}, 'Password'), pwInput),
|
|
685
|
+
el('div', { class: 'field' },
|
|
686
|
+
el('label', {}, 'Custom attributes (without the "custom:" prefix)'),
|
|
687
|
+
attrsHost,
|
|
688
|
+
el('button', { class: 'ghost', onclick: () => addAttrRow() }, '+ Add attribute'),
|
|
689
|
+
),
|
|
690
|
+
el('div', { class: 'actions' },
|
|
691
|
+
el('button', { onclick: closeModal }, 'Cancel'),
|
|
692
|
+
el('button', { class: 'primary', onclick: async () => {
|
|
693
|
+
const email = emailInput.value.trim();
|
|
694
|
+
const password = pwInput.value;
|
|
695
|
+
if (!email || !password) { toast('Email and password are required', 'error'); return; }
|
|
696
|
+
const attrs = {};
|
|
697
|
+
for (const row of attrsHost.children) {
|
|
698
|
+
const [n, v] = row.querySelectorAll('input');
|
|
699
|
+
const name = n.value.trim();
|
|
700
|
+
if (!name) continue;
|
|
701
|
+
attrs[name] = v.value;
|
|
702
|
+
}
|
|
703
|
+
try {
|
|
704
|
+
await api(\`/_dev/cognito/users?intent=\${encodeURIComponent(state.selectedIntent)}\`, {
|
|
705
|
+
method: 'POST',
|
|
706
|
+
body: { email, password, attributes: attrs },
|
|
707
|
+
});
|
|
708
|
+
toast(\`Created \${email}\`, 'success');
|
|
709
|
+
closeModal();
|
|
710
|
+
await loadUsers();
|
|
711
|
+
} catch (err) {
|
|
712
|
+
toast(err.message, 'error');
|
|
713
|
+
}
|
|
714
|
+
} }, 'Create'),
|
|
715
|
+
),
|
|
716
|
+
);
|
|
717
|
+
openModal(modal);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
function openSetPasswordModal(u) {
|
|
721
|
+
const m = attrMap(u.Attributes);
|
|
722
|
+
const label = m['email'] || u.Username;
|
|
723
|
+
const pwInput = el('input', { class: 'input', type: 'text', placeholder: 'New password', required: true });
|
|
724
|
+
const permanentInput = el('input', { type: 'checkbox', checked: true, id: 'permanent-cb' });
|
|
725
|
+
|
|
726
|
+
const modal = el('div', { class: 'modal' },
|
|
727
|
+
el('h2', {}, 'Set password'),
|
|
728
|
+
el('div', { class: 'sub' }, label),
|
|
729
|
+
el('div', { class: 'field' }, el('label', {}, 'New password'), pwInput),
|
|
730
|
+
el('div', { class: 'field' },
|
|
731
|
+
el('label', { for: 'permanent-cb' },
|
|
732
|
+
permanentInput,
|
|
733
|
+
' Permanent (skip FORCE_CHANGE_PASSWORD)',
|
|
734
|
+
),
|
|
735
|
+
),
|
|
736
|
+
el('div', { class: 'actions' },
|
|
737
|
+
el('button', { onclick: closeModal }, 'Cancel'),
|
|
738
|
+
el('button', { class: 'primary', onclick: async () => {
|
|
739
|
+
const password = pwInput.value;
|
|
740
|
+
if (!password) { toast('Password is required', 'error'); return; }
|
|
741
|
+
try {
|
|
742
|
+
await api(\`/_dev/cognito/users/\${encodeURIComponent(u.Username)}/password?intent=\${encodeURIComponent(state.selectedIntent)}\`, {
|
|
743
|
+
method: 'POST',
|
|
744
|
+
body: { password, permanent: permanentInput.checked },
|
|
745
|
+
});
|
|
746
|
+
toast('Password updated', 'success');
|
|
747
|
+
closeModal();
|
|
748
|
+
await loadUsers();
|
|
749
|
+
} catch (err) {
|
|
750
|
+
toast(err.message, 'error');
|
|
751
|
+
}
|
|
752
|
+
} }, 'Set password'),
|
|
753
|
+
),
|
|
754
|
+
);
|
|
755
|
+
openModal(modal);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
function openSetAttributesModal(u) {
|
|
759
|
+
const m = attrMap(u.Attributes);
|
|
760
|
+
const label = m['email'] || u.Username;
|
|
761
|
+
const attrsHost = el('div', {});
|
|
762
|
+
function addAttrRow(name = '', value = '') {
|
|
763
|
+
const nameInput = el('input', { class: 'input', placeholder: 'attribute', value: name });
|
|
764
|
+
const valueInput = el('input', { class: 'input', placeholder: 'value', value });
|
|
765
|
+
const rmBtn = el('button', { class: 'ghost', onclick: () => row.remove(), title: 'Remove' }, '×');
|
|
766
|
+
const row = el('div', { class: 'attr-row' }, nameInput, valueInput, rmBtn);
|
|
767
|
+
attrsHost.appendChild(row);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
// Pre-load existing custom: attributes so the user sees + can edit
|
|
771
|
+
// what's currently set. Stripping the prefix mirrors what the create
|
|
772
|
+
// modal does so the round-trip is symmetric.
|
|
773
|
+
const seen = new Set();
|
|
774
|
+
for (const a of u.Attributes || []) {
|
|
775
|
+
if (a.Name && a.Name.startsWith('custom:')) {
|
|
776
|
+
const name = a.Name.slice('custom:'.length);
|
|
777
|
+
seen.add(name);
|
|
778
|
+
addAttrRow(name, a.Value || '');
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
for (const a of state.customAttributes) {
|
|
782
|
+
if (!seen.has(a)) addAttrRow(a, '');
|
|
783
|
+
}
|
|
784
|
+
if (attrsHost.children.length === 0) addAttrRow();
|
|
785
|
+
|
|
786
|
+
const modal = el('div', { class: 'modal' },
|
|
787
|
+
el('h2', {}, 'Edit attributes'),
|
|
788
|
+
el('div', { class: 'sub' }, label),
|
|
789
|
+
el('div', { class: 'field' },
|
|
790
|
+
el('label', {}, 'Custom attributes (without the "custom:" prefix). Leave value blank to clear.'),
|
|
791
|
+
attrsHost,
|
|
792
|
+
el('button', { class: 'ghost', onclick: () => addAttrRow() }, '+ Add attribute'),
|
|
793
|
+
),
|
|
794
|
+
el('div', { class: 'actions' },
|
|
795
|
+
el('button', { onclick: closeModal }, 'Cancel'),
|
|
796
|
+
el('button', { class: 'primary', onclick: async () => {
|
|
797
|
+
const attrs = {};
|
|
798
|
+
for (const row of attrsHost.children) {
|
|
799
|
+
const [n, v] = row.querySelectorAll('input');
|
|
800
|
+
const name = n.value.trim();
|
|
801
|
+
if (!name) continue;
|
|
802
|
+
attrs[name] = v.value;
|
|
803
|
+
}
|
|
804
|
+
try {
|
|
805
|
+
await api(\`/_dev/cognito/users/\${encodeURIComponent(u.Username)}/attributes?intent=\${encodeURIComponent(state.selectedIntent)}\`, {
|
|
806
|
+
method: 'POST',
|
|
807
|
+
body: { attributes: attrs },
|
|
808
|
+
});
|
|
809
|
+
toast('Attributes updated', 'success');
|
|
810
|
+
closeModal();
|
|
811
|
+
await loadUsers();
|
|
812
|
+
} catch (err) {
|
|
813
|
+
toast(err.message, 'error');
|
|
814
|
+
}
|
|
815
|
+
} }, 'Save'),
|
|
816
|
+
),
|
|
817
|
+
);
|
|
818
|
+
openModal(modal);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// ── Wire up ───────────────────────────────────────────────────────
|
|
822
|
+
$('btn-refresh').addEventListener('click', async () => {
|
|
823
|
+
await loadPools();
|
|
824
|
+
await loadUsers();
|
|
825
|
+
});
|
|
826
|
+
$('btn-create').addEventListener('click', openCreateModal);
|
|
827
|
+
$('pool').addEventListener('change', async (e) => {
|
|
828
|
+
state.selectedIntent = e.target.value;
|
|
829
|
+
const intent = state.intents.find((i) => i.id === state.selectedIntent);
|
|
830
|
+
state.customAttributes = intent?.customAttributes || [];
|
|
831
|
+
await loadUsers();
|
|
832
|
+
});
|
|
833
|
+
$('search').addEventListener('input', (e) => {
|
|
834
|
+
state.filter = e.target.value;
|
|
835
|
+
renderUsers(state.users);
|
|
836
|
+
});
|
|
837
|
+
document.addEventListener('keydown', (e) => {
|
|
838
|
+
if (e.key === 'Escape') closeModal();
|
|
839
|
+
if (e.key === 'r' && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') {
|
|
840
|
+
$('btn-refresh').click();
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
// ── Boot ──────────────────────────────────────────────────────────
|
|
845
|
+
(async () => {
|
|
846
|
+
try {
|
|
847
|
+
await loadPools();
|
|
848
|
+
await loadUsers();
|
|
849
|
+
} catch {
|
|
850
|
+
// Errors already shown in banner.
|
|
851
|
+
}
|
|
852
|
+
})();
|
|
853
|
+
})();
|
|
854
|
+
</script>
|
|
855
|
+
</body>
|
|
856
|
+
</html>
|
|
857
|
+
`;
|
|
858
|
+
//# sourceMappingURL=dev-cognito-ui-page.js.map
|