@flisk-sh/flisk 1.3.207 → 1.4.1
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/LICENSE +1 -1
- package/README.md +40 -37
- package/cli/dist/agent-runtimes/custom.js +3 -3
- package/cli/dist/agent-runtimes/registry.js +3 -3
- package/cli/dist/backend-frameworks/registry.js +8 -8
- package/cli/dist/backend-languages/python.js +4 -1
- package/cli/dist/backend-languages/registry.js +3 -3
- package/cli/dist/cli.js +4 -3
- package/cli/dist/commands/agent.js +8 -8
- package/cli/dist/commands/completion.js +26 -26
- package/cli/dist/commands/config.js +8 -8
- package/cli/dist/commands/doctor.js +80 -18
- package/cli/dist/commands/down.js +1 -1
- package/cli/dist/commands/eject.js +10 -10
- package/cli/dist/commands/help.js +2 -2
- package/cli/dist/commands/import.js +2 -2
- package/cli/dist/commands/logs.js +2 -2
- package/cli/dist/commands/mcp.js +2 -2
- package/cli/dist/commands/networks.js +2 -2
- package/cli/dist/commands/open.js +0 -1
- package/cli/dist/commands/project.js +19 -19
- package/cli/dist/commands/projects.js +1 -1
- package/cli/dist/commands/resource.js +21 -21
- package/cli/dist/commands/resources.js +2 -2
- package/cli/dist/commands/restart.js +7 -4
- package/cli/dist/commands/runtime.js +19 -4
- package/cli/dist/commands/stack.js +8 -8
- package/cli/dist/commands/up.js +23 -23
- package/cli/dist/commands/upgrade.js +44 -40
- package/cli/dist/frontend-frameworks/registry.js +3 -3
- package/cli/dist/generator/extension-fetch.js +12 -9
- package/cli/dist/generator/template-engine.js +72 -56
- package/cli/dist/mcp/tools.js +2 -2
- package/cli/dist/utils/agent-host.js +1 -1
- package/cli/dist/utils/cli-command.js +1 -1
- package/cli/dist/utils/cold-preflight.js +2 -2
- package/cli/dist/utils/constants.js +3 -3
- package/cli/dist/utils/discovery-paths.js +2 -2
- package/cli/dist/utils/doctor-fix.js +10 -10
- package/cli/dist/utils/doctor-report.js +3 -3
- package/cli/dist/utils/doctor-runtime.js +4 -3
- package/cli/dist/utils/doctor-starlark.js +3 -3
- package/cli/dist/utils/doctor-wiring.js +4 -4
- package/cli/dist/utils/down-cleanup.js +2 -2
- package/cli/dist/utils/env-compat-init.js +8 -0
- package/cli/dist/utils/env-compat.js +27 -0
- package/cli/dist/utils/env-selection.js +9 -9
- package/cli/dist/utils/errors.js +13 -13
- package/cli/dist/utils/file-helpers.js +5 -5
- package/cli/dist/utils/{tdk-version.js → flisk-version.js} +8 -8
- package/cli/dist/utils/generated-paths.js +6 -6
- package/cli/dist/utils/host-port-config.js +10 -10
- package/cli/dist/utils/host-port-plan.js +3 -3
- package/cli/dist/utils/machine-output.js +2 -2
- package/cli/dist/utils/native-windows.js +1 -1
- package/cli/dist/utils/paths.js +3 -3
- package/cli/dist/utils/platform.js +9 -9
- package/cli/dist/utils/port-conflict-fix.js +3 -3
- package/cli/dist/utils/port-fallback-notice.js +3 -3
- package/cli/dist/utils/project-config-defaults.js +1 -1
- package/cli/dist/utils/project-features.js +2 -2
- package/cli/dist/utils/resource-features.js +3 -3
- package/cli/dist/utils/runtime-layout.js +65 -0
- package/cli/dist/utils/schema-version-gate.js +3 -2
- package/cli/dist/utils/service-urls.js +3 -3
- package/cli/dist/utils/services.js +2 -2
- package/cli/dist/utils/shared-infra.js +2 -2
- package/cli/dist/utils/shared-platform-postgres.js +6 -6
- package/cli/dist/utils/tar.js +1 -1
- package/cli/dist/utils/tilt.js +1 -1
- package/cli/dist/utils/up-readiness.js +1 -1
- package/cli/dist/utils/windows-doctor.js +3 -3
- package/cli/dist-bundle/{chunk-YZRPX76N.js → chunk-3J6XI3NX.js} +1 -1
- package/cli/dist-bundle/chunk-7HR5PVOD.js +54 -0
- package/cli/dist-bundle/{chunk-FAHNFTWN.js → chunk-7IXBBU27.js} +2 -2
- package/cli/dist-bundle/chunk-BB5BZ37Y.js +10 -0
- package/cli/dist-bundle/{chunk-SLKTM6ZO.js → chunk-DUNCELUK.js} +14 -14
- package/cli/dist-bundle/chunk-K6SOCO6V.js +3 -0
- package/cli/dist-bundle/{chunk-D2DIEX5E.js → chunk-KJOCVAMQ.js} +2 -2
- package/cli/dist-bundle/{chunk-6EA4DGCY.js → chunk-KJZUBHLO.js} +1 -1
- package/cli/dist-bundle/chunk-L6U555CJ.js +61 -0
- package/cli/dist-bundle/chunk-M2R464RM.js +7 -0
- package/cli/dist-bundle/{chunk-GOEBYLFN.js → chunk-MINZ25AC.js} +1 -1
- package/cli/dist-bundle/chunk-RX6O3PG4.js +2 -0
- package/cli/dist-bundle/chunk-SRN64OPO.js +35 -0
- package/cli/dist-bundle/chunk-TZNXL3IO.js +2 -0
- package/cli/dist-bundle/{chunk-5LRMAY67.js → chunk-UJXR6MZ2.js} +13 -13
- package/cli/dist-bundle/{chunk-AGXA5DOQ.js → chunk-VRESY4NR.js} +3 -3
- package/cli/dist-bundle/{chunk-53M5D4KE.js → chunk-XD3BBFZB.js} +1 -1
- package/cli/dist-bundle/{chunk-GIMHTZNR.js → chunk-YL56J2WX.js} +1 -1
- package/cli/dist-bundle/cli.js +254 -254
- package/cli/dist-bundle/cold-preflight-BBDDHWRV.js +2 -0
- package/cli/dist-bundle/colima-GBURKN54.js +2 -0
- package/cli/dist-bundle/{demo-stage-ANHJKDZC.js → demo-stage-HIHO4VV3.js} +2 -2
- package/cli/dist-bundle/{devtools-MGITLOWZ.js → devtools-ZD6XIOLD.js} +2 -2
- package/cli/dist-bundle/extension-fetch-VEFSCG4B.js +2 -0
- package/cli/dist-bundle/native-windows-BWVEYVPO.js +2 -0
- package/cli/dist-bundle/{one-command-P6XVAXWV.js → one-command-VNKQAMFJ.js} +2 -2
- package/cli/dist-bundle/open-W3QX35R6.js +2 -0
- package/cli/dist-bundle/project-FW5LL2KM.js +2 -0
- package/cli/dist-bundle/project-templates-EYSQG2EO.js +2 -0
- package/cli/dist-bundle/{services-CBXN4SXC.js → services-RGTQ2LXC.js} +2 -2
- package/cli/dist-bundle/{stack-progress-6GO2TCRH.js → stack-progress-NIFM5T2K.js} +2 -2
- package/cli/dist-bundle/tilt-port-owner-6DO7OJRR.js +2 -0
- package/cli/dist-bundle/url-actions-HXJLBTX6.js +2 -0
- package/cli/package.json +5 -5
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +2 -2
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +2 -2
- package/cli/templates/.tiltignore.hbs +2 -2
- package/cli/templates/TILT_RESOURCE_DEFAULTS.star.hbs +1 -1
- package/cli/templates/TILT_TECH_STACK.star.hbs +1 -1
- package/cli/templates/Tiltfile.hbs +21 -21
- package/cli/templates/spec.master.hbs +4 -4
- package/examples/tdk-example/LICENSE +1 -1
- package/examples/tdk-example/Tiltfile +10 -10
- package/examples/tdk-example/services/platform/messaging/docker-compose.yml +7 -7
- package/examples/tdk-example/services/shop/orders-api/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-api/src/index.ts +1 -1
- package/examples/tdk-example/services/shop/orders-app/index.html +1 -1
- package/examples/tdk-example/services/shop/orders-worker/service.json +1 -1
- package/examples/tdk-example/services/shop/orders-worker/src/index.ts +1 -1
- package/package.json +39 -12
- package/{Tiltfile → runtime/Tiltfile} +9 -5
- package/{discovery → runtime/discovery}/AGENTS.md +1 -1
- package/{discovery → runtime/discovery}/TILT_DISCOVERY.star +5 -5
- package/{discovery → runtime/discovery}/Tiltfile +5 -5
- package/{discovery → runtime/discovery}/config.star +5 -5
- package/{discovery → runtime/discovery}/constants.star +14 -14
- package/{discovery → runtime/discovery}/deterministic.star +1 -1
- package/{discovery → runtime/discovery}/discovery_daemon.star +2 -2
- package/{discovery → runtime/discovery}/discovery_orchestrator.star +17 -17
- package/{discovery → runtime/discovery}/identity-management-backend/service.yaml +2 -2
- package/{discovery → runtime/discovery}/incremental_discovery.star +1 -1
- package/{discovery → runtime/discovery}/json_manifest_scanner.star +2 -2
- package/{discovery → runtime/discovery}/libraries.star +1 -1
- package/{discovery → runtime/discovery}/manifest/constants.star +1 -1
- package/{discovery → runtime/discovery}/manifest/loading.star +7 -7
- package/{discovery → runtime/discovery}/manifest/normalize.star +12 -15
- package/{discovery → runtime/discovery}/registry.star +11 -11
- package/{discovery → runtime/discovery}/resource_snapshot.py +2 -2
- package/{discovery → runtime/discovery}/resource_snapshot.star +6 -6
- package/{discovery → runtime/discovery}/services/platform/orchestrator/orchestrator-glue-backend/service.yaml +2 -2
- package/{engine → runtime/engine}/AGENTS.md +6 -6
- package/{engine → runtime/engine}/README.md +2 -2
- package/{engine → runtime/engine}/Tiltfile +5 -5
- package/{engine → runtime/engine}/assets/docker/golden-layers.Dockerfile +17 -17
- package/{engine → runtime/engine}/assets/docker/wake-gateway/Dockerfile +7 -0
- package/{engine → runtime/engine}/entrypoint.star +1 -1
- package/{engine → runtime/engine}/paths.star +5 -5
- package/{engine → runtime/engine}/schemas/project-schema.json +2 -2
- package/{engine → runtime/engine}/schemas/service-schema.json +5 -5
- package/{engine → runtime/engine}/scripts/debug-container.sh +3 -3
- package/{engine → runtime/engine}/spec.master +3 -3
- package/{engine → runtime/engine}/topologies/README.md +3 -3
- package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_build.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_constants.star +7 -7
- package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image_dockerfile.star +8 -8
- package/{engine → runtime/engine}/topologies/platform/docker/compose/compose.star +12 -12
- package/{engine → runtime/engine}/topologies/platform/docker/compose/traefik_standalone.star +21 -6
- package/{engine → runtime/engine}/topologies/platform/docker/config/healthcheck.star +7 -7
- package/{engine → runtime/engine}/topologies/platform/docker/constants.star +7 -7
- package/{engine → runtime/engine}/topologies/platform/docker/dockerfile/language_dockerfile.star +3 -3
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l1_base_layers.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l2_dependency_layers.star +14 -14
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l3_builder_layers.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/layers/l4_runtime_layers.star +8 -8
- package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/constants.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/networking/api_path_constants.star +5 -5
- package/{engine → runtime/engine}/topologies/platform/docker/networking/sablier_container_cycle.star +1 -1
- package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik_static_routes.star +1 -1
- package/{engine → runtime/engine}/topologies/platform/docker/secrets/env_secrets.star +2 -2
- package/{engine → runtime/engine}/topologies/platform/docker/secrets/infisical.star +4 -4
- package/{engine → runtime/engine}/topologies/platform/registries/verdaccio_loader.star +1 -1
- package/{engine → runtime/engine}/topologies/platform/security/secrets.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/common/utils.star +9 -10
- package/{engine → runtime/engine}/topologies/tilt/common/utils_debug.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/common/utils_deterministic.star +2 -2
- package/{engine → runtime/engine}/topologies/tilt/common/utils_env.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/config/profiles.star +4 -4
- package/{engine → runtime/engine}/topologies/tilt/generators/agents_md.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/infisical/README.md +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/infisical/organization.star +6 -6
- package/{engine → runtime/engine}/topologies/tilt/generators/npmrc.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/generators/typescript/backend_tsconfig.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/typescript/playwright_config.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/generators/vite/helpers.star +7 -7
- package/{engine → runtime/engine}/topologies/tilt/generators/vite/templates.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/manifest/json_to_yaml.py +2 -2
- package/{engine → runtime/engine}/topologies/tilt/manifest/loader.star +2 -2
- package/{engine → runtime/engine}/topologies/tilt/manifest/schema.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/manifest/yaml_to_json.py +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/build_concurrency.star +3 -3
- package/{engine → runtime/engine}/topologies/tilt/resources/databases.star +7 -6
- package/{engine → runtime/engine}/topologies/tilt/resources/infra-loader.star +12 -12
- package/{engine → runtime/engine}/topologies/tilt/resources/libs_paths.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/libs_resource_definition.star +2 -2
- package/{engine → runtime/engine}/topologies/tilt/resources/libs_setup.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +36 -28
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +1 -1
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/frontend.star +5 -5
- package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +4 -4
- package/{engine → runtime/engine}/topologies/tilt/resources/watchers.star +20 -20
- package/{engine → runtime/engine}/where-things-live.star +5 -5
- package/{ext → runtime/ext}/Tiltfile +5 -5
- package/{ext → runtime/ext}/ide-components/code_viewer/server.py +1 -1
- package/{ext → runtime/ext}/ide-components/config_inspector/server.py +2 -2
- package/{ext → runtime/ext}/ide-components/file_browser/server.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/config_service.py +2 -2
- package/{ext → runtime/ext}/ide-components/shared/file_utils.py +2 -2
- package/{ext → runtime/ext}/ide-components/shared/http_utils.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/syntax_highlighter.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/template_engine.py +1 -1
- package/{ext → runtime/ext}/ide-components/shared/templates/base.html +1 -1
- package/{ext → runtime/ext}/ide-components/shared/tilt_integration.py +1 -1
- package/{ext → runtime/ext}/ui-enhancements/tiltfile.py +1 -1
- package/runtime/platform/services/platform/proxy/service.yaml +14 -0
- package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/infisical-entrypoint.sh +2 -2
- package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/install-deps.sh +2 -2
- package/cli/dist/commands/__tests__/project-e2e-helpers.js +0 -49
- package/cli/dist/commands/__tests__/ui-loading-screen.test.js +0 -16
- package/cli/dist/generator/__tests__/golden-helpers.js +0 -43
- package/cli/dist-bundle/chunk-42IVF3YT.js +0 -3
- package/cli/dist-bundle/chunk-AT5MFZ3D.js +0 -10
- package/cli/dist-bundle/chunk-BHWJU6HY.js +0 -2
- package/cli/dist-bundle/chunk-DWR3LLHS.js +0 -2
- package/cli/dist-bundle/chunk-GB6DJJ5N.js +0 -57
- package/cli/dist-bundle/chunk-ODYL6LET.js +0 -52
- package/cli/dist-bundle/chunk-YTXQPTCN.js +0 -35
- package/cli/dist-bundle/chunk-Z2C55UFP.js +0 -7
- package/cli/dist-bundle/cold-preflight-7PFKXNK7.js +0 -2
- package/cli/dist-bundle/colima-SVZX2UML.js +0 -2
- package/cli/dist-bundle/extension-fetch-6XNTDF44.js +0 -2
- package/cli/dist-bundle/native-windows-X5XVLFJS.js +0 -2
- package/cli/dist-bundle/open-VJZ7W4JR.js +0 -2
- package/cli/dist-bundle/project-QSH7LOWI.js +0 -2
- package/cli/dist-bundle/project-templates-JDRE7AVL.js +0 -2
- package/cli/dist-bundle/tilt-port-owner-SMN5SAQJ.js +0 -2
- package/cli/dist-bundle/url-actions-D6ROTHZG.js +0 -2
- package/discovery/test_resource_snapshot.py +0 -253
- package/engine/assets/docker/wake-gateway/decide.test.ts +0 -177
- package/engine/topologies/tilt/manifest/tests/test_integration.star +0 -278
- package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +0 -475
- package/engine/topologies/tilt/manifest/tests/test_manifest.star +0 -319
- package/engine/topologies/tilt/manifest/tests/test_validator.star +0 -472
- package/ext/ide-components/shared/test_config_service.py +0 -328
- /package/cli/bin/{tdk.js → flisk.js} +0 -0
- /package/{discovery → runtime/discovery}/filtering.star +0 -0
- /package/{discovery → runtime/discovery}/identity-management-frontend/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/identity-sdk/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/indexing.star +0 -0
- /package/{discovery → runtime/discovery}/loading.star +0 -0
- /package/{discovery → runtime/discovery}/manifest/validation.star +0 -0
- /package/{discovery → runtime/discovery}/normalization.star +0 -0
- /package/{discovery → runtime/discovery}/schemas.star +0 -0
- /package/{discovery → runtime/discovery}/services/platform/cdc/debezium/nats-connector/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/services/platform/cdc/nats-http-bridge/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/services/platform/synthetic-monitor/service.yaml +0 -0
- /package/{discovery → runtime/discovery}/validation.star +0 -0
- /package/{discovery → runtime/discovery}/versioning.star +0 -0
- /package/{engine → runtime/engine}/REFACTORING_MANIFEST_SYSTEM.md +0 -0
- /package/{engine → runtime/engine}/assets/docker/wake-gateway/decide.ts +0 -0
- /package/{engine → runtime/engine}/assets/docker/wake-gateway/server.ts +0 -0
- /package/{engine → runtime/engine}/assets/scripts/cleanup-completed-migrator-images.sh +0 -0
- /package/{engine → runtime/engine}/assets/scripts/cleanup-tilt-images.sh +0 -0
- /package/{engine → runtime/engine}/assets/scripts/mac-m1-resource-monitor.sh +0 -0
- /package/{engine → runtime/engine}/config.star +0 -0
- /package/{engine → runtime/engine}/lifecycle/orchestrator.star +0 -0
- /package/{engine → runtime/engine}/scripts/README.md +0 -0
- /package/{engine → runtime/engine}/scripts/build-and-publish-lib.sh +0 -0
- /package/{engine → runtime/engine}/scripts/check-lib-publish.sh +0 -0
- /package/{engine → runtime/engine}/scripts/generate-manifest.sh +0 -0
- /package/{engine → runtime/engine}/spec.master.example +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/auth/auth.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/build/frontend_build_plan.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/build/golden_image.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/compose/compose_helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/compose/unsafe_value.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/config/bunignore.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/config/dockerignore.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/dockerfile/dockerfile.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/generators/golden_docker_generator_v2.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/bun_helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/infisical/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/infisical/infisical_docker.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/db_readiness.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/filesystem_setup.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/migrate_script.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/prisma_build.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/prisma_runtime.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/layers/prisma/secret_resolution.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik_constants.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/docker/networking/traefik_helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/net/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/net/proxy.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/registries/local.star +0 -0
- /package/{engine → runtime/engine}/topologies/platform/security/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/state/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/platform/state/relational.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/common/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/common/utils_docker_networks.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/common/utils_output.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/defaults.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/feature_flags.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/config/global.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/api_gateway.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/examples.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/machine_identity.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/path_manager.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/infisical/secrets_generator.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/nginx_conf.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/backend_library_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/common.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/frontend_library_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/frontend_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/include.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/typescript/prisma_config.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/validators.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/backend.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/lit.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/preact.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/qwik.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/react.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/solid.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/svelte.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/vanilla.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frameworks/vue.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/frontend.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/generators.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/library.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite/sdk.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/generators/vite_config.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/README.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/__init__.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/constants.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/errors.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/integration.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/mapper.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/parser.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/validator.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/conditions.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/declaration.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/deps.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/libs.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/libs_discovery.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/libs_tsconfig.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_manifest_orchestration.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_resource_validation.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/apply_runtime_flags.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/builders/typescript.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/dependencies/AGENTS.md +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/dependencies/index.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/dependencies/resolver.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/generators/env.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator/helpers.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/orchestrator.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/ordering.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/shared-platform-postgres.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/resources/triggers.star +0 -0
- /package/{ext → runtime/ext}/ide-components/README.md +0 -0
- /package/{ext → runtime/ext}/ide-components/shared/static/styles.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/cron-status-server.sh +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/cron-status-tracker.sh +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/extension.yaml +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/cron-jobs-tab.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/help-panel.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/icons.css +0 -0
- /package/{ext → runtime/ext}/ui-enhancements/ui/tooltips.css +0 -0
- /package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/bun-hoisted-symlink-fix.sh +0 -0
- /package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/prisma-bun-client-link-fix.sh +0 -0
- /package/{shared-platform-engineering → runtime/shared-platform-engineering}/docker-templates/prisma-normalize-client.sh +0 -0
- /package/{specs → runtime/specs}/specs/TILT_SERVICE_DEFAULTS.star +0 -0
- /package/{specs → runtime/specs}/specs/TILT_TECH_STACK.star +0 -0
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
# =============================================================================
|
|
4
|
-
# 📋 MANIFEST MODULE - VALIDATOR TESTS (Phase 3)
|
|
5
|
-
# =============================================================================
|
|
6
|
-
# Path: .tilt/topologies/tilt/manifest/tests/test_validator.star
|
|
7
|
-
# Purpose: Integration tests for validator module
|
|
8
|
-
# Status: Phase 3 of manifest system refactoring
|
|
9
|
-
# =============================================================================
|
|
10
|
-
|
|
11
|
-
load("../__init__.star", "Manifest")
|
|
12
|
-
load("../validator.star", "ManifestValidator")
|
|
13
|
-
|
|
14
|
-
# =============================================================================
|
|
15
|
-
# TEST FRAMEWORK
|
|
16
|
-
# =============================================================================
|
|
17
|
-
|
|
18
|
-
test_results = {
|
|
19
|
-
'passed': 0,
|
|
20
|
-
'failed': 0,
|
|
21
|
-
'errors': [],
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
def assert_true(condition, message="Assertion failed"):
|
|
25
|
-
"""Assert that condition is true."""
|
|
26
|
-
if not condition:
|
|
27
|
-
test_results['failed'] += 1
|
|
28
|
-
test_results['errors'].append("FAIL: " + message)
|
|
29
|
-
else:
|
|
30
|
-
test_results['passed'] += 1
|
|
31
|
-
|
|
32
|
-
def assert_equal(expected, actual, message="Values not equal"):
|
|
33
|
-
"""Assert that expected equals actual."""
|
|
34
|
-
if expected != actual:
|
|
35
|
-
test_results['failed'] += 1
|
|
36
|
-
test_results['errors'].append(
|
|
37
|
-
"FAIL: {} - expected '{}', got '{}'".format(message, expected, actual)
|
|
38
|
-
)
|
|
39
|
-
else:
|
|
40
|
-
test_results['passed'] += 1
|
|
41
|
-
|
|
42
|
-
def assert_not_none(value, message="Value is None"):
|
|
43
|
-
"""Assert that value is not None."""
|
|
44
|
-
if value == None:
|
|
45
|
-
test_results['failed'] += 1
|
|
46
|
-
test_results['errors'].append("FAIL: " + message)
|
|
47
|
-
else:
|
|
48
|
-
test_results['passed'] += 1
|
|
49
|
-
|
|
50
|
-
# =============================================================================
|
|
51
|
-
# TEST SUITE: Validator Functions
|
|
52
|
-
# =============================================================================
|
|
53
|
-
|
|
54
|
-
def _test_validator_functions():
|
|
55
|
-
"""Test that validator functions are accessible."""
|
|
56
|
-
print("🔍 Testing validator module accessibility...")
|
|
57
|
-
|
|
58
|
-
# Test functions accessible via facade
|
|
59
|
-
assert_not_none(Manifest.validate, "validate should be accessible")
|
|
60
|
-
assert_not_none(Manifest.is_valid, "is_valid should be accessible")
|
|
61
|
-
assert_not_none(Manifest.get_validation_report, "get_validation_report should be accessible")
|
|
62
|
-
assert_not_none(Manifest.validate_schema, "validate_schema should be accessible")
|
|
63
|
-
assert_not_none(Manifest.validate_values, "validate_values should be accessible")
|
|
64
|
-
assert_not_none(Manifest.validate_dependencies, "validate_dependencies should be accessible")
|
|
65
|
-
|
|
66
|
-
print("✅ Validator functions accessible\n")
|
|
67
|
-
|
|
68
|
-
# =============================================================================
|
|
69
|
-
# TEST SUITE: Schema Validation
|
|
70
|
-
# =============================================================================
|
|
71
|
-
|
|
72
|
-
def _test_schema_validation():
|
|
73
|
-
"""Test schema-level validation."""
|
|
74
|
-
print("🔍 Testing schema validation...")
|
|
75
|
-
|
|
76
|
-
# Valid manifest
|
|
77
|
-
valid_manifest = {
|
|
78
|
-
'appName': 'test-service',
|
|
79
|
-
'appType': 'backend',
|
|
80
|
-
'stack': 'user',
|
|
81
|
-
'port': 4001,
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
result = Manifest.validate_schema(valid_manifest)
|
|
85
|
-
assert_true(result.valid, "Valid manifest should pass schema validation")
|
|
86
|
-
assert_equal(0, len(result.errors), "Valid manifest should have no errors")
|
|
87
|
-
|
|
88
|
-
# Missing required field
|
|
89
|
-
invalid_manifest = {
|
|
90
|
-
'appType': 'backend',
|
|
91
|
-
'stack': 'user',
|
|
92
|
-
'port': 4001,
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
result = Manifest.validate_schema(invalid_manifest)
|
|
96
|
-
assert_true(not result.valid, "Missing required field should fail")
|
|
97
|
-
assert_true(len(result.errors) > 0, "Should have errors for missing appName")
|
|
98
|
-
|
|
99
|
-
# Invalid type
|
|
100
|
-
wrong_type_manifest = {
|
|
101
|
-
'appName': 'test-service',
|
|
102
|
-
'appType': 'invalid-type',
|
|
103
|
-
'stack': 'user',
|
|
104
|
-
'port': 4001,
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
result = Manifest.validate_schema(wrong_type_manifest)
|
|
108
|
-
# Note: Type checking might be lenient in initial implementation
|
|
109
|
-
|
|
110
|
-
print("✅ Schema validation tests complete\n")
|
|
111
|
-
|
|
112
|
-
# =============================================================================
|
|
113
|
-
# TEST SUITE: Value Validation
|
|
114
|
-
# =============================================================================
|
|
115
|
-
|
|
116
|
-
def _test_value_validation():
|
|
117
|
-
"""Test value-level validation."""
|
|
118
|
-
print("🔍 Testing value validation...")
|
|
119
|
-
|
|
120
|
-
# Invalid port (too low)
|
|
121
|
-
manifest_low_port = {
|
|
122
|
-
'appName': 'test-service',
|
|
123
|
-
'appType': 'backend',
|
|
124
|
-
'stack': 'user',
|
|
125
|
-
'port': 100, # Invalid: below 1024
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
result = Manifest.validate_values(manifest_low_port)
|
|
129
|
-
assert_true(not result.valid or len(result.errors) > 0, "Port too low should fail")
|
|
130
|
-
|
|
131
|
-
# Invalid port (too high)
|
|
132
|
-
manifest_high_port = {
|
|
133
|
-
'appName': 'test-service',
|
|
134
|
-
'appType': 'backend',
|
|
135
|
-
'stack': 'user',
|
|
136
|
-
'port': 70000, # Invalid: above 65535
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
result = Manifest.validate_values(manifest_high_port)
|
|
140
|
-
assert_true(not result.valid or len(result.errors) > 0, "Port too high should fail")
|
|
141
|
-
|
|
142
|
-
# Valid port
|
|
143
|
-
manifest_valid_port = {
|
|
144
|
-
'appName': 'test-service',
|
|
145
|
-
'appType': 'backend',
|
|
146
|
-
'stack': 'user',
|
|
147
|
-
'port': 4001,
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
result = Manifest.validate_values(manifest_valid_port)
|
|
151
|
-
# Valid port should not have errors (might have warnings)
|
|
152
|
-
|
|
153
|
-
# Invalid appName format
|
|
154
|
-
manifest_bad_name = {
|
|
155
|
-
'appName': 'TestService', # Invalid: uppercase
|
|
156
|
-
'appType': 'backend',
|
|
157
|
-
'stack': 'user',
|
|
158
|
-
'port': 4001,
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
result = Manifest.validate_values(manifest_bad_name)
|
|
162
|
-
assert_true(len(result.errors) > 0 or len(result.warnings) > 0,
|
|
163
|
-
"Invalid appName format should produce error or warning")
|
|
164
|
-
|
|
165
|
-
# Too many replicas
|
|
166
|
-
manifest_many_replicas = {
|
|
167
|
-
'appName': 'test-service',
|
|
168
|
-
'appType': 'backend',
|
|
169
|
-
'stack': 'user',
|
|
170
|
-
'port': 4001,
|
|
171
|
-
'replicas': 10, # Exceeds max
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
result = Manifest.validate_values(manifest_many_replicas)
|
|
175
|
-
# Should fail or warn
|
|
176
|
-
|
|
177
|
-
print("✅ Value validation tests complete\n")
|
|
178
|
-
|
|
179
|
-
# =============================================================================
|
|
180
|
-
# TEST SUITE: Cross-Field Validation
|
|
181
|
-
# =============================================================================
|
|
182
|
-
|
|
183
|
-
def _test_cross_field_validation():
|
|
184
|
-
"""Test cross-field validation."""
|
|
185
|
-
print("🔍 Testing cross-field validation...")
|
|
186
|
-
|
|
187
|
-
# Frontend without backendName
|
|
188
|
-
frontend_no_backend = {
|
|
189
|
-
'appName': 'test-frontend',
|
|
190
|
-
'appType': 'frontend',
|
|
191
|
-
'stack': 'user',
|
|
192
|
-
'port': 3000,
|
|
193
|
-
# Missing backendName
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
result = Manifest.validate(frontend_no_backend, level='cross_field')
|
|
197
|
-
assert_true(len(result.errors) > 0, "Frontend without backendName should fail")
|
|
198
|
-
|
|
199
|
-
# Valid frontend
|
|
200
|
-
frontend_valid = {
|
|
201
|
-
'appName': 'test-frontend',
|
|
202
|
-
'appType': 'frontend',
|
|
203
|
-
'stack': 'user',
|
|
204
|
-
'port': 3000,
|
|
205
|
-
'backendName': 'test-backend',
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
result = Manifest.validate(frontend_valid, level='cross_field')
|
|
209
|
-
assert_true(len([e for e in result.errors if 'backendName' in str(e)]) == 0,
|
|
210
|
-
"Valid frontend should not have backend errors")
|
|
211
|
-
|
|
212
|
-
# Prisma without databaseName (warning)
|
|
213
|
-
prisma_no_db = {
|
|
214
|
-
'appName': 'test-service',
|
|
215
|
-
'appType': 'backend',
|
|
216
|
-
'stack': 'user',
|
|
217
|
-
'port': 4001,
|
|
218
|
-
'featuresEnabled': ['prisma'],
|
|
219
|
-
# Missing databaseName
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
result = Manifest.validate(prisma_no_db, level='cross_field')
|
|
223
|
-
# Should have warning but not necessarily error
|
|
224
|
-
|
|
225
|
-
print("✅ Cross-field validation tests complete\n")
|
|
226
|
-
|
|
227
|
-
# =============================================================================
|
|
228
|
-
# TEST SUITE: Cross-Service Validation
|
|
229
|
-
# =============================================================================
|
|
230
|
-
|
|
231
|
-
def _test_cross_resource_validation():
|
|
232
|
-
"""Test cross-service validation."""
|
|
233
|
-
print("🔍 Testing cross-service validation...")
|
|
234
|
-
|
|
235
|
-
# Create a set of manifests
|
|
236
|
-
manifests = [
|
|
237
|
-
{
|
|
238
|
-
'appName': 'identity-backend',
|
|
239
|
-
'appType': 'backend',
|
|
240
|
-
'stack': 'identity',
|
|
241
|
-
'port': 4004,
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
'appName': 'user-backend',
|
|
245
|
-
'appType': 'backend',
|
|
246
|
-
'stack': 'user',
|
|
247
|
-
'port': 4000,
|
|
248
|
-
'dependsOn': ['identity-backend'], # Valid
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
'appName': 'user-frontend',
|
|
252
|
-
'appType': 'frontend',
|
|
253
|
-
'stack': 'user',
|
|
254
|
-
'port': 3000,
|
|
255
|
-
'backendName': 'user-backend', # Valid
|
|
256
|
-
},
|
|
257
|
-
]
|
|
258
|
-
|
|
259
|
-
# Test valid dependency
|
|
260
|
-
user_manifest = manifests[1]
|
|
261
|
-
result = Manifest.validate_dependencies(user_manifest, manifests)
|
|
262
|
-
assert_true(result.valid, "Valid dependency should pass")
|
|
263
|
-
|
|
264
|
-
# Test invalid dependency
|
|
265
|
-
bad_dep_manifest = {
|
|
266
|
-
'appName': 'bad-service',
|
|
267
|
-
'appType': 'backend',
|
|
268
|
-
'stack': 'user',
|
|
269
|
-
'port': 4002,
|
|
270
|
-
'dependsOn': ['nonexistent-service'], # Invalid
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
result = Manifest.validate_dependencies(bad_dep_manifest, manifests)
|
|
274
|
-
assert_true(len(result.errors) > 0, "Invalid dependency should fail")
|
|
275
|
-
|
|
276
|
-
# Test port conflict
|
|
277
|
-
conflict_manifest = {
|
|
278
|
-
'appName': 'conflict-service',
|
|
279
|
-
'appType': 'backend',
|
|
280
|
-
'stack': 'user',
|
|
281
|
-
'port': 4000, # Same as user-backend
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
result = Manifest.validate_dependencies(conflict_manifest, manifests)
|
|
285
|
-
assert_true(len(result.errors) > 0, "Port conflict should fail")
|
|
286
|
-
|
|
287
|
-
# Test frontend with non-existent backend
|
|
288
|
-
bad_frontend = {
|
|
289
|
-
'appName': 'bad-frontend',
|
|
290
|
-
'appType': 'frontend',
|
|
291
|
-
'stack': 'user',
|
|
292
|
-
'port': 3001,
|
|
293
|
-
'backendName': 'nonexistent-backend',
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
result = Manifest.validate_dependencies(bad_frontend, manifests)
|
|
297
|
-
assert_true(len(result.errors) > 0, "Frontend with bad backend should fail")
|
|
298
|
-
|
|
299
|
-
print("✅ Cross-service validation tests complete\n")
|
|
300
|
-
|
|
301
|
-
# =============================================================================
|
|
302
|
-
# TEST SUITE: Full Validation
|
|
303
|
-
# =============================================================================
|
|
304
|
-
|
|
305
|
-
def _test_full_validation():
|
|
306
|
-
"""Test full validation at all levels."""
|
|
307
|
-
print("🔍 Testing full validation...")
|
|
308
|
-
|
|
309
|
-
# Valid complete manifest
|
|
310
|
-
valid_manifest = {
|
|
311
|
-
'appName': 'user-management-backend',
|
|
312
|
-
'appType': 'backend',
|
|
313
|
-
'stack': 'user',
|
|
314
|
-
'port': 4000,
|
|
315
|
-
'replicas': 1,
|
|
316
|
-
'runtime': 'bun',
|
|
317
|
-
'featuresEnabled': ['nats', 'prisma'],
|
|
318
|
-
'databaseName': 'Flisk_user',
|
|
319
|
-
'dependsOn': [],
|
|
320
|
-
'traefik': {
|
|
321
|
-
'pathPrefix': '/api/v1/users',
|
|
322
|
-
'priority': 100,
|
|
323
|
-
},
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
result = Manifest.validate(valid_manifest, level='all')
|
|
327
|
-
|
|
328
|
-
# Should be valid (may have warnings but no errors)
|
|
329
|
-
assert_true(len([e for e in result.errors if e.severity == 'error' or e.severity == 'critical']) == 0,
|
|
330
|
-
"Valid manifest should not have critical errors")
|
|
331
|
-
|
|
332
|
-
# Check stats
|
|
333
|
-
assert_true(result.stats['fields_checked'] > 0, "Should check fields")
|
|
334
|
-
|
|
335
|
-
print("✅ Full validation tests complete\n")
|
|
336
|
-
|
|
337
|
-
# =============================================================================
|
|
338
|
-
# TEST SUITE: is_valid Convenience Function
|
|
339
|
-
# =============================================================================
|
|
340
|
-
|
|
341
|
-
def _test_is_valid():
|
|
342
|
-
"""Test the is_valid convenience function."""
|
|
343
|
-
print("🔍 Testing is_valid function...")
|
|
344
|
-
|
|
345
|
-
valid = {
|
|
346
|
-
'appName': 'test-service',
|
|
347
|
-
'appType': 'backend',
|
|
348
|
-
'stack': 'user',
|
|
349
|
-
'port': 4001,
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
result = Manifest.is_valid(valid)
|
|
353
|
-
assert_true(result, "Valid manifest should return True from is_valid")
|
|
354
|
-
|
|
355
|
-
invalid = {
|
|
356
|
-
'appType': 'backend', # Missing appName
|
|
357
|
-
'stack': 'user',
|
|
358
|
-
'port': 4001,
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
result = Manifest.is_valid(invalid)
|
|
362
|
-
assert_true(not result, "Invalid manifest should return False from is_valid")
|
|
363
|
-
|
|
364
|
-
print("✅ is_valid tests complete\n")
|
|
365
|
-
|
|
366
|
-
# =============================================================================
|
|
367
|
-
# TEST SUITE: Validation Report
|
|
368
|
-
# =============================================================================
|
|
369
|
-
|
|
370
|
-
def _test_validation_report():
|
|
371
|
-
"""Test validation report generation."""
|
|
372
|
-
print("🔍 Testing validation report...")
|
|
373
|
-
|
|
374
|
-
manifest = {
|
|
375
|
-
'appName': 'test-service',
|
|
376
|
-
'appType': 'backend',
|
|
377
|
-
'stack': 'user',
|
|
378
|
-
'port': 4001,
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
report = Manifest.get_validation_report(manifest)
|
|
382
|
-
|
|
383
|
-
assert_not_none(report, "Report should be generated")
|
|
384
|
-
assert_true('VALIDATION REPORT' in report, "Report should have title")
|
|
385
|
-
assert_true('Status:' in report, "Report should have status")
|
|
386
|
-
|
|
387
|
-
# Test with errors
|
|
388
|
-
bad_manifest = {
|
|
389
|
-
'appType': 'backend', # Missing required fields
|
|
390
|
-
'stack': 'user',
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
report = Manifest.get_validation_report(bad_manifest)
|
|
394
|
-
assert_true('FAILED' in report or 'failed' in report.lower(),
|
|
395
|
-
"Report should show failure for invalid manifest")
|
|
396
|
-
|
|
397
|
-
print("✅ Validation report tests complete\n")
|
|
398
|
-
|
|
399
|
-
# =============================================================================
|
|
400
|
-
# TEST SUITE: Strict Mode
|
|
401
|
-
# =============================================================================
|
|
402
|
-
|
|
403
|
-
def _test_strict_mode():
|
|
404
|
-
"""Test strict mode (warnings as errors)."""
|
|
405
|
-
print("🔍 Testing strict mode...")
|
|
406
|
-
|
|
407
|
-
# Manifest with warnings
|
|
408
|
-
manifest = {
|
|
409
|
-
'appName': 'test-service',
|
|
410
|
-
'appType': 'frontend',
|
|
411
|
-
'stack': 'user',
|
|
412
|
-
'port': 3000,
|
|
413
|
-
'backendName': 'test-backend',
|
|
414
|
-
# Missing basePath - might cause warning
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
# Normal mode
|
|
418
|
-
result_normal = Manifest.validate(manifest, level='all')
|
|
419
|
-
|
|
420
|
-
# Strict mode
|
|
421
|
-
result_strict = Manifest.validate(manifest, context={'strict': True}, level='all')
|
|
422
|
-
|
|
423
|
-
# In strict mode, warnings should be converted to errors
|
|
424
|
-
# (This depends on specific validation rules that generate warnings)
|
|
425
|
-
|
|
426
|
-
print("✅ Strict mode tests complete\n")
|
|
427
|
-
|
|
428
|
-
# =============================================================================
|
|
429
|
-
# MAIN
|
|
430
|
-
# =============================================================================
|
|
431
|
-
|
|
432
|
-
def run_tests():
|
|
433
|
-
"""Run all Phase 3 validator tests."""
|
|
434
|
-
print("\n" + "="*70)
|
|
435
|
-
print("📋 MANIFEST MODULE - PHASE 3 VALIDATOR TESTS")
|
|
436
|
-
print("="*70 + "\n")
|
|
437
|
-
|
|
438
|
-
# Run all test suites
|
|
439
|
-
_test_validator_functions()
|
|
440
|
-
_test_schema_validation()
|
|
441
|
-
_test_value_validation()
|
|
442
|
-
_test_cross_field_validation()
|
|
443
|
-
_test_cross_resource_validation()
|
|
444
|
-
_test_full_validation()
|
|
445
|
-
_test_is_valid()
|
|
446
|
-
_test_validation_report()
|
|
447
|
-
_test_strict_mode()
|
|
448
|
-
|
|
449
|
-
# Print results
|
|
450
|
-
print("\n" + "="*70)
|
|
451
|
-
print("📊 TEST RESULTS")
|
|
452
|
-
print("="*70)
|
|
453
|
-
print("✅ Passed: {}".format(test_results['passed']))
|
|
454
|
-
print("❌ Failed: {}".format(test_results['failed']))
|
|
455
|
-
|
|
456
|
-
if test_results['errors']:
|
|
457
|
-
print("\n📝 ERRORS:")
|
|
458
|
-
for error in test_results['errors']:
|
|
459
|
-
print(" " + error)
|
|
460
|
-
else:
|
|
461
|
-
print("\n🎉 All Phase 3 validator tests passed!")
|
|
462
|
-
|
|
463
|
-
print("="*70 + "\n")
|
|
464
|
-
|
|
465
|
-
return test_results['failed'] == 0
|
|
466
|
-
|
|
467
|
-
# Export test runner
|
|
468
|
-
TestValidator = struct(
|
|
469
|
-
run=run_tests,
|
|
470
|
-
)
|
|
471
|
-
|
|
472
|
-
VALIDATION = {}
|