@tdk-landscape/tdk-cli-core 1.3.45 → 1.3.49
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
package/package.json
CHANGED
|
@@ -1,76 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdk-landscape/tdk-cli-core",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "TDK CLI - Tilt Development Kit
|
|
3
|
+
"version": "1.3.49",
|
|
4
|
+
"description": "TDK CLI - Tilt Development Kit (monorepo)",
|
|
5
|
+
"private": false,
|
|
6
|
+
"workspaces": [
|
|
7
|
+
"cli"
|
|
8
|
+
],
|
|
9
|
+
"bin": {
|
|
10
|
+
"tdk": "cli/bin/tdk.js",
|
|
11
|
+
"tdk-cli": "cli/bin/tdk.js"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "cd cli && npm run build",
|
|
15
|
+
"build:watch": "cd cli && npm run build:watch",
|
|
16
|
+
"typecheck": "cd cli && npm run typecheck",
|
|
17
|
+
"lint": "cd cli && npm run lint",
|
|
18
|
+
"lint:fix": "cd cli && npm run lint:fix",
|
|
19
|
+
"test": "cd cli && npm run test",
|
|
20
|
+
"clean": "cd cli && npm run clean",
|
|
21
|
+
"release:binaries": "scripts/release-binaries.sh",
|
|
22
|
+
"release:binaries:publish": "scripts/release-binaries.sh --publish",
|
|
23
|
+
"prepare": "scripts/install-git-hooks.sh",
|
|
24
|
+
"cli": "cd cli && node bin/tdk.js",
|
|
25
|
+
"tdk": "cd cli && node bin/tdk.js"
|
|
26
|
+
},
|
|
5
27
|
"keywords": [
|
|
6
28
|
"tdk",
|
|
7
29
|
"tilt",
|
|
8
30
|
"cli",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
31
|
+
"microservices",
|
|
32
|
+
"local-dev"
|
|
11
33
|
],
|
|
12
|
-
"homepage": "https://github.com/tdk-landscape/tdk-cli-core#readme",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/tdk-landscape/tdk-cli-core/issues"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/tdk-landscape/tdk-cli-core.git",
|
|
19
|
-
"directory": "cli"
|
|
20
|
-
},
|
|
21
34
|
"license": "MIT",
|
|
22
|
-
"author": "TDK Team",
|
|
23
|
-
"type": "module",
|
|
24
|
-
"main": "./dist/index.js",
|
|
25
|
-
"types": "./dist/index.d.ts",
|
|
26
|
-
"bin": {
|
|
27
|
-
"tdk": "bin/tdk.js",
|
|
28
|
-
"tdk-cli": "bin/tdk.js"
|
|
29
|
-
},
|
|
30
|
-
"files": [
|
|
31
|
-
"dist",
|
|
32
|
-
"bin",
|
|
33
|
-
"templates",
|
|
34
|
-
"README.md",
|
|
35
|
-
"Tiltfile",
|
|
36
|
-
"engine",
|
|
37
|
-
"discovery",
|
|
38
|
-
"specs",
|
|
39
|
-
"ext"
|
|
40
|
-
],
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "tsc",
|
|
43
|
-
"build:watch": "tsc --watch",
|
|
44
|
-
"lint": "biome check .",
|
|
45
|
-
"lint:fix": "biome check . --write",
|
|
46
|
-
"typecheck": "tsc --project tsconfig.typecheck.json",
|
|
47
|
-
"clean": "rm -rf dist",
|
|
48
|
-
"dev": "bun run build:watch",
|
|
49
|
-
"test": "vitest run",
|
|
50
|
-
"test:watch": "vitest",
|
|
51
|
-
"prepack": "../scripts/stage-npm-engine.sh && npm run build"
|
|
52
|
-
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"chalk": "^5.3.0",
|
|
55
|
-
"commander": "^12.0.0",
|
|
56
|
-
"handlebars": "^4.7.8",
|
|
57
|
-
"ink": "^7.0.1",
|
|
58
|
-
"ink-select-input": "^6.2.0",
|
|
59
|
-
"ora": "^8.0.0",
|
|
60
|
-
"react": "^19.2.5"
|
|
61
|
-
},
|
|
62
35
|
"devDependencies": {
|
|
63
|
-
"@biomejs/biome": "^2.5.13",
|
|
64
|
-
"@types/react": "^19.2.14",
|
|
65
|
-
"@types/inquirer": "^9.0.0",
|
|
66
36
|
"@types/node": "^20.0.0",
|
|
67
|
-
"knip": "^6.
|
|
68
|
-
"react-devtools-core": "^6.1.1",
|
|
69
|
-
"typescript": "^7.0.2",
|
|
70
|
-
"vite": "^6.0.0",
|
|
71
|
-
"vitest": "^5.0.0"
|
|
72
|
-
},
|
|
73
|
-
"engines": {
|
|
74
|
-
"node": ">=20.0.0"
|
|
37
|
+
"knip": "^6.9.0"
|
|
75
38
|
}
|
|
76
39
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
appName: proxy
|
|
2
|
+
appType: infra
|
|
3
|
+
stack: platform
|
|
4
|
+
port: 80
|
|
5
|
+
description: Traefik reverse proxy with dynamic routing
|
|
6
|
+
features:
|
|
7
|
+
- traefik
|
|
8
|
+
healthCheck: False
|
|
9
|
+
dependsOn:
|
|
10
|
+
- database-management
|
|
11
|
+
runtime: docker
|
|
12
|
+
traefik:
|
|
13
|
+
host: traefik.beauty-crm.localhost
|
|
14
|
+
pathPrefix: /dashboard
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# TDK Codebase Audit Script
|
|
4
|
+
# Scans for TODO, FIXME, BUG, HACK markers across all source files
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
# Colors for output
|
|
10
|
+
RED='\033[0;31m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
BLUE='\033[0;34m'
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
GRAY='\033[0;90m'
|
|
15
|
+
NC='\033[0m' # No Color
|
|
16
|
+
|
|
17
|
+
# Directories to scan
|
|
18
|
+
CLI_DIR="cli/src"
|
|
19
|
+
DISCOVERY_DIR="discovery"
|
|
20
|
+
ENGINE_DIR="engine"
|
|
21
|
+
|
|
22
|
+
# File extensions to scan
|
|
23
|
+
TS_EXTENSIONS="*.ts *.tsx"
|
|
24
|
+
PY_EXTENSIONS="*.py"
|
|
25
|
+
STAR_EXTENSIONS="*.star"
|
|
26
|
+
GO_EXTENSIONS="*.go"
|
|
27
|
+
|
|
28
|
+
# Markers to search for
|
|
29
|
+
MARKERS="TODO|FIXME|XXX|BUG|HACK"
|
|
30
|
+
|
|
31
|
+
echo -e "${BLUE}🔍 TDK Codebase Audit${NC}"
|
|
32
|
+
echo -e "${GRAY}Scanning for: ${MARKERS}${NC}"
|
|
33
|
+
echo ""
|
|
34
|
+
|
|
35
|
+
# Counters
|
|
36
|
+
cli_count=0
|
|
37
|
+
discovery_count=0
|
|
38
|
+
engine_count=0
|
|
39
|
+
total_count=0
|
|
40
|
+
|
|
41
|
+
# Temporary files for categorization
|
|
42
|
+
CLI_FINDINGS=$(mktemp)
|
|
43
|
+
DISCOVERY_FINDINGS=$(mktemp)
|
|
44
|
+
ENGINE_FINDINGS=$(mktemp)
|
|
45
|
+
|
|
46
|
+
# Function to scan a directory
|
|
47
|
+
scan_directory() {
|
|
48
|
+
local dir="$1"
|
|
49
|
+
local name="$2"
|
|
50
|
+
local extensions="$3"
|
|
51
|
+
local output_file="$4"
|
|
52
|
+
local count=0
|
|
53
|
+
|
|
54
|
+
echo -e "${BLUE}📁 Scanning ${name}...${NC}"
|
|
55
|
+
|
|
56
|
+
if [ ! -d "$dir" ]; then
|
|
57
|
+
echo -e "${YELLOW} ⚠️ Directory not found: ${dir}${NC}"
|
|
58
|
+
return 0
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
for ext in $extensions; do
|
|
62
|
+
while IFS= read -r file; do
|
|
63
|
+
if [ -n "$file" ]; then
|
|
64
|
+
local findings=$(grep -n -E "${MARKERS}" "$file" 2>/dev/null || true)
|
|
65
|
+
if [ -n "$findings" ]; then
|
|
66
|
+
echo "$file" >> "$output_file"
|
|
67
|
+
echo "$findings" >> "$output_file"
|
|
68
|
+
echo "" >> "$output_file"
|
|
69
|
+
local file_count=$(echo "$findings" | wc -l)
|
|
70
|
+
count=$((count + file_count))
|
|
71
|
+
fi
|
|
72
|
+
fi
|
|
73
|
+
done < <(find "$dir" -name "$ext" -type f 2>/dev/null)
|
|
74
|
+
done
|
|
75
|
+
|
|
76
|
+
echo -e "${GREEN} ✅ Found ${count} marker(s)${NC}"
|
|
77
|
+
return $count
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# Scan CLI (TypeScript)
|
|
81
|
+
scan_directory "$CLI_DIR" "CLI (TypeScript)" "$TS_EXTENSIONS" "$CLI_FINDINGS"
|
|
82
|
+
cli_count=$?
|
|
83
|
+
|
|
84
|
+
# Scan Discovery (Python and Starlark)
|
|
85
|
+
scan_directory "$DISCOVERY_DIR" "Discovery (Python/Starlark)" "$PY_EXTENSIONS $STAR_EXTENSIONS" "$DISCOVERY_FINDINGS"
|
|
86
|
+
discovery_count=$?
|
|
87
|
+
|
|
88
|
+
# Scan Engine (Starlark)
|
|
89
|
+
scan_directory "$ENGINE_DIR" "Engine (Starlark)" "$STAR_EXTENSIONS $GO_EXTENSIONS" "$ENGINE_FINDINGS"
|
|
90
|
+
engine_count=$?
|
|
91
|
+
|
|
92
|
+
# Calculate total
|
|
93
|
+
total_count=$((cli_count + discovery_count + engine_count))
|
|
94
|
+
|
|
95
|
+
echo ""
|
|
96
|
+
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
97
|
+
echo -e "${BLUE}📊 AUDIT REPORT${NC}"
|
|
98
|
+
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
99
|
+
echo ""
|
|
100
|
+
|
|
101
|
+
# Category: CLI (User-facing)
|
|
102
|
+
echo -e "${YELLOW}🔴 CLI (User-Facing) - ${cli_count} finding(s)${NC}"
|
|
103
|
+
echo -e "${GRAY} These affect user commands and should be prioritized${NC}"
|
|
104
|
+
if [ -s "$CLI_FINDINGS" ]; then
|
|
105
|
+
cat "$CLI_FINDINGS"
|
|
106
|
+
fi
|
|
107
|
+
echo ""
|
|
108
|
+
|
|
109
|
+
# Category: Core (Discovery/Engine)
|
|
110
|
+
echo -e "${YELLOW}🟡 Core (Discovery/Engine) - $((discovery_count + engine_count)) finding(s)${NC}"
|
|
111
|
+
echo -e "${GRAY} Infrastructure code - affects service discovery and orchestration${NC}"
|
|
112
|
+
|
|
113
|
+
if [ -s "$DISCOVERY_FINDINGS" ]; then
|
|
114
|
+
echo -e "${BLUE} Discovery:${NC}"
|
|
115
|
+
cat "$DISCOVERY_FINDINGS"
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
if [ -s "$ENGINE_FINDINGS" ]; then
|
|
119
|
+
echo -e "${BLUE} Engine:${NC}"
|
|
120
|
+
cat "$ENGINE_FINDINGS"
|
|
121
|
+
fi
|
|
122
|
+
echo ""
|
|
123
|
+
|
|
124
|
+
# Summary
|
|
125
|
+
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
126
|
+
echo -e "${BLUE}📈 SUMMARY${NC}"
|
|
127
|
+
echo -e "${BLUE}═══════════════════════════════════════════════════════════════${NC}"
|
|
128
|
+
echo -e "Total markers found: ${total_count}"
|
|
129
|
+
echo ""
|
|
130
|
+
echo -e "By category:"
|
|
131
|
+
echo -e " - CLI (User-facing): ${cli_count}"
|
|
132
|
+
echo -e " - Discovery: ${discovery_count}"
|
|
133
|
+
echo -e " - Engine: ${engine_count}"
|
|
134
|
+
echo ""
|
|
135
|
+
|
|
136
|
+
if [ $total_count -eq 0 ]; then
|
|
137
|
+
echo -e "${GREEN}✨ No technical debt markers found!${NC}"
|
|
138
|
+
else
|
|
139
|
+
echo -e "${YELLOW}⚠️ Action required: Review and address findings above${NC}"
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
# Save report to file
|
|
143
|
+
REPORT_FILE="codebase-audit-report-$(date +%Y%m%d-%H%M%S).md"
|
|
144
|
+
cat > "$REPORT_FILE" << EOF
|
|
145
|
+
# TDK Codebase Audit Report
|
|
146
|
+
|
|
147
|
+
Generated: $(date)
|
|
148
|
+
|
|
149
|
+
## Summary
|
|
150
|
+
|
|
151
|
+
- **Total markers found:** ${total_count}
|
|
152
|
+
- **CLI (User-facing):** ${cli_count}
|
|
153
|
+
- **Discovery:** ${discovery_count}
|
|
154
|
+
- **Engine:** ${engine_count}
|
|
155
|
+
|
|
156
|
+
## Findings
|
|
157
|
+
|
|
158
|
+
### CLI (User-Facing) - Priority: HIGH
|
|
159
|
+
|
|
160
|
+
\`\`\`
|
|
161
|
+
EOF
|
|
162
|
+
|
|
163
|
+
if [ -s "$CLI_FINDINGS" ]; then
|
|
164
|
+
cat "$CLI_FINDINGS" >> "$REPORT_FILE"
|
|
165
|
+
else
|
|
166
|
+
echo "No findings" >> "$REPORT_FILE"
|
|
167
|
+
fi
|
|
168
|
+
|
|
169
|
+
cat >> "$REPORT_FILE" << EOF
|
|
170
|
+
\`\`\`
|
|
171
|
+
|
|
172
|
+
### Discovery - Priority: MEDIUM
|
|
173
|
+
|
|
174
|
+
\`\`\`
|
|
175
|
+
EOF
|
|
176
|
+
|
|
177
|
+
if [ -s "$DISCOVERY_FINDINGS" ]; then
|
|
178
|
+
cat "$DISCOVERY_FINDINGS" >> "$REPORT_FILE"
|
|
179
|
+
else
|
|
180
|
+
echo "No findings" >> "$REPORT_FILE"
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
cat >> "$REPORT_FILE" << EOF
|
|
184
|
+
\`\`\`
|
|
185
|
+
|
|
186
|
+
### Engine - Priority: MEDIUM
|
|
187
|
+
|
|
188
|
+
\`\`\`
|
|
189
|
+
EOF
|
|
190
|
+
|
|
191
|
+
if [ -s "$ENGINE_FINDINGS" ]; then
|
|
192
|
+
cat "$ENGINE_FINDINGS" >> "$REPORT_FILE"
|
|
193
|
+
else
|
|
194
|
+
echo "No findings" >> "$REPORT_FILE"
|
|
195
|
+
fi
|
|
196
|
+
|
|
197
|
+
cat >> "$REPORT_FILE" << EOF
|
|
198
|
+
\`\`\`
|
|
199
|
+
|
|
200
|
+
## Next Steps
|
|
201
|
+
|
|
202
|
+
1. Review HIGH priority (CLI) findings first
|
|
203
|
+
2. Implement or remove TODOs as appropriate
|
|
204
|
+
3. Add tests for any new functionality
|
|
205
|
+
4. Re-run audit to verify cleanup
|
|
206
|
+
EOF
|
|
207
|
+
|
|
208
|
+
echo -e "${BLUE}💾 Full report saved to: ${REPORT_FILE}${NC}"
|
|
209
|
+
|
|
210
|
+
# Cleanup
|
|
211
|
+
rm -f "$CLI_FINDINGS" "$DISCOVERY_FINDINGS" "$ENGINE_FINDINGS"
|
|
212
|
+
|
|
213
|
+
exit 0
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
readonly ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
6
|
+
|
|
7
|
+
# npm runs `prepare` when installing from a GitHub URL, but its temporary
|
|
8
|
+
# checkout does not include the .git directory. Hooks are only needed in a
|
|
9
|
+
# developer checkout, so leave package installation untouched.
|
|
10
|
+
if ! git -C "${ROOT_DIR}" rev-parse --git-dir >/dev/null 2>&1; then
|
|
11
|
+
exit 0
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
git -C "${ROOT_DIR}" config core.hooksPath .githooks
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
readonly ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
6
|
+
readonly RELEASE_REPOSITORY="tdk-landscape/tdk-cli-releases"
|
|
7
|
+
readonly VERSION="$(node -p "require('${ROOT_DIR}/cli/package.json').version")"
|
|
8
|
+
readonly RELEASE_TAG="v${VERSION}"
|
|
9
|
+
readonly RELEASE_DIR="${ROOT_DIR}/release-dist-${RELEASE_TAG#v}"
|
|
10
|
+
readonly PUBLISH="${1:-}"
|
|
11
|
+
|
|
12
|
+
if ! command -v bun >/dev/null 2>&1; then
|
|
13
|
+
echo "bun is required to build release binaries" >&2
|
|
14
|
+
exit 1
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
rm -rf "${RELEASE_DIR}"
|
|
18
|
+
mkdir -p "${RELEASE_DIR}"
|
|
19
|
+
|
|
20
|
+
build_target() {
|
|
21
|
+
local target="$1"
|
|
22
|
+
local output="$2"
|
|
23
|
+
|
|
24
|
+
bun build --compile --target="${target}" --outfile="${RELEASE_DIR}/${output}" "${ROOT_DIR}/cli/src/cli.ts"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
build_target bun-linux-x64 tdk-linux-amd64
|
|
28
|
+
build_target bun-linux-arm64 tdk-linux-arm64
|
|
29
|
+
build_target bun-darwin-x64 tdk-darwin-amd64
|
|
30
|
+
build_target bun-darwin-arm64 tdk-darwin-arm64
|
|
31
|
+
|
|
32
|
+
# A compiled binary has no import.meta.dirname to walk up from, so it can't
|
|
33
|
+
# find engine/ the way a source checkout can. template-engine.ts checks
|
|
34
|
+
# exeDir/tdk-cli as a candidate - bundle the free engine (and the Handlebars
|
|
35
|
+
# templates loadTemplate() reads at module init) there so a standalone binary
|
|
36
|
+
# works the same as `tdk-cli-core` cloned from source.
|
|
37
|
+
mkdir -p "${RELEASE_DIR}/tdk-cli"
|
|
38
|
+
cp "${ROOT_DIR}/Tiltfile" "${RELEASE_DIR}/tdk-cli/Tiltfile"
|
|
39
|
+
cp -R "${ROOT_DIR}/engine" "${RELEASE_DIR}/tdk-cli/engine"
|
|
40
|
+
cp -R "${ROOT_DIR}/discovery" "${RELEASE_DIR}/tdk-cli/discovery"
|
|
41
|
+
cp -R "${ROOT_DIR}/specs" "${RELEASE_DIR}/tdk-cli/specs"
|
|
42
|
+
cp -R "${ROOT_DIR}/ext" "${RELEASE_DIR}/tdk-cli/ext"
|
|
43
|
+
mkdir -p "${RELEASE_DIR}/tdk-cli/cli"
|
|
44
|
+
cp -R "${ROOT_DIR}/cli/templates" "${RELEASE_DIR}/tdk-cli/cli/templates"
|
|
45
|
+
|
|
46
|
+
(
|
|
47
|
+
cd "${RELEASE_DIR}"
|
|
48
|
+
shasum -a 256 tdk-linux-amd64 tdk-linux-arm64 tdk-darwin-amd64 tdk-darwin-arm64 > checksums.txt
|
|
49
|
+
zip -qr "tdk-cli-${RELEASE_TAG}-binaries.zip" \
|
|
50
|
+
tdk-linux-amd64 tdk-linux-arm64 tdk-darwin-amd64 tdk-darwin-arm64 \
|
|
51
|
+
tdk-cli checksums.txt
|
|
52
|
+
# Fixed filename (no version/tag in the name) so install.sh can always
|
|
53
|
+
# find it via the stable /releases/latest/download/ URL, unlike the zip
|
|
54
|
+
# above whose name embeds the tag and changes every release.
|
|
55
|
+
tar -czf tdk-cli-engine.tar.gz tdk-cli
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
echo "Built release assets in ${RELEASE_DIR}"
|
|
59
|
+
|
|
60
|
+
if [[ "${PUBLISH}" != "--publish" ]]; then
|
|
61
|
+
exit 0
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
if ! command -v gh >/dev/null 2>&1; then
|
|
65
|
+
echo "gh is required to publish release binaries" >&2
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
# Upload actual files only - tdk-cli/ is a directory (the bundled engine),
|
|
70
|
+
# already packed inside the zip, and `gh release upload` can't take a
|
|
71
|
+
# directory as an asset.
|
|
72
|
+
readonly ASSETS=(
|
|
73
|
+
"${RELEASE_DIR}/tdk-linux-amd64"
|
|
74
|
+
"${RELEASE_DIR}/tdk-linux-arm64"
|
|
75
|
+
"${RELEASE_DIR}/tdk-darwin-amd64"
|
|
76
|
+
"${RELEASE_DIR}/tdk-darwin-arm64"
|
|
77
|
+
"${RELEASE_DIR}/checksums.txt"
|
|
78
|
+
"${RELEASE_DIR}/tdk-cli-${RELEASE_TAG}-binaries.zip"
|
|
79
|
+
"${RELEASE_DIR}/tdk-cli-engine.tar.gz"
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Never mark a release latest until every asset is uploaded. `gh release create
|
|
83
|
+
# --latest FILE...` publishes the tag first, then uploads binaries, so
|
|
84
|
+
# /releases/latest/download/tdk-* 404s for a few minutes (install.sh hits this).
|
|
85
|
+
if gh release view "${RELEASE_TAG}" --repo "${RELEASE_REPOSITORY}" >/dev/null 2>&1; then
|
|
86
|
+
gh release upload "${RELEASE_TAG}" --repo "${RELEASE_REPOSITORY}" --clobber "${ASSETS[@]}"
|
|
87
|
+
else
|
|
88
|
+
gh release create "${RELEASE_TAG}" \
|
|
89
|
+
--repo "${RELEASE_REPOSITORY}" \
|
|
90
|
+
--title "TDK CLI ${RELEASE_TAG#v}" \
|
|
91
|
+
--draft \
|
|
92
|
+
"${ASSETS[@]}"
|
|
93
|
+
fi
|
|
94
|
+
gh release edit "${RELEASE_TAG}" --repo "${RELEASE_REPOSITORY}" --draft=false --latest
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Setup script for TDK CLI development environment
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "🚀 Setting up TDK CLI development environment..."
|
|
7
|
+
|
|
8
|
+
# Check if pre-commit is installed
|
|
9
|
+
if ! command -v pre-commit &> /dev/null; then
|
|
10
|
+
echo "📦 Installing pre-commit..."
|
|
11
|
+
pip install pre-commit
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
# Install hooks
|
|
15
|
+
echo "🔧 Installing pre-commit hooks..."
|
|
16
|
+
pre-commit install
|
|
17
|
+
|
|
18
|
+
# Run fast tests to verify everything works
|
|
19
|
+
echo "🧪 Running fast tests to verify setup..."
|
|
20
|
+
if python3 -m pytest -m fast --no-cov -q 2>/dev/null; then
|
|
21
|
+
echo "✅ Fast tests passed!"
|
|
22
|
+
else
|
|
23
|
+
echo "⚠️ Some tests may need dependencies, but pre-commit is installed."
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
echo ""
|
|
27
|
+
echo "✅ Setup complete! Pre-commit hooks are now installed."
|
|
28
|
+
echo ""
|
|
29
|
+
echo "Usage:"
|
|
30
|
+
echo " git commit # Runs fast tests automatically"
|
|
31
|
+
echo " make test-fast # Run fast tests manually"
|
|
32
|
+
echo " make test-generator # Run generator-specific tests"
|
|
33
|
+
echo " pre-commit run --all-files # Run all hooks manually"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Stages the free TDK Tilt extension (Tiltfile, engine/, discovery/, specs/,
|
|
3
|
+
# ext/) into cli/ before `npm publish`.
|
|
4
|
+
#
|
|
5
|
+
# npm's `files` field can only package files inside the package directory
|
|
6
|
+
# (cli/), but those directories live at the repo root - the same directories
|
|
7
|
+
# scripts/release-binaries.sh bundles as tdk-cli/ next to the compiled
|
|
8
|
+
# binaries. Staging them here lets findSelfContainedEngineRoot() in
|
|
9
|
+
# template-engine.ts (vendorTdkExtension) find them for an npm/bun-installed
|
|
10
|
+
# package the same way it already does for a plain git clone: Tiltfile and
|
|
11
|
+
# engine/ sitting next to each other.
|
|
12
|
+
#
|
|
13
|
+
# Cleaned up by --clean (also gitignored, so a forgotten copy never lands in
|
|
14
|
+
# a commit).
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
readonly ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
18
|
+
readonly CLI_DIR="${ROOT_DIR}/cli"
|
|
19
|
+
readonly DIRS=(engine discovery specs ext)
|
|
20
|
+
|
|
21
|
+
if [[ "${1:-}" == "--clean" ]]; then
|
|
22
|
+
rm -f "${CLI_DIR}/Tiltfile"
|
|
23
|
+
for d in "${DIRS[@]}"; do
|
|
24
|
+
rm -rf "${CLI_DIR}/${d}"
|
|
25
|
+
done
|
|
26
|
+
echo "Cleaned staged engine files from cli/"
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
cp "${ROOT_DIR}/Tiltfile" "${CLI_DIR}/Tiltfile"
|
|
31
|
+
for d in "${DIRS[@]}"; do
|
|
32
|
+
rm -rf "${CLI_DIR}/${d}"
|
|
33
|
+
cp -R "${ROOT_DIR}/${d}" "${CLI_DIR}/${d}"
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
echo "Staged Tiltfile, ${DIRS[*]} into cli/ for npm publish"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# Fix Bun hoisted package symlinks that can break when copied across Docker stages.
|
|
5
|
+
for pkg in node_modules/.bun/*/node_modules/*; do
|
|
6
|
+
[ -d "$pkg" ] || continue
|
|
7
|
+
name=$(basename "$pkg")
|
|
8
|
+
case "$name" in
|
|
9
|
+
@*) continue ;;
|
|
10
|
+
esac
|
|
11
|
+
ln -sfn "$(pwd)/$pkg" "node_modules/$name"
|
|
12
|
+
done
|
|
13
|
+
|
|
14
|
+
for pkg in node_modules/.bun/*/node_modules/@*/*; do
|
|
15
|
+
[ -d "$pkg" ] || continue
|
|
16
|
+
scope=$(basename "$(dirname "$pkg")")
|
|
17
|
+
name=$(basename "$pkg")
|
|
18
|
+
if [ "$scope" = "@prisma" ] && [ "$name" = "engines" ]; then
|
|
19
|
+
continue
|
|
20
|
+
fi
|
|
21
|
+
mkdir -p "node_modules/$scope"
|
|
22
|
+
ln -sfn "$(pwd)/$pkg" "node_modules/$scope/$name"
|
|
23
|
+
done
|