create-ailk 0.38.0 → 0.40.0
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/add-route.js +16 -1
- package/dist/body-heading.d.ts +2 -1
- package/dist/body-heading.js +31 -3
- package/dist/derive-architecture.js +3 -1
- package/dist/module-architecture.js +0 -3
- package/dist/remove-module.js +27 -14
- package/dist/routes.d.ts +36 -2
- package/dist/routes.js +269 -23
- package/dist/site-manifest.js +6 -4
- package/dist/site-roster.d.ts +11 -3
- package/dist/site-roster.js +48 -22
- package/dist/surfaces.d.ts +13 -3
- package/dist/surfaces.js +128 -194
- package/dist/sync-routes.js +22 -5
- package/dist/template-record.js +3 -1
- package/dist/topology.d.ts +11 -0
- package/dist/topology.js +253 -3
- package/package.json +3 -3
- package/templates/apps/web/CLAUDE.md +32 -4
- package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +6 -1
- package/templates/apps/web/__tests__/__mocks__/next-intl.ts +6 -1
- package/templates/apps/web/__tests__/auth/seam.test.ts +34 -0
- package/templates/apps/web/account.config.tsx +2 -3
- package/templates/apps/web/app/[locale]/(authed)/account/connect/__tests__/page.test.tsx +1 -1
- package/templates/apps/web/app/[locale]/(authed)/account/connect/page.tsx +1 -1
- package/templates/apps/web/app/[locale]/(authed)/signed-out-gate.generated.tsx +1 -1
- package/templates/apps/web/app/[locale]/layout.tsx +2 -2
- package/templates/apps/web/auth.config.tsx +107 -0
- package/templates/apps/web/auth.ts +2 -1
- package/templates/apps/web/i18n/request.ts +13 -2
- package/templates/apps/web/jest.config.cjs +10 -0
- package/templates/apps/web/lib/__tests__/deck-page.test.ts +9 -0
- package/templates/apps/web/lib/__tests__/fixtures/site-topology.ts +3 -0
- package/templates/apps/web/lib/__tests__/in-page-magnet-self-request.test.ts +1 -1
- package/templates/apps/web/lib/__tests__/in-page-magnet.test.ts +2 -2
- package/templates/apps/web/lib/__tests__/pricing-page.test.ts +1 -1
- package/templates/apps/web/lib/__tests__/server-api.test.ts +1 -1
- package/templates/apps/web/lib/__tests__/structured-data.test.tsx +17 -4
- package/templates/apps/web/lib/in-page-magnet.ts +2 -2
- package/templates/apps/web/lib/pricing-page.ts +3 -3
- package/templates/apps/web/lib/server-api.ts +1 -1
- package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-email.ts +1 -1
- package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-lines.ts +1 -1
- package/templates/apps/web/lib/site-header.ts +1 -1
- package/templates/apps/web/lib/topology.generated.ts +5 -0
- package/templates/apps/web/messages/en.json +0 -271
- package/templates/apps/web/middleware.ts +12 -25
- package/templates/apps/web/next.config.mjs +15 -0
- package/templates/apps/web/package.json +2 -0
- package/templates/apps/web/site-pages.config.tsx +85 -0
- package/templates/apps/web/types/messages.d.ts +6 -1
- package/templates/tools/body-heading.ts +30 -3
- package/versions.json +50 -48
- package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +0 -322
- package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +0 -554
- package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/consent-actions.test.ts +0 -56
- package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/page.test.tsx +0 -164
- package/templates/apps/web/app/[locale]/(auth)/consent/consent-form.tsx +0 -132
- package/templates/apps/web/app/[locale]/(auth)/consent/consent.actions.ts +0 -51
- package/templates/apps/web/app/[locale]/(auth)/consent/page.tsx +0 -144
- package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +0 -101
- package/templates/apps/web/app/[locale]/(auth)/forgot-password/page.tsx +0 -111
- package/templates/apps/web/app/[locale]/(auth)/layout.tsx +0 -81
- package/templates/apps/web/app/[locale]/(auth)/legal-footnote.tsx +0 -35
- package/templates/apps/web/app/[locale]/(auth)/reset-password/__tests__/return.test.tsx +0 -179
- package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +0 -157
- package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +0 -126
- package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/next-path.test.ts +0 -54
- package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +0 -628
- package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/remembered-method.test.ts +0 -43
- package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +0 -266
- package/templates/apps/web/app/[locale]/(auth)/sign-in/next-path.ts +0 -20
- package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +0 -234
- package/templates/apps/web/app/[locale]/(auth)/sign-in/remembered-method.ts +0 -37
- package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +0 -323
- package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +0 -93
- package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +0 -301
- package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +0 -309
- package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +0 -201
- package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +0 -366
- package/templates/apps/web/app/[locale]/(auth)/use-auth-card-flow.ts +0 -116
- package/templates/apps/web/app/[locale]/(auth)/verify-email/__tests__/actions.test.ts +0 -94
- package/templates/apps/web/app/[locale]/(auth)/verify-email/actions.ts +0 -77
- package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +0 -154
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +0 -2
- package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +0 -12
- package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +0 -12
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +0 -12
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/route.ts +0 -2
- package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +0 -12
- package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +0 -10
- package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/onboarding/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +0 -12
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +0 -2
- package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +0 -2
- package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +0 -3
- package/templates/apps/web/app/[locale]/(authed)/leads/__tests__/page.test.tsx +0 -205
- package/templates/apps/web/app/[locale]/(authed)/leads/components/LeadsTable.tsx +0 -137
- package/templates/apps/web/app/[locale]/(authed)/leads/page.tsx +0 -122
- package/templates/apps/web/app/[locale]/(authed)/waitlist/components/ForbiddenState.tsx +0 -24
- package/templates/apps/web/app/[locale]/(authed)/waitlist/format.ts +0 -111
- package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +0 -402
- package/templates/apps/web/app/[locale]/[slug]/[detail]/page.tsx +0 -143
- package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +0 -148
- package/templates/apps/web/app/[locale]/[slug]/page.tsx +0 -109
- package/templates/apps/web/app/[locale]/about/[slug]/page.tsx +0 -46
- package/templates/apps/web/app/[locale]/about/__tests__/about-routes.test.tsx +0 -353
- package/templates/apps/web/app/[locale]/about/page.tsx +0 -122
- package/templates/apps/web/app/[locale]/alternatives/__tests__/page.test.tsx +0 -161
- package/templates/apps/web/app/[locale]/alternatives/page.tsx +0 -112
- package/templates/apps/web/app/[locale]/careers/[slug]/[action]/page.tsx +0 -244
- package/templates/apps/web/app/[locale]/careers/[slug]/apply.actions.ts +0 -325
- package/templates/apps/web/app/[locale]/careers/[slug]/job-application-form.ts +0 -120
- package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +0 -73
- package/templates/apps/web/app/[locale]/careers/__tests__/apply.actions.test.ts +0 -497
- package/templates/apps/web/app/[locale]/careers/__tests__/careers-hub.test.tsx +0 -172
- package/templates/apps/web/app/[locale]/careers/__tests__/careers-set.test.tsx +0 -153
- package/templates/apps/web/app/[locale]/careers/__tests__/job-application-form.test.ts +0 -141
- package/templates/apps/web/app/[locale]/careers/__tests__/job-apply-page.test.tsx +0 -546
- package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +0 -189
- package/templates/apps/web/app/[locale]/careers/page.tsx +0 -165
- package/templates/apps/web/app/[locale]/case-studies/[slug]/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/case-studies/__tests__/hub-children.test.tsx +0 -65
- package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +0 -125
- package/templates/apps/web/app/[locale]/case-studies/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +0 -85
- package/templates/apps/web/app/[locale]/clients/page.tsx +0 -47
- package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +0 -249
- package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +0 -400
- package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-magnet.test.ts +0 -138
- package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-text.test.ts +0 -49
- package/templates/apps/web/app/[locale]/contact/__tests__/contact-magnet-page.test.tsx +0 -494
- package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +0 -1122
- package/templates/apps/web/app/[locale]/contact/__tests__/intake-analytics.test.ts +0 -51
- package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +0 -319
- package/templates/apps/web/app/[locale]/contact/contact-form-magnet.ts +0 -77
- package/templates/apps/web/app/[locale]/contact/contact-form-text.ts +0 -52
- package/templates/apps/web/app/[locale]/contact/contact.actions.ts +0 -403
- package/templates/apps/web/app/[locale]/contact/intake-analytics.ts +0 -49
- package/templates/apps/web/app/[locale]/contact/intake-script.ts +0 -92
- package/templates/apps/web/app/[locale]/contact/page.tsx +0 -267
- package/templates/apps/web/app/[locale]/courses/[slug]/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/courses/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +0 -123
- package/templates/apps/web/app/[locale]/courses/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/events/[slug]/page.tsx +0 -57
- package/templates/apps/web/app/[locale]/events/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +0 -164
- package/templates/apps/web/app/[locale]/events/__tests__/program-event.test.tsx +0 -120
- package/templates/apps/web/app/[locale]/events/page.tsx +0 -60
- package/templates/apps/web/app/[locale]/faq/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/features/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/features/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/features/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/for/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/for/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +0 -90
- package/templates/apps/web/app/[locale]/for/page.tsx +0 -51
- package/templates/apps/web/app/[locale]/glossary/page.tsx +0 -53
- package/templates/apps/web/app/[locale]/how-to/[slug]/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +0 -78
- package/templates/apps/web/app/[locale]/how-to/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/integrations/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/integrations/__tests__/hub-children.test.tsx +0 -38
- package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +0 -141
- package/templates/apps/web/app/[locale]/integrations/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/launch-service/page.tsx +0 -44
- package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +0 -236
- package/templates/apps/web/app/[locale]/newsletter/page.tsx +0 -179
- package/templates/apps/web/app/[locale]/page.tsx +0 -147
- package/templates/apps/web/app/[locale]/partners/[slug]/page.tsx +0 -45
- package/templates/apps/web/app/[locale]/partners/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +0 -125
- package/templates/apps/web/app/[locale]/partners/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +0 -46
- package/templates/apps/web/app/[locale]/portfolio/__tests__/hub-children.test.tsx +0 -38
- package/templates/apps/web/app/[locale]/portfolio/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/pricing/[slug]/__tests__/page.test.tsx +0 -324
- package/templates/apps/web/app/[locale]/pricing/[slug]/page.tsx +0 -87
- package/templates/apps/web/app/[locale]/pricing/__tests__/__snapshots__/unconnected.test.tsx.snap +0 -7
- package/templates/apps/web/app/[locale]/pricing/__tests__/offerings.test.tsx +0 -605
- package/templates/apps/web/app/[locale]/pricing/__tests__/page.test.tsx +0 -219
- package/templates/apps/web/app/[locale]/pricing/__tests__/pricing-pages.test.tsx +0 -215
- package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +0 -282
- package/templates/apps/web/app/[locale]/pricing/page.tsx +0 -120
- package/templates/apps/web/app/[locale]/privacy/page.tsx +0 -40
- package/templates/apps/web/app/[locale]/products/[slug]/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/products/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +0 -141
- package/templates/apps/web/app/[locale]/products/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/projects/[slug]/page.tsx +0 -37
- package/templates/apps/web/app/[locale]/projects/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +0 -157
- package/templates/apps/web/app/[locale]/projects/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/purchase-policy/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/resources/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/resources/__tests__/hub-children.test.tsx +0 -38
- package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +0 -151
- package/templates/apps/web/app/[locale]/resources/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/services/[slug]/[child]/page.tsx +0 -68
- package/templates/apps/web/app/[locale]/services/[slug]/page.tsx +0 -88
- package/templates/apps/web/app/[locale]/services/__tests__/hub-children.test.tsx +0 -158
- package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +0 -187
- package/templates/apps/web/app/[locale]/services/__tests__/service-detail-sections.test.tsx +0 -224
- package/templates/apps/web/app/[locale]/services/__tests__/service-families.test.tsx +0 -368
- package/templates/apps/web/app/[locale]/services/page.tsx +0 -71
- package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +0 -81
- package/templates/apps/web/app/[locale]/software/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/team/[slug]/page.tsx +0 -45
- package/templates/apps/web/app/[locale]/team/__tests__/hub-children.test.tsx +0 -32
- package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +0 -161
- package/templates/apps/web/app/[locale]/team/page.tsx +0 -50
- package/templates/apps/web/app/[locale]/tech-articles/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +0 -82
- package/templates/apps/web/app/[locale]/tech-articles/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/templates/[slug]/__tests__/page.test.tsx +0 -203
- package/templates/apps/web/app/[locale]/templates/[slug]/page.tsx +0 -81
- package/templates/apps/web/app/[locale]/templates/__tests__/page.test.tsx +0 -237
- package/templates/apps/web/app/[locale]/templates/page.tsx +0 -114
- package/templates/apps/web/app/[locale]/terms/page.tsx +0 -40
- package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +0 -85
- package/templates/apps/web/app/[locale]/testimonials/page.tsx +0 -51
- package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +0 -136
- package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +0 -39
- package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe-rsc-boundary.test.tsx +0 -226
- package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe.test.tsx +0 -217
- package/templates/apps/web/app/[locale]/unsubscribe/page.tsx +0 -106
- package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe-button.tsx +0 -94
- package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe.actions.ts +0 -55
- package/templates/apps/web/app/[locale]/vs/[slug]/__tests__/page.test.tsx +0 -100
- package/templates/apps/web/app/[locale]/vs/[slug]/page.tsx +0 -60
- package/templates/apps/web/app/[locale]/whitepapers/[slug]/page.tsx +0 -54
- package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +0 -82
- package/templates/apps/web/app/[locale]/whitepapers/page.tsx +0 -49
- package/templates/apps/web/app/[locale]/working-agreement/__tests__/page.test.tsx +0 -63
- package/templates/apps/web/app/[locale]/working-agreement/page.tsx +0 -41
- package/templates/apps/web/app/api/auth/[...all]/route.ts +0 -16
- package/templates/apps/web/app/api/auth/hub/__tests__/continuation.test.ts +0 -143
- package/templates/apps/web/app/api/auth/hub/__tests__/entry-routes.test.ts +0 -749
- package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +0 -964
- package/templates/apps/web/app/api/auth/hub/authorize/route.ts +0 -390
- package/templates/apps/web/app/api/auth/hub/continuation.ts +0 -127
- package/templates/apps/web/app/api/auth/hub/continue/[ref]/__tests__/route.test.ts +0 -188
- package/templates/apps/web/app/api/auth/hub/continue/[ref]/route.ts +0 -53
- package/templates/apps/web/app/api/auth/hub/email/route.ts +0 -111
- package/templates/apps/web/app/api/auth/hub/entry-shared.ts +0 -163
- package/templates/apps/web/app/api/auth/hub/password/__tests__/return.test.ts +0 -86
- package/templates/apps/web/app/api/auth/hub/password/__tests__/route.test.ts +0 -368
- package/templates/apps/web/app/api/auth/hub/password/return.ts +0 -86
- package/templates/apps/web/app/api/auth/hub/password/route.ts +0 -171
- package/templates/apps/web/app/api/auth/hub/purchase/route.ts +0 -230
- package/templates/apps/web/app/api/auth/hub/purchase-link/route.ts +0 -174
- package/templates/apps/web/app/api/auth/hub/sign-up/route.ts +0 -60
- package/templates/apps/web/app/api/auth/hub/sign-up-evidence.ts +0 -97
- package/templates/apps/web/app/api/auth/mcp/__tests__/continuation.test.ts +0 -92
- package/templates/apps/web/app/api/auth/mcp/continuation.ts +0 -89
- package/templates/apps/web/app/api/auth/mcp/continue/[ref]/__tests__/route.test.ts +0 -59
- package/templates/apps/web/app/api/auth/mcp/continue/[ref]/route.ts +0 -41
- package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +0 -1166
- package/templates/apps/web/app/api/hub-session/callback/route.ts +0 -134
- package/templates/apps/web/app/api/hub-session/email/route.ts +0 -125
- package/templates/apps/web/app/api/hub-session/one-tap/nonce/route.ts +0 -49
- package/templates/apps/web/app/api/hub-session/one-tap/route.ts +0 -106
- package/templates/apps/web/app/api/hub-session/open/route.ts +0 -111
- package/templates/apps/web/app/api/hub-session/password/return/route.ts +0 -69
- package/templates/apps/web/app/api/hub-session/password/route.ts +0 -106
- package/templates/apps/web/app/api/hub-session/sign-in/route.ts +0 -91
- package/templates/apps/web/app/api/hub-session/sign-out/route.ts +0 -54
- package/templates/apps/web/components/sign-out-trigger.tsx +0 -62
- package/templates/apps/web/lib/__tests__/auth-routes.test.ts +0 -140
- package/templates/apps/web/lib/__tests__/hub-children.fixtures.ts +0 -279
- package/templates/apps/web/lib/__tests__/route-family.test.ts +0 -57
- package/templates/apps/web/lib/__tests__/service-listing.test.ts +0 -111
- package/templates/apps/web/lib/__tests__/template-listing.test.ts +0 -158
- package/templates/apps/web/lib/auth-routes.ts +0 -125
- package/templates/apps/web/lib/hub-children.tsx +0 -351
- package/templates/apps/web/lib/hub-session/__tests__/hub-session.test.ts +0 -433
- package/templates/apps/web/lib/hub-session/__tests__/spoke-sign-in.test.tsx +0 -332
- package/templates/apps/web/lib/hub-session/config.ts +0 -110
- package/templates/apps/web/lib/hub-session/entry.ts +0 -238
- package/templates/apps/web/lib/hub-session/index.ts +0 -21
- package/templates/apps/web/lib/hub-session/one-tap.tsx +0 -148
- package/templates/apps/web/lib/hub-session/reseal.ts +0 -90
- package/templates/apps/web/lib/hub-session/seal.ts +0 -86
- package/templates/apps/web/lib/hub-session/session.ts +0 -298
- package/templates/apps/web/lib/hub-session/spoke-sign-in.tsx +0 -277
- package/templates/apps/web/lib/meet-placeholder.ts +0 -5
- package/templates/apps/web/lib/next-path.ts +0 -35
- package/templates/apps/web/lib/posting-title.ts +0 -39
- package/templates/apps/web/lib/route-family.ts +0 -69
- package/templates/apps/web/lib/service-listing.ts +0 -89
- package/templates/apps/web/lib/template-listing.ts +0 -169
- package/templates/apps/web/src/lib/__tests__/lead-write.test.ts +0 -187
- package/templates/apps/web/src/lib/lead-write.ts +0 -90
- /package/templates/apps/web/{app/[locale]/contact → lib}/__tests__/site-contact-lines.test.ts +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The site's sign-in configuration (#11257; ADR 0040 rule 4) — the one typed
|
|
3
|
+
* file through which this site customizes and serves `@working-theory/auth`.
|
|
4
|
+
*
|
|
5
|
+
* The default export is `defineAuthConfig({ … })`, which the generated
|
|
6
|
+
* `(auth)` layout file passes to the layout as `config`; it carries no
|
|
7
|
+
* extension point yet (rule 8), and a misspelled key fails `tsc`.
|
|
8
|
+
*
|
|
9
|
+
* The named export `site` is the runtime-services seam (`AuthSite`) the
|
|
10
|
+
* package's pages, actions and handlers read through
|
|
11
|
+
* `@working-theory/auth/site` (aliased here by `next.config.mjs` and
|
|
12
|
+
* `jest.config.cjs`). It never imports `./auth`: Better Auth arrives through
|
|
13
|
+
* the generated topology seam's `loadAuth()` — a dynamic import on a hub,
|
|
14
|
+
* `null` on a spoke — so a spoke keeps this file. A spoke's copy passes
|
|
15
|
+
* `hub: null` and imports none of the hub-only libs.
|
|
16
|
+
*
|
|
17
|
+
* Every value the generated topology seam owns is read through on access,
|
|
18
|
+
* never copied at load: a spoke's topology seam imports the package's
|
|
19
|
+
* hub-session entry, which can load before this file finishes.
|
|
20
|
+
*/
|
|
21
|
+
import { type AuthSite, defineAuthConfig } from "@working-theory/auth";
|
|
22
|
+
|
|
23
|
+
import { browserApiOrigin } from "./lib/api-origin.generated";
|
|
24
|
+
import {
|
|
25
|
+
buildAuthEmailRequest,
|
|
26
|
+
confirmSignUpEmail,
|
|
27
|
+
makeSendAccountOpen,
|
|
28
|
+
purchaseCapture,
|
|
29
|
+
} from "./lib/auth-email";
|
|
30
|
+
import {
|
|
31
|
+
getActiveProviderIds,
|
|
32
|
+
hasAnyProvider,
|
|
33
|
+
isAuthRequired,
|
|
34
|
+
isResetAvailable,
|
|
35
|
+
isSignUpOpen,
|
|
36
|
+
magicLinkSendConfigured,
|
|
37
|
+
phoneVerificationConfigured,
|
|
38
|
+
resetSendConfigured,
|
|
39
|
+
} from "./lib/auth-env";
|
|
40
|
+
import { resolveSecret } from "./lib/auth-secret";
|
|
41
|
+
import { runBotCheck } from "./lib/bot-check";
|
|
42
|
+
import { consentPoliciesFor } from "./lib/consent-policies";
|
|
43
|
+
import { SITE_NAME } from "./lib/site-brand";
|
|
44
|
+
import { siteLogo } from "./lib/site-logo";
|
|
45
|
+
import {
|
|
46
|
+
loadAuth,
|
|
47
|
+
readSession,
|
|
48
|
+
SIGN_IN_PROVIDER,
|
|
49
|
+
SIGN_OUT_ENDPOINT,
|
|
50
|
+
TOPOLOGY,
|
|
51
|
+
} from "./lib/topology.generated";
|
|
52
|
+
import {
|
|
53
|
+
clientIpFromHeaders,
|
|
54
|
+
takeVisitorLimit,
|
|
55
|
+
UNKNOWN_VISITOR_FACTOR,
|
|
56
|
+
} from "./src/lib/rate-limit";
|
|
57
|
+
import { resolveBaseUrl } from "./src/lib/routes";
|
|
58
|
+
|
|
59
|
+
export default defineAuthConfig({});
|
|
60
|
+
|
|
61
|
+
export const site = {
|
|
62
|
+
loadAuth: () => loadAuth(),
|
|
63
|
+
env: {
|
|
64
|
+
isAuthRequired: () => isAuthRequired(),
|
|
65
|
+
isSignUpOpen: () => isSignUpOpen(),
|
|
66
|
+
isResetAvailable: () => isResetAvailable(),
|
|
67
|
+
getActiveProviderIds: () => getActiveProviderIds(),
|
|
68
|
+
magicLinkSendConfigured: () => magicLinkSendConfigured(),
|
|
69
|
+
hasAnyProvider: () => hasAnyProvider(),
|
|
70
|
+
resetSendConfigured: () => resetSendConfigured(),
|
|
71
|
+
phoneVerificationConfigured: () => phoneVerificationConfigured(),
|
|
72
|
+
},
|
|
73
|
+
siteLogo: () => siteLogo(),
|
|
74
|
+
get siteName() {
|
|
75
|
+
return SITE_NAME;
|
|
76
|
+
},
|
|
77
|
+
resolveBaseUrl: () => resolveBaseUrl(),
|
|
78
|
+
browserApiOrigin: () => browserApiOrigin(),
|
|
79
|
+
runBotCheck: (input) => runBotCheck(input),
|
|
80
|
+
takeVisitorLimit: (scope, headers, limit, windowMs) =>
|
|
81
|
+
takeVisitorLimit(scope, headers, limit, windowMs),
|
|
82
|
+
clientIpFromHeaders: (headers) => clientIpFromHeaders(headers),
|
|
83
|
+
get unknownVisitorFactor() {
|
|
84
|
+
return UNKNOWN_VISITOR_FACTOR;
|
|
85
|
+
},
|
|
86
|
+
get topology() {
|
|
87
|
+
return TOPOLOGY;
|
|
88
|
+
},
|
|
89
|
+
get signInProvider() {
|
|
90
|
+
return SIGN_IN_PROVIDER;
|
|
91
|
+
},
|
|
92
|
+
get signOutEndpoint() {
|
|
93
|
+
return SIGN_OUT_ENDPOINT;
|
|
94
|
+
},
|
|
95
|
+
readSession: (headers) => readSession(headers),
|
|
96
|
+
hub: {
|
|
97
|
+
resolveSecret: () => resolveSecret(),
|
|
98
|
+
consentPoliciesFor: (locale) => consentPoliciesFor(locale),
|
|
99
|
+
email: {
|
|
100
|
+
confirmSignUpEmail: (nonce) => confirmSignUpEmail(nonce),
|
|
101
|
+
makeSendAccountOpen: (deps) => makeSendAccountOpen(deps),
|
|
102
|
+
buildAuthEmailRequest: (payload, secret) =>
|
|
103
|
+
buildAuthEmailRequest(payload, secret),
|
|
104
|
+
purchaseCapture,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
} satisfies AuthSite;
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* docs/internal/specs/ailk-pre-oss-security-phase-0.5-s0.5-better-auth-migration-spec.md.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
+
import { sealMcpCallbacks } from "@working-theory/auth/mcp-continuation";
|
|
28
29
|
import type { PrismaClient } from "@working-theory/database";
|
|
29
30
|
import { MCP_SCOPES } from "@working-theory/validation";
|
|
30
31
|
import { type BetterAuthPlugin, betterAuth } from "better-auth";
|
|
@@ -33,7 +34,7 @@ import type { AuthMiddleware } from "better-auth/api";
|
|
|
33
34
|
import { nextCookies } from "better-auth/next-js";
|
|
34
35
|
import { magicLink, mcp, phoneNumber } from "better-auth/plugins";
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
|
|
37
38
|
import {
|
|
38
39
|
authEmailTransport,
|
|
39
40
|
makeMagicLinkOptions,
|
|
@@ -22,11 +22,17 @@
|
|
|
22
22
|
// and `purchase` keys of the checkout and purchase pages (#11253 D4), and
|
|
23
23
|
// `@working-theory/ui-docs-blog` the `docs` and `blog` keys of the docs and
|
|
24
24
|
// blog pages (#11254 D4), each read through the paid-sections registry, whose
|
|
25
|
-
// stub answers `null` on a site without the module.
|
|
25
|
+
// stub answers `null` on a site without the module. `@working-theory/auth`
|
|
26
|
+
// ships the `auth`, `signIn`, `mcpConsent` and `spokeSignIn` keys of the
|
|
27
|
+
// sign-in surfaces (#11257 D12), added after the account catalog.
|
|
28
|
+
// `@working-theory/site-pages` ships the ten namespaces of the base pages
|
|
29
|
+
// (#11259 D7), added beside the account catalog: every site carries it.
|
|
26
30
|
//
|
|
27
31
|
// Spec: docs/internal/specs/i18n-phase1-s2-next-intl-foundation-spec.md
|
|
28
32
|
|
|
29
33
|
import { accountMessages } from "@working-theory/account";
|
|
34
|
+
import { authMessages } from "@working-theory/auth";
|
|
35
|
+
import { sitePagesMessages } from "@working-theory/site-pages";
|
|
30
36
|
import type { AbstractIntlMessages } from "next-intl";
|
|
31
37
|
import { getRequestConfig } from "next-intl/server";
|
|
32
38
|
|
|
@@ -100,6 +106,8 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
100
106
|
// package; this site's catalog holds overrides only, so the package's keys
|
|
101
107
|
// are added under it and a key the site carries keeps the site's value.
|
|
102
108
|
const packaged = accountMessages(locale) ?? accountMessages(DEFAULT_LOCALE) ?? {};
|
|
109
|
+
const basePages = sitePagesMessages(locale) ?? sitePagesMessages(DEFAULT_LOCALE) ?? {};
|
|
110
|
+
const signIn = authMessages(locale) ?? authMessages(DEFAULT_LOCALE) ?? {};
|
|
103
111
|
const signalCollectors = await loadUiSignalCollectors();
|
|
104
112
|
const flows =
|
|
105
113
|
signalCollectors?.flowsMessages(locale) ?? signalCollectors?.flowsMessages(DEFAULT_LOCALE) ?? {};
|
|
@@ -113,7 +121,10 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
113
121
|
docsBlog?.docsBlogMessages(locale) ?? docsBlog?.docsBlogMessages(DEFAULT_LOCALE) ?? {};
|
|
114
122
|
const withPackages = mergeAddOnly(
|
|
115
123
|
mergeAddOnly(
|
|
116
|
-
mergeAddOnly(
|
|
124
|
+
mergeAddOnly(
|
|
125
|
+
mergeAddOnly(mergeAddOnly(mergeAddOnly(mergeAddOnly(messages as Catalog, packaged), basePages), signIn), flows),
|
|
126
|
+
schedule,
|
|
127
|
+
),
|
|
117
128
|
checkout,
|
|
118
129
|
),
|
|
119
130
|
docsAndBlog,
|
|
@@ -145,6 +145,16 @@ module.exports = {
|
|
|
145
145
|
// `exports` name the files, so node resolution lands on them and ts-jest
|
|
146
146
|
// compiles them like this app's own.
|
|
147
147
|
"^@working-theory/account/site$": "<rootDir>/account.config.tsx",
|
|
148
|
+
// #11257 — the sign-in package's site seam, the same way: next.config.mjs
|
|
149
|
+
// aliases it to auth.config.tsx. The package's own suites run on this
|
|
150
|
+
// config too (packages/auth/jest.config.cjs), against this site.
|
|
151
|
+
"^@working-theory/auth/site$": "<rootDir>/auth.config.tsx",
|
|
152
|
+
// #11259 — the base website pages' seam, the same way: next.config.mjs
|
|
153
|
+
// aliases it to site-pages.config.tsx. The package's own suites run on
|
|
154
|
+
// this config too (packages/site-pages/jest.config.cjs), against this
|
|
155
|
+
// site. Its other subpaths need no mapper: it ships TypeScript source and
|
|
156
|
+
// its `exports` name the files.
|
|
157
|
+
"^@working-theory/site-pages/site$": "<rootDir>/site-pages.config.tsx",
|
|
148
158
|
// The package's modules resolve `next/headers` and `better-auth/react`
|
|
149
159
|
// from their own install, a second physical copy of each (the #5025
|
|
150
160
|
// class above), so a test's `jest.mock()` of either would miss them.
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* `next/headers` mocked, in `renderPage-extension.test.tsx`'s idiom.
|
|
8
8
|
*/
|
|
9
9
|
import { readFileSync } from "node:fs";
|
|
10
|
+
import { createRequire } from "node:module";
|
|
10
11
|
import path from "node:path";
|
|
11
12
|
|
|
12
13
|
import { ROUTES } from "@working-theory/templates/routes";
|
|
@@ -111,6 +112,14 @@ describe("DECK_ROUTES parity (#8687 D3)", () => {
|
|
|
111
112
|
let pageSource: string;
|
|
112
113
|
try {
|
|
113
114
|
pageSource = readFileSync(path.join(appRoot, dir, "page.tsx"), "utf8");
|
|
115
|
+
// A generated route file is a re-export (#11259 D8): read the
|
|
116
|
+
// package page it re-exports, resolved from apps/web.
|
|
117
|
+
const spec = pageSource.startsWith("// Generated by create-ailk routes from ")
|
|
118
|
+
? /from "(@working-theory\/[^"]+)"/.exec(pageSource)?.[1]
|
|
119
|
+
: undefined;
|
|
120
|
+
if (spec !== undefined) {
|
|
121
|
+
pageSource = readFileSync(createRequire(path.join(__dirname, "..", "..", "package.json")).resolve(spec), "utf8");
|
|
122
|
+
}
|
|
114
123
|
} catch {
|
|
115
124
|
continue;
|
|
116
125
|
}
|
|
@@ -31,6 +31,9 @@ export function siteTopology(): typeof Seam & { __esModule: true } {
|
|
|
31
31
|
const { auth } = await import("../../../auth");
|
|
32
32
|
return auth.api.getSession({ headers });
|
|
33
33
|
},
|
|
34
|
+
loadAuth() {
|
|
35
|
+
return import("../../../auth").then((m) => m.auth);
|
|
36
|
+
},
|
|
34
37
|
async readOwnAccounts(headers) {
|
|
35
38
|
const { auth } = await import("../../../auth");
|
|
36
39
|
return auth.api.listUserAccounts({ headers });
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export {};
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line no-restricted-syntax -- test-seam mock: a "use server" boundary the module only binds
|
|
18
|
-
jest.mock("
|
|
18
|
+
jest.mock("@working-theory/site-pages/pages/contact/contact.actions", () => ({
|
|
19
19
|
captureLeadAction: jest.fn(),
|
|
20
20
|
}));
|
|
21
21
|
// eslint-disable-next-line no-restricted-syntax -- test-seam mock: a "use server" boundary the module only binds
|
|
@@ -18,7 +18,7 @@ jest.mock("@working-theory/api-client", () => ({
|
|
|
18
18
|
}));
|
|
19
19
|
|
|
20
20
|
// eslint-disable-next-line no-restricted-syntax -- test-seam mock: a "use server" boundary the module only binds
|
|
21
|
-
jest.mock("
|
|
21
|
+
jest.mock("@working-theory/site-pages/pages/contact/contact.actions", () => ({
|
|
22
22
|
captureLeadAction: jest.fn(),
|
|
23
23
|
}));
|
|
24
24
|
// eslint-disable-next-line no-restricted-syntax -- test-seam mock: a "use server" boundary the module only binds
|
|
@@ -28,7 +28,7 @@ jest.mock("../newsletter.actions", () => ({
|
|
|
28
28
|
|
|
29
29
|
import { flows } from "@working-theory/api-client";
|
|
30
30
|
|
|
31
|
-
import { captureLeadAction } from "
|
|
31
|
+
import { captureLeadAction } from "@working-theory/site-pages/pages/contact/contact.actions";
|
|
32
32
|
import {
|
|
33
33
|
fillEndingName,
|
|
34
34
|
framedSources,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
pricingPageCard,
|
|
15
15
|
pricingSections,
|
|
16
16
|
} from "../pricing-page";
|
|
17
|
-
import type { DetailPage } from "
|
|
17
|
+
import type { DetailPage } from "@working-theory/site-pages/lib/route-family";
|
|
18
18
|
|
|
19
19
|
const fetchMock: jest.Mock = jest.fn(async () => ({
|
|
20
20
|
ok: true,
|
|
@@ -27,7 +27,7 @@ jest.mock("../topology.generated", () => ({
|
|
|
27
27
|
|
|
28
28
|
const mockHubSessionInit = jest.fn();
|
|
29
29
|
// eslint-disable-next-line no-restricted-syntax -- #507: hubSessionInit is mocked so the hub branch is asserted without a sealed cookie (#11246)
|
|
30
|
-
jest.mock("
|
|
30
|
+
jest.mock("@working-theory/auth/hub-session", () => ({
|
|
31
31
|
__esModule: true,
|
|
32
32
|
hubSessionInit: () => mockHubSessionInit(),
|
|
33
33
|
}));
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
rmSync,
|
|
51
51
|
writeFileSync,
|
|
52
52
|
} from "node:fs";
|
|
53
|
+
import { createRequire } from "node:module";
|
|
53
54
|
import { tmpdir } from "node:os";
|
|
54
55
|
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
55
56
|
|
|
@@ -78,7 +79,7 @@ import {
|
|
|
78
79
|
type ValidationError,
|
|
79
80
|
} from "@working-theory/schema-validator";
|
|
80
81
|
|
|
81
|
-
import { MEET_PLACEHOLDER_HUB } from "
|
|
82
|
+
import { MEET_PLACEHOLDER_HUB } from "@working-theory/site-pages/lib/meet-placeholder";
|
|
82
83
|
import type { ReactElement } from "react";
|
|
83
84
|
import { parse as parseYaml } from "yaml";
|
|
84
85
|
|
|
@@ -105,6 +106,18 @@ jest.mock("@working-theory/analytics/server", () => ({
|
|
|
105
106
|
|
|
106
107
|
// ── Where the site's content and routes live ────────────────────────────────
|
|
107
108
|
|
|
109
|
+
/**
|
|
110
|
+
* A route file's own source (#11259 D8): a generated route file is a
|
|
111
|
+
* re-export, so it is followed to the package page it re-exports — resolved
|
|
112
|
+
* from apps/web as the build resolves it — whose text the checks below read.
|
|
113
|
+
*/
|
|
114
|
+
function routeSource(file: string): string {
|
|
115
|
+
const text = readFileSync(file, "utf8");
|
|
116
|
+
if (!text.startsWith("// Generated by create-ailk routes from ")) return text;
|
|
117
|
+
const spec = /from "(@working-theory\/[^"]+)"/.exec(text)?.[1];
|
|
118
|
+
return spec === undefined ? text : readFileSync(createRequire(join(__dirname, "..", "..", "package.json")).resolve(spec), "utf8");
|
|
119
|
+
}
|
|
120
|
+
|
|
108
121
|
const CONTENT_ROOT =
|
|
109
122
|
process.env.AILK_CONTENT_ROOT ?? resolve(__dirname, "../../../../content");
|
|
110
123
|
const ROUTE_ROOT = resolve(__dirname, "../../app/[locale]");
|
|
@@ -683,7 +696,7 @@ function hubOwnSlug(file: string, type: string): string | null {
|
|
|
683
696
|
if (basename(dirname(file)) !== "[slug]") return null;
|
|
684
697
|
const parent = join(dirname(dirname(file)), "page.tsx");
|
|
685
698
|
if (!existsSync(parent)) return null;
|
|
686
|
-
const identity = routeIdentity(
|
|
699
|
+
const identity = routeIdentity(routeSource(parent));
|
|
687
700
|
return identity !== null && identity.type === type ? identity.slug : null;
|
|
688
701
|
}
|
|
689
702
|
|
|
@@ -745,7 +758,7 @@ describe("structured data — every route emits a valid JSON-LD script", () => {
|
|
|
745
758
|
|
|
746
759
|
it.each(routes)("$route", async ({ route, file }) => {
|
|
747
760
|
const label = `/${DEFAULT_LOCALE}${route === "" ? "" : "/" + route}`;
|
|
748
|
-
const src =
|
|
761
|
+
const src = routeSource(file);
|
|
749
762
|
// #10040 decision 1 — without the marketing module `/` redirects to
|
|
750
763
|
// /account before any content: no HomePage seed, no JSON-LD, and its
|
|
751
764
|
// page.tsx still names renderPage, so it is skipped here rather than
|
|
@@ -871,7 +884,7 @@ describe("structured data — every route emits a valid JSON-LD script", () => {
|
|
|
871
884
|
|
|
872
885
|
describe("structured data — a hub's own page is not rendered at its detail route (#10044 AC-6)", () => {
|
|
873
886
|
const dynamicRoutes = walkRoutes(ROUTE_ROOT).flatMap(({ route, file }) => {
|
|
874
|
-
const identity = routeIdentity(
|
|
887
|
+
const identity = routeIdentity(routeSource(file));
|
|
875
888
|
return identity !== null && identity.slug === null
|
|
876
889
|
? [{ route, file, type: identity.type }]
|
|
877
890
|
: [];
|
|
@@ -49,8 +49,8 @@ import { createElement, type ReactElement } from "react";
|
|
|
49
49
|
import {
|
|
50
50
|
contactFormFromConfig,
|
|
51
51
|
type ContactFormView,
|
|
52
|
-
} from "
|
|
53
|
-
import { captureLeadAction } from "
|
|
52
|
+
} from "@working-theory/site-pages/pages/contact/contact-form-magnet";
|
|
53
|
+
import { captureLeadAction } from "@working-theory/site-pages/pages/contact/contact.actions";
|
|
54
54
|
|
|
55
55
|
import { consentPoliciesFor } from "./consent-policies";
|
|
56
56
|
import { subscribeNewsletterAction } from "./newsletter.actions";
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
import { getTranslations } from "next-intl/server";
|
|
30
30
|
import { createElement, type ReactNode } from "react";
|
|
31
31
|
|
|
32
|
-
import { contactFormText } from "
|
|
33
|
-
import { readSiteContactEmail } from "
|
|
32
|
+
import { contactFormText } from "@working-theory/site-pages/pages/contact/contact-form-text";
|
|
33
|
+
import { readSiteContactEmail } from "./site-contact-email";
|
|
34
34
|
|
|
35
35
|
import { browserApiOrigin } from "./api-origin.generated";
|
|
36
36
|
import {
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
type OfferingsPricing,
|
|
39
39
|
type OfferingsPricingLabels,
|
|
40
40
|
} from "./offerings-pricing";
|
|
41
|
-
import type { DetailPage } from "
|
|
41
|
+
import type { DetailPage } from "@working-theory/site-pages/lib/route-family";
|
|
42
42
|
|
|
43
43
|
type PricingSection = Extract<PageSection, { type: "pricing" }>;
|
|
44
44
|
type PricingData = PricingSection["data"];
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
* rather than re-parsing the wire envelope by hand).
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
import { hubSessionInit } from "@working-theory/auth/hub-session";
|
|
25
26
|
import { cookies, headers } from "next/headers";
|
|
26
27
|
|
|
27
|
-
import { hubSessionInit } from "./hub-session/session";
|
|
28
28
|
import { SIGN_IN_PROVIDER } from "./topology.generated";
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -21,7 +21,7 @@ import { join } from "node:path";
|
|
|
21
21
|
import { SiteConfigSchema } from "@working-theory/site-config/schema";
|
|
22
22
|
import { parse as parseYaml } from "yaml";
|
|
23
23
|
|
|
24
|
-
import { resolveContentRoot } from "
|
|
24
|
+
import { resolveContentRoot } from "./site-brand";
|
|
25
25
|
|
|
26
26
|
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---/;
|
|
27
27
|
|
|
@@ -24,7 +24,7 @@ import { join } from "node:path";
|
|
|
24
24
|
import { SiteIdentitySchema } from "@working-theory/site-config/schema";
|
|
25
25
|
import { parse as parseYaml } from "yaml";
|
|
26
26
|
|
|
27
|
-
import { resolveContentRoot } from "
|
|
27
|
+
import { resolveContentRoot } from "./site-brand";
|
|
28
28
|
|
|
29
29
|
import { readSiteContactEmail } from "./site-contact-email";
|
|
30
30
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* account" link to `/account`, where Sign out lives (#11095 D6).
|
|
8
8
|
*
|
|
9
9
|
* A local frontmatter read rather than `@working-theory/site-config/server`,
|
|
10
|
-
* for the same reason as `
|
|
10
|
+
* for the same reason as `lib/site-contact-email.ts`:
|
|
11
11
|
* `architecture.yaml` keeps `node:fs` out of a tree that also carries edge
|
|
12
12
|
* routes (#1567). The value is validated against the canonical schema from
|
|
13
13
|
* the client-safe `/schema` entry.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
// readPhoneStep and loadPhoneApi read and write the account's phone step
|
|
15
15
|
// through Better Auth on a hub (#11138); a spoke's hub holds the person, so
|
|
16
16
|
// both answer null.
|
|
17
|
+
import type { AuthInstance } from "@working-theory/auth/site";
|
|
17
18
|
|
|
18
19
|
export const TOPOLOGY: "hub" | "spoke" = "hub";
|
|
19
20
|
export const UNSERVED_MCP_TOOLS: readonly string[] = [];
|
|
@@ -37,6 +38,10 @@ export async function readSession(headers: Headers): Promise<SiteSession> {
|
|
|
37
38
|
return auth.api.getSession({ headers });
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
export function loadAuth(): Promise<AuthInstance | null> {
|
|
42
|
+
return import("../auth").then((m) => m.auth);
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
export async function readOwnAccounts(
|
|
41
46
|
headers: Headers,
|
|
42
47
|
): Promise<ReadonlyArray<{ providerId: string }> | null> {
|