@tdk-landscape/tdk-cli-core 1.3.44 → 1.3.48
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/.github/workflows/release-binaries.yml +54 -0
- package/.pre-commit-config.yaml +57 -0
- package/Makefile +92 -0
- package/bun.lock +538 -0
- package/cli/AGENTS.md +390 -0
- package/cli/DESIGN.md +735 -0
- package/cli/biome.json +44 -0
- package/cli/dependency-graph.svg +1135 -0
- package/cli/knip.json +6 -0
- package/cli/package.json +77 -0
- package/cli/pnpm-lock.yaml +2305 -0
- package/cli/pnpm-workspace.yaml +2 -0
- package/cli/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +23 -0
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +464 -0
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +152 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +12 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +56 -0
- package/{dist/cli.js → cli/src/cli.ts} +21 -13
- package/cli/src/commands/__tests__/always-enabled-infra.test.ts +115 -0
- package/cli/src/commands/__tests__/config.test.ts +146 -0
- package/cli/src/commands/__tests__/doctor.test.ts +557 -0
- package/cli/src/commands/__tests__/error-handling.test.ts +78 -0
- package/cli/src/commands/__tests__/phases-model.test.ts +163 -0
- package/cli/src/commands/__tests__/project-resource-features-e2e.test.ts +207 -0
- package/cli/src/commands/__tests__/project.test.ts +68 -0
- package/cli/src/commands/__tests__/resource.test.ts +226 -0
- package/cli/src/commands/__tests__/saas-starter-integration.test.ts +196 -0
- package/cli/src/commands/__tests__/stack-features-e2e.test.ts +129 -0
- package/cli/src/commands/__tests__/upgrade.test.ts +101 -0
- package/{dist/commands/completion.js → cli/src/commands/completion.ts} +78 -72
- package/cli/src/commands/config.ts +299 -0
- package/cli/src/commands/doctor.ts +790 -0
- package/cli/src/commands/down.ts +37 -0
- package/cli/src/commands/help.ts +150 -0
- package/cli/src/commands/networks-design.md +80 -0
- package/cli/src/commands/networks.ts +332 -0
- package/cli/src/commands/project.ts +439 -0
- package/cli/src/commands/projects.ts +82 -0
- package/cli/src/commands/resource.ts +652 -0
- package/cli/src/commands/resources.ts +95 -0
- package/cli/src/commands/stack.ts +128 -0
- package/cli/src/commands/stacks.ts +52 -0
- package/cli/src/commands/status.ts +88 -0
- package/cli/src/commands/ui.tsx +843 -0
- package/cli/src/commands/up.ts +150 -0
- package/cli/src/commands/upgrade.ts +570 -0
- package/{dist/commands/version.js → cli/src/commands/version.ts} +5 -5
- package/cli/src/components/Accessible.tsx +21 -0
- package/cli/src/components/BaseTooltip.tsx +66 -0
- package/cli/src/components/DetailPanel.tsx +146 -0
- package/cli/src/components/FileTree.tsx +89 -0
- package/cli/src/components/ResourceSelectInput.tsx +30 -0
- package/cli/src/components/ResourceTable.tsx +78 -0
- package/cli/src/components/TabBar.tsx +53 -0
- package/cli/src/components/Tooltip.tsx +11 -0
- package/{dist/components/index.js → cli/src/components/index.ts} +0 -1
- package/cli/src/config/platform-standards.test.ts +11 -0
- package/cli/src/config/platform-standards.ts +196 -0
- package/cli/src/generator/__tests__/extension-fetch.test.ts +220 -0
- package/cli/src/generator/__tests__/template-engine.test.ts +70 -0
- package/cli/src/generator/extension-fetch.ts +279 -0
- package/cli/src/generator/template-engine.ts +754 -0
- package/cli/src/index.ts +86 -0
- package/cli/src/templates.d.ts +4 -0
- package/cli/src/types/index.ts +351 -0
- package/cli/src/utils/__tests__/cache.test.ts +98 -0
- package/cli/src/utils/__tests__/formatting.test.ts +170 -0
- package/cli/src/utils/__tests__/paths.test.ts +180 -0
- package/cli/src/utils/__tests__/port-assignment.test.ts +121 -0
- package/cli/src/utils/__tests__/service-urls.test.ts +174 -0
- package/cli/src/utils/__tests__/services.test.ts +531 -0
- package/cli/src/utils/__tests__/tilt.test.ts +143 -0
- package/cli/src/utils/__tests__/validation.test.ts +148 -0
- package/cli/src/utils/cache.ts +76 -0
- package/cli/src/utils/command-helpers.ts +54 -0
- package/cli/src/utils/constants.ts +126 -0
- package/cli/src/utils/discovery-context.ts +49 -0
- package/cli/src/utils/docker.ts +20 -0
- package/cli/src/utils/doctor-runtime.ts +604 -0
- package/cli/src/utils/env-validator.ts +139 -0
- package/cli/src/utils/errors.ts +168 -0
- package/cli/src/utils/file-helpers.ts +62 -0
- package/cli/src/utils/formatting.ts +215 -0
- package/cli/src/utils/paths.ts +53 -0
- package/cli/src/utils/port-assignment.ts +106 -0
- package/cli/src/utils/project-features.ts +118 -0
- package/cli/src/utils/project-templates.ts +28 -0
- package/cli/src/utils/prompt.ts +123 -0
- package/cli/src/utils/resource-features.ts +209 -0
- package/cli/src/utils/service-urls.ts +124 -0
- package/cli/src/utils/services.ts +363 -0
- package/cli/src/utils/stack-features.ts +30 -0
- package/cli/src/utils/tar.ts +24 -0
- package/cli/src/utils/tilt.ts +113 -0
- package/cli/src/utils/validation.ts +67 -0
- package/{templates → cli/templates}/Tiltfile.hbs +1 -1
- package/cli/tsconfig.json +25 -0
- package/cli/tsconfig.typecheck.json +8 -0
- package/docs/FEATURES.md +279 -0
- package/engine/topologies/platform/docker/dockerfile/dockerfile.star +3 -3
- package/engine/topologies/platform/docker/generators/golden_docker_generator_v2.star +1 -1
- package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +0 -3
- 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/secrets/infisical.star +19 -47
- package/engine/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +1 -1
- package/install.sh +242 -0
- package/knip.json +10 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/.openspec.yaml +2 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/design.md +102 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/proposal.md +31 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-notifications/spec.md +48 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-orchestration/spec.md +63 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-troubleshooting/spec.md +56 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/tasks.md +61 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/design.md +114 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/proposal.md +32 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/manifest-field-migration/spec.md +20 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/resource-terminology-standard/spec.md +20 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/stack-terminology-standard/spec.md +20 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/tasks.md +194 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/design.md +111 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/proposal.md +33 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/function-naming-alignment/spec.md +12 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/optional-parameter-patterns/spec.md +18 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-documentation/spec.md +16 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-naming-consistency/spec.md +12 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-ordering-standard/spec.md +12 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/tasks.md +194 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/codebase-audit-report.md +62 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/design.md +84 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/proposal.md +31 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/codebase-audit/spec.md +27 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/dead-code-cleanup/spec.md +27 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/test-gap-fill/spec.md +23 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/todo-resolution/spec.md +27 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/tasks.md +39 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/.openspec.yaml +5 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/design.md +94 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/proposal.md +46 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/ai-slop-cleanup/CLEANUP_REPORT_8.md +174 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/ai-slop-cleanup/CRITICAL_ASSESSMENT_8.md +160 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/circular-deps/CRITICAL_ASSESSMENT_4.md +381 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/dead-code/CRITICAL_ASSESSMENT_3.md +316 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/deduplication/CRITICAL_ASSESSMENT_1.md +290 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/deduplication/IMPLEMENTATION_SUMMARY_1.md +233 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/defensive-cleanup/CRITICAL_ASSESSMENT_6.md +835 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/legacy-cleanup/CRITICAL_ASSESSMENT_7.md +254 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/legacy-cleanup/IMPLEMENTATION_SUMMARY_7.md +187 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/strong-typing/CRITICAL_ASSESSMENT_5.md +269 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/type-consolidation/CRITICAL_ASSESSMENT_2.md +312 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/type-consolidation/IMPLEMENTATION_SUMMARY.md +170 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/tasks.md +137 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/design.md +80 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/proposal.md +40 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/spec.md +52 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/tasks.md +51 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/design.md +43 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/proposal.md +29 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/specs/self-contained-generated-projects/spec.md +67 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/tasks.md +27 -0
- package/openspec/specs/manifest-field-migration/spec.md +24 -0
- package/openspec/specs/resource-terminology-standard/spec.md +24 -0
- package/openspec/specs/self-contained-generated-projects/spec.md +67 -0
- package/openspec/specs/stack-terminology-standard/spec.md +24 -0
- package/package.json +27 -64
- package/platform/services/platform/proxy/service.yaml +14 -0
- package/scripts/audit-codebase.sh +213 -0
- package/scripts/install-git-hooks.sh +14 -0
- package/scripts/release-binaries.sh +94 -0
- package/scripts/setup-pre-commit.sh +33 -0
- package/scripts/stage-npm-engine.sh +36 -0
- package/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +23 -0
- package/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +464 -0
- package/shared-platform-engineering/docker-templates/install-deps.sh +152 -0
- package/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +12 -0
- package/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +56 -0
- package/tests/tilt-engine/__init__.py +5 -0
- package/tests/tilt-engine/conftest.py +182 -0
- package/tests/tilt-engine/fixtures/appointment-frontend-service.json +11 -0
- package/tests/tilt-engine/fixtures/identity-backend-service.json +12 -0
- package/tests/tilt-engine/fixtures/invalid-service.json +4 -0
- package/tests/tilt-engine/test_agents_md_generator.py +341 -0
- package/tests/tilt-engine/test_agents_md_integration.py +378 -0
- package/tests/tilt-engine/test_cache_operations.py +181 -0
- package/tests/tilt-engine/test_cache_persistence.py +142 -0
- package/tests/tilt-engine/test_code_executor.py +152 -0
- package/tests/tilt-engine/test_code_viewer.py +127 -0
- package/tests/tilt-engine/test_compose_port_anchors.py +310 -0
- package/tests/tilt-engine/test_config_inspector.py +162 -0
- package/tests/tilt-engine/test_daemon_focus_mode.py +89 -0
- package/tests/tilt-engine/test_daemon_polling.py +122 -0
- package/tests/tilt-engine/test_daemon_registration.py +115 -0
- package/tests/tilt-engine/test_daemon_validation.py +107 -0
- package/tests/tilt-engine/test_docker_generator_bugs.py +493 -0
- package/tests/tilt-engine/test_docker_prune.py +119 -0
- package/tests/tilt-engine/test_dockerignore_path_bug.py +82 -0
- package/tests/tilt-engine/test_file_browser.py +193 -0
- package/tests/tilt-engine/test_frontend_basepath_manifest.py +27 -0
- package/tests/tilt-engine/test_health_dependencies.py +130 -0
- package/tests/tilt-engine/test_health_endpoints.py +118 -0
- package/tests/tilt-engine/test_health_tilt_ui.py +85 -0
- package/tests/tilt-engine/test_safety_aliases.py +84 -0
- package/tests/tilt-engine/test_snapshot_diff.py +136 -0
- package/tests/tilt-engine/test_snapshot_persistence.py +163 -0
- package/tests/tilt-engine/test_snapshot_scanning.py +123 -0
- package/tests/tilt-engine/test_standalone_project_boot.py +61 -0
- package/tests/tilt-engine/test_standalone_traefik.py +108 -0
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -3
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/config.d.ts +0 -3
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -231
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -7
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -597
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/down.d.ts +0 -3
- package/dist/commands/down.d.ts.map +0 -1
- package/dist/commands/down.js +0 -32
- package/dist/commands/down.js.map +0 -1
- package/dist/commands/help.d.ts +0 -2
- package/dist/commands/help.d.ts.map +0 -1
- package/dist/commands/help.js +0 -130
- package/dist/commands/help.js.map +0 -1
- package/dist/commands/networks.d.ts +0 -3
- package/dist/commands/networks.d.ts.map +0 -1
- package/dist/commands/networks.js +0 -260
- package/dist/commands/networks.js.map +0 -1
- package/dist/commands/project.d.ts +0 -3
- package/dist/commands/project.d.ts.map +0 -1
- package/dist/commands/project.js +0 -373
- package/dist/commands/project.js.map +0 -1
- package/dist/commands/projects.d.ts +0 -3
- package/dist/commands/projects.d.ts.map +0 -1
- package/dist/commands/projects.js +0 -71
- package/dist/commands/projects.js.map +0 -1
- package/dist/commands/resource.d.ts +0 -69
- package/dist/commands/resource.d.ts.map +0 -1
- package/dist/commands/resource.js +0 -579
- package/dist/commands/resource.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -3
- package/dist/commands/resources.d.ts.map +0 -1
- package/dist/commands/resources.js +0 -73
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/stack.d.ts +0 -3
- package/dist/commands/stack.d.ts.map +0 -1
- package/dist/commands/stack.js +0 -97
- package/dist/commands/stack.js.map +0 -1
- package/dist/commands/stacks.d.ts +0 -3
- package/dist/commands/stacks.d.ts.map +0 -1
- package/dist/commands/stacks.js +0 -43
- package/dist/commands/stacks.js.map +0 -1
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -71
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/ui.d.ts +0 -3
- package/dist/commands/ui.d.ts.map +0 -1
- package/dist/commands/ui.js +0 -445
- package/dist/commands/ui.js.map +0 -1
- package/dist/commands/up.d.ts +0 -3
- package/dist/commands/up.d.ts.map +0 -1
- package/dist/commands/up.js +0 -110
- package/dist/commands/up.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -11
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js +0 -496
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/version.d.ts +0 -3
- package/dist/commands/version.d.ts.map +0 -1
- package/dist/commands/version.js.map +0 -1
- package/dist/components/Accessible.d.ts +0 -8
- package/dist/components/Accessible.d.ts.map +0 -1
- package/dist/components/Accessible.js +0 -10
- package/dist/components/Accessible.js.map +0 -1
- package/dist/components/BaseTooltip.d.ts +0 -4
- package/dist/components/BaseTooltip.d.ts.map +0 -1
- package/dist/components/BaseTooltip.js +0 -28
- package/dist/components/BaseTooltip.js.map +0 -1
- package/dist/components/DetailPanel.d.ts +0 -4
- package/dist/components/DetailPanel.d.ts.map +0 -1
- package/dist/components/DetailPanel.js +0 -18
- package/dist/components/DetailPanel.js.map +0 -1
- package/dist/components/FileTree.d.ts +0 -4
- package/dist/components/FileTree.d.ts.map +0 -1
- package/dist/components/FileTree.js +0 -47
- package/dist/components/FileTree.js.map +0 -1
- package/dist/components/ResourceSelectInput.d.ts +0 -4
- package/dist/components/ResourceSelectInput.d.ts.map +0 -1
- package/dist/components/ResourceSelectInput.js +0 -7
- package/dist/components/ResourceSelectInput.js.map +0 -1
- package/dist/components/ResourceTable.d.ts +0 -4
- package/dist/components/ResourceTable.d.ts.map +0 -1
- package/dist/components/ResourceTable.js +0 -18
- package/dist/components/ResourceTable.js.map +0 -1
- package/dist/components/TabBar.d.ts +0 -4
- package/dist/components/TabBar.d.ts.map +0 -1
- package/dist/components/TabBar.js +0 -17
- package/dist/components/TabBar.js.map +0 -1
- package/dist/components/Tooltip.d.ts +0 -12
- package/dist/components/Tooltip.d.ts.map +0 -1
- package/dist/components/Tooltip.js +0 -12
- package/dist/components/Tooltip.js.map +0 -1
- package/dist/components/index.d.ts +0 -8
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/config/platform-standards.d.ts +0 -159
- package/dist/config/platform-standards.d.ts.map +0 -1
- package/dist/config/platform-standards.js +0 -181
- package/dist/config/platform-standards.js.map +0 -1
- package/dist/generator/extension-fetch.d.ts +0 -25
- package/dist/generator/extension-fetch.d.ts.map +0 -1
- package/dist/generator/extension-fetch.js +0 -252
- package/dist/generator/extension-fetch.js.map +0 -1
- package/dist/generator/template-engine.d.ts +0 -61
- package/dist/generator/template-engine.d.ts.map +0 -1
- package/dist/generator/template-engine.js +0 -557
- package/dist/generator/template-engine.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -11
- package/dist/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -255
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -17
- package/dist/types/index.js.map +0 -1
- package/dist/utils/cache.d.ts +0 -19
- package/dist/utils/cache.d.ts.map +0 -1
- package/dist/utils/cache.js +0 -64
- package/dist/utils/cache.js.map +0 -1
- package/dist/utils/command-helpers.d.ts +0 -17
- package/dist/utils/command-helpers.d.ts.map +0 -1
- package/dist/utils/command-helpers.js +0 -41
- package/dist/utils/command-helpers.js.map +0 -1
- package/dist/utils/constants.d.ts +0 -52
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/constants.js +0 -112
- package/dist/utils/constants.js.map +0 -1
- package/dist/utils/discovery-context.d.ts +0 -4
- package/dist/utils/discovery-context.d.ts.map +0 -1
- package/dist/utils/discovery-context.js +0 -39
- package/dist/utils/discovery-context.js.map +0 -1
- package/dist/utils/docker.d.ts +0 -4
- package/dist/utils/docker.d.ts.map +0 -1
- package/dist/utils/docker.js +0 -19
- package/dist/utils/docker.js.map +0 -1
- package/dist/utils/doctor-runtime.d.ts +0 -66
- package/dist/utils/doctor-runtime.d.ts.map +0 -1
- package/dist/utils/doctor-runtime.js +0 -469
- package/dist/utils/doctor-runtime.js.map +0 -1
- package/dist/utils/env-validator.d.ts +0 -15
- package/dist/utils/env-validator.d.ts.map +0 -1
- package/dist/utils/env-validator.js +0 -109
- package/dist/utils/env-validator.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -31
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -140
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/file-helpers.d.ts +0 -14
- package/dist/utils/file-helpers.d.ts.map +0 -1
- package/dist/utils/file-helpers.js +0 -45
- package/dist/utils/file-helpers.js.map +0 -1
- package/dist/utils/formatting.d.ts +0 -30
- package/dist/utils/formatting.d.ts.map +0 -1
- package/dist/utils/formatting.js +0 -164
- package/dist/utils/formatting.js.map +0 -1
- package/dist/utils/paths.d.ts +0 -3
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js +0 -41
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/port-assignment.d.ts +0 -6
- package/dist/utils/port-assignment.d.ts.map +0 -1
- package/dist/utils/port-assignment.js +0 -81
- package/dist/utils/port-assignment.js.map +0 -1
- package/dist/utils/project-features.d.ts +0 -23
- package/dist/utils/project-features.d.ts.map +0 -1
- package/dist/utils/project-features.js +0 -98
- package/dist/utils/project-features.js.map +0 -1
- package/dist/utils/project-templates.d.ts +0 -7
- package/dist/utils/project-templates.d.ts.map +0 -1
- package/dist/utils/project-templates.js +0 -24
- package/dist/utils/project-templates.js.map +0 -1
- package/dist/utils/prompt.d.ts +0 -28
- package/dist/utils/prompt.d.ts.map +0 -1
- package/dist/utils/prompt.js +0 -79
- package/dist/utils/prompt.js.map +0 -1
- package/dist/utils/resource-features.d.ts +0 -29
- package/dist/utils/resource-features.d.ts.map +0 -1
- package/dist/utils/resource-features.js +0 -171
- package/dist/utils/resource-features.js.map +0 -1
- package/dist/utils/service-urls.d.ts +0 -30
- package/dist/utils/service-urls.d.ts.map +0 -1
- package/dist/utils/service-urls.js +0 -93
- package/dist/utils/service-urls.js.map +0 -1
- package/dist/utils/services.d.ts +0 -18
- package/dist/utils/services.d.ts.map +0 -1
- package/dist/utils/services.js +0 -291
- package/dist/utils/services.js.map +0 -1
- package/dist/utils/stack-features.d.ts +0 -22
- package/dist/utils/stack-features.d.ts.map +0 -1
- package/dist/utils/stack-features.js +0 -13
- package/dist/utils/stack-features.js.map +0 -1
- package/dist/utils/tar.d.ts +0 -7
- package/dist/utils/tar.d.ts.map +0 -1
- package/dist/utils/tar.js +0 -21
- package/dist/utils/tar.js.map +0 -1
- package/dist/utils/tilt.d.ts +0 -19
- package/dist/utils/tilt.d.ts.map +0 -1
- package/dist/utils/tilt.js +0 -78
- package/dist/utils/tilt.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -16
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -58
- package/dist/utils/validation.js.map +0 -1
- /package/{README.md → cli/README.md} +0 -0
- /package/{bin → cli/bin}/tdk.js +0 -0
- /package/{templates → cli/templates}/.tiltignore.hbs +0 -0
- /package/{templates → cli/templates}/TILT_RESOURCE_DEFAULTS.star.hbs +0 -0
- /package/{templates → cli/templates}/TILT_TECH_STACK.star.hbs +0 -0
- /package/{templates → cli/templates}/spec.master.hbs +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Box, Text } from "ink";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { DetailPanelProps } from "../types/index.js";
|
|
4
|
+
import { formatDate, getStatusColor, getStatusIcon } from "../utils/formatting.js";
|
|
5
|
+
|
|
6
|
+
export const DetailPanel: React.FC<DetailPanelProps> = ({
|
|
7
|
+
stack,
|
|
8
|
+
service,
|
|
9
|
+
stackMetadata,
|
|
10
|
+
visible,
|
|
11
|
+
}) => {
|
|
12
|
+
if (!visible) {
|
|
13
|
+
return <Box width={0} />;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (service) {
|
|
17
|
+
return (
|
|
18
|
+
<Box
|
|
19
|
+
width={40}
|
|
20
|
+
flexDirection="column"
|
|
21
|
+
borderStyle="single"
|
|
22
|
+
borderColor="gray"
|
|
23
|
+
paddingX={1}
|
|
24
|
+
paddingY={1}
|
|
25
|
+
>
|
|
26
|
+
<Box marginBottom={1} justifyContent="center">
|
|
27
|
+
<Text color="cyan" bold>
|
|
28
|
+
┌─ {service.name.toUpperCase()} ─┐
|
|
29
|
+
</Text>
|
|
30
|
+
</Box>
|
|
31
|
+
|
|
32
|
+
<Box flexDirection="column" marginY={1}>
|
|
33
|
+
<Box>
|
|
34
|
+
<Text color="gray">Name: </Text>
|
|
35
|
+
<Text color="white">{service.name}</Text>
|
|
36
|
+
</Box>
|
|
37
|
+
<Box>
|
|
38
|
+
<Text color="gray">Stack: </Text>
|
|
39
|
+
<Text color="white">{service.stack || "unknown"}</Text>
|
|
40
|
+
</Box>
|
|
41
|
+
<Box>
|
|
42
|
+
<Text color="gray">Type: </Text>
|
|
43
|
+
<Text color="yellow">
|
|
44
|
+
{(service.stack || "") === "platform" ? "PLATFORM" : "PRODUCT"}
|
|
45
|
+
</Text>
|
|
46
|
+
</Box>
|
|
47
|
+
</Box>
|
|
48
|
+
|
|
49
|
+
<Box marginTop={2}>
|
|
50
|
+
<Text color="gray" dimColor>
|
|
51
|
+
Press <Text color="cyan">[Esc]</Text> to close
|
|
52
|
+
</Text>
|
|
53
|
+
</Box>
|
|
54
|
+
</Box>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (stack && stackMetadata) {
|
|
59
|
+
const statusColor = getStatusColor(stackMetadata.overallStatus);
|
|
60
|
+
const statusIcon = getStatusIcon(stackMetadata.overallStatus);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Box
|
|
64
|
+
width={40}
|
|
65
|
+
flexDirection="column"
|
|
66
|
+
borderStyle="single"
|
|
67
|
+
borderColor="gray"
|
|
68
|
+
paddingX={1}
|
|
69
|
+
paddingY={1}
|
|
70
|
+
>
|
|
71
|
+
<Box marginBottom={1} justifyContent="center">
|
|
72
|
+
<Text color="cyan" bold>
|
|
73
|
+
┌─ {stack.name.toUpperCase()} ─┐
|
|
74
|
+
</Text>
|
|
75
|
+
</Box>
|
|
76
|
+
|
|
77
|
+
<Box
|
|
78
|
+
borderStyle="single"
|
|
79
|
+
borderColor={statusColor}
|
|
80
|
+
paddingX={1}
|
|
81
|
+
paddingY={1}
|
|
82
|
+
marginY={1}
|
|
83
|
+
justifyContent="center"
|
|
84
|
+
>
|
|
85
|
+
<Text color={statusColor} bold>
|
|
86
|
+
{statusIcon} {stackMetadata.overallStatus.toUpperCase()}
|
|
87
|
+
</Text>
|
|
88
|
+
</Box>
|
|
89
|
+
|
|
90
|
+
<Box flexDirection="column" marginY={1}>
|
|
91
|
+
<Box>
|
|
92
|
+
<Text color="gray">Created: </Text>
|
|
93
|
+
<Text color="white">{formatDate(stackMetadata.createdAt)}</Text>
|
|
94
|
+
</Box>
|
|
95
|
+
<Box>
|
|
96
|
+
<Text color="gray">Resources: </Text>
|
|
97
|
+
<Text color="cyan">{stackMetadata.resourceCount}</Text>
|
|
98
|
+
</Box>
|
|
99
|
+
</Box>
|
|
100
|
+
|
|
101
|
+
<Box marginTop={1} marginBottom={1}>
|
|
102
|
+
<Text color="gray" underline>
|
|
103
|
+
Resources
|
|
104
|
+
</Text>
|
|
105
|
+
</Box>
|
|
106
|
+
|
|
107
|
+
<Box flexDirection="column">
|
|
108
|
+
{stack.resources.map((svc: { name: string }, index: number) => (
|
|
109
|
+
<Box key={svc.name}>
|
|
110
|
+
<Text color="gray">{index === stack.resources.length - 1 ? "└─ " : "├─ "}</Text>
|
|
111
|
+
<Text color="white">{svc.name}</Text>
|
|
112
|
+
</Box>
|
|
113
|
+
))}
|
|
114
|
+
</Box>
|
|
115
|
+
|
|
116
|
+
<Box marginTop={2}>
|
|
117
|
+
<Text color="gray" dimColor>
|
|
118
|
+
Press <Text color="cyan">[Esc]</Text> to close
|
|
119
|
+
</Text>
|
|
120
|
+
</Box>
|
|
121
|
+
</Box>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<Box
|
|
127
|
+
width={40}
|
|
128
|
+
borderStyle="single"
|
|
129
|
+
borderColor="gray"
|
|
130
|
+
paddingX={2}
|
|
131
|
+
paddingY={2}
|
|
132
|
+
flexDirection="column"
|
|
133
|
+
>
|
|
134
|
+
<Box marginBottom={1} justifyContent="center">
|
|
135
|
+
<Text color="gray" dimColor>
|
|
136
|
+
Select a stack or service
|
|
137
|
+
</Text>
|
|
138
|
+
</Box>
|
|
139
|
+
<Box justifyContent="center">
|
|
140
|
+
<Text color="gray" dimColor>
|
|
141
|
+
to view details
|
|
142
|
+
</Text>
|
|
143
|
+
</Box>
|
|
144
|
+
</Box>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Box, Text } from "ink";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import type { FileNode, FileTreeProps, FileType } from "../types/index.js";
|
|
5
|
+
import { formatBytes } from "../utils/formatting.js";
|
|
6
|
+
|
|
7
|
+
const FILE_ICONS: Record<FileType, string> = {
|
|
8
|
+
docker: "🐳",
|
|
9
|
+
tilt: "⚙️",
|
|
10
|
+
config: "🔧",
|
|
11
|
+
prisma: "🗄️",
|
|
12
|
+
generated: "📄",
|
|
13
|
+
unknown: "📃",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const FILE_COLORS: Record<FileType, string> = {
|
|
17
|
+
docker: "blue",
|
|
18
|
+
tilt: "cyan",
|
|
19
|
+
config: "yellow",
|
|
20
|
+
prisma: "magenta",
|
|
21
|
+
generated: "gray",
|
|
22
|
+
unknown: "white",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// biome-ignore lint/correctness/noUnusedFunctionParameters: reserved callback prop kept in the component API
|
|
26
|
+
export const FileTree: React.FC<FileTreeProps> = ({ nodes, onSelect, selectedPath }) => {
|
|
27
|
+
const [expandedNodes, setExpandedNodes] = useState<Set<string>>(new Set());
|
|
28
|
+
|
|
29
|
+
const _toggleNode = (path: string) => {
|
|
30
|
+
const newExpanded = new Set(expandedNodes);
|
|
31
|
+
if (newExpanded.has(path)) {
|
|
32
|
+
newExpanded.delete(path);
|
|
33
|
+
} else {
|
|
34
|
+
newExpanded.add(path);
|
|
35
|
+
}
|
|
36
|
+
setExpandedNodes(newExpanded);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const renderNode = (node: FileNode, depth: number = 0): React.ReactElement => {
|
|
40
|
+
const isExpanded = expandedNodes.has(node.path);
|
|
41
|
+
const isSelected = selectedPath === node.path;
|
|
42
|
+
const indent = " ".repeat(depth);
|
|
43
|
+
|
|
44
|
+
if (node.type === "directory") {
|
|
45
|
+
return (
|
|
46
|
+
<Box key={node.path} flexDirection="column">
|
|
47
|
+
<Box>
|
|
48
|
+
<Text
|
|
49
|
+
color={isSelected ? "cyan" : "white"}
|
|
50
|
+
bold={isSelected}
|
|
51
|
+
backgroundColor={isSelected ? "blue" : undefined}
|
|
52
|
+
>
|
|
53
|
+
{indent}
|
|
54
|
+
{isExpanded ? "▼" : "▶"} {node.name}
|
|
55
|
+
</Text>
|
|
56
|
+
</Box>
|
|
57
|
+
{isExpanded && node.children?.map((child) => renderNode(child, depth + 1))}
|
|
58
|
+
</Box>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const icon = node.fileType ? FILE_ICONS[node.fileType] : FILE_ICONS.unknown;
|
|
63
|
+
const color = node.fileType ? FILE_COLORS[node.fileType] : FILE_COLORS.unknown;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<Box key={node.path}>
|
|
67
|
+
<Text
|
|
68
|
+
color={isSelected ? "cyan" : color}
|
|
69
|
+
bold={isSelected}
|
|
70
|
+
backgroundColor={isSelected ? "blue" : undefined}
|
|
71
|
+
>
|
|
72
|
+
{indent} {icon} {node.name}
|
|
73
|
+
</Text>
|
|
74
|
+
{node.size && (
|
|
75
|
+
<Text color="gray" dimColor>
|
|
76
|
+
{" "}
|
|
77
|
+
({formatBytes(node.size)})
|
|
78
|
+
</Text>
|
|
79
|
+
)}
|
|
80
|
+
</Box>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<Box flexDirection="column" paddingX={1}>
|
|
86
|
+
{nodes.map((node) => renderNode(node, 0))}
|
|
87
|
+
</Box>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Text } from "ink";
|
|
2
|
+
import SelectInput from "ink-select-input";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
import type { ResourceSelectInputProps } from "../types/index.js";
|
|
5
|
+
|
|
6
|
+
export const ResourceSelectInput: React.FC<ResourceSelectInputProps> = ({
|
|
7
|
+
items,
|
|
8
|
+
onSelect,
|
|
9
|
+
highlightedIndex,
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<SelectInput
|
|
13
|
+
items={items}
|
|
14
|
+
onSelect={onSelect}
|
|
15
|
+
initialIndex={highlightedIndex}
|
|
16
|
+
indicatorComponent={({ isSelected }) => (
|
|
17
|
+
<Text color={isSelected ? "cyan" : undefined}>{isSelected ? "▓▒░ " : " "}</Text>
|
|
18
|
+
)}
|
|
19
|
+
itemComponent={({ isSelected, label }) => (
|
|
20
|
+
<Text
|
|
21
|
+
color={isSelected ? "cyan" : "white"}
|
|
22
|
+
bold={isSelected}
|
|
23
|
+
backgroundColor={isSelected ? "black" : undefined}
|
|
24
|
+
>
|
|
25
|
+
{label}
|
|
26
|
+
</Text>
|
|
27
|
+
)}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Box, Text } from "ink";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { ResourceTableProps } from "../types/index.js";
|
|
4
|
+
import { formatShortDate, getStatusColor, getStatusIcon, truncate } from "../utils/formatting.js";
|
|
5
|
+
|
|
6
|
+
export const ResourceTable: React.FC<ResourceTableProps> = ({ resources, maxWidth = 100 }) => {
|
|
7
|
+
if (resources.length === 0) {
|
|
8
|
+
return (
|
|
9
|
+
<Box paddingY={1}>
|
|
10
|
+
<Text color="gray">No resources found</Text>
|
|
11
|
+
</Box>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const narrowMode = maxWidth < 80;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Box flexDirection="column">
|
|
19
|
+
<Box flexDirection="row" borderStyle="single" borderColor="gray" paddingX={1}>
|
|
20
|
+
<Box width={narrowMode ? 20 : 25}>
|
|
21
|
+
<Text bold>Logical ID</Text>
|
|
22
|
+
</Box>
|
|
23
|
+
{!narrowMode && (
|
|
24
|
+
<Box width={20}>
|
|
25
|
+
<Text bold>Physical ID</Text>
|
|
26
|
+
</Box>
|
|
27
|
+
)}
|
|
28
|
+
<Box width={12}>
|
|
29
|
+
<Text bold>Type</Text>
|
|
30
|
+
</Box>
|
|
31
|
+
<Box width={15}>
|
|
32
|
+
<Text bold>Status</Text>
|
|
33
|
+
</Box>
|
|
34
|
+
{!narrowMode && (
|
|
35
|
+
<Box width={20}>
|
|
36
|
+
<Text bold>Created</Text>
|
|
37
|
+
</Box>
|
|
38
|
+
)}
|
|
39
|
+
</Box>
|
|
40
|
+
|
|
41
|
+
{resources.map((resource, index) => {
|
|
42
|
+
const statusColor = getStatusColor(resource.status);
|
|
43
|
+
const statusIcon = getStatusIcon(resource.status);
|
|
44
|
+
const _isEven = index % 2 === 0;
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<Box key={resource.name} flexDirection="row" paddingX={1}>
|
|
48
|
+
<Box width={narrowMode ? 20 : 25}>
|
|
49
|
+
<Text>{truncate(resource.name, narrowMode ? 18 : 23)}</Text>
|
|
50
|
+
</Box>
|
|
51
|
+
{!narrowMode && (
|
|
52
|
+
<Box width={20}>
|
|
53
|
+
<Text color="gray">
|
|
54
|
+
{resource.stack && resource.stack !== "unknown"
|
|
55
|
+
? truncate(`${resource.stack}/${resource.name}`, 18)
|
|
56
|
+
: truncate(resource.name, 18)}
|
|
57
|
+
</Text>
|
|
58
|
+
</Box>
|
|
59
|
+
)}
|
|
60
|
+
<Box width={12}>
|
|
61
|
+
<Text color="cyan">{resource.type}</Text>
|
|
62
|
+
</Box>
|
|
63
|
+
<Box width={15}>
|
|
64
|
+
<Text color={statusColor}>
|
|
65
|
+
{statusIcon} {resource.status}
|
|
66
|
+
</Text>
|
|
67
|
+
</Box>
|
|
68
|
+
{!narrowMode && (
|
|
69
|
+
<Box width={20}>
|
|
70
|
+
<Text color="gray">{formatShortDate(resource.createdAt)}</Text>
|
|
71
|
+
</Box>
|
|
72
|
+
)}
|
|
73
|
+
</Box>
|
|
74
|
+
);
|
|
75
|
+
})}
|
|
76
|
+
</Box>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Box, Text } from "ink";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { Tab, TabBarProps } from "../types/index.js";
|
|
4
|
+
|
|
5
|
+
const TABS: Tab[] = [
|
|
6
|
+
{ id: "overview", label: "OVERVIEW", shortcut: "1" },
|
|
7
|
+
{ id: "resources", label: "RESOURCES", shortcut: "2" },
|
|
8
|
+
{ id: "events", label: "EVENTS", shortcut: "3" },
|
|
9
|
+
{ id: "files", label: "FILES", shortcut: "4" },
|
|
10
|
+
{ id: "config", label: "CONFIG", shortcut: "5" },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
// biome-ignore lint/correctness/noUnusedFunctionParameters: reserved callback prop kept in the component API
|
|
14
|
+
export const TabBar: React.FC<TabBarProps> = ({ activeTab, onTabChange, compact = false }) => {
|
|
15
|
+
return (
|
|
16
|
+
<Box flexDirection="column" paddingX={1}>
|
|
17
|
+
<Box marginBottom={1}>
|
|
18
|
+
<Text color="gray">{"─".repeat(compact ? 60 : 80)}</Text>
|
|
19
|
+
</Box>
|
|
20
|
+
<Box flexDirection="row" justifyContent="space-between" paddingX={1}>
|
|
21
|
+
{TABS.map((tab) => {
|
|
22
|
+
const isActive = activeTab === tab.id;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box key={tab.id}>
|
|
26
|
+
{isActive ? (
|
|
27
|
+
<Box borderStyle="single" borderColor="cyan" paddingX={1} backgroundColor="black">
|
|
28
|
+
<Text>
|
|
29
|
+
<Text color="cyan">▓▒░</Text>
|
|
30
|
+
<Text color="cyan" bold>
|
|
31
|
+
{" "}
|
|
32
|
+
[{tab.shortcut}] {tab.label}{" "}
|
|
33
|
+
</Text>
|
|
34
|
+
<Text color="cyan">░▒▓</Text>
|
|
35
|
+
</Text>
|
|
36
|
+
</Box>
|
|
37
|
+
) : (
|
|
38
|
+
<Box paddingX={1}>
|
|
39
|
+
<Text color="gray" dimColor>
|
|
40
|
+
[{tab.shortcut}] {compact ? tab.label.slice(0, 4) : tab.label}
|
|
41
|
+
</Text>
|
|
42
|
+
</Box>
|
|
43
|
+
)}
|
|
44
|
+
</Box>
|
|
45
|
+
);
|
|
46
|
+
})}
|
|
47
|
+
</Box>
|
|
48
|
+
<Box marginTop={1}>
|
|
49
|
+
<Text color="gray">{"─".repeat(compact ? 60 : 80)}</Text>
|
|
50
|
+
</Box>
|
|
51
|
+
</Box>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const TOOLTIPS = {
|
|
2
|
+
overviewTab: "View all stacks and their resources",
|
|
3
|
+
resourcesTab: "Detailed resource list with metadata",
|
|
4
|
+
eventsTab: "Service lifecycle events timeline",
|
|
5
|
+
filesTab: "Browse autogenerated configuration files",
|
|
6
|
+
configTab: "View and edit service configurations",
|
|
7
|
+
search: "Filter services by name, stack, or type",
|
|
8
|
+
refresh: "Reload data from Tilt API",
|
|
9
|
+
help: "Show keyboard shortcuts and help",
|
|
10
|
+
quit: "Exit the TUI",
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { PLATFORM_STANDARDS } from "./platform-standards.js";
|
|
3
|
+
|
|
4
|
+
describe("platform standards", () => {
|
|
5
|
+
it("keeps the low-level Traefik host generic and uses a non-privileged port", () => {
|
|
6
|
+
expect(PLATFORM_STANDARDS.traefik.defaultHost).toBe("localhost");
|
|
7
|
+
expect(PLATFORM_STANDARDS.traefik.appHost).toBe("app.localhost");
|
|
8
|
+
expect(PLATFORM_STANDARDS.traefik.apiHost).toBe("api.localhost");
|
|
9
|
+
expect(PLATFORM_STANDARDS.traefik.defaultPort).toBe(8080);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { PORT_RANGES, STANDARD_PORTS } from "../utils/constants.js";
|
|
2
|
+
|
|
3
|
+
const PLATFORM_VERSION = "1.0.0";
|
|
4
|
+
|
|
5
|
+
const TECH_STACK = {
|
|
6
|
+
runtime: "bun",
|
|
7
|
+
bundler: "vite",
|
|
8
|
+
language: "typescript",
|
|
9
|
+
framework: "hono",
|
|
10
|
+
database: "postgresql",
|
|
11
|
+
orm: "prisma",
|
|
12
|
+
messaging: "nats",
|
|
13
|
+
linting: "biome",
|
|
14
|
+
testing: "vitest",
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
const PORTS = {
|
|
18
|
+
frontend: {
|
|
19
|
+
base: PORT_RANGES.frontend.base,
|
|
20
|
+
range: PORT_RANGES.frontend.range,
|
|
21
|
+
start: PORT_RANGES.frontend.min,
|
|
22
|
+
end: PORT_RANGES.frontend.max,
|
|
23
|
+
},
|
|
24
|
+
backend: {
|
|
25
|
+
base: PORT_RANGES.backend.base,
|
|
26
|
+
range: PORT_RANGES.backend.range,
|
|
27
|
+
start: PORT_RANGES.backend.min,
|
|
28
|
+
end: PORT_RANGES.backend.max,
|
|
29
|
+
},
|
|
30
|
+
health: {
|
|
31
|
+
base: PORT_RANGES.health.base,
|
|
32
|
+
range: PORT_RANGES.health.range,
|
|
33
|
+
start: PORT_RANGES.health.min,
|
|
34
|
+
end: PORT_RANGES.health.max,
|
|
35
|
+
},
|
|
36
|
+
worker: {
|
|
37
|
+
base: PORT_RANGES.worker.base,
|
|
38
|
+
range: PORT_RANGES.worker.range,
|
|
39
|
+
start: PORT_RANGES.worker.min,
|
|
40
|
+
end: PORT_RANGES.worker.max,
|
|
41
|
+
},
|
|
42
|
+
migrator: {
|
|
43
|
+
base: PORT_RANGES.migrator.base,
|
|
44
|
+
range: PORT_RANGES.migrator.range,
|
|
45
|
+
start: PORT_RANGES.migrator.min,
|
|
46
|
+
end: PORT_RANGES.migrator.max,
|
|
47
|
+
},
|
|
48
|
+
tiltUi: STANDARD_PORTS.tiltUi,
|
|
49
|
+
traefik: STANDARD_PORTS.traefik,
|
|
50
|
+
} as const;
|
|
51
|
+
|
|
52
|
+
const HEALTH_CHECKS = {
|
|
53
|
+
path: "/health",
|
|
54
|
+
live: "/health/live",
|
|
55
|
+
ready: "/health/ready",
|
|
56
|
+
timeout: 30,
|
|
57
|
+
interval: 5,
|
|
58
|
+
} as const;
|
|
59
|
+
|
|
60
|
+
const NAMING = {
|
|
61
|
+
frontend: "-frontend",
|
|
62
|
+
backend: "-backend",
|
|
63
|
+
worker: "-worker",
|
|
64
|
+
migrator: "-migrator",
|
|
65
|
+
library: "-lib",
|
|
66
|
+
sdk: "-sdk",
|
|
67
|
+
validSeparators: ["-", "_"],
|
|
68
|
+
maxLength: 63,
|
|
69
|
+
minLength: 3,
|
|
70
|
+
} as const;
|
|
71
|
+
|
|
72
|
+
const TRAEFIK = {
|
|
73
|
+
entrypoint: "web",
|
|
74
|
+
network: "traefik-public",
|
|
75
|
+
defaultHost: "localhost",
|
|
76
|
+
appHost: "app.localhost",
|
|
77
|
+
apiHost: "api.localhost",
|
|
78
|
+
appSubdomainPrefix: "app",
|
|
79
|
+
apiSubdomainPrefix: "api",
|
|
80
|
+
defaultPort: 8080,
|
|
81
|
+
tlsEnabled: false,
|
|
82
|
+
entrypoints: ["web"],
|
|
83
|
+
middlewares: [],
|
|
84
|
+
tls: { enabled: false },
|
|
85
|
+
healthcheckPath: "/health",
|
|
86
|
+
healthcheckInterval: "10s",
|
|
87
|
+
healthcheckTimeout: "5s",
|
|
88
|
+
frontendPriorityBase: 100,
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
const FILEWATCH_IGNORES = [
|
|
92
|
+
"node_modules",
|
|
93
|
+
"dist",
|
|
94
|
+
"build",
|
|
95
|
+
".git",
|
|
96
|
+
".prisma",
|
|
97
|
+
".turbo",
|
|
98
|
+
"coverage",
|
|
99
|
+
"tmp",
|
|
100
|
+
"temp",
|
|
101
|
+
"__tests__",
|
|
102
|
+
"test",
|
|
103
|
+
"tests",
|
|
104
|
+
] as const;
|
|
105
|
+
|
|
106
|
+
const RESOURCE_TYPES = {
|
|
107
|
+
frontend: {
|
|
108
|
+
suffix: "-frontend",
|
|
109
|
+
portRange: "3000-3999",
|
|
110
|
+
},
|
|
111
|
+
backend: {
|
|
112
|
+
suffix: "-backend",
|
|
113
|
+
portRange: "4000-4999",
|
|
114
|
+
},
|
|
115
|
+
library: {
|
|
116
|
+
suffix: "-library",
|
|
117
|
+
portRange: null,
|
|
118
|
+
},
|
|
119
|
+
sdk: {
|
|
120
|
+
suffix: "-sdk",
|
|
121
|
+
portRange: "3000-9999",
|
|
122
|
+
},
|
|
123
|
+
migrator: {
|
|
124
|
+
suffix: "-migrator",
|
|
125
|
+
portRange: "7000-7999",
|
|
126
|
+
},
|
|
127
|
+
worker: {
|
|
128
|
+
suffix: "-worker",
|
|
129
|
+
portRange: "6000-6999",
|
|
130
|
+
},
|
|
131
|
+
} as const;
|
|
132
|
+
|
|
133
|
+
const FEATURES = {
|
|
134
|
+
prisma: "Database ORM with migrations",
|
|
135
|
+
nats: "Event streaming via NATS",
|
|
136
|
+
redis: "Caching layer",
|
|
137
|
+
infisical: "Secrets management",
|
|
138
|
+
vitest: "Testing framework",
|
|
139
|
+
traefik: "HTTP routing",
|
|
140
|
+
websocket: "Real-time connections",
|
|
141
|
+
graphql: "GraphQL support",
|
|
142
|
+
grpc: "gRPC support",
|
|
143
|
+
viteNode: "Vite Node runtime",
|
|
144
|
+
maintenance: "Maintenance mode",
|
|
145
|
+
} as const;
|
|
146
|
+
|
|
147
|
+
const PATHS = {
|
|
148
|
+
services: "services/product",
|
|
149
|
+
sharedPlatform: "shared-platform-engineering",
|
|
150
|
+
sharedProduct: "shared-product-engineering",
|
|
151
|
+
sharedDdd: "shared-ddd-layers",
|
|
152
|
+
} as const;
|
|
153
|
+
|
|
154
|
+
const DISCOVERY = {
|
|
155
|
+
scanIntervalSeconds: 5,
|
|
156
|
+
maxManifestsPerRoot: 50,
|
|
157
|
+
servicePatterns: ["services/product/*", "services/platform/*"],
|
|
158
|
+
} as const;
|
|
159
|
+
|
|
160
|
+
const DOCKER = {
|
|
161
|
+
dockerfile: "Dockerfile",
|
|
162
|
+
context: ".",
|
|
163
|
+
// Auto-detect native arch (arm64 on Apple Silicon, amd64 elsewhere)
|
|
164
|
+
// platform: "linux/amd64",
|
|
165
|
+
} as const;
|
|
166
|
+
|
|
167
|
+
const RUNTIME = {
|
|
168
|
+
backend: {
|
|
169
|
+
command: "bun",
|
|
170
|
+
args: ["run", "dev"],
|
|
171
|
+
env: { NODE_ENV: "development" },
|
|
172
|
+
},
|
|
173
|
+
frontend: {
|
|
174
|
+
command: "bun",
|
|
175
|
+
args: ["run", "dev"],
|
|
176
|
+
env: { NODE_ENV: "development" },
|
|
177
|
+
},
|
|
178
|
+
} as const;
|
|
179
|
+
|
|
180
|
+
export const PLATFORM_STANDARDS = {
|
|
181
|
+
version: PLATFORM_VERSION,
|
|
182
|
+
tech: TECH_STACK,
|
|
183
|
+
ports: PORTS,
|
|
184
|
+
health: HEALTH_CHECKS,
|
|
185
|
+
naming: NAMING,
|
|
186
|
+
traefik: TRAEFIK,
|
|
187
|
+
filewatchIgnores: FILEWATCH_IGNORES,
|
|
188
|
+
serviceTypes: RESOURCE_TYPES,
|
|
189
|
+
features: FEATURES,
|
|
190
|
+
paths: PATHS,
|
|
191
|
+
discovery: DISCOVERY,
|
|
192
|
+
docker: DOCKER,
|
|
193
|
+
runtime: RUNTIME,
|
|
194
|
+
} as const;
|
|
195
|
+
|
|
196
|
+
export type PlatformStandards = typeof PLATFORM_STANDARDS;
|