create-ailk 0.37.1 → 0.39.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 (318) hide show
  1. package/README.md +129 -0
  2. package/component-catalog.json +44 -6
  3. package/component-catalog.md +6 -5
  4. package/dist/add-module.js +16 -1
  5. package/dist/add-route.d.ts +2 -2
  6. package/dist/add-route.js +19 -12
  7. package/dist/cli.js +52 -0
  8. package/dist/declined-routes.d.ts +13 -0
  9. package/dist/declined-routes.js +74 -0
  10. package/dist/derive-architecture.d.ts +0 -6
  11. package/dist/derive-architecture.js +12 -16
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +3 -0
  14. package/dist/language-import.d.ts +93 -0
  15. package/dist/language-import.js +270 -43
  16. package/dist/lib/import-mdx.js +1 -1
  17. package/dist/lib/scaffold-render-sweep.d.ts +6 -3
  18. package/dist/lib/scaffold-render-sweep.js +8 -4
  19. package/dist/migrate-content.d.ts +6 -2
  20. package/dist/migrate-content.js +62 -5
  21. package/dist/module-architecture.js +139 -103
  22. package/dist/paid-sections.d.ts +13 -0
  23. package/dist/paid-sections.js +35 -5
  24. package/dist/programmatic.js +6 -16
  25. package/dist/remove-module.js +73 -2
  26. package/dist/routes.d.ts +130 -0
  27. package/dist/routes.js +954 -0
  28. package/dist/site-manifest.js +6 -4
  29. package/dist/site-roster.d.ts +11 -2
  30. package/dist/site-roster.js +63 -21
  31. package/dist/spoke-checkout.d.ts +28 -27
  32. package/dist/spoke-checkout.js +71 -102
  33. package/dist/surfaces.d.ts +26 -0
  34. package/dist/surfaces.js +105 -293
  35. package/dist/sync-routes.d.ts +14 -1
  36. package/dist/sync-routes.js +108 -10
  37. package/dist/template-record.js +3 -1
  38. package/dist/topology.d.ts +26 -1
  39. package/dist/topology.js +273 -7
  40. package/dist/update.d.ts +17 -2
  41. package/dist/update.js +480 -77
  42. package/package.json +3 -3
  43. package/templates/README.md +1 -1
  44. package/templates/apps/mcp/CLAUDE.md +5 -3
  45. package/templates/apps/web/CLAUDE.md +87 -23
  46. package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +5 -1
  47. package/templates/apps/web/__tests__/__mocks__/next-intl.ts +5 -1
  48. package/templates/apps/web/__tests__/auth/seam.test.ts +34 -0
  49. package/templates/apps/web/account.config.tsx +100 -0
  50. package/templates/apps/web/app/[locale]/(authed)/account/connect/__tests__/page.test.tsx +1 -1
  51. package/templates/apps/web/app/[locale]/(authed)/account/connect/page.tsx +2 -2
  52. package/templates/apps/web/app/[locale]/(authed)/signed-out-gate.generated.tsx +1 -1
  53. package/templates/apps/web/app/[locale]/layout.tsx +46 -29
  54. package/templates/apps/web/app/apple-icon.tsx +72 -0
  55. package/templates/apps/web/app/llms.txt/__tests__/site-listing.test.ts +22 -12
  56. package/templates/apps/web/app/og/__tests__/__snapshots__/card.test.tsx.snap +3 -0
  57. package/templates/apps/web/app/og/__tests__/card.test.tsx +129 -0
  58. package/templates/apps/web/app/og/__tests__/route.test.ts +3 -4
  59. package/templates/apps/web/app/og/route.tsx +155 -72
  60. package/templates/apps/web/app/sitemap.xml/__tests__/site-listing.test.ts +12 -0
  61. package/templates/apps/web/auth.config.tsx +107 -0
  62. package/templates/apps/web/auth.ts +2 -1
  63. package/templates/apps/web/i18n/request.ts +51 -1
  64. package/templates/apps/web/jest.config.cjs +17 -1
  65. package/templates/apps/web/lib/__tests__/auth-phone.test.ts +11 -0
  66. package/templates/apps/web/lib/__tests__/fixtures/site-topology.ts +73 -0
  67. package/templates/apps/web/lib/__tests__/nav-label-keys.test.ts +14 -0
  68. package/templates/apps/web/lib/__tests__/profile-back-link.test.ts +148 -61
  69. package/templates/apps/web/lib/__tests__/served-pages.test.ts +77 -0
  70. package/templates/apps/web/lib/__tests__/server-api.test.ts +37 -5
  71. package/templates/apps/web/lib/__tests__/structured-data.test.tsx +26 -13
  72. package/templates/apps/web/lib/listings.tsx +2 -2
  73. package/templates/apps/web/lib/nav-label-keys.ts +16 -2
  74. package/templates/apps/web/lib/paid-section-contracts.ts +35 -6
  75. package/templates/apps/web/lib/paid-sections.generated.ts +8 -0
  76. package/templates/apps/web/lib/profile-back-link.ts +105 -32
  77. package/templates/apps/web/lib/served-pages.ts +95 -0
  78. package/templates/apps/web/lib/server-api.ts +1 -1
  79. package/templates/apps/web/lib/site-brand.tsx +3 -5
  80. package/templates/apps/web/lib/topology.generated.ts +5 -0
  81. package/templates/apps/web/messages/en.json +8 -836
  82. package/templates/apps/web/middleware.ts +15 -26
  83. package/templates/apps/web/next.config.mjs +35 -0
  84. package/templates/apps/web/package.json +2 -0
  85. package/templates/apps/web/types/messages.d.ts +6 -1
  86. package/templates/customizations.yaml +9 -0
  87. package/templates/package.json +3 -1
  88. package/templates/tools/lint-architecture.ts +164 -11
  89. package/versions.json +49 -47
  90. package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +0 -322
  91. package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +0 -554
  92. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/consent-actions.test.ts +0 -56
  93. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/page.test.tsx +0 -164
  94. package/templates/apps/web/app/[locale]/(auth)/consent/consent-form.tsx +0 -132
  95. package/templates/apps/web/app/[locale]/(auth)/consent/consent.actions.ts +0 -51
  96. package/templates/apps/web/app/[locale]/(auth)/consent/page.tsx +0 -144
  97. package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +0 -101
  98. package/templates/apps/web/app/[locale]/(auth)/forgot-password/page.tsx +0 -111
  99. package/templates/apps/web/app/[locale]/(auth)/layout.tsx +0 -81
  100. package/templates/apps/web/app/[locale]/(auth)/legal-footnote.tsx +0 -35
  101. package/templates/apps/web/app/[locale]/(auth)/reset-password/__tests__/return.test.tsx +0 -179
  102. package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +0 -157
  103. package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +0 -126
  104. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/next-path.test.ts +0 -54
  105. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +0 -628
  106. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/remembered-method.test.ts +0 -43
  107. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +0 -266
  108. package/templates/apps/web/app/[locale]/(auth)/sign-in/next-path.ts +0 -20
  109. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +0 -234
  110. package/templates/apps/web/app/[locale]/(auth)/sign-in/remembered-method.ts +0 -37
  111. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +0 -323
  112. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +0 -93
  113. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +0 -301
  114. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +0 -309
  115. package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +0 -201
  116. package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +0 -366
  117. package/templates/apps/web/app/[locale]/(auth)/use-auth-card-flow.ts +0 -116
  118. package/templates/apps/web/app/[locale]/(auth)/verify-email/__tests__/actions.test.ts +0 -94
  119. package/templates/apps/web/app/[locale]/(auth)/verify-email/actions.ts +0 -77
  120. package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +0 -154
  121. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/account-frame-sign-out.test.tsx +0 -175
  122. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/agreements-prompt.test.tsx +0 -301
  123. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/billing.test.tsx +0 -515
  124. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/general.test.tsx +0 -883
  125. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/hub-mode.test.tsx +0 -758
  126. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/item.test.tsx +0 -264
  127. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout-sign-out.test.tsx +0 -167
  128. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/layout.test.tsx +0 -730
  129. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-menu.test.tsx +0 -355
  130. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/new-popups.test.tsx +0 -97
  131. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/notifications.test.tsx +0 -375
  132. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/onboarding.test.tsx +0 -323
  133. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/page.test.tsx +0 -1208
  134. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/popups.test.tsx +0 -418
  135. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/privacy.test.tsx +0 -462
  136. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/rich-translator.ts +0 -63
  137. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/security.test.tsx +0 -406
  138. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/settings.test.tsx +0 -93
  139. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/support.test.tsx +0 -208
  140. package/templates/apps/web/app/[locale]/(authed)/account/__tests__/thread.test.tsx +0 -340
  141. package/templates/apps/web/app/[locale]/(authed)/account/account-data.ts +0 -182
  142. package/templates/apps/web/app/[locale]/(authed)/account/account-frame.tsx +0 -353
  143. package/templates/apps/web/app/[locale]/(authed)/account/actions.ts +0 -57
  144. package/templates/apps/web/app/[locale]/(authed)/account/agreements-actions.ts +0 -58
  145. package/templates/apps/web/app/[locale]/(authed)/account/agreements-gate.ts +0 -61
  146. package/templates/apps/web/app/[locale]/(authed)/account/agreements-prompt.tsx +0 -184
  147. package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +0 -161
  148. package/templates/apps/web/app/[locale]/(authed)/account/appointments/__tests__/page.test.tsx +0 -426
  149. package/templates/apps/web/app/[locale]/(authed)/account/appointments/appointments-data.ts +0 -76
  150. package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +0 -139
  151. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +0 -406
  152. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/pay-form.tsx +0 -65
  153. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/review-form.tsx +0 -172
  154. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +0 -190
  155. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/file-route.test.ts +0 -333
  156. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/page.test.tsx +0 -936
  157. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/pay.test.tsx +0 -193
  158. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/__tests__/review.test.tsx +0 -476
  159. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/artifact-actions.ts +0 -184
  160. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/artifact-data.ts +0 -197
  161. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +0 -182
  162. package/templates/apps/web/app/[locale]/(authed)/account/billing/__tests__/offerings.test.ts +0 -99
  163. package/templates/apps/web/app/[locale]/(authed)/account/billing/offerings.ts +0 -123
  164. package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +0 -424
  165. package/templates/apps/web/app/[locale]/(authed)/account/billing-source.ts +0 -303
  166. package/templates/apps/web/app/[locale]/(authed)/account/components/request-quote.tsx +0 -274
  167. package/templates/apps/web/app/[locale]/(authed)/account/error-row.tsx +0 -35
  168. package/templates/apps/web/app/[locale]/(authed)/account/for-you-labels.ts +0 -36
  169. package/templates/apps/web/app/[locale]/(authed)/account/general/__tests__/phone-verification.test.tsx +0 -215
  170. package/templates/apps/web/app/[locale]/(authed)/account/general/__tests__/seam-imports.test.ts +0 -65
  171. package/templates/apps/web/app/[locale]/(authed)/account/general/account-name.ts +0 -36
  172. package/templates/apps/web/app/[locale]/(authed)/account/general/billing-anchor.tsx +0 -27
  173. package/templates/apps/web/app/[locale]/(authed)/account/general/contact-actions.ts +0 -149
  174. package/templates/apps/web/app/[locale]/(authed)/account/general/contact-details.tsx +0 -42
  175. package/templates/apps/web/app/[locale]/(authed)/account/general/deletion-request.tsx +0 -132
  176. package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +0 -218
  177. package/templates/apps/web/app/[locale]/(authed)/account/general/phone-actions.ts +0 -122
  178. package/templates/apps/web/app/[locale]/(authed)/account/general/phone-verification.tsx +0 -215
  179. package/templates/apps/web/app/[locale]/(authed)/account/general/photo-actions.ts +0 -73
  180. package/templates/apps/web/app/[locale]/(authed)/account/general/profile-form.tsx +0 -107
  181. package/templates/apps/web/app/[locale]/(authed)/account/general/profile-source.ts +0 -87
  182. package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +0 -119
  183. package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/__tests__/route.test.ts +0 -215
  184. package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/route.ts +0 -80
  185. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/member-thread-composer.tsx +0 -43
  186. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +0 -125
  187. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-data.ts +0 -88
  188. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/thread-write.ts +0 -31
  189. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/__tests__/invitation-id.test.ts +0 -35
  190. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/__tests__/page.test.tsx +0 -266
  191. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/actions.ts +0 -116
  192. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/invitation-id.ts +0 -12
  193. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/page.tsx +0 -154
  194. package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +0 -152
  195. package/templates/apps/web/app/[locale]/(authed)/account/new-actions.ts +0 -219
  196. package/templates/apps/web/app/[locale]/(authed)/account/new-menu.tsx +0 -365
  197. package/templates/apps/web/app/[locale]/(authed)/account/new-popups.tsx +0 -86
  198. package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +0 -143
  199. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/actions.ts +0 -120
  200. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/onboarding-form.tsx +0 -322
  201. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/page.tsx +0 -126
  202. package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +0 -306
  203. package/templates/apps/web/app/[locale]/(authed)/account/privacy/__tests__/export-route.test.ts +0 -173
  204. package/templates/apps/web/app/[locale]/(authed)/account/privacy/actions.ts +0 -103
  205. package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +0 -102
  206. package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +0 -240
  207. package/templates/apps/web/app/[locale]/(authed)/account/profile-actions.ts +0 -116
  208. package/templates/apps/web/app/[locale]/(authed)/account/retry-button.tsx +0 -27
  209. package/templates/apps/web/app/[locale]/(authed)/account/security/__tests__/hub-variant.test.tsx +0 -258
  210. package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +0 -131
  211. package/templates/apps/web/app/[locale]/(authed)/account/security/security-panel.tsx +0 -130
  212. package/templates/apps/web/app/[locale]/(authed)/account/security/security-source.ts +0 -92
  213. package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +0 -24
  214. package/templates/apps/web/app/[locale]/(authed)/account/settings-frame.tsx +0 -121
  215. package/templates/apps/web/app/[locale]/(authed)/account/sign-in-method.ts +0 -37
  216. package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +0 -60
  217. package/templates/apps/web/app/[locale]/(authed)/account/support/support-form.tsx +0 -98
  218. package/templates/apps/web/app/[locale]/(authed)/account/support-actions.ts +0 -100
  219. package/templates/apps/web/app/[locale]/checkout/__tests__/pages.test.tsx +0 -139
  220. package/templates/apps/web/app/[locale]/checkout/__tests__/thank-you-account.test.tsx +0 -146
  221. package/templates/apps/web/app/[locale]/checkout/thank-you/page.tsx +0 -114
  222. package/templates/apps/web/app/[locale]/checkout/unavailable/page.tsx +0 -51
  223. package/templates/apps/web/app/[locale]/flows/[slug]/FlowStepperClient.tsx +0 -614
  224. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.count.test.tsx +0 -43
  225. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.deliverable.test.tsx +0 -214
  226. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.ending.test.tsx +0 -197
  227. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.invite.test.tsx +0 -286
  228. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.permalink.test.tsx +0 -520
  229. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.test.tsx +0 -376
  230. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/FlowStepperClient.thanks-by-tier.test.tsx +0 -306
  231. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/account-invite.actions.test.ts +0 -69
  232. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/flow.actions.test.ts +0 -398
  233. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/magnet-page.test.tsx +0 -704
  234. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/save.actions.test.ts +0 -173
  235. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/two-route-tool.test.tsx +0 -141
  236. package/templates/apps/web/app/[locale]/flows/[slug]/__tests__/verify.test.tsx +0 -249
  237. package/templates/apps/web/app/[locale]/flows/[slug]/account-invite.actions.ts +0 -35
  238. package/templates/apps/web/app/[locale]/flows/[slug]/email-moment.ts +0 -92
  239. package/templates/apps/web/app/[locale]/flows/[slug]/flow.actions.ts +0 -177
  240. package/templates/apps/web/app/[locale]/flows/[slug]/magnet-page.tsx +0 -472
  241. package/templates/apps/web/app/[locale]/flows/[slug]/page.tsx +0 -48
  242. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/LevelChart.tsx +0 -100
  243. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsCard.tsx +0 -99
  244. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsClient.tsx +0 -820
  245. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/ResultsEmailStep.tsx +0 -203
  246. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.no-commerce.test.tsx +0 -194
  247. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/ResultsClient.report.test.tsx +0 -284
  248. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/by-result.test.tsx +0 -302
  249. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/cards.test.tsx +0 -402
  250. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/landing.test.tsx +0 -293
  251. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/page.test.tsx +0 -485
  252. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/__tests__/score.test.tsx +0 -231
  253. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/checkout-seam.ts +0 -74
  254. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/meeting-seam.ts +0 -36
  255. package/templates/apps/web/app/[locale]/flows/[slug]/results/[payload]/page.tsx +0 -420
  256. package/templates/apps/web/app/[locale]/flows/[slug]/save.actions.ts +0 -85
  257. package/templates/apps/web/app/[locale]/flows/[slug]/served-flow.ts +0 -91
  258. package/templates/apps/web/app/[locale]/flows/[slug]/start/page.tsx +0 -32
  259. package/templates/apps/web/app/[locale]/flows/[slug]/verify/page.tsx +0 -153
  260. package/templates/apps/web/app/[locale]/flows/[slug]/verify.actions.ts +0 -151
  261. package/templates/apps/web/app/[locale]/meet/confirmed/BookingHandOff.tsx +0 -128
  262. package/templates/apps/web/app/[locale]/meet/confirmed/__tests__/BookingHandOff.test.tsx +0 -126
  263. package/templates/apps/web/app/[locale]/purchase/__tests__/cancel.test.tsx +0 -162
  264. package/templates/apps/web/app/[locale]/purchase/__tests__/module-scope.test.ts +0 -68
  265. package/templates/apps/web/app/[locale]/purchase/__tests__/success.test.tsx +0 -411
  266. package/templates/apps/web/app/[locale]/purchase/cancel/page.tsx +0 -115
  267. package/templates/apps/web/app/[locale]/purchase/success/page.tsx +0 -348
  268. package/templates/apps/web/app/api/auth/[...all]/route.ts +0 -16
  269. package/templates/apps/web/app/api/auth/hub/__tests__/continuation.test.ts +0 -143
  270. package/templates/apps/web/app/api/auth/hub/__tests__/entry-routes.test.ts +0 -749
  271. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +0 -964
  272. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +0 -390
  273. package/templates/apps/web/app/api/auth/hub/continuation.ts +0 -127
  274. package/templates/apps/web/app/api/auth/hub/continue/[ref]/__tests__/route.test.ts +0 -188
  275. package/templates/apps/web/app/api/auth/hub/continue/[ref]/route.ts +0 -53
  276. package/templates/apps/web/app/api/auth/hub/email/route.ts +0 -111
  277. package/templates/apps/web/app/api/auth/hub/entry-shared.ts +0 -163
  278. package/templates/apps/web/app/api/auth/hub/password/__tests__/return.test.ts +0 -86
  279. package/templates/apps/web/app/api/auth/hub/password/__tests__/route.test.ts +0 -368
  280. package/templates/apps/web/app/api/auth/hub/password/return.ts +0 -86
  281. package/templates/apps/web/app/api/auth/hub/password/route.ts +0 -171
  282. package/templates/apps/web/app/api/auth/hub/purchase/route.ts +0 -230
  283. package/templates/apps/web/app/api/auth/hub/purchase-link/route.ts +0 -174
  284. package/templates/apps/web/app/api/auth/hub/sign-up/route.ts +0 -60
  285. package/templates/apps/web/app/api/auth/hub/sign-up-evidence.ts +0 -97
  286. package/templates/apps/web/app/api/auth/mcp/__tests__/continuation.test.ts +0 -92
  287. package/templates/apps/web/app/api/auth/mcp/continuation.ts +0 -89
  288. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/__tests__/route.test.ts +0 -59
  289. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/route.ts +0 -41
  290. package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +0 -1166
  291. package/templates/apps/web/app/api/hub-session/callback/route.ts +0 -134
  292. package/templates/apps/web/app/api/hub-session/email/route.ts +0 -125
  293. package/templates/apps/web/app/api/hub-session/one-tap/nonce/route.ts +0 -49
  294. package/templates/apps/web/app/api/hub-session/one-tap/route.ts +0 -106
  295. package/templates/apps/web/app/api/hub-session/open/route.ts +0 -111
  296. package/templates/apps/web/app/api/hub-session/password/return/route.ts +0 -69
  297. package/templates/apps/web/app/api/hub-session/password/route.ts +0 -106
  298. package/templates/apps/web/app/api/hub-session/sign-in/route.ts +0 -91
  299. package/templates/apps/web/app/api/hub-session/sign-out/route.ts +0 -54
  300. package/templates/apps/web/components/sign-out-trigger.tsx +0 -62
  301. package/templates/apps/web/lib/__tests__/account-config.test.ts +0 -704
  302. package/templates/apps/web/lib/__tests__/auth-routes.test.ts +0 -140
  303. package/templates/apps/web/lib/account-config.ts +0 -678
  304. package/templates/apps/web/lib/auth-routes.ts +0 -125
  305. package/templates/apps/web/lib/checkout-config.ts +0 -16
  306. package/templates/apps/web/lib/hub-session/__tests__/hub-session.test.ts +0 -433
  307. package/templates/apps/web/lib/hub-session/__tests__/spoke-sign-in.test.tsx +0 -332
  308. package/templates/apps/web/lib/hub-session/config.ts +0 -110
  309. package/templates/apps/web/lib/hub-session/entry.ts +0 -238
  310. package/templates/apps/web/lib/hub-session/index.ts +0 -21
  311. package/templates/apps/web/lib/hub-session/one-tap.tsx +0 -148
  312. package/templates/apps/web/lib/hub-session/reseal.ts +0 -90
  313. package/templates/apps/web/lib/hub-session/seal.ts +0 -86
  314. package/templates/apps/web/lib/hub-session/session.ts +0 -298
  315. package/templates/apps/web/lib/hub-session/spoke-sign-in.tsx +0 -277
  316. package/templates/apps/web/lib/next-path.ts +0 -35
  317. package/templates/apps/web/src/lib/__tests__/commerce-sections.test.ts +0 -57
  318. package/templates/apps/web/src/lib/commerce-sections.ts +0 -55
@@ -30,6 +30,11 @@
30
30
  * byte-identical to the template record and rewrites the generated
31
31
  * billing action off them (`retireLegacySpokeCheckout`); an edited or
32
32
  * unrecorded file is reported and left alone.
33
+ * - A route the site declined is its decision, not drift (#11260). A
34
+ * `declined_routes` entry in `customizations.yaml` takes the route and
35
+ * its sub-routes out of scope: reported under "Declined by this site",
36
+ * never missing, and never copied — not by `--apply`, not by an
37
+ * ancestor's subtree copy, not as a file another route imports.
33
38
  * - What `--apply` copies, it records (#11213). Every recordable file it
34
39
  * writes gets a row in `.ailk-template-files.json` — the sha256 of the
35
40
  * bytes written and the create-ailk version doing the copy — so
@@ -46,12 +51,14 @@ import { tmpdir } from "node:os";
46
51
  import { basename, dirname, join, posix, resolve, sep } from "node:path";
47
52
  import { parseArgs } from "node:util";
48
53
  import { buildScaffoldMarkers, copyTemplate, renderTemplateFile } from "./copy.js";
54
+ import { declinedRouteFor, declinedRouteOfPath, readDeclinedRoutes } from "./declined-routes.js";
49
55
  import { SPOKE_BILLING_ACTION_PATH } from "./derive-architecture.js";
50
56
  import { appendEnvRows } from "./lib/declared-env.js";
51
57
  import { ENV_CATALOG } from "./lib/env-catalog.js";
52
58
  import { publicTreeRemoved } from "./lib/site-modules.js";
59
+ import { readRouteManifests } from "./routes.js";
53
60
  import { BILLING_ACTION, BILLING_ACTION_MARKER, RETIRED_CHECKOUT_E2E_MARKER, RETIRED_CHECKOUT_E2E_WORKFLOW_PATH, RETIRED_SPOKE_CHECKOUT_PATHS, } from "./spoke-checkout.js";
54
- import { GATEABLE_SURFACES, HUB_KEPT_ROUTE_DIRS, NON_ROUTE_DIRS, ROUTE_DEPENDENCIES, ROUTE_MESSAGE_NAMESPACES, ROUTE_SINCE, surfaceForRouteDir, } from "./surfaces.js";
61
+ import { GATEABLE_SURFACES, HUB_KEPT_ROUTE_DIRS, NON_ROUTE_DIRS, pagePackageOfRoute, ROUTE_DEPENDENCIES, ROUTE_MESSAGE_NAMESPACES, ROUTE_SINCE, surfaceForRouteDir, } from "./surfaces.js";
55
62
  import { TEMPLATE_RECORD_PATH, parseTemplateRecord, recordCopiedFiles, serializeTemplateRecord, sha256Hex, } from "./template-record.js";
56
63
  import { SPOKE_SEAM_FILES, isSpokeExcluded, readSpokeShape, spokeExclusions, } from "./topology.js";
57
64
  /** Template-relative prefix every `apps/web` route directory sits under. */
@@ -183,10 +190,14 @@ function walkRouteImports(route, ctx) {
183
190
  // A file under a seed the spoke does not carry is never copied, so its
184
191
  // imports are not walked (the hub's consent page under a hub sign-in spoke's
185
192
  // account, #9966 D2).
193
+ // Nor is one under a route the site declined (#11260).
186
194
  const queue = regularFilesUnder(ctx.scratch, route)
187
195
  .map((rel) => `${ROUTE_ROOT}/${rel}`)
188
196
  .filter((path) => ownerRoute(path, ctx.missingRoutes) === route)
189
- .filter((path) => ctx.spoke === undefined || !isSpokeExcluded(path, ctx.spoke));
197
+ .filter((path) => ctx.spoke === undefined || !isSpokeExcluded(path, ctx.spoke))
198
+ .filter((path) => declinedRouteOfPath(path, ctx.declined) === undefined)
199
+ // Nor one a page package ships (ADR 0040): an ancestor's copy holds it back.
200
+ .filter((path) => pagePackageOfRoute(posix.dirname(path.slice(ROUTE_ROOT.length + 1))) === undefined);
190
201
  const visited = new Set(queue);
191
202
  for (let from = queue.shift(); from !== undefined; from = queue.shift()) {
192
203
  if (!SOURCE_FILE.test(from))
@@ -216,6 +227,11 @@ function walkRouteImports(route, ctx) {
216
227
  unresolved.push({ specifier, from: importer, reason: "the spoke does not carry it" });
217
228
  continue;
218
229
  }
230
+ const declinedBy = declinedRouteOfPath(path, ctx.declined);
231
+ if (declinedBy !== undefined) {
232
+ unresolved.push({ specifier, from: importer, reason: `it is under ${declinedBy}, which this site declined` });
233
+ continue;
234
+ }
219
235
  const routeRel = inScratch(path);
220
236
  const surface = routeRel === undefined ? "core" : surfaceForRouteDir(routeRel);
221
237
  if (surface === undefined || !ctx.carried.has(surface)) {
@@ -458,6 +474,21 @@ function spokeExcludedUnder(routeRoot, route, spoke) {
458
474
  });
459
475
  return walk("");
460
476
  }
477
+ /**
478
+ * The files under template route dir `route` that a page package ships
479
+ * (ADR 0040, `pagePackageOfRoute`), relative to `route`: an ancestor's
480
+ * subtree copy holds them back, and a route the package leaves to the site
481
+ * (its `siteOwned`) still lands.
482
+ */
483
+ function pagePackageFilesUnder(routeRoot, route) {
484
+ const walk = (rel) => readdirSync(join(routeRoot, route, rel), { withFileTypes: true }).flatMap((entry) => {
485
+ const child = rel === "" ? entry.name : `${rel}/${entry.name}`;
486
+ if (entry.isDirectory())
487
+ return walk(child);
488
+ return pagePackageOfRoute(posix.dirname(`${route}/${child}`)) === undefined ? [] : [child];
489
+ });
490
+ return walk("");
491
+ }
461
492
  /** The first line of a text file. */
462
493
  function firstLine(text) {
463
494
  const eol = text.indexOf("\n");
@@ -638,7 +669,20 @@ export function syncRoutes(opts) {
638
669
  // tree: every template route dir outside the kept set is out of scope.
639
670
  const publicTreeSkipped = [];
640
671
  const marketingRemoved = publicTreeRemoved(targetAbs);
672
+ // ADR 0040 — a page package's routes are the route generator's, not this copier's.
673
+ const pagePackageRoutes = [];
674
+ // #11260 — a route the site declined, and its sub-routes, leave scope
675
+ // after every other filter, so `declined` names only routes that would
676
+ // otherwise have been checked.
677
+ const declinedRoutes = readDeclinedRoutes(targetAbs);
678
+ const declined = [];
641
679
  const inScope = listTemplateRouteDirs(opts.templatesDir)
680
+ .filter((route) => {
681
+ if (pagePackageOfRoute(route) === undefined)
682
+ return true;
683
+ pagePackageRoutes.push(route);
684
+ return false;
685
+ })
642
686
  .filter((route) => {
643
687
  if (!marketingRemoved)
644
688
  return true;
@@ -652,7 +696,13 @@ export function syncRoutes(opts) {
652
696
  // every hub scaffold, the same as "core" — it is checked regardless of
653
697
  // `carried`, which only tracks GATEABLE_SURFACES opt-in.
654
698
  .filter((r) => r.surface === "core" || r.surface === "authed" || carried.has(r.surface))
655
- .filter((r) => spoke === undefined || !isSpokeExcluded(`${ROUTE_ROOT}/${r.route}`, spoke));
699
+ .filter((r) => spoke === undefined || !isSpokeExcluded(`${ROUTE_ROOT}/${r.route}`, spoke))
700
+ .filter((r) => {
701
+ if (declinedRouteFor(r.route, declinedRoutes) === undefined)
702
+ return true;
703
+ declined.push(r);
704
+ return false;
705
+ });
656
706
  // Identical to scaffoldSync's defaults, so a synced route matches a fresh
657
707
  // scaffold of the same target byte-for-byte.
658
708
  const markers = {
@@ -693,6 +743,7 @@ export function syncRoutes(opts) {
693
743
  markers,
694
744
  spoke,
695
745
  carried: new Set(["core", "authed", ...carried]),
746
+ declined: declinedRoutes,
696
747
  }));
697
748
  }
698
749
  finally {
@@ -703,6 +754,20 @@ export function syncRoutes(opts) {
703
754
  // refused route's copy would write, iterated to a fixpoint. Never upward:
704
755
  // an ancestor is still copied without the refused sub-tree.
705
756
  const missingRoutes = missing.map((r) => r.route);
757
+ // #11260 — a declared dependency under a declined route is never copied,
758
+ // so the route that needs it refuses, named like an unresolved import.
759
+ for (const walk of walks) {
760
+ const deps = missing.find((m) => m.route === walk.route)?.dependencies ?? [];
761
+ for (const dep of deps) {
762
+ const declinedBy = declinedRouteOfPath(dep, declinedRoutes);
763
+ if (declinedBy === undefined)
764
+ continue;
765
+ walk.unresolved = sortUnresolved([
766
+ ...walk.unresolved,
767
+ { specifier: dep, from: "ROUTE_DEPENDENCIES", reason: `it is under ${declinedBy}, which this site declined` },
768
+ ]);
769
+ }
770
+ }
706
771
  const refusedSet = new Set(walks.filter((w) => w.unresolved.length > 0).map((w) => w.route));
707
772
  for (let changed = true; changed;) {
708
773
  changed = false;
@@ -808,6 +873,12 @@ export function syncRoutes(opts) {
808
873
  ...refused
809
874
  .filter((r) => r.startsWith(route + "/"))
810
875
  .map((r) => r.slice(route.length + 1)),
876
+ // #11260 — and each declined sub-route.
877
+ ...declinedRoutes
878
+ .filter((r) => r.startsWith(route + "/"))
879
+ .map((r) => r.slice(route.length + 1)),
880
+ // ADR 0040 — and every file a page package ships (`create-ailk routes` writes those).
881
+ ...pagePackageFilesUnder(templateRouteRoot, route),
811
882
  ...(spokeShape === undefined
812
883
  ? []
813
884
  : spokeExcludedUnder(templateRouteRoot, route, spokeShape)),
@@ -852,7 +923,9 @@ export function syncRoutes(opts) {
852
923
  recorded,
853
924
  missingMessageNamespaces,
854
925
  skippedSurfaces,
926
+ declined,
855
927
  publicTreeRemoved: publicTreeSkipped,
928
+ pagePackageRoutes,
856
929
  structuredDataEntries: structuredDataEntriesFor(targetAbs, opts.templatesDir, applied),
857
930
  retiredCheckout: spoke !== undefined
858
931
  ? retireLegacySpokeCheckout(targetAbs, opts.apply === true)
@@ -860,13 +933,29 @@ export function syncRoutes(opts) {
860
933
  };
861
934
  }
862
935
  /**
863
- * Whether `apps/web/messages/en.json` in `targetAbs` already declares
864
- * `namespace` (a dot-path, e.g. `"waitlistDashboard.gate"`). Missing or
865
- * unparseable `messages/en.json` reads as "namespace absent" rather than
866
- * throwing — a sync check should report a gap, not crash on one.
936
+ * Whether `targetAbs` already declares `namespace` (a dot-path, e.g.
937
+ * `"waitlistDashboard.gate"`): in `apps/web/messages/en.json`, or — since a
938
+ * page package ships its own strings (ADR 0040 rule 5; #11257 D12) — in the
939
+ * `en` catalog of an installed page package (`readRouteManifests`). Missing
940
+ * or unparseable catalogs, and an unreadable manifest, read as "namespace
941
+ * absent" rather than throwing — a sync check should report a gap, not crash
942
+ * on one.
867
943
  */
868
944
  function hasMessageNamespace(targetAbs, namespace) {
869
- const messagesPath = join(targetAbs, "apps/web/messages/en.json");
945
+ const catalogs = [join(targetAbs, "apps/web/messages/en.json")];
946
+ try {
947
+ for (const manifest of readRouteManifests(targetAbs)) {
948
+ if (manifest.messages !== undefined && manifest.root !== undefined) {
949
+ catalogs.push(join(manifest.root, manifest.messages.catalog, "en.json"));
950
+ }
951
+ }
952
+ }
953
+ catch {
954
+ // An unreadable manifest is `routes --check`'s to report.
955
+ }
956
+ return catalogs.some((path) => catalogHasNamespace(path, namespace));
957
+ }
958
+ function catalogHasNamespace(messagesPath, namespace) {
870
959
  if (!existsSync(messagesPath))
871
960
  return false;
872
961
  try {
@@ -928,9 +1017,16 @@ export function formatSyncRoutesReport(result, apply) {
928
1017
  if (result.skippedSurfaces.length > 0) {
929
1018
  lines.push(`[create-ailk] Surfaces this site does not carry (skipped): ${result.skippedSurfaces.join(", ")}`);
930
1019
  }
1020
+ if (result.declined.length > 0) {
1021
+ lines.push(`[create-ailk] Declined by this site (customizations.yaml declined_routes) — ${apply ? "not copied" : "not missing, never copied"}:`);
1022
+ lines.push(...result.declined.map((r) => ` ${r.route} (surface: ${r.surface})`));
1023
+ }
931
1024
  if (result.publicTreeRemoved.length > 0) {
932
1025
  lines.push(`[create-ailk] Public route tree not carried (marketing removed, #10040): ${result.publicTreeRemoved.length} template route(s) skipped`);
933
1026
  }
1027
+ if (result.pagePackageRoutes.length > 0) {
1028
+ lines.push(`[create-ailk] Shipped by a page package (ADR 0040), nothing to sync: ${result.pagePackageRoutes.length} route(s) — \`create-ailk routes --check\` checks their generated files`);
1029
+ }
934
1030
  // #9406 DD5 — per missing route, what its imports copy, leave, or cannot
935
1031
  // resolve; then the routes a dangling import holds back.
936
1032
  if (result.routeImports.length > 0) {
@@ -1020,8 +1116,10 @@ Options:
1020
1116
  --help, -h Print this message.
1021
1117
 
1022
1118
  Checks every core route plus the routes of each surface the site carries; a
1023
- surface gated off at scaffold time is skipped, not drift. A route the site has
1024
- changed locally is reported and never overwritten. Nothing is deleted except,
1119
+ surface gated off at scaffold time is skipped, not drift. A route the site lists
1120
+ in customizations.yaml declined_routes is reported as declined and never copied
1121
+ (#11260). A route the site has changed locally is reported and never
1122
+ overwritten. Nothing is deleted except,
1025
1123
  on a spoke, the retired legacy checkout's files that still match create-ailk's
1026
1124
  copy: --apply removes them and rewrites the generated billing action (#9142).
1027
1125
  Every file --apply copies is recorded in .ailk-template-files.json, when the
@@ -25,7 +25,7 @@ import { SITE_FONTS_PATH } from "./site-fonts.js";
25
25
  import { SITE_LISTING_PATH } from "./site-listing-path.js";
26
26
  import { SPOKE_CHECKOUT_CONFIG_PATH } from "./spoke-checkout.js";
27
27
  import { NAV_CONFIG_PATH } from "./surfaces.js";
28
- import { SPOKE_SEAM_FILES } from "./topology.js";
28
+ import { AUTH_CONFIG_PATH, SPOKE_SEAM_FILES } from "./topology.js";
29
29
  /** Where the per-file record lives, beside `.ailk-site-manifest.json`. */
30
30
  export const TEMPLATE_RECORD_PATH = ".ailk-template-files.json";
31
31
  /**
@@ -45,6 +45,8 @@ export const REGENERATED_APP_PATHS = [
45
45
  MODULE_FLAGS_PATH,
46
46
  PAID_MCP_TOOLS_PATH,
47
47
  ...SPOKE_SEAM_FILES,
48
+ // #11257 D4 — rewritten in its spoke shape on a spoke, as the seams are.
49
+ AUTH_CONFIG_PATH,
48
50
  SPOKE_CHECKOUT_CONFIG_PATH,
49
51
  SITE_LISTING_PATH,
50
52
  ];
@@ -10,7 +10,11 @@ export declare class TopologyError extends Error {
10
10
  export declare const SPOKE_REMOVED_ROOTS: readonly string[];
11
11
  /** The root `--without-mcp` removes. */
12
12
  export declare const SPOKE_MCP_ROOT = "apps/mcp";
13
- /** Commerce's apps/web files that reach the hub's own checkout (spoke-intake Rule 3, #7838). */
13
+ /**
14
+ * Commerce's apps/web files that reach the hub's own checkout (spoke-intake
15
+ * Rule 3, #7838). The flows `results` routes are generated (#11251): the
16
+ * route generator reads this entry and reports them not carried on a spoke.
17
+ */
14
18
  export declare const SPOKE_HUB_CHECKOUT_SEEDS: readonly string[];
15
19
  /**
16
20
  * The files a spoke does not carry — files and directories, scaffold-relative:
@@ -53,6 +57,16 @@ export declare const SPOKE_SEAM_FILES: readonly string[];
53
57
  * `excludePaths` matches an exact file path).
54
58
  */
55
59
  export declare const SPOKE_ONLY_FILES: readonly string[];
60
+ /**
61
+ * A page package's site config (#11219, ADR 0040 rule 4): the one typed file
62
+ * through which the site customizes the pages the package ships, and the
63
+ * host's runtime-services seam its actions read. Since #11227 it imports
64
+ * only `lib/` files every topology carries, never the account area, so a
65
+ * spoke that drops that area (the default mode's `(authed)` seed) drops the
66
+ * config by a seed of that mode, not by the closure. A hub-sign-in spoke
67
+ * keeps both.
68
+ */
69
+ export declare const PAGE_PACKAGE_CONFIG_FILES: readonly string[];
56
70
  /**
57
71
  * The closure's allow-list: a file `spokeExclusions` removes must sit under
58
72
  * one of these prefixes, or under a `__tests__/` directory. A member outside
@@ -205,6 +219,17 @@ export declare function transformAppPackageJson(text: string, label: string, req
205
219
  * @throws TopologyError naming the file whose anchor is missing.
206
220
  */
207
221
  export declare function applySpokeTransforms(targetDir: string, opts: SpokeShapeOptions): void;
222
+ /** The page-package config the sign-in package reads its services from (#11257 D4). */
223
+ export declare const AUTH_CONFIG_PATH = "apps/web/auth.config.tsx";
224
+ /**
225
+ * `apps/web/auth.config.tsx` for `topology` (#11257 D4): the hub render is
226
+ * this monorepo's file, byte for byte (`spoke-topology.test.ts` pins the
227
+ * two); the spoke render passes `hub: null` and imports none of the hub-only
228
+ * libs (`lib/auth-email.ts`, `lib/auth-secret.ts`, `lib/consent-policies.ts`).
229
+ * Neither imports `auth.ts`: Better Auth arrives through the topology seam's
230
+ * `loadAuth()`, so a spoke keeps the file and no closure removes it.
231
+ */
232
+ export declare function renderAuthConfig(topology: Topology): string;
208
233
  /** The env var a spoke reaches its hub through. */
209
234
  export declare const HUB_ORIGIN_ENV_VAR = "AILK_API_URL";
210
235
  /**