create-ailk 0.11.1 → 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.
- package/component-catalog.json +12 -1
- package/component-catalog.md +6 -5
- package/dist/content-payloads.js +2 -2
- package/dist/module-architecture.js +11 -0
- package/dist/surfaces.d.ts +4 -5
- package/dist/surfaces.js +50 -8
- package/package.json +3 -3
- package/templates/.env.example +42 -3
- package/templates/apps/api/.env.example +5 -0
- package/templates/apps/api/src/__tests__/cors.test.ts +91 -10
- package/templates/apps/api/src/__tests__/leads-forwarded-rate-limit.test.ts +135 -0
- package/templates/apps/api/src/__tests__/server.test.ts +5 -1
- package/templates/apps/api/src/__tests__/trusted-origins.server.test.ts +135 -0
- package/templates/apps/api/src/__tests__/vercel-handler.test.ts +233 -12
- package/templates/apps/api/src/config/__tests__/trusted-origins.test.ts +238 -0
- package/templates/apps/api/src/config/index.ts +136 -0
- package/templates/apps/api/src/lib/auth-email-budget.ts +3 -2
- package/templates/apps/api/src/middleware/__tests__/adversarial/bearer-token-format.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/adversarial/cookie-or-bearer-precedence.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-bearer-skip.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-cookie-path.test.ts +2 -2
- package/templates/apps/api/src/middleware/__tests__/adversarial/csrf-trusted-origins.test.ts +142 -0
- package/templates/apps/api/src/middleware/__tests__/adversarial/session-fixation.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/adversarial/session-timeout.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/auth.bearer-path.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/auth.both-present-precedence.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/auth.cookie-path.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/auth.database-not-configured.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/auth.neither-present.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/auth.optional-cookie.test.ts +1 -1
- package/templates/apps/api/src/middleware/__tests__/rate-limit.test.ts +529 -1
- package/templates/apps/api/src/middleware/auth.ts +19 -21
- package/templates/apps/api/src/middleware/rate-limit.ts +341 -28
- package/templates/apps/api/src/routes/auth/__tests__/auth-tokens.functional.test.ts +1 -1
- package/templates/apps/api/src/routes/auth/__tests__/auth-user.functional.test.ts +1 -1
- package/templates/apps/api/src/routes/auth/__tests__/transactional-email.test.ts +105 -1
- package/templates/apps/api/src/routes/auth/transactional-email.ts +37 -9
- package/templates/apps/api/src/routes/checkout/__tests__/sessions.test.ts +168 -39
- package/templates/apps/api/src/routes/checkout/sessions.ts +20 -34
- package/templates/apps/api/src/routes/project-listings/__tests__/me.test.ts +1 -1
- package/templates/apps/api/src/server.ts +49 -16
- package/templates/apps/api/src/services/__tests__/lead-accept-user.test.ts +251 -0
- package/templates/apps/api/src/services/lead-accept-user.ts +126 -0
- package/templates/apps/api/src/vercel-handler.ts +58 -12
- package/templates/apps/mcp/__tests__/submit_lead.test.ts +81 -0
- package/templates/apps/mcp/src/tools/capture_lead.ts +4 -0
- package/templates/apps/mcp/src/tools/subscribe_newsletter.ts +3 -1
- package/templates/apps/web/.env.example +4 -0
- package/templates/apps/web/app/.well-known/ai-plugin.json/route.ts +2 -1
- package/templates/apps/web/app/.well-known/mcp.json/build-manifest.ts +14 -9
- package/templates/apps/web/app/.well-known/mcp.json/route.ts +5 -4
- package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +2 -0
- package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +69 -2
- package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +156 -0
- package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +44 -26
- package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +104 -4
- package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +57 -0
- package/templates/apps/web/app/[locale]/(authed)/__tests__/gate.test.tsx +306 -28
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/item.test.tsx +143 -0
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout.test.tsx +297 -0
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +145 -234
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/settings.test.tsx +397 -0
- package/templates/apps/web/app/[locale]/(authed)/account/__tests__/support.test.tsx +203 -0
- package/templates/apps/web/app/[locale]/(authed)/account/account-data.ts +183 -0
- package/templates/apps/web/app/[locale]/(authed)/account/account-frame.tsx +143 -0
- package/templates/apps/web/app/[locale]/(authed)/account/actions.ts +3 -1
- package/templates/apps/web/app/[locale]/(authed)/account/error-row.tsx +35 -0
- package/templates/apps/web/app/[locale]/(authed)/account/for-you-labels.ts +36 -0
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +96 -0
- package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +88 -0
- package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +120 -297
- package/templates/apps/web/app/[locale]/(authed)/account/retry-button.tsx +27 -0
- package/templates/apps/web/app/[locale]/(authed)/account/settings/color-mode.tsx +68 -0
- package/templates/apps/web/app/[locale]/(authed)/account/settings/deletion-request.tsx +55 -0
- package/templates/apps/web/app/[locale]/(authed)/account/settings/name-form.tsx +118 -0
- package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +298 -0
- package/templates/apps/web/app/[locale]/(authed)/account/settings/theme-modes.ts +32 -0
- package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +60 -0
- package/templates/apps/web/app/[locale]/(authed)/account/support/support-form.tsx +98 -0
- package/templates/apps/web/app/[locale]/(authed)/account/support-actions.ts +98 -0
- package/templates/apps/web/app/[locale]/(authed)/layout.tsx +77 -3
- package/templates/apps/web/app/[locale]/(authed)/sign-in-gate.tsx +52 -9
- package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +63 -2
- package/templates/apps/web/app/[locale]/contact/contact.actions.ts +22 -2
- package/templates/apps/web/app/[locale]/layout.tsx +98 -84
- package/templates/apps/web/app/[locale]/newsletter/__tests__/newsletter.actions.test.ts +66 -2
- package/templates/apps/web/app/[locale]/newsletter/newsletter.actions.ts +22 -6
- package/templates/apps/web/app/openapi.json/__tests__/route.test.ts +176 -0
- package/templates/apps/web/app/openapi.json/route.ts +127 -0
- package/templates/apps/web/auth.ts +102 -18
- package/templates/apps/web/components/sign-out-trigger.tsx +3 -2
- package/templates/apps/web/components/signed-in-nav.tsx +58 -0
- package/templates/apps/web/jest.config.cjs +5 -0
- package/templates/apps/web/lib/__tests__/account-config.test.ts +285 -0
- package/templates/apps/web/lib/__tests__/auth-email.test.ts +156 -1
- package/templates/apps/web/lib/__tests__/auth-routes.test.ts +41 -2
- package/templates/apps/web/lib/account-config.ts +219 -11
- package/templates/apps/web/lib/auth-email.ts +104 -2
- package/templates/apps/web/lib/auth-env.ts +37 -5
- package/templates/apps/web/lib/auth-routes.ts +33 -4
- package/templates/apps/web/messages/en.json +147 -21
- package/templates/database/CHANGELOG.md +7 -0
- package/templates/database/package.json +1 -1
- package/versions.json +33 -33
- package/templates/apps/web/app/[locale]/(authed)/account/sign-out-button.tsx +0 -39
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
* and `/verify-email`, each under next-intl's `as-needed` prefixing (bare for
|
|
9
9
|
* the default locale, `/<locale>/…` otherwise).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* `isAccountPath()` (#7430, spec 7423 D4) is the same predicate for the
|
|
12
|
+
* signed-in account area — `/account` and everything under it — which the
|
|
13
|
+
* layout also renders without the marketing chrome.
|
|
14
|
+
*
|
|
15
|
+
* No Next.js import — pure functions, asserted directly by their own suite.
|
|
12
16
|
*/
|
|
13
17
|
|
|
14
18
|
/** The five segments the `(auth)` route group serves. */
|
|
@@ -40,7 +44,33 @@ export function isAuthPath(
|
|
|
40
44
|
pathname: string | undefined | null,
|
|
41
45
|
locales: readonly string[],
|
|
42
46
|
): boolean {
|
|
43
|
-
|
|
47
|
+
const first = firstSegment(pathname, locales);
|
|
48
|
+
return AUTH_SEGMENTS.some((segment) => segment === first);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Whether `pathname` addresses the account area: `/account` or any path
|
|
53
|
+
* under it, bare or locale-prefixed (spec 7423 D4). The same prefix rule and
|
|
54
|
+
* the same fail-safe direction as `isAuthPath()` — an absent or empty
|
|
55
|
+
* pathname answers `false`, so a missing header never strips a marketing
|
|
56
|
+
* page's chrome.
|
|
57
|
+
*/
|
|
58
|
+
export function isAccountPath(
|
|
59
|
+
pathname: string | undefined | null,
|
|
60
|
+
locales: readonly string[],
|
|
61
|
+
): boolean {
|
|
62
|
+
return firstSegment(pathname, locales) === "account";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The first path segment after an enabled-locale prefix, or `undefined` for
|
|
67
|
+
* an absent or empty pathname.
|
|
68
|
+
*/
|
|
69
|
+
function firstSegment(
|
|
70
|
+
pathname: string | undefined | null,
|
|
71
|
+
locales: readonly string[],
|
|
72
|
+
): string | undefined {
|
|
73
|
+
if (!pathname) return undefined;
|
|
44
74
|
|
|
45
75
|
// Drop a query string / fragment — `x-pathname` carries the path, but a
|
|
46
76
|
// caller passing a full request path should get the same verdict.
|
|
@@ -50,6 +80,5 @@ export function isAuthPath(
|
|
|
50
80
|
? path.replace(new RegExp(`^/(${locales.join("|")})(?=/|$)`), "")
|
|
51
81
|
: path;
|
|
52
82
|
|
|
53
|
-
|
|
54
|
-
return AUTH_SEGMENTS.some((segment) => segment === first);
|
|
83
|
+
return bare.split("/")[1];
|
|
55
84
|
}
|
|
@@ -475,7 +475,16 @@
|
|
|
475
475
|
"submit": "Sign in",
|
|
476
476
|
"orContinue": "Or continue with",
|
|
477
477
|
"signInFailed": "We couldn't sign you in. Check your details and try again.",
|
|
478
|
-
"providerFailed": "We couldn't start sign-in with that provider. Try again."
|
|
478
|
+
"providerFailed": "We couldn't start sign-in with that provider. Try again.",
|
|
479
|
+
"emailLinkSubmit": "Email me a sign-in link",
|
|
480
|
+
"emailLinkDivider": "or",
|
|
481
|
+
"emailLinkSentHeading": "Check your email",
|
|
482
|
+
"emailLinkSentSubhead": "Look for a message from this site.",
|
|
483
|
+
"emailLinkBack": "Back to sign in",
|
|
484
|
+
"emailLinkSentBody": "If an account uses that address, a sign-in link is on its way. It works once and expires in 5 minutes.",
|
|
485
|
+
"emailLinkFailed": "We couldn't send a sign-in link. Try again.",
|
|
486
|
+
"emailLinkRateLimited": "Too many requests. Wait a minute, then try again.",
|
|
487
|
+
"emailLinkExpired": "That sign-in link has expired or was already used. Request a new one."
|
|
479
488
|
},
|
|
480
489
|
"auth": {
|
|
481
490
|
"signUpTitle": "Create an account",
|
|
@@ -537,20 +546,144 @@
|
|
|
537
546
|
},
|
|
538
547
|
"account": {
|
|
539
548
|
"title": "Your account",
|
|
540
|
-
"description": "
|
|
541
|
-
"
|
|
542
|
-
"
|
|
543
|
-
"
|
|
544
|
-
"
|
|
549
|
+
"description": "What changed, what's coming, and what needs you.",
|
|
550
|
+
"frame": {
|
|
551
|
+
"home": "Home",
|
|
552
|
+
"inbox": "Inbox",
|
|
553
|
+
"settings": "Settings",
|
|
554
|
+
"signOut": "Log out",
|
|
555
|
+
"help": "Help",
|
|
556
|
+
"contactSupport": "Contact support",
|
|
557
|
+
"helpCenter": "Help center",
|
|
558
|
+
"accountMenu": "Open account menu",
|
|
559
|
+
"tabBar": "Account",
|
|
560
|
+
"sidebar": "Account",
|
|
561
|
+
"collapseSidebar": "Collapse sidebar",
|
|
562
|
+
"expandSidebar": "Expand sidebar",
|
|
563
|
+
"collapseAside": "Collapse panel",
|
|
564
|
+
"expandAside": "Expand panel",
|
|
565
|
+
"openAside": "Open For you",
|
|
566
|
+
"closeAside": "Close For you"
|
|
567
|
+
},
|
|
568
|
+
"forYou": {
|
|
569
|
+
"title": "For you",
|
|
570
|
+
"filter": "Filter",
|
|
571
|
+
"allTypes": "All types",
|
|
572
|
+
"sort": "Sort",
|
|
573
|
+
"mostRelevant": "Most relevant",
|
|
574
|
+
"mostRecent": "Most recent",
|
|
575
|
+
"view": "View",
|
|
576
|
+
"open": "Open",
|
|
577
|
+
"dismiss": "Dismiss",
|
|
578
|
+
"whyItMatters": "Why it matters",
|
|
579
|
+
"expectedOutcome": "Expected outcome",
|
|
580
|
+
"waiting": "Waiting {duration}",
|
|
581
|
+
"empty": "Nothing here right now.",
|
|
582
|
+
"showAll": "Show all",
|
|
583
|
+
"close": "Close",
|
|
584
|
+
"addName": "Add your name",
|
|
585
|
+
"types": {
|
|
586
|
+
"profile": "Profile"
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
"inbox": {
|
|
590
|
+
"title": "Inbox",
|
|
591
|
+
"lead": "What changed, and what's coming.",
|
|
592
|
+
"tabs": {
|
|
593
|
+
"recents": "Recents",
|
|
594
|
+
"suggested": "Suggested",
|
|
595
|
+
"scheduled": "Scheduled",
|
|
596
|
+
"all": "All"
|
|
597
|
+
},
|
|
598
|
+
"empty": "Nothing here yet.",
|
|
599
|
+
"error": "We couldn't load everything in your Inbox.",
|
|
600
|
+
"retry": "Retry",
|
|
601
|
+
"back": "Inbox",
|
|
602
|
+
"itemError": "We couldn't load this item."
|
|
603
|
+
},
|
|
604
|
+
"support": {
|
|
605
|
+
"title": "Contact support",
|
|
606
|
+
"lead": "Tell us what you need. We'll reply to {email}.",
|
|
607
|
+
"subject": "Subject",
|
|
608
|
+
"message": "Message",
|
|
609
|
+
"submit": "Send request",
|
|
610
|
+
"submitting": "Sending…",
|
|
611
|
+
"required": "Fill in both the subject and the message.",
|
|
612
|
+
"success": "Thanks — your request is on its way. We'll reply by email.",
|
|
613
|
+
"error": "We couldn't send your request. Try again in a moment.",
|
|
614
|
+
"unavailable": "Requests can't be sent from this site yet. Email the site owner instead."
|
|
615
|
+
},
|
|
616
|
+
"settings": {
|
|
617
|
+
"title": "Settings",
|
|
618
|
+
"lead": "Your profile, sign-in, notifications and privacy.",
|
|
619
|
+
"general": {
|
|
620
|
+
"title": "General",
|
|
621
|
+
"lead": "Your name, email and appearance.",
|
|
622
|
+
"colorMode": "Color mode",
|
|
623
|
+
"light": "Light",
|
|
624
|
+
"auto": "Auto",
|
|
625
|
+
"dark": "Dark",
|
|
626
|
+
"name": "Name",
|
|
627
|
+
"namePlaceholder": "Your name",
|
|
628
|
+
"email": "Email",
|
|
629
|
+
"save": "Save changes",
|
|
630
|
+
"saving": "Saving…",
|
|
631
|
+
"saved": "Saved.",
|
|
632
|
+
"unsaved": "Unsaved changes",
|
|
633
|
+
"clean": "No unsaved changes",
|
|
634
|
+
"nameRequired": "Enter your name.",
|
|
635
|
+
"saveError": "We couldn't save your name. Try again."
|
|
636
|
+
},
|
|
637
|
+
"security": {
|
|
638
|
+
"title": "Security",
|
|
639
|
+
"lead": "The ways you can sign in to this site.",
|
|
640
|
+
"methods": "Sign-in methods",
|
|
641
|
+
"google": "Google",
|
|
642
|
+
"github": "GitHub",
|
|
643
|
+
"magicLink": "Email sign-in link",
|
|
644
|
+
"password": "Password",
|
|
645
|
+
"available": "Available",
|
|
646
|
+
"none": "No sign-in method is configured."
|
|
647
|
+
},
|
|
648
|
+
"notifications": {
|
|
649
|
+
"title": "Notifications",
|
|
650
|
+
"lead": "How this site contacts you.",
|
|
651
|
+
"placeholder": "Notification preferences are coming. Until then, we email you only about your account and your requests."
|
|
652
|
+
},
|
|
653
|
+
"privacy": {
|
|
654
|
+
"title": "Privacy",
|
|
655
|
+
"lead": "Cookies and your data.",
|
|
656
|
+
"cookies": "Cookie settings",
|
|
657
|
+
"deletion": "Request account deletion",
|
|
658
|
+
"deletionLead": "Ask the site owner to delete your account and its data. We'll confirm by email.",
|
|
659
|
+
"deletionSent": "Your deletion request is on its way. We'll confirm by email.",
|
|
660
|
+
"deletionError": "We couldn't send your request. Try again in a moment.",
|
|
661
|
+
"deletionSubject": "Account deletion request",
|
|
662
|
+
"deletionMessage": "Please delete my account and its data."
|
|
663
|
+
},
|
|
664
|
+
"billing": {
|
|
665
|
+
"title": "Billing",
|
|
666
|
+
"lead": "Your subscription.",
|
|
667
|
+
"status": "Status",
|
|
668
|
+
"accessRevokesAt": "Access ends",
|
|
669
|
+
"manage": "Manage billing",
|
|
670
|
+
"statuses": {
|
|
671
|
+
"trialing": "Trial",
|
|
672
|
+
"active": "Active",
|
|
673
|
+
"past_due": "Payment due",
|
|
674
|
+
"canceled": "Canceled"
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"gate": {
|
|
679
|
+
"emptyHeadline": "Sign-in isn't available yet",
|
|
680
|
+
"emptyDescription": "This site hasn't turned on sign-in for members yet. Check back soon, or contact the site owner.",
|
|
681
|
+
"signInLink": "Go to the sign-in page",
|
|
682
|
+
"homeLink": "Back to the site"
|
|
545
683
|
},
|
|
546
684
|
"profile": {
|
|
547
|
-
"heading": "Profile",
|
|
548
|
-
"name": "Name",
|
|
549
685
|
"email": "Email",
|
|
550
|
-
"
|
|
551
|
-
"unverified": "Email not verified",
|
|
552
|
-
"unavailable": "—",
|
|
553
|
-
"signOut": "Sign out"
|
|
686
|
+
"unverified": "Email not verified"
|
|
554
687
|
},
|
|
555
688
|
"results": {
|
|
556
689
|
"heading": "My results",
|
|
@@ -559,24 +692,17 @@
|
|
|
559
692
|
"tier": "Tier",
|
|
560
693
|
"score": "Score",
|
|
561
694
|
"completedAt": "Completed",
|
|
562
|
-
"unavailable": "—"
|
|
563
|
-
"emptyHeadline": "No results yet",
|
|
564
|
-
"emptyDescription": "Complete a diagnostic and your results will appear here."
|
|
695
|
+
"unavailable": "—"
|
|
565
696
|
},
|
|
566
697
|
"purchases": {
|
|
567
698
|
"heading": "My purchases",
|
|
568
699
|
"offer": "Offer",
|
|
569
|
-
"status": "Status",
|
|
570
700
|
"amount": "Amount",
|
|
571
701
|
"period": "Period",
|
|
572
|
-
"date": "Date"
|
|
573
|
-
"emptyHeadline": "No purchases yet",
|
|
574
|
-
"emptyDescription": "Purchases you complete will appear here."
|
|
702
|
+
"date": "Date"
|
|
575
703
|
},
|
|
576
704
|
"subscription": {
|
|
577
705
|
"headline": "Your payment didn't go through",
|
|
578
|
-
"descriptionPastDue": "Update your card to keep your subscription active.",
|
|
579
|
-
"descriptionCanceled": "Your subscription was canceled. Update your card by {date} to keep your access.",
|
|
580
706
|
"action": "Update payment method"
|
|
581
707
|
}
|
|
582
708
|
},
|
|
@@ -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
|
package/versions.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@working-theory/admin-ui": "0.
|
|
3
|
-
"@working-theory/aeo": "0.
|
|
4
|
-
"@working-theory/agent-context": "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.
|
|
9
|
-
"@working-theory/api-client": "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.
|
|
12
|
-
"@working-theory/common": "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.
|
|
15
|
-
"@working-theory/content-projection": "0.
|
|
16
|
-
"@working-theory/email": "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.
|
|
19
|
-
"@working-theory/fumadocs-schema": "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.
|
|
22
|
-
"@working-theory/license": "0.
|
|
23
|
-
"@working-theory/metadata": "0.
|
|
24
|
-
"@working-theory/observability": "0.
|
|
25
|
-
"@working-theory/page-renderer": "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.
|
|
28
|
-
"@working-theory/schema-pack-registry": "0.
|
|
29
|
-
"@working-theory/schema-validator": "0.
|
|
30
|
-
"@working-theory/sections-registry": "0.
|
|
31
|
-
"@working-theory/site-config": "0.
|
|
32
|
-
"@working-theory/stripe-client": "0.
|
|
33
|
-
"@working-theory/templates": "0.
|
|
34
|
-
"@working-theory/theme": "0.
|
|
35
|
-
"@working-theory/ui": "0.
|
|
36
|
-
"@working-theory/validation": "0.
|
|
37
|
-
"@working-theory/web-i18n": "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.
|
|
45
|
-
"@working-theory/ui-docs-blog": "0.23.
|
|
46
|
-
"@working-theory/ui-scheduling": "0.23.
|
|
47
|
-
"@working-theory/ui-signal-collectors": "0.24.
|
|
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.
|
|
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
|
-
}
|