@tdk-landscape/tdk-cli-core 1.3.49 → 1.3.50

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 (309) hide show
  1. package/.claude/skills/layer-autoresearch/SKILL.md +48 -0
  2. package/.claude/skills/tdk-troubleshoot/SKILL.md +222 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.yml +40 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.yml +18 -0
  6. package/.github/dependabot.yml +33 -0
  7. package/.github/pull_request_template.md +5 -0
  8. package/.github/workflows/ci.yml +187 -0
  9. package/.github/workflows/release-binaries.yml +19 -9
  10. package/.github/zizmor.yml +9 -0
  11. package/CODE_OF_CONDUCT.md +9 -0
  12. package/CONTRIBUTING.md +42 -0
  13. package/LICENSE +21 -0
  14. package/README.md +149 -0
  15. package/SECURITY.md +17 -0
  16. package/benchmarks/results/container-scale-2026-09-25T20-54-49-736Z.json +45 -0
  17. package/benchmarks/results/container-scale-2026-09-25T21-01-20-540Z.json +150 -0
  18. package/benchmarks/results/container-scale-2026-09-25T21-15-01-441Z.json +73 -0
  19. package/benchmarks/results/container-scale-2026-09-25T22-09-01-630Z.json +77 -0
  20. package/benchmarks/results/container-scale-2026-09-25T22-18-28-371Z.json +202 -0
  21. package/cli/README.md +25 -0
  22. package/cli/biome.json +1 -1
  23. package/cli/dist/cli.d.ts +3 -0
  24. package/cli/dist/cli.d.ts.map +1 -0
  25. package/cli/dist/cli.js +64 -0
  26. package/cli/dist/cli.js.map +1 -0
  27. package/cli/dist/commands/completion.d.ts +3 -0
  28. package/cli/dist/commands/completion.d.ts.map +1 -0
  29. package/cli/dist/commands/completion.js +294 -0
  30. package/cli/dist/commands/completion.js.map +1 -0
  31. package/cli/dist/commands/config.d.ts +3 -0
  32. package/cli/dist/commands/config.d.ts.map +1 -0
  33. package/cli/dist/commands/config.js +231 -0
  34. package/cli/dist/commands/config.js.map +1 -0
  35. package/cli/dist/commands/doctor.d.ts +19 -0
  36. package/cli/dist/commands/doctor.d.ts.map +1 -0
  37. package/cli/dist/commands/doctor.js +745 -0
  38. package/cli/dist/commands/doctor.js.map +1 -0
  39. package/cli/dist/commands/down.d.ts +3 -0
  40. package/cli/dist/commands/down.d.ts.map +1 -0
  41. package/cli/dist/commands/down.js +32 -0
  42. package/cli/dist/commands/down.js.map +1 -0
  43. package/cli/dist/commands/help.d.ts +2 -0
  44. package/cli/dist/commands/help.d.ts.map +1 -0
  45. package/cli/dist/commands/help.js +138 -0
  46. package/cli/dist/commands/help.js.map +1 -0
  47. package/cli/dist/commands/networks.d.ts +3 -0
  48. package/cli/dist/commands/networks.d.ts.map +1 -0
  49. package/cli/dist/commands/networks.js +260 -0
  50. package/cli/dist/commands/networks.js.map +1 -0
  51. package/cli/dist/commands/project.d.ts +3 -0
  52. package/cli/dist/commands/project.d.ts.map +1 -0
  53. package/cli/dist/commands/project.js +370 -0
  54. package/cli/dist/commands/project.js.map +1 -0
  55. package/cli/dist/commands/projects.d.ts +3 -0
  56. package/cli/dist/commands/projects.d.ts.map +1 -0
  57. package/cli/dist/commands/projects.js +71 -0
  58. package/cli/dist/commands/projects.js.map +1 -0
  59. package/cli/dist/commands/resource.d.ts +69 -0
  60. package/cli/dist/commands/resource.d.ts.map +1 -0
  61. package/cli/dist/commands/resource.js +579 -0
  62. package/cli/dist/commands/resource.js.map +1 -0
  63. package/cli/dist/commands/resources.d.ts +3 -0
  64. package/cli/dist/commands/resources.d.ts.map +1 -0
  65. package/cli/dist/commands/resources.js +73 -0
  66. package/cli/dist/commands/resources.js.map +1 -0
  67. package/cli/dist/commands/stack.d.ts +3 -0
  68. package/cli/dist/commands/stack.d.ts.map +1 -0
  69. package/cli/dist/commands/stack.js +97 -0
  70. package/cli/dist/commands/stack.js.map +1 -0
  71. package/cli/dist/commands/stacks.d.ts +3 -0
  72. package/cli/dist/commands/stacks.d.ts.map +1 -0
  73. package/cli/dist/commands/stacks.js +43 -0
  74. package/cli/dist/commands/stacks.js.map +1 -0
  75. package/cli/dist/commands/status.d.ts +3 -0
  76. package/cli/dist/commands/status.d.ts.map +1 -0
  77. package/cli/dist/commands/status.js +71 -0
  78. package/cli/dist/commands/status.js.map +1 -0
  79. package/cli/dist/commands/ui.d.ts +3 -0
  80. package/cli/dist/commands/ui.d.ts.map +1 -0
  81. package/cli/dist/commands/ui.js +445 -0
  82. package/cli/dist/commands/ui.js.map +1 -0
  83. package/cli/dist/commands/up.d.ts +3 -0
  84. package/cli/dist/commands/up.d.ts.map +1 -0
  85. package/cli/dist/commands/up.js +124 -0
  86. package/cli/dist/commands/up.js.map +1 -0
  87. package/cli/dist/commands/upgrade.d.ts +11 -0
  88. package/cli/dist/commands/upgrade.d.ts.map +1 -0
  89. package/cli/dist/commands/upgrade.js +496 -0
  90. package/cli/dist/commands/upgrade.js.map +1 -0
  91. package/cli/dist/commands/version.d.ts +3 -0
  92. package/cli/dist/commands/version.d.ts.map +1 -0
  93. package/cli/dist/commands/version.js +9 -0
  94. package/cli/dist/commands/version.js.map +1 -0
  95. package/cli/dist/components/Accessible.d.ts +8 -0
  96. package/cli/dist/components/Accessible.d.ts.map +1 -0
  97. package/cli/dist/components/Accessible.js +10 -0
  98. package/cli/dist/components/Accessible.js.map +1 -0
  99. package/cli/dist/components/BaseTooltip.d.ts +4 -0
  100. package/cli/dist/components/BaseTooltip.d.ts.map +1 -0
  101. package/cli/dist/components/BaseTooltip.js +28 -0
  102. package/cli/dist/components/BaseTooltip.js.map +1 -0
  103. package/cli/dist/components/DetailPanel.d.ts +4 -0
  104. package/cli/dist/components/DetailPanel.d.ts.map +1 -0
  105. package/cli/dist/components/DetailPanel.js +18 -0
  106. package/cli/dist/components/DetailPanel.js.map +1 -0
  107. package/cli/dist/components/FileTree.d.ts +4 -0
  108. package/cli/dist/components/FileTree.d.ts.map +1 -0
  109. package/cli/dist/components/FileTree.js +47 -0
  110. package/cli/dist/components/FileTree.js.map +1 -0
  111. package/cli/dist/components/ResourceSelectInput.d.ts +4 -0
  112. package/cli/dist/components/ResourceSelectInput.d.ts.map +1 -0
  113. package/cli/dist/components/ResourceSelectInput.js +7 -0
  114. package/cli/dist/components/ResourceSelectInput.js.map +1 -0
  115. package/cli/dist/components/ResourceTable.d.ts +4 -0
  116. package/cli/dist/components/ResourceTable.d.ts.map +1 -0
  117. package/cli/dist/components/ResourceTable.js +18 -0
  118. package/cli/dist/components/ResourceTable.js.map +1 -0
  119. package/cli/dist/components/TabBar.d.ts +4 -0
  120. package/cli/dist/components/TabBar.d.ts.map +1 -0
  121. package/cli/dist/components/TabBar.js +17 -0
  122. package/cli/dist/components/TabBar.js.map +1 -0
  123. package/cli/dist/components/Tooltip.d.ts +12 -0
  124. package/cli/dist/components/Tooltip.d.ts.map +1 -0
  125. package/cli/dist/components/Tooltip.js +12 -0
  126. package/cli/dist/components/Tooltip.js.map +1 -0
  127. package/cli/dist/components/index.d.ts +8 -0
  128. package/cli/dist/components/index.d.ts.map +1 -0
  129. package/cli/dist/components/index.js +8 -0
  130. package/cli/dist/components/index.js.map +1 -0
  131. package/cli/dist/config/platform-standards.d.ts +159 -0
  132. package/cli/dist/config/platform-standards.d.ts.map +1 -0
  133. package/cli/dist/config/platform-standards.js +181 -0
  134. package/cli/dist/config/platform-standards.js.map +1 -0
  135. package/cli/dist/generator/extension-fetch.d.ts +25 -0
  136. package/cli/dist/generator/extension-fetch.d.ts.map +1 -0
  137. package/cli/dist/generator/extension-fetch.js +259 -0
  138. package/cli/dist/generator/extension-fetch.js.map +1 -0
  139. package/cli/dist/generator/template-engine.d.ts +62 -0
  140. package/cli/dist/generator/template-engine.d.ts.map +1 -0
  141. package/cli/dist/generator/template-engine.js +623 -0
  142. package/cli/dist/generator/template-engine.js.map +1 -0
  143. package/cli/dist/index.d.ts +11 -0
  144. package/cli/dist/index.d.ts.map +1 -0
  145. package/cli/dist/index.js +11 -0
  146. package/cli/dist/index.js.map +1 -0
  147. package/cli/dist/types/index.d.ts +257 -0
  148. package/cli/dist/types/index.d.ts.map +1 -0
  149. package/cli/dist/types/index.js +17 -0
  150. package/cli/dist/types/index.js.map +1 -0
  151. package/cli/dist/utils/cache.d.ts +19 -0
  152. package/cli/dist/utils/cache.d.ts.map +1 -0
  153. package/cli/dist/utils/cache.js +64 -0
  154. package/cli/dist/utils/cache.js.map +1 -0
  155. package/cli/dist/utils/command-helpers.d.ts +17 -0
  156. package/cli/dist/utils/command-helpers.d.ts.map +1 -0
  157. package/cli/dist/utils/command-helpers.js +41 -0
  158. package/cli/dist/utils/command-helpers.js.map +1 -0
  159. package/cli/dist/utils/constants.d.ts +53 -0
  160. package/cli/dist/utils/constants.d.ts.map +1 -0
  161. package/cli/dist/utils/constants.js +115 -0
  162. package/cli/dist/utils/constants.js.map +1 -0
  163. package/cli/dist/utils/discovery-context.d.ts +4 -0
  164. package/cli/dist/utils/discovery-context.d.ts.map +1 -0
  165. package/cli/dist/utils/discovery-context.js +39 -0
  166. package/cli/dist/utils/discovery-context.js.map +1 -0
  167. package/cli/dist/utils/docker.d.ts +4 -0
  168. package/cli/dist/utils/docker.d.ts.map +1 -0
  169. package/cli/dist/utils/docker.js +19 -0
  170. package/cli/dist/utils/docker.js.map +1 -0
  171. package/cli/dist/utils/doctor-runtime.d.ts +81 -0
  172. package/cli/dist/utils/doctor-runtime.d.ts.map +1 -0
  173. package/cli/dist/utils/doctor-runtime.js +498 -0
  174. package/cli/dist/utils/doctor-runtime.js.map +1 -0
  175. package/cli/dist/utils/env-validator.d.ts +15 -0
  176. package/cli/dist/utils/env-validator.d.ts.map +1 -0
  177. package/cli/dist/utils/env-validator.js +109 -0
  178. package/cli/dist/utils/env-validator.js.map +1 -0
  179. package/cli/dist/utils/errors.d.ts +31 -0
  180. package/cli/dist/utils/errors.d.ts.map +1 -0
  181. package/cli/dist/utils/errors.js +140 -0
  182. package/cli/dist/utils/errors.js.map +1 -0
  183. package/cli/dist/utils/file-helpers.d.ts +14 -0
  184. package/cli/dist/utils/file-helpers.d.ts.map +1 -0
  185. package/cli/dist/utils/file-helpers.js +45 -0
  186. package/cli/dist/utils/file-helpers.js.map +1 -0
  187. package/cli/dist/utils/formatting.d.ts +30 -0
  188. package/cli/dist/utils/formatting.d.ts.map +1 -0
  189. package/cli/dist/utils/formatting.js +164 -0
  190. package/cli/dist/utils/formatting.js.map +1 -0
  191. package/cli/dist/utils/paths.d.ts +3 -0
  192. package/cli/dist/utils/paths.d.ts.map +1 -0
  193. package/cli/dist/utils/paths.js +41 -0
  194. package/cli/dist/utils/paths.js.map +1 -0
  195. package/cli/dist/utils/port-assignment.d.ts +6 -0
  196. package/cli/dist/utils/port-assignment.d.ts.map +1 -0
  197. package/cli/dist/utils/port-assignment.js +81 -0
  198. package/cli/dist/utils/port-assignment.js.map +1 -0
  199. package/cli/dist/utils/project-features.d.ts +23 -0
  200. package/cli/dist/utils/project-features.d.ts.map +1 -0
  201. package/cli/dist/utils/project-features.js +98 -0
  202. package/cli/dist/utils/project-features.js.map +1 -0
  203. package/cli/dist/utils/project-templates.d.ts +7 -0
  204. package/cli/dist/utils/project-templates.d.ts.map +1 -0
  205. package/cli/dist/utils/project-templates.js +24 -0
  206. package/cli/dist/utils/project-templates.js.map +1 -0
  207. package/cli/dist/utils/prompt.d.ts +28 -0
  208. package/cli/dist/utils/prompt.d.ts.map +1 -0
  209. package/cli/dist/utils/prompt.js +79 -0
  210. package/cli/dist/utils/prompt.js.map +1 -0
  211. package/cli/dist/utils/resource-features.d.ts +29 -0
  212. package/cli/dist/utils/resource-features.d.ts.map +1 -0
  213. package/cli/dist/utils/resource-features.js +175 -0
  214. package/cli/dist/utils/resource-features.js.map +1 -0
  215. package/cli/dist/utils/service-urls.d.ts +30 -0
  216. package/cli/dist/utils/service-urls.d.ts.map +1 -0
  217. package/cli/dist/utils/service-urls.js +93 -0
  218. package/cli/dist/utils/service-urls.js.map +1 -0
  219. package/cli/dist/utils/services.d.ts +18 -0
  220. package/cli/dist/utils/services.d.ts.map +1 -0
  221. package/cli/dist/utils/services.js +292 -0
  222. package/cli/dist/utils/services.js.map +1 -0
  223. package/cli/dist/utils/stack-features.d.ts +22 -0
  224. package/cli/dist/utils/stack-features.d.ts.map +1 -0
  225. package/cli/dist/utils/stack-features.js +13 -0
  226. package/cli/dist/utils/stack-features.js.map +1 -0
  227. package/cli/dist/utils/tar.d.ts +7 -0
  228. package/cli/dist/utils/tar.d.ts.map +1 -0
  229. package/cli/dist/utils/tar.js +21 -0
  230. package/cli/dist/utils/tar.js.map +1 -0
  231. package/cli/dist/utils/tilt.d.ts +20 -0
  232. package/cli/dist/utils/tilt.d.ts.map +1 -0
  233. package/cli/dist/utils/tilt.js +95 -0
  234. package/cli/dist/utils/tilt.js.map +1 -0
  235. package/cli/dist/utils/validation.d.ts +16 -0
  236. package/cli/dist/utils/validation.d.ts.map +1 -0
  237. package/cli/dist/utils/validation.js +58 -0
  238. package/cli/dist/utils/validation.js.map +1 -0
  239. package/cli/package.json +11 -12
  240. package/cli/src/commands/__tests__/always-enabled-infra.test.ts +2 -8
  241. package/cli/src/commands/__tests__/doctor.test.ts +181 -8
  242. package/cli/src/commands/__tests__/phases-model.test.ts +2 -4
  243. package/cli/src/commands/__tests__/project-resource-features-e2e.test.ts +4 -24
  244. package/cli/src/commands/__tests__/saas-starter-integration.test.ts +8 -10
  245. package/cli/src/commands/__tests__/stack-features-e2e.test.ts +10 -4
  246. package/cli/src/commands/__tests__/upgrade.test.ts +23 -13
  247. package/cli/src/commands/doctor.ts +136 -0
  248. package/cli/src/commands/help.ts +13 -3
  249. package/cli/src/commands/project.ts +11 -14
  250. package/cli/src/commands/projects.ts +2 -2
  251. package/cli/src/commands/up.ts +13 -4
  252. package/cli/src/commands/upgrade.ts +11 -4
  253. package/cli/src/config/platform-standards.test.ts +6 -6
  254. package/cli/src/generator/__tests__/extension-fetch.test.ts +36 -14
  255. package/cli/src/generator/extension-fetch.ts +12 -5
  256. package/cli/src/generator/template-engine.ts +19 -21
  257. package/cli/src/types/index.ts +2 -0
  258. package/cli/src/utils/__tests__/tilt.test.ts +29 -0
  259. package/cli/src/utils/constants.ts +4 -0
  260. package/cli/src/utils/doctor-runtime.ts +67 -27
  261. package/cli/src/utils/env-validator.ts +2 -2
  262. package/cli/src/utils/project-templates.ts +2 -1
  263. package/cli/src/utils/prompt.ts +2 -4
  264. package/cli/src/utils/resource-features.ts +10 -4
  265. package/cli/src/utils/services.ts +2 -1
  266. package/cli/src/utils/tilt.ts +20 -0
  267. package/engine/assets/docker/wake-gateway/Dockerfile +26 -0
  268. package/engine/assets/docker/wake-gateway/decide.test.ts +87 -0
  269. package/engine/assets/docker/wake-gateway/decide.ts +75 -0
  270. package/engine/assets/docker/wake-gateway/server.ts +220 -0
  271. package/engine/topologies/platform/docker/build/golden_image_dockerfile.star +13 -23
  272. package/engine/topologies/platform/docker/compose/compose.star +7 -14
  273. package/engine/topologies/platform/docker/compose/compose_helpers.star +1 -1
  274. package/engine/topologies/platform/docker/compose/traefik_standalone.star +44 -6
  275. package/engine/topologies/platform/docker/config/healthcheck.star +56 -0
  276. package/engine/topologies/platform/docker/constants.star +10 -0
  277. package/engine/topologies/platform/docker/layers/l1_base_layers.star +1 -1
  278. package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +55 -20
  279. package/engine/topologies/platform/docker/networking/traefik_static_routes.star +107 -0
  280. package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +2 -2
  281. package/engine/topologies/tilt/generators/typescript/frontend_tsconfig.star +1 -1
  282. package/engine/topologies/tilt/manifest/schema.star +6 -0
  283. package/engine/topologies/tilt/manifest/validator.star +16 -0
  284. package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +107 -8
  285. package/engine/topologies/tilt/resources/orchestrator/builders/typescript.star +12 -6
  286. package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +2 -1
  287. package/knip.json +1 -1
  288. package/openspec/changes/optimize-runtime-docker-layers/.openspec.yaml +3 -0
  289. package/openspec/changes/optimize-runtime-docker-layers/design.md +81 -0
  290. package/openspec/changes/optimize-runtime-docker-layers/proposal.md +44 -0
  291. package/openspec/changes/optimize-runtime-docker-layers/specs/runtime-container-footprint/spec.md +79 -0
  292. package/openspec/changes/optimize-runtime-docker-layers/tasks.md +36 -0
  293. package/openspec/changes/prioritized-cold-start/.openspec.yaml +4 -0
  294. package/openspec/changes/prioritized-cold-start/design.md +113 -0
  295. package/openspec/changes/prioritized-cold-start/proposal.md +40 -0
  296. package/openspec/changes/prioritized-cold-start/specs/on-demand-resource-startup/spec.md +92 -0
  297. package/openspec/changes/prioritized-cold-start/tasks.md +46 -0
  298. package/openspec/config.yaml +1 -0
  299. package/package.json +35 -5
  300. package/scripts/autoresearch/layer-eval.sh +65 -0
  301. package/scripts/benchmark/README.md +25 -0
  302. package/scripts/benchmark/container-scale.ts +503 -0
  303. package/scripts/benchmark/pre-release-gate.sh +9 -0
  304. package/scripts/measure-idle-footprint.sh +58 -0
  305. package/tests/tilt-engine/test_runtime_container_footprint.py +162 -0
  306. package/tests/tilt-engine/test_sablier_defer_start.py +196 -0
  307. package/tests/tilt-engine/test_standalone_traefik.py +38 -0
  308. package/tests/tilt-engine/test_traefik_static_wake_route.py +119 -0
  309. package/bun.lock +0 -538
@@ -0,0 +1,181 @@
1
+ import { PORT_RANGES, STANDARD_PORTS } from "../utils/constants.js";
2
+ const PLATFORM_VERSION = "1.0.0";
3
+ const TECH_STACK = {
4
+ runtime: "bun",
5
+ bundler: "vite",
6
+ language: "typescript",
7
+ framework: "hono",
8
+ database: "postgresql",
9
+ orm: "prisma",
10
+ messaging: "nats",
11
+ linting: "biome",
12
+ testing: "vitest",
13
+ };
14
+ const PORTS = {
15
+ frontend: {
16
+ base: PORT_RANGES.frontend.base,
17
+ range: PORT_RANGES.frontend.range,
18
+ start: PORT_RANGES.frontend.min,
19
+ end: PORT_RANGES.frontend.max,
20
+ },
21
+ backend: {
22
+ base: PORT_RANGES.backend.base,
23
+ range: PORT_RANGES.backend.range,
24
+ start: PORT_RANGES.backend.min,
25
+ end: PORT_RANGES.backend.max,
26
+ },
27
+ health: {
28
+ base: PORT_RANGES.health.base,
29
+ range: PORT_RANGES.health.range,
30
+ start: PORT_RANGES.health.min,
31
+ end: PORT_RANGES.health.max,
32
+ },
33
+ worker: {
34
+ base: PORT_RANGES.worker.base,
35
+ range: PORT_RANGES.worker.range,
36
+ start: PORT_RANGES.worker.min,
37
+ end: PORT_RANGES.worker.max,
38
+ },
39
+ migrator: {
40
+ base: PORT_RANGES.migrator.base,
41
+ range: PORT_RANGES.migrator.range,
42
+ start: PORT_RANGES.migrator.min,
43
+ end: PORT_RANGES.migrator.max,
44
+ },
45
+ tiltUi: STANDARD_PORTS.tiltUi,
46
+ traefik: STANDARD_PORTS.traefik,
47
+ };
48
+ const HEALTH_CHECKS = {
49
+ path: "/health",
50
+ live: "/health/live",
51
+ ready: "/health/ready",
52
+ timeout: 30,
53
+ interval: 5,
54
+ };
55
+ const NAMING = {
56
+ frontend: "-frontend",
57
+ backend: "-backend",
58
+ worker: "-worker",
59
+ migrator: "-migrator",
60
+ library: "-lib",
61
+ sdk: "-sdk",
62
+ validSeparators: ["-", "_"],
63
+ maxLength: 63,
64
+ minLength: 3,
65
+ };
66
+ const TRAEFIK = {
67
+ entrypoint: "web",
68
+ network: "traefik-public",
69
+ defaultHost: "localhost",
70
+ appHost: "app.localhost",
71
+ apiHost: "api.localhost",
72
+ appSubdomainPrefix: "app",
73
+ apiSubdomainPrefix: "api",
74
+ defaultPort: 8080,
75
+ tlsEnabled: false,
76
+ entrypoints: ["web"],
77
+ middlewares: [],
78
+ tls: { enabled: false },
79
+ healthcheckPath: "/health",
80
+ healthcheckInterval: "10s",
81
+ healthcheckTimeout: "5s",
82
+ frontendPriorityBase: 100,
83
+ };
84
+ const FILEWATCH_IGNORES = [
85
+ "node_modules",
86
+ "dist",
87
+ "build",
88
+ ".git",
89
+ ".prisma",
90
+ ".turbo",
91
+ "coverage",
92
+ "tmp",
93
+ "temp",
94
+ "__tests__",
95
+ "test",
96
+ "tests",
97
+ ];
98
+ const RESOURCE_TYPES = {
99
+ frontend: {
100
+ suffix: "-frontend",
101
+ portRange: "3000-3999",
102
+ },
103
+ backend: {
104
+ suffix: "-backend",
105
+ portRange: "4000-4999",
106
+ },
107
+ library: {
108
+ suffix: "-library",
109
+ portRange: null,
110
+ },
111
+ sdk: {
112
+ suffix: "-sdk",
113
+ portRange: "3000-9999",
114
+ },
115
+ migrator: {
116
+ suffix: "-migrator",
117
+ portRange: "7000-7999",
118
+ },
119
+ worker: {
120
+ suffix: "-worker",
121
+ portRange: "6000-6999",
122
+ },
123
+ };
124
+ const FEATURES = {
125
+ prisma: "Database ORM with migrations",
126
+ nats: "Event streaming via NATS",
127
+ redis: "Caching layer",
128
+ infisical: "Secrets management",
129
+ vitest: "Testing framework",
130
+ traefik: "HTTP routing",
131
+ websocket: "Real-time connections",
132
+ graphql: "GraphQL support",
133
+ grpc: "gRPC support",
134
+ viteNode: "Vite Node runtime",
135
+ maintenance: "Maintenance mode",
136
+ };
137
+ const PATHS = {
138
+ services: "services/product",
139
+ sharedPlatform: "shared-platform-engineering",
140
+ sharedProduct: "shared-product-engineering",
141
+ sharedDdd: "shared-ddd-layers",
142
+ };
143
+ const DISCOVERY = {
144
+ scanIntervalSeconds: 5,
145
+ maxManifestsPerRoot: 50,
146
+ servicePatterns: ["services/product/*", "services/platform/*"],
147
+ };
148
+ const DOCKER = {
149
+ dockerfile: "Dockerfile",
150
+ context: ".",
151
+ // Auto-detect native arch (arm64 on Apple Silicon, amd64 elsewhere)
152
+ // platform: "linux/amd64",
153
+ };
154
+ const RUNTIME = {
155
+ backend: {
156
+ command: "bun",
157
+ args: ["run", "dev"],
158
+ env: { NODE_ENV: "development" },
159
+ },
160
+ frontend: {
161
+ command: "bun",
162
+ args: ["run", "dev"],
163
+ env: { NODE_ENV: "development" },
164
+ },
165
+ };
166
+ export const PLATFORM_STANDARDS = {
167
+ version: PLATFORM_VERSION,
168
+ tech: TECH_STACK,
169
+ ports: PORTS,
170
+ health: HEALTH_CHECKS,
171
+ naming: NAMING,
172
+ traefik: TRAEFIK,
173
+ filewatchIgnores: FILEWATCH_IGNORES,
174
+ serviceTypes: RESOURCE_TYPES,
175
+ features: FEATURES,
176
+ paths: PATHS,
177
+ discovery: DISCOVERY,
178
+ docker: DOCKER,
179
+ runtime: RUNTIME,
180
+ };
181
+ //# sourceMappingURL=platform-standards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-standards.js","sourceRoot":"","sources":["../../src/config/platform-standards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAEjC,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,YAAY;IACtB,GAAG,EAAE,QAAQ;IACb,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,QAAQ;CACT,CAAC;AAEX,MAAM,KAAK,GAAG;IACZ,QAAQ,EAAE;QACR,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,IAAI;QAC/B,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,KAAK;QACjC,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG;QAC/B,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG;KAC9B;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI;QAC9B,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK;QAChC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG;QAC9B,GAAG,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG;KAC7B;IACD,MAAM,EAAE;QACN,IAAI,EAAE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etches (with a local, time-limited cache) the premium bundle for the
3
+ * configured license key and overlays its files onto the already-vendored
4
+ * free engine at destDir. Best-effort: returns false (never throws) if
5
+ * there's no key configured, the key doesn't grant anything, or the fetch
6
+ * fails - the caller should keep going with the free engine either way.
7
+ */
8
+ export declare function applyPremiumOverlay(projectRoot: string, destDir: string): Promise<boolean>;
9
+ /** Checks whether the configured license key grants the "verdaccio" resource. */
10
+ export declare function hasVerdaccioLicense(projectRoot: string): Promise<boolean>;
11
+ /**
12
+ * Checks whether the configured license key grants the "ddd" resource
13
+ * (domain-driven-design folder structure + path aliases for backend
14
+ * resources - see generate_backend_path_aliases() in
15
+ * engine/topologies/tilt/generators/vite/helpers.star).
16
+ */
17
+ export declare function hasDddLicense(projectRoot: string): Promise<boolean>;
18
+ /**
19
+ * Checks whether the configured license key grants the "sablier" resource
20
+ * (on-demand start/stop for idle resources via a `sablier: {enable: true}`
21
+ * manifest block - see sablier_container_cycle.star in
22
+ * engine/topologies/platform/docker/networking/).
23
+ */
24
+ export declare function hasSablierLicense(projectRoot: string): Promise<boolean>;
25
+ //# sourceMappingURL=extension-fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-fetch.d.ts","sourceRoot":"","sources":["../../src/generator/extension-fetch.ts"],"names":[],"mappings":"AAgJA;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAyChG;AAsED,iFAAiF;AACjF,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/E;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEzE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE7E"}
@@ -0,0 +1,259 @@
1
+ // Fetches the paid-tier "premium" resource bundle (playwright, c4-diagram,
2
+ // logging, agents-md, sablier, verdaccio, and a few other extras - see
3
+ // tdk-cli-extensions/premium/) from the gated distribution worker, when a
4
+ // license key is configured. The free engine never needs this for its own
5
+ // resources - docker-compose, npm, bun, etc. are already public in this
6
+ // repo, no key required.
7
+ //
8
+ // DDD (domain-driven-design scaffolding) is the one paid feature that is
9
+ // NOT a file overlay: it's gated separately by hasDddLicense() below, via
10
+ // the shared hasLiveResourceLicense() helper, since its code stays in this
11
+ // public repo and is turned on/off by a runtime check rather than swapped
12
+ // in - see that helper's own comment for why it can't just be added to
13
+ // KNOWN_RESOURCES. hasVerdaccioLicense()/hasSablierLicense() also use that
14
+ // same helper, but only to print a "this needs a license" warning in
15
+ // template-engine.ts - Verdaccio and Sablier's real gate is the file
16
+ // overlay above (their public files are disabled stubs, not gated code).
17
+ //
18
+ // The worker (tdk-extension-dist) is the real access-control boundary: it
19
+ // checks the key against BUNDLES_REPO/keys/*.json - existence, activation/
20
+ // expiry dates, granted resources, and a per-key project limit - before
21
+ // serving anything. This client just asks and, if granted, unpacks the
22
+ // result over the vendored stub files so the generator pipeline picks up
23
+ // the real implementations transparently. See
24
+ // tdk-extension-dist/src/index.ts for the server-side enforcement and
25
+ // tdk-extension-dist/src/project-limit.ts for the project-limit logic.
26
+ import { randomUUID } from "node:crypto";
27
+ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
28
+ import { homedir } from "node:os";
29
+ import { join } from "node:path";
30
+ import { extractTarball } from "../utils/tar.js";
31
+ const DEFAULT_ENDPOINT = "https://tdk-extension-dist.oranguman.workers.dev/v1/premium/bundle.tar.gz";
32
+ // Tried in order until one is granted - the worker unlocks the whole
33
+ // bundle on the first resource name a key is found to grant, since
34
+ // premium.tar.gz ships all paid resources together. Keep in sync with
35
+ // what issue-key.yml/update-key.yml accept as `resources` entries.
36
+ const KNOWN_RESOURCES = [
37
+ "playwright",
38
+ "c4-diagram",
39
+ "logging",
40
+ "agents-md",
41
+ "sablier",
42
+ "verdaccio",
43
+ ];
44
+ // Re-check the license periodically rather than trusting a local cache
45
+ // forever - an expired or revoked key shouldn't keep unlocking premium
46
+ // content indefinitely just because it worked once.
47
+ const CACHE_TTL_MS = 12 * 60 * 60 * 1000;
48
+ // Maps each file's path inside premium.tar.gz to where it belongs in the
49
+ // vendored engine output, so the generator pipeline finds it in the same
50
+ // place the free stub (or, for the never-wired items, nothing at all)
51
+ // used to be.
52
+ const PREMIUM_PATH_MAP = {
53
+ "typescript/playwright_config.star": "engine/topologies/tilt/generators/typescript/playwright_config.star",
54
+ "generators/agents_md.star": "engine/topologies/tilt/generators/agents_md.star",
55
+ "c4_diagram.star": "engine/topologies/tilt/generators/c4_diagram.star",
56
+ "observability/logging.star": "engine/topologies/platform/observability/logging.star",
57
+ "generators/database_provisioner.star": "engine/topologies/tilt/generators/database_provisioner.star",
58
+ "generators/dependency_manifest.star": "engine/topologies/tilt/generators/dependency_manifest.star",
59
+ "generators/fixed_frontend_tsconfig.star": "engine/topologies/tilt/generators/typescript/fixed_frontend_tsconfig.star",
60
+ "synthetic_monitor.star": "engine/resources/synthetic_monitor.star",
61
+ "synthetic-monitor-topology.star": "engine/topologies/platform/services/synthetic-monitor.star",
62
+ "database-management-service.yaml": "platform/services/platform/database-management/service.yaml",
63
+ "networking/sablier_container_cycle.star": "engine/topologies/platform/docker/networking/sablier_container_cycle.star",
64
+ "registries/verdaccio_loader.star": "engine/topologies/platform/registries/verdaccio_loader.star",
65
+ };
66
+ function getLicenseKey() {
67
+ return process.env.TDK_LICENSE_KEY?.trim() || null;
68
+ }
69
+ function getEndpoint() {
70
+ return process.env.TDK_PREMIUM_ENDPOINT?.trim() || DEFAULT_ENDPOINT;
71
+ }
72
+ // A stable per-project id for the worker's project-limit tracking - not a
73
+ // device or user id. Generated once and persisted alongside the rest of
74
+ // the project's .tdk/ state.
75
+ function getOrCreateProjectId(projectRoot) {
76
+ const idPath = join(projectRoot, ".tdk", ".project-id");
77
+ if (existsSync(idPath)) {
78
+ return readFileSync(idPath, "utf-8").trim();
79
+ }
80
+ const id = randomUUID();
81
+ mkdirSync(join(projectRoot, ".tdk"), { recursive: true });
82
+ writeFileSync(idPath, `${id}\n`);
83
+ return id;
84
+ }
85
+ function cacheTarballPath(key) {
86
+ // Cache is per-key (not shared across different keys on the same
87
+ // machine) so switching license keys doesn't serve a stale bundle
88
+ // fetched under a different plan.
89
+ const safeName = key.replace(/[^a-zA-Z0-9_-]/g, "_");
90
+ return join(homedir(), ".tdk", "cache", `premium-${safeName}`, "premium.tar.gz");
91
+ }
92
+ function isCacheFresh(path) {
93
+ if (!existsSync(path))
94
+ return false;
95
+ return Date.now() - statSync(path).mtimeMs < CACHE_TTL_MS;
96
+ }
97
+ async function fetchPremiumBundle(key, projectId) {
98
+ const endpoint = getEndpoint();
99
+ for (const resource of KNOWN_RESOURCES) {
100
+ const url = `${endpoint}?key=${encodeURIComponent(key)}` +
101
+ `&resource=${encodeURIComponent(resource)}` +
102
+ `&projectId=${encodeURIComponent(projectId)}`;
103
+ let res;
104
+ try {
105
+ res = await fetch(url);
106
+ }
107
+ catch (err) {
108
+ console.warn(`⚠️ Premium fetch failed (network error): ${err.message}`);
109
+ return null;
110
+ }
111
+ if (res.ok) {
112
+ return Buffer.from(await res.arrayBuffer());
113
+ }
114
+ if (res.status === 401 || res.status === 403) {
115
+ // Not granted for this specific resource name - try the next one
116
+ // before concluding the key has nothing to offer.
117
+ continue;
118
+ }
119
+ // Anything else (404 missing bundle release, 502 upstream failure,
120
+ // etc.) won't be fixed by trying a different resource name.
121
+ console.warn(`⚠️ Premium fetch failed: HTTP ${res.status}`);
122
+ return null;
123
+ }
124
+ return null;
125
+ }
126
+ /**
127
+ * Fetches (with a local, time-limited cache) the premium bundle for the
128
+ * configured license key and overlays its files onto the already-vendored
129
+ * free engine at destDir. Best-effort: returns false (never throws) if
130
+ * there's no key configured, the key doesn't grant anything, or the fetch
131
+ * fails - the caller should keep going with the free engine either way.
132
+ */
133
+ export async function applyPremiumOverlay(projectRoot, destDir) {
134
+ const key = getLicenseKey();
135
+ if (!key)
136
+ return false;
137
+ const tarballPath = cacheTarballPath(key);
138
+ if (!isCacheFresh(tarballPath)) {
139
+ const projectId = getOrCreateProjectId(projectRoot);
140
+ const bundle = await fetchPremiumBundle(key, projectId);
141
+ if (!bundle) {
142
+ console.warn("⚠️ No premium resources unlocked for this key - using free tier only.");
143
+ return false;
144
+ }
145
+ mkdirSync(join(tarballPath, ".."), { recursive: true });
146
+ writeFileSync(tarballPath, bundle);
147
+ }
148
+ try {
149
+ const extractDir = join(tarballPath, "..", "extracted");
150
+ mkdirSync(extractDir, { recursive: true });
151
+ extractTarball(readFileSync(tarballPath), extractDir);
152
+ let applied = 0;
153
+ for (const [src, dest] of Object.entries(PREMIUM_PATH_MAP)) {
154
+ const from = join(extractDir, src);
155
+ if (!existsSync(from))
156
+ continue;
157
+ const to = join(destDir, dest);
158
+ mkdirSync(join(to, ".."), { recursive: true });
159
+ writeFileSync(to, readFileSync(from));
160
+ applied++;
161
+ }
162
+ if (applied > 0) {
163
+ console.log(`✓ Premium resources unlocked (${applied} file${applied === 1 ? "" : "s"})`);
164
+ return true;
165
+ }
166
+ return false;
167
+ }
168
+ catch (err) {
169
+ console.warn(`⚠️ Failed to apply premium overlay: ${err.message}`);
170
+ return false;
171
+ }
172
+ }
173
+ function liveResourceAccessCachePath(key, resource) {
174
+ const safeName = key.replace(/[^a-zA-Z0-9_-]/g, "_");
175
+ return join(homedir(), ".tdk", "cache", `premium-${safeName}`, `${resource}-access.json`);
176
+ }
177
+ /**
178
+ * Checks whether the configured license key grants a given "live" premium
179
+ * resource. Originally added for resources with nothing to swap on disk
180
+ * (ddd is still exactly that: gated code baked into the free engine, no
181
+ * file overlay). verdaccio and sablier also use this - not because they
182
+ * lack a PREMIUM_PATH_MAP entry (they have one now), but because their
183
+ * public files are already disabled stubs regardless of license, so this
184
+ * check only ever drives a "you need a license for this" warning in
185
+ * template-engine.ts, never an actual enable/disable decision. Can't reuse
186
+ * KNOWN_RESOURCES/fetchPremiumBundle for that warning either: that loop
187
+ * stops at the FIRST resource the key grants and would report false for a
188
+ * key that grants this resource but not, say, playwright (or vice versa).
189
+ *
190
+ * Best-effort: returns false (never throws) if there's no key, the fetch
191
+ * fails, or the worker denies the resource - the caller decides what "not
192
+ * licensed" means. Caches the grant/deny outcome (not the bundle itself,
193
+ * which we never need here) for CACHE_TTL_MS so repeated checks don't
194
+ * re-download the full premium.tar.gz just to read a status code.
195
+ */
196
+ async function hasLiveResourceLicense(projectRoot, resource) {
197
+ const key = getLicenseKey();
198
+ if (!key)
199
+ return false;
200
+ const cachePath = liveResourceAccessCachePath(key, resource);
201
+ if (isCacheFresh(cachePath)) {
202
+ try {
203
+ const cached = JSON.parse(readFileSync(cachePath, "utf-8"));
204
+ return cached.granted === true;
205
+ }
206
+ catch {
207
+ // Corrupt/unreadable cache - fall through and re-check live.
208
+ }
209
+ }
210
+ const projectId = getOrCreateProjectId(projectRoot);
211
+ const endpoint = getEndpoint();
212
+ const url = `${endpoint}?key=${encodeURIComponent(key)}` +
213
+ `&resource=${encodeURIComponent(resource)}&projectId=${encodeURIComponent(projectId)}`;
214
+ let granted = false;
215
+ try {
216
+ const res = await fetch(url);
217
+ granted = res.ok;
218
+ // Drain the body (a full premium.tar.gz on success) so we don't leave
219
+ // it dangling - we only need the status, not the content.
220
+ if (res.body) {
221
+ await res.arrayBuffer().catch(() => undefined);
222
+ }
223
+ }
224
+ catch (err) {
225
+ console.warn(`⚠️ ${resource} license check failed (network error): ${err.message}`);
226
+ return false;
227
+ }
228
+ try {
229
+ mkdirSync(join(cachePath, ".."), { recursive: true });
230
+ writeFileSync(cachePath, JSON.stringify({ granted, checked: new Date().toISOString() }));
231
+ }
232
+ catch {
233
+ // Best-effort cache; a write failure just means we re-check next time.
234
+ }
235
+ return granted;
236
+ }
237
+ /** Checks whether the configured license key grants the "verdaccio" resource. */
238
+ export async function hasVerdaccioLicense(projectRoot) {
239
+ return hasLiveResourceLicense(projectRoot, "verdaccio");
240
+ }
241
+ /**
242
+ * Checks whether the configured license key grants the "ddd" resource
243
+ * (domain-driven-design folder structure + path aliases for backend
244
+ * resources - see generate_backend_path_aliases() in
245
+ * engine/topologies/tilt/generators/vite/helpers.star).
246
+ */
247
+ export async function hasDddLicense(projectRoot) {
248
+ return hasLiveResourceLicense(projectRoot, "ddd");
249
+ }
250
+ /**
251
+ * Checks whether the configured license key grants the "sablier" resource
252
+ * (on-demand start/stop for idle resources via a `sablier: {enable: true}`
253
+ * manifest block - see sablier_container_cycle.star in
254
+ * engine/topologies/platform/docker/networking/).
255
+ */
256
+ export async function hasSablierLicense(projectRoot) {
257
+ return hasLiveResourceLicense(projectRoot, "sablier");
258
+ }
259
+ //# sourceMappingURL=extension-fetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-fetch.js","sourceRoot":"","sources":["../../src/generator/extension-fetch.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,uEAAuE;AACvE,0EAA0E;AAC1E,0EAA0E;AAC1E,wEAAwE;AACxE,yBAAyB;AACzB,EAAE;AACF,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,0EAA0E;AAC1E,uEAAuE;AACvE,2EAA2E;AAC3E,qEAAqE;AACrE,qEAAqE;AACrE,yEAAyE;AACzE,EAAE;AACF,0EAA0E;AAC1E,2EAA2E;AAC3E,wEAAwE;AACxE,uEAAuE;AACvE,yEAAyE;AACzE,8CAA8C;AAC9C,sEAAsE;AACtE,uEAAuE;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;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E;QACtE,0DAA0D;QAC1D,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACb,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,OAAO,QAAQ,0CAA2C,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAChG,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC;QACH,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3F,CAAC;IAAC,MAAM,CAAC;QACP,uEAAuE;IACzE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,WAAmB;IAC3D,OAAO,sBAAsB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,WAAmB;IACrD,OAAO,sBAAsB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,WAAmB;IACzD,OAAO,sBAAsB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,62 @@
1
+ import { PLATFORM_STANDARDS } from "../config/platform-standards.js";
2
+ import type { ProjectConfig } from "../types/index.js";
3
+ export declare function loadTemplate(filename: string): string;
4
+ interface GeneratorContext {
5
+ version: string;
6
+ timestamp: string;
7
+ tech: typeof PLATFORM_STANDARDS.tech;
8
+ ports: typeof PLATFORM_STANDARDS.ports;
9
+ health: typeof PLATFORM_STANDARDS.health;
10
+ naming: typeof PLATFORM_STANDARDS.naming;
11
+ traefik: typeof PLATFORM_STANDARDS.traefik;
12
+ filewatchIgnores: string[];
13
+ serviceTypes: typeof PLATFORM_STANDARDS.serviceTypes;
14
+ paths: typeof PLATFORM_STANDARDS.paths;
15
+ discovery: {
16
+ scanIntervalSeconds: number;
17
+ maxManifestsPerRoot: number;
18
+ paths: string[];
19
+ };
20
+ docker: typeof PLATFORM_STANDARDS.docker;
21
+ runtime: typeof PLATFORM_STANDARDS.runtime;
22
+ project: ProjectConfig["project"];
23
+ phases: ProjectConfig["phases"];
24
+ alwaysEnabledInfra: string[];
25
+ optionalInfra: ProjectConfig["optional_infra"];
26
+ serviceDescriptions: Record<string, string>;
27
+ infraDescriptions: Record<string, string>;
28
+ }
29
+ /**
30
+ * List of all files generated by the template engine.
31
+ * Used for iteration and type-safe access to generated content.
32
+ */
33
+ declare const ALL_GENERATED_FILES: readonly ["TILT_TECH_STACK.star", "TILT_RESOURCE_DEFAULTS.star", "spec.master", "Tiltfile", ".tiltignore"];
34
+ /**
35
+ * Type representing valid generated file names.
36
+ * Derived from ALL_GENERATED_FILES const array for type safety.
37
+ */
38
+ type GeneratedFileName = (typeof ALL_GENERATED_FILES)[number];
39
+ export declare class TemplateEngine {
40
+ private templatesDir;
41
+ constructor(templatesDir?: string);
42
+ private formatStarlarkValue;
43
+ private registerHelpers;
44
+ buildContext(projectConfig: ProjectConfig): GeneratorContext;
45
+ private loadTemplate;
46
+ generateTechStack(context: GeneratorContext): string;
47
+ generateServiceDefaults(context: GeneratorContext): string;
48
+ generateSpecMaster(context: GeneratorContext): string;
49
+ generateTiltfile(context: GeneratorContext): string;
50
+ generateTiltIgnore(context: GeneratorContext): string;
51
+ generateAll(projectConfig: ProjectConfig): Record<GeneratedFileName, string>;
52
+ }
53
+ export declare function generateDatabaseManagementCompose(projectConfig: ProjectConfig): string;
54
+ export declare function readProjectConfig(projectRoot: string): ProjectConfig;
55
+ export declare function generateMasterConfigs(projectRoot: string): Promise<void>;
56
+ export declare function ensureProjectRuntimeAssets(projectRoot: string): string[];
57
+ export declare function verifyMasterConfigs(projectRoot: string): {
58
+ valid: boolean;
59
+ errors: string[];
60
+ };
61
+ export {};
62
+ //# sourceMappingURL=template-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-engine.d.ts","sourceRoot":"","sources":["../../src/generator/template-engine.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAa,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAUlE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA0BrD;AAwBD,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,kBAAkB,CAAC,IAAI,CAAC;IACrC,KAAK,EAAE,OAAO,kBAAkB,CAAC,KAAK,CAAC;IACvC,MAAM,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,OAAO,kBAAkB,CAAC,OAAO,CAAC;IAC3C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,OAAO,kBAAkB,CAAC,YAAY,CAAC;IACrD,KAAK,EAAE,OAAO,kBAAkB,CAAC,KAAK,CAAC;IACvC,SAAS,EAAE;QAAE,mBAAmB,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACzF,MAAM,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,OAAO,kBAA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