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
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The careers set end to end (#8849 D7, D8, D9, D10; AC-7): one `writer`
|
|
3
|
-
* posting, served by one shared content mock, through /careers, the posting
|
|
4
|
-
* page and the Free apply page. The `signal-collectors` walk over the same
|
|
5
|
-
* posting is apply-routes.test.tsx's (#8840 D11), which reads the moved
|
|
6
|
-
* `lib/posting-title.ts` through the same page-renderer loader.
|
|
7
|
-
*/
|
|
8
|
-
import React from "react";
|
|
9
|
-
import { render, screen } from "@testing-library/react";
|
|
10
|
-
import * as pageRenderer from "@working-theory/page-renderer";
|
|
11
|
-
import { jobApplicationFlowConfig } from "@working-theory/validation";
|
|
12
|
-
|
|
13
|
-
jest.mock("next/navigation", () => ({
|
|
14
|
-
__esModule: true,
|
|
15
|
-
notFound: jest.fn(() => {
|
|
16
|
-
throw new Error("NEXT_NOT_FOUND");
|
|
17
|
-
}),
|
|
18
|
-
}));
|
|
19
|
-
|
|
20
|
-
jest.mock("next-mdx-remote/rsc", () => ({
|
|
21
|
-
__esModule: true,
|
|
22
|
-
MDXRemote: ({ source }: { source: string }) =>
|
|
23
|
-
React.createElement("div", { "data-testid": "mdx-rendered" }, source),
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
jest.mock("@working-theory/api-client", () => ({
|
|
27
|
-
flows: { get: jest.fn() },
|
|
28
|
-
leads: { captureStatus: jest.fn(), submit: jest.fn() },
|
|
29
|
-
visitorForwardHeaders: () => undefined,
|
|
30
|
-
}));
|
|
31
|
-
|
|
32
|
-
jest.mock("next/headers", () => ({
|
|
33
|
-
__esModule: true,
|
|
34
|
-
headers: jest.fn().mockResolvedValue({ get: () => null }),
|
|
35
|
-
cookies: jest.fn().mockResolvedValue({ get: () => undefined }),
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
// eslint-disable-next-line no-restricted-syntax -- test-seam mock: the real read is a node:fs frontmatter parse of content/_site.mdx; narrowest possible scope
|
|
39
|
-
jest.mock("../../contact/site-contact-email", () => ({
|
|
40
|
-
readSiteContactEmail: jest.fn().mockReturnValue("jobs@example.com"),
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
|
-
import { flows, leads } from "@working-theory/api-client";
|
|
44
|
-
|
|
45
|
-
import CareersPage from "../page";
|
|
46
|
-
import JobPage from "../[slug]/page";
|
|
47
|
-
import ApplyPage from "../[slug]/[action]/page";
|
|
48
|
-
|
|
49
|
-
const WRITER = {
|
|
50
|
-
type: "JobPosting" as const,
|
|
51
|
-
slug: "writer",
|
|
52
|
-
title: "Writer",
|
|
53
|
-
description: "Write for us.",
|
|
54
|
-
employmentType: "FULL_TIME" as const,
|
|
55
|
-
remote: true,
|
|
56
|
-
location: "Remote (US)",
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
type GetMdxSource = typeof pageRenderer.getMdxSource;
|
|
60
|
-
|
|
61
|
-
const getMdxSource = jest.fn<ReturnType<GetMdxSource>, Parameters<GetMdxSource>>(async (type, slug) => {
|
|
62
|
-
if (type === "CareersList")
|
|
63
|
-
return {
|
|
64
|
-
frontmatter: {
|
|
65
|
-
type: "CareersList" as const,
|
|
66
|
-
slug: "careers",
|
|
67
|
-
title: "Careers",
|
|
68
|
-
description: "Open roles.",
|
|
69
|
-
},
|
|
70
|
-
body: "",
|
|
71
|
-
};
|
|
72
|
-
if (type === "JobPosting" && slug === "writer")
|
|
73
|
-
return { frontmatter: WRITER, body: "# Writer\n\nThe writer role." };
|
|
74
|
-
return null;
|
|
75
|
-
});
|
|
76
|
-
const getMdxSlugs = jest.fn().mockResolvedValue(["writer"]);
|
|
77
|
-
|
|
78
|
-
beforeEach(() => {
|
|
79
|
-
// `lib/posting-title.ts` reads through the package loader, not a prop.
|
|
80
|
-
jest.spyOn(pageRenderer, "getMdxSource").mockImplementation(getMdxSource);
|
|
81
|
-
(flows.get as jest.Mock).mockResolvedValue({
|
|
82
|
-
ok: true,
|
|
83
|
-
status: 200,
|
|
84
|
-
body: jobApplicationFlowConfig,
|
|
85
|
-
});
|
|
86
|
-
(leads.captureStatus as jest.Mock).mockResolvedValue({
|
|
87
|
-
ok: true,
|
|
88
|
-
status: 200,
|
|
89
|
-
body: { ok: true, data: { contact: true, newsletter: true } },
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
afterEach(() => {
|
|
94
|
-
jest.restoreAllMocks();
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
describe("a writer posting renders through the careers set (#8849 AC-7)", () => {
|
|
98
|
-
it("/careers' generated card links to /careers/writer", async () => {
|
|
99
|
-
render(
|
|
100
|
-
await CareersPage({
|
|
101
|
-
params: Promise.resolve({ locale: "en" }),
|
|
102
|
-
getMdxSource,
|
|
103
|
-
getMdxSlugs,
|
|
104
|
-
}),
|
|
105
|
-
);
|
|
106
|
-
const links = Array.from(document.querySelectorAll("a")).map((a) =>
|
|
107
|
-
a.getAttribute("href"),
|
|
108
|
-
);
|
|
109
|
-
expect(links).toContain("/careers/writer");
|
|
110
|
-
expect(screen.getByTestId("items-filter-search")).toBeTruthy();
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it("/careers/writer renders the posting, its Apply button, and an ApplyAction to the same page", async () => {
|
|
114
|
-
const { container } = render(
|
|
115
|
-
await JobPage({
|
|
116
|
-
params: Promise.resolve({ locale: "en", slug: "writer" }),
|
|
117
|
-
getMdxSource,
|
|
118
|
-
}),
|
|
119
|
-
);
|
|
120
|
-
// #7495 — the posting's body owns its H1; MDXRemote is mocked, so the
|
|
121
|
-
// body's `# Writer` arrives as its source.
|
|
122
|
-
expect(screen.getByTestId("mdx-rendered").textContent).toBe(
|
|
123
|
-
"# Writer\n\nThe writer role.",
|
|
124
|
-
);
|
|
125
|
-
const cta = screen.getByTestId("job-apply-cta");
|
|
126
|
-
expect(cta.getAttribute("href")).toBe("/careers/writer/apply");
|
|
127
|
-
|
|
128
|
-
const jsonLd = JSON.parse(
|
|
129
|
-
container.querySelector("[data-testid='json-ld']")!.textContent!,
|
|
130
|
-
) as { "@graph": { "@type": string; mainEntity?: Record<string, unknown> }[] };
|
|
131
|
-
const posting = jsonLd["@graph"].find((node) => node["@type"] === "WebPage")!
|
|
132
|
-
.mainEntity!;
|
|
133
|
-
expect(posting["potentialAction"]).toEqual({
|
|
134
|
-
"@type": "ApplyAction",
|
|
135
|
-
target: "http://localhost:3000/en/careers/writer/apply",
|
|
136
|
-
});
|
|
137
|
-
expect(posting["employmentType"]).toBe("FULL_TIME");
|
|
138
|
-
expect(posting["jobLocationType"]).toBe("TELECOMMUTE");
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
it("the Free page at /careers/writer/apply renders the form bound to writer", async () => {
|
|
142
|
-
render(
|
|
143
|
-
await ApplyPage({
|
|
144
|
-
params: Promise.resolve({ locale: "en", slug: "writer", action: "apply" }),
|
|
145
|
-
}),
|
|
146
|
-
);
|
|
147
|
-
expect(screen.getByRole("heading", { level: 1, name: "Writer" })).toBeTruthy();
|
|
148
|
-
expect(screen.getByTestId("lead-capture-form")).toBeTruthy();
|
|
149
|
-
expect(screen.getByTestId("nav-back-link").getAttribute("href")).toBe(
|
|
150
|
-
"/careers/writer",
|
|
151
|
-
);
|
|
152
|
-
});
|
|
153
|
-
});
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* jobApplicationFormFromConfig (#8746 D4, D5; AC-4): the Job application
|
|
3
|
-
* magnet's field step mapped onto the shared form block, and the built-in
|
|
4
|
-
* form that stands in for an absent or switched-off magnet.
|
|
5
|
-
*/
|
|
6
|
-
import {
|
|
7
|
-
JOB_APPLICATION_TERMS_STATEMENT,
|
|
8
|
-
jobApplicationFlowConfig,
|
|
9
|
-
type FlowConfig,
|
|
10
|
-
} from "@working-theory/validation";
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
jobApplicationFormFallback,
|
|
14
|
-
jobApplicationFormFromConfig,
|
|
15
|
-
} from "../[slug]/job-application-form";
|
|
16
|
-
|
|
17
|
-
// jsdom has no `structuredClone`; the config is plain JSON.
|
|
18
|
-
const clone = (): FlowConfig =>
|
|
19
|
-
JSON.parse(JSON.stringify(jobApplicationFlowConfig)) as FlowConfig;
|
|
20
|
-
|
|
21
|
-
describe("jobApplicationFormFromConfig (#8746 D5, AC-4)", () => {
|
|
22
|
-
// #8840 D3 — the seed is two steps: step 1 (names, email, phone, the hidden
|
|
23
|
-
// `job`, the terms box) draws inline; LinkedIn URL moved to step 2, whose
|
|
24
|
-
// "Submit application" is now the submit label.
|
|
25
|
-
it("maps the seeded config's step 1 to First, Last, Email and Phone, with the step's title and step 2's submit label", () => {
|
|
26
|
-
const view = jobApplicationFormFromConfig(jobApplicationFlowConfig, "en");
|
|
27
|
-
expect(view?.title).toBe("Job application");
|
|
28
|
-
expect(view?.fields).toEqual([
|
|
29
|
-
{
|
|
30
|
-
name: "first_name",
|
|
31
|
-
type: "text",
|
|
32
|
-
label: "First name",
|
|
33
|
-
required: true,
|
|
34
|
-
colSpan: 1,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: "last_name",
|
|
38
|
-
type: "text",
|
|
39
|
-
label: "Last name",
|
|
40
|
-
required: true,
|
|
41
|
-
colSpan: 1,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: "email",
|
|
45
|
-
type: "email",
|
|
46
|
-
label: "Email",
|
|
47
|
-
required: true,
|
|
48
|
-
colSpan: 1,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "phone",
|
|
52
|
-
type: "tel",
|
|
53
|
-
label: "Phone",
|
|
54
|
-
required: false,
|
|
55
|
-
colSpan: 1,
|
|
56
|
-
},
|
|
57
|
-
]);
|
|
58
|
-
expect(view?.submitLabel).toBe("Submit application");
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it("keeps an owner's edited label and an added full-width field", () => {
|
|
62
|
-
const config = clone();
|
|
63
|
-
const step = config.steps[0] as Extract<
|
|
64
|
-
FlowConfig["steps"][number],
|
|
65
|
-
{ type: "field" }
|
|
66
|
-
>;
|
|
67
|
-
step.fields[3]!.copy = { label: { en: "Mobile" } };
|
|
68
|
-
step.fields.push({
|
|
69
|
-
name: "cover_letter",
|
|
70
|
-
inputType: "textarea",
|
|
71
|
-
copy: { label: { en: "Cover letter" } },
|
|
72
|
-
});
|
|
73
|
-
const view = jobApplicationFormFromConfig(config, "en");
|
|
74
|
-
expect(view?.fields.map((f) => [f.name, f.label, f.colSpan])).toEqual([
|
|
75
|
-
["first_name", "First name", 1],
|
|
76
|
-
["last_name", "Last name", 1],
|
|
77
|
-
["email", "Email", 1],
|
|
78
|
-
["phone", "Mobile", 1],
|
|
79
|
-
["cover_letter", "Cover letter", 2],
|
|
80
|
-
]);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it.each(["first_name", "last_name", "email"])(
|
|
84
|
-
"answers null when the step has no %s field",
|
|
85
|
-
(name) => {
|
|
86
|
-
const config = clone();
|
|
87
|
-
const step = config.steps[0] as Extract<
|
|
88
|
-
FlowConfig["steps"][number],
|
|
89
|
-
{ type: "field" }
|
|
90
|
-
>;
|
|
91
|
-
step.fields = step.fields.filter((f) => f.name !== name);
|
|
92
|
-
expect(jobApplicationFormFromConfig(config, "en")).toBeNull();
|
|
93
|
-
},
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
it("answers null when the first step is not a field step", () => {
|
|
97
|
-
const config = clone();
|
|
98
|
-
(config.steps[0] as { type: string }).type = "segmentation";
|
|
99
|
-
expect(jobApplicationFormFromConfig(config, "en")).toBeNull();
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
describe("a consent field on the magnet (#8746 D5)", () => {
|
|
104
|
-
it("labels the terms box with the step's first consent field, which is not drawn as a field", () => {
|
|
105
|
-
const config = clone();
|
|
106
|
-
const step = config.steps[0] as Extract<
|
|
107
|
-
FlowConfig["steps"][number],
|
|
108
|
-
{ type: "field" }
|
|
109
|
-
>;
|
|
110
|
-
const terms = step.fields.find((f) => f.name === "terms")!;
|
|
111
|
-
terms.copy = {
|
|
112
|
-
label: {
|
|
113
|
-
en: "I agree my application is kept for 12 months under the [Privacy Policy](privacy).",
|
|
114
|
-
},
|
|
115
|
-
};
|
|
116
|
-
const view = jobApplicationFormFromConfig(config, "en");
|
|
117
|
-
expect(view?.consentStatement).toBe(
|
|
118
|
-
"I agree my application is kept for 12 months under the [Privacy Policy](privacy).",
|
|
119
|
-
);
|
|
120
|
-
expect(view?.fields.map((f) => f.name)).not.toContain("terms");
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
// #8840 D3 — the seed now carries a terms box, so the page labels its own.
|
|
124
|
-
it("the seeded config's terms field labels the box", () => {
|
|
125
|
-
expect(jobApplicationFormFallback("en").consentStatement).toBe(
|
|
126
|
-
JOB_APPLICATION_TERMS_STATEMENT,
|
|
127
|
-
);
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
it("never draws the hidden job field", () => {
|
|
131
|
-
expect(jobApplicationFormFallback("en").fields.map((f) => f.name)).not.toContain("job");
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
describe("jobApplicationFormFallback (#8746 D5, AC-4)", () => {
|
|
136
|
-
it("is the seeded config's own form", () => {
|
|
137
|
-
expect(jobApplicationFormFallback("en")).toEqual(
|
|
138
|
-
jobApplicationFormFromConfig(jobApplicationFlowConfig, "en"),
|
|
139
|
-
);
|
|
140
|
-
});
|
|
141
|
-
});
|