create-ailk 0.11.2 → 0.11.3

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 (76) hide show
  1. package/component-catalog.json +12 -1
  2. package/component-catalog.md +6 -5
  3. package/dist/surfaces.d.ts +4 -5
  4. package/dist/surfaces.js +50 -8
  5. package/package.json +3 -3
  6. package/templates/.env.example +29 -0
  7. package/templates/apps/api/src/__tests__/leads-forwarded-rate-limit.test.ts +135 -0
  8. package/templates/apps/api/src/__tests__/vercel-handler.test.ts +233 -12
  9. package/templates/apps/api/src/lib/auth-email-budget.ts +3 -2
  10. package/templates/apps/api/src/middleware/__tests__/rate-limit.test.ts +529 -1
  11. package/templates/apps/api/src/middleware/rate-limit.ts +341 -28
  12. package/templates/apps/api/src/routes/auth/__tests__/transactional-email.test.ts +105 -1
  13. package/templates/apps/api/src/routes/auth/transactional-email.ts +37 -9
  14. package/templates/apps/api/src/server.ts +28 -0
  15. package/templates/apps/api/src/services/__tests__/lead-accept-user.test.ts +251 -0
  16. package/templates/apps/api/src/services/lead-accept-user.ts +126 -0
  17. package/templates/apps/api/src/vercel-handler.ts +58 -12
  18. package/templates/apps/mcp/__tests__/submit_lead.test.ts +81 -0
  19. package/templates/apps/mcp/src/tools/capture_lead.ts +4 -0
  20. package/templates/apps/mcp/src/tools/subscribe_newsletter.ts +3 -1
  21. package/templates/apps/web/.env.example +4 -0
  22. package/templates/apps/web/app/.well-known/ai-plugin.json/route.ts +2 -1
  23. package/templates/apps/web/app/.well-known/mcp.json/build-manifest.ts +14 -9
  24. package/templates/apps/web/app/.well-known/mcp.json/route.ts +5 -4
  25. package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +2 -0
  26. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +69 -2
  27. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +156 -0
  28. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +44 -26
  29. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +104 -4
  30. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +57 -0
  31. package/templates/apps/web/app/[locale]/(authed)/__tests__/gate.test.tsx +306 -28
  32. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/item.test.tsx +143 -0
  33. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout.test.tsx +297 -0
  34. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +145 -234
  35. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/settings.test.tsx +397 -0
  36. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/support.test.tsx +203 -0
  37. package/templates/apps/web/app/[locale]/(authed)/account/account-data.ts +183 -0
  38. package/templates/apps/web/app/[locale]/(authed)/account/account-frame.tsx +143 -0
  39. package/templates/apps/web/app/[locale]/(authed)/account/actions.ts +3 -1
  40. package/templates/apps/web/app/[locale]/(authed)/account/error-row.tsx +35 -0
  41. package/templates/apps/web/app/[locale]/(authed)/account/for-you-labels.ts +36 -0
  42. package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +96 -0
  43. package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +88 -0
  44. package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +120 -297
  45. package/templates/apps/web/app/[locale]/(authed)/account/retry-button.tsx +27 -0
  46. package/templates/apps/web/app/[locale]/(authed)/account/settings/color-mode.tsx +68 -0
  47. package/templates/apps/web/app/[locale]/(authed)/account/settings/deletion-request.tsx +55 -0
  48. package/templates/apps/web/app/[locale]/(authed)/account/settings/name-form.tsx +118 -0
  49. package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +298 -0
  50. package/templates/apps/web/app/[locale]/(authed)/account/settings/theme-modes.ts +32 -0
  51. package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +60 -0
  52. package/templates/apps/web/app/[locale]/(authed)/account/support/support-form.tsx +98 -0
  53. package/templates/apps/web/app/[locale]/(authed)/account/support-actions.ts +98 -0
  54. package/templates/apps/web/app/[locale]/(authed)/layout.tsx +77 -3
  55. package/templates/apps/web/app/[locale]/(authed)/sign-in-gate.tsx +52 -9
  56. package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +63 -2
  57. package/templates/apps/web/app/[locale]/contact/contact.actions.ts +22 -2
  58. package/templates/apps/web/app/[locale]/layout.tsx +41 -28
  59. package/templates/apps/web/app/[locale]/newsletter/__tests__/newsletter.actions.test.ts +66 -2
  60. package/templates/apps/web/app/[locale]/newsletter/newsletter.actions.ts +22 -6
  61. package/templates/apps/web/app/openapi.json/__tests__/route.test.ts +176 -0
  62. package/templates/apps/web/app/openapi.json/route.ts +127 -0
  63. package/templates/apps/web/auth.ts +29 -5
  64. package/templates/apps/web/jest.config.cjs +5 -0
  65. package/templates/apps/web/lib/__tests__/account-config.test.ts +285 -0
  66. package/templates/apps/web/lib/__tests__/auth-email.test.ts +156 -1
  67. package/templates/apps/web/lib/__tests__/auth-routes.test.ts +41 -2
  68. package/templates/apps/web/lib/account-config.ts +219 -11
  69. package/templates/apps/web/lib/auth-email.ts +104 -2
  70. package/templates/apps/web/lib/auth-env.ts +37 -5
  71. package/templates/apps/web/lib/auth-routes.ts +33 -4
  72. package/templates/apps/web/messages/en.json +147 -21
  73. package/templates/database/CHANGELOG.md +7 -0
  74. package/templates/database/package.json +1 -1
  75. package/versions.json +33 -33
  76. package/templates/apps/web/app/[locale]/(authed)/account/sign-out-button.tsx +0 -39
@@ -1,5 +1,12 @@
1
1
  # @working-theory/database
2
2
 
3
+ ## 0.31.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`9ee4e93`](https://github.com/Working-Theory-Labs/ai-launch-kit-internal/commit/9ee4e93b52ff57d23bc6f9b5c49ac7b2a742413c)]:
8
+ - @working-theory/validation@0.31.0
9
+
3
10
  ## 0.30.0
4
11
 
5
12
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@working-theory/database",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/versions.json CHANGED
@@ -1,52 +1,52 @@
1
1
  {
2
- "@working-theory/admin-ui": "0.30.0",
3
- "@working-theory/aeo": "0.30.0",
4
- "@working-theory/agent-context": "0.30.0",
2
+ "@working-theory/admin-ui": "0.31.0",
3
+ "@working-theory/aeo": "0.31.0",
4
+ "@working-theory/agent-context": "0.31.0",
5
5
  "@working-theory/agent-contract": "0.1.0",
6
6
  "@working-theory/agent-memory": "0.0.0",
7
7
  "@working-theory/ai": "0.1.0",
8
- "@working-theory/analytics": "0.30.0",
9
- "@working-theory/api-client": "0.30.0",
8
+ "@working-theory/analytics": "0.31.0",
9
+ "@working-theory/api-client": "0.31.0",
10
10
  "@working-theory/cda-filesystem": "0.0.0",
11
- "@working-theory/cli": "0.30.0",
12
- "@working-theory/common": "0.30.0",
11
+ "@working-theory/cli": "0.31.0",
12
+ "@working-theory/common": "0.31.0",
13
13
  "@working-theory/consent": "0.1.0",
14
- "@working-theory/content-adapters": "0.30.0",
15
- "@working-theory/content-projection": "0.30.0",
16
- "@working-theory/email": "0.30.0",
14
+ "@working-theory/content-adapters": "0.31.0",
15
+ "@working-theory/content-projection": "0.31.0",
16
+ "@working-theory/email": "0.31.0",
17
17
  "@working-theory/env": "0.0.0",
18
- "@working-theory/eslint-config": "0.30.0",
19
- "@working-theory/fumadocs-schema": "0.30.0",
18
+ "@working-theory/eslint-config": "0.31.0",
19
+ "@working-theory/fumadocs-schema": "0.31.0",
20
20
  "@working-theory/ids": "0.8.0",
21
- "@working-theory/jsonld": "0.30.0",
22
- "@working-theory/license": "0.30.0",
23
- "@working-theory/metadata": "0.30.0",
24
- "@working-theory/observability": "0.30.0",
25
- "@working-theory/page-renderer": "0.30.0",
21
+ "@working-theory/jsonld": "0.31.0",
22
+ "@working-theory/license": "0.31.0",
23
+ "@working-theory/metadata": "0.31.0",
24
+ "@working-theory/observability": "0.31.0",
25
+ "@working-theory/page-renderer": "0.31.0",
26
26
  "@working-theory/plugin-mcp": "0.1.1",
27
- "@working-theory/schema": "0.30.0",
28
- "@working-theory/schema-pack-registry": "0.30.0",
29
- "@working-theory/schema-validator": "0.30.0",
30
- "@working-theory/sections-registry": "0.30.0",
31
- "@working-theory/site-config": "0.30.0",
32
- "@working-theory/stripe-client": "0.30.0",
33
- "@working-theory/templates": "0.30.0",
34
- "@working-theory/theme": "0.30.0",
35
- "@working-theory/ui": "0.30.0",
36
- "@working-theory/validation": "0.30.0",
37
- "@working-theory/web-i18n": "0.30.0",
27
+ "@working-theory/schema": "0.31.0",
28
+ "@working-theory/schema-pack-registry": "0.31.0",
29
+ "@working-theory/schema-validator": "0.31.0",
30
+ "@working-theory/sections-registry": "0.31.0",
31
+ "@working-theory/site-config": "0.31.0",
32
+ "@working-theory/stripe-client": "0.31.0",
33
+ "@working-theory/templates": "0.31.0",
34
+ "@working-theory/theme": "0.31.0",
35
+ "@working-theory/ui": "0.31.0",
36
+ "@working-theory/validation": "0.31.0",
37
+ "@working-theory/web-i18n": "0.31.0",
38
38
  "@working-theory/billing-client": "0.0.0",
39
39
  "@working-theory/branding": "0.0.0",
40
40
  "@working-theory/license-client": "0.0.0",
41
41
  "@working-theory/license-manifest": "0.0.0",
42
42
  "@working-theory/partner-session": "0.0.0",
43
43
  "@working-theory/preview-protocol": "0.0.0",
44
- "@working-theory/ui-commerce": "0.23.7",
45
- "@working-theory/ui-docs-blog": "0.23.7",
46
- "@working-theory/ui-scheduling": "0.23.7",
47
- "@working-theory/ui-signal-collectors": "0.24.5",
44
+ "@working-theory/ui-commerce": "0.23.8",
45
+ "@working-theory/ui-docs-blog": "0.23.8",
46
+ "@working-theory/ui-scheduling": "0.23.8",
47
+ "@working-theory/ui-signal-collectors": "0.24.6",
48
48
  "@working-theory/web": "0.0.0",
49
49
  "@working-theory/api": "1.0.0",
50
50
  "@working-theory/mcp": "0.0.0",
51
- "@working-theory/database": "0.30.0"
51
+ "@working-theory/database": "0.31.0"
52
52
  }
@@ -1,39 +0,0 @@
1
- "use client"; // sign-out is a client-side Better Auth call + router navigation
2
-
3
- /**
4
- * SignOutButton — the /account profile section's sign-out control (#4984).
5
- *
6
- * `createAuthClient()` at module scope is the `sign-in-gate.tsx` idiom. On
7
- * click: end the session, then navigate home and refresh so every RSC under
8
- * the `(authed)` gate re-reads the (now absent) session.
9
- */
10
-
11
- import { Button } from "@working-theory/ui/primitives";
12
- import { createAuthClient } from "better-auth/react";
13
- import { useRouter } from "next/navigation";
14
- import type { ReactElement } from "react";
15
-
16
- const authClient = createAuthClient();
17
-
18
- export interface SignOutButtonProps {
19
- /** Visible button label (`account.profile.signOut`). */
20
- label: string;
21
- /** Where to land after sign-out — `localeHref(locale, "/")`. */
22
- homeHref: string;
23
- }
24
-
25
- export function SignOutButton({ label, homeHref }: SignOutButtonProps): ReactElement {
26
- const router = useRouter();
27
- const onSignOut = (): void => {
28
- void (async () => {
29
- await authClient.signOut();
30
- router.push(homeHref);
31
- router.refresh();
32
- })();
33
- };
34
- return (
35
- <Button variant="outline" onClick={onSignOut} data-testid="account-sign-out">
36
- {label}
37
- </Button>
38
- );
39
- }