@tdk-landscape/tdk-cli-core 1.3.14

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 (212) hide show
  1. package/README.md +293 -0
  2. package/bin/tdk.js +14 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +64 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/completion.d.ts +3 -0
  8. package/dist/commands/completion.d.ts.map +1 -0
  9. package/dist/commands/completion.js +294 -0
  10. package/dist/commands/completion.js.map +1 -0
  11. package/dist/commands/config.d.ts +3 -0
  12. package/dist/commands/config.d.ts.map +1 -0
  13. package/dist/commands/config.js +220 -0
  14. package/dist/commands/config.js.map +1 -0
  15. package/dist/commands/doctor.d.ts +3 -0
  16. package/dist/commands/doctor.d.ts.map +1 -0
  17. package/dist/commands/doctor.js +176 -0
  18. package/dist/commands/doctor.js.map +1 -0
  19. package/dist/commands/down.d.ts +3 -0
  20. package/dist/commands/down.d.ts.map +1 -0
  21. package/dist/commands/down.js +32 -0
  22. package/dist/commands/down.js.map +1 -0
  23. package/dist/commands/help.d.ts +2 -0
  24. package/dist/commands/help.d.ts.map +1 -0
  25. package/dist/commands/help.js +130 -0
  26. package/dist/commands/help.js.map +1 -0
  27. package/dist/commands/networks.d.ts +3 -0
  28. package/dist/commands/networks.d.ts.map +1 -0
  29. package/dist/commands/networks.js +260 -0
  30. package/dist/commands/networks.js.map +1 -0
  31. package/dist/commands/project.d.ts +3 -0
  32. package/dist/commands/project.d.ts.map +1 -0
  33. package/dist/commands/project.js +360 -0
  34. package/dist/commands/project.js.map +1 -0
  35. package/dist/commands/projects.d.ts +3 -0
  36. package/dist/commands/projects.d.ts.map +1 -0
  37. package/dist/commands/projects.js +71 -0
  38. package/dist/commands/projects.js.map +1 -0
  39. package/dist/commands/resource.d.ts +69 -0
  40. package/dist/commands/resource.d.ts.map +1 -0
  41. package/dist/commands/resource.js +572 -0
  42. package/dist/commands/resource.js.map +1 -0
  43. package/dist/commands/resources.d.ts +3 -0
  44. package/dist/commands/resources.d.ts.map +1 -0
  45. package/dist/commands/resources.js +73 -0
  46. package/dist/commands/resources.js.map +1 -0
  47. package/dist/commands/stack.d.ts +3 -0
  48. package/dist/commands/stack.d.ts.map +1 -0
  49. package/dist/commands/stack.js +103 -0
  50. package/dist/commands/stack.js.map +1 -0
  51. package/dist/commands/stacks.d.ts +3 -0
  52. package/dist/commands/stacks.d.ts.map +1 -0
  53. package/dist/commands/stacks.js +43 -0
  54. package/dist/commands/stacks.js.map +1 -0
  55. package/dist/commands/status.d.ts +3 -0
  56. package/dist/commands/status.d.ts.map +1 -0
  57. package/dist/commands/status.js +71 -0
  58. package/dist/commands/status.js.map +1 -0
  59. package/dist/commands/ui.d.ts +3 -0
  60. package/dist/commands/ui.d.ts.map +1 -0
  61. package/dist/commands/ui.js +446 -0
  62. package/dist/commands/ui.js.map +1 -0
  63. package/dist/commands/up.d.ts +3 -0
  64. package/dist/commands/up.d.ts.map +1 -0
  65. package/dist/commands/up.js +149 -0
  66. package/dist/commands/up.js.map +1 -0
  67. package/dist/commands/upgrade.d.ts +3 -0
  68. package/dist/commands/upgrade.d.ts.map +1 -0
  69. package/dist/commands/upgrade.js +454 -0
  70. package/dist/commands/upgrade.js.map +1 -0
  71. package/dist/commands/version.d.ts +3 -0
  72. package/dist/commands/version.d.ts.map +1 -0
  73. package/dist/commands/version.js +9 -0
  74. package/dist/commands/version.js.map +1 -0
  75. package/dist/components/Accessible.d.ts +8 -0
  76. package/dist/components/Accessible.d.ts.map +1 -0
  77. package/dist/components/Accessible.js +10 -0
  78. package/dist/components/Accessible.js.map +1 -0
  79. package/dist/components/BaseTooltip.d.ts +4 -0
  80. package/dist/components/BaseTooltip.d.ts.map +1 -0
  81. package/dist/components/BaseTooltip.js +28 -0
  82. package/dist/components/BaseTooltip.js.map +1 -0
  83. package/dist/components/DetailPanel.d.ts +4 -0
  84. package/dist/components/DetailPanel.d.ts.map +1 -0
  85. package/dist/components/DetailPanel.js +18 -0
  86. package/dist/components/DetailPanel.js.map +1 -0
  87. package/dist/components/FileTree.d.ts +4 -0
  88. package/dist/components/FileTree.d.ts.map +1 -0
  89. package/dist/components/FileTree.js +47 -0
  90. package/dist/components/FileTree.js.map +1 -0
  91. package/dist/components/ResourceSelectInput.d.ts +4 -0
  92. package/dist/components/ResourceSelectInput.d.ts.map +1 -0
  93. package/dist/components/ResourceSelectInput.js +7 -0
  94. package/dist/components/ResourceSelectInput.js.map +1 -0
  95. package/dist/components/ResourceTable.d.ts +4 -0
  96. package/dist/components/ResourceTable.d.ts.map +1 -0
  97. package/dist/components/ResourceTable.js +18 -0
  98. package/dist/components/ResourceTable.js.map +1 -0
  99. package/dist/components/TabBar.d.ts +4 -0
  100. package/dist/components/TabBar.d.ts.map +1 -0
  101. package/dist/components/TabBar.js +17 -0
  102. package/dist/components/TabBar.js.map +1 -0
  103. package/dist/components/Tooltip.d.ts +12 -0
  104. package/dist/components/Tooltip.d.ts.map +1 -0
  105. package/dist/components/Tooltip.js +12 -0
  106. package/dist/components/Tooltip.js.map +1 -0
  107. package/dist/components/index.d.ts +8 -0
  108. package/dist/components/index.d.ts.map +1 -0
  109. package/dist/components/index.js +8 -0
  110. package/dist/components/index.js.map +1 -0
  111. package/dist/config/platform-standards.d.ts +159 -0
  112. package/dist/config/platform-standards.d.ts.map +1 -0
  113. package/dist/config/platform-standards.js +181 -0
  114. package/dist/config/platform-standards.js.map +1 -0
  115. package/dist/generator/extension-fetch.d.ts +9 -0
  116. package/dist/generator/extension-fetch.d.ts.map +1 -0
  117. package/dist/generator/extension-fetch.js +153 -0
  118. package/dist/generator/extension-fetch.js.map +1 -0
  119. package/dist/generator/template-engine.d.ts +60 -0
  120. package/dist/generator/template-engine.d.ts.map +1 -0
  121. package/dist/generator/template-engine.js +416 -0
  122. package/dist/generator/template-engine.js.map +1 -0
  123. package/dist/index.d.ts +11 -0
  124. package/dist/index.d.ts.map +1 -0
  125. package/dist/index.js +11 -0
  126. package/dist/index.js.map +1 -0
  127. package/dist/types/index.d.ts +236 -0
  128. package/dist/types/index.d.ts.map +1 -0
  129. package/dist/types/index.js +17 -0
  130. package/dist/types/index.js.map +1 -0
  131. package/dist/utils/cache.d.ts +19 -0
  132. package/dist/utils/cache.d.ts.map +1 -0
  133. package/dist/utils/cache.js +64 -0
  134. package/dist/utils/cache.js.map +1 -0
  135. package/dist/utils/command-helpers.d.ts +17 -0
  136. package/dist/utils/command-helpers.d.ts.map +1 -0
  137. package/dist/utils/command-helpers.js +48 -0
  138. package/dist/utils/command-helpers.js.map +1 -0
  139. package/dist/utils/constants.d.ts +50 -0
  140. package/dist/utils/constants.d.ts.map +1 -0
  141. package/dist/utils/constants.js +100 -0
  142. package/dist/utils/constants.js.map +1 -0
  143. package/dist/utils/discovery-context.d.ts +4 -0
  144. package/dist/utils/discovery-context.d.ts.map +1 -0
  145. package/dist/utils/discovery-context.js +39 -0
  146. package/dist/utils/discovery-context.js.map +1 -0
  147. package/dist/utils/docker.d.ts +3 -0
  148. package/dist/utils/docker.d.ts.map +1 -0
  149. package/dist/utils/docker.js +13 -0
  150. package/dist/utils/docker.js.map +1 -0
  151. package/dist/utils/env-validator.d.ts +15 -0
  152. package/dist/utils/env-validator.d.ts.map +1 -0
  153. package/dist/utils/env-validator.js +95 -0
  154. package/dist/utils/env-validator.js.map +1 -0
  155. package/dist/utils/errors.d.ts +28 -0
  156. package/dist/utils/errors.d.ts.map +1 -0
  157. package/dist/utils/errors.js +127 -0
  158. package/dist/utils/errors.js.map +1 -0
  159. package/dist/utils/file-helpers.d.ts +14 -0
  160. package/dist/utils/file-helpers.d.ts.map +1 -0
  161. package/dist/utils/file-helpers.js +45 -0
  162. package/dist/utils/file-helpers.js.map +1 -0
  163. package/dist/utils/formatting.d.ts +30 -0
  164. package/dist/utils/formatting.d.ts.map +1 -0
  165. package/dist/utils/formatting.js +164 -0
  166. package/dist/utils/formatting.js.map +1 -0
  167. package/dist/utils/paths.d.ts +3 -0
  168. package/dist/utils/paths.d.ts.map +1 -0
  169. package/dist/utils/paths.js +41 -0
  170. package/dist/utils/paths.js.map +1 -0
  171. package/dist/utils/port-assignment.d.ts +6 -0
  172. package/dist/utils/port-assignment.d.ts.map +1 -0
  173. package/dist/utils/port-assignment.js +75 -0
  174. package/dist/utils/port-assignment.js.map +1 -0
  175. package/dist/utils/project-features.d.ts +23 -0
  176. package/dist/utils/project-features.d.ts.map +1 -0
  177. package/dist/utils/project-features.js +98 -0
  178. package/dist/utils/project-features.js.map +1 -0
  179. package/dist/utils/project-templates.d.ts +7 -0
  180. package/dist/utils/project-templates.d.ts.map +1 -0
  181. package/dist/utils/project-templates.js +24 -0
  182. package/dist/utils/project-templates.js.map +1 -0
  183. package/dist/utils/resource-features.d.ts +28 -0
  184. package/dist/utils/resource-features.d.ts.map +1 -0
  185. package/dist/utils/resource-features.js +148 -0
  186. package/dist/utils/resource-features.js.map +1 -0
  187. package/dist/utils/services.d.ts +18 -0
  188. package/dist/utils/services.d.ts.map +1 -0
  189. package/dist/utils/services.js +291 -0
  190. package/dist/utils/services.js.map +1 -0
  191. package/dist/utils/stack-features.d.ts +22 -0
  192. package/dist/utils/stack-features.d.ts.map +1 -0
  193. package/dist/utils/stack-features.js +13 -0
  194. package/dist/utils/stack-features.js.map +1 -0
  195. package/dist/utils/tar.d.ts +7 -0
  196. package/dist/utils/tar.d.ts.map +1 -0
  197. package/dist/utils/tar.js +21 -0
  198. package/dist/utils/tar.js.map +1 -0
  199. package/dist/utils/tilt.d.ts +18 -0
  200. package/dist/utils/tilt.d.ts.map +1 -0
  201. package/dist/utils/tilt.js +77 -0
  202. package/dist/utils/tilt.js.map +1 -0
  203. package/dist/utils/validation.d.ts +9 -0
  204. package/dist/utils/validation.d.ts.map +1 -0
  205. package/dist/utils/validation.js +49 -0
  206. package/dist/utils/validation.js.map +1 -0
  207. package/package.json +72 -0
  208. package/templates/.tiltignore.hbs +73 -0
  209. package/templates/TILT_RESOURCE_DEFAULTS.star.hbs +221 -0
  210. package/templates/TILT_TECH_STACK.star.hbs +150 -0
  211. package/templates/Tiltfile.hbs +295 -0
  212. package/templates/spec.master.hbs +186 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAGnE,MAAM,UAAU,eAAe,CAAC,QAAQ,GAAW,GAAG,EAAE;IACtD,IAAI,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAE1B,OAAO,UAAU,KAAK,IAAI,EAAE,CAAC;QAC3B,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YACzD,OAAO,UAAU,CAAC;QACpB,CAAC;QAED,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;YAC7B,MAAM;QACR,CAAC;QACD,UAAU,GAAG,SAAS,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,IAAI,YAAY,GAAuB,IAAI,CAAC;AAE5C,SAAS,cAAc;IACrB,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,mFAAmF;IACnF,MAAM,MAAM,GAAY,WAAW,CAAC;IAEpC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,WAAW,GAAG,MAAoB,CAAC;IAEzC,YAAY,GAAG;QACb,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,UAAU,CAAC;QAC5C,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,OAAO,IAAI,OAAO,CAAC;QAC/C,WAAW,EAAE,WAAW;KACzB,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,cAAc,EAAE,CAAC,OAAO,CAAC;AAClC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { DiscoveredResource, PortAssignableResourceType } from "../types/index.js";
2
+ export declare function checkPortStatus(port: number): Promise<"running" | "stopped" | "unknown">;
3
+ export declare function findAvailablePort(basePort: number, maxAttempts?: number): Promise<number | null>;
4
+ export declare function getUsedPorts(resources: DiscoveredResource[]): Set<number>;
5
+ export declare function assignPort(resourceType: PortAssignableResourceType, existingResources: DiscoveredResource[]): number;
6
+ //# sourceMappingURL=port-assignment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"port-assignment.d.ts","sourceRoot":"","sources":["../../src/utils/port-assignment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAgBxF,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,CA0B9F;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,MAAW,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,kBAAkB,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQzE;AAcD,wBAAgB,UAAU,CACxB,YAAY,EAAE,0BAA0B,EACxC,iBAAiB,EAAE,kBAAkB,EAAE,GACtC,MAAM,CAcR"}
@@ -0,0 +1,75 @@
1
+ import { spawn } from "node:child_process";
2
+ import { createConnection } from "node:net";
3
+ import { PORT_RANGES } from "./constants.js";
4
+ function isPortAvailable(port) {
5
+ return new Promise((resolve) => {
6
+ const server = createConnection({ port, host: "127.0.0.1" }, () => {
7
+ server.destroy();
8
+ resolve(false);
9
+ });
10
+ server.on("error", () => {
11
+ resolve(true);
12
+ });
13
+ });
14
+ }
15
+ export async function checkPortStatus(port) {
16
+ return new Promise((resolve) => {
17
+ const child = spawn("lsof", ["-Pi", `:${port}`, "-sTCP:LISTEN"], {
18
+ timeout: 3000,
19
+ stdio: "pipe",
20
+ });
21
+ let hasOutput = false;
22
+ child.stdout?.on("data", () => {
23
+ hasOutput = true;
24
+ });
25
+ child.on("close", (code) => {
26
+ // lsof returns 0 if it found something, 1 if nothing found
27
+ if (code === 0) {
28
+ resolve("running");
29
+ }
30
+ else {
31
+ resolve(hasOutput ? "running" : "stopped");
32
+ }
33
+ });
34
+ child.on("error", () => {
35
+ resolve("unknown");
36
+ });
37
+ });
38
+ }
39
+ export async function findAvailablePort(basePort, maxAttempts = 10) {
40
+ for (let i = 0; i < maxAttempts; i++) {
41
+ const port = basePort + i;
42
+ if (await isPortAvailable(port)) {
43
+ return port;
44
+ }
45
+ }
46
+ return null;
47
+ }
48
+ export function getUsedPorts(resources) {
49
+ const usedPorts = new Set();
50
+ for (const r of resources) {
51
+ if (r.port && r.port > 0) {
52
+ usedPorts.add(r.port);
53
+ }
54
+ }
55
+ return usedPorts;
56
+ }
57
+ function findNextAvailablePort(usedPorts, range) {
58
+ for (let port = range.base; port <= range.max; port++) {
59
+ if (!usedPorts.has(port)) {
60
+ return port;
61
+ }
62
+ }
63
+ return null;
64
+ }
65
+ export function assignPort(resourceType, existingResources) {
66
+ const usedPorts = getUsedPorts(existingResources);
67
+ const portRange = PORT_RANGES[resourceType];
68
+ const assignedPort = findNextAvailablePort(usedPorts, portRange);
69
+ if (assignedPort === null) {
70
+ throw new Error(`No available ports in range ${portRange.base}-${portRange.max}. ` +
71
+ "Check TILT_RESOURCE_DEFAULTS.star for port configuration.");
72
+ }
73
+ return assignedPort;
74
+ }
75
+ //# sourceMappingURL=port-assignment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"port-assignment.js","sourceRoot":"","sources":["../../src/utils/port-assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE;YAChE,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACtB,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAY;IAChD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,EAAE,cAAc,CAAC,EAAE;YAC/D,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QAEH,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,KA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C;AACnB,CAAC;AAED,SAAS,qBAAqB,CAC5B,SAAsB,EACtB,KAAiD;IAEjD,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC;QACtD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,YAAwC,EACxC,iBAAuC;IAEvC,MAAM,SAAS,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,qBAAqB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEjE,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,+BAA+B,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,GAAG,IAAI;YAChE,2DAA2D,CAC9D,CAAC;IACJ,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Project-Level Features
3
+ *
4
+ * These are infrastructure and optional services enabled at the project level.
5
+ * They are available to all resources and are configured in project.json stacks.
6
+ *
7
+ * Default: All CORE features enabled in pre_alpha stack
8
+ * Optional/premium: disabled by default (can be enabled in optional_infra)
9
+ */
10
+ export interface ProjectFeature {
11
+ name: string;
12
+ description: string;
13
+ category: "core" | "optional" | "premium";
14
+ phase: "pre_alpha" | "alpha" | "beta";
15
+ enabled_by_default: boolean;
16
+ dependsOn?: string[];
17
+ }
18
+ export declare const PROJECT_FEATURES: Record<string, ProjectFeature>;
19
+ /**
20
+ * Get all enabled project features
21
+ */
22
+ export declare function getEnabledProjectFeatures(optional_infra?: Record<string, boolean>): string[];
23
+ //# sourceMappingURL=project-features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-features.d.ts","sourceRoot":"","sources":["../../src/utils/project-features.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;IACtC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAyE3D,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAmB5F"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Project-Level Features
3
+ *
4
+ * These are infrastructure and optional services enabled at the project level.
5
+ * They are available to all resources and are configured in project.json stacks.
6
+ *
7
+ * Default: All CORE features enabled in pre_alpha stack
8
+ * Optional/premium: disabled by default (can be enabled in optional_infra)
9
+ */
10
+ export const PROJECT_FEATURES = {
11
+ // ============================================================================
12
+ // CORE INFRASTRUCTURE (always enabled in pre_alpha)
13
+ // ============================================================================
14
+ proxy: {
15
+ name: "proxy",
16
+ description: "Traefik reverse proxy and API gateway for routing all services",
17
+ category: "core",
18
+ phase: "pre_alpha",
19
+ enabled_by_default: true,
20
+ dependsOn: [],
21
+ },
22
+ // Key/name must be the literal Tilt resource name (PlatformDockerConstants.VERDACCIO_RESOURCE_NAME
23
+ // in tdk-cli-extensions), since project.json's services list is copied verbatim into
24
+ // PRE_ALPHA_RESOURCES and matched against that name by should_enable(). "registry" would
25
+ // silently fail to enable Verdaccio.
26
+ verdaccio: {
27
+ name: "verdaccio",
28
+ description: "Verdaccio npm registry for package management and local publishing",
29
+ category: "premium",
30
+ phase: "pre_alpha",
31
+ enabled_by_default: false,
32
+ dependsOn: [],
33
+ },
34
+ "database-management": {
35
+ name: "database-management",
36
+ description: "PostgreSQL database for data persistence and SQL operations",
37
+ category: "core",
38
+ phase: "pre_alpha",
39
+ enabled_by_default: true,
40
+ dependsOn: [],
41
+ },
42
+ // ============================================================================
43
+ // OPTIONAL INFRASTRUCTURE (disabled by default, enable in optional_infra)
44
+ // ============================================================================
45
+ monitoring: {
46
+ name: "monitoring",
47
+ description: "SigNoz or SkyWalking observability platform for monitoring and tracing",
48
+ category: "optional",
49
+ phase: "pre_alpha",
50
+ enabled_by_default: false,
51
+ dependsOn: ["database-management"],
52
+ },
53
+ elk: {
54
+ name: "elk",
55
+ description: "Elasticsearch, Logstash, Kibana stack for log aggregation and analysis",
56
+ category: "optional",
57
+ phase: "pre_alpha",
58
+ enabled_by_default: false,
59
+ dependsOn: [],
60
+ },
61
+ debezium: {
62
+ name: "debezium",
63
+ description: "Change Data Capture for real-time data streaming from databases",
64
+ category: "optional",
65
+ phase: "pre_alpha",
66
+ enabled_by_default: false,
67
+ dependsOn: ["database-management"],
68
+ },
69
+ "golden-image": {
70
+ name: "golden-image",
71
+ description: "Pre-built Docker image layer for faster builds and smaller deployments",
72
+ category: "optional",
73
+ phase: "pre_alpha",
74
+ enabled_by_default: true,
75
+ dependsOn: [],
76
+ },
77
+ };
78
+ /**
79
+ * Get all enabled project features
80
+ */
81
+ export function getEnabledProjectFeatures(optional_infra) {
82
+ const enabled = [];
83
+ for (const [key, feature] of Object.entries(PROJECT_FEATURES)) {
84
+ if (feature.enabled_by_default) {
85
+ enabled.push(key);
86
+ }
87
+ }
88
+ // Add optional features if enabled
89
+ if (optional_infra) {
90
+ for (const [key, isEnabled] of Object.entries(optional_infra)) {
91
+ if (isEnabled && PROJECT_FEATURES[key]) {
92
+ enabled.push(key);
93
+ }
94
+ }
95
+ }
96
+ return enabled;
97
+ }
98
+ //# sourceMappingURL=project-features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-features.js","sourceRoot":"","sources":["../../src/utils/project-features.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,MAAM,CAAC,MAAM,gBAAgB,GAAmC;IAC9D,+EAA+E;IAC/E,oDAAoD;IACpD,+EAA+E;IAC/E,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,gEAAgE;QAC7E,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,WAAW;QAClB,kBAAkB,EAAE,IAAI;QACxB,SAAS,EAAE,EAAE;KACd;IAED,mGAAmG;IACnG,qFAAqF;IACrF,yFAAyF;IACzF,qCAAqC;IACrC,SAAS,EAAE;QACT,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,oEAAoE;QACjF,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,WAAW;QAClB,kBAAkB,EAAE,KAAK;QACzB,SAAS,EAAE,EAAE;KACd;IAED,qBAAqB,EAAE;QACrB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,6DAA6D;QAC1E,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,WAAW;QAClB,kBAAkB,EAAE,IAAI;QACxB,SAAS,EAAE,EAAE;KACd;IAED,+EAA+E;IAC/E,0EAA0E;IAC1E,+EAA+E;IAC/E,UAAU,EAAE;QACV,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,wEAAwE;QACrF,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,WAAW;QAClB,kBAAkB,EAAE,KAAK;QACzB,SAAS,EAAE,CAAC,qBAAqB,CAAC;KACnC;IAED,GAAG,EAAE;QACH,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,wEAAwE;QACrF,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,WAAW;QAClB,kBAAkB,EAAE,KAAK;QACzB,SAAS,EAAE,EAAE;KACd;IAED,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,iEAAiE;QAC9E,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,WAAW;QAClB,kBAAkB,EAAE,KAAK;QACzB,SAAS,EAAE,CAAC,qBAAqB,CAAC;KACnC;IAED,cAAc,EAAE;QACd,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,wEAAwE;QACrF,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,WAAW;QAClB,kBAAkB,EAAE,IAAI;QACxB,SAAS,EAAE,EAAE;KACd;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,cAAwC;IAChF,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC9D,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,mCAAmC;IACnC,IAAI,cAAc,EAAE,CAAC;QACnB,KAAK,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;YAC9D,IAAI,SAAS,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface ProjectTemplate {
2
+ repo: string;
3
+ description: string;
4
+ }
5
+ /** Starter projects `tdk project <name>` can clone. Keep in sync with the public tdk-landscape examples. */
6
+ export declare const PROJECT_TEMPLATES: Record<string, ProjectTemplate>;
7
+ //# sourceMappingURL=project-templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-templates.d.ts","sourceRoot":"","sources":["../../src/utils/project-templates.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4GAA4G;AAC5G,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAqB7D,CAAC"}
@@ -0,0 +1,24 @@
1
+ /** Starter projects `tdk project <name>` can clone. Keep in sync with the public tdk-landscape examples. */
2
+ export const PROJECT_TEMPLATES = {
3
+ restaurant: {
4
+ repo: "https://github.com/tdk-landscape/tdk-restaurant-example.git",
5
+ description: "Restaurant ops: reservations, kitchen, floor control (Hono + Vite + Bun)",
6
+ },
7
+ saas: {
8
+ repo: "https://github.com/tdk-landscape/tdk-saas-starter.git",
9
+ description: "SaaS starter: account dashboard and a working checkout button (Hono + Vite + Bun)",
10
+ },
11
+ erp: {
12
+ repo: "https://github.com/tdk-landscape/tdk-erp-system.git",
13
+ description: "Enterprise ERP: 100 microservices across 7 business domains",
14
+ },
15
+ "user-management": {
16
+ repo: "https://github.com/tdk-landscape/tdk-user-management.git",
17
+ description: "User/auth management services",
18
+ },
19
+ example: {
20
+ repo: "https://github.com/tdk-landscape/tdk-example.git",
21
+ description: "Minimal Project-Stack-Resource (PSR) demonstration",
22
+ },
23
+ };
24
+ //# sourceMappingURL=project-templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-templates.js","sourceRoot":"","sources":["../../src/utils/project-templates.ts"],"names":[],"mappings":"AAKA,4GAA4G;AAC5G,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAChE,UAAU,EAAE;QACV,IAAI,EAAE,6DAA6D;QACnE,WAAW,EAAE,0EAA0E;KACxF;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,uDAAuD;QAC7D,WAAW,EAAE,mFAAmF;KACjG;IACD,GAAG,EAAE;QACH,IAAI,EAAE,qDAAqD;QAC3D,WAAW,EAAE,6DAA6D;KAC3E;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,0DAA0D;QAChE,WAAW,EAAE,+BAA+B;KAC7C;IACD,OAAO,EAAE;QACP,IAAI,EAAE,kDAAkD;QACxD,WAAW,EAAE,oDAAoD;KAClE;CACF,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Resource-Level Features
3
+ *
4
+ * These are code generators and configurations that run per-service/resource.
5
+ * They are controlled via the features: [] array in each service.json file.
6
+ *
7
+ * Frontend services: api-client, env-config, api-index (enabled by default)
8
+ * Backend services: prisma (enabled by default)
9
+ */
10
+ export type ResourceType = "frontend" | "backend" | "worker" | "migrator" | "sdk";
11
+ export interface ResourceFeature {
12
+ name: string;
13
+ description: string;
14
+ applies_to: ResourceType[];
15
+ enabled_by_default: boolean;
16
+ generator_file: string;
17
+ output_file: string;
18
+ }
19
+ export declare const RESOURCE_FEATURES: Record<string, ResourceFeature>;
20
+ /**
21
+ * Get default features for a resource type
22
+ */
23
+ export declare function getDefaultFeaturesForResourceType(appType: ResourceType): string[];
24
+ /**
25
+ * Get all generators for a resource type (for documentation)
26
+ */
27
+ export declare function getGeneratorsForResourceType(appType: ResourceType): ResourceFeature[];
28
+ //# sourceMappingURL=resource-features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-features.d.ts","sourceRoot":"","sources":["../../src/utils/resource-features.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAiI7D,CAAC;AAEF;;GAEG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,EAAE,CAejF;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,YAAY,GAAG,eAAe,EAAE,CAErF"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Resource-Level Features
3
+ *
4
+ * These are code generators and configurations that run per-service/resource.
5
+ * They are controlled via the features: [] array in each service.json file.
6
+ *
7
+ * Frontend services: api-client, env-config, api-index (enabled by default)
8
+ * Backend services: prisma (enabled by default)
9
+ */
10
+ export const RESOURCE_FEATURES = {
11
+ // ============================================================================
12
+ // FRONTEND GENERATORS
13
+ // ============================================================================
14
+ "api-client": {
15
+ name: "api-client",
16
+ description: "Pre-configured API client for backend communication (createApiClient wrapper)",
17
+ applies_to: ["frontend"],
18
+ enabled_by_default: true,
19
+ generator_file: "engine/topologies/tilt/resources/orchestrator/generators/frontend.star",
20
+ output_file: ".autogenerated/api-client.ts",
21
+ },
22
+ "env-config": {
23
+ name: "env-config",
24
+ description: "Environment constants and configuration (Vite env vars)",
25
+ applies_to: ["frontend"],
26
+ enabled_by_default: true,
27
+ generator_file: "engine/topologies/tilt/resources/orchestrator/generators/frontend.star",
28
+ output_file: ".autogenerated/env.ts",
29
+ },
30
+ "api-index": {
31
+ name: "api-index",
32
+ description: "Barrel export for clean API client imports",
33
+ applies_to: ["frontend"],
34
+ enabled_by_default: true,
35
+ generator_file: "engine/topologies/tilt/resources/orchestrator/generators/frontend.star",
36
+ output_file: ".autogenerated/api-index.ts",
37
+ },
38
+ // ============================================================================
39
+ // BACKEND GENERATORS
40
+ // ============================================================================
41
+ prisma: {
42
+ name: "prisma",
43
+ description: "Prisma CLI configuration for migrations and database client generation",
44
+ applies_to: ["backend", "worker", "migrator"],
45
+ enabled_by_default: true,
46
+ generator_file: "engine/topologies/tilt/generators/typescript/prisma_config.star",
47
+ output_file: ".autogenerated/prisma.config.autogenerated.ts",
48
+ },
49
+ // ============================================================================
50
+ // BUILD CONFIGURATION GENERATORS (always enabled, not listed in features)
51
+ // ============================================================================
52
+ // Note: These always run regardless of features array. They are core to the build.
53
+ // Listed here for reference only.
54
+ vite: {
55
+ name: "vite",
56
+ description: "Vite configuration for frontend/backend/SDK builds",
57
+ applies_to: ["frontend", "backend", "sdk"],
58
+ enabled_by_default: true, // Always enabled
59
+ generator_file: "engine/topologies/tilt/generators/vite_config.star",
60
+ output_file: ".autogenerated/vite.config.*.ts",
61
+ },
62
+ tsconfig: {
63
+ name: "tsconfig",
64
+ description: "TypeScript configuration (local and Docker variants)",
65
+ applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
66
+ enabled_by_default: true, // Always enabled
67
+ generator_file: "engine/topologies/tilt/generators/typescript/",
68
+ output_file: ".autogenerated/tsconfig.*.json",
69
+ },
70
+ dockerfile: {
71
+ name: "dockerfile",
72
+ description: "Docker container configuration for production builds",
73
+ applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
74
+ enabled_by_default: true, // Always enabled
75
+ generator_file: "engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star",
76
+ output_file: ".autogenerated/Dockerfile.app",
77
+ },
78
+ npmrc: {
79
+ name: "npmrc",
80
+ description: "NPM registry configuration for package installation",
81
+ applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
82
+ enabled_by_default: true, // Always enabled
83
+ generator_file: "engine/topologies/tilt/generators/npmrc.star",
84
+ output_file: ".autogenerated/.npmrc*",
85
+ },
86
+ bunfig: {
87
+ name: "bunfig",
88
+ description: "Bun runtime configuration for package management",
89
+ applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
90
+ enabled_by_default: true, // Always enabled
91
+ generator_file: "engine/topologies/tilt/generators/npmrc.star",
92
+ output_file: ".autogenerated/bunfig.toml*",
93
+ },
94
+ nginx: {
95
+ name: "nginx",
96
+ description: "Nginx configuration for static file serving (frontend only)",
97
+ applies_to: ["frontend"],
98
+ enabled_by_default: true, // Always enabled
99
+ generator_file: "engine/topologies/tilt/generators/nginx_conf.star",
100
+ output_file: ".autogenerated/nginx.conf",
101
+ },
102
+ env: {
103
+ name: "env",
104
+ description: "Backend environment file configuration",
105
+ applies_to: ["backend", "worker", "migrator"],
106
+ enabled_by_default: true, // Always enabled
107
+ generator_file: "engine/topologies/tilt/resources/orchestrator/generators/env.star",
108
+ output_file: ".autogenerated/.env*",
109
+ },
110
+ playwright: {
111
+ name: "playwright",
112
+ description: "Playwright test configuration (if playwright: true in manifest)",
113
+ applies_to: ["frontend", "backend"],
114
+ enabled_by_default: false, // Only if explicitly enabled in manifest
115
+ generator_file: "engine/topologies/tilt/generators/typescript/playwright_config.star",
116
+ output_file: ".autogenerated/playwright.config.ts",
117
+ },
118
+ "agents-md": {
119
+ name: "agents-md",
120
+ description: "AI agent guard rails for .autogenerated/ folder",
121
+ applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
122
+ enabled_by_default: true, // Always enabled
123
+ generator_file: "engine/topologies/tilt/generators/agents_md.star",
124
+ output_file: ".autogenerated/AGENTS.md",
125
+ },
126
+ };
127
+ /**
128
+ * Get default features for a resource type
129
+ */
130
+ export function getDefaultFeaturesForResourceType(appType) {
131
+ const defaults = [];
132
+ for (const [key, feature] of Object.entries(RESOURCE_FEATURES)) {
133
+ if (feature.enabled_by_default &&
134
+ feature.applies_to.includes(appType) &&
135
+ // Only include if it's something users control via features array
136
+ ["api-client", "env-config", "api-index", "prisma"].includes(key)) {
137
+ defaults.push(key);
138
+ }
139
+ }
140
+ return defaults;
141
+ }
142
+ /**
143
+ * Get all generators for a resource type (for documentation)
144
+ */
145
+ export function getGeneratorsForResourceType(appType) {
146
+ return Object.values(RESOURCE_FEATURES).filter((f) => f.applies_to.includes(appType));
147
+ }
148
+ //# sourceMappingURL=resource-features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-features.js","sourceRoot":"","sources":["../../src/utils/resource-features.ts"],"names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AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAqB;IAChE,OAAO,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACxF,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { DiscoveredResource, DiscoveredStack, ResourceMetadata, StackMetadata } from "../types/index.js";
2
+ export declare function discoverResourcesFromRoot(projectRoot: string): DiscoveredResource[];
3
+ export declare function discoverResources(): DiscoveredResource[];
4
+ /**
5
+ * Unique, sorted `stack` values across discovered service.json files under `projectRoot`.
6
+ * Tilt's discovery groups services by this same field (see tdk-cli-extensions
7
+ * discovery_orchestrator.star), so these are the names that must appear in a
8
+ * stack's `services` list in .tdk/project.json for that group to be enabled.
9
+ */
10
+ export declare function discoverStackNames(projectRoot: string): string[];
11
+ export declare function getAllStacks(resources?: DiscoveredResource[]): string[];
12
+ export declare function discoverStacks(): DiscoveredStack[];
13
+ export declare function getResourcesForStack(stackName: string): DiscoveredResource[];
14
+ export declare function stackExists(stackName: string): boolean;
15
+ export declare function clearMetadataCache(): void;
16
+ export declare function getResourceMetadata(resource: DiscoveredResource): ResourceMetadata;
17
+ export declare function getStackMetadata(stack: DiscoveredStack): StackMetadata;
18
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/utils/services.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,kBAAkB,EAClB,eAAe,EAGf,gBAAgB,EAEhB,aAAa,EACd,MAAM,mBAAmB,CAAC;AA6E3B,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,EAAE,CASnF;AAED,wBAAgB,iBAAiB,IAAI,kBAAkB,EAAE,CAUxD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAWhE;AAED,wBAAgB,YAAY,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAWvE;AAED,wBAAgB,cAAc,IAAI,eAAe,EAAE,CA0BlD;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAG5E;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAGtD;AAWD,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AA4BD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,gBAAgB,CAwDlF;AA0CD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,aAAa,CA0CtE"}