@flisk-sh/flisk 0.0.0-stage → 1.3.190
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 +492 -0
- package/LICENSE +21 -0
- package/README.md +479 -2
- package/Tiltfile +151 -0
- package/cli/bin/flisk.js +42 -0
- package/cli/dist/agent-runtimes/custom.js +335 -0
- package/cli/dist/agent-runtimes/registry.js +34 -0
- package/cli/dist/backend-frameworks/elysia.js +38 -0
- package/cli/dist/backend-frameworks/express.js +49 -0
- package/cli/dist/backend-frameworks/fastify.js +43 -0
- package/cli/dist/backend-frameworks/h3.js +37 -0
- package/cli/dist/backend-frameworks/koa.js +47 -0
- package/cli/dist/backend-frameworks/mcp.js +86 -0
- package/cli/dist/backend-frameworks/nestjs.js +55 -0
- package/cli/dist/backend-frameworks/registry.js +134 -0
- package/cli/dist/backend-frameworks/types.js +1 -0
- package/cli/dist/backend-languages/bun.js +76 -0
- package/cli/dist/backend-languages/go.js +125 -0
- package/cli/dist/backend-languages/node.js +122 -0
- package/cli/dist/backend-languages/python.js +94 -0
- package/cli/dist/backend-languages/registry.js +37 -0
- package/cli/dist/backend-languages/rust.js +82 -0
- package/cli/dist/backend-languages/types.js +1 -0
- package/cli/dist/cli.js +29 -0
- package/cli/dist/commands/__tests__/project-e2e-helpers.js +49 -0
- package/cli/dist/commands/__tests__/ui-loading-screen.test.js +16 -0
- package/cli/dist/commands/agent.js +182 -0
- package/cli/dist/commands/completion-candidates.js +116 -0
- package/cli/dist/commands/completion.js +843 -0
- package/cli/dist/commands/config.js +362 -0
- package/cli/dist/commands/doctor.js +1504 -0
- package/cli/dist/commands/down.js +114 -0
- package/cli/dist/commands/eject.js +108 -0
- package/cli/dist/commands/help.js +152 -0
- package/cli/dist/commands/import.js +164 -0
- package/cli/dist/commands/logs.js +119 -0
- package/cli/dist/commands/maintainers.js +102 -0
- package/cli/dist/commands/mcp.js +28 -0
- package/cli/dist/commands/networks.js +306 -0
- package/cli/dist/commands/project.js +447 -0
- package/cli/dist/commands/projects.js +103 -0
- package/cli/dist/commands/registry.js +53 -0
- package/cli/dist/commands/resource.js +992 -0
- package/cli/dist/commands/resources.js +127 -0
- package/cli/dist/commands/restart.js +89 -0
- package/cli/dist/commands/runtime.js +75 -0
- package/cli/dist/commands/stack.js +171 -0
- package/cli/dist/commands/stacks.js +71 -0
- package/cli/dist/commands/status.js +211 -0
- package/cli/dist/commands/ui.js +725 -0
- package/cli/dist/commands/up.js +609 -0
- package/cli/dist/commands/upgrade.js +840 -0
- package/cli/dist/commands/version.js +10 -0
- package/cli/dist/components/Accessible.js +11 -0
- package/cli/dist/components/BaseTooltip.js +30 -0
- package/cli/dist/components/DetailPanel.js +33 -0
- package/cli/dist/components/FileTree.js +51 -0
- package/cli/dist/components/ResourceSelectInput.js +42 -0
- package/cli/dist/components/ResourceTable.js +35 -0
- package/cli/dist/components/ServiceIssues.js +13 -0
- package/cli/dist/components/TUIHeader.js +27 -0
- package/cli/dist/components/TabBar.js +27 -0
- package/cli/dist/components/Tooltip.js +13 -0
- package/cli/dist/components/index.js +11 -0
- package/cli/dist/components/ui-theme.js +120 -0
- package/cli/dist/config/platform-standards.js +182 -0
- package/cli/dist/frontend-frameworks/lit.js +64 -0
- package/cli/dist/frontend-frameworks/preact.js +62 -0
- package/cli/dist/frontend-frameworks/qwik.js +61 -0
- package/cli/dist/frontend-frameworks/react.js +69 -0
- package/cli/dist/frontend-frameworks/registry.js +83 -0
- package/cli/dist/frontend-frameworks/solid.js +62 -0
- package/cli/dist/frontend-frameworks/svelte.js +67 -0
- package/cli/dist/frontend-frameworks/tanstack-router.js +101 -0
- package/cli/dist/frontend-frameworks/types.js +1 -0
- package/cli/dist/frontend-frameworks/vanilla.js +59 -0
- package/cli/dist/frontend-frameworks/vue.js +72 -0
- package/cli/dist/generator/__tests__/golden-helpers.js +43 -0
- package/cli/dist/generator/extension-fetch.js +291 -0
- package/cli/dist/generator/resource-templates.js +133 -0
- package/cli/dist/generator/template-engine.js +801 -0
- package/cli/dist/index.js +10 -0
- package/cli/dist/mcp/server.js +101 -0
- package/cli/dist/mcp/tools.js +351 -0
- package/cli/dist/program.js +37 -0
- package/cli/dist/types/index.js +38 -0
- package/cli/dist/utils/agent-host.js +36 -0
- package/cli/dist/utils/atomic-write.js +36 -0
- package/cli/dist/utils/bun-floor.js +9 -0
- package/cli/dist/utils/bun-requirement.js +10 -0
- package/cli/dist/utils/cache.js +63 -0
- package/cli/dist/utils/cold-preflight.js +257 -0
- package/cli/dist/utils/command-helpers.js +57 -0
- package/cli/dist/utils/constants.js +160 -0
- package/cli/dist/utils/discovery-context.js +71 -0
- package/cli/dist/utils/discovery-paths.js +93 -0
- package/cli/dist/utils/docker.js +34 -0
- package/cli/dist/utils/doctor-crashloop.js +161 -0
- package/cli/dist/utils/doctor-fix.js +391 -0
- package/cli/dist/utils/doctor-host.js +66 -0
- package/cli/dist/utils/doctor-report.js +78 -0
- package/cli/dist/utils/doctor-runtime.js +880 -0
- package/cli/dist/utils/doctor-starlark.js +132 -0
- package/cli/dist/utils/doctor-wiring.js +698 -0
- package/cli/dist/utils/down-cleanup.js +125 -0
- package/cli/dist/utils/env-validator.js +266 -0
- package/cli/dist/utils/errors.js +175 -0
- package/cli/dist/utils/exec-async.js +31 -0
- package/cli/dist/utils/file-helpers.js +104 -0
- package/cli/dist/utils/formatting.js +165 -0
- package/cli/dist/utils/generated-paths.js +51 -0
- package/cli/dist/utils/help-command.js +11 -0
- package/cli/dist/utils/host-port-config.js +140 -0
- package/cli/dist/utils/host-port-plan.js +100 -0
- package/cli/dist/utils/json-output.js +29 -0
- package/cli/dist/utils/machine-output.js +33 -0
- package/cli/dist/utils/paths.js +43 -0
- package/cli/dist/utils/platform.js +58 -0
- package/cli/dist/utils/port-assignment.js +75 -0
- package/cli/dist/utils/port-conflict-fix.js +25 -0
- package/cli/dist/utils/port-fallback-notice.js +17 -0
- package/cli/dist/utils/port-listener-probe.js +20 -0
- package/cli/dist/utils/project-config-defaults.js +17 -0
- package/cli/dist/utils/project-features.js +91 -0
- package/cli/dist/utils/project-templates.js +32 -0
- package/cli/dist/utils/prompt.js +97 -0
- package/cli/dist/utils/resource-features.js +184 -0
- package/cli/dist/utils/resource-kind.js +9 -0
- package/cli/dist/utils/schema-version-gate.js +45 -0
- package/cli/dist/utils/search-status.js +12 -0
- package/cli/dist/utils/secret-redaction.js +73 -0
- package/cli/dist/utils/service-config-checks.js +189 -0
- package/cli/dist/utils/service-manifest.js +254 -0
- package/cli/dist/utils/service-runtime-state.js +66 -0
- package/cli/dist/utils/service-urls.js +112 -0
- package/cli/dist/utils/services.js +360 -0
- package/cli/dist/utils/shared-infra.js +45 -0
- package/cli/dist/utils/shared-platform-postgres.js +232 -0
- package/cli/dist/utils/single-flight.js +21 -0
- package/cli/dist/utils/smoke.js +401 -0
- package/cli/dist/utils/spinner.js +40 -0
- package/cli/dist/utils/stack-features.js +15 -0
- package/cli/dist/utils/stack-status.js +14 -0
- package/cli/dist/utils/startup-report.js +78 -0
- package/cli/dist/utils/status-message.js +21 -0
- package/cli/dist/utils/status-ports.js +33 -0
- package/cli/dist/utils/suggestions.js +63 -0
- package/cli/dist/utils/tar.js +46 -0
- package/cli/dist/utils/tdk-version.js +51 -0
- package/cli/dist/utils/terminal-layout.js +19 -0
- package/cli/dist/utils/tilt-events.js +194 -0
- package/cli/dist/utils/tilt-logs.js +61 -0
- package/cli/dist/utils/tilt-port-owner.js +63 -0
- package/cli/dist/utils/tilt-process.js +54 -0
- package/cli/dist/utils/tilt-resource-state.js +32 -0
- package/cli/dist/utils/tilt-startup.js +49 -0
- package/cli/dist/utils/tilt-unreachable-message.js +9 -0
- package/cli/dist/utils/tilt.js +104 -0
- package/cli/dist/utils/ui-keymap.js +129 -0
- package/cli/dist/utils/ui-service-state.js +34 -0
- package/cli/dist/utils/up-only.js +28 -0
- package/cli/dist/utils/up-readiness.js +118 -0
- package/cli/dist/utils/url-actions.js +103 -0
- package/cli/dist/utils/validation.js +62 -0
- package/cli/dist/utils/which.js +56 -0
- package/cli/dist/utils/windows-doctor.js +176 -0
- package/cli/dist-bundle/chunk-6EA4DGCY.js +2 -0
- package/cli/dist-bundle/chunk-BZ4H7MM4.js +3 -0
- package/cli/dist-bundle/chunk-CLCUIDBH.js +510 -0
- package/cli/dist-bundle/cli.js +2017 -0
- package/cli/dist-bundle/cold-preflight-SY26O2IG.js +2 -0
- package/cli/dist-bundle/devtools-ZUHXW33W.js +5 -0
- package/cli/dist-bundle/extension-fetch-J4FFH7TJ.js +2 -0
- package/cli/package.json +83 -0
- package/cli/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +25 -0
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +466 -0
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +154 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +14 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +58 -0
- package/cli/templates/.tiltignore.hbs +72 -0
- package/cli/templates/TILT_RESOURCE_DEFAULTS.star.hbs +220 -0
- package/cli/templates/TILT_TECH_STACK.star.hbs +149 -0
- package/cli/templates/Tiltfile.hbs +381 -0
- package/cli/templates/spec.master.hbs +192 -0
- package/discovery/AGENTS.md +362 -0
- package/discovery/TILT_DISCOVERY.star +429 -0
- package/discovery/Tiltfile +58 -0
- package/discovery/config.star +265 -0
- package/discovery/constants.star +167 -0
- package/discovery/deterministic.star +213 -0
- package/discovery/discovery_daemon.star +193 -0
- package/discovery/discovery_orchestrator.star +492 -0
- package/discovery/filtering.star +7 -0
- package/discovery/identity-management-backend/service.yaml +26 -0
- package/discovery/identity-management-frontend/service.yaml +29 -0
- package/discovery/identity-sdk/service.yaml +9 -0
- package/discovery/incremental_discovery.star +215 -0
- package/discovery/indexing.star +9 -0
- package/discovery/json_manifest_scanner.star +57 -0
- package/discovery/libraries.star +48 -0
- package/discovery/loading.star +25 -0
- package/discovery/manifest/constants.star +106 -0
- package/discovery/manifest/loading.star +418 -0
- package/discovery/manifest/normalize.star +289 -0
- package/discovery/manifest/validation.star +110 -0
- package/discovery/normalization.star +13 -0
- package/discovery/registry.star +562 -0
- package/discovery/resource_snapshot.py +384 -0
- package/discovery/resource_snapshot.star +145 -0
- package/discovery/schemas.star +3 -0
- package/discovery/services/platform/cdc/debezium/nats-connector/service.yaml +9 -0
- package/discovery/services/platform/cdc/nats-http-bridge/service.yaml +9 -0
- package/discovery/services/platform/orchestrator/orchestrator-glue-backend/service.yaml +26 -0
- package/discovery/services/platform/synthetic-monitor/service.yaml +9 -0
- package/discovery/test_resource_snapshot.py +253 -0
- package/discovery/validation.star +80 -0
- package/discovery/versioning.star +3 -0
- package/engine/AGENTS.md +706 -0
- package/engine/README.md +31 -0
- package/engine/REFACTORING_MANIFEST_SYSTEM.md +974 -0
- package/engine/Tiltfile +86 -0
- package/engine/assets/docker/golden-layers.Dockerfile +204 -0
- package/engine/assets/docker/wake-gateway/Dockerfile +28 -0
- package/engine/assets/docker/wake-gateway/decide.test.ts +177 -0
- package/engine/assets/docker/wake-gateway/decide.ts +135 -0
- package/engine/assets/docker/wake-gateway/server.ts +363 -0
- package/engine/assets/scripts/cleanup-completed-migrator-images.sh +39 -0
- package/engine/assets/scripts/cleanup-tilt-images.sh +122 -0
- package/engine/assets/scripts/mac-m1-resource-monitor.sh +123 -0
- package/engine/config.star +5 -0
- package/engine/entrypoint.star +101 -0
- package/engine/lifecycle/orchestrator.star +263 -0
- package/engine/paths.star +719 -0
- package/engine/schemas/project-schema.json +147 -0
- package/engine/schemas/service-schema.json +537 -0
- package/engine/scripts/README.md +89 -0
- package/engine/scripts/build-and-publish-lib.sh +207 -0
- package/engine/scripts/check-lib-publish.sh +87 -0
- package/engine/scripts/debug-container.sh +265 -0
- package/engine/scripts/generate-manifest.sh +200 -0
- package/engine/spec.master +702 -0
- package/engine/spec.master.example +341 -0
- package/engine/topologies/README.md +33 -0
- package/engine/topologies/platform/docker/AGENTS.md +59 -0
- package/engine/topologies/platform/docker/auth/auth.star +207 -0
- package/engine/topologies/platform/docker/build/frontend_build_plan.star +65 -0
- package/engine/topologies/platform/docker/build/golden_image.star +37 -0
- package/engine/topologies/platform/docker/build/golden_image_build.star +144 -0
- package/engine/topologies/platform/docker/build/golden_image_constants.star +100 -0
- package/engine/topologies/platform/docker/build/golden_image_dockerfile.star +263 -0
- package/engine/topologies/platform/docker/compose/compose.star +637 -0
- package/engine/topologies/platform/docker/compose/compose_helpers.star +54 -0
- package/engine/topologies/platform/docker/compose/traefik_standalone.star +171 -0
- package/engine/topologies/platform/docker/config/bunignore.star +144 -0
- package/engine/topologies/platform/docker/config/dockerignore.star +152 -0
- package/engine/topologies/platform/docker/config/healthcheck.star +58 -0
- package/engine/topologies/platform/docker/constants.star +211 -0
- package/engine/topologies/platform/docker/dockerfile/dockerfile.star +56 -0
- package/engine/topologies/platform/docker/dockerfile/language_dockerfile.star +264 -0
- package/engine/topologies/platform/docker/generators/golden_docker_generator_v2.star +76 -0
- package/engine/topologies/platform/docker/index.star +40 -0
- package/engine/topologies/platform/docker/layers/bun_helpers.star +25 -0
- package/engine/topologies/platform/docker/layers/infisical/index.star +42 -0
- package/engine/topologies/platform/docker/layers/infisical/infisical_docker.star +264 -0
- package/engine/topologies/platform/docker/layers/l1_base_layers.star +89 -0
- package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +147 -0
- package/engine/topologies/platform/docker/layers/l3_builder_layers.star +229 -0
- package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +282 -0
- package/engine/topologies/platform/docker/layers/prisma/constants.star +138 -0
- package/engine/topologies/platform/docker/layers/prisma/db_readiness.star +98 -0
- package/engine/topologies/platform/docker/layers/prisma/filesystem_setup.star +131 -0
- package/engine/topologies/platform/docker/layers/prisma/migrate_script.star +100 -0
- package/engine/topologies/platform/docker/layers/prisma/prisma_build.star +128 -0
- package/engine/topologies/platform/docker/layers/prisma/prisma_runtime.star +205 -0
- package/engine/topologies/platform/docker/layers/prisma/secret_resolution.star +121 -0
- package/engine/topologies/platform/docker/networking/api_path_constants.star +206 -0
- package/engine/topologies/platform/docker/networking/sablier_container_cycle.star +31 -0
- package/engine/topologies/platform/docker/networking/traefik.star +266 -0
- package/engine/topologies/platform/docker/networking/traefik_constants.star +148 -0
- package/engine/topologies/platform/docker/networking/traefik_helpers.star +162 -0
- package/engine/topologies/platform/docker/networking/traefik_static_routes.star +165 -0
- package/engine/topologies/platform/docker/secrets/env_secrets.star +74 -0
- package/engine/topologies/platform/docker/secrets/infisical.star +109 -0
- package/engine/topologies/platform/net/AGENTS.md +64 -0
- package/engine/topologies/platform/net/proxy.star +6 -0
- package/engine/topologies/platform/registries/local.star +6 -0
- package/engine/topologies/platform/registries/verdaccio_loader.star +20 -0
- package/engine/topologies/platform/security/AGENTS.md +49 -0
- package/engine/topologies/platform/security/secrets.star +241 -0
- package/engine/topologies/platform/state/AGENTS.md +64 -0
- package/engine/topologies/platform/state/relational.star +6 -0
- package/engine/topologies/tilt/common/AGENTS.md +59 -0
- package/engine/topologies/tilt/common/utils.star +409 -0
- package/engine/topologies/tilt/common/utils_debug.star +71 -0
- package/engine/topologies/tilt/common/utils_deterministic.star +170 -0
- package/engine/topologies/tilt/common/utils_docker_networks.star +54 -0
- package/engine/topologies/tilt/common/utils_env.star +92 -0
- package/engine/topologies/tilt/common/utils_output.star +99 -0
- package/engine/topologies/tilt/config/AGENTS.md +68 -0
- package/engine/topologies/tilt/config/defaults.star +5 -0
- package/engine/topologies/tilt/config/feature_flags.star +12 -0
- package/engine/topologies/tilt/config/global.star +57 -0
- package/engine/topologies/tilt/config/profiles.star +398 -0
- package/engine/topologies/tilt/generators/agents_md.star +64 -0
- package/engine/topologies/tilt/generators/api_gateway.star +147 -0
- package/engine/topologies/tilt/generators/index.star +126 -0
- package/engine/topologies/tilt/generators/infisical/README.md +424 -0
- package/engine/topologies/tilt/generators/infisical/examples.star +314 -0
- package/engine/topologies/tilt/generators/infisical/index.star +59 -0
- package/engine/topologies/tilt/generators/infisical/machine_identity.star +422 -0
- package/engine/topologies/tilt/generators/infisical/organization.star +536 -0
- package/engine/topologies/tilt/generators/infisical/path_manager.star +478 -0
- package/engine/topologies/tilt/generators/infisical/secrets_generator.star +422 -0
- package/engine/topologies/tilt/generators/nginx_conf.star +145 -0
- package/engine/topologies/tilt/generators/npmrc.star +132 -0
- package/engine/topologies/tilt/generators/tsconfig.star +25 -0
- package/engine/topologies/tilt/generators/typescript/backend_library_tsconfig.star +73 -0
- package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +137 -0
- package/engine/topologies/tilt/generators/typescript/common.star +9 -0
- package/engine/topologies/tilt/generators/typescript/frontend_library_tsconfig.star +78 -0
- package/engine/topologies/tilt/generators/typescript/frontend_tsconfig.star +140 -0
- package/engine/topologies/tilt/generators/typescript/include.star +25 -0
- package/engine/topologies/tilt/generators/typescript/playwright_config.star +42 -0
- package/engine/topologies/tilt/generators/typescript/prisma_config.star +51 -0
- package/engine/topologies/tilt/generators/validators.star +868 -0
- package/engine/topologies/tilt/generators/vite/backend.star +80 -0
- package/engine/topologies/tilt/generators/vite/frameworks/lit.star +92 -0
- package/engine/topologies/tilt/generators/vite/frameworks/preact.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/qwik.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/react.star +128 -0
- package/engine/topologies/tilt/generators/vite/frameworks/solid.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/svelte.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/vanilla.star +92 -0
- package/engine/topologies/tilt/generators/vite/frameworks/vue.star +94 -0
- package/engine/topologies/tilt/generators/vite/frontend.star +153 -0
- package/engine/topologies/tilt/generators/vite/generators.star +45 -0
- package/engine/topologies/tilt/generators/vite/helpers.star +256 -0
- package/engine/topologies/tilt/generators/vite/library.star +67 -0
- package/engine/topologies/tilt/generators/vite/sdk.star +75 -0
- package/engine/topologies/tilt/generators/vite/templates.star +460 -0
- package/engine/topologies/tilt/generators/vite_config.star +24 -0
- package/engine/topologies/tilt/manifest/AGENTS.md +61 -0
- package/engine/topologies/tilt/manifest/README.md +679 -0
- package/engine/topologies/tilt/manifest/__init__.star +220 -0
- package/engine/topologies/tilt/manifest/constants.star +262 -0
- package/engine/topologies/tilt/manifest/errors.star +268 -0
- package/engine/topologies/tilt/manifest/integration.star +348 -0
- package/engine/topologies/tilt/manifest/json_to_yaml.py +61 -0
- package/engine/topologies/tilt/manifest/loader.star +239 -0
- package/engine/topologies/tilt/manifest/mapper.star +229 -0
- package/engine/topologies/tilt/manifest/parser.star +490 -0
- package/engine/topologies/tilt/manifest/schema.star +502 -0
- package/engine/topologies/tilt/manifest/tests/test_integration.star +278 -0
- package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +475 -0
- package/engine/topologies/tilt/manifest/tests/test_manifest.star +319 -0
- package/engine/topologies/tilt/manifest/tests/test_validator.star +472 -0
- package/engine/topologies/tilt/manifest/validator.star +744 -0
- package/engine/topologies/tilt/manifest/yaml_to_json.py +20 -0
- package/engine/topologies/tilt/resources/AGENTS.md +71 -0
- package/engine/topologies/tilt/resources/build_concurrency.star +56 -0
- package/engine/topologies/tilt/resources/conditions.star +5 -0
- package/engine/topologies/tilt/resources/databases.star +246 -0
- package/engine/topologies/tilt/resources/declaration.star +5 -0
- package/engine/topologies/tilt/resources/deps.star +5 -0
- package/engine/topologies/tilt/resources/infra-loader.star +504 -0
- package/engine/topologies/tilt/resources/libs.star +32 -0
- package/engine/topologies/tilt/resources/libs_discovery.star +104 -0
- package/engine/topologies/tilt/resources/libs_paths.star +81 -0
- package/engine/topologies/tilt/resources/libs_resource_definition.star +153 -0
- package/engine/topologies/tilt/resources/libs_setup.star +166 -0
- package/engine/topologies/tilt/resources/libs_tsconfig.star +39 -0
- package/engine/topologies/tilt/resources/orchestrator/apply.star +79 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +864 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_manifest_orchestration.star +90 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +150 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_resource_validation.star +38 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_runtime_flags.star +46 -0
- package/engine/topologies/tilt/resources/orchestrator/builders/typescript.star +193 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/AGENTS.md +75 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/index.star +23 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/resolver.star +136 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/env.star +219 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/frontend.star +172 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +577 -0
- package/engine/topologies/tilt/resources/orchestrator/helpers.star +35 -0
- package/engine/topologies/tilt/resources/orchestrator.star +56 -0
- package/engine/topologies/tilt/resources/ordering.star +5 -0
- package/engine/topologies/tilt/resources/shared-platform-postgres.star +30 -0
- package/engine/topologies/tilt/resources/triggers.star +5 -0
- package/engine/topologies/tilt/resources/watchers.star +304 -0
- package/engine/where-things-live.star +719 -0
- package/examples/tdk-example/LICENSE +21 -0
- package/examples/tdk-example/README.md +23 -0
- package/examples/tdk-example/TILT_SERVICE_DEFAULTS.star +42 -0
- package/examples/tdk-example/TILT_TECH_STACK.star +67 -0
- package/examples/tdk-example/Tiltfile +25 -0
- package/examples/tdk-example/services/platform/messaging/docker-compose.yml +26 -0
- package/examples/tdk-example/services/shop/orders-api/package.json +20 -0
- package/examples/tdk-example/services/shop/orders-api/service.json +14 -0
- package/examples/tdk-example/services/shop/orders-api/src/index.ts +81 -0
- package/examples/tdk-example/services/shop/orders-app/index.html +12 -0
- package/examples/tdk-example/services/shop/orders-app/package.json +23 -0
- package/examples/tdk-example/services/shop/orders-app/public/.gitkeep +0 -0
- package/examples/tdk-example/services/shop/orders-app/service.json +9 -0
- package/examples/tdk-example/services/shop/orders-app/src/main.tsx +9 -0
- package/examples/tdk-example/services/shop/orders-app/src/orders.tsx +67 -0
- package/examples/tdk-example/services/shop/orders-app/src/style.css +15 -0
- package/examples/tdk-example/services/shop/orders-worker/package.json +18 -0
- package/examples/tdk-example/services/shop/orders-worker/service.json +13 -0
- package/examples/tdk-example/services/shop/orders-worker/src/index.ts +33 -0
- package/ext/Tiltfile +66 -0
- package/ext/ide-components/README.md +221 -0
- package/ext/ide-components/code_viewer/server.py +208 -0
- package/ext/ide-components/config_inspector/server.py +1052 -0
- package/ext/ide-components/file_browser/server.py +287 -0
- package/ext/ide-components/shared/config_service.py +471 -0
- package/ext/ide-components/shared/file_utils.py +300 -0
- package/ext/ide-components/shared/http_utils.py +234 -0
- package/ext/ide-components/shared/static/styles.css +1334 -0
- package/ext/ide-components/shared/syntax_highlighter.py +142 -0
- package/ext/ide-components/shared/template_engine.py +125 -0
- package/ext/ide-components/shared/templates/base.html +121 -0
- package/ext/ide-components/shared/test_config_service.py +328 -0
- package/ext/ide-components/shared/tilt_integration.py +160 -0
- package/ext/ui-enhancements/cron-status-server.sh +51 -0
- package/ext/ui-enhancements/cron-status-tracker.sh +148 -0
- package/ext/ui-enhancements/extension.yaml +36 -0
- package/ext/ui-enhancements/tiltfile.py +101 -0
- package/ext/ui-enhancements/ui/cron-jobs-tab.css +396 -0
- package/ext/ui-enhancements/ui/help-panel.css +279 -0
- package/ext/ui-enhancements/ui/icons.css +125 -0
- package/ext/ui-enhancements/ui/tooltips.css +114 -0
- package/package.json +94 -4
- package/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +25 -0
- package/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +466 -0
- package/shared-platform-engineering/docker-templates/install-deps.sh +154 -0
- package/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +14 -0
- package/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +58 -0
- package/specs/specs/TILT_SERVICE_DEFAULTS.star +207 -0
- package/specs/specs/TILT_TECH_STACK.star +161 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 📋 TILT SDK - MANIFEST NORMALIZATION & DISCOVERY
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Path: .tilt/topologies/tilt/discovery/manifest/normalize.star
|
|
7
|
+
# Purpose: Normalize manifests and provide helper accessors
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
load('../../engine/topologies/tilt/manifest/parser.star', 'generated_string_error')
|
|
11
|
+
load('./constants.star', 'MANIFEST_DEFAULTS', 'MANIFEST_FILENAME')
|
|
12
|
+
load('./loading.star', 'apply_manifest_defaults', 'check_prisma_folder', 'get_default_syncs_for_type')
|
|
13
|
+
load('./validation.star', 'validate_manifest')
|
|
14
|
+
load('../../engine/topologies/tilt/common/utils.star', 'Utils')
|
|
15
|
+
load('../../engine/topologies/platform/docker/constants.star', 'PlatformDockerConstants')
|
|
16
|
+
load('../../specs/specs/TILT_TECH_STACK.star', 'RUNTIME', 'MESSAGING')
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _load_and_normalize(manifest_path, warn_only=True):
|
|
20
|
+
"""
|
|
21
|
+
🎯 MAIN ENTRY POINT: Load manifest and normalize to full resource config.
|
|
22
|
+
|
|
23
|
+
This function is the bridge between the discovery system (resource_registry.star)
|
|
24
|
+
and the manifest loading system. It:
|
|
25
|
+
|
|
26
|
+
1. Reads the JSON file
|
|
27
|
+
2. Validates the structure
|
|
28
|
+
3. Normalizes with smart defaults
|
|
29
|
+
4. Computes labels, syncs, has_migrator
|
|
30
|
+
5. Returns a resource-ready configuration
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
manifest_path: Full path to manifest file
|
|
34
|
+
warn_only: If True, return None on error instead of failing
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
Normalized manifest dict or None on error (if warn_only=True)
|
|
38
|
+
"""
|
|
39
|
+
# Prepend project root to relative paths for correct resolution
|
|
40
|
+
project_root = os.environ.get('TDK_PROJECT_ROOT', '')
|
|
41
|
+
if project_root and not manifest_path.startswith('/'):
|
|
42
|
+
full_path = project_root + '/' + manifest_path
|
|
43
|
+
else:
|
|
44
|
+
full_path = manifest_path
|
|
45
|
+
|
|
46
|
+
# Read manifest file
|
|
47
|
+
content = read_file(full_path, default='')
|
|
48
|
+
|
|
49
|
+
if not content or not str(content).strip():
|
|
50
|
+
if warn_only:
|
|
51
|
+
print(" ⚠️ Empty or missing manifest: " + manifest_path)
|
|
52
|
+
return None
|
|
53
|
+
fail("Empty or missing manifest: " + manifest_path)
|
|
54
|
+
|
|
55
|
+
# Parse JSON
|
|
56
|
+
manifest = decode_json(content)
|
|
57
|
+
if manifest == None:
|
|
58
|
+
if warn_only:
|
|
59
|
+
print(" ⚠️ Invalid JSON in manifest: " + manifest_path)
|
|
60
|
+
return None
|
|
61
|
+
fail("Invalid JSON in manifest: " + manifest_path)
|
|
62
|
+
|
|
63
|
+
# Refuse service.json values that would add keys to generated config (GHSA-phgf-pww4-7jxc)
|
|
64
|
+
unsafe_field_error = generated_string_error(manifest, manifest_path) if type(manifest) == "dict" else None
|
|
65
|
+
if unsafe_field_error:
|
|
66
|
+
fail(unsafe_field_error)
|
|
67
|
+
|
|
68
|
+
# Validate
|
|
69
|
+
issues = validate_manifest(manifest)
|
|
70
|
+
if issues:
|
|
71
|
+
if warn_only:
|
|
72
|
+
for issue in issues:
|
|
73
|
+
print(" ⚠️ " + manifest_path + ": " + issue)
|
|
74
|
+
return None
|
|
75
|
+
fail("Manifest validation failed:\n" + "\n".join(issues))
|
|
76
|
+
|
|
77
|
+
# Extract service path from manifest path
|
|
78
|
+
resource_path = manifest_path.rsplit('/', 1)[0]
|
|
79
|
+
|
|
80
|
+
# BUG FIX: Normalize various path patterns to project-relative paths
|
|
81
|
+
# Pattern 1: Worktrees - .worktrees/task1-dry/services/platform/...
|
|
82
|
+
# Pattern 2: Flisk output - .tdk/.tdk-out/../.. or .tdk/.tdk-out/../../path
|
|
83
|
+
|
|
84
|
+
if resource_path.startswith('.worktrees/'):
|
|
85
|
+
# Extract the part after the worktree name
|
|
86
|
+
parts = resource_path.split('/')
|
|
87
|
+
if len(parts) >= 3:
|
|
88
|
+
resource_path = '/'.join(parts[2:])
|
|
89
|
+
elif '.worktrees/' in resource_path:
|
|
90
|
+
worktree_idx = resource_path.find('.worktrees/')
|
|
91
|
+
after_worktree = resource_path[worktree_idx:]
|
|
92
|
+
parts = after_worktree.split('/')
|
|
93
|
+
if len(parts) >= 3:
|
|
94
|
+
resource_path = '/'.join(parts[2:])
|
|
95
|
+
elif '.tdk/.tdk-out/../..' in resource_path:
|
|
96
|
+
# Handle Flisk output paths like: /path/to/.tdk/.tdk-out/../.. or .tdk/.tdk-out/../../services/...
|
|
97
|
+
tdk_idx = resource_path.find('.tdk/.tdk-out/../..')
|
|
98
|
+
if tdk_idx != -1:
|
|
99
|
+
after_tdk = resource_path[tdk_idx + len('.tdk/.tdk-out/../..'):]
|
|
100
|
+
if after_tdk.startswith('/'):
|
|
101
|
+
after_tdk = after_tdk[1:]
|
|
102
|
+
resource_path = after_tdk
|
|
103
|
+
elif resource_path.endswith('.tdk/.tdk-out/../..'):
|
|
104
|
+
# Handle bare Flisk output path that ends with just the resolution pattern
|
|
105
|
+
resource_path = ''
|
|
106
|
+
|
|
107
|
+
# Apply smart defaults
|
|
108
|
+
normalized = apply_manifest_defaults(manifest, resource_path)
|
|
109
|
+
|
|
110
|
+
# Compute additional fields for registry compatibility
|
|
111
|
+
app_name = normalized.get('appName', '')
|
|
112
|
+
app_type = normalized.get('appType', 'backend')
|
|
113
|
+
stack = normalized.get('stack', '')
|
|
114
|
+
features = normalized.get('featuresEnabled', [])
|
|
115
|
+
|
|
116
|
+
# 🎯 AUTO-COMPUTE labels from stack
|
|
117
|
+
normalized['labels'] = ['app.' + stack]
|
|
118
|
+
|
|
119
|
+
# 🎯 AUTO-DETECT has_migrator
|
|
120
|
+
has_migrator = 'prisma' in features
|
|
121
|
+
if not has_migrator:
|
|
122
|
+
has_migrator = check_prisma_folder(resource_path)
|
|
123
|
+
normalized['has_migrator'] = has_migrator
|
|
124
|
+
|
|
125
|
+
# 🎯 AUTO-COMPUTE syncs if not specified
|
|
126
|
+
if normalized.get('syncs') == None:
|
|
127
|
+
normalized['syncs'] = get_default_syncs_for_type(app_type, features)
|
|
128
|
+
|
|
129
|
+
# 🎯 COMPUTE dockerfile path
|
|
130
|
+
dockerfile = normalized.get('dockerfile', 'Dockerfile')
|
|
131
|
+
normalized['dockerfile_path'] = app_name + '/' + dockerfile
|
|
132
|
+
|
|
133
|
+
# 🎯 MARK as frontend if applicable
|
|
134
|
+
if app_type == 'frontend':
|
|
135
|
+
normalized['frontend'] = True
|
|
136
|
+
|
|
137
|
+
# 🎯 EXTRACT dependencies for registry
|
|
138
|
+
normalized['serviceDependencies'] = normalized.get('dependsOn', [])
|
|
139
|
+
|
|
140
|
+
return normalized
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def _discover_manifests_in_path(root_path):
|
|
144
|
+
"""
|
|
145
|
+
Discover all manifest files under a root path.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
root_path: Directory to search (e.g., 'services/product')
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
List of manifest file paths
|
|
152
|
+
"""
|
|
153
|
+
find_cmd = "find {root} -name '{filename}' -type f 2>/dev/null | sort".format(
|
|
154
|
+
root=root_path,
|
|
155
|
+
filename=MANIFEST_FILENAME
|
|
156
|
+
)
|
|
157
|
+
result = str(local(find_cmd, quiet=True, echo_off=True))
|
|
158
|
+
|
|
159
|
+
manifests = []
|
|
160
|
+
if result:
|
|
161
|
+
for line in result.strip().split('\n'):
|
|
162
|
+
if line and line.strip():
|
|
163
|
+
manifests.append(line.strip())
|
|
164
|
+
|
|
165
|
+
return manifests
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def _load_all_manifests(root_path, warn_only=True):
|
|
169
|
+
"""
|
|
170
|
+
Load and normalize all manifests under a root path.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
root_path: Directory to search (e.g., 'services/product')
|
|
174
|
+
warn_only: If True, skip invalid manifests with warnings
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
List of normalized manifest dicts
|
|
178
|
+
"""
|
|
179
|
+
manifest_paths = _discover_manifests_in_path(root_path)
|
|
180
|
+
manifests = []
|
|
181
|
+
|
|
182
|
+
for path in manifest_paths:
|
|
183
|
+
normalized = _load_and_normalize(path, warn_only=warn_only)
|
|
184
|
+
if normalized:
|
|
185
|
+
manifests.append(normalized)
|
|
186
|
+
|
|
187
|
+
return manifests
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def _get_port(manifest):
|
|
191
|
+
"""Get the resource port from manifest."""
|
|
192
|
+
return manifest.get('port', MANIFEST_DEFAULTS['port'])
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def _get_database_url(manifest, host='localhost', port=5432):
|
|
196
|
+
"""
|
|
197
|
+
Generate DATABASE_URL from manifest.
|
|
198
|
+
|
|
199
|
+
Args:
|
|
200
|
+
manifest: Manifest dictionary
|
|
201
|
+
host: Database host (default: localhost)
|
|
202
|
+
port: Database port (default: 5432)
|
|
203
|
+
|
|
204
|
+
Returns:
|
|
205
|
+
PostgreSQL connection string
|
|
206
|
+
"""
|
|
207
|
+
db_name = manifest.get('databaseName', PlatformDockerConstants.get_db_name(manifest.get('stack', 'app')))
|
|
208
|
+
return PlatformDockerConstants.get_tilt_database_url_template().format(
|
|
209
|
+
host=host,
|
|
210
|
+
port=port,
|
|
211
|
+
db=db_name,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def _print_summary(manifests):
|
|
216
|
+
"""
|
|
217
|
+
Print formatted summary of loaded manifests.
|
|
218
|
+
|
|
219
|
+
Args:
|
|
220
|
+
manifests: List of manifest dictionaries
|
|
221
|
+
"""
|
|
222
|
+
print("")
|
|
223
|
+
print("📋 ═══════════════════════════════════════════════════════════════")
|
|
224
|
+
print("📋 LOADED MANIFESTS")
|
|
225
|
+
print("📋 ═══════════════════════════════════════════════════════════════")
|
|
226
|
+
|
|
227
|
+
for m in manifests:
|
|
228
|
+
status = "✅" if not m.get('_synthesized') else "⚡"
|
|
229
|
+
app_name = m.get('appName', 'unknown')
|
|
230
|
+
app_type = m.get('appType', 'unknown')
|
|
231
|
+
port = m.get('port', 0)
|
|
232
|
+
stack = m.get('stack', 'unknown')
|
|
233
|
+
|
|
234
|
+
print(" {status} {name} | {type} | Port: {port} | Stack: {stack}".format(
|
|
235
|
+
status=status,
|
|
236
|
+
name=app_name,
|
|
237
|
+
type=app_type,
|
|
238
|
+
port=port,
|
|
239
|
+
stack=stack,
|
|
240
|
+
))
|
|
241
|
+
|
|
242
|
+
print("📋 ═══════════════════════════════════════════════════════════════")
|
|
243
|
+
print("")
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _generate_manifest_template(app_name, stack, app_type='backend', port=4000):
|
|
247
|
+
"""
|
|
248
|
+
🎯 TEMPLATE GENERATOR: Returns a string with a standard manifest.
|
|
249
|
+
"""
|
|
250
|
+
template = {
|
|
251
|
+
"$schema": PlatformDockerConstants.RESOURCE_SCHEMA_URL,
|
|
252
|
+
"appName": app_name,
|
|
253
|
+
"appType": app_type,
|
|
254
|
+
"stack": stack,
|
|
255
|
+
"port": port,
|
|
256
|
+
"replicas": 1,
|
|
257
|
+
"featuresEnabled": [MESSAGING, "infisical"],
|
|
258
|
+
"dependsOn": [],
|
|
259
|
+
"runtime": RUNTIME
|
|
260
|
+
}
|
|
261
|
+
return Utils.encode_json(template)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def load_and_normalize(manifest_path, warn_only=True):
|
|
265
|
+
return _load_and_normalize(manifest_path, warn_only=warn_only)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def discover_manifests_in_path(root_path):
|
|
269
|
+
return _discover_manifests_in_path(root_path)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def load_all_manifests(root_path, warn_only=True):
|
|
273
|
+
return _load_all_manifests(root_path, warn_only=warn_only)
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def get_port(manifest):
|
|
277
|
+
return _get_port(manifest)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def get_database_url(manifest, host='localhost', port=5432):
|
|
281
|
+
return _get_database_url(manifest, host=host, port=port)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def print_summary(manifests):
|
|
285
|
+
return _print_summary(manifests)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
def generate_manifest_template(app_name, stack, app_type='backend', port=4000):
|
|
289
|
+
return _generate_manifest_template(app_name, stack, app_type=app_type, port=port)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# ✅ TILT SDK - MANIFEST VALIDATION
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Path: .tilt/topologies/tilt/discovery/manifest/validation.star
|
|
7
|
+
# Purpose: Validate manifest structure and values
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
load('./constants.star', 'VALID_APP_TYPES')
|
|
11
|
+
load('../TILT_DISCOVERY.star', 'VALID_STACKS', 'VALID_RESOURCE_FEATURES', 'PORT_RANGES')
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def validate_manifest(manifest):
|
|
15
|
+
"""
|
|
16
|
+
🎯 ENTERPRISE VALIDATOR: Strict structure and value validation.
|
|
17
|
+
|
|
18
|
+
Validates:
|
|
19
|
+
- Required fields: appName, appType, stack, port
|
|
20
|
+
- appName pattern: kebab-case, 3-64 chars
|
|
21
|
+
- appType: from VALID_APP_TYPES
|
|
22
|
+
- stack: from VALID_STACKS
|
|
23
|
+
- appType: from VALID_APP_TYPES
|
|
24
|
+
- port: within range for appType (backends: 4000-5999, frontends: 3000-3999)
|
|
25
|
+
- features: from VALID_RESOURCE_FEATURES
|
|
26
|
+
- dependsOn: from VALID_STACKS (resource aliases)
|
|
27
|
+
- replicas: 1-10
|
|
28
|
+
"""
|
|
29
|
+
issues = []
|
|
30
|
+
|
|
31
|
+
# 1. Required fields & appName pattern
|
|
32
|
+
app_name = manifest.get('appName')
|
|
33
|
+
if not app_name:
|
|
34
|
+
issues.append("Missing required field: appName")
|
|
35
|
+
elif type(app_name) != 'string':
|
|
36
|
+
issues.append("appName must be a string")
|
|
37
|
+
elif len(app_name) < 3:
|
|
38
|
+
issues.append("appName too short: '" + app_name + "'. Minimum 3 characters")
|
|
39
|
+
elif len(app_name) > 64:
|
|
40
|
+
issues.append("appName too long: '" + app_name + "'. Maximum 64 characters")
|
|
41
|
+
|
|
42
|
+
# Check kebab-case pattern
|
|
43
|
+
for i in range(len(app_name)):
|
|
44
|
+
char = app_name[i]
|
|
45
|
+
if not (char.islower() or char.isdigit() or char == '-'):
|
|
46
|
+
issues.append("Invalid character in appName: '" + char + "'. Must be kebab-case (lowercase, numbers, hyphens)")
|
|
47
|
+
break
|
|
48
|
+
if app_name.startswith('-') or app_name.endswith('-'):
|
|
49
|
+
issues.append("appName cannot start or end with a hyphen")
|
|
50
|
+
|
|
51
|
+
# 2. appType validation
|
|
52
|
+
app_type = manifest.get('appType')
|
|
53
|
+
if not app_type:
|
|
54
|
+
issues.append("Missing required field: appType")
|
|
55
|
+
elif app_type not in VALID_APP_TYPES:
|
|
56
|
+
issues.append("Invalid appType: " + str(app_type) + ". Must be one of: " + ', '.join(VALID_APP_TYPES))
|
|
57
|
+
|
|
58
|
+
# 3. stack validation
|
|
59
|
+
stack = manifest.get('stack')
|
|
60
|
+
if not stack:
|
|
61
|
+
issues.append("Missing required field: stack")
|
|
62
|
+
elif len(VALID_STACKS) > 0 and stack not in VALID_STACKS:
|
|
63
|
+
# Only validate against list if VALID_STACKS is not empty
|
|
64
|
+
issues.append("Invalid stack: " + str(stack) + ". Must be one of: " + ', '.join(VALID_STACKS))
|
|
65
|
+
|
|
66
|
+
# 4. port validation with appType-specific ranges (skip for infra services)
|
|
67
|
+
port = manifest.get('port')
|
|
68
|
+
if port == None:
|
|
69
|
+
if app_type != 'infra':
|
|
70
|
+
issues.append("Missing required field: port")
|
|
71
|
+
elif type(port) != 'int':
|
|
72
|
+
issues.append("Invalid port: " + str(port) + ". Must be an integer")
|
|
73
|
+
elif app_type != 'infra':
|
|
74
|
+
if port < 3000 or port > 9999:
|
|
75
|
+
issues.append("Invalid port: " + str(port) + ". Must be integer 3000-9999")
|
|
76
|
+
elif app_type and app_type in PORT_RANGES:
|
|
77
|
+
port_range = PORT_RANGES[app_type]
|
|
78
|
+
if port < port_range['min'] or port > port_range['max']:
|
|
79
|
+
issues.append("Port " + str(port) + " out of range for " + app_type + ". Expected " + str(port_range['min']) + "-" + str(port_range['max']))
|
|
80
|
+
|
|
81
|
+
# 5. Validate features array
|
|
82
|
+
features = manifest.get('featuresEnabled', [])
|
|
83
|
+
if type(features) != 'list':
|
|
84
|
+
issues.append("Invalid features: must be an array")
|
|
85
|
+
else:
|
|
86
|
+
for f in features:
|
|
87
|
+
if f not in VALID_RESOURCE_FEATURES:
|
|
88
|
+
issues.append("Invalid feature: " + str(f) + ". Must be one of: " + ', '.join(VALID_RESOURCE_FEATURES))
|
|
89
|
+
|
|
90
|
+
# 6. Validate dependsOn array (must be valid resource aliases)
|
|
91
|
+
deps = manifest.get('dependsOn', [])
|
|
92
|
+
if type(deps) != 'list':
|
|
93
|
+
issues.append("Invalid dependsOn: must be an array")
|
|
94
|
+
else:
|
|
95
|
+
# Valid dependency targets are discovered dynamically from manifests
|
|
96
|
+
# No hardcoded list - all dependencies validated against discovered resources
|
|
97
|
+
# The actual validation happens at orchestration time, not here
|
|
98
|
+
pass
|
|
99
|
+
|
|
100
|
+
# 7. Validate replicas (if specified)
|
|
101
|
+
replicas = manifest.get('replicas')
|
|
102
|
+
if replicas != None:
|
|
103
|
+
if type(replicas) != 'int':
|
|
104
|
+
issues.append("Invalid replicas: must be an integer")
|
|
105
|
+
elif replicas < 1:
|
|
106
|
+
issues.append("Invalid replicas: " + str(replicas) + ". Minimum is 1")
|
|
107
|
+
elif replicas > 10:
|
|
108
|
+
issues.append("Invalid replicas: " + str(replicas) + ". Maximum is 10")
|
|
109
|
+
|
|
110
|
+
return issues
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
load(
|
|
4
|
+
"./manifest/normalize.star",
|
|
5
|
+
_load_and_normalize = "load_and_normalize",
|
|
6
|
+
_load_all_manifests = "load_all_manifests",
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
def normalize(manifest_path, warn_only = True):
|
|
10
|
+
return _load_and_normalize(manifest_path, warn_only = warn_only)
|
|
11
|
+
|
|
12
|
+
def normalize_all(root_path, warn_only = True):
|
|
13
|
+
return _load_all_manifests(root_path, warn_only = warn_only)
|