@tdk-landscape/tdk-cli-core 1.3.69 → 1.3.70
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 +6 -0
- package/cli/dist/commands/doctor.js +21 -0
- package/cli/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ Notable changes to the `tdk` CLI. Versions match [npm](https://www.npmjs.com/pac
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
- **Fix for 1.3.69:** `tdk doctor` no longer reports "Environment not ready" for the ERP example. The new check for missing `@types/*` packages flagged its 7 frontends, but they build with `vite build`, which never type-checks, so `types: ["node"]` cannot fail their build. It now only flags a service whose `build` script runs `tsc` (following `bun|npm|pnpm|yarn run` hops). Found by the new ERP CI workflow on its first run.
|
|
8
|
+
|
|
9
|
+
- New CI workflow that boots the public 100-service ERP example on a clean GitHub-hosted runner with the published CLI and waits for every backend to answer `/health` through Traefik, then writes the time to healthy and the resource use to the job summary. Manual (`full` or `one-stack`) and weekly.
|
|
10
|
+
|
|
11
|
+
## 1.3.69 (2026-09-28)
|
|
12
|
+
|
|
7
13
|
- `tdk resource --type backend` adds `@types/node` to the new service. The Docker build uses a tsconfig with `"types": ["node"]`, so without it the image failed at `bun run build` with `TS2688: Cannot find type definition file for 'node'`. This was the next blocker on a clean machine, after the base-image race and the default Prisma feature.
|
|
8
14
|
- `tdk doctor` now checks **every** entry in the Docker tsconfig's `types` list against the service's dependencies. It only looked at `"bun"`, so a missing `@types/node` passed. It names the service, the entry and the package to add, and handles subpath (`vitest/globals`) and scoped entries.
|
|
9
15
|
|
|
@@ -459,6 +459,23 @@ function typePackageCandidates(entry) {
|
|
|
459
459
|
const base = entry.split("/")[0] ?? entry;
|
|
460
460
|
return [`@types/${base}`, base];
|
|
461
461
|
}
|
|
462
|
+
/**
|
|
463
|
+
* True when running the script `name` invokes `tsc`, following `bun|npm|pnpm|yarn run <other>`
|
|
464
|
+
* hops. TS2688 ("Cannot find type definition file") is raised by `tsc`; a `vite build` or
|
|
465
|
+
* `bun build` transpiles TypeScript without type-checking and never reads `"types"`.
|
|
466
|
+
*/
|
|
467
|
+
function scriptRunsTsc(scripts, name, depth = 0) {
|
|
468
|
+
const body = scripts[name];
|
|
469
|
+
if (typeof body !== "string" || depth > 3)
|
|
470
|
+
return false;
|
|
471
|
+
if (/(^|[\s;&|(])tsc(\s|$)/.test(body))
|
|
472
|
+
return true;
|
|
473
|
+
for (const hop of body.matchAll(/\b(?:bun|npm|pnpm|yarn)\s+run\s+([\w:.-]+)/g)) {
|
|
474
|
+
if (scriptRunsTsc(scripts, hop[1], depth + 1))
|
|
475
|
+
return true;
|
|
476
|
+
}
|
|
477
|
+
return false;
|
|
478
|
+
}
|
|
462
479
|
/** The package to tell the user to install for a `types` entry. */
|
|
463
480
|
function neededTypePackage(entry) {
|
|
464
481
|
const candidates = typePackageCandidates(entry);
|
|
@@ -489,6 +506,10 @@ export function checkTypeScriptTypeDependencies() {
|
|
|
489
506
|
continue;
|
|
490
507
|
}
|
|
491
508
|
const pkg = readJsonFile(packageJsonPath);
|
|
509
|
+
const scripts = pkg?.scripts ?? {};
|
|
510
|
+
if (!scriptRunsTsc(scripts, "build")) {
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
492
513
|
const installed = new Set([
|
|
493
514
|
...Object.keys(pkg?.devDependencies ?? {}),
|
|
494
515
|
...Object.keys(pkg?.dependencies ?? {}),
|
package/cli/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdk-landscape/tdk-cli-core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.70",
|
|
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": {
|