@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
package/cli/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import { hasVerdaccioLicense } from "../generator/extension-fetch.js";
|
|
|
9
9
|
import { generateMasterConfigs, readProjectConfig, TemplateEngine, verifyMasterConfigs, } from "../generator/template-engine.js";
|
|
10
10
|
import { isMasterConfigFileName } from "../types/index.js";
|
|
11
11
|
import { assertValid } from "../utils/command-helpers.js";
|
|
12
|
-
import { MASTER_CONFIG_FILES } from "../utils/constants.js";
|
|
12
|
+
import { MASTER_CONFIG_FILES, PROJECT_JSON } from "../utils/constants.js";
|
|
13
13
|
import { checkPrismaConsistency } from "../utils/doctor-wiring.js";
|
|
14
14
|
import { errorFactories, requireProjectRoot, runCommand } from "../utils/errors.js";
|
|
15
15
|
import { writeJsonFile } from "../utils/file-helpers.js";
|
|
@@ -19,16 +19,6 @@ import { SERVICE_MANIFEST_SCHEMA_VERSION, validateServiceManifest, } from "../ut
|
|
|
19
19
|
import { discoverServiceManifestPaths } from "../utils/services.js";
|
|
20
20
|
import { evaluateSharedPlatformPostgres } from "../utils/shared-platform-postgres.js";
|
|
21
21
|
import { validateOptionalInfraService } from "../utils/validation.js";
|
|
22
|
-
/**
|
|
23
|
-
* Serialize ProjectConfig to JSON-safe value.
|
|
24
|
-
* ProjectConfig is guaranteed to be JSON-serializable (all properties are primitive or plain objects).
|
|
25
|
-
* This wrapper documents the type relationship that TypeScript cannot infer.
|
|
26
|
-
*/
|
|
27
|
-
function _serializeProjectConfig(config) {
|
|
28
|
-
// ProjectConfig has no index signature but is structurally compatible with JsonValue
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
30
|
-
return config;
|
|
31
|
-
}
|
|
32
22
|
export const configCommand = new Command("config")
|
|
33
23
|
.description("Manage project configuration and regenerate master files")
|
|
34
24
|
.addCommand(new Command("regenerate")
|
|
@@ -270,7 +260,7 @@ export const configCommand = new Command("config")
|
|
|
270
260
|
.addCommand(new Command("edit").description("Open .tdk/project.json in your $EDITOR").action(async () => {
|
|
271
261
|
await runCommand(async () => {
|
|
272
262
|
const projectRoot = requireProjectRoot();
|
|
273
|
-
const projectJsonPath = join(projectRoot, ".tdk",
|
|
263
|
+
const projectJsonPath = join(projectRoot, ".tdk", PROJECT_JSON);
|
|
274
264
|
if (!existsSync(projectJsonPath)) {
|
|
275
265
|
throw new Error(".tdk/project.json not found");
|
|
276
266
|
}
|
|
@@ -334,7 +324,7 @@ async function toggleInfraService(service, enabled) {
|
|
|
334
324
|
}
|
|
335
325
|
// Type-safe assignment: service is now narrowed to OptionalInfraKey
|
|
336
326
|
config.optional_infra[service] = enabled;
|
|
337
|
-
const projectJsonPath = join(projectRoot, ".tdk",
|
|
327
|
+
const projectJsonPath = join(projectRoot, ".tdk", PROJECT_JSON);
|
|
338
328
|
// ProjectConfig is guaranteed to be JSON-serializable
|
|
339
329
|
writeJsonFile(projectJsonPath, config);
|
|
340
330
|
const action = enabled ? "Enabled" : "Disabled";
|
|
@@ -358,4 +348,3 @@ configCommand
|
|
|
358
348
|
await toggleInfraService(service, false);
|
|
359
349
|
});
|
|
360
350
|
}));
|
|
361
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -8,7 +8,7 @@ import { Command } from "commander";
|
|
|
8
8
|
import { hasVerdaccioLicense } from "../generator/extension-fetch.js";
|
|
9
9
|
import { DEVCONTAINER_DOCKER_FIX, detectHost, isContainerHost, WEBCONTAINER_DOCS, WEBCONTAINER_UP_MESSAGE, } from "../utils/agent-host.js";
|
|
10
10
|
import { projectNeedsBun } from "../utils/bun-requirement.js";
|
|
11
|
-
import { CONTAINER_RUNTIME_CHECK, MASTER_CONFIG_FILES, REQUIRED_PACKAGE_SCRIPTS, } from "../utils/constants.js";
|
|
11
|
+
import { AUTOGENERATED_DIR, CONTAINER_RUNTIME_CHECK, MASTER_CONFIG_FILES, PACKAGE_JSON, REQUIRED_PACKAGE_SCRIPTS, } from "../utils/constants.js";
|
|
12
12
|
import { isPathDiscovered, readDiscoveryPaths } from "../utils/discovery-paths.js";
|
|
13
13
|
import { collectDoctorChecks, createDoctorReport, getDoctorExitCode, } from "../utils/doctor-report.js";
|
|
14
14
|
import { checkHealthRoutes, checkIngressPorts, checkPrivateNpmRegistry, checkTiltResourceHealth, projectConfigEnablesVerdaccio, summarizeServiceProbes, } from "../utils/doctor-runtime.js";
|
|
@@ -525,7 +525,7 @@ const TEMPLATE_COPY_PATTERN = /shared-platform-engineering\/docker-templates\/([
|
|
|
525
525
|
function findReferencedTemplateFiles(projectRoot) {
|
|
526
526
|
const referenced = new Set();
|
|
527
527
|
for (const resource of discoverResourcesFromRoot(projectRoot)) {
|
|
528
|
-
const dir = join(resource.path,
|
|
528
|
+
const dir = join(resource.path, AUTOGENERATED_DIR);
|
|
529
529
|
if (!existsSync(dir))
|
|
530
530
|
continue;
|
|
531
531
|
for (const entry of readdirSync(dir)) {
|
|
@@ -541,8 +541,8 @@ function findReferencedTemplateFiles(projectRoot) {
|
|
|
541
541
|
export function checkGeneratedProjectRuntimeAssets() {
|
|
542
542
|
const projectRoot = findProjectRoot() ?? process.cwd();
|
|
543
543
|
const problems = [];
|
|
544
|
-
if (!existsSync(join(projectRoot,
|
|
545
|
-
problems.push(
|
|
544
|
+
if (!existsSync(join(projectRoot, PACKAGE_JSON))) {
|
|
545
|
+
problems.push(`${PACKAGE_JSON} (workspace root manifest)`);
|
|
546
546
|
}
|
|
547
547
|
const templateDir = join(projectRoot, "shared-platform-engineering", "docker-templates");
|
|
548
548
|
let referenced = [];
|
|
@@ -576,7 +576,7 @@ function checkStartupScripts() {
|
|
|
576
576
|
const resources = discoverResourcesFromRoot(projectRoot);
|
|
577
577
|
const problems = [];
|
|
578
578
|
for (const resource of resources) {
|
|
579
|
-
const packageJsonPath = join(resource.path,
|
|
579
|
+
const packageJsonPath = join(resource.path, PACKAGE_JSON);
|
|
580
580
|
if (!existsSync(packageJsonPath)) {
|
|
581
581
|
continue;
|
|
582
582
|
}
|
|
@@ -684,8 +684,8 @@ export function checkTypeScriptTypeDependencies() {
|
|
|
684
684
|
const problems = [];
|
|
685
685
|
const missingPackages = new Set();
|
|
686
686
|
for (const resource of resources) {
|
|
687
|
-
const packageJsonPath = join(resource.path,
|
|
688
|
-
const dockerTsconfigPath = join(resource.path,
|
|
687
|
+
const packageJsonPath = join(resource.path, PACKAGE_JSON);
|
|
688
|
+
const dockerTsconfigPath = join(resource.path, AUTOGENERATED_DIR, "tsconfig.docker.autogenerated.json");
|
|
689
689
|
if (!existsSync(packageJsonPath) || !existsSync(dockerTsconfigPath)) {
|
|
690
690
|
continue;
|
|
691
691
|
}
|
|
@@ -769,14 +769,14 @@ export function checkFrontendDockerPreflight() {
|
|
|
769
769
|
if (!existsSync(join(resource.path, "public"))) {
|
|
770
770
|
problems.push(`${resource.name}: no public/ folder, but the Docker build copies it. Create it: mkdir -p ${normalize(relative(projectRoot, join(resource.path, "public")))} && touch ${normalize(relative(projectRoot, join(resource.path, "public", ".gitkeep")))}`);
|
|
771
771
|
}
|
|
772
|
-
const dockerfilePath = join(resource.path,
|
|
773
|
-
const dockerTsconfigPath = join(resource.path,
|
|
772
|
+
const dockerfilePath = join(resource.path, AUTOGENERATED_DIR, "Dockerfile.app.autogenerated");
|
|
773
|
+
const dockerTsconfigPath = join(resource.path, AUTOGENERATED_DIR, "tsconfig.docker.autogenerated.json");
|
|
774
774
|
if (existsSync(dockerfilePath)) {
|
|
775
775
|
const dockerfile = readFileSync(dockerfilePath, "utf-8");
|
|
776
776
|
const exposesNginxPort = /\bEXPOSE\s+80\b/.test(dockerfile);
|
|
777
777
|
const stack = resource.config?.stack;
|
|
778
778
|
const composePath = stack
|
|
779
|
-
? join(projectRoot, "services", stack,
|
|
779
|
+
? join(projectRoot, "services", stack, AUTOGENERATED_DIR, "docker-compose.app.autogenerated.yml")
|
|
780
780
|
: "";
|
|
781
781
|
if (exposesNginxPort && composePath && existsSync(composePath)) {
|
|
782
782
|
const compose = readFileSync(composePath, "utf-8");
|
|
@@ -1152,4 +1152,3 @@ export const doctorCommand = new Command("doctor")
|
|
|
1152
1152
|
if (exitCode !== 0)
|
|
1153
1153
|
process.exit(exitCode);
|
|
1154
1154
|
});
|
|
1155
|
-
//# sourceMappingURL=doctor.js.map
|
package/cli/dist/commands/mcp.js
CHANGED
|
@@ -96,7 +96,6 @@ function determineDefaultDomain() {
|
|
|
96
96
|
const firstDomain = domainList[0];
|
|
97
97
|
const localhostMatch = firstDomain.match(/([\w-]+)\.localhost$/);
|
|
98
98
|
if (localhostMatch) {
|
|
99
|
-
const _prefix = localhostMatch[1];
|
|
100
99
|
// If it looks like a service domain, try common project names
|
|
101
100
|
const commonProjects = ["tdk", "project", "app", "api", "myapp"];
|
|
102
101
|
for (const project of commonProjects) {
|
|
@@ -305,4 +304,3 @@ export const networksCommand = new Command("networks")
|
|
|
305
304
|
}
|
|
306
305
|
await action();
|
|
307
306
|
});
|
|
308
|
-
//# sourceMappingURL=networks.js.map
|
|
@@ -8,7 +8,7 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
import { Command } from "commander";
|
|
10
10
|
import { generateMasterConfigs, readProjectConfig } from "../generator/template-engine.js";
|
|
11
|
-
import { MASTER_CONFIG_FILES } from "../utils/constants.js";
|
|
11
|
+
import { MASTER_CONFIG_FILES, PROJECT_JSON } from "../utils/constants.js";
|
|
12
12
|
import { completeEnvFile, ensureEnvFile, validateEnvFile } from "../utils/env-validator.js";
|
|
13
13
|
import { errorFactories, runCommand, showErrorAndExit } from "../utils/errors.js";
|
|
14
14
|
import { ensureDirectory, ensureGitignore, writeJsonFile } from "../utils/file-helpers.js";
|
|
@@ -58,7 +58,7 @@ function syncDiscoveredStacksToPreAlpha(projectConfig, discoveredStacks) {
|
|
|
58
58
|
* `tdk up` without re-running `tdk project`. Returns the stacks it enabled.
|
|
59
59
|
*/
|
|
60
60
|
export function enableDiscoveredStacks(projectRoot) {
|
|
61
|
-
const projectJsonPath = join(projectRoot, ".tdk",
|
|
61
|
+
const projectJsonPath = join(projectRoot, ".tdk", PROJECT_JSON);
|
|
62
62
|
if (!existsSync(projectJsonPath))
|
|
63
63
|
return [];
|
|
64
64
|
const projectConfig = readProjectConfig(projectRoot);
|
|
@@ -197,7 +197,7 @@ export const projectCommand = new Command("project")
|
|
|
197
197
|
showDetail(`Location: ${projectRoot}\n`, 0);
|
|
198
198
|
}
|
|
199
199
|
const tdkDir = join(projectRoot, ".tdk");
|
|
200
|
-
const projectJsonPath = join(tdkDir,
|
|
200
|
+
const projectJsonPath = join(tdkDir, PROJECT_JSON);
|
|
201
201
|
if (options.check) {
|
|
202
202
|
const allFilesExist = MASTER_CONFIG_FILES.every((f) => existsSync(join(projectRoot, ".tdk", ".tdk-out", f)));
|
|
203
203
|
const projectJsonExists = existsSync(projectJsonPath);
|
|
@@ -431,4 +431,3 @@ export const projectCommand = new Command("project")
|
|
|
431
431
|
showDetail("\nAfter editing .tdk/project.json, run `tdk config regenerate`.", 0);
|
|
432
432
|
});
|
|
433
433
|
});
|
|
434
|
-
//# sourceMappingURL=project.js.map
|
|
@@ -12,7 +12,7 @@ import { hasDddLicense } from "../generator/extension-fetch.js";
|
|
|
12
12
|
import { getDockerfileTemplate, getTestTemplate, getWorkerIndexTemplate, } from "../generator/resource-templates.js";
|
|
13
13
|
import { CREATABLE_RESOURCE_TYPES } from "../types/index.js";
|
|
14
14
|
import { assertValid, confirmOrCancel } from "../utils/command-helpers.js";
|
|
15
|
-
import { BRING_YOUR_OWN_TYPE, PORT_RANGES, SERVICE_JSON } from "../utils/constants.js";
|
|
15
|
+
import { AUTOGENERATED_DIR, BRING_YOUR_OWN_TYPE, PACKAGE_JSON, PORT_RANGES, SERVICE_JSON, } from "../utils/constants.js";
|
|
16
16
|
import { chooseResourcePath, isPathDiscovered, readDiscoveryPaths, } from "../utils/discovery-paths.js";
|
|
17
17
|
import { errorFactories, requireProjectRoot, runCommand, TdkError } from "../utils/errors.js";
|
|
18
18
|
import { writeFilesWithProgress } from "../utils/file-helpers.js";
|
|
@@ -165,15 +165,15 @@ export function createPackageJson(name, type, frameworkId, prismaEnabled = false
|
|
|
165
165
|
scripts: {
|
|
166
166
|
...(isFrontend
|
|
167
167
|
? {
|
|
168
|
-
predev: requireGeneratedViteConfig(
|
|
169
|
-
prebuild: requireGeneratedViteConfig(
|
|
168
|
+
predev: requireGeneratedViteConfig(`${AUTOGENERATED_DIR}/vite.config.frontend.autogenerated.ts`),
|
|
169
|
+
prebuild: requireGeneratedViteConfig(`${AUTOGENERATED_DIR}/vite.config.build.autogenerated.ts`),
|
|
170
170
|
}
|
|
171
171
|
: {}),
|
|
172
172
|
dev: isFrontend
|
|
173
|
-
?
|
|
173
|
+
? `vite --config ${AUTOGENERATED_DIR}/vite.config.frontend.autogenerated.ts`
|
|
174
174
|
: "bun run --watch src/index.ts",
|
|
175
175
|
build: isFrontend
|
|
176
|
-
?
|
|
176
|
+
? `tsc && vite build --config ${AUTOGENERATED_DIR}/vite.config.build.autogenerated.ts`
|
|
177
177
|
: "tsc",
|
|
178
178
|
// Backends and workers run `start` in their production image; doctor checks for it.
|
|
179
179
|
...(isFrontend ? {} : { start: "bun run dist/index.js" }),
|
|
@@ -201,7 +201,9 @@ export function createPackageJson(name, type, frameworkId, prismaEnabled = false
|
|
|
201
201
|
typescript: "^7.0.2",
|
|
202
202
|
vitest: "^5.0.0",
|
|
203
203
|
"@biomejs/biome": "^2.5.13",
|
|
204
|
-
|
|
204
|
+
// vitest 5 peers on vite ^6.4.0 || ^7 || ^8; vite 5 makes `vitest run` fail at startup with
|
|
205
|
+
// ERR_PACKAGE_PATH_NOT_EXPORTED ('./module-runner'), in every resource once it is hoisted.
|
|
206
|
+
...(isFrontend ? { vite: "^6.4.1" } : {}),
|
|
205
207
|
...(framework?.devDependencies ?? {}),
|
|
206
208
|
...(backendFramework?.devDependencies ?? {}),
|
|
207
209
|
},
|
|
@@ -620,7 +622,7 @@ This file contains the resource configuration for TDK.
|
|
|
620
622
|
},
|
|
621
623
|
{
|
|
622
624
|
type: "json",
|
|
623
|
-
filename:
|
|
625
|
+
filename: PACKAGE_JSON,
|
|
624
626
|
content: packageJson,
|
|
625
627
|
description: "Generating package.json",
|
|
626
628
|
emoji: "📦",
|
|
@@ -694,7 +696,7 @@ This file contains the resource configuration for TDK.
|
|
|
694
696
|
!(owned.has(task.filename) ||
|
|
695
697
|
task.filename === "Dockerfile" ||
|
|
696
698
|
task.filename === "src/index.ts" ||
|
|
697
|
-
task.filename ===
|
|
699
|
+
task.filename === PACKAGE_JSON ||
|
|
698
700
|
task.filename === "tsconfig.json" ||
|
|
699
701
|
task.filename.endsWith(".test.ts")));
|
|
700
702
|
tasks.length = 0;
|
|
@@ -736,7 +738,7 @@ This file contains the resource configuration for TDK.
|
|
|
736
738
|
},
|
|
737
739
|
{
|
|
738
740
|
type: "json",
|
|
739
|
-
filename:
|
|
741
|
+
filename: PACKAGE_JSON,
|
|
740
742
|
content: migratorPackage,
|
|
741
743
|
description: "Generating Prisma migrator package",
|
|
742
744
|
emoji: "📦",
|
|
@@ -793,4 +795,3 @@ This file contains the resource configuration for TDK.
|
|
|
793
795
|
console.log(chalk.gray(` tdk up ${stackName}`));
|
|
794
796
|
});
|
|
795
797
|
});
|
|
796
|
-
//# sourceMappingURL=resource.js.map
|
package/cli/dist/commands/ui.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Box, render, Text, useApp, useInput, useStdin, useStdout } from "ink";
|
|
|
6
6
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
7
7
|
import { DetailPanel, FileTree, ResourceSelectInput, ResourceTable, ServiceIssues, TabBar, TUIHeader, } from "../components/index.js";
|
|
8
8
|
import { TABS } from "../components/TabBar.js";
|
|
9
|
-
import { createTUITheme, TUIThemeContext, useTUITheme } from "../components/ui-theme.js";
|
|
9
|
+
import { createTUITheme, sectionTitle, TUIThemeContext, useTUITheme, } from "../components/ui-theme.js";
|
|
10
10
|
import { errorFactories, requireProjectRoot } from "../utils/errors.js";
|
|
11
11
|
import { findProjectRoot, getPackageVersion } from "../utils/paths.js";
|
|
12
12
|
import { describeSearch } from "../utils/search-status.js";
|
|
@@ -349,7 +349,7 @@ export const TUIApp = ({ animated = true }) => {
|
|
|
349
349
|
const sgrMatch = str.match(/\x1b\[<(\d+);(\d+);(\d+)([Mm])/);
|
|
350
350
|
if (sgrMatch) {
|
|
351
351
|
const btn = parseInt(sgrMatch[1], 10);
|
|
352
|
-
|
|
352
|
+
// sgrMatch[2] is the x coordinate, which the handler does not use
|
|
353
353
|
const y = parseInt(sgrMatch[3], 10);
|
|
354
354
|
const release = sgrMatch[4] === "m";
|
|
355
355
|
// Check if it's a left click (btn & 0b11 == 0 means left button)
|
|
@@ -565,21 +565,21 @@ export const TUIApp = ({ animated = true }) => {
|
|
|
565
565
|
}
|
|
566
566
|
const header = (_jsxs(_Fragment, { children: [_jsx(TUIHeader, { projectRoot: projectRoot, resourceCount: services.length, terminalWidth: terminalWidth, version: getPackageVersion() }), _jsx(Box, { paddingX: 1, children: _jsx(Text, { color: theme.muted, children: (theme.ascii ? "-" : "\u2500").repeat(getTerminalRuleWidth(terminalWidth)) }) })] }));
|
|
567
567
|
return (_jsxs(Box, { flexDirection: "column", height: stdout.rows || 24, children: [header, isSearching && (_jsxs(Box, { paddingX: 1, height: 1, children: [_jsxs(Text, { color: theme.warning, children: ["Search: ", searchQuery, "_"] }), searchStatus && (_jsx(Text, { color: theme.muted, dimColor: theme.dimMuted, children: ` ${searchStatus.summary}` }))] })), searchStatus?.emptyMessage && (_jsx(Box, { paddingX: 1, height: 1, children: _jsx(Text, { color: theme.muted, children: searchStatus.emptyMessage }) })), !isSearching && message && (_jsx(Box, { paddingX: 1, height: 1, children: _jsxs(Text, { color: theme.accent, children: [theme.bannerStart, " ", message, " ", theme.bannerEnd] }) })), !isSearching && !message && showTooltips && !showHelp && (_jsx(Box, { paddingX: 1, height: 1, children: _jsx(Text, { color: theme.muted, dimColor: theme.dimMuted, children: createHelpHint(activeTab, selectedStack, selectedService, showEnabledOnly, theme.ascii) }) })), showHelp && (_jsx(Box, { paddingX: 1, flexGrow: 1, children: _jsx(HelpPanel, { onClose: () => setShowHelp(false) }) })), !showHelp && (_jsxs(_Fragment, { children: [_jsx(Box, { marginTop: 1, children: _jsx(TabBar, { activeTab: activeTab, onTabChange: setActiveTab, terminalWidth: terminalWidth }) }), _jsxs(Box, { flexDirection: "row", paddingX: 1, flexGrow: 1, children: [_jsxs(Box, { flexDirection: "column", flexGrow: 1, width: mainPanelWidth, children: [activeTab === "overview" &&
|
|
568
|
-
(services.length === 0 ? (_jsx(EmptyState, { message: message })) : (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: "Stacks" }) }), _jsx(Box, { marginTop: 1, flexGrow: 1, children: _jsx(ResourceSelectInput, { items: items, onSelect: handleSelect, highlightedIndex: highlightedIndex, isActive: !isSearching, maxVisibleItems: pageSize, width: mainPanelWidth, onLayout: handleListLayout }) })] }))), activeTab === "resources" && (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: theme
|
|
568
|
+
(services.length === 0 ? (_jsx(EmptyState, { message: message })) : (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: "Stacks" }) }), _jsx(Box, { marginTop: 1, flexGrow: 1, children: _jsx(ResourceSelectInput, { items: items, onSelect: handleSelect, highlightedIndex: highlightedIndex, isActive: !isSearching, maxVisibleItems: pageSize, width: mainPanelWidth, onLayout: handleListLayout }) })] }))), activeTab === "resources" && (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: sectionTitle(theme, "Resources") }) }), selectedStackData ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: theme.muted, children: ["Stack: ", selectedStackData.stack.name] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(ResourceTable, { resources: selectedStackData.metadata.resources, maxWidth: terminalWidth - (showSidebar ? 50 : 10) }), _jsx(ServiceIssues, { resources: selectedStackData.metadata.resources })] })] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.muted, children: "Select a stack to view resources" }), _jsx(Box, { marginTop: 1, children: _jsx(ResourceSelectInput, { items: items, onSelect: handleSelect, highlightedIndex: highlightedIndex, isActive: !isSearching, maxVisibleItems: pageSize, width: mainPanelWidth, onLayout: handleListLayout }) })] }))] })), activeTab === "files" && (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: sectionTitle(theme, "Autogenerated Files") }) }), selectedServiceData ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: theme.muted, children: ["Service: ", selectedServiceData.service.name] }), _jsx(Box, { marginTop: 1, children: _jsx(FileTree, { nodes: fileTreeNodes, selectedPath: selectedFile || undefined }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.muted, children: "Select a service to view files" }), _jsx(Box, { marginTop: 1, children: _jsx(ResourceSelectInput, { items: items, onSelect: handleSelect, highlightedIndex: highlightedIndex, isActive: !isSearching, maxVisibleItems: pageSize, width: mainPanelWidth, onLayout: handleListLayout }) })] }))] })), activeTab === "events" && (_jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: sectionTitle(theme, "Event Timeline") }) }), (eventLoadState === "idle" || eventLoadState === "loading") && (_jsx(Text, { color: theme.muted, children: "Loading Tilt events..." })), eventLoadState === "unavailable" && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: theme.warning, children: "Tilt is not running or its UI is unreachable." }), _jsx(Text, { color: theme.muted, children: "Start the stack with tdk up, then press [r] to retry." })] })), eventLoadState === "error" && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: theme.error, children: "Could not load Tilt events." }), _jsx(Text, { color: theme.muted, children: formatEventDetails(eventLoadError ?? "Unknown Tilt error", mainPanelWidth) }), _jsx(Text, { color: theme.muted, children: "Press [r] to retry." })] })), eventLoadState === "ready" && (_jsxs(_Fragment, { children: [eventSnapshot && eventSnapshot.resources.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, color: theme.muted, children: "Current resources" }), eventSnapshot.resources.slice(0, 12).map((resource) => (_jsxs(Text, { color: theme.accent, children: [resource.name, ": ", formatResourceStatus(resource)] }, resource.name))), eventSnapshot.resources.length > 12 && (_jsx(Text, { color: theme.muted, children: "Showing first 12 resources" }))] })), _jsx(Text, { bold: true, color: theme.muted, children: "Recent events" }), eventSnapshot && eventSnapshot.events.length > 20 && (_jsx(Text, { color: theme.muted, children: "Showing first 20 events" })), eventSnapshot?.events.length ? (_jsx(Box, { flexDirection: "column", marginTop: 1, children: eventSnapshot.events.slice(0, 20).map((event) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { color: event.kind === "failed"
|
|
569
569
|
? theme.error
|
|
570
570
|
: event.kind === "warning"
|
|
571
571
|
? theme.warning
|
|
572
572
|
: event.kind === "running"
|
|
573
573
|
? theme.info
|
|
574
|
-
: theme.success, children: [formatEventTime(event.occurredAt), " ", event.resourceName, " ", event.title] }), event.details && (_jsx(Text, { color: theme.muted, children: formatEventDetails(event.details, mainPanelWidth) }))] }, event.id))) })) : (_jsx(Text, { color: theme.muted, children: "No recent build events are available from Tilt yet." }))] }))] })), activeTab === "config" && (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: theme
|
|
574
|
+
: theme.success, children: [formatEventTime(event.occurredAt), " ", event.resourceName, " ", event.title] }), event.details && (_jsx(Text, { color: theme.muted, children: formatEventDetails(event.details, mainPanelWidth) }))] }, event.id))) })) : (_jsx(Text, { color: theme.muted, children: "No recent build events are available from Tilt yet." }))] }))] })), activeTab === "config" && (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: theme.muted, children: sectionTitle(theme, "Configuration") }) }), selectedServiceData ? (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Text, { color: theme.accent, children: selectedServiceData.service.configPath }), _jsx(Box, { marginTop: 1, ...(theme.ascii
|
|
575
575
|
? {}
|
|
576
|
-
: { borderStyle: "single", borderColor: theme.border }), paddingX: 1, children: _jsx(Text, { color: theme.muted, wrap: "wrap", children: JSON.stringify(selectedServiceData.service.config, null, 2).slice(0, 1000) }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.muted, children: "Select a service to view configuration" }), _jsx(Box, { marginTop: 1, children: _jsx(ResourceSelectInput, { items: items, onSelect: handleSelect, highlightedIndex: highlightedIndex, isActive: !isSearching, maxVisibleItems: pageSize, width: mainPanelWidth, onLayout: handleListLayout }) })] }))] }))] }), showSidebar && (_jsx(Box, { marginLeft: 2, children: _jsx(DetailPanel, { stack: selectedStackData?.stack || null, service: selectedServiceData?.service || null, stackMetadata: selectedStackData?.metadata || null, visible: !!selectedStack || !!selectedService }) }))] }), _jsxs(Box, { ...(theme.ascii ? {} : { borderStyle: "single", borderColor: theme.border }), paddingX: 1, height: 3, flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { color: theme.accent, bold: true, children: [theme.bannerStart, " ", activeTab] }), _jsxs(Text, { color: theme.success, children: [theme.ascii ? "[+]" : "\u25cf", " ", services.filter((s) => s.stack).length, " in stack"] }), _jsxs(Text, { color: theme.warning, children: [theme.ascii ? "-" : "\u25cb", " ", services.filter((s) => !s.stack).length, " no stack"] })] }), _jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { color: theme.muted, children: ["Stacks: ", stacks.length] }), _jsxs(Text, { color: theme.muted, children: ["Services: ", services.length] }), _jsxs(Text, { color: theme.muted, children: [theme.ascii ? "Mouse" : "🖱️", " ", mouseEnabled ? "ON" : "OFF", theme.
|
|
576
|
+
: { borderStyle: "single", borderColor: theme.border }), paddingX: 1, children: _jsx(Text, { color: theme.muted, wrap: "wrap", children: JSON.stringify(selectedServiceData.service.config, null, 2).slice(0, 1000) }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.muted, children: "Select a service to view configuration" }), _jsx(Box, { marginTop: 1, children: _jsx(ResourceSelectInput, { items: items, onSelect: handleSelect, highlightedIndex: highlightedIndex, isActive: !isSearching, maxVisibleItems: pageSize, width: mainPanelWidth, onLayout: handleListLayout }) })] }))] }))] }), showSidebar && (_jsx(Box, { marginLeft: 2, children: _jsx(DetailPanel, { stack: selectedStackData?.stack || null, service: selectedServiceData?.service || null, stackMetadata: selectedStackData?.metadata || null, visible: !!selectedStack || !!selectedService }) }))] }), _jsxs(Box, { ...(theme.ascii ? {} : { borderStyle: "single", borderColor: theme.border }), paddingX: 1, height: 3, flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { color: theme.accent, bold: true, children: [theme.bannerStart, " ", activeTab] }), _jsxs(Text, { color: theme.success, children: [theme.ascii ? "[+]" : "\u25cf", " ", services.filter((s) => s.stack).length, " in stack"] }), _jsxs(Text, { color: theme.warning, children: [theme.ascii ? "-" : "\u25cb", " ", services.filter((s) => !s.stack).length, " no stack"] })] }), _jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { color: theme.muted, children: ["Stacks: ", stacks.length] }), _jsxs(Text, { color: theme.muted, children: ["Services: ", services.length] }), _jsxs(Text, { color: theme.muted, children: [theme.ascii ? "Mouse" : "🖱️", " ", mouseEnabled ? "ON" : "OFF", theme.separator, theme.ascii ? "Info" : "ℹ️", " ", showTooltips ? "ON" : "OFF", theme.separator, _jsx(Text, { color: showEnabledOnly ? theme.success : theme.warning, children: showEnabledOnly
|
|
577
577
|
? theme.ascii
|
|
578
578
|
? "[+] enabled"
|
|
579
579
|
: "\u2713 enabled"
|
|
580
580
|
: theme.ascii
|
|
581
581
|
? "[+] all"
|
|
582
|
-
: "\u2713 all" }), theme.
|
|
582
|
+
: "\u2713 all" }), theme.separator, formatUiKeyHint("help", "Help", theme.ascii), theme.separator, formatUiKeyHint("quit", "Quit", theme.ascii)] })] })] })] }))] }));
|
|
583
583
|
};
|
|
584
584
|
/** Compose footer guidance for the current tab and terminal character set. */
|
|
585
585
|
function createHelpHint(activeTab, selectedStack, selectedService, showEnabledOnly, ascii) {
|
|
@@ -589,7 +589,7 @@ function createHelpHint(activeTab, selectedStack, selectedService, showEnabledOn
|
|
|
589
589
|
const cycleTabs = formatUiKeyHint("cycle-tabs", "Tabs", ascii);
|
|
590
590
|
if (activeTab === "overview") {
|
|
591
591
|
const introduction = selectedStack
|
|
592
|
-
?
|
|
592
|
+
? `Stack "${selectedStack}" selected. ${formatUiKeyHint("select", "view", ascii)}`
|
|
593
593
|
: formatUiKeyHint("list-navigation", "Navigate", ascii);
|
|
594
594
|
const controls = selectedStack
|
|
595
595
|
? [formatUiKeyHint("back", "back", ascii), ...common]
|
|
@@ -605,11 +605,7 @@ function createHelpHint(activeTab, selectedStack, selectedService, showEnabledOn
|
|
|
605
605
|
].join(separator);
|
|
606
606
|
}
|
|
607
607
|
if (activeTab === "files" && selectedService) {
|
|
608
|
-
return [
|
|
609
|
-
'Service "' + selectedService + '"',
|
|
610
|
-
formatUiKeyHint("back", "Back", ascii),
|
|
611
|
-
...common,
|
|
612
|
-
].join(separator);
|
|
608
|
+
return [`Service "${selectedService}"`, formatUiKeyHint("back", "Back", ascii), ...common].join(separator);
|
|
613
609
|
}
|
|
614
610
|
if (activeTab === "files") {
|
|
615
611
|
return ["Select service to view files", ...common].join(separator);
|
|
@@ -650,4 +646,3 @@ export const uiCommand = new Command("ui")
|
|
|
650
646
|
alternateScreen: true,
|
|
651
647
|
});
|
|
652
648
|
});
|
|
653
|
-
//# sourceMappingURL=ui.js.map
|
package/cli/dist/commands/up.js
CHANGED
|
@@ -298,22 +298,22 @@ export const upCommand = new Command("up")
|
|
|
298
298
|
const serviceNames = servicesToStart.map((s) => s.name);
|
|
299
299
|
if (!options.quiet) {
|
|
300
300
|
console.log(chalk.blue(`${options.dryRun ? "Would start" : "Starting"} ${formatCount(serviceNames.length, "service")} from ${stackDescription}...`));
|
|
301
|
-
|
|
301
|
+
for (const name of serviceNames) {
|
|
302
302
|
console.log(chalk.gray(` - ${name}`));
|
|
303
|
-
}
|
|
303
|
+
}
|
|
304
304
|
const { appBase, apiBase } = resolveSubdomainBases(hostPortPlan.ingressHttp);
|
|
305
305
|
const frontends = servicesToStart.filter((s) => s.config?.appType === "frontend");
|
|
306
306
|
const backends = servicesToStart.filter((s) => isApiServiceType(s.config?.appType));
|
|
307
307
|
if (frontends.length > 0) {
|
|
308
308
|
console.log(chalk.blue("\n🌍 Frontend URLs:"));
|
|
309
|
-
|
|
309
|
+
for (const svc of frontends) {
|
|
310
310
|
const basePath = svc.config?.basePath ?? `/${svc.name}`;
|
|
311
311
|
console.log(chalk.gray(` - ${svc.name}: ${appBase}${chalk.cyan(appendHealthPath(basePath))}`));
|
|
312
|
-
}
|
|
312
|
+
}
|
|
313
313
|
}
|
|
314
314
|
if (backends.length > 0) {
|
|
315
315
|
console.log(chalk.blue("\n🔧 Backend API URLs:"));
|
|
316
|
-
|
|
316
|
+
for (const svc of backends) {
|
|
317
317
|
const servicePathName = svc.name.replace(/-api$/, "");
|
|
318
318
|
const apiPath = svc.config?.apiPath ?? `/api/${servicePathName}`;
|
|
319
319
|
const sablier = svc.config?.sablier;
|
|
@@ -321,7 +321,7 @@ export const upCommand = new Command("up")
|
|
|
321
321
|
? chalk.dim(" (deferred — starts on first request)")
|
|
322
322
|
: "";
|
|
323
323
|
console.log(chalk.gray(` - ${svc.name}: ${apiBase}${chalk.cyan(appendHealthPath(apiPath))}${deferredTag}`));
|
|
324
|
-
}
|
|
324
|
+
}
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
const focusTargets = options.only ?? (stackName ? [stackName] : undefined);
|
|
@@ -545,4 +545,3 @@ export const upCommand = new Command("up")
|
|
|
545
545
|
await withTiltCheck(action);
|
|
546
546
|
}
|
|
547
547
|
});
|
|
548
|
-
//# sourceMappingURL=up.js.map
|
|
@@ -7,6 +7,7 @@ import { basename, dirname, join, resolve, win32 } from "node:path";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
import { Command } from "commander";
|
|
10
|
+
import { PACKAGE_JSON } from "../utils/constants.js";
|
|
10
11
|
import { getErrorMessage, logVerbose, showErrorAndExit } from "../utils/errors.js";
|
|
11
12
|
import { showCancelled } from "../utils/formatting.js";
|
|
12
13
|
import { getPackageVersion } from "../utils/paths.js";
|
|
@@ -377,7 +378,7 @@ async function upgradeViaGit(path) {
|
|
|
377
378
|
stdio: "pipe",
|
|
378
379
|
timeout: 30000,
|
|
379
380
|
});
|
|
380
|
-
if (existsSync(join(path, "cli",
|
|
381
|
+
if (existsSync(join(path, "cli", PACKAGE_JSON))) {
|
|
381
382
|
spinner.text = "Rebuilding CLI...";
|
|
382
383
|
execFileSync(findOnPath("bun") ?? "bun", ["install"], {
|
|
383
384
|
cwd: join(path, "cli"),
|
|
@@ -634,4 +635,3 @@ export const upgradeCommand = new Command("upgrade")
|
|
|
634
635
|
}
|
|
635
636
|
}
|
|
636
637
|
});
|
|
637
|
-
//# sourceMappingURL=upgrade.js.map
|