@dewtech/dare-cli 2.17.0 → 3.0.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 (344) hide show
  1. package/README.md +98 -3
  2. package/dist/__tests__/confidence.test.d.ts +2 -0
  3. package/dist/__tests__/confidence.test.d.ts.map +1 -0
  4. package/dist/__tests__/confidence.test.js +73 -0
  5. package/dist/__tests__/confidence.test.js.map +1 -0
  6. package/dist/__tests__/datamodel.test.d.ts +2 -0
  7. package/dist/__tests__/datamodel.test.d.ts.map +1 -0
  8. package/dist/__tests__/datamodel.test.js +131 -0
  9. package/dist/__tests__/datamodel.test.js.map +1 -0
  10. package/dist/__tests__/dna-detector.test.d.ts +2 -0
  11. package/dist/__tests__/dna-detector.test.d.ts.map +1 -0
  12. package/dist/__tests__/dna-detector.test.js +97 -0
  13. package/dist/__tests__/dna-detector.test.js.map +1 -0
  14. package/dist/__tests__/dna-facts.test.d.ts +2 -0
  15. package/dist/__tests__/dna-facts.test.d.ts.map +1 -0
  16. package/dist/__tests__/dna-facts.test.js +44 -0
  17. package/dist/__tests__/dna-facts.test.js.map +1 -0
  18. package/dist/__tests__/graph-renderer.test.d.ts +2 -0
  19. package/dist/__tests__/graph-renderer.test.d.ts.map +1 -0
  20. package/dist/__tests__/graph-renderer.test.js +85 -0
  21. package/dist/__tests__/graph-renderer.test.js.map +1 -0
  22. package/dist/__tests__/migration.test.d.ts +2 -0
  23. package/dist/__tests__/migration.test.d.ts.map +1 -0
  24. package/dist/__tests__/migration.test.js +77 -0
  25. package/dist/__tests__/migration.test.js.map +1 -0
  26. package/dist/__tests__/module-detector.test.d.ts +2 -0
  27. package/dist/__tests__/module-detector.test.d.ts.map +1 -0
  28. package/dist/__tests__/module-detector.test.js +83 -0
  29. package/dist/__tests__/module-detector.test.js.map +1 -0
  30. package/dist/__tests__/refine.test.js +49 -49
  31. package/dist/__tests__/reverse-facts.test.d.ts +2 -0
  32. package/dist/__tests__/reverse-facts.test.d.ts.map +1 -0
  33. package/dist/__tests__/reverse-facts.test.js +78 -0
  34. package/dist/__tests__/reverse-facts.test.js.map +1 -0
  35. package/dist/__tests__/review.test.js +38 -38
  36. package/dist/__tests__/validate.test.js +65 -65
  37. package/dist/bin/dare.js +32 -3
  38. package/dist/bin/dare.js.map +1 -1
  39. package/dist/commands/blueprint.js +122 -122
  40. package/dist/commands/dag.d.ts.map +1 -1
  41. package/dist/commands/dag.js +43 -79
  42. package/dist/commands/dag.js.map +1 -1
  43. package/dist/commands/dna.d.ts +3 -0
  44. package/dist/commands/dna.d.ts.map +1 -0
  45. package/dist/commands/dna.js +69 -0
  46. package/dist/commands/dna.js.map +1 -0
  47. package/dist/commands/migrate.d.ts +3 -0
  48. package/dist/commands/migrate.d.ts.map +1 -0
  49. package/dist/commands/migrate.js +101 -0
  50. package/dist/commands/migrate.js.map +1 -0
  51. package/dist/commands/new.d.ts +16 -0
  52. package/dist/commands/new.d.ts.map +1 -0
  53. package/dist/commands/new.js +103 -0
  54. package/dist/commands/new.js.map +1 -0
  55. package/dist/commands/reverse.d.ts +3 -0
  56. package/dist/commands/reverse.d.ts.map +1 -0
  57. package/dist/commands/reverse.js +201 -0
  58. package/dist/commands/reverse.js.map +1 -0
  59. package/dist/commands/welcome.d.ts +14 -0
  60. package/dist/commands/welcome.d.ts.map +1 -0
  61. package/dist/commands/welcome.js +29 -0
  62. package/dist/commands/welcome.js.map +1 -0
  63. package/dist/skills/commands/add.d.ts +23 -0
  64. package/dist/skills/commands/add.d.ts.map +1 -0
  65. package/dist/skills/commands/add.js +206 -0
  66. package/dist/skills/commands/add.js.map +1 -0
  67. package/dist/skills/commands/info.d.ts +14 -0
  68. package/dist/skills/commands/info.d.ts.map +1 -0
  69. package/dist/skills/commands/info.js +99 -0
  70. package/dist/skills/commands/info.js.map +1 -0
  71. package/dist/skills/commands/list.d.ts +19 -0
  72. package/dist/skills/commands/list.d.ts.map +1 -0
  73. package/dist/skills/commands/list.js +163 -0
  74. package/dist/skills/commands/list.js.map +1 -0
  75. package/dist/skills/commands/publish.d.ts +56 -0
  76. package/dist/skills/commands/publish.d.ts.map +1 -0
  77. package/dist/skills/commands/publish.js +272 -0
  78. package/dist/skills/commands/publish.js.map +1 -0
  79. package/dist/skills/commands/remove.d.ts +19 -0
  80. package/dist/skills/commands/remove.d.ts.map +1 -0
  81. package/dist/skills/commands/remove.js +96 -0
  82. package/dist/skills/commands/remove.js.map +1 -0
  83. package/dist/skills/commands/update.d.ts +31 -0
  84. package/dist/skills/commands/update.d.ts.map +1 -0
  85. package/dist/skills/commands/update.js +132 -0
  86. package/dist/skills/commands/update.js.map +1 -0
  87. package/dist/skills/index.d.ts +22 -0
  88. package/dist/skills/index.d.ts.map +1 -0
  89. package/dist/skills/index.js +33 -0
  90. package/dist/skills/index.js.map +1 -0
  91. package/dist/skills/manifest.d.ts +54 -0
  92. package/dist/skills/manifest.d.ts.map +1 -0
  93. package/dist/skills/manifest.js +162 -0
  94. package/dist/skills/manifest.js.map +1 -0
  95. package/dist/skills/registry-local.d.ts +67 -0
  96. package/dist/skills/registry-local.d.ts.map +1 -0
  97. package/dist/skills/registry-local.js +130 -0
  98. package/dist/skills/registry-local.js.map +1 -0
  99. package/dist/skills/registry-mock.json +109 -0
  100. package/dist/skills/registry-remote.d.ts +110 -0
  101. package/dist/skills/registry-remote.d.ts.map +1 -0
  102. package/dist/skills/registry-remote.js +246 -0
  103. package/dist/skills/registry-remote.js.map +1 -0
  104. package/dist/skills/registry.d.ts +49 -0
  105. package/dist/skills/registry.d.ts.map +1 -0
  106. package/dist/skills/registry.js +94 -0
  107. package/dist/skills/registry.js.map +1 -0
  108. package/dist/skills/tests/manifest.spec.d.ts +8 -0
  109. package/dist/skills/tests/manifest.spec.d.ts.map +1 -0
  110. package/dist/skills/tests/manifest.spec.js +176 -0
  111. package/dist/skills/tests/manifest.spec.js.map +1 -0
  112. package/dist/skills/tests/publish.spec.d.ts +12 -0
  113. package/dist/skills/tests/publish.spec.d.ts.map +1 -0
  114. package/dist/skills/tests/publish.spec.js +276 -0
  115. package/dist/skills/tests/publish.spec.js.map +1 -0
  116. package/dist/skills/tests/registry-local.spec.d.ts +8 -0
  117. package/dist/skills/tests/registry-local.spec.d.ts.map +1 -0
  118. package/dist/skills/tests/registry-local.spec.js +231 -0
  119. package/dist/skills/tests/registry-local.spec.js.map +1 -0
  120. package/dist/skills/tests/registry.spec.d.ts +7 -0
  121. package/dist/skills/tests/registry.spec.d.ts.map +1 -0
  122. package/dist/skills/tests/registry.spec.js +58 -0
  123. package/dist/skills/tests/registry.spec.js.map +1 -0
  124. package/dist/skills/tests/remote-registry.spec.d.ts +9 -0
  125. package/dist/skills/tests/remote-registry.spec.d.ts.map +1 -0
  126. package/dist/skills/tests/remote-registry.spec.js +357 -0
  127. package/dist/skills/tests/remote-registry.spec.js.map +1 -0
  128. package/dist/skills/tests/update.spec.d.ts +9 -0
  129. package/dist/skills/tests/update.spec.d.ts.map +1 -0
  130. package/dist/skills/tests/update.spec.js +166 -0
  131. package/dist/skills/tests/update.spec.js.map +1 -0
  132. package/dist/utils/banner.d.ts +28 -0
  133. package/dist/utils/banner.d.ts.map +1 -0
  134. package/dist/utils/banner.js +77 -0
  135. package/dist/utils/banner.js.map +1 -0
  136. package/dist/utils/banner.spec.d.ts +5 -0
  137. package/dist/utils/banner.spec.d.ts.map +1 -0
  138. package/dist/utils/banner.spec.js +253 -0
  139. package/dist/utils/banner.spec.js.map +1 -0
  140. package/dist/utils/confidence.d.ts +41 -0
  141. package/dist/utils/confidence.d.ts.map +1 -0
  142. package/dist/utils/confidence.js +101 -0
  143. package/dist/utils/confidence.js.map +1 -0
  144. package/dist/utils/datamodel.d.ts +41 -0
  145. package/dist/utils/datamodel.d.ts.map +1 -0
  146. package/dist/utils/datamodel.js +535 -0
  147. package/dist/utils/datamodel.js.map +1 -0
  148. package/dist/utils/dna-detector.d.ts +61 -0
  149. package/dist/utils/dna-detector.d.ts.map +1 -0
  150. package/dist/utils/dna-detector.js +354 -0
  151. package/dist/utils/dna-detector.js.map +1 -0
  152. package/dist/utils/dna-facts.d.ts +13 -0
  153. package/dist/utils/dna-facts.d.ts.map +1 -0
  154. package/dist/utils/dna-facts.js +109 -0
  155. package/dist/utils/dna-facts.js.map +1 -0
  156. package/dist/utils/excalidraw-renderer.d.ts +11 -71
  157. package/dist/utils/excalidraw-renderer.d.ts.map +1 -1
  158. package/dist/utils/excalidraw-renderer.js +29 -162
  159. package/dist/utils/excalidraw-renderer.js.map +1 -1
  160. package/dist/utils/graph-renderer.d.ts +115 -0
  161. package/dist/utils/graph-renderer.d.ts.map +1 -0
  162. package/dist/utils/graph-renderer.js +216 -0
  163. package/dist/utils/graph-renderer.js.map +1 -0
  164. package/dist/utils/migration.d.ts +64 -0
  165. package/dist/utils/migration.d.ts.map +1 -0
  166. package/dist/utils/migration.js +183 -0
  167. package/dist/utils/migration.js.map +1 -0
  168. package/dist/utils/module-detector.d.ts +46 -0
  169. package/dist/utils/module-detector.d.ts.map +1 -0
  170. package/dist/utils/module-detector.js +348 -0
  171. package/dist/utils/module-detector.js.map +1 -0
  172. package/dist/utils/project-generator.js +252 -252
  173. package/dist/utils/reverse-facts.d.ts +50 -0
  174. package/dist/utils/reverse-facts.d.ts.map +1 -0
  175. package/dist/utils/reverse-facts.js +291 -0
  176. package/dist/utils/reverse-facts.js.map +1 -0
  177. package/dist/utils/stack-bootstrap.js +371 -371
  178. package/package.json +8 -3
  179. package/templates/DARE-dag-example.yaml +280 -280
  180. package/templates/UPDATE-MANIFEST.json +48 -48
  181. package/templates/backend/node-nestjs/.env.example +9 -9
  182. package/templates/backend/node-nestjs/nest-cli.json +8 -8
  183. package/templates/backend/node-nestjs/package.json +50 -50
  184. package/templates/backend/node-nestjs/src/app.controller.ts +12 -12
  185. package/templates/backend/node-nestjs/src/app.module.ts +15 -15
  186. package/templates/backend/node-nestjs/src/app.service.ts +8 -8
  187. package/templates/backend/node-nestjs/src/main.ts +24 -24
  188. package/templates/backend/node-nestjs/tsconfig.json +21 -21
  189. package/templates/backend/php-laravel/.env.example +22 -22
  190. package/templates/backend/php-laravel/app/Http/Controllers/HealthController.php +15 -15
  191. package/templates/backend/php-laravel/composer.json +40 -40
  192. package/templates/backend/python-fastapi/.env.example +4 -4
  193. package/templates/backend/python-fastapi/app/api/router.py +8 -8
  194. package/templates/backend/python-fastapi/app/core/config.py +20 -20
  195. package/templates/backend/python-fastapi/main.py +35 -35
  196. package/templates/backend/python-fastapi/requirements.txt +13 -13
  197. package/templates/backend/rust-axum/.env.example +3 -3
  198. package/templates/backend/rust-axum/Cargo.toml +23 -23
  199. package/templates/backend/rust-axum/src/errors.rs +30 -30
  200. package/templates/backend/rust-axum/src/main.rs +32 -32
  201. package/templates/backend/rust-axum/src/routes.rs +6 -6
  202. package/templates/frontend/leptos-csr/.cargo/config.toml +2 -2
  203. package/templates/frontend/leptos-csr/Cargo.toml +16 -16
  204. package/templates/frontend/leptos-csr/Trunk.toml +10 -10
  205. package/templates/frontend/leptos-csr/index.html +11 -11
  206. package/templates/frontend/leptos-csr/src/lib.rs +20 -20
  207. package/templates/frontend/leptos-csr/style/main.scss +19 -19
  208. package/templates/frontend/leptos-fullstack/.cargo/config.toml +4 -4
  209. package/templates/frontend/leptos-fullstack/Cargo.toml +56 -56
  210. package/templates/frontend/leptos-fullstack/src/app.rs +49 -49
  211. package/templates/frontend/leptos-fullstack/src/lib.rs +9 -9
  212. package/templates/frontend/leptos-fullstack/src/main.rs +29 -29
  213. package/templates/frontend/leptos-fullstack/style/main.scss +19 -19
  214. package/templates/frontend/react/index.html +12 -12
  215. package/templates/frontend/react/package.json +35 -35
  216. package/templates/frontend/react/src/App.tsx +25 -25
  217. package/templates/frontend/react/src/main.tsx +9 -9
  218. package/templates/frontend/vue/package.json +32 -32
  219. package/templates/frontend/vue/src/App.vue +7 -7
  220. package/templates/frontend/vue/src/main.ts +10 -10
  221. package/templates/frontend/vue/src/router/index.ts +14 -14
  222. package/templates/frontend/vue/src/views/HomeView.vue +6 -6
  223. package/templates/hooks/pre-commit-dare-validate +24 -24
  224. package/templates/ide/antigravity/.agents/skills/dare-ax/SKILL.md +152 -0
  225. package/templates/ide/antigravity/.agents/skills/dare-dag-build/SKILL.md +154 -0
  226. package/templates/ide/antigravity/.agents/skills/dare-dag-run/SKILL.md +130 -0
  227. package/templates/ide/antigravity/.agents/skills/dare-dag-runner/SKILL.md +203 -203
  228. package/templates/ide/antigravity/.agents/skills/dare-dna/SKILL.md +63 -0
  229. package/templates/ide/antigravity/.agents/skills/dare-docker/SKILL.md +315 -0
  230. package/templates/ide/antigravity/.agents/skills/dare-frontend-design/SKILL.md +192 -0
  231. package/templates/ide/antigravity/.agents/skills/dare-laravel-api/SKILL.md +337 -0
  232. package/templates/ide/antigravity/.agents/skills/dare-layered-design/SKILL.md +166 -0
  233. package/templates/ide/antigravity/.agents/skills/dare-llm-integration/SKILL.md +217 -0
  234. package/templates/ide/antigravity/.agents/skills/dare-migrate/SKILL.md +61 -0
  235. package/templates/ide/antigravity/.agents/skills/dare-quality-telemetry/SKILL.md +187 -0
  236. package/templates/ide/antigravity/.agents/skills/dare-realtime/SKILL.md +217 -0
  237. package/templates/ide/antigravity/.agents/skills/dare-refine/SKILL.md +114 -114
  238. package/templates/ide/antigravity/.agents/skills/dare-reverse/SKILL.md +108 -0
  239. package/templates/ide/antigravity/.agents/skills/dare-review/SKILL.md +111 -111
  240. package/templates/ide/antigravity/.agents/skills/dare-rust-leptos/SKILL.md +263 -0
  241. package/templates/ide/antigravity/.agents/skills/dare-rust-workspace/SKILL.md +275 -275
  242. package/templates/ide/antigravity/.agents/skills/dare-security/SKILL.md +274 -0
  243. package/templates/ide/antigravity/.agents/skills/dare-tasks/SKILL.md +265 -265
  244. package/templates/ide/antigravity/.agents/skills/dare-telemetry/SKILL.md +188 -0
  245. package/templates/ide/antigravity/.agents/skills/skill-fastapi-api/SKILL.md +343 -0
  246. package/templates/ide/antigravity/.agents/skills/skill-go-gin-api/SKILL.md +377 -0
  247. package/templates/ide/antigravity/.agents/skills/skill-mcp-server/SKILL.md +382 -0
  248. package/templates/ide/antigravity/.agents/skills/skill-nestjs-api/SKILL.md +326 -0
  249. package/templates/ide/antigravity/.agents/skills/skill-rails-api/SKILL.md +393 -0
  250. package/templates/ide/antigravity/templates/BLUEPRINT-template.md +193 -193
  251. package/templates/ide/antigravity/templates/DESIGN-template.md +129 -129
  252. package/templates/ide/antigravity/templates/TASK-SPEC-template.md +141 -141
  253. package/templates/ide/claude/.claude/commands/dare-ax.md +131 -0
  254. package/templates/ide/claude/.claude/commands/dare-blueprint.md +134 -134
  255. package/templates/ide/claude/.claude/commands/dare-bugfix-design.md +119 -0
  256. package/templates/ide/claude/.claude/commands/dare-dag-build.md +151 -151
  257. package/templates/ide/claude/.claude/commands/dare-dag-run.md +109 -109
  258. package/templates/ide/claude/.claude/commands/dare-dag-runner.md +117 -0
  259. package/templates/ide/claude/.claude/commands/dare-dag-viz.md +197 -197
  260. package/templates/ide/claude/.claude/commands/dare-design.md +69 -69
  261. package/templates/ide/claude/.claude/commands/dare-dna.md +75 -0
  262. package/templates/ide/claude/.claude/commands/dare-docker.md +207 -0
  263. package/templates/ide/claude/.claude/commands/dare-execute.md +152 -152
  264. package/templates/ide/claude/.claude/commands/dare-feature-design.md +147 -0
  265. package/templates/ide/claude/.claude/commands/dare-frontend-design.md +149 -0
  266. package/templates/ide/claude/.claude/commands/dare-laravel-api.md +211 -0
  267. package/templates/ide/claude/.claude/commands/dare-layered-design.md +124 -0
  268. package/templates/ide/claude/.claude/commands/dare-llm-integration.md +148 -0
  269. package/templates/ide/claude/.claude/commands/dare-migrate.md +72 -0
  270. package/templates/ide/claude/.claude/commands/dare-quality-telemetry.md +166 -0
  271. package/templates/ide/claude/.claude/commands/dare-realtime.md +159 -0
  272. package/templates/ide/claude/.claude/commands/dare-refine.md +145 -145
  273. package/templates/ide/claude/.claude/commands/dare-reverse.md +139 -0
  274. package/templates/ide/claude/.claude/commands/dare-review.md +113 -113
  275. package/templates/ide/claude/.claude/commands/dare-rust-leptos.md +269 -269
  276. package/templates/ide/claude/.claude/commands/dare-rust-workspace.md +209 -209
  277. package/templates/ide/claude/.claude/commands/dare-security.md +232 -232
  278. package/templates/ide/claude/.claude/commands/dare-tasks.md +70 -70
  279. package/templates/ide/claude/.claude/commands/dare-telemetry.md +132 -0
  280. package/templates/ide/claude/.claude/commands/skill-fastapi-api.md +205 -0
  281. package/templates/ide/claude/.claude/commands/skill-go-gin-api.md +232 -0
  282. package/templates/ide/claude/.claude/commands/skill-mcp-server.md +228 -0
  283. package/templates/ide/claude/.claude/commands/skill-nestjs-api.md +210 -0
  284. package/templates/ide/claude/.claude/commands/skill-rails-api.md +236 -0
  285. package/templates/ide/claude/.claude/settings.example.json +35 -35
  286. package/templates/ide/claude/CLAUDE.md +146 -146
  287. package/templates/ide/claude/templates/BLUEPRINT-template.md +193 -193
  288. package/templates/ide/claude/templates/DESIGN-template.md +129 -129
  289. package/templates/ide/claude/templates/TASK-SPEC-template.md +141 -141
  290. package/templates/ide/cursor/.cursor/commands/dag-viz.md +139 -0
  291. package/templates/ide/cursor/.cursor/commands/generate-blueprint.md +86 -86
  292. package/templates/ide/cursor/.cursor/commands/generate-design.md +35 -35
  293. package/templates/ide/cursor/.cursor/commands/generate-tasks.md +184 -184
  294. package/templates/ide/cursor/.cursor/commands/refine-task.md +107 -107
  295. package/templates/ide/cursor/.cursor/commands/review-task.md +91 -91
  296. package/templates/ide/cursor/.cursor/commands/run-dag.md +110 -110
  297. package/templates/ide/cursor/.cursor/rules/skill-ax.mdc +263 -0
  298. package/templates/ide/cursor/.cursor/rules/skill-dag-build.mdc +173 -0
  299. package/templates/ide/cursor/.cursor/rules/skill-dag-run.mdc +134 -0
  300. package/templates/ide/cursor/.cursor/rules/skill-dag-runner.mdc +221 -221
  301. package/templates/ide/cursor/.cursor/rules/skill-dna.mdc +63 -0
  302. package/templates/ide/cursor/.cursor/rules/skill-fastapi-api.mdc +352 -0
  303. package/templates/ide/cursor/.cursor/rules/skill-frontend-design.mdc +244 -0
  304. package/templates/ide/cursor/.cursor/rules/skill-go-gin-api.mdc +371 -0
  305. package/templates/ide/cursor/.cursor/rules/skill-layered-design.mdc +266 -0
  306. package/templates/ide/cursor/.cursor/rules/skill-llm-integration.mdc +295 -0
  307. package/templates/ide/cursor/.cursor/rules/skill-mcp-server.mdc +367 -0
  308. package/templates/ide/cursor/.cursor/rules/skill-migrate.mdc +58 -0
  309. package/templates/ide/cursor/.cursor/rules/skill-nestjs-api.mdc +346 -0
  310. package/templates/ide/cursor/.cursor/rules/skill-quality-telemetry.mdc +248 -0
  311. package/templates/ide/cursor/.cursor/rules/skill-rails-api.mdc +400 -0
  312. package/templates/ide/cursor/.cursor/rules/skill-realtime.mdc +262 -0
  313. package/templates/ide/cursor/.cursor/rules/skill-reverse.mdc +107 -0
  314. package/templates/ide/cursor/.cursor/rules/skill-rust-leptos.mdc +281 -0
  315. package/templates/ide/cursor/.cursor/rules/skill-rust-workspace.mdc +312 -312
  316. package/templates/ide/cursor/.cursor/rules/skill-security.mdc +245 -245
  317. package/templates/ide/cursor/templates/BLUEPRINT-template.md +193 -193
  318. package/templates/ide/cursor/templates/DESIGN-template.md +129 -129
  319. package/templates/ide/cursor/templates/TASK-SPEC-template.md +141 -141
  320. package/templates/shared/docker-compose.yml +41 -41
  321. package/dist/__tests__/dag-runner/adapters.test.d.ts +0 -2
  322. package/dist/__tests__/dag-runner/adapters.test.d.ts.map +0 -1
  323. package/dist/__tests__/dag-runner/adapters.test.js +0 -134
  324. package/dist/__tests__/dag-runner/adapters.test.js.map +0 -1
  325. package/dist/dag-runner/adapters/antigravity.d.ts +0 -6
  326. package/dist/dag-runner/adapters/antigravity.d.ts.map +0 -1
  327. package/dist/dag-runner/adapters/antigravity.js +0 -54
  328. package/dist/dag-runner/adapters/antigravity.js.map +0 -1
  329. package/dist/dag-runner/adapters/claude.d.ts +0 -6
  330. package/dist/dag-runner/adapters/claude.d.ts.map +0 -1
  331. package/dist/dag-runner/adapters/claude.js +0 -48
  332. package/dist/dag-runner/adapters/claude.js.map +0 -1
  333. package/dist/dag-runner/adapters/cursor.d.ts +0 -6
  334. package/dist/dag-runner/adapters/cursor.d.ts.map +0 -1
  335. package/dist/dag-runner/adapters/cursor.js +0 -58
  336. package/dist/dag-runner/adapters/cursor.js.map +0 -1
  337. package/dist/dag-runner/adapters/index.d.ts +0 -46
  338. package/dist/dag-runner/adapters/index.d.ts.map +0 -1
  339. package/dist/dag-runner/adapters/index.js +0 -55
  340. package/dist/dag-runner/adapters/index.js.map +0 -1
  341. package/dist/dag-runner/utils/timeout.d.ts +0 -27
  342. package/dist/dag-runner/utils/timeout.d.ts.map +0 -1
  343. package/dist/dag-runner/utils/timeout.js +0 -55
  344. package/dist/dag-runner/utils/timeout.js.map +0 -1
@@ -323,73 +323,73 @@ async function bootstrapGoGin(dir, projectName, mode) {
323
323
  await fs.ensureDir(path.join(dir, 'cmd', 'api'));
324
324
  await fs.ensureDir(path.join(dir, 'internal', 'handlers'));
325
325
  await fs.ensureDir(path.join(dir, 'internal', 'middleware'));
326
- await fs.writeFile(path.join(dir, 'cmd', 'api', 'main.go'), `package main
327
-
328
- import (
329
- \t"log"
330
- \t"os"
331
-
332
- \t"github.com/gin-gonic/gin"
333
- \t"${moduleName}/internal/handlers"
334
- )
335
-
336
- func main() {
337
- \tr := gin.Default()
338
-
339
- \tr.GET("/healthz", handlers.Health)
340
-
341
- \tv1 := r.Group("/api/v1")
342
- \t{
343
- \t\tv1.GET("/", func(c *gin.Context) {
344
- \t\t\tc.JSON(200, gin.H{"message": "API v1"})
345
- \t\t})
346
- \t}
347
-
348
- \tport := os.Getenv("PORT")
349
- \tif port == "" {
350
- \t\tport = "8080"
351
- \t}
352
- \tif err := r.Run(":" + port); err != nil {
353
- \t\tlog.Fatal(err)
354
- \t}
355
- }
326
+ await fs.writeFile(path.join(dir, 'cmd', 'api', 'main.go'), `package main
327
+
328
+ import (
329
+ \t"log"
330
+ \t"os"
331
+
332
+ \t"github.com/gin-gonic/gin"
333
+ \t"${moduleName}/internal/handlers"
334
+ )
335
+
336
+ func main() {
337
+ \tr := gin.Default()
338
+
339
+ \tr.GET("/healthz", handlers.Health)
340
+
341
+ \tv1 := r.Group("/api/v1")
342
+ \t{
343
+ \t\tv1.GET("/", func(c *gin.Context) {
344
+ \t\t\tc.JSON(200, gin.H{"message": "API v1"})
345
+ \t\t})
346
+ \t}
347
+
348
+ \tport := os.Getenv("PORT")
349
+ \tif port == "" {
350
+ \t\tport = "8080"
351
+ \t}
352
+ \tif err := r.Run(":" + port); err != nil {
353
+ \t\tlog.Fatal(err)
354
+ \t}
355
+ }
356
356
  `);
357
- await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health.go'), `package handlers
358
-
359
- import (
360
- \t"net/http"
361
-
362
- \t"github.com/gin-gonic/gin"
363
- )
364
-
365
- // Health returns 200 with a small status payload.
366
- func Health(c *gin.Context) {
367
- \tc.JSON(http.StatusOK, gin.H{"status": "ok"})
368
- }
357
+ await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health.go'), `package handlers
358
+
359
+ import (
360
+ \t"net/http"
361
+
362
+ \t"github.com/gin-gonic/gin"
363
+ )
364
+
365
+ // Health returns 200 with a small status payload.
366
+ func Health(c *gin.Context) {
367
+ \tc.JSON(http.StatusOK, gin.H{"status": "ok"})
368
+ }
369
369
  `);
370
- await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health_test.go'), `package handlers
371
-
372
- import (
373
- \t"net/http"
374
- \t"net/http/httptest"
375
- \t"testing"
376
-
377
- \t"github.com/gin-gonic/gin"
378
- )
379
-
380
- func TestHealth(t *testing.T) {
381
- \tgin.SetMode(gin.TestMode)
382
- \tr := gin.New()
383
- \tr.GET("/healthz", Health)
384
-
385
- \treq := httptest.NewRequest(http.MethodGet, "/healthz", nil)
386
- \trec := httptest.NewRecorder()
387
- \tr.ServeHTTP(rec, req)
388
-
389
- \tif rec.Code != http.StatusOK {
390
- \t\tt.Fatalf("expected 200, got %d", rec.Code)
391
- \t}
392
- }
370
+ await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health_test.go'), `package handlers
371
+
372
+ import (
373
+ \t"net/http"
374
+ \t"net/http/httptest"
375
+ \t"testing"
376
+
377
+ \t"github.com/gin-gonic/gin"
378
+ )
379
+
380
+ func TestHealth(t *testing.T) {
381
+ \tgin.SetMode(gin.TestMode)
382
+ \tr := gin.New()
383
+ \tr.GET("/healthz", Health)
384
+
385
+ \treq := httptest.NewRequest(http.MethodGet, "/healthz", nil)
386
+ \trec := httptest.NewRecorder()
387
+ \tr.ServeHTTP(rec, req)
388
+
389
+ \tif rec.Code != http.StatusOK {
390
+ \t\tt.Fatalf("expected 200, got %d", rec.Code)
391
+ \t}
392
+ }
393
393
  `);
394
394
  await go.run(['mod', 'tidy']);
395
395
  }
@@ -416,149 +416,149 @@ async function bootstrapGoStdlib(dir, projectName, mode) {
416
416
  await fs.ensureDir(path.join(dir, 'internal', 'middleware'));
417
417
  // cmd/api/main.go — http.NewServeMux with the Go 1.22+ pattern syntax,
418
418
  // wired through a logging + recover middleware chain.
419
- await fs.writeFile(path.join(dir, 'cmd', 'api', 'main.go'), `package main
420
-
421
- import (
422
- \t"log"
423
- \t"log/slog"
424
- \t"net/http"
425
- \t"os"
426
-
427
- \t"${moduleName}/internal/handlers"
428
- \t"${moduleName}/internal/middleware"
429
- )
430
-
431
- func main() {
432
- \tlogger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
433
- \tslog.SetDefault(logger)
434
-
435
- \tmux := http.NewServeMux()
436
-
437
- \tmux.HandleFunc("GET /healthz", handlers.Health)
438
-
439
- \t// Example resource — replace with real routes per BLUEPRINT.md.
440
- \tmux.HandleFunc("GET /api/v1/", handlers.RootV1)
441
-
442
- \thandler := middleware.Recover(middleware.Logger(mux))
443
-
444
- \tport := os.Getenv("PORT")
445
- \tif port == "" {
446
- \t\tport = "8080"
447
- \t}
448
- \tslog.Info("server starting", "addr", ":"+port)
449
- \tif err := http.ListenAndServe(":"+port, handler); err != nil {
450
- \t\tlog.Fatal(err)
451
- \t}
452
- }
419
+ await fs.writeFile(path.join(dir, 'cmd', 'api', 'main.go'), `package main
420
+
421
+ import (
422
+ \t"log"
423
+ \t"log/slog"
424
+ \t"net/http"
425
+ \t"os"
426
+
427
+ \t"${moduleName}/internal/handlers"
428
+ \t"${moduleName}/internal/middleware"
429
+ )
430
+
431
+ func main() {
432
+ \tlogger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
433
+ \tslog.SetDefault(logger)
434
+
435
+ \tmux := http.NewServeMux()
436
+
437
+ \tmux.HandleFunc("GET /healthz", handlers.Health)
438
+
439
+ \t// Example resource — replace with real routes per BLUEPRINT.md.
440
+ \tmux.HandleFunc("GET /api/v1/", handlers.RootV1)
441
+
442
+ \thandler := middleware.Recover(middleware.Logger(mux))
443
+
444
+ \tport := os.Getenv("PORT")
445
+ \tif port == "" {
446
+ \t\tport = "8080"
447
+ \t}
448
+ \tslog.Info("server starting", "addr", ":"+port)
449
+ \tif err := http.ListenAndServe(":"+port, handler); err != nil {
450
+ \t\tlog.Fatal(err)
451
+ \t}
452
+ }
453
453
  `);
454
454
  // internal/handlers/health.go
455
- await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health.go'), `package handlers
456
-
457
- import (
458
- \t"encoding/json"
459
- \t"net/http"
460
- )
461
-
462
- // Health returns 200 with a small JSON status payload.
463
- func Health(w http.ResponseWriter, r *http.Request) {
464
- \twriteJSON(w, http.StatusOK, map[string]string{"status": "ok"})
465
- }
466
-
467
- // RootV1 is a placeholder for the v1 root handler — replace per BLUEPRINT.
468
- func RootV1(w http.ResponseWriter, r *http.Request) {
469
- \twriteJSON(w, http.StatusOK, map[string]string{"message": "API v1"})
470
- }
471
-
472
- func writeJSON(w http.ResponseWriter, status int, body any) {
473
- \tw.Header().Set("Content-Type", "application/json")
474
- \tw.WriteHeader(status)
475
- \t_ = json.NewEncoder(w).Encode(body)
476
- }
455
+ await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health.go'), `package handlers
456
+
457
+ import (
458
+ \t"encoding/json"
459
+ \t"net/http"
460
+ )
461
+
462
+ // Health returns 200 with a small JSON status payload.
463
+ func Health(w http.ResponseWriter, r *http.Request) {
464
+ \twriteJSON(w, http.StatusOK, map[string]string{"status": "ok"})
465
+ }
466
+
467
+ // RootV1 is a placeholder for the v1 root handler — replace per BLUEPRINT.
468
+ func RootV1(w http.ResponseWriter, r *http.Request) {
469
+ \twriteJSON(w, http.StatusOK, map[string]string{"message": "API v1"})
470
+ }
471
+
472
+ func writeJSON(w http.ResponseWriter, status int, body any) {
473
+ \tw.Header().Set("Content-Type", "application/json")
474
+ \tw.WriteHeader(status)
475
+ \t_ = json.NewEncoder(w).Encode(body)
476
+ }
477
477
  `);
478
478
  // internal/handlers/health_test.go — uses net/http/httptest from stdlib.
479
- await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health_test.go'), `package handlers
480
-
481
- import (
482
- \t"encoding/json"
483
- \t"net/http"
484
- \t"net/http/httptest"
485
- \t"testing"
486
- )
487
-
488
- func TestHealth(t *testing.T) {
489
- \treq := httptest.NewRequest(http.MethodGet, "/healthz", nil)
490
- \trec := httptest.NewRecorder()
491
-
492
- \tHealth(rec, req)
493
-
494
- \tif rec.Code != http.StatusOK {
495
- \t\tt.Fatalf("expected 200, got %d", rec.Code)
496
- \t}
497
-
498
- \tvar body map[string]string
499
- \tif err := json.Unmarshal(rec.Body.Bytes(), &body); err != nil {
500
- \t\tt.Fatalf("invalid JSON: %v", err)
501
- \t}
502
- \tif body["status"] != "ok" {
503
- \t\tt.Fatalf("expected status=ok, got %q", body["status"])
504
- \t}
505
- }
479
+ await fs.writeFile(path.join(dir, 'internal', 'handlers', 'health_test.go'), `package handlers
480
+
481
+ import (
482
+ \t"encoding/json"
483
+ \t"net/http"
484
+ \t"net/http/httptest"
485
+ \t"testing"
486
+ )
487
+
488
+ func TestHealth(t *testing.T) {
489
+ \treq := httptest.NewRequest(http.MethodGet, "/healthz", nil)
490
+ \trec := httptest.NewRecorder()
491
+
492
+ \tHealth(rec, req)
493
+
494
+ \tif rec.Code != http.StatusOK {
495
+ \t\tt.Fatalf("expected 200, got %d", rec.Code)
496
+ \t}
497
+
498
+ \tvar body map[string]string
499
+ \tif err := json.Unmarshal(rec.Body.Bytes(), &body); err != nil {
500
+ \t\tt.Fatalf("invalid JSON: %v", err)
501
+ \t}
502
+ \tif body["status"] != "ok" {
503
+ \t\tt.Fatalf("expected status=ok, got %q", body["status"])
504
+ \t}
505
+ }
506
506
  `);
507
507
  // internal/middleware/logger.go
508
- await fs.writeFile(path.join(dir, 'internal', 'middleware', 'logger.go'), `package middleware
509
-
510
- import (
511
- \t"log/slog"
512
- \t"net/http"
513
- \t"time"
514
- )
515
-
516
- // Logger emits a structured log line per request: method, path, status, duration.
517
- func Logger(next http.Handler) http.Handler {
518
- \treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
519
- \t\tstart := time.Now()
520
- \t\tsr := &statusRecorder{ResponseWriter: w, status: http.StatusOK}
521
- \t\tnext.ServeHTTP(sr, r)
522
- \t\tslog.Info("http",
523
- \t\t\t"method", r.Method,
524
- \t\t\t"path", r.URL.Path,
525
- \t\t\t"status", sr.status,
526
- \t\t\t"duration_ms", time.Since(start).Milliseconds(),
527
- \t\t)
528
- \t})
529
- }
530
-
531
- type statusRecorder struct {
532
- \thttp.ResponseWriter
533
- \tstatus int
534
- }
535
-
536
- func (s *statusRecorder) WriteHeader(code int) {
537
- \ts.status = code
538
- \ts.ResponseWriter.WriteHeader(code)
539
- }
508
+ await fs.writeFile(path.join(dir, 'internal', 'middleware', 'logger.go'), `package middleware
509
+
510
+ import (
511
+ \t"log/slog"
512
+ \t"net/http"
513
+ \t"time"
514
+ )
515
+
516
+ // Logger emits a structured log line per request: method, path, status, duration.
517
+ func Logger(next http.Handler) http.Handler {
518
+ \treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
519
+ \t\tstart := time.Now()
520
+ \t\tsr := &statusRecorder{ResponseWriter: w, status: http.StatusOK}
521
+ \t\tnext.ServeHTTP(sr, r)
522
+ \t\tslog.Info("http",
523
+ \t\t\t"method", r.Method,
524
+ \t\t\t"path", r.URL.Path,
525
+ \t\t\t"status", sr.status,
526
+ \t\t\t"duration_ms", time.Since(start).Milliseconds(),
527
+ \t\t)
528
+ \t})
529
+ }
530
+
531
+ type statusRecorder struct {
532
+ \thttp.ResponseWriter
533
+ \tstatus int
534
+ }
535
+
536
+ func (s *statusRecorder) WriteHeader(code int) {
537
+ \ts.status = code
538
+ \ts.ResponseWriter.WriteHeader(code)
539
+ }
540
540
  `);
541
541
  // internal/middleware/recover.go
542
- await fs.writeFile(path.join(dir, 'internal', 'middleware', 'recover.go'), `package middleware
543
-
544
- import (
545
- \t"log/slog"
546
- \t"net/http"
547
- )
548
-
549
- // Recover intercepts panics in handlers and turns them into 500 responses
550
- // instead of letting the goroutine crash the server.
551
- func Recover(next http.Handler) http.Handler {
552
- \treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
553
- \t\tdefer func() {
554
- \t\t\tif rec := recover(); rec != nil {
555
- \t\t\t\tslog.Error("panic recovered", "value", rec, "path", r.URL.Path)
556
- \t\t\t\thttp.Error(w, "internal server error", http.StatusInternalServerError)
557
- \t\t\t}
558
- \t\t}()
559
- \t\tnext.ServeHTTP(w, r)
560
- \t})
561
- }
542
+ await fs.writeFile(path.join(dir, 'internal', 'middleware', 'recover.go'), `package middleware
543
+
544
+ import (
545
+ \t"log/slog"
546
+ \t"net/http"
547
+ )
548
+
549
+ // Recover intercepts panics in handlers and turns them into 500 responses
550
+ // instead of letting the goroutine crash the server.
551
+ func Recover(next http.Handler) http.Handler {
552
+ \treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
553
+ \t\tdefer func() {
554
+ \t\t\tif rec := recover(); rec != nil {
555
+ \t\t\t\tslog.Error("panic recovered", "value", rec, "path", r.URL.Path)
556
+ \t\t\t\thttp.Error(w, "internal server error", http.StatusInternalServerError)
557
+ \t\t\t}
558
+ \t\t}()
559
+ \t\tnext.ServeHTTP(w, r)
560
+ \t})
561
+ }
562
562
  `);
563
563
  await go.run(['mod', 'tidy']);
564
564
  }
@@ -643,126 +643,126 @@ async function bootstrapLeptosFullstack(dir, projectName, mode, isMonorepo) {
643
643
  ``,
644
644
  ].join('\n'));
645
645
  // src/lib.rs — shared App component + hydrate entry for WASM
646
- await fs.writeFile(path.join(dir, 'src', 'lib.rs'), `pub mod app;
647
-
648
- #[cfg(feature = "hydrate")]
649
- #[wasm_bindgen::prelude::wasm_bindgen]
650
- pub fn hydrate() {
651
- use app::App;
652
- console_error_panic_hook::set_once();
653
- leptos::mount::hydrate_body(App);
654
- }
646
+ await fs.writeFile(path.join(dir, 'src', 'lib.rs'), `pub mod app;
647
+
648
+ #[cfg(feature = "hydrate")]
649
+ #[wasm_bindgen::prelude::wasm_bindgen]
650
+ pub fn hydrate() {
651
+ use app::App;
652
+ console_error_panic_hook::set_once();
653
+ leptos::mount::hydrate_body(App);
654
+ }
655
655
  `);
656
656
  // src/app.rs — App component with basic router
657
- await fs.writeFile(path.join(dir, 'src', 'app.rs'), `use leptos::prelude::*;
658
- use leptos_meta::*;
659
- use leptos_router::{components::Router, path};
660
-
661
- pub fn shell(options: LeptosOptions) -> impl IntoView {
662
- view! {
663
- <!DOCTYPE html>
664
- <html lang="en">
665
- <head>
666
- <meta charset="UTF-8"/>
667
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
668
- <AutoReload options=options.clone()/>
669
- <HydrationScripts options=options.clone()/>
670
- <MetaTags/>
671
- </head>
672
- <body>
673
- <App/>
674
- </body>
675
- </html>
676
- }
677
- }
678
-
679
- #[component]
680
- pub fn App() -> impl IntoView {
681
- provide_meta_context();
682
-
683
- view! {
684
- <Title text="${projectName}"/>
685
- <Router>
686
- <main>
687
- <Routes fallback=|| view! { <p>"Not found."</p> }>
688
- <Route path=path!("/") view=HomePage/>
689
- </Routes>
690
- </main>
691
- </Router>
692
- }
693
- }
694
-
695
- #[component]
696
- fn HomePage() -> impl IntoView {
697
- let (count, set_count) = signal(0);
698
-
699
- view! {
700
- <h1>"${projectName}"</h1>
701
- <button on:click=move |_| set_count.update(|n| *n += 1)>
702
- "Count: " {count}
703
- </button>
704
- }
705
- }
657
+ await fs.writeFile(path.join(dir, 'src', 'app.rs'), `use leptos::prelude::*;
658
+ use leptos_meta::*;
659
+ use leptos_router::{components::Router, path};
660
+
661
+ pub fn shell(options: LeptosOptions) -> impl IntoView {
662
+ view! {
663
+ <!DOCTYPE html>
664
+ <html lang="en">
665
+ <head>
666
+ <meta charset="UTF-8"/>
667
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
668
+ <AutoReload options=options.clone()/>
669
+ <HydrationScripts options=options.clone()/>
670
+ <MetaTags/>
671
+ </head>
672
+ <body>
673
+ <App/>
674
+ </body>
675
+ </html>
676
+ }
677
+ }
678
+
679
+ #[component]
680
+ pub fn App() -> impl IntoView {
681
+ provide_meta_context();
682
+
683
+ view! {
684
+ <Title text="${projectName}"/>
685
+ <Router>
686
+ <main>
687
+ <Routes fallback=|| view! { <p>"Not found."</p> }>
688
+ <Route path=path!("/") view=HomePage/>
689
+ </Routes>
690
+ </main>
691
+ </Router>
692
+ }
693
+ }
694
+
695
+ #[component]
696
+ fn HomePage() -> impl IntoView {
697
+ let (count, set_count) = signal(0);
698
+
699
+ view! {
700
+ <h1>"${projectName}"</h1>
701
+ <button on:click=move |_| set_count.update(|n| *n += 1)>
702
+ "Count: " {count}
703
+ </button>
704
+ }
705
+ }
706
706
  `.replace(/\${projectName}/g, projectName));
707
707
  // src/main.rs — SSR server entry (Axum + leptos_axum)
708
- await fs.writeFile(path.join(dir, 'src', 'main.rs'), `#[cfg(feature = "ssr")]
709
- #[tokio::main]
710
- async fn main() {
711
- use axum::Router;
712
- use leptos::prelude::*;
713
- use leptos_axum::{generate_route_list, LeptosRoutes};
714
- use ${crateIdent}::app::{shell, App};
715
-
716
- let conf = get_configuration(None).unwrap();
717
- let leptos_options = conf.leptos_options;
718
- let addr = leptos_options.site_addr;
719
- let routes = generate_route_list(App);
720
-
721
- let app = Router::new()
722
- .leptos_routes(&leptos_options, routes, {
723
- let leptos_options = leptos_options.clone();
724
- move || shell(leptos_options.clone())
725
- })
726
- .fallback(leptos_axum::file_and_error_handler(shell))
727
- .with_state(leptos_options);
728
-
729
- println!("Listening on http://{}", addr);
730
- let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
731
- axum::serve(listener, app).await.unwrap();
732
- }
733
-
734
- #[cfg(not(feature = "ssr"))]
735
- pub fn main() {}
708
+ await fs.writeFile(path.join(dir, 'src', 'main.rs'), `#[cfg(feature = "ssr")]
709
+ #[tokio::main]
710
+ async fn main() {
711
+ use axum::Router;
712
+ use leptos::prelude::*;
713
+ use leptos_axum::{generate_route_list, LeptosRoutes};
714
+ use ${crateIdent}::app::{shell, App};
715
+
716
+ let conf = get_configuration(None).unwrap();
717
+ let leptos_options = conf.leptos_options;
718
+ let addr = leptos_options.site_addr;
719
+ let routes = generate_route_list(App);
720
+
721
+ let app = Router::new()
722
+ .leptos_routes(&leptos_options, routes, {
723
+ let leptos_options = leptos_options.clone();
724
+ move || shell(leptos_options.clone())
725
+ })
726
+ .fallback(leptos_axum::file_and_error_handler(shell))
727
+ .with_state(leptos_options);
728
+
729
+ println!("Listening on http://{}", addr);
730
+ let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
731
+ axum::serve(listener, app).await.unwrap();
732
+ }
733
+
734
+ #[cfg(not(feature = "ssr"))]
735
+ pub fn main() {}
736
736
  `);
737
737
  // style/main.scss
738
- await fs.writeFile(path.join(dir, 'style', 'main.scss'), `:root {
739
- font-family: system-ui, sans-serif;
740
- }
741
-
742
- body {
743
- max-width: 800px;
744
- margin: 0 auto;
745
- padding: 2rem;
746
- }
747
-
748
- h1 {
749
- color: #b7410e;
750
- }
751
-
752
- button {
753
- padding: 0.5rem 1rem;
754
- font-size: 1rem;
755
- cursor: pointer;
756
- }
738
+ await fs.writeFile(path.join(dir, 'style', 'main.scss'), `:root {
739
+ font-family: system-ui, sans-serif;
740
+ }
741
+
742
+ body {
743
+ max-width: 800px;
744
+ margin: 0 auto;
745
+ padding: 2rem;
746
+ }
747
+
748
+ h1 {
749
+ color: #b7410e;
750
+ }
751
+
752
+ button {
753
+ padding: 0.5rem 1rem;
754
+ font-size: 1rem;
755
+ cursor: pointer;
756
+ }
757
757
  `);
758
758
  // .cargo/config.toml — only needed when this crate is the workspace root.
759
759
  // In a monorepo the root Cargo workspace already has this file; writing it
760
760
  // inside the frontend/ member dir is redundant and can confuse tooling.
761
761
  if (!isMonorepo) {
762
- await fs.writeFile(path.join(dir, '.cargo', 'config.toml'), `# DARE: Do NOT add a global [build] target here.
763
- # Mixed workspaces (Leptos WASM + native crates like napi-rs or aya) will break
764
- # if cargo tries to compile all crates for the same target.
765
- # cargo-leptos manages wasm32-unknown-unknown target per-crate automatically.
762
+ await fs.writeFile(path.join(dir, '.cargo', 'config.toml'), `# DARE: Do NOT add a global [build] target here.
763
+ # Mixed workspaces (Leptos WASM + native crates like napi-rs or aya) will break
764
+ # if cargo tries to compile all crates for the same target.
765
+ # cargo-leptos manages wasm32-unknown-unknown target per-crate automatically.
766
766
  `);
767
767
  }
768
768
  await cargo.run(['fetch']);
@@ -811,77 +811,77 @@ async function bootstrapLeptosCsr(dir, projectName, mode, isMonorepo) {
811
811
  ``,
812
812
  ].join('\n'));
813
813
  // src/lib.rs — App component, mount entry for trunk
814
- await fs.writeFile(path.join(dir, 'src', 'lib.rs'), `use leptos::prelude::*;
815
-
816
- pub fn main() {
817
- console_error_panic_hook::set_once();
818
- leptos::mount::mount_to_body(App);
819
- }
820
-
821
- #[component]
822
- pub fn App() -> impl IntoView {
823
- let (count, set_count) = signal(0);
824
-
825
- view! {
826
- <main>
827
- <h1>"${projectName}"</h1>
828
- <button on:click=move |_| set_count.update(|n| *n += 1)>
829
- "Count: " {count}
830
- </button>
831
- </main>
832
- }
833
- }
814
+ await fs.writeFile(path.join(dir, 'src', 'lib.rs'), `use leptos::prelude::*;
815
+
816
+ pub fn main() {
817
+ console_error_panic_hook::set_once();
818
+ leptos::mount::mount_to_body(App);
819
+ }
820
+
821
+ #[component]
822
+ pub fn App() -> impl IntoView {
823
+ let (count, set_count) = signal(0);
824
+
825
+ view! {
826
+ <main>
827
+ <h1>"${projectName}"</h1>
828
+ <button on:click=move |_| set_count.update(|n| *n += 1)>
829
+ "Count: " {count}
830
+ </button>
831
+ </main>
832
+ }
833
+ }
834
834
  `.replace('${projectName}', projectName));
835
835
  // index.html — trunk entry point (data-trunk attributes tell trunk what to bundle)
836
- await fs.writeFile(path.join(dir, 'index.html'), `<!doctype html>
837
- <html lang="en">
838
- <head>
839
- <meta charset="UTF-8" />
840
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
841
- <title>${projectName}</title>
842
- <link data-trunk rel="scss" href="style/main.scss" />
843
- <link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" />
844
- </head>
845
- <body></body>
846
- </html>
836
+ await fs.writeFile(path.join(dir, 'index.html'), `<!doctype html>
837
+ <html lang="en">
838
+ <head>
839
+ <meta charset="UTF-8" />
840
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
841
+ <title>${projectName}</title>
842
+ <link data-trunk rel="scss" href="style/main.scss" />
843
+ <link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" />
844
+ </head>
845
+ <body></body>
846
+ </html>
847
847
  `.replace(/\${projectName}/g, projectName));
848
848
  // Trunk.toml
849
- await fs.writeFile(path.join(dir, 'Trunk.toml'), `[build]
850
- target = "index.html"
851
- dist = "dist"
852
-
853
- [watch]
854
- ignore = ["./dist"]
855
-
856
- [serve]
857
- port = 3001
858
- open = false
849
+ await fs.writeFile(path.join(dir, 'Trunk.toml'), `[build]
850
+ target = "index.html"
851
+ dist = "dist"
852
+
853
+ [watch]
854
+ ignore = ["./dist"]
855
+
856
+ [serve]
857
+ port = 3001
858
+ open = false
859
859
  `);
860
860
  // style/main.scss
861
- await fs.writeFile(path.join(dir, 'style', 'main.scss'), `:root {
862
- font-family: system-ui, sans-serif;
863
- }
864
-
865
- body {
866
- max-width: 800px;
867
- margin: 0 auto;
868
- padding: 2rem;
869
- }
870
-
871
- h1 {
872
- color: #b7410e;
873
- }
874
-
875
- button {
876
- padding: 0.5rem 1rem;
877
- font-size: 1rem;
878
- cursor: pointer;
879
- }
861
+ await fs.writeFile(path.join(dir, 'style', 'main.scss'), `:root {
862
+ font-family: system-ui, sans-serif;
863
+ }
864
+
865
+ body {
866
+ max-width: 800px;
867
+ margin: 0 auto;
868
+ padding: 2rem;
869
+ }
870
+
871
+ h1 {
872
+ color: #b7410e;
873
+ }
874
+
875
+ button {
876
+ padding: 0.5rem 1rem;
877
+ font-size: 1rem;
878
+ cursor: pointer;
879
+ }
880
880
  `);
881
881
  // .cargo/config.toml — omit when inside a Cargo workspace (root already has it)
882
882
  if (!isMonorepo) {
883
- await fs.writeFile(path.join(dir, '.cargo', 'config.toml'), `# DARE: Do NOT add a global [build] target here.
884
- # trunk manages wasm32-unknown-unknown target automatically via its own build pipeline.
883
+ await fs.writeFile(path.join(dir, '.cargo', 'config.toml'), `# DARE: Do NOT add a global [build] target here.
884
+ # trunk manages wasm32-unknown-unknown target automatically via its own build pipeline.
885
885
  `);
886
886
  }
887
887
  await cargo.run(['fetch']);