anhedral 0.13.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/README.md +23 -229
  2. package/assets/patches/audit-deps.mjs +12 -2
  3. package/assets/stack/ai-schema.ts.txt +5 -0
  4. package/assets/stack/ai.ts.txt +30 -0
  5. package/assets/stack/api-index.ts.txt +15 -0
  6. package/assets/stack/auth-features.ts.txt +4 -0
  7. package/assets/stack/auth-journal.json.txt +13 -0
  8. package/assets/stack/auth-migration.sql.txt +53 -0
  9. package/assets/stack/auth-routes.ts.txt +11 -0
  10. package/assets/stack/auth-schema.ts.txt +64 -0
  11. package/assets/stack/auth-snapshot.json.txt +346 -0
  12. package/assets/stack/auth.ts.txt +32 -0
  13. package/assets/stack/billing-mode.ts.txt +8 -0
  14. package/assets/stack/billing-schema.ts.txt +11 -0
  15. package/assets/stack/desktop.rs.txt +21 -0
  16. package/assets/stack/entitlement-guard.ts.txt +32 -0
  17. package/assets/stack/entitlements.ts.txt +8 -0
  18. package/assets/stack/events-schema.ts.txt +12 -0
  19. package/assets/stack/events.ts.txt +59 -0
  20. package/assets/stack/mobile-auth.ts.txt +25 -0
  21. package/assets/stack/mobile-billing.tsx.txt +63 -0
  22. package/assets/stack/mobile-session.tsx.txt +83 -0
  23. package/assets/stack/native-button.tsx.txt +108 -0
  24. package/assets/stack/native-global.css.txt +4 -0
  25. package/assets/stack/native-lib-utils.ts.txt +5 -0
  26. package/assets/stack/native-metro.config.js.txt +6 -0
  27. package/assets/stack/native-nativewind-env.d.ts.txt +1 -0
  28. package/assets/stack/native-tailwind.config.js.txt +73 -0
  29. package/assets/stack/native-text.tsx.txt +89 -0
  30. package/assets/stack/purchases.ts.txt +65 -0
  31. package/assets/stack/revenuecat.ts.txt +88 -0
  32. package/assets/stack/rtc-schema.ts.txt +10 -0
  33. package/assets/stack/rtc.ts.txt +122 -0
  34. package/assets/stack/security.ts.txt +31 -0
  35. package/assets/stack/storage.ts.txt +36 -0
  36. package/assets/stack/stripe.ts.txt +126 -0
  37. package/assets/stack/web-sign-in.tsx.txt +51 -0
  38. package/assets/ui/LICENSE.react-native-reusables +21 -0
  39. package/assets/ui/LICENSE.shadcn +21 -0
  40. package/assets/ui/UPSTREAM.json +39 -0
  41. package/assets/ui/catalog.json +891 -0
  42. package/assets/ui/extensions/registry.json +6 -0
  43. package/assets/ui/native/_controls.tsx +521 -0
  44. package/assets/ui/native/_core.tsx +118 -0
  45. package/assets/ui/native/_data.tsx +200 -0
  46. package/assets/ui/native/_display.tsx +453 -0
  47. package/assets/ui/native/_feedback.tsx +242 -0
  48. package/assets/ui/native/_legacy-dialog.tsx +38 -0
  49. package/assets/ui/native/_motion.tsx +520 -0
  50. package/assets/ui/native/_overlay.tsx +402 -0
  51. package/assets/ui/native/_selection.tsx +366 -0
  52. package/assets/ui/native/accordion.tsx +1 -0
  53. package/assets/ui/native/alert-dialog.tsx +11 -0
  54. package/assets/ui/native/alert.tsx +1 -0
  55. package/assets/ui/native/aspect-ratio.tsx +1 -0
  56. package/assets/ui/native/attachment.tsx +8 -0
  57. package/assets/ui/native/avatar.tsx +8 -0
  58. package/assets/ui/native/badge.tsx +1 -0
  59. package/assets/ui/native/breadcrumb.tsx +9 -0
  60. package/assets/ui/native/bubble.tsx +1 -0
  61. package/assets/ui/native/button-group.tsx +1 -0
  62. package/assets/ui/native/button.tsx +86 -0
  63. package/assets/ui/native/calendar.tsx +170 -0
  64. package/assets/ui/native/card.tsx +44 -0
  65. package/assets/ui/native/carousel.tsx +1 -0
  66. package/assets/ui/native/chart.tsx +193 -0
  67. package/assets/ui/native/checkbox.tsx +1 -0
  68. package/assets/ui/native/code-block.tsx +137 -0
  69. package/assets/ui/native/collapsible.tsx +1 -0
  70. package/assets/ui/native/combobox.tsx +1 -0
  71. package/assets/ui/native/command.tsx +11 -0
  72. package/assets/ui/native/context-menu.tsx +16 -0
  73. package/assets/ui/native/data-table.tsx +1 -0
  74. package/assets/ui/native/date-picker.tsx +43 -0
  75. package/assets/ui/native/dialog.tsx +15 -0
  76. package/assets/ui/native/direction.tsx +1 -0
  77. package/assets/ui/native/drawer.tsx +10 -0
  78. package/assets/ui/native/dropdown-menu.tsx +16 -0
  79. package/assets/ui/native/empty.tsx +8 -0
  80. package/assets/ui/native/field.tsx +13 -0
  81. package/assets/ui/native/hover-card.tsx +1 -0
  82. package/assets/ui/native/input-group.tsx +8 -0
  83. package/assets/ui/native/input-otp.tsx +1 -0
  84. package/assets/ui/native/input.tsx +28 -0
  85. package/assets/ui/native/item.tsx +12 -0
  86. package/assets/ui/native/kbd.tsx +1 -0
  87. package/assets/ui/native/label.tsx +4 -0
  88. package/assets/ui/native/layout.tsx +26 -0
  89. package/assets/ui/native/marker.tsx +1 -0
  90. package/assets/ui/native/menubar.tsx +17 -0
  91. package/assets/ui/native/message-scroller.tsx +6 -0
  92. package/assets/ui/native/message.tsx +10 -0
  93. package/assets/ui/native/native-select.tsx +1 -0
  94. package/assets/ui/native/navigation-menu.tsx +10 -0
  95. package/assets/ui/native/pagination.tsx +9 -0
  96. package/assets/ui/native/popover.tsx +1 -0
  97. package/assets/ui/native/progress.tsx +1 -0
  98. package/assets/ui/native/questionnaire.tsx +130 -0
  99. package/assets/ui/native/radio-group.tsx +1 -0
  100. package/assets/ui/native/registry.json +1103 -0
  101. package/assets/ui/native/resizable.tsx +1 -0
  102. package/assets/ui/native/scroll-area.tsx +1 -0
  103. package/assets/ui/native/select.tsx +11 -0
  104. package/assets/ui/native/separator.tsx +1 -0
  105. package/assets/ui/native/sheet.tsx +10 -0
  106. package/assets/ui/native/sidebar.tsx +22 -0
  107. package/assets/ui/native/skeleton.tsx +1 -0
  108. package/assets/ui/native/slider.tsx +1 -0
  109. package/assets/ui/native/spinner.tsx +1 -0
  110. package/assets/ui/native/switch.tsx +1 -0
  111. package/assets/ui/native/table.tsx +10 -0
  112. package/assets/ui/native/tabs.tsx +1 -0
  113. package/assets/ui/native/text.tsx +20 -0
  114. package/assets/ui/native/textarea.tsx +1 -0
  115. package/assets/ui/native/theme-switcher.tsx +22 -0
  116. package/assets/ui/native/toast.tsx +11 -0
  117. package/assets/ui/native/toggle-group.tsx +1 -0
  118. package/assets/ui/native/toggle.tsx +1 -0
  119. package/assets/ui/native/tooltip.tsx +1 -0
  120. package/assets/ui/native/trace.tsx +20 -0
  121. package/assets/ui/native/typography.tsx +15 -0
  122. package/assets/ui/theme-storage.ts +25 -0
  123. package/assets/ui/theme.tsx +66 -0
  124. package/assets/ui/web/button.tsx +59 -0
  125. package/assets/ui/web/input.tsx +21 -0
  126. package/assets/ui/web/label.tsx +19 -0
  127. package/dist/bin.js +7 -12
  128. package/dist/capabilities.d.ts +4 -33
  129. package/dist/capabilities.js +2 -84
  130. package/dist/capability-catalog.d.ts +83 -0
  131. package/dist/capability-catalog.js +121 -0
  132. package/dist/capability-command.d.ts +3 -0
  133. package/dist/capability-command.js +188 -0
  134. package/dist/capability-editor.d.ts +17 -0
  135. package/dist/capability-editor.js +97 -0
  136. package/dist/capability-recipes.d.ts +4 -0
  137. package/dist/capability-recipes.js +520 -0
  138. package/dist/capability-references.d.ts +4 -0
  139. package/dist/capability-references.js +7 -0
  140. package/dist/cli-commands.d.ts +1 -2
  141. package/dist/cli-commands.js +10 -104
  142. package/dist/cli-output.d.ts +1 -2
  143. package/dist/cli-output.js +6 -251
  144. package/dist/command-schema.js +40 -374
  145. package/dist/dependencies.d.ts +34 -62
  146. package/dist/dependencies.js +112 -199
  147. package/dist/index.d.ts +1 -45
  148. package/dist/index.js +1 -30
  149. package/dist/platforms/mobile.js +29 -139
  150. package/dist/platforms/web.d.ts +3 -0
  151. package/dist/platforms/web.js +251 -0
  152. package/dist/project-config.d.ts +2 -13
  153. package/dist/project-config.js +10 -83
  154. package/dist/registry/context.js +0 -1
  155. package/dist/registry/options.js +6 -40
  156. package/dist/registry/resolve.d.ts +3 -4
  157. package/dist/registry/resolve.js +18 -108
  158. package/dist/registry/types.d.ts +1 -7
  159. package/dist/registry/usage.js +3 -9
  160. package/dist/runtime-policy.d.ts +0 -2
  161. package/dist/runtime-policy.js +0 -16
  162. package/dist/scaffold/backend.d.ts +0 -4
  163. package/dist/scaffold/backend.js +1 -189
  164. package/dist/scaffold/bootstrap.d.ts +2 -3
  165. package/dist/scaffold/bootstrap.js +37 -43
  166. package/dist/scaffold/compose.js +2 -14
  167. package/dist/scaffold/database.d.ts +1 -1
  168. package/dist/scaffold/database.js +19 -126
  169. package/dist/scaffold/documentation.d.ts +0 -1
  170. package/dist/scaffold/documentation.js +82 -84
  171. package/dist/scaffold/expo-runtime.d.ts +2 -2
  172. package/dist/scaffold/expo-runtime.js +9 -101
  173. package/dist/scaffold/native-ui.d.ts +2 -0
  174. package/dist/scaffold/native-ui.js +74 -0
  175. package/dist/scaffold/stack-documentation.d.ts +0 -1
  176. package/dist/scaffold/stack-documentation.js +3 -49
  177. package/dist/scaffold/storage.d.ts +2 -0
  178. package/dist/scaffold/storage.js +21 -0
  179. package/dist/scaffold/styling.d.ts +1 -1
  180. package/dist/scaffold/styling.js +20 -28
  181. package/dist/scaffold/workspace.js +63 -199
  182. package/dist/stack-registry.d.ts +2 -58
  183. package/dist/stack-registry.js +22 -446
  184. package/dist/standard.js +7 -24
  185. package/dist/ui-catalog.d.ts +26 -0
  186. package/dist/ui-catalog.js +31 -0
  187. package/dist/ui-command.d.ts +3 -0
  188. package/dist/ui-command.js +219 -0
  189. package/dist/ui-project.d.ts +22 -0
  190. package/dist/ui-project.js +110 -0
  191. package/dist/version.d.ts +1 -1
  192. package/dist/version.js +1 -1
  193. package/docs/anhedral-stack.md +4 -119
  194. package/docs/capabilities.md +110 -0
  195. package/docs/native-ui.md +102 -0
  196. package/docs/software-factory.md +16 -577
  197. package/docs/stack-standard.md +11 -307
  198. package/docs/ui.md +33 -0
  199. package/docs/verification.md +511 -0
  200. package/package.json +26 -27
  201. package/dist/access.d.ts +0 -10
  202. package/dist/access.js +0 -93
  203. package/dist/auth-schema-snapshot.d.ts +0 -346
  204. package/dist/auth-schema-snapshot.js +0 -347
  205. package/dist/auth-schema.d.ts +0 -1
  206. package/dist/auth-schema.js +0 -57
  207. package/dist/capability-contract.d.ts +0 -47
  208. package/dist/capability-contract.js +0 -168
  209. package/dist/catalog-model.d.ts +0 -24
  210. package/dist/catalog-model.js +0 -1
  211. package/dist/catalog-registration.d.ts +0 -16
  212. package/dist/catalog-registration.js +0 -22
  213. package/dist/catalog-snapshot.d.ts +0 -5
  214. package/dist/catalog-snapshot.js +0 -97
  215. package/dist/cli-delivery.d.ts +0 -3
  216. package/dist/cli-delivery.js +0 -172
  217. package/dist/cloudflare.d.ts +0 -25
  218. package/dist/cloudflare.js +0 -226
  219. package/dist/delivery-evidence.d.ts +0 -62
  220. package/dist/delivery-evidence.js +0 -186
  221. package/dist/delivery.d.ts +0 -88
  222. package/dist/delivery.js +0 -570
  223. package/dist/inspector-model.d.ts +0 -123
  224. package/dist/inspector-model.js +0 -1
  225. package/dist/integration-service-readers.d.ts +0 -13
  226. package/dist/integration-service-readers.js +0 -173
  227. package/dist/lifecycle-model.d.ts +0 -15
  228. package/dist/lifecycle-model.js +0 -20
  229. package/dist/lifecycle.d.ts +0 -11
  230. package/dist/lifecycle.js +0 -91
  231. package/dist/management.d.ts +0 -3
  232. package/dist/management.js +0 -47
  233. package/dist/mobile-delivery.d.ts +0 -77
  234. package/dist/mobile-delivery.js +0 -366
  235. package/dist/neon-service-data.d.ts +0 -8
  236. package/dist/neon-service-data.js +0 -117
  237. package/dist/platforms/desktop.d.ts +0 -2
  238. package/dist/platforms/desktop.js +0 -415
  239. package/dist/platforms/extension.d.ts +0 -2
  240. package/dist/platforms/extension.js +0 -328
  241. package/dist/project-catalog.d.ts +0 -41
  242. package/dist/project-catalog.js +0 -288
  243. package/dist/project-inspector.d.ts +0 -4
  244. package/dist/project-inspector.js +0 -702
  245. package/dist/project-lifecycle.d.ts +0 -25
  246. package/dist/project-lifecycle.js +0 -57
  247. package/dist/project-state.d.ts +0 -49
  248. package/dist/project-state.js +0 -563
  249. package/dist/provider-auth.d.ts +0 -41
  250. package/dist/provider-auth.js +0 -215
  251. package/dist/provider-readiness.d.ts +0 -30
  252. package/dist/provider-readiness.js +0 -104
  253. package/dist/providers/adapters.d.ts +0 -17
  254. package/dist/providers/adapters.js +0 -278
  255. package/dist/providers/api.d.ts +0 -29
  256. package/dist/providers/api.js +0 -253
  257. package/dist/providers/config.d.ts +0 -15
  258. package/dist/providers/config.js +0 -182
  259. package/dist/providers/definitions.d.ts +0 -318
  260. package/dist/providers/definitions.js +0 -127
  261. package/dist/providers/provision.d.ts +0 -24
  262. package/dist/providers/provision.js +0 -76
  263. package/dist/providers/receipts.d.ts +0 -20
  264. package/dist/providers/receipts.js +0 -66
  265. package/dist/providers/recovery-verification.d.ts +0 -7
  266. package/dist/providers/recovery-verification.js +0 -112
  267. package/dist/providers/recovery.d.ts +0 -30
  268. package/dist/providers/recovery.js +0 -34
  269. package/dist/providers/runtime.d.ts +0 -10
  270. package/dist/providers/runtime.js +0 -265
  271. package/dist/providers/schema.d.ts +0 -28
  272. package/dist/providers/schema.js +0 -49
  273. package/dist/providers/state.d.ts +0 -55
  274. package/dist/providers/state.js +0 -289
  275. package/dist/provision.d.ts +0 -55
  276. package/dist/provision.js +0 -284
  277. package/dist/r2-service-data.d.ts +0 -2
  278. package/dist/r2-service-data.js +0 -136
  279. package/dist/readiness.d.ts +0 -23
  280. package/dist/readiness.js +0 -122
  281. package/dist/registry/add.d.ts +0 -24
  282. package/dist/registry/add.js +0 -270
  283. package/dist/registry/bootstrap.d.ts +0 -2
  284. package/dist/registry/bootstrap.js +0 -14
  285. package/dist/registry/commands.d.ts +0 -3
  286. package/dist/registry/commands.js +0 -85
  287. package/dist/registry/presets.d.ts +0 -4
  288. package/dist/registry/presets.js +0 -41
  289. package/dist/registry/preview.d.ts +0 -11
  290. package/dist/registry/preview.js +0 -91
  291. package/dist/registry/receipt.d.ts +0 -3
  292. package/dist/registry/receipt.js +0 -68
  293. package/dist/repository.d.ts +0 -24
  294. package/dist/repository.js +0 -96
  295. package/dist/scaffold/auth.d.ts +0 -3
  296. package/dist/scaffold/auth.js +0 -151
  297. package/dist/scaffold/billing-config.d.ts +0 -1
  298. package/dist/scaffold/billing-config.js +0 -73
  299. package/dist/scaffold/billing-contracts.d.ts +0 -2
  300. package/dist/scaffold/billing-contracts.js +0 -48
  301. package/dist/scaffold/billing-providers.d.ts +0 -1
  302. package/dist/scaffold/billing-providers.js +0 -249
  303. package/dist/scaffold/billing-schema.d.ts +0 -1
  304. package/dist/scaffold/billing-schema.js +0 -34
  305. package/dist/scaffold/billing-security.d.ts +0 -1
  306. package/dist/scaffold/billing-security.js +0 -46
  307. package/dist/scaffold/billing-server.d.ts +0 -1
  308. package/dist/scaffold/billing-server.js +0 -139
  309. package/dist/scaffold/billing-store.d.ts +0 -1
  310. package/dist/scaffold/billing-store.js +0 -72
  311. package/dist/scaffold/billing.d.ts +0 -2
  312. package/dist/scaffold/billing.js +0 -216
  313. package/dist/scaffold/cloudflare-services.d.ts +0 -8
  314. package/dist/scaffold/cloudflare-services.js +0 -198
  315. package/dist/scaffold/expo-auth.d.ts +0 -3
  316. package/dist/scaffold/expo-auth.js +0 -192
  317. package/dist/scaffold/expo-billing.d.ts +0 -3
  318. package/dist/scaffold/expo-billing.js +0 -292
  319. package/dist/scaffold/integrations.d.ts +0 -4
  320. package/dist/scaffold/integrations.js +0 -12
  321. package/dist/scaffold/lint.d.ts +0 -4
  322. package/dist/scaffold/lint.js +0 -56
  323. package/dist/scaffold/neon-realtime.d.ts +0 -2
  324. package/dist/scaffold/neon-realtime.js +0 -97
  325. package/dist/scaffold/services.d.ts +0 -5
  326. package/dist/scaffold/services.js +0 -108
  327. package/dist/scaffold/stream.d.ts +0 -2
  328. package/dist/scaffold/stream.js +0 -114
  329. package/dist/scaffold/void.d.ts +0 -4
  330. package/dist/scaffold/void.js +0 -264
  331. package/dist/scaffold/web.d.ts +0 -2
  332. package/dist/scaffold/web.js +0 -130
  333. package/dist/service-deletion.d.ts +0 -29
  334. package/dist/service-deletion.js +0 -195
  335. package/dist/service-descriptor.d.ts +0 -10
  336. package/dist/service-descriptor.js +0 -78
  337. package/dist/service-model.d.ts +0 -49
  338. package/dist/service-model.js +0 -8
  339. package/dist/service-operations.d.ts +0 -29
  340. package/dist/service-operations.js +0 -78
  341. package/dist/service-readers.d.ts +0 -8
  342. package/dist/service-readers.js +0 -247
  343. package/dist/services-command.d.ts +0 -39
  344. package/dist/services-command.js +0 -102
  345. package/dist/ship.d.ts +0 -348
  346. package/dist/ship.js +0 -239
  347. package/dist/vercel-project.d.ts +0 -101
  348. package/dist/vercel-project.js +0 -305
  349. package/dist/vercel.d.ts +0 -67
  350. package/dist/vercel.js +0 -581
  351. package/dist/vinext.d.ts +0 -2
  352. package/dist/vinext.js +0 -86
  353. package/dist/void-execution.d.ts +0 -10
  354. package/dist/void-execution.js +0 -94
  355. package/dist/void-migrations.d.ts +0 -6
  356. package/dist/void-migrations.js +0 -110
  357. package/dist/void-state.d.ts +0 -16
  358. package/dist/void-state.js +0 -65
  359. package/dist/void.d.ts +0 -3
  360. package/dist/void.js +0 -5
@@ -0,0 +1,74 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { NATIVE_ESLINT_VERSION, NATIVE_UI_DEPENDENCIES, MOBILE_APP_DEPENDENCIES, } from '../dependencies.js';
4
+ import { json, put } from './files.js';
5
+ import { writeReactLintConfig } from '../platforms/lint.js';
6
+ /** Anhedral-maintained native shadcn port. Never imported by the DOM application. */
7
+ export function scaffoldNativeUI(root) {
8
+ const assets = fileURLToPath(new URL('../../assets/ui/', import.meta.url));
9
+ const registry = JSON.parse(readFileSync(assets + 'native/registry.json', 'utf8'));
10
+ const components = [
11
+ ...registry.components.map((item) => item.id),
12
+ 'layout',
13
+ 'text',
14
+ 'theme-switcher',
15
+ ];
16
+ const nativeFiles = [...registry.components.map((item) => item.file), ...registry.supportFiles];
17
+ for (const file of [
18
+ 'theme.tsx',
19
+ 'theme-storage.ts',
20
+ 'LICENSE.shadcn',
21
+ 'UPSTREAM.json',
22
+ ...nativeFiles.map((name) => `native/${name}`),
23
+ ]) {
24
+ const source = readFileSync(fileURLToPath(new URL(`../../assets/ui/${file}`, import.meta.url)), 'utf8');
25
+ put(root, `packages/native-ui/${file.endsWith('.tsx') || file.endsWith('.ts') ? 'src/' : ''}${file}`, source);
26
+ }
27
+ put(root, 'packages/native-ui/README.md', readFileSync(fileURLToPath(new URL('../../docs/native-ui.md', import.meta.url)), 'utf8'));
28
+ put(root, 'packages/native-ui/NATIVE_COMPONENTS.json', readFileSync(assets + 'native/registry.json', 'utf8'));
29
+ put(root, 'packages/native-ui/src/index.ts', `export * from './theme';\n` +
30
+ components.map((name) => `export * from './native/${name}';\n`).join(''));
31
+ json(root, 'packages/native-ui/package.json', {
32
+ name: '@workspace/native-ui',
33
+ private: true,
34
+ type: 'module',
35
+ exports: {
36
+ '.': './src/index.ts',
37
+ './components/*': './src/native/*.tsx',
38
+ './theme': './src/theme.tsx',
39
+ },
40
+ scripts: { typecheck: 'tsc --noEmit', lint: 'eslint . --max-warnings 0' },
41
+ dependencies: {
42
+ ...NATIVE_UI_DEPENDENCIES.dependencies,
43
+ 'react-native-safe-area-context': MOBILE_APP_DEPENDENCIES.dependencies['react-native-safe-area-context'],
44
+ '@workspace/styling': 'workspace:*',
45
+ },
46
+ peerDependencies: {
47
+ react: MOBILE_APP_DEPENDENCIES.dependencies.react,
48
+ 'react-native': MOBILE_APP_DEPENDENCIES.dependencies['react-native'],
49
+ },
50
+ devDependencies: {
51
+ typescript: MOBILE_APP_DEPENDENCIES.devDependencies.typescript,
52
+ '@types/react': MOBILE_APP_DEPENDENCIES.devDependencies['@types/react'],
53
+ react: MOBILE_APP_DEPENDENCIES.dependencies.react,
54
+ 'react-native': MOBILE_APP_DEPENDENCIES.dependencies['react-native'],
55
+ '@workspace/eslint-config': 'workspace:*',
56
+ eslint: NATIVE_ESLINT_VERSION,
57
+ },
58
+ });
59
+ json(root, 'packages/native-ui/tsconfig.json', {
60
+ compilerOptions: {
61
+ target: 'ES2022',
62
+ lib: ['ES2022'],
63
+ module: 'ESNext',
64
+ moduleResolution: 'Bundler',
65
+ strict: true,
66
+ jsx: 'react-jsx',
67
+ noEmit: true,
68
+ skipLibCheck: true,
69
+ esModuleInterop: true,
70
+ },
71
+ include: ['src/**/*.ts', 'src/**/*.tsx'],
72
+ });
73
+ writeReactLintConfig(root + '/packages/native-ui');
74
+ }
@@ -1,3 +1,2 @@
1
1
  import type { ResolvedStackRegistry } from '../registry/resolve.js';
2
- /** Human-readable companion to the current resolved registry, refreshed by add. */
3
2
  export declare function writeStackDocumentation(root: string, registry: ResolvedStackRegistry): void;
@@ -1,52 +1,6 @@
1
- import { WORKER_DEV_PORTS } from '../dependencies.js';
2
1
  import { put } from './files.js';
3
- /** Human-readable companion to the current resolved registry, refreshed by add. */
4
2
  export function writeStackDocumentation(root, registry) {
5
- const sections = registry.items.map((item) => {
6
- const lines = [
7
- `## ${item.name}`,
8
- '',
9
- item.description + '.',
10
- '',
11
- `Targets: ${item.targets.map((target) => `\`${target}\``).join(', ')}.`,
12
- ];
13
- if (item.environment.length)
14
- lines.push(`Environment: ${item.environment.map((key) => `\`${key}\``).join(', ')}.`);
15
- if (item.bindings)
16
- lines.push('', 'Worker configuration:', '', '```json', JSON.stringify(item.bindings, null, 2), '```');
17
- if (item.setup) {
18
- for (const [label, entries] of [
19
- ['Required setup', item.setup.resources],
20
- ['Credentials', item.setup.credentials],
21
- ['Verify before delivery', item.setup.verify],
22
- ]) {
23
- if (!entries.length)
24
- continue;
25
- lines.push('', `${label}:`, '', ...entries.map((entry) => `- ${entry}`));
26
- }
27
- }
28
- return lines.join('\n');
29
- });
30
- const ports = Object.entries(WORKER_DEV_PORTS)
31
- .filter(([app]) => registry.items.some((item) => item.targets.includes(`apps/${app}`)))
32
- .map(([app, port]) => `| ${app} | ${port.http} | ${port.inspector} |`);
33
- put(root, 'docs/stack.md', [
34
- '# Selected stack',
35
- '',
36
- `Generated from the bundled Anhedral ${registry.cliVersion} registry. Project configuration lives in anhedral.json; setup and registry record the current selection and generated source, providers holds integration settings, and cloudflare/vercel hold selected hosting configuration. This document is refreshed by add. Keep product decisions in docs/architecture.md and acceptance evidence in docs/verification.md.`,
37
- '',
38
- 'These are scaffolds and integration boundaries. Provider access, migrations, authorization and live behavior require the setup and checks listed below.',
39
- ...(ports.length
40
- ? [
41
- '',
42
- '## Local Worker ports',
43
- '',
44
- '| Application | HTTP | Inspector |',
45
- '| --- | --- | --- |',
46
- ...ports,
47
- ]
48
- : []),
49
- '',
50
- ...sections.flatMap((section) => [section, '']),
51
- ].join('\n'));
3
+ const sections = registry.items.map((item) => `## ${item.name}\n\n${item.description}.\n\nTargets: ${item.targets.join(', ')}.\n\n${item.environment.length ? 'Environment: ' + item.environment.join(', ') + '.\n\n' : ''}${item.setup ? 'Setup: ' + item.setup.resources.join('; ') + '.\n\nVerify: ' + item.setup.verify.join('; ') + '.\n' : ''}`);
4
+ put(root, 'docs/stack.md', '# Application stack\n\nEvery application uses Next.js App Router/OpenNext for web, Expo for iOS/Android, Hono, Drizzle/D1 and private R2. Shared contracts, styling and native shadcn UI are included. Consumers implement application features, identity and integrations.\n\nInit generates source and configuration only. Consumers own cloud provisioning, secrets, migrations and deployment.\n\n' +
5
+ sections.join('\n'));
52
6
  }
@@ -0,0 +1,2 @@
1
+ import type { RecipeContext } from '../registry/types.js';
2
+ export declare function scaffoldPrivateStorage({ root }: RecipeContext): void;
@@ -0,0 +1,21 @@
1
+ import { put } from './files.js';
2
+ import { readFileSync } from 'node:fs';
3
+ import path from 'node:path';
4
+ export function scaffoldPrivateStorage({ root }) {
5
+ put(root, 'apps/api/src/private-storage.ts', `// Use only after your application has authorized the operation. No HTTP routes are exposed.
6
+ // R2 bucket privacy does not establish end-user authorization.
7
+ export function privateStorage(binding: R2Bucket) {
8
+ return {
9
+ get: (key: string) => binding.get(key),
10
+ put: (key: string, value: ArrayBuffer | ReadableStream) => binding.put(key, value),
11
+ delete: (key: string) => binding.delete(key),
12
+ };
13
+ }
14
+ `);
15
+ const file = 'apps/api/src/index.ts';
16
+ const source = readFileSync(path.join(root, file), 'utf8');
17
+ put(root, file, "import { privateStorage } from './private-storage';\n" +
18
+ source
19
+ .replace('database: () => ReturnType<typeof createDatabase>', 'database: () => ReturnType<typeof createDatabase>; storage: () => ReturnType<typeof privateStorage>')
20
+ .replace("c.set('database', () => createDatabase(c.env.DB));", "c.set('database', () => createDatabase(c.env.DB)); c.set('storage', () => privateStorage(c.env.FILES));"));
21
+ }
@@ -1,3 +1,3 @@
1
1
  import type { RecipeContext } from '../registry/types.js';
2
- /** Shared data and a Tailwind v3 preset for Expo/NativeWind and WXT. */
2
+ /** One shared token source for native components and DOM CSS. */
3
3
  export declare function scaffoldStyling({ root }: RecipeContext): void;
@@ -1,5 +1,7 @@
1
+ import { createRequire } from 'node:module';
2
+ import path from 'node:path';
1
3
  import { json, patchPackage, put, readJson } from './files.js';
2
- /** Shared data and a Tailwind v3 preset for Expo/NativeWind and WXT. */
4
+ /** One shared token source for native components and DOM CSS. */
3
5
  export function scaffoldStyling({ root }) {
4
6
  put(root, 'packages/styling/src/tokens.cjs', `exports.light = {
5
7
  '--background': '0 0% 100%',
@@ -46,39 +48,29 @@ exports.dark = {
46
48
  };
47
49
 
48
50
  exports.spacing = { small: 4, medium: 8, large: 16 };
49
- `);
50
- put(root, 'packages/styling/tailwind.cjs', `const { light, dark } = require('./src/tokens.cjs');
51
- const color = (name) => 'hsl(var(--' + name + '))';
52
- const surface = (name) => ({ DEFAULT: color(name), foreground: color(name + '-foreground') });
53
-
54
- module.exports = {
55
- darkMode: 'class',
56
- theme: {
57
- extend: {
58
- colors: {
59
- border: color('border'), input: color('input'), ring: color('ring'),
60
- background: color('background'), foreground: color('foreground'),
61
- primary: surface('primary'), secondary: surface('secondary'),
62
- destructive: surface('destructive'), muted: surface('muted'),
63
- accent: surface('accent'), popover: surface('popover'), card: surface('card'),
64
- },
65
- borderRadius: {
66
- lg: 'var(--radius)', md: 'calc(var(--radius) - 2px)', sm: 'calc(var(--radius) - 4px)',
67
- },
68
- },
69
- },
70
- plugins: [function themeVariables({ addBase }) {
71
- addBase({ ':root': light, '.dark:root': dark });
72
- }],
73
- };
74
51
  `);
75
52
  patchPackage(root, 'packages/styling/package.json', {
76
- exports: { '.': './src/index.ts', './tailwind': './tailwind.cjs' },
53
+ exports: {
54
+ '.': './src/index.ts',
55
+ './globals.css': './globals.css',
56
+ },
77
57
  });
58
+ const tokens = createRequire(import.meta.url)(path.join(root, 'packages/styling/src/tokens.cjs'));
59
+ const rule = (selector, values) => selector +
60
+ ' {\n' +
61
+ Object.entries(values)
62
+ .map(([key, value]) => ' ' + key + ': ' + value + ';')
63
+ .join('\n') +
64
+ '\n}\n';
65
+ put(root, 'packages/styling/globals.css', rule(':root', tokens.light) +
66
+ '@media (prefers-color-scheme: dark) {\n' +
67
+ rule(':root', tokens.dark) +
68
+ '}\n');
69
+ put(root, 'packages/styling/src/tokens.d.cts', 'export const light: Record<string, string>;\nexport const dark: Record<string, string>;\nexport const spacing: { small: number; medium: number; large: number };\n');
78
70
  const config = readJson(root, 'packages/styling/tsconfig.json');
79
71
  json(root, 'packages/styling/tsconfig.json', {
80
72
  ...config,
81
73
  compilerOptions: { ...config.compilerOptions, allowJs: true },
82
- include: ['src/**/*.ts', 'src/**/*.cjs', 'tailwind.cjs'],
74
+ include: ['src/**/*.ts', 'src/**/*.cjs'],
83
75
  });
84
76
  }
@@ -1,135 +1,26 @@
1
- import { readProjectSection, writeProjectSection, hasProjectSection } from '../project-config.js';
2
- import { STACK_DEPENDENCIES, WORKSPACE_NODE_ENGINE, SECURITY_OVERRIDE_DEPENDENCIES, GLOB_10_OVERRIDE_VERSION, GLOB_11_OVERRIDE_VERSION, BRACE_EXPANSION_1_OVERRIDE_VERSION, BRACE_EXPANSION_2_OVERRIDE_VERSION, BRACE_EXPANSION_5_OVERRIDE_VERSION, } from '../dependencies.js';
1
+ import { writeProjectSection } from '../project-config.js';
2
+ import { OPENNEXT_GLOB_VERSION, STACK_DEPENDENCIES, WORKSPACE_NODE_ENGINE, PACKAGE_MANAGER, } from '../dependencies.js';
3
3
  import { writeDependencyAudit } from '../dependency-patches.js';
4
- import { usesVoidSelection } from '../runtime-policy.js';
5
- import { VOID_NODE_ENGINE } from '../void.js';
6
4
  import { setPnpmPolicy } from '../pnpm-policy.js';
7
- import { BOOTSTRAP_COMMAND } from '../registry/bootstrap.js';
8
5
  import { appendGitignore } from '../util.js';
9
- import { PACKAGE_MANAGER } from '../dependencies.js';
10
6
  import { createSetupPlan } from '../capabilities.js';
11
- import { json, put, readJson, patchPackage, } from './files.js';
12
- import { writeSetupDocumentation, workerBuildSuffix } from './documentation.js';
7
+ import { json, put, patchPackage } from './files.js';
8
+ import { writeSetupDocumentation } from './documentation.js';
13
9
  import { writeStackDocumentation } from './stack-documentation.js';
14
10
  import { writeEnvironmentExample } from './environment.js';
15
- import { providerConfigurationTemplate } from '../providers/config.js';
16
- import { existsSync, readdirSync, rmSync } from 'node:fs';
17
- import path from 'node:path';
18
- function securityOverrides(options) {
19
- const has = (value) => options.products.includes(value);
20
- return {
21
- ...(has('wxt')
22
- ? {
23
- '@wxt-dev/module-react>@vitejs/plugin-react': SECURITY_OVERRIDE_DEPENDENCIES['@vitejs/plugin-react'],
24
- }
25
- : {}),
26
- ...(has('next') || has('vinext')
27
- ? { 'sharp@<0.35.5': SECURITY_OVERRIDE_DEPENDENCIES.sharp }
28
- : {}),
29
- ...(options.products.some((product) => ['vinext', 'next', 'expo', 'electron', 'wxt', 'neon', 'd1'].includes(product))
30
- ? { 'source-map-js@<1.2.2': SECURITY_OVERRIDE_DEPENDENCIES['source-map-js'] }
31
- : {}),
32
- ...(has('next') && options.hosting === 'cloudflare'
33
- ? {
34
- 'glob@>=10.2.0 <10.5.0': GLOB_10_OVERRIDE_VERSION,
35
- 'glob@>=11.0.0 <11.1.0': GLOB_11_OVERRIDE_VERSION,
36
- }
37
- : {}),
38
- ...(has('wxt')
39
- ? {
40
- 'shell-quote@<1.12.0': SECURITY_OVERRIDE_DEPENDENCIES['shell-quote'],
41
- 'tmp@<0.2.7': SECURITY_OVERRIDE_DEPENDENCIES.tmp,
42
- 'adm-zip@<0.6.1': SECURITY_OVERRIDE_DEPENDENCIES['adm-zip'],
43
- }
44
- : {}),
45
- 'baseline-browser-mapping@<2.11.0': SECURITY_OVERRIDE_DEPENDENCIES['baseline-browser-mapping'],
46
- 'browserslist@<4.28.7': SECURITY_OVERRIDE_DEPENDENCIES.browserslist,
47
- ...(((has('next') || has('vinext')) && options.hosting === 'cloudflare') ||
48
- has('hono') ||
49
- has('electron') ||
50
- has('wxt')
51
- ? { 'esbuild@<0.25.0': SECURITY_OVERRIDE_DEPENDENCIES.esbuild }
52
- : {}),
53
- 'brace-expansion@<2': BRACE_EXPANSION_1_OVERRIDE_VERSION,
54
- 'brace-expansion@>=2 <3': BRACE_EXPANSION_2_OVERRIDE_VERSION,
55
- 'brace-expansion@>=4 <5.0.12': BRACE_EXPANSION_5_OVERRIDE_VERSION,
56
- };
57
- }
58
- function writeTurboConfiguration(root, registry) {
59
- const turbo = existsSync(path.join(root, 'turbo.json'))
60
- ? readJson(root, 'turbo.json')
61
- : { tasks: {} };
62
- turbo.$schema = 'https://turbo.build/schema.json';
63
- turbo.globalDependencies = [
64
- ...new Set([
65
- ...(turbo.globalDependencies ?? []),
66
- '**/.env',
67
- '**/.env.*',
68
- '**/.dev.vars',
69
- '**/.dev.vars.*',
70
- ]),
71
- ];
72
- turbo.globalEnv = [
73
- ...new Set([
74
- ...(turbo.globalEnv ?? []),
75
- 'VOID_CLOUDFLARE_DEPLOY_BUILD',
76
- ...(registry.items.some(({ name }) => name === 'expo') ? ['EXPO_PUBLIC_API_URL'] : []),
77
- ...(registry.items.some(({ name }) => name === 'next') &&
78
- registry.items.some(({ name }) => name === 'hono')
79
- ? ['API_URL', 'API_ACCESS_CLIENT_ID', 'API_ACCESS_CLIENT_SECRET']
80
- : []),
81
- 'npm_execpath',
82
- ...registry.items.flatMap((item) => item.environment),
83
- ]),
84
- ].sort();
85
- turbo.tasks = {
86
- ...turbo.tasks,
87
- dev: { ...turbo.tasks.dev, cache: false, persistent: true },
88
- lint: { ...turbo.tasks.lint, dependsOn: ['^lint'] },
89
- typecheck: { ...turbo.tasks.typecheck, dependsOn: ['^typecheck'] },
90
- test: { dependsOn: ['^build'], outputs: ['coverage/**'] },
91
- 'db:generate': { cache: false },
92
- 'db:migrate': {
93
- cache: false,
94
- passThroughEnv: ['CLOUDFLARE_API_TOKEN', 'CLOUDFLARE_ACCOUNT_ID'],
95
- },
96
- build: {
97
- ...turbo.tasks.build,
98
- dependsOn: [...new Set(['^build', ...(turbo.tasks.build?.dependsOn ?? [])])],
99
- outputs: [
100
- '.next/**',
101
- '!.next/cache/**',
102
- '!.next/dev/**',
103
- '.open-next/**',
104
- 'dist/**',
105
- '.output/**',
106
- ],
107
- },
108
- };
109
- json(root, 'turbo.json', turbo);
110
- }
111
11
  export function writeStandardRoot(root, options, registry, updating = false) {
112
- const has = (value) => options.products.includes(value);
113
- const existing = readJson(root, 'package.json');
114
12
  patchPackage(root, 'package.json', {
115
13
  name: options.name,
116
14
  private: true,
117
15
  packageManager: PACKAGE_MANAGER,
118
- engines: {
119
- node: usesVoidSelection(options.products, options.hosting)
120
- ? VOID_NODE_ENGINE
121
- : WORKSPACE_NODE_ENGINE,
122
- },
16
+ engines: { node: WORKSPACE_NODE_ENGINE },
123
17
  scripts: {
124
18
  dev: 'turbo dev',
125
- build: 'turbo build',
126
- ...((has('next') || has('vinext')) && options.hosting === 'cloudflare'
127
- ? { 'build:worker': 'pnpm --dir apps/web run build:worker' }
128
- : {}),
19
+ build: 'turbo build --concurrency=1',
129
20
  lint: 'turbo lint',
130
21
  typecheck: 'turbo typecheck',
131
22
  test: 'turbo test',
132
- ...(has('neon') || has('d1')
23
+ ...(options.products.includes('d1')
133
24
  ? {
134
25
  'db:generate': 'turbo run db:generate --filter=@workspace/db',
135
26
  'db:migrate': 'turbo run db:migrate --filter=@workspace/db',
@@ -138,101 +29,85 @@ export function writeStandardRoot(root, options, registry, updating = false) {
138
29
  audit: 'node scripts/audit.mjs',
139
30
  'audit:full': 'fallow --fail-on-issues',
140
31
  'audit:deps': 'node scripts/audit-deps.mjs',
141
- check: `pnpm lint && pnpm typecheck && pnpm run audit && pnpm audit:deps && pnpm test && pnpm build${workerBuildSuffix(options)}`,
142
- },
143
- devDependencies: { turbo: STACK_DEPENDENCIES['turbo'], fallow: STACK_DEPENDENCIES['fallow'] },
144
- // Upstream starter lockfiles can retain vulnerable transitive versions. Keep fixes within compatible majors.
145
- pnpm: {
146
- ...existing.pnpm,
147
- overrides: { ...existing.pnpm?.overrides, ...securityOverrides(options) },
32
+ check: 'pnpm lint && pnpm typecheck && pnpm run audit && pnpm audit:deps && pnpm test && pnpm build',
148
33
  },
34
+ devDependencies: { turbo: STACK_DEPENDENCIES.turbo, fallow: STACK_DEPENDENCIES.fallow },
149
35
  });
150
36
  writeDependencyAudit(root, updating);
151
37
  put(root, 'scripts/audit.mjs', `import { spawnSync } from 'node:child_process';
152
- const base = process.env.AUDIT_BASE;
153
- const hasBase = base || ['origin/main', 'main'].find((ref) => spawnSync('git', ['rev-parse', '--verify', ref], { stdio: 'ignore' }).status === 0);
154
- const args = hasBase ? ['exec', 'fallow', 'audit', '--base', hasBase] : ['exec', 'fallow', '--fail-on-issues'];
155
38
  const entry = process.env.npm_execpath;
156
39
  if (!entry) throw new Error('Run this check through pnpm run audit.');
157
- const result = spawnSync(process.execPath, [entry, ...args], { stdio: 'inherit', shell: false });
40
+ const result = spawnSync(process.execPath, [entry, 'exec', 'fallow', '--fail-on-issues'], { stdio: 'inherit', shell: false });
158
41
  if (result.error) throw result.error;
159
42
  process.exitCode = result.status ?? 1;
160
43
  `);
161
44
  json(root, '.fallowrc.json', {
162
- // Void loads these contracts outside the JavaScript import graph. Declare
163
- // them as roots so their application dependencies remain fully audited.
164
- entry: [
165
- 'apps/*/void.config.ts',
166
- 'apps/*/env.ts',
167
- 'apps/*/src/void-entry.ts',
168
- 'apps/*/crons/**/*.{ts,mts,js,mjs}',
169
- ...(has('electron') ? ['apps/desktop/src/main/preload.cts'] : []),
170
- ],
171
- // Expo web export and NativeWind load these runtime dependencies dynamically.
172
- ...(has('expo')
173
- ? {
174
- ignoreDependencies: [
175
- 'react-native-web',
176
- 'react-native-css-interop',
177
- 'react-native-reanimated',
178
- 'react-native-worklets',
179
- ],
180
- }
181
- : {}),
45
+ publicPackages: options.products.includes('expo') ? ['@workspace/native-ui'] : [],
46
+ ignoreDependencies: options.products.includes('expo')
47
+ ? ['react-native-reanimated', 'react-native-worklets']
48
+ : [],
182
49
  ignorePatterns: [
183
- // Maintained bundled tooling is regression-tested in the CLI repository;
184
- // app audits cover customer code without re-auditing vendored CLI helpers.
185
50
  'scripts/audit.mjs',
186
51
  'scripts/audit-deps.mjs',
187
- 'scripts/void-migrations.mjs',
188
- 'scripts/prepare-void-migrations.mjs',
189
- '**/next-env.d.ts',
190
- '**/.next/**',
191
- '**/.open-next/**',
192
- '**/.vinext/**',
193
52
  '**/.wrangler/**',
194
53
  '**/dist/**',
54
+ '**/.next/**',
55
+ '**/.open-next/**',
195
56
  '**/worker-configuration.d.ts',
196
- '**/cloudflare-env.d.ts',
197
57
  ],
198
58
  });
199
- writeTurboConfiguration(root, registry);
59
+ json(root, 'turbo.json', {
60
+ $schema: 'https://turbo.build/schema.json',
61
+ globalDependencies: ['**/.env', '**/.env.*', '**/.dev.vars', '**/.dev.vars.*'],
62
+ globalEnv: [
63
+ ...new Set(['npm_execpath', ...registry.items.flatMap((item) => item.environment)]),
64
+ ].sort(),
65
+ tasks: {
66
+ dev: { cache: false, persistent: true },
67
+ lint: { dependsOn: ['^lint'] },
68
+ typecheck: {
69
+ dependsOn: ['^typecheck'],
70
+ outputs: ['worker-configuration.d.ts', 'next-env.d.ts', '.next/types/**'],
71
+ },
72
+ test: { dependsOn: ['^build'], outputs: ['coverage/**'] },
73
+ ...(options.products.includes('d1')
74
+ ? {
75
+ 'db:generate': { cache: false },
76
+ 'db:migrate': {
77
+ cache: false,
78
+ passThroughEnv: ['CLOUDFLARE_API_TOKEN', 'CLOUDFLARE_ACCOUNT_ID'],
79
+ },
80
+ }
81
+ : {}),
82
+ build: {
83
+ dependsOn: ['^build'],
84
+ outputs: ['dist/**', '.open-next/**', '.next/**', '!.next/cache/**'],
85
+ },
86
+ },
87
+ });
200
88
  setPnpmPolicy(root, {
201
89
  ...(!updating ? { packages: ['apps/*', 'packages/*'] } : {}),
90
+ // OpenNext's node-minify dependency pins the vulnerable glob CLI.
91
+ overrides: {
92
+ '@node-minify/core>glob': OPENNEXT_GLOB_VERSION,
93
+ // Expo CLI's two schema consumers use APIs supported by the patched Zod release.
94
+ ...(options.products.includes('expo') ? { '@expo/cli>zod': STACK_DEPENDENCIES.zod } : {}),
95
+ 'miniflare>undici': STACK_DEPENDENCIES.undici,
96
+ },
202
97
  sharedWorkspaceLockfile: true,
203
98
  allowBuilds: undefined,
204
- onlyBuiltDependencies: [
205
- 'esbuild',
206
- 'sharp',
207
- 'unrs-resolver',
208
- 'workerd',
209
- ...(has('electron') ? ['electron'] : []),
210
- ],
99
+ onlyBuiltDependencies: ['esbuild', 'sharp', 'unrs-resolver', 'workerd'],
211
100
  });
212
- // Upstream app/package lockfiles would create competing dependency authorities.
213
- if (!updating) {
214
- for (const parent of ['apps', 'packages']) {
215
- const directory = path.join(root, parent);
216
- if (!existsSync(directory))
217
- continue;
218
- for (const entry of readdirSync(directory, { withFileTypes: true })) {
219
- if (!entry.isDirectory())
220
- continue;
221
- for (const lock of ['pnpm-lock.yaml', 'package-lock.json', 'yarn.lock'])
222
- rmSync(path.join(directory, entry.name, lock), { force: true });
223
- }
224
- }
225
- for (const lock of ['package-lock.json', 'yarn.lock'])
226
- rmSync(path.join(root, lock), { force: true });
227
- }
228
101
  appendGitignore(root, [
229
102
  'node_modules/',
103
+ 'dist/',
104
+ '.output/',
105
+ '.next/',
230
106
  '.open-next/',
231
- '.vinext/',
107
+ '*.tsbuildinfo',
108
+ '.turbo/',
109
+ '.expo/',
232
110
  '.wrangler/',
233
- '.void/',
234
- '.void-wrangler.jsonc',
235
- '/apps/*/db/migrations/',
236
111
  '.dev.vars',
237
112
  '.dev.vars.*',
238
113
  '!.dev.vars.example',
@@ -242,6 +117,8 @@ process.exitCode = result.status ?? 1;
242
117
  '.fallow/',
243
118
  '.anhedral/',
244
119
  '.anhedral-audit-report.json',
120
+ 'worker-configuration.d.ts',
121
+ 'next-env.d.ts',
245
122
  ]);
246
123
  writeEnvironmentExample(root, registry);
247
124
  writeStackDocumentation(root, registry);
@@ -249,25 +126,12 @@ process.exitCode = result.status ?? 1;
249
126
  schemaVersion: 1,
250
127
  standard: 'anhedral-application-stack',
251
128
  products: options.products,
252
- hosting: has('next') || has('vinext') || has('expo') ? options.hosting : null,
253
- bootstrap: updating
254
- ? readProjectSection(root, 'standard').bootstrap
255
- : {
256
- command: BOOTSTRAP_COMMAND.join(' '),
257
- upstreamPackageManager: existing.packageManager,
258
- },
129
+ hosting: 'cloudflare',
130
+ bootstrap: { command: 'anhedral init', source: 'bundled' },
259
131
  status: 'starter',
260
132
  resourcesProvisioned: false,
261
133
  });
262
134
  writeProjectSection(root, 'setup', createSetupPlan({ ...options, dryRun: false }, registry));
263
- const providers = providerConfigurationTemplate(options.products, options.name);
264
- const prior = updating && hasProjectSection(root, 'providers')
265
- ? readProjectSection(root, 'providers')
266
- : undefined;
267
- writeProjectSection(root, 'providers', {
268
- ...providers,
269
- providers: { ...providers.providers, ...prior?.providers },
270
- });
271
135
  if (!updating)
272
136
  writeSetupDocumentation(root, options);
273
137
  }
@@ -1,86 +1,30 @@
1
1
  import type { ItemDefinition, StackRegistryItem, RecipeContext } from './registry/types.js';
2
2
  /** Every product owns its source recipe, setup requirements and composition policy here. */
3
3
  declare const PRODUCT_ITEMS: {
4
- vinext: ItemDefinition;
5
4
  next: ItemDefinition;
6
5
  expo: ItemDefinition;
7
- electron: ItemDefinition;
8
- wxt: ItemDefinition;
9
6
  hono: ItemDefinition;
10
- neon: ItemDefinition;
11
- 'neon-realtime': ItemDefinition;
12
7
  d1: ItemDefinition;
13
- 'local-data': ItemDefinition;
14
- clerk: ItemDefinition;
15
- 'better-auth': ItemDefinition;
16
8
  r2: ItemDefinition;
17
- kv: ItemDefinition;
18
- realtime: ItemDefinition;
19
- stream: ItemDefinition;
20
- queues: ItemDefinition;
21
- cron: ItemDefinition;
22
- workflows: ItemDefinition;
23
- 'analytics-engine': ItemDefinition;
24
- images: ItemDefinition;
25
- realtimekit: ItemDefinition;
26
- video: ItemDefinition;
27
- openai: ItemDefinition;
28
- 'ai-sdk': ItemDefinition;
29
- 'workers-ai': ItemDefinition;
30
- resend: ItemDefinition;
31
- stripe: ItemDefinition;
32
- revenuecat: ItemDefinition;
33
- sentry: ItemDefinition;
34
- basin: ItemDefinition;
35
- posthog: ItemDefinition;
36
9
  styling: ItemDefinition;
37
10
  };
38
11
  export type StandardProduct = keyof typeof PRODUCT_ITEMS;
39
- export declare const STANDARD_PRODUCTS: readonly ("next" | "electron" | "wxt" | "expo" | "vinext" | "realtime" | "workflows" | "styling" | "hono" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "queues" | "cron" | "analytics-engine" | "images" | "realtimekit" | "video" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "basin" | "posthog")[];
12
+ export declare const STANDARD_PRODUCTS: readonly ("hono" | "expo" | "r2" | "next" | "styling" | "d1")[];
40
13
  declare const DEFINITIONS: {
41
- vinext: ItemDefinition;
42
14
  next: ItemDefinition;
43
15
  expo: ItemDefinition;
44
- electron: ItemDefinition;
45
- wxt: ItemDefinition;
46
16
  hono: ItemDefinition;
47
- neon: ItemDefinition;
48
- 'neon-realtime': ItemDefinition;
49
17
  d1: ItemDefinition;
50
- 'local-data': ItemDefinition;
51
- clerk: ItemDefinition;
52
- 'better-auth': ItemDefinition;
53
18
  r2: ItemDefinition;
54
- kv: ItemDefinition;
55
- realtime: ItemDefinition;
56
- stream: ItemDefinition;
57
- queues: ItemDefinition;
58
- cron: ItemDefinition;
59
- workflows: ItemDefinition;
60
- 'analytics-engine': ItemDefinition;
61
- images: ItemDefinition;
62
- realtimekit: ItemDefinition;
63
- video: ItemDefinition;
64
- openai: ItemDefinition;
65
- 'ai-sdk': ItemDefinition;
66
- 'workers-ai': ItemDefinition;
67
- resend: ItemDefinition;
68
- stripe: ItemDefinition;
69
- revenuecat: ItemDefinition;
70
- sentry: ItemDefinition;
71
- basin: ItemDefinition;
72
- posthog: ItemDefinition;
73
19
  styling: ItemDefinition;
74
20
  workspace: ItemDefinition;
75
21
  typescript: ItemDefinition;
76
22
  eslint: ItemDefinition;
77
- 'cloudflare-api': ItemDefinition;
78
- ui: ItemDefinition;
79
23
  };
80
24
  export type StackItemId = keyof typeof DEFINITIONS;
81
25
  export declare function getStackDefinition(name: string): ItemDefinition;
82
26
  export declare function getStackItem(name: string): StackRegistryItem;
83
- export declare const STACK_ITEMS: Record<"next" | "electron" | "eslint" | "typescript" | "wxt" | "expo" | "vinext" | "realtime" | "workflows" | "ui" | "workspace" | "styling" | "hono" | "neon" | "d1" | "neon-realtime" | "local-data" | "clerk" | "better-auth" | "r2" | "kv" | "stream" | "queues" | "cron" | "analytics-engine" | "images" | "realtimekit" | "cloudflare-api" | "video" | "openai" | "ai-sdk" | "workers-ai" | "resend" | "stripe" | "revenuecat" | "sentry" | "basin" | "posthog", StackRegistryItem>;
27
+ export declare const STACK_ITEMS: Record<"hono" | "expo" | "r2" | "typescript" | "next" | "eslint" | "workspace" | "styling" | "d1", StackRegistryItem>;
84
28
  export declare const STACK_REGISTRY: {
85
29
  schemaVersion: number;
86
30
  name: string;