@flisk-sh/flisk 1.3.190 → 1.3.192
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 +9 -9
- package/LICENSE +1 -1
- package/README.md +41 -41
- package/Tiltfile +2 -2
- package/cli/bin/{flisk.js → tdk.js} +1 -1
- package/cli/dist/cli.js +59 -0
- package/cli/dist/commands/__tests__/project-e2e-helpers.js +2 -2
- package/cli/dist/commands/completion.js +26 -26
- package/cli/dist/commands/config.js +1 -1
- package/cli/dist/commands/import.js +4 -4
- package/cli/dist/commands/maintainers.js +1 -1
- package/cli/dist/commands/mcp.js +1 -4
- package/cli/dist/commands/project.js +10 -2
- package/cli/dist/commands/resource.js +1 -1
- package/cli/dist/commands/ui.js +1 -1
- package/cli/dist/commands/up.js +77 -3
- package/cli/dist/commands/upgrade.js +28 -14
- package/cli/dist/generator/extension-fetch.js +3 -3
- package/cli/dist/generator/template-engine.js +8 -8
- package/cli/dist/mcp/tools.js +2 -5
- package/cli/dist/program.js +2 -0
- package/cli/dist/utils/cli-command.js +107 -0
- package/cli/dist/utils/cold-preflight.js +2 -1
- package/cli/dist/utils/constants.js +1 -1
- package/cli/dist/utils/doctor-fix.js +4 -5
- package/cli/dist/utils/doctor-runtime.js +1 -1
- package/cli/dist/utils/doctor-starlark.js +1 -1
- package/cli/dist/utils/doctor-wiring.js +2 -2
- package/cli/dist/utils/env-selection.js +201 -0
- package/cli/dist/utils/env-validator.js +6 -0
- package/cli/dist/utils/one-command.js +50 -0
- package/cli/dist/utils/platform.js +2 -6
- package/cli/dist/utils/project-templates.js +11 -7
- package/cli/dist/utils/secret-redaction.js +15 -6
- package/cli/dist/utils/service-manifest.js +1 -1
- package/cli/dist/utils/smoke.js +2 -2
- package/cli/dist/utils/tar.js +1 -1
- package/cli/dist-bundle/{chunk-BZ4H7MM4.js → chunk-42IVF3YT.js} +2 -2
- package/cli/dist-bundle/chunk-GOEBYLFN.js +2 -0
- package/cli/dist-bundle/chunk-KGKKDD4K.js +2 -0
- package/cli/dist-bundle/chunk-QR6O2A7L.js +34 -0
- package/cli/dist-bundle/chunk-RHSMS45X.js +438 -0
- package/cli/dist-bundle/chunk-XYFVXSEO.js +75 -0
- package/cli/dist-bundle/cli.js +342 -370
- package/cli/dist-bundle/cold-preflight-ZJAU3E7K.js +2 -0
- package/cli/dist-bundle/{extension-fetch-J4FFH7TJ.js → extension-fetch-6XNTDF44.js} +1 -1
- package/cli/dist-bundle/one-command-A4R272U3.js +4 -0
- package/cli/dist-bundle/project-FOAR7E55.js +2 -0
- package/cli/dist-bundle/project-templates-BHURA3LT.js +2 -0
- package/cli/dist-bundle/url-actions-D6ROTHZG.js +2 -0
- package/cli/package.json +2 -4
- package/cli/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +1 -1
- package/cli/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +1 -1
- package/cli/templates/Tiltfile.hbs +1 -1
- package/discovery/AGENTS.md +1 -1
- package/discovery/TILT_DISCOVERY.star +3 -3
- package/discovery/Tiltfile +3 -3
- package/discovery/config.star +1 -1
- package/discovery/constants.star +1 -1
- package/discovery/discovery_orchestrator.star +1 -1
- package/discovery/identity-management-frontend/service.yaml +1 -1
- package/discovery/json_manifest_scanner.star +1 -1
- package/discovery/manifest/constants.star +1 -1
- package/discovery/manifest/loading.star +2 -2
- package/discovery/manifest/normalize.star +1 -1
- package/discovery/registry.star +1 -1
- package/discovery/resource_snapshot.py +1 -1
- package/discovery/resource_snapshot.star +1 -1
- package/discovery/test_resource_snapshot.py +2 -2
- package/engine/AGENTS.md +7 -7
- package/engine/README.md +1 -1
- package/engine/Tiltfile +3 -3
- package/engine/assets/docker/wake-gateway/decide.ts +1 -1
- package/engine/assets/docker/wake-gateway/server.ts +1 -1
- package/engine/assets/scripts/mac-m1-resource-monitor.sh +8 -8
- package/engine/lifecycle/orchestrator.star +6 -6
- package/engine/paths.star +1 -1
- package/engine/schemas/project-schema.json +2 -2
- package/engine/schemas/service-schema.json +3 -3
- package/engine/scripts/debug-container.sh +2 -2
- package/engine/spec.master +1 -1
- package/engine/topologies/platform/docker/compose/compose.star +1 -1
- package/engine/topologies/platform/docker/compose/traefik_standalone.star +1 -1
- package/engine/topologies/platform/docker/config/healthcheck.star +1 -1
- package/engine/topologies/platform/docker/constants.star +2 -2
- package/engine/topologies/platform/docker/dockerfile/language_dockerfile.star +3 -3
- package/engine/topologies/platform/docker/layers/l1_base_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/l3_builder_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/prisma/constants.star +1 -1
- package/engine/topologies/platform/docker/layers/prisma/prisma_build.star +2 -2
- package/engine/topologies/platform/docker/networking/api_path_constants.star +1 -1
- package/engine/topologies/platform/docker/networking/traefik_static_routes.star +1 -1
- package/engine/topologies/platform/docker/secrets/env_secrets.star +1 -1
- package/engine/topologies/platform/docker/secrets/infisical.star +1 -1
- package/engine/topologies/platform/security/secrets.star +1 -1
- package/engine/topologies/tilt/common/utils.star +5 -3
- package/engine/topologies/tilt/common/utils_debug.star +1 -1
- package/engine/topologies/tilt/common/utils_deterministic.star +1 -1
- package/engine/topologies/tilt/common/utils_env.star +23 -3
- package/engine/topologies/tilt/config/profiles.star +1 -1
- package/engine/topologies/tilt/generators/infisical/organization.star +1 -1
- package/engine/topologies/tilt/generators/npmrc.star +4 -4
- package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +1 -1
- package/engine/topologies/tilt/generators/vite/helpers.star +1 -1
- package/engine/topologies/tilt/generators/vite/templates.star +1 -1
- package/engine/topologies/tilt/manifest/json_to_yaml.py +2 -2
- package/engine/topologies/tilt/manifest/loader.star +1 -1
- package/engine/topologies/tilt/manifest/schema.star +2 -2
- package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +3 -3
- package/engine/topologies/tilt/manifest/tests/test_validator.star +2 -2
- package/engine/topologies/tilt/manifest/yaml_to_json.py +1 -1
- package/engine/topologies/tilt/resources/databases.star +1 -1
- package/engine/topologies/tilt/resources/infra-loader.star +8 -6
- package/engine/topologies/tilt/resources/libs_paths.star +1 -1
- package/engine/topologies/tilt/resources/libs_resource_definition.star +1 -1
- package/engine/topologies/tilt/resources/libs_setup.star +1 -1
- package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +13 -8
- package/engine/topologies/tilt/resources/orchestrator/generators/frontend.star +1 -1
- package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +1 -1
- package/engine/topologies/tilt/resources/watchers.star +7 -7
- package/engine/where-things-live.star +1 -1
- package/examples/tdk-example/LICENSE +1 -1
- package/examples/tdk-example/Tiltfile +7 -7
- package/examples/tdk-example/services/shop/orders-api/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-app/index.html +1 -1
- package/examples/tdk-example/services/shop/orders-app/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-worker/service.json +1 -1
- package/ext/Tiltfile +3 -3
- package/ext/ide-components/code_viewer/server.py +1 -1
- package/ext/ide-components/config_inspector/server.py +1 -1
- package/ext/ide-components/file_browser/server.py +1 -1
- package/ext/ide-components/shared/config_service.py +2 -2
- package/ext/ide-components/shared/file_utils.py +2 -2
- package/ext/ide-components/shared/http_utils.py +1 -1
- package/ext/ide-components/shared/syntax_highlighter.py +1 -1
- package/ext/ide-components/shared/template_engine.py +1 -1
- package/ext/ide-components/shared/templates/base.html +1 -1
- package/ext/ide-components/shared/test_config_service.py +1 -1
- package/ext/ide-components/shared/tilt_integration.py +1 -1
- package/ext/ui-enhancements/tiltfile.py +1 -1
- package/package.json +6 -10
- package/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +1 -1
- package/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +1 -1
- package/shared-platform-engineering/docker-templates/install-deps.sh +1 -1
- package/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +1 -1
- package/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +1 -1
- package/cli/dist-bundle/chunk-CLCUIDBH.js +0 -510
- package/cli/dist-bundle/cold-preflight-SY26O2IG.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# === INLINED CONSTANTS for pure extension loading ===
|
|
4
4
|
OUTPUT = struct(AUTOGENERATED_FOLDER = ".autogenerated")
|
|
@@ -112,7 +112,7 @@ def L3_generate_migration_engine(res_path, use_golden = True):
|
|
|
112
112
|
+ "COPY " + res_path_rel + "/" + OUTPUT.AUTOGENERATED_FOLDER + "/bunfig.docker.autogenerated.toml ./bunfig.toml\n"
|
|
113
113
|
+ "COPY bun.lock* ./\n"
|
|
114
114
|
+ "# Install runtime deps only for migrator image (skip test/dev toolchain)\n"
|
|
115
|
-
+ "# NOTE: keep bunfig.toml (it carries the project/@
|
|
115
|
+
+ "# NOTE: keep bunfig.toml (it carries the project/@flisk-sh registry\n"
|
|
116
116
|
+ "# scopes pointing at Verdaccio) - deleting it forces scoped packages to fall\n"
|
|
117
117
|
+ "# back to the public npm registry and fail with ConnectionRefused/404.\n"
|
|
118
118
|
+ "RUN --mount=type=cache,target=/cache/bun,sharing=shared rm -f bun.lock bun.lockb && env -u CI BUN_CONFIG_FROZEN_LOCKFILE=false BUN_TMPDIR=/tmp BUN_INSTALL=/tmp/bun-install bun install --production --no-frozen-lockfile --concurrent-scripts --cache-dir=/cache/bun\n"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# Traefik static (file-provider) route for a deferred (`sablier.deferStart`)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 🔧 TILT SDK - CORE UTILITIES MODULE
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
load('./utils_env.star',
|
|
11
11
|
'load_dotenv',
|
|
12
|
+
'project_env_file',
|
|
12
13
|
'should_enable',
|
|
13
14
|
)
|
|
14
15
|
load('./utils_debug.star',
|
|
@@ -78,7 +79,7 @@ PLATFORM_NETWORKS = [
|
|
|
78
79
|
|
|
79
80
|
def get_internal_deps(resource_path):
|
|
80
81
|
"""
|
|
81
|
-
Extract all @
|
|
82
|
+
Extract all @tdk/* dependencies from a service's package.json.
|
|
82
83
|
"""
|
|
83
84
|
pkg_json_path = resource_path + '/package.json'
|
|
84
85
|
pkg_content = read_file(pkg_json_path, default='')
|
|
@@ -104,7 +105,7 @@ def get_internal_deps(resource_path):
|
|
|
104
105
|
|
|
105
106
|
def resolve_lib_path(package_name):
|
|
106
107
|
"""
|
|
107
|
-
Resolve @
|
|
108
|
+
Resolve @tdk/* package name to workspace path using naming conventions.
|
|
108
109
|
|
|
109
110
|
Checks MIGRATED_PACKAGES first for packages that have been moved from their
|
|
110
111
|
conventional locations, then falls back to standard naming conventions.
|
|
@@ -374,6 +375,7 @@ Utils = struct(
|
|
|
374
375
|
|
|
375
376
|
# Environment
|
|
376
377
|
load_dotenv = load_dotenv,
|
|
378
|
+
project_env_file = project_env_file,
|
|
377
379
|
should_enable = should_enable,
|
|
378
380
|
|
|
379
381
|
# Debug utilities
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 🌍 TILT SDK - ENVIRONMENT UTILITIES
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
_DOTENV_NAME_FIRST = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_'
|
|
9
9
|
_DOTENV_NAME_REST = _DOTENV_NAME_FIRST + '0123456789'
|
|
10
10
|
|
|
11
|
+
# The environment variable `flisk up --env-file <path>` sets. The CLI resolves the path and
|
|
12
|
+
# exports it, so the engine reads one file for the whole run.
|
|
13
|
+
PROJECT_ENV_FILE_VAR = 'TDK_ENV_FILE'
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
def _is_dotenv_name(name):
|
|
13
17
|
if not name or name[0] not in _DOTENV_NAME_FIRST:
|
|
@@ -56,8 +60,24 @@ def _dotenv_value(raw):
|
|
|
56
60
|
return result
|
|
57
61
|
|
|
58
62
|
|
|
63
|
+
def project_env_file(project_root=''):
|
|
64
|
+
"""The project env file of this run.
|
|
65
|
+
|
|
66
|
+
`flisk up --env-file <path>` exports TDK_ENV_FILE, and the run then reads that file instead of the
|
|
67
|
+
project `.env` - for the Tilt environment and for the Compose interpolation alike. Without the
|
|
68
|
+
variable the project `.env` is used, which is what every run did before the option existed.
|
|
69
|
+
|
|
70
|
+
The path is used as it is: the CLI resolved it to an absolute path inside the project, so the
|
|
71
|
+
wake gateway (which mounts the project read-only) can read the same file.
|
|
72
|
+
"""
|
|
73
|
+
selected = os.environ.get(PROJECT_ENV_FILE_VAR, '')
|
|
74
|
+
if selected:
|
|
75
|
+
return selected
|
|
76
|
+
return (project_root + '/.env') if project_root else '.env'
|
|
77
|
+
|
|
78
|
+
|
|
59
79
|
def load_dotenv(project_root=''):
|
|
60
|
-
"""Load the project
|
|
80
|
+
"""Load the project env file of this run into os.environ.
|
|
61
81
|
|
|
62
82
|
The Tiltfile lives in `.tdk/.tdk-out/`, so a bare `.env` lookup misses the
|
|
63
83
|
project-root file. Prefer an explicit project_root, then TDK_PROJECT_ROOT.
|
|
@@ -68,7 +88,7 @@ def load_dotenv(project_root=''):
|
|
|
68
88
|
"""
|
|
69
89
|
if not project_root:
|
|
70
90
|
project_root = os.environ.get('TDK_PROJECT_ROOT', '')
|
|
71
|
-
env_path = (project_root
|
|
91
|
+
env_path = project_env_file(project_root)
|
|
72
92
|
content = str(read_file(env_path, default=''))
|
|
73
93
|
if not content:
|
|
74
94
|
return
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 📦 TILT SDK - NPM/BUN CONFIG PROVIDER
|
|
@@ -62,14 +62,14 @@ def generate_npmrc(resource_path, registry_url, is_docker, write_fn, verdaccio_e
|
|
|
62
62
|
content = """{header}
|
|
63
63
|
registry=https://registry.npmjs.org/
|
|
64
64
|
@{npm_scope}:registry={registry_url}/
|
|
65
|
-
@
|
|
65
|
+
@flisk-sh:registry={registry_url}/
|
|
66
66
|
@identity:registry={registry_url}/""".format(header=header, registry_url=registry_url, npm_scope=_NPM_SCOPE)
|
|
67
67
|
else:
|
|
68
68
|
# Verdaccio not enabled (no license key) — all scopes use public npm
|
|
69
69
|
content = """{header}
|
|
70
70
|
registry=https://registry.npmjs.org/
|
|
71
71
|
@{npm_scope}:registry=https://registry.npmjs.org/
|
|
72
|
-
@
|
|
72
|
+
@flisk-sh:registry=https://registry.npmjs.org/
|
|
73
73
|
@identity:registry=https://registry.npmjs.org/""".format(header=header, npm_scope=_NPM_SCOPE)
|
|
74
74
|
|
|
75
75
|
filename = generated_filename
|
|
@@ -104,7 +104,7 @@ registry = "https://registry.npmjs.org"
|
|
|
104
104
|
|
|
105
105
|
[install.scopes]
|
|
106
106
|
"@{npm_scope}" = {{ url = "{registry_url}/" }}
|
|
107
|
-
"@
|
|
107
|
+
"@flisk-sh" = {{ url = "{registry_url}/" }}
|
|
108
108
|
"@identity" = {{ url = "{registry_url}/" }}
|
|
109
109
|
|
|
110
110
|
""".format(header=header, registry_url=registry_url, npm_scope=_NPM_SCOPE)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
# Copyright (c) 2026
|
|
2
|
+
# Copyright (c) 2026 TDK Landscape contributors
|
|
3
3
|
# SPDX-License-Identifier: MIT
|
|
4
4
|
"""Convert JSON manifest to Tilt-compatible YAML resource"""
|
|
5
5
|
import sys
|
|
@@ -17,7 +17,7 @@ try:
|
|
|
17
17
|
data = json.load(f)
|
|
18
18
|
|
|
19
19
|
# The YAML is a generated, committed mirror used only for Tilt resource tracking. A secret that someone put in service.json must
|
|
20
|
-
# not be copied into it (the JWT secret belongs in the project .env; `
|
|
20
|
+
# not be copied into it (the JWT secret belongs in the project .env; `tdk doctor` warns about it).
|
|
21
21
|
data = {key: value for key, value in data.items() if key not in ("jwtSecret",)}
|
|
22
22
|
|
|
23
23
|
# Deterministic: the mirror is regenerated on every run, so a wall-clock time or random uid would change the file each time.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 📋 MANIFEST MODULE - SCHEMA DEFINITIONS
|
|
@@ -139,7 +139,7 @@ MANIFEST_SCHEMA = {
|
|
|
139
139
|
'max_length': 63,
|
|
140
140
|
},
|
|
141
141
|
'description': 'PostgreSQL database name (required if using prisma)',
|
|
142
|
-
'example': '
|
|
142
|
+
'example': 'Flisk_user',
|
|
143
143
|
},
|
|
144
144
|
|
|
145
145
|
# Dependency Configuration
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 📋 MANIFEST MODULE - INTEGRATION TESTS (Phase 2)
|
|
@@ -322,7 +322,7 @@ def _test_generated_string_fields():
|
|
|
322
322
|
'appName': 'api',
|
|
323
323
|
'stack': 'shop-1',
|
|
324
324
|
'healthCheckPath': '/api/v1/health',
|
|
325
|
-
'databaseName': '
|
|
325
|
+
'databaseName': 'Flisk_shop',
|
|
326
326
|
'image': 'ghcr.io/acme/app:1.0',
|
|
327
327
|
'traefik': {'host': 'shop.backend.my-project.local', 'pathPrefix': '/api/v1/shop', 'healthCheck': '/health'},
|
|
328
328
|
'nats': {'queueGroup': 'shop_backend_svc'},
|
|
@@ -336,7 +336,7 @@ def _test_generated_string_fields():
|
|
|
336
336
|
{'traefik': {'pathPrefix': '/api/v1/x\n network_mode: host'}},
|
|
337
337
|
{'traefik': {'pathPrefix': '/api', 'healthCheck': '/h\n volumes: []'}},
|
|
338
338
|
{'traefik': {'pathPrefix': '/api'}, 'nats': {'queueGroup': 'g: true'}},
|
|
339
|
-
{'traefik': {'pathPrefix': '/api'}, 'databaseName': '
|
|
339
|
+
{'traefik': {'pathPrefix': '/api'}, 'databaseName': 'Flisk_x\n privileged: true'},
|
|
340
340
|
{'traefik': {'pathPrefix': '/api'}, 'stack': 'shop # comment'},
|
|
341
341
|
{'traefik': {'pathPrefix': '/api'}, 'image': 'app\n privileged: true'},
|
|
342
342
|
{'traefik': {'pathPrefix': '/api'}, 'healthCheckPath': 'health'},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 📋 MANIFEST MODULE - VALIDATOR TESTS (Phase 3)
|
|
@@ -315,7 +315,7 @@ def _test_full_validation():
|
|
|
315
315
|
'replicas': 1,
|
|
316
316
|
'runtime': 'bun',
|
|
317
317
|
'featuresEnabled': ['nats', 'prisma'],
|
|
318
|
-
'databaseName': '
|
|
318
|
+
'databaseName': 'Flisk_user',
|
|
319
319
|
'dependsOn': [],
|
|
320
320
|
'traefik': {
|
|
321
321
|
'pathPrefix': '/api/v1/users',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 🏗️ TILT SDK - INFRASTRUCTURE LOADER
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
# =============================================================================
|
|
22
22
|
|
|
23
23
|
load("../common/utils_debug.star", "debug_log")
|
|
24
|
+
load("../common/utils_env.star", "project_env_file")
|
|
24
25
|
load("./build_concurrency.star", "configure_build_concurrency")
|
|
25
26
|
load("../../platform/docker/constants.star", "PlatformDockerConstants")
|
|
26
27
|
load("../../platform/docker/compose/traefik_standalone.star", "generate_standalone_traefik_compose")
|
|
@@ -162,7 +163,7 @@ def force_start_platform_postgres(should_enable, root_prefix="", env_file=None,
|
|
|
162
163
|
is materialized when missing. A failed materialize fails the run.
|
|
163
164
|
"""
|
|
164
165
|
if env_file == None:
|
|
165
|
-
candidate_env_file = root_prefix
|
|
166
|
+
candidate_env_file = project_env_file(root_prefix.rstrip('/'))
|
|
166
167
|
env_file = candidate_env_file if _file_exists(candidate_env_file) else None
|
|
167
168
|
print("🗃️ Force-starting shared platform Postgres (selected dependsOn postgres/database-management)")
|
|
168
169
|
_register_platform_postgres(should_enable, root_prefix, env_file, write_fn, required=True)
|
|
@@ -428,7 +429,7 @@ def load_all_infrastructure(should_enable, fix_docker_networks_fn=None, docker_p
|
|
|
428
429
|
docker_provider: Docker provider struct (optional, for golden image)
|
|
429
430
|
write_fn: File writing function (optional, for golden image)
|
|
430
431
|
project_root: Path to project root from Flisk working directory (optional, e.g., "../../")
|
|
431
|
-
env_file: Path to
|
|
432
|
+
env_file: Path to the env file for docker-compose (optional, defaults to the env file of the run: the project .env, or the file `flisk up --env-file` selected)
|
|
432
433
|
"""
|
|
433
434
|
# Initialize networks first
|
|
434
435
|
if fix_docker_networks_fn:
|
|
@@ -458,13 +459,14 @@ def load_all_infrastructure(should_enable, fix_docker_networks_fn=None, docker_p
|
|
|
458
459
|
if root_prefix and not root_prefix.endswith('/'):
|
|
459
460
|
root_prefix = root_prefix + '/'
|
|
460
461
|
|
|
461
|
-
# Load
|
|
462
|
-
# Use provided env_file or
|
|
462
|
+
# Load the env file of the run for docker-compose variables.
|
|
463
|
+
# Use provided env_file or resolve it from the project root: the project .env, or the file
|
|
464
|
+
# `flisk up --env-file` selected.
|
|
463
465
|
# `docker compose ... --env-file <path>` hard-fails if that path doesn't exist, and
|
|
464
466
|
# .env is gitignored (with no .env.example shipped) across every Flisk example repo, so
|
|
465
467
|
# a fresh clone must fall back to no --env-file flag rather than a dangling path.
|
|
466
468
|
if env_file == None:
|
|
467
|
-
candidate_env_file =
|
|
469
|
+
candidate_env_file = project_env_file(project_root if project_root else '')
|
|
468
470
|
env_file = candidate_env_file if _file_exists(candidate_env_file) else None
|
|
469
471
|
|
|
470
472
|
# Load infrastructure in order
|
|
@@ -9,7 +9,7 @@ load('../../../topologies/tilt/common/utils.star', 'Utils')
|
|
|
9
9
|
|
|
10
10
|
def get_lib_path_from_package_name(ctx, package_name):
|
|
11
11
|
"""
|
|
12
|
-
Converts @
|
|
12
|
+
Converts @tdk/platform-logger -> shared-platform-engineering/platform-logger
|
|
13
13
|
|
|
14
14
|
Returns:
|
|
15
15
|
Tuple of (path, label, tilt_resource_name) or (None, None, None) if not a library
|
|
@@ -94,7 +94,7 @@ def define_library_resource(ctx, name, path, labels, internal_deps=None, consume
|
|
|
94
94
|
or global_config.get('verdaccio_url_local')
|
|
95
95
|
or PlatformDockerConstants.VERDACCIO_URL_DOCKER
|
|
96
96
|
)
|
|
97
|
-
internal_scope = ctx.get('internal_scope', '@
|
|
97
|
+
internal_scope = ctx.get('internal_scope', '@tdk/')
|
|
98
98
|
pkg_name = internal_scope + name
|
|
99
99
|
|
|
100
100
|
if write_fn and generate_vite_fn:
|
|
@@ -24,7 +24,7 @@ def setup_libraries(ctx, should_enable_fn, ddd_libs, platform_libs, product_libs
|
|
|
24
24
|
Dict mapping package_name -> tilt_resource_name
|
|
25
25
|
"""
|
|
26
26
|
library_map = {}
|
|
27
|
-
internal_scope = ctx.get('internal_scope', '@
|
|
27
|
+
internal_scope = ctx.get('internal_scope', '@tdk/')
|
|
28
28
|
library_roots = ctx.get('library_roots', {})
|
|
29
29
|
print("📚 setup_libraries called for " + str(len(platform_libs) + len(product_libs) + len(ddd_libs)) + " potential libraries")
|
|
30
30
|
|
package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 🧩 ORCHESTRATOR APPLY - COMPOSE RESOURCE REGISTRATION (Refactored)
|
|
@@ -10,6 +10,7 @@ OUTPUT = struct(AUTOGENERATED_FOLDER = ".autogenerated")
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
load("../../common/utils_debug.star", "debug_log")
|
|
13
|
+
load("../../common/utils_env.star", "project_env_file")
|
|
13
14
|
load('../../../platform/docker/index.star', 'Docker')
|
|
14
15
|
load('../../../platform/docker/build/frontend_build_plan.star', 'frontend_build_plan')
|
|
15
16
|
load('../../../platform/docker/constants.star', 'PlatformDockerConstants')
|
|
@@ -67,7 +68,7 @@ def force_start_shared_platform_postgres_once(ctx, should_enable, resource_name=
|
|
|
67
68
|
return False
|
|
68
69
|
project_root_for_env = ctx.get('project_root', '')
|
|
69
70
|
root_prefix = (project_root_for_env + '/') if project_root_for_env else ''
|
|
70
|
-
env_candidate = (project_root_for_env
|
|
71
|
+
env_candidate = project_env_file(project_root_for_env)
|
|
71
72
|
env_file = _env_file_if_exists(env_candidate)
|
|
72
73
|
write_fn = ctx.get('write_file', None)
|
|
73
74
|
if write_fn == None:
|
|
@@ -334,7 +335,7 @@ def _build_live_update_rules(res_path, full_res_path, syncs, project_root='', la
|
|
|
334
335
|
return []
|
|
335
336
|
|
|
336
337
|
if go_live_reload:
|
|
337
|
-
# Opted-in Go development loop: sync the sources into the development image, where the
|
|
338
|
+
# Opted-in Go development loop: sync the sources into the development image, where the tdk-go-watch script rebuilds and restarts.
|
|
338
339
|
# Dependency and Dockerfile changes cannot be picked up by a restart, so they fall back to a full image rebuild.
|
|
339
340
|
source_dir = _live_update_sync_source(project_root, full_res_path, '')
|
|
340
341
|
return [
|
|
@@ -393,7 +394,10 @@ def _wake_compose_invocation(project_root, resource_path, res_name, resource_nam
|
|
|
393
394
|
port_override = compose_dir + '/docker-compose.port-override.yml'
|
|
394
395
|
if os.path.exists(port_override):
|
|
395
396
|
files.append(port_override)
|
|
396
|
-
|
|
397
|
+
# The gateway mounts the project at its normalized absolute path, so the env file has to be
|
|
398
|
+
# named the same way: project_env_file(root) is the project .env by default and the file
|
|
399
|
+
# `flisk up --env-file` selected (an absolute path inside the project) otherwise.
|
|
400
|
+
env_file = project_env_file(root)
|
|
397
401
|
return {
|
|
398
402
|
'compose_files': files,
|
|
399
403
|
'env_file': env_file if os.path.exists(env_file) else '',
|
|
@@ -489,7 +493,7 @@ def _register_run_only_resource(config, resource_path, compose_project_name, aut
|
|
|
489
493
|
root = project_root.rstrip('/')
|
|
490
494
|
compose_file = root + '/' + compose_file
|
|
491
495
|
port_override = root + '/' + port_override
|
|
492
|
-
env_file = root
|
|
496
|
+
env_file = project_env_file(root)
|
|
493
497
|
compose_files = '-f ' + compose_file
|
|
494
498
|
if str(local("test -f '" + port_override + "' && echo yes || echo no", quiet=True, echo_off=True)).strip() == 'yes':
|
|
495
499
|
compose_files = compose_files + ' -f ' + port_override
|
|
@@ -833,8 +837,9 @@ def register_compose_resources(resource_config, ctx, runtime_flags, manifest_sta
|
|
|
833
837
|
if resource_entries:
|
|
834
838
|
compose_file_rel = resource_path + '/' + OUTPUT.AUTOGENERATED_FOLDER + '/docker-compose.app.autogenerated.yml'
|
|
835
839
|
compose_file = project_root + '/' + compose_file_rel if project_root else compose_file_rel
|
|
836
|
-
#
|
|
837
|
-
|
|
840
|
+
# The env file of the run for docker-compose variables (DB_PASSWORD, etc.): the project .env,
|
|
841
|
+
# or the file `flisk up --env-file` selected.
|
|
842
|
+
env_file = project_env_file(project_root)
|
|
838
843
|
debug_log("COMPOSE: Calling docker_compose for '{}' with {} env_file={}".format(resource_name, compose_file, env_file))
|
|
839
844
|
_docker_compose_app(compose_file, compose_project_name, env_file)
|
|
840
845
|
port_override_rel = resource_path + '/' + OUTPUT.AUTOGENERATED_FOLDER + '/docker-compose.port-override.yml'
|
|
@@ -848,7 +853,7 @@ def register_compose_resources(resource_config, ctx, runtime_flags, manifest_sta
|
|
|
848
853
|
for compose_file in resource_config.get('compose_files', []):
|
|
849
854
|
if compose_file != '.autogenerated/docker-compose.app.autogenerated.yml':
|
|
850
855
|
compose_file_full = project_root + '/' + resource_path + '/' + compose_file if project_root else resource_path + '/' + compose_file
|
|
851
|
-
env_file = project_root
|
|
856
|
+
env_file = project_env_file(project_root)
|
|
852
857
|
_docker_compose_app(compose_file_full, compose_project_name, env_file)
|
|
853
858
|
|
|
854
859
|
debug_log("COMPOSE: Calling _register_dc_resources for '{}' with {} configs, auto_init={}".format(resource_name, len(resource_configs), runtime_flags['auto_init_apps']))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk contributors
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# 👁️ TILT SDK - FILE WATCHERS
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# =============================================================================
|
|
9
9
|
#
|
|
10
10
|
# This module sets up watchers for package.json files across all services.
|
|
11
|
-
# When a developer runs `bun add @
|
|
11
|
+
# When a developer runs `bun add @tdk/x`, the watcher triggers
|
|
12
12
|
# automatic regeneration of TSConfig and Vite configurations.
|
|
13
13
|
#
|
|
14
14
|
# Usage:
|
|
@@ -23,7 +23,7 @@ def setup_package_json_watchers(services, should_enable):
|
|
|
23
23
|
"""
|
|
24
24
|
Set up file watchers for package.json across all services.
|
|
25
25
|
|
|
26
|
-
When package.json changes (e.g., via `bun add @
|
|
26
|
+
When package.json changes (e.g., via `bun add @tdk/x`),
|
|
27
27
|
Tilt will automatically trigger config regeneration.
|
|
28
28
|
|
|
29
29
|
Args:
|
|
@@ -58,7 +58,7 @@ def setup_package_json_watchers(services, should_enable):
|
|
|
58
58
|
if watched_paths:
|
|
59
59
|
print("📦 ═══════════════════════════════════════════════════════════════")
|
|
60
60
|
print("📦 AUTOMATIC BRIDGE: Watching " + str(len(watched_paths)) + " package.json files")
|
|
61
|
-
print("📦 When you 'bun add @
|
|
61
|
+
print("📦 When you 'bun add @tdk/x', configs auto-regenerate!")
|
|
62
62
|
print("📦 ═══════════════════════════════════════════════════════════════")
|
|
63
63
|
|
|
64
64
|
return watched_paths
|
|
@@ -157,13 +157,13 @@ echo "🔄 SDK: engine/ directory structure"
|
|
|
157
157
|
echo "🔄 ═══════════════════════════════════════════════════════════════"
|
|
158
158
|
echo ""
|
|
159
159
|
echo "🚀 AUTOMATIC BRIDGE - HOW IT WORKS:"
|
|
160
|
-
echo " 1. bun add @
|
|
160
|
+
echo " 1. bun add @tdk/auth"
|
|
161
161
|
echo " 2. Tilt watches package.json"
|
|
162
162
|
echo " 3. TSConfig/Vite/Manifest auto-update"
|
|
163
163
|
echo ""
|
|
164
164
|
echo "🎯 CONVENTION OVER CONFIGURATION:"
|
|
165
|
-
echo " @
|
|
166
|
-
echo " @
|
|
165
|
+
echo " @tdk/platform-x → shared-platform-engineering/platform-x/src"
|
|
166
|
+
echo " @tdk/product-x → shared-product-engineering/product-x/src"
|
|
167
167
|
echo ""
|
|
168
168
|
echo "🔄 ═══════════════════════════════════════════════════════════════"
|
|
169
169
|
''',
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Minimal Tiltfile demonstrating
|
|
1
|
+
# TDK Example Tiltfile
|
|
2
|
+
# Minimal Tiltfile demonstrating TDK PSR model
|
|
3
3
|
|
|
4
4
|
# Must be set before the extension loads: discovery/constants.star reads it to
|
|
5
5
|
# find this project's spec.master (services/identity, services/appointment)
|
|
6
6
|
# instead of falling back to the beauty-crm monorepo's default scan roots.
|
|
7
7
|
os.environ['TDK_PROJECT_ROOT'] = config.main_dir
|
|
8
8
|
|
|
9
|
-
# Load
|
|
10
|
-
v1alpha1.extension_repo(name='tdk-cli', url='https://github.com/
|
|
9
|
+
# Load TDK extension
|
|
10
|
+
v1alpha1.extension_repo(name='tdk-cli', url='https://github.com/flisk-sh/flisk')
|
|
11
11
|
v1alpha1.extension(name='tdk-cli', repo_name='tdk-cli', repo_path='')
|
|
12
12
|
|
|
13
|
-
# Load
|
|
13
|
+
# Load TDK utilities
|
|
14
14
|
load('ext://tdk-cli', 'Utils', 'Manifest', 'Config')
|
|
15
15
|
|
|
16
|
-
print("🚀
|
|
16
|
+
print("🚀 TDK Example Project")
|
|
17
17
|
print(" Project → Stack → Resource")
|
|
18
18
|
print("")
|
|
19
19
|
|
|
@@ -21,5 +21,5 @@ print("")
|
|
|
21
21
|
config.define_string_list("to-run", args=True)
|
|
22
22
|
cfg = config.parse()
|
|
23
23
|
|
|
24
|
-
# Let
|
|
24
|
+
# Let TDK handle service discovery and registration
|
|
25
25
|
# Services are discovered from service.json files automatically
|