@tdk-landscape/tdk-cli-core 1.3.148 → 1.3.150

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.
package/CHANGELOG.md CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  Notable changes to the `tdk` CLI. Versions match [npm](https://www.npmjs.com/package/@tdk-landscape/tdk-cli-core?activeTab=versions) and the [binary releases](https://github.com/tdk-landscape/tdk-cli-releases/releases).
4
4
 
5
- ## Unreleased
5
+ ## 1.3.131 (2026-10-12)
6
6
 
7
+ - `healthCheckPath` is optional for `appType: "bring-your-own"` in `service.json`, so a service that is not HTTP (Postgres, Redis, MinIO, an SMTP relay) no longer needs a made-up `"/"` to validate. Without it TDK sends no HTTP probe to the service and gives its Traefik route no health check; the container counts as healthy once Docker reports it running. `port` stays required, and a set `healthCheckPath` behaves as before. Fixes #1086.
7
8
  - `tdk up` now publishes Traefik on host port 80 (and 443) when they are free, so routed URLs read `http://app.<project>.localhost/<app>` instead of `...localhost:8080/<app>`. It always wanted 80 but only ever tried 8080-8180. On macOS the free-port check treated the kernel's refusal of a non-root bind below 1024 as "busy", although Docker Desktop publishes those ports itself; that also made `TDK_HTTP_PORT=80` fail with "already in use". A project whose saved plan is on 8080 moves to 80 on its next `tdk up` once 80 is free. On Linux and WSL2 a non-root user cannot check port 80, so the 8080-8180 range is kept there. Printed URLs no longer end in `:80`.
8
9
  - TDK MCP tools now accept an absolute `projectPath` so a projectless MCP client can run doctor, inspect services and logs, and manage the intended project without depending on the server launch directory.
9
10
  - Shared platform stacks (postgres, traefik, proxy, messaging, infisical, monitoring, cdc, elk) now run in Compose projects named `<project>-<stack>` (for example `tdk-erp-system-database-management`) instead of the directory-named `database-management`, `tdk-out` and so on. Two TDK projects on one Docker daemon no longer share them.
@@ -137,17 +137,25 @@ function isTimeout(err) {
137
137
  return isExecTimeout(err);
138
138
  }
139
139
  function createExecCheck(name, command, successMessage, failureMessage, fixInstructions) {
140
- return async () => {
140
+ return async (exec = execAsync) => {
141
141
  try {
142
- await execAsync(command, EXEC_TIMEOUT_MS);
142
+ await exec(command, EXEC_TIMEOUT_MS);
143
143
  return {
144
144
  name,
145
145
  didPass: true,
146
146
  message: successMessage,
147
147
  };
148
148
  }
149
- catch {
150
- // Error details not needed - failure message tells user what to fix
149
+ catch (err) {
150
+ // A timeout means the command exists but did not answer in time, which is not the same as missing.
151
+ if (isTimeout(err)) {
152
+ return {
153
+ name,
154
+ didPass: false,
155
+ message: `${name} did not respond within ${EXEC_TIMEOUT_MS / 1000}s`,
156
+ fix: fixInstructions,
157
+ };
158
+ }
151
159
  return {
152
160
  name,
153
161
  didPass: false,
@@ -3,10 +3,11 @@
3
3
  import { spawn } from "node:child_process";
4
4
  import { Command } from "commander";
5
5
  /**
6
- * The importer lives in its own repo so detectors can ship without a CLI release. Until it is
7
- * published to npm it is run from git; `TDK_IMPORT_PACKAGE` overrides the package spec.
6
+ * The importer lives in its own repo so it can ship without a CLI release, and is run from npm at a
7
+ * pinned version so a push to its main branch cannot change what `tdk import` does. Move the pin
8
+ * when a new importer is published. `TDK_IMPORT_PACKAGE` overrides the package spec.
8
9
  */
9
- export const IMPORT_PACKAGE = "github:tdk-landscape/tdk-import";
10
+ export const IMPORT_PACKAGE = "@tdk-landscape/tdk-import@0.2.1";
10
11
  export function importInvocation(args, env = process.env, platform = process.platform) {
11
12
  const pkg = env.TDK_IMPORT_PACKAGE || IMPORT_PACKAGE;
12
13
  return {
@@ -31,8 +32,8 @@ export function runImport(args, spawnFn = spawn) {
31
32
  });
32
33
  }
33
34
  export const importCommand = new Command("import")
34
- .description("Import the services a directory describes (runs tdk-import)")
35
- .argument("[args...]", "Passed to tdk-import: [dir] --dry-run --yes --force --only <ids>")
35
+ .description("Import the services in a directory's root docker-compose.yml (runs tdk-import)")
36
+ .argument("[args...]", "Passed to tdk-import: [dir] --dry-run --yes --force")
36
37
  .allowUnknownOption()
37
38
  .helpOption(false)
38
39
  .action(async (args) => {