@tdk-landscape/tdk-cli-core 1.3.57 → 1.3.59
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,14 @@ Notable changes to the `tdk` CLI. Versions match [npm](https://www.npmjs.com/pac
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
- `tdk doctor` no longer fails every fresh project with "Generated Dockerfiles reference missing project runtime assets: prisma-runtime-relink.sh, migrate.sh". Those two scripts were never shipped or used by generated Dockerfiles; doctor now checks the scripts TDK ships plus whatever generated Dockerfiles actually copy. Found by the new clean-machine quickstart run.
|
|
8
|
+
|
|
9
|
+
## 1.3.58 (2026-09-27)
|
|
10
|
+
|
|
11
|
+
- Dropped the `ink-select-input` dependency in favor of a small built-in list in `tdk ui` (same keys: arrows or j/k, 1-9, Enter). Removes 4 packages: ink-select-input, figures, to-rotated and is-unicode-supported.
|
|
12
|
+
|
|
13
|
+
## 1.3.57 (2026-09-27)
|
|
14
|
+
|
|
7
15
|
- Binary installs (`tdk-landscape.github.io/install.sh`) ship the Docker helper scripts generated Dockerfiles run. Before, `tdk project` warned "TDK runtime assets not found" and image builds could fail. The release script now smoke-tests the built binary.
|
|
8
16
|
|
|
9
17
|
## 1.3.56 (2026-09-27)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { execSync } from "node:child_process";
|
|
2
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join, normalize } from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { Command } from "commander";
|
|
@@ -215,15 +215,33 @@ function checkMasterConfigs() {
|
|
|
215
215
|
fix: "Run: tdk project",
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
+
// The scripts `tdk project` copies into every project. Generated Dockerfiles
|
|
219
|
+
// may reference others; those are checked by scanning the Dockerfiles below.
|
|
218
220
|
const REQUIRED_DOCKER_TEMPLATE_FILES = [
|
|
219
221
|
"install-deps.sh",
|
|
220
222
|
"bun-hoisted-symlink-fix.sh",
|
|
221
223
|
"prisma-bun-client-link-fix.sh",
|
|
222
224
|
"prisma-normalize-client.sh",
|
|
223
|
-
"prisma-runtime-relink.sh",
|
|
224
225
|
"infisical-entrypoint.sh",
|
|
225
|
-
"migrate.sh",
|
|
226
226
|
];
|
|
227
|
+
const TEMPLATE_COPY_PATTERN = /shared-platform-engineering\/docker-templates\/([\w.-]+)/g;
|
|
228
|
+
/** docker-templates files named in COPY lines of generated Dockerfiles. */
|
|
229
|
+
function findReferencedTemplateFiles(projectRoot) {
|
|
230
|
+
const referenced = new Set();
|
|
231
|
+
for (const resource of discoverResourcesFromRoot(projectRoot)) {
|
|
232
|
+
const dir = join(resource.path, ".autogenerated");
|
|
233
|
+
if (!existsSync(dir))
|
|
234
|
+
continue;
|
|
235
|
+
for (const entry of readdirSync(dir)) {
|
|
236
|
+
if (!entry.startsWith("Dockerfile") || entry.endsWith(".dockerignore"))
|
|
237
|
+
continue;
|
|
238
|
+
for (const match of readFileSync(join(dir, entry), "utf-8").matchAll(TEMPLATE_COPY_PATTERN)) {
|
|
239
|
+
referenced.add(match[1]);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return [...referenced];
|
|
244
|
+
}
|
|
227
245
|
export function checkGeneratedProjectRuntimeAssets() {
|
|
228
246
|
const projectRoot = findProjectRoot() ?? process.cwd();
|
|
229
247
|
const problems = [];
|
|
@@ -231,7 +249,14 @@ export function checkGeneratedProjectRuntimeAssets() {
|
|
|
231
249
|
problems.push("package.json (workspace root manifest)");
|
|
232
250
|
}
|
|
233
251
|
const templateDir = join(projectRoot, "shared-platform-engineering", "docker-templates");
|
|
234
|
-
|
|
252
|
+
let referenced = [];
|
|
253
|
+
try {
|
|
254
|
+
referenced = findReferencedTemplateFiles(projectRoot);
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
// Discovery can fail on a half-written project; the base list still applies.
|
|
258
|
+
}
|
|
259
|
+
for (const file of new Set([...REQUIRED_DOCKER_TEMPLATE_FILES, ...referenced])) {
|
|
235
260
|
if (!existsSync(join(templateDir, file))) {
|
|
236
261
|
problems.push(`shared-platform-engineering/docker-templates/${file}`);
|
|
237
262
|
}
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from "ink";
|
|
3
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text, useInput } from "ink";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
// Keys match what ink-select-input handled: up/down or k/j (wrapping), 1-9 to pick, Enter to select.
|
|
4
5
|
export const ResourceSelectInput = ({ items, onSelect, highlightedIndex, }) => {
|
|
5
|
-
|
|
6
|
+
const [selected, setSelected] = useState(() => Math.max(0, Math.min(highlightedIndex, items.length - 1)));
|
|
7
|
+
const itemKeys = items.map((item) => item.value).join("\0");
|
|
8
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: reset only when the item list changes
|
|
9
|
+
useEffect(() => setSelected(0), [itemKeys]);
|
|
10
|
+
useInput((input, key) => {
|
|
11
|
+
if (items.length === 0)
|
|
12
|
+
return;
|
|
13
|
+
if (input === "k" || key.upArrow)
|
|
14
|
+
setSelected((i) => (i === 0 ? items.length - 1 : i - 1));
|
|
15
|
+
if (input === "j" || key.downArrow)
|
|
16
|
+
setSelected((i) => (i === items.length - 1 ? 0 : i + 1));
|
|
17
|
+
if (/^[1-9]$/.test(input)) {
|
|
18
|
+
const item = items[Number(input) - 1];
|
|
19
|
+
if (item)
|
|
20
|
+
onSelect(item);
|
|
21
|
+
}
|
|
22
|
+
if (key.return)
|
|
23
|
+
onSelect(items[selected]);
|
|
24
|
+
});
|
|
25
|
+
return (_jsx(Box, { flexDirection: "column", children: items.map((item, index) => {
|
|
26
|
+
const isSelected = index === selected;
|
|
27
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? "cyan" : undefined, children: isSelected ? "▓▒░ " : " " }), _jsx(Text, { color: isSelected ? "cyan" : "white", bold: isSelected, backgroundColor: isSelected ? "black" : undefined, children: item.label })] }, item.value));
|
|
28
|
+
}) }));
|
|
6
29
|
};
|
|
7
30
|
//# sourceMappingURL=ResourceSelectInput.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.
|
|
4
|
+
"version": "1.3.59",
|
|
5
5
|
"description": "TDK CLI - Tilt Development Kit command line interface",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tdk",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"commander": "^15.0.0",
|
|
58
58
|
"handlebars": "^4.7.8",
|
|
59
59
|
"ink": "^7.1.1",
|
|
60
|
-
"ink-select-input": "^6.2.0",
|
|
61
60
|
"react": "^19.3.0"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
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.59",
|
|
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": {
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"commander": "^15.0.0",
|
|
71
71
|
"handlebars": "^4.7.8",
|
|
72
72
|
"ink": "^7.1.1",
|
|
73
|
-
"ink-select-input": "^6.2.0",
|
|
74
73
|
"react": "^19.3.0"
|
|
75
74
|
},
|
|
76
75
|
"devDependencies": {
|