@tdk-landscape/tdk-cli-core 1.3.53 → 1.3.54

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 (388) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/cli/dist/generator/extension-fetch.js +16 -9
  3. package/cli/package.json +1 -1
  4. package/package.json +16 -1
  5. package/.claude/skills/layer-autoresearch/SKILL.md +0 -48
  6. package/.claude/skills/tdk-troubleshoot/SKILL.md +0 -222
  7. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -40
  8. package/.github/ISSUE_TEMPLATE/config.yml +0 -11
  9. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -18
  10. package/.github/ISSUE_TEMPLATE/premium_license.yml +0 -43
  11. package/.github/dependabot.yml +0 -33
  12. package/.github/pull_request_template.md +0 -5
  13. package/.github/workflows/ci.yml +0 -200
  14. package/.github/workflows/release-binaries.yml +0 -139
  15. package/.github/zizmor.yml +0 -9
  16. package/.pre-commit-config.yaml +0 -57
  17. package/CODE_OF_CONDUCT.md +0 -9
  18. package/CONTRIBUTING.md +0 -42
  19. package/Makefile +0 -92
  20. package/SECURITY.md +0 -17
  21. package/benchmarks/results/container-scale-2026-09-25T20-54-49-736Z.json +0 -45
  22. package/benchmarks/results/container-scale-2026-09-25T21-01-20-540Z.json +0 -150
  23. package/benchmarks/results/container-scale-2026-09-25T21-15-01-441Z.json +0 -73
  24. package/benchmarks/results/container-scale-2026-09-25T22-09-01-630Z.json +0 -77
  25. package/benchmarks/results/container-scale-2026-09-25T22-18-28-371Z.json +0 -202
  26. package/cli/AGENTS.md +0 -390
  27. package/cli/DESIGN.md +0 -735
  28. package/cli/README.md +0 -292
  29. package/cli/biome.json +0 -40
  30. package/cli/dependency-graph.svg +0 -1135
  31. package/cli/dist/cli.d.ts +0 -3
  32. package/cli/dist/cli.d.ts.map +0 -1
  33. package/cli/dist/cli.js.map +0 -1
  34. package/cli/dist/commands/completion.d.ts +0 -3
  35. package/cli/dist/commands/completion.d.ts.map +0 -1
  36. package/cli/dist/commands/completion.js.map +0 -1
  37. package/cli/dist/commands/config.d.ts +0 -3
  38. package/cli/dist/commands/config.d.ts.map +0 -1
  39. package/cli/dist/commands/config.js.map +0 -1
  40. package/cli/dist/commands/doctor.d.ts +0 -19
  41. package/cli/dist/commands/doctor.d.ts.map +0 -1
  42. package/cli/dist/commands/doctor.js.map +0 -1
  43. package/cli/dist/commands/down.d.ts +0 -3
  44. package/cli/dist/commands/down.d.ts.map +0 -1
  45. package/cli/dist/commands/down.js.map +0 -1
  46. package/cli/dist/commands/help.d.ts +0 -2
  47. package/cli/dist/commands/help.d.ts.map +0 -1
  48. package/cli/dist/commands/help.js.map +0 -1
  49. package/cli/dist/commands/networks.d.ts +0 -3
  50. package/cli/dist/commands/networks.d.ts.map +0 -1
  51. package/cli/dist/commands/networks.js.map +0 -1
  52. package/cli/dist/commands/project.d.ts +0 -9
  53. package/cli/dist/commands/project.d.ts.map +0 -1
  54. package/cli/dist/commands/project.js.map +0 -1
  55. package/cli/dist/commands/projects.d.ts +0 -3
  56. package/cli/dist/commands/projects.d.ts.map +0 -1
  57. package/cli/dist/commands/projects.js.map +0 -1
  58. package/cli/dist/commands/resource.d.ts +0 -69
  59. package/cli/dist/commands/resource.d.ts.map +0 -1
  60. package/cli/dist/commands/resource.js.map +0 -1
  61. package/cli/dist/commands/resources.d.ts +0 -3
  62. package/cli/dist/commands/resources.d.ts.map +0 -1
  63. package/cli/dist/commands/resources.js.map +0 -1
  64. package/cli/dist/commands/stack.d.ts +0 -3
  65. package/cli/dist/commands/stack.d.ts.map +0 -1
  66. package/cli/dist/commands/stack.js.map +0 -1
  67. package/cli/dist/commands/stacks.d.ts +0 -3
  68. package/cli/dist/commands/stacks.d.ts.map +0 -1
  69. package/cli/dist/commands/stacks.js.map +0 -1
  70. package/cli/dist/commands/status.d.ts +0 -3
  71. package/cli/dist/commands/status.d.ts.map +0 -1
  72. package/cli/dist/commands/status.js.map +0 -1
  73. package/cli/dist/commands/ui.d.ts +0 -3
  74. package/cli/dist/commands/ui.d.ts.map +0 -1
  75. package/cli/dist/commands/ui.js.map +0 -1
  76. package/cli/dist/commands/up.d.ts +0 -3
  77. package/cli/dist/commands/up.d.ts.map +0 -1
  78. package/cli/dist/commands/up.js.map +0 -1
  79. package/cli/dist/commands/upgrade.d.ts +0 -14
  80. package/cli/dist/commands/upgrade.d.ts.map +0 -1
  81. package/cli/dist/commands/upgrade.js.map +0 -1
  82. package/cli/dist/commands/version.d.ts +0 -3
  83. package/cli/dist/commands/version.d.ts.map +0 -1
  84. package/cli/dist/commands/version.js.map +0 -1
  85. package/cli/dist/components/Accessible.d.ts +0 -8
  86. package/cli/dist/components/Accessible.d.ts.map +0 -1
  87. package/cli/dist/components/Accessible.js.map +0 -1
  88. package/cli/dist/components/BaseTooltip.d.ts +0 -4
  89. package/cli/dist/components/BaseTooltip.d.ts.map +0 -1
  90. package/cli/dist/components/BaseTooltip.js.map +0 -1
  91. package/cli/dist/components/DetailPanel.d.ts +0 -4
  92. package/cli/dist/components/DetailPanel.d.ts.map +0 -1
  93. package/cli/dist/components/DetailPanel.js.map +0 -1
  94. package/cli/dist/components/FileTree.d.ts +0 -4
  95. package/cli/dist/components/FileTree.d.ts.map +0 -1
  96. package/cli/dist/components/FileTree.js.map +0 -1
  97. package/cli/dist/components/ResourceSelectInput.d.ts +0 -4
  98. package/cli/dist/components/ResourceSelectInput.d.ts.map +0 -1
  99. package/cli/dist/components/ResourceSelectInput.js.map +0 -1
  100. package/cli/dist/components/ResourceTable.d.ts +0 -4
  101. package/cli/dist/components/ResourceTable.d.ts.map +0 -1
  102. package/cli/dist/components/ResourceTable.js.map +0 -1
  103. package/cli/dist/components/TabBar.d.ts +0 -4
  104. package/cli/dist/components/TabBar.d.ts.map +0 -1
  105. package/cli/dist/components/TabBar.js.map +0 -1
  106. package/cli/dist/components/Tooltip.d.ts +0 -12
  107. package/cli/dist/components/Tooltip.d.ts.map +0 -1
  108. package/cli/dist/components/Tooltip.js.map +0 -1
  109. package/cli/dist/components/index.d.ts +0 -8
  110. package/cli/dist/components/index.d.ts.map +0 -1
  111. package/cli/dist/components/index.js.map +0 -1
  112. package/cli/dist/config/platform-standards.d.ts +0 -159
  113. package/cli/dist/config/platform-standards.d.ts.map +0 -1
  114. package/cli/dist/config/platform-standards.js.map +0 -1
  115. package/cli/dist/generator/extension-fetch.d.ts +0 -25
  116. package/cli/dist/generator/extension-fetch.d.ts.map +0 -1
  117. package/cli/dist/generator/extension-fetch.js.map +0 -1
  118. package/cli/dist/generator/template-engine.d.ts +0 -62
  119. package/cli/dist/generator/template-engine.d.ts.map +0 -1
  120. package/cli/dist/generator/template-engine.js.map +0 -1
  121. package/cli/dist/index.d.ts +0 -11
  122. package/cli/dist/index.d.ts.map +0 -1
  123. package/cli/dist/index.js.map +0 -1
  124. package/cli/dist/types/index.d.ts +0 -257
  125. package/cli/dist/types/index.d.ts.map +0 -1
  126. package/cli/dist/types/index.js.map +0 -1
  127. package/cli/dist/utils/cache.d.ts +0 -19
  128. package/cli/dist/utils/cache.d.ts.map +0 -1
  129. package/cli/dist/utils/cache.js.map +0 -1
  130. package/cli/dist/utils/command-helpers.d.ts +0 -17
  131. package/cli/dist/utils/command-helpers.d.ts.map +0 -1
  132. package/cli/dist/utils/command-helpers.js.map +0 -1
  133. package/cli/dist/utils/constants.d.ts +0 -53
  134. package/cli/dist/utils/constants.d.ts.map +0 -1
  135. package/cli/dist/utils/constants.js.map +0 -1
  136. package/cli/dist/utils/discovery-context.d.ts +0 -4
  137. package/cli/dist/utils/discovery-context.d.ts.map +0 -1
  138. package/cli/dist/utils/discovery-context.js.map +0 -1
  139. package/cli/dist/utils/docker.d.ts +0 -4
  140. package/cli/dist/utils/docker.d.ts.map +0 -1
  141. package/cli/dist/utils/docker.js.map +0 -1
  142. package/cli/dist/utils/doctor-runtime.d.ts +0 -81
  143. package/cli/dist/utils/doctor-runtime.d.ts.map +0 -1
  144. package/cli/dist/utils/doctor-runtime.js.map +0 -1
  145. package/cli/dist/utils/env-validator.d.ts +0 -15
  146. package/cli/dist/utils/env-validator.d.ts.map +0 -1
  147. package/cli/dist/utils/env-validator.js.map +0 -1
  148. package/cli/dist/utils/errors.d.ts +0 -31
  149. package/cli/dist/utils/errors.d.ts.map +0 -1
  150. package/cli/dist/utils/errors.js.map +0 -1
  151. package/cli/dist/utils/file-helpers.d.ts +0 -14
  152. package/cli/dist/utils/file-helpers.d.ts.map +0 -1
  153. package/cli/dist/utils/file-helpers.js.map +0 -1
  154. package/cli/dist/utils/formatting.d.ts +0 -30
  155. package/cli/dist/utils/formatting.d.ts.map +0 -1
  156. package/cli/dist/utils/formatting.js.map +0 -1
  157. package/cli/dist/utils/paths.d.ts +0 -3
  158. package/cli/dist/utils/paths.d.ts.map +0 -1
  159. package/cli/dist/utils/paths.js.map +0 -1
  160. package/cli/dist/utils/port-assignment.d.ts +0 -6
  161. package/cli/dist/utils/port-assignment.d.ts.map +0 -1
  162. package/cli/dist/utils/port-assignment.js.map +0 -1
  163. package/cli/dist/utils/project-features.d.ts +0 -23
  164. package/cli/dist/utils/project-features.d.ts.map +0 -1
  165. package/cli/dist/utils/project-features.js.map +0 -1
  166. package/cli/dist/utils/project-templates.d.ts +0 -7
  167. package/cli/dist/utils/project-templates.d.ts.map +0 -1
  168. package/cli/dist/utils/project-templates.js.map +0 -1
  169. package/cli/dist/utils/prompt.d.ts +0 -28
  170. package/cli/dist/utils/prompt.d.ts.map +0 -1
  171. package/cli/dist/utils/prompt.js.map +0 -1
  172. package/cli/dist/utils/resource-features.d.ts +0 -29
  173. package/cli/dist/utils/resource-features.d.ts.map +0 -1
  174. package/cli/dist/utils/resource-features.js.map +0 -1
  175. package/cli/dist/utils/service-urls.d.ts +0 -30
  176. package/cli/dist/utils/service-urls.d.ts.map +0 -1
  177. package/cli/dist/utils/service-urls.js.map +0 -1
  178. package/cli/dist/utils/services.d.ts +0 -18
  179. package/cli/dist/utils/services.d.ts.map +0 -1
  180. package/cli/dist/utils/services.js.map +0 -1
  181. package/cli/dist/utils/stack-features.d.ts +0 -22
  182. package/cli/dist/utils/stack-features.d.ts.map +0 -1
  183. package/cli/dist/utils/stack-features.js.map +0 -1
  184. package/cli/dist/utils/tar.d.ts +0 -7
  185. package/cli/dist/utils/tar.d.ts.map +0 -1
  186. package/cli/dist/utils/tar.js.map +0 -1
  187. package/cli/dist/utils/tilt.d.ts +0 -20
  188. package/cli/dist/utils/tilt.d.ts.map +0 -1
  189. package/cli/dist/utils/tilt.js.map +0 -1
  190. package/cli/dist/utils/validation.d.ts +0 -16
  191. package/cli/dist/utils/validation.d.ts.map +0 -1
  192. package/cli/dist/utils/validation.js.map +0 -1
  193. package/cli/knip.json +0 -6
  194. package/cli/pnpm-lock.yaml +0 -2305
  195. package/cli/pnpm-workspace.yaml +0 -2
  196. package/cli/src/cli.ts +0 -72
  197. package/cli/src/commands/__tests__/always-enabled-infra.test.ts +0 -109
  198. package/cli/src/commands/__tests__/config.test.ts +0 -146
  199. package/cli/src/commands/__tests__/doctor.test.ts +0 -730
  200. package/cli/src/commands/__tests__/error-handling.test.ts +0 -78
  201. package/cli/src/commands/__tests__/phases-model.test.ts +0 -161
  202. package/cli/src/commands/__tests__/project-resource-features-e2e.test.ts +0 -187
  203. package/cli/src/commands/__tests__/project.test.ts +0 -68
  204. package/cli/src/commands/__tests__/resource.test.ts +0 -226
  205. package/cli/src/commands/__tests__/saas-starter-integration.test.ts +0 -194
  206. package/cli/src/commands/__tests__/stack-features-e2e.test.ts +0 -135
  207. package/cli/src/commands/__tests__/upgrade.test.ts +0 -198
  208. package/cli/src/commands/completion.ts +0 -300
  209. package/cli/src/commands/config.ts +0 -299
  210. package/cli/src/commands/doctor.ts +0 -926
  211. package/cli/src/commands/down.ts +0 -37
  212. package/cli/src/commands/help.ts +0 -143
  213. package/cli/src/commands/networks-design.md +0 -80
  214. package/cli/src/commands/networks.ts +0 -332
  215. package/cli/src/commands/project.ts +0 -456
  216. package/cli/src/commands/projects.ts +0 -82
  217. package/cli/src/commands/resource.ts +0 -652
  218. package/cli/src/commands/resources.ts +0 -95
  219. package/cli/src/commands/stack.ts +0 -128
  220. package/cli/src/commands/stacks.ts +0 -52
  221. package/cli/src/commands/status.ts +0 -88
  222. package/cli/src/commands/ui.tsx +0 -843
  223. package/cli/src/commands/up.ts +0 -169
  224. package/cli/src/commands/upgrade.ts +0 -628
  225. package/cli/src/commands/version.ts +0 -9
  226. package/cli/src/components/Accessible.tsx +0 -21
  227. package/cli/src/components/BaseTooltip.tsx +0 -66
  228. package/cli/src/components/DetailPanel.tsx +0 -146
  229. package/cli/src/components/FileTree.tsx +0 -89
  230. package/cli/src/components/ResourceSelectInput.tsx +0 -30
  231. package/cli/src/components/ResourceTable.tsx +0 -78
  232. package/cli/src/components/TabBar.tsx +0 -53
  233. package/cli/src/components/Tooltip.tsx +0 -11
  234. package/cli/src/components/index.ts +0 -7
  235. package/cli/src/config/platform-standards.test.ts +0 -11
  236. package/cli/src/config/platform-standards.ts +0 -196
  237. package/cli/src/generator/__tests__/extension-fetch.test.ts +0 -242
  238. package/cli/src/generator/__tests__/template-engine.test.ts +0 -70
  239. package/cli/src/generator/extension-fetch.ts +0 -286
  240. package/cli/src/generator/template-engine.ts +0 -752
  241. package/cli/src/index.ts +0 -86
  242. package/cli/src/templates.d.ts +0 -4
  243. package/cli/src/types/index.ts +0 -353
  244. package/cli/src/utils/__tests__/cache.test.ts +0 -98
  245. package/cli/src/utils/__tests__/formatting.test.ts +0 -170
  246. package/cli/src/utils/__tests__/paths.test.ts +0 -180
  247. package/cli/src/utils/__tests__/port-assignment.test.ts +0 -121
  248. package/cli/src/utils/__tests__/service-urls.test.ts +0 -174
  249. package/cli/src/utils/__tests__/services.test.ts +0 -531
  250. package/cli/src/utils/__tests__/tilt.test.ts +0 -172
  251. package/cli/src/utils/__tests__/validation.test.ts +0 -148
  252. package/cli/src/utils/cache.ts +0 -76
  253. package/cli/src/utils/command-helpers.ts +0 -54
  254. package/cli/src/utils/constants.ts +0 -130
  255. package/cli/src/utils/discovery-context.ts +0 -49
  256. package/cli/src/utils/docker.ts +0 -20
  257. package/cli/src/utils/doctor-runtime.ts +0 -644
  258. package/cli/src/utils/env-validator.ts +0 -139
  259. package/cli/src/utils/errors.ts +0 -168
  260. package/cli/src/utils/file-helpers.ts +0 -62
  261. package/cli/src/utils/formatting.ts +0 -215
  262. package/cli/src/utils/paths.ts +0 -53
  263. package/cli/src/utils/port-assignment.ts +0 -106
  264. package/cli/src/utils/project-features.ts +0 -118
  265. package/cli/src/utils/project-templates.ts +0 -29
  266. package/cli/src/utils/prompt.ts +0 -128
  267. package/cli/src/utils/resource-features.ts +0 -215
  268. package/cli/src/utils/service-urls.ts +0 -124
  269. package/cli/src/utils/services.ts +0 -364
  270. package/cli/src/utils/stack-features.ts +0 -30
  271. package/cli/src/utils/tar.ts +0 -24
  272. package/cli/src/utils/tilt.ts +0 -133
  273. package/cli/src/utils/validation.ts +0 -67
  274. package/cli/tsconfig.json +0 -25
  275. package/cli/tsconfig.typecheck.json +0 -8
  276. package/docs/FEATURES.md +0 -281
  277. package/docs/demo.svg +0 -217
  278. package/engine/docs/AUTODISCOVERY_TEST.md +0 -182
  279. package/engine/docs/C4-ARCHITECTURE-operations.md +0 -396
  280. package/engine/docs/C4-ARCHITECTURE-overview.md +0 -284
  281. package/engine/docs/C4-ARCHITECTURE.md +0 -17
  282. package/engine/docs/GOLDEN_IMAGE_INTEGRATION.md +0 -349
  283. package/engine/docs/MANIFEST_DRIVEN_ARCHITECTURE.md +0 -357
  284. package/engine/docs/README.md +0 -284
  285. package/install.sh +0 -19
  286. package/knip.json +0 -10
  287. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/.openspec.yaml +0 -2
  288. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/design.md +0 -102
  289. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/proposal.md +0 -31
  290. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-notifications/spec.md +0 -48
  291. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-orchestration/spec.md +0 -63
  292. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-troubleshooting/spec.md +0 -56
  293. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/tasks.md +0 -61
  294. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/.openspec.yaml +0 -2
  295. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/design.md +0 -114
  296. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/proposal.md +0 -32
  297. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/manifest-field-migration/spec.md +0 -20
  298. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/resource-terminology-standard/spec.md +0 -20
  299. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/stack-terminology-standard/spec.md +0 -20
  300. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/tasks.md +0 -194
  301. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/.openspec.yaml +0 -2
  302. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/design.md +0 -111
  303. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/proposal.md +0 -33
  304. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/function-naming-alignment/spec.md +0 -12
  305. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/optional-parameter-patterns/spec.md +0 -18
  306. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-documentation/spec.md +0 -16
  307. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-naming-consistency/spec.md +0 -12
  308. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-ordering-standard/spec.md +0 -12
  309. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/tasks.md +0 -194
  310. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/.openspec.yaml +0 -2
  311. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/design.md +0 -84
  312. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/proposal.md +0 -31
  313. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/codebase-audit/spec.md +0 -27
  314. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/dead-code-cleanup/spec.md +0 -27
  315. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/test-gap-fill/spec.md +0 -23
  316. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/todo-resolution/spec.md +0 -27
  317. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/tasks.md +0 -39
  318. package/openspec/changes/archive/2026-06-25-landscape-consolidation/.openspec.yaml +0 -2
  319. package/openspec/changes/archive/2026-06-25-landscape-consolidation/design.md +0 -80
  320. package/openspec/changes/archive/2026-06-25-landscape-consolidation/proposal.md +0 -40
  321. package/openspec/changes/archive/2026-06-25-landscape-consolidation/spec.md +0 -52
  322. package/openspec/changes/archive/2026-06-25-landscape-consolidation/tasks.md +0 -51
  323. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/.openspec.yaml +0 -2
  324. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/design.md +0 -43
  325. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/proposal.md +0 -29
  326. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/specs/self-contained-generated-projects/spec.md +0 -67
  327. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/tasks.md +0 -27
  328. package/openspec/changes/optimize-runtime-docker-layers/.openspec.yaml +0 -3
  329. package/openspec/changes/optimize-runtime-docker-layers/design.md +0 -81
  330. package/openspec/changes/optimize-runtime-docker-layers/proposal.md +0 -44
  331. package/openspec/changes/optimize-runtime-docker-layers/specs/runtime-container-footprint/spec.md +0 -79
  332. package/openspec/changes/optimize-runtime-docker-layers/tasks.md +0 -36
  333. package/openspec/changes/prioritized-cold-start/.openspec.yaml +0 -4
  334. package/openspec/changes/prioritized-cold-start/design.md +0 -137
  335. package/openspec/changes/prioritized-cold-start/proposal.md +0 -41
  336. package/openspec/changes/prioritized-cold-start/specs/on-demand-resource-startup/spec.md +0 -98
  337. package/openspec/changes/prioritized-cold-start/tasks.md +0 -69
  338. package/openspec/config.yaml +0 -1
  339. package/openspec/specs/manifest-field-migration/spec.md +0 -24
  340. package/openspec/specs/resource-terminology-standard/spec.md +0 -24
  341. package/openspec/specs/self-contained-generated-projects/spec.md +0 -67
  342. package/openspec/specs/stack-terminology-standard/spec.md +0 -24
  343. package/platform/services/platform/proxy/service.yaml +0 -14
  344. package/scripts/audit-codebase.sh +0 -213
  345. package/scripts/autoresearch/layer-eval.sh +0 -65
  346. package/scripts/benchmark/README.md +0 -25
  347. package/scripts/benchmark/container-scale.ts +0 -503
  348. package/scripts/benchmark/pre-release-gate.sh +0 -9
  349. package/scripts/install-git-hooks.sh +0 -14
  350. package/scripts/measure-idle-footprint.sh +0 -58
  351. package/scripts/record-demo.sh +0 -43
  352. package/scripts/release-binaries.sh +0 -97
  353. package/scripts/setup-pre-commit.sh +0 -33
  354. package/scripts/stage-npm-engine.sh +0 -36
  355. package/tests/tilt-engine/__init__.py +0 -5
  356. package/tests/tilt-engine/conftest.py +0 -182
  357. package/tests/tilt-engine/fixtures/appointment-frontend-service.json +0 -11
  358. package/tests/tilt-engine/fixtures/identity-backend-service.json +0 -12
  359. package/tests/tilt-engine/fixtures/invalid-service.json +0 -4
  360. package/tests/tilt-engine/test_agents_md_generator.py +0 -341
  361. package/tests/tilt-engine/test_agents_md_integration.py +0 -378
  362. package/tests/tilt-engine/test_cache_operations.py +0 -181
  363. package/tests/tilt-engine/test_cache_persistence.py +0 -142
  364. package/tests/tilt-engine/test_code_executor.py +0 -152
  365. package/tests/tilt-engine/test_code_viewer.py +0 -127
  366. package/tests/tilt-engine/test_compose_port_anchors.py +0 -310
  367. package/tests/tilt-engine/test_config_inspector.py +0 -162
  368. package/tests/tilt-engine/test_daemon_focus_mode.py +0 -89
  369. package/tests/tilt-engine/test_daemon_polling.py +0 -122
  370. package/tests/tilt-engine/test_daemon_registration.py +0 -115
  371. package/tests/tilt-engine/test_daemon_validation.py +0 -107
  372. package/tests/tilt-engine/test_docker_generator_bugs.py +0 -493
  373. package/tests/tilt-engine/test_docker_prune.py +0 -119
  374. package/tests/tilt-engine/test_dockerignore_path_bug.py +0 -82
  375. package/tests/tilt-engine/test_file_browser.py +0 -193
  376. package/tests/tilt-engine/test_frontend_basepath_manifest.py +0 -27
  377. package/tests/tilt-engine/test_health_dependencies.py +0 -130
  378. package/tests/tilt-engine/test_health_endpoints.py +0 -118
  379. package/tests/tilt-engine/test_health_tilt_ui.py +0 -85
  380. package/tests/tilt-engine/test_runtime_container_footprint.py +0 -162
  381. package/tests/tilt-engine/test_sablier_defer_start.py +0 -237
  382. package/tests/tilt-engine/test_safety_aliases.py +0 -84
  383. package/tests/tilt-engine/test_snapshot_diff.py +0 -136
  384. package/tests/tilt-engine/test_snapshot_persistence.py +0 -163
  385. package/tests/tilt-engine/test_snapshot_scanning.py +0 -123
  386. package/tests/tilt-engine/test_standalone_project_boot.py +0 -61
  387. package/tests/tilt-engine/test_standalone_traefik.py +0 -160
  388. package/tests/tilt-engine/test_traefik_static_wake_route.py +0 -187
@@ -1,226 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import {
3
- BASE_TEMPLATE,
4
- createPackageJson,
5
- createServiceJson,
6
- DOCKERFILE_TEMPLATE,
7
- getBackendIndexTemplate,
8
- getWorkerIndexTemplate,
9
- TSCONFIG_TEMPLATE,
10
- TYPE_SPECIFIC,
11
- } from "../../commands/resource.js";
12
- import { CREATABLE_RESOURCE_TYPES, isCreatableResourceType } from "../../types/index.js";
13
- import { KEBAB_CASE_REGEX } from "../../utils/validation.js";
14
-
15
- describe("resource command", () => {
16
- describe("resource name validation", () => {
17
- it("should accept valid kebab-case names using KEBAB_CASE_REGEX", () => {
18
- const validNames = ["my-service", "service123", "api-gateway", "a", "test-123-abc"];
19
-
20
- for (const name of validNames) {
21
- expect(KEBAB_CASE_REGEX.test(name)).toBe(true);
22
- }
23
- });
24
-
25
- it("should reject invalid names using KEBAB_CASE_REGEX", () => {
26
- const invalidNames = [
27
- "MyService", // camelCase
28
- "my_service", // underscore
29
- "my service", // space
30
- "service.name", // dot
31
- "Service-Name", // uppercase
32
- "", // empty
33
- ];
34
-
35
- for (const name of invalidNames) {
36
- expect(KEBAB_CASE_REGEX.test(name)).toBe(false);
37
- }
38
- });
39
- });
40
-
41
- describe("service.json template", () => {
42
- it("should create valid backend service.json using createServiceJson", () => {
43
- const name = "test-backend";
44
- const type = "backend";
45
- const stack = "main";
46
- const port = 3001;
47
-
48
- const serviceJson = createServiceJson(name, type, stack, port);
49
-
50
- expect(serviceJson).toHaveProperty("name", name);
51
- expect(serviceJson).toHaveProperty("type", type);
52
- expect(serviceJson).toHaveProperty("port", port);
53
- expect(serviceJson).toHaveProperty("stack", stack);
54
- expect(serviceJson).toHaveProperty("healthCheck", "/health");
55
- expect(serviceJson).toHaveProperty("dependencies");
56
- expect(serviceJson).toHaveProperty("build");
57
- expect(serviceJson).toHaveProperty("dev");
58
- });
59
-
60
- it("should create valid frontend service.json using createServiceJson", () => {
61
- const name = "test-frontend";
62
- const type = "frontend";
63
- const stack = "main";
64
- const port = 3002;
65
-
66
- const serviceJson = createServiceJson(name, type, stack, port);
67
-
68
- expect(serviceJson).toHaveProperty("name", name);
69
- expect(serviceJson).toHaveProperty("type", type);
70
- expect(serviceJson).toHaveProperty("port", port);
71
- expect(serviceJson.dev.watch).toContain("public/**/*");
72
- });
73
-
74
- it("should create valid worker service.json using createServiceJson", () => {
75
- const name = "test-worker";
76
- const type = "worker";
77
- const stack = "main";
78
- const port = 0;
79
-
80
- const serviceJson = createServiceJson(name, type, stack, port);
81
-
82
- expect(serviceJson).toHaveProperty("name", name);
83
- expect(serviceJson).toHaveProperty("type", type);
84
- expect(serviceJson.port).toBe(0); // Workers may not need ports
85
- expect(serviceJson.dev.command).toBe("bun run worker");
86
- });
87
-
88
- it("should have correct TYPE_SPECIFIC extensions for each resource type", () => {
89
- expect(TYPE_SPECIFIC.backend).toHaveProperty("healthCheck", "/health");
90
- expect(TYPE_SPECIFIC.frontend.dev?.watch).toContain("public/**/*");
91
- expect(TYPE_SPECIFIC.worker.dev?.command).toBe("bun run worker");
92
- });
93
-
94
- it("should have correct BASE_TEMPLATE structure", () => {
95
- expect(BASE_TEMPLATE).toHaveProperty("port", 0);
96
- expect(BASE_TEMPLATE).toHaveProperty("dependencies");
97
- expect(BASE_TEMPLATE).toHaveProperty("build");
98
- expect(BASE_TEMPLATE).toHaveProperty("dev");
99
- expect(BASE_TEMPLATE.build).toHaveProperty("dockerfile", "Dockerfile");
100
- });
101
- });
102
-
103
- describe("package.json template", () => {
104
- it("should create backend package.json with Hono using createPackageJson", () => {
105
- const name = "test-backend";
106
- const type = "backend";
107
-
108
- const packageJson = createPackageJson(name, type);
109
-
110
- expect(packageJson.name).toBe(`@project/${name}`);
111
- expect(packageJson).toHaveProperty("dependencies");
112
- expect(packageJson.dependencies).toHaveProperty("hono");
113
- expect(packageJson.dependencies).not.toHaveProperty("vite");
114
- expect(packageJson.scripts.dev).toBe("bun run --watch src/index.ts");
115
- });
116
-
117
- it("should create frontend package.json with Vite using createPackageJson", () => {
118
- const name = "test-frontend";
119
- const type = "frontend";
120
-
121
- const packageJson = createPackageJson(name, type);
122
-
123
- expect(packageJson.name).toBe(`@project/${name}`);
124
- expect(packageJson.dependencies).not.toHaveProperty("hono");
125
- expect(packageJson.devDependencies).toHaveProperty("vite");
126
- expect(packageJson.scripts.dev).toBe("vite");
127
- });
128
-
129
- it("should create worker package.json using createPackageJson", () => {
130
- const name = "test-worker";
131
- const type = "worker";
132
-
133
- const packageJson = createPackageJson(name, type);
134
-
135
- expect(packageJson.name).toBe(`@project/${name}`);
136
- expect(packageJson.dependencies).toHaveProperty("hono");
137
- expect(packageJson.scripts.build).toBe("tsc");
138
- });
139
- });
140
-
141
- describe("tsconfig template", () => {
142
- it("should have correct TSCONFIG_TEMPLATE structure", () => {
143
- expect(TSCONFIG_TEMPLATE).toHaveProperty("compilerOptions");
144
- expect(TSCONFIG_TEMPLATE.compilerOptions).toHaveProperty("target", "ES2022");
145
- expect(TSCONFIG_TEMPLATE.compilerOptions).toHaveProperty("module", "ESNext");
146
- expect(TSCONFIG_TEMPLATE.compilerOptions).toHaveProperty("strict", true);
147
- expect(TSCONFIG_TEMPLATE).toHaveProperty("include");
148
- expect(TSCONFIG_TEMPLATE.include).toContain("src/**/*");
149
- });
150
- });
151
-
152
- describe("dockerfile template", () => {
153
- it("should have correct DOCKERFILE_TEMPLATE content", () => {
154
- expect(DOCKERFILE_TEMPLATE).toContain("FROM oven/bun:1.2");
155
- expect(DOCKERFILE_TEMPLATE).toContain("WORKDIR /app");
156
- expect(DOCKERFILE_TEMPLATE).toContain("HEALTHCHECK");
157
- expect(DOCKERFILE_TEMPLATE).toContain("EXPOSE 3000");
158
- expect(DOCKERFILE_TEMPLATE).toContain("bun install --frozen-lockfile");
159
- });
160
- });
161
-
162
- describe("backend index.ts template", () => {
163
- it("should have health check endpoints via getBackendIndexTemplate", () => {
164
- const name = "test-service";
165
- const indexContent = getBackendIndexTemplate(name);
166
-
167
- expect(indexContent).toContain("app.get('/health'");
168
- expect(indexContent).toContain("app.get('/health/live'");
169
- expect(indexContent).toContain("app.get('/health/ready'");
170
- expect(indexContent).toContain("async (c)");
171
- expect(indexContent).toContain(`service: '${name}'`);
172
- });
173
-
174
- it("should have root endpoint with service info", () => {
175
- const name = "test-service";
176
- const indexContent = getBackendIndexTemplate(name);
177
-
178
- expect(indexContent).toContain("app.get('/',");
179
- expect(indexContent).toContain("endpoints:");
180
- });
181
- });
182
-
183
- describe("worker index.ts template", () => {
184
- it("should have worker configuration via getWorkerIndexTemplate", () => {
185
- const name = "test-worker";
186
- const workerContent = getWorkerIndexTemplate(name);
187
-
188
- expect(workerContent).toContain("WORKER_POLL_INTERVAL");
189
- expect(workerContent).toContain("WORKER_MAX_RETRIES");
190
- expect(workerContent).toContain("WORKER_BATCH_SIZE");
191
- expect(workerContent).toContain("interface Job");
192
- expect(workerContent).toContain("async function main()");
193
- });
194
-
195
- it("should have graceful shutdown handling", () => {
196
- const name = "test-worker";
197
- const workerContent = getWorkerIndexTemplate(name);
198
-
199
- expect(workerContent).toContain("process.on('SIGTERM'");
200
- expect(workerContent).toContain("process.on('SIGINT'");
201
- expect(workerContent).toContain("shutting down gracefully");
202
- });
203
- });
204
-
205
- describe("resource type validation", () => {
206
- it("should only accept valid resource types via isCreatableResourceType", () => {
207
- const validTypes = ["backend", "frontend", "worker"];
208
- const invalidTypes = ["api", "microservice", "service", "app", "library", "sdk"];
209
-
210
- for (const type of validTypes) {
211
- expect(isCreatableResourceType(type)).toBe(true);
212
- }
213
-
214
- for (const type of invalidTypes) {
215
- expect(isCreatableResourceType(type)).toBe(false);
216
- }
217
- });
218
-
219
- it("should have correct CREATABLE_RESOURCE_TYPES", () => {
220
- expect(CREATABLE_RESOURCE_TYPES).toContain("backend");
221
- expect(CREATABLE_RESOURCE_TYPES).toContain("frontend");
222
- expect(CREATABLE_RESOURCE_TYPES).toContain("worker");
223
- expect(CREATABLE_RESOURCE_TYPES).toHaveLength(3);
224
- });
225
- });
226
- });
@@ -1,194 +0,0 @@
1
- import { execSync } from "node:child_process";
2
- import { existsSync, readFileSync, writeFileSync } from "node:fs";
3
- import { tmpdir } from "node:os";
4
- import { dirname, join } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
- import { afterEach, beforeEach, describe, expect, it } from "vitest";
7
-
8
- // Get the CLI bin path dynamically
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = dirname(__filename);
11
- const CLI_BIN_PATH = join(__dirname, "..", "..", "..", "bin", "tdk.js");
12
-
13
- // `tdk doctor` requires these (see REQUIRED_ENV_VARS in ../../utils/env-validator.ts);
14
- // an empty .env satisfies `tdk project`'s docker-compose validation but leaves doctor
15
- // reporting "Environment not ready". Use the same defaults env-validator would generate.
16
- function writeTestEnvFile(starterRoot: string) {
17
- writeFileSync(
18
- join(starterRoot, ".env"),
19
- "VERDACCIO_URL_DOCKER=http://verdaccio:4873\nTILT_ENV=dev\nDB_PASSWORD=test-password\n",
20
- );
21
- }
22
-
23
- // tdk-cli-extensions is a sibling checkout, not a dependency of this repo, so its
24
- // location varies per machine. Respect an explicit override, then fall back to the
25
- // conventional sibling-directory layout (both repos checked out next to each other),
26
- // instead of hardcoding one contributor's absolute path.
27
- const REPO_ROOT = join(__dirname, "..", "..", "..", "..");
28
- const EXTENSION_SOURCE =
29
- process.env.TDK_EXTENSION_SOURCE ?? join(REPO_ROOT, "..", "tdk-cli-extensions");
30
- const EXTENSION_SOURCE_AVAILABLE = existsSync(EXTENSION_SOURCE);
31
-
32
- describe.skipIf(!EXTENSION_SOURCE_AVAILABLE)("saas-starter cloning and discovery", () => {
33
- if (!EXTENSION_SOURCE_AVAILABLE) {
34
- console.warn(
35
- `Skipping saas-starter integration tests: tdk-cli-extensions not found at ${EXTENSION_SOURCE}. ` +
36
- "Set TDK_EXTENSION_SOURCE to its checkout path to run these.",
37
- );
38
- }
39
-
40
- let testDir: string;
41
-
42
- beforeEach(() => {
43
- testDir = join(tmpdir(), `tdk-saas-test-${Date.now()}`);
44
- });
45
-
46
- afterEach(() => {
47
- try {
48
- // Safety: only delete if path is under tmpdir and contains our test marker
49
- if (
50
- testDir?.startsWith(tmpdir()) &&
51
- testDir.includes("tdk-saas-test-") &&
52
- testDir.length > 20
53
- ) {
54
- execSync(`rm -rf "${testDir}"`, { stdio: "pipe" });
55
- }
56
- } catch {
57
- // cleanup best-effort
58
- }
59
- });
60
-
61
- /**
62
- * Verifies that `tdk project saas` clones the repo correctly with required
63
- * structure (services/stack/service/service.json files).
64
- */
65
- it("should clone saas-starter with valid file structure", () => {
66
- const cwd = testDir;
67
- execSync(`mkdir -p "${cwd}"`, { stdio: "pipe" });
68
-
69
- const result = execSync(`cd "${cwd}" && bun "${CLI_BIN_PATH}" project saas --yes`, {
70
- encoding: "utf-8",
71
- stdio: "pipe",
72
- });
73
-
74
- expect(result).toContain("Cloned");
75
- expect(existsSync(join(cwd, "tdk-saas-starter", "services"))).toBe(true);
76
-
77
- // Verify all 4 saas services exist with valid service.json
78
- const services = [
79
- "services/app/dashboard-api/service.json",
80
- "services/app/dashboard-app/service.json",
81
- "services/billing/billing-api/service.json",
82
- "services/billing/checkout-app/service.json",
83
- ];
84
-
85
- for (const svc of services) {
86
- const path = join(cwd, "tdk-saas-starter", svc);
87
- expect(existsSync(path)).toBe(true);
88
- const content = readFileSync(path, "utf-8");
89
- const manifest = JSON.parse(content);
90
- expect(manifest).toHaveProperty("appName");
91
- expect(manifest).toHaveProperty("stack");
92
- expect(manifest.healthCheck).toBeDefined();
93
- }
94
- }, 30000); // 30s: clones the real saas-starter repo over the network
95
-
96
- /**
97
- * Verifies that `tdk project --yes` (after cloning) correctly discovers
98
- * the existing service stacks (app, billing) from service.json files and
99
- * auto-populates them in project.json's pre_alpha services, so that
100
- * `tdk up` will enable them (before fix: they were silently filtered out
101
- * in Tilt discovery).
102
- */
103
- it("should auto-populate discovered services in project.json", () => {
104
- const cwd = testDir;
105
- execSync(`mkdir -p "${cwd}"`, { stdio: "pipe" });
106
-
107
- // Clone
108
- execSync(`cd "${cwd}" && bun "${CLI_BIN_PATH}" project saas --yes`, {
109
- stdio: "pipe",
110
- });
111
-
112
- const starterRoot = join(cwd, "tdk-saas-starter");
113
- writeTestEnvFile(starterRoot);
114
-
115
- // Generate project config
116
- execSync(
117
- `cd "${starterRoot}" && TDK_EXTENSION_SOURCE="${EXTENSION_SOURCE}" bun "${CLI_BIN_PATH}" project --yes`,
118
- { stdio: "pipe" },
119
- );
120
-
121
- // Verify project.json has services populated
122
- const projectJsonPath = join(starterRoot, ".tdk", "project.json");
123
- expect(existsSync(projectJsonPath)).toBe(true);
124
-
125
- const projectJson = JSON.parse(readFileSync(projectJsonPath, "utf-8"));
126
- expect(projectJson.phases.pre_alpha.enabledStacks).toContain("app");
127
- expect(projectJson.phases.pre_alpha.enabledStacks).toContain("billing");
128
- }, 30000); // 30s: clones the real saas-starter repo over the network
129
-
130
- /**
131
- * Verifies that spec.master is generated with PRE_ALPHA_RESOURCES dict
132
- * containing the discovered stacks, so that Tilt's should_enable() check
133
- * will allow them to pass through (before fix: PRE_ALPHA_RESOURCES was empty,
134
- * and only infra resources appeared in `tilt get uiresources`).
135
- */
136
- it("should generate spec.master with discovered services in PRE_ALPHA_RESOURCES", () => {
137
- const cwd = testDir;
138
- execSync(`mkdir -p "${cwd}"`, { stdio: "pipe" });
139
-
140
- execSync(`cd "${cwd}" && bun ${CLI_BIN_PATH} project saas --yes`, {
141
- stdio: "pipe",
142
- });
143
-
144
- const starterRoot = join(cwd, "tdk-saas-starter");
145
- writeTestEnvFile(starterRoot);
146
-
147
- execSync(
148
- `cd "${starterRoot}" && TDK_EXTENSION_SOURCE="${EXTENSION_SOURCE}" bun ${CLI_BIN_PATH} project --yes`,
149
- { stdio: "pipe" },
150
- );
151
-
152
- const specPath = join(starterRoot, ".tdk", ".tdk-out", "spec.master");
153
- expect(existsSync(specPath)).toBe(true);
154
-
155
- const specContent = readFileSync(specPath, "utf-8");
156
-
157
- // Before fix: PRE_ALPHA_RESOURCES = { }
158
- // After fix: PRE_ALPHA_RESOURCES = { "app": True, "billing": True, }
159
- expect(specContent).toContain("PRE_ALPHA_RESOURCES = {");
160
- expect(specContent).toMatch(/"app":\s*True/);
161
- expect(specContent).toMatch(/"billing":\s*True/);
162
- expect(specContent).toContain("FOCUS_PRE_ALPHA = list(PRE_ALPHA_RESOURCES.keys())");
163
- });
164
-
165
- /**
166
- * Verifies that `tdk doctor` correctly reports master configs as present
167
- * (they are in .tdk/.tdk-out/, not the project root).
168
- */
169
- it("should pass doctor check after project init", () => {
170
- const cwd = testDir;
171
- execSync(`mkdir -p "${cwd}"`, { stdio: "pipe" });
172
-
173
- execSync(`cd "${cwd}" && bun ${CLI_BIN_PATH} project saas --yes`, {
174
- stdio: "pipe",
175
- });
176
-
177
- const starterRoot = join(cwd, "tdk-saas-starter");
178
- writeTestEnvFile(starterRoot);
179
-
180
- execSync(
181
- `cd "${starterRoot}" && TDK_EXTENSION_SOURCE="${EXTENSION_SOURCE}" bun ${CLI_BIN_PATH} project --yes`,
182
- { stdio: "pipe" },
183
- );
184
-
185
- // Doctor should pass (all master configs present)
186
- const doctorResult = execSync(`cd "${starterRoot}" && bun "${CLI_BIN_PATH}" doctor`, {
187
- encoding: "utf-8",
188
- stdio: "pipe",
189
- timeout: 60_000,
190
- });
191
-
192
- expect(doctorResult).toContain("Environment ready");
193
- });
194
- });
@@ -1,135 +0,0 @@
1
- import { execFileSync } from "node:child_process";
2
- import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
- import { tmpdir } from "node:os";
4
- import { dirname, join, resolve } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
- import { afterEach, describe, expect, it } from "vitest";
7
-
8
- const __filename = fileURLToPath(import.meta.url);
9
- const __dirname = dirname(__filename);
10
- const repoRoot = resolve(__dirname, "../../../..");
11
- const cliBin = join(repoRoot, "cli", "bin", "tdk.js");
12
-
13
- function runTdk(args: string[], cwd: string): string {
14
- return execFileSync("bun", [cliBin, ...args], {
15
- cwd,
16
- encoding: "utf-8",
17
- env: {
18
- ...process.env,
19
- TDK_EXTENSION_SOURCE: repoRoot,
20
- },
21
- });
22
- }
23
-
24
- describe("stack feature E2E", () => {
25
- let projectRoot = "";
26
-
27
- afterEach(() => {
28
- if (projectRoot?.startsWith(tmpdir())) {
29
- rmSync(projectRoot, { recursive: true, force: true });
30
- }
31
- });
32
-
33
- it("generates database-management compose from pre_alpha services", () => {
34
- projectRoot = mkdtempSync(join(tmpdir(), "tdk-stack-feature-"));
35
-
36
- const output = runTdk(["project", "--yes"], projectRoot);
37
- expect(output).toContain("Generated: services/platform/database-management/docker-compose.yml");
38
-
39
- const projectJson = JSON.parse(
40
- readFileSync(join(projectRoot, ".tdk", "project.json"), "utf-8"),
41
- );
42
- expect(projectJson.stack_features).toBeUndefined();
43
- expect(projectJson.phases.pre_alpha.enabledStacks).toContain("database-management");
44
-
45
- const composePath = join(
46
- projectRoot,
47
- "services",
48
- "platform",
49
- "database-management",
50
- "docker-compose.yml",
51
- );
52
- expect(existsSync(composePath)).toBe(true);
53
-
54
- const compose = readFileSync(composePath, "utf-8");
55
- expect(compose).toContain("Stack feature: database-management");
56
- expect(compose).toContain(
57
- 'Source: .tdk/project.json phases.*.enabledStacks includes "database-management"',
58
- );
59
- expect(compose).toContain("container_name: tdk_stack_feature_");
60
- expect(compose).toContain("_postgres");
61
- expect(compose).toContain("_database");
62
-
63
- const spec = readFileSync(join(projectRoot, ".tdk", ".tdk-out", "spec.master"), "utf-8");
64
- expect(spec).toMatch(/"database-management":\s*True/);
65
- expect(spec).not.toContain("STACK_FEATURES");
66
-
67
- const tiltignore = readFileSync(join(projectRoot, ".tiltignore"), "utf-8");
68
- expect(tiltignore).toContain("**/.autogenerated/**");
69
- });
70
-
71
- it("does not keep database-management enabled after it leaves stack services", () => {
72
- projectRoot = mkdtempSync(join(tmpdir(), "tdk-stack-feature-off-"));
73
- runTdk(["project", "--yes"], projectRoot);
74
-
75
- const projectJsonPath = join(projectRoot, ".tdk", "project.json");
76
- const projectJson = JSON.parse(readFileSync(projectJsonPath, "utf-8"));
77
- projectJson.phases.pre_alpha.enabledStacks = projectJson.phases.pre_alpha.enabledStacks.filter(
78
- (service: string) => service !== "database-management",
79
- );
80
- writeFileSync(projectJsonPath, `${JSON.stringify(projectJson, null, 2)}\n`);
81
-
82
- runTdk(["project", "--yes"], projectRoot);
83
-
84
- const spec = readFileSync(join(projectRoot, ".tdk", ".tdk-out", "spec.master"), "utf-8");
85
- expect(spec).not.toMatch(/"database-management":\s*True/);
86
- expect(spec).not.toContain("STACK_FEATURES");
87
- });
88
-
89
- it("dedupes a duplicated service name in project.json instead of emitting a duplicate Starlark key", () => {
90
- projectRoot = mkdtempSync(join(tmpdir(), "tdk-stack-feature-dupe-"));
91
- runTdk(["project", "--yes"], projectRoot);
92
-
93
- const projectJsonPath = join(projectRoot, ".tdk", "project.json");
94
- const projectJson = JSON.parse(readFileSync(projectJsonPath, "utf-8"));
95
- projectJson.phases.pre_alpha.enabledStacks.push("database-management");
96
- writeFileSync(projectJsonPath, `${JSON.stringify(projectJson, null, 2)}\n`);
97
-
98
- runTdk(["project"], projectRoot);
99
-
100
- const spec = readFileSync(join(projectRoot, ".tdk", ".tdk-out", "spec.master"), "utf-8");
101
- const matches = spec.match(/"database-management":\s*True/g) ?? [];
102
- expect(matches.length).toBe(1);
103
- });
104
-
105
- it("adds newly discovered unassigned service stacks to pre_alpha on regeneration", () => {
106
- projectRoot = mkdtempSync(join(tmpdir(), "tdk-stack-discovery-sync-"));
107
- runTdk(["project", "--yes"], projectRoot);
108
-
109
- const serviceDir = join(projectRoot, "services", "billing", "checkout-app");
110
- mkdirSync(serviceDir, { recursive: true });
111
- writeFileSync(
112
- join(serviceDir, "service.json"),
113
- `${JSON.stringify(
114
- {
115
- appName: "checkout-app",
116
- appType: "frontend",
117
- stack: "billing",
118
- port: 3210,
119
- },
120
- null,
121
- 2,
122
- )}\n`,
123
- );
124
-
125
- runTdk(["project", "--yes"], projectRoot);
126
-
127
- const projectJson = JSON.parse(
128
- readFileSync(join(projectRoot, ".tdk", "project.json"), "utf-8"),
129
- );
130
- expect(projectJson.phases.pre_alpha.enabledStacks).toContain("billing");
131
-
132
- const spec = readFileSync(join(projectRoot, ".tdk", ".tdk-out", "spec.master"), "utf-8");
133
- expect(spec).toMatch(/"billing":\s*True/);
134
- });
135
- });