@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
|
@@ -60,7 +60,7 @@ function syncDiscoveredStacksToPreAlpha(projectConfig, discoveredStacks) {
|
|
|
60
60
|
* `flisk up` without re-running `flisk project`. Returns the stacks it enabled.
|
|
61
61
|
*/
|
|
62
62
|
export function enableDiscoveredStacks(projectRoot, resources) {
|
|
63
|
-
const projectJsonPath = join(projectRoot, ".
|
|
63
|
+
const projectJsonPath = join(projectRoot, ".flisk", PROJECT_JSON);
|
|
64
64
|
if (!existsSync(projectJsonPath))
|
|
65
65
|
return [];
|
|
66
66
|
const projectConfig = readProjectConfig(projectRoot);
|
|
@@ -135,7 +135,7 @@ export async function cloneProjectTemplate(templateName, targetDir, runtimeNextS
|
|
|
135
135
|
]) {
|
|
136
136
|
const copiedPath = join(destination, file);
|
|
137
137
|
const contents = readFileSync(copiedPath, "utf-8");
|
|
138
|
-
writeFileSync(copiedPath, contents.replaceAll("
|
|
138
|
+
writeFileSync(copiedPath, contents.replaceAll("flisk_example", projectSlug));
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
else {
|
|
@@ -241,10 +241,10 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
241
241
|
showDetail(`Location: ${projectRoot}\n`, 0);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
const
|
|
245
|
-
const projectJsonPath = join(
|
|
244
|
+
const fliskDir = join(projectRoot, ".flisk");
|
|
245
|
+
const projectJsonPath = join(fliskDir, PROJECT_JSON);
|
|
246
246
|
if (options.check) {
|
|
247
|
-
const allFilesExist = MASTER_CONFIG_FILES.every((f) => existsSync(join(projectRoot, ".
|
|
247
|
+
const allFilesExist = MASTER_CONFIG_FILES.every((f) => existsSync(join(projectRoot, ".flisk", ".flisk-out", f)));
|
|
248
248
|
const projectJsonExists = existsSync(projectJsonPath);
|
|
249
249
|
if (allFilesExist && projectJsonExists) {
|
|
250
250
|
const projectConfig = readProjectConfig(projectRoot);
|
|
@@ -256,10 +256,10 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
256
256
|
else {
|
|
257
257
|
console.log(chalk.yellow("⚠️ Project configuration incomplete:"));
|
|
258
258
|
if (!projectJsonExists)
|
|
259
|
-
showDetail(".
|
|
259
|
+
showDetail(".flisk/project.json (not found)", 3);
|
|
260
260
|
if (!allFilesExist) {
|
|
261
|
-
for (const f of MASTER_CONFIG_FILES.filter((f) => !existsSync(join(projectRoot, ".
|
|
262
|
-
showDetail(`.
|
|
261
|
+
for (const f of MASTER_CONFIG_FILES.filter((f) => !existsSync(join(projectRoot, ".flisk/.flisk-out", f)))) {
|
|
262
|
+
showDetail(`.flisk/.flisk-out/${f} (not found)`, 3);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
showDetail("Run `flisk project` to create them.");
|
|
@@ -270,15 +270,15 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
270
270
|
showCommandHeader("Project Configuration");
|
|
271
271
|
showDetail(`Project root: ${projectRoot}\n`, 0);
|
|
272
272
|
}
|
|
273
|
-
if (!existsSync(
|
|
274
|
-
ensureDirectory(
|
|
273
|
+
if (!existsSync(fliskDir)) {
|
|
274
|
+
ensureDirectory(fliskDir);
|
|
275
275
|
if (!quiet)
|
|
276
|
-
showSuccess("Created: .
|
|
276
|
+
showSuccess("Created: .flisk/ directory");
|
|
277
277
|
}
|
|
278
278
|
const projectJsonExists = existsSync(projectJsonPath);
|
|
279
279
|
if (projectJsonExists && !options.force) {
|
|
280
280
|
if (!quiet)
|
|
281
|
-
showSuccess(".
|
|
281
|
+
showSuccess(".flisk/project.json exists");
|
|
282
282
|
const rawProjectConfig = JSON.parse(readFileSync(projectJsonPath, "utf-8"));
|
|
283
283
|
const projectConfig = readProjectConfig(projectRoot);
|
|
284
284
|
const discoveredStacks = discoverExistingServiceStacks(projectRoot);
|
|
@@ -309,7 +309,7 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
309
309
|
}
|
|
310
310
|
if (!quiet) {
|
|
311
311
|
console.log(chalk.green("\n✅ Project configuration regenerated!"));
|
|
312
|
-
showDetail("\nGenerated in .
|
|
312
|
+
showDetail("\nGenerated in .flisk/.flisk-out/:", 0);
|
|
313
313
|
for (const file of MASTER_CONFIG_FILES) {
|
|
314
314
|
showDetail(`- ${file}`);
|
|
315
315
|
}
|
|
@@ -320,7 +320,7 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
322
|
if (projectJsonExists && options.force && !options.yes) {
|
|
323
|
-
console.log(chalk.red("\n⚠️ WARNING: --force will overwrite .
|
|
323
|
+
console.log(chalk.red("\n⚠️ WARNING: --force will overwrite .flisk/project.json!"));
|
|
324
324
|
const confirm = await promptConfirm({
|
|
325
325
|
message: "This will reset your project configuration. Continue?",
|
|
326
326
|
initial: false,
|
|
@@ -411,7 +411,7 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
411
411
|
showStep("\n📂 Service discovery");
|
|
412
412
|
showDetail("What: folder patterns Flisk scans for a service.json in each match.");
|
|
413
413
|
showDetail("Where: type one or more globs, comma-separated.");
|
|
414
|
-
showDetail("How: saved as discovery.paths in .
|
|
414
|
+
showDetail("How: saved as discovery.paths in .flisk/project.json - editable later.");
|
|
415
415
|
showDetail(`Example: ${DEFAULT_PROJECT_JSON.discovery.paths.join(", ")}\n`);
|
|
416
416
|
const discoveryPaths = await promptText({
|
|
417
417
|
message: "Folders to scan:",
|
|
@@ -445,7 +445,7 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
445
445
|
showStep("\n📋 Creating project configuration...\n");
|
|
446
446
|
writeJsonFile(projectJsonPath, projectConfig);
|
|
447
447
|
if (!quiet) {
|
|
448
|
-
showSuccess("Created: .
|
|
448
|
+
showSuccess("Created: .flisk/project.json");
|
|
449
449
|
showDetail(`→ Project: ${projectConfig.project.name}`);
|
|
450
450
|
showStep("\n📋 Generating master configuration files...\n");
|
|
451
451
|
}
|
|
@@ -483,21 +483,21 @@ export const projectCommand = addYesOption(new Command("project"))
|
|
|
483
483
|
}
|
|
484
484
|
if (!quiet) {
|
|
485
485
|
console.log(chalk.green("\n✅ Project configuration complete!"));
|
|
486
|
-
showDetail("\nGenerated files in .
|
|
486
|
+
showDetail("\nGenerated files in .flisk/.flisk-out/:", 0);
|
|
487
487
|
for (const file of MASTER_CONFIG_FILES) {
|
|
488
488
|
showDetail(`- ${file}`);
|
|
489
489
|
}
|
|
490
490
|
showDetail("\nEnvironment configuration:", 0);
|
|
491
491
|
showDetail("- .env (contains all required variables)");
|
|
492
492
|
showDetail("\nSource file:", 0);
|
|
493
|
-
showDetail("- .
|
|
493
|
+
showDetail("- .flisk/project.json (edit this to change project structure)");
|
|
494
494
|
showDetail("\nNext steps:", 0);
|
|
495
495
|
showDetail("1. flisk resource api --type backend --stack app # scaffold a service");
|
|
496
496
|
showDetail("2. flisk up app # start it");
|
|
497
497
|
showDetail("\nRuntime readiness:", 0);
|
|
498
498
|
for (const line of runtimeNextSteps)
|
|
499
499
|
showDetail(line, 0);
|
|
500
|
-
showDetail("\nAfter editing .
|
|
500
|
+
showDetail("\nAfter editing .flisk/project.json, run `flisk config regenerate`.", 0);
|
|
501
501
|
}
|
|
502
502
|
});
|
|
503
503
|
});
|
|
@@ -21,7 +21,7 @@ export const projectsCommand = new Command("projects")
|
|
|
21
21
|
if (!projectRoot) {
|
|
22
22
|
throw errorFactories.notInProject();
|
|
23
23
|
}
|
|
24
|
-
const outDir = join(projectRoot, ".
|
|
24
|
+
const outDir = join(projectRoot, ".flisk", ".flisk-out");
|
|
25
25
|
const missing = MASTER_CONFIG_FILES.filter((file) => !existsSync(join(outDir, file)));
|
|
26
26
|
if (options.json) {
|
|
27
27
|
const discovery = createDiscoveryContext();
|
|
@@ -16,7 +16,7 @@ import { addYesOption, assertValid, confirmOrCancel } from "../utils/command-hel
|
|
|
16
16
|
import { AUTOGENERATED_DIR, BRING_YOUR_OWN_TYPE, PACKAGE_JSON, PORT_RANGES, SERVICE_JSON, } from "../utils/constants.js";
|
|
17
17
|
import { clearDiscoveryCache } from "../utils/discovery-context.js";
|
|
18
18
|
import { chooseResourcePath, isPathDiscovered, readDiscoveryPaths, } from "../utils/discovery-paths.js";
|
|
19
|
-
import { errorFactories, requireProjectRoot, runCommand
|
|
19
|
+
import { errorFactories, FliskError, requireProjectRoot, runCommand } from "../utils/errors.js";
|
|
20
20
|
import { writeFilesWithProgress } from "../utils/file-helpers.js";
|
|
21
21
|
import { showCommandHeader } from "../utils/formatting.js";
|
|
22
22
|
import { assignPort } from "../utils/port-assignment.js";
|
|
@@ -79,14 +79,14 @@ export function resolveResourcePort(resourceType, value, assignedPort, resources
|
|
|
79
79
|
const flag = resourceType === BRING_YOUR_OWN_TYPE ? "BYO --port" : "--port";
|
|
80
80
|
const subject = resourceType === BRING_YOUR_OWN_TYPE ? "BYO port" : "Port";
|
|
81
81
|
if (!/^\d+$/.test(value)) {
|
|
82
|
-
throw new
|
|
82
|
+
throw new FliskError(`${flag} must be an integer from ${min} through ${max}.`);
|
|
83
83
|
}
|
|
84
84
|
const port = Number(value);
|
|
85
85
|
if (!Number.isInteger(port) || port < min || port > max) {
|
|
86
|
-
throw new
|
|
86
|
+
throw new FliskError(`${flag} must be an integer from ${min} through ${max}.`);
|
|
87
87
|
}
|
|
88
88
|
if (resources.some((resource) => resource.config?.port === port)) {
|
|
89
|
-
throw new
|
|
89
|
+
throw new FliskError(`${subject} ${port} is already assigned to another resource.`);
|
|
90
90
|
}
|
|
91
91
|
return port;
|
|
92
92
|
}
|
|
@@ -307,14 +307,14 @@ export function parseResourceType(type) {
|
|
|
307
307
|
const normalized = type === "byo" ? BRING_YOUR_OWN_TYPE : type;
|
|
308
308
|
const validTypes = [...RESOURCE_TYPE_VALUES];
|
|
309
309
|
if (!validTypes.includes(normalized)) {
|
|
310
|
-
throw new
|
|
310
|
+
throw new FliskError(`Unknown resource type "${type}". Supported types: ${validTypes.join(", ")}.`, [`Use one of: ${validTypes.join(", ")}`, "Omit --type to create a backend"]);
|
|
311
311
|
}
|
|
312
312
|
return normalized;
|
|
313
313
|
}
|
|
314
314
|
/**
|
|
315
315
|
* Parse an existing `service.json` manifest.
|
|
316
316
|
*
|
|
317
|
-
* Wraps JSON syntax errors in a `
|
|
317
|
+
* Wraps JSON syntax errors in a `FliskError` that names the offending file, so a malformed manifest
|
|
318
318
|
* is reported as a CLI error instead of an unhandled `SyntaxError`. Only the JSON syntax is
|
|
319
319
|
* checked here: the manifest fields themselves are not validated, and a syntactically valid file
|
|
320
320
|
* is returned as-is, including unknown or missing fields.
|
|
@@ -322,7 +322,7 @@ export function parseResourceType(type) {
|
|
|
322
322
|
* @param content - The raw contents of the `service.json` file.
|
|
323
323
|
* @param configPath - Path to the manifest, used in the error message.
|
|
324
324
|
* @returns The parsed manifest.
|
|
325
|
-
* @throws
|
|
325
|
+
* @throws FliskError When the content is not valid JSON.
|
|
326
326
|
*/
|
|
327
327
|
export function parseExistingServiceJson(content, configPath) {
|
|
328
328
|
try {
|
|
@@ -330,7 +330,7 @@ export function parseExistingServiceJson(content, configPath) {
|
|
|
330
330
|
}
|
|
331
331
|
catch (error) {
|
|
332
332
|
const reason = error instanceof Error ? error.message : String(error);
|
|
333
|
-
throw new
|
|
333
|
+
throw new FliskError(`Could not parse service.json at ${configPath}: ${reason}`);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
/**
|
|
@@ -350,7 +350,7 @@ function printFrameworkInventory(options, isTypeExplicit) {
|
|
|
350
350
|
}
|
|
351
351
|
const resourceType = parseResourceType(options.type ?? "backend");
|
|
352
352
|
if (resourceType !== "frontend" && resourceType !== "backend") {
|
|
353
|
-
throw new
|
|
353
|
+
throw new FliskError(`No frameworks are registered for --type ${resourceType}.`, [
|
|
354
354
|
"Use --type frontend or --type backend to list frameworks",
|
|
355
355
|
"Omit --type to list the frontend frameworks",
|
|
356
356
|
]);
|
|
@@ -387,7 +387,7 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
387
387
|
.option("-p, --path <path>", "Custom path for resource directory")
|
|
388
388
|
.option("--resource-path <path>", "Alias for --path (for backward compatibility)")
|
|
389
389
|
.option("--register-existing", "Register an existing resource without creating templates")
|
|
390
|
-
.option("--ddd", "Scaffold DDD (domain-driven design) folders + path aliases (Premium - requires
|
|
390
|
+
.option("--ddd", "Scaffold DDD (domain-driven design) folders + path aliases (Premium - requires FLISK_LICENSE_KEY)")
|
|
391
391
|
.option("--dockerfile <path>", "Path to Dockerfile relative to resource dir (for bring-your-own)")
|
|
392
392
|
.option("--health-path <path>", "HTTP health check path (for bring-your-own)", "/health")
|
|
393
393
|
.option("--no-proxy", "Disable the Traefik route (bring-your-own only)")
|
|
@@ -413,7 +413,7 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
413
413
|
const allResources = discoverResources();
|
|
414
414
|
let resourceName = name;
|
|
415
415
|
if (!resourceName && options.yes) {
|
|
416
|
-
throw new
|
|
416
|
+
throw new FliskError("A resource name is required when using --yes.", [
|
|
417
417
|
"Pass the name explicitly, for example: flisk resource api --yes.",
|
|
418
418
|
]);
|
|
419
419
|
}
|
|
@@ -433,7 +433,7 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
433
433
|
const resourceType = parseResourceType(options.type);
|
|
434
434
|
if (resourceType !== "agent" &&
|
|
435
435
|
(options.runtime !== undefined || options.durability !== undefined)) {
|
|
436
|
-
throw new
|
|
436
|
+
throw new FliskError("--runtime and --durability can only be used with --type agent.", [
|
|
437
437
|
"Drop --runtime and --durability, or pass --type agent",
|
|
438
438
|
]);
|
|
439
439
|
}
|
|
@@ -501,7 +501,7 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
501
501
|
const granted = await hasDddLicense(projectRoot);
|
|
502
502
|
if (!granted) {
|
|
503
503
|
throw new Error("DDD scaffolding is a Premium feature and requires a license key that grants it. " +
|
|
504
|
-
"Set export
|
|
504
|
+
"Set export FLISK_LICENSE_KEY=<key> (request a Premium license at https://flisk.sh/#waitlist) and try again.");
|
|
505
505
|
}
|
|
506
506
|
dddEnabled = true;
|
|
507
507
|
}
|
|
@@ -519,7 +519,7 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
519
519
|
if (existingStacks.length > 0) {
|
|
520
520
|
if (options.yes) {
|
|
521
521
|
if (existingStacks.length > 1) {
|
|
522
|
-
throw new
|
|
522
|
+
throw new FliskError("Multiple stacks exist; specify --stack when using --yes.", [
|
|
523
523
|
`Available stacks: ${existingStacks.join(", ")}`,
|
|
524
524
|
]);
|
|
525
525
|
}
|
|
@@ -596,12 +596,12 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
596
596
|
const isExistingResource = existsSync(fullPath);
|
|
597
597
|
const hasServiceJson = existsSync(resolve(fullPath, SERVICE_JSON));
|
|
598
598
|
if (options.port !== undefined && resourceType === "sdk") {
|
|
599
|
-
throw new
|
|
599
|
+
throw new FliskError("--port does not apply to --type sdk.", [
|
|
600
600
|
"Drop --port, or use a service type",
|
|
601
601
|
]);
|
|
602
602
|
}
|
|
603
603
|
if (resourceType === "sdk" && !hasServiceJson) {
|
|
604
|
-
throw new
|
|
604
|
+
throw new FliskError(`No service.json in ${finalResourcePath}`, [
|
|
605
605
|
'Add one with "appType": "sdk", then run this again to register it',
|
|
606
606
|
]);
|
|
607
607
|
}
|
|
@@ -616,12 +616,12 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
616
616
|
: assignPort(resourceType, allResources);
|
|
617
617
|
if (options.restart !== undefined) {
|
|
618
618
|
if (resourceType !== BRING_YOUR_OWN_TYPE) {
|
|
619
|
-
throw new
|
|
619
|
+
throw new FliskError("--restart can only be used with --type bring-your-own.", [
|
|
620
620
|
"Add --type bring-your-own, or drop --restart",
|
|
621
621
|
]);
|
|
622
622
|
}
|
|
623
623
|
if (!BYO_RESTART_POLICIES.includes(options.restart)) {
|
|
624
|
-
throw new
|
|
624
|
+
throw new FliskError(`Unknown --restart policy "${options.restart}".`, [
|
|
625
625
|
`Use one of: ${BYO_RESTART_POLICIES.join(", ")}`,
|
|
626
626
|
]);
|
|
627
627
|
}
|
|
@@ -630,7 +630,7 @@ export const resourceCommand = addYesOption(new Command("resource"))
|
|
|
630
630
|
const requestedFeatures = Array.isArray(options.feature) ? options.feature : [];
|
|
631
631
|
if (requestedFeatures.includes("drizzle") &&
|
|
632
632
|
(resourceType !== "backend" || backendLanguage?.createFiles)) {
|
|
633
|
-
throw new
|
|
633
|
+
throw new FliskError("--feature drizzle is only supported for Bun backends.", [
|
|
634
634
|
"Use --type backend without --language, or drop --feature drizzle",
|
|
635
635
|
]);
|
|
636
636
|
}
|
|
@@ -977,14 +977,14 @@ This file contains the resource configuration for Flisk.
|
|
|
977
977
|
const discoveryPaths = readDiscoveryPaths(projectRoot);
|
|
978
978
|
if (pathAdjustedFrom) {
|
|
979
979
|
console.log(chalk.yellow(`\n📁 Placed in ${finalResourcePath} instead of the usual ${pathAdjustedFrom}: ` +
|
|
980
|
-
`discovery.paths in .
|
|
980
|
+
`discovery.paths in .flisk/project.json is ${JSON.stringify(discoveryPaths)}, ` +
|
|
981
981
|
`so ${pathAdjustedFrom} would never be started by \`flisk up\`.`));
|
|
982
982
|
console.log(chalk.gray(" Use --path to choose another folder."));
|
|
983
983
|
}
|
|
984
984
|
else if (!isPathDiscovered(projectRoot, finalResourcePath, discoveryPaths)) {
|
|
985
985
|
console.log(chalk.yellow(`\n⚠️ ${finalResourcePath} is outside discovery.paths ${JSON.stringify(discoveryPaths)}, ` +
|
|
986
986
|
"so `flisk up` will not start this resource."));
|
|
987
|
-
console.log(chalk.gray(" Add a matching pattern to discovery.paths in .
|
|
987
|
+
console.log(chalk.gray(" Add a matching pattern to discovery.paths in .flisk/project.json and run `flisk config regenerate`."));
|
|
988
988
|
}
|
|
989
989
|
console.log(chalk.gray(`\nNext steps:`));
|
|
990
990
|
console.log(chalk.gray(` cd ${finalResourcePath}`));
|
|
@@ -4,7 +4,7 @@ import chalk from "chalk";
|
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
import { VALID_RESOURCE_TYPES } from "../utils/constants.js";
|
|
6
6
|
import { createDiscoveryContext } from "../utils/discovery-context.js";
|
|
7
|
-
import { errorFactories, requireProjectRoot, runCommand
|
|
7
|
+
import { errorFactories, FliskError, requireProjectRoot, runCommand } from "../utils/errors.js";
|
|
8
8
|
import { formatCount, showAllSatisfyCondition, showDetail, showEmptyState, showStep, } from "../utils/formatting.js";
|
|
9
9
|
import { createMachineEnvelope, writeMachineError } from "../utils/machine-output.js";
|
|
10
10
|
import { findProjectRoot } from "../utils/paths.js";
|
|
@@ -29,7 +29,7 @@ export const resourcesCommand = new Command("resources")
|
|
|
29
29
|
requireProjectRoot();
|
|
30
30
|
}
|
|
31
31
|
if (options.type !== undefined && !includes(VALID_RESOURCE_TYPES, options.type)) {
|
|
32
|
-
throw new
|
|
32
|
+
throw new FliskError(`Invalid resource type "${options.type}"`, [
|
|
33
33
|
`Valid types: ${VALID_RESOURCE_TYPES.join(", ")}`,
|
|
34
34
|
]);
|
|
35
35
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
import { STANDARD_PORTS } from "../utils/constants.js";
|
|
6
|
-
import { errorFactories, runCommand, showErrorAndExit,
|
|
6
|
+
import { errorFactories, FliskError, ProcessExitError, runCommand, showErrorAndExit, } from "../utils/errors.js";
|
|
7
7
|
import { createMachineEnvelope, writeMachineError } from "../utils/machine-output.js";
|
|
8
8
|
import { findProjectRoot } from "../utils/paths.js";
|
|
9
9
|
import { isTiltAvailable, runTilt } from "../utils/tilt.js";
|
|
@@ -49,7 +49,7 @@ export const restartCommand = new Command("restart")
|
|
|
49
49
|
console.log(JSON.stringify(createMachineEnvelope(null, [{ code: "TILT_NOT_RUNNING", message: msg }])));
|
|
50
50
|
process.exit(1);
|
|
51
51
|
}
|
|
52
|
-
throw new
|
|
52
|
+
throw new FliskError(msg, ["Start the stack first with: flisk up"]);
|
|
53
53
|
}
|
|
54
54
|
const result = await runTilt("trigger", [resourceName, "--port", portText], {
|
|
55
55
|
inheritStdio: false,
|
|
@@ -62,13 +62,13 @@ export const restartCommand = new Command("restart")
|
|
|
62
62
|
console.log(JSON.stringify(createMachineEnvelope(null, [{ code: "TILT_NOT_RUNNING", message: msg }])));
|
|
63
63
|
process.exit(1);
|
|
64
64
|
}
|
|
65
|
-
throw new
|
|
65
|
+
throw new FliskError(msg, ["Start the stack first with: flisk up"]);
|
|
66
66
|
}
|
|
67
67
|
if (options.json) {
|
|
68
68
|
console.log(JSON.stringify(createMachineEnvelope(null, [{ code: "TILT_TRIGGER_FAILED", message: detail }])));
|
|
69
69
|
process.exit(1);
|
|
70
70
|
}
|
|
71
|
-
throw new
|
|
71
|
+
throw new FliskError(`Failed to restart ${resourceName}: ${detail}`);
|
|
72
72
|
}
|
|
73
73
|
if (options.json) {
|
|
74
74
|
console.log(JSON.stringify(createMachineEnvelope({ resource: resourceName, restarted: true })));
|
|
@@ -81,6 +81,9 @@ export const restartCommand = new Command("restart")
|
|
|
81
81
|
await action();
|
|
82
82
|
}
|
|
83
83
|
catch (err) {
|
|
84
|
+
if (err instanceof ProcessExitError) {
|
|
85
|
+
throw err;
|
|
86
|
+
}
|
|
84
87
|
writeMachineError(err);
|
|
85
88
|
}
|
|
86
89
|
return;
|
|
@@ -4,6 +4,7 @@ import { statSync } from "node:fs";
|
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import { findCliAssetRoot, loadTemplate } from "../generator/template-engine.js";
|
|
7
|
+
import { describeLayoutProblems, EXTENSION_DIRS, inspectExtensionLayout, resolveExtensionDir, resolveTiltfile, } from "../utils/runtime-layout.js";
|
|
7
8
|
const REQUIRED_ASSET_PATHS = [
|
|
8
9
|
{ path: "Tiltfile", directory: false },
|
|
9
10
|
{ path: "engine", directory: true },
|
|
@@ -13,6 +14,7 @@ const REQUIRED_ASSET_PATHS = [
|
|
|
13
14
|
{ path: "cli/templates", directory: true },
|
|
14
15
|
{ path: "shared-platform-engineering/docker-templates", directory: true },
|
|
15
16
|
];
|
|
17
|
+
const EXTENSION_NAMES = new Set(EXTENSION_DIRS);
|
|
16
18
|
const REQUIRED_TEMPLATES = [
|
|
17
19
|
".tiltignore.hbs",
|
|
18
20
|
"TILT_RESOURCE_DEFAULTS.star.hbs",
|
|
@@ -35,7 +37,11 @@ export const runtimeCommand = new Command("runtime")
|
|
|
35
37
|
const missing = assetRoot
|
|
36
38
|
? REQUIRED_ASSET_PATHS.filter(({ path, directory }) => {
|
|
37
39
|
try {
|
|
38
|
-
const stats = statSync(
|
|
40
|
+
const stats = statSync(EXTENSION_NAMES.has(path)
|
|
41
|
+
? resolveExtensionDir(assetRoot, path)
|
|
42
|
+
: path === "Tiltfile"
|
|
43
|
+
? resolveTiltfile(assetRoot)
|
|
44
|
+
: join(assetRoot, path));
|
|
39
45
|
return directory ? !stats.isDirectory() : !stats.isFile();
|
|
40
46
|
}
|
|
41
47
|
catch {
|
|
@@ -43,6 +49,8 @@ export const runtimeCommand = new Command("runtime")
|
|
|
43
49
|
}
|
|
44
50
|
}).map(({ path }) => path)
|
|
45
51
|
: REQUIRED_ASSET_PATHS.map(({ path }) => path);
|
|
52
|
+
const layout = assetRoot ? inspectExtensionLayout(assetRoot) : null;
|
|
53
|
+
const layoutErrors = assetRoot && layout?.kind === "mixed" ? [describeLayoutProblems(assetRoot, layout)] : [];
|
|
46
54
|
const templateErrors = [];
|
|
47
55
|
if (assetRoot && missing.length === 0) {
|
|
48
56
|
for (const template of REQUIRED_TEMPLATES) {
|
|
@@ -54,9 +62,12 @@ export const runtimeCommand = new Command("runtime")
|
|
|
54
62
|
}
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
|
-
const ok = Boolean(assetRoot) &&
|
|
65
|
+
const ok = Boolean(assetRoot) &&
|
|
66
|
+
missing.length === 0 &&
|
|
67
|
+
layoutErrors.length === 0 &&
|
|
68
|
+
templateErrors.length === 0;
|
|
58
69
|
if (options.json) {
|
|
59
|
-
console.log(JSON.stringify({ ok, assetRoot, missing, templateErrors }));
|
|
70
|
+
console.log(JSON.stringify({ ok, assetRoot, missing, layoutErrors, templateErrors }));
|
|
60
71
|
}
|
|
61
72
|
else if (ok) {
|
|
62
73
|
console.log(`Flisk runtime assets found at ${assetRoot}`);
|
|
@@ -67,6 +78,7 @@ export const runtimeCommand = new Command("runtime")
|
|
|
67
78
|
? `Incomplete Flisk runtime assets at ${assetRoot}`
|
|
68
79
|
: "Flisk runtime assets not found",
|
|
69
80
|
...missing.map((path) => `Missing: ${path}`),
|
|
81
|
+
...layoutErrors,
|
|
70
82
|
...templateErrors,
|
|
71
83
|
].join("\n"));
|
|
72
84
|
}
|
|
@@ -5,7 +5,7 @@ import chalk from "chalk";
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import { addYesOption, assertValid, confirmOrCancel } from "../utils/command-helpers.js";
|
|
7
7
|
import { clearDiscoveryCache, createDiscoveryContext } from "../utils/discovery-context.js";
|
|
8
|
-
import { errorFactories, requireProjectRoot, runCommand
|
|
8
|
+
import { errorFactories, FliskError, requireProjectRoot, runCommand } from "../utils/errors.js";
|
|
9
9
|
import { writeJsonFile } from "../utils/file-helpers.js";
|
|
10
10
|
import { formatCount, showAllSatisfyCondition, showCommandHeader, showDetail, showSuccess, } from "../utils/formatting.js";
|
|
11
11
|
import { promptMultiSelect, promptText } from "../utils/prompt.js";
|
|
@@ -16,7 +16,7 @@ export function parseStackResourceConfig(content, configPath) {
|
|
|
16
16
|
}
|
|
17
17
|
catch (error) {
|
|
18
18
|
const reason = error instanceof Error ? error.message : String(error);
|
|
19
|
-
throw new
|
|
19
|
+
throw new FliskError(`Could not parse service.json at ${configPath}: ${reason}`);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
function normalizeResourceNames(names) {
|
|
@@ -63,18 +63,18 @@ export const stackCommand = addYesOption(new Command("stack"))
|
|
|
63
63
|
}
|
|
64
64
|
if (!process.stdin.isTTY) {
|
|
65
65
|
if (options.resources === undefined) {
|
|
66
|
-
throw new
|
|
66
|
+
throw new FliskError("Interactive resource selection requires a TTY.", [
|
|
67
67
|
"Pass --resources <name...> to select resources without a prompt.",
|
|
68
68
|
"Use --list to inspect unassigned resources without changing them.",
|
|
69
69
|
]);
|
|
70
70
|
}
|
|
71
71
|
if (!stackName) {
|
|
72
|
-
throw new
|
|
72
|
+
throw new FliskError("A stack name is required when stdin is not a TTY.", [
|
|
73
73
|
"Use: flisk stack <stack-name> --resources <name...> [--yes]",
|
|
74
74
|
]);
|
|
75
75
|
}
|
|
76
76
|
if (!options.yes) {
|
|
77
|
-
throw new
|
|
77
|
+
throw new FliskError("Confirmation requires a TTY.", [
|
|
78
78
|
"Pass --yes to skip confirmation when assigning resources without a TTY.",
|
|
79
79
|
]);
|
|
80
80
|
}
|
|
@@ -97,7 +97,7 @@ export const stackCommand = addYesOption(new Command("stack"))
|
|
|
97
97
|
if (options.resources !== undefined) {
|
|
98
98
|
const requestedNames = normalizeResourceNames(options.resources);
|
|
99
99
|
if (requestedNames.length === 0) {
|
|
100
|
-
throw new
|
|
100
|
+
throw new FliskError("Pass at least one resource name to --resources.", [
|
|
101
101
|
"Example: `flisk stack api --resources users-api orders-api --yes`",
|
|
102
102
|
]);
|
|
103
103
|
}
|
|
@@ -109,7 +109,7 @@ export const stackCommand = addYesOption(new Command("stack"))
|
|
|
109
109
|
}
|
|
110
110
|
const duplicates = [...configPathsByName].filter(([, configPaths]) => configPaths.length > 1);
|
|
111
111
|
if (duplicates.length > 0) {
|
|
112
|
-
throw new
|
|
112
|
+
throw new FliskError("Cannot assign resources while duplicate names are present.", duplicates.map(([name, configPaths]) => `Duplicate "${name}" found in ${configPaths.join(" and ")}`));
|
|
113
113
|
}
|
|
114
114
|
const validNames = [...configPathsByName.keys()].sort();
|
|
115
115
|
const resourceByName = new Map(discovery.resources.map((resource) => [resource.name, resource]));
|
|
@@ -121,7 +121,7 @@ export const stackCommand = addYesOption(new Command("stack"))
|
|
|
121
121
|
throw error;
|
|
122
122
|
}
|
|
123
123
|
if (resource.stack) {
|
|
124
|
-
throw new
|
|
124
|
+
throw new FliskError(`Resource "${name}" is already assigned to stack "${resource.stack}".`, ["Run `flisk resources` to review current assignments."]);
|
|
125
125
|
}
|
|
126
126
|
selectedResources.push(resource.configPath);
|
|
127
127
|
}
|