@nextsparkjs/core 0.1.0-beta.191 → 0.1.0-beta.192

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 (2978) hide show
  1. package/README.md +1 -1
  2. package/dist/components/app/layouts/CurrentYear.d.ts +10 -0
  3. package/dist/components/app/layouts/CurrentYear.d.ts.map +1 -0
  4. package/dist/components/app/layouts/CurrentYear.js +8 -0
  5. package/dist/components/app/layouts/PublicFooter.d.ts.map +1 -1
  6. package/dist/components/app/layouts/PublicFooter.js +3 -3
  7. package/dist/components/app/layouts/PublicNavbar.js +1 -1
  8. package/dist/components/auth/DevKeyring.js +1 -1
  9. package/dist/components/auth/forms/LoginForm.d.ts.map +1 -1
  10. package/dist/components/auth/forms/LoginForm.js +47 -12
  11. package/dist/components/auth/forms/SignupForm.d.ts.map +1 -1
  12. package/dist/components/auth/forms/SignupForm.js +57 -5
  13. package/dist/components/dashboard/block-editor/block-picker.d.ts.map +1 -1
  14. package/dist/components/dashboard/block-editor/block-picker.js +2 -1
  15. package/dist/components/dashboard/block-editor/pattern-card.js +2 -2
  16. package/dist/components/dashboard/block-editor/pattern-reference-preview.js +2 -2
  17. package/dist/components/dashboard/layouts/AuthenticatedDashboardLayout.d.ts +5 -0
  18. package/dist/components/dashboard/layouts/AuthenticatedDashboardLayout.d.ts.map +1 -0
  19. package/dist/components/dashboard/layouts/AuthenticatedDashboardLayout.js +37 -0
  20. package/dist/components/dashboard/layouts/Sidebar.js +1 -1
  21. package/dist/components/dashboard/layouts/TopNavbar.js +1 -1
  22. package/dist/components/dashboard/mobile/MobileBottomNav.js +1 -1
  23. package/dist/components/dashboard/mobile/MobileMoreSheet.js +1 -1
  24. package/dist/components/dashboard/mobile/MobileTopBar.js +5 -5
  25. package/dist/components/dashboard/mobile/QuickCreateSheet.js +5 -5
  26. package/dist/components/dashboard/navigation/DynamicNavigation.d.ts.map +1 -1
  27. package/dist/components/dashboard/navigation/DynamicNavigation.js +6 -9
  28. package/dist/components/devtools/BlockDetailViewer.js +2 -2
  29. package/dist/components/devtools/BlocksViewer.js +1 -1
  30. package/dist/components/docs/docs-sidebar.d.ts.map +1 -1
  31. package/dist/components/docs/docs-sidebar.js +2 -5
  32. package/dist/components/entities/EntityChildManager.js +8 -8
  33. package/dist/components/entities/EntityDetail.js +8 -8
  34. package/dist/components/entities/ErrorBoundary.js +2 -2
  35. package/dist/components/entities/wrappers/EntityDetailWrapper.js +22 -22
  36. package/dist/components/entities/wrappers/EntityFormWrapper.d.ts +1 -1
  37. package/dist/components/entities/wrappers/EntityFormWrapper.js +3 -3
  38. package/dist/components/entities/wrappers/EntityListWrapper.js +2 -2
  39. package/dist/components/settings/layouts/SettingsSidebar.js +2 -2
  40. package/dist/components/teams/InviteMemberDialog.js +1 -1
  41. package/dist/components/teams/TeamMembersList.js +1 -1
  42. package/dist/components/ui/accordion.js +1 -1
  43. package/dist/components/ui/avatar.js +1 -1
  44. package/dist/components/ui/badge.js +1 -1
  45. package/dist/components/ui/button.js +1 -1
  46. package/dist/components/ui/calendar.d.ts.map +1 -1
  47. package/dist/components/ui/calendar.js +22 -30
  48. package/dist/components/ui/card.js +1 -1
  49. package/dist/components/ui/checkbox.js +1 -1
  50. package/dist/components/ui/command.d.ts +7 -7
  51. package/dist/components/ui/input.js +1 -1
  52. package/dist/components/ui/label.js +1 -1
  53. package/dist/components/ui/progress.js +1 -1
  54. package/dist/components/ui/relation-display.js +1 -1
  55. package/dist/components/ui/separator.js +1 -1
  56. package/dist/components/ui/sheet.d.ts +1 -1
  57. package/dist/components/ui/simple-relation-select.js +1 -1
  58. package/dist/components/ui/skeleton.js +1 -1
  59. package/dist/components/ui/slider.js +1 -1
  60. package/dist/components/ui/switch.js +1 -1
  61. package/dist/components/ui/tabs.js +1 -1
  62. package/dist/components/ui/textarea.js +1 -1
  63. package/dist/contexts/TeamContext.js +1 -1
  64. package/dist/emails/otp-verification.d.ts +1 -1
  65. package/dist/emails/reset-password.d.ts +1 -1
  66. package/dist/emails/team-invitation.d.ts +1 -1
  67. package/dist/emails/verify-email.d.ts +2 -2
  68. package/dist/hooks/index.d.ts +1 -0
  69. package/dist/hooks/index.d.ts.map +1 -1
  70. package/dist/hooks/index.js +1 -0
  71. package/dist/hooks/useAccountPreferencesSync.d.ts.map +1 -1
  72. package/dist/hooks/useAccountPreferencesSync.js +1 -1
  73. package/dist/hooks/useAuth.d.ts.map +1 -1
  74. package/dist/hooks/useAuth.js +1 -1
  75. package/dist/hooks/useAuthReadiness.d.ts +15 -0
  76. package/dist/hooks/useAuthReadiness.d.ts.map +1 -0
  77. package/dist/hooks/useAuthReadiness.js +62 -0
  78. package/dist/hooks/useContentTranslation.d.ts +7 -7
  79. package/dist/hooks/useContextAwareTranslations.js +10 -10
  80. package/dist/hooks/useEnabledEntities.js +2 -2
  81. package/dist/hooks/useEnsureUserMetadata.js +1 -1
  82. package/dist/hooks/useEntityConfig.js +4 -4
  83. package/dist/hooks/useEntityTranslations.d.ts.map +1 -1
  84. package/dist/hooks/useEntityTranslations.js +6 -2
  85. package/dist/hooks/useLocale.d.ts +3 -1
  86. package/dist/hooks/useLocale.d.ts.map +1 -1
  87. package/dist/hooks/useLocale.js +1 -1
  88. package/dist/hooks/useSubscription.d.ts +1 -1
  89. package/dist/hooks/useSubscription.d.ts.map +1 -1
  90. package/dist/hooks/useTeamsConfig.js +1 -1
  91. package/dist/hooks/useTranslationPreload.js +5 -5
  92. package/dist/i18n.d.ts +1 -14
  93. package/dist/i18n.d.ts.map +1 -1
  94. package/dist/i18n.js +13 -54
  95. package/dist/lib/api/auth/devtools-auth.d.ts +2 -2
  96. package/dist/lib/api/auth/devtools-auth.d.ts.map +1 -1
  97. package/dist/lib/api/auth/devtools-auth.js +3 -3
  98. package/dist/lib/api/entities.js +5 -5
  99. package/dist/lib/api/entity/audit-log.d.ts.map +1 -1
  100. package/dist/lib/api/entity/audit-log.js +12 -3
  101. package/dist/lib/api/entity/generic-handler.d.ts.map +1 -1
  102. package/dist/lib/api/entity/generic-handler.js +24 -38
  103. package/dist/lib/api/entity/resolver.d.ts +1 -3
  104. package/dist/lib/api/entity/resolver.d.ts.map +1 -1
  105. package/dist/lib/api/entity/resolver.js +0 -25
  106. package/dist/lib/api/helpers.d.ts +2 -2
  107. package/dist/lib/api/helpers.d.ts.map +1 -1
  108. package/dist/lib/api/helpers.js +1 -4
  109. package/dist/lib/api/keys.js +1 -1
  110. package/dist/lib/api/rate-limit.d.ts.map +1 -1
  111. package/dist/lib/api/rate-limit.js +2 -0
  112. package/dist/lib/auth/readiness.d.ts +92 -0
  113. package/dist/lib/auth/readiness.d.ts.map +1 -0
  114. package/dist/lib/auth/readiness.js +192 -0
  115. package/dist/lib/auth/request-session.d.ts +15 -0
  116. package/dist/lib/auth/request-session.d.ts.map +1 -0
  117. package/dist/lib/auth/request-session.js +22 -0
  118. package/dist/lib/auth/runtime-readiness.d.ts +49 -0
  119. package/dist/lib/auth/runtime-readiness.d.ts.map +1 -0
  120. package/dist/lib/auth/runtime-readiness.js +183 -0
  121. package/dist/lib/auth-client.d.ts +2 -2
  122. package/dist/lib/auth.d.ts.map +1 -1
  123. package/dist/lib/auth.js +16 -12
  124. package/dist/lib/billing/gateways/factory.d.ts +1 -1
  125. package/dist/lib/billing/schema.d.ts +5 -5
  126. package/dist/lib/config/app.config.d.ts.map +1 -1
  127. package/dist/lib/config/app.config.js +3 -52
  128. package/dist/lib/config/config-client.d.ts +554 -0
  129. package/dist/lib/config/config-client.d.ts.map +1 -0
  130. package/dist/lib/config/config-client.js +68 -0
  131. package/dist/lib/config/config-sync.d.ts.map +1 -1
  132. package/dist/lib/config/config-sync.js +4 -28
  133. package/dist/lib/config/i18n-config-client.d.ts +9 -0
  134. package/dist/lib/config/i18n-config-client.d.ts.map +1 -0
  135. package/dist/lib/config/i18n-config-client.js +7 -0
  136. package/dist/lib/config/i18n.defaults.d.ts +7 -0
  137. package/dist/lib/config/i18n.defaults.d.ts.map +1 -0
  138. package/dist/lib/config/i18n.defaults.js +54 -0
  139. package/dist/lib/config/index.d.ts +2 -2
  140. package/dist/lib/config/index.d.ts.map +1 -1
  141. package/dist/lib/config/index.js +3 -2
  142. package/dist/lib/config/nextspark-types.d.ts +49 -20
  143. package/dist/lib/config/nextspark-types.d.ts.map +1 -1
  144. package/dist/lib/config/nextspark-types.js +174 -1
  145. package/dist/lib/config/public-config-client.d.ts +22 -0
  146. package/dist/lib/config/public-config-client.d.ts.map +1 -0
  147. package/dist/lib/config/public-config-client.js +25 -0
  148. package/dist/lib/config/types.d.ts +1 -1
  149. package/dist/lib/db.d.ts +1 -0
  150. package/dist/lib/db.d.ts.map +1 -1
  151. package/dist/lib/db.js +19 -9
  152. package/dist/lib/email/templates.d.ts +1 -1
  153. package/dist/lib/entities/client-config.d.ts +10 -0
  154. package/dist/lib/entities/client-config.d.ts.map +1 -0
  155. package/dist/lib/entities/client-config.js +44 -0
  156. package/dist/lib/entities/client-entity-meta.d.ts +41 -0
  157. package/dist/lib/entities/client-entity-meta.d.ts.map +1 -0
  158. package/dist/lib/entities/client-entity-meta.js +30 -0
  159. package/dist/lib/entities/portable/media-ref.d.ts +21 -0
  160. package/dist/lib/entities/portable/media-ref.d.ts.map +1 -0
  161. package/dist/lib/entities/portable/media-ref.js +13 -0
  162. package/dist/lib/entities/portable/response-shape.d.ts +57 -0
  163. package/dist/lib/entities/portable/response-shape.d.ts.map +1 -0
  164. package/dist/lib/entities/portable/response-shape.js +50 -0
  165. package/dist/lib/entities/portable/schema-generator.d.ts +48 -0
  166. package/dist/lib/entities/portable/schema-generator.d.ts.map +1 -0
  167. package/dist/lib/entities/portable/schema-generator.js +758 -0
  168. package/dist/lib/entities/portable/system-fields.d.ts +10 -0
  169. package/dist/lib/entities/portable/system-fields.d.ts.map +1 -0
  170. package/dist/lib/entities/portable/system-fields.js +4 -0
  171. package/dist/lib/entities/portable/types.d.ts +81 -0
  172. package/dist/lib/entities/portable/types.d.ts.map +1 -0
  173. package/dist/lib/entities/queries.d.ts +2 -2
  174. package/dist/lib/entities/queries.d.ts.map +1 -1
  175. package/dist/lib/entities/queries.js +2 -2
  176. package/dist/lib/entities/registry.client.js +2 -2
  177. package/dist/lib/entities/registry.d.ts +1 -1
  178. package/dist/lib/entities/registry.js +2 -2
  179. package/dist/lib/entities/schema-generator.d.ts +6 -19
  180. package/dist/lib/entities/schema-generator.d.ts.map +1 -1
  181. package/dist/lib/entities/schema-generator.js +1 -764
  182. package/dist/lib/entities/system-fields.d.ts +3 -5
  183. package/dist/lib/entities/system-fields.d.ts.map +1 -1
  184. package/dist/lib/entities/system-fields.js +1 -1
  185. package/dist/lib/entities/types.d.ts +1 -1
  186. package/dist/lib/entities/types.d.ts.map +1 -1
  187. package/dist/lib/i18n/client-messages.d.ts +49 -0
  188. package/dist/lib/i18n/client-messages.d.ts.map +1 -0
  189. package/dist/lib/i18n/client-messages.js +80 -0
  190. package/dist/lib/locale-client.d.ts +1 -2
  191. package/dist/lib/locale-client.d.ts.map +1 -1
  192. package/dist/lib/locale-client.js +1 -1
  193. package/dist/lib/media/schemas.d.ts +1 -1
  194. package/dist/lib/middleware/index.d.ts +6 -19
  195. package/dist/lib/middleware/index.d.ts.map +1 -1
  196. package/dist/lib/middleware/index.js +11 -14
  197. package/dist/lib/plugins/env-loader.d.ts +1 -1
  198. package/dist/lib/plugins/env-loader.js +1 -1
  199. package/dist/lib/plugins/nav-items.d.ts +3 -0
  200. package/dist/lib/plugins/nav-items.d.ts.map +1 -0
  201. package/dist/lib/plugins/nav-items.js +16 -0
  202. package/dist/lib/scheduled-actions/initializer.d.ts +7 -7
  203. package/dist/lib/scheduled-actions/initializer.d.ts.map +1 -1
  204. package/dist/lib/scheduled-actions/initializer.js +6 -12
  205. package/dist/lib/selectors/auth-sel.d.ts +8 -0
  206. package/dist/lib/selectors/auth-sel.d.ts.map +1 -0
  207. package/dist/lib/selectors/auth-sel.js +6 -0
  208. package/dist/lib/selectors/core-selectors.d.ts +12 -0
  209. package/dist/lib/selectors/core-selectors.d.ts.map +1 -1
  210. package/dist/lib/selectors/domains/auth.selectors.d.ts +12 -0
  211. package/dist/lib/selectors/domains/auth.selectors.d.ts.map +1 -1
  212. package/dist/lib/selectors/domains/auth.selectors.js +18 -3
  213. package/dist/lib/selectors/selectors.d.ts +24 -0
  214. package/dist/lib/selectors/selectors.d.ts.map +1 -1
  215. package/dist/lib/services/index.d.ts +1 -5
  216. package/dist/lib/services/index.d.ts.map +1 -1
  217. package/dist/lib/services/index.js +1 -14
  218. package/dist/lib/services/plugin.service.d.ts +20 -3
  219. package/dist/lib/services/plugin.service.d.ts.map +1 -1
  220. package/dist/lib/services/plugin.service.js +31 -5
  221. package/dist/lib/services/theme.service.d.ts +8 -87
  222. package/dist/lib/services/theme.service.d.ts.map +1 -1
  223. package/dist/lib/services/theme.service.js +16 -128
  224. package/dist/lib/teams/dashboard-team.d.ts +1 -3
  225. package/dist/lib/teams/dashboard-team.d.ts.map +1 -1
  226. package/dist/lib/teams/dashboard-team.js +2 -4
  227. package/dist/lib/teams/schema.d.ts +1 -1
  228. package/dist/lib/theme/ThemeProvider.d.ts +2 -5
  229. package/dist/lib/theme/ThemeProvider.d.ts.map +1 -1
  230. package/dist/lib/theme/ThemeProvider.js +21 -66
  231. package/dist/lib/theme/forced-theme.d.ts +1 -1
  232. package/dist/lib/theme/get-default-theme-mode.d.ts.map +1 -1
  233. package/dist/lib/theme/get-default-theme-mode.js +2 -3
  234. package/dist/lib/theme/import-resolver.js +2 -2
  235. package/dist/lib/theme/override-resolver.js +9 -9
  236. package/dist/lib/theme/theme-styles.d.ts +12 -0
  237. package/dist/lib/theme/theme-styles.d.ts.map +1 -0
  238. package/dist/lib/theme/theme-styles.js +58 -0
  239. package/dist/lib/theme/types.d.ts +0 -2
  240. package/dist/lib/theme/types.d.ts.map +1 -1
  241. package/dist/lib/translations/i18n-integration.d.ts.map +1 -1
  242. package/dist/lib/translations/i18n-integration.js +11 -11
  243. package/dist/lib/translations/registry.d.ts +1 -1
  244. package/dist/lib/translations/registry.d.ts.map +1 -1
  245. package/dist/lib/translations/registry.js +10 -10
  246. package/dist/lib/utils/environment.server.d.ts +0 -1
  247. package/dist/lib/utils/environment.server.d.ts.map +1 -1
  248. package/dist/lib/utils/environment.server.js +5 -1
  249. package/dist/lib/utils/uuid.d.ts +2 -0
  250. package/dist/lib/utils/uuid.d.ts.map +1 -0
  251. package/dist/lib/utils/uuid.js +7 -0
  252. package/dist/lib/validation/invoices.d.ts +2 -2
  253. package/dist/messages/de/auth.json +11 -1
  254. package/dist/messages/de/index.d.ts +10 -0
  255. package/dist/messages/de/index.d.ts.map +1 -1
  256. package/dist/messages/en/auth.json +11 -1
  257. package/dist/messages/en/devtools.json +1 -1
  258. package/dist/messages/en/index.d.ts +10 -0
  259. package/dist/messages/en/index.d.ts.map +1 -1
  260. package/dist/messages/es/auth.json +11 -1
  261. package/dist/messages/es/index.d.ts +10 -0
  262. package/dist/messages/es/index.d.ts.map +1 -1
  263. package/dist/messages/fr/auth.json +11 -1
  264. package/dist/messages/fr/index.d.ts +10 -0
  265. package/dist/messages/fr/index.d.ts.map +1 -1
  266. package/dist/messages/it/auth.json +11 -1
  267. package/dist/messages/it/index.d.ts +10 -0
  268. package/dist/messages/it/index.d.ts.map +1 -1
  269. package/dist/messages/pt/auth.json +11 -1
  270. package/dist/messages/pt/index.d.ts +10 -0
  271. package/dist/messages/pt/index.d.ts.map +1 -1
  272. package/dist/migrations/028_api_audit_log_insert_policy.sql +18 -0
  273. package/dist/migrations/090_sample_data.sql +2 -2
  274. package/dist/migrations/README.md +7 -7
  275. package/dist/nextspark-registries.d.ts +83 -44
  276. package/dist/providers/PluginProvider.js +2 -2
  277. package/dist/providers/static-intl-provider.d.ts +6 -0
  278. package/dist/providers/static-intl-provider.d.ts.map +1 -1
  279. package/dist/providers/static-intl-provider.js +7 -2
  280. package/dist/providers/theme-provider.d.ts.map +1 -1
  281. package/dist/providers/theme-provider.js +7 -1
  282. package/dist/routes/(auth)/accept-invite/[token]/page.d.ts +3 -0
  283. package/dist/routes/(auth)/accept-invite/[token]/page.d.ts.map +1 -0
  284. package/dist/routes/(auth)/accept-invite/[token]/page.js +240 -0
  285. package/dist/routes/(auth)/auth-error/page.d.ts +5 -0
  286. package/dist/routes/(auth)/auth-error/page.d.ts.map +1 -0
  287. package/dist/routes/(auth)/auth-error/page.js +12 -0
  288. package/dist/routes/(auth)/forgot-password/page.d.ts +3 -0
  289. package/dist/routes/(auth)/forgot-password/page.d.ts.map +1 -0
  290. package/dist/routes/(auth)/forgot-password/page.js +203 -0
  291. package/dist/routes/(auth)/layout.cc.d.ts +7 -0
  292. package/dist/routes/(auth)/layout.cc.d.ts.map +1 -0
  293. package/dist/routes/(auth)/layout.cc.js +5 -0
  294. package/dist/routes/(auth)/layout.d.ts +7 -0
  295. package/dist/routes/(auth)/layout.d.ts.map +1 -0
  296. package/dist/routes/(auth)/layout.js +4 -0
  297. package/dist/routes/(auth)/login/page.cc.d.ts +9 -0
  298. package/dist/routes/(auth)/login/page.cc.d.ts.map +1 -0
  299. package/dist/routes/(auth)/login/page.cc.js +1 -0
  300. package/dist/routes/(auth)/login/page.d.ts +6 -0
  301. package/dist/routes/(auth)/login/page.d.ts.map +1 -0
  302. package/dist/routes/(auth)/login/page.js +12 -0
  303. package/dist/routes/(auth)/reset-password/page.d.ts +3 -0
  304. package/dist/routes/(auth)/reset-password/page.d.ts.map +1 -0
  305. package/dist/routes/(auth)/reset-password/page.js +153 -0
  306. package/dist/routes/(auth)/signup/page.cc.d.ts +9 -0
  307. package/dist/routes/(auth)/signup/page.cc.d.ts.map +1 -0
  308. package/dist/routes/(auth)/signup/page.cc.js +1 -0
  309. package/dist/routes/(auth)/signup/page.d.ts +6 -0
  310. package/dist/routes/(auth)/signup/page.d.ts.map +1 -0
  311. package/dist/routes/(auth)/signup/page.js +34 -0
  312. package/dist/routes/(auth)/verify-email/page.d.ts +3 -0
  313. package/dist/routes/(auth)/verify-email/page.d.ts.map +1 -0
  314. package/dist/routes/(auth)/verify-email/page.js +138 -0
  315. package/dist/routes/(public)/docs/[section]/[page]/page.cc.d.ts +12 -0
  316. package/dist/routes/(public)/docs/[section]/[page]/page.cc.d.ts.map +1 -0
  317. package/dist/routes/(public)/docs/[section]/[page]/page.cc.js +64 -0
  318. package/dist/routes/(public)/docs/[section]/[page]/page.d.ts +13 -0
  319. package/dist/routes/(public)/docs/[section]/[page]/page.d.ts.map +1 -0
  320. package/dist/routes/(public)/docs/[section]/[page]/page.js +64 -0
  321. package/dist/routes/(public)/docs/layout.d.ts +4 -0
  322. package/dist/routes/(public)/docs/layout.d.ts.map +1 -0
  323. package/dist/routes/(public)/docs/layout.js +15 -0
  324. package/dist/routes/(public)/docs/page.d.ts +4 -0
  325. package/dist/routes/(public)/docs/page.d.ts.map +1 -0
  326. package/dist/routes/(public)/docs/page.js +53 -0
  327. package/dist/routes/(public)/layout.cc.d.ts +7 -0
  328. package/dist/routes/(public)/layout.cc.d.ts.map +1 -0
  329. package/dist/routes/(public)/layout.cc.js +5 -0
  330. package/dist/routes/(public)/layout.d.ts +7 -0
  331. package/dist/routes/(public)/layout.d.ts.map +1 -0
  332. package/dist/routes/(public)/layout.js +4 -0
  333. package/dist/routes/(public)/page.d.ts +12 -0
  334. package/dist/routes/(public)/page.d.ts.map +1 -0
  335. package/dist/routes/(public)/page.js +5 -0
  336. package/dist/routes/403/page.d.ts +3 -0
  337. package/dist/routes/403/page.d.ts.map +1 -0
  338. package/dist/routes/403/page.js +51 -0
  339. package/dist/routes/_internal/area-access.d.ts +61 -0
  340. package/dist/routes/_internal/area-access.d.ts.map +1 -0
  341. package/dist/routes/_internal/area-access.js +84 -0
  342. package/dist/routes/_internal/auth-layout.cc.d.ts +8 -0
  343. package/dist/routes/_internal/auth-layout.cc.d.ts.map +1 -0
  344. package/dist/routes/_internal/auth-layout.cc.js +2 -0
  345. package/dist/routes/_internal/auth-layout.d.ts +19 -0
  346. package/dist/routes/_internal/auth-layout.d.ts.map +1 -0
  347. package/dist/routes/_internal/auth-layout.js +22 -0
  348. package/dist/routes/_internal/billing-webhooks.d.ts +19 -0
  349. package/dist/routes/_internal/billing-webhooks.d.ts.map +1 -0
  350. package/dist/routes/_internal/billing-webhooks.js +14 -0
  351. package/dist/routes/_internal/default-auth-layout.d.ts +8 -0
  352. package/dist/routes/_internal/default-auth-layout.d.ts.map +1 -0
  353. package/dist/routes/_internal/default-auth-layout.js +15 -0
  354. package/dist/routes/_internal/default-public-layout.d.ts +8 -0
  355. package/dist/routes/_internal/default-public-layout.d.ts.map +1 -0
  356. package/dist/routes/_internal/default-public-layout.js +13 -0
  357. package/dist/routes/_internal/devtools-layout.cc.d.ts +19 -0
  358. package/dist/routes/_internal/devtools-layout.cc.d.ts.map +1 -0
  359. package/dist/routes/_internal/devtools-layout.cc.js +5 -0
  360. package/dist/routes/_internal/devtools-layout.d.ts +36 -0
  361. package/dist/routes/_internal/devtools-layout.d.ts.map +1 -0
  362. package/dist/routes/_internal/devtools-layout.js +41 -0
  363. package/dist/routes/_internal/entity-create-route.d.ts +18 -0
  364. package/dist/routes/_internal/entity-create-route.d.ts.map +1 -0
  365. package/dist/routes/_internal/entity-create-route.js +11 -0
  366. package/dist/routes/_internal/entity-create-view.d.ts +8 -0
  367. package/dist/routes/_internal/entity-create-view.d.ts.map +1 -0
  368. package/dist/routes/_internal/entity-create-view.js +72 -0
  369. package/dist/routes/_internal/entity-dashboard.d.ts +9 -0
  370. package/dist/routes/_internal/entity-dashboard.d.ts.map +1 -0
  371. package/dist/routes/_internal/entity-dashboard.js +8 -0
  372. package/dist/routes/_internal/entity-detail-metadata.d.ts +7 -0
  373. package/dist/routes/_internal/entity-detail-metadata.d.ts.map +1 -0
  374. package/dist/routes/_internal/entity-detail-metadata.js +4 -0
  375. package/dist/routes/_internal/entity-detail-route.d.ts +24 -0
  376. package/dist/routes/_internal/entity-detail-route.d.ts.map +1 -0
  377. package/dist/routes/_internal/entity-detail-route.js +14 -0
  378. package/dist/routes/_internal/entity-edit-route.d.ts +23 -0
  379. package/dist/routes/_internal/entity-edit-route.d.ts.map +1 -0
  380. package/dist/routes/_internal/entity-edit-route.js +12 -0
  381. package/dist/routes/_internal/entity-edit-view.d.ts +9 -0
  382. package/dist/routes/_internal/entity-edit-view.d.ts.map +1 -0
  383. package/dist/routes/_internal/entity-edit-view.js +88 -0
  384. package/dist/routes/_internal/entity-error.d.ts +7 -0
  385. package/dist/routes/_internal/entity-error.d.ts.map +1 -0
  386. package/dist/routes/_internal/entity-error.js +41 -0
  387. package/dist/routes/_internal/entity-layout-route.d.ts +13 -0
  388. package/dist/routes/_internal/entity-layout-route.d.ts.map +1 -0
  389. package/dist/routes/_internal/entity-layout-route.js +7 -0
  390. package/dist/routes/_internal/entity-list-metadata.d.ts +7 -0
  391. package/dist/routes/_internal/entity-list-metadata.d.ts.map +1 -0
  392. package/dist/routes/_internal/entity-list-metadata.js +4 -0
  393. package/dist/routes/_internal/entity-list-route.d.ts +31 -0
  394. package/dist/routes/_internal/entity-list-route.d.ts.map +1 -0
  395. package/dist/routes/_internal/entity-list-route.js +11 -0
  396. package/dist/routes/_internal/entity-loading.d.ts +3 -0
  397. package/dist/routes/_internal/entity-loading.d.ts.map +1 -0
  398. package/dist/routes/_internal/entity-loading.js +48 -0
  399. package/dist/routes/_internal/entity-permission-layout.d.ts +10 -0
  400. package/dist/routes/_internal/entity-permission-layout.d.ts.map +1 -0
  401. package/dist/routes/_internal/entity-permission-layout.js +50 -0
  402. package/dist/routes/_internal/group-layouts.cc.d.ts +35 -0
  403. package/dist/routes/_internal/group-layouts.cc.d.ts.map +1 -0
  404. package/dist/routes/_internal/group-layouts.cc.js +37 -0
  405. package/dist/routes/_internal/polar-webhook.d.ts +27 -0
  406. package/dist/routes/_internal/polar-webhook.d.ts.map +1 -0
  407. package/dist/routes/_internal/polar-webhook.js +321 -0
  408. package/dist/routes/_internal/public-archive-route.d.ts +20 -0
  409. package/dist/routes/_internal/public-archive-route.d.ts.map +1 -0
  410. package/dist/routes/_internal/public-archive-route.js +29 -0
  411. package/dist/routes/_internal/public-entity-shared.d.ts +61 -0
  412. package/dist/routes/_internal/public-entity-shared.d.ts.map +1 -0
  413. package/dist/routes/_internal/public-entity-shared.js +57 -0
  414. package/dist/routes/_internal/public-item-route.cc.d.ts +5 -0
  415. package/dist/routes/_internal/public-item-route.cc.d.ts.map +1 -0
  416. package/dist/routes/_internal/public-item-route.cc.js +32 -0
  417. package/dist/routes/_internal/public-item-route.d.ts +49 -0
  418. package/dist/routes/_internal/public-item-route.d.ts.map +1 -0
  419. package/dist/routes/_internal/public-item-route.js +60 -0
  420. package/dist/routes/_internal/public-layout.cc.d.ts +8 -0
  421. package/dist/routes/_internal/public-layout.cc.d.ts.map +1 -0
  422. package/dist/routes/_internal/public-layout.cc.js +2 -0
  423. package/dist/routes/_internal/public-layout.d.ts +19 -0
  424. package/dist/routes/_internal/public-layout.d.ts.map +1 -0
  425. package/dist/routes/_internal/public-layout.js +18 -0
  426. package/dist/routes/_internal/root-layout.d.ts +13 -0
  427. package/dist/routes/_internal/root-layout.d.ts.map +1 -0
  428. package/dist/routes/_internal/root-layout.js +7 -0
  429. package/dist/routes/_internal/root-layout.ppr.d.ts +11 -0
  430. package/dist/routes/_internal/root-layout.ppr.d.ts.map +1 -0
  431. package/dist/routes/_internal/root-layout.ppr.js +7 -0
  432. package/dist/routes/_internal/superadmin-layout.cc.d.ts +19 -0
  433. package/dist/routes/_internal/superadmin-layout.cc.d.ts.map +1 -0
  434. package/dist/routes/_internal/superadmin-layout.cc.js +5 -0
  435. package/dist/routes/_internal/superadmin-layout.d.ts +35 -0
  436. package/dist/routes/_internal/superadmin-layout.d.ts.map +1 -0
  437. package/dist/routes/_internal/superadmin-layout.js +53 -0
  438. package/dist/routes/api/auth/[...all]/route.d.ts +9 -0
  439. package/dist/routes/api/auth/[...all]/route.d.ts.map +1 -0
  440. package/dist/routes/api/auth/[...all]/route.js +124 -0
  441. package/dist/routes/api/cron/billing/lifecycle/route.d.ts +22 -0
  442. package/dist/routes/api/cron/billing/lifecycle/route.d.ts.map +1 -0
  443. package/dist/routes/api/cron/billing/lifecycle/route.js +60 -0
  444. package/dist/routes/api/csp-report/route.d.ts +4 -0
  445. package/dist/routes/api/csp-report/route.d.ts.map +1 -0
  446. package/dist/routes/api/csp-report/route.js +111 -0
  447. package/dist/routes/api/devtools/config/entities/route.d.ts +9 -0
  448. package/dist/routes/api/devtools/config/entities/route.d.ts.map +1 -0
  449. package/dist/routes/api/devtools/config/entities/route.js +63 -0
  450. package/dist/routes/api/devtools/config/theme/route.d.ts +9 -0
  451. package/dist/routes/api/devtools/config/theme/route.d.ts.map +1 -0
  452. package/dist/routes/api/devtools/config/theme/route.js +48 -0
  453. package/dist/routes/api/devtools/tests/[...path]/route.d.ts +15 -0
  454. package/dist/routes/api/devtools/tests/[...path]/route.d.ts.map +1 -0
  455. package/dist/routes/api/devtools/tests/[...path]/route.js +93 -0
  456. package/dist/routes/api/devtools/tests/route.d.ts +9 -0
  457. package/dist/routes/api/devtools/tests/route.d.ts.map +1 -0
  458. package/dist/routes/api/devtools/tests/route.js +89 -0
  459. package/dist/routes/api/health/route.d.ts +3 -0
  460. package/dist/routes/api/health/route.d.ts.map +1 -0
  461. package/dist/routes/api/health/route.js +39 -0
  462. package/dist/routes/api/internal/user-metadata/route.d.ts +3 -0
  463. package/dist/routes/api/internal/user-metadata/route.d.ts.map +1 -0
  464. package/dist/routes/api/internal/user-metadata/route.js +33 -0
  465. package/dist/routes/api/mcp/route.d.ts +27 -0
  466. package/dist/routes/api/mcp/route.d.ts.map +1 -0
  467. package/dist/routes/api/mcp/route.js +108 -0
  468. package/dist/routes/api/superadmin/subscriptions/route.d.ts +9 -0
  469. package/dist/routes/api/superadmin/subscriptions/route.d.ts.map +1 -0
  470. package/dist/routes/api/superadmin/subscriptions/route.js +235 -0
  471. package/dist/routes/api/superadmin/teams/[teamId]/route.d.ts +13 -0
  472. package/dist/routes/api/superadmin/teams/[teamId]/route.d.ts.map +1 -0
  473. package/dist/routes/api/superadmin/teams/[teamId]/route.js +204 -0
  474. package/dist/routes/api/superadmin/teams/route.d.ts +20 -0
  475. package/dist/routes/api/superadmin/teams/route.d.ts.map +1 -0
  476. package/dist/routes/api/superadmin/teams/route.js +131 -0
  477. package/dist/routes/api/superadmin/users/[userId]/route.d.ts +45 -0
  478. package/dist/routes/api/superadmin/users/[userId]/route.d.ts.map +1 -0
  479. package/dist/routes/api/superadmin/users/[userId]/route.js +362 -0
  480. package/dist/routes/api/superadmin/users/route.d.ts +37 -0
  481. package/dist/routes/api/superadmin/users/route.d.ts.map +1 -0
  482. package/dist/routes/api/superadmin/users/route.js +239 -0
  483. package/dist/routes/api/user/delete-account/route.d.ts +3 -0
  484. package/dist/routes/api/user/delete-account/route.d.ts.map +1 -0
  485. package/dist/routes/api/user/delete-account/route.js +44 -0
  486. package/dist/routes/api/user/plan-flags/route.d.ts +23 -0
  487. package/dist/routes/api/user/plan-flags/route.d.ts.map +1 -0
  488. package/dist/routes/api/user/plan-flags/route.js +201 -0
  489. package/dist/routes/api/user/profile/route.d.ts +4 -0
  490. package/dist/routes/api/user/profile/route.d.ts.map +1 -0
  491. package/dist/routes/api/user/profile/route.js +96 -0
  492. package/dist/routes/api/v1/[entity]/[id]/child/[childType]/[childId]/route.d.ts +20 -0
  493. package/dist/routes/api/v1/[entity]/[id]/child/[childType]/[childId]/route.d.ts.map +1 -0
  494. package/dist/routes/api/v1/[entity]/[id]/child/[childType]/[childId]/route.js +144 -0
  495. package/dist/routes/api/v1/[entity]/[id]/child/[childType]/route.d.ts +19 -0
  496. package/dist/routes/api/v1/[entity]/[id]/child/[childType]/route.d.ts.map +1 -0
  497. package/dist/routes/api/v1/[entity]/[id]/child/[childType]/route.js +249 -0
  498. package/dist/routes/api/v1/[entity]/[id]/route.d.ts +35 -0
  499. package/dist/routes/api/v1/[entity]/[id]/route.d.ts.map +1 -0
  500. package/dist/routes/api/v1/[entity]/[id]/route.js +14 -0
  501. package/dist/routes/api/v1/[entity]/route.d.ts +17 -0
  502. package/dist/routes/api/v1/[entity]/route.d.ts.map +1 -0
  503. package/dist/routes/api/v1/[entity]/route.js +12 -0
  504. package/dist/routes/api/v1/api-keys/[id]/route.d.ts +30 -0
  505. package/dist/routes/api/v1/api-keys/[id]/route.d.ts.map +1 -0
  506. package/dist/routes/api/v1/api-keys/[id]/route.js +189 -0
  507. package/dist/routes/api/v1/api-keys/route.d.ts +5 -0
  508. package/dist/routes/api/v1/api-keys/route.d.ts.map +1 -0
  509. package/dist/routes/api/v1/api-keys/route.js +177 -0
  510. package/dist/routes/api/v1/auth/signup-with-invite/route.d.ts +4 -0
  511. package/dist/routes/api/v1/auth/signup-with-invite/route.d.ts.map +1 -0
  512. package/dist/routes/api/v1/auth/signup-with-invite/route.js +187 -0
  513. package/dist/routes/api/v1/billing/cancel/route.d.ts +19 -0
  514. package/dist/routes/api/v1/billing/cancel/route.d.ts.map +1 -0
  515. package/dist/routes/api/v1/billing/cancel/route.js +153 -0
  516. package/dist/routes/api/v1/billing/change-plan/route.d.ts +19 -0
  517. package/dist/routes/api/v1/billing/change-plan/route.d.ts.map +1 -0
  518. package/dist/routes/api/v1/billing/change-plan/route.js +63 -0
  519. package/dist/routes/api/v1/billing/check-action/route.d.ts +13 -0
  520. package/dist/routes/api/v1/billing/check-action/route.d.ts.map +1 -0
  521. package/dist/routes/api/v1/billing/check-action/route.js +55 -0
  522. package/dist/routes/api/v1/billing/checkout/route.d.ts +11 -0
  523. package/dist/routes/api/v1/billing/checkout/route.d.ts.map +1 -0
  524. package/dist/routes/api/v1/billing/checkout/route.js +114 -0
  525. package/dist/routes/api/v1/billing/plans/route.d.ts +10 -0
  526. package/dist/routes/api/v1/billing/plans/route.d.ts.map +1 -0
  527. package/dist/routes/api/v1/billing/plans/route.js +61 -0
  528. package/dist/routes/api/v1/billing/portal/route.d.ts +11 -0
  529. package/dist/routes/api/v1/billing/portal/route.d.ts.map +1 -0
  530. package/dist/routes/api/v1/billing/portal/route.js +66 -0
  531. package/dist/routes/api/v1/billing/webhooks/polar/route.d.ts +17 -0
  532. package/dist/routes/api/v1/billing/webhooks/polar/route.d.ts.map +1 -0
  533. package/dist/routes/api/v1/billing/webhooks/polar/route.js +3 -0
  534. package/dist/routes/api/v1/billing/webhooks/stripe/route.d.ts +17 -0
  535. package/dist/routes/api/v1/billing/webhooks/stripe/route.d.ts.map +1 -0
  536. package/dist/routes/api/v1/billing/webhooks/stripe/route.js +8 -0
  537. package/dist/routes/api/v1/blocks/[slug]/route.d.ts +7 -0
  538. package/dist/routes/api/v1/blocks/[slug]/route.d.ts.map +1 -0
  539. package/dist/routes/api/v1/blocks/[slug]/route.js +25 -0
  540. package/dist/routes/api/v1/blocks/docs.md +173 -0
  541. package/dist/routes/api/v1/blocks/route.d.ts +3 -0
  542. package/dist/routes/api/v1/blocks/route.d.ts.map +1 -0
  543. package/dist/routes/api/v1/blocks/route.js +44 -0
  544. package/dist/routes/api/v1/blocks/validate/route.d.ts +3 -0
  545. package/dist/routes/api/v1/blocks/validate/route.d.ts.map +1 -0
  546. package/dist/routes/api/v1/blocks/validate/route.js +38 -0
  547. package/dist/routes/api/v1/cron/process/route.d.ts +20 -0
  548. package/dist/routes/api/v1/cron/process/route.d.ts.map +1 -0
  549. package/dist/routes/api/v1/cron/process/route.js +73 -0
  550. package/dist/routes/api/v1/devtools/blocks/route.d.ts +12 -0
  551. package/dist/routes/api/v1/devtools/blocks/route.d.ts.map +1 -0
  552. package/dist/routes/api/v1/devtools/blocks/route.js +60 -0
  553. package/dist/routes/api/v1/devtools/docs/route.d.ts +14 -0
  554. package/dist/routes/api/v1/devtools/docs/route.d.ts.map +1 -0
  555. package/dist/routes/api/v1/devtools/docs/route.js +108 -0
  556. package/dist/routes/api/v1/devtools/docs.md +204 -0
  557. package/dist/routes/api/v1/devtools/features/route.d.ts +12 -0
  558. package/dist/routes/api/v1/devtools/features/route.d.ts.map +1 -0
  559. package/dist/routes/api/v1/devtools/features/route.js +45 -0
  560. package/dist/routes/api/v1/devtools/flows/route.d.ts +12 -0
  561. package/dist/routes/api/v1/devtools/flows/route.d.ts.map +1 -0
  562. package/dist/routes/api/v1/devtools/flows/route.js +45 -0
  563. package/dist/routes/api/v1/devtools/presets.ts +113 -0
  564. package/dist/routes/api/v1/devtools/scheduled-actions/route.d.ts +24 -0
  565. package/dist/routes/api/v1/devtools/scheduled-actions/route.d.ts.map +1 -0
  566. package/dist/routes/api/v1/devtools/scheduled-actions/route.js +180 -0
  567. package/dist/routes/api/v1/devtools/scheduled-actions/run/route.d.ts +12 -0
  568. package/dist/routes/api/v1/devtools/scheduled-actions/run/route.d.ts.map +1 -0
  569. package/dist/routes/api/v1/devtools/scheduled-actions/run/route.js +82 -0
  570. package/dist/routes/api/v1/devtools/testing/route.d.ts +12 -0
  571. package/dist/routes/api/v1/devtools/testing/route.d.ts.map +1 -0
  572. package/dist/routes/api/v1/devtools/testing/route.js +64 -0
  573. package/dist/routes/api/v1/media/[id]/route.d.ts +47 -0
  574. package/dist/routes/api/v1/media/[id]/route.d.ts.map +1 -0
  575. package/dist/routes/api/v1/media/[id]/route.js +86 -0
  576. package/dist/routes/api/v1/media/[id]/tags/route.d.ts +45 -0
  577. package/dist/routes/api/v1/media/[id]/tags/route.d.ts.map +1 -0
  578. package/dist/routes/api/v1/media/[id]/tags/route.js +126 -0
  579. package/dist/routes/api/v1/media/check-duplicates/route.d.ts +12 -0
  580. package/dist/routes/api/v1/media/check-duplicates/route.d.ts.map +1 -0
  581. package/dist/routes/api/v1/media/check-duplicates/route.js +45 -0
  582. package/dist/routes/api/v1/media/route.d.ts +20 -0
  583. package/dist/routes/api/v1/media/route.d.ts.map +1 -0
  584. package/dist/routes/api/v1/media/route.js +33 -0
  585. package/dist/routes/api/v1/media/upload/route.d.ts +24 -0
  586. package/dist/routes/api/v1/media/upload/route.d.ts.map +1 -0
  587. package/dist/routes/api/v1/media/upload/route.js +196 -0
  588. package/dist/routes/api/v1/media-tags/route.d.ts +19 -0
  589. package/dist/routes/api/v1/media-tags/route.d.ts.map +1 -0
  590. package/dist/routes/api/v1/media-tags/route.js +49 -0
  591. package/dist/routes/api/v1/patterns/[id]/usages/route.d.ts +23 -0
  592. package/dist/routes/api/v1/patterns/[id]/usages/route.d.ts.map +1 -0
  593. package/dist/routes/api/v1/patterns/[id]/usages/route.js +69 -0
  594. package/dist/routes/api/v1/post-categories/[id]/route.d.ts +17 -0
  595. package/dist/routes/api/v1/post-categories/[id]/route.d.ts.map +1 -0
  596. package/dist/routes/api/v1/post-categories/[id]/route.js +203 -0
  597. package/dist/routes/api/v1/post-categories/route.d.ts +4 -0
  598. package/dist/routes/api/v1/post-categories/route.d.ts.map +1 -0
  599. package/dist/routes/api/v1/post-categories/route.js +94 -0
  600. package/dist/routes/api/v1/team-invitations/[token]/accept/route.d.ts +8 -0
  601. package/dist/routes/api/v1/team-invitations/[token]/accept/route.d.ts.map +1 -0
  602. package/dist/routes/api/v1/team-invitations/[token]/accept/route.js +130 -0
  603. package/dist/routes/api/v1/team-invitations/[token]/decline/route.d.ts +8 -0
  604. package/dist/routes/api/v1/team-invitations/[token]/decline/route.d.ts.map +1 -0
  605. package/dist/routes/api/v1/team-invitations/[token]/decline/route.js +90 -0
  606. package/dist/routes/api/v1/team-invitations/[token]/route.d.ts +8 -0
  607. package/dist/routes/api/v1/team-invitations/[token]/route.d.ts.map +1 -0
  608. package/dist/routes/api/v1/team-invitations/[token]/route.js +66 -0
  609. package/dist/routes/api/v1/team-invitations/route.d.ts +4 -0
  610. package/dist/routes/api/v1/team-invitations/route.d.ts.map +1 -0
  611. package/dist/routes/api/v1/team-invitations/route.js +82 -0
  612. package/dist/routes/api/v1/teams/[teamId]/invitations/route.d.ts +13 -0
  613. package/dist/routes/api/v1/teams/[teamId]/invitations/route.d.ts.map +1 -0
  614. package/dist/routes/api/v1/teams/[teamId]/invitations/route.js +126 -0
  615. package/dist/routes/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.d.ts +9 -0
  616. package/dist/routes/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.d.ts.map +1 -0
  617. package/dist/routes/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.js +80 -0
  618. package/dist/routes/api/v1/teams/[teamId]/invoices/route.d.ts +8 -0
  619. package/dist/routes/api/v1/teams/[teamId]/invoices/route.d.ts.map +1 -0
  620. package/dist/routes/api/v1/teams/[teamId]/invoices/route.js +98 -0
  621. package/dist/routes/api/v1/teams/[teamId]/members/[memberId]/route.d.ts +15 -0
  622. package/dist/routes/api/v1/teams/[teamId]/members/[memberId]/route.d.ts.map +1 -0
  623. package/dist/routes/api/v1/teams/[teamId]/members/[memberId]/route.js +188 -0
  624. package/dist/routes/api/v1/teams/[teamId]/members/route.d.ts +13 -0
  625. package/dist/routes/api/v1/teams/[teamId]/members/route.d.ts.map +1 -0
  626. package/dist/routes/api/v1/teams/[teamId]/members/route.js +266 -0
  627. package/dist/routes/api/v1/teams/[teamId]/route.d.ts +18 -0
  628. package/dist/routes/api/v1/teams/[teamId]/route.d.ts.map +1 -0
  629. package/dist/routes/api/v1/teams/[teamId]/route.js +222 -0
  630. package/dist/routes/api/v1/teams/[teamId]/subscription/route.d.ts +14 -0
  631. package/dist/routes/api/v1/teams/[teamId]/subscription/route.d.ts.map +1 -0
  632. package/dist/routes/api/v1/teams/[teamId]/subscription/route.js +30 -0
  633. package/dist/routes/api/v1/teams/[teamId]/usage/[limitSlug]/route.d.ts +17 -0
  634. package/dist/routes/api/v1/teams/[teamId]/usage/[limitSlug]/route.d.ts.map +1 -0
  635. package/dist/routes/api/v1/teams/[teamId]/usage/[limitSlug]/route.js +67 -0
  636. package/dist/routes/api/v1/teams/route.d.ts +5 -0
  637. package/dist/routes/api/v1/teams/route.d.ts.map +1 -0
  638. package/dist/routes/api/v1/teams/route.js +231 -0
  639. package/dist/routes/api/v1/teams/switch/route.d.ts +4 -0
  640. package/dist/routes/api/v1/teams/switch/route.d.ts.map +1 -0
  641. package/dist/routes/api/v1/teams/switch/route.js +80 -0
  642. package/dist/routes/api/v1/users/[id]/meta/[key]/route.d.ts +89 -0
  643. package/dist/routes/api/v1/users/[id]/meta/[key]/route.d.ts.map +1 -0
  644. package/dist/routes/api/v1/users/[id]/meta/[key]/route.js +180 -0
  645. package/dist/routes/api/v1/users/[id]/route.d.ts +18 -0
  646. package/dist/routes/api/v1/users/[id]/route.d.ts.map +1 -0
  647. package/dist/routes/api/v1/users/[id]/route.js +189 -0
  648. package/dist/routes/api/v1/users/route.d.ts +5 -0
  649. package/dist/routes/api/v1/users/route.d.ts.map +1 -0
  650. package/dist/routes/api/v1/users/route.js +145 -0
  651. package/dist/routes/dashboard/(main)/layout.d.ts +5 -0
  652. package/dist/routes/dashboard/(main)/layout.d.ts.map +1 -0
  653. package/dist/routes/dashboard/(main)/layout.js +50 -0
  654. package/dist/routes/dashboard/(main)/loading.d.ts +3 -0
  655. package/dist/routes/dashboard/(main)/loading.d.ts.map +1 -0
  656. package/dist/routes/dashboard/(main)/loading.js +6 -0
  657. package/dist/routes/dashboard/(main)/media/page.d.ts +3 -0
  658. package/dist/routes/dashboard/(main)/media/page.d.ts.map +1 -0
  659. package/dist/routes/dashboard/(main)/media/page.js +548 -0
  660. package/dist/routes/dashboard/(main)/page.d.ts +3 -0
  661. package/dist/routes/dashboard/(main)/page.d.ts.map +1 -0
  662. package/dist/routes/dashboard/(main)/page.js +168 -0
  663. package/dist/routes/dashboard/(main)/patterns/[id]/edit/page.d.ts +8 -0
  664. package/dist/routes/dashboard/(main)/patterns/[id]/edit/page.d.ts.map +1 -0
  665. package/dist/routes/dashboard/(main)/patterns/[id]/edit/page.js +85 -0
  666. package/dist/routes/dashboard/(main)/patterns/[id]/page.d.ts +13 -0
  667. package/dist/routes/dashboard/(main)/patterns/[id]/page.d.ts.map +1 -0
  668. package/dist/routes/dashboard/(main)/patterns/[id]/page.js +6 -0
  669. package/dist/routes/dashboard/(main)/patterns/[id]/reports/page.d.ts +9 -0
  670. package/dist/routes/dashboard/(main)/patterns/[id]/reports/page.d.ts.map +1 -0
  671. package/dist/routes/dashboard/(main)/patterns/[id]/reports/page.js +128 -0
  672. package/dist/routes/dashboard/(main)/patterns/create/page.d.ts +8 -0
  673. package/dist/routes/dashboard/(main)/patterns/create/page.d.ts.map +1 -0
  674. package/dist/routes/dashboard/(main)/patterns/create/page.js +64 -0
  675. package/dist/routes/dashboard/(main)/patterns/page.d.ts +9 -0
  676. package/dist/routes/dashboard/(main)/patterns/page.d.ts.map +1 -0
  677. package/dist/routes/dashboard/(main)/patterns/page.js +334 -0
  678. package/dist/routes/dashboard/features/analytics/page.d.ts +3 -0
  679. package/dist/routes/dashboard/features/analytics/page.d.ts.map +1 -0
  680. package/dist/routes/dashboard/features/analytics/page.js +32 -0
  681. package/dist/routes/dashboard/features/automation/page.d.ts +3 -0
  682. package/dist/routes/dashboard/features/automation/page.d.ts.map +1 -0
  683. package/dist/routes/dashboard/features/automation/page.js +32 -0
  684. package/dist/routes/dashboard/features/layout.d.ts +7 -0
  685. package/dist/routes/dashboard/features/layout.d.ts.map +1 -0
  686. package/dist/routes/dashboard/features/layout.js +5 -0
  687. package/dist/routes/dashboard/features/loading.d.ts +3 -0
  688. package/dist/routes/dashboard/features/loading.d.ts.map +1 -0
  689. package/dist/routes/dashboard/features/loading.js +6 -0
  690. package/dist/routes/dashboard/features/webhooks/page.d.ts +3 -0
  691. package/dist/routes/dashboard/features/webhooks/page.d.ts.map +1 -0
  692. package/dist/routes/dashboard/features/webhooks/page.js +32 -0
  693. package/dist/routes/dashboard/layout.cc.d.ts +6 -0
  694. package/dist/routes/dashboard/layout.cc.d.ts.map +1 -0
  695. package/dist/routes/dashboard/layout.cc.js +3 -0
  696. package/dist/routes/dashboard/layout.d.ts +9 -0
  697. package/dist/routes/dashboard/layout.d.ts.map +1 -0
  698. package/dist/routes/dashboard/layout.js +15 -0
  699. package/dist/routes/dashboard/permission-denied/page.d.ts +9 -0
  700. package/dist/routes/dashboard/permission-denied/page.d.ts.map +1 -0
  701. package/dist/routes/dashboard/permission-denied/page.js +17 -0
  702. package/dist/routes/dashboard/settings/api-keys/loading.d.ts +3 -0
  703. package/dist/routes/dashboard/settings/api-keys/loading.d.ts.map +1 -0
  704. package/dist/routes/dashboard/settings/api-keys/loading.js +6 -0
  705. package/dist/routes/dashboard/settings/api-keys/page.d.ts +3 -0
  706. package/dist/routes/dashboard/settings/api-keys/page.d.ts.map +1 -0
  707. package/dist/routes/dashboard/settings/api-keys/page.js +391 -0
  708. package/dist/routes/dashboard/settings/billing/loading.d.ts +3 -0
  709. package/dist/routes/dashboard/settings/billing/loading.d.ts.map +1 -0
  710. package/dist/routes/dashboard/settings/billing/loading.js +6 -0
  711. package/dist/routes/dashboard/settings/billing/page.d.ts +3 -0
  712. package/dist/routes/dashboard/settings/billing/page.d.ts.map +1 -0
  713. package/dist/routes/dashboard/settings/billing/page.js +240 -0
  714. package/dist/routes/dashboard/settings/invoices/[invoiceNumber]/page.d.ts +8 -0
  715. package/dist/routes/dashboard/settings/invoices/[invoiceNumber]/page.d.ts.map +1 -0
  716. package/dist/routes/dashboard/settings/invoices/[invoiceNumber]/page.js +151 -0
  717. package/dist/routes/dashboard/settings/invoices/loading.d.ts +3 -0
  718. package/dist/routes/dashboard/settings/invoices/loading.d.ts.map +1 -0
  719. package/dist/routes/dashboard/settings/invoices/loading.js +6 -0
  720. package/dist/routes/dashboard/settings/invoices/page.d.ts +3 -0
  721. package/dist/routes/dashboard/settings/invoices/page.d.ts.map +1 -0
  722. package/dist/routes/dashboard/settings/invoices/page.js +65 -0
  723. package/dist/routes/dashboard/settings/layout.d.ts +5 -0
  724. package/dist/routes/dashboard/settings/layout.d.ts.map +1 -0
  725. package/dist/routes/dashboard/settings/layout.js +142 -0
  726. package/dist/routes/dashboard/settings/loading.d.ts +3 -0
  727. package/dist/routes/dashboard/settings/loading.d.ts.map +1 -0
  728. package/dist/routes/dashboard/settings/loading.js +6 -0
  729. package/dist/routes/dashboard/settings/notifications/loading.d.ts +3 -0
  730. package/dist/routes/dashboard/settings/notifications/loading.d.ts.map +1 -0
  731. package/dist/routes/dashboard/settings/notifications/loading.js +6 -0
  732. package/dist/routes/dashboard/settings/notifications/page.d.ts +3 -0
  733. package/dist/routes/dashboard/settings/notifications/page.d.ts.map +1 -0
  734. package/dist/routes/dashboard/settings/notifications/page.js +399 -0
  735. package/dist/routes/dashboard/settings/page.d.ts +3 -0
  736. package/dist/routes/dashboard/settings/page.d.ts.map +1 -0
  737. package/dist/routes/dashboard/settings/page.js +82 -0
  738. package/dist/routes/dashboard/settings/password/loading.d.ts +3 -0
  739. package/dist/routes/dashboard/settings/password/loading.d.ts.map +1 -0
  740. package/dist/routes/dashboard/settings/password/loading.js +6 -0
  741. package/dist/routes/dashboard/settings/password/page.d.ts +3 -0
  742. package/dist/routes/dashboard/settings/password/page.d.ts.map +1 -0
  743. package/dist/routes/dashboard/settings/password/page.js +302 -0
  744. package/dist/routes/dashboard/settings/plans/loading.d.ts +3 -0
  745. package/dist/routes/dashboard/settings/plans/loading.d.ts.map +1 -0
  746. package/dist/routes/dashboard/settings/plans/loading.js +6 -0
  747. package/dist/routes/dashboard/settings/plans/page.d.ts +9 -0
  748. package/dist/routes/dashboard/settings/plans/page.d.ts.map +1 -0
  749. package/dist/routes/dashboard/settings/plans/page.js +43 -0
  750. package/dist/routes/dashboard/settings/profile/loading.d.ts +3 -0
  751. package/dist/routes/dashboard/settings/profile/loading.d.ts.map +1 -0
  752. package/dist/routes/dashboard/settings/profile/loading.js +6 -0
  753. package/dist/routes/dashboard/settings/profile/page.d.ts +3 -0
  754. package/dist/routes/dashboard/settings/profile/page.d.ts.map +1 -0
  755. package/dist/routes/dashboard/settings/profile/page.js +615 -0
  756. package/dist/routes/dashboard/settings/security/loading.d.ts +3 -0
  757. package/dist/routes/dashboard/settings/security/loading.d.ts.map +1 -0
  758. package/dist/routes/dashboard/settings/security/loading.js +6 -0
  759. package/dist/routes/dashboard/settings/security/page.d.ts +3 -0
  760. package/dist/routes/dashboard/settings/security/page.d.ts.map +1 -0
  761. package/dist/routes/dashboard/settings/security/page.js +400 -0
  762. package/dist/routes/dashboard/settings/teams/loading.d.ts +3 -0
  763. package/dist/routes/dashboard/settings/teams/loading.d.ts.map +1 -0
  764. package/dist/routes/dashboard/settings/teams/loading.js +6 -0
  765. package/dist/routes/dashboard/settings/teams/page.d.ts +3 -0
  766. package/dist/routes/dashboard/settings/teams/page.d.ts.map +1 -0
  767. package/dist/routes/dashboard/settings/teams/page.js +205 -0
  768. package/dist/routes/dashboard/settings/teams/permissions/page.d.ts +9 -0
  769. package/dist/routes/dashboard/settings/teams/permissions/page.d.ts.map +1 -0
  770. package/dist/routes/dashboard/settings/teams/permissions/page.js +50 -0
  771. package/dist/routes/devtools/api/[[...endpoint]]/page.d.ts +19 -0
  772. package/dist/routes/devtools/api/[[...endpoint]]/page.d.ts.map +1 -0
  773. package/dist/routes/devtools/api/[[...endpoint]]/page.js +14 -0
  774. package/dist/routes/devtools/api/layout.d.ts +20 -0
  775. package/dist/routes/devtools/api/layout.d.ts.map +1 -0
  776. package/dist/routes/devtools/api/layout.js +6 -0
  777. package/dist/routes/devtools/blocks/[slug]/page.d.ts +20 -0
  778. package/dist/routes/devtools/blocks/[slug]/page.d.ts.map +1 -0
  779. package/dist/routes/devtools/blocks/[slug]/page.js +16 -0
  780. package/dist/routes/devtools/blocks/page.d.ts +2 -0
  781. package/dist/routes/devtools/blocks/page.d.ts.map +1 -0
  782. package/dist/routes/devtools/blocks/page.js +21 -0
  783. package/dist/routes/devtools/config/page.d.ts +2 -0
  784. package/dist/routes/devtools/config/page.d.ts.map +1 -0
  785. package/dist/routes/devtools/config/page.js +21 -0
  786. package/dist/routes/devtools/features/page.d.ts +2 -0
  787. package/dist/routes/devtools/features/page.d.ts.map +1 -0
  788. package/dist/routes/devtools/features/page.js +21 -0
  789. package/dist/routes/devtools/flows/page.d.ts +2 -0
  790. package/dist/routes/devtools/flows/page.d.ts.map +1 -0
  791. package/dist/routes/devtools/flows/page.js +21 -0
  792. package/dist/routes/devtools/layout.cc.d.ts +7 -0
  793. package/dist/routes/devtools/layout.cc.d.ts.map +1 -0
  794. package/dist/routes/devtools/layout.cc.js +4 -0
  795. package/dist/routes/devtools/layout.d.ts +5 -0
  796. package/dist/routes/devtools/layout.d.ts.map +1 -0
  797. package/dist/routes/devtools/layout.js +3 -0
  798. package/dist/routes/devtools/page.d.ts +2 -0
  799. package/dist/routes/devtools/page.d.ts.map +1 -0
  800. package/dist/routes/devtools/page.js +92 -0
  801. package/dist/routes/devtools/plugins/[plugin]/page.d.ts +8 -0
  802. package/dist/routes/devtools/plugins/[plugin]/page.d.ts.map +1 -0
  803. package/dist/routes/devtools/plugins/[plugin]/page.js +11 -0
  804. package/dist/routes/devtools/scheduled-actions/page.d.ts +15 -0
  805. package/dist/routes/devtools/scheduled-actions/page.d.ts.map +1 -0
  806. package/dist/routes/devtools/scheduled-actions/page.js +121 -0
  807. package/dist/routes/devtools/style/page.d.ts +8 -0
  808. package/dist/routes/devtools/style/page.d.ts.map +1 -0
  809. package/dist/routes/devtools/style/page.js +241 -0
  810. package/dist/routes/devtools/tags/page.d.ts +2 -0
  811. package/dist/routes/devtools/tags/page.d.ts.map +1 -0
  812. package/dist/routes/devtools/tags/page.js +21 -0
  813. package/dist/routes/devtools/tests/[[...path]]/page.d.ts +8 -0
  814. package/dist/routes/devtools/tests/[[...path]]/page.d.ts.map +1 -0
  815. package/dist/routes/devtools/tests/[[...path]]/page.js +30 -0
  816. package/dist/routes/layout.d.ts +10 -0
  817. package/dist/routes/layout.d.ts.map +1 -0
  818. package/dist/routes/layout.js +73 -0
  819. package/dist/routes/layout.ppr.d.ts +26 -0
  820. package/dist/routes/layout.ppr.d.ts.map +1 -0
  821. package/dist/routes/layout.ppr.js +58 -0
  822. package/dist/routes/manifest.json +784 -0
  823. package/dist/routes/public/page.d.ts +3 -0
  824. package/dist/routes/public/page.d.ts.map +1 -0
  825. package/dist/routes/public/page.js +12 -0
  826. package/dist/routes/superadmin/docs/[section]/[page]/page.cc.d.ts +15 -0
  827. package/dist/routes/superadmin/docs/[section]/[page]/page.cc.d.ts.map +1 -0
  828. package/dist/routes/superadmin/docs/[section]/[page]/page.cc.js +63 -0
  829. package/dist/routes/superadmin/docs/[section]/[page]/page.d.ts +16 -0
  830. package/dist/routes/superadmin/docs/[section]/[page]/page.d.ts.map +1 -0
  831. package/dist/routes/superadmin/docs/[section]/[page]/page.js +61 -0
  832. package/dist/routes/superadmin/docs/page.d.ts +4 -0
  833. package/dist/routes/superadmin/docs/page.d.ts.map +1 -0
  834. package/dist/routes/superadmin/docs/page.js +50 -0
  835. package/dist/routes/superadmin/layout.cc.d.ts +7 -0
  836. package/dist/routes/superadmin/layout.cc.d.ts.map +1 -0
  837. package/dist/routes/superadmin/layout.cc.js +4 -0
  838. package/dist/routes/superadmin/layout.d.ts +5 -0
  839. package/dist/routes/superadmin/layout.d.ts.map +1 -0
  840. package/dist/routes/superadmin/layout.js +3 -0
  841. package/dist/routes/superadmin/page.d.ts +8 -0
  842. package/dist/routes/superadmin/page.d.ts.map +1 -0
  843. package/dist/routes/superadmin/page.js +91 -0
  844. package/dist/routes/superadmin/plugins/[plugin]/page.d.ts +8 -0
  845. package/dist/routes/superadmin/plugins/[plugin]/page.d.ts.map +1 -0
  846. package/dist/routes/superadmin/plugins/[plugin]/page.js +11 -0
  847. package/dist/routes/superadmin/subscriptions/page.d.ts +9 -0
  848. package/dist/routes/superadmin/subscriptions/page.d.ts.map +1 -0
  849. package/dist/routes/superadmin/subscriptions/page.js +470 -0
  850. package/dist/routes/superadmin/team-roles/page.d.ts +12 -0
  851. package/dist/routes/superadmin/team-roles/page.d.ts.map +1 -0
  852. package/dist/routes/superadmin/team-roles/page.js +385 -0
  853. package/dist/routes/superadmin/teams/[teamId]/page.d.ts +8 -0
  854. package/dist/routes/superadmin/teams/[teamId]/page.d.ts.map +1 -0
  855. package/dist/routes/superadmin/teams/[teamId]/page.js +429 -0
  856. package/dist/routes/superadmin/teams/page.d.ts +9 -0
  857. package/dist/routes/superadmin/teams/page.d.ts.map +1 -0
  858. package/dist/routes/superadmin/teams/page.js +259 -0
  859. package/dist/routes/superadmin/users/[userId]/page.d.ts +8 -0
  860. package/dist/routes/superadmin/users/[userId]/page.d.ts.map +1 -0
  861. package/dist/routes/superadmin/users/[userId]/page.js +342 -0
  862. package/dist/routes/superadmin/users/page.d.ts +9 -0
  863. package/dist/routes/superadmin/users/page.d.ts.map +1 -0
  864. package/dist/routes/superadmin/users/page.js +410 -0
  865. package/dist/routes/variants.json +86 -0
  866. package/dist/templates/blocks/README.md +6 -12
  867. package/dist/templates/blocks/cta-section/config.ts +0 -1
  868. package/dist/templates/blocks/cta-section/thumbnail.png +0 -0
  869. package/dist/templates/blocks/features-grid/config.ts +0 -1
  870. package/dist/templates/blocks/features-grid/thumbnail.png +0 -0
  871. package/dist/templates/blocks/hero/config.ts +0 -1
  872. package/dist/templates/blocks/hero/thumbnail.png +0 -0
  873. package/dist/templates/blocks/testimonials/config.ts +0 -1
  874. package/dist/templates/blocks/testimonials/thumbnail.png +0 -0
  875. package/dist/templates/blocks/text-content/config.ts +0 -1
  876. package/dist/templates/blocks/text-content/thumbnail.png +0 -0
  877. package/dist/templates/ci-workflows/README.md +4 -5
  878. package/dist/templates/ci-workflows/github/cypress-regression.yml +7 -14
  879. package/dist/templates/ci-workflows/github/cypress-smoke.yml +3 -5
  880. package/dist/templates/eslint.config.mjs +3 -3
  881. package/dist/templates/features/blog/blocks/post-content/config.ts +0 -1
  882. package/dist/templates/features/blog/entities/posts/posts.config.ts +1 -1
  883. package/dist/templates/features/pages/blocks/hero/config.ts +0 -1
  884. package/dist/templates/features/pages/entities/pages/pages.config.ts +1 -1
  885. package/dist/templates/instrumentation.ts +9 -0
  886. package/dist/templates/migrations/README.md +2 -2
  887. package/dist/templates/next.config.mjs +34 -8
  888. package/dist/templates/plugins/README.md +42 -0
  889. package/dist/templates/plugins/starter/plugin/README.md.template +97 -0
  890. package/dist/templates/plugins/starter/plugin/api/example/route.ts.template +94 -0
  891. package/dist/templates/plugins/starter/plugin/hooks/usePlugin.ts.template +102 -0
  892. package/dist/templates/pnpm-workspace.yaml +3 -5
  893. package/dist/templates/projects/blog/README.md +62 -0
  894. package/dist/templates/projects/blog/about.md +93 -0
  895. package/dist/templates/projects/blog/api/authors/[username]/route.ts +153 -0
  896. package/dist/templates/projects/blog/api/authors/docs.md +135 -0
  897. package/dist/templates/projects/blog/api/authors/presets.ts +45 -0
  898. package/dist/templates/projects/blog/api/authors/route.ts +66 -0
  899. package/dist/templates/projects/blog/api/posts/public/docs.md +124 -0
  900. package/dist/templates/projects/blog/api/posts/public/presets.ts +65 -0
  901. package/dist/templates/projects/blog/api/posts/public/route.ts +154 -0
  902. package/dist/templates/projects/blog/components/ExportPostsButton.tsx +103 -0
  903. package/dist/templates/projects/blog/components/ImportPostsDialog.tsx +285 -0
  904. package/dist/templates/projects/blog/components/PostsToolbar.tsx +24 -0
  905. package/dist/templates/projects/blog/components/editor/FeaturedImageUpload.tsx +186 -0
  906. package/dist/templates/projects/blog/components/editor/WysiwygEditor.tsx +389 -0
  907. package/dist/templates/projects/blog/components/index.ts +4 -0
  908. package/dist/templates/projects/blog/components/public/AuthorBio.tsx +106 -0
  909. package/dist/templates/projects/blog/components/public/AuthorCard.tsx +131 -0
  910. package/dist/templates/projects/blog/components/public/BlogFooter.tsx +186 -0
  911. package/dist/templates/projects/blog/components/public/BlogNavbar.tsx +201 -0
  912. package/dist/templates/projects/blog/components/public/PostCard.tsx +307 -0
  913. package/dist/templates/projects/blog/components/public/ReadingProgress.tsx +70 -0
  914. package/dist/templates/projects/blog/components/public/RelatedPosts.tsx +79 -0
  915. package/dist/templates/projects/blog/config/app.config.ts +193 -0
  916. package/dist/templates/projects/blog/config/billing.config.ts +143 -0
  917. package/dist/templates/projects/blog/config/dashboard.config.ts +346 -0
  918. package/dist/templates/projects/blog/config/dev.config.ts +48 -0
  919. package/dist/templates/projects/blog/config/features.config.ts +196 -0
  920. package/dist/templates/projects/blog/config/flows.config.ts +333 -0
  921. package/dist/templates/projects/blog/config/permissions.config.ts +112 -0
  922. package/dist/templates/projects/blog/config/theme.config.ts +128 -0
  923. package/dist/templates/projects/blog/entities/categories/api/docs.md +119 -0
  924. package/dist/templates/projects/blog/entities/categories/api/presets.ts +67 -0
  925. package/dist/templates/projects/blog/entities/categories/categories.config.ts +60 -0
  926. package/dist/templates/projects/blog/entities/categories/categories.fields.ts +115 -0
  927. package/dist/templates/projects/blog/entities/categories/categories.service.ts +333 -0
  928. package/dist/templates/projects/blog/entities/categories/categories.types.ts +58 -0
  929. package/dist/templates/projects/blog/entities/categories/messages/en.json +33 -0
  930. package/dist/templates/projects/blog/entities/categories/messages/es.json +33 -0
  931. package/dist/templates/projects/blog/entities/posts/api/docs.md +174 -0
  932. package/dist/templates/projects/blog/entities/posts/api/presets.ts +137 -0
  933. package/dist/templates/projects/blog/entities/posts/messages/en.json +100 -0
  934. package/dist/templates/projects/blog/entities/posts/messages/es.json +100 -0
  935. package/dist/templates/projects/blog/entities/posts/migrations/001_posts_table.sql +110 -0
  936. package/dist/templates/projects/blog/entities/posts/migrations/002_add_featured.sql +19 -0
  937. package/dist/templates/projects/blog/entities/posts/migrations/003_post_categories_pivot.sql +47 -0
  938. package/dist/templates/projects/blog/entities/posts/posts.config.ts +61 -0
  939. package/dist/templates/projects/blog/entities/posts/posts.fields.ts +234 -0
  940. package/dist/templates/projects/blog/entities/posts/posts.service.ts +464 -0
  941. package/dist/templates/projects/blog/entities/posts/posts.types.ts +80 -0
  942. package/dist/templates/projects/blog/lib/sanitize-post-html.ts +52 -0
  943. package/dist/templates/projects/blog/lib/selectors.ts +178 -0
  944. package/dist/templates/projects/blog/messages/en.json +113 -0
  945. package/dist/templates/projects/blog/messages/es.json +113 -0
  946. package/dist/templates/projects/blog/migrations/002_author_profile_fields.sql +37 -0
  947. package/dist/templates/projects/blog/migrations/003_categories_table.sql +90 -0
  948. package/dist/templates/projects/blog/migrations/090_billing_sample_data.sql +99 -0
  949. package/dist/templates/projects/blog/migrations/999_sample_data.sql +412 -0
  950. package/dist/templates/projects/blog/migrations/999_theme_sample_data.sql +1070 -0
  951. package/dist/templates/projects/blog/package.json +30 -0
  952. package/dist/templates/projects/blog/permissions-matrix.md +63 -0
  953. package/dist/templates/projects/blog/styles/article.css +333 -0
  954. package/dist/templates/projects/blog/styles/components.css +204 -0
  955. package/dist/templates/projects/blog/styles/globals.css +384 -0
  956. package/dist/templates/projects/blog/styles/theme.css +167 -0
  957. package/dist/templates/projects/blog/templates/(public)/author/[username]/page.tsx +248 -0
  958. package/dist/templates/projects/blog/templates/(public)/authors/page.tsx +162 -0
  959. package/dist/templates/projects/blog/templates/(public)/layout.tsx +44 -0
  960. package/dist/templates/projects/blog/templates/(public)/page.tsx +277 -0
  961. package/dist/templates/projects/blog/templates/(public)/posts/[slug]/page.tsx +344 -0
  962. package/dist/templates/projects/blog/templates/dashboard/(main)/page.tsx +386 -0
  963. package/dist/templates/projects/blog/templates/dashboard/(main)/posts/[id]/edit/page.tsx +530 -0
  964. package/dist/templates/projects/blog/templates/dashboard/(main)/posts/[id]/page.tsx +33 -0
  965. package/dist/templates/projects/blog/templates/dashboard/(main)/posts/create/page.tsx +354 -0
  966. package/dist/templates/projects/blog/templates/dashboard/(main)/posts/page.tsx +834 -0
  967. package/dist/templates/projects/blog/tests/cypress/e2e/README.md +170 -0
  968. package/dist/templates/projects/blog/tests/cypress/e2e/categories/categories-crud.cy.ts +322 -0
  969. package/dist/templates/projects/blog/tests/cypress/e2e/categories/categories-crud.md +73 -0
  970. package/dist/templates/projects/blog/tests/cypress/e2e/posts/posts-crud.cy.ts +460 -0
  971. package/dist/templates/projects/blog/tests/cypress/e2e/posts/posts-crud.md +115 -0
  972. package/dist/templates/projects/blog/tests/cypress/e2e/posts/posts-editor.cy.ts +290 -0
  973. package/dist/templates/projects/blog/tests/cypress/e2e/posts/posts-editor.md +139 -0
  974. package/dist/templates/projects/blog/tests/cypress/e2e/posts/posts-status-workflow.cy.ts +302 -0
  975. package/dist/templates/projects/blog/tests/cypress/e2e/posts/posts-status-workflow.md +83 -0
  976. package/dist/templates/projects/blog/tests/cypress/fixtures/blocks.json +9 -0
  977. package/dist/templates/projects/blog/tests/cypress/fixtures/entities.json +51 -0
  978. package/dist/templates/projects/blog/tests/cypress/src/FeaturedImageUpload.js +131 -0
  979. package/dist/templates/projects/blog/tests/cypress/src/PostEditor.js +386 -0
  980. package/dist/templates/projects/blog/tests/cypress/src/PostsList.js +350 -0
  981. package/dist/templates/projects/blog/tests/cypress/src/WysiwygEditor.js +373 -0
  982. package/dist/templates/projects/blog/tests/cypress/src/components/EntityForm.ts +378 -0
  983. package/dist/templates/projects/blog/tests/cypress/src/components/EntityList.ts +378 -0
  984. package/dist/templates/projects/blog/tests/cypress/src/components/PostEditorPOM.ts +447 -0
  985. package/dist/templates/projects/blog/tests/cypress/src/components/PostsPOM.ts +362 -0
  986. package/dist/templates/projects/blog/tests/cypress/src/components/index.ts +18 -0
  987. package/dist/templates/projects/blog/tests/cypress/src/index.js +33 -0
  988. package/dist/templates/projects/blog/tests/cypress/src/selectors.ts +49 -0
  989. package/dist/templates/projects/blog/tests/cypress/src/session-helpers.ts +151 -0
  990. package/dist/templates/projects/blog/tests/cypress/support/e2e.ts +90 -0
  991. package/dist/templates/projects/blog/tests/cypress.config.ts +149 -0
  992. package/dist/templates/projects/blog/tests/jest/components/WysiwygEditor.test.tsx +118 -0
  993. package/dist/templates/projects/blog/tests/jest/jest.config.cjs +104 -0
  994. package/dist/templates/projects/blog/tests/jest/lib/sanitize-post-html.test.ts +48 -0
  995. package/dist/templates/projects/blog/tests/jest/setup.ts +170 -0
  996. package/dist/templates/projects/blog/tests/jest/tsconfig.jest.json +6 -0
  997. package/dist/templates/projects/blog/tests/tsconfig.json +7 -0
  998. package/dist/templates/projects/crm/CRM_PLAN.md +343 -0
  999. package/dist/templates/projects/crm/about.md +122 -0
  1000. package/dist/templates/projects/crm/config/app.config.ts +178 -0
  1001. package/dist/templates/projects/crm/config/billing.config.ts +184 -0
  1002. package/dist/templates/projects/crm/config/dashboard.config.ts +385 -0
  1003. package/dist/templates/projects/crm/config/dev.config.ts +55 -0
  1004. package/dist/templates/projects/crm/config/features.config.ts +336 -0
  1005. package/dist/templates/projects/crm/config/flows.config.ts +511 -0
  1006. package/dist/templates/projects/crm/config/permissions.config.ts +308 -0
  1007. package/dist/templates/projects/crm/config/theme.config.ts +111 -0
  1008. package/dist/templates/projects/crm/entities/activities/activities.config.ts +61 -0
  1009. package/dist/templates/projects/crm/entities/activities/activities.fields.ts +362 -0
  1010. package/dist/templates/projects/crm/entities/activities/activities.service.ts +503 -0
  1011. package/dist/templates/projects/crm/entities/activities/activities.types.ts +117 -0
  1012. package/dist/templates/projects/crm/entities/activities/api/docs.md +146 -0
  1013. package/dist/templates/projects/crm/entities/activities/api/presets.ts +132 -0
  1014. package/dist/templates/projects/crm/entities/activities/messages/en.json +123 -0
  1015. package/dist/templates/projects/crm/entities/activities/messages/es.json +123 -0
  1016. package/dist/templates/projects/crm/entities/activities/migrations/020_activities_table.sql +123 -0
  1017. package/dist/templates/projects/crm/entities/activities/migrations/021_activities_metas.sql +114 -0
  1018. package/dist/templates/projects/crm/entities/activities/migrations/022_activities_sample_data.sql +420 -0
  1019. package/dist/templates/projects/crm/entities/campaigns/api/docs.md +140 -0
  1020. package/dist/templates/projects/crm/entities/campaigns/api/presets.ts +147 -0
  1021. package/dist/templates/projects/crm/entities/campaigns/campaigns.config.ts +61 -0
  1022. package/dist/templates/projects/crm/entities/campaigns/campaigns.fields.ts +413 -0
  1023. package/dist/templates/projects/crm/entities/campaigns/campaigns.service.ts +426 -0
  1024. package/dist/templates/projects/crm/entities/campaigns/campaigns.types.ts +124 -0
  1025. package/dist/templates/projects/crm/entities/campaigns/messages/en.json +145 -0
  1026. package/dist/templates/projects/crm/entities/campaigns/messages/es.json +145 -0
  1027. package/dist/templates/projects/crm/entities/campaigns/migrations/001_campaigns_table.sql +127 -0
  1028. package/dist/templates/projects/crm/entities/campaigns/migrations/002_campaigns_metas.sql +114 -0
  1029. package/dist/templates/projects/crm/entities/campaigns/migrations/003_campaigns_sample_data.sql +364 -0
  1030. package/dist/templates/projects/crm/entities/companies/api/docs.md +139 -0
  1031. package/dist/templates/projects/crm/entities/companies/api/presets.ts +107 -0
  1032. package/dist/templates/projects/crm/entities/companies/companies.config.ts +61 -0
  1033. package/dist/templates/projects/crm/entities/companies/companies.fields.ts +429 -0
  1034. package/dist/templates/projects/crm/entities/companies/companies.service.ts +566 -0
  1035. package/dist/templates/projects/crm/entities/companies/companies.types.ts +125 -0
  1036. package/dist/templates/projects/crm/entities/companies/messages/en.json +146 -0
  1037. package/dist/templates/projects/crm/entities/companies/messages/es.json +146 -0
  1038. package/dist/templates/projects/crm/entities/companies/migrations/001_companies_table.sql +150 -0
  1039. package/dist/templates/projects/crm/entities/companies/migrations/002_companies_metas.sql +114 -0
  1040. package/dist/templates/projects/crm/entities/companies/migrations/003_companies_sample_data.sql +246 -0
  1041. package/dist/templates/projects/crm/entities/contacts/api/docs.md +139 -0
  1042. package/dist/templates/projects/crm/entities/contacts/api/presets.ts +98 -0
  1043. package/dist/templates/projects/crm/entities/contacts/contacts.config.ts +61 -0
  1044. package/dist/templates/projects/crm/entities/contacts/contacts.fields.ts +359 -0
  1045. package/dist/templates/projects/crm/entities/contacts/contacts.service.ts +509 -0
  1046. package/dist/templates/projects/crm/entities/contacts/contacts.types.ts +108 -0
  1047. package/dist/templates/projects/crm/entities/contacts/messages/en.json +117 -0
  1048. package/dist/templates/projects/crm/entities/contacts/messages/es.json +117 -0
  1049. package/dist/templates/projects/crm/entities/contacts/migrations/001_contacts_table.sql +134 -0
  1050. package/dist/templates/projects/crm/entities/contacts/migrations/002_contacts_metas.sql +114 -0
  1051. package/dist/templates/projects/crm/entities/contacts/migrations/003_contacts_sample_data.sql +421 -0
  1052. package/dist/templates/projects/crm/entities/leads/api/docs.md +132 -0
  1053. package/dist/templates/projects/crm/entities/leads/api/presets.ts +109 -0
  1054. package/dist/templates/projects/crm/entities/leads/leads.config.ts +61 -0
  1055. package/dist/templates/projects/crm/entities/leads/leads.fields.ts +336 -0
  1056. package/dist/templates/projects/crm/entities/leads/leads.service.ts +496 -0
  1057. package/dist/templates/projects/crm/entities/leads/leads.types.ts +114 -0
  1058. package/dist/templates/projects/crm/entities/leads/messages/en.json +132 -0
  1059. package/dist/templates/projects/crm/entities/leads/messages/es.json +132 -0
  1060. package/dist/templates/projects/crm/entities/leads/migrations/001_leads_table.sql +150 -0
  1061. package/dist/templates/projects/crm/entities/leads/migrations/002_leads_metas.sql +120 -0
  1062. package/dist/templates/projects/crm/entities/leads/migrations/003_leads_sample_data.sql +242 -0
  1063. package/dist/templates/projects/crm/entities/notes/api/docs.md +135 -0
  1064. package/dist/templates/projects/crm/entities/notes/api/presets.ts +115 -0
  1065. package/dist/templates/projects/crm/entities/notes/messages/en.json +114 -0
  1066. package/dist/templates/projects/crm/entities/notes/messages/es.json +114 -0
  1067. package/dist/templates/projects/crm/entities/notes/migrations/020_notes_table.sql +118 -0
  1068. package/dist/templates/projects/crm/entities/notes/migrations/021_notes_metas.sql +114 -0
  1069. package/dist/templates/projects/crm/entities/notes/migrations/022_notes_sample_data.sql +275 -0
  1070. package/dist/templates/projects/crm/entities/notes/notes.config.ts +61 -0
  1071. package/dist/templates/projects/crm/entities/notes/notes.fields.ts +283 -0
  1072. package/dist/templates/projects/crm/entities/notes/notes.service.ts +320 -0
  1073. package/dist/templates/projects/crm/entities/notes/notes.types.ts +102 -0
  1074. package/dist/templates/projects/crm/entities/opportunities/api/docs.md +151 -0
  1075. package/dist/templates/projects/crm/entities/opportunities/api/presets.ts +151 -0
  1076. package/dist/templates/projects/crm/entities/opportunities/messages/en.json +107 -0
  1077. package/dist/templates/projects/crm/entities/opportunities/messages/es.json +107 -0
  1078. package/dist/templates/projects/crm/entities/opportunities/migrations/010_opportunities_table.sql +145 -0
  1079. package/dist/templates/projects/crm/entities/opportunities/migrations/011_opportunities_metas.sql +114 -0
  1080. package/dist/templates/projects/crm/entities/opportunities/migrations/012_opportunities_sample_data.sql +438 -0
  1081. package/dist/templates/projects/crm/entities/opportunities/opportunities.config.ts +61 -0
  1082. package/dist/templates/projects/crm/entities/opportunities/opportunities.fields.ts +416 -0
  1083. package/dist/templates/projects/crm/entities/opportunities/opportunities.service.ts +525 -0
  1084. package/dist/templates/projects/crm/entities/opportunities/opportunities.types.ts +135 -0
  1085. package/dist/templates/projects/crm/entities/pipelines/api/docs.md +145 -0
  1086. package/dist/templates/projects/crm/entities/pipelines/api/presets.ts +118 -0
  1087. package/dist/templates/projects/crm/entities/pipelines/messages/en.json +115 -0
  1088. package/dist/templates/projects/crm/entities/pipelines/messages/es.json +115 -0
  1089. package/dist/templates/projects/crm/entities/pipelines/migrations/001_pipelines_table.sql +106 -0
  1090. package/dist/templates/projects/crm/entities/pipelines/migrations/002_pipelines_metas.sql +114 -0
  1091. package/dist/templates/projects/crm/entities/pipelines/migrations/003_pipelines_sample_data.sql +91 -0
  1092. package/dist/templates/projects/crm/entities/pipelines/pipelines.config.ts +62 -0
  1093. package/dist/templates/projects/crm/entities/pipelines/pipelines.fields.ts +193 -0
  1094. package/dist/templates/projects/crm/entities/pipelines/pipelines.service.ts +383 -0
  1095. package/dist/templates/projects/crm/entities/pipelines/pipelines.types.ts +78 -0
  1096. package/dist/templates/projects/crm/entities/products/api/docs.md +137 -0
  1097. package/dist/templates/projects/crm/entities/products/api/presets.ts +132 -0
  1098. package/dist/templates/projects/crm/entities/products/messages/en.json +135 -0
  1099. package/dist/templates/projects/crm/entities/products/messages/es.json +135 -0
  1100. package/dist/templates/projects/crm/entities/products/migrations/001_products_table.sql +117 -0
  1101. package/dist/templates/projects/crm/entities/products/migrations/002_products_metas.sql +114 -0
  1102. package/dist/templates/projects/crm/entities/products/migrations/003_products_sample_data.sql +247 -0
  1103. package/dist/templates/projects/crm/entities/products/products.config.ts +62 -0
  1104. package/dist/templates/projects/crm/entities/products/products.fields.ts +361 -0
  1105. package/dist/templates/projects/crm/entities/products/products.service.ts +437 -0
  1106. package/dist/templates/projects/crm/entities/products/products.types.ts +125 -0
  1107. package/dist/templates/projects/crm/lib/crm-constants.ts +77 -0
  1108. package/dist/templates/projects/crm/lib/crm-utils.ts +185 -0
  1109. package/dist/templates/projects/crm/lib/selectors.ts +332 -0
  1110. package/dist/templates/projects/crm/messages/en.json +131 -0
  1111. package/dist/templates/projects/crm/messages/es.json +131 -0
  1112. package/dist/templates/projects/crm/migrations/090_billing_sample_data.sql +99 -0
  1113. package/dist/templates/projects/crm/migrations/999_theme_sample_data.sql +473 -0
  1114. package/dist/templates/projects/crm/package.json +26 -0
  1115. package/dist/templates/projects/crm/pendings.md +204 -0
  1116. package/dist/templates/projects/crm/permissions-matrix.md +216 -0
  1117. package/dist/templates/projects/crm/styles/components.css +414 -0
  1118. package/dist/templates/projects/crm/styles/crm-theme.css +358 -0
  1119. package/dist/templates/projects/crm/styles/globals.css +624 -0
  1120. package/dist/templates/projects/crm/styles/variables.css +111 -0
  1121. package/dist/templates/projects/crm/templates/dashboard/(main)/activities/components/ActivityCard.tsx +169 -0
  1122. package/dist/templates/projects/crm/templates/dashboard/(main)/activities/components/ActivityTimeline.tsx +165 -0
  1123. package/dist/templates/projects/crm/templates/dashboard/(main)/activities/page.tsx +297 -0
  1124. package/dist/templates/projects/crm/templates/dashboard/(main)/campaigns/page.tsx +373 -0
  1125. package/dist/templates/projects/crm/templates/dashboard/(main)/companies/page.tsx +296 -0
  1126. package/dist/templates/projects/crm/templates/dashboard/(main)/contacts/page.tsx +347 -0
  1127. package/dist/templates/projects/crm/templates/dashboard/(main)/layout.tsx +98 -0
  1128. package/dist/templates/projects/crm/templates/dashboard/(main)/leads/page.tsx +335 -0
  1129. package/dist/templates/projects/crm/templates/dashboard/(main)/opportunities/[id]/edit/page.tsx +95 -0
  1130. package/dist/templates/projects/crm/templates/dashboard/(main)/opportunities/create/page.tsx +94 -0
  1131. package/dist/templates/projects/crm/templates/dashboard/(main)/opportunities/page.tsx +350 -0
  1132. package/dist/templates/projects/crm/templates/dashboard/(main)/pipelines/[id]/edit/page.tsx +95 -0
  1133. package/dist/templates/projects/crm/templates/dashboard/(main)/pipelines/[id]/page.tsx +143 -0
  1134. package/dist/templates/projects/crm/templates/dashboard/(main)/pipelines/create/page.tsx +94 -0
  1135. package/dist/templates/projects/crm/templates/dashboard/(main)/pipelines/page.tsx +235 -0
  1136. package/dist/templates/projects/crm/templates/dashboard/(main)/products/[id]/edit/page.tsx +97 -0
  1137. package/dist/templates/projects/crm/templates/dashboard/(main)/products/[id]/page.tsx +510 -0
  1138. package/dist/templates/projects/crm/templates/dashboard/(main)/products/create/page.tsx +96 -0
  1139. package/dist/templates/projects/crm/templates/dashboard/(main)/products/page.tsx +308 -0
  1140. package/dist/templates/projects/crm/templates/shared/ActionButtons.tsx +41 -0
  1141. package/dist/templates/projects/crm/templates/shared/CRMDashboard.tsx +519 -0
  1142. package/dist/templates/projects/crm/templates/shared/CRMDataTable.tsx +441 -0
  1143. package/dist/templates/projects/crm/templates/shared/CRMMetricCard.tsx +76 -0
  1144. package/dist/templates/projects/crm/templates/shared/CRMMobileNav.tsx +172 -0
  1145. package/dist/templates/projects/crm/templates/shared/CRMSidebar.tsx +347 -0
  1146. package/dist/templates/projects/crm/templates/shared/CRMTopBar.tsx +266 -0
  1147. package/dist/templates/projects/crm/templates/shared/DealCard.tsx +123 -0
  1148. package/dist/templates/projects/crm/templates/shared/EntityCard.tsx +58 -0
  1149. package/dist/templates/projects/crm/templates/shared/OpportunityForm.tsx +649 -0
  1150. package/dist/templates/projects/crm/templates/shared/PipelineForm.tsx +367 -0
  1151. package/dist/templates/projects/crm/templates/shared/PipelineKanban.tsx +194 -0
  1152. package/dist/templates/projects/crm/templates/shared/QuickFilters.tsx +47 -0
  1153. package/dist/templates/projects/crm/templates/shared/StageColumn.tsx +175 -0
  1154. package/dist/templates/projects/crm/templates/shared/StageSelect.tsx +177 -0
  1155. package/dist/templates/projects/crm/templates/shared/StagesRepeater.tsx +317 -0
  1156. package/dist/templates/projects/crm/templates/shared/index.ts +9 -0
  1157. package/dist/templates/projects/crm/tests/cypress/e2e/api/activities/activities-crud.cy.ts +686 -0
  1158. package/dist/templates/projects/crm/tests/cypress/e2e/api/campaigns/campaigns-crud.cy.ts +592 -0
  1159. package/dist/templates/projects/crm/tests/cypress/e2e/api/companies/companies-crud.cy.ts +682 -0
  1160. package/dist/templates/projects/crm/tests/cypress/e2e/api/contacts/contacts-crud.cy.ts +668 -0
  1161. package/dist/templates/projects/crm/tests/cypress/e2e/api/leads/leads-crud.cy.ts +648 -0
  1162. package/dist/templates/projects/crm/tests/cypress/e2e/api/notes/notes-crud.cy.ts +424 -0
  1163. package/dist/templates/projects/crm/tests/cypress/e2e/api/opportunities/opportunities-crud.cy.ts +865 -0
  1164. package/dist/templates/projects/crm/tests/cypress/e2e/api/pipelines/pipelines-crud.cy.ts +545 -0
  1165. package/dist/templates/projects/crm/tests/cypress/e2e/api/products/products-crud.cy.ts +447 -0
  1166. package/dist/templates/projects/crm/tests/cypress/e2e/ui/activities/activities-admin.cy.ts +268 -0
  1167. package/dist/templates/projects/crm/tests/cypress/e2e/ui/activities/activities-member.cy.ts +257 -0
  1168. package/dist/templates/projects/crm/tests/cypress/e2e/ui/activities/activities-owner.cy.ts +268 -0
  1169. package/dist/templates/projects/crm/tests/cypress/e2e/ui/companies/companies-admin.cy.ts +188 -0
  1170. package/dist/templates/projects/crm/tests/cypress/e2e/ui/companies/companies-member.cy.ts +166 -0
  1171. package/dist/templates/projects/crm/tests/cypress/e2e/ui/companies/companies-owner.cy.ts +189 -0
  1172. package/dist/templates/projects/crm/tests/cypress/e2e/ui/contacts/contacts-admin.cy.ts +252 -0
  1173. package/dist/templates/projects/crm/tests/cypress/e2e/ui/contacts/contacts-member.cy.ts +224 -0
  1174. package/dist/templates/projects/crm/tests/cypress/e2e/ui/contacts/contacts-owner.cy.ts +236 -0
  1175. package/dist/templates/projects/crm/tests/cypress/e2e/ui/leads/leads-admin.cy.ts +286 -0
  1176. package/dist/templates/projects/crm/tests/cypress/e2e/ui/leads/leads-member.cy.ts +193 -0
  1177. package/dist/templates/projects/crm/tests/cypress/e2e/ui/leads/leads-owner.cy.ts +210 -0
  1178. package/dist/templates/projects/crm/tests/cypress/e2e/ui/opportunities/opportunities-admin.cy.ts +197 -0
  1179. package/dist/templates/projects/crm/tests/cypress/e2e/ui/opportunities/opportunities-member.cy.ts +229 -0
  1180. package/dist/templates/projects/crm/tests/cypress/e2e/ui/opportunities/opportunities-owner.cy.ts +196 -0
  1181. package/dist/templates/projects/crm/tests/cypress/e2e/ui/pipelines/pipelines-admin.cy.ts +320 -0
  1182. package/dist/templates/projects/crm/tests/cypress/e2e/ui/pipelines/pipelines-member.cy.ts +262 -0
  1183. package/dist/templates/projects/crm/tests/cypress/e2e/ui/pipelines/pipelines-owner.cy.ts +282 -0
  1184. package/dist/templates/projects/crm/tests/cypress/fixtures/blocks.json +9 -0
  1185. package/dist/templates/projects/crm/tests/cypress/fixtures/entities.json +240 -0
  1186. package/dist/templates/projects/crm/tests/cypress/src/components/CRMDataTable.js +223 -0
  1187. package/dist/templates/projects/crm/tests/cypress/src/components/CRMMobileNav.js +138 -0
  1188. package/dist/templates/projects/crm/tests/cypress/src/components/CRMSidebar.js +145 -0
  1189. package/dist/templates/projects/crm/tests/cypress/src/components/CRMTopBar.js +194 -0
  1190. package/dist/templates/projects/crm/tests/cypress/src/components/DealCard.js +197 -0
  1191. package/dist/templates/projects/crm/tests/cypress/src/components/EntityDetail.ts +290 -0
  1192. package/dist/templates/projects/crm/tests/cypress/src/components/EntityForm.ts +357 -0
  1193. package/dist/templates/projects/crm/tests/cypress/src/components/EntityList.ts +360 -0
  1194. package/dist/templates/projects/crm/tests/cypress/src/components/PipelineKanban.js +204 -0
  1195. package/dist/templates/projects/crm/tests/cypress/src/components/StageColumn.js +196 -0
  1196. package/dist/templates/projects/crm/tests/cypress/src/components/index.js +13 -0
  1197. package/dist/templates/projects/crm/tests/cypress/src/components/index.ts +22 -0
  1198. package/dist/templates/projects/crm/tests/cypress/src/controllers/ActivityAPIController.ts +113 -0
  1199. package/dist/templates/projects/crm/tests/cypress/src/controllers/BaseAPIController.ts +307 -0
  1200. package/dist/templates/projects/crm/tests/cypress/src/controllers/CampaignAPIController.ts +114 -0
  1201. package/dist/templates/projects/crm/tests/cypress/src/controllers/CompanyAPIController.ts +112 -0
  1202. package/dist/templates/projects/crm/tests/cypress/src/controllers/ContactAPIController.ts +104 -0
  1203. package/dist/templates/projects/crm/tests/cypress/src/controllers/LeadAPIController.ts +96 -0
  1204. package/dist/templates/projects/crm/tests/cypress/src/controllers/NoteAPIController.ts +130 -0
  1205. package/dist/templates/projects/crm/tests/cypress/src/controllers/OpportunityAPIController.ts +134 -0
  1206. package/dist/templates/projects/crm/tests/cypress/src/controllers/PipelineAPIController.ts +116 -0
  1207. package/dist/templates/projects/crm/tests/cypress/src/controllers/ProductAPIController.ts +113 -0
  1208. package/dist/templates/projects/crm/tests/cypress/src/controllers/index.ts +35 -0
  1209. package/dist/templates/projects/crm/tests/cypress/src/entities/ActivitiesPOM.ts +130 -0
  1210. package/dist/templates/projects/crm/tests/cypress/src/entities/CompaniesPOM.ts +117 -0
  1211. package/dist/templates/projects/crm/tests/cypress/src/entities/ContactsPOM.ts +117 -0
  1212. package/dist/templates/projects/crm/tests/cypress/src/entities/LeadsPOM.ts +129 -0
  1213. package/dist/templates/projects/crm/tests/cypress/src/entities/OpportunitiesPOM.ts +178 -0
  1214. package/dist/templates/projects/crm/tests/cypress/src/entities/PipelinesPOM.ts +341 -0
  1215. package/dist/templates/projects/crm/tests/cypress/src/entities/index.ts +31 -0
  1216. package/dist/templates/projects/crm/tests/cypress/src/forms/OpportunityForm.js +316 -0
  1217. package/dist/templates/projects/crm/tests/cypress/src/forms/PipelineForm.js +243 -0
  1218. package/dist/templates/projects/crm/tests/cypress/src/forms/index.js +8 -0
  1219. package/dist/templates/projects/crm/tests/cypress/src/index.js +22 -0
  1220. package/dist/templates/projects/crm/tests/cypress/src/index.ts +68 -0
  1221. package/dist/templates/projects/crm/tests/cypress/src/selectors.ts +50 -0
  1222. package/dist/templates/projects/crm/tests/cypress/src/session-helpers.ts +176 -0
  1223. package/dist/templates/projects/crm/tests/cypress/support/e2e.ts +90 -0
  1224. package/dist/templates/projects/crm/tests/cypress.config.ts +149 -0
  1225. package/dist/templates/projects/crm/tests/tsconfig.json +7 -0
  1226. package/dist/templates/projects/productivity/README.md +73 -0
  1227. package/dist/templates/projects/productivity/about.md +123 -0
  1228. package/dist/templates/projects/productivity/components/CardDetailModal.tsx +318 -0
  1229. package/dist/templates/projects/productivity/components/KanbanBoard.tsx +613 -0
  1230. package/dist/templates/projects/productivity/components/KanbanCard.tsx +218 -0
  1231. package/dist/templates/projects/productivity/components/KanbanColumn.tsx +264 -0
  1232. package/dist/templates/projects/productivity/components/SortableList.tsx +46 -0
  1233. package/dist/templates/projects/productivity/components/index.ts +4 -0
  1234. package/dist/templates/projects/productivity/config/app.config.ts +165 -0
  1235. package/dist/templates/projects/productivity/config/billing.config.ts +184 -0
  1236. package/dist/templates/projects/productivity/config/dashboard.config.ts +370 -0
  1237. package/dist/templates/projects/productivity/config/dev.config.ts +55 -0
  1238. package/dist/templates/projects/productivity/config/features.config.ts +256 -0
  1239. package/dist/templates/projects/productivity/config/flows.config.ts +484 -0
  1240. package/dist/templates/projects/productivity/config/permissions.config.ts +178 -0
  1241. package/dist/templates/projects/productivity/config/theme.config.ts +106 -0
  1242. package/dist/templates/projects/productivity/entities/boards/api/docs.md +131 -0
  1243. package/dist/templates/projects/productivity/entities/boards/api/presets.ts +113 -0
  1244. package/dist/templates/projects/productivity/entities/boards/boards.config.ts +61 -0
  1245. package/dist/templates/projects/productivity/entities/boards/boards.fields.ts +154 -0
  1246. package/dist/templates/projects/productivity/entities/boards/boards.service.ts +256 -0
  1247. package/dist/templates/projects/productivity/entities/boards/boards.types.ts +57 -0
  1248. package/dist/templates/projects/productivity/entities/boards/messages/en.json +80 -0
  1249. package/dist/templates/projects/productivity/entities/boards/messages/es.json +80 -0
  1250. package/dist/templates/projects/productivity/entities/boards/migrations/001_boards_table.sql +83 -0
  1251. package/dist/templates/projects/productivity/entities/cards/api/docs.md +162 -0
  1252. package/dist/templates/projects/productivity/entities/cards/api/presets.ts +172 -0
  1253. package/dist/templates/projects/productivity/entities/cards/cards.config.ts +61 -0
  1254. package/dist/templates/projects/productivity/entities/cards/cards.fields.ts +242 -0
  1255. package/dist/templates/projects/productivity/entities/cards/cards.service.ts +336 -0
  1256. package/dist/templates/projects/productivity/entities/cards/cards.types.ts +79 -0
  1257. package/dist/templates/projects/productivity/entities/cards/messages/en.json +114 -0
  1258. package/dist/templates/projects/productivity/entities/cards/messages/es.json +114 -0
  1259. package/dist/templates/projects/productivity/entities/cards/migrations/020_cards_table.sql +92 -0
  1260. package/dist/templates/projects/productivity/entities/lists/api/docs.md +143 -0
  1261. package/dist/templates/projects/productivity/entities/lists/api/presets.ts +81 -0
  1262. package/dist/templates/projects/productivity/entities/lists/lists.config.ts +61 -0
  1263. package/dist/templates/projects/productivity/entities/lists/lists.fields.ts +105 -0
  1264. package/dist/templates/projects/productivity/entities/lists/lists.service.ts +252 -0
  1265. package/dist/templates/projects/productivity/entities/lists/lists.types.ts +55 -0
  1266. package/dist/templates/projects/productivity/entities/lists/messages/en.json +60 -0
  1267. package/dist/templates/projects/productivity/entities/lists/messages/es.json +60 -0
  1268. package/dist/templates/projects/productivity/entities/lists/migrations/010_lists_table.sql +79 -0
  1269. package/dist/templates/projects/productivity/lib/selectors.ts +205 -0
  1270. package/dist/templates/projects/productivity/messages/en.json +79 -0
  1271. package/dist/templates/projects/productivity/messages/es.json +79 -0
  1272. package/dist/templates/projects/productivity/migrations/090_billing_sample_data.sql +100 -0
  1273. package/dist/templates/projects/productivity/migrations/999_theme_sample_data.sql +922 -0
  1274. package/dist/templates/projects/productivity/migrations/999a_initial_sample_data.sql +377 -0
  1275. package/dist/templates/projects/productivity/migrations/999b_abundant_sample_data.sql +346 -0
  1276. package/dist/templates/projects/productivity/package.json +29 -0
  1277. package/dist/templates/projects/productivity/permissions-matrix.md +122 -0
  1278. package/dist/templates/projects/productivity/styles/components.css +460 -0
  1279. package/dist/templates/projects/productivity/styles/globals.css +608 -0
  1280. package/dist/templates/projects/productivity/templates/dashboard/(main)/boards/[id]/[cardId]/page.tsx +239 -0
  1281. package/dist/templates/projects/productivity/templates/dashboard/(main)/boards/[id]/edit/page.tsx +391 -0
  1282. package/dist/templates/projects/productivity/templates/dashboard/(main)/boards/[id]/page.tsx +237 -0
  1283. package/dist/templates/projects/productivity/templates/dashboard/(main)/boards/create/page.tsx +237 -0
  1284. package/dist/templates/projects/productivity/templates/dashboard/(main)/boards/page.tsx +336 -0
  1285. package/dist/templates/projects/productivity/templates/dashboard/(main)/layout.tsx +32 -0
  1286. package/dist/templates/projects/productivity/templates/dashboard/(main)/page.tsx +593 -0
  1287. package/dist/templates/projects/productivity/templates/shared/ProductivityMobileNav.tsx +411 -0
  1288. package/dist/templates/projects/productivity/templates/shared/ProductivitySidebar.tsx +539 -0
  1289. package/dist/templates/projects/productivity/templates/shared/ProductivityTopBar.tsx +318 -0
  1290. package/dist/templates/projects/productivity/tests/cypress/e2e/ui/boards/boards-owner.cy.ts +349 -0
  1291. package/dist/templates/projects/productivity/tests/cypress/e2e/ui/cards/cards-modal.cy.ts +369 -0
  1292. package/dist/templates/projects/productivity/tests/cypress/e2e/ui/kanban/kanban-cards.cy.ts +280 -0
  1293. package/dist/templates/projects/productivity/tests/cypress/e2e/ui/kanban/kanban-columns.cy.ts +243 -0
  1294. package/dist/templates/projects/productivity/tests/cypress/fixtures/blocks.json +9 -0
  1295. package/dist/templates/projects/productivity/tests/cypress/fixtures/entities.json +60 -0
  1296. package/dist/templates/projects/productivity/tests/cypress/src/components/BoardsPOM.ts +353 -0
  1297. package/dist/templates/projects/productivity/tests/cypress/src/components/CardsPOM.ts +383 -0
  1298. package/dist/templates/projects/productivity/tests/cypress/src/components/KanbanPOM.ts +399 -0
  1299. package/dist/templates/projects/productivity/tests/cypress/src/components/index.ts +9 -0
  1300. package/dist/templates/projects/productivity/tests/cypress/src/controllers/BoardsAPIController.js +302 -0
  1301. package/dist/templates/projects/productivity/tests/cypress/src/controllers/CardsAPIController.js +406 -0
  1302. package/dist/templates/projects/productivity/tests/cypress/src/controllers/ListsAPIController.js +299 -0
  1303. package/dist/templates/projects/productivity/tests/cypress/src/index.ts +25 -0
  1304. package/dist/templates/projects/productivity/tests/cypress/src/selectors.ts +50 -0
  1305. package/dist/templates/projects/productivity/tests/cypress/src/session-helpers.ts +176 -0
  1306. package/dist/templates/projects/productivity/tests/cypress/support/e2e.ts +90 -0
  1307. package/dist/templates/projects/productivity/tests/cypress.config.ts +149 -0
  1308. package/dist/templates/projects/productivity/tests/tsconfig.json +7 -0
  1309. package/dist/templates/projects/starter/blocks/cta-section/config.ts +10 -0
  1310. package/dist/templates/projects/starter/blocks/features-grid/config.ts +10 -0
  1311. package/dist/templates/projects/starter/blocks/hero/config.ts +10 -0
  1312. package/dist/templates/projects/starter/blocks/testimonials/config.ts +10 -0
  1313. package/dist/templates/projects/starter/blocks/text-content/config.ts +10 -0
  1314. package/dist/templates/projects/starter/emails/_README.md +69 -0
  1315. package/dist/templates/projects/starter/entities/pages/pages.config.ts +95 -0
  1316. package/dist/templates/projects/starter/entities/posts/posts.config.ts +102 -0
  1317. package/dist/templates/projects/starter/entities/tasks/tasks.config.ts +82 -0
  1318. package/dist/templates/projects/starter/styles/globals.css +213 -0
  1319. package/dist/templates/projects/starter/templates/(public)/page.tsx +49 -0
  1320. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/docs/README.md +215 -0
  1321. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/block-editor.bdd.md +491 -0
  1322. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/dashboard-navigation.bdd.md +147 -0
  1323. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.bdd.md +76 -0
  1324. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/dashboard-topnav.bdd.md +326 -0
  1325. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/patterns.bdd.md +388 -0
  1326. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-api-keys.bdd.md +266 -0
  1327. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-billing.bdd.md +78 -0
  1328. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-layout.bdd.md +129 -0
  1329. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-password.bdd.md +82 -0
  1330. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-profile.bdd.md +77 -0
  1331. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-teams.bdd.md +130 -0
  1332. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/superadmin.bdd.md +261 -0
  1333. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/tasks.bdd.md +593 -0
  1334. package/dist/templates/projects/starter/tests/cypress/e2e/_utils/selectors/teams.bdd.md +278 -0
  1335. package/dist/templates/projects/starter/tests/cypress/src/session-helpers.ts +548 -0
  1336. package/dist/templates/projects/starter/tests/cypress.config.ts +215 -0
  1337. package/dist/templates/projects/starter/tests/jest/example.test.tsx +87 -0
  1338. package/dist/templates/projects/starter/tests/jest/jest.config.cjs +92 -0
  1339. package/dist/templates/projects/starter/tests/jest/services/tasks.service.test.ts +547 -0
  1340. package/dist/templates/projects/starter/tests/jest/tsconfig.jest.json +8 -0
  1341. package/dist/templates/projects/starter/tests/tsconfig.json +7 -0
  1342. package/dist/templates/proxy.ts +366 -107
  1343. package/dist/templates/public/uploads/README.md +1 -1
  1344. package/dist/templates/scripts/cy-run-prod.cjs +6 -34
  1345. package/dist/templates/tsconfig.cypress.json +4 -5
  1346. package/dist/templates/tsconfig.json +8 -16
  1347. package/dist/types/api-presets.d.ts +2 -2
  1348. package/dist/types/blocks.d.ts +15 -18
  1349. package/dist/types/blocks.d.ts.map +1 -1
  1350. package/dist/types/blocks.js +1 -8
  1351. package/dist/types/index.d.ts +2 -0
  1352. package/dist/types/index.d.ts.map +1 -1
  1353. package/dist/types/index.js +3 -0
  1354. package/dist/types/plugin.d.ts +40 -0
  1355. package/dist/types/plugin.d.ts.map +1 -1
  1356. package/dist/types/plugin.js +23 -0
  1357. package/dist/types/theme.d.ts +0 -25
  1358. package/dist/types/theme.d.ts.map +1 -1
  1359. package/dist/types/user.types.d.ts +3 -3
  1360. package/dist/types/user.types.d.ts.map +1 -1
  1361. package/dist/types/user.types.js +6 -6
  1362. package/globals.css +5 -7
  1363. package/migrations/028_api_audit_log_insert_policy.sql +18 -0
  1364. package/migrations/090_sample_data.sql +2 -2
  1365. package/migrations/README.md +7 -7
  1366. package/package.json +14 -20
  1367. package/scripts/build/auth-readiness-load.mjs +57 -0
  1368. package/scripts/build/auth-readiness.mjs +210 -0
  1369. package/scripts/build/config-loader.mjs +36 -60
  1370. package/scripts/build/docs-registry.mjs +6 -84
  1371. package/scripts/build/mobile-boundary.mjs +525 -0
  1372. package/scripts/build/registry/__tests__/api-docs-colocated.test.mjs +105 -0
  1373. package/scripts/build/registry/__tests__/billing-registry.test.mjs +8 -4
  1374. package/scripts/build/registry/__tests__/block-registry.test.mjs +101 -5
  1375. package/scripts/build/registry/__tests__/build-output.test.mjs +12 -87
  1376. package/scripts/build/registry/__tests__/config-loader-root-first.test.mjs +33 -0
  1377. package/scripts/build/registry/__tests__/icons-discovery.test.mjs +99 -29
  1378. package/scripts/build/registry/__tests__/mcp-registry.test.mjs +6 -6
  1379. package/scripts/build/registry/__tests__/packaged-plugin-discovery.test.mjs +42 -0
  1380. package/scripts/build/registry/__tests__/plugin-capabilities.test.mjs +1030 -0
  1381. package/scripts/build/registry/__tests__/plugin-registry-types.test.mjs +69 -0
  1382. package/scripts/build/registry/__tests__/project-mode-root-first.test.mjs +175 -0
  1383. package/scripts/build/registry/__tests__/safe-fs.test.mjs +5 -29
  1384. package/scripts/build/registry/__tests__/scheduled-actions-registry.test.mjs +2 -2
  1385. package/scripts/build/registry/__tests__/theme-registry.test.mjs +117 -0
  1386. package/scripts/build/registry/__tests__/translation-registry-root-first.test.mjs +38 -0
  1387. package/scripts/build/registry/__tests__/write-places.test.mjs +35 -128
  1388. package/scripts/build/registry/config.mjs +29 -167
  1389. package/scripts/build/registry/contracts/README.md +120 -0
  1390. package/scripts/build/registry/contracts/__tests__/contracts-wire.test.mjs +168 -0
  1391. package/scripts/build/registry/contracts/__tests__/contracts.test.mjs +590 -0
  1392. package/scripts/build/registry/contracts/index.mjs +162 -0
  1393. package/scripts/build/registry/contracts/portable.mjs +58 -0
  1394. package/scripts/build/registry/contracts/publish.mjs +191 -0
  1395. package/scripts/build/registry/contracts/read-columns.mjs +96 -0
  1396. package/scripts/build/registry/contracts/read-entities.mjs +418 -0
  1397. package/scripts/build/registry/contracts/render.mjs +341 -0
  1398. package/scripts/build/registry/discovery/all-entities.mjs +57 -0
  1399. package/scripts/build/registry/discovery/api-presets.mjs +23 -46
  1400. package/scripts/build/registry/discovery/auth.mjs +3 -4
  1401. package/scripts/build/registry/discovery/blocks.mjs +126 -17
  1402. package/scripts/build/registry/discovery/core-routes.mjs +23 -73
  1403. package/scripts/build/registry/discovery/emails.mjs +14 -19
  1404. package/scripts/build/registry/discovery/entities.mjs +14 -18
  1405. package/scripts/build/registry/discovery/icons.mjs +6 -15
  1406. package/scripts/build/registry/discovery/index.mjs +0 -1
  1407. package/scripts/build/registry/discovery/mcp-overrides.mjs +6 -12
  1408. package/scripts/build/registry/discovery/mcp-overrides.test.mjs +24 -63
  1409. package/scripts/build/registry/discovery/middlewares.mjs +21 -82
  1410. package/scripts/build/registry/discovery/parent-child.mjs +2 -6
  1411. package/scripts/build/registry/discovery/permissions.mjs +8 -13
  1412. package/scripts/build/registry/discovery/plugin-capabilities.mjs +912 -0
  1413. package/scripts/build/registry/discovery/plugins.mjs +55 -90
  1414. package/scripts/build/registry/discovery/themes.mjs +79 -385
  1415. package/scripts/build/registry/generators/api-presets-registry.mjs +4 -4
  1416. package/scripts/build/registry/generators/billing-registry.mjs +17 -40
  1417. package/scripts/build/registry/generators/block-registry.mjs +42 -3
  1418. package/scripts/build/registry/generators/docs-registry.mjs +11 -30
  1419. package/scripts/build/registry/generators/email-registry.mjs +4 -4
  1420. package/scripts/build/registry/generators/entity-registry.mjs +3 -3
  1421. package/scripts/build/registry/generators/feature-registry.mjs +5 -7
  1422. package/scripts/build/registry/generators/index.mjs +2 -2
  1423. package/scripts/build/registry/generators/middleware-registry.mjs +2 -2
  1424. package/scripts/build/registry/generators/permissions-registry.mjs +5 -11
  1425. package/scripts/build/registry/generators/plugin-catalog.mjs +73 -0
  1426. package/scripts/build/registry/generators/plugin-registry.mjs +3 -1
  1427. package/scripts/build/registry/generators/route-handlers.mjs +11 -105
  1428. package/scripts/build/registry/generators/theme-registry.mjs +170 -1
  1429. package/scripts/build/registry/generators/translation-registry.mjs +37 -71
  1430. package/scripts/build/registry/generators/unified-registry.mjs +4 -10
  1431. package/scripts/build/registry/host/README.md +296 -0
  1432. package/scripts/build/registry/host/__tests__/diag-write-child.mjs +6 -0
  1433. package/scripts/build/registry/host/__tests__/facade-emitter.test.mjs +659 -0
  1434. package/scripts/build/registry/host/__tests__/host-area-access.test.mjs +278 -0
  1435. package/scripts/build/registry/host/__tests__/host-composition.test.mjs +286 -0
  1436. package/scripts/build/registry/host/__tests__/host-entities.test.mjs +886 -0
  1437. package/scripts/build/registry/host/__tests__/host-generation.test.mjs +382 -0
  1438. package/scripts/build/registry/host/__tests__/host-helpers.mjs +88 -0
  1439. package/scripts/build/registry/host/__tests__/host-mode.test.mjs +153 -0
  1440. package/scripts/build/registry/host/__tests__/host-plan.test.mjs +362 -0
  1441. package/scripts/build/registry/host/__tests__/host-project-composition.test.mjs +269 -0
  1442. package/scripts/build/registry/host/__tests__/host-project.test.mjs +80 -0
  1443. package/scripts/build/registry/host/__tests__/host-proxy-areas.test.mjs +69 -0
  1444. package/scripts/build/registry/host/__tests__/host-robustness.test.mjs +525 -0
  1445. package/scripts/build/registry/host/__tests__/host-watch.test.mjs +162 -0
  1446. package/scripts/build/registry/host/__tests__/lock-race-child.mjs +19 -0
  1447. package/scripts/build/registry/host/__tests__/publish-crash-child.mjs +6 -0
  1448. package/scripts/build/registry/host/__tests__/static-imports.test.mjs +254 -0
  1449. package/scripts/build/registry/host/core-routes.mjs +307 -0
  1450. package/scripts/build/registry/host/entity-routes.mjs +392 -0
  1451. package/scripts/build/registry/host/facade-emitter.mjs +666 -0
  1452. package/scripts/build/registry/host/generation.mjs +723 -0
  1453. package/scripts/build/registry/host/mode.mjs +57 -0
  1454. package/scripts/build/registry/host/next-literal.mjs +87 -0
  1455. package/scripts/build/registry/host/next-route-exports.json +366 -0
  1456. package/scripts/build/registry/host/plan.mjs +668 -0
  1457. package/scripts/build/registry/host/prepare-cli.mjs +191 -0
  1458. package/scripts/build/registry/host/prepare.mjs +722 -0
  1459. package/scripts/build/registry/host/proxy-areas.mjs +56 -0
  1460. package/scripts/build/registry/host/render.mjs +437 -0
  1461. package/scripts/build/registry/host/static-imports.mjs +317 -0
  1462. package/scripts/build/registry/host/webhooks.mjs +93 -0
  1463. package/scripts/build/registry/index.mjs +4 -13
  1464. package/scripts/build/registry/post-build/index.mjs +1 -8
  1465. package/scripts/build/registry/post-build/own-gitignores.mjs +3 -4
  1466. package/scripts/build/registry/post-build/test-fixtures.mjs +20 -30
  1467. package/scripts/build/registry/post-build/tree-display.mjs +6 -6
  1468. package/scripts/build/registry/project-mode.mjs +224 -51
  1469. package/scripts/build/registry/validate-env.test.mjs +4 -89
  1470. package/scripts/build/registry/validation/entity-validator.mjs +5 -6
  1471. package/scripts/build/registry/write-places.mjs +26 -85
  1472. package/scripts/build/registry.mjs +54 -195
  1473. package/scripts/build/routes-manifest.mjs +214 -0
  1474. package/scripts/build/safe-fs.mjs +1 -2
  1475. package/scripts/build/update-tsconfig.mjs +26 -204
  1476. package/scripts/create-plugin.mjs +10 -8
  1477. package/scripts/create-theme.mjs +2 -305
  1478. package/scripts/db/run-migrations.mjs +24 -86
  1479. package/scripts/db/theme-location.mjs +23 -44
  1480. package/scripts/db/verify-theme-migrations.mjs +16 -5
  1481. package/scripts/deploy/vercel-deploy.mjs +8 -10
  1482. package/scripts/dev/watch-plugins.mjs +39 -130
  1483. package/scripts/maintenance/core-updater.mjs +29 -36
  1484. package/scripts/maintenance/step-guard.mjs +1 -1
  1485. package/scripts/postinstall.mjs +25 -43
  1486. package/scripts/setup/setup-ci.mjs +2 -3
  1487. package/scripts/test/build-entities.mjs +27 -107
  1488. package/scripts/test/cy.mjs +29 -125
  1489. package/scripts/test/jest.mjs +22 -50
  1490. package/scripts/update-registry-imports.mjs +0 -1
  1491. package/scripts/validation/check-imports.sh +33 -213
  1492. package/src/lib/entities/portable/media-ref.ts +24 -0
  1493. package/src/lib/entities/portable/response-shape.ts +80 -0
  1494. package/src/lib/entities/portable/schema-generator.ts +965 -0
  1495. package/src/lib/entities/portable/system-fields.ts +11 -0
  1496. package/src/lib/entities/portable/types.ts +71 -0
  1497. package/templates/blocks/README.md +6 -12
  1498. package/templates/blocks/cta-section/config.ts +0 -1
  1499. package/templates/blocks/cta-section/thumbnail.png +0 -0
  1500. package/templates/blocks/features-grid/config.ts +0 -1
  1501. package/templates/blocks/features-grid/thumbnail.png +0 -0
  1502. package/templates/blocks/hero/config.ts +0 -1
  1503. package/templates/blocks/hero/thumbnail.png +0 -0
  1504. package/templates/blocks/testimonials/config.ts +0 -1
  1505. package/templates/blocks/testimonials/thumbnail.png +0 -0
  1506. package/templates/blocks/text-content/config.ts +0 -1
  1507. package/templates/blocks/text-content/thumbnail.png +0 -0
  1508. package/templates/ci-workflows/README.md +4 -5
  1509. package/templates/ci-workflows/github/cypress-regression.yml +7 -14
  1510. package/templates/ci-workflows/github/cypress-smoke.yml +3 -5
  1511. package/templates/eslint.config.mjs +3 -3
  1512. package/templates/features/blog/blocks/post-content/config.ts +0 -1
  1513. package/templates/features/blog/entities/posts/posts.config.ts +1 -1
  1514. package/templates/features/pages/blocks/hero/config.ts +0 -1
  1515. package/templates/features/pages/entities/pages/pages.config.ts +1 -1
  1516. package/templates/instrumentation.ts +9 -0
  1517. package/templates/migrations/README.md +2 -2
  1518. package/templates/next.config.mjs +34 -8
  1519. package/templates/plugins/README.md +42 -0
  1520. package/templates/plugins/starter/plugin/README.md.template +97 -0
  1521. package/templates/plugins/starter/plugin/api/example/route.ts.template +94 -0
  1522. package/templates/plugins/starter/plugin/hooks/usePlugin.ts.template +102 -0
  1523. package/templates/pnpm-workspace.yaml +3 -5
  1524. package/templates/projects/blog/README.md +62 -0
  1525. package/templates/projects/blog/about.md +93 -0
  1526. package/templates/projects/blog/api/authors/[username]/route.ts +153 -0
  1527. package/templates/projects/blog/api/authors/docs.md +135 -0
  1528. package/templates/projects/blog/api/authors/presets.ts +45 -0
  1529. package/templates/projects/blog/api/authors/route.ts +66 -0
  1530. package/templates/projects/blog/api/posts/public/docs.md +124 -0
  1531. package/templates/projects/blog/api/posts/public/presets.ts +65 -0
  1532. package/templates/projects/blog/api/posts/public/route.ts +154 -0
  1533. package/templates/projects/blog/components/ExportPostsButton.tsx +103 -0
  1534. package/templates/projects/blog/components/ImportPostsDialog.tsx +285 -0
  1535. package/templates/projects/blog/components/PostsToolbar.tsx +24 -0
  1536. package/templates/projects/blog/components/editor/FeaturedImageUpload.tsx +186 -0
  1537. package/templates/projects/blog/components/editor/WysiwygEditor.tsx +389 -0
  1538. package/templates/projects/blog/components/index.ts +4 -0
  1539. package/templates/projects/blog/components/public/AuthorBio.tsx +106 -0
  1540. package/templates/projects/blog/components/public/AuthorCard.tsx +131 -0
  1541. package/templates/projects/blog/components/public/BlogFooter.tsx +186 -0
  1542. package/templates/projects/blog/components/public/BlogNavbar.tsx +201 -0
  1543. package/templates/projects/blog/components/public/PostCard.tsx +307 -0
  1544. package/templates/projects/blog/components/public/ReadingProgress.tsx +70 -0
  1545. package/templates/projects/blog/components/public/RelatedPosts.tsx +79 -0
  1546. package/templates/projects/blog/config/app.config.ts +193 -0
  1547. package/templates/projects/blog/config/billing.config.ts +143 -0
  1548. package/templates/projects/blog/config/dashboard.config.ts +346 -0
  1549. package/templates/projects/blog/config/dev.config.ts +48 -0
  1550. package/templates/projects/blog/config/features.config.ts +196 -0
  1551. package/templates/projects/blog/config/flows.config.ts +333 -0
  1552. package/templates/projects/blog/config/permissions.config.ts +112 -0
  1553. package/templates/projects/blog/config/theme.config.ts +128 -0
  1554. package/templates/projects/blog/entities/categories/api/docs.md +119 -0
  1555. package/templates/projects/blog/entities/categories/api/presets.ts +67 -0
  1556. package/templates/projects/blog/entities/categories/categories.config.ts +60 -0
  1557. package/templates/projects/blog/entities/categories/categories.fields.ts +115 -0
  1558. package/templates/projects/blog/entities/categories/categories.service.ts +333 -0
  1559. package/templates/projects/blog/entities/categories/categories.types.ts +58 -0
  1560. package/templates/projects/blog/entities/categories/messages/en.json +33 -0
  1561. package/templates/projects/blog/entities/categories/messages/es.json +33 -0
  1562. package/templates/projects/blog/entities/posts/api/docs.md +174 -0
  1563. package/templates/projects/blog/entities/posts/api/presets.ts +137 -0
  1564. package/templates/projects/blog/entities/posts/messages/en.json +100 -0
  1565. package/templates/projects/blog/entities/posts/messages/es.json +100 -0
  1566. package/templates/projects/blog/entities/posts/migrations/001_posts_table.sql +110 -0
  1567. package/templates/projects/blog/entities/posts/migrations/002_add_featured.sql +19 -0
  1568. package/templates/projects/blog/entities/posts/migrations/003_post_categories_pivot.sql +47 -0
  1569. package/templates/projects/blog/entities/posts/posts.config.ts +61 -0
  1570. package/templates/projects/blog/entities/posts/posts.fields.ts +234 -0
  1571. package/templates/projects/blog/entities/posts/posts.service.ts +464 -0
  1572. package/templates/projects/blog/entities/posts/posts.types.ts +80 -0
  1573. package/templates/projects/blog/lib/sanitize-post-html.ts +52 -0
  1574. package/templates/projects/blog/lib/selectors.ts +178 -0
  1575. package/templates/projects/blog/messages/en.json +113 -0
  1576. package/templates/projects/blog/messages/es.json +113 -0
  1577. package/templates/projects/blog/migrations/002_author_profile_fields.sql +37 -0
  1578. package/templates/projects/blog/migrations/003_categories_table.sql +90 -0
  1579. package/templates/projects/blog/migrations/090_billing_sample_data.sql +99 -0
  1580. package/templates/projects/blog/migrations/999_sample_data.sql +412 -0
  1581. package/templates/projects/blog/migrations/999_theme_sample_data.sql +1070 -0
  1582. package/templates/projects/blog/package.json +30 -0
  1583. package/templates/projects/blog/permissions-matrix.md +63 -0
  1584. package/templates/projects/blog/styles/article.css +333 -0
  1585. package/templates/projects/blog/styles/components.css +204 -0
  1586. package/templates/projects/blog/styles/globals.css +384 -0
  1587. package/templates/projects/blog/styles/theme.css +167 -0
  1588. package/templates/projects/blog/templates/(public)/author/[username]/page.tsx +248 -0
  1589. package/templates/projects/blog/templates/(public)/authors/page.tsx +162 -0
  1590. package/templates/projects/blog/templates/(public)/layout.tsx +44 -0
  1591. package/templates/projects/blog/templates/(public)/page.tsx +277 -0
  1592. package/templates/projects/blog/templates/(public)/posts/[slug]/page.tsx +344 -0
  1593. package/templates/projects/blog/templates/dashboard/(main)/page.tsx +386 -0
  1594. package/templates/projects/blog/templates/dashboard/(main)/posts/[id]/edit/page.tsx +530 -0
  1595. package/templates/projects/blog/templates/dashboard/(main)/posts/[id]/page.tsx +33 -0
  1596. package/templates/projects/blog/templates/dashboard/(main)/posts/create/page.tsx +354 -0
  1597. package/templates/projects/blog/templates/dashboard/(main)/posts/page.tsx +834 -0
  1598. package/templates/projects/blog/tests/cypress/e2e/README.md +170 -0
  1599. package/templates/projects/blog/tests/cypress/e2e/categories/categories-crud.cy.ts +322 -0
  1600. package/templates/projects/blog/tests/cypress/e2e/categories/categories-crud.md +73 -0
  1601. package/templates/projects/blog/tests/cypress/e2e/posts/posts-crud.cy.ts +460 -0
  1602. package/templates/projects/blog/tests/cypress/e2e/posts/posts-crud.md +115 -0
  1603. package/templates/projects/blog/tests/cypress/e2e/posts/posts-editor.cy.ts +290 -0
  1604. package/templates/projects/blog/tests/cypress/e2e/posts/posts-editor.md +139 -0
  1605. package/templates/projects/blog/tests/cypress/e2e/posts/posts-status-workflow.cy.ts +302 -0
  1606. package/templates/projects/blog/tests/cypress/e2e/posts/posts-status-workflow.md +83 -0
  1607. package/templates/projects/blog/tests/cypress/fixtures/blocks.json +9 -0
  1608. package/templates/projects/blog/tests/cypress/fixtures/entities.json +51 -0
  1609. package/templates/projects/blog/tests/cypress/src/FeaturedImageUpload.js +131 -0
  1610. package/templates/projects/blog/tests/cypress/src/PostEditor.js +386 -0
  1611. package/templates/projects/blog/tests/cypress/src/PostsList.js +350 -0
  1612. package/templates/projects/blog/tests/cypress/src/WysiwygEditor.js +373 -0
  1613. package/templates/projects/blog/tests/cypress/src/components/EntityForm.ts +378 -0
  1614. package/templates/projects/blog/tests/cypress/src/components/EntityList.ts +378 -0
  1615. package/templates/projects/blog/tests/cypress/src/components/PostEditorPOM.ts +447 -0
  1616. package/templates/projects/blog/tests/cypress/src/components/PostsPOM.ts +362 -0
  1617. package/templates/projects/blog/tests/cypress/src/components/index.ts +18 -0
  1618. package/templates/projects/blog/tests/cypress/src/index.js +33 -0
  1619. package/templates/projects/blog/tests/cypress/src/selectors.ts +49 -0
  1620. package/templates/projects/blog/tests/cypress/src/session-helpers.ts +151 -0
  1621. package/templates/projects/blog/tests/cypress/support/e2e.ts +90 -0
  1622. package/templates/projects/blog/tests/cypress.config.ts +149 -0
  1623. package/templates/projects/blog/tests/jest/__mocks__/jose.js +22 -0
  1624. package/templates/projects/blog/tests/jest/__mocks__/next-server.js +56 -0
  1625. package/templates/projects/blog/tests/jest/components/WysiwygEditor.test.tsx +118 -0
  1626. package/templates/projects/blog/tests/jest/jest.config.cjs +104 -0
  1627. package/templates/projects/blog/tests/jest/lib/sanitize-post-html.test.ts +48 -0
  1628. package/templates/projects/blog/tests/jest/setup.ts +170 -0
  1629. package/templates/projects/blog/tests/jest/tsconfig.jest.json +6 -0
  1630. package/templates/projects/blog/tests/tsconfig.json +7 -0
  1631. package/templates/projects/crm/CRM_PLAN.md +343 -0
  1632. package/templates/projects/crm/about.md +122 -0
  1633. package/templates/projects/crm/config/app.config.ts +178 -0
  1634. package/templates/projects/crm/config/billing.config.ts +184 -0
  1635. package/templates/projects/crm/config/dashboard.config.ts +385 -0
  1636. package/templates/projects/crm/config/dev.config.ts +55 -0
  1637. package/templates/projects/crm/config/features.config.ts +336 -0
  1638. package/templates/projects/crm/config/flows.config.ts +511 -0
  1639. package/templates/projects/crm/config/permissions.config.ts +308 -0
  1640. package/templates/projects/crm/config/theme.config.ts +111 -0
  1641. package/templates/projects/crm/entities/activities/activities.config.ts +61 -0
  1642. package/templates/projects/crm/entities/activities/activities.fields.ts +362 -0
  1643. package/templates/projects/crm/entities/activities/activities.service.ts +503 -0
  1644. package/templates/projects/crm/entities/activities/activities.types.ts +117 -0
  1645. package/templates/projects/crm/entities/activities/api/docs.md +146 -0
  1646. package/templates/projects/crm/entities/activities/api/presets.ts +132 -0
  1647. package/templates/projects/crm/entities/activities/messages/en.json +123 -0
  1648. package/templates/projects/crm/entities/activities/messages/es.json +123 -0
  1649. package/templates/projects/crm/entities/activities/migrations/020_activities_table.sql +123 -0
  1650. package/templates/projects/crm/entities/activities/migrations/021_activities_metas.sql +114 -0
  1651. package/templates/projects/crm/entities/activities/migrations/022_activities_sample_data.sql +420 -0
  1652. package/templates/projects/crm/entities/campaigns/api/docs.md +140 -0
  1653. package/templates/projects/crm/entities/campaigns/api/presets.ts +147 -0
  1654. package/templates/projects/crm/entities/campaigns/campaigns.config.ts +61 -0
  1655. package/templates/projects/crm/entities/campaigns/campaigns.fields.ts +413 -0
  1656. package/templates/projects/crm/entities/campaigns/campaigns.service.ts +426 -0
  1657. package/templates/projects/crm/entities/campaigns/campaigns.types.ts +124 -0
  1658. package/templates/projects/crm/entities/campaigns/messages/en.json +145 -0
  1659. package/templates/projects/crm/entities/campaigns/messages/es.json +145 -0
  1660. package/templates/projects/crm/entities/campaigns/migrations/001_campaigns_table.sql +127 -0
  1661. package/templates/projects/crm/entities/campaigns/migrations/002_campaigns_metas.sql +114 -0
  1662. package/templates/projects/crm/entities/campaigns/migrations/003_campaigns_sample_data.sql +364 -0
  1663. package/templates/projects/crm/entities/companies/api/docs.md +139 -0
  1664. package/templates/projects/crm/entities/companies/api/presets.ts +107 -0
  1665. package/templates/projects/crm/entities/companies/companies.config.ts +61 -0
  1666. package/templates/projects/crm/entities/companies/companies.fields.ts +429 -0
  1667. package/templates/projects/crm/entities/companies/companies.service.ts +566 -0
  1668. package/templates/projects/crm/entities/companies/companies.types.ts +125 -0
  1669. package/templates/projects/crm/entities/companies/messages/en.json +146 -0
  1670. package/templates/projects/crm/entities/companies/messages/es.json +146 -0
  1671. package/templates/projects/crm/entities/companies/migrations/001_companies_table.sql +150 -0
  1672. package/templates/projects/crm/entities/companies/migrations/002_companies_metas.sql +114 -0
  1673. package/templates/projects/crm/entities/companies/migrations/003_companies_sample_data.sql +246 -0
  1674. package/templates/projects/crm/entities/contacts/api/docs.md +139 -0
  1675. package/templates/projects/crm/entities/contacts/api/presets.ts +98 -0
  1676. package/templates/projects/crm/entities/contacts/contacts.config.ts +61 -0
  1677. package/templates/projects/crm/entities/contacts/contacts.fields.ts +359 -0
  1678. package/templates/projects/crm/entities/contacts/contacts.service.ts +509 -0
  1679. package/templates/projects/crm/entities/contacts/contacts.types.ts +108 -0
  1680. package/templates/projects/crm/entities/contacts/messages/en.json +117 -0
  1681. package/templates/projects/crm/entities/contacts/messages/es.json +117 -0
  1682. package/templates/projects/crm/entities/contacts/migrations/001_contacts_table.sql +134 -0
  1683. package/templates/projects/crm/entities/contacts/migrations/002_contacts_metas.sql +114 -0
  1684. package/templates/projects/crm/entities/contacts/migrations/003_contacts_sample_data.sql +421 -0
  1685. package/templates/projects/crm/entities/leads/api/docs.md +132 -0
  1686. package/templates/projects/crm/entities/leads/api/presets.ts +109 -0
  1687. package/templates/projects/crm/entities/leads/leads.config.ts +61 -0
  1688. package/templates/projects/crm/entities/leads/leads.fields.ts +336 -0
  1689. package/templates/projects/crm/entities/leads/leads.service.ts +496 -0
  1690. package/templates/projects/crm/entities/leads/leads.types.ts +114 -0
  1691. package/templates/projects/crm/entities/leads/messages/en.json +132 -0
  1692. package/templates/projects/crm/entities/leads/messages/es.json +132 -0
  1693. package/templates/projects/crm/entities/leads/migrations/001_leads_table.sql +150 -0
  1694. package/templates/projects/crm/entities/leads/migrations/002_leads_metas.sql +120 -0
  1695. package/templates/projects/crm/entities/leads/migrations/003_leads_sample_data.sql +242 -0
  1696. package/templates/projects/crm/entities/notes/api/docs.md +135 -0
  1697. package/templates/projects/crm/entities/notes/api/presets.ts +115 -0
  1698. package/templates/projects/crm/entities/notes/messages/en.json +114 -0
  1699. package/templates/projects/crm/entities/notes/messages/es.json +114 -0
  1700. package/templates/projects/crm/entities/notes/migrations/020_notes_table.sql +118 -0
  1701. package/templates/projects/crm/entities/notes/migrations/021_notes_metas.sql +114 -0
  1702. package/templates/projects/crm/entities/notes/migrations/022_notes_sample_data.sql +275 -0
  1703. package/templates/projects/crm/entities/notes/notes.config.ts +61 -0
  1704. package/templates/projects/crm/entities/notes/notes.fields.ts +283 -0
  1705. package/templates/projects/crm/entities/notes/notes.service.ts +320 -0
  1706. package/templates/projects/crm/entities/notes/notes.types.ts +102 -0
  1707. package/templates/projects/crm/entities/opportunities/api/docs.md +151 -0
  1708. package/templates/projects/crm/entities/opportunities/api/presets.ts +151 -0
  1709. package/templates/projects/crm/entities/opportunities/messages/en.json +107 -0
  1710. package/templates/projects/crm/entities/opportunities/messages/es.json +107 -0
  1711. package/templates/projects/crm/entities/opportunities/migrations/010_opportunities_table.sql +145 -0
  1712. package/templates/projects/crm/entities/opportunities/migrations/011_opportunities_metas.sql +114 -0
  1713. package/templates/projects/crm/entities/opportunities/migrations/012_opportunities_sample_data.sql +438 -0
  1714. package/templates/projects/crm/entities/opportunities/opportunities.config.ts +61 -0
  1715. package/templates/projects/crm/entities/opportunities/opportunities.fields.ts +416 -0
  1716. package/templates/projects/crm/entities/opportunities/opportunities.service.ts +525 -0
  1717. package/templates/projects/crm/entities/opportunities/opportunities.types.ts +135 -0
  1718. package/templates/projects/crm/entities/pipelines/api/docs.md +145 -0
  1719. package/templates/projects/crm/entities/pipelines/api/presets.ts +118 -0
  1720. package/templates/projects/crm/entities/pipelines/messages/en.json +115 -0
  1721. package/templates/projects/crm/entities/pipelines/messages/es.json +115 -0
  1722. package/templates/projects/crm/entities/pipelines/migrations/001_pipelines_table.sql +106 -0
  1723. package/templates/projects/crm/entities/pipelines/migrations/002_pipelines_metas.sql +114 -0
  1724. package/templates/projects/crm/entities/pipelines/migrations/003_pipelines_sample_data.sql +91 -0
  1725. package/templates/projects/crm/entities/pipelines/pipelines.config.ts +62 -0
  1726. package/templates/projects/crm/entities/pipelines/pipelines.fields.ts +193 -0
  1727. package/templates/projects/crm/entities/pipelines/pipelines.service.ts +383 -0
  1728. package/templates/projects/crm/entities/pipelines/pipelines.types.ts +78 -0
  1729. package/templates/projects/crm/entities/products/api/docs.md +137 -0
  1730. package/templates/projects/crm/entities/products/api/presets.ts +132 -0
  1731. package/templates/projects/crm/entities/products/messages/en.json +135 -0
  1732. package/templates/projects/crm/entities/products/messages/es.json +135 -0
  1733. package/templates/projects/crm/entities/products/migrations/001_products_table.sql +117 -0
  1734. package/templates/projects/crm/entities/products/migrations/002_products_metas.sql +114 -0
  1735. package/templates/projects/crm/entities/products/migrations/003_products_sample_data.sql +247 -0
  1736. package/templates/projects/crm/entities/products/products.config.ts +62 -0
  1737. package/templates/projects/crm/entities/products/products.fields.ts +361 -0
  1738. package/templates/projects/crm/entities/products/products.service.ts +437 -0
  1739. package/templates/projects/crm/entities/products/products.types.ts +125 -0
  1740. package/templates/projects/crm/lib/crm-constants.ts +77 -0
  1741. package/templates/projects/crm/lib/crm-utils.ts +185 -0
  1742. package/templates/projects/crm/lib/selectors.ts +332 -0
  1743. package/templates/projects/crm/messages/en.json +131 -0
  1744. package/templates/projects/crm/messages/es.json +131 -0
  1745. package/templates/projects/crm/migrations/090_billing_sample_data.sql +99 -0
  1746. package/templates/projects/crm/migrations/999_theme_sample_data.sql +473 -0
  1747. package/templates/projects/crm/package.json +26 -0
  1748. package/templates/projects/crm/pendings.md +204 -0
  1749. package/templates/projects/crm/permissions-matrix.md +216 -0
  1750. package/templates/projects/crm/styles/components.css +414 -0
  1751. package/templates/projects/crm/styles/crm-theme.css +358 -0
  1752. package/templates/projects/crm/styles/globals.css +624 -0
  1753. package/templates/projects/crm/styles/variables.css +111 -0
  1754. package/templates/projects/crm/templates/dashboard/(main)/activities/components/ActivityCard.tsx +169 -0
  1755. package/templates/projects/crm/templates/dashboard/(main)/activities/components/ActivityTimeline.tsx +165 -0
  1756. package/templates/projects/crm/templates/dashboard/(main)/activities/page.tsx +297 -0
  1757. package/templates/projects/crm/templates/dashboard/(main)/campaigns/page.tsx +373 -0
  1758. package/templates/projects/crm/templates/dashboard/(main)/companies/page.tsx +296 -0
  1759. package/templates/projects/crm/templates/dashboard/(main)/contacts/page.tsx +347 -0
  1760. package/templates/projects/crm/templates/dashboard/(main)/layout.tsx +98 -0
  1761. package/templates/projects/crm/templates/dashboard/(main)/leads/page.tsx +335 -0
  1762. package/templates/projects/crm/templates/dashboard/(main)/opportunities/[id]/edit/page.tsx +95 -0
  1763. package/templates/projects/crm/templates/dashboard/(main)/opportunities/create/page.tsx +94 -0
  1764. package/templates/projects/crm/templates/dashboard/(main)/opportunities/page.tsx +350 -0
  1765. package/templates/projects/crm/templates/dashboard/(main)/pipelines/[id]/edit/page.tsx +95 -0
  1766. package/templates/projects/crm/templates/dashboard/(main)/pipelines/[id]/page.tsx +143 -0
  1767. package/templates/projects/crm/templates/dashboard/(main)/pipelines/create/page.tsx +94 -0
  1768. package/templates/projects/crm/templates/dashboard/(main)/pipelines/page.tsx +235 -0
  1769. package/templates/projects/crm/templates/dashboard/(main)/products/[id]/edit/page.tsx +97 -0
  1770. package/templates/projects/crm/templates/dashboard/(main)/products/[id]/page.tsx +510 -0
  1771. package/templates/projects/crm/templates/dashboard/(main)/products/create/page.tsx +96 -0
  1772. package/templates/projects/crm/templates/dashboard/(main)/products/page.tsx +308 -0
  1773. package/templates/projects/crm/templates/shared/ActionButtons.tsx +41 -0
  1774. package/templates/projects/crm/templates/shared/CRMDashboard.tsx +519 -0
  1775. package/templates/projects/crm/templates/shared/CRMDataTable.tsx +441 -0
  1776. package/templates/projects/crm/templates/shared/CRMMetricCard.tsx +76 -0
  1777. package/templates/projects/crm/templates/shared/CRMMobileNav.tsx +172 -0
  1778. package/templates/projects/crm/templates/shared/CRMSidebar.tsx +347 -0
  1779. package/templates/projects/crm/templates/shared/CRMTopBar.tsx +266 -0
  1780. package/templates/projects/crm/templates/shared/DealCard.tsx +123 -0
  1781. package/templates/projects/crm/templates/shared/EntityCard.tsx +58 -0
  1782. package/templates/projects/crm/templates/shared/OpportunityForm.tsx +649 -0
  1783. package/templates/projects/crm/templates/shared/PipelineForm.tsx +367 -0
  1784. package/templates/projects/crm/templates/shared/PipelineKanban.tsx +194 -0
  1785. package/templates/projects/crm/templates/shared/QuickFilters.tsx +47 -0
  1786. package/templates/projects/crm/templates/shared/StageColumn.tsx +175 -0
  1787. package/templates/projects/crm/templates/shared/StageSelect.tsx +177 -0
  1788. package/templates/projects/crm/templates/shared/StagesRepeater.tsx +317 -0
  1789. package/templates/projects/crm/templates/shared/index.ts +9 -0
  1790. package/templates/projects/crm/tests/cypress/e2e/api/activities/activities-crud.cy.ts +686 -0
  1791. package/templates/projects/crm/tests/cypress/e2e/api/campaigns/campaigns-crud.cy.ts +592 -0
  1792. package/templates/projects/crm/tests/cypress/e2e/api/companies/companies-crud.cy.ts +682 -0
  1793. package/templates/projects/crm/tests/cypress/e2e/api/contacts/contacts-crud.cy.ts +668 -0
  1794. package/templates/projects/crm/tests/cypress/e2e/api/leads/leads-crud.cy.ts +648 -0
  1795. package/templates/projects/crm/tests/cypress/e2e/api/notes/notes-crud.cy.ts +424 -0
  1796. package/templates/projects/crm/tests/cypress/e2e/api/opportunities/opportunities-crud.cy.ts +865 -0
  1797. package/templates/projects/crm/tests/cypress/e2e/api/pipelines/pipelines-crud.cy.ts +545 -0
  1798. package/templates/projects/crm/tests/cypress/e2e/api/products/products-crud.cy.ts +447 -0
  1799. package/templates/projects/crm/tests/cypress/e2e/ui/activities/activities-admin.cy.ts +268 -0
  1800. package/templates/projects/crm/tests/cypress/e2e/ui/activities/activities-member.cy.ts +257 -0
  1801. package/templates/projects/crm/tests/cypress/e2e/ui/activities/activities-owner.cy.ts +268 -0
  1802. package/templates/projects/crm/tests/cypress/e2e/ui/companies/companies-admin.cy.ts +188 -0
  1803. package/templates/projects/crm/tests/cypress/e2e/ui/companies/companies-member.cy.ts +166 -0
  1804. package/templates/projects/crm/tests/cypress/e2e/ui/companies/companies-owner.cy.ts +189 -0
  1805. package/templates/projects/crm/tests/cypress/e2e/ui/contacts/contacts-admin.cy.ts +252 -0
  1806. package/templates/projects/crm/tests/cypress/e2e/ui/contacts/contacts-member.cy.ts +224 -0
  1807. package/templates/projects/crm/tests/cypress/e2e/ui/contacts/contacts-owner.cy.ts +236 -0
  1808. package/templates/projects/crm/tests/cypress/e2e/ui/leads/leads-admin.cy.ts +286 -0
  1809. package/templates/projects/crm/tests/cypress/e2e/ui/leads/leads-member.cy.ts +193 -0
  1810. package/templates/projects/crm/tests/cypress/e2e/ui/leads/leads-owner.cy.ts +210 -0
  1811. package/templates/projects/crm/tests/cypress/e2e/ui/opportunities/opportunities-admin.cy.ts +197 -0
  1812. package/templates/projects/crm/tests/cypress/e2e/ui/opportunities/opportunities-member.cy.ts +229 -0
  1813. package/templates/projects/crm/tests/cypress/e2e/ui/opportunities/opportunities-owner.cy.ts +196 -0
  1814. package/templates/projects/crm/tests/cypress/e2e/ui/pipelines/pipelines-admin.cy.ts +320 -0
  1815. package/templates/projects/crm/tests/cypress/e2e/ui/pipelines/pipelines-member.cy.ts +262 -0
  1816. package/templates/projects/crm/tests/cypress/e2e/ui/pipelines/pipelines-owner.cy.ts +282 -0
  1817. package/templates/projects/crm/tests/cypress/fixtures/blocks.json +9 -0
  1818. package/templates/projects/crm/tests/cypress/fixtures/entities.json +240 -0
  1819. package/templates/projects/crm/tests/cypress/src/components/CRMDataTable.js +223 -0
  1820. package/templates/projects/crm/tests/cypress/src/components/CRMMobileNav.js +138 -0
  1821. package/templates/projects/crm/tests/cypress/src/components/CRMSidebar.js +145 -0
  1822. package/templates/projects/crm/tests/cypress/src/components/CRMTopBar.js +194 -0
  1823. package/templates/projects/crm/tests/cypress/src/components/DealCard.js +197 -0
  1824. package/templates/projects/crm/tests/cypress/src/components/EntityDetail.ts +290 -0
  1825. package/templates/projects/crm/tests/cypress/src/components/EntityForm.ts +357 -0
  1826. package/templates/projects/crm/tests/cypress/src/components/EntityList.ts +360 -0
  1827. package/templates/projects/crm/tests/cypress/src/components/PipelineKanban.js +204 -0
  1828. package/templates/projects/crm/tests/cypress/src/components/StageColumn.js +196 -0
  1829. package/templates/projects/crm/tests/cypress/src/components/index.js +13 -0
  1830. package/templates/projects/crm/tests/cypress/src/components/index.ts +22 -0
  1831. package/templates/projects/crm/tests/cypress/src/controllers/ActivityAPIController.ts +113 -0
  1832. package/templates/projects/crm/tests/cypress/src/controllers/BaseAPIController.ts +307 -0
  1833. package/templates/projects/crm/tests/cypress/src/controllers/CampaignAPIController.ts +114 -0
  1834. package/templates/projects/crm/tests/cypress/src/controllers/CompanyAPIController.ts +112 -0
  1835. package/templates/projects/crm/tests/cypress/src/controllers/ContactAPIController.ts +104 -0
  1836. package/templates/projects/crm/tests/cypress/src/controllers/LeadAPIController.ts +96 -0
  1837. package/templates/projects/crm/tests/cypress/src/controllers/NoteAPIController.ts +130 -0
  1838. package/templates/projects/crm/tests/cypress/src/controllers/OpportunityAPIController.ts +134 -0
  1839. package/templates/projects/crm/tests/cypress/src/controllers/PipelineAPIController.ts +116 -0
  1840. package/templates/projects/crm/tests/cypress/src/controllers/ProductAPIController.ts +113 -0
  1841. package/templates/projects/crm/tests/cypress/src/controllers/index.ts +35 -0
  1842. package/templates/projects/crm/tests/cypress/src/entities/ActivitiesPOM.ts +130 -0
  1843. package/templates/projects/crm/tests/cypress/src/entities/CompaniesPOM.ts +117 -0
  1844. package/templates/projects/crm/tests/cypress/src/entities/ContactsPOM.ts +117 -0
  1845. package/templates/projects/crm/tests/cypress/src/entities/LeadsPOM.ts +129 -0
  1846. package/templates/projects/crm/tests/cypress/src/entities/OpportunitiesPOM.ts +178 -0
  1847. package/templates/projects/crm/tests/cypress/src/entities/PipelinesPOM.ts +341 -0
  1848. package/templates/projects/crm/tests/cypress/src/entities/index.ts +31 -0
  1849. package/templates/projects/crm/tests/cypress/src/forms/OpportunityForm.js +316 -0
  1850. package/templates/projects/crm/tests/cypress/src/forms/PipelineForm.js +243 -0
  1851. package/templates/projects/crm/tests/cypress/src/forms/index.js +8 -0
  1852. package/templates/projects/crm/tests/cypress/src/index.js +22 -0
  1853. package/templates/projects/crm/tests/cypress/src/index.ts +68 -0
  1854. package/templates/projects/crm/tests/cypress/src/selectors.ts +50 -0
  1855. package/templates/projects/crm/tests/cypress/src/session-helpers.ts +176 -0
  1856. package/templates/projects/crm/tests/cypress/support/e2e.ts +90 -0
  1857. package/templates/projects/crm/tests/cypress.config.ts +149 -0
  1858. package/templates/projects/crm/tests/tsconfig.json +7 -0
  1859. package/templates/projects/productivity/README.md +73 -0
  1860. package/templates/projects/productivity/about.md +123 -0
  1861. package/templates/projects/productivity/components/CardDetailModal.tsx +318 -0
  1862. package/templates/projects/productivity/components/KanbanBoard.tsx +613 -0
  1863. package/templates/projects/productivity/components/KanbanCard.tsx +218 -0
  1864. package/templates/projects/productivity/components/KanbanColumn.tsx +264 -0
  1865. package/templates/projects/productivity/components/SortableList.tsx +46 -0
  1866. package/templates/projects/productivity/components/index.ts +4 -0
  1867. package/templates/projects/productivity/config/app.config.ts +165 -0
  1868. package/templates/projects/productivity/config/billing.config.ts +184 -0
  1869. package/templates/projects/productivity/config/dashboard.config.ts +370 -0
  1870. package/templates/projects/productivity/config/dev.config.ts +55 -0
  1871. package/templates/projects/productivity/config/features.config.ts +256 -0
  1872. package/templates/projects/productivity/config/flows.config.ts +484 -0
  1873. package/templates/projects/productivity/config/permissions.config.ts +178 -0
  1874. package/templates/projects/productivity/config/theme.config.ts +106 -0
  1875. package/templates/projects/productivity/entities/boards/api/docs.md +131 -0
  1876. package/templates/projects/productivity/entities/boards/api/presets.ts +113 -0
  1877. package/templates/projects/productivity/entities/boards/boards.config.ts +61 -0
  1878. package/templates/projects/productivity/entities/boards/boards.fields.ts +154 -0
  1879. package/templates/projects/productivity/entities/boards/boards.service.ts +256 -0
  1880. package/templates/projects/productivity/entities/boards/boards.types.ts +57 -0
  1881. package/templates/projects/productivity/entities/boards/messages/en.json +80 -0
  1882. package/templates/projects/productivity/entities/boards/messages/es.json +80 -0
  1883. package/templates/projects/productivity/entities/boards/migrations/001_boards_table.sql +83 -0
  1884. package/templates/projects/productivity/entities/cards/api/docs.md +162 -0
  1885. package/templates/projects/productivity/entities/cards/api/presets.ts +172 -0
  1886. package/templates/projects/productivity/entities/cards/cards.config.ts +61 -0
  1887. package/templates/projects/productivity/entities/cards/cards.fields.ts +242 -0
  1888. package/templates/projects/productivity/entities/cards/cards.service.ts +336 -0
  1889. package/templates/projects/productivity/entities/cards/cards.types.ts +79 -0
  1890. package/templates/projects/productivity/entities/cards/messages/en.json +114 -0
  1891. package/templates/projects/productivity/entities/cards/messages/es.json +114 -0
  1892. package/templates/projects/productivity/entities/cards/migrations/020_cards_table.sql +92 -0
  1893. package/templates/projects/productivity/entities/lists/api/docs.md +143 -0
  1894. package/templates/projects/productivity/entities/lists/api/presets.ts +81 -0
  1895. package/templates/projects/productivity/entities/lists/lists.config.ts +61 -0
  1896. package/templates/projects/productivity/entities/lists/lists.fields.ts +105 -0
  1897. package/templates/projects/productivity/entities/lists/lists.service.ts +252 -0
  1898. package/templates/projects/productivity/entities/lists/lists.types.ts +55 -0
  1899. package/templates/projects/productivity/entities/lists/messages/en.json +60 -0
  1900. package/templates/projects/productivity/entities/lists/messages/es.json +60 -0
  1901. package/templates/projects/productivity/entities/lists/migrations/010_lists_table.sql +79 -0
  1902. package/templates/projects/productivity/lib/selectors.ts +205 -0
  1903. package/templates/projects/productivity/messages/en.json +79 -0
  1904. package/templates/projects/productivity/messages/es.json +79 -0
  1905. package/templates/projects/productivity/migrations/090_billing_sample_data.sql +100 -0
  1906. package/templates/projects/productivity/migrations/999_theme_sample_data.sql +922 -0
  1907. package/templates/projects/productivity/migrations/999a_initial_sample_data.sql +377 -0
  1908. package/templates/projects/productivity/migrations/999b_abundant_sample_data.sql +346 -0
  1909. package/templates/projects/productivity/package.json +29 -0
  1910. package/templates/projects/productivity/permissions-matrix.md +122 -0
  1911. package/templates/projects/productivity/styles/components.css +460 -0
  1912. package/templates/projects/productivity/styles/globals.css +608 -0
  1913. package/templates/projects/productivity/templates/dashboard/(main)/boards/[id]/[cardId]/page.tsx +239 -0
  1914. package/templates/projects/productivity/templates/dashboard/(main)/boards/[id]/edit/page.tsx +391 -0
  1915. package/templates/projects/productivity/templates/dashboard/(main)/boards/[id]/page.tsx +237 -0
  1916. package/templates/projects/productivity/templates/dashboard/(main)/boards/create/page.tsx +237 -0
  1917. package/templates/projects/productivity/templates/dashboard/(main)/boards/page.tsx +336 -0
  1918. package/templates/projects/productivity/templates/dashboard/(main)/layout.tsx +32 -0
  1919. package/templates/projects/productivity/templates/dashboard/(main)/page.tsx +593 -0
  1920. package/templates/projects/productivity/templates/shared/ProductivityMobileNav.tsx +411 -0
  1921. package/templates/projects/productivity/templates/shared/ProductivitySidebar.tsx +539 -0
  1922. package/templates/projects/productivity/templates/shared/ProductivityTopBar.tsx +318 -0
  1923. package/templates/projects/productivity/tests/cypress/e2e/ui/boards/boards-owner.cy.ts +349 -0
  1924. package/templates/projects/productivity/tests/cypress/e2e/ui/cards/cards-modal.cy.ts +369 -0
  1925. package/templates/projects/productivity/tests/cypress/e2e/ui/kanban/kanban-cards.cy.ts +280 -0
  1926. package/templates/projects/productivity/tests/cypress/e2e/ui/kanban/kanban-columns.cy.ts +243 -0
  1927. package/templates/projects/productivity/tests/cypress/fixtures/blocks.json +9 -0
  1928. package/templates/projects/productivity/tests/cypress/fixtures/entities.json +60 -0
  1929. package/templates/projects/productivity/tests/cypress/src/components/BoardsPOM.ts +353 -0
  1930. package/templates/projects/productivity/tests/cypress/src/components/CardsPOM.ts +383 -0
  1931. package/templates/projects/productivity/tests/cypress/src/components/KanbanPOM.ts +399 -0
  1932. package/templates/projects/productivity/tests/cypress/src/components/index.ts +9 -0
  1933. package/templates/projects/productivity/tests/cypress/src/controllers/BoardsAPIController.js +302 -0
  1934. package/templates/projects/productivity/tests/cypress/src/controllers/CardsAPIController.js +406 -0
  1935. package/templates/projects/productivity/tests/cypress/src/controllers/ListsAPIController.js +299 -0
  1936. package/templates/projects/productivity/tests/cypress/src/index.ts +25 -0
  1937. package/templates/projects/productivity/tests/cypress/src/selectors.ts +50 -0
  1938. package/templates/projects/productivity/tests/cypress/src/session-helpers.ts +176 -0
  1939. package/templates/projects/productivity/tests/cypress/support/e2e.ts +90 -0
  1940. package/templates/projects/productivity/tests/cypress.config.ts +149 -0
  1941. package/templates/projects/productivity/tests/tsconfig.json +7 -0
  1942. package/templates/projects/starter/blocks/cta-section/config.ts +10 -0
  1943. package/templates/projects/starter/blocks/features-grid/config.ts +10 -0
  1944. package/templates/projects/starter/blocks/hero/config.ts +10 -0
  1945. package/templates/projects/starter/blocks/testimonials/config.ts +10 -0
  1946. package/templates/projects/starter/blocks/text-content/config.ts +10 -0
  1947. package/templates/projects/starter/emails/_README.md +69 -0
  1948. package/templates/projects/starter/entities/pages/pages.config.ts +95 -0
  1949. package/templates/projects/starter/entities/posts/posts.config.ts +102 -0
  1950. package/templates/projects/starter/entities/tasks/tasks.config.ts +82 -0
  1951. package/templates/projects/starter/styles/globals.css +213 -0
  1952. package/templates/projects/starter/templates/(public)/page.tsx +49 -0
  1953. package/templates/projects/starter/tests/cypress/e2e/_utils/docs/README.md +215 -0
  1954. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/block-editor.bdd.md +491 -0
  1955. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/dashboard-navigation.bdd.md +147 -0
  1956. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.bdd.md +76 -0
  1957. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/dashboard-topnav.bdd.md +326 -0
  1958. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/patterns.bdd.md +388 -0
  1959. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-api-keys.bdd.md +266 -0
  1960. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-billing.bdd.md +78 -0
  1961. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-layout.bdd.md +129 -0
  1962. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-password.bdd.md +82 -0
  1963. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-profile.bdd.md +77 -0
  1964. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/settings-teams.bdd.md +130 -0
  1965. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/superadmin.bdd.md +261 -0
  1966. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/tasks.bdd.md +593 -0
  1967. package/templates/projects/starter/tests/cypress/e2e/_utils/selectors/teams.bdd.md +278 -0
  1968. package/templates/projects/starter/tests/cypress/src/session-helpers.ts +548 -0
  1969. package/templates/projects/starter/tests/cypress.config.ts +215 -0
  1970. package/templates/projects/starter/tests/jest/__mocks__/jose.js +22 -0
  1971. package/templates/projects/starter/tests/jest/__mocks__/next-server.js +56 -0
  1972. package/templates/projects/starter/tests/jest/example.test.tsx +87 -0
  1973. package/templates/projects/starter/tests/jest/jest.config.cjs +92 -0
  1974. package/templates/projects/starter/tests/jest/services/tasks.service.test.ts +547 -0
  1975. package/templates/projects/starter/tests/jest/tsconfig.jest.json +8 -0
  1976. package/templates/projects/starter/tests/tsconfig.json +7 -0
  1977. package/templates/proxy.ts +366 -107
  1978. package/templates/public/uploads/README.md +1 -1
  1979. package/templates/scripts/cy-run-prod.cjs +6 -34
  1980. package/templates/tsconfig.cypress.json +4 -5
  1981. package/templates/tsconfig.json +8 -16
  1982. package/tests/jest/__mocks__/@nextsparkjs/registries/app-config.client.ts +3 -0
  1983. package/tests/jest/__mocks__/@nextsparkjs/registries/block-schemas.ts +5 -0
  1984. package/tests/jest/__mocks__/@nextsparkjs/registries/dashboard-config.client.ts +2 -0
  1985. package/tests/jest/__mocks__/@nextsparkjs/registries/dev-keyring.client.ts +2 -0
  1986. package/tests/jest/__mocks__/@nextsparkjs/registries/docs-registry.ts +7 -7
  1987. package/tests/jest/__mocks__/@nextsparkjs/registries/plugin-catalog.ts +21 -0
  1988. package/tests/jest/__mocks__/@nextsparkjs/registries/plugin-registry.client.ts +9 -0
  1989. package/tests/jest/__mocks__/@nextsparkjs/registries/route-handlers.ts +1 -11
  1990. package/tests/jest/__mocks__/@nextsparkjs/registries/theme-registry.client.ts +41 -0
  1991. package/tests/jest/__mocks__/@nextsparkjs/registries/theme-registry.ts +2 -3
  1992. package/tests/jest/__mocks__/@nextsparkjs/registries/translation-registry.ts +6 -0
  1993. package/dist/lib/api/entity/public-resolver.d.ts +0 -28
  1994. package/dist/lib/api/entity/public-resolver.d.ts.map +0 -1
  1995. package/dist/lib/api/entity/public-resolver.js +0 -95
  1996. package/dist/lib/services/middleware.service.d.ts +0 -66
  1997. package/dist/lib/services/middleware.service.d.ts.map +0 -1
  1998. package/dist/lib/services/middleware.service.js +0 -111
  1999. package/dist/lib/services/route-handler.service.d.ts +0 -155
  2000. package/dist/lib/services/route-handler.service.d.ts.map +0 -1
  2001. package/dist/lib/services/route-handler.service.js +0 -160
  2002. package/dist/lib/services/template.service.d.ts +0 -148
  2003. package/dist/lib/services/template.service.d.ts.map +0 -1
  2004. package/dist/lib/services/template.service.js +0 -184
  2005. package/dist/lib/template-resolver.d.ts +0 -103
  2006. package/dist/lib/template-resolver.d.ts.map +0 -1
  2007. package/dist/lib/template-resolver.js +0 -120
  2008. package/dist/lib/theme/theme-loader.d.ts +0 -59
  2009. package/dist/lib/theme/theme-loader.d.ts.map +0 -1
  2010. package/dist/lib/theme/theme-loader.js +0 -191
  2011. package/dist/templates/app/(auth)/accept-invite/[token]/page.tsx +0 -339
  2012. package/dist/templates/app/(auth)/auth-error/page.tsx +0 -25
  2013. package/dist/templates/app/(auth)/forgot-password/page.tsx +0 -215
  2014. package/dist/templates/app/(auth)/layout.tsx +0 -54
  2015. package/dist/templates/app/(auth)/login/page.tsx +0 -22
  2016. package/dist/templates/app/(auth)/reset-password/page.tsx +0 -211
  2017. package/dist/templates/app/(auth)/signup/page.tsx +0 -63
  2018. package/dist/templates/app/(auth)/verify-email/page.tsx +0 -190
  2019. package/dist/templates/app/(public)/[...slug]/page.tsx +0 -386
  2020. package/dist/templates/app/(public)/docs/[section]/[page]/page.tsx +0 -101
  2021. package/dist/templates/app/(public)/docs/layout.tsx +0 -25
  2022. package/dist/templates/app/(public)/docs/page.tsx +0 -81
  2023. package/dist/templates/app/(public)/layout.tsx +0 -44
  2024. package/dist/templates/app/(public)/page.tsx +0 -19
  2025. package/dist/templates/app/403/page.tsx +0 -89
  2026. package/dist/templates/app/api/auth/[...all]/route.ts +0 -214
  2027. package/dist/templates/app/api/cron/billing/lifecycle/route.ts +0 -98
  2028. package/dist/templates/app/api/csp-report/route.ts +0 -181
  2029. package/dist/templates/app/api/devtools/config/entities/route.ts +0 -115
  2030. package/dist/templates/app/api/devtools/config/theme/route.ts +0 -67
  2031. package/dist/templates/app/api/devtools/tests/[...path]/route.ts +0 -131
  2032. package/dist/templates/app/api/devtools/tests/route.ts +0 -135
  2033. package/dist/templates/app/api/health/route.ts +0 -53
  2034. package/dist/templates/app/api/internal/user-metadata/route.ts +0 -47
  2035. package/dist/templates/app/api/mcp/route.ts +0 -176
  2036. package/dist/templates/app/api/superadmin/subscriptions/route.ts +0 -315
  2037. package/dist/templates/app/api/superadmin/teams/[teamId]/route.ts +0 -292
  2038. package/dist/templates/app/api/superadmin/teams/route.ts +0 -187
  2039. package/dist/templates/app/api/superadmin/users/[userId]/route.ts +0 -542
  2040. package/dist/templates/app/api/superadmin/users/route.ts +0 -322
  2041. package/dist/templates/app/api/user/delete-account/route.ts +0 -58
  2042. package/dist/templates/app/api/user/plan-flags/route.ts +0 -270
  2043. package/dist/templates/app/api/user/profile/route.ts +0 -129
  2044. package/dist/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +0 -208
  2045. package/dist/templates/app/api/v1/[entity]/[id]/child/[childType]/route.ts +0 -329
  2046. package/dist/templates/app/api/v1/[entity]/[id]/route.ts +0 -33
  2047. package/dist/templates/app/api/v1/[entity]/route.ts +0 -29
  2048. package/dist/templates/app/api/v1/api-keys/[id]/route.ts +0 -283
  2049. package/dist/templates/app/api/v1/api-keys/route.ts +0 -241
  2050. package/dist/templates/app/api/v1/auth/signup-with-invite/route.ts +0 -243
  2051. package/dist/templates/app/api/v1/billing/cancel/route.ts +0 -206
  2052. package/dist/templates/app/api/v1/billing/change-plan/route.ts +0 -99
  2053. package/dist/templates/app/api/v1/billing/check-action/route.ts +0 -85
  2054. package/dist/templates/app/api/v1/billing/checkout/route.ts +0 -153
  2055. package/dist/templates/app/api/v1/billing/plans/route.ts +0 -82
  2056. package/dist/templates/app/api/v1/billing/portal/route.ts +0 -93
  2057. package/dist/templates/app/api/v1/billing/webhooks/polar/route.ts +0 -495
  2058. package/dist/templates/app/api/v1/billing/webhooks/stripe/route.ts +0 -34
  2059. package/dist/templates/app/api/v1/blocks/[slug]/route.ts +0 -30
  2060. package/dist/templates/app/api/v1/blocks/docs.md +0 -173
  2061. package/dist/templates/app/api/v1/blocks/route.ts +0 -46
  2062. package/dist/templates/app/api/v1/blocks/validate/route.ts +0 -47
  2063. package/dist/templates/app/api/v1/cron/process/route.ts +0 -106
  2064. package/dist/templates/app/api/v1/devtools/blocks/route.ts +0 -84
  2065. package/dist/templates/app/api/v1/devtools/docs/route.ts +0 -153
  2066. package/dist/templates/app/api/v1/devtools/docs.md +0 -204
  2067. package/dist/templates/app/api/v1/devtools/features/route.ts +0 -63
  2068. package/dist/templates/app/api/v1/devtools/flows/route.ts +0 -63
  2069. package/dist/templates/app/api/v1/devtools/presets.ts +0 -113
  2070. package/dist/templates/app/api/v1/devtools/scheduled-actions/route.ts +0 -244
  2071. package/dist/templates/app/api/v1/devtools/scheduled-actions/run/route.ts +0 -111
  2072. package/dist/templates/app/api/v1/devtools/testing/route.ts +0 -84
  2073. package/dist/templates/app/api/v1/media/[id]/route.ts +0 -168
  2074. package/dist/templates/app/api/v1/media/[id]/tags/route.ts +0 -212
  2075. package/dist/templates/app/api/v1/media/check-duplicates/route.ts +0 -66
  2076. package/dist/templates/app/api/v1/media/route.ts +0 -64
  2077. package/dist/templates/app/api/v1/media/upload/route.ts +0 -274
  2078. package/dist/templates/app/api/v1/media-tags/route.ts +0 -81
  2079. package/dist/templates/app/api/v1/patterns/[id]/usages/route.ts +0 -108
  2080. package/dist/templates/app/api/v1/plugin/[...path]/route.ts +0 -374
  2081. package/dist/templates/app/api/v1/plugin/docs.md +0 -79
  2082. package/dist/templates/app/api/v1/plugin/presets.ts +0 -21
  2083. package/dist/templates/app/api/v1/plugin/route.ts +0 -97
  2084. package/dist/templates/app/api/v1/post-categories/[id]/route.ts +0 -258
  2085. package/dist/templates/app/api/v1/post-categories/route.ts +0 -121
  2086. package/dist/templates/app/api/v1/team-invitations/[token]/accept/route.ts +0 -177
  2087. package/dist/templates/app/api/v1/team-invitations/[token]/decline/route.ts +0 -118
  2088. package/dist/templates/app/api/v1/team-invitations/[token]/route.ts +0 -90
  2089. package/dist/templates/app/api/v1/team-invitations/route.ts +0 -113
  2090. package/dist/templates/app/api/v1/teams/[teamId]/invitations/route.ts +0 -181
  2091. package/dist/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +0 -105
  2092. package/dist/templates/app/api/v1/teams/[teamId]/invoices/route.ts +0 -125
  2093. package/dist/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +0 -260
  2094. package/dist/templates/app/api/v1/teams/[teamId]/members/route.ts +0 -350
  2095. package/dist/templates/app/api/v1/teams/[teamId]/route.ts +0 -289
  2096. package/dist/templates/app/api/v1/teams/[teamId]/subscription/route.ts +0 -51
  2097. package/dist/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +0 -96
  2098. package/dist/templates/app/api/v1/teams/route.ts +0 -305
  2099. package/dist/templates/app/api/v1/teams/switch/route.ts +0 -106
  2100. package/dist/templates/app/api/v1/theme/[...path]/route.ts +0 -383
  2101. package/dist/templates/app/api/v1/theme/docs.md +0 -74
  2102. package/dist/templates/app/api/v1/theme/presets.ts +0 -21
  2103. package/dist/templates/app/api/v1/theme/route.ts +0 -97
  2104. package/dist/templates/app/api/v1/users/[id]/meta/[key]/route.ts +0 -313
  2105. package/dist/templates/app/api/v1/users/[id]/route.ts +0 -270
  2106. package/dist/templates/app/api/v1/users/route.ts +0 -194
  2107. package/dist/templates/app/dashboard/(main)/[entity]/[id]/edit/page.tsx +0 -117
  2108. package/dist/templates/app/dashboard/(main)/[entity]/[id]/page.tsx +0 -85
  2109. package/dist/templates/app/dashboard/(main)/[entity]/create/page.tsx +0 -95
  2110. package/dist/templates/app/dashboard/(main)/[entity]/error.tsx +0 -51
  2111. package/dist/templates/app/dashboard/(main)/[entity]/layout.tsx +0 -115
  2112. package/dist/templates/app/dashboard/(main)/[entity]/loading.tsx +0 -64
  2113. package/dist/templates/app/dashboard/(main)/[entity]/page.tsx +0 -71
  2114. package/dist/templates/app/dashboard/(main)/layout.tsx +0 -99
  2115. package/dist/templates/app/dashboard/(main)/loading.tsx +0 -8
  2116. package/dist/templates/app/dashboard/(main)/media/page.tsx +0 -621
  2117. package/dist/templates/app/dashboard/(main)/page.tsx +0 -201
  2118. package/dist/templates/app/dashboard/(main)/patterns/[id]/edit/page.tsx +0 -117
  2119. package/dist/templates/app/dashboard/(main)/patterns/[id]/page.tsx +0 -23
  2120. package/dist/templates/app/dashboard/(main)/patterns/[id]/reports/page.tsx +0 -174
  2121. package/dist/templates/app/dashboard/(main)/patterns/create/page.tsx +0 -89
  2122. package/dist/templates/app/dashboard/(main)/patterns/page.tsx +0 -447
  2123. package/dist/templates/app/dashboard/features/analytics/page.tsx +0 -38
  2124. package/dist/templates/app/dashboard/features/automation/page.tsx +0 -38
  2125. package/dist/templates/app/dashboard/features/layout.tsx +0 -16
  2126. package/dist/templates/app/dashboard/features/loading.tsx +0 -8
  2127. package/dist/templates/app/dashboard/features/webhooks/page.tsx +0 -38
  2128. package/dist/templates/app/dashboard/layout.tsx +0 -87
  2129. package/dist/templates/app/dashboard/permission-denied/page.tsx +0 -32
  2130. package/dist/templates/app/dashboard/settings/api-keys/loading.tsx +0 -8
  2131. package/dist/templates/app/dashboard/settings/api-keys/page.tsx +0 -516
  2132. package/dist/templates/app/dashboard/settings/billing/loading.tsx +0 -8
  2133. package/dist/templates/app/dashboard/settings/billing/page.tsx +0 -289
  2134. package/dist/templates/app/dashboard/settings/invoices/[invoiceNumber]/page.tsx +0 -222
  2135. package/dist/templates/app/dashboard/settings/invoices/loading.tsx +0 -8
  2136. package/dist/templates/app/dashboard/settings/invoices/page.tsx +0 -82
  2137. package/dist/templates/app/dashboard/settings/layout.tsx +0 -151
  2138. package/dist/templates/app/dashboard/settings/loading.tsx +0 -8
  2139. package/dist/templates/app/dashboard/settings/notifications/loading.tsx +0 -8
  2140. package/dist/templates/app/dashboard/settings/notifications/page.tsx +0 -462
  2141. package/dist/templates/app/dashboard/settings/page.tsx +0 -93
  2142. package/dist/templates/app/dashboard/settings/password/loading.tsx +0 -8
  2143. package/dist/templates/app/dashboard/settings/password/page.tsx +0 -305
  2144. package/dist/templates/app/dashboard/settings/plans/loading.tsx +0 -8
  2145. package/dist/templates/app/dashboard/settings/plans/page.tsx +0 -62
  2146. package/dist/templates/app/dashboard/settings/profile/loading.tsx +0 -8
  2147. package/dist/templates/app/dashboard/settings/profile/page.tsx +0 -688
  2148. package/dist/templates/app/dashboard/settings/security/loading.tsx +0 -8
  2149. package/dist/templates/app/dashboard/settings/security/page.tsx +0 -506
  2150. package/dist/templates/app/dashboard/settings/teams/loading.tsx +0 -8
  2151. package/dist/templates/app/dashboard/settings/teams/page.tsx +0 -272
  2152. package/dist/templates/app/dashboard/settings/teams/permissions/page.tsx +0 -95
  2153. package/dist/templates/app/devtools/api/[[...endpoint]]/page.tsx +0 -33
  2154. package/dist/templates/app/devtools/api/layout.tsx +0 -23
  2155. package/dist/templates/app/devtools/blocks/[slug]/page.tsx +0 -39
  2156. package/dist/templates/app/devtools/blocks/page.tsx +0 -40
  2157. package/dist/templates/app/devtools/config/page.tsx +0 -40
  2158. package/dist/templates/app/devtools/features/page.tsx +0 -40
  2159. package/dist/templates/app/devtools/flows/page.tsx +0 -40
  2160. package/dist/templates/app/devtools/layout.tsx +0 -66
  2161. package/dist/templates/app/devtools/page.tsx +0 -130
  2162. package/dist/templates/app/devtools/plugins/[plugin]/page.tsx +0 -17
  2163. package/dist/templates/app/devtools/scheduled-actions/page.tsx +0 -158
  2164. package/dist/templates/app/devtools/style/page.tsx +0 -330
  2165. package/dist/templates/app/devtools/tags/page.tsx +0 -40
  2166. package/dist/templates/app/devtools/tests/[[...path]]/page.tsx +0 -56
  2167. package/dist/templates/app/favicon.ico +0 -0
  2168. package/dist/templates/app/globals.css +0 -12
  2169. package/dist/templates/app/layout.ppr.tsx +0 -105
  2170. package/dist/templates/app/layout.tsx +0 -118
  2171. package/dist/templates/app/public/page.tsx +0 -30
  2172. package/dist/templates/app/superadmin/docs/[section]/[page]/page.tsx +0 -93
  2173. package/dist/templates/app/superadmin/docs/page.tsx +0 -75
  2174. package/dist/templates/app/superadmin/layout.tsx +0 -96
  2175. package/dist/templates/app/superadmin/page.tsx +0 -149
  2176. package/dist/templates/app/superadmin/plugins/[plugin]/page.tsx +0 -17
  2177. package/dist/templates/app/superadmin/subscriptions/page.tsx +0 -658
  2178. package/dist/templates/app/superadmin/team-roles/page.tsx +0 -493
  2179. package/dist/templates/app/superadmin/teams/[teamId]/page.tsx +0 -691
  2180. package/dist/templates/app/superadmin/teams/page.tsx +0 -302
  2181. package/dist/templates/app/superadmin/users/[userId]/page.tsx +0 -549
  2182. package/dist/templates/app/superadmin/users/page.tsx +0 -529
  2183. package/dist/templates/contents/plugins/README.md +0 -42
  2184. package/dist/templates/contents/plugins/starter/plugin/README.md.template +0 -97
  2185. package/dist/templates/contents/plugins/starter/plugin/api/example/route.ts.template +0 -94
  2186. package/dist/templates/contents/plugins/starter/plugin/hooks/usePlugin.ts.template +0 -102
  2187. package/dist/templates/contents/themes/starter/blocks/cta-section/config.ts +0 -11
  2188. package/dist/templates/contents/themes/starter/blocks/features-grid/config.ts +0 -11
  2189. package/dist/templates/contents/themes/starter/blocks/hero/config.ts +0 -11
  2190. package/dist/templates/contents/themes/starter/blocks/testimonials/config.ts +0 -11
  2191. package/dist/templates/contents/themes/starter/blocks/text-content/config.ts +0 -11
  2192. package/dist/templates/contents/themes/starter/emails/_README.md +0 -69
  2193. package/dist/templates/contents/themes/starter/entities/pages/pages.config.ts +0 -95
  2194. package/dist/templates/contents/themes/starter/entities/posts/posts.config.ts +0 -102
  2195. package/dist/templates/contents/themes/starter/entities/tasks/tasks.config.ts +0 -82
  2196. package/dist/templates/contents/themes/starter/public/theme/blocks/hero/thumbnail.png +0 -1
  2197. package/dist/templates/contents/themes/starter/styles/globals.css +0 -214
  2198. package/dist/templates/contents/themes/starter/templates/(public)/loading.tsx +0 -5
  2199. package/dist/templates/contents/themes/starter/templates/(public)/page.tsx +0 -37
  2200. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/docs/README.md +0 -215
  2201. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/block-editor.bdd.md +0 -491
  2202. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/dashboard-navigation.bdd.md +0 -147
  2203. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.bdd.md +0 -76
  2204. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/dashboard-topnav.bdd.md +0 -326
  2205. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/patterns.bdd.md +0 -388
  2206. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-api-keys.bdd.md +0 -266
  2207. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-billing.bdd.md +0 -78
  2208. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-layout.bdd.md +0 -129
  2209. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-password.bdd.md +0 -82
  2210. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-profile.bdd.md +0 -77
  2211. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-teams.bdd.md +0 -130
  2212. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/superadmin.bdd.md +0 -261
  2213. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/tasks.bdd.md +0 -593
  2214. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/teams.bdd.md +0 -278
  2215. package/dist/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +0 -549
  2216. package/dist/templates/contents/themes/starter/tests/cypress.config.ts +0 -220
  2217. package/dist/templates/contents/themes/starter/tests/jest/example.test.tsx +0 -87
  2218. package/dist/templates/contents/themes/starter/tests/jest/jest.config.cjs +0 -95
  2219. package/dist/templates/contents/themes/starter/tests/jest/services/tasks.service.test.ts +0 -547
  2220. package/dist/templates/contents/themes/starter/tests/jest/tsconfig.jest.json +0 -8
  2221. package/dist/templates/contents/themes/starter/tests/tsconfig.json +0 -15
  2222. package/dist/templates/public/theme/blocks/cta-section/thumbnail.png +0 -1
  2223. package/dist/templates/public/theme/blocks/features-grid/thumbnail.png +0 -1
  2224. package/dist/templates/public/theme/blocks/hero/thumbnail.png +0 -1
  2225. package/dist/templates/public/theme/blocks/testimonials/thumbnail.png +0 -1
  2226. package/dist/templates/public/theme/blocks/text-content/thumbnail.png +0 -1
  2227. package/scripts/build/registry/__tests__/globals-css-tag.test.mjs +0 -66
  2228. package/scripts/build/registry/__tests__/page-generator.test.mjs +0 -604
  2229. package/scripts/build/registry/__tests__/published-signatures.test.mjs +0 -239
  2230. package/scripts/build/registry/__tests__/route-file-rule.test.mjs +0 -170
  2231. package/scripts/build/registry/__tests__/template-analysis.test.mjs +0 -142
  2232. package/scripts/build/registry/__tests__/template-registry.test.mjs +0 -693
  2233. package/scripts/build/registry/__tests__/templates-plan.test.mjs +0 -128
  2234. package/scripts/build/registry/__tests__/templates-tree.test.mjs +0 -367
  2235. package/scripts/build/registry/discovery/templates.mjs +0 -250
  2236. package/scripts/build/registry/generators/template-registry.mjs +0 -560
  2237. package/scripts/build/registry/post-build/page-generator.mjs +0 -1066
  2238. package/scripts/build/registry/post-build/route-cleanup.mjs +0 -199
  2239. package/scripts/build/registry/watch.mjs +0 -80
  2240. package/scripts/build/templates-plan.mjs +0 -44
  2241. package/scripts/build/theme.mjs +0 -452
  2242. package/scripts/generate-app.mjs +0 -190
  2243. package/scripts/setup/npm-postinstall.mjs +0 -193
  2244. package/scripts/setup/postinstall.mjs +0 -155
  2245. package/scripts/test/jest-theme.mjs +0 -65
  2246. package/scripts/utils/generated-tag.mjs +0 -66
  2247. package/templates/app/(auth)/accept-invite/[token]/page.tsx +0 -339
  2248. package/templates/app/(auth)/auth-error/page.tsx +0 -25
  2249. package/templates/app/(auth)/forgot-password/page.tsx +0 -215
  2250. package/templates/app/(auth)/layout.tsx +0 -54
  2251. package/templates/app/(auth)/login/page.tsx +0 -22
  2252. package/templates/app/(auth)/reset-password/page.tsx +0 -211
  2253. package/templates/app/(auth)/signup/page.tsx +0 -63
  2254. package/templates/app/(auth)/verify-email/page.tsx +0 -190
  2255. package/templates/app/(public)/[...slug]/page.tsx +0 -386
  2256. package/templates/app/(public)/docs/[section]/[page]/page.tsx +0 -101
  2257. package/templates/app/(public)/docs/layout.tsx +0 -25
  2258. package/templates/app/(public)/docs/page.tsx +0 -81
  2259. package/templates/app/(public)/layout.tsx +0 -44
  2260. package/templates/app/(public)/page.tsx +0 -19
  2261. package/templates/app/403/page.tsx +0 -89
  2262. package/templates/app/api/auth/[...all]/route.ts +0 -214
  2263. package/templates/app/api/cron/billing/lifecycle/route.ts +0 -98
  2264. package/templates/app/api/csp-report/route.ts +0 -181
  2265. package/templates/app/api/devtools/config/entities/route.ts +0 -115
  2266. package/templates/app/api/devtools/config/theme/route.ts +0 -67
  2267. package/templates/app/api/devtools/tests/[...path]/route.ts +0 -131
  2268. package/templates/app/api/devtools/tests/route.ts +0 -135
  2269. package/templates/app/api/health/route.ts +0 -53
  2270. package/templates/app/api/internal/user-metadata/route.ts +0 -47
  2271. package/templates/app/api/mcp/route.ts +0 -176
  2272. package/templates/app/api/superadmin/subscriptions/route.ts +0 -315
  2273. package/templates/app/api/superadmin/teams/[teamId]/route.ts +0 -292
  2274. package/templates/app/api/superadmin/teams/route.ts +0 -187
  2275. package/templates/app/api/superadmin/users/[userId]/route.ts +0 -542
  2276. package/templates/app/api/superadmin/users/route.ts +0 -322
  2277. package/templates/app/api/user/delete-account/route.ts +0 -58
  2278. package/templates/app/api/user/plan-flags/route.ts +0 -270
  2279. package/templates/app/api/user/profile/route.ts +0 -129
  2280. package/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +0 -208
  2281. package/templates/app/api/v1/[entity]/[id]/child/[childType]/route.ts +0 -329
  2282. package/templates/app/api/v1/[entity]/[id]/route.ts +0 -33
  2283. package/templates/app/api/v1/[entity]/docs.md +0 -369
  2284. package/templates/app/api/v1/[entity]/presets.ts +0 -194
  2285. package/templates/app/api/v1/[entity]/route.ts +0 -29
  2286. package/templates/app/api/v1/api-keys/[id]/route.ts +0 -283
  2287. package/templates/app/api/v1/api-keys/docs.md +0 -101
  2288. package/templates/app/api/v1/api-keys/presets.ts +0 -31
  2289. package/templates/app/api/v1/api-keys/route.ts +0 -241
  2290. package/templates/app/api/v1/auth/docs.md +0 -184
  2291. package/templates/app/api/v1/auth/presets.ts +0 -44
  2292. package/templates/app/api/v1/auth/signup-with-invite/route.ts +0 -243
  2293. package/templates/app/api/v1/billing/cancel/route.ts +0 -206
  2294. package/templates/app/api/v1/billing/change-plan/route.ts +0 -99
  2295. package/templates/app/api/v1/billing/check-action/route.ts +0 -85
  2296. package/templates/app/api/v1/billing/checkout/route.ts +0 -153
  2297. package/templates/app/api/v1/billing/docs.md +0 -209
  2298. package/templates/app/api/v1/billing/plans/route.ts +0 -82
  2299. package/templates/app/api/v1/billing/portal/route.ts +0 -93
  2300. package/templates/app/api/v1/billing/presets.ts +0 -121
  2301. package/templates/app/api/v1/billing/webhooks/polar/route.ts +0 -495
  2302. package/templates/app/api/v1/billing/webhooks/stripe/route.ts +0 -34
  2303. package/templates/app/api/v1/blocks/[slug]/route.ts +0 -30
  2304. package/templates/app/api/v1/blocks/docs.md +0 -173
  2305. package/templates/app/api/v1/blocks/presets.ts +0 -121
  2306. package/templates/app/api/v1/blocks/route.ts +0 -46
  2307. package/templates/app/api/v1/blocks/validate/route.ts +0 -47
  2308. package/templates/app/api/v1/cron/docs.md +0 -116
  2309. package/templates/app/api/v1/cron/presets.ts +0 -26
  2310. package/templates/app/api/v1/cron/process/route.ts +0 -106
  2311. package/templates/app/api/v1/devtools/blocks/route.ts +0 -84
  2312. package/templates/app/api/v1/devtools/docs/route.ts +0 -153
  2313. package/templates/app/api/v1/devtools/docs.md +0 -204
  2314. package/templates/app/api/v1/devtools/features/route.ts +0 -63
  2315. package/templates/app/api/v1/devtools/flows/route.ts +0 -63
  2316. package/templates/app/api/v1/devtools/presets.ts +0 -113
  2317. package/templates/app/api/v1/devtools/scheduled-actions/route.ts +0 -244
  2318. package/templates/app/api/v1/devtools/scheduled-actions/run/route.ts +0 -111
  2319. package/templates/app/api/v1/devtools/testing/route.ts +0 -84
  2320. package/templates/app/api/v1/media/[id]/route.ts +0 -168
  2321. package/templates/app/api/v1/media/[id]/tags/route.ts +0 -212
  2322. package/templates/app/api/v1/media/check-duplicates/route.ts +0 -66
  2323. package/templates/app/api/v1/media/docs.md +0 -117
  2324. package/templates/app/api/v1/media/presets.ts +0 -24
  2325. package/templates/app/api/v1/media/route.ts +0 -64
  2326. package/templates/app/api/v1/media/upload/route.ts +0 -274
  2327. package/templates/app/api/v1/media-tags/route.ts +0 -81
  2328. package/templates/app/api/v1/patterns/[id]/usages/route.ts +0 -108
  2329. package/templates/app/api/v1/plugin/[...path]/route.ts +0 -374
  2330. package/templates/app/api/v1/plugin/docs.md +0 -79
  2331. package/templates/app/api/v1/plugin/presets.ts +0 -21
  2332. package/templates/app/api/v1/plugin/route.ts +0 -97
  2333. package/templates/app/api/v1/post-categories/[id]/route.ts +0 -258
  2334. package/templates/app/api/v1/post-categories/docs.md +0 -134
  2335. package/templates/app/api/v1/post-categories/presets.ts +0 -78
  2336. package/templates/app/api/v1/post-categories/route.ts +0 -121
  2337. package/templates/app/api/v1/team-invitations/[token]/accept/route.ts +0 -177
  2338. package/templates/app/api/v1/team-invitations/[token]/decline/route.ts +0 -118
  2339. package/templates/app/api/v1/team-invitations/[token]/route.ts +0 -90
  2340. package/templates/app/api/v1/team-invitations/docs.md +0 -88
  2341. package/templates/app/api/v1/team-invitations/presets.ts +0 -43
  2342. package/templates/app/api/v1/team-invitations/route.ts +0 -113
  2343. package/templates/app/api/v1/teams/[teamId]/invitations/route.ts +0 -181
  2344. package/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +0 -105
  2345. package/templates/app/api/v1/teams/[teamId]/invoices/route.ts +0 -125
  2346. package/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +0 -260
  2347. package/templates/app/api/v1/teams/[teamId]/members/route.ts +0 -350
  2348. package/templates/app/api/v1/teams/[teamId]/route.ts +0 -289
  2349. package/templates/app/api/v1/teams/[teamId]/subscription/route.ts +0 -51
  2350. package/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +0 -96
  2351. package/templates/app/api/v1/teams/docs.md +0 -315
  2352. package/templates/app/api/v1/teams/presets.ts +0 -178
  2353. package/templates/app/api/v1/teams/route.ts +0 -305
  2354. package/templates/app/api/v1/teams/switch/route.ts +0 -106
  2355. package/templates/app/api/v1/theme/[...path]/route.ts +0 -383
  2356. package/templates/app/api/v1/theme/docs.md +0 -74
  2357. package/templates/app/api/v1/theme/presets.ts +0 -21
  2358. package/templates/app/api/v1/theme/route.ts +0 -97
  2359. package/templates/app/api/v1/users/[id]/meta/[key]/route.ts +0 -313
  2360. package/templates/app/api/v1/users/[id]/route.ts +0 -270
  2361. package/templates/app/api/v1/users/docs.md +0 -93
  2362. package/templates/app/api/v1/users/presets.ts +0 -59
  2363. package/templates/app/api/v1/users/route.ts +0 -194
  2364. package/templates/app/dashboard/(main)/[entity]/[id]/edit/page.tsx +0 -117
  2365. package/templates/app/dashboard/(main)/[entity]/[id]/page.tsx +0 -85
  2366. package/templates/app/dashboard/(main)/[entity]/create/page.tsx +0 -95
  2367. package/templates/app/dashboard/(main)/[entity]/error.tsx +0 -51
  2368. package/templates/app/dashboard/(main)/[entity]/layout.tsx +0 -115
  2369. package/templates/app/dashboard/(main)/[entity]/loading.tsx +0 -64
  2370. package/templates/app/dashboard/(main)/[entity]/page.tsx +0 -71
  2371. package/templates/app/dashboard/(main)/layout.tsx +0 -99
  2372. package/templates/app/dashboard/(main)/loading.tsx +0 -8
  2373. package/templates/app/dashboard/(main)/media/page.tsx +0 -621
  2374. package/templates/app/dashboard/(main)/page.tsx +0 -201
  2375. package/templates/app/dashboard/(main)/patterns/[id]/edit/page.tsx +0 -117
  2376. package/templates/app/dashboard/(main)/patterns/[id]/page.tsx +0 -23
  2377. package/templates/app/dashboard/(main)/patterns/[id]/reports/page.tsx +0 -174
  2378. package/templates/app/dashboard/(main)/patterns/create/page.tsx +0 -89
  2379. package/templates/app/dashboard/(main)/patterns/page.tsx +0 -447
  2380. package/templates/app/dashboard/features/analytics/page.tsx +0 -38
  2381. package/templates/app/dashboard/features/automation/page.tsx +0 -38
  2382. package/templates/app/dashboard/features/layout.tsx +0 -16
  2383. package/templates/app/dashboard/features/loading.tsx +0 -8
  2384. package/templates/app/dashboard/features/webhooks/page.tsx +0 -38
  2385. package/templates/app/dashboard/layout.tsx +0 -87
  2386. package/templates/app/dashboard/permission-denied/page.tsx +0 -32
  2387. package/templates/app/dashboard/settings/api-keys/loading.tsx +0 -8
  2388. package/templates/app/dashboard/settings/api-keys/page.tsx +0 -516
  2389. package/templates/app/dashboard/settings/billing/loading.tsx +0 -8
  2390. package/templates/app/dashboard/settings/billing/page.tsx +0 -289
  2391. package/templates/app/dashboard/settings/invoices/[invoiceNumber]/page.tsx +0 -222
  2392. package/templates/app/dashboard/settings/invoices/loading.tsx +0 -8
  2393. package/templates/app/dashboard/settings/invoices/page.tsx +0 -82
  2394. package/templates/app/dashboard/settings/layout.tsx +0 -151
  2395. package/templates/app/dashboard/settings/loading.tsx +0 -8
  2396. package/templates/app/dashboard/settings/notifications/loading.tsx +0 -8
  2397. package/templates/app/dashboard/settings/notifications/page.tsx +0 -462
  2398. package/templates/app/dashboard/settings/page.tsx +0 -93
  2399. package/templates/app/dashboard/settings/password/loading.tsx +0 -8
  2400. package/templates/app/dashboard/settings/password/page.tsx +0 -305
  2401. package/templates/app/dashboard/settings/plans/loading.tsx +0 -8
  2402. package/templates/app/dashboard/settings/plans/page.tsx +0 -62
  2403. package/templates/app/dashboard/settings/profile/loading.tsx +0 -8
  2404. package/templates/app/dashboard/settings/profile/page.tsx +0 -688
  2405. package/templates/app/dashboard/settings/security/loading.tsx +0 -8
  2406. package/templates/app/dashboard/settings/security/page.tsx +0 -506
  2407. package/templates/app/dashboard/settings/teams/loading.tsx +0 -8
  2408. package/templates/app/dashboard/settings/teams/page.tsx +0 -272
  2409. package/templates/app/dashboard/settings/teams/permissions/page.tsx +0 -95
  2410. package/templates/app/devtools/api/[[...endpoint]]/page.tsx +0 -33
  2411. package/templates/app/devtools/api/layout.tsx +0 -23
  2412. package/templates/app/devtools/blocks/[slug]/page.tsx +0 -39
  2413. package/templates/app/devtools/blocks/page.tsx +0 -40
  2414. package/templates/app/devtools/config/page.tsx +0 -40
  2415. package/templates/app/devtools/features/page.tsx +0 -40
  2416. package/templates/app/devtools/flows/page.tsx +0 -40
  2417. package/templates/app/devtools/layout.tsx +0 -66
  2418. package/templates/app/devtools/page.tsx +0 -130
  2419. package/templates/app/devtools/plugins/[plugin]/page.tsx +0 -17
  2420. package/templates/app/devtools/scheduled-actions/page.tsx +0 -158
  2421. package/templates/app/devtools/style/page.tsx +0 -330
  2422. package/templates/app/devtools/tags/page.tsx +0 -40
  2423. package/templates/app/devtools/tests/[[...path]]/page.tsx +0 -56
  2424. package/templates/app/favicon.ico +0 -0
  2425. package/templates/app/globals.css +0 -12
  2426. package/templates/app/layout.ppr.tsx +0 -105
  2427. package/templates/app/layout.tsx +0 -118
  2428. package/templates/app/public/page.tsx +0 -30
  2429. package/templates/app/superadmin/docs/[section]/[page]/page.tsx +0 -93
  2430. package/templates/app/superadmin/docs/page.tsx +0 -75
  2431. package/templates/app/superadmin/layout.tsx +0 -96
  2432. package/templates/app/superadmin/page.tsx +0 -149
  2433. package/templates/app/superadmin/plugins/[plugin]/page.tsx +0 -17
  2434. package/templates/app/superadmin/subscriptions/page.tsx +0 -658
  2435. package/templates/app/superadmin/team-roles/page.tsx +0 -493
  2436. package/templates/app/superadmin/teams/[teamId]/page.tsx +0 -691
  2437. package/templates/app/superadmin/teams/page.tsx +0 -302
  2438. package/templates/app/superadmin/users/[userId]/page.tsx +0 -549
  2439. package/templates/app/superadmin/users/page.tsx +0 -529
  2440. package/templates/contents/plugins/README.md +0 -42
  2441. package/templates/contents/plugins/starter/plugin/README.md.template +0 -97
  2442. package/templates/contents/plugins/starter/plugin/api/example/route.ts.template +0 -94
  2443. package/templates/contents/plugins/starter/plugin/hooks/usePlugin.ts.template +0 -102
  2444. package/templates/contents/themes/.gitkeep +0 -0
  2445. package/templates/contents/themes/starter/blocks/.gitkeep +0 -0
  2446. package/templates/contents/themes/starter/blocks/cta-section/config.ts +0 -11
  2447. package/templates/contents/themes/starter/blocks/features-grid/config.ts +0 -11
  2448. package/templates/contents/themes/starter/blocks/hero/config.ts +0 -11
  2449. package/templates/contents/themes/starter/blocks/testimonials/config.ts +0 -11
  2450. package/templates/contents/themes/starter/blocks/text-content/config.ts +0 -11
  2451. package/templates/contents/themes/starter/emails/_README.md +0 -69
  2452. package/templates/contents/themes/starter/entities/pages/pages.config.ts +0 -95
  2453. package/templates/contents/themes/starter/entities/posts/posts.config.ts +0 -102
  2454. package/templates/contents/themes/starter/entities/tasks/tasks.config.ts +0 -82
  2455. package/templates/contents/themes/starter/public/brand/.gitkeep +0 -0
  2456. package/templates/contents/themes/starter/public/theme/blocks/hero/thumbnail.png +0 -1
  2457. package/templates/contents/themes/starter/styles/globals.css +0 -214
  2458. package/templates/contents/themes/starter/templates/(public)/loading.tsx +0 -5
  2459. package/templates/contents/themes/starter/templates/(public)/page.tsx +0 -37
  2460. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/docs/README.md +0 -215
  2461. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/block-editor.bdd.md +0 -491
  2462. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/dashboard-navigation.bdd.md +0 -147
  2463. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.bdd.md +0 -76
  2464. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/dashboard-topnav.bdd.md +0 -326
  2465. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/patterns.bdd.md +0 -388
  2466. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-api-keys.bdd.md +0 -266
  2467. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-billing.bdd.md +0 -78
  2468. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-layout.bdd.md +0 -129
  2469. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-password.bdd.md +0 -82
  2470. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-profile.bdd.md +0 -77
  2471. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/settings-teams.bdd.md +0 -130
  2472. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/superadmin.bdd.md +0 -261
  2473. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/tasks.bdd.md +0 -593
  2474. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/teams.bdd.md +0 -278
  2475. package/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +0 -549
  2476. package/templates/contents/themes/starter/tests/cypress.config.ts +0 -220
  2477. package/templates/contents/themes/starter/tests/jest/example.test.tsx +0 -87
  2478. package/templates/contents/themes/starter/tests/jest/jest.config.cjs +0 -95
  2479. package/templates/contents/themes/starter/tests/jest/services/tasks.service.test.ts +0 -547
  2480. package/templates/contents/themes/starter/tests/jest/tsconfig.jest.json +0 -8
  2481. package/templates/contents/themes/starter/tests/tsconfig.json +0 -15
  2482. package/templates/public/theme/blocks/cta-section/thumbnail.png +0 -1
  2483. package/templates/public/theme/blocks/features-grid/thumbnail.png +0 -1
  2484. package/templates/public/theme/blocks/hero/thumbnail.png +0 -1
  2485. package/templates/public/theme/blocks/testimonials/thumbnail.png +0 -1
  2486. package/templates/public/theme/blocks/text-content/thumbnail.png +0 -1
  2487. package/tests/jest/__mocks__/@nextsparkjs/registries/template-registry.client.ts +0 -11
  2488. package/tests/jest/__mocks__/@nextsparkjs/registries/template-registry.ts +0 -11
  2489. package/tests/jest/__mocks__/@nextsparkjs/registries/template-scopes/client.ts +0 -21
  2490. package/tests/jest/__mocks__/@nextsparkjs/registries/template-scopes/server.ts +0 -23
  2491. /package/dist/{templates/contents/plugins/.gitkeep → lib/entities/portable/types.js} +0 -0
  2492. /package/dist/{templates/app → routes}/api/v1/[entity]/docs.md +0 -0
  2493. /package/dist/{templates/app → routes}/api/v1/[entity]/presets.ts +0 -0
  2494. /package/dist/{templates/app → routes}/api/v1/api-keys/docs.md +0 -0
  2495. /package/dist/{templates/app → routes}/api/v1/api-keys/presets.ts +0 -0
  2496. /package/dist/{templates/app → routes}/api/v1/auth/docs.md +0 -0
  2497. /package/dist/{templates/app → routes}/api/v1/auth/presets.ts +0 -0
  2498. /package/dist/{templates/app → routes}/api/v1/billing/docs.md +0 -0
  2499. /package/dist/{templates/app → routes}/api/v1/billing/presets.ts +0 -0
  2500. /package/dist/{templates/app → routes}/api/v1/blocks/presets.ts +0 -0
  2501. /package/dist/{templates/app → routes}/api/v1/cron/docs.md +0 -0
  2502. /package/dist/{templates/app → routes}/api/v1/cron/presets.ts +0 -0
  2503. /package/dist/{templates/app → routes}/api/v1/media/docs.md +0 -0
  2504. /package/dist/{templates/app → routes}/api/v1/media/presets.ts +0 -0
  2505. /package/dist/{templates/app → routes}/api/v1/post-categories/docs.md +0 -0
  2506. /package/dist/{templates/app → routes}/api/v1/post-categories/presets.ts +0 -0
  2507. /package/dist/{templates/app → routes}/api/v1/team-invitations/docs.md +0 -0
  2508. /package/dist/{templates/app → routes}/api/v1/team-invitations/presets.ts +0 -0
  2509. /package/dist/{templates/app → routes}/api/v1/teams/docs.md +0 -0
  2510. /package/dist/{templates/app → routes}/api/v1/teams/presets.ts +0 -0
  2511. /package/dist/{templates/app → routes}/api/v1/users/docs.md +0 -0
  2512. /package/dist/{templates/app → routes}/api/v1/users/presets.ts +0 -0
  2513. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/components/ExampleWidget.tsx.template +0 -0
  2514. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/entities/.gitkeep +0 -0
  2515. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/lib/core.ts.template +0 -0
  2516. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/lib/types.ts.template +0 -0
  2517. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/messages/de.json +0 -0
  2518. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/messages/en.json +0 -0
  2519. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/messages/es.json +0 -0
  2520. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/messages/fr.json +0 -0
  2521. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/messages/it.json +0 -0
  2522. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/messages/pt.json +0 -0
  2523. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/migrations/README.md +0 -0
  2524. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/plugin.config.ts.template +0 -0
  2525. /package/dist/templates/{contents/plugins → plugins}/starter/plugin/tests/plugin.test.ts.template +0 -0
  2526. /package/dist/templates/{contents/themes/starter → projects/blog}/tests/jest/__mocks__/jose.js +0 -0
  2527. /package/dist/templates/{contents/themes/starter → projects/blog}/tests/jest/__mocks__/next-server.js +0 -0
  2528. /package/dist/templates/{contents/themes → projects}/starter/README.md +0 -0
  2529. /package/dist/templates/{contents/themes → projects}/starter/about/business.md +0 -0
  2530. /package/dist/templates/{contents/themes → projects}/starter/about/features.json +0 -0
  2531. /package/dist/templates/{contents/themes → projects/starter/blocks}/.gitkeep +0 -0
  2532. /package/dist/templates/{contents/themes → projects}/starter/blocks/cta-section/component.tsx +0 -0
  2533. /package/dist/templates/{contents/themes → projects}/starter/blocks/cta-section/fields.ts +0 -0
  2534. /package/dist/templates/{contents/themes → projects}/starter/blocks/cta-section/index.ts +0 -0
  2535. /package/dist/templates/{contents/themes → projects}/starter/blocks/cta-section/schema.ts +0 -0
  2536. /package/dist/templates/{contents/themes → projects}/starter/blocks/cta-section/thumbnail.png +0 -0
  2537. /package/dist/templates/{contents/themes → projects}/starter/blocks/features-grid/component.tsx +0 -0
  2538. /package/dist/templates/{contents/themes → projects}/starter/blocks/features-grid/fields.ts +0 -0
  2539. /package/dist/templates/{contents/themes → projects}/starter/blocks/features-grid/index.ts +0 -0
  2540. /package/dist/templates/{contents/themes → projects}/starter/blocks/features-grid/schema.ts +0 -0
  2541. /package/dist/templates/{contents/themes → projects}/starter/blocks/features-grid/thumbnail.png +0 -0
  2542. /package/dist/templates/{contents/themes → projects}/starter/blocks/hero/component.tsx +0 -0
  2543. /package/dist/templates/{contents/themes → projects}/starter/blocks/hero/fields.ts +0 -0
  2544. /package/dist/templates/{contents/themes → projects}/starter/blocks/hero/index.ts +0 -0
  2545. /package/dist/templates/{contents/themes → projects}/starter/blocks/hero/schema.ts +0 -0
  2546. /package/dist/templates/{contents/themes → projects}/starter/blocks/hero/thumbnail.png +0 -0
  2547. /package/dist/templates/{contents/themes → projects}/starter/blocks/testimonials/component.tsx +0 -0
  2548. /package/dist/templates/{contents/themes → projects}/starter/blocks/testimonials/fields.ts +0 -0
  2549. /package/dist/templates/{contents/themes → projects}/starter/blocks/testimonials/index.ts +0 -0
  2550. /package/dist/templates/{contents/themes → projects}/starter/blocks/testimonials/schema.ts +0 -0
  2551. /package/dist/templates/{contents/themes → projects}/starter/blocks/testimonials/thumbnail.png +0 -0
  2552. /package/dist/templates/{contents/themes → projects}/starter/blocks/text-content/component.tsx +0 -0
  2553. /package/dist/templates/{contents/themes → projects}/starter/blocks/text-content/fields.ts +0 -0
  2554. /package/dist/templates/{contents/themes → projects}/starter/blocks/text-content/index.ts +0 -0
  2555. /package/dist/templates/{contents/themes → projects}/starter/blocks/text-content/schema.ts +0 -0
  2556. /package/dist/templates/{contents/themes → projects}/starter/blocks/text-content/thumbnail.png +0 -0
  2557. /package/dist/templates/{contents/themes → projects}/starter/components/.gitkeep +0 -0
  2558. /package/dist/templates/{contents/themes → projects}/starter/components/analytics/RecentActivity.tsx +0 -0
  2559. /package/dist/templates/{contents/themes → projects}/starter/components/analytics/StatsCard.tsx +0 -0
  2560. /package/dist/templates/{contents/themes → projects}/starter/components/analytics/TasksChart.tsx +0 -0
  2561. /package/dist/templates/{contents/themes → projects}/starter/components/analytics/index.ts +0 -0
  2562. /package/dist/templates/{contents/themes → projects}/starter/config/app.config.ts +0 -0
  2563. /package/dist/templates/{contents/themes → projects}/starter/config/billing.config.ts +0 -0
  2564. /package/dist/templates/{contents/themes → projects}/starter/config/dashboard.config.ts +0 -0
  2565. /package/dist/templates/{contents/themes → projects}/starter/config/dev.config.ts +0 -0
  2566. /package/dist/templates/{contents/themes → projects}/starter/config/features.config.ts +0 -0
  2567. /package/dist/templates/{contents/themes → projects}/starter/config/permissions.config.ts +0 -0
  2568. /package/dist/templates/{contents/themes → projects}/starter/config/theme.config.ts +0 -0
  2569. /package/dist/templates/{contents/themes → projects}/starter/docs/public/01-overview/01-introduction.md +0 -0
  2570. /package/dist/templates/{contents/themes → projects}/starter/docs/public/01-overview/02-customization.md +0 -0
  2571. /package/dist/templates/{contents/themes → projects}/starter/docs/superadmin/01-setup/01-configuration.md +0 -0
  2572. /package/dist/templates/{contents/themes → projects}/starter/docs/superadmin/02-entities/01-tasks.md +0 -0
  2573. /package/dist/templates/{contents/themes → projects}/starter/emails/verify-email.ts +0 -0
  2574. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/api/docs.md +0 -0
  2575. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/api/presets.ts +0 -0
  2576. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/messages/en.json +0 -0
  2577. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/messages/es.json +0 -0
  2578. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/migrations/001_pages_table.sql +0 -0
  2579. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/migrations/002_pages_metas.sql +0 -0
  2580. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/migrations/003_add_status.sql +0 -0
  2581. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/pages-management.service.ts +0 -0
  2582. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/pages.fields.ts +0 -0
  2583. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/pages.service.ts +0 -0
  2584. /package/dist/templates/{contents/themes → projects}/starter/entities/pages/pages.types.ts +0 -0
  2585. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/api/docs.md +0 -0
  2586. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/api/presets.ts +0 -0
  2587. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/components/post-header.tsx +0 -0
  2588. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/messages/en.json +0 -0
  2589. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/messages/es.json +0 -0
  2590. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/migrations/001_posts_table.sql +0 -0
  2591. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/migrations/003_add_status.sql +0 -0
  2592. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/migrations/004_entity_taxonomy_relations.sql +0 -0
  2593. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/migrations/006_posts_metas.sql +0 -0
  2594. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/posts.fields.ts +0 -0
  2595. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/posts.service.ts +0 -0
  2596. /package/dist/templates/{contents/themes → projects}/starter/entities/posts/posts.types.ts +0 -0
  2597. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/api/docs.md +0 -0
  2598. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/api/presets.ts +0 -0
  2599. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/messages/de.json +0 -0
  2600. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/messages/en.json +0 -0
  2601. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/messages/es.json +0 -0
  2602. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/messages/fr.json +0 -0
  2603. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/messages/it.json +0 -0
  2604. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/messages/pt.json +0 -0
  2605. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/migrations/001_tasks_table.sql +0 -0
  2606. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/migrations/002_task_metas.sql +0 -0
  2607. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/tasks.fields.ts +0 -0
  2608. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/tasks.service.ts +0 -0
  2609. /package/dist/templates/{contents/themes → projects}/starter/entities/tasks/tasks.types.ts +0 -0
  2610. /package/dist/templates/{contents/themes → projects}/starter/lib/.gitkeep +0 -0
  2611. /package/dist/templates/{contents/themes → projects}/starter/lib/hooks/index.ts +0 -0
  2612. /package/dist/templates/{contents/themes → projects}/starter/lib/hooks/useAnalyticsData.ts +0 -0
  2613. /package/dist/templates/{contents/themes → projects}/starter/lib/hooks/useTaskStats.ts +0 -0
  2614. /package/dist/templates/{contents/themes → projects}/starter/lib/index.ts +0 -0
  2615. /package/dist/templates/{contents/themes → projects}/starter/lib/selectors.ts +0 -0
  2616. /package/dist/templates/{contents/themes → projects}/starter/lib/utils.ts +0 -0
  2617. /package/dist/templates/{contents/themes → projects}/starter/messages/de/analytics.json +0 -0
  2618. /package/dist/templates/{contents/themes → projects}/starter/messages/de/common.json +0 -0
  2619. /package/dist/templates/{contents/themes → projects}/starter/messages/de/dev.json +0 -0
  2620. /package/dist/templates/{contents/themes → projects}/starter/messages/de/features.json +0 -0
  2621. /package/dist/templates/{contents/themes → projects}/starter/messages/de/home.json +0 -0
  2622. /package/dist/templates/{contents/themes → projects}/starter/messages/de/index.ts +0 -0
  2623. /package/dist/templates/{contents/themes → projects}/starter/messages/de/navigation.json +0 -0
  2624. /package/dist/templates/{contents/themes → projects}/starter/messages/de/public.json +0 -0
  2625. /package/dist/templates/{contents/themes → projects}/starter/messages/en/analytics.json +0 -0
  2626. /package/dist/templates/{contents/themes → projects}/starter/messages/en/common.json +0 -0
  2627. /package/dist/templates/{contents/themes → projects}/starter/messages/en/dev.json +0 -0
  2628. /package/dist/templates/{contents/themes → projects}/starter/messages/en/features.json +0 -0
  2629. /package/dist/templates/{contents/themes → projects}/starter/messages/en/home.json +0 -0
  2630. /package/dist/templates/{contents/themes → projects}/starter/messages/en/index.ts +0 -0
  2631. /package/dist/templates/{contents/themes → projects}/starter/messages/en/navigation.json +0 -0
  2632. /package/dist/templates/{contents/themes → projects}/starter/messages/en/public.json +0 -0
  2633. /package/dist/templates/{contents/themes → projects}/starter/messages/es/analytics.json +0 -0
  2634. /package/dist/templates/{contents/themes → projects}/starter/messages/es/common.json +0 -0
  2635. /package/dist/templates/{contents/themes → projects}/starter/messages/es/dev.json +0 -0
  2636. /package/dist/templates/{contents/themes → projects}/starter/messages/es/features.json +0 -0
  2637. /package/dist/templates/{contents/themes → projects}/starter/messages/es/home.json +0 -0
  2638. /package/dist/templates/{contents/themes → projects}/starter/messages/es/index.ts +0 -0
  2639. /package/dist/templates/{contents/themes → projects}/starter/messages/es/navigation.json +0 -0
  2640. /package/dist/templates/{contents/themes → projects}/starter/messages/es/public.json +0 -0
  2641. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/analytics.json +0 -0
  2642. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/common.json +0 -0
  2643. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/dev.json +0 -0
  2644. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/features.json +0 -0
  2645. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/home.json +0 -0
  2646. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/index.ts +0 -0
  2647. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/navigation.json +0 -0
  2648. /package/dist/templates/{contents/themes → projects}/starter/messages/fr/public.json +0 -0
  2649. /package/dist/templates/{contents/themes → projects}/starter/messages/it/analytics.json +0 -0
  2650. /package/dist/templates/{contents/themes → projects}/starter/messages/it/common.json +0 -0
  2651. /package/dist/templates/{contents/themes → projects}/starter/messages/it/dev.json +0 -0
  2652. /package/dist/templates/{contents/themes → projects}/starter/messages/it/features.json +0 -0
  2653. /package/dist/templates/{contents/themes → projects}/starter/messages/it/home.json +0 -0
  2654. /package/dist/templates/{contents/themes → projects}/starter/messages/it/index.ts +0 -0
  2655. /package/dist/templates/{contents/themes → projects}/starter/messages/it/navigation.json +0 -0
  2656. /package/dist/templates/{contents/themes → projects}/starter/messages/pt/analytics.json +0 -0
  2657. /package/dist/templates/{contents/themes → projects}/starter/messages/pt/common.json +0 -0
  2658. /package/dist/templates/{contents/themes → projects}/starter/messages/pt/dev.json +0 -0
  2659. /package/dist/templates/{contents/themes → projects}/starter/messages/pt/features.json +0 -0
  2660. /package/dist/templates/{contents/themes → projects}/starter/messages/pt/home.json +0 -0
  2661. /package/dist/templates/{contents/themes → projects}/starter/messages/pt/index.ts +0 -0
  2662. /package/dist/templates/{contents/themes → projects}/starter/messages/pt/navigation.json +0 -0
  2663. /package/dist/templates/{contents/themes → projects}/starter/migrations/README.md +0 -0
  2664. /package/dist/templates/{contents/themes/starter/blocks → projects/starter/public/brand}/.gitkeep +0 -0
  2665. /package/dist/templates/{contents/themes → projects}/starter/styles/components.css +0 -0
  2666. /package/dist/templates/{contents/themes → projects}/starter/templates/(public)/layout.tsx +0 -0
  2667. /package/dist/templates/{contents/themes → projects}/starter/templates/(public)/support/page.tsx +0 -0
  2668. /package/dist/templates/{contents/themes → projects}/starter/templates/dashboard/analytics/loading.tsx +0 -0
  2669. /package/dist/templates/{contents/themes → projects}/starter/templates/dashboard/analytics/page.tsx +0 -0
  2670. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/access.bdd.md +0 -0
  2671. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +0 -0
  2672. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/navigation.bdd.md +0 -0
  2673. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/navigation.cy.ts +0 -0
  2674. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/pages.bdd.md +0 -0
  2675. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/pages.cy.ts +0 -0
  2676. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/auth.bdd.md +0 -0
  2677. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/auth.cy.ts +0 -0
  2678. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/billing.bdd.md +0 -0
  2679. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/billing.cy.ts +0 -0
  2680. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/block-editor.cy.ts +0 -0
  2681. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-container.cy.ts +0 -0
  2682. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-mobile.bdd.md +0 -0
  2683. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-mobile.cy.ts +0 -0
  2684. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-navigation.cy.ts +0 -0
  2685. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.cy.ts +0 -0
  2686. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-topnav.cy.ts +0 -0
  2687. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/devtools.bdd.md +0 -0
  2688. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/devtools.cy.ts +0 -0
  2689. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/global-search.bdd.md +0 -0
  2690. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/global-search.cy.ts +0 -0
  2691. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/patterns.cy.ts +0 -0
  2692. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-api-keys.cy.ts +0 -0
  2693. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-billing.cy.ts +0 -0
  2694. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-layout.cy.ts +0 -0
  2695. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-password.cy.ts +0 -0
  2696. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-profile.cy.ts +0 -0
  2697. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-teams.cy.ts +0 -0
  2698. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/superadmin.cy.ts +0 -0
  2699. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/tasks.cy.ts +0 -0
  2700. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/teams.cy.ts +0 -0
  2701. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-teams.bdd.md +0 -0
  2702. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-teams.cy.ts +0 -0
  2703. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-users.bdd.md +0 -0
  2704. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-users.cy.ts +0 -0
  2705. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/dashboard.bdd.md +0 -0
  2706. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/dashboard.cy.ts +0 -0
  2707. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/subscriptions-overview.bdd.md +0 -0
  2708. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/subscriptions-overview.cy.ts +0 -0
  2709. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +0 -0
  2710. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.bdd.md +0 -0
  2711. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +0 -0
  2712. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/fixtures/entities.json +0 -0
  2713. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/components/DevKeyringPOM.ts +0 -0
  2714. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/components/EntityForm.ts +0 -0
  2715. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/components/EntityList.ts +0 -0
  2716. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/components/TeamSwitcherPOM.ts +0 -0
  2717. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/components/index.ts +0 -0
  2718. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/controllers/BaseAPIController.js +0 -0
  2719. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/controllers/index.js +0 -0
  2720. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/core/AuthPOM.ts +0 -0
  2721. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/core/BasePOM.ts +0 -0
  2722. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +0 -0
  2723. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/core/DashboardEntityPOM.ts +0 -0
  2724. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/core/index.ts +0 -0
  2725. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/PagesPOM.ts +0 -0
  2726. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/PatternsPOM.ts +0 -0
  2727. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/TasksPOM.ts +0 -0
  2728. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/index.ts +0 -0
  2729. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/BillingPOM.ts +0 -0
  2730. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/DashboardPOM.ts +0 -0
  2731. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/DevtoolsPOM.ts +0 -0
  2732. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/PageBuilderPOM.ts +0 -0
  2733. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/PostEditorPOM.ts +0 -0
  2734. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/ScheduledActionsPOM.ts +0 -0
  2735. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/SettingsPOM.ts +0 -0
  2736. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/SuperadminPOM.ts +0 -0
  2737. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/SuperadminTeamRolesPOM.ts +0 -0
  2738. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/features/index.ts +0 -0
  2739. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/helpers/ApiInterceptor.ts +0 -0
  2740. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/index.ts +0 -0
  2741. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/src/selectors.ts +0 -0
  2742. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/support/commands.ts +0 -0
  2743. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/support/doc-commands.ts +0 -0
  2744. /package/dist/templates/{contents/themes → projects}/starter/tests/cypress/support/e2e.ts +0 -0
  2745. /package/{templates/contents/themes → dist/templates/projects}/starter/tests/jest/__mocks__/jose.js +0 -0
  2746. /package/{templates/contents/themes → dist/templates/projects}/starter/tests/jest/__mocks__/next-server.js +0 -0
  2747. /package/dist/templates/{contents/themes → projects}/starter/tests/jest/setup.ts +0 -0
  2748. /package/templates/{contents/plugins → plugins}/starter/plugin/components/ExampleWidget.tsx.template +0 -0
  2749. /package/templates/{contents/plugins → plugins}/starter/plugin/entities/.gitkeep +0 -0
  2750. /package/templates/{contents/plugins → plugins}/starter/plugin/lib/core.ts.template +0 -0
  2751. /package/templates/{contents/plugins → plugins}/starter/plugin/lib/types.ts.template +0 -0
  2752. /package/templates/{contents/plugins → plugins}/starter/plugin/messages/de.json +0 -0
  2753. /package/templates/{contents/plugins → plugins}/starter/plugin/messages/en.json +0 -0
  2754. /package/templates/{contents/plugins → plugins}/starter/plugin/messages/es.json +0 -0
  2755. /package/templates/{contents/plugins → plugins}/starter/plugin/messages/fr.json +0 -0
  2756. /package/templates/{contents/plugins → plugins}/starter/plugin/messages/it.json +0 -0
  2757. /package/templates/{contents/plugins → plugins}/starter/plugin/messages/pt.json +0 -0
  2758. /package/templates/{contents/plugins → plugins}/starter/plugin/migrations/README.md +0 -0
  2759. /package/templates/{contents/plugins → plugins}/starter/plugin/plugin.config.ts.template +0 -0
  2760. /package/templates/{contents/plugins → plugins}/starter/plugin/tests/plugin.test.ts.template +0 -0
  2761. /package/templates/{contents/themes → projects}/starter/README.md +0 -0
  2762. /package/templates/{contents/themes → projects}/starter/about/business.md +0 -0
  2763. /package/templates/{contents/themes → projects}/starter/about/features.json +0 -0
  2764. /package/{dist/templates/contents/themes/starter/public/brand → templates/projects/starter/blocks}/.gitkeep +0 -0
  2765. /package/templates/{contents/themes → projects}/starter/blocks/cta-section/component.tsx +0 -0
  2766. /package/templates/{contents/themes → projects}/starter/blocks/cta-section/fields.ts +0 -0
  2767. /package/templates/{contents/themes → projects}/starter/blocks/cta-section/index.ts +0 -0
  2768. /package/templates/{contents/themes → projects}/starter/blocks/cta-section/schema.ts +0 -0
  2769. /package/templates/{contents/themes → projects}/starter/blocks/cta-section/thumbnail.png +0 -0
  2770. /package/templates/{contents/themes → projects}/starter/blocks/features-grid/component.tsx +0 -0
  2771. /package/templates/{contents/themes → projects}/starter/blocks/features-grid/fields.ts +0 -0
  2772. /package/templates/{contents/themes → projects}/starter/blocks/features-grid/index.ts +0 -0
  2773. /package/templates/{contents/themes → projects}/starter/blocks/features-grid/schema.ts +0 -0
  2774. /package/templates/{contents/themes → projects}/starter/blocks/features-grid/thumbnail.png +0 -0
  2775. /package/templates/{contents/themes → projects}/starter/blocks/hero/component.tsx +0 -0
  2776. /package/templates/{contents/themes → projects}/starter/blocks/hero/fields.ts +0 -0
  2777. /package/templates/{contents/themes → projects}/starter/blocks/hero/index.ts +0 -0
  2778. /package/templates/{contents/themes → projects}/starter/blocks/hero/schema.ts +0 -0
  2779. /package/templates/{contents/themes → projects}/starter/blocks/hero/thumbnail.png +0 -0
  2780. /package/templates/{contents/themes → projects}/starter/blocks/testimonials/component.tsx +0 -0
  2781. /package/templates/{contents/themes → projects}/starter/blocks/testimonials/fields.ts +0 -0
  2782. /package/templates/{contents/themes → projects}/starter/blocks/testimonials/index.ts +0 -0
  2783. /package/templates/{contents/themes → projects}/starter/blocks/testimonials/schema.ts +0 -0
  2784. /package/templates/{contents/themes → projects}/starter/blocks/testimonials/thumbnail.png +0 -0
  2785. /package/templates/{contents/themes → projects}/starter/blocks/text-content/component.tsx +0 -0
  2786. /package/templates/{contents/themes → projects}/starter/blocks/text-content/fields.ts +0 -0
  2787. /package/templates/{contents/themes → projects}/starter/blocks/text-content/index.ts +0 -0
  2788. /package/templates/{contents/themes → projects}/starter/blocks/text-content/schema.ts +0 -0
  2789. /package/templates/{contents/themes → projects}/starter/blocks/text-content/thumbnail.png +0 -0
  2790. /package/templates/{contents/themes → projects}/starter/components/.gitkeep +0 -0
  2791. /package/templates/{contents/themes → projects}/starter/components/analytics/RecentActivity.tsx +0 -0
  2792. /package/templates/{contents/themes → projects}/starter/components/analytics/StatsCard.tsx +0 -0
  2793. /package/templates/{contents/themes → projects}/starter/components/analytics/TasksChart.tsx +0 -0
  2794. /package/templates/{contents/themes → projects}/starter/components/analytics/index.ts +0 -0
  2795. /package/templates/{contents/themes → projects}/starter/config/app.config.ts +0 -0
  2796. /package/templates/{contents/themes → projects}/starter/config/billing.config.ts +0 -0
  2797. /package/templates/{contents/themes → projects}/starter/config/dashboard.config.ts +0 -0
  2798. /package/templates/{contents/themes → projects}/starter/config/dev.config.ts +0 -0
  2799. /package/templates/{contents/themes → projects}/starter/config/features.config.ts +0 -0
  2800. /package/templates/{contents/themes → projects}/starter/config/permissions.config.ts +0 -0
  2801. /package/templates/{contents/themes → projects}/starter/config/theme.config.ts +0 -0
  2802. /package/templates/{contents/themes → projects}/starter/docs/public/01-overview/01-introduction.md +0 -0
  2803. /package/templates/{contents/themes → projects}/starter/docs/public/01-overview/02-customization.md +0 -0
  2804. /package/templates/{contents/themes → projects}/starter/docs/superadmin/01-setup/01-configuration.md +0 -0
  2805. /package/templates/{contents/themes → projects}/starter/docs/superadmin/02-entities/01-tasks.md +0 -0
  2806. /package/templates/{contents/themes → projects}/starter/emails/verify-email.ts +0 -0
  2807. /package/templates/{contents/themes → projects}/starter/entities/pages/api/docs.md +0 -0
  2808. /package/templates/{contents/themes → projects}/starter/entities/pages/api/presets.ts +0 -0
  2809. /package/templates/{contents/themes → projects}/starter/entities/pages/messages/en.json +0 -0
  2810. /package/templates/{contents/themes → projects}/starter/entities/pages/messages/es.json +0 -0
  2811. /package/templates/{contents/themes → projects}/starter/entities/pages/migrations/001_pages_table.sql +0 -0
  2812. /package/templates/{contents/themes → projects}/starter/entities/pages/migrations/002_pages_metas.sql +0 -0
  2813. /package/templates/{contents/themes → projects}/starter/entities/pages/migrations/003_add_status.sql +0 -0
  2814. /package/templates/{contents/themes → projects}/starter/entities/pages/pages-management.service.ts +0 -0
  2815. /package/templates/{contents/themes → projects}/starter/entities/pages/pages.fields.ts +0 -0
  2816. /package/templates/{contents/themes → projects}/starter/entities/pages/pages.service.ts +0 -0
  2817. /package/templates/{contents/themes → projects}/starter/entities/pages/pages.types.ts +0 -0
  2818. /package/templates/{contents/themes → projects}/starter/entities/posts/api/docs.md +0 -0
  2819. /package/templates/{contents/themes → projects}/starter/entities/posts/api/presets.ts +0 -0
  2820. /package/templates/{contents/themes → projects}/starter/entities/posts/components/post-header.tsx +0 -0
  2821. /package/templates/{contents/themes → projects}/starter/entities/posts/messages/en.json +0 -0
  2822. /package/templates/{contents/themes → projects}/starter/entities/posts/messages/es.json +0 -0
  2823. /package/templates/{contents/themes → projects}/starter/entities/posts/migrations/001_posts_table.sql +0 -0
  2824. /package/templates/{contents/themes → projects}/starter/entities/posts/migrations/003_add_status.sql +0 -0
  2825. /package/templates/{contents/themes → projects}/starter/entities/posts/migrations/004_entity_taxonomy_relations.sql +0 -0
  2826. /package/templates/{contents/themes → projects}/starter/entities/posts/migrations/006_posts_metas.sql +0 -0
  2827. /package/templates/{contents/themes → projects}/starter/entities/posts/posts.fields.ts +0 -0
  2828. /package/templates/{contents/themes → projects}/starter/entities/posts/posts.service.ts +0 -0
  2829. /package/templates/{contents/themes → projects}/starter/entities/posts/posts.types.ts +0 -0
  2830. /package/templates/{contents/themes → projects}/starter/entities/tasks/api/docs.md +0 -0
  2831. /package/templates/{contents/themes → projects}/starter/entities/tasks/api/presets.ts +0 -0
  2832. /package/templates/{contents/themes → projects}/starter/entities/tasks/messages/de.json +0 -0
  2833. /package/templates/{contents/themes → projects}/starter/entities/tasks/messages/en.json +0 -0
  2834. /package/templates/{contents/themes → projects}/starter/entities/tasks/messages/es.json +0 -0
  2835. /package/templates/{contents/themes → projects}/starter/entities/tasks/messages/fr.json +0 -0
  2836. /package/templates/{contents/themes → projects}/starter/entities/tasks/messages/it.json +0 -0
  2837. /package/templates/{contents/themes → projects}/starter/entities/tasks/messages/pt.json +0 -0
  2838. /package/templates/{contents/themes → projects}/starter/entities/tasks/migrations/001_tasks_table.sql +0 -0
  2839. /package/templates/{contents/themes → projects}/starter/entities/tasks/migrations/002_task_metas.sql +0 -0
  2840. /package/templates/{contents/themes → projects}/starter/entities/tasks/tasks.fields.ts +0 -0
  2841. /package/templates/{contents/themes → projects}/starter/entities/tasks/tasks.service.ts +0 -0
  2842. /package/templates/{contents/themes → projects}/starter/entities/tasks/tasks.types.ts +0 -0
  2843. /package/templates/{contents/themes → projects}/starter/lib/.gitkeep +0 -0
  2844. /package/templates/{contents/themes → projects}/starter/lib/hooks/index.ts +0 -0
  2845. /package/templates/{contents/themes → projects}/starter/lib/hooks/useAnalyticsData.ts +0 -0
  2846. /package/templates/{contents/themes → projects}/starter/lib/hooks/useTaskStats.ts +0 -0
  2847. /package/templates/{contents/themes → projects}/starter/lib/index.ts +0 -0
  2848. /package/templates/{contents/themes → projects}/starter/lib/selectors.ts +0 -0
  2849. /package/templates/{contents/themes → projects}/starter/lib/utils.ts +0 -0
  2850. /package/templates/{contents/themes → projects}/starter/messages/de/analytics.json +0 -0
  2851. /package/templates/{contents/themes → projects}/starter/messages/de/common.json +0 -0
  2852. /package/templates/{contents/themes → projects}/starter/messages/de/dev.json +0 -0
  2853. /package/templates/{contents/themes → projects}/starter/messages/de/features.json +0 -0
  2854. /package/templates/{contents/themes → projects}/starter/messages/de/home.json +0 -0
  2855. /package/templates/{contents/themes → projects}/starter/messages/de/index.ts +0 -0
  2856. /package/templates/{contents/themes → projects}/starter/messages/de/navigation.json +0 -0
  2857. /package/templates/{contents/themes → projects}/starter/messages/de/public.json +0 -0
  2858. /package/templates/{contents/themes → projects}/starter/messages/en/analytics.json +0 -0
  2859. /package/templates/{contents/themes → projects}/starter/messages/en/common.json +0 -0
  2860. /package/templates/{contents/themes → projects}/starter/messages/en/dev.json +0 -0
  2861. /package/templates/{contents/themes → projects}/starter/messages/en/features.json +0 -0
  2862. /package/templates/{contents/themes → projects}/starter/messages/en/home.json +0 -0
  2863. /package/templates/{contents/themes → projects}/starter/messages/en/index.ts +0 -0
  2864. /package/templates/{contents/themes → projects}/starter/messages/en/navigation.json +0 -0
  2865. /package/templates/{contents/themes → projects}/starter/messages/en/public.json +0 -0
  2866. /package/templates/{contents/themes → projects}/starter/messages/es/analytics.json +0 -0
  2867. /package/templates/{contents/themes → projects}/starter/messages/es/common.json +0 -0
  2868. /package/templates/{contents/themes → projects}/starter/messages/es/dev.json +0 -0
  2869. /package/templates/{contents/themes → projects}/starter/messages/es/features.json +0 -0
  2870. /package/templates/{contents/themes → projects}/starter/messages/es/home.json +0 -0
  2871. /package/templates/{contents/themes → projects}/starter/messages/es/index.ts +0 -0
  2872. /package/templates/{contents/themes → projects}/starter/messages/es/navigation.json +0 -0
  2873. /package/templates/{contents/themes → projects}/starter/messages/es/public.json +0 -0
  2874. /package/templates/{contents/themes → projects}/starter/messages/fr/analytics.json +0 -0
  2875. /package/templates/{contents/themes → projects}/starter/messages/fr/common.json +0 -0
  2876. /package/templates/{contents/themes → projects}/starter/messages/fr/dev.json +0 -0
  2877. /package/templates/{contents/themes → projects}/starter/messages/fr/features.json +0 -0
  2878. /package/templates/{contents/themes → projects}/starter/messages/fr/home.json +0 -0
  2879. /package/templates/{contents/themes → projects}/starter/messages/fr/index.ts +0 -0
  2880. /package/templates/{contents/themes → projects}/starter/messages/fr/navigation.json +0 -0
  2881. /package/templates/{contents/themes → projects}/starter/messages/fr/public.json +0 -0
  2882. /package/templates/{contents/themes → projects}/starter/messages/it/analytics.json +0 -0
  2883. /package/templates/{contents/themes → projects}/starter/messages/it/common.json +0 -0
  2884. /package/templates/{contents/themes → projects}/starter/messages/it/dev.json +0 -0
  2885. /package/templates/{contents/themes → projects}/starter/messages/it/features.json +0 -0
  2886. /package/templates/{contents/themes → projects}/starter/messages/it/home.json +0 -0
  2887. /package/templates/{contents/themes → projects}/starter/messages/it/index.ts +0 -0
  2888. /package/templates/{contents/themes → projects}/starter/messages/it/navigation.json +0 -0
  2889. /package/templates/{contents/themes → projects}/starter/messages/pt/analytics.json +0 -0
  2890. /package/templates/{contents/themes → projects}/starter/messages/pt/common.json +0 -0
  2891. /package/templates/{contents/themes → projects}/starter/messages/pt/dev.json +0 -0
  2892. /package/templates/{contents/themes → projects}/starter/messages/pt/features.json +0 -0
  2893. /package/templates/{contents/themes → projects}/starter/messages/pt/home.json +0 -0
  2894. /package/templates/{contents/themes → projects}/starter/messages/pt/index.ts +0 -0
  2895. /package/templates/{contents/themes → projects}/starter/messages/pt/navigation.json +0 -0
  2896. /package/templates/{contents/themes → projects}/starter/migrations/README.md +0 -0
  2897. /package/templates/{contents/plugins → projects/starter/public/brand}/.gitkeep +0 -0
  2898. /package/templates/{contents/themes → projects}/starter/styles/components.css +0 -0
  2899. /package/templates/{contents/themes → projects}/starter/templates/(public)/layout.tsx +0 -0
  2900. /package/templates/{contents/themes → projects}/starter/templates/(public)/support/page.tsx +0 -0
  2901. /package/templates/{contents/themes → projects}/starter/templates/dashboard/analytics/loading.tsx +0 -0
  2902. /package/templates/{contents/themes → projects}/starter/templates/dashboard/analytics/page.tsx +0 -0
  2903. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/access.bdd.md +0 -0
  2904. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +0 -0
  2905. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/navigation.bdd.md +0 -0
  2906. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/navigation.cy.ts +0 -0
  2907. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/pages.bdd.md +0 -0
  2908. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/devtools/pages.cy.ts +0 -0
  2909. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/auth.bdd.md +0 -0
  2910. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/auth.cy.ts +0 -0
  2911. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/billing.bdd.md +0 -0
  2912. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/billing.cy.ts +0 -0
  2913. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/block-editor.cy.ts +0 -0
  2914. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-container.cy.ts +0 -0
  2915. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-mobile.bdd.md +0 -0
  2916. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-mobile.cy.ts +0 -0
  2917. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-navigation.cy.ts +0 -0
  2918. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.cy.ts +0 -0
  2919. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/dashboard-topnav.cy.ts +0 -0
  2920. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/devtools.bdd.md +0 -0
  2921. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/devtools.cy.ts +0 -0
  2922. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/global-search.bdd.md +0 -0
  2923. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/global-search.cy.ts +0 -0
  2924. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/patterns.cy.ts +0 -0
  2925. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-api-keys.cy.ts +0 -0
  2926. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-billing.cy.ts +0 -0
  2927. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-layout.cy.ts +0 -0
  2928. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-password.cy.ts +0 -0
  2929. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-profile.cy.ts +0 -0
  2930. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/settings-teams.cy.ts +0 -0
  2931. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/superadmin.cy.ts +0 -0
  2932. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/tasks.cy.ts +0 -0
  2933. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/selectors/teams.cy.ts +0 -0
  2934. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-teams.bdd.md +0 -0
  2935. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-teams.cy.ts +0 -0
  2936. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-users.bdd.md +0 -0
  2937. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/all-users.cy.ts +0 -0
  2938. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/dashboard.bdd.md +0 -0
  2939. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/dashboard.cy.ts +0 -0
  2940. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/subscriptions-overview.bdd.md +0 -0
  2941. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/_utils/superadmin/subscriptions-overview.cy.ts +0 -0
  2942. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +0 -0
  2943. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.bdd.md +0 -0
  2944. /package/templates/{contents/themes → projects}/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +0 -0
  2945. /package/templates/{contents/themes → projects}/starter/tests/cypress/fixtures/entities.json +0 -0
  2946. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/components/DevKeyringPOM.ts +0 -0
  2947. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/components/EntityForm.ts +0 -0
  2948. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/components/EntityList.ts +0 -0
  2949. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/components/TeamSwitcherPOM.ts +0 -0
  2950. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/components/index.ts +0 -0
  2951. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/controllers/BaseAPIController.js +0 -0
  2952. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/controllers/index.js +0 -0
  2953. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/core/AuthPOM.ts +0 -0
  2954. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/core/BasePOM.ts +0 -0
  2955. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +0 -0
  2956. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/core/DashboardEntityPOM.ts +0 -0
  2957. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/core/index.ts +0 -0
  2958. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/PagesPOM.ts +0 -0
  2959. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/PatternsPOM.ts +0 -0
  2960. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/TasksPOM.ts +0 -0
  2961. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/entities/index.ts +0 -0
  2962. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/BillingPOM.ts +0 -0
  2963. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/DashboardPOM.ts +0 -0
  2964. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/DevtoolsPOM.ts +0 -0
  2965. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/PageBuilderPOM.ts +0 -0
  2966. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/PostEditorPOM.ts +0 -0
  2967. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/ScheduledActionsPOM.ts +0 -0
  2968. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/SettingsPOM.ts +0 -0
  2969. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/SuperadminPOM.ts +0 -0
  2970. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/SuperadminTeamRolesPOM.ts +0 -0
  2971. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/features/index.ts +0 -0
  2972. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/helpers/ApiInterceptor.ts +0 -0
  2973. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/index.ts +0 -0
  2974. /package/templates/{contents/themes → projects}/starter/tests/cypress/src/selectors.ts +0 -0
  2975. /package/templates/{contents/themes → projects}/starter/tests/cypress/support/commands.ts +0 -0
  2976. /package/templates/{contents/themes → projects}/starter/tests/cypress/support/doc-commands.ts +0 -0
  2977. /package/templates/{contents/themes → projects}/starter/tests/cypress/support/e2e.ts +0 -0
  2978. /package/templates/{contents/themes → projects}/starter/tests/jest/setup.ts +0 -0
@@ -0,0 +1,1030 @@
1
+ import assert from 'node:assert/strict'
2
+ import { mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from 'node:fs'
3
+ import { tmpdir } from 'node:os'
4
+ import { dirname, join, relative, resolve } from 'node:path'
5
+ import test from 'node:test'
6
+
7
+ import { discoverPlugins } from '../discovery/plugins.mjs'
8
+ import { mergeEntities } from '../discovery/all-entities.mjs'
9
+ import {
10
+ LEGACY_CAPABILITIES,
11
+ PLUGIN_DIAGNOSTICS,
12
+ CLIENT_SAFE_CORE_API,
13
+ PluginCapabilityError,
14
+ assertNoPluginCollisions,
15
+ capabilitiesOf,
16
+ checkPluginContributions,
17
+ exportsTarget,
18
+ pluginCollisions,
19
+ pluginsFor,
20
+ readPluginDeclaration,
21
+ serverOnlySpecifier,
22
+ withDeclaredCapabilities,
23
+ } from '../discovery/plugin-capabilities.mjs'
24
+ import { loadTypeScriptFor } from '../shared/typescript-compiler.mjs'
25
+ import { generatePluginCatalog } from '../generators/plugin-catalog.mjs'
26
+ import { generatePluginRegistry, generatePluginRegistryClient } from '../generators/plugin-registry.mjs'
27
+ import { planHost } from '../host/plan.mjs'
28
+ import { PrepareError, renderHostFiles } from '../host/prepare.mjs'
29
+
30
+ const PAGE = 'export default function Page() { return null }\n'
31
+ const ROUTE = 'export async function GET() { return Response.json({}) }\n'
32
+
33
+ function project(files) {
34
+ const root = mkdtempSync(join(tmpdir(), 'nextspark-plugin-caps-'))
35
+ for (const [path, content] of Object.entries(files)) {
36
+ mkdirSync(dirname(join(root, path)), { recursive: true })
37
+ writeFileSync(join(root, path), content)
38
+ }
39
+ return { root, cleanup: () => rmSync(root, { recursive: true, force: true }) }
40
+ }
41
+
42
+ const config = (name, capabilities) =>
43
+ `import { definePlugin } from '@nextsparkjs/core/types/plugin'\nexport const ${name}PluginConfig = definePlugin({ name: '${name}', capabilities: ${capabilities} })\nexport default ${name}PluginConfig\n`
44
+
45
+ const legacyConfig = name => `export const ${name}PluginConfig = { name: '${name}', displayName: '${name}', version: '1.0.0', enabled: true }\n`
46
+
47
+ const sourceOf = (root, name) => ({ name, sourceDir: join(root, 'plugins', name), importBase: `@/plugins/${name}`, kind: 'local' })
48
+
49
+ async function check(files, name = 'demo') {
50
+ const { root, cleanup } = project(files)
51
+ try {
52
+ const ts = await loadTypeScriptFor(root)
53
+ const declaration = readPluginDeclaration(ts, { plugin: name, configFile: join(root, 'plugins', name, 'plugin.config.ts'), exportName: `${name}PluginConfig` })
54
+ const plugin = { ...sourceOf(root, name), capabilities: declaration.capabilities ?? [...LEGACY_CAPABILITIES] }
55
+ return { declaration, diagnostics: checkPluginContributions(ts, { plugin, plugins: [plugin], projectRoot: root }), root }
56
+ } finally {
57
+ cleanup()
58
+ }
59
+ }
60
+
61
+ const codes = diagnostics => diagnostics.map(d => d.code)
62
+
63
+ test('definePlugin declarations are read statically', async () => {
64
+ const cases = [
65
+ [config('demo', "['server', 'web']"), true, ['server', 'web']],
66
+ [config('demo', "['web', 'web', 'mobile']"), true, ['web', 'mobile']],
67
+ [legacyConfig('demo'), false, null],
68
+ ["export const demoPluginConfig = { name: 'demo', capabilities: ['build'] }\n", true, ['build']],
69
+ ["export const demoPluginConfig: PluginConfig = definePlugin({ name: 'demo', capabilities: ['server'] as const })\n", true, ['server']],
70
+ ]
71
+ for (const [source, declared, expected] of cases) {
72
+ const { declaration } = await check({ 'plugins/demo/plugin.config.ts': source })
73
+ assert.equal(declaration.declared, declared, source)
74
+ assert.deepEqual(declaration.capabilities, expected, source)
75
+ assert.deepEqual(declaration.diagnostics, [])
76
+ }
77
+ })
78
+
79
+ test('an invalid declaration is a diagnostic naming the plugin', async () => {
80
+ for (const capabilities of ["['edge']", '[]', 'CAPS', "[...OTHERS, 'web']", '"server"']) {
81
+ const { declaration } = await check({ 'plugins/demo/plugin.config.ts': `const CAPS = ['web']\nexport const demoPluginConfig = definePlugin({ name: 'demo', capabilities: ${capabilities} })\n` })
82
+ assert.equal(declaration.diagnostics.length, 1, capabilities)
83
+ assert.equal(declaration.diagnostics[0].code, PLUGIN_DIAGNOSTICS.INVALID)
84
+ assert.equal(declaration.diagnostics[0].plugin, 'demo')
85
+ assert.match(declaration.diagnostics[0].message, /plugins\/demo\/plugin\.config\.ts/)
86
+ }
87
+ const { declaration } = await check({ 'plugins/demo/plugin.config.ts': "export const demoPluginConfig = definePlugin({ name: 'demo' })\n" })
88
+ assert.match(declaration.diagnostics[0].message, /requires a literal `capabilities` array/)
89
+ })
90
+
91
+ test('a legacy plugin is server + web + build and a declared one only what it lists', () => {
92
+ assert.deepEqual(capabilitiesOf({}), ['server', 'web', 'build'])
93
+ assert.deepEqual(capabilitiesOf({ capabilities: ['web'] }), ['web'])
94
+ const plugins = [{ name: 'a', capabilities: ['web'] }, { name: 'b', capabilities: ['server', 'build'] }, { name: 'c' }]
95
+ assert.deepEqual(pluginsFor(plugins, 'server').map(p => p.name), ['b', 'c'])
96
+ assert.deepEqual(pluginsFor(plugins, 'web').map(p => p.name), ['a', 'c'])
97
+ assert.deepEqual(pluginsFor(plugins, 'mobile').map(p => p.name), [])
98
+ })
99
+
100
+ test('a file in a surface the plugin did not declare names the plugin, the capability and the file', async () => {
101
+ const cases = [
102
+ ['web', { 'plugins/demo/api/hello/route.ts': ROUTE }, 'server', 'api/hello/route.ts'],
103
+ ['server', { 'plugins/demo/templates/hello/page.tsx': PAGE }, 'web', 'templates/hello/page.tsx'],
104
+ ['server', { 'plugins/demo/components/Widget.tsx': PAGE }, 'web', 'components/Widget.tsx'],
105
+ ['server', { 'plugins/demo/lib/panel.tsx': `'use client'\n${PAGE}` }, 'web', 'lib/panel.tsx'],
106
+ ['server', { 'plugins/demo/messages/en.json': '{}' }, 'web', 'messages/en.json'],
107
+ ['web', { 'plugins/demo/entities/tasks/tasks.config.ts': 'export const tasksConfig = {}\n' }, 'server', 'entities/tasks/tasks.config.ts'],
108
+ ['web', { 'plugins/demo/plugin.pages.server.ts': 'export const devtoolsPage = null\n' }, 'server', 'plugin.pages.server.ts'],
109
+ ['server', { 'plugins/demo/mobile/index.ts': 'export const screen = 1\n' }, 'mobile', 'mobile/index.ts'],
110
+ ['server', { 'plugins/demo/build/codemod.ts': 'export const run = 1\n' }, 'build', 'build/codemod.ts'],
111
+ ]
112
+ for (const [declared, files, capability, file] of cases) {
113
+ const { diagnostics } = await check({ 'plugins/demo/plugin.config.ts': config('demo', `['${declared}']`), ...files })
114
+ const hit = diagnostics.filter(d => d.code === PLUGIN_DIAGNOSTICS.UNDECLARED)
115
+ assert.equal(hit.length, 1, `${declared} + ${file}: ${JSON.stringify(diagnostics)}`)
116
+ assert.equal(hit[0].plugin, 'demo')
117
+ assert.equal(hit[0].capability, capability)
118
+ assert.equal(hit[0].file, file)
119
+ assert.match(hit[0].message, new RegExp(`plugins/demo/${file.replace(/[.]/g, '\\.')}`))
120
+ assert.match(hit[0].message, new RegExp(`"${capability}"`))
121
+ }
122
+ })
123
+
124
+ test('declaring the capability makes the same files valid; tests, docs and node_modules are not contributions', async () => {
125
+ const { diagnostics } = await check({
126
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'web', 'build', 'mobile']"),
127
+ 'plugins/demo/api/hello/route.ts': ROUTE,
128
+ 'plugins/demo/templates/hello/page.tsx': PAGE,
129
+ 'plugins/demo/mobile/index.ts': 'export const screen = 1\n',
130
+ 'plugins/demo/build/codemod.ts': 'export const run = 1\n',
131
+ })
132
+ assert.deepEqual(diagnostics, [])
133
+ const quiet = await check({
134
+ 'plugins/demo/plugin.config.ts': config('demo', "['server']"),
135
+ 'plugins/demo/api/hello/route.ts': ROUTE,
136
+ 'plugins/demo/__tests__/panel.test.tsx': `'use client'\n${PAGE}`,
137
+ 'plugins/demo/docs/notes.tsx': `'use client'\n${PAGE}`,
138
+ 'plugins/demo/node_modules/dep/index.js': "'use client'\n",
139
+ 'plugins/demo/lib/panel.test.tsx': `'use client'\n${PAGE}`,
140
+ })
141
+ assert.deepEqual(quiet.diagnostics, [])
142
+ })
143
+
144
+ test('a web entry must not reach server-only code, directly or transitively', async () => {
145
+ const cases = [
146
+ ['a server-only marker', "import 'server-only'\nexport const x = 1\n", /server-only module "server-only"/],
147
+ ['a Node built-in', "import { readFileSync } from 'node:fs'\nexport const x = readFileSync\n", /Node built-in "node:fs"/],
148
+ ['a bare Node built-in', "import path from 'path'\nexport const x = path\n", /Node built-in "path"/],
149
+ ['next/headers', "import { cookies } from 'next/headers'\nexport const x = cookies\n", /"next\/headers"/],
150
+ ['the core database module', "import { queryWithRLS } from '@nextsparkjs/core/lib/db'\nexport const x = queryWithRLS\n", /core\/lib\/db/],
151
+ ]
152
+ for (const [name, serverModule, pattern] of cases) {
153
+ const { diagnostics } = await check({
154
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
155
+ 'plugins/demo/components/Widget.tsx': "import { helper } from '../lib/helper'\nexport default function Widget() { return helper }\n",
156
+ 'plugins/demo/lib/helper.ts': "export { x as helper } from './server-part'\n",
157
+ 'plugins/demo/lib/server-part.ts': serverModule,
158
+ })
159
+ const hit = diagnostics.filter(d => d.code === PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT)
160
+ assert.equal(hit.length, 1, `${name}: ${JSON.stringify(diagnostics)}`)
161
+ assert.equal(hit[0].plugin, 'demo')
162
+ assert.equal(hit[0].capability, 'web')
163
+ assert.equal(hit[0].file, 'plugins/demo/lib/server-part.ts')
164
+ assert.match(hit[0].message, pattern)
165
+ assert.match(hit[0].message, /plugins\/demo\/components\/Widget\.tsx -> plugins\/demo\/lib\/helper\.ts/)
166
+ }
167
+ })
168
+
169
+ test("a web entry importing the plugin's own api/ or *.server module is a violation; type-only imports are not", async () => {
170
+ const { diagnostics } = await check({
171
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'web']"),
172
+ 'plugins/demo/api/hello/route.ts': `${ROUTE}export const shape = 1\n`,
173
+ 'plugins/demo/lib/store.server.ts': 'export const store = {}\n',
174
+ 'plugins/demo/components/Widget.tsx': "import { shape } from '../api/hello/route'\nimport { store } from '../lib/store.server'\nimport type { Thing } from '../lib/types-only'\nimport { type Other } from '../lib/other-types'\nexport default function Widget() { return [shape, store] }\n",
175
+ 'plugins/demo/lib/types-only.ts': "import 'server-only'\nexport type Thing = {}\n",
176
+ 'plugins/demo/lib/other-types.ts': "import 'server-only'\nexport type Other = {}\n",
177
+ })
178
+ const hit = diagnostics.filter(d => d.code === PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT)
179
+ assert.deepEqual(hit.map(d => d.file), ['plugins/demo/api/hello/route.ts', 'plugins/demo/lib/store.server.ts'])
180
+ })
181
+
182
+ test("a 'use client' file and the config of a web plugin are web entries; the config of a server-only plugin is not", async () => {
183
+ const web = await check({
184
+ 'plugins/demo/plugin.config.ts': `import { secret } from './lib/secret'\n${config('demo', "['server', 'web']")}`,
185
+ 'plugins/demo/lib/secret.ts': "import 'server-only'\nexport const secret = 1\n",
186
+ })
187
+ assert.deepEqual(codes(web.diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
188
+ assert.equal(web.diagnostics[0].file, 'plugins/demo/lib/secret.ts')
189
+ const client = await check({
190
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'web']"),
191
+ 'plugins/demo/lib/panel.tsx': "'use client'\nimport { secret } from './secret'\nexport default () => secret\n",
192
+ 'plugins/demo/lib/secret.ts': "import 'server-only'\nexport const secret = 1\n",
193
+ })
194
+ assert.deepEqual(codes(client.diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
195
+ const server = await check({
196
+ 'plugins/demo/plugin.config.ts': `import { secret } from './lib/secret'\n${config('demo', "['server']")}`,
197
+ 'plugins/demo/lib/secret.ts': "import 'server-only'\nexport const secret = 1\n",
198
+ 'plugins/demo/api/hello/route.ts': "import { secret } from '../../lib/secret'\nexport async function GET() { return Response.json({ secret }) }\n",
199
+ })
200
+ assert.deepEqual(server.diagnostics, [])
201
+ })
202
+
203
+ test('a mobile plugin cannot reach server code; a mobile entry over shared code is fine', async () => {
204
+ const bad = await check({
205
+ 'plugins/demo/plugin.config.ts': config('demo', "['mobile']"),
206
+ 'plugins/demo/mobile/index.ts': "import { db } from '../lib/db'\nexport const screen = db\n",
207
+ 'plugins/demo/lib/db.ts': "import { Pool } from 'pg'\nexport const db = Pool\n",
208
+ })
209
+ assert.deepEqual(codes(bad.diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
210
+ assert.equal(bad.diagnostics[0].capability, 'mobile')
211
+ assert.equal(bad.diagnostics[0].file, 'plugins/demo/lib/db.ts')
212
+ const good = await check({
213
+ 'plugins/demo/plugin.config.ts': config('demo', "['mobile']"),
214
+ 'plugins/demo/mobile/index.ts': "import { format } from '../lib/format'\nexport const screen = format\n",
215
+ 'plugins/demo/lib/format.ts': 'export const format = String\n',
216
+ })
217
+ assert.deepEqual(good.diagnostics, [])
218
+ })
219
+
220
+ test('build-only code never enters a runtime bundle', async () => {
221
+ const bad = await check({
222
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'web', 'build']"),
223
+ 'plugins/demo/api/hello/route.ts': "import { generate } from '../../build/generate'\nexport async function GET() { return Response.json(generate()) }\n",
224
+ 'plugins/demo/build/generate.ts': 'export const generate = () => ({})\n',
225
+ 'plugins/demo/components/Widget.tsx': "import { generate } from '../build/generate'\nexport default () => generate()\n",
226
+ })
227
+ const hit = bad.diagnostics.filter(d => d.code === PLUGIN_DIAGNOSTICS.BUILD_IN_RUNTIME)
228
+ assert.equal(hit.length, 1)
229
+ assert.equal(hit[0].capability, 'build')
230
+ assert.equal(hit[0].file, 'plugins/demo/build/generate.ts')
231
+ assert.match(hit[0].message, /plugins\/demo\/(api\/hello\/route\.ts|components\/Widget\.tsx)/)
232
+ const good = await check({
233
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'build']"),
234
+ 'plugins/demo/api/hello/route.ts': ROUTE,
235
+ 'plugins/demo/build/generate.ts': "import { readFileSync } from 'node:fs'\nexport const generate = () => readFileSync\n",
236
+ })
237
+ assert.deepEqual(good.diagnostics, [])
238
+ const buildOnly = await check({
239
+ 'plugins/demo/plugin.config.ts': config('demo', "['build']"),
240
+ 'plugins/demo/build/generate.ts': "import 'server-only'\nexport const generate = 1\n",
241
+ })
242
+ assert.deepEqual(buildOnly.diagnostics, [])
243
+ })
244
+
245
+ test('a plugin reaching another plugin server code from a web entry names both', async () => {
246
+ const { root, cleanup } = project({
247
+ 'plugins/a/plugin.config.ts': config('a', "['web']"),
248
+ 'plugins/a/components/Widget.tsx': "import { store } from '@/plugins/b/lib/store'\nexport default () => store\n",
249
+ 'plugins/b/plugin.config.ts': config('b', "['server']"),
250
+ 'plugins/b/lib/store.ts': "import 'server-only'\nexport const store = {}\n",
251
+ })
252
+ try {
253
+ const ts = await loadTypeScriptFor(root)
254
+ const a = { ...sourceOf(root, 'a'), capabilities: ['web'] }
255
+ const b = { ...sourceOf(root, 'b'), capabilities: ['server'] }
256
+ const diagnostics = checkPluginContributions(ts, { plugin: a, plugins: [a, b] })
257
+ assert.deepEqual(codes(diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
258
+ assert.equal(diagnostics[0].plugin, 'a')
259
+ assert.equal(diagnostics[0].file, 'plugins/b/lib/store.ts')
260
+ assert.match(diagnostics[0].message, /plugins\/a\/components\/Widget\.tsx -> plugins\/b\/lib\/store\.ts/)
261
+ } finally {
262
+ cleanup()
263
+ }
264
+ })
265
+
266
+ const corePackage = extra => ({
267
+ 'node_modules/@nextsparkjs/core/package.json': JSON.stringify({
268
+ name: '@nextsparkjs/core',
269
+ type: 'module',
270
+ exports: { './lib/*': { types: './dist/lib/*.d.ts', import: './dist/lib/*.js' }, './hooks/*': { types: './dist/hooks/*.d.ts', import: './dist/hooks/*.js' } },
271
+ }),
272
+ 'node_modules/@nextsparkjs/core/dist/lib/locale.js': "import { headers } from 'next/headers'\nexport const getLocale = () => headers()\n",
273
+ 'node_modules/@nextsparkjs/core/dist/lib/locale.d.ts': 'export declare const getLocale: () => unknown\n',
274
+ 'node_modules/@nextsparkjs/core/dist/lib/format.js': 'export const format = String\n',
275
+ 'node_modules/@nextsparkjs/core/dist/lib/format.d.ts': 'export declare const format: StringConstructor\n',
276
+ 'node_modules/@nextsparkjs/core/dist/lib/barrel.js': "export * from './locale.js'\nexport { format } from './format.js'\n",
277
+ 'node_modules/@nextsparkjs/core/dist/lib/barrel.d.ts': 'export {}\n',
278
+ ...extra,
279
+ })
280
+
281
+ test('a web entry reaching server-only code through a core module is a violation (transitive, from dist)', async () => {
282
+ const web = "import { getLocale } from '@nextsparkjs/core/lib/locale'\nexport default function Widget() { return getLocale() }\n"
283
+ const { diagnostics } = await check({
284
+ ...corePackage(),
285
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
286
+ 'plugins/demo/components/Widget.tsx': web,
287
+ })
288
+ const hit = diagnostics.filter(d => d.code === PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT)
289
+ assert.equal(hit.length, 1, JSON.stringify(diagnostics))
290
+ assert.equal(hit[0].plugin, 'demo')
291
+ assert.equal(hit[0].capability, 'web')
292
+ assert.match(hit[0].message, /next\/headers/)
293
+ assert.match(hit[0].message, /plugins\/demo\/components\/Widget\.tsx -> @nextsparkjs\/core\/dist\/lib\/locale\.js/)
294
+ // a re-export barrel is followed too
295
+ const barrel = await check({ ...corePackage(), 'plugins/demo/plugin.config.ts': config('demo', "['web']"), 'plugins/demo/components/Widget.tsx': "import { format } from '@nextsparkjs/core/lib/barrel'\nexport default () => format\n" })
296
+ assert.deepEqual(codes(barrel.diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
297
+ // and the same import is fine for a server plugin, and a client-safe core module is fine for web
298
+ const server = await check({ ...corePackage(), 'plugins/demo/plugin.config.ts': config('demo', "['server']"), 'plugins/demo/api/hello/route.ts': "import { getLocale } from '@nextsparkjs/core/lib/locale'\nexport const GET = () => getLocale()\n" })
299
+ assert.deepEqual(server.diagnostics, [])
300
+ const clean = await check({ ...corePackage(), 'plugins/demo/plugin.config.ts': config('demo', "['web']"), 'plugins/demo/components/Widget.tsx': "import { format } from '@nextsparkjs/core/lib/format'\nexport default () => format\n" })
301
+ assert.deepEqual(clean.diagnostics, [])
302
+ })
303
+
304
+ test('core lib/api: the client-safe modules (entities) are fine for a web entry, the rest of lib/api is server-only', async () => {
305
+ const core = corePackage({
306
+ 'node_modules/@nextsparkjs/core/dist/lib/api/entities.js': "export const fetchWithTeam = (...args) => fetch(...args)\n",
307
+ 'node_modules/@nextsparkjs/core/dist/lib/api/entities.d.ts': 'export declare const fetchWithTeam: typeof fetch\n',
308
+ 'node_modules/@nextsparkjs/core/dist/lib/api/auth/dual-auth.js': "import { headers } from 'next/headers'\nexport const authenticate = () => headers()\n",
309
+ 'node_modules/@nextsparkjs/core/dist/lib/api/auth/dual-auth.d.ts': 'export declare const authenticate: () => unknown\n',
310
+ })
311
+ const web = await check({ ...core, 'plugins/demo/plugin.config.ts': config('demo', "['web']"), 'plugins/demo/components/Form.tsx': "import { fetchWithTeam } from '@nextsparkjs/core/lib/api/entities'\nexport default () => fetchWithTeam\n" })
312
+ assert.deepEqual(web.diagnostics, [], 'lib/api/entities imports only client modules')
313
+ // a legacy plugin (no capabilities) is checked as web too: the false positive of the 0.x -> 1.0 migration
314
+ const legacy = await check({ ...core, 'plugins/demo/plugin.config.ts': legacyConfig('demo'), 'plugins/demo/components/Form.tsx': "import { fetchWithTeam } from '@nextsparkjs/core/lib/api/entities'\nexport default () => fetchWithTeam\n" })
315
+ assert.deepEqual(legacy.diagnostics, [])
316
+ const server = await check({ ...core, 'plugins/demo/plugin.config.ts': config('demo', "['web']"), 'plugins/demo/components/Form.tsx': "import { authenticate } from '@nextsparkjs/core/lib/api/auth/dual-auth'\nexport default () => authenticate\n" })
317
+ assert.deepEqual(codes(server.diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
318
+ })
319
+
320
+ test("guard: every core lib/api module a core 'use client' file imports is classified client-safe", () => {
321
+ const src = join(import.meta.dirname, '../../../../src')
322
+ const files = []
323
+ const walk = dir => {
324
+ for (const name of readdirSync(dir)) {
325
+ const path = join(dir, name)
326
+ if (statSync(path).isDirectory()) walk(path)
327
+ else if (/\.tsx?$/.test(name)) files.push(path)
328
+ }
329
+ }
330
+ walk(src)
331
+ const importOf = /(?:^|\n)\s*(?:import|export)\s+(?!type\b)[^'"]*?from\s+['"]([^'"]+)['"]/g
332
+ const found = new Map() // lib/api module -> a client file importing it
333
+ for (const file of files) {
334
+ const text = readFileSync(file, 'utf8')
335
+ if (!/^\s*(?:\/\*[\s\S]*?\*\/\s*|\/\/[^\n]*\n\s*)*['"]use client['"]/.test(text)) continue
336
+ for (const [, specifier] of text.matchAll(importOf)) {
337
+ const module = specifier.startsWith('@nextsparkjs/core/') ? specifier.slice('@nextsparkjs/core/'.length) : specifier.startsWith('.') ? relative(src, resolve(dirname(file), specifier)).split('\\').join('/') : null
338
+ const match = module && /^lib\/api\/(.+)$/.exec(module)
339
+ if (match) found.set(match[1], relative(src, file))
340
+ }
341
+ }
342
+ assert.ok(found.has('entities'), 'the scan finds the imports core\'s client components make (the guard is not vacuous)')
343
+ for (const [module, file] of found) {
344
+ assert.equal(serverOnlySpecifier(`@nextsparkjs/core/lib/api/${module}`), null, `${file} is 'use client' and imports lib/api/${module}: add it to CLIENT_SAFE_CORE_API`)
345
+ assert.ok(CLIENT_SAFE_CORE_API.includes(module))
346
+ }
347
+ assert.ok(serverOnlySpecifier('@nextsparkjs/core/lib/api'), 'the barrel re-exports server code')
348
+ assert.ok(serverOnlySpecifier('@nextsparkjs/core/lib/api/auth/dual-auth'))
349
+ })
350
+
351
+ test('imports resolve with the project tsconfig: paths and baseUrl aliases are followed', async () => {
352
+ const tsconfig = JSON.stringify({ compilerOptions: { baseUrl: '.', paths: { '@demo/*': ['plugins/demo/*'], '~/*': ['shared/*'] } } })
353
+ for (const alias of ['@demo/lib/secret.server', '~/secret', 'shared/secret']) {
354
+ const { diagnostics } = await check({
355
+ 'tsconfig.json': tsconfig,
356
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
357
+ 'plugins/demo/components/Widget.tsx': `import { secret } from '${alias}'\nexport default () => secret\n`,
358
+ 'plugins/demo/lib/secret.server.ts': 'export const secret = 1\n',
359
+ 'shared/secret.ts': "import 'server-only'\nexport const secret = 1\n",
360
+ })
361
+ const hit = diagnostics.filter(d => d.code === PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT)
362
+ assert.equal(hit.length, 1, `${alias}: ${JSON.stringify(diagnostics)}`)
363
+ assert.match(hit[0].file, /secret/)
364
+ }
365
+ const clean = await check({
366
+ 'tsconfig.json': tsconfig,
367
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
368
+ 'plugins/demo/components/Widget.tsx': "import { format } from '@demo/lib/format'\nexport default () => format\n",
369
+ 'plugins/demo/lib/format.ts': 'export const format = String\n',
370
+ })
371
+ assert.deepEqual(clean.diagnostics, [])
372
+ })
373
+
374
+ test('an external npm package is not followed, and next/server is server-only', async () => {
375
+ const { diagnostics } = await check({
376
+ 'node_modules/somepkg/package.json': JSON.stringify({ name: 'somepkg', main: 'index.js' }),
377
+ 'node_modules/somepkg/index.js': "require('fs')\n",
378
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
379
+ 'plugins/demo/components/Widget.tsx': "import x from 'somepkg'\nexport default () => x\n",
380
+ 'plugins/demo/components/Response.tsx': "import { NextResponse } from 'next/server'\nexport default () => NextResponse\n",
381
+ })
382
+ assert.deepEqual(diagnostics.map(d => [d.code, d.file]), [[PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT, 'plugins/demo/components/Response.tsx']])
383
+ assert.match(diagnostics[0].message, /"next\/server"/)
384
+ })
385
+
386
+ test('Route Handlers under templates/ are server entries; pages there stay web', async () => {
387
+ const handler = { 'plugins/demo/templates/data/route.ts': "import { readFileSync } from 'node:fs'\nexport const GET = () => Response.json(readFileSync.name)\n" }
388
+ const serverOnly = await check({ 'plugins/demo/plugin.config.ts': config('demo', "['server']"), ...handler })
389
+ assert.deepEqual(serverOnly.diagnostics, [])
390
+ const webOnly = await check({ 'plugins/demo/plugin.config.ts': config('demo', "['web']"), ...handler })
391
+ assert.deepEqual(webOnly.diagnostics.map(d => [d.code, d.capability, d.file]), [[PLUGIN_DIAGNOSTICS.UNDECLARED, 'server', 'templates/data/route.ts']])
392
+ const both = await check({
393
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'web']"),
394
+ ...handler,
395
+ 'plugins/demo/templates/data/page.tsx': PAGE,
396
+ 'plugins/demo/templates/route.isr.ts': ROUTE,
397
+ })
398
+ assert.deepEqual(both.diagnostics, [])
399
+ const pageOnly = await check({ 'plugins/demo/plugin.config.ts': config('demo', "['server']"), 'plugins/demo/templates/data/page.tsx': PAGE })
400
+ assert.deepEqual(pageOnly.diagnostics.map(d => [d.capability, d.file]), [['web', 'templates/data/page.tsx']])
401
+ const client = await check({
402
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'web']"),
403
+ ...handler,
404
+ 'plugins/demo/components/Widget.tsx': "import { GET } from '../templates/data/route'\nexport default () => GET\n",
405
+ })
406
+ assert.deepEqual(client.diagnostics.map(d => [d.code, d.file]), [[PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT, 'plugins/demo/templates/data/route.ts']])
407
+ })
408
+
409
+ test("a templates/ Route Handler with server-only imports agrees with the host planner (server), not 'web'", () => {
410
+ const { root, cleanup } = project({ 'plugins/demo/templates/data/route.ts': ROUTE })
411
+ try {
412
+ const of = capabilities => ({ name: 'demo', root: join(root, 'plugins/demo'), importBase: '@/plugins/demo', capabilities })
413
+ const planned = planHost({ coreRoutes: [], plugins: [of(['server'])], project: { root: join(root, 'none') } })
414
+ assert.deepEqual(planned.routes.map(route => route.target), ['data/route.ts'])
415
+ assert.deepEqual(planned.diagnostics, [])
416
+ const web = planHost({ coreRoutes: [], plugins: [of(['web'])], project: { root: join(root, 'none') } })
417
+ assert.deepEqual(web.diagnostics.map(d => [d.plugin, d.capability]), [['demo', 'server']])
418
+ } finally {
419
+ cleanup()
420
+ }
421
+ })
422
+
423
+ test('type-only re-exports are not runtime edges', async () => {
424
+ const { diagnostics } = await check({
425
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
426
+ 'plugins/demo/components/Widget.tsx': "import { value } from '../lib/barrel'\nexport default () => value\n",
427
+ 'plugins/demo/lib/barrel.ts': "export { type Secret } from './secret.server'\nexport type { Other } from './secret.server'\nexport { type A, type B } from './secret.server'\nexport const value = 1\n",
428
+ 'plugins/demo/lib/secret.server.ts': "import 'server-only'\nexport type Secret = {}\nexport type Other = {}\nexport type A = {}\nexport type B = {}\n",
429
+ })
430
+ assert.deepEqual(diagnostics, [])
431
+ const mixed = await check({
432
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
433
+ 'plugins/demo/components/Widget.tsx': "import { value } from '../lib/barrel'\nexport default () => value\n",
434
+ 'plugins/demo/lib/barrel.ts': "export { type Secret, secret } from './secret.server'\nexport const value = 1\n",
435
+ 'plugins/demo/lib/secret.server.ts': "export type Secret = {}\nexport const secret = 1\n",
436
+ })
437
+ assert.deepEqual(codes(mixed.diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
438
+ })
439
+
440
+ test('.cts and .mts modules are traversed like any other module', async () => {
441
+ for (const ext of ['cts', 'mts', 'cjs']) {
442
+ const { diagnostics } = await check({
443
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
444
+ 'plugins/demo/components/Widget.tsx': `import { secret } from '../lib/secret.server.${ext}'\nexport default () => secret\n`,
445
+ [`plugins/demo/lib/secret.server.${ext}`]: "import 'server-only'\nexport const secret = 1\n",
446
+ })
447
+ assert.deepEqual(codes(diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT], ext)
448
+ }
449
+ // a plain .cts module (no .server name) that imports server-only, through an extensionless and an index import
450
+ const { diagnostics } = await check({
451
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
452
+ 'plugins/demo/components/Widget.tsx': "import { a } from '../lib/a'\nimport { b } from '../lib/b'\nexport default () => [a, b]\n",
453
+ 'plugins/demo/lib/a.cts': "import 'server-only'\nexport const a = 1\n",
454
+ 'plugins/demo/lib/b/index.cts': "import { readFileSync } from 'node:fs'\nexport const b = readFileSync\n",
455
+ })
456
+ assert.deepEqual(diagnostics.map(d => d.file), ['plugins/demo/lib/a.cts', 'plugins/demo/lib/b/index.cts'])
457
+ // and build-only code behind a .cts
458
+ const build = await check({
459
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'build']"),
460
+ 'plugins/demo/api/hello/route.ts': "import { x } from '../../lib/x.cts'\nexport const GET = () => x\n",
461
+ 'plugins/demo/lib/x.cts': "import { g } from '../build/gen.cts'\nexport const x = g\n",
462
+ 'plugins/demo/build/gen.cts': 'export const g = 1\n',
463
+ })
464
+ assert.deepEqual(codes(build.diagnostics), [PLUGIN_DIAGNOSTICS.BUILD_IN_RUNTIME])
465
+ })
466
+
467
+ test('the project api/ and any route file are server surfaces, reached through a tsconfig alias too', async () => {
468
+ const tsconfig = JSON.stringify({ compilerOptions: { baseUrl: '.', paths: { '@/*': ['./*'] } } })
469
+ for (const target of ['@/api/internal/route', '@/api/internal/helper', '@/lib/thing/route']) {
470
+ const { diagnostics } = await check({
471
+ 'tsconfig.json': tsconfig,
472
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
473
+ 'plugins/demo/components/Widget.tsx': `import { x } from '${target}'\nexport default () => x\n`,
474
+ 'api/internal/route.ts': 'export const x = 1\n',
475
+ 'api/internal/helper.ts': 'export const x = 1\n',
476
+ 'lib/thing/route.ts': 'export const x = 1\n',
477
+ })
478
+ assert.deepEqual(codes(diagnostics), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT], target)
479
+ assert.match(diagnostics[0].message, /Route Handler|project api\//)
480
+ }
481
+ const clean = await check({
482
+ 'tsconfig.json': tsconfig,
483
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
484
+ 'plugins/demo/components/Widget.tsx': "import { x } from '@/lib/util'\nexport default () => x\n",
485
+ 'lib/util.ts': 'export const x = 1\n',
486
+ })
487
+ assert.deepEqual(clean.diagnostics, [])
488
+ })
489
+
490
+ test('an @nextsparkjs package resolves to its runtime exports target, not its types target', async () => {
491
+ const pkg = (exportsField, extra = {}) => ({
492
+ 'node_modules/@nextsparkjs/helper/package.json': JSON.stringify({ name: '@nextsparkjs/helper', type: 'module', exports: exportsField }),
493
+ ...extra,
494
+ })
495
+ const files = {
496
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
497
+ 'plugins/demo/components/Widget.tsx': "import { h } from '@nextsparkjs/helper'\nimport { s } from '@nextsparkjs/helper/sub'\nexport default () => [h, s]\n",
498
+ }
499
+ // types live elsewhere than the runtime file; only the runtime file imports server-only
500
+ const separate = await check({
501
+ ...files,
502
+ ...pkg(
503
+ { '.': { types: './types/index.d.ts', import: './dist/index.js', default: './dist/index.cjs' }, './sub': { types: './types/sub.d.ts', import: './dist/sub.js' } },
504
+ {
505
+ 'node_modules/@nextsparkjs/helper/types/index.d.ts': 'export declare const h: number\n',
506
+ 'node_modules/@nextsparkjs/helper/types/sub.d.ts': 'export declare const s: number\n',
507
+ 'node_modules/@nextsparkjs/helper/dist/index.js': "import 'server-only'\nexport const h = 1\n",
508
+ 'node_modules/@nextsparkjs/helper/dist/sub.js': "import { readFileSync } from 'node:fs'\nexport const s = readFileSync\n",
509
+ }
510
+ ),
511
+ })
512
+ assert.deepEqual(separate.diagnostics.map(d => d.file).sort(), ['@nextsparkjs/helper/dist/index.js', '@nextsparkjs/helper/dist/sub.js'])
513
+ // wildcard exports and a string export; a clean package stays clean
514
+ const clean = await check({
515
+ ...files,
516
+ 'plugins/demo/components/Widget.tsx': "import { h } from '@nextsparkjs/helper'\nimport { s } from '@nextsparkjs/helper/sub'\nexport default () => [h, s]\n",
517
+ ...pkg({ '.': './dist/index.js', './*': { types: './types/*.d.ts', import: './dist/*.js' } }, { 'node_modules/@nextsparkjs/helper/dist/index.js': 'export const h = 1\n', 'node_modules/@nextsparkjs/helper/dist/sub.js': 'export const s = 1\n' }),
518
+ })
519
+ assert.deepEqual(clean.diagnostics, [])
520
+ const wildcard = await check({
521
+ ...files,
522
+ ...pkg({ '.': './dist/index.js', './*': { types: './types/*.d.ts', import: './dist/*.js' } }, { 'node_modules/@nextsparkjs/helper/dist/index.js': 'export const h = 1\n', 'node_modules/@nextsparkjs/helper/dist/sub.js': "import 'server-only'\nexport const s = 1\n" }),
523
+ })
524
+ assert.deepEqual(wildcard.diagnostics.map(d => d.file), ['@nextsparkjs/helper/dist/sub.js'])
525
+ // dist not built in a workspace package: the source stands in
526
+ const unbuilt = await check({
527
+ ...files,
528
+ ...pkg({ '.': { types: './dist/index.d.ts', import: './dist/index.js' }, './sub': './dist/sub.js' }, { 'node_modules/@nextsparkjs/helper/src/index.ts': "import 'server-only'\nexport const h = 1\n", 'node_modules/@nextsparkjs/helper/src/sub.ts': 'export const s = 1\n' }),
529
+ })
530
+ assert.deepEqual(unbuilt.diagnostics.map(d => d.file), ['@nextsparkjs/helper/src/index.ts'])
531
+ })
532
+
533
+ test('package export conditions are resolved per target: web (browser, never node), mobile (react-native first)', async () => {
534
+ const pkg = (exportsField, extra = {}, manifest = {}) => ({
535
+ 'node_modules/@nextsparkjs/helper/package.json': JSON.stringify({ name: '@nextsparkjs/helper', type: 'module', exports: exportsField, ...manifest }),
536
+ ...extra,
537
+ })
538
+ const dist = {
539
+ 'node_modules/@nextsparkjs/helper/dist/server.js': "import { readFileSync } from 'node:fs'\nexport const h = readFileSync\n",
540
+ 'node_modules/@nextsparkjs/helper/dist/clean.js': 'export const h = 1\n',
541
+ 'node_modules/@nextsparkjs/helper/dist/native.js': "import 'server-only'\nexport const h = 1\n",
542
+ }
543
+ const plugin = capability => ({
544
+ 'plugins/demo/plugin.config.ts': config('demo', `['${capability}']`),
545
+ [capability === 'web' ? 'plugins/demo/components/Widget.tsx' : 'plugins/demo/mobile/index.ts']: "import { h } from '@nextsparkjs/helper'\nexport default () => h\n",
546
+ })
547
+ // web: a `browser` export that reaches node:fs is diagnosed (Next selects it)
548
+ const browser = await check({ ...plugin('web'), ...dist, ...pkg({ '.': { browser: './dist/server.js', import: './dist/clean.js' } }) })
549
+ assert.deepEqual(browser.diagnostics.map(d => [d.code, d.file]), [[PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT, '@nextsparkjs/helper/dist/server.js']])
550
+ // web: {node: server, import: clean} is clean (the client build never selects `node`), in either key order
551
+ for (const exportsField of [{ '.': { node: './dist/server.js', import: './dist/clean.js' } }, { '.': { import: './dist/clean.js', node: './dist/server.js' } }, { '.': { node: './dist/server.js', default: './dist/clean.js' } }]) {
552
+ const clean = await check({ ...plugin('web'), ...dist, ...pkg(exportsField) })
553
+ assert.deepEqual(clean.diagnostics, [], JSON.stringify(exportsField))
554
+ }
555
+ // the legacy `browser` field is the web fallback; `main` alone is followed
556
+ const field = await check({ ...plugin('web'), ...dist, ...pkg(undefined, {}, { exports: undefined, main: './dist/clean.js', browser: './dist/server.js' }) })
557
+ assert.deepEqual(field.diagnostics.map(d => d.file), ['@nextsparkjs/helper/dist/server.js'])
558
+ // mobile: `react-native` wins over browser/import/default
559
+ const native = await check({ ...plugin('mobile'), ...dist, ...pkg({ '.': { 'react-native': './dist/native.js', browser: './dist/clean.js', import: './dist/clean.js', default: './dist/clean.js' } }) })
560
+ assert.deepEqual(native.diagnostics.map(d => [d.capability, d.file]), [['mobile', '@nextsparkjs/helper/dist/native.js']])
561
+ const nativeClean = await check({ ...plugin('mobile'), ...dist, ...pkg({ '.': { node: './dist/server.js', 'react-native': './dist/clean.js', default: './dist/server.js' } }) })
562
+ assert.deepEqual(nativeClean.diagnostics, [])
563
+ // the same react-native export is not what a web plugin bundles
564
+ const web = await check({ ...plugin('web'), ...dist, ...pkg({ '.': { 'react-native': './dist/native.js', import: './dist/clean.js' } }) })
565
+ assert.deepEqual(web.diagnostics, [])
566
+ })
567
+
568
+ test('the edge kind picks the export branch: import vs require, per target', async () => {
569
+ const dist = {
570
+ 'node_modules/@nextsparkjs/helper/dist/clean.js': 'export const h = 1\n',
571
+ 'node_modules/@nextsparkjs/helper/dist/bad.cjs': "import 'server-only'\nexport const h = 1\n",
572
+ }
573
+ const pkg = exportsField => ({ 'node_modules/@nextsparkjs/helper/package.json': JSON.stringify({ name: '@nextsparkjs/helper', exports: exportsField }), ...dist })
574
+ const entry = (capability, code) => ({
575
+ 'plugins/demo/plugin.config.ts': config('demo', `['${capability}']`),
576
+ [capability === 'web' ? 'plugins/demo/components/Widget.tsx' : 'plugins/demo/mobile/index.ts']: code,
577
+ })
578
+ const REQUIRE = "const h = require('@nextsparkjs/helper')\nexport default () => h\n"
579
+ const IMPORT = "import { h } from '@nextsparkjs/helper'\nexport default () => h\n"
580
+ const DYNAMIC = "export default () => import('@nextsparkjs/helper')\n"
581
+ const EQUALS = "import h = require('@nextsparkjs/helper')\nexport default () => h\n"
582
+ const files = diagnostics => diagnostics.map(d => d.file)
583
+ // mobile: require selects the require branch (Metro), import the import branch, whatever the key order
584
+ for (const exportsField of [{ '.': { import: './dist/clean.js', require: './dist/bad.cjs' } }, { '.': { require: './dist/bad.cjs', import: './dist/clean.js' } }]) {
585
+ assert.deepEqual(files((await check({ ...entry('mobile', REQUIRE), ...pkg(exportsField) })).diagnostics), ['@nextsparkjs/helper/dist/bad.cjs'], 'mobile require')
586
+ assert.deepEqual(files((await check({ ...entry('mobile', EQUALS), ...pkg(exportsField) })).diagnostics), ['@nextsparkjs/helper/dist/bad.cjs'], 'mobile import = require')
587
+ assert.deepEqual((await check({ ...entry('mobile', IMPORT), ...pkg(exportsField) })).diagnostics, [], 'mobile import (require first is not a false positive)')
588
+ assert.deepEqual((await check({ ...entry('mobile', DYNAMIC), ...pkg(exportsField) })).diagnostics, [], 'mobile dynamic import')
589
+ }
590
+ // web: an ESM import takes the import branch; a require is checked against BOTH (webpack and Turbopack differ)
591
+ const requireBad = { '.': { require: './dist/bad.cjs', import: './dist/clean.js' } }
592
+ const importBad = { '.': { import: './dist/bad.cjs', require: './dist/clean.js' } }
593
+ assert.deepEqual((await check({ ...entry('web', IMPORT), ...pkg(requireBad) })).diagnostics, [], 'web import ignores the require branch')
594
+ assert.deepEqual(files((await check({ ...entry('web', IMPORT), ...pkg(importBad) })).diagnostics), ['@nextsparkjs/helper/dist/bad.cjs'])
595
+ assert.deepEqual(files((await check({ ...entry('web', REQUIRE), ...pkg(requireBad) })).diagnostics), ['@nextsparkjs/helper/dist/bad.cjs'], 'web require: the require branch')
596
+ assert.deepEqual(files((await check({ ...entry('web', REQUIRE), ...pkg(importBad) })).diagnostics), ['@nextsparkjs/helper/dist/bad.cjs'], 'web require: the import branch, conservatively')
597
+ assert.deepEqual((await check({ ...entry('web', REQUIRE), ...pkg({ '.': { import: './dist/clean.js', require: './dist/clean.js' } }) })).diagnostics, [])
598
+ })
599
+
600
+ test('the object form of the legacy browser field replaces modules for client targets', async () => {
601
+ const pkg = (browser, extra = {}, manifest = {}) => ({
602
+ 'node_modules/@nextsparkjs/helper/package.json': JSON.stringify({ name: '@nextsparkjs/helper', main: './server.js', browser, ...manifest }),
603
+ 'node_modules/@nextsparkjs/helper/server.js': "import { readFileSync } from 'node:fs'\nexport const h = readFileSync\n",
604
+ 'node_modules/@nextsparkjs/helper/clean.js': 'export const h = 1\n',
605
+ ...extra,
606
+ })
607
+ const web = { 'plugins/demo/plugin.config.ts': config('demo', "['web']"), 'plugins/demo/components/Widget.tsx': "import { h } from '@nextsparkjs/helper'\nexport default () => h\n" }
608
+ // the package entry replaced by another file, with and without './' and the extension
609
+ for (const key of ['./server.js', 'server.js', './server']) assert.deepEqual((await check({ ...web, ...pkg({ [key]: './clean.js' }) })).diagnostics, [], key)
610
+ // `false` is an empty module
611
+ assert.deepEqual((await check({ ...web, ...pkg({ './server.js': false }) })).diagnostics, [])
612
+ // a relative import inside the package is replaced too
613
+ assert.deepEqual((await check({ ...web, ...pkg({ './lib/node.js': './lib/browser.js' }, {
614
+ 'node_modules/@nextsparkjs/helper/server.js': "export { h } from './lib/node.js'\n",
615
+ 'node_modules/@nextsparkjs/helper/lib/node.js': "import 'server-only'\nexport const h = 1\n",
616
+ 'node_modules/@nextsparkjs/helper/lib/browser.js': 'export const h = 1\n',
617
+ }) })).diagnostics, [])
618
+ // a bare Node built-in emptied by the package's own map is not a server-only edge
619
+ assert.deepEqual((await check({ ...web, ...pkg({ fs: false, 'node:fs': false }) })).diagnostics, [])
620
+ // a map that does not name the entry changes nothing; and the server target ignores the map
621
+ assert.deepEqual((await check({ ...web, ...pkg({ './other.js': './clean.js' }) })).diagnostics.map(d => d.file), ['@nextsparkjs/helper/server.js'])
622
+ const server = await check({
623
+ 'plugins/demo/plugin.config.ts': config('demo', "['server']"),
624
+ 'plugins/demo/api/hello/route.ts': "import { h } from '@nextsparkjs/helper'\nexport const GET = () => h\n",
625
+ ...pkg({ './server.js': './clean.js' }),
626
+ })
627
+ assert.deepEqual(server.diagnostics, [])
628
+ })
629
+
630
+ test('a bare replacement in a browser map is followed as a package import; an unresolvable one is a diagnostic', async () => {
631
+ const helper = (browser, extra = {}) => ({
632
+ 'node_modules/@nextsparkjs/helper/package.json': JSON.stringify({ name: '@nextsparkjs/helper', main: './index.js', browser }),
633
+ 'node_modules/@nextsparkjs/helper/index.js': "import dep from 'safe-dep'\nexport const h = dep\n",
634
+ ...extra,
635
+ })
636
+ const pkgs = {
637
+ 'node_modules/safe-dep/package.json': JSON.stringify({ name: 'safe-dep', main: 'index.js' }),
638
+ 'node_modules/safe-dep/index.js': 'export default 1\n',
639
+ 'node_modules/unsafe-dep/package.json': JSON.stringify({ name: 'unsafe-dep', main: 'index.js' }),
640
+ 'node_modules/unsafe-dep/index.js': "import 'server-only'\nexport default 1\n",
641
+ 'node_modules/@nextsparkjs/unsafe-dep/package.json': JSON.stringify({ name: '@nextsparkjs/unsafe-dep', main: 'index.js' }),
642
+ 'node_modules/@nextsparkjs/unsafe-dep/index.js': "import 'server-only'\nexport default 1\n",
643
+ 'node_modules/@nextsparkjs/safe-dep/package.json': JSON.stringify({ name: '@nextsparkjs/safe-dep', main: 'index.js' }),
644
+ 'node_modules/@nextsparkjs/safe-dep/index.js': 'export default 1\n',
645
+ }
646
+ const entry = capability => ({
647
+ 'plugins/demo/plugin.config.ts': config('demo', `['${capability}']`),
648
+ [capability === 'web' ? 'plugins/demo/components/Widget.tsx' : 'plugins/demo/mobile/index.ts']: "import { h } from '@nextsparkjs/helper'\nexport default () => h\n",
649
+ })
650
+ // the reviewer's case: { "safe-dep": "unsafe-dep" } sends the import to a package that imports server-only (mobile reads third-party entries)
651
+ const mobile = await check({ ...entry('mobile'), ...pkgs, ...helper({ 'safe-dep': 'unsafe-dep' }) })
652
+ assert.deepEqual(mobile.diagnostics.map(d => [d.code, d.capability, d.file]), [[PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT, 'mobile', 'unsafe-dep/index.js']])
653
+ // the same through a workspace-style @nextsparkjs package for web
654
+ const web = await check({ ...entry('web'), ...pkgs, ...helper({ 'safe-dep': '@nextsparkjs/unsafe-dep' }) })
655
+ assert.deepEqual(web.diagnostics.map(d => [d.code, d.capability, d.file]), [[PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT, 'web', '@nextsparkjs/unsafe-dep/index.js']])
656
+ // a bare replacement to a clean package is clean, and so is a relative one
657
+ for (const [name, browser] of [['bare clean', { 'safe-dep': '@nextsparkjs/safe-dep' }], ['relative', { 'safe-dep': './other.js' }]]) {
658
+ const result = await check({ ...entry('web'), ...pkgs, ...helper(browser, { 'node_modules/@nextsparkjs/helper/other.js': 'export default 1\n' }) })
659
+ assert.deepEqual(result.diagnostics, [], name)
660
+ }
661
+ // a replacement to a Node built-in by name is a server-only edge, not a drop
662
+ const builtin = await check({ ...entry('web'), ...pkgs, ...helper({ 'safe-dep': 'node:fs' }) })
663
+ assert.deepEqual(builtin.diagnostics.map(d => d.code), [PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT])
664
+ // an explicit false still drops the edge
665
+ assert.deepEqual((await check({ ...entry('web'), ...pkgs, ...helper({ 'safe-dep': false }) })).diagnostics, [])
666
+ // an unresolvable replacement is a diagnostic naming the map, never a silent drop
667
+ for (const [name, browser, pattern] of [
668
+ ['missing relative', { 'safe-dep': './missing.js' }, /names no file in the package/],
669
+ ['missing package', { 'safe-dep': 'no-such-package' }, /resolves to no file or package/],
670
+ ]) {
671
+ const result = await check({ ...entry('web'), ...pkgs, ...helper(browser) })
672
+ assert.deepEqual(result.diagnostics.map(d => [d.code, d.capability]), [[PLUGIN_DIAGNOSTICS.UNRESOLVED_REPLACEMENT, 'web']], name)
673
+ assert.match(result.diagnostics[0].message, pattern, name)
674
+ assert.match(result.diagnostics[0].message, /@nextsparkjs\/helper\/index\.js/, name)
675
+ }
676
+ // a file replaced by a missing file (the entry mapped away) is a diagnostic too
677
+ const entryMissing = await check({ ...entry('web'), ...pkgs, ...helper({ './index.js': './gone.js' }) })
678
+ assert.deepEqual(entryMissing.diagnostics.map(d => d.code), [PLUGIN_DIAGNOSTICS.UNRESOLVED_REPLACEMENT])
679
+ // a cycle in the map terminates
680
+ const cycle = await check({ ...entry('web'), ...pkgs, ...helper({ 'safe-dep': 'other-dep', 'other-dep': 'safe-dep' }) })
681
+ assert.ok(Array.isArray(cycle.diagnostics))
682
+ })
683
+
684
+ test('TypeScript `import x = require()` is a runtime edge (type-only forms are not)', async () => {
685
+ const { diagnostics } = await check({
686
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
687
+ 'plugins/demo/components/Widget.tsx': "import bridge = require('../lib/bridge.cts')\nexport default () => bridge\n",
688
+ 'plugins/demo/lib/bridge.cts': "import fs = require('node:fs')\nexport = fs\n",
689
+ })
690
+ assert.deepEqual(diagnostics.map(d => [d.code, d.file]), [[PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT, 'plugins/demo/lib/bridge.cts']])
691
+ const server = await check({
692
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
693
+ 'plugins/demo/components/Widget.tsx': "import bridge = require('../lib/store.server.cts')\nexport default () => bridge\n",
694
+ 'plugins/demo/lib/store.server.cts': 'export const store = 1\n',
695
+ })
696
+ assert.equal(server.diagnostics.length, 1)
697
+ const build = await check({
698
+ 'plugins/demo/plugin.config.ts': config('demo', "['server', 'build']"),
699
+ 'plugins/demo/api/hello/route.ts': "import gen = require('../../build/gen.cts')\nexport const GET = () => gen\n",
700
+ 'plugins/demo/build/gen.cts': 'export const g = 1\n',
701
+ })
702
+ assert.deepEqual(codes(build.diagnostics), [PLUGIN_DIAGNOSTICS.BUILD_IN_RUNTIME])
703
+ const typeOnly = await check({
704
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
705
+ 'plugins/demo/components/Widget.tsx': "import type secret = require('../lib/secret.server.cts')\nexport default () => null\n",
706
+ 'plugins/demo/lib/secret.server.cts': "import 'server-only'\nexport = 1\n",
707
+ })
708
+ assert.deepEqual(typeOnly.diagnostics, [])
709
+ })
710
+
711
+ test('mobile also reads third-party entries for `server-only` (Metro does not fail it); web does not', async () => {
712
+ const files = target => ({
713
+ 'node_modules/thirdparty/package.json': JSON.stringify({ name: 'thirdparty', main: 'index.js' }),
714
+ 'node_modules/thirdparty/index.js': "require('./inner')\nmodule.exports = 1\n",
715
+ 'node_modules/thirdparty/inner.js': "require('server-only')\nrequire('node:fs')\n",
716
+ 'plugins/demo/plugin.config.ts': config('demo', `['${target}']`),
717
+ [target === 'web' ? 'plugins/demo/components/Widget.tsx' : 'plugins/demo/mobile/index.ts']: "import x from 'thirdparty'\nexport default () => x\n",
718
+ })
719
+ const mobile = await check(files('mobile'))
720
+ // only `server-only` is reported for third-party code: the Node built-in is Metro's to fail
721
+ assert.equal(mobile.diagnostics.length, 1, JSON.stringify(mobile.diagnostics))
722
+ assert.match(mobile.diagnostics[0].message, /"server-only"/)
723
+ assert.equal(mobile.diagnostics[0].capability, 'mobile')
724
+ const web = await check(files('web'))
725
+ assert.deepEqual(web.diagnostics, [])
726
+ })
727
+
728
+ test('third-party packages are not traversed: the bundlers own that boundary', async () => {
729
+ const { diagnostics } = await check({
730
+ 'node_modules/thirdparty/package.json': JSON.stringify({ name: 'thirdparty', exports: { '.': { import: './index.js' } } }),
731
+ 'node_modules/thirdparty/index.js': "import { readFileSync } from 'node:fs'\nexport default readFileSync\n",
732
+ 'plugins/demo/plugin.config.ts': config('demo', "['web']"),
733
+ 'plugins/demo/components/Widget.tsx': "import x from 'thirdparty'\nexport default () => x\n",
734
+ })
735
+ assert.deepEqual(diagnostics, [])
736
+ })
737
+
738
+ // ---------------------------------------------------------------------------
739
+ // Discovery
740
+ // ---------------------------------------------------------------------------
741
+
742
+ test('discoverPlugins attaches the declared capabilities and treats an undeclared plugin as legacy', async () => {
743
+ const { root, cleanup } = project({
744
+ 'plugins/modern/plugin.config.ts': config('modern', "['server']"),
745
+ 'plugins/modern/api/hello/route.ts': ROUTE,
746
+ 'plugins/old/plugin.config.ts': legacyConfig('old'),
747
+ 'plugins/old/api/hello/route.ts': ROUTE,
748
+ 'plugins/old/components/Widget.tsx': PAGE,
749
+ })
750
+ try {
751
+ const plugins = await discoverPlugins({ projectRoot: root, pluginSources: [sourceOf(root, 'old'), sourceOf(root, 'modern')] })
752
+ const byName = Object.fromEntries(plugins.map(p => [p.name, p]))
753
+ assert.deepEqual(byName.modern.capabilities, ['server'])
754
+ assert.equal(byName.modern.capabilitiesDeclared, true)
755
+ assert.deepEqual(byName.old.capabilities, ['server', 'web', 'build'])
756
+ assert.equal(byName.old.capabilitiesDeclared, false)
757
+ } finally {
758
+ cleanup()
759
+ }
760
+ })
761
+
762
+ test('discoverPlugins fails with every diagnostic, naming plugin, capability and file', async () => {
763
+ const { root, cleanup } = project({
764
+ 'plugins/webby/plugin.config.ts': config('webby', "['web']"),
765
+ 'plugins/webby/api/hello/route.ts': ROUTE,
766
+ 'plugins/webby/components/Widget.tsx': "import 'server-only'\nexport default () => null\n",
767
+ 'plugins/broken/plugin.config.ts': "export const brokenPluginConfig = definePlugin({ name: 'broken', capabilities: ['nope'] })\n",
768
+ })
769
+ try {
770
+ await assert.rejects(
771
+ discoverPlugins({ projectRoot: root, pluginSources: [sourceOf(root, 'webby'), sourceOf(root, 'broken')] }),
772
+ error => {
773
+ assert.ok(error instanceof PluginCapabilityError)
774
+ assert.deepEqual(codes(error.diagnostics).sort(), [PLUGIN_DIAGNOSTICS.INVALID, PLUGIN_DIAGNOSTICS.SERVER_IN_CLIENT, PLUGIN_DIAGNOSTICS.UNDECLARED].sort())
775
+ const undeclared = error.diagnostics.find(d => d.code === PLUGIN_DIAGNOSTICS.UNDECLARED)
776
+ assert.deepEqual([undeclared.plugin, undeclared.capability, undeclared.file], ['webby', 'server', 'api/hello/route.ts'])
777
+ assert.match(error.message, /plugins\/webby\/api\/hello\/route\.ts/)
778
+ return true
779
+ }
780
+ )
781
+ } finally {
782
+ cleanup()
783
+ }
784
+ })
785
+
786
+ // ---------------------------------------------------------------------------
787
+ // Collisions and order independence
788
+ // ---------------------------------------------------------------------------
789
+
790
+ const permutations = items => (items.length <= 1 ? [items] : items.flatMap((item, index) => permutations([...items.slice(0, index), ...items.slice(index + 1)]).map(rest => [item, ...rest])))
791
+
792
+ const entity = (name, plugin) => ({ name, configPath: `@/plugins/${plugin}/entities/${name}/${name}.config`, pluginContext: { pluginName: plugin } })
793
+
794
+ test('the same entity in two plugins is a diagnostic naming both, whatever their order', () => {
795
+ const plugins = [
796
+ { name: 'gamma', sourceDir: '/p/gamma', entities: [entity('tasks', 'gamma'), entity('notes', 'gamma')] },
797
+ { name: 'alpha', sourceDir: '/p/alpha', entities: [entity('tasks', 'alpha')] },
798
+ { name: 'beta', sourceDir: '/p/beta', entities: [entity('notes', 'beta'), entity('unique', 'beta')] },
799
+ ]
800
+ const expected = pluginCollisions(plugins)
801
+ assert.equal(expected.length, 2)
802
+ assert.deepEqual(expected.map(d => d.entity), ['tasks', 'notes'])
803
+ assert.match(expected[0].message, /entity "tasks" is provided by plugins "alpha".*and "gamma"/)
804
+ assert.match(expected[1].message, /entity "notes" is provided by plugins "beta".*and "gamma"/)
805
+ for (const order of permutations(plugins)) {
806
+ assert.deepEqual(pluginCollisions(order), expected, order.map(p => p.name).join(','))
807
+ assert.throws(() => mergeEntities({ plugins: order, coreEntities: [], themes: [] }), error => error instanceof PluginCapabilityError && error.message === new PluginCapabilityError(expected).message)
808
+ }
809
+ })
810
+
811
+ test('core or the project may still replace a plugin entity', () => {
812
+ const plugins = [{ name: 'alpha', sourceDir: '/p/alpha', entities: [{ ...entity('tasks', 'alpha'), source: 'plugin' }] }]
813
+ const merged = mergeEntities({ plugins, coreEntities: [{ name: 'tasks', source: 'core' }], themes: [{ entities: [{ name: 'tasks', source: 'project' }] }] })
814
+ assert.deepEqual(merged.map(e => e.source), ['project'])
815
+ })
816
+
817
+ test('mergeEntities marks a project entity that replaces a core one; a new one or a plugin\'s replaced one is not', () => {
818
+ const plugins = [{ name: 'alpha', sourceDir: '/p/alpha', entities: [{ name: 'tasks', source: 'plugin' }] }]
819
+ const merged = mergeEntities({
820
+ plugins,
821
+ coreEntities: [{ name: 'patterns', source: 'core', isCore: true }],
822
+ themes: [{ entities: [{ name: 'patterns', source: 'theme' }, { name: 'tasks', source: 'theme' }, { name: 'cron', source: 'theme' }] }],
823
+ })
824
+ assert.deepEqual(Object.fromEntries(merged.map(e => [e.name, e.overridesCore === true])), { tasks: false, patterns: true, cron: false })
825
+ })
826
+
827
+ test('the same plugin name twice is a diagnostic naming both sources, whatever their order', () => {
828
+ const plugins = [
829
+ { name: 'dup', sourceDir: '/p/second', entities: [] },
830
+ { name: 'dup', sourceDir: '/p/first', entities: [] },
831
+ { name: 'other', sourceDir: '/p/other', entities: [] },
832
+ ]
833
+ const expected = pluginCollisions(plugins)
834
+ assert.equal(expected.length, 1)
835
+ assert.equal(expected[0].code, PLUGIN_DIAGNOSTICS.NAME_COLLISION)
836
+ assert.match(expected[0].message, /"dup" is provided twice: \/p\/first and \/p\/second/)
837
+ for (const order of permutations(plugins)) assert.deepEqual(pluginCollisions(order), expected)
838
+ assert.throws(() => assertNoPluginCollisions(plugins), PluginCapabilityError)
839
+ assert.doesNotThrow(() => assertNoPluginCollisions([plugins[2]]))
840
+ })
841
+
842
+ test('two plugins serving one web route are a collision naming both, and the order of plugins does not matter', () => {
843
+ const { root, cleanup } = project({
844
+ 'plugins/a/templates/shared/page.tsx': PAGE,
845
+ 'plugins/b/templates/shared/page.tsx': PAGE,
846
+ 'plugins/c/templates/shared/page.tsx': PAGE,
847
+ 'plugins/a/templates/only-a/page.tsx': PAGE,
848
+ })
849
+ try {
850
+ const plugins = ['a', 'b', 'c'].map(name => ({ name, root: join(root, 'plugins', name), importBase: `@/plugins/${name}`, capabilities: ['web'] }))
851
+ const plan = order => planHost({ coreRoutes: [], plugins: order, project: { root: join(root, 'no-project') } })
852
+ const expected = plan(plugins)
853
+ const collisions = expected.diagnostics.filter(d => d.code === 'NS_HOST_ROUTE_COLLISION')
854
+ assert.equal(collisions.length, 2)
855
+ assert.ok(collisions.every(d => d.target === 'shared/page.tsx'))
856
+ assert.match(collisions[0].message, /two plugins provide this route: plugins\/a\/templates\/shared\/page\.tsx and plugins\/b\/templates\/shared\/page\.tsx/)
857
+ for (const order of permutations(plugins)) assert.deepEqual(plan(order), expected, order.map(p => p.name).join(','))
858
+ } finally {
859
+ cleanup()
860
+ }
861
+ })
862
+
863
+ // ---------------------------------------------------------------------------
864
+ // The host planner takes only what a plugin declares
865
+ // ---------------------------------------------------------------------------
866
+
867
+ test('the host planner takes routes only from declared capabilities', () => {
868
+ const { root, cleanup } = project({
869
+ 'plugins/serveronly/api/hello/route.ts': ROUTE,
870
+ 'plugins/serveronly/templates/page-of-server/page.tsx': PAGE,
871
+ 'plugins/webonly/templates/hello/page.tsx': PAGE,
872
+ 'plugins/webonly/api/hello/route.ts': ROUTE,
873
+ 'plugins/buildonly/api/hello/route.ts': ROUTE,
874
+ 'plugins/legacy/api/hello/route.ts': ROUTE,
875
+ 'plugins/legacy/templates/legacy/page.tsx': PAGE,
876
+ 'plugins/both/api/hello/route.ts': ROUTE,
877
+ 'plugins/both/templates/both/page.tsx': PAGE,
878
+ 'plugins/both/templates/both/data/route.ts': ROUTE,
879
+ })
880
+ try {
881
+ const of = (name, capabilities) => ({ name, root: join(root, 'plugins', name), importBase: `@/plugins/${name}`, ...(capabilities ? { capabilities } : {}) })
882
+ const { routes, diagnostics } = planHost({
883
+ coreRoutes: [],
884
+ plugins: [of('serveronly', ['server']), of('webonly', ['web']), of('buildonly', ['build']), of('legacy'), of('both', ['server', 'web'])],
885
+ project: { root: join(root, 'no-project') },
886
+ })
887
+ assert.deepEqual(routes.map(route => route.target), [
888
+ 'api/plugins/both/hello/route.ts',
889
+ 'api/plugins/legacy/hello/route.ts',
890
+ 'api/plugins/serveronly/hello/route.ts',
891
+ 'both/data/route.ts',
892
+ 'both/page.tsx',
893
+ 'legacy/page.tsx',
894
+ 'hello/page.tsx',
895
+ ].sort())
896
+ assert.deepEqual(diagnostics.map(d => [d.code, d.plugin, d.capability, d.file]).sort(), [
897
+ [PLUGIN_DIAGNOSTICS.UNDECLARED, 'buildonly', 'server', 'plugins/buildonly/api/hello/route.ts'],
898
+ [PLUGIN_DIAGNOSTICS.UNDECLARED, 'serveronly', 'web', 'plugins/serveronly/templates/page-of-server/page.tsx'],
899
+ [PLUGIN_DIAGNOSTICS.UNDECLARED, 'webonly', 'server', 'plugins/webonly/api/hello/route.ts'],
900
+ ].sort())
901
+ assert.match(diagnostics.find(d => d.plugin === 'webonly').message, /plugin "webonly" needs the "server" capability, but it declares \[web\]/)
902
+ } finally {
903
+ cleanup()
904
+ }
905
+ })
906
+
907
+ test('withDeclaredCapabilities reads plugin.config.ts for plugins that carry none, and keeps explicit ones', async () => {
908
+ const { root, cleanup } = project({
909
+ 'plugins/a/plugin.config.ts': config('a', "['web']"),
910
+ 'plugins/b/plugin.config.ts': legacyConfig('b'),
911
+ 'plugins/c/plugin.config.ts': "export const cPluginConfig = definePlugin({ name: 'c', capabilities: ['x'] })\n",
912
+ 'plugins/d/README.md': 'no config',
913
+ })
914
+ try {
915
+ const of = name => ({ name, root: join(root, 'plugins', name), importBase: `@/plugins/${name}` })
916
+ const { plugins, diagnostics } = await withDeclaredCapabilities([of('a'), of('b'), of('c'), of('d'), { ...of('e'), capabilities: ['build'] }], { projectRoot: root })
917
+ assert.deepEqual(plugins.map(p => p.capabilities ?? null), [['web'], null, null, null, ['build']])
918
+ assert.deepEqual(diagnostics.map(d => [d.code, d.plugin]), [[PLUGIN_DIAGNOSTICS.INVALID, 'c']])
919
+ } finally {
920
+ cleanup()
921
+ }
922
+ })
923
+
924
+ test('prepare fails generation with the capability diagnostics of a plugin', async () => {
925
+ const { root, cleanup } = project({
926
+ 'plugins/webby/plugin.config.ts': config('webby', "['web']"),
927
+ 'plugins/webby/templates/hello/page.tsx': PAGE,
928
+ 'plugins/webby/api/hello/route.ts': ROUTE,
929
+ })
930
+ try {
931
+ const hostConfig = {
932
+ projectRoot: root,
933
+ loadCoreRoutes: async () => ({ routes: [], hash: 'none' }),
934
+ plugins: [{ name: 'webby', root: join(root, 'plugins/webby'), importBase: '@/plugins/webby' }],
935
+ project: { root: join(root, 'source'), importBase: '@', label: '.' },
936
+ }
937
+ await assert.rejects(renderHostFiles(hostConfig), error => {
938
+ assert.ok(error instanceof PrepareError)
939
+ assert.deepEqual(error.diagnostics.map(d => [d.code, d.plugin, d.capability, d.file]), [[PLUGIN_DIAGNOSTICS.UNDECLARED, 'webby', 'server', 'plugins/webby/api/hello/route.ts']])
940
+ return true
941
+ })
942
+ } finally {
943
+ cleanup()
944
+ }
945
+ })
946
+
947
+ test('the catalog lists every plugin with static metadata; the executable registries keep to their capability', async () => {
948
+ const { root, cleanup } = project({
949
+ 'plugins/webby/plugin.config.ts': "import { definePlugin } from '@nextsparkjs/core/types/plugin'\nexport const webbyPluginConfig = definePlugin({ name: 'webby', displayName: 'Webby', version: '3.1.0', description: 'A web plugin', enabled: process.env.X === '1', capabilities: ['web'] })\n",
950
+ 'plugins/webby/package.json': JSON.stringify({ version: '9.9.9' }),
951
+ 'plugins/webby/components/Widget.tsx': PAGE,
952
+ 'plugins/serv/plugin.config.ts': "import { definePlugin } from '@nextsparkjs/core/types/plugin'\nexport const servPluginConfig = definePlugin({ name: 'serv', capabilities: ['server'], enabled: process.env.SERV === '1' })\n",
953
+ 'plugins/serv/package.json': JSON.stringify({ version: '1.2.3' }),
954
+ 'plugins/serv/api/hello/route.ts': ROUTE,
955
+ 'plugins/tool/plugin.config.ts': config('tool', "['build']"),
956
+ 'plugins/off/plugin.config.ts': "export const offPluginConfig = { name: 'off', displayName: 'Off', version: '1.0.0', enabled: false, capabilities: ['web'] }\n",
957
+ 'plugins/off/components/W.tsx': PAGE,
958
+ })
959
+ try {
960
+ const plugins = await discoverPlugins({ projectRoot: root, outputDir: join(root, 'out'), pluginSources: ['webby', 'serv', 'tool', 'off'].map(name => sourceOf(root, name)) })
961
+ const catalog = generatePluginCatalog(plugins)
962
+ for (const name of ['webby', 'serv', 'tool']) assert.match(catalog, new RegExp(`"${name}": \\{`))
963
+ assert.match(catalog, /displayName: "Webby"/)
964
+ assert.match(catalog, /version: "3\.1\.0"/)
965
+ assert.match(catalog, /description: "A web plugin"/)
966
+ assert.match(catalog, /version: "1\.2\.3"/) // no literal version: the package's
967
+ assert.match(catalog, /capabilities: \["web"\]/)
968
+ const enabledOf = name => catalog.match(new RegExp(`"${name}": \\{[^}]*?enabled: (true|false|null)`))?.[1]
969
+ // a literal is kept, a computed flag is unknown (null), definePlugin without one defaults to true
970
+ assert.deepEqual(['webby', 'serv', 'tool', 'off'].map(enabledOf), ['null', 'null', 'true', 'false'])
971
+ assert.doesNotMatch(catalog, /^import /m)
972
+ const options = { outputDir: join(root, 'out') }
973
+ const server = generatePluginRegistry(pluginsFor(plugins, 'server'), options)
974
+ assert.match(server, /'serv': \{/)
975
+ assert.doesNotMatch(server, /'webby': \{|'tool': \{/)
976
+ const client = generatePluginRegistryClient(pluginsFor(plugins, 'web'), options)
977
+ assert.match(client, /'webby': \{/)
978
+ assert.doesNotMatch(client, /'serv': \{|'tool': \{/)
979
+ // order of discovery does not change the catalog
980
+ assert.equal(generatePluginCatalog([...plugins].reverse()), catalog)
981
+ } finally {
982
+ cleanup()
983
+ }
984
+ })
985
+
986
+ test("package `exports` patterns are ordered as Node's PATTERN_KEY_COMPARE does, not by declaration order", () => {
987
+ const IMPORT = new Set(['import', 'default'])
988
+ const at = (exportsField, subpath) => exportsTarget(exportsField, subpath, IMPORT)
989
+ const both = { './*': { import: './generic/*.js' }, './*.js': { import: './js/*.js' } }
990
+ const reversed = { './*.js': { import: './js/*.js' }, './*': { import: './generic/*.js' } }
991
+ // `./*.js` and `./*` share the base before the star: the longer key is the more specific pattern, whichever comes first
992
+ for (const field of [both, reversed]) {
993
+ assert.equal(at(field, './feature.js'), './js/feature.js')
994
+ assert.equal(at(field, './feature'), './generic/feature.js')
995
+ assert.equal(at(field, './nested/feature.js'), './js/nested/feature.js')
996
+ }
997
+ // a longer base before the star wins over a longer key
998
+ const bases = { './*': './a/*', './lite/*': './b/*', './lite/*.js': './c/*.js' }
999
+ for (const field of [bases, Object.fromEntries(Object.entries(bases).reverse())]) {
1000
+ assert.equal(at(field, './lite/x.js'), './c/x.js')
1001
+ assert.equal(at(field, './lite/x'), './b/x')
1002
+ assert.equal(at(field, './other/x'), './a/other/x')
1003
+ }
1004
+ // an exact key beats every pattern
1005
+ assert.equal(at({ './*': './a/*', './feature.js': './exact.js', './*.js': './b/*.js' }, './feature.js'), './exact.js')
1006
+ // the first pattern in that order that MATCHES decides, even when its conditions select nothing (Node does not fall back)
1007
+ assert.equal(exportsTarget({ './*': { import: './a/*.js' }, './*.js': { require: './b/*.js' } }, './x.js', IMPORT), null)
1008
+ // a key with two stars is not a pattern, a trailing-slash folder key is not a mapping (Node 17+), an empty match is not a match
1009
+ assert.equal(at({ './*/*': './a/*', './lib/': './lib/' }, './lib/x.js'), null)
1010
+ assert.equal(at({ './*': './a/*.js' }, './'), null)
1011
+ // the same subpath through nested conditions and arrays
1012
+ assert.equal(at({ './*.js': [{ require: './n.js' }, { import: './js/*.js' }], './*': './generic/*' }, './f.js'), './js/f.js')
1013
+ })
1014
+
1015
+ test('the more specific wildcard export decides which file a plugin import reaches, in either declaration order', async () => {
1016
+ const PLUGIN = {
1017
+ 'plugins/demo/plugin.config.ts': "export const demoPluginConfig = { name: 'demo', capabilities: ['web'] }\n",
1018
+ 'plugins/demo/components/Widget.tsx': "import { feature } from '@nextsparkjs/helper/feature.js'\nexport default () => feature\n",
1019
+ 'node_modules/@nextsparkjs/helper/dist/generic/feature.js.js': 'export const feature = 1\n',
1020
+ 'node_modules/@nextsparkjs/helper/dist/js/feature.js': "import 'server-only'\nexport const feature = 1\n",
1021
+ }
1022
+ const manifests = [
1023
+ { './*': { import: './dist/generic/*.js' }, './*.js': { import: './dist/js/*.js' } },
1024
+ { './*.js': { import: './dist/js/*.js' }, './*': { import: './dist/generic/*.js' } },
1025
+ ]
1026
+ for (const exportsField of manifests) {
1027
+ const found = await check({ ...PLUGIN, 'node_modules/@nextsparkjs/helper/package.json': JSON.stringify({ name: '@nextsparkjs/helper', exports: exportsField }) })
1028
+ assert.deepEqual(found.diagnostics.map(d => d.file), ['@nextsparkjs/helper/dist/js/feature.js'], JSON.stringify(Object.keys(exportsField)))
1029
+ }
1030
+ })