@tdk-landscape/tdk-cli-core 1.3.138 → 1.3.140

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 (158) hide show
  1. package/cli/dist/backend-frameworks/elysia.js +0 -1
  2. package/cli/dist/backend-frameworks/express.js +0 -1
  3. package/cli/dist/backend-frameworks/fastify.js +0 -1
  4. package/cli/dist/backend-frameworks/h3.js +0 -1
  5. package/cli/dist/backend-frameworks/koa.js +0 -1
  6. package/cli/dist/backend-frameworks/mcp.js +0 -1
  7. package/cli/dist/backend-frameworks/nestjs.js +0 -1
  8. package/cli/dist/backend-frameworks/registry.js +0 -1
  9. package/cli/dist/backend-frameworks/types.js +0 -1
  10. package/cli/dist/backend-languages/bun.js +0 -1
  11. package/cli/dist/backend-languages/go.js +0 -1
  12. package/cli/dist/backend-languages/python.js +0 -1
  13. package/cli/dist/backend-languages/registry.js +0 -1
  14. package/cli/dist/backend-languages/rust.js +0 -1
  15. package/cli/dist/backend-languages/types.js +0 -1
  16. package/cli/dist/cli.js +0 -1
  17. package/cli/dist/commands/__tests__/project-e2e-helpers.js +0 -1
  18. package/cli/dist/commands/completion.js +0 -1
  19. package/cli/dist/commands/config.js +3 -14
  20. package/cli/dist/commands/doctor.js +10 -11
  21. package/cli/dist/commands/down.js +0 -1
  22. package/cli/dist/commands/eject.js +0 -1
  23. package/cli/dist/commands/help.js +0 -1
  24. package/cli/dist/commands/import.js +0 -1
  25. package/cli/dist/commands/logs.js +0 -1
  26. package/cli/dist/commands/maintainers.js +0 -1
  27. package/cli/dist/commands/mcp.js +0 -1
  28. package/cli/dist/commands/networks.js +0 -2
  29. package/cli/dist/commands/project.js +3 -4
  30. package/cli/dist/commands/projects.js +0 -1
  31. package/cli/dist/commands/resource.js +11 -10
  32. package/cli/dist/commands/resources.js +0 -1
  33. package/cli/dist/commands/runtime.js +0 -1
  34. package/cli/dist/commands/stack.js +0 -1
  35. package/cli/dist/commands/stacks.js +0 -1
  36. package/cli/dist/commands/status.js +0 -1
  37. package/cli/dist/commands/ui.js +8 -13
  38. package/cli/dist/commands/up.js +6 -7
  39. package/cli/dist/commands/upgrade.js +2 -2
  40. package/cli/dist/commands/version.js +0 -1
  41. package/cli/dist/components/Accessible.js +4 -3
  42. package/cli/dist/components/BaseTooltip.js +0 -1
  43. package/cli/dist/components/DetailPanel.js +0 -1
  44. package/cli/dist/components/FileTree.js +0 -1
  45. package/cli/dist/components/ResourceSelectInput.js +3 -3
  46. package/cli/dist/components/ResourceTable.js +0 -1
  47. package/cli/dist/components/ServiceIssues.js +0 -1
  48. package/cli/dist/components/TUIHeader.js +0 -1
  49. package/cli/dist/components/TabBar.js +0 -1
  50. package/cli/dist/components/Tooltip.js +0 -1
  51. package/cli/dist/components/index.js +0 -1
  52. package/cli/dist/components/ui-theme.js +5 -1
  53. package/cli/dist/config/platform-standards.js +0 -1
  54. package/cli/dist/frontend-frameworks/lit.js +0 -1
  55. package/cli/dist/frontend-frameworks/preact.js +0 -1
  56. package/cli/dist/frontend-frameworks/qwik.js +0 -1
  57. package/cli/dist/frontend-frameworks/react.js +0 -1
  58. package/cli/dist/frontend-frameworks/registry.js +0 -1
  59. package/cli/dist/frontend-frameworks/solid.js +0 -1
  60. package/cli/dist/frontend-frameworks/svelte.js +1 -2
  61. package/cli/dist/frontend-frameworks/tanstack-router.js +0 -1
  62. package/cli/dist/frontend-frameworks/types.js +0 -1
  63. package/cli/dist/frontend-frameworks/vanilla.js +0 -1
  64. package/cli/dist/frontend-frameworks/vue.js +0 -1
  65. package/cli/dist/generator/__tests__/golden-helpers.js +0 -1
  66. package/cli/dist/generator/extension-fetch.js +0 -1
  67. package/cli/dist/generator/resource-templates.js +0 -1
  68. package/cli/dist/generator/template-engine.js +9 -10
  69. package/cli/dist/index.js +0 -1
  70. package/cli/dist/mcp/server.js +0 -1
  71. package/cli/dist/mcp/tools.js +0 -1
  72. package/cli/dist/types/index.js +4 -6
  73. package/cli/dist/utils/agent-host.js +0 -1
  74. package/cli/dist/utils/atomic-write.js +0 -1
  75. package/cli/dist/utils/bun-floor.js +0 -1
  76. package/cli/dist/utils/bun-requirement.js +0 -1
  77. package/cli/dist/utils/cache.js +0 -1
  78. package/cli/dist/utils/cold-preflight.js +2 -2
  79. package/cli/dist/utils/command-helpers.js +0 -1
  80. package/cli/dist/utils/constants.js +18 -4
  81. package/cli/dist/utils/discovery-context.js +0 -1
  82. package/cli/dist/utils/discovery-paths.js +2 -2
  83. package/cli/dist/utils/docker.js +0 -1
  84. package/cli/dist/utils/doctor-report.js +0 -1
  85. package/cli/dist/utils/doctor-runtime.js +4 -5
  86. package/cli/dist/utils/doctor-starlark.js +0 -1
  87. package/cli/dist/utils/doctor-wiring.js +8 -9
  88. package/cli/dist/utils/down-cleanup.js +0 -1
  89. package/cli/dist/utils/env-validator.js +0 -1
  90. package/cli/dist/utils/errors.js +2 -3
  91. package/cli/dist/utils/exec-async.js +0 -1
  92. package/cli/dist/utils/file-helpers.js +1 -3
  93. package/cli/dist/utils/formatting.js +0 -1
  94. package/cli/dist/utils/generated-paths.js +5 -6
  95. package/cli/dist/utils/help-command.js +0 -1
  96. package/cli/dist/utils/host-port-config.js +2 -2
  97. package/cli/dist/utils/host-port-plan.js +0 -1
  98. package/cli/dist/utils/json-output.js +0 -1
  99. package/cli/dist/utils/machine-output.js +0 -1
  100. package/cli/dist/utils/paths.js +2 -2
  101. package/cli/dist/utils/platform.js +0 -1
  102. package/cli/dist/utils/port-assignment.js +0 -1
  103. package/cli/dist/utils/port-conflict-fix.js +0 -1
  104. package/cli/dist/utils/port-fallback-notice.js +0 -1
  105. package/cli/dist/utils/port-listener-probe.js +0 -1
  106. package/cli/dist/utils/project-config-defaults.js +0 -1
  107. package/cli/dist/utils/project-features.js +0 -1
  108. package/cli/dist/utils/project-templates.js +0 -1
  109. package/cli/dist/utils/prompt.js +0 -1
  110. package/cli/dist/utils/resource-features.js +0 -1
  111. package/cli/dist/utils/resource-kind.js +0 -1
  112. package/cli/dist/utils/schema-version-gate.js +0 -1
  113. package/cli/dist/utils/search-status.js +0 -1
  114. package/cli/dist/utils/secret-redaction.js +0 -1
  115. package/cli/dist/utils/service-config-checks.js +0 -1
  116. package/cli/dist/utils/service-manifest.js +0 -1
  117. package/cli/dist/utils/service-runtime-state.js +0 -1
  118. package/cli/dist/utils/service-urls.js +2 -2
  119. package/cli/dist/utils/services.js +3 -6
  120. package/cli/dist/utils/shared-platform-postgres.js +2 -3
  121. package/cli/dist/utils/single-flight.js +0 -1
  122. package/cli/dist/utils/smoke.js +0 -1
  123. package/cli/dist/utils/spinner.js +0 -1
  124. package/cli/dist/utils/stack-features.js +0 -1
  125. package/cli/dist/utils/stack-status.js +0 -1
  126. package/cli/dist/utils/startup-report.js +0 -1
  127. package/cli/dist/utils/status-message.js +0 -1
  128. package/cli/dist/utils/status-ports.js +0 -1
  129. package/cli/dist/utils/suggestions.js +6 -3
  130. package/cli/dist/utils/tar.js +5 -4
  131. package/cli/dist/utils/tdk-version.js +2 -2
  132. package/cli/dist/utils/terminal-layout.js +0 -1
  133. package/cli/dist/utils/tilt-events.js +0 -1
  134. package/cli/dist/utils/tilt-logs.js +0 -1
  135. package/cli/dist/utils/tilt-process.js +0 -1
  136. package/cli/dist/utils/tilt-resource-state.js +0 -1
  137. package/cli/dist/utils/tilt-startup.js +0 -1
  138. package/cli/dist/utils/tilt-unreachable-message.js +0 -1
  139. package/cli/dist/utils/tilt.js +0 -1
  140. package/cli/dist/utils/ui-keymap.js +1 -2
  141. package/cli/dist/utils/ui-service-state.js +0 -1
  142. package/cli/dist/utils/up-only.js +0 -1
  143. package/cli/dist/utils/up-readiness.js +0 -1
  144. package/cli/dist/utils/validation.js +0 -1
  145. package/cli/dist/utils/which.js +0 -1
  146. package/cli/dist/utils/windows-doctor.js +0 -1
  147. package/cli/dist-bundle/chunk-42IVF3YT.js +3 -0
  148. package/cli/dist-bundle/chunk-LMHD62S4.js +315 -0
  149. package/cli/dist-bundle/cli.js +211 -211
  150. package/cli/dist-bundle/{cold-preflight-6VMSECY4.js → cold-preflight-O6LMFPMR.js} +1 -1
  151. package/cli/dist-bundle/{extension-fetch-COIG2KR6.js → extension-fetch-6XNTDF44.js} +1 -1
  152. package/cli/package.json +1 -1
  153. package/engine/topologies/platform/docker/AGENTS.md +13 -13
  154. package/engine/topologies/platform/docker/dockerfile/language_dockerfile.star +6 -2
  155. package/engine/topologies/tilt/manifest/README.md +1 -15
  156. package/package.json +1 -1
  157. package/cli/dist-bundle/chunk-OBQS5CYC.js +0 -3
  158. package/cli/dist-bundle/chunk-Q6PZ6ZPA.js +0 -315
@@ -4,8 +4,7 @@ import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } fr
4
4
  import { resolve } from "node:path";
5
5
  import chalk from "chalk";
6
6
  export function writeFilesWithProgress(basePath, tasks, onProgress) {
7
- for (let i = 0; i < tasks.length; i++) {
8
- const task = tasks[i];
7
+ for (const [i, task] of tasks.entries()) {
9
8
  console.log(chalk.blue(`${task.emoji} ${task.description}...`));
10
9
  if (task.type === "json") {
11
10
  writeJsonFileInDir(basePath, task.filename, task.content);
@@ -71,4 +70,3 @@ export function ensureGitignore(projectRoot) {
71
70
  appendFileSync(gitignorePath, `${prefix}${header}${missing.join("\n")}\n`);
72
71
  return missing;
73
72
  }
74
- //# sourceMappingURL=file-helpers.js.map
@@ -163,4 +163,3 @@ export function printBoxedHeader(title, subtitle, width = DEFAULT_BOX_WIDTH) {
163
163
  }
164
164
  console.log(chalk.cyan(`╰${line}╯`));
165
165
  }
166
- //# sourceMappingURL=formatting.js.map
@@ -2,15 +2,15 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  import { existsSync, lstatSync } from "node:fs";
4
4
  import { isAbsolute, normalize, relative, sep } from "node:path";
5
- import { TILTIGNORE_FILE } from "./constants.js";
5
+ import { AUTOGENERATED_DIR, PACKAGE_JSON, TILTIGNORE_FILE } from "./constants.js";
6
6
  /** Reviewed TDK-owned destinations written by `tdk config regenerate` or Tilt generation. */
7
7
  export const TDK_GENERATED_PATH_ALLOWLIST = [
8
- ".autogenerated/**",
8
+ `${AUTOGENERATED_DIR}/**`,
9
9
  ".tdk/.tdk-out/**",
10
10
  "Tiltfile",
11
11
  "TILT_*.star",
12
12
  TILTIGNORE_FILE,
13
- "package.json (create only)",
13
+ `${PACKAGE_JSON} (create only)`,
14
14
  "shared-platform-engineering/docker-templates/**",
15
15
  "services/platform/database-management/docker-compose.yml",
16
16
  "product_autogenerated_resource_manifests/**",
@@ -20,7 +20,7 @@ export function isTdkGeneratedPath(path) {
20
20
  const normalized = normalize(path).split(sep).join("/");
21
21
  if (isAbsolute(path) || normalized === ".." || normalized.startsWith("../"))
22
22
  return false;
23
- if (normalized.split("/").includes(".autogenerated") ||
23
+ if (normalized.split("/").includes(AUTOGENERATED_DIR) ||
24
24
  normalized.startsWith(".tdk/.tdk-out/") ||
25
25
  normalized === "shared-platform-engineering/docker-templates" ||
26
26
  normalized.startsWith("shared-platform-engineering/docker-templates/") ||
@@ -31,7 +31,7 @@ export function isTdkGeneratedPath(path) {
31
31
  return (normalized === "Tiltfile" ||
32
32
  /^TILT_[^/]+\.star$/.test(normalized) ||
33
33
  normalized === TILTIGNORE_FILE ||
34
- normalized === "package.json" ||
34
+ normalized === PACKAGE_JSON ||
35
35
  normalized === "services/platform/database-management/docker-compose.yml");
36
36
  }
37
37
  export function assertTdkGeneratedPath(projectRoot, path) {
@@ -49,4 +49,3 @@ export function assertTdkGeneratedPath(projectRoot, path) {
49
49
  }
50
50
  return absolute;
51
51
  }
52
- //# sourceMappingURL=generated-paths.js.map
@@ -9,4 +9,3 @@ export function unknownHelpTarget(args, commands) {
9
9
  const known = commands.some((command) => command.name() === target || command.aliases().includes(target));
10
10
  return known ? undefined : target;
11
11
  }
12
- //# sourceMappingURL=help-command.js.map
@@ -3,6 +3,7 @@
3
3
  import { execFileSync } from "node:child_process";
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  import { join } from "node:path";
6
+ import { PROJECT_JSON } from "./constants.js";
6
7
  import { createHostPortPlan, isHostPortAvailable } from "./host-port-plan.js";
7
8
  const CONFIG_PATH = join(".tdk", ".tdk-out", "host-ports.json");
8
9
  export function isDockerPortOwnedByProject(dockerPs, projectPrefix, port) {
@@ -56,7 +57,7 @@ export async function getHostPortPlan(projectRoot, options = {}) {
56
57
  return saved;
57
58
  let prefix = "";
58
59
  try {
59
- const project = JSON.parse(readFileSync(join(projectRoot, ".tdk", "project.json"), "utf-8"));
60
+ const project = JSON.parse(readFileSync(join(projectRoot, ".tdk", PROJECT_JSON), "utf-8"));
60
61
  prefix = String(project?.project?.name ?? "tdk-project")
61
62
  .replace(/-/g, "_")
62
63
  .toLowerCase();
@@ -87,4 +88,3 @@ export async function getHostPortPlan(projectRoot, options = {}) {
87
88
  }
88
89
  return createHostPortPlan({ isAvailable });
89
90
  }
90
- //# sourceMappingURL=host-port-config.js.map
@@ -76,4 +76,3 @@ export async function createHostPortPlan(options = {}) {
76
76
  export function formatHostPortPlan(plan) {
77
77
  return `Host ports: HTTP ${plan.ingressHttp}, HTTPS ${plan.ingressHttps}, Postgres ${plan.postgres}`;
78
78
  }
79
- //# sourceMappingURL=host-port-plan.js.map
@@ -26,4 +26,3 @@ export function createJsonEmitter(failureCode, command) {
26
26
  });
27
27
  return emit;
28
28
  }
29
- //# sourceMappingURL=json-output.js.map
@@ -30,4 +30,3 @@ export function writeMachineError(error) {
30
30
  console.error(result.error.message);
31
31
  process.exit(result.exitCode);
32
32
  }
33
- //# sourceMappingURL=machine-output.js.map
@@ -4,11 +4,12 @@ import { existsSync } from "node:fs";
4
4
  import { dirname, join, resolve } from "node:path";
5
5
  import { cwd } from "node:process";
6
6
  import packageJson from "../../package.json" with { type: "json" };
7
+ import { PROJECT_JSON } from "./constants.js";
7
8
  export function findProjectRoot(startDir = cwd()) {
8
9
  let currentDir = resolve(startDir);
9
10
  const root = resolve("/");
10
11
  while (currentDir !== root) {
11
- if (existsSync(join(currentDir, ".tdk", "project.json"))) {
12
+ if (existsSync(join(currentDir, ".tdk", PROJECT_JSON))) {
12
13
  return currentDir;
13
14
  }
14
15
  const parentDir = dirname(currentDir);
@@ -40,4 +41,3 @@ function getPackageInfo() {
40
41
  export function getPackageVersion() {
41
42
  return getPackageInfo().version;
42
43
  }
43
- //# sourceMappingURL=paths.js.map
@@ -52,4 +52,3 @@ export function pathLookups(binName, windows = isWindows()) {
52
52
  export function pathDelimiter(windows = isWindows()) {
53
53
  return windows ? ";" : delimiter;
54
54
  }
55
- //# sourceMappingURL=platform.js.map
@@ -73,4 +73,3 @@ export function assignPort(resourceType, existingResources) {
73
73
  }
74
74
  return assignedPort;
75
75
  }
76
- //# sourceMappingURL=port-assignment.js.map
@@ -23,4 +23,3 @@ export function portConflictFix(message) {
23
23
  return `Fix: stop the process using port ${port} (${find})`;
24
24
  return `Fix: stop the process using port ${port} (${find}), or set ${envVar} to a free port and run tdk up`;
25
25
  }
26
- //# sourceMappingURL=port-conflict-fix.js.map
@@ -15,4 +15,3 @@ export function formatPortFallbackNotice(plan) {
15
15
  }
16
16
  return lines;
17
17
  }
18
- //# sourceMappingURL=port-fallback-notice.js.map
@@ -18,4 +18,3 @@ export function hasLocalListener(port, timeoutMs = 500) {
18
18
  socket.once("error", () => finish(false));
19
19
  });
20
20
  }
21
- //# sourceMappingURL=port-listener-probe.js.map
@@ -15,4 +15,3 @@ import { DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
15
15
  * the reverse). See shared-platform-postgres.ts.
16
16
  */
17
17
  export const DEFAULT_ALWAYS_ENABLED_INFRA = [DATABASE_MANAGEMENT_FEATURE, "proxy"];
18
- //# sourceMappingURL=project-config-defaults.js.map
@@ -89,4 +89,3 @@ export function getEnabledProjectFeatures(optional_infra) {
89
89
  }
90
90
  return enabled;
91
91
  }
92
- //# sourceMappingURL=project-features.js.map
@@ -26,4 +26,3 @@ export const PROJECT_TEMPLATES = {
26
26
  description: "Hono + Postgres + NATS worker + Vite example with a routed write path",
27
27
  },
28
28
  };
29
- //# sourceMappingURL=project-templates.js.map
@@ -83,4 +83,3 @@ export async function promptMultiSelect(options) {
83
83
  console.log(validation);
84
84
  }
85
85
  }
86
- //# sourceMappingURL=prompt.js.map
@@ -182,4 +182,3 @@ export function getDefaultFeaturesForResourceType(appType) {
182
182
  export function getGeneratorsForResourceType(appType) {
183
183
  return Object.values(RESOURCE_FEATURES).filter((f) => f.applies_to.includes(appType));
184
184
  }
185
- //# sourceMappingURL=resource-features.js.map
@@ -7,4 +7,3 @@
7
7
  export function isApiServiceType(appType) {
8
8
  return appType === "backend" || appType === "mcp";
9
9
  }
10
- //# sourceMappingURL=resource-kind.js.map
@@ -38,4 +38,3 @@ export function enforceSchemaVersionGate(projectRoot, options = {}, exit = proce
38
38
  console.error(chalk.gray(` Fix: ${fix}`));
39
39
  exit(1);
40
40
  }
41
- //# sourceMappingURL=schema-version-gate.js.map
@@ -10,4 +10,3 @@ export function describeSearch(query, matches, total) {
10
10
  }
11
11
  return { summary: `${matches} of ${total}` };
12
12
  }
13
- //# sourceMappingURL=search-status.js.map
@@ -54,4 +54,3 @@ export function redactValue(value, secrets) {
54
54
  }
55
55
  return value;
56
56
  }
57
- //# sourceMappingURL=secret-redaction.js.map
@@ -187,4 +187,3 @@ export function enforceServiceConfigGate(projectRoot, options = {}, exit = proce
187
187
  }
188
188
  exit(1);
189
189
  }
190
- //# sourceMappingURL=service-config-checks.js.map
@@ -251,4 +251,3 @@ export function validateServiceManifestFile(filePath, displayPath) {
251
251
  return { errors: [`${displayPath}: invalid JSON (${message})`], warnings: [] };
252
252
  }
253
253
  }
254
- //# sourceMappingURL=service-manifest.js.map
@@ -64,4 +64,3 @@ export function deriveServiceStates(jsonText, dependsOn, deferred = new Set()) {
64
64
  }
65
65
  return result;
66
66
  }
67
- //# sourceMappingURL=service-runtime-state.js.map
@@ -2,13 +2,14 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
+ import { PROJECT_JSON } from "./constants.js";
5
6
  import { findProjectRoot } from "./paths.js";
6
7
  import { isApiServiceType } from "./resource-kind.js";
7
8
  export function getProjectName() {
8
9
  const root = findProjectRoot();
9
10
  if (root) {
10
11
  try {
11
- const content = readFileSync(join(root, ".tdk", "project.json"), "utf-8");
12
+ const content = readFileSync(join(root, ".tdk", PROJECT_JSON), "utf-8");
12
13
  const parsed = JSON.parse(content);
13
14
  if (parsed?.project?.name) {
14
15
  return parsed.project.name;
@@ -95,4 +96,3 @@ export async function pingHealthTarget(target, timeoutMs) {
95
96
  export async function pingHealthTargets(targets, timeoutMs) {
96
97
  return Promise.all(targets.map((target) => pingHealthTarget(target, timeoutMs)));
97
98
  }
98
- //# sourceMappingURL=service-urls.js.map
@@ -3,7 +3,7 @@
3
3
  import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { Cache, createCacheValidator } from "./cache.js";
6
- import { AUTOGENERATED_FILE_PATTERNS, SERVICE_JSON, SKIP_DIRECTORIES } from "./constants.js";
6
+ import { AUTOGENERATED_FILE_PATTERNS, DOCKER_COMPOSE_FILE, PACKAGE_JSON, SERVICE_JSON, SKIP_DIRECTORIES, } from "./constants.js";
7
7
  import { errorFactories } from "./errors.js";
8
8
  import { formatCount } from "./formatting.js";
9
9
  import { findProjectRoot } from "./paths.js";
@@ -240,9 +240,7 @@ function detectFileType(filename, content) {
240
240
  if (filename === "Tiltfile" || filename.endsWith(".star")) {
241
241
  return "tilt";
242
242
  }
243
- if (filename === "vite.config.ts" ||
244
- filename === "tsconfig.json" ||
245
- filename === "package.json") {
243
+ if (filename === "vite.config.ts" || filename === "tsconfig.json" || filename === PACKAGE_JSON) {
246
244
  return "config";
247
245
  }
248
246
  if (filename === "schema.prisma" || filename.includes("migration")) {
@@ -271,7 +269,7 @@ export function getResourceMetadata(resource) {
271
269
  const autogeneratedFiles = discoverAutogeneratedFiles(resourceDir);
272
270
  const hasDockerfile = existsSync(join(resourceDir, "Dockerfile"));
273
271
  const hasTiltfile = existsSync(join(resourceDir, "Tiltfile"));
274
- const hasDockerCompose = existsSync(join(resourceDir, "docker-compose.yml")) ||
272
+ const hasDockerCompose = existsSync(join(resourceDir, DOCKER_COMPOSE_FILE)) ||
275
273
  existsSync(join(resourceDir, "docker-compose.yaml"));
276
274
  const configType = resource.config?.appType;
277
275
  let type = configType || "backend";
@@ -363,4 +361,3 @@ export function getStackMetadata(stack) {
363
361
  cacheValidator.markUpdated();
364
362
  return metadata;
365
363
  }
366
- //# sourceMappingURL=services.js.map
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
- import { DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
5
+ import { DATABASE_MANAGEMENT_FEATURE, PROJECT_JSON } from "./constants.js";
6
6
  import { DEFAULT_ALWAYS_ENABLED_INFRA } from "./project-config-defaults.js";
7
7
  import { discoverResourcesFromRoot } from "./services.js";
8
8
  /**
@@ -26,7 +26,7 @@ export function isSharedPlatformPostgresDependency(name) {
26
26
  }
27
27
  function readProjectJson(projectRoot) {
28
28
  try {
29
- return JSON.parse(readFileSync(join(projectRoot, ".tdk", "project.json"), "utf-8"));
29
+ return JSON.parse(readFileSync(join(projectRoot, ".tdk", PROJECT_JSON), "utf-8"));
30
30
  }
31
31
  catch {
32
32
  return undefined;
@@ -230,4 +230,3 @@ export function sharedPlatformPostgresMessage(evaluation) {
230
230
  : `resource(s) ${evaluation.dependsOnUsers.join(", ")} depend on postgres/database-management`;
231
231
  return `Shared platform Postgres will start because ${why}${projectScopeNote}`;
232
232
  }
233
- //# sourceMappingURL=shared-platform-postgres.js.map
@@ -19,4 +19,3 @@ export function singleFlight(apply) {
19
19
  }
20
20
  };
21
21
  }
22
- //# sourceMappingURL=single-flight.js.map
@@ -330,4 +330,3 @@ export function formatSmokeFailure(result) {
330
330
  export async function runSmokePlans(plans, deps = {}) {
331
331
  return Promise.all(plans.map((plan) => runSmokePlan(plan, deps)));
332
332
  }
333
- //# sourceMappingURL=smoke.js.map
@@ -38,4 +38,3 @@ export function startSpinner(initialText) {
38
38
  warn: (message) => finish(chalk.yellow("⚠"), message),
39
39
  };
40
40
  }
41
- //# sourceMappingURL=spinner.js.map
@@ -13,4 +13,3 @@ export function isStackFeatureEnabledInStacks(stacks, featureName) {
13
13
  return false;
14
14
  return ["pre_alpha", "alpha", "beta"].some((phase) => stacks[phase]?.enabledStacks?.includes(featureName));
15
15
  }
16
- //# sourceMappingURL=stack-features.js.map
@@ -12,4 +12,3 @@ export function deriveStackStatus(statuses) {
12
12
  return "degraded";
13
13
  return "error";
14
14
  }
15
- //# sourceMappingURL=stack-status.js.map
@@ -76,4 +76,3 @@ export function formatStartupReport(report, timedOut) {
76
76
  }
77
77
  return lines;
78
78
  }
79
- //# sourceMappingURL=startup-report.js.map
@@ -19,4 +19,3 @@ export function createStatusMessageController(setMessage) {
19
19
  },
20
20
  };
21
21
  }
22
- //# sourceMappingURL=status-message.js.map
@@ -29,4 +29,3 @@ export function buildStackPorts(plan, tiltPort) {
29
29
  }
30
30
  return ports;
31
31
  }
32
- //# sourceMappingURL=status-ports.js.map
@@ -1,16 +1,20 @@
1
1
  // Copyright (c) 2026 TDK Landscape contributors
2
2
  // SPDX-License-Identifier: MIT
3
+ // Every cell is written before it is read, so the fallback never changes the result.
4
+ function cell(row, index) {
5
+ return row[index] ?? 0;
6
+ }
3
7
  function levenshteinDistance(left, right) {
4
8
  let previousRow = Array.from({ length: right.length + 1 }, (_, index) => index);
5
9
  for (let leftIndex = 1; leftIndex <= left.length; leftIndex++) {
6
10
  const currentRow = [leftIndex];
7
11
  for (let rightIndex = 1; rightIndex <= right.length; rightIndex++) {
8
12
  const substitutionCost = left[leftIndex - 1] === right[rightIndex - 1] ? 0 : 1;
9
- currentRow[rightIndex] = Math.min(currentRow[rightIndex - 1] + 1, previousRow[rightIndex] + 1, previousRow[rightIndex - 1] + substitutionCost);
13
+ currentRow[rightIndex] = Math.min(cell(currentRow, rightIndex - 1) + 1, cell(previousRow, rightIndex) + 1, cell(previousRow, rightIndex - 1) + substitutionCost);
10
14
  }
11
15
  previousRow = currentRow;
12
16
  }
13
- return previousRow[right.length];
17
+ return cell(previousRow, right.length);
14
18
  }
15
19
  function isAdjacentTransposition(left, right) {
16
20
  if (left.length !== right.length)
@@ -57,4 +61,3 @@ export function suggestClosest(input, candidates) {
57
61
  }
58
62
  return closest;
59
63
  }
60
- //# sourceMappingURL=suggestions.js.map
@@ -31,10 +31,12 @@ export function extractTarball(data, destDir) {
31
31
  throw new Error(`tar extraction failed: ${fallback.stderr?.toString() || result.stderr?.toString() || "unknown error"}`);
32
32
  }
33
33
  const entries = readdirSync(fallbackDir);
34
+ const [only] = entries;
34
35
  const sourceDir = entries.length === 1 &&
35
- existsSync(join(fallbackDir, entries[0])) &&
36
- statSync(join(fallbackDir, entries[0])).isDirectory()
37
- ? join(fallbackDir, entries[0])
36
+ only !== undefined &&
37
+ existsSync(join(fallbackDir, only)) &&
38
+ statSync(join(fallbackDir, only)).isDirectory()
39
+ ? join(fallbackDir, only)
38
40
  : fallbackDir;
39
41
  for (const entry of readdirSync(sourceDir)) {
40
42
  renameSync(join(sourceDir, entry), join(destDir, entry));
@@ -42,4 +44,3 @@ export function extractTarball(data, destDir) {
42
44
  }
43
45
  rmSync(tempDir, { recursive: true, force: true });
44
46
  }
45
- //# sourceMappingURL=tar.js.map
@@ -2,13 +2,14 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
+ import { PROJECT_JSON } from "./constants.js";
5
6
  function toParts(raw) {
6
7
  const match = raw.trim().match(/(\d+)\.(\d+)(?:\.(\d+))?/);
7
8
  return match ? [Number(match[1]), Number(match[2]), Number(match[3] ?? 0)] : null;
8
9
  }
9
10
  function readMinTdkVersion(projectRoot) {
10
11
  try {
11
- const parsed = JSON.parse(readFileSync(join(projectRoot, ".tdk", "project.json"), "utf-8"));
12
+ const parsed = JSON.parse(readFileSync(join(projectRoot, ".tdk", PROJECT_JSON), "utf-8"));
12
13
  return parsed?.minTdkVersion;
13
14
  }
14
15
  catch {
@@ -48,4 +49,3 @@ export function evaluateTdkVersionFloor(projectRoot, currentVersion) {
48
49
  }
49
50
  return { status: "ok", required: requiredText };
50
51
  }
51
- //# sourceMappingURL=tdk-version.js.map
@@ -17,4 +17,3 @@ export function getTabBarDensity(terminalWidth) {
17
17
  export function getListRowFromMouseY(mouseY, listTop) {
18
18
  return mouseY - 1 - listTop;
19
19
  }
20
- //# sourceMappingURL=terminal-layout.js.map
@@ -192,4 +192,3 @@ export async function loadTiltEvents() {
192
192
  throw new TiltEventsLoadError(error instanceof Error ? error.message : "Tilt returned an invalid UIResource list", "error");
193
193
  }
194
194
  }
195
- //# sourceMappingURL=tilt-events.js.map
@@ -59,4 +59,3 @@ export function parseTiltLogLines(output, limit) {
59
59
  export function isTiltConnectionFailure(stderr) {
60
60
  return /connection refused|connecting to Tilt|no such host|dial tcp|websocket_token/i.test(stderr);
61
61
  }
62
- //# sourceMappingURL=tilt-logs.js.map
@@ -52,4 +52,3 @@ export function stopTiltOnPort(port, platform = process.platform, commandRunner
52
52
  }
53
53
  return pids;
54
54
  }
55
- //# sourceMappingURL=tilt-process.js.map
@@ -30,4 +30,3 @@ export function effectiveRuntimeStatus(status) {
30
30
  return "pending";
31
31
  return runtimeStatus;
32
32
  }
33
- //# sourceMappingURL=tilt-resource-state.js.map
@@ -41,4 +41,3 @@ export async function stopTiltForUp(options, dependencies) {
41
41
  dependencies.stop(options.port);
42
42
  await dependencies.wait(2000);
43
43
  }
44
- //# sourceMappingURL=tilt-startup.js.map
@@ -7,4 +7,3 @@
7
7
  export function tiltUnreachableMessage(port) {
8
8
  return `Could not reach Tilt on port ${port}. The stack is not running, or Tilt is on another port. Start it with: tdk up`;
9
9
  }
10
- //# sourceMappingURL=tilt-unreachable-message.js.map
@@ -103,4 +103,3 @@ export function buildTiltDownArgs(options = {}) {
103
103
  }
104
104
  return args;
105
105
  }
106
- //# sourceMappingURL=tilt.js.map
@@ -5,7 +5,7 @@ export const TABS = [
5
5
  { id: "files", label: "FILES", shortcut: "4" },
6
6
  { id: "config", label: "CONFIG", shortcut: "5" },
7
7
  ];
8
- const tabRange = `${TABS[0].shortcut}-${TABS[TABS.length - 1].shortcut}`;
8
+ const tabRange = `${TABS.at(0)?.shortcut}-${TABS.at(-1)?.shortcut}`;
9
9
  const uiKeymap = [
10
10
  {
11
11
  id: "list-navigation",
@@ -115,4 +115,3 @@ export function formatUiKeyHint(id, label, ascii = false) {
115
115
  const entry = getUiKeymapEntry(id);
116
116
  return `[${formatUiKeyNames(id, ascii)}] ${label ?? entry.label}`;
117
117
  }
118
- //# sourceMappingURL=ui-keymap.js.map
@@ -32,4 +32,3 @@ export function applyServiceStates(metadata, states) {
32
32
  overallStatus: deriveStackStatus(resources.map((r) => r.status)),
33
33
  };
34
34
  }
35
- //# sourceMappingURL=ui-service-state.js.map
@@ -26,4 +26,3 @@ export function resolveOnlySelection(requested, all) {
26
26
  dependencies: all.map((r) => r.name).filter((n) => wanted.has(n) && !requested.includes(n)),
27
27
  };
28
28
  }
29
- //# sourceMappingURL=up-only.js.map
@@ -116,4 +116,3 @@ export async function waitForTiltResourcesReady(port, options = {}) {
116
116
  await new Promise((resolve) => setTimeout(resolve, intervalMs));
117
117
  }
118
118
  }
119
- //# sourceMappingURL=up-readiness.js.map
@@ -60,4 +60,3 @@ export function sanitizeForShell(value, replacement = "_") {
60
60
  export function includes(array, value) {
61
61
  return array.includes(value);
62
62
  }
63
- //# sourceMappingURL=validation.js.map
@@ -25,4 +25,3 @@ export function findOnPath(command) {
25
25
  }
26
26
  return null;
27
27
  }
28
- //# sourceMappingURL=which.js.map
@@ -174,4 +174,3 @@ export async function checkWindowsHostConfiguration() {
174
174
  ...(dnsOk ? {} : { fix: WINDOWS_DNS_FAILURE }),
175
175
  };
176
176
  }
177
- //# sourceMappingURL=windows-doctor.js.map
@@ -0,0 +1,3 @@
1
+ import{createRequire as __tdkRequire}from'node:module';const require=__tdkRequire(import.meta.url);
2
+ import{randomUUID as M}from"node:crypto";import{existsSync as p,mkdirSync as g,readFileSync as y,statSync as U,writeFileSync as h}from"node:fs";import{homedir as S}from"node:os";import{join as a}from"node:path";import{spawnSync as _}from"node:child_process";import{existsSync as E,mkdirSync as w,mkdtempSync as N,readdirSync as $,renameSync as C,rmSync as v,statSync as j,writeFileSync as O}from"node:fs";import{tmpdir as L}from"node:os";import{join as c}from"node:path";function k(e,n){let r=N(c(L(),"tdk-ext-")),o=c(r,"bundle.tar.gz");O(o,e),w(n,{recursive:!0});let t=process.platform==="win32"?"tar.exe":"tar",i=_(t,["xzf",o,"-C",n,"--strip-components=1"],{stdio:"pipe",windowsHide:!0});if(i.status!==0){let s=c(r,"fallback");w(s,{recursive:!0});let m=_(t,["xzf",o,"-C",s],{stdio:"pipe",windowsHide:!0});if(m.status!==0)throw v(r,{recursive:!0,force:!0}),new Error(`tar extraction failed: ${m.stderr?.toString()||i.stderr?.toString()||"unknown error"}`);let l=$(s),[u]=l,d=l.length===1&&u!==void 0&&E(c(s,u))&&j(c(s,u)).isDirectory()?c(s,u):s;for(let f of $(d))C(c(d,f),c(n,f))}v(r,{recursive:!0,force:!0})}var A="https://tdk-extension-dist.oranguman.workers.dev/v1/premium/bundle.tar.gz",z=["playwright","c4-diagram","logging","agents-md","sablier","verdaccio"],R=720*60*1e3,P={"typescript/playwright_config.star":"engine/topologies/tilt/generators/typescript/playwright_config.star","generators/agents_md.star":"engine/topologies/tilt/generators/agents_md.star","c4_diagram.star":"engine/topologies/tilt/generators/c4_diagram.star","observability/logging.star":"engine/topologies/platform/observability/logging.star","generators/database_provisioner.star":"engine/topologies/tilt/generators/database_provisioner.star","generators/dependency_manifest.star":"engine/topologies/tilt/generators/dependency_manifest.star","generators/fixed_frontend_tsconfig.star":"engine/topologies/tilt/generators/typescript/fixed_frontend_tsconfig.star","synthetic_monitor.star":"engine/resources/synthetic_monitor.star","synthetic-monitor-topology.star":"engine/topologies/platform/services/synthetic-monitor.star","database-management-service.yaml":"platform/services/platform/database-management/service.yaml","networking/sablier_container_cycle.star":"engine/topologies/platform/docker/networking/sablier_container_cycle.star","registries/verdaccio_loader.star":"engine/topologies/platform/registries/verdaccio_loader.star"};function x(){return process.env.TDK_LICENSE_KEY?.trim()||null}function B(){return process.env.TDK_PREMIUM_ENDPOINT?.trim()||A}function I(e){let n=a(e,".tdk",".project-id");if(p(n))return y(n,"utf-8").trim();let r=M();return g(a(e,".tdk"),{recursive:!0}),h(n,`${r}
3
+ `),r}function F(e){let n=e.replace(/[^a-zA-Z0-9_-]/g,"_");return a(S(),".tdk","cache",`premium-${n}`,"premium.tar.gz")}function T(e){return p(e)?Date.now()-U(e).mtimeMs<R:!1}async function D(e,n,r){let o=`${B()}?resource=${encodeURIComponent(n)}&projectId=${encodeURIComponent(r)}`,t=await fetch(o,{headers:{Authorization:`Bearer ${e}`}});return t.status!==401?t:(await t.arrayBuffer().catch(()=>{}),fetch(`${o}&key=${encodeURIComponent(e)}`))}async function H(e,n){let r=[];for(let o of z){let t;try{t=await D(e,o,n)}catch(i){return console.warn(`\u26A0\uFE0F Premium fetch failed (network error): ${i.message}`),null}if(t.ok){let i=Buffer.from(await t.arrayBuffer());return console.info(`\u{1F50E} Premium entitlement probe: granted resource=${o} (HTTP ${t.status}); prior denials=${r.join(", ")||"none"}`),console.info(`\u{1F50E} Premium bundle download: ${i.byteLength} bytes`),i}if(t.status===401||t.status===403){r.push(`${o}=${t.status}`);continue}return console.warn(`\u26A0\uFE0F Premium fetch failed: ${o} returned HTTP ${t.status}; prior entitlement probes: ${r.join(", ")||"none"}`),null}return console.warn(`\u26A0\uFE0F Premium entitlement probes denied: ${r.join(", ")}`),null}async function re(e,n){let r=x();if(!r)return!1;let o=F(r);if(T(o))console.info("\u{1F50E} Premium bundle cache: hit (cached bundle reused)");else{console.info("\u{1F50E} Premium bundle cache: miss; requesting bundle from distribution service");let t=I(e),i=await H(r,t);if(!i)return console.warn("\u26A0\uFE0F No premium resources unlocked for this key - using free tier only."),!1;g(a(o,".."),{recursive:!0}),h(o,i)}try{let t=a(o,"..","extracted");g(t,{recursive:!0}),k(y(o),t);let i=0,s=[];for(let[l,u]of Object.entries(P)){let d=a(t,l);if(!p(d)){s.push(l);continue}let f=a(n,u);g(a(f,".."),{recursive:!0}),h(f,y(d)),i++}let m=a(t,"networking/sablier_container_cycle.star");if(console.info(`\u{1F50E} Premium bundle contents: mapped=${i}/${Object.keys(P).length}; sablier_overlay=${p(m)?"present":"MISSING"}`),s.length>0&&console.info(`\u{1F50E} Premium bundle missing mapped files: ${s.join(", ")}`),!p(m)&&process.env.TDK_PREMIUM_DIAGNOSTICS==="1"){let l=await G(e);console.info(`\u{1F50E} Sablier entitlement check: ${l?"granted":"not confirmed"}; compare with sablier_overlay above to distinguish license access from bundle contents`)}return i>0?(console.log(`\u2713 Premium resources unlocked (${i} file${i===1?"":"s"})`),!0):!1}catch(t){return console.warn(`\u26A0\uFE0F Failed to apply premium overlay: ${t.message}`),!1}}function K(e,n){let r=e.replace(/[^a-zA-Z0-9_-]/g,"_");return a(S(),".tdk","cache",`premium-${r}`,`${n}-access.json`)}async function b(e,n){let r=x();if(!r)return!1;let o=K(r,n);if(T(o))try{let s=JSON.parse(y(o,"utf-8"));return console.info(`\u{1F50E} ${n} entitlement probe: cache=${s.granted===!0?"granted":"denied"}`),s.granted===!0}catch{}let t=I(e),i=!1;try{let s=await D(r,n,t);i=s.ok,console.info(`\u{1F50E} ${n} entitlement probe: HTTP ${s.status} (${i?"granted":"denied"})`),s.body&&await s.arrayBuffer().catch(()=>{})}catch(s){return console.warn(`\u26A0\uFE0F ${n} license check failed (network error): ${s.message}`),!1}try{g(a(o,".."),{recursive:!0}),h(o,JSON.stringify({granted:i,checked:new Date().toISOString()}))}catch{}return i}async function ne(e){return b(e,"verdaccio")}async function oe(e){return b(e,"ddd")}async function G(e){return b(e,"sablier")}export{k as a,re as b,ne as c,oe as d,G as e};