@tdk-landscape/tdk-cli-core 1.3.138 ā 1.3.140
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/cli/dist/backend-frameworks/elysia.js +0 -1
- package/cli/dist/backend-frameworks/express.js +0 -1
- package/cli/dist/backend-frameworks/fastify.js +0 -1
- package/cli/dist/backend-frameworks/h3.js +0 -1
- package/cli/dist/backend-frameworks/koa.js +0 -1
- package/cli/dist/backend-frameworks/mcp.js +0 -1
- package/cli/dist/backend-frameworks/nestjs.js +0 -1
- package/cli/dist/backend-frameworks/registry.js +0 -1
- package/cli/dist/backend-frameworks/types.js +0 -1
- package/cli/dist/backend-languages/bun.js +0 -1
- package/cli/dist/backend-languages/go.js +0 -1
- package/cli/dist/backend-languages/python.js +0 -1
- package/cli/dist/backend-languages/registry.js +0 -1
- package/cli/dist/backend-languages/rust.js +0 -1
- package/cli/dist/backend-languages/types.js +0 -1
- package/cli/dist/cli.js +0 -1
- package/cli/dist/commands/__tests__/project-e2e-helpers.js +0 -1
- package/cli/dist/commands/completion.js +0 -1
- package/cli/dist/commands/config.js +3 -14
- package/cli/dist/commands/doctor.js +10 -11
- package/cli/dist/commands/down.js +0 -1
- package/cli/dist/commands/eject.js +0 -1
- package/cli/dist/commands/help.js +0 -1
- package/cli/dist/commands/import.js +0 -1
- package/cli/dist/commands/logs.js +0 -1
- package/cli/dist/commands/maintainers.js +0 -1
- package/cli/dist/commands/mcp.js +0 -1
- package/cli/dist/commands/networks.js +0 -2
- package/cli/dist/commands/project.js +3 -4
- package/cli/dist/commands/projects.js +0 -1
- package/cli/dist/commands/resource.js +11 -10
- package/cli/dist/commands/resources.js +0 -1
- package/cli/dist/commands/runtime.js +0 -1
- package/cli/dist/commands/stack.js +0 -1
- package/cli/dist/commands/stacks.js +0 -1
- package/cli/dist/commands/status.js +0 -1
- package/cli/dist/commands/ui.js +8 -13
- package/cli/dist/commands/up.js +6 -7
- package/cli/dist/commands/upgrade.js +2 -2
- package/cli/dist/commands/version.js +0 -1
- package/cli/dist/components/Accessible.js +4 -3
- package/cli/dist/components/BaseTooltip.js +0 -1
- package/cli/dist/components/DetailPanel.js +0 -1
- package/cli/dist/components/FileTree.js +0 -1
- package/cli/dist/components/ResourceSelectInput.js +3 -3
- package/cli/dist/components/ResourceTable.js +0 -1
- package/cli/dist/components/ServiceIssues.js +0 -1
- package/cli/dist/components/TUIHeader.js +0 -1
- package/cli/dist/components/TabBar.js +0 -1
- package/cli/dist/components/Tooltip.js +0 -1
- package/cli/dist/components/index.js +0 -1
- package/cli/dist/components/ui-theme.js +5 -1
- package/cli/dist/config/platform-standards.js +0 -1
- package/cli/dist/frontend-frameworks/lit.js +0 -1
- package/cli/dist/frontend-frameworks/preact.js +0 -1
- package/cli/dist/frontend-frameworks/qwik.js +0 -1
- package/cli/dist/frontend-frameworks/react.js +0 -1
- package/cli/dist/frontend-frameworks/registry.js +0 -1
- package/cli/dist/frontend-frameworks/solid.js +0 -1
- package/cli/dist/frontend-frameworks/svelte.js +1 -2
- package/cli/dist/frontend-frameworks/tanstack-router.js +0 -1
- package/cli/dist/frontend-frameworks/types.js +0 -1
- package/cli/dist/frontend-frameworks/vanilla.js +0 -1
- package/cli/dist/frontend-frameworks/vue.js +0 -1
- package/cli/dist/generator/__tests__/golden-helpers.js +0 -1
- package/cli/dist/generator/extension-fetch.js +0 -1
- package/cli/dist/generator/resource-templates.js +0 -1
- package/cli/dist/generator/template-engine.js +9 -10
- package/cli/dist/index.js +0 -1
- package/cli/dist/mcp/server.js +0 -1
- package/cli/dist/mcp/tools.js +0 -1
- package/cli/dist/types/index.js +4 -6
- package/cli/dist/utils/agent-host.js +0 -1
- package/cli/dist/utils/atomic-write.js +0 -1
- package/cli/dist/utils/bun-floor.js +0 -1
- package/cli/dist/utils/bun-requirement.js +0 -1
- package/cli/dist/utils/cache.js +0 -1
- package/cli/dist/utils/cold-preflight.js +2 -2
- package/cli/dist/utils/command-helpers.js +0 -1
- package/cli/dist/utils/constants.js +18 -4
- package/cli/dist/utils/discovery-context.js +0 -1
- package/cli/dist/utils/discovery-paths.js +2 -2
- package/cli/dist/utils/docker.js +0 -1
- package/cli/dist/utils/doctor-report.js +0 -1
- package/cli/dist/utils/doctor-runtime.js +4 -5
- package/cli/dist/utils/doctor-starlark.js +0 -1
- package/cli/dist/utils/doctor-wiring.js +8 -9
- package/cli/dist/utils/down-cleanup.js +0 -1
- package/cli/dist/utils/env-validator.js +0 -1
- package/cli/dist/utils/errors.js +2 -3
- package/cli/dist/utils/exec-async.js +0 -1
- package/cli/dist/utils/file-helpers.js +1 -3
- package/cli/dist/utils/formatting.js +0 -1
- package/cli/dist/utils/generated-paths.js +5 -6
- package/cli/dist/utils/help-command.js +0 -1
- package/cli/dist/utils/host-port-config.js +2 -2
- package/cli/dist/utils/host-port-plan.js +0 -1
- package/cli/dist/utils/json-output.js +0 -1
- package/cli/dist/utils/machine-output.js +0 -1
- package/cli/dist/utils/paths.js +2 -2
- package/cli/dist/utils/platform.js +0 -1
- package/cli/dist/utils/port-assignment.js +0 -1
- package/cli/dist/utils/port-conflict-fix.js +0 -1
- package/cli/dist/utils/port-fallback-notice.js +0 -1
- package/cli/dist/utils/port-listener-probe.js +0 -1
- package/cli/dist/utils/project-config-defaults.js +0 -1
- package/cli/dist/utils/project-features.js +0 -1
- package/cli/dist/utils/project-templates.js +0 -1
- package/cli/dist/utils/prompt.js +0 -1
- package/cli/dist/utils/resource-features.js +0 -1
- package/cli/dist/utils/resource-kind.js +0 -1
- package/cli/dist/utils/schema-version-gate.js +0 -1
- package/cli/dist/utils/search-status.js +0 -1
- package/cli/dist/utils/secret-redaction.js +0 -1
- package/cli/dist/utils/service-config-checks.js +0 -1
- package/cli/dist/utils/service-manifest.js +0 -1
- package/cli/dist/utils/service-runtime-state.js +0 -1
- package/cli/dist/utils/service-urls.js +2 -2
- package/cli/dist/utils/services.js +3 -6
- package/cli/dist/utils/shared-platform-postgres.js +2 -3
- package/cli/dist/utils/single-flight.js +0 -1
- package/cli/dist/utils/smoke.js +0 -1
- package/cli/dist/utils/spinner.js +0 -1
- package/cli/dist/utils/stack-features.js +0 -1
- package/cli/dist/utils/stack-status.js +0 -1
- package/cli/dist/utils/startup-report.js +0 -1
- package/cli/dist/utils/status-message.js +0 -1
- package/cli/dist/utils/status-ports.js +0 -1
- package/cli/dist/utils/suggestions.js +6 -3
- package/cli/dist/utils/tar.js +5 -4
- package/cli/dist/utils/tdk-version.js +2 -2
- package/cli/dist/utils/terminal-layout.js +0 -1
- package/cli/dist/utils/tilt-events.js +0 -1
- package/cli/dist/utils/tilt-logs.js +0 -1
- package/cli/dist/utils/tilt-process.js +0 -1
- package/cli/dist/utils/tilt-resource-state.js +0 -1
- package/cli/dist/utils/tilt-startup.js +0 -1
- package/cli/dist/utils/tilt-unreachable-message.js +0 -1
- package/cli/dist/utils/tilt.js +0 -1
- package/cli/dist/utils/ui-keymap.js +1 -2
- package/cli/dist/utils/ui-service-state.js +0 -1
- package/cli/dist/utils/up-only.js +0 -1
- package/cli/dist/utils/up-readiness.js +0 -1
- package/cli/dist/utils/validation.js +0 -1
- package/cli/dist/utils/which.js +0 -1
- package/cli/dist/utils/windows-doctor.js +0 -1
- package/cli/dist-bundle/chunk-42IVF3YT.js +3 -0
- package/cli/dist-bundle/chunk-LMHD62S4.js +315 -0
- package/cli/dist-bundle/cli.js +211 -211
- package/cli/dist-bundle/{cold-preflight-6VMSECY4.js ā cold-preflight-O6LMFPMR.js} +1 -1
- package/cli/dist-bundle/{extension-fetch-COIG2KR6.js ā extension-fetch-6XNTDF44.js} +1 -1
- package/cli/package.json +1 -1
- package/engine/topologies/platform/docker/AGENTS.md +13 -13
- package/engine/topologies/platform/docker/dockerfile/language_dockerfile.star +6 -2
- package/engine/topologies/tilt/manifest/README.md +1 -15
- package/package.json +1 -1
- package/cli/dist-bundle/chunk-OBQS5CYC.js +0 -3
- package/cli/dist-bundle/chunk-Q6PZ6ZPA.js +0 -315
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { BaseTooltip } from "./BaseTooltip.js";
|
|
3
|
+
import { useTUITheme } from "./ui-theme.js";
|
|
3
4
|
/**
|
|
4
5
|
* Info tooltip variant with predefined accessibility styling.
|
|
5
|
-
* Uses ā¹ prefix and adds margin for better visibility.
|
|
6
|
+
* Uses an ā¹ prefix ([i] in ASCII mode) and adds margin for better visibility.
|
|
6
7
|
*/
|
|
7
8
|
export const AccessibleTooltip = ({ content, shortcut, visible }) => {
|
|
8
|
-
|
|
9
|
+
const theme = useTUITheme();
|
|
10
|
+
return (_jsx(BaseTooltip, { content: content, shortcut: shortcut, visible: visible, prefix: theme.ascii ? "[i] " : "ā¹ ", marginTop: 1 }));
|
|
9
11
|
};
|
|
10
|
-
//# sourceMappingURL=Accessible.js.map
|
|
@@ -31,4 +31,3 @@ export const DetailPanel = ({ stack, service, stackMetadata, visible, }) => {
|
|
|
31
31
|
}
|
|
32
32
|
return (_jsxs(Box, { width: 40, borderStyle: theme.ascii ? undefined : "single", borderColor: theme.border, paddingX: 2, paddingY: 2, flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, justifyContent: "center", children: _jsx(Text, { color: theme.muted, dimColor: theme.dimMuted, children: "Select a stack or service" }) }), _jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: theme.muted, dimColor: theme.dimMuted, children: "to view details" }) })] }));
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=DetailPanel.js.map
|
|
@@ -31,12 +31,12 @@ export const ResourceSelectInput = ({ items, onSelect, highlightedIndex, width,
|
|
|
31
31
|
if (item)
|
|
32
32
|
onSelect(item);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const current = items[selected];
|
|
35
|
+
if (key.return && current)
|
|
36
|
+
onSelect(current);
|
|
36
37
|
}, { isActive });
|
|
37
38
|
return (_jsx(Box, { ref: listRef, flexDirection: "column", width: width, children: items.slice(firstVisible, firstVisible + visibleCount).map((item, index) => {
|
|
38
39
|
const isSelected = firstVisible + index === selected;
|
|
39
40
|
return (_jsx(Box, { width: width, children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: isSelected ? theme.selectedForeground : theme.muted, backgroundColor: isSelected ? theme.selectedBackground : undefined, children: isSelected ? `${theme.selectionMarker} ` : " " }), _jsx(Text, { color: isSelected ? theme.selectedForeground : theme.foreground, bold: isSelected || theme.highContrast, backgroundColor: isSelected ? theme.selectedBackground : undefined, children: item.label })] }) }, item.value));
|
|
40
41
|
}) }));
|
|
41
42
|
};
|
|
42
|
-
//# sourceMappingURL=ResourceSelectInput.js.map
|
|
@@ -33,4 +33,3 @@ export const ResourceTable = ({ resources, maxWidth = 100 }) => {
|
|
|
33
33
|
return (_jsxs(Box, { flexDirection: "row", paddingX: 1, children: [_jsx(Box, { width: nameWidth, children: _jsx(Text, { color: theme.foreground, children: truncate(resource.name, Math.max(3, nameWidth - 1)) }) }), _jsx(Box, { width: stackWidth, children: _jsx(Text, { color: theme.muted, children: truncate(stackName, Math.max(3, stackWidth - 1)) }) }), _jsx(Box, { width: typeWidth, children: _jsx(Text, { color: theme.accent, bold: theme.highContrast, children: truncate(resource.type, Math.max(3, typeWidth - 1)) }) }), _jsx(Box, { width: statusWidth, children: _jsx(Text, { color: statusColor, bold: theme.highContrast, children: truncate(statusLabel, Math.max(3, statusWidth - 1)) }) }), !narrowMode && (_jsx(Box, { width: createdWidth, children: _jsx(Text, { color: theme.muted, children: truncate(formatShortDate(resource.createdAt), Math.max(3, createdWidth - 1)) }) }))] }, resource.name));
|
|
34
34
|
})] }));
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=ResourceTable.js.map
|
|
@@ -11,4 +11,3 @@ export function ServiceIssues({ resources }) {
|
|
|
11
11
|
return null;
|
|
12
12
|
return (_jsx(Box, { flexDirection: "column", marginTop: 1, children: issues.map((resource) => (_jsxs(Text, { color: theme.muted, children: [resource.name, ": ", resource.statusReason] }, resource.name))) }));
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=ServiceIssues.js.map
|
|
@@ -24,4 +24,3 @@ export const TUIHeader = ({ projectRoot, resourceCount, terminalWidth, version,
|
|
|
24
24
|
const rootWidth = contentWidth - headingWidth;
|
|
25
25
|
return (_jsxs(Box, { flexDirection: "row", paddingX: paddingX, width: terminalWidth, children: [_jsx(Text, { color: theme.accent, bold: true, children: title }), _jsx(Text, { color: theme.muted, children: " | " }), _jsx(Box, { flexShrink: 0, width: rootWidth, children: _jsx(Text, { color: theme.foreground, wrap: "truncate-end", children: projectRoot }) }), _jsx(Text, { color: theme.muted, children: " | " }), _jsx(Text, { color: theme.success, children: resourceLabel })] }));
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=TUIHeader.js.map
|
|
@@ -25,4 +25,3 @@ export const TabBar = ({ activeTab, compact = false, terminalWidth }) => {
|
|
|
25
25
|
return (_jsx(Box, { children: compactLayout ? (_jsxs(Text, { color: isActive ? theme.selectedForeground : theme.muted, bold: isActive || theme.highContrast, backgroundColor: isActive ? theme.selectedBackground : undefined, children: [isActive ? `${theme.selectionMarker} ` : "", "[", tab.shortcut, "] ", label] })) : isActive ? (_jsx(Box, { ...selectedBorderProps, paddingX: wide ? 1 : 0, backgroundColor: theme.selectedBackground, children: _jsxs(Text, { children: [wide && _jsx(Text, { color: theme.selectedForeground, children: theme.bannerStart }), _jsxs(Text, { color: theme.selectedForeground, bold: true, children: [" ", "[", tab.shortcut, "] ", label, " "] }), wide && _jsx(Text, { color: theme.selectedForeground, children: theme.bannerEnd })] }) })) : (_jsx(Box, { paddingX: wide ? 1 : 0, children: _jsxs(Text, { color: theme.muted, dimColor: theme.dimMuted, bold: theme.highContrast, children: ["[", tab.shortcut, "] ", label] }) })) }, tab.id));
|
|
26
26
|
}) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: theme.muted, dimColor: theme.dimMuted, children: divider }) })] }));
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=TabBar.js.map
|
|
@@ -84,6 +84,7 @@ export function createTUITheme(highContrast, environment = process.env) {
|
|
|
84
84
|
bannerStart: ascii ? ">>>" : "\u2593\u2592\u2591",
|
|
85
85
|
bannerEnd: ascii ? "<<<" : "\u2591\u2592\u2593",
|
|
86
86
|
selectionMarker: ascii ? ">>>" : "\u2593\u2592\u2591",
|
|
87
|
+
separator: ascii ? " | " : " \u2502 ",
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
90
|
const STATUS_COLOR_THEMES = {
|
|
@@ -108,9 +109,12 @@ export function getTUIStatusIcon(theme, icon, color) {
|
|
|
108
109
|
return "[x]";
|
|
109
110
|
return "[?]";
|
|
110
111
|
}
|
|
112
|
+
/** Return a tab section heading suited to the active terminal character set. */
|
|
113
|
+
export function sectionTitle(theme, title) {
|
|
114
|
+
return theme.ascii ? `[ ${title} ]` : `āā ${title} ā`;
|
|
115
|
+
}
|
|
111
116
|
export const TUIThemeContext = createContext(createTUITheme(false));
|
|
112
117
|
/** Read the theme provided to the current TUI subtree. */
|
|
113
118
|
export function useTUITheme() {
|
|
114
119
|
return useContext(TUIThemeContext);
|
|
115
120
|
}
|
|
116
|
-
//# sourceMappingURL=ui-theme.js.map
|
|
@@ -5,7 +5,7 @@ export const svelteFrontendProvider = {
|
|
|
5
5
|
svelte: "^5.0.0",
|
|
6
6
|
},
|
|
7
7
|
devDependencies: {
|
|
8
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
8
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
9
9
|
},
|
|
10
10
|
compilerOptions: {},
|
|
11
11
|
createFiles(name) {
|
|
@@ -65,4 +65,3 @@ export default app;
|
|
|
65
65
|
];
|
|
66
66
|
},
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=svelte.js.map
|
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
import Handlebars from "handlebars";
|
|
7
7
|
import { PLATFORM_STANDARDS } from "../config/platform-standards.js";
|
|
8
8
|
import { writeTextFileAtomic } from "../utils/atomic-write.js";
|
|
9
|
-
import { DATABASE_MANAGEMENT_FEATURE, TILTIGNORE_FILE } from "../utils/constants.js";
|
|
9
|
+
import { AUTOGENERATED_DIR, DATABASE_MANAGEMENT_FEATURE, DOCKER_COMPOSE_FILE, PACKAGE_JSON, PROJECT_JSON, RESOURCE_DEFAULTS_FILE, TECH_STACK_FILE, TILTIGNORE_FILE, } from "../utils/constants.js";
|
|
10
10
|
import { writeTextFile } from "../utils/file-helpers.js";
|
|
11
11
|
import { assertTdkGeneratedPath } from "../utils/generated-paths.js";
|
|
12
12
|
import { DEFAULT_ALWAYS_ENABLED_INFRA } from "../utils/project-config-defaults.js";
|
|
@@ -54,8 +54,8 @@ function getEmbeddedTemplates() {
|
|
|
54
54
|
if (!embeddedTemplatesCache) {
|
|
55
55
|
embeddedTemplatesCache = {
|
|
56
56
|
[TILTIGNORE_FILE]: loadTemplate(".tiltignore.hbs"),
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
[RESOURCE_DEFAULTS_FILE]: loadTemplate("TILT_RESOURCE_DEFAULTS.star.hbs"),
|
|
58
|
+
[TECH_STACK_FILE]: loadTemplate("TILT_TECH_STACK.star.hbs"),
|
|
59
59
|
Tiltfile: loadTemplate("Tiltfile.hbs"),
|
|
60
60
|
"spec.master": loadTemplate("spec.master.hbs"),
|
|
61
61
|
};
|
|
@@ -175,11 +175,11 @@ export class TemplateEngine {
|
|
|
175
175
|
return Handlebars.compile(templateSource);
|
|
176
176
|
}
|
|
177
177
|
generateTechStack(context) {
|
|
178
|
-
const template = this.loadTemplate(
|
|
178
|
+
const template = this.loadTemplate(TECH_STACK_FILE);
|
|
179
179
|
return template(context);
|
|
180
180
|
}
|
|
181
181
|
generateServiceDefaults(context) {
|
|
182
|
-
const template = this.loadTemplate(
|
|
182
|
+
const template = this.loadTemplate(RESOURCE_DEFAULTS_FILE);
|
|
183
183
|
return template(context);
|
|
184
184
|
}
|
|
185
185
|
generateSpecMaster(context) {
|
|
@@ -365,7 +365,7 @@ function normalizeProjectConfig(value) {
|
|
|
365
365
|
export class ProjectConfigNotFoundError extends Error {
|
|
366
366
|
}
|
|
367
367
|
export function readProjectConfig(projectRoot) {
|
|
368
|
-
const projectJsonPath = path.join(projectRoot, ".tdk",
|
|
368
|
+
const projectJsonPath = path.join(projectRoot, ".tdk", PROJECT_JSON);
|
|
369
369
|
if (!fs.existsSync(projectJsonPath)) {
|
|
370
370
|
throw new ProjectConfigNotFoundError(`Project config not found: ${projectJsonPath}. Run 'tdk project --yes' first.`);
|
|
371
371
|
}
|
|
@@ -405,7 +405,7 @@ async function warnIfSablierUnlicensed(projectRoot) {
|
|
|
405
405
|
"or remove the `sablier` block from the affected service.json file(s) to silence this warning.");
|
|
406
406
|
}
|
|
407
407
|
function ensureRootWorkspaceManifest(projectRoot, projectConfig) {
|
|
408
|
-
const packageJsonPath = assertTdkGeneratedPath(projectRoot,
|
|
408
|
+
const packageJsonPath = assertTdkGeneratedPath(projectRoot, PACKAGE_JSON);
|
|
409
409
|
if (fs.existsSync(packageJsonPath)) {
|
|
410
410
|
return false;
|
|
411
411
|
}
|
|
@@ -464,7 +464,7 @@ export async function generateMasterConfigs(projectRoot, options = {}) {
|
|
|
464
464
|
console.log(`ā Generated: .tdk/.tdk-out/${filename}`);
|
|
465
465
|
}
|
|
466
466
|
if (isStackFeatureEnabledInStacks(projectConfig.phases, DATABASE_MANAGEMENT_FEATURE)) {
|
|
467
|
-
const composePath = assertTdkGeneratedPath(projectRoot, path.join("services", "platform", DATABASE_MANAGEMENT_FEATURE,
|
|
467
|
+
const composePath = assertTdkGeneratedPath(projectRoot, path.join("services", "platform", DATABASE_MANAGEMENT_FEATURE, DOCKER_COMPOSE_FILE));
|
|
468
468
|
const composeDir = path.dirname(composePath);
|
|
469
469
|
fs.mkdirSync(composeDir, { recursive: true });
|
|
470
470
|
writeTextFileAtomic(composePath, generateDatabaseManagementCompose(projectConfig));
|
|
@@ -696,7 +696,7 @@ function createUnifiedDiff(file, actual, expected) {
|
|
|
696
696
|
}
|
|
697
697
|
function verifyGeneratedResourceFiles(projectRoot, serviceJsonPath) {
|
|
698
698
|
const serviceDir = path.dirname(serviceJsonPath);
|
|
699
|
-
const generatedDir = path.join(serviceDir,
|
|
699
|
+
const generatedDir = path.join(serviceDir, AUTOGENERATED_DIR);
|
|
700
700
|
if (!fs.existsSync(generatedDir))
|
|
701
701
|
return { errors: [], handEdited: [] };
|
|
702
702
|
const generatedFiles = [];
|
|
@@ -746,4 +746,3 @@ function verifyGeneratedResourceFiles(projectRoot, serviceJsonPath) {
|
|
|
746
746
|
}
|
|
747
747
|
return { errors, handEdited };
|
|
748
748
|
}
|
|
749
|
-
//# sourceMappingURL=template-engine.js.map
|
package/cli/dist/index.js
CHANGED
|
@@ -8,4 +8,3 @@ export { findProjectRoot } from "./utils/paths.js";
|
|
|
8
8
|
export { checkPortStatus, findAvailablePort, } from "./utils/port-assignment.js";
|
|
9
9
|
export { clearMetadataCache, discoverResources, discoverStacks, getAllStacks, getResourceMetadata, getResourcesForStack, getStackMetadata, stackExists, } from "./utils/services.js";
|
|
10
10
|
export { buildTiltDownArgs, buildTiltUpArgs, getTiltfilePath, isTiltAvailable, runTilt, } from "./utils/tilt.js";
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/cli/dist/mcp/server.js
CHANGED
package/cli/dist/mcp/tools.js
CHANGED
package/cli/dist/types/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Copyright (c) 2026 TDK Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { RESOURCE_DEFAULTS_FILE, TECH_STACK_FILE } from "../utils/constants.js";
|
|
1
4
|
export const RESOURCE_CONFIG_APP_TYPES = [
|
|
2
5
|
"backend",
|
|
3
6
|
"frontend",
|
|
@@ -23,11 +26,6 @@ export function isCreatableResourceType(value) {
|
|
|
23
26
|
* Eliminates the need for 'as MasterConfigFileName' assertion.
|
|
24
27
|
*/
|
|
25
28
|
export function isMasterConfigFileName(filename) {
|
|
26
|
-
const validNames = [
|
|
27
|
-
"TILT_TECH_STACK.star",
|
|
28
|
-
"TILT_RESOURCE_DEFAULTS.star",
|
|
29
|
-
"spec.master",
|
|
30
|
-
];
|
|
29
|
+
const validNames = [TECH_STACK_FILE, RESOURCE_DEFAULTS_FILE, "spec.master"];
|
|
31
30
|
return validNames.includes(filename);
|
|
32
31
|
}
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
package/cli/dist/utils/cache.js
CHANGED
|
@@ -6,6 +6,7 @@ import { join } from "node:path";
|
|
|
6
6
|
import { checkDockerCompose, checkDockerRuntime, checkDockerVersions, checkTilt, } from "../commands/doctor.js";
|
|
7
7
|
import { BUN_FLOOR_LABEL, bunMeetsFloor } from "./bun-floor.js";
|
|
8
8
|
import { projectNeedsBun } from "./bun-requirement.js";
|
|
9
|
+
import { PROJECT_JSON } from "./constants.js";
|
|
9
10
|
import { checkNatsBroker } from "./doctor-wiring.js";
|
|
10
11
|
import { getHostPortPlan } from "./host-port-config.js";
|
|
11
12
|
import { findProjectRoot } from "./paths.js";
|
|
@@ -131,7 +132,7 @@ export async function runColdPreflight(opts = {}) {
|
|
|
131
132
|
if (usesPrisma(projectRoot)) {
|
|
132
133
|
let dbUp = false;
|
|
133
134
|
try {
|
|
134
|
-
const config = JSON.parse(readFileSync(join(projectRoot, ".tdk",
|
|
135
|
+
const config = JSON.parse(readFileSync(join(projectRoot, ".tdk", PROJECT_JSON), "utf-8"));
|
|
135
136
|
const projectName = String(config?.project?.name ?? "").replace(/-/g, "_");
|
|
136
137
|
if (projectName) {
|
|
137
138
|
const running = execFileSync(findOnPath("docker") ?? "docker", [
|
|
@@ -198,4 +199,3 @@ export async function assertMachineReadyOrExit() {
|
|
|
198
199
|
process.exit(1);
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
|
-
//# sourceMappingURL=cold-preflight.js.map
|
|
@@ -17,9 +17,24 @@ export const DATABASE_MANAGEMENT_FEATURE = "database-management";
|
|
|
17
17
|
export const TILTIGNORE_FILE = ".tiltignore";
|
|
18
18
|
// Manifest file name for a resource, used by discovery and the resource command.
|
|
19
19
|
export const SERVICE_JSON = "service.json";
|
|
20
|
+
// Compose file name for service resources and platform features.
|
|
21
|
+
export const DOCKER_COMPOSE_FILE = "docker-compose.yml";
|
|
22
|
+
// Directory where generated manifests, configs, and Dockerfiles live within each resource.
|
|
23
|
+
export const AUTOGENERATED_DIR = ".autogenerated";
|
|
24
|
+
export const TECH_STACK_FILE = "TILT_TECH_STACK.star";
|
|
25
|
+
export const RESOURCE_DEFAULTS_FILE = "TILT_RESOURCE_DEFAULTS.star";
|
|
26
|
+
// TDK project manifest file name. The canonical project config lives at
|
|
27
|
+
// `<project-root>/.tdk/project.json` ā discovery, doctor, generator, config
|
|
28
|
+
// edits, and stack-features all read/write it. Referenced by value across
|
|
29
|
+
// these modules, so a typo in one copy would compile and silently stop
|
|
30
|
+
// matching (or worse, read a different file). Keep the literal here and
|
|
31
|
+
// import it everywhere it's needed.
|
|
32
|
+
export const PROJECT_JSON = "project.json";
|
|
33
|
+
// Manifest file name for Node / JavaScript packages and root workspace.
|
|
34
|
+
export const PACKAGE_JSON = "package.json";
|
|
20
35
|
export const MASTER_CONFIG_FILES = [
|
|
21
|
-
|
|
22
|
-
|
|
36
|
+
TECH_STACK_FILE,
|
|
37
|
+
RESOURCE_DEFAULTS_FILE,
|
|
23
38
|
"spec.master",
|
|
24
39
|
];
|
|
25
40
|
export const VALID_RESOURCE_TYPES = [
|
|
@@ -114,7 +129,7 @@ export const SKIP_DIRECTORIES = [
|
|
|
114
129
|
];
|
|
115
130
|
export const AUTOGENERATED_FILE_PATTERNS = [
|
|
116
131
|
"Dockerfile",
|
|
117
|
-
|
|
132
|
+
DOCKER_COMPOSE_FILE,
|
|
118
133
|
"docker-compose.yaml",
|
|
119
134
|
"Tiltfile",
|
|
120
135
|
"vite.config.ts",
|
|
@@ -139,4 +154,3 @@ export function getStackEmoji(stackName) {
|
|
|
139
154
|
}
|
|
140
155
|
return "š¦";
|
|
141
156
|
}
|
|
142
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { join, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { PROJECT_JSON } from "./constants.js";
|
|
5
6
|
// Mirrors discovery/json_manifest_scanner.star: every `discovery.paths` entry is a shell
|
|
6
7
|
// glob of directories, and `find -maxdepth 3` looks for service.json under each match. So a
|
|
7
8
|
// resource is only seen by Tilt if some directory matching a pattern is the resource
|
|
@@ -48,7 +49,7 @@ function globMatchesDir(patternSegments, dirSegments) {
|
|
|
48
49
|
}
|
|
49
50
|
/** `discovery.paths` from .tdk/project.json, or the generic default when unset/unreadable. */
|
|
50
51
|
export function readDiscoveryPaths(projectRoot) {
|
|
51
|
-
const configPath = join(projectRoot, ".tdk",
|
|
52
|
+
const configPath = join(projectRoot, ".tdk", PROJECT_JSON);
|
|
52
53
|
if (!existsSync(configPath))
|
|
53
54
|
return DEFAULT_DISCOVERY_PATHS;
|
|
54
55
|
try {
|
|
@@ -90,4 +91,3 @@ export function chooseResourcePath(projectRoot, conventionalPath, stack, name) {
|
|
|
90
91
|
}
|
|
91
92
|
return { path: conventionalPath };
|
|
92
93
|
}
|
|
93
|
-
//# sourceMappingURL=discovery-paths.js.map
|
package/cli/dist/utils/docker.js
CHANGED
|
@@ -4,7 +4,7 @@ import { execFileSync, execSync } from "node:child_process";
|
|
|
4
4
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
5
5
|
import { createServer } from "node:net";
|
|
6
6
|
import { join } from "node:path";
|
|
7
|
-
import { STANDARD_PORTS } from "./constants.js";
|
|
7
|
+
import { AUTOGENERATED_DIR, PACKAGE_JSON, PROJECT_JSON, STANDARD_PORTS } from "./constants.js";
|
|
8
8
|
import { formatCount } from "./formatting.js";
|
|
9
9
|
import { findProjectRoot } from "./paths.js";
|
|
10
10
|
import { isApiServiceType } from "./resource-kind.js";
|
|
@@ -204,7 +204,7 @@ export function isRegistryRelatedBuildError(error) {
|
|
|
204
204
|
return /ConnectionRefused downloading package manifest|Verdaccio|private registry|dependency install failed during ImageBuild|install-deps\.sh|bun install/i.test(error);
|
|
205
205
|
}
|
|
206
206
|
export function projectConfigEnablesVerdaccio(projectRoot = findProjectRoot() ?? process.cwd()) {
|
|
207
|
-
const projectJsonPath = join(projectRoot, ".tdk",
|
|
207
|
+
const projectJsonPath = join(projectRoot, ".tdk", PROJECT_JSON);
|
|
208
208
|
if (!existsSync(projectJsonPath))
|
|
209
209
|
return false;
|
|
210
210
|
try {
|
|
@@ -217,7 +217,7 @@ export function projectConfigEnablesVerdaccio(projectRoot = findProjectRoot() ??
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
function npmrcPointsAtVerdaccio(projectRoot) {
|
|
220
|
-
for (const candidate of [join(projectRoot, ".npmrc"), join(projectRoot,
|
|
220
|
+
for (const candidate of [join(projectRoot, ".npmrc"), join(projectRoot, PACKAGE_JSON)]) {
|
|
221
221
|
if (!existsSync(candidate))
|
|
222
222
|
continue;
|
|
223
223
|
try {
|
|
@@ -713,7 +713,7 @@ export function describeTiltFailure(failure, exec = execSync) {
|
|
|
713
713
|
return failure.updateStatus || failure.runtimeStatus || "unknown error";
|
|
714
714
|
}
|
|
715
715
|
const SOURCE_FILE = /\.(ts|tsx|mts|js|mjs|cjs)$/;
|
|
716
|
-
const SKIPPED_DIRS = new Set(["node_modules", "dist",
|
|
716
|
+
const SKIPPED_DIRS = new Set(["node_modules", "dist", AUTOGENERATED_DIR, "tests", "__tests__"]);
|
|
717
717
|
function listSourceFiles(dir) {
|
|
718
718
|
const files = [];
|
|
719
719
|
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
@@ -817,4 +817,3 @@ export function checkHealthRoutes(projectRoot = findProjectRoot() ?? process.cwd
|
|
|
817
817
|
'To use a different path, set "healthCheckPath" (container healthcheck) or "traefik.healthCheck" (Traefik) in its service.json.',
|
|
818
818
|
};
|
|
819
819
|
}
|
|
820
|
-
//# sourceMappingURL=doctor-runtime.js.map
|
|
@@ -130,4 +130,3 @@ export function checkStarlarkLoadExports() {
|
|
|
130
130
|
fix: "Regenerate with a current TDK (`tdk config regenerate`). If the issue remains, rename loaded symbols without leading underscores and update stale load paths.",
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
//# sourceMappingURL=doctor-starlark.js.map
|
|
@@ -4,7 +4,7 @@ import { execFileSync, execSync } from "node:child_process";
|
|
|
4
4
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
5
5
|
import { basename, dirname, join, relative } from "node:path";
|
|
6
6
|
import { BACKEND_LANGUAGES } from "../backend-languages/registry.js";
|
|
7
|
-
import { BRING_YOUR_OWN_TYPE, DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
|
|
7
|
+
import { AUTOGENERATED_DIR, BRING_YOUR_OWN_TYPE, DATABASE_MANAGEMENT_FEATURE, DOCKER_COMPOSE_FILE, PACKAGE_JSON, PROJECT_JSON, } from "./constants.js";
|
|
8
8
|
import { execAsync } from "./exec-async.js";
|
|
9
9
|
import { formatCount } from "./formatting.js";
|
|
10
10
|
import { findProjectRoot } from "./paths.js";
|
|
@@ -21,10 +21,10 @@ const EXEC_TIMEOUT_MS = 10_000;
|
|
|
21
21
|
const SOURCE_EXTENSIONS = /\.(?:[cm]?[jt]sx?|vue)$/;
|
|
22
22
|
const TEST_FILE = /(?:\.test\.|\.spec\.|\/tests?\/|\/__tests__\/)/;
|
|
23
23
|
const PRISMA_MAJOR = 7;
|
|
24
|
-
const SKIPPED_DIRS = new Set(["node_modules",
|
|
24
|
+
const SKIPPED_DIRS = new Set(["node_modules", AUTOGENERATED_DIR, "dist", "tests", "__tests__"]);
|
|
25
25
|
function projectName(projectRoot) {
|
|
26
26
|
try {
|
|
27
|
-
const parsed = JSON.parse(readFileSync(join(projectRoot, ".tdk",
|
|
27
|
+
const parsed = JSON.parse(readFileSync(join(projectRoot, ".tdk", PROJECT_JSON), "utf-8"));
|
|
28
28
|
return typeof parsed?.project?.name === "string" ? parsed.project.name : undefined;
|
|
29
29
|
}
|
|
30
30
|
catch {
|
|
@@ -42,7 +42,7 @@ function readParams(configPath) {
|
|
|
42
42
|
}
|
|
43
43
|
function packageJson(resourcePath) {
|
|
44
44
|
try {
|
|
45
|
-
const value = JSON.parse(readFileSync(join(resourcePath,
|
|
45
|
+
const value = JSON.parse(readFileSync(join(resourcePath, PACKAGE_JSON), "utf-8"));
|
|
46
46
|
return value && typeof value === "object" ? value : {};
|
|
47
47
|
}
|
|
48
48
|
catch {
|
|
@@ -69,7 +69,7 @@ function prismaSchemaFindings(path) {
|
|
|
69
69
|
return findings;
|
|
70
70
|
}
|
|
71
71
|
function prismaConfigFindings(resourcePath) {
|
|
72
|
-
const generated = join(resourcePath,
|
|
72
|
+
const generated = join(resourcePath, AUTOGENERATED_DIR, "prisma.config.autogenerated.ts");
|
|
73
73
|
const candidates = [join(resourcePath, "prisma.config.ts"), generated];
|
|
74
74
|
const path = candidates.find((candidate) => existsSync(candidate));
|
|
75
75
|
if (!path)
|
|
@@ -189,7 +189,7 @@ export function checkResourcePackageJson(projectRoot = findProjectRoot() ?? proc
|
|
|
189
189
|
const missing = discoverResourcesFromRoot(projectRoot)
|
|
190
190
|
.filter((resource) => !isBringYourOwn(resource) &&
|
|
191
191
|
!ownsRuntimeFiles(resource) &&
|
|
192
|
-
!existsSync(join(resource.path,
|
|
192
|
+
!existsSync(join(resource.path, PACKAGE_JSON)))
|
|
193
193
|
.map((resource) => resource.name);
|
|
194
194
|
if (missing.length === 0) {
|
|
195
195
|
return {
|
|
@@ -441,7 +441,7 @@ function readText(path) {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
function startScriptMigrations(resourceDir) {
|
|
444
|
-
const text = readText(join(resourceDir,
|
|
444
|
+
const text = readText(join(resourceDir, PACKAGE_JSON));
|
|
445
445
|
if (text === undefined)
|
|
446
446
|
return [];
|
|
447
447
|
let scripts = {};
|
|
@@ -527,7 +527,7 @@ export function checkNatsBroker(projectRoot = findProjectRoot() ?? process.cwd()
|
|
|
527
527
|
isSkipped: true,
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
if (existsSync(join(projectRoot, "services", "platform", "messaging",
|
|
530
|
+
if (existsSync(join(projectRoot, "services", "platform", "messaging", DOCKER_COMPOSE_FILE))) {
|
|
531
531
|
return {
|
|
532
532
|
name: "NATS broker",
|
|
533
533
|
didPass: true,
|
|
@@ -695,4 +695,3 @@ export async function checkDockerNetworkCapacity(exec = execAsync) {
|
|
|
695
695
|
}
|
|
696
696
|
return { name: "Docker networks", didPass: true, message: "Docker can create networks" };
|
|
697
697
|
}
|
|
698
|
-
//# sourceMappingURL=doctor-wiring.js.map
|
package/cli/dist/utils/errors.js
CHANGED
|
@@ -149,13 +149,12 @@ function showError(message, context, suggestions) {
|
|
|
149
149
|
}
|
|
150
150
|
if (suggestions && suggestions.length > 0) {
|
|
151
151
|
console.error(chalk.yellow("\nš” Suggestions:"));
|
|
152
|
-
|
|
152
|
+
for (const s of suggestions) {
|
|
153
153
|
console.error(chalk.cyan(` ā ${s}`));
|
|
154
|
-
}
|
|
154
|
+
}
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
export function handleTiltFailure(command, exitCode) {
|
|
158
158
|
console.error(chalk.red(`\ntilt ${command} failed with exit code ${exitCode}`));
|
|
159
159
|
process.exit(exitCode);
|
|
160
160
|
}
|
|
161
|
-
//# sourceMappingURL=errors.js.map
|