@flisk-sh/flisk 1.3.207 → 1.4.0
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/__tests__/project-e2e-helpers.js +6 -6
- 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 +18 -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 +15 -3
- 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 +66 -53
- 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 +58 -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-D2DIEX5E.js → chunk-36SOQVAL.js} +2 -2
- package/cli/dist-bundle/{chunk-YZRPX76N.js → chunk-3J6XI3NX.js} +1 -1
- package/cli/dist-bundle/chunk-5EZ4EX6U.js +2 -0
- package/cli/dist-bundle/chunk-763VK575.js +54 -0
- package/cli/dist-bundle/{chunk-5LRMAY67.js → chunk-B6Q5VKL7.js} +13 -13
- package/cli/dist-bundle/{chunk-AGXA5DOQ.js → chunk-BWK6MPCB.js} +3 -3
- package/cli/dist-bundle/{chunk-SLKTM6ZO.js → chunk-D7N2GGJH.js} +14 -14
- package/cli/dist-bundle/chunk-HEMPQKD6.js +7 -0
- package/cli/dist-bundle/chunk-ICXF6PXA.js +35 -0
- package/cli/dist-bundle/chunk-K6SOCO6V.js +3 -0
- package/cli/dist-bundle/{chunk-6EA4DGCY.js → chunk-KJZUBHLO.js} +1 -1
- package/cli/dist-bundle/{chunk-GOEBYLFN.js → chunk-MINZ25AC.js} +1 -1
- package/cli/dist-bundle/{chunk-FAHNFTWN.js → chunk-PVBAGX5X.js} +2 -2
- package/cli/dist-bundle/chunk-QQEV6D74.js +2 -0
- package/cli/dist-bundle/chunk-VHFFSBVJ.js +10 -0
- package/cli/dist-bundle/chunk-VMB5673O.js +57 -0
- 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-ABU26DYW.js +2 -0
- package/cli/dist-bundle/colima-GBURKN54.js +2 -0
- package/cli/dist-bundle/{demo-stage-ANHJKDZC.js → demo-stage-EBIUCJBX.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-2KSAF6M2.js +2 -0
- package/cli/dist-bundle/project-YD3C4ZV3.js +2 -0
- package/cli/dist-bundle/project-templates-EYSQG2EO.js +2 -0
- package/cli/dist-bundle/{services-CBXN4SXC.js → services-V6Q55JR5.js} +2 -2
- package/cli/dist-bundle/{stack-progress-6GO2TCRH.js → stack-progress-NIFM5T2K.js} +2 -2
- package/cli/dist-bundle/tilt-port-owner-MWJ7P6NB.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 +29 -11
- 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/{discovery → runtime/discovery}/test_resource_snapshot.py +6 -6
- 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/test_config_service.py +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/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +2 -2
- package/shared-platform-engineering/docker-templates/install-deps.sh +2 -2
- 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/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.test.ts +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/tests/test_integration.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/tests/test_loader_parser.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/tests/test_manifest.star +0 -0
- /package/{engine → runtime/engine}/topologies/tilt/manifest/tests/test_validator.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/{specs → runtime/specs}/specs/TILT_SERVICE_DEFAULTS.star +0 -0
- /package/{specs → runtime/specs}/specs/TILT_TECH_STACK.star +0 -0
|
@@ -22,7 +22,7 @@ export function projectNetworkNames(projectName) {
|
|
|
22
22
|
* `backend` also occur in non-Flisk compose projects, so a prefix counts only if it has a Traefik network, which
|
|
23
23
|
* only Flisk creates.
|
|
24
24
|
*/
|
|
25
|
-
export function
|
|
25
|
+
export function fliskNetworkPrefixes(networkNames) {
|
|
26
26
|
const prefixes = new Set();
|
|
27
27
|
for (const name of networkNames) {
|
|
28
28
|
for (const marker of ["traefik-public", "traefik-private"]) {
|
|
@@ -33,7 +33,7 @@ export function tdkNetworkPrefixes(networkNames) {
|
|
|
33
33
|
return prefixes;
|
|
34
34
|
}
|
|
35
35
|
/** The Flisk project prefix a network belongs to (`umami` for `umami_backend`), or null. */
|
|
36
|
-
export function
|
|
36
|
+
export function fliskNetworkOwner(name, prefixes) {
|
|
37
37
|
for (const suffix of PROJECT_NETWORK_SUFFIXES) {
|
|
38
38
|
if (name.endsWith(`_${suffix}`)) {
|
|
39
39
|
const prefix = name.slice(0, -(suffix.length + 1));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { applyEnvAliases } from "./env-compat.js";
|
|
4
|
+
// Imported first in cli.ts so every later module sees the aliased variables.
|
|
5
|
+
const deprecated = applyEnvAliases(process.env);
|
|
6
|
+
if (deprecated.length > 0 && process.env.FLISK_QUIET_DEPRECATIONS === undefined) {
|
|
7
|
+
console.error(`flisk: ${deprecated.join(", ")} ${deprecated.length > 1 ? "are" : "is"} deprecated; rename the TDK_ prefix to FLISK_ (set FLISK_QUIET_DEPRECATIONS=1 to silence).`);
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
const NEW_PREFIX = "FLISK_";
|
|
4
|
+
const LEGACY_PREFIX = "TDK_";
|
|
5
|
+
/**
|
|
6
|
+
* Bridges the TDK_* → FLISK_* rename. FLISK_X is the preferred name; the engine and
|
|
7
|
+
* subprocesses (Tilt, Starlark) still read TDK_X, so FLISK_X is mirrored onto TDK_X
|
|
8
|
+
* unless TDK_X is already set. Returns the legacy names that were used without a
|
|
9
|
+
* FLISK_ equivalent, so callers can print one deprecation notice.
|
|
10
|
+
*/
|
|
11
|
+
export function applyEnvAliases(env) {
|
|
12
|
+
const deprecated = [];
|
|
13
|
+
for (const key of Object.keys(env)) {
|
|
14
|
+
if (key.startsWith(NEW_PREFIX)) {
|
|
15
|
+
const legacy = LEGACY_PREFIX + key.slice(NEW_PREFIX.length);
|
|
16
|
+
if (env[legacy] === undefined)
|
|
17
|
+
env[legacy] = env[key];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
for (const key of Object.keys(env)) {
|
|
21
|
+
if (key.startsWith(LEGACY_PREFIX) &&
|
|
22
|
+
env[NEW_PREFIX + key.slice(LEGACY_PREFIX.length)] === undefined) {
|
|
23
|
+
deprecated.push(key);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return deprecated;
|
|
27
|
+
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
4
4
|
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { COMPLETED_ENV_VARS, parseEnv } from "./env-validator.js";
|
|
6
|
-
import {
|
|
6
|
+
import { FliskError } from "./errors.js";
|
|
7
7
|
/**
|
|
8
8
|
* The environment variable the engine reads the env file of the run from. The CLI resolves the
|
|
9
9
|
* requested path and exports it, so the engine reads one file for the whole run: the Tilt
|
|
10
10
|
* environment (engine/topologies/tilt/common/utils_env.star) and the Compose interpolation alike.
|
|
11
11
|
*/
|
|
12
|
-
export const PROJECT_ENV_FILE_VAR = "
|
|
12
|
+
export const PROJECT_ENV_FILE_VAR = "FLISK_ENV_FILE";
|
|
13
13
|
/**
|
|
14
14
|
* The keys the platform needs in the env file of a run. They are the keys `completeEnvFile` keeps
|
|
15
15
|
* complete in the project `.env`: the Tilt environment, the Postgres password and the JWT secret.
|
|
@@ -22,9 +22,9 @@ export const ENV_FILE_ERROR_EXIT_CODE = 2;
|
|
|
22
22
|
export const ENV_FILE_ENGINE_EXIT_CODE = 1;
|
|
23
23
|
/**
|
|
24
24
|
* A rejected `--env-file`. It carries a code so a JSON consumer can tell an unusable file from
|
|
25
|
-
* another failure, and it is a
|
|
25
|
+
* another failure, and it is a FliskError so the CLI shows it in the house style.
|
|
26
26
|
*/
|
|
27
|
-
export class EnvFileError extends
|
|
27
|
+
export class EnvFileError extends FliskError {
|
|
28
28
|
code;
|
|
29
29
|
constructor(code, message, suggestions = [], exitCode = ENV_FILE_ERROR_EXIT_CODE) {
|
|
30
30
|
super(message, suggestions, exitCode);
|
|
@@ -52,7 +52,7 @@ export function isInsideProject(projectRoot, path) {
|
|
|
52
52
|
* (which mounts the project read-only and runs Compose itself) can only read a file inside it. A
|
|
53
53
|
* path outside the project would also turn the flag into a way to read any file on the machine.
|
|
54
54
|
*
|
|
55
|
-
* @throws
|
|
55
|
+
* @throws FliskError when the path is empty, leaves the project, or does not exist
|
|
56
56
|
*/
|
|
57
57
|
export function resolveEnvFilePath(projectRoot, requested, options = {}) {
|
|
58
58
|
const trimmed = requested.trim();
|
|
@@ -99,7 +99,7 @@ function realPathOrSelf(path) {
|
|
|
99
99
|
* Reads the env file. The values are secrets, so they are only used to configure the run and to
|
|
100
100
|
* mask output; they are never printed.
|
|
101
101
|
*
|
|
102
|
-
* @throws
|
|
102
|
+
* @throws FliskError when the file cannot be read
|
|
103
103
|
*/
|
|
104
104
|
export function readEnvFileValues(path) {
|
|
105
105
|
let content;
|
|
@@ -122,7 +122,7 @@ export function missingRequiredEnvKeys(values) {
|
|
|
122
122
|
* does not complete it: a file the user named may well be committed, and writing a generated
|
|
123
123
|
* credential into it would leak one.
|
|
124
124
|
*
|
|
125
|
-
* @throws
|
|
125
|
+
* @throws FliskError when the file is unusable or misses a key the platform needs
|
|
126
126
|
*/
|
|
127
127
|
export function selectEnvFile(projectRoot, requested, options = {}) {
|
|
128
128
|
const path = resolveEnvFilePath(projectRoot, requested, options);
|
|
@@ -152,12 +152,12 @@ export function applyEnvFileSelection(selection) {
|
|
|
152
152
|
* The vendored engine copy that resolves the env file of the run. A project vendors it at generation
|
|
153
153
|
* time, so a project created before this option existed runs an engine that ignores the selection.
|
|
154
154
|
*/
|
|
155
|
-
const VENDORED_ENGINE_ENV_FILE = ".
|
|
155
|
+
const VENDORED_ENGINE_ENV_FILE = ".flisk/.flisk-out/flisk-cli-ext/engine/topologies/tilt/common/utils_env.star";
|
|
156
156
|
/**
|
|
157
157
|
* Refuses the run when the project's vendored engine cannot honour the selection. Without this check
|
|
158
158
|
* the flag would be ignored silently and the run would use the project .env after all.
|
|
159
159
|
*
|
|
160
|
-
* @throws
|
|
160
|
+
* @throws FliskError when the vendored engine is older than this option
|
|
161
161
|
*/
|
|
162
162
|
export function assertEngineSupportsEnvFile(projectRoot) {
|
|
163
163
|
const vendored = resolve(projectRoot, VENDORED_ENGINE_ENV_FILE);
|
package/cli/dist/utils/errors.js
CHANGED
|
@@ -10,17 +10,17 @@ export function getErrorMessage(err) {
|
|
|
10
10
|
return err instanceof Error ? err.message : String(err);
|
|
11
11
|
}
|
|
12
12
|
export function logVerbose(message, err) {
|
|
13
|
-
if (process.env.
|
|
13
|
+
if (process.env.FLISK_VERBOSE) {
|
|
14
14
|
const errMsg = err !== undefined ? `: ${getErrorMessage(err)}` : "";
|
|
15
15
|
console.warn(chalk.gray(`${message}${errMsg}`));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export class
|
|
18
|
+
export class FliskError extends Error {
|
|
19
19
|
suggestions;
|
|
20
20
|
exitCode;
|
|
21
21
|
constructor(message, suggestions = [], exitCode = 1) {
|
|
22
22
|
super(message);
|
|
23
|
-
this.name = "
|
|
23
|
+
this.name = "FliskError";
|
|
24
24
|
this.suggestions = suggestions;
|
|
25
25
|
this.exitCode = exitCode;
|
|
26
26
|
}
|
|
@@ -56,28 +56,28 @@ function closestNameSuggestions(names, candidates, includeInput = false) {
|
|
|
56
56
|
return [...suggestions];
|
|
57
57
|
}
|
|
58
58
|
export const errorFactories = {
|
|
59
|
-
tiltNotInstalled: () => new
|
|
59
|
+
tiltNotInstalled: () => new FliskError("Tilt CLI is not installed", [
|
|
60
60
|
"Install Tilt: `brew install tilt` (macOS)",
|
|
61
61
|
"Or download from: https://docs.tilt.dev/install.html",
|
|
62
62
|
"Verify with: `tilt version`",
|
|
63
63
|
`Setup guide: ${QUICKSTART_DOCS_URL}`,
|
|
64
64
|
]),
|
|
65
|
-
dockerNotAvailable: () => new
|
|
65
|
+
dockerNotAvailable: () => new FliskError("Docker (or a compatible container runtime) is not running", [
|
|
66
66
|
"Start Docker Desktop, then verify with: `docker ps`",
|
|
67
67
|
"Or start Colima: `colima start`",
|
|
68
68
|
"Or start the Docker service on Linux: `sudo systemctl start docker`",
|
|
69
69
|
`Setup guide: ${QUICKSTART_DOCS_URL}`,
|
|
70
70
|
]),
|
|
71
|
-
dockerNotResponding: () => new
|
|
71
|
+
dockerNotResponding: () => new FliskError("Docker is running but not responding (`docker ps` hung for 10s)", [
|
|
72
72
|
"Quit and reopen Docker Desktop, or run `colima restart`",
|
|
73
73
|
"Then verify with: `docker ps`",
|
|
74
74
|
]),
|
|
75
|
-
stackNotFound: (name, stackNames = []) => new
|
|
75
|
+
stackNotFound: (name, stackNames = []) => new FliskError(`Stack "${name}" not found`, [
|
|
76
76
|
...closestNameSuggestions([name], stackNames),
|
|
77
77
|
"Run `flisk stacks` to see available stacks",
|
|
78
78
|
"Run `flisk stack` to assign resources to a stack",
|
|
79
79
|
]),
|
|
80
|
-
resourceNotFound: (name, resourceNames = []) => new
|
|
80
|
+
resourceNotFound: (name, resourceNames = []) => new FliskError(`Resource "${name}" not found`, [
|
|
81
81
|
...closestNameSuggestions([name], resourceNames),
|
|
82
82
|
"Run `flisk resources` to list all resources",
|
|
83
83
|
"Check the resource name spelling",
|
|
@@ -85,17 +85,17 @@ export const errorFactories = {
|
|
|
85
85
|
unknownServices: (names, validNames) => {
|
|
86
86
|
// Service selectors are Tilt resource names, so share the resource suggestion path.
|
|
87
87
|
const suggestions = closestNameSuggestions(names, validNames, names.length > 1);
|
|
88
|
-
return new
|
|
88
|
+
return new FliskError(`Unknown service ${names.join(", ")}. Valid names: ${validNames.join(", ")}`, suggestions, 2);
|
|
89
89
|
},
|
|
90
|
-
directoryExists: (path) => new
|
|
90
|
+
directoryExists: (path) => new FliskError(`Directory already exists: ${path}`, [
|
|
91
91
|
"Use `--path` to specify a different location",
|
|
92
92
|
"Remove the existing directory if no longer needed",
|
|
93
93
|
]),
|
|
94
|
-
invalidPath: (path) => new
|
|
94
|
+
invalidPath: (path) => new FliskError(`Invalid path: ${path}`, [
|
|
95
95
|
"Path must be within the project directory",
|
|
96
96
|
'Path cannot contain special characters like <>:"|?*',
|
|
97
97
|
]),
|
|
98
|
-
notInProject: () => new
|
|
98
|
+
notInProject: () => new FliskError("Could not find project root (no .flisk/project.json found)", [
|
|
99
99
|
"Run this from within a Flisk project",
|
|
100
100
|
"Run `flisk project --yes` to initialize a new project",
|
|
101
101
|
]),
|
|
@@ -108,7 +108,7 @@ export function requireProjectRoot() {
|
|
|
108
108
|
return projectRoot;
|
|
109
109
|
}
|
|
110
110
|
function handleCommandError(err) {
|
|
111
|
-
if (err instanceof
|
|
111
|
+
if (err instanceof FliskError) {
|
|
112
112
|
err.exit();
|
|
113
113
|
}
|
|
114
114
|
showError(getErrorMessage(err));
|
|
@@ -46,9 +46,9 @@ export function ensureDirectory(dirPath) {
|
|
|
46
46
|
/** Generated files that must never be committed: .env holds a generated DB password. */
|
|
47
47
|
const GITIGNORE_ENTRIES = [
|
|
48
48
|
".env",
|
|
49
|
-
".
|
|
50
|
-
".
|
|
51
|
-
".
|
|
49
|
+
".flisk/.flisk-out/",
|
|
50
|
+
".flisk/.project-id",
|
|
51
|
+
".flisk/smoke/",
|
|
52
52
|
"node_modules/",
|
|
53
53
|
];
|
|
54
54
|
/**
|
|
@@ -86,7 +86,7 @@ export function isInsideGitWorkTree(startPath) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
|
-
* Makes sure the smoke records cannot be committed by accident: the project .gitignore must ignore `.
|
|
89
|
+
* Makes sure the smoke records cannot be committed by accident: the project .gitignore must ignore `.flisk/smoke/` before
|
|
90
90
|
* `flisk up` writes a record. Only meaningful inside a git working tree, so nothing is written outside one. Returns the
|
|
91
91
|
* warning to show when the entry could not be ensured, and undefined when it is.
|
|
92
92
|
*/
|
|
@@ -99,6 +99,6 @@ export function ensureSmokeRecordsIgnored(projectRoot) {
|
|
|
99
99
|
}
|
|
100
100
|
catch (error) {
|
|
101
101
|
const reason = error instanceof Error ? error.message : String(error);
|
|
102
|
-
return `Could not add .
|
|
102
|
+
return `Could not add .flisk/smoke/ to ${resolve(projectRoot, ".gitignore")}: ${reason}. Git may track the smoke response records.`;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -7,25 +7,25 @@ function toParts(raw) {
|
|
|
7
7
|
const match = raw.trim().match(/(\d+)\.(\d+)(?:\.(\d+))?/);
|
|
8
8
|
return match ? [Number(match[1]), Number(match[2]), Number(match[3] ?? 0)] : null;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function readMinFliskVersion(projectRoot) {
|
|
11
11
|
try {
|
|
12
|
-
const parsed = JSON.parse(readFileSync(join(projectRoot, ".
|
|
13
|
-
return parsed?.
|
|
12
|
+
const parsed = JSON.parse(readFileSync(join(projectRoot, ".flisk", PROJECT_JSON), "utf-8"));
|
|
13
|
+
return parsed?.minFliskVersion;
|
|
14
14
|
}
|
|
15
15
|
catch {
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
export function
|
|
20
|
-
const minimum =
|
|
19
|
+
export function evaluateFliskVersionFloor(projectRoot, currentVersion) {
|
|
20
|
+
const minimum = readMinFliskVersion(projectRoot);
|
|
21
21
|
if (minimum === undefined)
|
|
22
22
|
return { status: "none" };
|
|
23
23
|
const required = typeof minimum === "string" ? toParts(minimum) : null;
|
|
24
24
|
if (!required || !/^\d+\.\d+\.\d+$/.test(String(minimum).trim())) {
|
|
25
25
|
return {
|
|
26
26
|
status: "malformed",
|
|
27
|
-
message: `.
|
|
28
|
-
fix: 'Set
|
|
27
|
+
message: `.flisk/project.json minFliskVersion ${JSON.stringify(minimum)} is not a version like "1.3.80"`,
|
|
28
|
+
fix: 'Set minFliskVersion to a MAJOR.MINOR.PATCH string, for example "1.3.80".',
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
const current = toParts(currentVersion);
|
|
@@ -43,7 +43,7 @@ export function evaluateTdkVersionFloor(projectRoot, currentVersion) {
|
|
|
43
43
|
return {
|
|
44
44
|
status: "too-old",
|
|
45
45
|
required: requiredText,
|
|
46
|
-
message: `flisk ${currentVersion} is older than the ${requiredText} this project requires (
|
|
46
|
+
message: `flisk ${currentVersion} is older than the ${requiredText} this project requires (minFliskVersion)`,
|
|
47
47
|
fix: "Run: flisk upgrade",
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -4,9 +4,9 @@ import { existsSync, lstatSync } from "node:fs";
|
|
|
4
4
|
import { isAbsolute, normalize, relative, sep } from "node:path";
|
|
5
5
|
import { AUTOGENERATED_DIR, PACKAGE_JSON, TILTIGNORE_FILE } from "./constants.js";
|
|
6
6
|
/** Reviewed Flisk-owned destinations written by `flisk config regenerate` or Tilt generation. */
|
|
7
|
-
export const
|
|
7
|
+
export const FLISK_GENERATED_PATH_ALLOWLIST = [
|
|
8
8
|
`${AUTOGENERATED_DIR}/**`,
|
|
9
|
-
".
|
|
9
|
+
".flisk/.flisk-out/**",
|
|
10
10
|
"Tiltfile",
|
|
11
11
|
"TILT_*.star",
|
|
12
12
|
TILTIGNORE_FILE,
|
|
@@ -16,12 +16,12 @@ export const TDK_GENERATED_PATH_ALLOWLIST = [
|
|
|
16
16
|
"product_autogenerated_resource_manifests/**",
|
|
17
17
|
"product_autogenerated_services_list/**",
|
|
18
18
|
];
|
|
19
|
-
export function
|
|
19
|
+
export function isFliskGeneratedPath(path) {
|
|
20
20
|
const normalized = normalize(path).split(sep).join("/");
|
|
21
21
|
if (isAbsolute(path) || normalized === ".." || normalized.startsWith("../"))
|
|
22
22
|
return false;
|
|
23
23
|
if (normalized.split("/").includes(AUTOGENERATED_DIR) ||
|
|
24
|
-
normalized.startsWith(".
|
|
24
|
+
normalized.startsWith(".flisk/.flisk-out/") ||
|
|
25
25
|
normalized === "shared-platform-engineering/docker-templates" ||
|
|
26
26
|
normalized.startsWith("shared-platform-engineering/docker-templates/") ||
|
|
27
27
|
normalized.startsWith("product_autogenerated_resource_manifests/") ||
|
|
@@ -34,10 +34,10 @@ export function isTdkGeneratedPath(path) {
|
|
|
34
34
|
normalized === PACKAGE_JSON ||
|
|
35
35
|
normalized === "services/platform/database-management/docker-compose.yml");
|
|
36
36
|
}
|
|
37
|
-
export function
|
|
37
|
+
export function assertFliskGeneratedPath(projectRoot, path) {
|
|
38
38
|
const absolute = isAbsolute(path) ? normalize(path) : normalize(`${projectRoot}/${path}`);
|
|
39
39
|
const projectRelative = relative(projectRoot, absolute).split(sep).join("/");
|
|
40
|
-
if (!
|
|
40
|
+
if (!isFliskGeneratedPath(projectRelative)) {
|
|
41
41
|
throw new Error(`Refusing to write outside Flisk's generated-file allowlist: ${projectRelative}`);
|
|
42
42
|
}
|
|
43
43
|
let cursor = projectRoot;
|
|
@@ -5,7 +5,7 @@ import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from
|
|
|
5
5
|
import { join, resolve, sep } from "node:path";
|
|
6
6
|
import { PROJECT_JSON } from "./constants.js";
|
|
7
7
|
import { createHostPortPlan, isHostPortAvailable, PREFERRED_HOST_PORTS, } from "./host-port-plan.js";
|
|
8
|
-
const CONFIG_PATH = join(".
|
|
8
|
+
const CONFIG_PATH = join(".flisk", ".flisk-out", "host-ports.json");
|
|
9
9
|
export function isDockerPortOwnedByProject(dockerPs, projectPrefix, port) {
|
|
10
10
|
return dockerPs.split("\n").some((line) => {
|
|
11
11
|
const [name = "", ports = ""] = line.split("|");
|
|
@@ -39,18 +39,18 @@ export function readSavedHostPortPlan(projectRoot) {
|
|
|
39
39
|
}
|
|
40
40
|
export function writeSavedHostPortPlan(projectRoot, plan) {
|
|
41
41
|
const path = join(projectRoot, CONFIG_PATH);
|
|
42
|
-
mkdirSync(join(projectRoot, ".
|
|
42
|
+
mkdirSync(join(projectRoot, ".flisk", ".flisk-out"), { recursive: true });
|
|
43
43
|
writeFileSync(path, `${JSON.stringify(plan, null, 2)}\n`, { encoding: "utf-8", mode: 0o600 });
|
|
44
44
|
}
|
|
45
45
|
export function exportHostPortPlan(plan) {
|
|
46
|
-
process.env.
|
|
47
|
-
process.env.
|
|
48
|
-
process.env.
|
|
46
|
+
process.env.FLISK_HTTP_PORT = String(plan.ingressHttp);
|
|
47
|
+
process.env.FLISK_HTTPS_PORT = String(plan.ingressHttps);
|
|
48
|
+
process.env.FLISK_POSTGRES_PORT = String(plan.postgres);
|
|
49
49
|
}
|
|
50
50
|
const COMPOSE_WORKING_DIR_LABEL = "com.docker.compose.project.working_dir";
|
|
51
51
|
/**
|
|
52
52
|
* True when a container whose Compose working directory is inside this project publishes the port. A container-name prefix is not
|
|
53
|
-
* enough:
|
|
53
|
+
* enough: flisk_shop_ also matches the containers of a different project called flisk-shop-extra. Compose records the directory each
|
|
54
54
|
* project was started from, so that identifies the project exactly. Containers without the label never count.
|
|
55
55
|
*/
|
|
56
56
|
export function isPortHeldByProjectContainers(dockerPs, projectRoot, port) {
|
|
@@ -91,20 +91,20 @@ export function resolveRuntimeIngressPort(projectRoot, plannedPort, readDockerPs
|
|
|
91
91
|
/** Reuse this project's last selection when its ports are still free or held by its own containers. */
|
|
92
92
|
export async function getHostPortPlan(projectRoot, options = {}) {
|
|
93
93
|
const saved = readSavedHostPortPlan(projectRoot);
|
|
94
|
-
const hasOverride = ["
|
|
94
|
+
const hasOverride = ["FLISK_HTTP_PORT", "FLISK_HTTPS_PORT", "FLISK_POSTGRES_PORT"].some((key) => process.env[key]);
|
|
95
95
|
// Dry-run must not call Docker. A saved plan is the best representation of
|
|
96
96
|
// the current landscape in that mode; explicit overrides are still planned.
|
|
97
97
|
if (options.inspectDocker === false && saved && !hasOverride)
|
|
98
98
|
return saved;
|
|
99
99
|
let prefix = "";
|
|
100
100
|
try {
|
|
101
|
-
const project = JSON.parse(readFileSync(join(projectRoot, ".
|
|
102
|
-
prefix = String(project?.project?.name ?? "
|
|
101
|
+
const project = JSON.parse(readFileSync(join(projectRoot, ".flisk", PROJECT_JSON), "utf-8"));
|
|
102
|
+
prefix = String(project?.project?.name ?? "flisk-project")
|
|
103
103
|
.replace(/-/g, "_")
|
|
104
104
|
.toLowerCase();
|
|
105
105
|
}
|
|
106
106
|
catch {
|
|
107
|
-
prefix = "
|
|
107
|
+
prefix = "flisk_project";
|
|
108
108
|
}
|
|
109
109
|
let dockerPs = "";
|
|
110
110
|
if (options.inspectDocker !== false) {
|
|
@@ -8,9 +8,9 @@ export const DEFAULT_HOST_PORT_RANGES = {
|
|
|
8
8
|
postgres: { start: 15432, end: 15532 },
|
|
9
9
|
};
|
|
10
10
|
const ENV_KEYS = {
|
|
11
|
-
ingressHttp: "
|
|
12
|
-
ingressHttps: "
|
|
13
|
-
postgres: "
|
|
11
|
+
ingressHttp: "FLISK_HTTP_PORT",
|
|
12
|
+
ingressHttps: "FLISK_HTTPS_PORT",
|
|
13
|
+
postgres: "FLISK_POSTGRES_PORT",
|
|
14
14
|
};
|
|
15
15
|
const REQUESTED_PORTS = { ingressHttp: 80, ingressHttps: 443, postgres: 5432 };
|
|
16
16
|
// Tried before the fallback range so routed URLs need no port. Postgres keeps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
import {
|
|
3
|
+
import { FliskError } from "./errors.js";
|
|
4
4
|
export const SCHEMA_VERSION = 1;
|
|
5
5
|
export function createMachineEnvelope(data, errors = []) {
|
|
6
6
|
return { schemaVersion: SCHEMA_VERSION, data, errors };
|
|
@@ -33,7 +33,7 @@ export function isMachineOutputEnvelope(value) {
|
|
|
33
33
|
return envelope.errors.every(isMachineError);
|
|
34
34
|
}
|
|
35
35
|
export function toMachineError(error) {
|
|
36
|
-
if (error instanceof
|
|
36
|
+
if (error instanceof FliskError) {
|
|
37
37
|
return {
|
|
38
38
|
error: {
|
|
39
39
|
code: "COMMAND_FAILED",
|
|
@@ -11,7 +11,7 @@ export const NATIVE_WINDOWS_REFUSAL = "Landscape startup needs Ubuntu on WSL2. N
|
|
|
11
11
|
/**
|
|
12
12
|
* Why a command that starts a stack cannot run on this host, or null when it may proceed.
|
|
13
13
|
*
|
|
14
|
-
* `
|
|
14
|
+
* `FLISK_ALLOW_NATIVE_WINDOWS=1` is the unsupported escape hatch that lets it try anyway.
|
|
15
15
|
*/
|
|
16
16
|
export function nativeWindowsStackRefusal(platform, allowNativeWindows) {
|
|
17
17
|
if (platform !== "win32" || allowNativeWindows === "1")
|
package/cli/dist/utils/paths.js
CHANGED
|
@@ -7,16 +7,16 @@ import packageJson from "../../package.json" with { type: "json" };
|
|
|
7
7
|
import { PROJECT_JSON } from "./constants.js";
|
|
8
8
|
/**
|
|
9
9
|
* Find the nearest enclosing Flisk project root by walking up from `startDir` until a
|
|
10
|
-
* `.
|
|
10
|
+
* `.flisk/project.json` marker is found. Stops at the filesystem root without treating the
|
|
11
11
|
* root itself as a project.
|
|
12
12
|
* @param startDir - Directory to start searching from (default: cwd)
|
|
13
|
-
* @returns Absolute path of the project root, or null if no `.
|
|
13
|
+
* @returns Absolute path of the project root, or null if no `.flisk/project.json` exists on any parent
|
|
14
14
|
*/
|
|
15
15
|
export function findProjectRoot(startDir = cwd()) {
|
|
16
16
|
let currentDir = resolve(startDir);
|
|
17
17
|
const root = resolve("/");
|
|
18
18
|
while (currentDir !== root) {
|
|
19
|
-
if (existsSync(join(currentDir, ".
|
|
19
|
+
if (existsSync(join(currentDir, ".flisk", PROJECT_JSON))) {
|
|
20
20
|
return currentDir;
|
|
21
21
|
}
|
|
22
22
|
const parentDir = dirname(currentDir);
|
|
@@ -4,7 +4,7 @@ import { delimiter, extname } from "node:path";
|
|
|
4
4
|
export function isWindows() {
|
|
5
5
|
return process.platform === "win32";
|
|
6
6
|
}
|
|
7
|
-
export function
|
|
7
|
+
export function fliskOsFor(platformName) {
|
|
8
8
|
if (platformName === "linux")
|
|
9
9
|
return "linux";
|
|
10
10
|
if (platformName === "darwin")
|
|
@@ -13,22 +13,22 @@ export function tdkOsFor(platformName) {
|
|
|
13
13
|
return "windows";
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
-
export function
|
|
17
|
-
return
|
|
16
|
+
export function fliskOs() {
|
|
17
|
+
return fliskOsFor(process.platform);
|
|
18
18
|
}
|
|
19
|
-
export function
|
|
19
|
+
export function fliskArchFor(architecture) {
|
|
20
20
|
if (architecture === "x64")
|
|
21
21
|
return "amd64";
|
|
22
22
|
if (architecture === "arm64")
|
|
23
23
|
return "arm64";
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
export function
|
|
27
|
-
return
|
|
26
|
+
export function fliskArch() {
|
|
27
|
+
return fliskArchFor(process.arch);
|
|
28
28
|
}
|
|
29
29
|
export function binaryAssetNameFor(platformName, architecture) {
|
|
30
|
-
const osName =
|
|
31
|
-
const archName =
|
|
30
|
+
const osName = fliskOsFor(platformName);
|
|
31
|
+
const archName = fliskArchFor(architecture);
|
|
32
32
|
if (!osName || !archName)
|
|
33
33
|
return null;
|
|
34
34
|
if (osName === "windows" && archName !== "amd64")
|
|
@@ -40,7 +40,7 @@ export function binaryAssetName() {
|
|
|
40
40
|
return binaryAssetNameFor(process.platform, process.arch);
|
|
41
41
|
}
|
|
42
42
|
export function executableName() {
|
|
43
|
-
return isWindows() ? "
|
|
43
|
+
return isWindows() ? "flisk.exe" : "flisk";
|
|
44
44
|
}
|
|
45
45
|
export function pathLookups(binName, windows = isWindows()) {
|
|
46
46
|
if (!windows)
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
/** The env var that moves each host port Flisk publishes. Services publish no host ports, so only these conflict. */
|
|
4
4
|
const PORT_ENV_VARS = {
|
|
5
|
-
"80": "
|
|
6
|
-
"443": "
|
|
7
|
-
"5432": "
|
|
5
|
+
"80": "FLISK_HTTP_PORT",
|
|
6
|
+
"443": "FLISK_HTTPS_PORT",
|
|
7
|
+
"5432": "FLISK_POSTGRES_PORT",
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* The next step for a host port another process already holds. The occupant is not named: finding it needs the OS, so
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const PORT_KEYS = [
|
|
2
|
-
{ key: "ingressHttp", label: "HTTP", env: "
|
|
3
|
-
{ key: "ingressHttps", label: "HTTPS", env: "
|
|
4
|
-
{ key: "postgres", label: "Postgres", env: "
|
|
2
|
+
{ key: "ingressHttp", label: "HTTP", env: "FLISK_HTTP_PORT" },
|
|
3
|
+
{ key: "ingressHttps", label: "HTTPS", env: "FLISK_HTTPS_PORT" },
|
|
4
|
+
{ key: "postgres", label: "Postgres", env: "FLISK_POSTGRES_PORT" },
|
|
5
5
|
];
|
|
6
6
|
/** One line per port Flisk moved off the one it wanted. Ports the user set explicitly are never listed. */
|
|
7
7
|
export function formatPortFallbackNotice(plan) {
|
|
@@ -4,7 +4,7 @@ import { DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Defaults shared by project generation and CLI predicates.
|
|
6
6
|
*
|
|
7
|
-
* Source of truth for `always_enabled_infra` when `.
|
|
7
|
+
* Source of truth for `always_enabled_infra` when `.flisk/project.json` omits
|
|
8
8
|
* the field. The generator bakes this into the Tiltfile
|
|
9
9
|
* (`Tiltfile.hbs` → `ALWAYS_ENABLED_INFRA`); `should_enable` then returns
|
|
10
10
|
* `RESOURCE_DEFAULTS.get(name, True)` for names in that list — so an omitted
|
|
@@ -14,12 +14,12 @@ export const PROJECT_FEATURES = {
|
|
|
14
14
|
dependsOn: [],
|
|
15
15
|
},
|
|
16
16
|
// Key/name must be the literal Tilt resource name (PlatformDockerConstants.VERDACCIO_RESOURCE_NAME
|
|
17
|
-
// in
|
|
17
|
+
// in flisk-cli-extensions), since project.json's services list is copied verbatim into
|
|
18
18
|
// PRE_ALPHA_RESOURCES and matched against that name by should_enable(). "registry" would
|
|
19
19
|
// silently fail to enable Verdaccio.
|
|
20
20
|
verdaccio: {
|
|
21
21
|
name: "verdaccio",
|
|
22
|
-
description: "Verdaccio npm registry for package management and local publishing (Premium - requires
|
|
22
|
+
description: "Verdaccio npm registry for package management and local publishing (Premium - requires FLISK_LICENSE_KEY)",
|
|
23
23
|
category: "premium",
|
|
24
24
|
phase: "pre_alpha",
|
|
25
25
|
enabled_by_default: false,
|
|
@@ -133,7 +133,7 @@ export const RESOURCE_FEATURES = {
|
|
|
133
133
|
name: "ddd",
|
|
134
134
|
description: "Domain-driven design folder structure (domain/application/infrastructure/presentation) " +
|
|
135
135
|
"and matching @domain/@application/@infrastructure/@presentation/@test path aliases " +
|
|
136
|
-
"(Premium - requires
|
|
136
|
+
"(Premium - requires FLISK_LICENSE_KEY; see hasDddLicense() in extension-fetch.ts)",
|
|
137
137
|
applies_to: ["backend", "worker", "migrator"],
|
|
138
138
|
enabled_by_default: false,
|
|
139
139
|
category: "premium",
|
|
@@ -148,12 +148,12 @@ export const RESOURCE_FEATURES = {
|
|
|
148
148
|
"is created or started, and a Traefik static route wakes it on the first request instead " +
|
|
149
149
|
"(backends only for now), so it doesn't wait behind the rest of a large landscape's " +
|
|
150
150
|
"bring-up. Requires `enable: true`. " +
|
|
151
|
-
"(Premium - requires
|
|
151
|
+
"(Premium - requires FLISK_LICENSE_KEY; free tier writes a disabled stub; see " +
|
|
152
152
|
"hasSablierLicense() in extension-fetch.ts KNOWN_RESOURCES/PREMIUM_PATH_MAP)",
|
|
153
153
|
applies_to: ["backend", "frontend"],
|
|
154
154
|
enabled_by_default: false,
|
|
155
155
|
category: "premium",
|
|
156
|
-
generator_file: "engine/topologies/platform/docker/networking/sablier_container_cycle.star (stub; real generator in
|
|
156
|
+
generator_file: "engine/topologies/platform/docker/networking/sablier_container_cycle.star (stub; real generator in flisk-cli-extensions/premium/networking/), engine/topologies/platform/docker/networking/traefik.star, engine/topologies/platform/docker/compose/traefik_standalone.star (deferStart wake gateway + static route), engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star (deferred image prebuild + wake route wiring)",
|
|
157
157
|
output_file: "(Traefik + Sablier Docker labels on the resource's own compose service; with deferStart, also a generated Traefik file-provider dynamic-config entry, wake gateway, and image prebuild resource)",
|
|
158
158
|
},
|
|
159
159
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
// Directories that make up the Flisk Tilt extension, next to the root Tiltfile.
|
|
6
|
+
export const EXTENSION_DIRS = ["engine", "discovery", "specs", "ext"];
|
|
7
|
+
// Optional wrapper folder for a future layout that nests the extension directories.
|
|
8
|
+
const NESTED_RUNTIME_DIR = "runtime";
|
|
9
|
+
// Resolve one extension directory, preferring the nested layout and falling back to the
|
|
10
|
+
// current flat one, so callers keep working whichever layout a checkout or bundle uses.
|
|
11
|
+
export function resolveExtensionDir(sourceRoot, name) {
|
|
12
|
+
const nested = join(sourceRoot, NESTED_RUNTIME_DIR, name);
|
|
13
|
+
return existsSync(nested) ? nested : join(sourceRoot, name);
|
|
14
|
+
}
|
|
15
|
+
// The extension entry point sits at runtime/Tiltfile in a source checkout and at the bundle
|
|
16
|
+
// root in a packaged or vendored layout.
|
|
17
|
+
export function resolveTiltfile(sourceRoot) {
|
|
18
|
+
const nested = join(sourceRoot, NESTED_RUNTIME_DIR, "Tiltfile");
|
|
19
|
+
return existsSync(nested) ? nested : join(sourceRoot, "Tiltfile");
|
|
20
|
+
}
|
|
21
|
+
// Checks that the Tiltfile and every extension directory come from one layout. The resolvers above pick each
|
|
22
|
+
// entry on its own, so a stale or half-migrated tree would otherwise combine nested and flat entries.
|
|
23
|
+
export function inspectExtensionLayout(sourceRoot) {
|
|
24
|
+
const entries = ["Tiltfile", ...EXTENSION_DIRS];
|
|
25
|
+
const nested = entries.filter((name) => existsSync(join(sourceRoot, NESTED_RUNTIME_DIR, name)));
|
|
26
|
+
const flat = entries.filter((name) => existsSync(join(sourceRoot, name)));
|
|
27
|
+
if (nested.length === 0 && flat.length === 0) {
|
|
28
|
+
return { ok: false, kind: "incomplete", missing: [...entries], mixed: [] };
|
|
29
|
+
}
|
|
30
|
+
if (nested.length === entries.length)
|
|
31
|
+
return { ok: true, kind: "nested", missing: [], mixed: [] };
|
|
32
|
+
if (nested.length === 0) {
|
|
33
|
+
const missing = entries.filter((name) => !flat.includes(name));
|
|
34
|
+
return missing.length === 0
|
|
35
|
+
? { ok: true, kind: "flat", missing, mixed: [] }
|
|
36
|
+
: { ok: false, kind: "incomplete", missing, mixed: [] };
|
|
37
|
+
}
|
|
38
|
+
// Some entries are nested: the tree is meant to be nested, so a flat-only entry is a leftover.
|
|
39
|
+
const missing = entries.filter((name) => !nested.includes(name));
|
|
40
|
+
const mixed = missing.filter((name) => flat.includes(name));
|
|
41
|
+
return { ok: false, kind: mixed.length > 0 ? "mixed" : "incomplete", missing, mixed };
|
|
42
|
+
}
|
|
43
|
+
// One line naming what is wrong, for warnings and `flisk runtime --check-assets`.
|
|
44
|
+
export function describeLayoutProblems(sourceRoot, report = inspectExtensionLayout(sourceRoot)) {
|
|
45
|
+
if (report.ok)
|
|
46
|
+
return `${sourceRoot}: ${report.kind} layout`;
|
|
47
|
+
const parts = [];
|
|
48
|
+
if (report.kind === "mixed") {
|
|
49
|
+
parts.push(`mixes the nested ${NESTED_RUNTIME_DIR}/ layout with flat entries (${report.mixed.join(", ")} only at the root)`);
|
|
50
|
+
}
|
|
51
|
+
const absent = report.missing.filter((name) => !report.mixed.includes(name));
|
|
52
|
+
if (absent.length > 0)
|
|
53
|
+
parts.push(`is missing ${absent.join(", ")}`);
|
|
54
|
+
return `${sourceRoot} ${parts.join(" and ")}`;
|
|
55
|
+
}
|
|
56
|
+
export function hasExtensionLayout(sourceRoot) {
|
|
57
|
+
return inspectExtensionLayout(sourceRoot).ok;
|
|
58
|
+
}
|