@venturekit/cli 0.0.0-dev.20260430162351 → 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.
Files changed (44) hide show
  1. package/README.md +65 -0
  2. package/dist/commands/cert.d.ts +25 -0
  3. package/dist/commands/cert.d.ts.map +1 -0
  4. package/dist/commands/cert.js +371 -0
  5. package/dist/commands/cert.js.map +1 -0
  6. package/dist/commands/deploy.d.ts.map +1 -1
  7. package/dist/commands/deploy.js +70 -0
  8. package/dist/commands/deploy.js.map +1 -1
  9. package/dist/commands/dev.d.ts.map +1 -1
  10. package/dist/commands/dev.js +28 -0
  11. package/dist/commands/dev.js.map +1 -1
  12. package/dist/commands/gha.d.ts +32 -0
  13. package/dist/commands/gha.d.ts.map +1 -0
  14. package/dist/commands/gha.js +645 -0
  15. package/dist/commands/gha.js.map +1 -0
  16. package/dist/commands/help.js +1 -1
  17. package/dist/commands/help.js.map +1 -1
  18. package/dist/commands/open.d.ts.map +1 -1
  19. package/dist/commands/open.js +104 -3
  20. package/dist/commands/open.js.map +1 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/utils/cognito-local.d.ts +18 -2
  25. package/dist/utils/cognito-local.d.ts.map +1 -1
  26. package/dist/utils/cognito-local.js +19 -0
  27. package/dist/utils/cognito-local.js.map +1 -1
  28. package/dist/utils/dev-cognito-ui-page.d.ts +18 -0
  29. package/dist/utils/dev-cognito-ui-page.d.ts.map +1 -0
  30. package/dist/utils/dev-cognito-ui-page.js +858 -0
  31. package/dist/utils/dev-cognito-ui-page.js.map +1 -0
  32. package/dist/utils/dev-cognito-ui.d.ts +91 -0
  33. package/dist/utils/dev-cognito-ui.d.ts.map +1 -0
  34. package/dist/utils/dev-cognito-ui.js +546 -0
  35. package/dist/utils/dev-cognito-ui.js.map +1 -0
  36. package/dist/utils/dev-server-discovery.d.ts +52 -0
  37. package/dist/utils/dev-server-discovery.d.ts.map +1 -0
  38. package/dist/utils/dev-server-discovery.js +128 -0
  39. package/dist/utils/dev-server-discovery.js.map +1 -0
  40. package/dist/utils/local-server.d.ts +9 -0
  41. package/dist/utils/local-server.d.ts.map +1 -1
  42. package/dist/utils/local-server.js +41 -0
  43. package/dist/utils/local-server.js.map +1 -1
  44. package/package.json +7 -4
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAw0B9B,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * `/_dev/users` admin UI for cognito-local.
3
+ *
4
+ * The shared `~/.vk/cognito-local-state.json` records every project's
5
+ * provisioned `(userPoolId, clientId)` per intent — that's enough to
6
+ * proxy admin operations from a small HTML page served by `vk dev` to
7
+ * the cognito-local container.
8
+ *
9
+ * Two surfaces:
10
+ *
11
+ * - `GET /_dev/users` → serves the HTML page (no auth, dev-server only).
12
+ * - `/_dev/cognito/*` → JSON API the page calls. Mirrors the subset of
13
+ * `cognito-idp` admin commands developers reach for in INSTALL.md
14
+ * (list / create / set-password / set-attr / confirm / enable / disable /
15
+ * reset-password / delete).
16
+ *
17
+ * Safety: every mutating call refuses unless we're confident the
18
+ * endpoint we'd talk to is the in-docker cognito-local mock — never a
19
+ * real AWS pool. The two checks together (loopback host + the
20
+ * `VENTURE_LOCAL=true` marker `vk dev` injects) make it impossible for
21
+ * `/_dev/cognito/*` to mutate production by accident even if a route
22
+ * somehow leaked into a deployed Lambda.
23
+ */
24
+ import * as http from 'http';
25
+ import { type ProvisionAuthIntent } from './cognito-local.js';
26
+ /**
27
+ * Subset of context the local dev server passes in. Kept narrow so we
28
+ * don't accidentally couple to the full `LocalServerOptions` shape.
29
+ */
30
+ export interface CognitoUiContext {
31
+ projectName: string;
32
+ authIntents: ProvisionAuthIntent[];
33
+ }
34
+ /**
35
+ * The mutating endpoints (`POST`, `DELETE`) refuse unless:
36
+ * 1. `VENTURE_LOCAL=true` — confirms we're in `vk dev`, not a real Lambda.
37
+ * 2. `COGNITO_ENDPOINT` is set AND points at a loopback host.
38
+ *
39
+ * Layered intentionally: even if a future code path forgets one guard,
40
+ * the other still catches "developer points local app at production
41
+ * Cognito and accidentally hits the admin UI" — a class of mistake we
42
+ * do NOT want to make easy.
43
+ */
44
+ declare function safetyError(): {
45
+ code: string;
46
+ message: string;
47
+ } | null;
48
+ /** Resolve the pool for the requested intent, or return a 404-ish error tuple. */
49
+ declare function resolvePool(ctx: CognitoUiContext, intentId: string | null): {
50
+ userPoolId: string;
51
+ clientId: string;
52
+ intent: ProvisionAuthIntent;
53
+ } | {
54
+ error: {
55
+ status: number;
56
+ code: string;
57
+ message: string;
58
+ };
59
+ };
60
+ /**
61
+ * Map a Cognito SDK error to an HTTP status + clean payload. We surface
62
+ * `err.name` so the UI can localize / re-style based on the error class
63
+ * (e.g. `UsernameExistsException` → "User already exists" in friendlier
64
+ * copy). Falls back to 500 for unrecognised errors.
65
+ */
66
+ declare function cognitoStatus(name: string | undefined): number;
67
+ interface AttrInput {
68
+ Name: string;
69
+ Value: string;
70
+ }
71
+ declare function toAttrArray(map: Record<string, string> | unknown): AttrInput[];
72
+ /**
73
+ * Serve the `/_dev/users` HTML page. No auth — local-dev only by virtue
74
+ * of the dev server itself binding to the project port.
75
+ */
76
+ export declare function serveCognitoUiPage(res: http.ServerResponse): void;
77
+ /**
78
+ * Route a `/_dev/cognito/*` request. Returns `true` when handled (so
79
+ * the caller can `return` early), `false` when the path didn't match
80
+ * and the caller should continue normal route matching.
81
+ */
82
+ export declare function handleCognitoApi(req: http.IncomingMessage, res: http.ServerResponse, ctx: CognitoUiContext): Promise<boolean>;
83
+ /** Test-only — exposes the safety check so unit tests can drive every branch. */
84
+ export declare const _internals: {
85
+ safetyError: typeof safetyError;
86
+ toAttrArray: typeof toAttrArray;
87
+ cognitoStatus: typeof cognitoStatus;
88
+ resolvePool: typeof resolvePool;
89
+ };
90
+ export {};
91
+ //# sourceMappingURL=dev-cognito-ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-cognito-ui.d.ts","sourceRoot":"","sources":["../../src/utils/dev-cognito-ui.ts"],"names":[],"mapp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AG,EAAE,gBAAgB,GACpB,OAAO,CAAC,OAAO,CAAC,CAmElB;AAID,iFAAiF;AACjF,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC"}
@@ -0,0 +1,546 @@
1
+ /**
2
+ * `/_dev/users` admin UI for cognito-local.
3
+ *
4
+ * The shared `~/.vk/cognito-local-state.json` records every project's
5
+ * provisioned `(userPoolId, clientId)` per intent — that's enough to
6
+ * proxy admin operations from a small HTML page served by `vk dev` to
7
+ * the cognito-local container.
8
+ *
9
+ * Two surfaces:
10
+ *
11
+ * - `GET /_dev/users` → serves the HTML page (no auth, dev-server only).
12
+ * - `/_dev/cognito/*` → JSON API the page calls. Mirrors the subset of
13
+ * `cognito-idp` admin commands developers reach for in INSTALL.md
14
+ * (list / create / set-password / set-attr / confirm / enable / disable /
15
+ * reset-password / delete).
16
+ *
17
+ * Safety: every mutating call refuses unless we're confident the
18
+ * endpoint we'd talk to is the in-docker cognito-local mock — never a
19
+ * real AWS pool. The two checks together (loopback host + the
20
+ * `VENTURE_LOCAL=true` marker `vk dev` injects) make it impossible for
21
+ * `/_dev/cognito/*` to mutate production by accident even if a route
22
+ * somehow leaked into a deployed Lambda.
23
+ */
24
+ import { URL } from 'url';
25
+ import { lookupCognitoLocalPools } from './cognito-local.js';
26
+ import { COGNITO_UI_HTML } from './dev-cognito-ui-page.js';
27
+ const LOOPBACK_HOSTS = new Set(['localhost', '127.0.0.1', '::1', '0.0.0.0']);
28
+ /**
29
+ * The mutating endpoints (`POST`, `DELETE`) refuse unless:
30
+ * 1. `VENTURE_LOCAL=true` — confirms we're in `vk dev`, not a real Lambda.
31
+ * 2. `COGNITO_ENDPOINT` is set AND points at a loopback host.
32
+ *
33
+ * Layered intentionally: even if a future code path forgets one guard,
34
+ * the other still catches "developer points local app at production
35
+ * Cognito and accidentally hits the admin UI" — a class of mistake we
36
+ * do NOT want to make easy.
37
+ */
38
+ function safetyError() {
39
+ if (process.env.VENTURE_LOCAL !== 'true') {
40
+ return {
41
+ code: 'NOT_LOCAL',
42
+ message: 'The /_dev/cognito admin API is only available under `vk dev`.',
43
+ };
44
+ }
45
+ const endpoint = process.env.COGNITO_ENDPOINT;
46
+ if (!endpoint) {
47
+ return {
48
+ code: 'NO_ENDPOINT',
49
+ message: 'COGNITO_ENDPOINT is not set. Restart `vk dev` so it can wire up cognito-local.',
50
+ };
51
+ }
52
+ let host;
53
+ try {
54
+ host = new URL(endpoint).hostname.toLowerCase();
55
+ }
56
+ catch {
57
+ return {
58
+ code: 'BAD_ENDPOINT',
59
+ message: `COGNITO_ENDPOINT is not a valid URL: ${endpoint}`,
60
+ };
61
+ }
62
+ // WHATWG URL keeps IPv6 literals bracketed in `.hostname` (e.g. `[::1]`);
63
+ // normalize so loopback lookup matches the plain `::1` entry.
64
+ if (host.startsWith('[') && host.endsWith(']')) {
65
+ host = host.slice(1, -1);
66
+ }
67
+ if (!LOOPBACK_HOSTS.has(host)) {
68
+ return {
69
+ code: 'NON_LOOPBACK_ENDPOINT',
70
+ message: `Refusing to talk to non-loopback Cognito at ${endpoint}. ` +
71
+ `The admin UI only operates against the in-docker cognito-local mock.`,
72
+ };
73
+ }
74
+ return null;
75
+ }
76
+ /**
77
+ * Lazy-import the SDK. Same pattern as `cognito-local.ts` —
78
+ * `@aws-sdk/client-cognito-identity-provider` is a hefty dep so we only
79
+ * pay the import cost when someone actually opens the admin UI. Stub
80
+ * credentials are fine here because cognito-local doesn't validate them.
81
+ */
82
+ async function loadSdk() {
83
+ const sdk = await import('@aws-sdk/client-cognito-identity-provider');
84
+ const endpoint = process.env.COGNITO_ENDPOINT;
85
+ const region = process.env.COGNITO_REGION || 'local';
86
+ const client = new sdk.CognitoIdentityProviderClient({
87
+ region,
88
+ endpoint,
89
+ credentials: {
90
+ accessKeyId: 'local-dev',
91
+ secretAccessKey: 'local-dev',
92
+ },
93
+ });
94
+ return { sdk, client };
95
+ }
96
+ // ── HTTP plumbing ────────────────────────────────────────────────────
97
+ function sendJson(res, status, body) {
98
+ res.writeHead(status, { 'Content-Type': 'application/json' });
99
+ res.end(JSON.stringify(body));
100
+ }
101
+ function sendError(res, status, code, message) {
102
+ sendJson(res, status, { error: { code, message } });
103
+ }
104
+ async function readBody(req) {
105
+ return new Promise((resolve, reject) => {
106
+ const chunks = [];
107
+ req.on('data', (c) => chunks.push(c));
108
+ req.on('end', () => resolve(Buffer.concat(chunks).toString('utf-8')));
109
+ req.on('error', reject);
110
+ });
111
+ }
112
+ function parseJsonBody(body) {
113
+ if (!body)
114
+ return {};
115
+ try {
116
+ const parsed = JSON.parse(body);
117
+ return typeof parsed === 'object' && parsed !== null ? parsed : {};
118
+ }
119
+ catch {
120
+ return {};
121
+ }
122
+ }
123
+ /** Resolve the pool for the requested intent, or return a 404-ish error tuple. */
124
+ function resolvePool(ctx, intentId) {
125
+ if (ctx.authIntents.length === 0) {
126
+ return {
127
+ error: {
128
+ status: 400,
129
+ code: 'NO_AUTH_INTENT',
130
+ message: 'No `auth` intent declared in vk.config.ts.',
131
+ },
132
+ };
133
+ }
134
+ const id = intentId ?? ctx.authIntents[0].id;
135
+ const intent = ctx.authIntents.find((i) => i.id === id);
136
+ if (!intent) {
137
+ return {
138
+ error: {
139
+ status: 400,
140
+ code: 'UNKNOWN_INTENT',
141
+ message: `No auth intent "${id}" in vk.config.ts. Known: ${ctx.authIntents.map((i) => i.id).join(', ')}.`,
142
+ },
143
+ };
144
+ }
145
+ const pools = lookupCognitoLocalPools(ctx.projectName);
146
+ const pool = pools[id];
147
+ if (!pool) {
148
+ return {
149
+ error: {
150
+ status: 404,
151
+ code: 'NO_POOL',
152
+ message: `No cognito-local pool provisioned for intent "${id}". Run \`vk dev\` first.`,
153
+ },
154
+ };
155
+ }
156
+ return { userPoolId: pool.userPoolId, clientId: pool.clientId, intent };
157
+ }
158
+ // ── Cognito error mapping ────────────────────────────────────────────
159
+ /**
160
+ * Map a Cognito SDK error to an HTTP status + clean payload. We surface
161
+ * `err.name` so the UI can localize / re-style based on the error class
162
+ * (e.g. `UsernameExistsException` → "User already exists" in friendlier
163
+ * copy). Falls back to 500 for unrecognised errors.
164
+ */
165
+ function cognitoStatus(name) {
166
+ switch (name) {
167
+ case 'UsernameExistsException':
168
+ return 409;
169
+ case 'UserNotFoundException':
170
+ case 'ResourceNotFoundException':
171
+ return 404;
172
+ case 'InvalidPasswordException':
173
+ case 'InvalidParameterException':
174
+ case 'CodeMismatchException':
175
+ return 400;
176
+ case 'NotAuthorizedException':
177
+ return 401;
178
+ default:
179
+ return 500;
180
+ }
181
+ }
182
+ function handleSdkError(res, err) {
183
+ const e = err;
184
+ const name = e?.name || 'CognitoError';
185
+ const status = cognitoStatus(name);
186
+ sendError(res, status, name, e?.message || 'Cognito error');
187
+ }
188
+ /**
189
+ * Take `{ tenantId: 'global', email_verified: 'true' }` from the UI and
190
+ * shape it as `[{ Name, Value }]` for the SDK. Names that don't already
191
+ * carry a namespace prefix (`email`, `email_verified`, `phone_number`,
192
+ * `name`, etc.) get `custom:` prepended so the most common typo —
193
+ * forgetting `custom:` — Just Works.
194
+ *
195
+ * The whitelist of "no prefix needed" attributes matches Cognito's
196
+ * standard schema. Anything else is assumed to be a custom attribute,
197
+ * which mirrors how developers think about them.
198
+ */
199
+ const STANDARD_ATTRS = new Set([
200
+ 'address', 'birthdate', 'email', 'email_verified', 'family_name',
201
+ 'gender', 'given_name', 'locale', 'middle_name', 'name', 'nickname',
202
+ 'phone_number', 'phone_number_verified', 'picture', 'preferred_username',
203
+ 'profile', 'sub', 'updated_at', 'website', 'zoneinfo',
204
+ ]);
205
+ function toAttrArray(map) {
206
+ if (typeof map !== 'object' || map === null)
207
+ return [];
208
+ const out = [];
209
+ for (const [rawName, rawValue] of Object.entries(map)) {
210
+ const name = String(rawName).trim();
211
+ if (!name)
212
+ continue;
213
+ const value = rawValue == null ? '' : String(rawValue);
214
+ const prefixed = name.includes(':') || STANDARD_ATTRS.has(name)
215
+ ? name
216
+ : `custom:${name}`;
217
+ out.push({ Name: prefixed, Value: value });
218
+ }
219
+ return out;
220
+ }
221
+ // ── Op implementations ──────────────────────────────────────────────
222
+ async function listPools(res, ctx) {
223
+ const pools = lookupCognitoLocalPools(ctx.projectName);
224
+ // Augment with user counts where the pool is reachable. Failures
225
+ // (e.g. cognito-local not started yet) are reported as `count: null`
226
+ // rather than failing the whole request — the UI then shows a
227
+ // "no pool yet" banner instead of a hard error.
228
+ let counts = {};
229
+ if (Object.keys(pools).length > 0 && process.env.COGNITO_ENDPOINT) {
230
+ try {
231
+ const { sdk, client } = await loadSdk();
232
+ for (const [intentId, pool] of Object.entries(pools)) {
233
+ try {
234
+ const resp = await client.send(new sdk.ListUsersCommand({
235
+ UserPoolId: pool.userPoolId,
236
+ // cognito-local ignores Limit but real Cognito caps at 60.
237
+ Limit: 60,
238
+ }));
239
+ counts[intentId] = (resp.Users || []).length;
240
+ }
241
+ catch {
242
+ counts[intentId] = null;
243
+ }
244
+ }
245
+ }
246
+ catch {
247
+ // SDK import / client construction failed — still return the
248
+ // pool config so the page can render its banner.
249
+ counts = {};
250
+ }
251
+ }
252
+ const enriched = {};
253
+ for (const [intentId, pool] of Object.entries(pools)) {
254
+ enriched[intentId] = {
255
+ userPoolId: pool.userPoolId,
256
+ clientId: pool.clientId,
257
+ count: counts[intentId] ?? null,
258
+ };
259
+ }
260
+ sendJson(res, 200, {
261
+ project: ctx.projectName,
262
+ endpoint: process.env.COGNITO_ENDPOINT || null,
263
+ intents: ctx.authIntents.map((i) => ({
264
+ id: i.id,
265
+ signInWith: i.signInWith,
266
+ allowSignUp: i.allowSignUp,
267
+ customAttributes: i.customAttributes ?? [],
268
+ })),
269
+ pools: enriched,
270
+ });
271
+ }
272
+ async function listUsers(res, ctx, intentId) {
273
+ const r = resolvePool(ctx, intentId);
274
+ if ('error' in r) {
275
+ sendError(res, r.error.status, r.error.code, r.error.message);
276
+ return;
277
+ }
278
+ try {
279
+ const { sdk, client } = await loadSdk();
280
+ const resp = await client.send(new sdk.ListUsersCommand({
281
+ UserPoolId: r.userPoolId,
282
+ Limit: 60,
283
+ }));
284
+ sendJson(res, 200, {
285
+ pool: { userPoolId: r.userPoolId, clientId: r.clientId },
286
+ users: (resp.Users || []).map((u) => ({
287
+ Username: u.Username,
288
+ UserStatus: u.UserStatus,
289
+ Enabled: u.Enabled,
290
+ UserCreateDate: u.UserCreateDate?.toISOString?.() || null,
291
+ UserLastModifiedDate: u.UserLastModifiedDate?.toISOString?.() || null,
292
+ Attributes: u.Attributes || [],
293
+ })),
294
+ });
295
+ }
296
+ catch (err) {
297
+ handleSdkError(res, err);
298
+ }
299
+ }
300
+ async function createUser(res, ctx, intentId, body) {
301
+ const r = resolvePool(ctx, intentId);
302
+ if ('error' in r) {
303
+ sendError(res, r.error.status, r.error.code, r.error.message);
304
+ return;
305
+ }
306
+ const email = typeof body.email === 'string' ? body.email.trim() : '';
307
+ const password = typeof body.password === 'string' ? body.password : '';
308
+ if (!email || !password) {
309
+ sendError(res, 400, 'INVALID_INPUT', 'email and password are required.');
310
+ return;
311
+ }
312
+ // Build the attribute list. We always set `email` + `email_verified=true`
313
+ // so the user can log in without a verification code (cognito-local
314
+ // doesn't actually deliver emails). Any extra attributes from the body
315
+ // are merged on top — `custom:` prefix added automatically for unknowns.
316
+ const extraAttrs = toAttrArray((body.attributes ?? {}));
317
+ const attrMap = new Map();
318
+ attrMap.set('email', email);
319
+ attrMap.set('email_verified', 'true');
320
+ for (const a of extraAttrs)
321
+ attrMap.set(a.Name, a.Value);
322
+ const userAttributes = Array.from(attrMap, ([Name, Value]) => ({ Name, Value }));
323
+ try {
324
+ const { sdk, client } = await loadSdk();
325
+ // 1. Create the user. `MessageAction: SUPPRESS` matches the
326
+ // INSTALL.md workflow — cognito-local doesn't email anyway, but
327
+ // being explicit avoids a noisy "delivery failed" log line.
328
+ await client.send(new sdk.AdminCreateUserCommand({
329
+ UserPoolId: r.userPoolId,
330
+ Username: email,
331
+ UserAttributes: userAttributes,
332
+ MessageAction: 'SUPPRESS',
333
+ }));
334
+ // 2. Set the password as PERMANENT in one shot. Without this the
335
+ // user lands in `FORCE_CHANGE_PASSWORD` and every login attempt
336
+ // fails with `auth_challenge_required: NEW_PASSWORD_REQUIRED` —
337
+ // the exact foot-gun INSTALL.md calls out.
338
+ await client.send(new sdk.AdminSetUserPasswordCommand({
339
+ UserPoolId: r.userPoolId,
340
+ Username: email,
341
+ Password: password,
342
+ Permanent: true,
343
+ }));
344
+ sendJson(res, 200, { ok: true });
345
+ }
346
+ catch (err) {
347
+ handleSdkError(res, err);
348
+ }
349
+ }
350
+ async function deleteUser(res, ctx, intentId, username) {
351
+ const r = resolvePool(ctx, intentId);
352
+ if ('error' in r) {
353
+ sendError(res, r.error.status, r.error.code, r.error.message);
354
+ return;
355
+ }
356
+ try {
357
+ const { sdk, client } = await loadSdk();
358
+ await client.send(new sdk.AdminDeleteUserCommand({
359
+ UserPoolId: r.userPoolId,
360
+ Username: username,
361
+ }));
362
+ sendJson(res, 200, { ok: true });
363
+ }
364
+ catch (err) {
365
+ handleSdkError(res, err);
366
+ }
367
+ }
368
+ async function setPassword(res, ctx, intentId, username, body) {
369
+ const r = resolvePool(ctx, intentId);
370
+ if ('error' in r) {
371
+ sendError(res, r.error.status, r.error.code, r.error.message);
372
+ return;
373
+ }
374
+ const password = typeof body.password === 'string' ? body.password : '';
375
+ if (!password) {
376
+ sendError(res, 400, 'INVALID_INPUT', 'password is required.');
377
+ return;
378
+ }
379
+ const permanent = body.permanent !== false; // default to permanent
380
+ try {
381
+ const { sdk, client } = await loadSdk();
382
+ await client.send(new sdk.AdminSetUserPasswordCommand({
383
+ UserPoolId: r.userPoolId,
384
+ Username: username,
385
+ Password: password,
386
+ Permanent: permanent,
387
+ }));
388
+ sendJson(res, 200, { ok: true });
389
+ }
390
+ catch (err) {
391
+ handleSdkError(res, err);
392
+ }
393
+ }
394
+ async function setAttributes(res, ctx, intentId, username, body) {
395
+ const r = resolvePool(ctx, intentId);
396
+ if ('error' in r) {
397
+ sendError(res, r.error.status, r.error.code, r.error.message);
398
+ return;
399
+ }
400
+ const attrs = (body.attributes ?? {});
401
+ const userAttributes = toAttrArray(attrs);
402
+ if (userAttributes.length === 0) {
403
+ sendError(res, 400, 'INVALID_INPUT', 'attributes must be a non-empty object.');
404
+ return;
405
+ }
406
+ try {
407
+ const { sdk, client } = await loadSdk();
408
+ await client.send(new sdk.AdminUpdateUserAttributesCommand({
409
+ UserPoolId: r.userPoolId,
410
+ Username: username,
411
+ UserAttributes: userAttributes,
412
+ }));
413
+ sendJson(res, 200, { ok: true });
414
+ }
415
+ catch (err) {
416
+ handleSdkError(res, err);
417
+ }
418
+ }
419
+ async function simpleOp(res, ctx, intentId, username, op) {
420
+ const r = resolvePool(ctx, intentId);
421
+ if ('error' in r) {
422
+ sendError(res, r.error.status, r.error.code, r.error.message);
423
+ return;
424
+ }
425
+ try {
426
+ const { sdk, client } = await loadSdk();
427
+ if (op === 'confirm') {
428
+ await client.send(new sdk.AdminConfirmSignUpCommand({
429
+ UserPoolId: r.userPoolId,
430
+ Username: username,
431
+ }));
432
+ }
433
+ else if (op === 'enable') {
434
+ await client.send(new sdk.AdminEnableUserCommand({
435
+ UserPoolId: r.userPoolId,
436
+ Username: username,
437
+ }));
438
+ }
439
+ else if (op === 'disable') {
440
+ await client.send(new sdk.AdminDisableUserCommand({
441
+ UserPoolId: r.userPoolId,
442
+ Username: username,
443
+ }));
444
+ }
445
+ else if (op === 'reset-password') {
446
+ await client.send(new sdk.AdminResetUserPasswordCommand({
447
+ UserPoolId: r.userPoolId,
448
+ Username: username,
449
+ }));
450
+ }
451
+ sendJson(res, 200, { ok: true });
452
+ }
453
+ catch (err) {
454
+ handleSdkError(res, err);
455
+ }
456
+ }
457
+ // ── Top-level handler ───────────────────────────────────────────────
458
+ /**
459
+ * Serve the `/_dev/users` HTML page. No auth — local-dev only by virtue
460
+ * of the dev server itself binding to the project port.
461
+ */
462
+ export function serveCognitoUiPage(res) {
463
+ res.writeHead(200, {
464
+ 'Content-Type': 'text/html; charset=utf-8',
465
+ // Disable caching so changes to the page show up immediately on
466
+ // refresh — the page is generated by the CLI build, not a long-lived
467
+ // CDN asset.
468
+ 'Cache-Control': 'no-store',
469
+ });
470
+ res.end(COGNITO_UI_HTML);
471
+ }
472
+ /**
473
+ * Route a `/_dev/cognito/*` request. Returns `true` when handled (so
474
+ * the caller can `return` early), `false` when the path didn't match
475
+ * and the caller should continue normal route matching.
476
+ */
477
+ export async function handleCognitoApi(req, res, ctx) {
478
+ const url = new URL(req.url || '/', `http://localhost`);
479
+ const pathname = url.pathname;
480
+ if (!pathname.startsWith('/_dev/cognito'))
481
+ return false;
482
+ const method = (req.method || 'GET').toUpperCase();
483
+ const intentId = url.searchParams.get('intent');
484
+ // Safety guards apply uniformly to every endpoint, including the
485
+ // read-only `GET /_dev/cognito/pools`. If `vk dev` isn't running or
486
+ // the endpoint isn't loopback, we'd rather show a clear error than
487
+ // pretend to work.
488
+ const safety = safetyError();
489
+ if (safety) {
490
+ sendError(res, 403, safety.code, safety.message);
491
+ return true;
492
+ }
493
+ // ── /_dev/cognito/pools ───────────────────────────────────────────
494
+ if (pathname === '/_dev/cognito/pools' && method === 'GET') {
495
+ await listPools(res, ctx);
496
+ return true;
497
+ }
498
+ // ── /_dev/cognito/users ───────────────────────────────────────────
499
+ if (pathname === '/_dev/cognito/users') {
500
+ if (method === 'GET') {
501
+ await listUsers(res, ctx, intentId);
502
+ return true;
503
+ }
504
+ if (method === 'POST') {
505
+ const body = parseJsonBody(await readBody(req));
506
+ await createUser(res, ctx, intentId, body);
507
+ return true;
508
+ }
509
+ }
510
+ // ── /_dev/cognito/users/:username[/op] ───────────────────────────
511
+ const userMatch = pathname.match(/^\/_dev\/cognito\/users\/([^/]+)(?:\/([a-z-]+))?$/);
512
+ if (userMatch) {
513
+ const username = decodeURIComponent(userMatch[1]);
514
+ const op = userMatch[2];
515
+ if (!op && method === 'DELETE') {
516
+ await deleteUser(res, ctx, intentId, username);
517
+ return true;
518
+ }
519
+ if (op === 'password' && method === 'POST') {
520
+ const body = parseJsonBody(await readBody(req));
521
+ await setPassword(res, ctx, intentId, username, body);
522
+ return true;
523
+ }
524
+ if (op === 'attributes' && method === 'POST') {
525
+ const body = parseJsonBody(await readBody(req));
526
+ await setAttributes(res, ctx, intentId, username, body);
527
+ return true;
528
+ }
529
+ if (method === 'POST' &&
530
+ (op === 'confirm' || op === 'enable' || op === 'disable' || op === 'reset-password')) {
531
+ await simpleOp(res, ctx, intentId, username, op);
532
+ return true;
533
+ }
534
+ }
535
+ sendError(res, 404, 'NOT_FOUND', `No /_dev/cognito handler for ${method} ${pathname}`);
536
+ return true;
537
+ }
538
+ // ── Test exports ────────────────────────────────────────────────────
539
+ /** Test-only — exposes the safety check so unit tests can drive every branch. */
540
+ export const _internals = {
541
+ safetyError,
542
+ toAttrArray,
543
+ cognitoStatus,
544
+ resolvePool,
545
+ };
546
+ //# sourceMappingURL=dev-cognito-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-cognito-ui.js","sourceRoot":"","sources":["../../src/utils/dev-cognito-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAA4B,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAW3D,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAE7E;;;;;;;;;GASG;AACH,SAAS,WAAW;IAClB,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,MAAM,EAAE,CAAC;QACzC,OAAO;YACL,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,+DAA+D;SACzE,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC9C,IA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