@flisk-sh/flisk 1.3.206 → 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 +41 -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 +14 -1
- 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-ODVBKN6S.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-5CFVN3W3.js → chunk-B6Q5VKL7.js} +13 -13
- package/cli/dist-bundle/{chunk-4W6OXDLK.js → chunk-BWK6MPCB.js} +3 -3
- package/cli/dist-bundle/{chunk-PHI5AT3H.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-6Y6G7PSD.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-EOMANLAD.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-VIIBMWD4.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-3QQGL3NQ.js +0 -35
- package/cli/dist-bundle/chunk-42IVF3YT.js +0 -3
- package/cli/dist-bundle/chunk-7C5VA6CW.js +0 -57
- package/cli/dist-bundle/chunk-D2BXXJDM.js +0 -7
- package/cli/dist-bundle/chunk-GANRXKBM.js +0 -2
- package/cli/dist-bundle/chunk-LI3BXAX5.js +0 -2
- package/cli/dist-bundle/chunk-NCEK46NX.js +0 -52
- package/cli/dist-bundle/chunk-XSPMLWAE.js +0 -10
- package/cli/dist-bundle/cold-preflight-4I24DQLW.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-6374RNL6.js +0 -2
- package/cli/dist-bundle/project-IRWFRXWA.js +0 -2
- package/cli/dist-bundle/project-templates-JDRE7AVL.js +0 -2
- package/cli/dist-bundle/tilt-port-owner-AN3ITRTR.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
package/cli/dist/commands/up.js
CHANGED
|
@@ -12,8 +12,9 @@ import { STANDARD_PORTS } from "../utils/constants.js";
|
|
|
12
12
|
import { getDeferredResourceNames, summarizeTiltBuildError } from "../utils/doctor-runtime.js";
|
|
13
13
|
import { applyEnvFileSelection, assertEngineSupportsEnvFile, EnvFileError, envFileWarning, PROJECT_ENV_FILE_VAR, selectEnvFile, } from "../utils/env-selection.js";
|
|
14
14
|
import { completeEnvFile } from "../utils/env-validator.js";
|
|
15
|
-
import { errorFactories, getErrorMessage, handleTiltFailure, requireProjectRoot, runCommand, showError, showErrorAndExit,
|
|
15
|
+
import { errorFactories, FliskError, getErrorMessage, handleTiltFailure, requireProjectRoot, runCommand, showError, showErrorAndExit, withTiltCheck, } from "../utils/errors.js";
|
|
16
16
|
import { ensureSmokeRecordsIgnored } from "../utils/file-helpers.js";
|
|
17
|
+
import { evaluateFliskVersionFloor } from "../utils/flisk-version.js";
|
|
17
18
|
import { formatCount } from "../utils/formatting.js";
|
|
18
19
|
import { exportHostPortPlan, getHostPortPlan, writeSavedHostPortPlan, } from "../utils/host-port-config.js";
|
|
19
20
|
import { formatHostPortPlan } from "../utils/host-port-plan.js";
|
|
@@ -30,7 +31,6 @@ import { appendHealthPath, resolveSubdomainBases } from "../utils/service-urls.j
|
|
|
30
31
|
import { discoverResourcesStrict, discoverResourcesWithProblems, discoverStacks, getResourcesForStack, stackExists, warnAboutSkippedFiles, } from "../utils/services.js";
|
|
31
32
|
import { buildSmokePlans, formatSmokeFailure, runSmokePlans, safeSmokeDeps, } from "../utils/smoke.js";
|
|
32
33
|
import { buildStartupReport, formatStartupReport, isStartupStalled, } from "../utils/startup-report.js";
|
|
33
|
-
import { evaluateTdkVersionFloor } from "../utils/tdk-version.js";
|
|
34
34
|
import { buildTiltUpArgs, runTilt } from "../utils/tilt.js";
|
|
35
35
|
import { classifyTiltPorts } from "../utils/tilt-port-owner.js";
|
|
36
36
|
import { stopTiltOnPort } from "../utils/tilt-process.js";
|
|
@@ -87,7 +87,7 @@ export function driftReport(projectRoot, resources) {
|
|
|
87
87
|
: undefined));
|
|
88
88
|
}
|
|
89
89
|
catch (error) {
|
|
90
|
-
// A project with no .
|
|
90
|
+
// A project with no .flisk/project.json has no snapshots to compare. Anything else (a corrupt config) must not skip the gate.
|
|
91
91
|
if (error instanceof ProjectConfigNotFoundError)
|
|
92
92
|
return null;
|
|
93
93
|
throw error;
|
|
@@ -117,16 +117,16 @@ export function enforceDriftGate(projectRoot, options, exit = process.exit) {
|
|
|
117
117
|
exit(DRIFT_EXIT_CODE);
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
-
* Runs before anything starts (also under --dry-run, like the drift gate): a project's `
|
|
121
|
-
* .
|
|
122
|
-
* `ignoreVersion` skips the check and says so. No
|
|
120
|
+
* Runs before anything starts (also under --dry-run, like the drift gate): a project's `minFliskVersion` in
|
|
121
|
+
* .flisk/project.json that this CLI does not meet, or cannot read, exits with 1 and the same text as `flisk doctor`.
|
|
122
|
+
* `ignoreVersion` skips the check and says so. No minFliskVersion means no check.
|
|
123
123
|
*/
|
|
124
124
|
export function enforceVersionFloor(projectRoot, options, currentVersion = getPackageVersion(), exit = process.exit) {
|
|
125
125
|
if (options.ignoreVersion) {
|
|
126
|
-
console.warn(chalk.yellow("Warning: --ignore-version set;
|
|
126
|
+
console.warn(chalk.yellow("Warning: --ignore-version set; minFliskVersion was not checked."));
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
|
-
const floor =
|
|
129
|
+
const floor = evaluateFliskVersionFloor(projectRoot, currentVersion);
|
|
130
130
|
if (floor.status === "none" || floor.status === "ok")
|
|
131
131
|
return;
|
|
132
132
|
options.onFail?.(`${floor.message}\n${floor.fix}`);
|
|
@@ -171,7 +171,7 @@ function waitForTiltUi(port, timeoutMs = 30_000) {
|
|
|
171
171
|
* file is resolved, read and checked before anything is written or started. Without the option the
|
|
172
172
|
* project `.env` stays the env file of the run, exactly as before.
|
|
173
173
|
*
|
|
174
|
-
* @throws
|
|
174
|
+
* @throws FliskError when the file cannot be used; the run stops before it starts
|
|
175
175
|
*/
|
|
176
176
|
export function selectRunEnvFile(projectRoot, requested) {
|
|
177
177
|
if (requested === undefined)
|
|
@@ -187,14 +187,14 @@ export function selectRunEnvFile(projectRoot, requested) {
|
|
|
187
187
|
}
|
|
188
188
|
/** The machine-readable failure of a refused `--env-file`, and the exit code it stops the run with. */
|
|
189
189
|
function envFileFailure(error) {
|
|
190
|
-
const suggestions = error instanceof
|
|
190
|
+
const suggestions = error instanceof FliskError ? error.suggestions : [];
|
|
191
191
|
return {
|
|
192
192
|
failure: {
|
|
193
193
|
code: error instanceof EnvFileError ? error.code : "ENV_FILE_INVALID",
|
|
194
194
|
message: getErrorMessage(error),
|
|
195
195
|
...(suggestions.length > 0 ? { suggestions } : {}),
|
|
196
196
|
},
|
|
197
|
-
exitCode: error instanceof
|
|
197
|
+
exitCode: error instanceof FliskError ? error.exitCode : 2,
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
export const upCommand = new Command("up")
|
|
@@ -206,7 +206,7 @@ export const upCommand = new Command("up")
|
|
|
206
206
|
.option("--dry-run", "Show what would be started without starting", false)
|
|
207
207
|
.option("-f, --force", "Kill existing Tilt process before starting", false)
|
|
208
208
|
.option("--ignore-drift", "Start even if generated files differ from service.json", false)
|
|
209
|
-
.option("--ignore-version", "Start even if this flisk is older than
|
|
209
|
+
.option("--ignore-version", "Start even if this flisk is older than minFliskVersion in .flisk/project.json", false)
|
|
210
210
|
.option("--only <services...>", "Start only these services plus what the Tiltfile enables for them (their dependsOn services and shared infrastructure). With a stack, names must belong to that stack; dependencies may cross stacks")
|
|
211
211
|
.option("--env-file <path>", "Use this project env file for the run instead of .env (for example: --env-file .env.integration)")
|
|
212
212
|
.option("--json", "Print one JSON object on stdout when the stack is ready or the command fails; implies --quiet", false)
|
|
@@ -225,7 +225,7 @@ export const upCommand = new Command("up")
|
|
|
225
225
|
if (versionRoot) {
|
|
226
226
|
enforceVersionFloor(versionRoot, {
|
|
227
227
|
ignoreVersion: options.ignoreVersion,
|
|
228
|
-
onFail: (message) => emit?.({ ok: false }, [{ code: "
|
|
228
|
+
onFail: (message) => emit?.({ ok: false }, [{ code: "FLISK_VERSION_TOO_OLD", message }]),
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
// The env file of the run. `--env-file` replaces the project .env for this run, so the file is
|
|
@@ -234,7 +234,7 @@ export const upCommand = new Command("up")
|
|
|
234
234
|
let envFileSelection;
|
|
235
235
|
if (options.envFile === undefined) {
|
|
236
236
|
// Without the option the project .env is the env file of the run, whatever the environment
|
|
237
|
-
// carries: an inherited
|
|
237
|
+
// carries: an inherited FLISK_ENV_FILE must not change the default.
|
|
238
238
|
delete process.env[PROJECT_ENV_FILE_VAR];
|
|
239
239
|
}
|
|
240
240
|
if (options.envFile !== undefined) {
|
|
@@ -262,7 +262,7 @@ export const upCommand = new Command("up")
|
|
|
262
262
|
emit?.({ ok: false }, [{ code: "HOST_UNSUPPORTED", message: hostRefusal }]);
|
|
263
263
|
showErrorAndExit(hostRefusal);
|
|
264
264
|
}
|
|
265
|
-
const platformRefusal = nativeWindowsUpRefusal(process.platform, process.env.
|
|
265
|
+
const platformRefusal = nativeWindowsUpRefusal(process.platform, process.env.FLISK_ALLOW_NATIVE_WINDOWS);
|
|
266
266
|
if (platformRefusal)
|
|
267
267
|
showErrorAndExit(platformRefusal);
|
|
268
268
|
// An unknown schemaVersion is refused before the machine check, so --json can name the file even when Bun is missing.
|
|
@@ -297,7 +297,7 @@ export const upCommand = new Command("up")
|
|
|
297
297
|
discoveredStacks = discoverStacks(discoveredResources);
|
|
298
298
|
discoveredStackNames = discoveredStacks.map((stack) => stack.name);
|
|
299
299
|
}
|
|
300
|
-
// Reject a bad request before anything below can write to the project (.env, runtime assets, .
|
|
300
|
+
// Reject a bad request before anything below can write to the project (.env, runtime assets, .flisk/project.json).
|
|
301
301
|
if (options.only) {
|
|
302
302
|
if (stackName && !stackExists(stackName, discoveredResources)) {
|
|
303
303
|
const error = errorFactories.stackNotFound(stackName, discoveredStackNames);
|
|
@@ -353,11 +353,11 @@ export const upCommand = new Command("up")
|
|
|
353
353
|
console.log(chalk.gray(`Added ${addedEnvKeys.join(", ")} to .env (generated; existing values unchanged)`));
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
// A project made by `flisk import` has .
|
|
356
|
+
// A project made by `flisk import` has .flisk/project.json but no generated files yet. Generate them rather than letting
|
|
357
357
|
// Tilt fail on a missing Tiltfile.
|
|
358
|
-
if (foundRoot && !existsSync(join(projectRoot, ".
|
|
358
|
+
if (foundRoot && !existsSync(join(projectRoot, ".flisk", ".flisk-out", "Tiltfile"))) {
|
|
359
359
|
if (!options.quiet) {
|
|
360
|
-
console.log(chalk.gray("No generated Tiltfile yet; generating .
|
|
360
|
+
console.log(chalk.gray("No generated Tiltfile yet; generating .flisk/.flisk-out/ ..."));
|
|
361
361
|
}
|
|
362
362
|
await generateMasterConfigs(projectRoot, { quiet: options.quiet });
|
|
363
363
|
}
|
|
@@ -367,7 +367,7 @@ export const upCommand = new Command("up")
|
|
|
367
367
|
}
|
|
368
368
|
const newlyEnabledStacks = enableDiscoveredStacks(projectRoot, discoveredResources);
|
|
369
369
|
if (newlyEnabledStacks.length > 0 && !options.quiet) {
|
|
370
|
-
console.log(chalk.gray(`Added ${newlyEnabledStacks.join(", ")} to the pre_alpha phase in .
|
|
370
|
+
console.log(chalk.gray(`Added ${newlyEnabledStacks.join(", ")} to the pre_alpha phase in .flisk/project.json`));
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
let servicesToStart;
|
|
@@ -441,7 +441,7 @@ export const upCommand = new Command("up")
|
|
|
441
441
|
console.log(chalk.blue(formatHostPortPlan(hostPortPlan)));
|
|
442
442
|
for (const line of formatPortFallbackNotice(hostPortPlan))
|
|
443
443
|
console.log(chalk.yellow(line));
|
|
444
|
-
console.log(chalk.gray("Override with
|
|
444
|
+
console.log(chalk.gray("Override with FLISK_HTTP_PORT, FLISK_HTTPS_PORT, or FLISK_POSTGRES_PORT."));
|
|
445
445
|
}
|
|
446
446
|
if (emit && options.dryRun) {
|
|
447
447
|
emit({
|
|
@@ -530,7 +530,7 @@ export const upCommand = new Command("up")
|
|
|
530
530
|
});
|
|
531
531
|
if (!options.quiet) {
|
|
532
532
|
console.log(chalk.gray("\nRunning tilt up..."));
|
|
533
|
-
console.log(chalk.gray(`Using Tiltfile: .
|
|
533
|
+
console.log(chalk.gray(`Using Tiltfile: .flisk/.flisk-out/Tiltfile`));
|
|
534
534
|
}
|
|
535
535
|
const tiltRun = runTilt("up", tiltArgs, {
|
|
536
536
|
verbose: options.verbose && !options.json,
|
|
@@ -626,7 +626,7 @@ export const upCommand = new Command("up")
|
|
|
626
626
|
if (ignoreWarning)
|
|
627
627
|
console.warn(chalk.yellow(ignoreWarning));
|
|
628
628
|
const results = await runSmokePlans(smokePlans, {
|
|
629
|
-
recordDir: join(projectRoot, ".
|
|
629
|
+
recordDir: join(projectRoot, ".flisk", "smoke"),
|
|
630
630
|
...safeSmokeDeps(projectRoot, (message) => console.warn(chalk.yellow(message)), {
|
|
631
631
|
// The selected env file holds secrets as much as the project .env.
|
|
632
632
|
envFiles: envFileSelection ? [envFileSelection.path] : [],
|
|
@@ -19,11 +19,11 @@ import { startSpinner } from "../utils/spinner.js";
|
|
|
19
19
|
import { extractTarball } from "../utils/tar.js";
|
|
20
20
|
import { findAllOnPath, findOnPath } from "../utils/which.js";
|
|
21
21
|
/** @internal Exported for unit tests only; not part of the package API. */
|
|
22
|
-
export function isStandaloneBinary(
|
|
23
|
-
if (isWindows() &&
|
|
22
|
+
export function isStandaloneBinary(fliskPath) {
|
|
23
|
+
if (isWindows() && fliskPath.toLowerCase().endsWith(".exe"))
|
|
24
24
|
return true;
|
|
25
25
|
try {
|
|
26
|
-
const fileInfo = execFileSync("file", ["-b",
|
|
26
|
+
const fileInfo = execFileSync("file", ["-b", fliskPath], { encoding: "utf-8" });
|
|
27
27
|
return /Mach-O|ELF/.test(fileInfo);
|
|
28
28
|
}
|
|
29
29
|
catch (err) {
|
|
@@ -34,7 +34,7 @@ export function isStandaloneBinary(tdkPath) {
|
|
|
34
34
|
/** @internal Exported for unit tests only; not part of the package API. */
|
|
35
35
|
export function classifyRunningInstall(execPath, scriptPath, platformName = process.platform) {
|
|
36
36
|
const runningName = (platformName === "win32" ? win32.basename(execPath) : basename(execPath)).toLowerCase();
|
|
37
|
-
if (runningName === "flisk" || runningName === "
|
|
37
|
+
if (runningName === "flisk" || runningName === "flisk.exe") {
|
|
38
38
|
return { method: "binary", path: execPath };
|
|
39
39
|
}
|
|
40
40
|
if (runningName === "node" || runningName === "node.exe") {
|
|
@@ -58,24 +58,26 @@ export function detectInstallation() {
|
|
|
58
58
|
if (runningInstall)
|
|
59
59
|
return runningInstall;
|
|
60
60
|
try {
|
|
61
|
-
const
|
|
62
|
-
if (!
|
|
61
|
+
const fliskPath = findOnPath(executableName());
|
|
62
|
+
if (!fliskPath)
|
|
63
63
|
return { method: "unknown" };
|
|
64
64
|
// `readlink -f` is not available on macOS. Use Node's cross-platform
|
|
65
65
|
// realpath implementation so standalone binaries are detected there too.
|
|
66
|
-
const realPath = realpathSync(
|
|
67
|
-
// If the real path contains
|
|
68
|
-
if (realPath.includes("
|
|
66
|
+
const realPath = realpathSync(fliskPath);
|
|
67
|
+
// If the real path contains flisk-cli and has .git, it's a linked git install
|
|
68
|
+
if (realPath.includes("flisk-cli")) {
|
|
69
69
|
const possibleGitRoot = resolve(realPath, "..", "..", "..");
|
|
70
70
|
if (existsSync(join(possibleGitRoot, ".git"))) {
|
|
71
71
|
return { method: "git", path: possibleGitRoot };
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
if (fliskPath.includes("node_modules") ||
|
|
75
|
+
fliskPath.includes(".npm") ||
|
|
76
|
+
fliskPath.includes(".bun")) {
|
|
77
|
+
if (fliskPath.includes(".bun")) {
|
|
78
|
+
return { method: "bun", path: fliskPath };
|
|
77
79
|
}
|
|
78
|
-
return { method: "npm", path:
|
|
80
|
+
return { method: "npm", path: fliskPath };
|
|
79
81
|
}
|
|
80
82
|
const cliRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
|
|
81
83
|
if (existsSync(join(cliRoot, ".git"))) {
|
|
@@ -86,7 +88,7 @@ export function detectInstallation() {
|
|
|
86
88
|
if (isStandaloneBinary(realPath)) {
|
|
87
89
|
return { method: "binary", path: realPath };
|
|
88
90
|
}
|
|
89
|
-
return { method: "unknown", path:
|
|
91
|
+
return { method: "unknown", path: fliskPath };
|
|
90
92
|
}
|
|
91
93
|
catch (err) {
|
|
92
94
|
console.warn(chalk.yellow("⚠️ Could not detect installation method"));
|
|
@@ -95,25 +97,27 @@ export function detectInstallation() {
|
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
/** @internal Exported for unit tests only; not part of the package API. */
|
|
98
|
-
export function detectInstallationForPath(
|
|
100
|
+
export function detectInstallationForPath(fliskPath) {
|
|
99
101
|
try {
|
|
100
|
-
const realPath = realpathSync(
|
|
101
|
-
if (realPath.includes("
|
|
102
|
+
const realPath = realpathSync(fliskPath);
|
|
103
|
+
if (realPath.includes("flisk-cli")) {
|
|
102
104
|
const possibleGitRoot = resolve(realPath, "..", "..", "..");
|
|
103
105
|
if (existsSync(join(possibleGitRoot, ".git"))) {
|
|
104
106
|
return { method: "git", path: possibleGitRoot };
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
+
if (fliskPath.includes("node_modules") ||
|
|
110
|
+
fliskPath.includes(".npm") ||
|
|
111
|
+
fliskPath.includes(".bun")) {
|
|
112
|
+
return { method: fliskPath.includes(".bun") ? "bun" : "npm", path: fliskPath };
|
|
109
113
|
}
|
|
110
114
|
if (isStandaloneBinary(realPath))
|
|
111
115
|
return { method: "binary", path: realPath };
|
|
112
116
|
}
|
|
113
117
|
catch (err) {
|
|
114
|
-
logVerbose(`Installation detection failed for ${
|
|
118
|
+
logVerbose(`Installation detection failed for ${fliskPath}`, err);
|
|
115
119
|
}
|
|
116
|
-
return { method: "unknown", path:
|
|
120
|
+
return { method: "unknown", path: fliskPath };
|
|
117
121
|
}
|
|
118
122
|
/** @internal Exported for unit tests only; not part of the package API. */
|
|
119
123
|
export function detectAllInstallations() {
|
|
@@ -211,11 +215,11 @@ export function isWritable(path) {
|
|
|
211
215
|
}
|
|
212
216
|
}
|
|
213
217
|
/** @internal Exported for unit tests only; not part of the package API. */
|
|
214
|
-
export async function upgradeViaBinary(
|
|
218
|
+
export async function upgradeViaBinary(fliskPath, release) {
|
|
215
219
|
// Never shells out to sudo - if the install dir isn't user-writable, fail
|
|
216
220
|
// fast with the manual curl command instead of downloading first and
|
|
217
221
|
// elevating automatically. The user runs that curl themselves.
|
|
218
|
-
const installDir = dirname(
|
|
222
|
+
const installDir = dirname(fliskPath);
|
|
219
223
|
if (!isWritable(installDir)) {
|
|
220
224
|
console.log(chalk.yellow(`\n🔒 ${installDir} isn't writable by your user.`));
|
|
221
225
|
console.log(chalk.yellow("💡 Upgrade manually instead:"));
|
|
@@ -223,19 +227,19 @@ export async function upgradeViaBinary(tdkPath, release) {
|
|
|
223
227
|
console.log(chalk.cyan(" Install Flisk in a user-writable directory, then retry the upgrade."));
|
|
224
228
|
}
|
|
225
229
|
else {
|
|
226
|
-
console.log(chalk.cyan(` curl -fsSL -o ${
|
|
227
|
-
console.log(chalk.cyan(` chmod +x ${
|
|
230
|
+
console.log(chalk.cyan(` curl -fsSL -o ${fliskPath} ${release.downloadUrl}`));
|
|
231
|
+
console.log(chalk.cyan(` chmod +x ${fliskPath}`));
|
|
228
232
|
}
|
|
229
233
|
return false;
|
|
230
234
|
}
|
|
231
235
|
const spinner = startSpinner(`Downloading ${release.assetName} (${release.tag})...`);
|
|
232
|
-
const tempDir = join(installDir, `.
|
|
236
|
+
const tempDir = join(installDir, `.flisk-upgrade-${process.pid}-${Date.now()}`);
|
|
233
237
|
const tmpPath = join(tempDir, release.assetName);
|
|
234
238
|
const engineTmpPath = join(tempDir, "engine.tar.gz");
|
|
235
|
-
const engineDir = join(installDir, "
|
|
236
|
-
const engineStageDir = join(tempDir, "
|
|
237
|
-
const binaryBackup = join(tempDir, `${basename(
|
|
238
|
-
const engineBackup = join(tempDir, "
|
|
239
|
+
const engineDir = join(installDir, "flisk-cli");
|
|
240
|
+
const engineStageDir = join(tempDir, "flisk-cli");
|
|
241
|
+
const binaryBackup = join(tempDir, `${basename(fliskPath)}.previous`);
|
|
242
|
+
const engineBackup = join(tempDir, "flisk-cli.previous");
|
|
239
243
|
try {
|
|
240
244
|
mkdirSync(tempDir, { recursive: true });
|
|
241
245
|
const binaryResponse = await fetch(release.downloadUrl, {
|
|
@@ -245,8 +249,8 @@ export async function upgradeViaBinary(tdkPath, release) {
|
|
|
245
249
|
throw new Error(`Download failed (${binaryResponse.status})`);
|
|
246
250
|
writeFileSync(tmpPath, Buffer.from(await binaryResponse.arrayBuffer()));
|
|
247
251
|
// The compiled binary has no source checkout to find engine/ or
|
|
248
|
-
// cli/templates/ in, so it looks for a
|
|
249
|
-
// (see template-engine.ts loadTemplate() /
|
|
252
|
+
// cli/templates/ in, so it looks for a flisk-cli/ folder next to itself
|
|
253
|
+
// (see template-engine.ts loadTemplate() / vendorFliskExtension()).
|
|
250
254
|
// `flisk upgrade` only used to swap the binary, leaving that folder
|
|
251
255
|
// stale/missing after an upgrade - refresh it here too, every time,
|
|
252
256
|
// the same way install.sh does on a fresh install.
|
|
@@ -275,14 +279,14 @@ export async function upgradeViaBinary(tdkPath, release) {
|
|
|
275
279
|
chmodSync(tmpPath, 0o755);
|
|
276
280
|
mkdirSync(engineStageDir, { recursive: true });
|
|
277
281
|
extractTarball(engineBuffer, engineStageDir);
|
|
278
|
-
if (existsSync(
|
|
279
|
-
renameSync(
|
|
282
|
+
if (existsSync(fliskPath))
|
|
283
|
+
renameSync(fliskPath, binaryBackup);
|
|
280
284
|
try {
|
|
281
|
-
renameSync(tmpPath,
|
|
285
|
+
renameSync(tmpPath, fliskPath);
|
|
282
286
|
}
|
|
283
287
|
catch (err) {
|
|
284
288
|
if (existsSync(binaryBackup))
|
|
285
|
-
renameSync(binaryBackup,
|
|
289
|
+
renameSync(binaryBackup, fliskPath);
|
|
286
290
|
throw err;
|
|
287
291
|
}
|
|
288
292
|
if (existsSync(engineDir))
|
|
@@ -294,8 +298,8 @@ export async function upgradeViaBinary(tdkPath, release) {
|
|
|
294
298
|
if (existsSync(engineBackup))
|
|
295
299
|
renameSync(engineBackup, engineDir);
|
|
296
300
|
if (existsSync(binaryBackup)) {
|
|
297
|
-
rmSync(
|
|
298
|
-
renameSync(binaryBackup,
|
|
301
|
+
rmSync(fliskPath, { force: true });
|
|
302
|
+
renameSync(binaryBackup, fliskPath);
|
|
299
303
|
}
|
|
300
304
|
throw err;
|
|
301
305
|
}
|
|
@@ -639,7 +643,7 @@ export function createUpgradeCommand() {
|
|
|
639
643
|
console.log(chalk.yellow("\nManual upgrade using a published package:"));
|
|
640
644
|
console.log(chalk.cyan(" npm install -g @flisk-sh/flisk@latest"));
|
|
641
645
|
console.log(chalk.cyan(" bun install -g @flisk-sh/flisk@latest"));
|
|
642
|
-
console.log(chalk.cyan(" git: cd /path/to/
|
|
646
|
+
console.log(chalk.cyan(" git: cd /path/to/flisk-cli && git pull && bun link --force"));
|
|
643
647
|
process.exit(1);
|
|
644
648
|
}
|
|
645
649
|
let latestVersion = null;
|
|
@@ -782,7 +786,7 @@ export function createUpgradeCommand() {
|
|
|
782
786
|
console.log(chalk.cyan(" Commit or stash them, then retry: flisk upgrade"));
|
|
783
787
|
}
|
|
784
788
|
else if (installInfo.method === "binary" && binaryRelease && installInfo.path) {
|
|
785
|
-
const engineDir = join(dirname(installInfo.path), "
|
|
789
|
+
const engineDir = join(dirname(installInfo.path), "flisk-cli");
|
|
786
790
|
if (isWindows()) {
|
|
787
791
|
console.log(chalk.cyan(" irm https://flisk.sh/install.ps1 | iex"));
|
|
788
792
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
import {
|
|
3
|
+
import { FliskError } from "../utils/errors.js";
|
|
4
4
|
import { litFrontendProvider } from "./lit.js";
|
|
5
5
|
import { preactFrontendProvider } from "./preact.js";
|
|
6
6
|
import { qwikFrontendProvider } from "./qwik.js";
|
|
@@ -61,7 +61,7 @@ export function getFrontendFramework(frameworkId, resourceName) {
|
|
|
61
61
|
const supportedIds = Object.keys(FRONTEND_FRAMEWORKS).join(", ");
|
|
62
62
|
const isMeta = META_FRAMEWORK_IDS.includes(id);
|
|
63
63
|
const byo = `flisk resource ${resourceName ?? "<name>"} --type bring-your-own`;
|
|
64
|
-
throw new
|
|
64
|
+
throw new FliskError(`${isMeta ? `"${frameworkId}" is not a Vite SPA provider` : `Unknown frontend framework "${frameworkId}"`}. Supported frameworks: ${supportedIds}.`, [
|
|
65
65
|
`Use one of: ${supportedIds}`,
|
|
66
66
|
`Omit --framework to use ${DEFAULT_FRONTEND_FRAMEWORK}`,
|
|
67
67
|
...(isMeta ? [`Create the app with ${id}'s own CLI, then register it: ${byo}`] : []),
|
|
@@ -73,7 +73,7 @@ export function resolveFrontendFramework(resourceType, frameworkId, resourceName
|
|
|
73
73
|
if (resourceType !== "frontend") {
|
|
74
74
|
// Backends take their own framework ids (see backend-frameworks/registry.ts).
|
|
75
75
|
if (frameworkId !== undefined && resourceType !== "backend") {
|
|
76
|
-
throw new
|
|
76
|
+
throw new FliskError("--framework can only be used with --type frontend or --type backend.", [
|
|
77
77
|
"Add --type frontend or --type backend, or drop --framework for this resource type",
|
|
78
78
|
]);
|
|
79
79
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Fetches the paid-tier "premium" resource bundle (playwright, c4-diagram,
|
|
4
4
|
// logging, agents-md, sablier, verdaccio, and a few other extras - see
|
|
5
|
-
//
|
|
5
|
+
// flisk-cli-extensions/premium/) from the gated distribution worker, when a
|
|
6
6
|
// license key is configured. The free engine never needs this for its own
|
|
7
7
|
// resources - docker-compose, npm, bun, etc. are already public in this
|
|
8
8
|
// repo, no key required.
|
|
@@ -30,6 +30,9 @@ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "no
|
|
|
30
30
|
import { homedir } from "node:os";
|
|
31
31
|
import { join } from "node:path";
|
|
32
32
|
import { extractTarball } from "../utils/tar.js";
|
|
33
|
+
// The worker keeps its pre-rename name (tdk-extension-dist, see wrangler.toml
|
|
34
|
+
// in flisk-extension-dist); the worker name sets the hostname, so the live
|
|
35
|
+
// host is still tdk-*. Switch back once the worker itself is renamed.
|
|
33
36
|
const DEFAULT_ENDPOINT = "https://tdk-extension-dist.oranguman.workers.dev/v1/premium/bundle.tar.gz";
|
|
34
37
|
// Tried in order until one is granted - the worker unlocks the whole
|
|
35
38
|
// bundle on the first resource name a key is found to grant, since
|
|
@@ -66,21 +69,21 @@ const PREMIUM_PATH_MAP = {
|
|
|
66
69
|
"registries/verdaccio_loader.star": "engine/topologies/platform/registries/verdaccio_loader.star",
|
|
67
70
|
};
|
|
68
71
|
function getLicenseKey() {
|
|
69
|
-
return process.env.
|
|
72
|
+
return process.env.FLISK_LICENSE_KEY?.trim() || null;
|
|
70
73
|
}
|
|
71
74
|
function getEndpoint() {
|
|
72
|
-
return process.env.
|
|
75
|
+
return process.env.FLISK_PREMIUM_ENDPOINT?.trim() || DEFAULT_ENDPOINT;
|
|
73
76
|
}
|
|
74
77
|
// A stable per-project id for the worker's project-limit tracking - not a
|
|
75
78
|
// device or user id. Generated once and persisted alongside the rest of
|
|
76
|
-
// the project's .
|
|
79
|
+
// the project's .flisk/ state.
|
|
77
80
|
function getOrCreateProjectId(projectRoot) {
|
|
78
|
-
const idPath = join(projectRoot, ".
|
|
81
|
+
const idPath = join(projectRoot, ".flisk", ".project-id");
|
|
79
82
|
if (existsSync(idPath)) {
|
|
80
83
|
return readFileSync(idPath, "utf-8").trim();
|
|
81
84
|
}
|
|
82
85
|
const id = randomUUID();
|
|
83
|
-
mkdirSync(join(projectRoot, ".
|
|
86
|
+
mkdirSync(join(projectRoot, ".flisk"), { recursive: true });
|
|
84
87
|
writeFileSync(idPath, `${id}\n`);
|
|
85
88
|
return id;
|
|
86
89
|
}
|
|
@@ -89,7 +92,7 @@ function cacheTarballPath(key) {
|
|
|
89
92
|
// machine) so switching license keys doesn't serve a stale bundle
|
|
90
93
|
// fetched under a different plan.
|
|
91
94
|
const safeName = key.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
92
|
-
return join(homedir(), ".
|
|
95
|
+
return join(homedir(), ".flisk", "cache", `premium-${safeName}`, "premium.tar.gz");
|
|
93
96
|
}
|
|
94
97
|
function isCacheFresh(path) {
|
|
95
98
|
if (!existsSync(path))
|
|
@@ -189,7 +192,7 @@ export async function applyPremiumOverlay(projectRoot, destDir) {
|
|
|
189
192
|
if (missing.length > 0) {
|
|
190
193
|
console.info(`🔎 Premium bundle missing mapped files: ${missing.join(", ")}`);
|
|
191
194
|
}
|
|
192
|
-
if (!existsSync(sablierPath) && process.env.
|
|
195
|
+
if (!existsSync(sablierPath) && process.env.FLISK_PREMIUM_DIAGNOSTICS === "1") {
|
|
193
196
|
const sablierGranted = await hasSablierLicense(projectRoot);
|
|
194
197
|
console.info(`🔎 Sablier entitlement check: ${sablierGranted ? "granted" : "not confirmed"}; compare with sablier_overlay above to distinguish license access from bundle contents`);
|
|
195
198
|
}
|
|
@@ -206,7 +209,7 @@ export async function applyPremiumOverlay(projectRoot, destDir) {
|
|
|
206
209
|
}
|
|
207
210
|
function liveResourceAccessCachePath(key, resource) {
|
|
208
211
|
const safeName = key.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
209
|
-
return join(homedir(), ".
|
|
212
|
+
return join(homedir(), ".flisk", "cache", `premium-${safeName}`, `${resource}-access.json`);
|
|
210
213
|
}
|
|
211
214
|
/**
|
|
212
215
|
* Checks whether the configured license key grants a given "live" premium
|