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.
Files changed (304) hide show
  1. package/dist/add-route.js +16 -1
  2. package/dist/body-heading.d.ts +2 -1
  3. package/dist/body-heading.js +31 -3
  4. package/dist/derive-architecture.js +3 -1
  5. package/dist/module-architecture.js +0 -3
  6. package/dist/remove-module.js +27 -14
  7. package/dist/routes.d.ts +36 -2
  8. package/dist/routes.js +269 -23
  9. package/dist/site-manifest.js +6 -4
  10. package/dist/site-roster.d.ts +11 -3
  11. package/dist/site-roster.js +48 -22
  12. package/dist/surfaces.d.ts +13 -3
  13. package/dist/surfaces.js +128 -194
  14. package/dist/sync-routes.js +22 -5
  15. package/dist/template-record.js +3 -1
  16. package/dist/topology.d.ts +11 -0
  17. package/dist/topology.js +253 -3
  18. package/package.json +3 -3
  19. package/templates/apps/web/CLAUDE.md +32 -4
  20. package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +6 -1
  21. package/templates/apps/web/__tests__/__mocks__/next-intl.ts +6 -1
  22. package/templates/apps/web/__tests__/auth/seam.test.ts +34 -0
  23. package/templates/apps/web/account.config.tsx +2 -3
  24. package/templates/apps/web/app/[locale]/(authed)/account/connect/__tests__/page.test.tsx +1 -1
  25. package/templates/apps/web/app/[locale]/(authed)/account/connect/page.tsx +1 -1
  26. package/templates/apps/web/app/[locale]/(authed)/signed-out-gate.generated.tsx +1 -1
  27. package/templates/apps/web/app/[locale]/layout.tsx +2 -2
  28. package/templates/apps/web/auth.config.tsx +107 -0
  29. package/templates/apps/web/auth.ts +2 -1
  30. package/templates/apps/web/i18n/request.ts +13 -2
  31. package/templates/apps/web/jest.config.cjs +10 -0
  32. package/templates/apps/web/lib/__tests__/deck-page.test.ts +9 -0
  33. package/templates/apps/web/lib/__tests__/fixtures/site-topology.ts +3 -0
  34. package/templates/apps/web/lib/__tests__/in-page-magnet-self-request.test.ts +1 -1
  35. package/templates/apps/web/lib/__tests__/in-page-magnet.test.ts +2 -2
  36. package/templates/apps/web/lib/__tests__/pricing-page.test.ts +1 -1
  37. package/templates/apps/web/lib/__tests__/server-api.test.ts +1 -1
  38. package/templates/apps/web/lib/__tests__/structured-data.test.tsx +17 -4
  39. package/templates/apps/web/lib/in-page-magnet.ts +2 -2
  40. package/templates/apps/web/lib/pricing-page.ts +3 -3
  41. package/templates/apps/web/lib/server-api.ts +1 -1
  42. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-email.ts +1 -1
  43. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-lines.ts +1 -1
  44. package/templates/apps/web/lib/site-header.ts +1 -1
  45. package/templates/apps/web/lib/topology.generated.ts +5 -0
  46. package/templates/apps/web/messages/en.json +0 -271
  47. package/templates/apps/web/middleware.ts +12 -25
  48. package/templates/apps/web/next.config.mjs +15 -0
  49. package/templates/apps/web/package.json +2 -0
  50. package/templates/apps/web/site-pages.config.tsx +85 -0
  51. package/templates/apps/web/types/messages.d.ts +6 -1
  52. package/templates/tools/body-heading.ts +30 -3
  53. package/versions.json +50 -48
  54. package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +0 -322
  55. package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +0 -554
  56. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/consent-actions.test.ts +0 -56
  57. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/page.test.tsx +0 -164
  58. package/templates/apps/web/app/[locale]/(auth)/consent/consent-form.tsx +0 -132
  59. package/templates/apps/web/app/[locale]/(auth)/consent/consent.actions.ts +0 -51
  60. package/templates/apps/web/app/[locale]/(auth)/consent/page.tsx +0 -144
  61. package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +0 -101
  62. package/templates/apps/web/app/[locale]/(auth)/forgot-password/page.tsx +0 -111
  63. package/templates/apps/web/app/[locale]/(auth)/layout.tsx +0 -81
  64. package/templates/apps/web/app/[locale]/(auth)/legal-footnote.tsx +0 -35
  65. package/templates/apps/web/app/[locale]/(auth)/reset-password/__tests__/return.test.tsx +0 -179
  66. package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +0 -157
  67. package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +0 -126
  68. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/next-path.test.ts +0 -54
  69. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +0 -628
  70. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/remembered-method.test.ts +0 -43
  71. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +0 -266
  72. package/templates/apps/web/app/[locale]/(auth)/sign-in/next-path.ts +0 -20
  73. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +0 -234
  74. package/templates/apps/web/app/[locale]/(auth)/sign-in/remembered-method.ts +0 -37
  75. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +0 -323
  76. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +0 -93
  77. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +0 -301
  78. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +0 -309
  79. package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +0 -201
  80. package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +0 -366
  81. package/templates/apps/web/app/[locale]/(auth)/use-auth-card-flow.ts +0 -116
  82. package/templates/apps/web/app/[locale]/(auth)/verify-email/__tests__/actions.test.ts +0 -94
  83. package/templates/apps/web/app/[locale]/(auth)/verify-email/actions.ts +0 -77
  84. package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +0 -154
  85. package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +0 -3
  86. package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +0 -3
  87. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +0 -3
  88. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +0 -2
  89. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +0 -3
  90. package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +0 -12
  91. package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +0 -12
  92. package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +0 -12
  93. package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/route.ts +0 -2
  94. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +0 -12
  95. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/page.tsx +0 -3
  96. package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +0 -10
  97. package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +0 -3
  98. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/page.tsx +0 -3
  99. package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +0 -12
  100. package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +0 -2
  101. package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +0 -3
  102. package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +0 -3
  103. package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +0 -2
  104. package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +0 -3
  105. package/templates/apps/web/app/[locale]/(authed)/leads/__tests__/page.test.tsx +0 -205
  106. package/templates/apps/web/app/[locale]/(authed)/leads/components/LeadsTable.tsx +0 -137
  107. package/templates/apps/web/app/[locale]/(authed)/leads/page.tsx +0 -122
  108. package/templates/apps/web/app/[locale]/(authed)/waitlist/components/ForbiddenState.tsx +0 -24
  109. package/templates/apps/web/app/[locale]/(authed)/waitlist/format.ts +0 -111
  110. package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +0 -402
  111. package/templates/apps/web/app/[locale]/[slug]/[detail]/page.tsx +0 -143
  112. package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +0 -148
  113. package/templates/apps/web/app/[locale]/[slug]/page.tsx +0 -109
  114. package/templates/apps/web/app/[locale]/about/[slug]/page.tsx +0 -46
  115. package/templates/apps/web/app/[locale]/about/__tests__/about-routes.test.tsx +0 -353
  116. package/templates/apps/web/app/[locale]/about/page.tsx +0 -122
  117. package/templates/apps/web/app/[locale]/alternatives/__tests__/page.test.tsx +0 -161
  118. package/templates/apps/web/app/[locale]/alternatives/page.tsx +0 -112
  119. package/templates/apps/web/app/[locale]/careers/[slug]/[action]/page.tsx +0 -244
  120. package/templates/apps/web/app/[locale]/careers/[slug]/apply.actions.ts +0 -325
  121. package/templates/apps/web/app/[locale]/careers/[slug]/job-application-form.ts +0 -120
  122. package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +0 -73
  123. package/templates/apps/web/app/[locale]/careers/__tests__/apply.actions.test.ts +0 -497
  124. package/templates/apps/web/app/[locale]/careers/__tests__/careers-hub.test.tsx +0 -172
  125. package/templates/apps/web/app/[locale]/careers/__tests__/careers-set.test.tsx +0 -153
  126. package/templates/apps/web/app/[locale]/careers/__tests__/job-application-form.test.ts +0 -141
  127. package/templates/apps/web/app/[locale]/careers/__tests__/job-apply-page.test.tsx +0 -546
  128. package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +0 -189
  129. package/templates/apps/web/app/[locale]/careers/page.tsx +0 -165
  130. package/templates/apps/web/app/[locale]/case-studies/[slug]/page.tsx +0 -49
  131. package/templates/apps/web/app/[locale]/case-studies/__tests__/hub-children.test.tsx +0 -65
  132. package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +0 -125
  133. package/templates/apps/web/app/[locale]/case-studies/page.tsx +0 -49
  134. package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +0 -85
  135. package/templates/apps/web/app/[locale]/clients/page.tsx +0 -47
  136. package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +0 -249
  137. package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +0 -400
  138. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-magnet.test.ts +0 -138
  139. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-text.test.ts +0 -49
  140. package/templates/apps/web/app/[locale]/contact/__tests__/contact-magnet-page.test.tsx +0 -494
  141. package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +0 -1122
  142. package/templates/apps/web/app/[locale]/contact/__tests__/intake-analytics.test.ts +0 -51
  143. package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +0 -319
  144. package/templates/apps/web/app/[locale]/contact/contact-form-magnet.ts +0 -77
  145. package/templates/apps/web/app/[locale]/contact/contact-form-text.ts +0 -52
  146. package/templates/apps/web/app/[locale]/contact/contact.actions.ts +0 -403
  147. package/templates/apps/web/app/[locale]/contact/intake-analytics.ts +0 -49
  148. package/templates/apps/web/app/[locale]/contact/intake-script.ts +0 -92
  149. package/templates/apps/web/app/[locale]/contact/page.tsx +0 -267
  150. package/templates/apps/web/app/[locale]/courses/[slug]/page.tsx +0 -50
  151. package/templates/apps/web/app/[locale]/courses/__tests__/hub-children.test.tsx +0 -32
  152. package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +0 -123
  153. package/templates/apps/web/app/[locale]/courses/page.tsx +0 -49
  154. package/templates/apps/web/app/[locale]/events/[slug]/page.tsx +0 -57
  155. package/templates/apps/web/app/[locale]/events/__tests__/hub-children.test.tsx +0 -32
  156. package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +0 -164
  157. package/templates/apps/web/app/[locale]/events/__tests__/program-event.test.tsx +0 -120
  158. package/templates/apps/web/app/[locale]/events/page.tsx +0 -60
  159. package/templates/apps/web/app/[locale]/faq/page.tsx +0 -54
  160. package/templates/apps/web/app/[locale]/features/[slug]/page.tsx +0 -54
  161. package/templates/apps/web/app/[locale]/features/__tests__/hub-children.test.tsx +0 -32
  162. package/templates/apps/web/app/[locale]/features/page.tsx +0 -50
  163. package/templates/apps/web/app/[locale]/for/[slug]/page.tsx +0 -54
  164. package/templates/apps/web/app/[locale]/for/__tests__/hub-children.test.tsx +0 -32
  165. package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +0 -90
  166. package/templates/apps/web/app/[locale]/for/page.tsx +0 -51
  167. package/templates/apps/web/app/[locale]/glossary/page.tsx +0 -53
  168. package/templates/apps/web/app/[locale]/how-to/[slug]/page.tsx +0 -50
  169. package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +0 -78
  170. package/templates/apps/web/app/[locale]/how-to/page.tsx +0 -50
  171. package/templates/apps/web/app/[locale]/integrations/[slug]/page.tsx +0 -54
  172. package/templates/apps/web/app/[locale]/integrations/__tests__/hub-children.test.tsx +0 -38
  173. package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +0 -141
  174. package/templates/apps/web/app/[locale]/integrations/page.tsx +0 -49
  175. package/templates/apps/web/app/[locale]/launch-service/page.tsx +0 -44
  176. package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +0 -236
  177. package/templates/apps/web/app/[locale]/newsletter/page.tsx +0 -179
  178. package/templates/apps/web/app/[locale]/page.tsx +0 -147
  179. package/templates/apps/web/app/[locale]/partners/[slug]/page.tsx +0 -45
  180. package/templates/apps/web/app/[locale]/partners/__tests__/hub-children.test.tsx +0 -32
  181. package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +0 -125
  182. package/templates/apps/web/app/[locale]/partners/page.tsx +0 -49
  183. package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +0 -46
  184. package/templates/apps/web/app/[locale]/portfolio/__tests__/hub-children.test.tsx +0 -38
  185. package/templates/apps/web/app/[locale]/portfolio/page.tsx +0 -50
  186. package/templates/apps/web/app/[locale]/pricing/[slug]/__tests__/page.test.tsx +0 -324
  187. package/templates/apps/web/app/[locale]/pricing/[slug]/page.tsx +0 -87
  188. package/templates/apps/web/app/[locale]/pricing/__tests__/__snapshots__/unconnected.test.tsx.snap +0 -7
  189. package/templates/apps/web/app/[locale]/pricing/__tests__/offerings.test.tsx +0 -605
  190. package/templates/apps/web/app/[locale]/pricing/__tests__/page.test.tsx +0 -219
  191. package/templates/apps/web/app/[locale]/pricing/__tests__/pricing-pages.test.tsx +0 -215
  192. package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +0 -282
  193. package/templates/apps/web/app/[locale]/pricing/page.tsx +0 -120
  194. package/templates/apps/web/app/[locale]/privacy/page.tsx +0 -40
  195. package/templates/apps/web/app/[locale]/products/[slug]/page.tsx +0 -50
  196. package/templates/apps/web/app/[locale]/products/__tests__/hub-children.test.tsx +0 -32
  197. package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +0 -141
  198. package/templates/apps/web/app/[locale]/products/page.tsx +0 -49
  199. package/templates/apps/web/app/[locale]/projects/[slug]/page.tsx +0 -37
  200. package/templates/apps/web/app/[locale]/projects/__tests__/hub-children.test.tsx +0 -32
  201. package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +0 -157
  202. package/templates/apps/web/app/[locale]/projects/page.tsx +0 -49
  203. package/templates/apps/web/app/[locale]/purchase-policy/page.tsx +0 -49
  204. package/templates/apps/web/app/[locale]/resources/[slug]/page.tsx +0 -54
  205. package/templates/apps/web/app/[locale]/resources/__tests__/hub-children.test.tsx +0 -38
  206. package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +0 -151
  207. package/templates/apps/web/app/[locale]/resources/page.tsx +0 -49
  208. package/templates/apps/web/app/[locale]/services/[slug]/[child]/page.tsx +0 -68
  209. package/templates/apps/web/app/[locale]/services/[slug]/page.tsx +0 -88
  210. package/templates/apps/web/app/[locale]/services/__tests__/hub-children.test.tsx +0 -158
  211. package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +0 -187
  212. package/templates/apps/web/app/[locale]/services/__tests__/service-detail-sections.test.tsx +0 -224
  213. package/templates/apps/web/app/[locale]/services/__tests__/service-families.test.tsx +0 -368
  214. package/templates/apps/web/app/[locale]/services/page.tsx +0 -71
  215. package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +0 -49
  216. package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +0 -81
  217. package/templates/apps/web/app/[locale]/software/page.tsx +0 -49
  218. package/templates/apps/web/app/[locale]/team/[slug]/page.tsx +0 -45
  219. package/templates/apps/web/app/[locale]/team/__tests__/hub-children.test.tsx +0 -32
  220. package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +0 -161
  221. package/templates/apps/web/app/[locale]/team/page.tsx +0 -50
  222. package/templates/apps/web/app/[locale]/tech-articles/[slug]/page.tsx +0 -54
  223. package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +0 -82
  224. package/templates/apps/web/app/[locale]/tech-articles/page.tsx +0 -49
  225. package/templates/apps/web/app/[locale]/templates/[slug]/__tests__/page.test.tsx +0 -203
  226. package/templates/apps/web/app/[locale]/templates/[slug]/page.tsx +0 -81
  227. package/templates/apps/web/app/[locale]/templates/__tests__/page.test.tsx +0 -237
  228. package/templates/apps/web/app/[locale]/templates/page.tsx +0 -114
  229. package/templates/apps/web/app/[locale]/terms/page.tsx +0 -40
  230. package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +0 -85
  231. package/templates/apps/web/app/[locale]/testimonials/page.tsx +0 -51
  232. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +0 -136
  233. package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +0 -39
  234. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe-rsc-boundary.test.tsx +0 -226
  235. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe.test.tsx +0 -217
  236. package/templates/apps/web/app/[locale]/unsubscribe/page.tsx +0 -106
  237. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe-button.tsx +0 -94
  238. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe.actions.ts +0 -55
  239. package/templates/apps/web/app/[locale]/vs/[slug]/__tests__/page.test.tsx +0 -100
  240. package/templates/apps/web/app/[locale]/vs/[slug]/page.tsx +0 -60
  241. package/templates/apps/web/app/[locale]/whitepapers/[slug]/page.tsx +0 -54
  242. package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +0 -82
  243. package/templates/apps/web/app/[locale]/whitepapers/page.tsx +0 -49
  244. package/templates/apps/web/app/[locale]/working-agreement/__tests__/page.test.tsx +0 -63
  245. package/templates/apps/web/app/[locale]/working-agreement/page.tsx +0 -41
  246. package/templates/apps/web/app/api/auth/[...all]/route.ts +0 -16
  247. package/templates/apps/web/app/api/auth/hub/__tests__/continuation.test.ts +0 -143
  248. package/templates/apps/web/app/api/auth/hub/__tests__/entry-routes.test.ts +0 -749
  249. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +0 -964
  250. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +0 -390
  251. package/templates/apps/web/app/api/auth/hub/continuation.ts +0 -127
  252. package/templates/apps/web/app/api/auth/hub/continue/[ref]/__tests__/route.test.ts +0 -188
  253. package/templates/apps/web/app/api/auth/hub/continue/[ref]/route.ts +0 -53
  254. package/templates/apps/web/app/api/auth/hub/email/route.ts +0 -111
  255. package/templates/apps/web/app/api/auth/hub/entry-shared.ts +0 -163
  256. package/templates/apps/web/app/api/auth/hub/password/__tests__/return.test.ts +0 -86
  257. package/templates/apps/web/app/api/auth/hub/password/__tests__/route.test.ts +0 -368
  258. package/templates/apps/web/app/api/auth/hub/password/return.ts +0 -86
  259. package/templates/apps/web/app/api/auth/hub/password/route.ts +0 -171
  260. package/templates/apps/web/app/api/auth/hub/purchase/route.ts +0 -230
  261. package/templates/apps/web/app/api/auth/hub/purchase-link/route.ts +0 -174
  262. package/templates/apps/web/app/api/auth/hub/sign-up/route.ts +0 -60
  263. package/templates/apps/web/app/api/auth/hub/sign-up-evidence.ts +0 -97
  264. package/templates/apps/web/app/api/auth/mcp/__tests__/continuation.test.ts +0 -92
  265. package/templates/apps/web/app/api/auth/mcp/continuation.ts +0 -89
  266. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/__tests__/route.test.ts +0 -59
  267. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/route.ts +0 -41
  268. package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +0 -1166
  269. package/templates/apps/web/app/api/hub-session/callback/route.ts +0 -134
  270. package/templates/apps/web/app/api/hub-session/email/route.ts +0 -125
  271. package/templates/apps/web/app/api/hub-session/one-tap/nonce/route.ts +0 -49
  272. package/templates/apps/web/app/api/hub-session/one-tap/route.ts +0 -106
  273. package/templates/apps/web/app/api/hub-session/open/route.ts +0 -111
  274. package/templates/apps/web/app/api/hub-session/password/return/route.ts +0 -69
  275. package/templates/apps/web/app/api/hub-session/password/route.ts +0 -106
  276. package/templates/apps/web/app/api/hub-session/sign-in/route.ts +0 -91
  277. package/templates/apps/web/app/api/hub-session/sign-out/route.ts +0 -54
  278. package/templates/apps/web/components/sign-out-trigger.tsx +0 -62
  279. package/templates/apps/web/lib/__tests__/auth-routes.test.ts +0 -140
  280. package/templates/apps/web/lib/__tests__/hub-children.fixtures.ts +0 -279
  281. package/templates/apps/web/lib/__tests__/route-family.test.ts +0 -57
  282. package/templates/apps/web/lib/__tests__/service-listing.test.ts +0 -111
  283. package/templates/apps/web/lib/__tests__/template-listing.test.ts +0 -158
  284. package/templates/apps/web/lib/auth-routes.ts +0 -125
  285. package/templates/apps/web/lib/hub-children.tsx +0 -351
  286. package/templates/apps/web/lib/hub-session/__tests__/hub-session.test.ts +0 -433
  287. package/templates/apps/web/lib/hub-session/__tests__/spoke-sign-in.test.tsx +0 -332
  288. package/templates/apps/web/lib/hub-session/config.ts +0 -110
  289. package/templates/apps/web/lib/hub-session/entry.ts +0 -238
  290. package/templates/apps/web/lib/hub-session/index.ts +0 -21
  291. package/templates/apps/web/lib/hub-session/one-tap.tsx +0 -148
  292. package/templates/apps/web/lib/hub-session/reseal.ts +0 -90
  293. package/templates/apps/web/lib/hub-session/seal.ts +0 -86
  294. package/templates/apps/web/lib/hub-session/session.ts +0 -298
  295. package/templates/apps/web/lib/hub-session/spoke-sign-in.tsx +0 -277
  296. package/templates/apps/web/lib/meet-placeholder.ts +0 -5
  297. package/templates/apps/web/lib/next-path.ts +0 -35
  298. package/templates/apps/web/lib/posting-title.ts +0 -39
  299. package/templates/apps/web/lib/route-family.ts +0 -69
  300. package/templates/apps/web/lib/service-listing.ts +0 -89
  301. package/templates/apps/web/lib/template-listing.ts +0 -169
  302. package/templates/apps/web/src/lib/__tests__/lead-write.test.ts +0 -187
  303. package/templates/apps/web/src/lib/lead-write.ts +0 -90
  304. /package/templates/apps/web/{app/[locale]/contact → lib}/__tests__/site-contact-lines.test.ts +0 -0
package/versions.json CHANGED
@@ -1,67 +1,69 @@
1
1
  {
2
- "@working-theory/account": "0.62.0",
3
- "@working-theory/admin-ui": "0.62.0",
4
- "@working-theory/aeo": "0.62.0",
5
- "@working-theory/agent-context": "0.62.0",
2
+ "@working-theory/account": "0.64.0",
3
+ "@working-theory/admin-ui": "0.64.0",
4
+ "@working-theory/aeo": "0.64.0",
5
+ "@working-theory/agent-context": "0.64.0",
6
6
  "@working-theory/agent-contract": "0.1.0",
7
7
  "@working-theory/agent-memory": "0.0.0",
8
8
  "@working-theory/ai": "0.1.0",
9
- "@working-theory/analytics": "0.62.0",
10
- "@working-theory/api": "0.62.0",
11
- "@working-theory/api-client": "0.62.0",
9
+ "@working-theory/analytics": "0.64.0",
10
+ "@working-theory/api": "0.64.0",
11
+ "@working-theory/api-client": "0.64.0",
12
+ "@working-theory/auth": "0.64.0",
12
13
  "@working-theory/cda-filesystem": "0.0.0",
13
- "@working-theory/cli": "0.62.0",
14
- "@working-theory/common": "0.62.0",
14
+ "@working-theory/cli": "0.64.0",
15
+ "@working-theory/common": "0.64.0",
15
16
  "@working-theory/consent": "0.1.0",
16
- "@working-theory/content-adapters": "0.62.0",
17
- "@working-theory/content-projection": "0.62.0",
18
- "@working-theory/email": "0.62.0",
17
+ "@working-theory/content-adapters": "0.64.0",
18
+ "@working-theory/content-projection": "0.64.0",
19
+ "@working-theory/email": "0.64.0",
19
20
  "@working-theory/env": "0.0.0",
20
- "@working-theory/eslint-config": "0.62.0",
21
- "@working-theory/fumadocs-schema": "0.62.0",
21
+ "@working-theory/eslint-config": "0.64.0",
22
+ "@working-theory/fumadocs-schema": "0.64.0",
22
23
  "@working-theory/ids": "0.20.1",
23
- "@working-theory/jsonld": "0.62.0",
24
- "@working-theory/license": "0.62.0",
25
- "@working-theory/mcp-server": "0.62.0",
26
- "@working-theory/metadata": "0.62.0",
27
- "@working-theory/observability": "0.62.0",
28
- "@working-theory/page-renderer": "0.62.0",
24
+ "@working-theory/jsonld": "0.64.0",
25
+ "@working-theory/license": "0.64.0",
26
+ "@working-theory/mcp-server": "0.64.0",
27
+ "@working-theory/metadata": "0.64.0",
28
+ "@working-theory/observability": "0.64.0",
29
+ "@working-theory/page-renderer": "0.64.0",
29
30
  "@working-theory/plugin-mcp": "0.1.3",
30
- "@working-theory/schema": "0.62.0",
31
- "@working-theory/schema-pack-registry": "0.62.0",
32
- "@working-theory/schema-validator": "0.62.0",
33
- "@working-theory/sections-registry": "0.62.0",
34
- "@working-theory/site-config": "0.62.0",
35
- "@working-theory/spoke-checkout": "0.7.18",
36
- "@working-theory/stripe-client": "0.62.0",
37
- "@working-theory/templates": "0.62.0",
38
- "@working-theory/theme": "0.62.0",
39
- "@working-theory/ui": "0.62.0",
40
- "@working-theory/validation": "0.62.0",
41
- "@working-theory/web-i18n": "0.62.0",
42
- "@working-theory/admin": "0.16.0",
43
- "@working-theory/api-commerce": "0.1.16",
44
- "@working-theory/api-content-write": "0.10.0",
45
- "@working-theory/api-hub": "0.6.1",
46
- "@working-theory/api-multi-tenant": "0.3.2",
47
- "@working-theory/api-scheduling": "0.6.1",
48
- "@working-theory/api-signal-collectors": "0.6.2",
49
- "@working-theory/api-workspace": "0.10.0",
31
+ "@working-theory/schema": "0.64.0",
32
+ "@working-theory/schema-pack-registry": "0.64.0",
33
+ "@working-theory/schema-validator": "0.64.0",
34
+ "@working-theory/sections-registry": "0.64.0",
35
+ "@working-theory/site-config": "0.64.0",
36
+ "@working-theory/site-pages": "0.64.0",
37
+ "@working-theory/spoke-checkout": "0.7.20",
38
+ "@working-theory/stripe-client": "0.64.0",
39
+ "@working-theory/templates": "0.64.0",
40
+ "@working-theory/theme": "0.64.0",
41
+ "@working-theory/ui": "0.64.0",
42
+ "@working-theory/validation": "0.64.0",
43
+ "@working-theory/web-i18n": "0.64.0",
44
+ "@working-theory/admin": "0.16.2",
45
+ "@working-theory/api-commerce": "0.1.18",
46
+ "@working-theory/api-content-write": "0.10.2",
47
+ "@working-theory/api-hub": "0.6.3",
48
+ "@working-theory/api-multi-tenant": "0.3.4",
49
+ "@working-theory/api-scheduling": "0.6.3",
50
+ "@working-theory/api-signal-collectors": "0.6.4",
51
+ "@working-theory/api-workspace": "0.10.2",
50
52
  "@working-theory/billing-client": "0.0.0",
51
53
  "@working-theory/branding": "0.0.0",
52
54
  "@working-theory/license-client": "0.0.0",
53
55
  "@working-theory/license-manifest": "0.0.0",
54
- "@working-theory/mcp-scheduling": "0.4.3",
55
- "@working-theory/mcp-signal-collectors": "0.2.16",
56
- "@working-theory/mcp-workspace": "0.9.0",
56
+ "@working-theory/mcp-scheduling": "0.4.5",
57
+ "@working-theory/mcp-signal-collectors": "0.2.18",
58
+ "@working-theory/mcp-workspace": "0.9.2",
57
59
  "@working-theory/partner-session": "0.0.0",
58
60
  "@working-theory/preview-protocol": "0.0.0",
59
- "@working-theory/ui-commerce": "0.62.0",
60
- "@working-theory/ui-docs-blog": "0.62.0",
61
- "@working-theory/ui-scheduling": "0.62.0",
62
- "@working-theory/ui-signal-collectors": "0.62.0",
61
+ "@working-theory/ui-commerce": "0.64.0",
62
+ "@working-theory/ui-docs-blog": "0.64.0",
63
+ "@working-theory/ui-scheduling": "0.64.0",
64
+ "@working-theory/ui-signal-collectors": "0.64.0",
63
65
  "@working-theory/web": "0.0.0",
64
66
  "@working-theory/app-api": "1.0.0",
65
67
  "@working-theory/mcp": "0.0.0",
66
- "@working-theory/database": "0.62.0"
68
+ "@working-theory/database": "0.64.0"
67
69
  }
@@ -1,322 +0,0 @@
1
- /**
2
- * Tests for the `(auth)` route group's five pages and its layout (#5963).
3
- *
4
- * This suite is AC-1's and AC-3's scorer:
5
- * - AC-1: each of the five pages renders a real card (no 404 path), and the
6
- * group's layout mounts AuthShell with no Nav and no marketing Footer.
7
- * - AC-2 (the half jsdom CAN see): the moved sign-in card carries no
8
- * `min-h-screen` / `items-center` / `justify-center` framing of its own —
9
- * a regression to vertical centering fails a unit test, not just a frame
10
- * review — and the shell's column carries the 400px cap.
11
- * - AC-3: `/sign-up` follows `isSignUpOpen()`, and `/forgot-password` +
12
- * `/reset-password` follow the reset predicate, in both directions. (#5962
13
- * repointed that predicate from `isResetAvailable()` to
14
- * `resetSendConfigured()`; the mock below binds both to one fn, so these
15
- * cases read identically either way.)
16
- *
17
- * `next-intl/server` is mocked globally (apps/web/__tests__/setup.ts) against
18
- * the real en.json, so the `auth` copy is asserted by its real strings.
19
- */
20
- import { render, screen, within } from "@testing-library/react";
21
-
22
- const mockGetActiveProviderIds = jest.fn();
23
- const mockIsSignUpOpen = jest.fn();
24
- const mockIsResetAvailable = jest.fn();
25
- // eslint-disable-next-line no-restricted-syntax -- #507: mock-internal rewrite pending; auth-env.ts is a pure env-introspection module with no external boundary to mock instead.
26
- jest.mock("../../../../lib/auth-env", () => ({
27
- __esModule: true,
28
- getActiveProviderIds: () => mockGetActiveProviderIds(),
29
- isSignUpOpen: () => mockIsSignUpOpen(),
30
- isResetAvailable: () => mockIsResetAvailable(),
31
- // #5962 repointed both reset pages from the flag-only `isResetAvailable()`
32
- // at the send conjunction. This is a PARTIAL module mock, so an absent
33
- // member is `undefined` rather than the real function — the two pages would
34
- // throw rather than take a branch. Bound to the SAME jest.fn() the flag
35
- // already drives, so every case below keeps the exact truth value and the
36
- // exact expectation it was written with: no assertion in this file changes.
37
- resetSendConfigured: () => mockIsResetAvailable(),
38
- }));
39
-
40
- jest.mock("better-auth/react", () => ({
41
- __esModule: true,
42
- createAuthClient: () => ({
43
- signIn: { social: jest.fn(), email: jest.fn() },
44
- signUp: { email: jest.fn() },
45
- }),
46
- }));
47
-
48
- // `readLocales()` reads project.yaml relative to cwd, which jest does not
49
- // provide from apps/web — the sibling layout suite stubs it for the same
50
- // reason. The locale list only feeds the language switcher, stubbed below.
51
- jest.mock("@working-theory/web-i18n", () => ({
52
- readLocales: jest.fn().mockReturnValue(["en"]),
53
- }));
54
-
55
- jest.mock("next/headers", () => ({
56
- headers: jest.fn().mockResolvedValue({ get: () => "/sign-in" }),
57
- }));
58
-
59
- // The language switcher is an island with its own router side-effects; the
60
- // layout suite next door stubs it for the same reason.
61
- jest.mock("@working-theory/ui/blocks", () => {
62
- const actual = jest.requireActual("@working-theory/ui/blocks");
63
- return {
64
- ...actual,
65
- LocaleSwitcherNav: ({ current }: { current: string }) => (
66
- <span data-testid="language-switcher-stub">{current}</span>
67
- ),
68
- };
69
- });
70
-
71
- import en from "../../../../messages/en.json";
72
- import AuthLayout from "../layout";
73
- import ForgotPasswordPage from "../forgot-password/page";
74
- import ResetPasswordPage from "../reset-password/page";
75
- import SignInPage from "../sign-in/page";
76
- import SignUpPage from "../sign-up/page";
77
- import VerifyEmailPage from "../verify-email/page";
78
-
79
- const params = Promise.resolve({ locale: "en" });
80
-
81
- async function renderPage(
82
- page: (props: {
83
- params: Promise<{ locale: string }>;
84
- searchParams: Promise<Record<string, string>>;
85
- }) => Promise<React.ReactElement>,
86
- ): Promise<void> {
87
- render(
88
- await page({
89
- params: Promise.resolve({ locale: "en" }),
90
- searchParams: Promise.resolve({}),
91
- }),
92
- );
93
- }
94
-
95
- beforeEach(() => {
96
- mockGetActiveProviderIds.mockReset().mockReturnValue(["google"]);
97
- mockIsSignUpOpen.mockReset().mockReturnValue(false);
98
- mockIsResetAvailable.mockReset().mockReturnValue(false);
99
- });
100
-
101
- // ── AC-1: the five routes resolve ─────────────────────────────────────────────
102
-
103
- describe("the five (auth) routes resolve", () => {
104
- it.each([
105
- ["/sign-in", SignInPage, "sign-in-page"],
106
- ["/sign-up", SignUpPage, "sign-up-page"],
107
- ["/forgot-password", ForgotPasswordPage, "forgot-password-page"],
108
- ["/reset-password", ResetPasswordPage, "reset-password-page"],
109
- ["/verify-email", VerifyEmailPage, "verify-email-page"],
110
- ] as const)("%s renders a card", async (_path, Page, testid) => {
111
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- the five pages differ in props (only sign-in takes searchParams); the shared runner passes both.
112
- await renderPage(Page as any);
113
- expect(screen.getByTestId(testid)).toBeInTheDocument();
114
- expect(screen.getByTestId("auth-card")).toBeInTheDocument();
115
- });
116
- });
117
-
118
- // ── AC-1: the group's layout is AuthShell, with no marketing chrome ──────────
119
-
120
- describe("the (auth) layout", () => {
121
- async function renderLayout(): Promise<void> {
122
- render(
123
- await AuthLayout({
124
- children: <span data-testid="auth-child">page</span>,
125
- params,
126
- }),
127
- );
128
- }
129
-
130
- it("mounts AuthShell", async () => {
131
- await renderLayout();
132
- expect(screen.getByTestId("auth-shell")).toBeInTheDocument();
133
- expect(screen.getByTestId("auth-child")).toBeInTheDocument();
134
- });
135
-
136
- it("renders no Nav and no marketing Footer", async () => {
137
- await renderLayout();
138
- expect(
139
- document.querySelector('nav[aria-label="Primary"]'),
140
- ).not.toBeInTheDocument();
141
- expect(document.querySelector(".ailk-footer")).not.toBeInTheDocument();
142
- });
143
-
144
- it("renders no brand row (the mark is in each card, #8790 D3) and the slim footer's three links", async () => {
145
- await renderLayout();
146
- expect(screen.queryByTestId("auth-shell-brand")).not.toBeInTheDocument();
147
- const footer = screen.getByTestId("auth-shell-footer");
148
- expect(footer.querySelectorAll("a")).toHaveLength(3);
149
- expect(
150
- screen.getByRole("link", { name: en.auth.footerPrivacy }),
151
- ).toHaveAttribute("href", "/privacy");
152
- expect(
153
- screen.getByRole("link", { name: en.auth.footerHelp }),
154
- ).toHaveAttribute("href", "/faq");
155
- });
156
-
157
- it("owns exactly one <main> landmark (ADR-0027)", async () => {
158
- await renderLayout();
159
- expect(document.querySelectorAll("main")).toHaveLength(1);
160
- });
161
-
162
- it("caps the content column at 400px — AC-2's class contract", async () => {
163
- await renderLayout();
164
- expect(screen.getByTestId("auth-shell-column")).toHaveClass("max-w-100");
165
- });
166
- });
167
-
168
- // ── AC-2: the moved sign-in card no longer frames the page ───────────────────
169
-
170
- describe("the moved sign-in card", () => {
171
- it("carries no min-h-screen / items-center / justify-center framing", async () => {
172
- await renderPage(SignInPage);
173
- const wrapper = screen.getByTestId("sign-in-page");
174
- expect(wrapper).not.toHaveClass("min-h-screen");
175
- expect(wrapper).not.toHaveClass("items-center");
176
- expect(wrapper).not.toHaveClass("justify-center");
177
- });
178
-
179
- it("points the forgot link at /forgot-password when reset is available (it was a dead '#')", async () => {
180
- mockGetActiveProviderIds.mockReturnValue(["google", "email"]);
181
- mockIsResetAvailable.mockReturnValue(true);
182
- await renderPage(SignInPage);
183
- expect(screen.getByTestId("auth-forgot")).toHaveAttribute(
184
- "href",
185
- "/forgot-password",
186
- );
187
- });
188
-
189
- it("omits the forgot link when password reset is unavailable (#6018 AC-1)", async () => {
190
- mockGetActiveProviderIds.mockReturnValue(["google", "email"]);
191
- mockIsResetAvailable.mockReturnValue(false);
192
- await renderPage(SignInPage);
193
- expect(screen.queryByTestId("auth-forgot")).not.toBeInTheDocument();
194
- });
195
-
196
- it("renders the site's mark inside the card, not in the shell (#8790 D3)", async () => {
197
- await renderPage(SignInPage);
198
- expect(screen.getByTestId("auth-card-logo")).toBeInTheDocument();
199
- expect(screen.queryByTestId("auth-shell-brand")).not.toBeInTheDocument();
200
- });
201
- });
202
-
203
- // ── AC-3: the two env predicates drive the pages ─────────────────────────────
204
-
205
- describe("/sign-up follows isSignUpOpen()", () => {
206
- it("renders the open form when sign-up is open", async () => {
207
- mockIsSignUpOpen.mockReturnValue(true);
208
- mockGetActiveProviderIds.mockReturnValue(["google", "email"]);
209
- await renderPage(SignUpPage);
210
- expect(screen.getByTestId("auth-submit")).toBeInTheDocument();
211
- expect(
212
- screen.getByRole("heading", { name: en.auth.signUpHeading }),
213
- ).toBeInTheDocument();
214
- expect(screen.queryByTestId("auth-invitation-body")).not.toBeInTheDocument();
215
- });
216
-
217
- it("renders the invitation intent when sign-up is closed", async () => {
218
- mockIsSignUpOpen.mockReturnValue(false);
219
- await renderPage(SignUpPage);
220
- expect(screen.getByTestId("auth-invitation-body")).toHaveTextContent(
221
- en.auth.invitationBody,
222
- );
223
- expect(
224
- screen.getByRole("heading", { name: en.auth.signUpHeading }),
225
- ).toBeInTheDocument();
226
- expect(screen.queryByTestId("auth-submit")).not.toBeInTheDocument();
227
- });
228
-
229
- // The one card (#9662) frames both branches: the mark, "Sign up", the toggle
230
- // line to /sign-in (no footer cross-link) and the acknowledgement.
231
- it.each([
232
- ["closed", false],
233
- ["open", true],
234
- ] as const)("frames the %s card: mark, 'Sign up', toggle line, footnote (#9662)", async (_name, open) => {
235
- mockIsSignUpOpen.mockReturnValue(open);
236
- mockGetActiveProviderIds.mockReturnValue(["google", "email"]);
237
- await renderPage(SignUpPage);
238
- expect(screen.getByTestId("auth-card-logo")).toBeInTheDocument();
239
- expect(screen.getByRole("heading", { name: "Sign up" })).toBeInTheDocument();
240
- expect(screen.getByTestId("auth-card-prospect")).toHaveTextContent(
241
- /^Already have an account\? Sign in$/,
242
- );
243
- expect(screen.getByTestId("auth-card-prospect-link")).toHaveAttribute(
244
- "href",
245
- "/sign-in",
246
- );
247
- expect(screen.queryByTestId("auth-footer-link")).not.toBeInTheDocument();
248
- expect(screen.getByTestId("auth-card-footnote")).toHaveTextContent(
249
- /^You acknowledge that you read, and agree to our Terms of Service and our Privacy Policy\.$/,
250
- );
251
- const footnote = within(screen.getByTestId("auth-card-footnote"));
252
- expect(footnote.getByRole("link", { name: "Terms of Service" })).toHaveAttribute("href", "/terms");
253
- expect(footnote.getByRole("link", { name: "Privacy Policy" })).toHaveAttribute("href", "/privacy");
254
- });
255
-
256
- it("offers 'or' + Google under the open card's form, with the consent checkboxes kept (#9662; #8438 D13)", async () => {
257
- mockIsSignUpOpen.mockReturnValue(true);
258
- mockGetActiveProviderIds.mockReturnValue(["google", "email"]);
259
- await renderPage(SignUpPage);
260
- expect(screen.getByLabelText("Email")).toBeInTheDocument();
261
- expect(screen.getByTestId("auth-divider")).toHaveTextContent(/^or$/);
262
- expect(screen.getByTestId("auth-social-google")).toBeInTheDocument();
263
- expect(screen.getByTestId("sign-up-agreements")).toBeInTheDocument();
264
- });
265
- });
266
-
267
- describe("/forgot-password and /reset-password follow the reset predicate", () => {
268
- it("renders the forgot intent when reset is available", async () => {
269
- mockIsResetAvailable.mockReturnValue(true);
270
- await renderPage(ForgotPasswordPage);
271
- expect(screen.getByTestId("auth-email")).toBeInTheDocument();
272
- expect(
273
- screen.getByRole("heading", { name: en.auth.forgotHeading }),
274
- ).toBeInTheDocument();
275
- });
276
-
277
- it("renders the not-available state when reset is unavailable", async () => {
278
- mockIsResetAvailable.mockReturnValue(false);
279
- await renderPage(ForgotPasswordPage);
280
- expect(screen.getByTestId("auth-invitation-body")).toBeInTheDocument();
281
- expect(
282
- screen.getByRole("heading", { name: en.auth.forgotUnavailableHeading }),
283
- ).toBeInTheDocument();
284
- expect(screen.queryByTestId("auth-email")).not.toBeInTheDocument();
285
- });
286
-
287
- it("renders the reset intent when reset is available", async () => {
288
- mockIsResetAvailable.mockReturnValue(true);
289
- await renderPage(ResetPasswordPage);
290
- expect(screen.getByTestId("auth-password")).toBeInTheDocument();
291
- expect(
292
- screen.getByRole("heading", { name: en.auth.resetHeading }),
293
- ).toBeInTheDocument();
294
- });
295
-
296
- it("renders its own not-available copy when reset is unavailable", async () => {
297
- mockIsResetAvailable.mockReturnValue(false);
298
- await renderPage(ResetPasswordPage);
299
- expect(screen.getByTestId("auth-invitation-body")).toHaveTextContent(
300
- en.auth.resetUnavailableBody,
301
- );
302
- expect(screen.queryByTestId("auth-password")).not.toBeInTheDocument();
303
- });
304
- });
305
-
306
- // ── Every non-form page routes back to sign-in ───────────────────────────────
307
-
308
- // A closed /sign-up routes back through its toggle line instead (#9662, above).
309
- describe("the copy-only intents route back to sign-in", () => {
310
- it.each([
311
- ["forgot-password (unavailable)", ForgotPasswordPage],
312
- ["reset-password (unavailable)", ResetPasswordPage],
313
- ["verify-email", VerifyEmailPage],
314
- ] as const)("%s carries the backToSignIn link", async (_name, Page) => {
315
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- see the note on the five-routes runner above.
316
- await renderPage(Page as any);
317
- expect(screen.getByTestId("auth-footer-link")).toHaveAttribute(
318
- "href",
319
- "/sign-in",
320
- );
321
- });
322
- });