@tdk-landscape/tdk-cli-core 1.3.14 → 1.3.22
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/README.md +3 -3
- package/Tiltfile +144 -0
- package/discovery/AGENTS.md +362 -0
- package/discovery/TILT_DISCOVERY.star +424 -0
- package/discovery/Tiltfile +58 -0
- package/discovery/config.star +258 -0
- package/discovery/constants.star +127 -0
- package/discovery/deterministic.star +211 -0
- package/discovery/discovery_daemon.star +191 -0
- package/discovery/discovery_orchestrator.star +460 -0
- package/discovery/filtering.star +5 -0
- package/discovery/identity-management-backend/service.yaml +26 -0
- package/discovery/identity-management-frontend/service.yaml +29 -0
- package/discovery/identity-sdk/service.yaml +9 -0
- package/discovery/incremental_discovery.star +213 -0
- package/discovery/indexing.star +7 -0
- package/discovery/json_manifest_scanner.star +51 -0
- package/discovery/libraries.star +46 -0
- package/discovery/loading.star +23 -0
- package/discovery/manifest/constants.star +104 -0
- package/discovery/manifest/loading.star +386 -0
- package/discovery/manifest/normalize.star +281 -0
- package/discovery/manifest/validation.star +108 -0
- package/discovery/normalization.star +11 -0
- package/discovery/registry.star +544 -0
- package/discovery/resource_snapshot.py +382 -0
- package/discovery/resource_snapshot.star +143 -0
- package/discovery/schemas.star +1 -0
- package/discovery/services/platform/cdc/debezium/nats-connector/service.yaml +9 -0
- package/discovery/services/platform/cdc/nats-http-bridge/service.yaml +9 -0
- package/discovery/services/platform/orchestrator/orchestrator-glue-backend/service.yaml +26 -0
- package/discovery/services/platform/synthetic-monitor/service.yaml +9 -0
- package/discovery/test_resource_snapshot.py +251 -0
- package/discovery/validation.star +78 -0
- package/discovery/versioning.star +1 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +11 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +1 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +36 -41
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/resource.d.ts.map +1 -1
- package/dist/commands/resource.js +51 -55
- package/dist/commands/resource.js.map +1 -1
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +22 -24
- package/dist/commands/stack.js.map +1 -1
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +1 -2
- package/dist/commands/ui.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +1 -2
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/upgrade.d.ts +8 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +62 -21
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/generator/extension-fetch.d.ts +19 -0
- package/dist/generator/extension-fetch.d.ts.map +1 -1
- package/dist/generator/extension-fetch.js +71 -5
- package/dist/generator/extension-fetch.js.map +1 -1
- package/dist/generator/template-engine.d.ts +1 -0
- package/dist/generator/template-engine.d.ts.map +1 -1
- package/dist/generator/template-engine.js +50 -6
- package/dist/generator/template-engine.js.map +1 -1
- package/dist/utils/command-helpers.d.ts.map +1 -1
- package/dist/utils/command-helpers.js +7 -9
- package/dist/utils/command-helpers.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +1 -0
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/errors.d.ts +2 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +6 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/paths.js +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/project-features.d.ts.map +1 -1
- package/dist/utils/project-features.js +1 -1
- package/dist/utils/project-features.js.map +1 -1
- package/dist/utils/resource-features.d.ts.map +1 -1
- package/dist/utils/resource-features.js +2 -2
- package/dist/utils/resource-features.js.map +1 -1
- package/dist/utils/tar.js +4 -4
- package/dist/utils/tar.js.map +1 -1
- package/dist/utils/validation.d.ts +7 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +9 -0
- package/dist/utils/validation.js.map +1 -1
- package/engine/AGENTS.md +705 -0
- package/engine/README.md +29 -0
- package/engine/REFACTORING_MANIFEST_SYSTEM.md +974 -0
- package/engine/Tiltfile +80 -0
- package/engine/assets/docker/golden-layers.Dockerfile +221 -0
- package/engine/assets/scripts/cleanup-completed-migrator-images.sh +37 -0
- package/engine/assets/scripts/cleanup-tilt-images.sh +120 -0
- package/engine/assets/scripts/mac-m1-resource-monitor.sh +121 -0
- package/engine/config.star +3 -0
- package/engine/docs/AUTODISCOVERY_TEST.md +182 -0
- package/engine/docs/C4-ARCHITECTURE-operations.md +396 -0
- package/engine/docs/C4-ARCHITECTURE-overview.md +284 -0
- package/engine/docs/C4-ARCHITECTURE.md +17 -0
- package/engine/docs/GOLDEN_IMAGE_INTEGRATION.md +349 -0
- package/engine/docs/MANIFEST_DRIVEN_ARCHITECTURE.md +357 -0
- package/engine/docs/README.md +284 -0
- package/engine/entrypoint.star +97 -0
- package/engine/lifecycle/orchestrator.star +260 -0
- package/engine/paths.star +717 -0
- package/engine/schemas/manifest-schema.json +301 -0
- package/engine/schemas/service-schema.json +301 -0
- package/engine/scripts/README.md +89 -0
- package/engine/scripts/build-and-publish-lib.sh +205 -0
- package/engine/scripts/check-lib-publish.sh +85 -0
- package/engine/scripts/debug-container.sh +258 -0
- package/engine/scripts/generate-manifest.sh +197 -0
- package/engine/spec.master +702 -0
- package/engine/spec.master.example +341 -0
- package/engine/topologies/README.md +34 -0
- package/engine/topologies/platform/docker/AGENTS.md +59 -0
- package/engine/topologies/platform/docker/auth/auth.star +167 -0
- package/engine/topologies/platform/docker/build/golden_image.star +37 -0
- package/engine/topologies/platform/docker/build/golden_image_build.star +82 -0
- package/engine/topologies/platform/docker/build/golden_image_constants.star +93 -0
- package/engine/topologies/platform/docker/build/golden_image_dockerfile.star +291 -0
- package/engine/topologies/platform/docker/compose/compose.star +636 -0
- package/engine/topologies/platform/docker/compose/compose_helpers.star +52 -0
- package/engine/topologies/platform/docker/compose/traefik_standalone.star +53 -0
- package/engine/topologies/platform/docker/config/bunignore.star +142 -0
- package/engine/topologies/platform/docker/config/dockerignore.star +150 -0
- package/engine/topologies/platform/docker/constants.star +170 -0
- package/engine/topologies/platform/docker/dockerfile/dockerfile.star +54 -0
- package/engine/topologies/platform/docker/generators/golden_docker_generator_v2.star +73 -0
- package/engine/topologies/platform/docker/index.star +27 -0
- package/engine/topologies/platform/docker/layers/bun_helpers.star +23 -0
- package/engine/topologies/platform/docker/layers/infisical/index.star +40 -0
- package/engine/topologies/platform/docker/layers/infisical/infisical_docker.star +262 -0
- package/engine/topologies/platform/docker/layers/l1_base_layers.star +87 -0
- package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +125 -0
- package/engine/topologies/platform/docker/layers/l3_builder_layers.star +209 -0
- package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +214 -0
- package/engine/topologies/platform/docker/layers/prisma/constants.star +135 -0
- package/engine/topologies/platform/docker/layers/prisma/db_readiness.star +96 -0
- package/engine/topologies/platform/docker/layers/prisma/filesystem_setup.star +109 -0
- package/engine/topologies/platform/docker/layers/prisma/migrate_script.star +98 -0
- package/engine/topologies/platform/docker/layers/prisma/prisma_build.star +126 -0
- package/engine/topologies/platform/docker/layers/prisma/prisma_runtime.star +161 -0
- package/engine/topologies/platform/docker/layers/prisma/secret_resolution.star +119 -0
- package/engine/topologies/platform/docker/networking/api_path_constants.star +230 -0
- package/engine/topologies/platform/docker/networking/sablier_container_cycle.star +27 -0
- package/engine/topologies/platform/docker/networking/traefik.star +232 -0
- package/engine/topologies/platform/docker/networking/traefik_constants.star +146 -0
- package/engine/topologies/platform/docker/networking/traefik_helpers.star +160 -0
- package/engine/topologies/platform/docker/secrets/infisical.star +135 -0
- package/engine/topologies/platform/net/proxy.star +4 -0
- package/engine/topologies/platform/registries/local.star +4 -0
- package/engine/topologies/platform/security/secrets.star +239 -0
- package/engine/topologies/platform/state/relational.star +4 -0
- package/engine/topologies/tilt/common/AGENTS.md +59 -0
- package/engine/topologies/tilt/common/utils.star +364 -0
- package/engine/topologies/tilt/common/utils_debug.star +69 -0
- package/engine/topologies/tilt/common/utils_deterministic.star +168 -0
- package/engine/topologies/tilt/common/utils_docker_networks.star +46 -0
- package/engine/topologies/tilt/common/utils_env.star +43 -0
- package/engine/topologies/tilt/common/utils_output.star +97 -0
- package/engine/topologies/tilt/config/AGENTS.md +68 -0
- package/engine/topologies/tilt/config/defaults.star +3 -0
- package/engine/topologies/tilt/config/feature_flags.star +10 -0
- package/engine/topologies/tilt/config/global.star +55 -0
- package/engine/topologies/tilt/config/profiles.star +382 -0
- package/engine/topologies/tilt/generators/agents_md.star +62 -0
- package/engine/topologies/tilt/generators/api_gateway.star +145 -0
- package/engine/topologies/tilt/generators/index.star +124 -0
- package/engine/topologies/tilt/generators/infisical/README.md +424 -0
- package/engine/topologies/tilt/generators/infisical/examples.star +312 -0
- package/engine/topologies/tilt/generators/infisical/index.star +57 -0
- package/engine/topologies/tilt/generators/infisical/machine_identity.star +420 -0
- package/engine/topologies/tilt/generators/infisical/organization.star +534 -0
- package/engine/topologies/tilt/generators/infisical/path_manager.star +476 -0
- package/engine/topologies/tilt/generators/infisical/secrets_generator.star +420 -0
- package/engine/topologies/tilt/generators/nginx_conf.star +143 -0
- package/engine/topologies/tilt/generators/npmrc.star +111 -0
- package/engine/topologies/tilt/generators/tsconfig.star +23 -0
- package/engine/topologies/tilt/generators/typescript/backend_library_tsconfig.star +71 -0
- package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +124 -0
- package/engine/topologies/tilt/generators/typescript/common.star +7 -0
- package/engine/topologies/tilt/generators/typescript/frontend_library_tsconfig.star +76 -0
- package/engine/topologies/tilt/generators/typescript/frontend_tsconfig.star +110 -0
- package/engine/topologies/tilt/generators/typescript/include.star +23 -0
- package/engine/topologies/tilt/generators/typescript/playwright_config.star +40 -0
- package/engine/topologies/tilt/generators/typescript/prisma_config.star +49 -0
- package/engine/topologies/tilt/generators/validators.star +853 -0
- package/engine/topologies/tilt/generators/vite/backend.star +78 -0
- package/engine/topologies/tilt/generators/vite/frontend.star +98 -0
- package/engine/topologies/tilt/generators/vite/generators.star +43 -0
- package/engine/topologies/tilt/generators/vite/helpers.star +244 -0
- package/engine/topologies/tilt/generators/vite/library.star +65 -0
- package/engine/topologies/tilt/generators/vite/sdk.star +73 -0
- package/engine/topologies/tilt/generators/vite/templates.star +737 -0
- package/engine/topologies/tilt/generators/vite_config.star +22 -0
- package/engine/topologies/tilt/manifest/AGENTS.md +61 -0
- package/engine/topologies/tilt/manifest/README.md +693 -0
- package/engine/topologies/tilt/manifest/__init__.star +218 -0
- package/engine/topologies/tilt/manifest/constants.star +252 -0
- package/engine/topologies/tilt/manifest/errors.star +266 -0
- package/engine/topologies/tilt/manifest/integration.star +339 -0
- package/engine/topologies/tilt/manifest/json_to_yaml.py +54 -0
- package/engine/topologies/tilt/manifest/loader.star +214 -0
- package/engine/topologies/tilt/manifest/mapper.star +227 -0
- package/engine/topologies/tilt/manifest/parser.star +400 -0
- package/engine/topologies/tilt/manifest/schema.star +462 -0
- package/engine/topologies/tilt/manifest/tests/test_integration.star +276 -0
- package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +397 -0
- package/engine/topologies/tilt/manifest/tests/test_manifest.star +316 -0
- package/engine/topologies/tilt/manifest/tests/test_validator.star +470 -0
- package/engine/topologies/tilt/manifest/validator.star +717 -0
- package/engine/topologies/tilt/manifest/yaml_to_json.py +18 -0
- package/engine/topologies/tilt/resources/AGENTS.md +71 -0
- package/engine/topologies/tilt/resources/conditions.star +3 -0
- package/engine/topologies/tilt/resources/databases.star +244 -0
- package/engine/topologies/tilt/resources/declaration.star +3 -0
- package/engine/topologies/tilt/resources/deps.star +3 -0
- package/engine/topologies/tilt/resources/infra-loader.star +437 -0
- package/engine/topologies/tilt/resources/libs.star +30 -0
- package/engine/topologies/tilt/resources/libs_discovery.star +102 -0
- package/engine/topologies/tilt/resources/libs_paths.star +79 -0
- package/engine/topologies/tilt/resources/libs_resource_definition.star +151 -0
- package/engine/topologies/tilt/resources/libs_setup.star +164 -0
- package/engine/topologies/tilt/resources/libs_tsconfig.star +37 -0
- package/engine/topologies/tilt/resources/orchestrator/apply.star +77 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +431 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_manifest_orchestration.star +81 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +148 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_resource_validation.star +36 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_runtime_flags.star +44 -0
- package/engine/topologies/tilt/resources/orchestrator/builders/typescript.star +164 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/AGENTS.md +75 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/index.star +21 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/resolver.star +134 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/env.star +258 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/frontend.star +169 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +524 -0
- package/engine/topologies/tilt/resources/orchestrator/helpers.star +33 -0
- package/engine/topologies/tilt/resources/orchestrator.star +54 -0
- package/engine/topologies/tilt/resources/ordering.star +3 -0
- package/engine/topologies/tilt/resources/triggers.star +3 -0
- package/engine/topologies/tilt/resources/watchers.star +299 -0
- package/engine/where-things-live.star +717 -0
- package/ext/Tiltfile +66 -0
- package/ext/ide-components/README.md +219 -0
- package/ext/ide-components/code_executor/server.py +268 -0
- package/ext/ide-components/code_viewer/server.py +206 -0
- package/ext/ide-components/config_inspector/server.py +1050 -0
- package/ext/ide-components/file_browser/server.py +285 -0
- package/ext/ide-components/shared/config_service.py +469 -0
- package/ext/ide-components/shared/file_utils.py +298 -0
- package/ext/ide-components/shared/http_utils.py +232 -0
- package/ext/ide-components/shared/static/styles.css +1334 -0
- package/ext/ide-components/shared/syntax_highlighter.py +140 -0
- package/ext/ide-components/shared/template_engine.py +123 -0
- package/ext/ide-components/shared/templates/base.html +121 -0
- package/ext/ide-components/shared/test_config_service.py +326 -0
- package/ext/ide-components/shared/tilt_integration.py +158 -0
- package/ext/ui-enhancements/cron-status-server.sh +49 -0
- package/ext/ui-enhancements/cron-status-tracker.sh +146 -0
- package/ext/ui-enhancements/extension.yaml +36 -0
- package/ext/ui-enhancements/tiltfile.py +99 -0
- package/ext/ui-enhancements/ui/cron-jobs-tab.css +396 -0
- package/ext/ui-enhancements/ui/help-panel.css +279 -0
- package/ext/ui-enhancements/ui/icons.css +125 -0
- package/ext/ui-enhancements/ui/tooltips.css +114 -0
- package/package.json +13 -9
- package/specs/specs/TILT_SERVICE_DEFAULTS.star +205 -0
- package/specs/specs/TILT_TECH_STACK.star +159 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://TDK Landscape.local/schemas/service-schema.json",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"allOf": [
|
|
6
|
+
{
|
|
7
|
+
"if": {
|
|
8
|
+
"properties": {
|
|
9
|
+
"appType": {
|
|
10
|
+
"const": "backend"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"then": {
|
|
15
|
+
"properties": {
|
|
16
|
+
"port": {
|
|
17
|
+
"maximum": 5999,
|
|
18
|
+
"minimum": 4000
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"port"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"if": {
|
|
28
|
+
"properties": {
|
|
29
|
+
"appType": {
|
|
30
|
+
"const": "frontend"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"then": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"port": {
|
|
37
|
+
"maximum": 3999,
|
|
38
|
+
"minimum": 3000
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"if": {
|
|
45
|
+
"properties": {
|
|
46
|
+
"appType": {
|
|
47
|
+
"const": "worker"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"then": {
|
|
52
|
+
"properties": {
|
|
53
|
+
"features": {
|
|
54
|
+
"contains": {
|
|
55
|
+
"const": "nats"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"features"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"description": "Configuration for TDK Landscape services. Drives Tilt orchestration, Docker Compose generation, and dependency resolution. Supports both explicit service.json files and synthesis from directory structure (CEO Review: rename-service-manifest).",
|
|
66
|
+
"properties": {
|
|
67
|
+
"$schema": {
|
|
68
|
+
"description": "JSON Schema reference for IDE validation",
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"apiBasePath": {
|
|
72
|
+
"default": "/api",
|
|
73
|
+
"description": "Base path for API routes in Traefik.",
|
|
74
|
+
"pattern": "^/[a-z0-9/-]*$",
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"appName": {
|
|
78
|
+
"description": "Unique resource identifier. Must match directory name.\nFormat: {stack}-{function}-{type}\nExample: 'user-management-backend'",
|
|
79
|
+
"examples": [
|
|
80
|
+
"user-management-backend",
|
|
81
|
+
"order-planner-frontend"
|
|
82
|
+
],
|
|
83
|
+
"maxLength": 64,
|
|
84
|
+
"minLength": 3,
|
|
85
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"appType": {
|
|
89
|
+
"description": "Service type determining build strategy:\n• backend - Hono/Express API server\n• frontend - Vite/React application\n• sdk - Shared library package\n• worker - Background job processor\n• migrator - Database migration runner\n• library - Shared code library",
|
|
90
|
+
"enum": [
|
|
91
|
+
"backend",
|
|
92
|
+
"frontend",
|
|
93
|
+
"sdk",
|
|
94
|
+
"worker",
|
|
95
|
+
"migrator",
|
|
96
|
+
"library"
|
|
97
|
+
],
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"backendName": {
|
|
101
|
+
"description": "For frontends: associated backend service.\nAuto-computed from appName if not specified.",
|
|
102
|
+
"pattern": "^[a-z][a-z0-9-]*-backend$",
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"basePath": {
|
|
106
|
+
"description": "Base path for frontend routing on TDK Landscape.localhost. Default is /{stack}s when omitted.",
|
|
107
|
+
"pattern": "^/[a-z0-9/-]*$",
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"databaseName": {
|
|
111
|
+
"description": "Override auto-generated DB name.\nDefault: TDK_{stack}",
|
|
112
|
+
"pattern": "^TDK_[a-z_]+$",
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"dependencies": {
|
|
116
|
+
"description": "Deprecated. Use 'dependsOn' instead.",
|
|
117
|
+
"deprecated": true,
|
|
118
|
+
"items": {
|
|
119
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"type": "array",
|
|
123
|
+
"uniqueItems": true
|
|
124
|
+
},
|
|
125
|
+
"dockerfile": {
|
|
126
|
+
"default": "autogenerated/Dockerfile.app.autogenerated",
|
|
127
|
+
"description": "Custom Dockerfile path relative to service directory.",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"stack": {
|
|
131
|
+
"description": "Technology stack this resource belongs to.\nUsed for:\n• Database naming: TDK_{stack}\n• Traefik routing: /api/{stack}\n• NATS queue: {stack}_backend_svc",
|
|
132
|
+
"enum": [
|
|
133
|
+
"user",
|
|
134
|
+
"team",
|
|
135
|
+
"auth",
|
|
136
|
+
"order",
|
|
137
|
+
"order-planner",
|
|
138
|
+
"service",
|
|
139
|
+
"inventory",
|
|
140
|
+
"billing",
|
|
141
|
+
"notification",
|
|
142
|
+
"analytics",
|
|
143
|
+
"profile",
|
|
144
|
+
"platform",
|
|
145
|
+
"product"
|
|
146
|
+
],
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"params": {
|
|
150
|
+
"additionalProperties": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"description": "Non-secret configuration parameters (BASE_URL, PORT, etc.). Secrets use 'secrets' section below.",
|
|
154
|
+
"type": "object"
|
|
155
|
+
},
|
|
156
|
+
"secrets": {
|
|
157
|
+
"description": "Secret references resolved via Infisical. NO secrets in params/envVars - security violation.",
|
|
158
|
+
"properties": {
|
|
159
|
+
"required": {
|
|
160
|
+
"description": "Required secret names. Service CRASHES if any are missing.",
|
|
161
|
+
"items": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
164
|
+
},
|
|
165
|
+
"type": "array",
|
|
166
|
+
"uniqueItems": true
|
|
167
|
+
},
|
|
168
|
+
"optional": {
|
|
169
|
+
"description": "Optional secret names. Service starts but warns if missing.",
|
|
170
|
+
"items": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
173
|
+
},
|
|
174
|
+
"type": "array",
|
|
175
|
+
"uniqueItems": true
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": [
|
|
179
|
+
"required"
|
|
180
|
+
],
|
|
181
|
+
"type": "object"
|
|
182
|
+
},
|
|
183
|
+
"features": {
|
|
184
|
+
"description": "Platform features:\n• nats - NATS JetStream eventing\n• prisma - DB ORM & migrations\n• redis - Caching layer\n• infisical - Secrets management\n• vitest - Test framework\n• traefik - Reverse proxy routing\n• websocket - WS support\n• graphql - GraphQL server\n• grpc - gRPC protocol",
|
|
185
|
+
"items": {
|
|
186
|
+
"enum": [
|
|
187
|
+
"nats",
|
|
188
|
+
"prisma",
|
|
189
|
+
"redis",
|
|
190
|
+
"infisical",
|
|
191
|
+
"vitest",
|
|
192
|
+
"traefik",
|
|
193
|
+
"websocket",
|
|
194
|
+
"graphql",
|
|
195
|
+
"grpc"
|
|
196
|
+
],
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"type": "array",
|
|
200
|
+
"uniqueItems": true
|
|
201
|
+
},
|
|
202
|
+
"healthCheckPath": {
|
|
203
|
+
"default": "/health",
|
|
204
|
+
"description": "HTTP endpoint for health checks. Must return 200 OK.",
|
|
205
|
+
"pattern": "^/[a-z0-9/-]*$",
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"dependsOn": {
|
|
209
|
+
"description": "Resource dependencies used for startup ordering and frontend dependency env generation.\nEach entry can be a stack name (e.g. 'user') or resource name (e.g. 'user-management-backend').\nServices listed here start before this service. Used for focus mode, health checks, migration order.",
|
|
210
|
+
"items": {
|
|
211
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
212
|
+
"type": "string"
|
|
213
|
+
},
|
|
214
|
+
"type": "array",
|
|
215
|
+
"uniqueItems": true
|
|
216
|
+
},
|
|
217
|
+
"nats": {
|
|
218
|
+
"description": "Custom NATS configuration. Auto-generated if 'nats' in features.",
|
|
219
|
+
"properties": {
|
|
220
|
+
"queueGroup": {
|
|
221
|
+
"description": "NATS queue group for load balancing",
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"subjects": {
|
|
225
|
+
"description": "NATS subjects to subscribe",
|
|
226
|
+
"items": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"type": "array"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"type": "object"
|
|
233
|
+
},
|
|
234
|
+
"playwright": {
|
|
235
|
+
"default": false,
|
|
236
|
+
"description": "Generate Playwright config in .autogenerated/playwright.config.autogenerated.ts when true.",
|
|
237
|
+
"type": "boolean"
|
|
238
|
+
},
|
|
239
|
+
"port": {
|
|
240
|
+
"description": "External dev port (internal always 3000).\nAssignments:\n• 4000: user\n• 4001: service\n• 4002: order\n• 4003: team\n• 4004: auth",
|
|
241
|
+
"examples": [
|
|
242
|
+
4000,
|
|
243
|
+
4001,
|
|
244
|
+
4002,
|
|
245
|
+
4003,
|
|
246
|
+
4004
|
|
247
|
+
],
|
|
248
|
+
"maximum": 9999,
|
|
249
|
+
"minimum": 3000,
|
|
250
|
+
"type": "integer"
|
|
251
|
+
},
|
|
252
|
+
"replicas": {
|
|
253
|
+
"default": 1,
|
|
254
|
+
"description": "Container instances to run.\nCreates separate containers (service-1, service-2).\nTraefik load-balances between all replicas.",
|
|
255
|
+
"maximum": 10,
|
|
256
|
+
"minimum": 1,
|
|
257
|
+
"type": "integer"
|
|
258
|
+
},
|
|
259
|
+
"runtime": {
|
|
260
|
+
"default": "bun",
|
|
261
|
+
"description": "Runtime to use for this service",
|
|
262
|
+
"enum": [
|
|
263
|
+
"node",
|
|
264
|
+
"bun"
|
|
265
|
+
],
|
|
266
|
+
"type": "string"
|
|
267
|
+
},
|
|
268
|
+
"syncs": {
|
|
269
|
+
"description": "Directories to sync for hot-reload.\nAuto-computed if not specified:\n• backend: ['src', 'prisma']\n• frontend: ['src', 'public']",
|
|
270
|
+
"items": {
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"type": "array"
|
|
274
|
+
},
|
|
275
|
+
"traefik": {
|
|
276
|
+
"description": "Custom Traefik routing. Auto-generated if not specified.",
|
|
277
|
+
"properties": {
|
|
278
|
+
"healthCheck": {
|
|
279
|
+
"description": "Health check path for Traefik",
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"host": {
|
|
283
|
+
"description": "Custom hostname (e.g., 'user.backend.{project}.local')",
|
|
284
|
+
"type": "string"
|
|
285
|
+
},
|
|
286
|
+
"pathPrefix": {
|
|
287
|
+
"description": "URL path prefix (e.g., '/api/user')",
|
|
288
|
+
"type": "string"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"type": "object"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": [
|
|
295
|
+
"appName",
|
|
296
|
+
"appType",
|
|
297
|
+
"stack"
|
|
298
|
+
],
|
|
299
|
+
"title": "TDK Landscape Service Configuration",
|
|
300
|
+
"type": "object"
|
|
301
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://TDK Landscape.local/schemas/service-schema.json",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"allOf": [
|
|
6
|
+
{
|
|
7
|
+
"if": {
|
|
8
|
+
"properties": {
|
|
9
|
+
"appType": {
|
|
10
|
+
"const": "backend"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"then": {
|
|
15
|
+
"properties": {
|
|
16
|
+
"port": {
|
|
17
|
+
"maximum": 5999,
|
|
18
|
+
"minimum": 4000
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"port"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"if": {
|
|
28
|
+
"properties": {
|
|
29
|
+
"appType": {
|
|
30
|
+
"const": "frontend"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"then": {
|
|
35
|
+
"properties": {
|
|
36
|
+
"port": {
|
|
37
|
+
"maximum": 3999,
|
|
38
|
+
"minimum": 3000
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"if": {
|
|
45
|
+
"properties": {
|
|
46
|
+
"appType": {
|
|
47
|
+
"const": "worker"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"then": {
|
|
52
|
+
"properties": {
|
|
53
|
+
"features": {
|
|
54
|
+
"contains": {
|
|
55
|
+
"const": "nats"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"features"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"description": "Configuration for TDK Landscape resources. Drives Tilt orchestration, Docker Compose generation, and dependency resolution. Supports both explicit service.json files and synthesis from directory structure.",
|
|
66
|
+
"properties": {
|
|
67
|
+
"$schema": {
|
|
68
|
+
"description": "JSON Schema reference for IDE validation",
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"apiBasePath": {
|
|
72
|
+
"default": "/api",
|
|
73
|
+
"description": "Base path for API routes in Traefik.",
|
|
74
|
+
"pattern": "^/[a-z0-9/-]*$",
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"appName": {
|
|
78
|
+
"description": "Unique resource identifier. Must match directory name.\nFormat: {stack}-{function}-{type}\nExample: 'user-management-backend'",
|
|
79
|
+
"examples": [
|
|
80
|
+
"user-management-backend",
|
|
81
|
+
"order-planner-frontend"
|
|
82
|
+
],
|
|
83
|
+
"maxLength": 64,
|
|
84
|
+
"minLength": 3,
|
|
85
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"appType": {
|
|
89
|
+
"description": "Resource type determining build strategy:\n• backend - Hono/Express API server\n• frontend - Vite/React application\n• sdk - Shared library package\n• worker - Background job processor\n• migrator - Database migration runner\n• library - Shared code library",
|
|
90
|
+
"enum": [
|
|
91
|
+
"backend",
|
|
92
|
+
"frontend",
|
|
93
|
+
"sdk",
|
|
94
|
+
"worker",
|
|
95
|
+
"migrator",
|
|
96
|
+
"library"
|
|
97
|
+
],
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"backendName": {
|
|
101
|
+
"description": "For frontends: associated backend resource.\nAuto-computed from appName if not specified.",
|
|
102
|
+
"pattern": "^[a-z][a-z0-9-]*-backend$",
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"basePath": {
|
|
106
|
+
"description": "Base path for frontend routing on TDK Landscape.localhost. Default is /{stack}s when omitted.",
|
|
107
|
+
"pattern": "^/[a-z0-9/-]*$",
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"databaseName": {
|
|
111
|
+
"description": "Override auto-generated DB name.\nDefault: TDK_{stack}",
|
|
112
|
+
"pattern": "^TDK_[a-z_]+$",
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"dependencies": {
|
|
116
|
+
"description": "Deprecated. Use 'dependsOn' instead.",
|
|
117
|
+
"deprecated": true,
|
|
118
|
+
"items": {
|
|
119
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"type": "array",
|
|
123
|
+
"uniqueItems": true
|
|
124
|
+
},
|
|
125
|
+
"dockerfile": {
|
|
126
|
+
"default": "autogenerated/Dockerfile.app.autogenerated",
|
|
127
|
+
"description": "Custom Dockerfile path relative to resource directory.",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"stack": {
|
|
131
|
+
"description": "Technology stack this resource belongs to.\nUsed for:\n• Database naming: TDK_{stack}\n• Traefik routing: /api/{stack}\n• NATS queue: {stack}_backend_svc",
|
|
132
|
+
"enum": [
|
|
133
|
+
"user",
|
|
134
|
+
"team",
|
|
135
|
+
"auth",
|
|
136
|
+
"order",
|
|
137
|
+
"order-planner",
|
|
138
|
+
"service",
|
|
139
|
+
"inventory",
|
|
140
|
+
"billing",
|
|
141
|
+
"notification",
|
|
142
|
+
"analytics",
|
|
143
|
+
"profile",
|
|
144
|
+
"platform",
|
|
145
|
+
"product"
|
|
146
|
+
],
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"params": {
|
|
150
|
+
"additionalProperties": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"description": "Non-secret configuration parameters (BASE_URL, PORT, etc.). Secrets use 'secrets' section below.",
|
|
154
|
+
"type": "object"
|
|
155
|
+
},
|
|
156
|
+
"secrets": {
|
|
157
|
+
"description": "Secret references resolved via Infisical. NO secrets in params/envVars - security violation.",
|
|
158
|
+
"properties": {
|
|
159
|
+
"required": {
|
|
160
|
+
"description": "Required secret names. Resource CRASHES if any are missing.",
|
|
161
|
+
"items": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
164
|
+
},
|
|
165
|
+
"type": "array",
|
|
166
|
+
"uniqueItems": true
|
|
167
|
+
},
|
|
168
|
+
"optional": {
|
|
169
|
+
"description": "Optional secret names. Resource starts but warns if missing.",
|
|
170
|
+
"items": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
173
|
+
},
|
|
174
|
+
"type": "array",
|
|
175
|
+
"uniqueItems": true
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": [
|
|
179
|
+
"required"
|
|
180
|
+
],
|
|
181
|
+
"type": "object"
|
|
182
|
+
},
|
|
183
|
+
"features": {
|
|
184
|
+
"description": "Platform features:\n• nats - NATS JetStream eventing\n• prisma - DB ORM & migrations\n• redis - Caching layer\n• infisical - Secrets management\n• vitest - Test framework\n• traefik - Reverse proxy routing\n• websocket - WS support\n• graphql - GraphQL server\n• grpc - gRPC protocol",
|
|
185
|
+
"items": {
|
|
186
|
+
"enum": [
|
|
187
|
+
"nats",
|
|
188
|
+
"prisma",
|
|
189
|
+
"redis",
|
|
190
|
+
"infisical",
|
|
191
|
+
"vitest",
|
|
192
|
+
"traefik",
|
|
193
|
+
"websocket",
|
|
194
|
+
"graphql",
|
|
195
|
+
"grpc"
|
|
196
|
+
],
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"type": "array",
|
|
200
|
+
"uniqueItems": true
|
|
201
|
+
},
|
|
202
|
+
"healthCheckPath": {
|
|
203
|
+
"default": "/health",
|
|
204
|
+
"description": "HTTP endpoint for health checks. Must return 200 OK.",
|
|
205
|
+
"pattern": "^/[a-z0-9/-]*$",
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"dependsOn": {
|
|
209
|
+
"description": "Resource dependencies used for startup ordering and frontend dependency env generation.\nEach entry can be a stack (e.g. 'service') or resource name (e.g. 'user-admin-api').\nResources listed here start before this resource. Used for focus mode, health checks, migration order.",
|
|
210
|
+
"items": {
|
|
211
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
212
|
+
"type": "string"
|
|
213
|
+
},
|
|
214
|
+
"type": "array",
|
|
215
|
+
"uniqueItems": true
|
|
216
|
+
},
|
|
217
|
+
"nats": {
|
|
218
|
+
"description": "Custom NATS configuration. Auto-generated if 'nats' in features.",
|
|
219
|
+
"properties": {
|
|
220
|
+
"queueGroup": {
|
|
221
|
+
"description": "NATS queue group for load balancing",
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"subjects": {
|
|
225
|
+
"description": "NATS subjects to subscribe",
|
|
226
|
+
"items": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"type": "array"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"type": "object"
|
|
233
|
+
},
|
|
234
|
+
"playwright": {
|
|
235
|
+
"default": false,
|
|
236
|
+
"description": "Generate Playwright config in .autogenerated/playwright.config.autogenerated.ts when true.",
|
|
237
|
+
"type": "boolean"
|
|
238
|
+
},
|
|
239
|
+
"port": {
|
|
240
|
+
"description": "External dev port (internal always 3000).\nAssignments:\n• 4000: user\n• 4001: service\n• 4002: order\n• 4003: team\n• 4004: auth",
|
|
241
|
+
"examples": [
|
|
242
|
+
4000,
|
|
243
|
+
4001,
|
|
244
|
+
4002,
|
|
245
|
+
4003,
|
|
246
|
+
4004
|
|
247
|
+
],
|
|
248
|
+
"maximum": 9999,
|
|
249
|
+
"minimum": 3000,
|
|
250
|
+
"type": "integer"
|
|
251
|
+
},
|
|
252
|
+
"replicas": {
|
|
253
|
+
"default": 1,
|
|
254
|
+
"description": "Container instances to run.\nCreates separate containers (resource-1, resource-2).\nTraefik load-balances between all replicas.",
|
|
255
|
+
"maximum": 10,
|
|
256
|
+
"minimum": 1,
|
|
257
|
+
"type": "integer"
|
|
258
|
+
},
|
|
259
|
+
"runtime": {
|
|
260
|
+
"default": "bun",
|
|
261
|
+
"description": "Runtime to use for this resource",
|
|
262
|
+
"enum": [
|
|
263
|
+
"node",
|
|
264
|
+
"bun"
|
|
265
|
+
],
|
|
266
|
+
"type": "string"
|
|
267
|
+
},
|
|
268
|
+
"syncs": {
|
|
269
|
+
"description": "Directories to sync for hot-reload.\nAuto-computed if not specified:\n• backend: ['src', 'prisma']\n• frontend: ['src', 'public']",
|
|
270
|
+
"items": {
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"type": "array"
|
|
274
|
+
},
|
|
275
|
+
"traefik": {
|
|
276
|
+
"description": "Custom Traefik routing. Auto-generated if not specified.",
|
|
277
|
+
"properties": {
|
|
278
|
+
"healthCheck": {
|
|
279
|
+
"description": "Health check path for Traefik",
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"host": {
|
|
283
|
+
"description": "Custom hostname (e.g., 'user.backend.{project}.local')",
|
|
284
|
+
"type": "string"
|
|
285
|
+
},
|
|
286
|
+
"pathPrefix": {
|
|
287
|
+
"description": "URL path prefix (e.g., '/api/user')",
|
|
288
|
+
"type": "string"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"type": "object"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": [
|
|
295
|
+
"appName",
|
|
296
|
+
"appType",
|
|
297
|
+
"stack"
|
|
298
|
+
],
|
|
299
|
+
"title": "TDK Landscape Resource Configuration",
|
|
300
|
+
"type": "object"
|
|
301
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tilt Library Build Caching
|
|
3
|
+
status: backlog
|
|
4
|
+
created: 2026-03-31
|
|
5
|
+
updated: 2026-03-31
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Tilt Library Build Caching
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
These scripts implement intelligent caching for library builds to avoid unnecessary rebuilds and republishes during `tilt up`.
|
|
13
|
+
|
|
14
|
+
## How It Works
|
|
15
|
+
|
|
16
|
+
### Check Script (`check-lib-publish.sh`)
|
|
17
|
+
|
|
18
|
+
1. **Registry Check**: Queries Verdaccio to see if the package version is already published
|
|
19
|
+
2. **Source Hash Check**: Computes a SHA-256 hash of all source files (src/, package.json, tsconfig.json)
|
|
20
|
+
3. **Comparison**: Compares current hash with cached hash from last successful build
|
|
21
|
+
4. **Decision**:
|
|
22
|
+
- If package published AND sources unchanged → **Skip rebuild** (exit 1)
|
|
23
|
+
- If package not published OR sources changed → **Rebuild needed** (exit 0)
|
|
24
|
+
|
|
25
|
+
### Build Script (`build-and-publish-lib.sh`)
|
|
26
|
+
|
|
27
|
+
1. Calls `check-lib-publish.sh` to determine if rebuild needed
|
|
28
|
+
2. If skip indicated, exits early
|
|
29
|
+
3. If rebuild needed:
|
|
30
|
+
- Runs full build pipeline (install, tsc, link, publish)
|
|
31
|
+
- Saves source hash to `.tilt-cache/source-hash.txt` on success
|
|
32
|
+
- Links package to consumer services if specified
|
|
33
|
+
|
|
34
|
+
## Cache Location
|
|
35
|
+
|
|
36
|
+
Each library maintains its own cache:
|
|
37
|
+
```
|
|
38
|
+
shared-platform-engineering/platform-logger/
|
|
39
|
+
├── .tilt-cache/
|
|
40
|
+
│ └── source-hash.txt # SHA-256 hash of source files
|
|
41
|
+
├── src/
|
|
42
|
+
├── package.json
|
|
43
|
+
└── tsconfig.json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Benefits
|
|
47
|
+
|
|
48
|
+
- **Faster `tilt up`**: Libraries only rebuild when sources actually change
|
|
49
|
+
- **Idempotent**: Running `tilt up` multiple times doesn't cause unnecessary work
|
|
50
|
+
- **Version Safety**: Warns if sources changed but version not bumped
|
|
51
|
+
- **Verdaccio-aware**: Checks actual registry state, not just local build state
|
|
52
|
+
|
|
53
|
+
## Manual Cache Clearing
|
|
54
|
+
|
|
55
|
+
To force a rebuild of a specific library:
|
|
56
|
+
```bash
|
|
57
|
+
rm -rf shared-platform-engineering/platform-logger/.tilt-cache
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To clear all library caches:
|
|
61
|
+
```bash
|
|
62
|
+
find . -type d -name '.tilt-cache' -path '*/shared-*' -exec rm -rf {} +
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Troubleshooting
|
|
66
|
+
|
|
67
|
+
### Library not rebuilding when it should
|
|
68
|
+
|
|
69
|
+
1. Check if version was bumped in package.json
|
|
70
|
+
2. Verify source files are actually changing
|
|
71
|
+
3. Clear cache and rebuild: `rm -rf <lib-path>/.tilt-cache && tilt up`
|
|
72
|
+
|
|
73
|
+
### "Version already published" warning
|
|
74
|
+
|
|
75
|
+
This means source files changed but package.json version wasn't bumped. Either:
|
|
76
|
+
- Bump the version if this is a real change
|
|
77
|
+
- Revert source changes if they were experimental
|
|
78
|
+
- Manually unpublish from Verdaccio if needed
|
|
79
|
+
|
|
80
|
+
## Implementation Details
|
|
81
|
+
|
|
82
|
+
**Cache Key**: SHA-256 hash of concatenated contents of:
|
|
83
|
+
- All files in `src/` directory
|
|
84
|
+
- `package.json`
|
|
85
|
+
- `tsconfig.json`
|
|
86
|
+
|
|
87
|
+
**Registry Check**: HTTP GET to `<verdaccio-url>/<package-name>/<version>`
|
|
88
|
+
- 200 = published
|
|
89
|
+
- 404 = not published
|