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

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
@@ -4,6 +4,11 @@ Notable changes to the `tdk` CLI. Versions match [npm](https://www.npmjs.com/pac
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ - Dropped the `ora` dependency (only `tdk upgrade` used it) in favor of a small built-in spinner: 50 installed packages instead of 61, and no more duplicate versions of cli-cursor, restore-cursor, onetime and signal-exit.
8
+ - `tdk doctor` outside a project checks only Docker, Compose and Tilt, and reports "This machine is ready for TDK". Before, running it right after installing (as the installer suggests) failed with "Master configs missing … Environment not ready".
9
+
10
+ ## 1.3.54 (2026-09-27)
11
+
7
12
  - The npm package ships only what the CLI needs at runtime: 294 files and 458 kB, down from 678 files and 888 kB. Repo tooling, tests, source maps, CI config and the openspec docs are no longer included.
8
13
 
9
14
  ## 1.3.53 (2026-09-27)
package/README.md CHANGED
@@ -172,7 +172,7 @@ make pre-commit-run # run pre-commit hooks on all files
172
172
  tdk doctor
173
173
  ```
174
174
 
175
- Verifies Docker, Bun, Tilt, required ports, and master config files are all in place before you run `tdk up`.
175
+ Checks Docker, Compose and Tilt. Inside a project it also checks the generated configs, `.env`, service scripts and that the ingress ports are free, before you run `tdk up`.
176
176
 
177
177
  ## Community
178
178
 
@@ -681,11 +681,13 @@ export const doctorCommand = new Command("doctor")
681
681
  console.log(`${chalk.red("✗")} --ping-timeout must be a positive number of milliseconds`);
682
682
  process.exit(1);
683
683
  }
684
- const checks = [
684
+ const machineChecks = [
685
685
  checkDockerRuntime,
686
686
  checkTilt,
687
687
  checkDockerCompose,
688
688
  checkDockerVersions,
689
+ ];
690
+ const projectChecks = [
689
691
  checkMasterConfigs,
690
692
  checkGeneratedProjectRuntimeAssets,
691
693
  checkStarlarkLoadExports,
@@ -704,8 +706,13 @@ export const doctorCommand = new Command("doctor")
704
706
  ];
705
707
  // Runs last: needs routable services (and working Traefik) to mean anything.
706
708
  if (options.ping) {
707
- checks.push(() => checkServiceHealth(pingTimeout));
709
+ projectChecks.push(() => checkServiceHealth(pingTimeout));
708
710
  }
711
+ // Right after installing, people run `tdk doctor` before they have a
712
+ // project. Only the machine checks mean anything there; the project checks
713
+ // would all fail with "run tdk project".
714
+ const inProject = Boolean(findProjectRoot());
715
+ const checks = inProject ? [...machineChecks, ...projectChecks] : machineChecks;
709
716
  let allPassed = true;
710
717
  for (const checkFn of checks) {
711
718
  const result = await checkFn();
@@ -728,7 +735,18 @@ export const doctorCommand = new Command("doctor")
728
735
  }
729
736
  }
730
737
  console.log("");
731
- if (allPassed) {
738
+ if (allPassed && !inProject) {
739
+ console.log(`${chalk.gray("○")} ${chalk.gray("Not in a TDK project, so project checks were skipped")}`);
740
+ console.log("");
741
+ console.log(`${chalk.green(chalk.bold("✓"))} This machine is ready for TDK`);
742
+ console.log("");
743
+ console.log("Next steps:");
744
+ console.log(" 1. mkdir my-app && cd my-app");
745
+ console.log(" 2. tdk project --yes");
746
+ console.log(" 3. tdk resource api --type backend --stack my-app");
747
+ console.log(" 4. tdk up my-app");
748
+ }
749
+ else if (allPassed) {
732
750
  console.log(`${chalk.green(chalk.bold("✓"))} Environment ready for TDK`);
733
751
  console.log("");
734
752
  console.log("Next steps:");
@@ -5,11 +5,11 @@ import { dirname, join, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import chalk from "chalk";
7
7
  import { Command } from "commander";
8
- import ora from "ora";
9
8
  import { getErrorMessage, logVerbose, showErrorAndExit } from "../utils/errors.js";
10
9
  import { showCancelled } from "../utils/formatting.js";
11
10
  import { getPackageVersion } from "../utils/paths.js";
12
11
  import { promptConfirm } from "../utils/prompt.js";
12
+ import { startSpinner } from "../utils/spinner.js";
13
13
  function isStandaloneBinary(tdkPath) {
14
14
  try {
15
15
  const fileInfo = execSync(`file -b ${JSON.stringify(tdkPath)}`, { encoding: "utf-8" });
@@ -138,7 +138,7 @@ export async function upgradeViaBinary(tdkPath, release) {
138
138
  console.log(chalk.cyan(` chmod +x ${tdkPath}`));
139
139
  return false;
140
140
  }
141
- const spinner = ora(`Downloading ${release.assetName} (${release.tag})...`).start();
141
+ const spinner = startSpinner(`Downloading ${release.assetName} (${release.tag})...`);
142
142
  // Download to /tmp first (both the binary and the engine bundle below) so a
143
143
  // failed network step can't leave a half-written binary at tdkPath.
144
144
  const tmpPath = `/tmp/tdk-upgrade-${release.assetName}`;
@@ -204,7 +204,7 @@ function getCurrentVersion() {
204
204
  }
205
205
  }
206
206
  async function getLatestVersion() {
207
- const spinner = ora("Checking for latest version...").start();
207
+ const spinner = startSpinner("Checking for latest version...");
208
208
  try {
209
209
  const result = execSync("npm view @tdk-landscape/tdk-cli-core version", {
210
210
  encoding: "utf-8",
@@ -224,7 +224,7 @@ async function getLatestVersion() {
224
224
  }
225
225
  }
226
226
  async function upgradeViaNpm() {
227
- const spinner = ora("Upgrading via npm...").start();
227
+ const spinner = startSpinner("Upgrading via npm...");
228
228
  try {
229
229
  execSync("npm install -g @tdk-landscape/tdk-cli-core@latest", {
230
230
  stdio: "inherit",
@@ -252,7 +252,7 @@ async function upgradeViaNpm() {
252
252
  }
253
253
  }
254
254
  async function upgradeViaBun() {
255
- const spinner = ora("Upgrading via bun...").start();
255
+ const spinner = startSpinner("Upgrading via bun...");
256
256
  try {
257
257
  execSync("bun install -g @tdk-landscape/tdk-cli-core@latest", {
258
258
  stdio: "inherit",
@@ -280,7 +280,7 @@ async function upgradeViaBun() {
280
280
  }
281
281
  }
282
282
  async function upgradeViaGit(path) {
283
- const spinner = ora("Pulling latest changes from git...").start();
283
+ const spinner = startSpinner("Pulling latest changes from git...");
284
284
  try {
285
285
  execSync("git rev-parse --git-dir", {
286
286
  cwd: path,
@@ -492,7 +492,7 @@ export const upgradeCommand = new Command("upgrade")
492
492
  process.exit(1);
493
493
  }
494
494
  console.log();
495
- const verifySpinner = ora("Verifying upgrade...").start();
495
+ const verifySpinner = startSpinner("Verifying upgrade...");
496
496
  try {
497
497
  const newVersion = execSync("tdk version", { encoding: "utf-8" }).trim();
498
498
  verifySpinner.succeed(`Verified: now running ${chalk.green(newVersion)}`);
@@ -0,0 +1,39 @@
1
+ import chalk from "chalk";
2
+ const FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
3
+ export function startSpinner(initialText) {
4
+ const stream = process.stderr;
5
+ const animate = stream.isTTY === true;
6
+ let frame = 0;
7
+ let text = initialText;
8
+ let timer;
9
+ const render = () => stream.write(`\r\x1b[2K${chalk.cyan(FRAMES[frame])} ${text}`);
10
+ if (animate) {
11
+ render();
12
+ timer = setInterval(() => {
13
+ frame = (frame + 1) % FRAMES.length;
14
+ render();
15
+ }, 80);
16
+ }
17
+ else {
18
+ stream.write(`- ${text}\n`);
19
+ }
20
+ const finish = (symbol, message) => {
21
+ if (timer)
22
+ clearInterval(timer);
23
+ stream.write(`${animate ? "\r\x1b[2K" : ""}${symbol} ${message ?? text}\n`);
24
+ };
25
+ return {
26
+ get text() {
27
+ return text;
28
+ },
29
+ set text(value) {
30
+ text = value;
31
+ if (!animate)
32
+ stream.write(`- ${text}\n`);
33
+ },
34
+ succeed: (message) => finish(chalk.green("✔"), message),
35
+ fail: (message) => finish(chalk.red("✖"), message),
36
+ warn: (message) => finish(chalk.yellow("⚠"), message),
37
+ };
38
+ }
39
+ //# sourceMappingURL=spinner.js.map
package/cli/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tdk-cli-internal",
3
3
  "private": true,
4
- "version": "1.3.54",
4
+ "version": "1.3.55",
5
5
  "description": "TDK CLI - Tilt Development Kit command line interface",
6
6
  "keywords": [
7
7
  "tdk",
@@ -58,7 +58,6 @@
58
58
  "handlebars": "^4.7.8",
59
59
  "ink": "^7.1.1",
60
60
  "ink-select-input": "^6.2.0",
61
- "ora": "^9.4.1",
62
61
  "react": "^19.3.0"
63
62
  },
64
63
  "devDependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdk-landscape/tdk-cli-core",
3
- "version": "1.3.54",
3
+ "version": "1.3.55",
4
4
  "description": "Run 100 microservices on a 16 GB laptop without Kubernetes. Scaffold services and run them locally with hot reload, built on Tilt.",
5
5
  "homepage": "https://tdk-landscape.github.io/tdk-website",
6
6
  "repository": {
@@ -71,7 +71,6 @@
71
71
  "handlebars": "^4.7.8",
72
72
  "ink": "^7.1.1",
73
73
  "ink-select-input": "^6.2.0",
74
- "ora": "^9.4.1",
75
74
  "react": "^19.3.0"
76
75
  },
77
76
  "devDependencies": {