@tdk-landscape/tdk-cli-core 1.3.69 ā 1.3.71
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 +10 -0
- package/cli/dist/commands/doctor.js +24 -1
- package/cli/dist/commands/project.js +3 -0
- package/cli/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ Notable changes to the `tdk` CLI. Versions match [npm](https://www.npmjs.com/pac
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
- `tdk project` in a freshly cloned repo (one that already has `.tdk/project.json`) now creates the missing `.env` with working defaults. Before, it regenerated the configs but left no `.env`, and `tdk doctor` then failed with "set VERDACCIO_URL_DOCKER=<value>". Doctor now says to run `tdk project` when there is no `.env` at all. Found by the ERP CI workflow.
|
|
8
|
+
|
|
9
|
+
## 1.3.70 (2026-09-28)
|
|
10
|
+
|
|
11
|
+
- **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.
|
|
12
|
+
|
|
13
|
+
- 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.
|
|
14
|
+
|
|
15
|
+
## 1.3.69 (2026-09-28)
|
|
16
|
+
|
|
7
17
|
- `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
18
|
- `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
19
|
|
|
@@ -177,7 +177,9 @@ function checkEnvironmentVariables() {
|
|
|
177
177
|
name: "Environment Variables",
|
|
178
178
|
didPass: false,
|
|
179
179
|
message: `Missing required env variables: ${validation.missing.join(", ")}`,
|
|
180
|
-
fix:
|
|
180
|
+
fix: existsSync(join(projectRoot, ".env"))
|
|
181
|
+
? `Edit .env and set these values:\n ${validation.missing.map((v) => `${v}=<value>`).join("\n ")}`
|
|
182
|
+
: "No .env file yet. Run `tdk project` to create one with working defaults.",
|
|
181
183
|
};
|
|
182
184
|
}
|
|
183
185
|
if (validation.invalid.length > 0) {
|
|
@@ -459,6 +461,23 @@ function typePackageCandidates(entry) {
|
|
|
459
461
|
const base = entry.split("/")[0] ?? entry;
|
|
460
462
|
return [`@types/${base}`, base];
|
|
461
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* True when running the script `name` invokes `tsc`, following `bun|npm|pnpm|yarn run <other>`
|
|
466
|
+
* hops. TS2688 ("Cannot find type definition file") is raised by `tsc`; a `vite build` or
|
|
467
|
+
* `bun build` transpiles TypeScript without type-checking and never reads `"types"`.
|
|
468
|
+
*/
|
|
469
|
+
function scriptRunsTsc(scripts, name, depth = 0) {
|
|
470
|
+
const body = scripts[name];
|
|
471
|
+
if (typeof body !== "string" || depth > 3)
|
|
472
|
+
return false;
|
|
473
|
+
if (/(^|[\s;&|(])tsc(\s|$)/.test(body))
|
|
474
|
+
return true;
|
|
475
|
+
for (const hop of body.matchAll(/\b(?:bun|npm|pnpm|yarn)\s+run\s+([\w:.-]+)/g)) {
|
|
476
|
+
if (scriptRunsTsc(scripts, hop[1], depth + 1))
|
|
477
|
+
return true;
|
|
478
|
+
}
|
|
479
|
+
return false;
|
|
480
|
+
}
|
|
462
481
|
/** The package to tell the user to install for a `types` entry. */
|
|
463
482
|
function neededTypePackage(entry) {
|
|
464
483
|
const candidates = typePackageCandidates(entry);
|
|
@@ -489,6 +508,10 @@ export function checkTypeScriptTypeDependencies() {
|
|
|
489
508
|
continue;
|
|
490
509
|
}
|
|
491
510
|
const pkg = readJsonFile(packageJsonPath);
|
|
511
|
+
const scripts = pkg?.scripts ?? {};
|
|
512
|
+
if (!scriptRunsTsc(scripts, "build")) {
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
492
515
|
const installed = new Set([
|
|
493
516
|
...Object.keys(pkg?.devDependencies ?? {}),
|
|
494
517
|
...Object.keys(pkg?.dependencies ?? {}),
|
|
@@ -218,6 +218,9 @@ export const projectCommand = new Command("project")
|
|
|
218
218
|
}
|
|
219
219
|
showStep("\nš Regenerating master configuration files...\n");
|
|
220
220
|
await generateMasterConfigs(projectRoot);
|
|
221
|
+
if (ensureEnvFile(projectRoot)) {
|
|
222
|
+
showSuccess("Created: .env (the defaults work as-is)");
|
|
223
|
+
}
|
|
221
224
|
const ignored = ensureGitignore(projectRoot);
|
|
222
225
|
if (ignored.length > 0) {
|
|
223
226
|
showSuccess(`Added to .gitignore: ${ignored.join(", ")}`);
|
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.71",
|
|
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": {
|