@tdk-landscape/tdk-cli-core 1.3.53 → 1.3.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/cli/dist/commands/doctor.js +21 -3
- package/cli/dist/commands/upgrade.js +7 -7
- package/cli/dist/generator/extension-fetch.js +16 -9
- package/cli/dist/utils/spinner.js +39 -0
- package/cli/package.json +1 -2
- package/package.json +16 -2
- package/.claude/skills/layer-autoresearch/SKILL.md +0 -48
- package/.claude/skills/tdk-troubleshoot/SKILL.md +0 -222
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -40
- package/.github/ISSUE_TEMPLATE/config.yml +0 -11
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -18
- package/.github/ISSUE_TEMPLATE/premium_license.yml +0 -43
- package/.github/dependabot.yml +0 -33
- package/.github/pull_request_template.md +0 -5
- package/.github/workflows/ci.yml +0 -200
- package/.github/workflows/release-binaries.yml +0 -139
- package/.github/zizmor.yml +0 -9
- package/.pre-commit-config.yaml +0 -57
- package/CODE_OF_CONDUCT.md +0 -9
- package/CONTRIBUTING.md +0 -42
- package/Makefile +0 -92
- package/SECURITY.md +0 -17
- package/benchmarks/results/container-scale-2026-09-25T20-54-49-736Z.json +0 -45
- package/benchmarks/results/container-scale-2026-09-25T21-01-20-540Z.json +0 -150
- package/benchmarks/results/container-scale-2026-09-25T21-15-01-441Z.json +0 -73
- package/benchmarks/results/container-scale-2026-09-25T22-09-01-630Z.json +0 -77
- package/benchmarks/results/container-scale-2026-09-25T22-18-28-371Z.json +0 -202
- package/cli/AGENTS.md +0 -390
- package/cli/DESIGN.md +0 -735
- package/cli/README.md +0 -292
- package/cli/biome.json +0 -40
- package/cli/dependency-graph.svg +0 -1135
- package/cli/dist/cli.d.ts +0 -3
- package/cli/dist/cli.d.ts.map +0 -1
- package/cli/dist/cli.js.map +0 -1
- package/cli/dist/commands/completion.d.ts +0 -3
- package/cli/dist/commands/completion.d.ts.map +0 -1
- package/cli/dist/commands/completion.js.map +0 -1
- package/cli/dist/commands/config.d.ts +0 -3
- package/cli/dist/commands/config.d.ts.map +0 -1
- package/cli/dist/commands/config.js.map +0 -1
- package/cli/dist/commands/doctor.d.ts +0 -19
- package/cli/dist/commands/doctor.d.ts.map +0 -1
- package/cli/dist/commands/doctor.js.map +0 -1
- package/cli/dist/commands/down.d.ts +0 -3
- package/cli/dist/commands/down.d.ts.map +0 -1
- package/cli/dist/commands/down.js.map +0 -1
- package/cli/dist/commands/help.d.ts +0 -2
- package/cli/dist/commands/help.d.ts.map +0 -1
- package/cli/dist/commands/help.js.map +0 -1
- package/cli/dist/commands/networks.d.ts +0 -3
- package/cli/dist/commands/networks.d.ts.map +0 -1
- package/cli/dist/commands/networks.js.map +0 -1
- package/cli/dist/commands/project.d.ts +0 -9
- package/cli/dist/commands/project.d.ts.map +0 -1
- package/cli/dist/commands/project.js.map +0 -1
- package/cli/dist/commands/projects.d.ts +0 -3
- package/cli/dist/commands/projects.d.ts.map +0 -1
- package/cli/dist/commands/projects.js.map +0 -1
- package/cli/dist/commands/resource.d.ts +0 -69
- package/cli/dist/commands/resource.d.ts.map +0 -1
- package/cli/dist/commands/resource.js.map +0 -1
- package/cli/dist/commands/resources.d.ts +0 -3
- package/cli/dist/commands/resources.d.ts.map +0 -1
- package/cli/dist/commands/resources.js.map +0 -1
- package/cli/dist/commands/stack.d.ts +0 -3
- package/cli/dist/commands/stack.d.ts.map +0 -1
- package/cli/dist/commands/stack.js.map +0 -1
- package/cli/dist/commands/stacks.d.ts +0 -3
- package/cli/dist/commands/stacks.d.ts.map +0 -1
- package/cli/dist/commands/stacks.js.map +0 -1
- package/cli/dist/commands/status.d.ts +0 -3
- package/cli/dist/commands/status.d.ts.map +0 -1
- package/cli/dist/commands/status.js.map +0 -1
- package/cli/dist/commands/ui.d.ts +0 -3
- package/cli/dist/commands/ui.d.ts.map +0 -1
- package/cli/dist/commands/ui.js.map +0 -1
- package/cli/dist/commands/up.d.ts +0 -3
- package/cli/dist/commands/up.d.ts.map +0 -1
- package/cli/dist/commands/up.js.map +0 -1
- package/cli/dist/commands/upgrade.d.ts +0 -14
- package/cli/dist/commands/upgrade.d.ts.map +0 -1
- package/cli/dist/commands/upgrade.js.map +0 -1
- package/cli/dist/commands/version.d.ts +0 -3
- package/cli/dist/commands/version.d.ts.map +0 -1
- package/cli/dist/commands/version.js.map +0 -1
- package/cli/dist/components/Accessible.d.ts +0 -8
- package/cli/dist/components/Accessible.d.ts.map +0 -1
- package/cli/dist/components/Accessible.js.map +0 -1
- package/cli/dist/components/BaseTooltip.d.ts +0 -4
- package/cli/dist/components/BaseTooltip.d.ts.map +0 -1
- package/cli/dist/components/BaseTooltip.js.map +0 -1
- package/cli/dist/components/DetailPanel.d.ts +0 -4
- package/cli/dist/components/DetailPanel.d.ts.map +0 -1
- package/cli/dist/components/DetailPanel.js.map +0 -1
- package/cli/dist/components/FileTree.d.ts +0 -4
- package/cli/dist/components/FileTree.d.ts.map +0 -1
- package/cli/dist/components/FileTree.js.map +0 -1
- package/cli/dist/components/ResourceSelectInput.d.ts +0 -4
- package/cli/dist/components/ResourceSelectInput.d.ts.map +0 -1
- package/cli/dist/components/ResourceSelectInput.js.map +0 -1
- package/cli/dist/components/ResourceTable.d.ts +0 -4
- package/cli/dist/components/ResourceTable.d.ts.map +0 -1
- package/cli/dist/components/ResourceTable.js.map +0 -1
- package/cli/dist/components/TabBar.d.ts +0 -4
- package/cli/dist/components/TabBar.d.ts.map +0 -1
- package/cli/dist/components/TabBar.js.map +0 -1
- package/cli/dist/components/Tooltip.d.ts +0 -12
- package/cli/dist/components/Tooltip.d.ts.map +0 -1
- package/cli/dist/components/Tooltip.js.map +0 -1
- package/cli/dist/components/index.d.ts +0 -8
- package/cli/dist/components/index.d.ts.map +0 -1
- package/cli/dist/components/index.js.map +0 -1
- package/cli/dist/config/platform-standards.d.ts +0 -159
- package/cli/dist/config/platform-standards.d.ts.map +0 -1
- package/cli/dist/config/platform-standards.js.map +0 -1
- package/cli/dist/generator/extension-fetch.d.ts +0 -25
- package/cli/dist/generator/extension-fetch.d.ts.map +0 -1
- package/cli/dist/generator/extension-fetch.js.map +0 -1
- package/cli/dist/generator/template-engine.d.ts +0 -62
- package/cli/dist/generator/template-engine.d.ts.map +0 -1
- package/cli/dist/generator/template-engine.js.map +0 -1
- package/cli/dist/index.d.ts +0 -11
- package/cli/dist/index.d.ts.map +0 -1
- package/cli/dist/index.js.map +0 -1
- package/cli/dist/types/index.d.ts +0 -257
- package/cli/dist/types/index.d.ts.map +0 -1
- package/cli/dist/types/index.js.map +0 -1
- package/cli/dist/utils/cache.d.ts +0 -19
- package/cli/dist/utils/cache.d.ts.map +0 -1
- package/cli/dist/utils/cache.js.map +0 -1
- package/cli/dist/utils/command-helpers.d.ts +0 -17
- package/cli/dist/utils/command-helpers.d.ts.map +0 -1
- package/cli/dist/utils/command-helpers.js.map +0 -1
- package/cli/dist/utils/constants.d.ts +0 -53
- package/cli/dist/utils/constants.d.ts.map +0 -1
- package/cli/dist/utils/constants.js.map +0 -1
- package/cli/dist/utils/discovery-context.d.ts +0 -4
- package/cli/dist/utils/discovery-context.d.ts.map +0 -1
- package/cli/dist/utils/discovery-context.js.map +0 -1
- package/cli/dist/utils/docker.d.ts +0 -4
- package/cli/dist/utils/docker.d.ts.map +0 -1
- package/cli/dist/utils/docker.js.map +0 -1
- package/cli/dist/utils/doctor-runtime.d.ts +0 -81
- package/cli/dist/utils/doctor-runtime.d.ts.map +0 -1
- package/cli/dist/utils/doctor-runtime.js.map +0 -1
- package/cli/dist/utils/env-validator.d.ts +0 -15
- package/cli/dist/utils/env-validator.d.ts.map +0 -1
- package/cli/dist/utils/env-validator.js.map +0 -1
- package/cli/dist/utils/errors.d.ts +0 -31
- package/cli/dist/utils/errors.d.ts.map +0 -1
- package/cli/dist/utils/errors.js.map +0 -1
- package/cli/dist/utils/file-helpers.d.ts +0 -14
- package/cli/dist/utils/file-helpers.d.ts.map +0 -1
- package/cli/dist/utils/file-helpers.js.map +0 -1
- package/cli/dist/utils/formatting.d.ts +0 -30
- package/cli/dist/utils/formatting.d.ts.map +0 -1
- package/cli/dist/utils/formatting.js.map +0 -1
- package/cli/dist/utils/paths.d.ts +0 -3
- package/cli/dist/utils/paths.d.ts.map +0 -1
- package/cli/dist/utils/paths.js.map +0 -1
- package/cli/dist/utils/port-assignment.d.ts +0 -6
- package/cli/dist/utils/port-assignment.d.ts.map +0 -1
- package/cli/dist/utils/port-assignment.js.map +0 -1
- package/cli/dist/utils/project-features.d.ts +0 -23
- package/cli/dist/utils/project-features.d.ts.map +0 -1
- package/cli/dist/utils/project-features.js.map +0 -1
- package/cli/dist/utils/project-templates.d.ts +0 -7
- package/cli/dist/utils/project-templates.d.ts.map +0 -1
- package/cli/dist/utils/project-templates.js.map +0 -1
- package/cli/dist/utils/prompt.d.ts +0 -28
- package/cli/dist/utils/prompt.d.ts.map +0 -1
- package/cli/dist/utils/prompt.js.map +0 -1
- package/cli/dist/utils/resource-features.d.ts +0 -29
- package/cli/dist/utils/resource-features.d.ts.map +0 -1
- package/cli/dist/utils/resource-features.js.map +0 -1
- package/cli/dist/utils/service-urls.d.ts +0 -30
- package/cli/dist/utils/service-urls.d.ts.map +0 -1
- package/cli/dist/utils/service-urls.js.map +0 -1
- package/cli/dist/utils/services.d.ts +0 -18
- package/cli/dist/utils/services.d.ts.map +0 -1
- package/cli/dist/utils/services.js.map +0 -1
- package/cli/dist/utils/stack-features.d.ts +0 -22
- package/cli/dist/utils/stack-features.d.ts.map +0 -1
- package/cli/dist/utils/stack-features.js.map +0 -1
- package/cli/dist/utils/tar.d.ts +0 -7
- package/cli/dist/utils/tar.d.ts.map +0 -1
- package/cli/dist/utils/tar.js.map +0 -1
- package/cli/dist/utils/tilt.d.ts +0 -20
- package/cli/dist/utils/tilt.d.ts.map +0 -1
- package/cli/dist/utils/tilt.js.map +0 -1
- package/cli/dist/utils/validation.d.ts +0 -16
- package/cli/dist/utils/validation.d.ts.map +0 -1
- package/cli/dist/utils/validation.js.map +0 -1
- package/cli/knip.json +0 -6
- package/cli/pnpm-lock.yaml +0 -2305
- package/cli/pnpm-workspace.yaml +0 -2
- package/cli/src/cli.ts +0 -72
- package/cli/src/commands/__tests__/always-enabled-infra.test.ts +0 -109
- package/cli/src/commands/__tests__/config.test.ts +0 -146
- package/cli/src/commands/__tests__/doctor.test.ts +0 -730
- package/cli/src/commands/__tests__/error-handling.test.ts +0 -78
- package/cli/src/commands/__tests__/phases-model.test.ts +0 -161
- package/cli/src/commands/__tests__/project-resource-features-e2e.test.ts +0 -187
- package/cli/src/commands/__tests__/project.test.ts +0 -68
- package/cli/src/commands/__tests__/resource.test.ts +0 -226
- package/cli/src/commands/__tests__/saas-starter-integration.test.ts +0 -194
- package/cli/src/commands/__tests__/stack-features-e2e.test.ts +0 -135
- package/cli/src/commands/__tests__/upgrade.test.ts +0 -198
- package/cli/src/commands/completion.ts +0 -300
- package/cli/src/commands/config.ts +0 -299
- package/cli/src/commands/doctor.ts +0 -926
- package/cli/src/commands/down.ts +0 -37
- package/cli/src/commands/help.ts +0 -143
- package/cli/src/commands/networks-design.md +0 -80
- package/cli/src/commands/networks.ts +0 -332
- package/cli/src/commands/project.ts +0 -456
- package/cli/src/commands/projects.ts +0 -82
- package/cli/src/commands/resource.ts +0 -652
- package/cli/src/commands/resources.ts +0 -95
- package/cli/src/commands/stack.ts +0 -128
- package/cli/src/commands/stacks.ts +0 -52
- package/cli/src/commands/status.ts +0 -88
- package/cli/src/commands/ui.tsx +0 -843
- package/cli/src/commands/up.ts +0 -169
- package/cli/src/commands/upgrade.ts +0 -628
- package/cli/src/commands/version.ts +0 -9
- package/cli/src/components/Accessible.tsx +0 -21
- package/cli/src/components/BaseTooltip.tsx +0 -66
- package/cli/src/components/DetailPanel.tsx +0 -146
- package/cli/src/components/FileTree.tsx +0 -89
- package/cli/src/components/ResourceSelectInput.tsx +0 -30
- package/cli/src/components/ResourceTable.tsx +0 -78
- package/cli/src/components/TabBar.tsx +0 -53
- package/cli/src/components/Tooltip.tsx +0 -11
- package/cli/src/components/index.ts +0 -7
- package/cli/src/config/platform-standards.test.ts +0 -11
- package/cli/src/config/platform-standards.ts +0 -196
- package/cli/src/generator/__tests__/extension-fetch.test.ts +0 -242
- package/cli/src/generator/__tests__/template-engine.test.ts +0 -70
- package/cli/src/generator/extension-fetch.ts +0 -286
- package/cli/src/generator/template-engine.ts +0 -752
- package/cli/src/index.ts +0 -86
- package/cli/src/templates.d.ts +0 -4
- package/cli/src/types/index.ts +0 -353
- package/cli/src/utils/__tests__/cache.test.ts +0 -98
- package/cli/src/utils/__tests__/formatting.test.ts +0 -170
- package/cli/src/utils/__tests__/paths.test.ts +0 -180
- package/cli/src/utils/__tests__/port-assignment.test.ts +0 -121
- package/cli/src/utils/__tests__/service-urls.test.ts +0 -174
- package/cli/src/utils/__tests__/services.test.ts +0 -531
- package/cli/src/utils/__tests__/tilt.test.ts +0 -172
- package/cli/src/utils/__tests__/validation.test.ts +0 -148
- package/cli/src/utils/cache.ts +0 -76
- package/cli/src/utils/command-helpers.ts +0 -54
- package/cli/src/utils/constants.ts +0 -130
- package/cli/src/utils/discovery-context.ts +0 -49
- package/cli/src/utils/docker.ts +0 -20
- package/cli/src/utils/doctor-runtime.ts +0 -644
- package/cli/src/utils/env-validator.ts +0 -139
- package/cli/src/utils/errors.ts +0 -168
- package/cli/src/utils/file-helpers.ts +0 -62
- package/cli/src/utils/formatting.ts +0 -215
- package/cli/src/utils/paths.ts +0 -53
- package/cli/src/utils/port-assignment.ts +0 -106
- package/cli/src/utils/project-features.ts +0 -118
- package/cli/src/utils/project-templates.ts +0 -29
- package/cli/src/utils/prompt.ts +0 -128
- package/cli/src/utils/resource-features.ts +0 -215
- package/cli/src/utils/service-urls.ts +0 -124
- package/cli/src/utils/services.ts +0 -364
- package/cli/src/utils/stack-features.ts +0 -30
- package/cli/src/utils/tar.ts +0 -24
- package/cli/src/utils/tilt.ts +0 -133
- package/cli/src/utils/validation.ts +0 -67
- package/cli/tsconfig.json +0 -25
- package/cli/tsconfig.typecheck.json +0 -8
- package/docs/FEATURES.md +0 -281
- package/docs/demo.svg +0 -217
- package/engine/docs/AUTODISCOVERY_TEST.md +0 -182
- package/engine/docs/C4-ARCHITECTURE-operations.md +0 -396
- package/engine/docs/C4-ARCHITECTURE-overview.md +0 -284
- package/engine/docs/C4-ARCHITECTURE.md +0 -17
- package/engine/docs/GOLDEN_IMAGE_INTEGRATION.md +0 -349
- package/engine/docs/MANIFEST_DRIVEN_ARCHITECTURE.md +0 -357
- package/engine/docs/README.md +0 -284
- package/install.sh +0 -19
- package/knip.json +0 -10
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/.openspec.yaml +0 -2
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/design.md +0 -102
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/proposal.md +0 -31
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-notifications/spec.md +0 -48
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-orchestration/spec.md +0 -63
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-troubleshooting/spec.md +0 -56
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/tasks.md +0 -61
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/design.md +0 -114
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/proposal.md +0 -32
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/manifest-field-migration/spec.md +0 -20
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/resource-terminology-standard/spec.md +0 -20
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/stack-terminology-standard/spec.md +0 -20
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/tasks.md +0 -194
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/design.md +0 -111
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/proposal.md +0 -33
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/function-naming-alignment/spec.md +0 -12
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/optional-parameter-patterns/spec.md +0 -18
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-documentation/spec.md +0 -16
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-naming-consistency/spec.md +0 -12
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-ordering-standard/spec.md +0 -12
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/tasks.md +0 -194
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/design.md +0 -84
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/proposal.md +0 -31
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/codebase-audit/spec.md +0 -27
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/dead-code-cleanup/spec.md +0 -27
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/test-gap-fill/spec.md +0 -23
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/todo-resolution/spec.md +0 -27
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/tasks.md +0 -39
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/design.md +0 -80
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/proposal.md +0 -40
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/spec.md +0 -52
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/tasks.md +0 -51
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/design.md +0 -43
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/proposal.md +0 -29
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/specs/self-contained-generated-projects/spec.md +0 -67
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/tasks.md +0 -27
- package/openspec/changes/optimize-runtime-docker-layers/.openspec.yaml +0 -3
- package/openspec/changes/optimize-runtime-docker-layers/design.md +0 -81
- package/openspec/changes/optimize-runtime-docker-layers/proposal.md +0 -44
- package/openspec/changes/optimize-runtime-docker-layers/specs/runtime-container-footprint/spec.md +0 -79
- package/openspec/changes/optimize-runtime-docker-layers/tasks.md +0 -36
- package/openspec/changes/prioritized-cold-start/.openspec.yaml +0 -4
- package/openspec/changes/prioritized-cold-start/design.md +0 -137
- package/openspec/changes/prioritized-cold-start/proposal.md +0 -41
- package/openspec/changes/prioritized-cold-start/specs/on-demand-resource-startup/spec.md +0 -98
- package/openspec/changes/prioritized-cold-start/tasks.md +0 -69
- package/openspec/config.yaml +0 -1
- package/openspec/specs/manifest-field-migration/spec.md +0 -24
- package/openspec/specs/resource-terminology-standard/spec.md +0 -24
- package/openspec/specs/self-contained-generated-projects/spec.md +0 -67
- package/openspec/specs/stack-terminology-standard/spec.md +0 -24
- package/platform/services/platform/proxy/service.yaml +0 -14
- package/scripts/audit-codebase.sh +0 -213
- package/scripts/autoresearch/layer-eval.sh +0 -65
- package/scripts/benchmark/README.md +0 -25
- package/scripts/benchmark/container-scale.ts +0 -503
- package/scripts/benchmark/pre-release-gate.sh +0 -9
- package/scripts/install-git-hooks.sh +0 -14
- package/scripts/measure-idle-footprint.sh +0 -58
- package/scripts/record-demo.sh +0 -43
- package/scripts/release-binaries.sh +0 -97
- package/scripts/setup-pre-commit.sh +0 -33
- package/scripts/stage-npm-engine.sh +0 -36
- package/tests/tilt-engine/__init__.py +0 -5
- package/tests/tilt-engine/conftest.py +0 -182
- package/tests/tilt-engine/fixtures/appointment-frontend-service.json +0 -11
- package/tests/tilt-engine/fixtures/identity-backend-service.json +0 -12
- package/tests/tilt-engine/fixtures/invalid-service.json +0 -4
- package/tests/tilt-engine/test_agents_md_generator.py +0 -341
- package/tests/tilt-engine/test_agents_md_integration.py +0 -378
- package/tests/tilt-engine/test_cache_operations.py +0 -181
- package/tests/tilt-engine/test_cache_persistence.py +0 -142
- package/tests/tilt-engine/test_code_executor.py +0 -152
- package/tests/tilt-engine/test_code_viewer.py +0 -127
- package/tests/tilt-engine/test_compose_port_anchors.py +0 -310
- package/tests/tilt-engine/test_config_inspector.py +0 -162
- package/tests/tilt-engine/test_daemon_focus_mode.py +0 -89
- package/tests/tilt-engine/test_daemon_polling.py +0 -122
- package/tests/tilt-engine/test_daemon_registration.py +0 -115
- package/tests/tilt-engine/test_daemon_validation.py +0 -107
- package/tests/tilt-engine/test_docker_generator_bugs.py +0 -493
- package/tests/tilt-engine/test_docker_prune.py +0 -119
- package/tests/tilt-engine/test_dockerignore_path_bug.py +0 -82
- package/tests/tilt-engine/test_file_browser.py +0 -193
- package/tests/tilt-engine/test_frontend_basepath_manifest.py +0 -27
- package/tests/tilt-engine/test_health_dependencies.py +0 -130
- package/tests/tilt-engine/test_health_endpoints.py +0 -118
- package/tests/tilt-engine/test_health_tilt_ui.py +0 -85
- package/tests/tilt-engine/test_runtime_container_footprint.py +0 -162
- package/tests/tilt-engine/test_sablier_defer_start.py +0 -237
- package/tests/tilt-engine/test_safety_aliases.py +0 -84
- package/tests/tilt-engine/test_snapshot_diff.py +0 -136
- package/tests/tilt-engine/test_snapshot_persistence.py +0 -163
- package/tests/tilt-engine/test_snapshot_scanning.py +0 -123
- package/tests/tilt-engine/test_standalone_project_boot.py +0 -61
- package/tests/tilt-engine/test_standalone_traefik.py +0 -160
- package/tests/tilt-engine/test_traefik_static_wake_route.py +0 -187
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Checks an idle generated backend container against the runtime footprint budget
|
|
3
|
-
# (openspec: runtime-container-footprint): one Bun process, <= 64 MiB, < 2% CPU.
|
|
4
|
-
#
|
|
5
|
-
# Usage: scripts/measure-idle-footprint.sh <container> [sample_seconds]
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
container="${1:?usage: $0 <container> [sample_seconds]}"
|
|
9
|
-
sample_seconds="${2:-60}"
|
|
10
|
-
max_mem_mib="${MAX_MEM_MIB:-64}"
|
|
11
|
-
max_cpu_pct="${MAX_CPU_PCT:-2}"
|
|
12
|
-
|
|
13
|
-
echo "Waiting for ${container} to be healthy..."
|
|
14
|
-
for _ in $(seq 1 90); do
|
|
15
|
-
health="$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}}' "$container")"
|
|
16
|
-
[ "$health" = "healthy" ] || [ "$health" = "none" ] && break
|
|
17
|
-
sleep 2
|
|
18
|
-
done
|
|
19
|
-
if [ "$health" != "healthy" ] && [ "$health" != "none" ]; then
|
|
20
|
-
echo "FAIL: ${container} is ${health}, not healthy" >&2
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
bun_processes="$(docker top "$container" -o args | tail -n +2 | grep -c '^bun ' || true)"
|
|
25
|
-
echo "Bun processes: ${bun_processes}"
|
|
26
|
-
docker top "$container" -o pid,rss,args | sed 's/^/ /'
|
|
27
|
-
|
|
28
|
-
to_mib() {
|
|
29
|
-
awk -v v="$1" 'BEGIN {
|
|
30
|
-
n = v + 0
|
|
31
|
-
if (v ~ /GiB$/) n *= 1024
|
|
32
|
-
else if (v ~ /KiB$/) n /= 1024
|
|
33
|
-
else if (v ~ /[0-9]B$/) n /= 1048576
|
|
34
|
-
printf "%.2f", n
|
|
35
|
-
}'
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
samples=0 cpu_total=0 mem_peak=0
|
|
39
|
-
end=$((SECONDS + sample_seconds))
|
|
40
|
-
while [ "$SECONDS" -lt "$end" ]; do
|
|
41
|
-
line="$(docker stats --no-stream --format '{{.CPUPerc}} {{.MemUsage}}' "$container")"
|
|
42
|
-
cpu="${line%%\%*}"
|
|
43
|
-
mem="$(to_mib "$(echo "$line" | awk '{print $2}')")"
|
|
44
|
-
cpu_total="$(awk -v a="$cpu_total" -v b="$cpu" 'BEGIN { printf "%.4f", a + b }')"
|
|
45
|
-
mem_peak="$(awk -v a="$mem_peak" -v b="$mem" 'BEGIN { print (b > a ? b : a) }')"
|
|
46
|
-
samples=$((samples + 1))
|
|
47
|
-
sleep 5
|
|
48
|
-
done
|
|
49
|
-
cpu_avg="$(awk -v t="$cpu_total" -v n="$samples" 'BEGIN { printf "%.2f", t / n }')"
|
|
50
|
-
|
|
51
|
-
echo "Samples: ${samples} over ${sample_seconds}s | peak memory: ${mem_peak} MiB (max ${max_mem_mib}) | avg CPU: ${cpu_avg}% (max <${max_cpu_pct}%)"
|
|
52
|
-
|
|
53
|
-
failed=0
|
|
54
|
-
[ "$bun_processes" -eq 1 ] || { echo "FAIL: expected 1 Bun process, found ${bun_processes}" >&2; failed=1; }
|
|
55
|
-
awk -v m="$mem_peak" -v max="$max_mem_mib" 'BEGIN { exit !(m <= max) }' || { echo "FAIL: memory over budget" >&2; failed=1; }
|
|
56
|
-
awk -v c="$cpu_avg" -v max="$max_cpu_pct" 'BEGIN { exit !(c < max) }' || { echo "FAIL: CPU over budget" >&2; failed=1; }
|
|
57
|
-
[ "$failed" -eq 0 ] && echo "PASS: ${container} is within the idle footprint budget"
|
|
58
|
-
exit "$failed"
|
package/scripts/record-demo.sh
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Re-record docs/demo.svg, the animated terminal demo shown in README.md.
|
|
3
|
-
#
|
|
4
|
-
# Needs `tdk` on PATH and termtosvg (pip install termtosvg). Run from the
|
|
5
|
-
# repo root: scripts/record-demo.sh
|
|
6
|
-
# The demo runs real tdk commands in a temporary folder that is shown as
|
|
7
|
-
# ~/my-shop. `tdk up` is only mentioned, because it needs Docker and Tilt.
|
|
8
|
-
set -euo pipefail
|
|
9
|
-
|
|
10
|
-
if [[ "${1:-}" != "--play" ]]; then
|
|
11
|
-
cast="$(mktemp -d)/demo.cast"
|
|
12
|
-
# `script` gives termtosvg a real terminal even when run from CI or an IDE.
|
|
13
|
-
script -qec "termtosvg record '$cast' -c '$0 --play' -g 92x30" /dev/null >/dev/null
|
|
14
|
-
termtosvg render "$cast" docs/demo.svg -t window_frame -M 3000
|
|
15
|
-
exit 0
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
export FORCE_COLOR=1
|
|
19
|
-
dir="$(mktemp -d)/my-shop"
|
|
20
|
-
mkdir -p "$dir" && cd "$dir"
|
|
21
|
-
|
|
22
|
-
tidy() { sed -u "s#$dir#~/my-shop#g"; }
|
|
23
|
-
type_cmd() {
|
|
24
|
-
printf '\033[35m~/my-shop $\033[0m '
|
|
25
|
-
for ((i = 0; i < ${#1}; i++)); do printf '%s' "${1:$i:1}"; sleep 0.035; done
|
|
26
|
-
sleep 0.5; printf '\n'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
clear; sleep 0.5
|
|
30
|
-
type_cmd "tdk project --yes"
|
|
31
|
-
tdk project --yes 2>&1 | tidy | grep --line-buffered -E "Initializing|✓ Created: .tdk/project|Generated: .tdk/.tdk-out/Tiltfile|docker-compose|✅"
|
|
32
|
-
sleep 1.8
|
|
33
|
-
type_cmd "tdk resource orders-api --type backend --stack shop"
|
|
34
|
-
printf 'y\n' | tdk resource orders-api --type backend --stack shop 2>&1 | tidy | grep --line-buffered -E "Port:|Path:|Dockerfile|backend source|test file|✅"
|
|
35
|
-
sleep 1.8
|
|
36
|
-
type_cmd "tdk resource shop-web --type frontend --stack shop"
|
|
37
|
-
printf 'y\n' | tdk resource shop-web --type frontend --stack shop 2>&1 | tidy | grep --line-buffered -E "Port:|Path:|✅"
|
|
38
|
-
sleep 1.8
|
|
39
|
-
type_cmd "tdk stacks --services"
|
|
40
|
-
tdk stacks --services 2>&1 | tidy | grep -v '^\s*$'
|
|
41
|
-
sleep 1.2
|
|
42
|
-
printf '\n\033[2m# next: tdk up shop (Tilt builds, runs and hot-reloads the whole stack)\033[0m\n'
|
|
43
|
-
sleep 4
|
|
@@ -1,97 +0,0 @@
|
|
|
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
|
-
# Fixed filename (no version/tag in the name) so install.sh can always
|
|
49
|
-
# find it via the stable /releases/latest/download/ URL, unlike the zip
|
|
50
|
-
# below whose name embeds the tag and changes every release.
|
|
51
|
-
tar -czf tdk-cli-engine.tar.gz tdk-cli
|
|
52
|
-
# install.sh and `tdk upgrade` verify the binary and the engine tarball
|
|
53
|
-
# against this file before installing them.
|
|
54
|
-
shasum -a 256 tdk-linux-amd64 tdk-linux-arm64 tdk-darwin-amd64 tdk-darwin-arm64 \
|
|
55
|
-
tdk-cli-engine.tar.gz > checksums.txt
|
|
56
|
-
zip -qr "tdk-cli-${RELEASE_TAG}-binaries.zip" \
|
|
57
|
-
tdk-linux-amd64 tdk-linux-arm64 tdk-darwin-amd64 tdk-darwin-arm64 \
|
|
58
|
-
tdk-cli checksums.txt
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
echo "Built release assets in ${RELEASE_DIR}"
|
|
62
|
-
|
|
63
|
-
if [[ "${PUBLISH}" != "--publish" ]]; then
|
|
64
|
-
exit 0
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
if ! command -v gh >/dev/null 2>&1; then
|
|
68
|
-
echo "gh is required to publish release binaries" >&2
|
|
69
|
-
exit 1
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
# Upload actual files only - tdk-cli/ is a directory (the bundled engine),
|
|
73
|
-
# already packed inside the zip, and `gh release upload` can't take a
|
|
74
|
-
# directory as an asset.
|
|
75
|
-
readonly ASSETS=(
|
|
76
|
-
"${RELEASE_DIR}/tdk-linux-amd64"
|
|
77
|
-
"${RELEASE_DIR}/tdk-linux-arm64"
|
|
78
|
-
"${RELEASE_DIR}/tdk-darwin-amd64"
|
|
79
|
-
"${RELEASE_DIR}/tdk-darwin-arm64"
|
|
80
|
-
"${RELEASE_DIR}/checksums.txt"
|
|
81
|
-
"${RELEASE_DIR}/tdk-cli-${RELEASE_TAG}-binaries.zip"
|
|
82
|
-
"${RELEASE_DIR}/tdk-cli-engine.tar.gz"
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
# Never mark a release latest until every asset is uploaded. `gh release create
|
|
86
|
-
# --latest FILE...` publishes the tag first, then uploads binaries, so
|
|
87
|
-
# /releases/latest/download/tdk-* 404s for a few minutes (install.sh hits this).
|
|
88
|
-
if gh release view "${RELEASE_TAG}" --repo "${RELEASE_REPOSITORY}" >/dev/null 2>&1; then
|
|
89
|
-
gh release upload "${RELEASE_TAG}" --repo "${RELEASE_REPOSITORY}" --clobber "${ASSETS[@]}"
|
|
90
|
-
else
|
|
91
|
-
gh release create "${RELEASE_TAG}" \
|
|
92
|
-
--repo "${RELEASE_REPOSITORY}" \
|
|
93
|
-
--title "TDK CLI ${RELEASE_TAG#v}" \
|
|
94
|
-
--draft \
|
|
95
|
-
"${ASSETS[@]}"
|
|
96
|
-
fi
|
|
97
|
-
gh release edit "${RELEASE_TAG}" --repo "${RELEASE_REPOSITORY}" --draft=false --latest
|
|
@@ -1,33 +0,0 @@
|
|
|
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"
|
|
@@ -1,36 +0,0 @@
|
|
|
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"
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Pytest configuration and shared fixtures for tilt-engine tests.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import json
|
|
6
|
-
import os
|
|
7
|
-
import pytest
|
|
8
|
-
import tempfile
|
|
9
|
-
import shutil
|
|
10
|
-
from pathlib import Path
|
|
11
|
-
from typing import Generator
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@pytest.fixture
|
|
15
|
-
def temp_dir() -> Generator[Path, None, None]:
|
|
16
|
-
"""Create a temporary directory for testing."""
|
|
17
|
-
with tempfile.TemporaryDirectory() as tmp_dir:
|
|
18
|
-
yield Path(tmp_dir)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@pytest.fixture
|
|
22
|
-
def mock_resources_dir(temp_dir: Path) -> Path:
|
|
23
|
-
"""Create a mock resources directory structure with sample service.json files."""
|
|
24
|
-
resources_dir = temp_dir / "services" / "product"
|
|
25
|
-
resources_dir.mkdir(parents=True)
|
|
26
|
-
|
|
27
|
-
# Create test resources
|
|
28
|
-
for stack in ["identity", "order"]:
|
|
29
|
-
stack_dir = resources_dir / stack
|
|
30
|
-
for resource in [f"{stack}-backend", f"{stack}-frontend"]:
|
|
31
|
-
resource_dir = stack_dir / resource
|
|
32
|
-
resource_dir.mkdir(parents=True)
|
|
33
|
-
resource_file = resource_dir / "service.json"
|
|
34
|
-
resource_file.write_text(json.dumps({
|
|
35
|
-
"name": resource,
|
|
36
|
-
"type": "backend" if "backend" in resource else "frontend",
|
|
37
|
-
"stack": stack,
|
|
38
|
-
"port": 4001 if "backend" in resource else 3001,
|
|
39
|
-
"path": str(resource_dir.relative_to(temp_dir))
|
|
40
|
-
}, indent=2))
|
|
41
|
-
|
|
42
|
-
return resources_dir
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
@pytest.fixture
|
|
46
|
-
def mock_resource_json() -> dict:
|
|
47
|
-
"""Return a sample valid service.json structure."""
|
|
48
|
-
return {
|
|
49
|
-
"name": "test-resource",
|
|
50
|
-
"appType": "backend",
|
|
51
|
-
"stack": "test",
|
|
52
|
-
"port": 4000,
|
|
53
|
-
"path": "services/product/test/test-resource",
|
|
54
|
-
"features": ["prisma", "nats"],
|
|
55
|
-
"replicas": 1
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
@pytest.fixture
|
|
60
|
-
def mock_invalid_resource_json() -> dict:
|
|
61
|
-
"""Return an invalid service.json (missing required fields)."""
|
|
62
|
-
return {
|
|
63
|
-
"appType": "backend",
|
|
64
|
-
# Missing: name, stack, port, path
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
@pytest.fixture
|
|
69
|
-
def sample_snapshot() -> dict:
|
|
70
|
-
"""Return a sample snapshot structure."""
|
|
71
|
-
return {
|
|
72
|
-
"timestamp": "2024-01-15T10:30:00Z",
|
|
73
|
-
"resources": [
|
|
74
|
-
"services/product/identity/identity-backend/service.json",
|
|
75
|
-
"services/product/identity/identity-frontend/service.json",
|
|
76
|
-
],
|
|
77
|
-
"count": 2,
|
|
78
|
-
"hash": "abc123def456"
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
@pytest.fixture
|
|
83
|
-
def mock_health_response() -> dict:
|
|
84
|
-
"""Return a sample health check response."""
|
|
85
|
-
return {
|
|
86
|
-
"status": "healthy",
|
|
87
|
-
"resource": "test-resource",
|
|
88
|
-
"version": "1.0.0",
|
|
89
|
-
"timestamp": "2024-01-15T10:30:00Z",
|
|
90
|
-
"uptime": 3600,
|
|
91
|
-
"dependencies": {
|
|
92
|
-
"database": "healthy",
|
|
93
|
-
"cache": "healthy"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
@pytest.fixture
|
|
99
|
-
def mock_tilt_ui_status() -> dict:
|
|
100
|
-
"""Return mock Tilt UI status for testing status colors."""
|
|
101
|
-
return {
|
|
102
|
-
"ready": {"indicator": "green", "status": "Ready"},
|
|
103
|
-
"starting": {"indicator": "yellow", "status": "Starting"},
|
|
104
|
-
"error": {"indicator": "red", "status": "Error"}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
@pytest.fixture
|
|
109
|
-
def protected_volumes() -> list:
|
|
110
|
-
"""Return list of protected volume patterns."""
|
|
111
|
-
return [
|
|
112
|
-
"verdaccio-storage",
|
|
113
|
-
"verdaccio-conf",
|
|
114
|
-
"verdaccio-plugins",
|
|
115
|
-
"infisical-db-data",
|
|
116
|
-
"infisical-redis-data"
|
|
117
|
-
]
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
@pytest.fixture
|
|
121
|
-
def dangerous_commands() -> list:
|
|
122
|
-
"""Return list of commands that should be blocked by code executor."""
|
|
123
|
-
return [
|
|
124
|
-
"rm -rf /",
|
|
125
|
-
"sudo rm -rf /",
|
|
126
|
-
"sudo su",
|
|
127
|
-
"passwd",
|
|
128
|
-
"mkfs",
|
|
129
|
-
"dd if=/dev/zero",
|
|
130
|
-
]
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
@pytest.fixture
|
|
134
|
-
def safe_commands() -> list:
|
|
135
|
-
"""Return list of commands that should be allowed by code executor."""
|
|
136
|
-
return [
|
|
137
|
-
"bun test",
|
|
138
|
-
"bun run dev",
|
|
139
|
-
"ls -la",
|
|
140
|
-
"cat package.json",
|
|
141
|
-
"git status",
|
|
142
|
-
"echo hello",
|
|
143
|
-
]
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
@pytest.fixture
|
|
147
|
-
def resource_registry_cache() -> dict:
|
|
148
|
-
"""Return an empty resource registry cache structure."""
|
|
149
|
-
return {
|
|
150
|
-
"initialized": False,
|
|
151
|
-
"app_resources": [],
|
|
152
|
-
"resource_dependencies": {},
|
|
153
|
-
"resource_aliases": {},
|
|
154
|
-
"resource_path_map": {}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
@pytest.fixture
|
|
159
|
-
def mock_ide_server_port() -> int:
|
|
160
|
-
"""Return mock port for IDE component testing."""
|
|
161
|
-
return 9999 # Non-standard port for testing
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
@pytest.fixture
|
|
165
|
-
def focus_mode_config() -> dict:
|
|
166
|
-
"""Return focus mode configuration for testing."""
|
|
167
|
-
return {
|
|
168
|
-
"enabled": True,
|
|
169
|
-
"stacks": ["identity", "order"],
|
|
170
|
-
"excluded_paths": []
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
def pytest_configure(config):
|
|
175
|
-
"""Configure pytest with custom markers."""
|
|
176
|
-
config.addinivalue_line("markers", "snapshot: Tests for resource snapshot functionality")
|
|
177
|
-
config.addinivalue_line("markers", "daemon: Tests for discovery daemon")
|
|
178
|
-
config.addinivalue_line("markers", "health: Tests for health check endpoints")
|
|
179
|
-
config.addinivalue_line("markers", "ide: Tests for IDE components")
|
|
180
|
-
config.addinivalue_line("markers", "safety: Tests for safety guards")
|
|
181
|
-
config.addinivalue_line("markers", "cache: Tests for registry cache")
|
|
182
|
-
config.addinivalue_line("markers", "integration: Integration tests")
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "identity-backend",
|
|
3
|
-
"type": "backend",
|
|
4
|
-
"stack": "identity",
|
|
5
|
-
"port": 4001,
|
|
6
|
-
"path": "services/product/identity/identity-backend",
|
|
7
|
-
"databaseName": "{project}_identity",
|
|
8
|
-
"featuresEnabled": ["prisma", "nats", "health-check"],
|
|
9
|
-
"replicas": 2,
|
|
10
|
-
"healthCheck": true,
|
|
11
|
-
"healthCheckPath": "/health"
|
|
12
|
-
}
|