@venturekit/cli 0.0.0-dev.20260522121047 → 0.0.0-dev.20260602192622
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/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +53 -1
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +13 -5
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +5 -1
- package/dist/commands/open.js.map +1 -1
- package/dist/utils/auto-deps.d.ts.map +1 -1
- package/dist/utils/auto-deps.js +11 -0
- package/dist/utils/auto-deps.js.map +1 -1
- package/dist/utils/cdk-bridge.d.ts +1 -0
- package/dist/utils/cdk-bridge.d.ts.map +1 -1
- package/dist/utils/cdk-bridge.js +1 -0
- package/dist/utils/cdk-bridge.js.map +1 -1
- package/dist/utils/config-loader.d.ts +2 -0
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/dist/utils/config-loader.js +2 -0
- package/dist/utils/config-loader.js.map +1 -1
- package/dist/utils/dev-cognito-ui-page.d.ts +1 -1
- package/dist/utils/dev-cognito-ui-page.d.ts.map +1 -1
- package/dist/utils/dev-cognito-ui-page.js +7 -2
- package/dist/utils/dev-cognito-ui-page.js.map +1 -1
- package/dist/utils/docker-compose.d.ts +13 -1
- package/dist/utils/docker-compose.d.ts.map +1 -1
- package/dist/utils/docker-compose.js +134 -34
- package/dist/utils/docker-compose.js.map +1 -1
- package/dist/utils/local-queue.d.ts +57 -29
- package/dist/utils/local-queue.d.ts.map +1 -1
- package/dist/utils/local-queue.js +257 -139
- package/dist/utils/local-queue.js.map +1 -1
- package/dist/utils/local-server.d.ts +20 -0
- package/dist/utils/local-server.d.ts.map +1 -1
- package/dist/utils/local-server.js +75 -6
- package/dist/utils/local-server.js.map +1 -1
- package/dist/utils/local-ws.d.ts +184 -0
- package/dist/utils/local-ws.d.ts.map +1 -0
- package/dist/utils/local-ws.js +667 -0
- package/dist/utils/local-ws.js.map +1 -0
- package/package.json +7 -5
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* - All requests go to same-origin `/_dev/cognito/*` so cookies /
|
|
15
15
|
* CORS aren't a concern.
|
|
16
16
|
*/
|
|
17
|
-
export declare const COGNITO_UI_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n<title>Cognito Users \u00B7 VentureKit dev</title>\n<style>\n :root {\n --bg: #0b0d10;\n --bg-2: #11151a;\n --bg-3: #1a2029;\n --border: #232a35;\n --border-2: #2e3744;\n --text: #e6edf3;\n --text-2: #9aa7b4;\n --text-3: #6b7785;\n --accent: #4f9eff;\n --accent-2: #2563eb;\n --green: #2ecc71;\n --yellow: #f5c542;\n --red: #ff5d5d;\n --orange: #ff9933;\n }\n * { box-sizing: border-box; }\n html, body { height: 100%; }\n body {\n margin: 0;\n font: 14px/1.45 -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n color: var(--text);\n background: var(--bg);\n }\n a { color: var(--accent); text-decoration: none; }\n a:hover { text-decoration: underline; }\n code, .mono { font-family: ui-monospace, \"SF Mono\", Menlo, Consolas, monospace; }\n\n header {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 14px 24px;\n border-bottom: 1px solid var(--border);\n background: var(--bg-2);\n }\n header h1 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0.2px;\n }\n header .meta {\n color: var(--text-3);\n font-size: 12px;\n }\n header .spacer { flex: 1; }\n\n main { padding: 24px; max-width: 1200px; margin: 0 auto; }\n\n .toolbar {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 16px;\n flex-wrap: wrap;\n }\n .toolbar .grow { flex: 1; min-width: 200px; }\n\n .input, select, button {\n font: inherit;\n color: var(--text);\n background: var(--bg-2);\n border: 1px solid var(--border);\n border-radius: 6px;\n padding: 7px 10px;\n outline: none;\n }\n .input:focus, select:focus { border-color: var(--accent); }\n .input { width: 100%; }\n button {\n cursor: pointer;\n transition: border-color 0.12s, background 0.12s;\n }\n button:hover { border-color: var(--border-2); background: var(--bg-3); }\n button.primary {\n background: var(--accent-2);\n border-color: var(--accent-2);\n color: white;\n }\n button.primary:hover { background: #1d4ed8; border-color: #1d4ed8; }\n button.danger {\n color: var(--red);\n border-color: #3a2226;\n background: #1a1416;\n }\n button.danger:hover { background: #2b1a1d; }\n button.ghost {\n background: transparent;\n border-color: transparent;\n color: var(--text-2);\n padding: 4px 8px;\n }\n button.ghost:hover {\n color: var(--text);\n background: var(--bg-3);\n border-color: var(--border);\n }\n button:disabled { opacity: 0.5; cursor: not-allowed; }\n\n /* Users table */\n .users {\n background: var(--bg-2);\n border: 1px solid var(--border);\n border-radius: 8px;\n overflow: hidden;\n }\n .user-row {\n display: grid;\n grid-template-columns: 1fr 140px 160px 220px;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-bottom: 1px solid var(--border);\n }\n .user-row:last-child { border-bottom: 0; }\n .user-row.head {\n background: var(--bg-3);\n color: var(--text-3);\n font-size: 12px;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n padding: 10px 16px;\n }\n .user-row.expanded { background: #0f1418; }\n .user-row .email { font-weight: 500; }\n .user-row .sub { color: var(--text-3); font-size: 12px; }\n .user-row .actions {\n display: flex;\n gap: 6px;\n justify-content: flex-end;\n }\n\n .badge {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.3px;\n border: 1px solid var(--border);\n background: var(--bg-3);\n color: var(--text-2);\n }\n .badge.green { color: var(--green); border-color: #1f3a2a; background: #0f1f17; }\n .badge.yellow { color: var(--yellow); border-color: #3a311a; background: #1f1a0f; }\n .badge.red { color: var(--red); border-color: #3a2222; background: #1f0f0f; }\n .badge.gray { color: var(--text-3); }\n\n .attrs {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 8px;\n }\n .attr-pill {\n font-size: 11px;\n color: var(--text-2);\n background: var(--bg-3);\n border: 1px solid var(--border);\n padding: 2px 8px;\n border-radius: 4px;\n font-family: ui-monospace, \"SF Mono\", Menlo, Consolas, monospace;\n }\n .attr-pill .k { color: var(--text-3); }\n .attr-pill .v { color: var(--text); }\n\n .empty {\n padding: 60px 24px;\n text-align: center;\n color: var(--text-3);\n }\n .empty h3 { margin: 0 0 8px; color: var(--text-2); font-weight: 500; }\n .empty code {\n background: var(--bg-3);\n padding: 2px 6px;\n border-radius: 4px;\n color: var(--text);\n }\n\n /* Banner */\n .banner {\n background: #1f1a0f;\n border: 1px solid #3a311a;\n border-left-width: 3px;\n color: var(--yellow);\n padding: 12px 14px;\n border-radius: 6px;\n margin-bottom: 16px;\n font-size: 13px;\n }\n .banner.error {\n background: #1f0f0f;\n border-color: #3a2222;\n color: var(--red);\n }\n\n /* Modal */\n .modal-bg {\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n z-index: 100;\n }\n .modal {\n background: var(--bg-2);\n border: 1px solid var(--border-2);\n border-radius: 10px;\n padding: 20px;\n width: 100%;\n max-width: 520px;\n max-height: 90vh;\n overflow: auto;\n }\n .modal h2 {\n margin: 0 0 4px;\n font-size: 15px;\n font-weight: 600;\n }\n .modal .sub {\n color: var(--text-3);\n font-size: 12px;\n margin-bottom: 16px;\n }\n .field { margin-bottom: 12px; }\n .field label {\n display: block;\n font-size: 12px;\n color: var(--text-2);\n margin-bottom: 4px;\n }\n .modal .actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n margin-top: 18px;\n }\n .attr-row {\n display: grid;\n grid-template-columns: 1fr 1fr 32px;\n gap: 6px;\n margin-bottom: 6px;\n align-items: center;\n }\n .attr-row .input { padding: 5px 8px; font-size: 13px; }\n .attr-row button { padding: 4px 8px; }\n\n /* Toast */\n .toast {\n position: fixed;\n bottom: 24px;\n right: 24px;\n background: var(--bg-2);\n border: 1px solid var(--border-2);\n border-left: 3px solid var(--accent);\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 13px;\n box-shadow: 0 8px 24px rgba(0,0,0,0.4);\n z-index: 200;\n max-width: 360px;\n }\n .toast.success { border-left-color: var(--green); }\n .toast.error { border-left-color: var(--red); }\n\n /* Spinner */\n .spinner {\n display: inline-block;\n width: 12px;\n height: 12px;\n border: 2px solid var(--border-2);\n border-top-color: var(--accent);\n border-radius: 50%;\n animation: spin 0.6s linear infinite;\n }\n @keyframes spin { to { transform: rotate(360deg); } }\n\n /* Header pool select */\n .pool-select {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .pool-select label { font-size: 12px; color: var(--text-3); }\n\n /* Status dot */\n .dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n margin-right: 5px;\n vertical-align: middle;\n }\n .dot.green { background: var(--green); }\n .dot.yellow { background: var(--yellow); }\n .dot.red { background: var(--red); }\n .dot.gray { background: var(--text-3); }\n</style>\n</head>\n<body>\n<header>\n <h1>\uD83D\uDC65 Cognito Users</h1>\n <span class=\"meta\" id=\"ctx-label\">loading\u2026</span>\n <div class=\"spacer\"></div>\n <div class=\"pool-select\" id=\"pool-select\" hidden>\n <label for=\"pool\">Pool</label>\n <select id=\"pool\"></select>\n </div>\n <button id=\"btn-refresh\" title=\"Refresh (R)\">\u21BB</button>\n <button class=\"primary\" id=\"btn-create\">+ Create user</button>\n</header>\n\n<main>\n <div id=\"banner-slot\"></div>\n <div class=\"toolbar\">\n <input class=\"input grow\" id=\"search\" placeholder=\"Search by email, sub, or attribute\u2026\" />\n <span class=\"meta mono\" id=\"count\">\u2014</span>\n </div>\n\n <div class=\"users\" id=\"users\">\n <div class=\"empty\"><div class=\"spinner\"></div></div>\n </div>\n</main>\n\n<div id=\"modal-slot\"></div>\n<div id=\"toast-slot\"></div>\n\n<script>\n(() => {\n // \u2500\u2500 State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const state = {\n project: '',\n intents: [],\n pools: {},\n selectedIntent: null,\n customAttributes: [],\n users: [],\n filter: '',\n };\n\n // \u2500\u2500 DOM helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const $ = (id) => document.getElementById(id);\n const el = (tag, attrs = {}, ...kids) => {\n const e = document.createElement(tag);\n for (const [k, v] of Object.entries(attrs)) {\n if (k === 'class') e.className = v;\n else if (k === 'html') e.innerHTML = v;\n else if (k.startsWith('on') && typeof v === 'function') e.addEventListener(k.slice(2), v);\n else if (v === true) e.setAttribute(k, '');\n else if (v !== false && v != null) e.setAttribute(k, String(v));\n }\n for (const kid of kids) {\n if (kid == null) continue;\n e.appendChild(typeof kid === 'string' ? document.createTextNode(kid) : kid);\n }\n return e;\n };\n const escapeHtml = (s) => String(s ?? '').replace(/[&<>\"']/g, (c) => ({\n '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''',\n }[c]));\n\n // \u2500\u2500 HTTP \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n async function api(path, opts = {}) {\n const res = await fetch(path, {\n headers: { 'Content-Type': 'application/json' },\n ...opts,\n body: opts.body ? JSON.stringify(opts.body) : undefined,\n });\n const text = await res.text();\n let data;\n try { data = text ? JSON.parse(text) : {}; } catch { data = { raw: text }; }\n if (!res.ok) {\n const msg = data?.error?.message || data?.message || `HTTP ${res.status}`;\n const err = new Error(msg);\n err.code = data?.error?.code;\n err.status = res.status;\n throw err;\n }\n return data;\n }\n\n // \u2500\u2500 Toasts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n let toastTimer = null;\n function toast(msg, kind = 'info') {\n clearTimeout(toastTimer);\n const slot = $('toast-slot');\n slot.innerHTML = '';\n const t = el('div', { class: `toast ${kind}` }, msg);\n slot.appendChild(t);\n toastTimer = setTimeout(() => { slot.innerHTML = ''; }, kind === 'error' ? 6000 : 2500);\n }\n\n // \u2500\u2500 Banner \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n function setBanner(msg, kind = 'warn') {\n const slot = $('banner-slot');\n if (!msg) { slot.innerHTML = ''; return; }\n slot.innerHTML = '';\n slot.appendChild(el('div', { class: `banner ${kind === 'error' ? 'error' : ''}` }, msg));\n }\n\n // \u2500\u2500 Pools / users loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n async function loadPools() {\n try {\n const data = await api('/_dev/cognito/pools');\n state.project = data.project;\n state.intents = data.intents || [];\n state.pools = data.pools || {};\n $('ctx-label').textContent = `${data.project} \u00B7 endpoint ${data.endpoint || '\u2014'}`;\n\n // Pool selector\n const sel = $('pool');\n const intentIds = state.intents.map((i) => i.id);\n const wrap = $('pool-select');\n if (intentIds.length > 1) {\n wrap.hidden = false;\n sel.innerHTML = '';\n for (const id of intentIds) {\n sel.appendChild(el('option', { value: id }, id));\n }\n if (!state.selectedIntent || !intentIds.includes(state.selectedIntent)) {\n state.selectedIntent = intentIds[0];\n }\n sel.value = state.selectedIntent;\n } else {\n wrap.hidden = true;\n state.selectedIntent = intentIds[0] || null;\n }\n\n // Custom attributes for the selected intent (drives the create modal).\n const intent = state.intents.find((i) => i.id === state.selectedIntent);\n state.customAttributes = intent?.customAttributes || [];\n\n if (!state.selectedIntent) {\n setBanner('No auth intent declared in vk.config.ts. Add an `auth` intent and restart `vk dev`.', 'error');\n renderUsers([]);\n return;\n }\n const pool = state.pools[state.selectedIntent];\n if (!pool) {\n setBanner(`No cognito-local pool provisioned for intent \"${state.selectedIntent}\". Run \\`vk dev\\` first.`, 'error');\n renderUsers([]);\n return;\n }\n setBanner('');\n } catch (err) {\n setBanner(`Failed to load pools: ${err.message}`, 'error');\n throw err;\n }\n }\n\n async function loadUsers() {\n if (!state.selectedIntent) return;\n try {\n const data = await api(`/_dev/cognito/users?intent=${encodeURIComponent(state.selectedIntent)}`);\n state.users = data.users || [];\n renderUsers(state.users);\n } catch (err) {\n setBanner(`Failed to list users: ${err.message}`, 'error');\n renderUsers([]);\n }\n }\n\n // \u2500\u2500 Render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n function attrMap(attrs) {\n const m = {};\n for (const a of attrs || []) m[a.Name] = a.Value;\n return m;\n }\n\n function statusBadge(u) {\n const status = u.UserStatus || 'UNKNOWN';\n const enabled = u.Enabled !== false;\n if (!enabled) return el('span', { class: 'badge red' }, '\u25CF DISABLED');\n if (status === 'CONFIRMED') return el('span', { class: 'badge green' }, '\u25CF CONFIRMED');\n if (status === 'FORCE_CHANGE_PASSWORD') return el('span', { class: 'badge yellow' }, '\u25CF PASSWORD RESET REQUIRED');\n if (status === 'RESET_REQUIRED') return el('span', { class: 'badge yellow' }, '\u25CF RESET REQUIRED');\n if (status === 'UNCONFIRMED') return el('span', { class: 'badge yellow' }, '\u25CF UNCONFIRMED');\n return el('span', { class: 'badge gray' }, '\u25CF ' + status);\n }\n\n function timeAgo(iso) {\n if (!iso) return '\u2014';\n const ms = Date.now() - new Date(iso).getTime();\n if (ms < 60000) return 'just now';\n if (ms < 3600000) return Math.round(ms / 60000) + 'm ago';\n if (ms < 86400000) return Math.round(ms / 3600000) + 'h ago';\n return Math.round(ms / 86400000) + 'd ago';\n }\n\n function userMatchesFilter(u, q) {\n if (!q) return true;\n const lo = q.toLowerCase();\n if ((u.Username || '').toLowerCase().includes(lo)) return true;\n for (const a of u.Attributes || []) {\n if ((a.Value || '').toLowerCase().includes(lo)) return true;\n if ((a.Name || '').toLowerCase().includes(lo)) return true;\n }\n return false;\n }\n\n function renderUsers(users) {\n const root = $('users');\n root.innerHTML = '';\n\n const filtered = users.filter((u) => userMatchesFilter(u, state.filter));\n $('count').textContent = users.length === 0\n ? 'no users'\n : filtered.length === users.length\n ? `${users.length} user${users.length === 1 ? '' : 's'}`\n : `${filtered.length} of ${users.length}`;\n\n if (users.length === 0) {\n root.appendChild(el('div', { class: 'empty' },\n el('h3', {}, 'No users yet'),\n el('div', {}, 'Click ', el('code', {}, '+ Create user'), ' to add the first one.'),\n ));\n return;\n }\n\n if (filtered.length === 0) {\n root.appendChild(el('div', { class: 'empty' }, 'No users match your filter.'));\n return;\n }\n\n root.appendChild(\n el('div', { class: 'user-row head' },\n el('div', {}, 'User'),\n el('div', {}, 'Status'),\n el('div', {}, 'Created'),\n el('div', { style: 'text-align:right' }, 'Actions'),\n ),\n );\n\n for (const u of filtered) {\n const m = attrMap(u.Attributes);\n const email = m['email'] || u.Username;\n const created = u.UserCreateDate ? new Date(u.UserCreateDate).toLocaleString() : '\u2014';\n\n // Custom attrs (the ones devs care about \u2014 `custom:tenantId`,\n // `custom:role`, `email_verified`, etc.) shown as small pills.\n const attrPills = [];\n for (const a of u.Attributes || []) {\n if (a.Name === 'sub') continue;\n if (a.Name === 'email') continue; // already in header\n attrPills.push(\n el('span', { class: 'attr-pill' },\n el('span', { class: 'k' }, a.Name + ' = '),\n el('span', { class: 'v' }, a.Value || ''),\n ),\n );\n }\n\n const userCol = el('div', {},\n el('div', { class: 'email' }, email),\n el('div', { class: 'sub mono' }, 'sub: ' + (u.Username || '')),\n attrPills.length > 0 ? el('div', { class: 'attrs' }, ...attrPills) : null,\n );\n\n const actions = el('div', { class: 'actions' },\n el('button', { class: 'ghost', title: 'Set password',\n onclick: () => openSetPasswordModal(u) }, '\uD83D\uDD11'),\n el('button', { class: 'ghost', title: 'Edit attributes',\n onclick: () => openSetAttributesModal(u) }, '\u270E'),\n u.Enabled === false\n ? el('button', { class: 'ghost', title: 'Enable',\n onclick: () => doAction(u, 'enable', 'Enabled') }, '\u25B6')\n : el('button', { class: 'ghost', title: 'Disable',\n onclick: () => doAction(u, 'disable', 'Disabled') }, '\u23F8'),\n u.UserStatus === 'UNCONFIRMED'\n ? el('button', { class: 'ghost', title: 'Confirm',\n onclick: () => doAction(u, 'confirm', 'Confirmed') }, '\u2713')\n : null,\n el('button', { class: 'danger', title: 'Delete',\n onclick: () => doDelete(u) }, '\u00D7'),\n );\n\n root.appendChild(\n el('div', { class: 'user-row' },\n userCol,\n el('div', {}, statusBadge(u)),\n el('div', { title: created }, timeAgo(u.UserCreateDate)),\n actions,\n ),\n );\n }\n }\n\n // \u2500\u2500 Actions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n async function doAction(u, op, label) {\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}/${op}?intent=${encodeURIComponent(state.selectedIntent)}`, { method: 'POST' });\n toast(`${label} ${u.Username}`, 'success');\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n }\n\n async function doDelete(u) {\n const m = attrMap(u.Attributes);\n const label = m['email'] || u.Username;\n if (!confirm(`Delete user \"${label}\"?\\n\\nThis cannot be undone.`)) return;\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}?intent=${encodeURIComponent(state.selectedIntent)}`, { method: 'DELETE' });\n toast(`Deleted ${label}`, 'success');\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n }\n\n // \u2500\u2500 Modals \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n function closeModal() { $('modal-slot').innerHTML = ''; }\n\n function openModal(node) {\n const slot = $('modal-slot');\n slot.innerHTML = '';\n slot.appendChild(el('div', { class: 'modal-bg', onclick: (e) => {\n if (e.target.classList.contains('modal-bg')) closeModal();\n } }, node));\n setTimeout(() => {\n const first = node.querySelector('input, select, textarea, button');\n if (first) first.focus();\n }, 0);\n }\n\n function openCreateModal() {\n if (!state.selectedIntent) {\n toast('No pool available. Start `vk dev` first.', 'error');\n return;\n }\n const emailInput = el('input', { class: 'input', type: 'email', required: true, placeholder: 'admin@example.com' });\n const pwInput = el('input', { class: 'input', type: 'text', required: true, placeholder: 'Permanent password (set immediately)' });\n\n // Pre-fill rows for declared customAttributes (strip 'custom:' prefix\n // when user types \u2014 we add it back on submit).\n const attrsHost = el('div', {});\n function addAttrRow(name = '', value = '') {\n const nameInput = el('input', { class: 'input', placeholder: 'attribute (e.g. tenantId)', value: name });\n const valueInput = el('input', { class: 'input', placeholder: 'value', value });\n const rmBtn = el('button', { class: 'ghost', onclick: () => row.remove(), title: 'Remove' }, '\u00D7');\n const row = el('div', { class: 'attr-row' }, nameInput, valueInput, rmBtn);\n attrsHost.appendChild(row);\n }\n if (state.customAttributes.length > 0) {\n for (const a of state.customAttributes) addAttrRow(a, '');\n } else {\n addAttrRow();\n }\n\n const modal = el('div', { class: 'modal' },\n el('h2', {}, 'Create user'),\n el('div', { class: 'sub' }, `Pool: ${state.pools[state.selectedIntent]?.userPoolId || '\u2014'}`),\n\n el('div', { class: 'field' }, el('label', {}, 'Email'), emailInput),\n el('div', { class: 'field' }, el('label', {}, 'Password'), pwInput),\n el('div', { class: 'field' },\n el('label', {}, 'Custom attributes (without the \"custom:\" prefix)'),\n attrsHost,\n el('button', { class: 'ghost', onclick: () => addAttrRow() }, '+ Add attribute'),\n ),\n el('div', { class: 'actions' },\n el('button', { onclick: closeModal }, 'Cancel'),\n el('button', { class: 'primary', onclick: async () => {\n const email = emailInput.value.trim();\n const password = pwInput.value;\n if (!email || !password) { toast('Email and password are required', 'error'); return; }\n const attrs = {};\n for (const row of attrsHost.children) {\n const [n, v] = row.querySelectorAll('input');\n const name = n.value.trim();\n if (!name) continue;\n attrs[name] = v.value;\n }\n try {\n await api(`/_dev/cognito/users?intent=${encodeURIComponent(state.selectedIntent)}`, {\n method: 'POST',\n body: { email, password, attributes: attrs },\n });\n toast(`Created ${email}`, 'success');\n closeModal();\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n } }, 'Create'),\n ),\n );\n openModal(modal);\n }\n\n function openSetPasswordModal(u) {\n const m = attrMap(u.Attributes);\n const label = m['email'] || u.Username;\n const pwInput = el('input', { class: 'input', type: 'text', placeholder: 'New password', required: true });\n const permanentInput = el('input', { type: 'checkbox', checked: true, id: 'permanent-cb' });\n\n const modal = el('div', { class: 'modal' },\n el('h2', {}, 'Set password'),\n el('div', { class: 'sub' }, label),\n el('div', { class: 'field' }, el('label', {}, 'New password'), pwInput),\n el('div', { class: 'field' },\n el('label', { for: 'permanent-cb' },\n permanentInput,\n ' Permanent (skip FORCE_CHANGE_PASSWORD)',\n ),\n ),\n el('div', { class: 'actions' },\n el('button', { onclick: closeModal }, 'Cancel'),\n el('button', { class: 'primary', onclick: async () => {\n const password = pwInput.value;\n if (!password) { toast('Password is required', 'error'); return; }\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}/password?intent=${encodeURIComponent(state.selectedIntent)}`, {\n method: 'POST',\n body: { password, permanent: permanentInput.checked },\n });\n toast('Password updated', 'success');\n closeModal();\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n } }, 'Set password'),\n ),\n );\n openModal(modal);\n }\n\n function openSetAttributesModal(u) {\n const m = attrMap(u.Attributes);\n const label = m['email'] || u.Username;\n const attrsHost = el('div', {});\n function addAttrRow(name = '', value = '') {\n const nameInput = el('input', { class: 'input', placeholder: 'attribute', value: name });\n const valueInput = el('input', { class: 'input', placeholder: 'value', value });\n const rmBtn = el('button', { class: 'ghost', onclick: () => row.remove(), title: 'Remove' }, '\u00D7');\n const row = el('div', { class: 'attr-row' }, nameInput, valueInput, rmBtn);\n attrsHost.appendChild(row);\n }\n\n // Pre-load existing custom: attributes so the user sees + can edit\n // what's currently set. Stripping the prefix mirrors what the create\n // modal does so the round-trip is symmetric.\n const seen = new Set();\n for (const a of u.Attributes || []) {\n if (a.Name && a.Name.startsWith('custom:')) {\n const name = a.Name.slice('custom:'.length);\n seen.add(name);\n addAttrRow(name, a.Value || '');\n }\n }\n for (const a of state.customAttributes) {\n if (!seen.has(a)) addAttrRow(a, '');\n }\n if (attrsHost.children.length === 0) addAttrRow();\n\n const modal = el('div', { class: 'modal' },\n el('h2', {}, 'Edit attributes'),\n el('div', { class: 'sub' }, label),\n el('div', { class: 'field' },\n el('label', {}, 'Custom attributes (without the \"custom:\" prefix). Leave value blank to clear.'),\n attrsHost,\n el('button', { class: 'ghost', onclick: () => addAttrRow() }, '+ Add attribute'),\n ),\n el('div', { class: 'actions' },\n el('button', { onclick: closeModal }, 'Cancel'),\n el('button', { class: 'primary', onclick: async () => {\n const attrs = {};\n for (const row of attrsHost.children) {\n const [n, v] = row.querySelectorAll('input');\n const name = n.value.trim();\n if (!name) continue;\n attrs[name] = v.value;\n }\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}/attributes?intent=${encodeURIComponent(state.selectedIntent)}`, {\n method: 'POST',\n body: { attributes: attrs },\n });\n toast('Attributes updated', 'success');\n closeModal();\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n } }, 'Save'),\n ),\n );\n openModal(modal);\n }\n\n // \u2500\u2500 Wire up \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n $('btn-refresh').addEventListener('click', async () => {\n await loadPools();\n await loadUsers();\n });\n $('btn-create').addEventListener('click', openCreateModal);\n $('pool').addEventListener('change', async (e) => {\n state.selectedIntent = e.target.value;\n const intent = state.intents.find((i) => i.id === state.selectedIntent);\n state.customAttributes = intent?.customAttributes || [];\n await loadUsers();\n });\n $('search').addEventListener('input', (e) => {\n state.filter = e.target.value;\n renderUsers(state.users);\n });\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') closeModal();\n if (e.key === 'r' && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') {\n $('btn-refresh').click();\n }\n });\n\n // \u2500\u2500 Boot \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n (async () => {\n try {\n await loadPools();\n await loadUsers();\n } catch {\n // Errors already shown in banner.\n }\n })();\n})();\n</script>\n</body>\n</html>\n";
|
|
17
|
+
export declare const COGNITO_UI_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n<title>Cognito Users \u00B7 VentureKit dev</title>\n<style>\n :root {\n --bg: #0b0d10;\n --bg-2: #11151a;\n --bg-3: #1a2029;\n --border: #232a35;\n --border-2: #2e3744;\n --text: #e6edf3;\n --text-2: #9aa7b4;\n --text-3: #6b7785;\n --accent: #4f9eff;\n --accent-2: #2563eb;\n --green: #2ecc71;\n --yellow: #f5c542;\n --red: #ff5d5d;\n --orange: #ff9933;\n }\n * { box-sizing: border-box; }\n html, body { height: 100%; }\n body {\n margin: 0;\n font: 14px/1.45 -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n color: var(--text);\n background: var(--bg);\n }\n a { color: var(--accent); text-decoration: none; }\n a:hover { text-decoration: underline; }\n code, .mono { font-family: ui-monospace, \"SF Mono\", Menlo, Consolas, monospace; }\n\n header {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 14px 24px;\n border-bottom: 1px solid var(--border);\n background: var(--bg-2);\n }\n header h1 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0.2px;\n }\n header .meta {\n color: var(--text-3);\n font-size: 12px;\n }\n header .spacer { flex: 1; }\n\n main { padding: 24px; max-width: 1200px; margin: 0 auto; }\n\n .toolbar {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 16px;\n flex-wrap: wrap;\n }\n .toolbar .grow { flex: 1; min-width: 200px; }\n\n .input, select, button {\n font: inherit;\n color: var(--text);\n background: var(--bg-2);\n border: 1px solid var(--border);\n border-radius: 6px;\n padding: 7px 10px;\n outline: none;\n }\n .input:focus, select:focus { border-color: var(--accent); }\n .input { width: 100%; }\n button {\n cursor: pointer;\n transition: border-color 0.12s, background 0.12s;\n }\n button:hover { border-color: var(--border-2); background: var(--bg-3); }\n button.primary {\n background: var(--accent-2);\n border-color: var(--accent-2);\n color: white;\n }\n button.primary:hover { background: #1d4ed8; border-color: #1d4ed8; }\n button.danger {\n color: var(--red);\n border-color: #3a2226;\n background: #1a1416;\n }\n button.danger:hover { background: #2b1a1d; }\n button.ghost {\n background: transparent;\n border-color: transparent;\n color: var(--text-2);\n padding: 4px 8px;\n }\n button.ghost:hover {\n color: var(--text);\n background: var(--bg-3);\n border-color: var(--border);\n }\n button:disabled { opacity: 0.5; cursor: not-allowed; }\n\n /* Users table */\n .users {\n background: var(--bg-2);\n border: 1px solid var(--border);\n border-radius: 8px;\n overflow: hidden;\n }\n .user-row {\n display: grid;\n grid-template-columns: 1fr 140px 160px 220px;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-bottom: 1px solid var(--border);\n }\n .user-row:last-child { border-bottom: 0; }\n .user-row.head {\n background: var(--bg-3);\n color: var(--text-3);\n font-size: 12px;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n padding: 10px 16px;\n }\n .user-row.expanded { background: #0f1418; }\n .user-row .email { font-weight: 500; }\n .user-row .sub { color: var(--text-3); font-size: 12px; }\n .user-row .actions {\n display: flex;\n gap: 6px;\n justify-content: flex-end;\n }\n\n .badge {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.3px;\n border: 1px solid var(--border);\n background: var(--bg-3);\n color: var(--text-2);\n }\n .badge.green { color: var(--green); border-color: #1f3a2a; background: #0f1f17; }\n .badge.yellow { color: var(--yellow); border-color: #3a311a; background: #1f1a0f; }\n .badge.red { color: var(--red); border-color: #3a2222; background: #1f0f0f; }\n .badge.gray { color: var(--text-3); }\n\n .attrs {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: 8px;\n }\n .attr-pill {\n font-size: 11px;\n color: var(--text-2);\n background: var(--bg-3);\n border: 1px solid var(--border);\n padding: 2px 8px;\n border-radius: 4px;\n font-family: ui-monospace, \"SF Mono\", Menlo, Consolas, monospace;\n }\n .attr-pill .k { color: var(--text-3); }\n .attr-pill .v { color: var(--text); }\n\n .empty {\n padding: 60px 24px;\n text-align: center;\n color: var(--text-3);\n }\n .empty h3 { margin: 0 0 8px; color: var(--text-2); font-weight: 500; }\n .empty code {\n background: var(--bg-3);\n padding: 2px 6px;\n border-radius: 4px;\n color: var(--text);\n }\n\n /* Banner */\n .banner {\n background: #1f1a0f;\n border: 1px solid #3a311a;\n border-left-width: 3px;\n color: var(--yellow);\n padding: 12px 14px;\n border-radius: 6px;\n margin-bottom: 16px;\n font-size: 13px;\n }\n .banner.error {\n background: #1f0f0f;\n border-color: #3a2222;\n color: var(--red);\n }\n\n /* Modal */\n .modal-bg {\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n z-index: 100;\n }\n .modal {\n background: var(--bg-2);\n border: 1px solid var(--border-2);\n border-radius: 10px;\n padding: 20px;\n width: 100%;\n max-width: 520px;\n max-height: 90vh;\n overflow: auto;\n }\n .modal h2 {\n margin: 0 0 4px;\n font-size: 15px;\n font-weight: 600;\n }\n .modal .sub {\n color: var(--text-3);\n font-size: 12px;\n margin-bottom: 16px;\n }\n .field { margin-bottom: 12px; }\n .field label {\n display: block;\n font-size: 12px;\n color: var(--text-2);\n margin-bottom: 4px;\n }\n .modal .actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n margin-top: 18px;\n }\n .attr-row {\n display: grid;\n grid-template-columns: 1fr 1fr 32px;\n gap: 6px;\n margin-bottom: 6px;\n align-items: center;\n }\n .attr-row .input { padding: 5px 8px; font-size: 13px; }\n .attr-row button { padding: 4px 8px; }\n\n /* Toast */\n .toast {\n position: fixed;\n bottom: 24px;\n right: 24px;\n background: var(--bg-2);\n border: 1px solid var(--border-2);\n border-left: 3px solid var(--accent);\n padding: 10px 14px;\n border-radius: 6px;\n font-size: 13px;\n box-shadow: 0 8px 24px rgba(0,0,0,0.4);\n z-index: 200;\n max-width: 360px;\n }\n .toast.success { border-left-color: var(--green); }\n .toast.error { border-left-color: var(--red); }\n\n /* Spinner */\n .spinner {\n display: inline-block;\n width: 12px;\n height: 12px;\n border: 2px solid var(--border-2);\n border-top-color: var(--accent);\n border-radius: 50%;\n animation: spin 0.6s linear infinite;\n }\n @keyframes spin { to { transform: rotate(360deg); } }\n\n /* Header pool select.\n Use `:not([hidden])` so the `hidden` attribute toggled by\n loadPools() (when there's <= 1 auth intent) actually wins. A bare\n `display: flex` rule has higher specificity than the UA's\n `[hidden] { display: none }` and the dropdown would render\n visible-but-empty for single-intent projects. */\n .pool-select:not([hidden]) {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .pool-select label { font-size: 12px; color: var(--text-3); }\n\n /* Status dot */\n .dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n margin-right: 5px;\n vertical-align: middle;\n }\n .dot.green { background: var(--green); }\n .dot.yellow { background: var(--yellow); }\n .dot.red { background: var(--red); }\n .dot.gray { background: var(--text-3); }\n</style>\n</head>\n<body>\n<header>\n <h1>\uD83D\uDC65 Cognito Users</h1>\n <span class=\"meta\" id=\"ctx-label\">loading\u2026</span>\n <div class=\"spacer\"></div>\n <div class=\"pool-select\" id=\"pool-select\" hidden>\n <label for=\"pool\">Pool</label>\n <select id=\"pool\"></select>\n </div>\n <button id=\"btn-refresh\" title=\"Refresh (R)\">\u21BB</button>\n <button class=\"primary\" id=\"btn-create\">+ Create user</button>\n</header>\n\n<main>\n <div id=\"banner-slot\"></div>\n <div class=\"toolbar\">\n <input class=\"input grow\" id=\"search\" placeholder=\"Search by email, sub, or attribute\u2026\" />\n <span class=\"meta mono\" id=\"count\">\u2014</span>\n </div>\n\n <div class=\"users\" id=\"users\">\n <div class=\"empty\"><div class=\"spinner\"></div></div>\n </div>\n</main>\n\n<div id=\"modal-slot\"></div>\n<div id=\"toast-slot\"></div>\n\n<script>\n(() => {\n // \u2500\u2500 State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const state = {\n project: '',\n intents: [],\n pools: {},\n selectedIntent: null,\n customAttributes: [],\n users: [],\n filter: '',\n };\n\n // \u2500\u2500 DOM helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const $ = (id) => document.getElementById(id);\n const el = (tag, attrs = {}, ...kids) => {\n const e = document.createElement(tag);\n for (const [k, v] of Object.entries(attrs)) {\n if (k === 'class') e.className = v;\n else if (k === 'html') e.innerHTML = v;\n else if (k.startsWith('on') && typeof v === 'function') e.addEventListener(k.slice(2), v);\n else if (v === true) e.setAttribute(k, '');\n else if (v !== false && v != null) e.setAttribute(k, String(v));\n }\n for (const kid of kids) {\n if (kid == null) continue;\n e.appendChild(typeof kid === 'string' ? document.createTextNode(kid) : kid);\n }\n return e;\n };\n const escapeHtml = (s) => String(s ?? '').replace(/[&<>\"']/g, (c) => ({\n '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''',\n }[c]));\n\n // \u2500\u2500 HTTP \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n async function api(path, opts = {}) {\n const res = await fetch(path, {\n headers: { 'Content-Type': 'application/json' },\n ...opts,\n body: opts.body ? JSON.stringify(opts.body) : undefined,\n });\n const text = await res.text();\n let data;\n try { data = text ? JSON.parse(text) : {}; } catch { data = { raw: text }; }\n if (!res.ok) {\n const msg = data?.error?.message || data?.message || `HTTP ${res.status}`;\n const err = new Error(msg);\n err.code = data?.error?.code;\n err.status = res.status;\n throw err;\n }\n return data;\n }\n\n // \u2500\u2500 Toasts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n let toastTimer = null;\n function toast(msg, kind = 'info') {\n clearTimeout(toastTimer);\n const slot = $('toast-slot');\n slot.innerHTML = '';\n const t = el('div', { class: `toast ${kind}` }, msg);\n slot.appendChild(t);\n toastTimer = setTimeout(() => { slot.innerHTML = ''; }, kind === 'error' ? 6000 : 2500);\n }\n\n // \u2500\u2500 Banner \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n function setBanner(msg, kind = 'warn') {\n const slot = $('banner-slot');\n if (!msg) { slot.innerHTML = ''; return; }\n slot.innerHTML = '';\n slot.appendChild(el('div', { class: `banner ${kind === 'error' ? 'error' : ''}` }, msg));\n }\n\n // \u2500\u2500 Pools / users loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n async function loadPools() {\n try {\n const data = await api('/_dev/cognito/pools');\n state.project = data.project;\n state.intents = data.intents || [];\n state.pools = data.pools || {};\n $('ctx-label').textContent = `${data.project} \u00B7 endpoint ${data.endpoint || '\u2014'}`;\n\n // Pool selector\n const sel = $('pool');\n const intentIds = state.intents.map((i) => i.id);\n const wrap = $('pool-select');\n if (intentIds.length > 1) {\n wrap.hidden = false;\n sel.innerHTML = '';\n for (const id of intentIds) {\n sel.appendChild(el('option', { value: id }, id));\n }\n if (!state.selectedIntent || !intentIds.includes(state.selectedIntent)) {\n state.selectedIntent = intentIds[0];\n }\n sel.value = state.selectedIntent;\n } else {\n wrap.hidden = true;\n state.selectedIntent = intentIds[0] || null;\n }\n\n // Custom attributes for the selected intent (drives the create modal).\n const intent = state.intents.find((i) => i.id === state.selectedIntent);\n state.customAttributes = intent?.customAttributes || [];\n\n if (!state.selectedIntent) {\n setBanner('No auth intent declared in vk.config.ts. Add an `auth` intent and restart `vk dev`.', 'error');\n renderUsers([]);\n return;\n }\n const pool = state.pools[state.selectedIntent];\n if (!pool) {\n setBanner(`No cognito-local pool provisioned for intent \"${state.selectedIntent}\". Run \\`vk dev\\` first.`, 'error');\n renderUsers([]);\n return;\n }\n setBanner('');\n } catch (err) {\n setBanner(`Failed to load pools: ${err.message}`, 'error');\n throw err;\n }\n }\n\n async function loadUsers() {\n if (!state.selectedIntent) return;\n try {\n const data = await api(`/_dev/cognito/users?intent=${encodeURIComponent(state.selectedIntent)}`);\n state.users = data.users || [];\n renderUsers(state.users);\n } catch (err) {\n setBanner(`Failed to list users: ${err.message}`, 'error');\n renderUsers([]);\n }\n }\n\n // \u2500\u2500 Render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n function attrMap(attrs) {\n const m = {};\n for (const a of attrs || []) m[a.Name] = a.Value;\n return m;\n }\n\n function statusBadge(u) {\n const status = u.UserStatus || 'UNKNOWN';\n const enabled = u.Enabled !== false;\n if (!enabled) return el('span', { class: 'badge red' }, '\u25CF DISABLED');\n if (status === 'CONFIRMED') return el('span', { class: 'badge green' }, '\u25CF CONFIRMED');\n if (status === 'FORCE_CHANGE_PASSWORD') return el('span', { class: 'badge yellow' }, '\u25CF PASSWORD RESET REQUIRED');\n if (status === 'RESET_REQUIRED') return el('span', { class: 'badge yellow' }, '\u25CF RESET REQUIRED');\n if (status === 'UNCONFIRMED') return el('span', { class: 'badge yellow' }, '\u25CF UNCONFIRMED');\n return el('span', { class: 'badge gray' }, '\u25CF ' + status);\n }\n\n function timeAgo(iso) {\n if (!iso) return '\u2014';\n const ms = Date.now() - new Date(iso).getTime();\n if (ms < 60000) return 'just now';\n if (ms < 3600000) return Math.round(ms / 60000) + 'm ago';\n if (ms < 86400000) return Math.round(ms / 3600000) + 'h ago';\n return Math.round(ms / 86400000) + 'd ago';\n }\n\n function userMatchesFilter(u, q) {\n if (!q) return true;\n const lo = q.toLowerCase();\n if ((u.Username || '').toLowerCase().includes(lo)) return true;\n for (const a of u.Attributes || []) {\n if ((a.Value || '').toLowerCase().includes(lo)) return true;\n if ((a.Name || '').toLowerCase().includes(lo)) return true;\n }\n return false;\n }\n\n function renderUsers(users) {\n const root = $('users');\n root.innerHTML = '';\n\n const filtered = users.filter((u) => userMatchesFilter(u, state.filter));\n $('count').textContent = users.length === 0\n ? 'no users'\n : filtered.length === users.length\n ? `${users.length} user${users.length === 1 ? '' : 's'}`\n : `${filtered.length} of ${users.length}`;\n\n if (users.length === 0) {\n root.appendChild(el('div', { class: 'empty' },\n el('h3', {}, 'No users yet'),\n el('div', {}, 'Click ', el('code', {}, '+ Create user'), ' to add the first one.'),\n ));\n return;\n }\n\n if (filtered.length === 0) {\n root.appendChild(el('div', { class: 'empty' }, 'No users match your filter.'));\n return;\n }\n\n root.appendChild(\n el('div', { class: 'user-row head' },\n el('div', {}, 'User'),\n el('div', {}, 'Status'),\n el('div', {}, 'Created'),\n el('div', { style: 'text-align:right' }, 'Actions'),\n ),\n );\n\n for (const u of filtered) {\n const m = attrMap(u.Attributes);\n const email = m['email'] || u.Username;\n const created = u.UserCreateDate ? new Date(u.UserCreateDate).toLocaleString() : '\u2014';\n\n // Custom attrs (the ones devs care about \u2014 `custom:tenantId`,\n // `custom:role`, `email_verified`, etc.) shown as small pills.\n const attrPills = [];\n for (const a of u.Attributes || []) {\n if (a.Name === 'sub') continue;\n if (a.Name === 'email') continue; // already in header\n attrPills.push(\n el('span', { class: 'attr-pill' },\n el('span', { class: 'k' }, a.Name + ' = '),\n el('span', { class: 'v' }, a.Value || ''),\n ),\n );\n }\n\n const userCol = el('div', {},\n el('div', { class: 'email' }, email),\n el('div', { class: 'sub mono' }, 'sub: ' + (u.Username || '')),\n attrPills.length > 0 ? el('div', { class: 'attrs' }, ...attrPills) : null,\n );\n\n const actions = el('div', { class: 'actions' },\n el('button', { class: 'ghost', title: 'Set password',\n onclick: () => openSetPasswordModal(u) }, '\uD83D\uDD11'),\n el('button', { class: 'ghost', title: 'Edit attributes',\n onclick: () => openSetAttributesModal(u) }, '\u270E'),\n u.Enabled === false\n ? el('button', { class: 'ghost', title: 'Enable',\n onclick: () => doAction(u, 'enable', 'Enabled') }, '\u25B6')\n : el('button', { class: 'ghost', title: 'Disable',\n onclick: () => doAction(u, 'disable', 'Disabled') }, '\u23F8'),\n u.UserStatus === 'UNCONFIRMED'\n ? el('button', { class: 'ghost', title: 'Confirm',\n onclick: () => doAction(u, 'confirm', 'Confirmed') }, '\u2713')\n : null,\n el('button', { class: 'danger', title: 'Delete',\n onclick: () => doDelete(u) }, '\u00D7'),\n );\n\n root.appendChild(\n el('div', { class: 'user-row' },\n userCol,\n el('div', {}, statusBadge(u)),\n el('div', { title: created }, timeAgo(u.UserCreateDate)),\n actions,\n ),\n );\n }\n }\n\n // \u2500\u2500 Actions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n async function doAction(u, op, label) {\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}/${op}?intent=${encodeURIComponent(state.selectedIntent)}`, { method: 'POST' });\n toast(`${label} ${u.Username}`, 'success');\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n }\n\n async function doDelete(u) {\n const m = attrMap(u.Attributes);\n const label = m['email'] || u.Username;\n if (!confirm(`Delete user \"${label}\"?\\n\\nThis cannot be undone.`)) return;\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}?intent=${encodeURIComponent(state.selectedIntent)}`, { method: 'DELETE' });\n toast(`Deleted ${label}`, 'success');\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n }\n\n // \u2500\u2500 Modals \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n function closeModal() { $('modal-slot').innerHTML = ''; }\n\n function openModal(node) {\n const slot = $('modal-slot');\n slot.innerHTML = '';\n slot.appendChild(el('div', { class: 'modal-bg', onclick: (e) => {\n if (e.target.classList.contains('modal-bg')) closeModal();\n } }, node));\n setTimeout(() => {\n const first = node.querySelector('input, select, textarea, button');\n if (first) first.focus();\n }, 0);\n }\n\n function openCreateModal() {\n if (!state.selectedIntent) {\n toast('No pool available. Start `vk dev` first.', 'error');\n return;\n }\n const emailInput = el('input', { class: 'input', type: 'email', required: true, placeholder: 'admin@example.com' });\n const pwInput = el('input', { class: 'input', type: 'text', required: true, placeholder: 'Permanent password (set immediately)' });\n\n // Pre-fill rows for declared customAttributes (strip 'custom:' prefix\n // when user types \u2014 we add it back on submit).\n const attrsHost = el('div', {});\n function addAttrRow(name = '', value = '') {\n const nameInput = el('input', { class: 'input', placeholder: 'attribute (e.g. tenantId)', value: name });\n const valueInput = el('input', { class: 'input', placeholder: 'value', value });\n const rmBtn = el('button', { class: 'ghost', onclick: () => row.remove(), title: 'Remove' }, '\u00D7');\n const row = el('div', { class: 'attr-row' }, nameInput, valueInput, rmBtn);\n attrsHost.appendChild(row);\n }\n if (state.customAttributes.length > 0) {\n for (const a of state.customAttributes) addAttrRow(a, '');\n } else {\n addAttrRow();\n }\n\n const modal = el('div', { class: 'modal' },\n el('h2', {}, 'Create user'),\n el('div', { class: 'sub' }, `Pool: ${state.pools[state.selectedIntent]?.userPoolId || '\u2014'}`),\n\n el('div', { class: 'field' }, el('label', {}, 'Email'), emailInput),\n el('div', { class: 'field' }, el('label', {}, 'Password'), pwInput),\n el('div', { class: 'field' },\n el('label', {}, 'Custom attributes (without the \"custom:\" prefix)'),\n attrsHost,\n el('button', { class: 'ghost', onclick: () => addAttrRow() }, '+ Add attribute'),\n ),\n el('div', { class: 'actions' },\n el('button', { onclick: closeModal }, 'Cancel'),\n el('button', { class: 'primary', onclick: async () => {\n const email = emailInput.value.trim();\n const password = pwInput.value;\n if (!email || !password) { toast('Email and password are required', 'error'); return; }\n const attrs = {};\n for (const row of attrsHost.children) {\n const [n, v] = row.querySelectorAll('input');\n const name = n.value.trim();\n if (!name) continue;\n attrs[name] = v.value;\n }\n try {\n await api(`/_dev/cognito/users?intent=${encodeURIComponent(state.selectedIntent)}`, {\n method: 'POST',\n body: { email, password, attributes: attrs },\n });\n toast(`Created ${email}`, 'success');\n closeModal();\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n } }, 'Create'),\n ),\n );\n openModal(modal);\n }\n\n function openSetPasswordModal(u) {\n const m = attrMap(u.Attributes);\n const label = m['email'] || u.Username;\n const pwInput = el('input', { class: 'input', type: 'text', placeholder: 'New password', required: true });\n const permanentInput = el('input', { type: 'checkbox', checked: true, id: 'permanent-cb' });\n\n const modal = el('div', { class: 'modal' },\n el('h2', {}, 'Set password'),\n el('div', { class: 'sub' }, label),\n el('div', { class: 'field' }, el('label', {}, 'New password'), pwInput),\n el('div', { class: 'field' },\n el('label', { for: 'permanent-cb' },\n permanentInput,\n ' Permanent (skip FORCE_CHANGE_PASSWORD)',\n ),\n ),\n el('div', { class: 'actions' },\n el('button', { onclick: closeModal }, 'Cancel'),\n el('button', { class: 'primary', onclick: async () => {\n const password = pwInput.value;\n if (!password) { toast('Password is required', 'error'); return; }\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}/password?intent=${encodeURIComponent(state.selectedIntent)}`, {\n method: 'POST',\n body: { password, permanent: permanentInput.checked },\n });\n toast('Password updated', 'success');\n closeModal();\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n } }, 'Set password'),\n ),\n );\n openModal(modal);\n }\n\n function openSetAttributesModal(u) {\n const m = attrMap(u.Attributes);\n const label = m['email'] || u.Username;\n const attrsHost = el('div', {});\n function addAttrRow(name = '', value = '') {\n const nameInput = el('input', { class: 'input', placeholder: 'attribute', value: name });\n const valueInput = el('input', { class: 'input', placeholder: 'value', value });\n const rmBtn = el('button', { class: 'ghost', onclick: () => row.remove(), title: 'Remove' }, '\u00D7');\n const row = el('div', { class: 'attr-row' }, nameInput, valueInput, rmBtn);\n attrsHost.appendChild(row);\n }\n\n // Pre-load existing custom: attributes so the user sees + can edit\n // what's currently set. Stripping the prefix mirrors what the create\n // modal does so the round-trip is symmetric.\n const seen = new Set();\n for (const a of u.Attributes || []) {\n if (a.Name && a.Name.startsWith('custom:')) {\n const name = a.Name.slice('custom:'.length);\n seen.add(name);\n addAttrRow(name, a.Value || '');\n }\n }\n for (const a of state.customAttributes) {\n if (!seen.has(a)) addAttrRow(a, '');\n }\n if (attrsHost.children.length === 0) addAttrRow();\n\n const modal = el('div', { class: 'modal' },\n el('h2', {}, 'Edit attributes'),\n el('div', { class: 'sub' }, label),\n el('div', { class: 'field' },\n el('label', {}, 'Custom attributes (without the \"custom:\" prefix). Leave value blank to clear.'),\n attrsHost,\n el('button', { class: 'ghost', onclick: () => addAttrRow() }, '+ Add attribute'),\n ),\n el('div', { class: 'actions' },\n el('button', { onclick: closeModal }, 'Cancel'),\n el('button', { class: 'primary', onclick: async () => {\n const attrs = {};\n for (const row of attrsHost.children) {\n const [n, v] = row.querySelectorAll('input');\n const name = n.value.trim();\n if (!name) continue;\n attrs[name] = v.value;\n }\n try {\n await api(`/_dev/cognito/users/${encodeURIComponent(u.Username)}/attributes?intent=${encodeURIComponent(state.selectedIntent)}`, {\n method: 'POST',\n body: { attributes: attrs },\n });\n toast('Attributes updated', 'success');\n closeModal();\n await loadUsers();\n } catch (err) {\n toast(err.message, 'error');\n }\n } }, 'Save'),\n ),\n );\n openModal(modal);\n }\n\n // \u2500\u2500 Wire up \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n $('btn-refresh').addEventListener('click', async () => {\n await loadPools();\n await loadUsers();\n });\n $('btn-create').addEventListener('click', openCreateModal);\n $('pool').addEventListener('change', async (e) => {\n state.selectedIntent = e.target.value;\n const intent = state.intents.find((i) => i.id === state.selectedIntent);\n state.customAttributes = intent?.customAttributes || [];\n await loadUsers();\n });\n $('search').addEventListener('input', (e) => {\n state.filter = e.target.value;\n renderUsers(state.users);\n });\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') closeModal();\n if (e.key === 'r' && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') {\n $('btn-refresh').click();\n }\n });\n\n // \u2500\u2500 Boot \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n (async () => {\n try {\n await loadPools();\n await loadUsers();\n } catch {\n // Errors already shown in banner.\n }\n })();\n})();\n</script>\n</body>\n</html>\n";
|
|
18
18
|
//# sourceMappingURL=dev-cognito-ui-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-cognito-ui-page.d.ts","sourceRoot":"","sources":["../../src/utils/dev-cognito-ui-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"dev-cognito-ui-page.d.ts","sourceRoot":"","sources":["../../src/utils/dev-cognito-ui-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,eAAe,ov9BA60B3B,CAAC"}
|
|
@@ -302,8 +302,13 @@ export const COGNITO_UI_HTML = `<!doctype html>
|
|
|
302
302
|
}
|
|
303
303
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
304
304
|
|
|
305
|
-
/* Header pool select
|
|
306
|
-
|
|
305
|
+
/* Header pool select.
|
|
306
|
+
Use \`:not([hidden])\` so the \`hidden\` attribute toggled by
|
|
307
|
+
loadPools() (when there's <= 1 auth intent) actually wins. A bare
|
|
308
|
+
\`display: flex\` rule has higher specificity than the UA's
|
|
309
|
+
\`[hidden] { display: none }\` and the dropdown would render
|
|
310
|
+
visible-but-empty for single-intent projects. */
|
|
311
|
+
.pool-select:not([hidden]) {
|
|
307
312
|
display: flex;
|
|
308
313
|
align-items: center;
|
|
309
314
|
gap: 6px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-cognito-ui-page.js","sourceRoot":"","sources":["../../src/utils/dev-cognito-ui-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG
|
|
1
|
+
{"version":3,"file":"dev-cognito-ui-page.js","sourceRoot":"","sources":["../../src/utils/dev-cognito-ui-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA60B9B,CAAC"}
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
* MinIO → localhost:9000 / 9001 (buckets per project)
|
|
10
10
|
* pgweb → localhost:8081 (DB viewer, auto-added with Postgres)
|
|
11
11
|
* Redis Insight → localhost:5540 (queue/cache viewer, auto-added with Redis)
|
|
12
|
-
* cognito-local → localhost:9229 (Cognito mock,
|
|
12
|
+
* cognito-local → localhost:9229+ (Cognito mock, ONE container per
|
|
13
|
+
* project that declares an `auth` intent, each on
|
|
14
|
+
* its own port + named data volume so concurrent
|
|
15
|
+
* `vk dev` runs don't clobber each other's users)
|
|
13
16
|
*/
|
|
14
17
|
interface DatabaseIntent {
|
|
15
18
|
id: string;
|
|
@@ -59,6 +62,15 @@ interface InfraIntents {
|
|
|
59
62
|
* always a valid unquoted Postgres identifier.
|
|
60
63
|
*/
|
|
61
64
|
export declare function pgName(dbName: string, stage: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Sanitise a project name into a string safe for Docker Compose
|
|
67
|
+
* service names, named volumes, and on-disk filenames.
|
|
68
|
+
*
|
|
69
|
+
* Compose service names allow `[a-zA-Z0-9._-]`; we go further and
|
|
70
|
+
* lowercase + collapse to `[a-z0-9-]` so the same project name renders
|
|
71
|
+
* identically across macOS / Linux / Windows filesystems.
|
|
72
|
+
*/
|
|
73
|
+
export declare function safeProjectSlug(projectName: string): string;
|
|
62
74
|
export interface DockerComposeResult {
|
|
63
75
|
/** Path to the shared docker-compose.yml (null if no services needed) */
|
|
64
76
|
composePath: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-compose.d.ts","sourceRoot":"","sources":["../../src/utils/docker-compose.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"docker-compose.d.ts","sourceRoot":"","sources":["../../src/utils/docker-compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,UAAU,cAAc;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAAE;AACrE,UAAU,WAAW;IAAG,EAAE,EAAE,MAAM,CAAC;CAAE;AACrC,UAAU,aAAa;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAAE;AACzD,UAAU,WAAW;IAAG,EAAE,EAAE,MAAM,CAAC;CAAE;AACrC,UAAU,UAAU;IAAG,EAAE,EAAE,MAAM,CAAC;CAAE;AACpC,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;CACzB;AAqDD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AAoCD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAK3D;AAiRD,MAAM,WAAW,mBAAmB;IAClC,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,yCAAyC;IACzC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,YAAY,GAAG,SAAS,EACjC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GACZ,mBAAmB,CAqMrB"}
|
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
* MinIO → localhost:9000 / 9001 (buckets per project)
|
|
10
10
|
* pgweb → localhost:8081 (DB viewer, auto-added with Postgres)
|
|
11
11
|
* Redis Insight → localhost:5540 (queue/cache viewer, auto-added with Redis)
|
|
12
|
-
* cognito-local → localhost:9229 (Cognito mock,
|
|
12
|
+
* cognito-local → localhost:9229+ (Cognito mock, ONE container per
|
|
13
|
+
* project that declares an `auth` intent, each on
|
|
14
|
+
* its own port + named data volume so concurrent
|
|
15
|
+
* `vk dev` runs don't clobber each other's users)
|
|
13
16
|
*/
|
|
14
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
17
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, unlinkSync } from 'fs';
|
|
15
18
|
import { join } from 'path';
|
|
16
19
|
import { homedir } from 'os';
|
|
17
20
|
// ── Shared directory & project registry ───────────────────────────────
|
|
@@ -82,9 +85,41 @@ function allQueues(reg) {
|
|
|
82
85
|
}
|
|
83
86
|
return [...set].sort();
|
|
84
87
|
}
|
|
85
|
-
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Sanitise a project name into a string safe for Docker Compose
|
|
90
|
+
* service names, named volumes, and on-disk filenames.
|
|
91
|
+
*
|
|
92
|
+
* Compose service names allow `[a-zA-Z0-9._-]`; we go further and
|
|
93
|
+
* lowercase + collapse to `[a-z0-9-]` so the same project name renders
|
|
94
|
+
* identically across macOS / Linux / Windows filesystems.
|
|
95
|
+
*/
|
|
96
|
+
export function safeProjectSlug(projectName) {
|
|
97
|
+
return projectName
|
|
98
|
+
.toLowerCase()
|
|
99
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
100
|
+
.replace(/^-+|-+$/g, '') || 'project';
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Allocate a host port for `projectName`'s cognito-local container.
|
|
104
|
+
* Sticky once assigned (returns the existing value), otherwise picks
|
|
105
|
+
* the lowest free port at or above 9229 not already claimed by another
|
|
106
|
+
* registered project.
|
|
107
|
+
*/
|
|
108
|
+
function allocateCognitoPort(reg, projectName) {
|
|
109
|
+
const existing = reg[projectName]?.cognitoPort;
|
|
110
|
+
if (typeof existing === 'number' && existing > 0)
|
|
111
|
+
return existing;
|
|
112
|
+
const taken = new Set();
|
|
113
|
+
for (const [name, entry] of Object.entries(reg)) {
|
|
114
|
+
if (name === projectName)
|
|
115
|
+
continue;
|
|
116
|
+
if (typeof entry.cognitoPort === 'number')
|
|
117
|
+
taken.add(entry.cognitoPort);
|
|
118
|
+
}
|
|
119
|
+
let port = 9229;
|
|
120
|
+
while (taken.has(port))
|
|
121
|
+
port += 1;
|
|
122
|
+
return port;
|
|
88
123
|
}
|
|
89
124
|
/** Does any registered project need MailHog (notify intent w/ email channel)? */
|
|
90
125
|
function anyNeedsMailhog(reg) {
|
|
@@ -100,7 +135,7 @@ function generateSharedCompose(reg) {
|
|
|
100
135
|
const dbs = allDatabases(reg);
|
|
101
136
|
const needsRedis = anyNeedsRedis(reg);
|
|
102
137
|
const buckets = allBuckets(reg);
|
|
103
|
-
const needsCognito =
|
|
138
|
+
const needsCognito = Object.values(reg).some((e) => e.needsCognito === true);
|
|
104
139
|
const needsMailhog = anyNeedsMailhog(reg);
|
|
105
140
|
// ── Postgres ────────────────────────────────────────────────────────
|
|
106
141
|
if (dbs.length > 0) {
|
|
@@ -220,39 +255,61 @@ function generateSharedCompose(reg) {
|
|
|
220
255
|
entrypoint: /bin/sh -c "${mcCommands}"
|
|
221
256
|
restart: "no"`);
|
|
222
257
|
}
|
|
223
|
-
// ── cognito-local
|
|
258
|
+
// ── cognito-local (one container PER project) ───────────────────────
|
|
224
259
|
// jagregory/cognito-local emulates the Cognito User-Pool API on the
|
|
225
260
|
// standard Cognito SDK over plain HTTP. Pool + client provisioning is
|
|
226
261
|
// done at runtime by `vk dev` via the AWS SDK pointed at this endpoint
|
|
227
|
-
// (see provisionCognitoLocal in commands/dev.ts)
|
|
228
|
-
//
|
|
229
|
-
//
|
|
262
|
+
// (see provisionCognitoLocal in commands/dev.ts).
|
|
263
|
+
//
|
|
264
|
+
// **Per-project isolation.** Unlike Postgres / Redis / MinIO (which
|
|
265
|
+
// are shared singletons keyed by project-prefixed DB / bucket / queue
|
|
266
|
+
// names), each project that declares an `auth` intent gets its OWN
|
|
267
|
+
// cognito-local container, named volume, and host port. This is what
|
|
268
|
+
// lets multiple consumer projects run `vk dev` in parallel without
|
|
269
|
+
// their pools / users colliding, and means a transient compose regen
|
|
270
|
+
// (e.g. another project's `vk dev` adds a new bucket) can never
|
|
271
|
+
// recreate this project's container against an empty volume by
|
|
272
|
+
// accident — each container's lifecycle is tied to its own service
|
|
273
|
+
// definition.
|
|
230
274
|
//
|
|
231
275
|
// **Issuer pinning.** The jagregory image sets `HOST=0.0.0.0` in its
|
|
232
276
|
// Dockerfile, and cognito-local uses `HOST` to build the JWT `iss`
|
|
233
|
-
// claim (→ `http://0.0.0.0
|
|
277
|
+
// claim (→ `http://0.0.0.0:<port>/<poolId>`). Flipping HOST to
|
|
234
278
|
// `localhost` would also rebind the socket to loopback-only, breaking
|
|
235
279
|
// port forwarding. Instead we bind-mount a small `config.json` into
|
|
236
280
|
// `/app/.cognito/config.json` that overrides `TokenConfig.IssuerDomain`
|
|
237
|
-
// to `http://localhost
|
|
238
|
-
// `COGNITO_ENDPOINT=http://localhost
|
|
281
|
+
// to `http://localhost:<port>` so tokens match what
|
|
282
|
+
// `COGNITO_ENDPOINT=http://localhost:<port>` causes the verifier to
|
|
239
283
|
// expect. Without this, `/auth/me` silently 401s on every request
|
|
240
|
-
// because the issuer comparison fails.
|
|
284
|
+
// because the issuer comparison fails. Each project gets its OWN
|
|
285
|
+
// config file (`cognito-local-config-<slug>.json`) so the issuer
|
|
286
|
+
// domain reflects that project's allocated port.
|
|
241
287
|
if (needsCognito) {
|
|
242
|
-
|
|
288
|
+
const cognitoProjects = Object.entries(reg)
|
|
289
|
+
.filter(([, e]) => e.needsCognito === true && typeof e.cognitoPort === 'number')
|
|
290
|
+
// Stable ordering so the generated YAML diff stays deterministic.
|
|
291
|
+
.sort(([a], [b]) => a.localeCompare(b));
|
|
292
|
+
for (const [name, entry] of cognitoProjects) {
|
|
293
|
+
const slug = safeProjectSlug(name);
|
|
294
|
+
const port = entry.cognitoPort;
|
|
295
|
+
const serviceName = `cognito-local-${slug}`;
|
|
296
|
+
const volumeName = `cognito-local-data-${slug}`;
|
|
297
|
+
const configFile = `cognito-local-config-${slug}.json`;
|
|
298
|
+
services.push(` ${serviceName}:
|
|
243
299
|
image: jagregory/cognito-local:latest
|
|
244
300
|
restart: unless-stopped
|
|
245
301
|
ports:
|
|
246
|
-
- "
|
|
302
|
+
- "${port}:9229"
|
|
247
303
|
volumes:
|
|
248
|
-
-
|
|
249
|
-
-
|
|
304
|
+
- ${volumeName}:/app/.cognito
|
|
305
|
+
- ./${configFile}:/app/.cognito/config.json
|
|
250
306
|
healthcheck:
|
|
251
307
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9229/health"]
|
|
252
308
|
interval: 5s
|
|
253
309
|
timeout: 5s
|
|
254
310
|
retries: 10`);
|
|
255
|
-
|
|
311
|
+
volumes.push(` ${volumeName}:`);
|
|
312
|
+
}
|
|
256
313
|
}
|
|
257
314
|
// ── MailHog (email catcher for `vk dev`) ────────────────────────────
|
|
258
315
|
// Lightweight in-memory SMTP server with a web inbox at
|
|
@@ -340,12 +397,16 @@ export function ensureDockerCompose(_projectDir, intents, projectName, stage) {
|
|
|
340
397
|
const queueNames = hasQueues
|
|
341
398
|
? intents.queues.map((q) => `${projectName}-${q.id}`)
|
|
342
399
|
: [];
|
|
400
|
+
// Allocate (or reuse) this project's dedicated cognito-local port
|
|
401
|
+
// BEFORE writing the registry, so the saved entry is fully formed.
|
|
402
|
+
const cognitoPort = hasAuth ? allocateCognitoPort(reg, projectName) : undefined;
|
|
343
403
|
reg[projectName] = {
|
|
344
404
|
databases: dbNames,
|
|
345
405
|
buckets: bucketNames,
|
|
346
406
|
queues: queueNames,
|
|
347
407
|
needsRedis: hasCaches || hasQueues,
|
|
348
408
|
needsCognito: hasAuth,
|
|
409
|
+
cognitoPort,
|
|
349
410
|
needsMailhog: hasNotifyEmail,
|
|
350
411
|
};
|
|
351
412
|
saveRegistry(reg);
|
|
@@ -357,15 +418,20 @@ export function ensureDockerCompose(_projectDir, intents, projectName, stage) {
|
|
|
357
418
|
if (existing !== content) {
|
|
358
419
|
writeFileSync(composePath, content, 'utf-8');
|
|
359
420
|
}
|
|
360
|
-
// ── cognito-local config
|
|
361
|
-
//
|
|
362
|
-
//
|
|
363
|
-
//
|
|
364
|
-
|
|
365
|
-
|
|
421
|
+
// ── cognito-local config overrides (one file per project) ───────────
|
|
422
|
+
// Each project's cognito-local container bind-mounts its OWN config
|
|
423
|
+
// file with an IssuerDomain pinned to that project's allocated host
|
|
424
|
+
// port. Without per-project files, two projects on different ports
|
|
425
|
+
// would either share a single (wrong) IssuerDomain or fight over the
|
|
426
|
+
// same file on every regen.
|
|
427
|
+
for (const [name, entry] of Object.entries(reg)) {
|
|
428
|
+
if (entry.needsCognito !== true || typeof entry.cognitoPort !== 'number')
|
|
429
|
+
continue;
|
|
430
|
+
const slug = safeProjectSlug(name);
|
|
431
|
+
const cognitoConfigPath = join(VK_HOME, `cognito-local-config-${slug}.json`);
|
|
366
432
|
const cognitoConfig = JSON.stringify({
|
|
367
433
|
TokenConfig: {
|
|
368
|
-
IssuerDomain:
|
|
434
|
+
IssuerDomain: `http://localhost:${entry.cognitoPort}`,
|
|
369
435
|
},
|
|
370
436
|
}, null, 2) + '\n';
|
|
371
437
|
const existingCfg = existsSync(cognitoConfigPath)
|
|
@@ -375,6 +441,15 @@ export function ensureDockerCompose(_projectDir, intents, projectName, stage) {
|
|
|
375
441
|
writeFileSync(cognitoConfigPath, cognitoConfig, 'utf-8');
|
|
376
442
|
}
|
|
377
443
|
}
|
|
444
|
+
// One-time cleanup: remove the legacy single-tenant config file from
|
|
445
|
+
// earlier CLI versions. Harmless if it's already gone.
|
|
446
|
+
const legacyCognitoConfigPath = join(VK_HOME, 'cognito-local-config.json');
|
|
447
|
+
if (existsSync(legacyCognitoConfigPath)) {
|
|
448
|
+
try {
|
|
449
|
+
unlinkSync(legacyCognitoConfigPath);
|
|
450
|
+
}
|
|
451
|
+
catch { /* ignore */ }
|
|
452
|
+
}
|
|
378
453
|
// ── Build project-specific env vars ─────────────────────────────────
|
|
379
454
|
const envVars = {};
|
|
380
455
|
if (hasDatabases) {
|
|
@@ -413,12 +488,13 @@ export function ensureDockerCompose(_projectDir, intents, projectName, stage) {
|
|
|
413
488
|
envVars['VENTURE_MINIO_SECRET_KEY'] = 'minioadmin';
|
|
414
489
|
envVars['VENTURE_STORAGE_BUCKET'] = `${projectName}-${intents.storage[0].id}`;
|
|
415
490
|
}
|
|
416
|
-
if (hasAuth) {
|
|
417
|
-
// Point `@venturekit/auth/server` at
|
|
418
|
-
//
|
|
419
|
-
// they're created at runtime by
|
|
420
|
-
//
|
|
421
|
-
|
|
491
|
+
if (hasAuth && typeof cognitoPort === 'number') {
|
|
492
|
+
// Point `@venturekit/auth/server` at THIS project's dedicated
|
|
493
|
+
// cognito-local container. The pool + client IDs aren't known yet
|
|
494
|
+
// at this stage — they're created at runtime by
|
|
495
|
+
// `provisionCognitoLocal()` against this same endpoint and injected
|
|
496
|
+
// separately into the local server's env once available.
|
|
497
|
+
envVars['COGNITO_ENDPOINT'] = `http://localhost:${cognitoPort}`;
|
|
422
498
|
// cognito-local doesn't enforce a specific region, but the AWS SDK
|
|
423
499
|
// requires one — pin it to a stable value so cached SDK clients
|
|
424
500
|
// don't churn between dev sessions.
|
|
@@ -434,8 +510,32 @@ export function ensureDockerCompose(_projectDir, intents, projectName, stage) {
|
|
|
434
510
|
// shape (`VENTURE_NOTIFY_FROM`, `NOTIFY_<ID>_FROM`) so handler
|
|
435
511
|
// code that reads these in production continues to work in
|
|
436
512
|
// dev without conditional branches.
|
|
513
|
+
//
|
|
514
|
+
// **Per-project mail isolation in the shared MailHog inbox.**
|
|
515
|
+
// MailHog is a single shared catcher across every `vk dev` project
|
|
516
|
+
// on the machine, so without help every project's mail piles into
|
|
517
|
+
// one undifferentiated inbox. We separate them two ways:
|
|
518
|
+
//
|
|
519
|
+
// 1. **Sub-addressed `From`.** When the consumer hasn't pinned
|
|
520
|
+
// `defaultFrom`, we fall back to
|
|
521
|
+
// `no-reply+<project-slug>@local.test` (RFC 5233 plus-tag).
|
|
522
|
+
// MailHog's UI shows the full address in the "From" column,
|
|
523
|
+
// so each project's mail is visually grouped at a glance.
|
|
524
|
+
// 2. **`X-VK-Project` header.** The MailHog provider stamps this
|
|
525
|
+
// header on every send (driven by `VENTURE_NOTIFY_PROJECT`),
|
|
526
|
+
// so the inbox search box can filter by exact project name —
|
|
527
|
+
// including for consumers who pin a custom `defaultFrom`
|
|
528
|
+
// that we won't rewrite.
|
|
529
|
+
//
|
|
530
|
+
// We deliberately don't mutate user-supplied `defaultFrom` values:
|
|
531
|
+
// sub-addressing is fallback-only, since rewriting an explicit
|
|
532
|
+
// `defaultFrom` would surprise users who picked an address on
|
|
533
|
+
// purpose (e.g. for SES identity matching).
|
|
534
|
+
const slug = safeProjectSlug(projectName);
|
|
535
|
+
const localFallbackFrom = `no-reply+${slug}@local.test`;
|
|
437
536
|
const primary = intents.notify[0];
|
|
438
|
-
envVars['VENTURE_NOTIFY_FROM'] = primary.defaultFrom ??
|
|
537
|
+
envVars['VENTURE_NOTIFY_FROM'] = primary.defaultFrom ?? localFallbackFrom;
|
|
538
|
+
envVars['VENTURE_NOTIFY_PROJECT'] = projectName;
|
|
439
539
|
if (hasNotifyEmail) {
|
|
440
540
|
envVars['VENTURE_NOTIFY_SMTP_HOST'] = 'localhost';
|
|
441
541
|
envVars['VENTURE_NOTIFY_SMTP_PORT'] = '1025';
|
|
@@ -443,7 +543,7 @@ export function ensureDockerCompose(_projectDir, intents, projectName, stage) {
|
|
|
443
543
|
}
|
|
444
544
|
for (const n of intents.notify) {
|
|
445
545
|
const idKey = n.id.toUpperCase().replace(/[^A-Z0-9_]/g, '_');
|
|
446
|
-
envVars[`NOTIFY_${idKey}_FROM`] = n.defaultFrom ??
|
|
546
|
+
envVars[`NOTIFY_${idKey}_FROM`] = n.defaultFrom ?? localFallbackFrom;
|
|
447
547
|
}
|
|
448
548
|
}
|
|
449
549
|
return { composePath, envVars, hasServices: true };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-compose.js","sourceRoot":"","sources":["../../src/utils/docker-compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAyB7B,yEAAyE;AAEzE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,EA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