@tdk-landscape/tdk-cli-core 1.3.136 → 1.3.138
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 +4 -0
- package/cli/dist/commands/doctor.js +11 -11
- package/cli/dist/commands/resource.js +35 -21
- package/cli/dist/generator/resource-templates.js +1 -1
- package/cli/dist/generator/template-engine.js +10 -7
- package/cli/dist/utils/constants.js +22 -3
- package/cli/dist/utils/doctor-report.js +2 -1
- package/cli/dist/utils/doctor-runtime.js +6 -1
- package/cli/dist/utils/doctor-wiring.js +5 -4
- package/cli/dist/utils/generated-paths.js +3 -2
- package/cli/dist/utils/project-config-defaults.js +2 -1
- package/cli/dist/utils/project-features.js +5 -13
- package/cli/dist/utils/resource-features.js +2 -1
- package/cli/dist/utils/services.js +2 -2
- package/cli/dist/utils/shared-platform-postgres.js +6 -5
- package/cli/dist/utils/smoke.js +3 -2
- package/cli/dist/utils/stack-features.js +5 -2
- package/cli/dist-bundle/chunk-Q6PZ6ZPA.js +315 -0
- package/cli/dist-bundle/cli.js +212 -212
- package/cli/dist-bundle/{cold-preflight-NXFER2W6.js → cold-preflight-6VMSECY4.js} +1 -1
- package/cli/package.json +1 -1
- package/engine/assets/docker/wake-gateway/server.ts +3 -3
- package/engine/topologies/platform/docker/compose/compose.star +4 -4
- package/engine/topologies/platform/docker/constants.star +25 -0
- package/engine/topologies/platform/docker/networking/traefik_static_routes.star +3 -1
- package/engine/topologies/tilt/generators/vite/templates.star +13 -9
- package/engine/topologies/tilt/resources/infra-loader.star +20 -14
- package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +4 -4
- package/engine/topologies/tilt/resources/orchestrator/generators/env.star +3 -2
- package/engine/topologies/tilt/resources/orchestrator/generators/frontend.star +2 -1
- package/package.json +1 -1
- package/cli/dist-bundle/chunk-I63IBPUZ.js +0 -315
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
+
import { DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
|
|
5
6
|
import { DEFAULT_ALWAYS_ENABLED_INFRA } from "./project-config-defaults.js";
|
|
6
7
|
import { discoverResourcesFromRoot } from "./services.js";
|
|
7
8
|
/**
|
|
@@ -18,7 +19,7 @@ import { discoverResourcesFromRoot } from "./services.js";
|
|
|
18
19
|
*
|
|
19
20
|
* Spec: openspec/changes/dependson-starts-platform-postgres
|
|
20
21
|
*/
|
|
21
|
-
export const POSTGRES_DEPENDENCY_NAMES = ["postgres",
|
|
22
|
+
export const POSTGRES_DEPENDENCY_NAMES = ["postgres", DATABASE_MANAGEMENT_FEATURE];
|
|
22
23
|
const PHASE_KEYS = ["pre_alpha", "alpha", "beta", "out_of_scope"];
|
|
23
24
|
export function isSharedPlatformPostgresDependency(name) {
|
|
24
25
|
return POSTGRES_DEPENDENCY_NAMES.includes(name);
|
|
@@ -105,12 +106,12 @@ function projectJsonFeatureOn(projectRoot) {
|
|
|
105
106
|
const phases = (parsed.phases ?? {});
|
|
106
107
|
for (const phase of PHASE_KEYS) {
|
|
107
108
|
const stacks = phases[phase]?.enabledStacks;
|
|
108
|
-
if (Array.isArray(stacks) && stacks.includes(
|
|
109
|
+
if (Array.isArray(stacks) && stacks.includes(DATABASE_MANAGEMENT_FEATURE)) {
|
|
109
110
|
return true;
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
const alwaysEnabled = parsed.always_enabled_infra ?? DEFAULT_ALWAYS_ENABLED_INFRA;
|
|
113
|
-
return Array.isArray(alwaysEnabled) && alwaysEnabled.includes(
|
|
114
|
+
return Array.isArray(alwaysEnabled) && alwaysEnabled.includes(DATABASE_MANAGEMENT_FEATURE);
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
117
|
* True when database-management is on for this project from project.json
|
|
@@ -120,7 +121,7 @@ export function databaseManagementEnabled(projectRoot) {
|
|
|
120
121
|
if (projectJsonFeatureOn(projectRoot))
|
|
121
122
|
return true;
|
|
122
123
|
const fromTilt = tiltfileAlwaysEnabledInfra(projectRoot);
|
|
123
|
-
if (Array.isArray(fromTilt) && fromTilt.includes(
|
|
124
|
+
if (Array.isArray(fromTilt) && fromTilt.includes(DATABASE_MANAGEMENT_FEATURE))
|
|
124
125
|
return true;
|
|
125
126
|
if (specMasterHasDatabaseManagement(projectRoot) === true)
|
|
126
127
|
return true;
|
|
@@ -172,7 +173,7 @@ function knownDependsonNames(projectRoot) {
|
|
|
172
173
|
export function evaluateSharedPlatformPostgres(projectRoot) {
|
|
173
174
|
const featureOnFromProjectJson = projectJsonFeatureOn(projectRoot);
|
|
174
175
|
const fromTilt = tiltfileAlwaysEnabledInfra(projectRoot);
|
|
175
|
-
const featureOnFromTiltfile = Array.isArray(fromTilt) && fromTilt.includes(
|
|
176
|
+
const featureOnFromTiltfile = Array.isArray(fromTilt) && fromTilt.includes(DATABASE_MANAGEMENT_FEATURE);
|
|
176
177
|
const featureOnFromSpecMaster = specMasterHasDatabaseManagement(projectRoot) === true;
|
|
177
178
|
const featureOn = featureOnFromProjectJson || featureOnFromTiltfile || featureOnFromSpecMaster;
|
|
178
179
|
const focusWouldEnableDatabaseManagement = !featureOnFromProjectJson && generatedDefaultFocusEnablesDatabaseManagement(projectRoot);
|
package/cli/dist/utils/smoke.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
import { copyFileSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
+
import { BRING_YOUR_OWN_TYPE } from "./constants.js";
|
|
5
6
|
import { isApiServiceType } from "./resource-kind.js";
|
|
6
7
|
import { resolveServicePath, resolveSubdomainBases } from "./service-urls.js";
|
|
7
8
|
export const DEFAULT_SMOKE_TIMEOUT_SECONDS = 60;
|
|
@@ -87,14 +88,14 @@ export function buildSmokePlans(resources, ingressPort) {
|
|
|
87
88
|
if (!config?.smoke)
|
|
88
89
|
continue;
|
|
89
90
|
const appType = config.appType;
|
|
90
|
-
const isApi = isApiServiceType(appType) || appType ===
|
|
91
|
+
const isApi = isApiServiceType(appType) || appType === BRING_YOUR_OWN_TYPE;
|
|
91
92
|
if (!isApi && appType !== "frontend")
|
|
92
93
|
continue;
|
|
93
94
|
if (config.exposeViaProxy === false)
|
|
94
95
|
continue;
|
|
95
96
|
const base = isApi ? apiBase : appBase;
|
|
96
97
|
// The container healthcheck path (default /health for APIs) is the one request that is safe to repeat while the route comes up.
|
|
97
|
-
const readyPath = config.healthCheckPath || (isApi && appType !==
|
|
98
|
+
const readyPath = config.healthCheckPath || (isApi && appType !== BRING_YOUR_OWN_TYPE ? "/health" : undefined);
|
|
98
99
|
plans.push({
|
|
99
100
|
name: resource.name,
|
|
100
101
|
baseUrl: `${base}${resolveServicePath(resource).replace(/\/+$/, "")}`,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
// Copyright (c) 2026 TDK Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
|
|
1
4
|
export const STACK_FEATURES = {
|
|
2
|
-
|
|
3
|
-
name:
|
|
5
|
+
[DATABASE_MANAGEMENT_FEATURE]: {
|
|
6
|
+
name: DATABASE_MANAGEMENT_FEATURE,
|
|
4
7
|
description: "Generate and load the stack-level PostgreSQL docker-compose file",
|
|
5
8
|
generatedFiles: ["services/platform/database-management/docker-compose.yml"],
|
|
6
9
|
},
|