@flisk-sh/flisk 0.0.0-stage → 1.3.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +492 -0
- package/LICENSE +21 -0
- package/README.md +479 -2
- package/Tiltfile +151 -0
- package/cli/bin/flisk.js +42 -0
- package/cli/dist/agent-runtimes/custom.js +335 -0
- package/cli/dist/agent-runtimes/registry.js +34 -0
- package/cli/dist/backend-frameworks/elysia.js +38 -0
- package/cli/dist/backend-frameworks/express.js +49 -0
- package/cli/dist/backend-frameworks/fastify.js +43 -0
- package/cli/dist/backend-frameworks/h3.js +37 -0
- package/cli/dist/backend-frameworks/koa.js +47 -0
- package/cli/dist/backend-frameworks/mcp.js +86 -0
- package/cli/dist/backend-frameworks/nestjs.js +55 -0
- package/cli/dist/backend-frameworks/registry.js +134 -0
- package/cli/dist/backend-frameworks/types.js +1 -0
- package/cli/dist/backend-languages/bun.js +76 -0
- package/cli/dist/backend-languages/go.js +125 -0
- package/cli/dist/backend-languages/node.js +122 -0
- package/cli/dist/backend-languages/python.js +94 -0
- package/cli/dist/backend-languages/registry.js +37 -0
- package/cli/dist/backend-languages/rust.js +82 -0
- package/cli/dist/backend-languages/types.js +1 -0
- package/cli/dist/cli.js +29 -0
- package/cli/dist/commands/__tests__/project-e2e-helpers.js +49 -0
- package/cli/dist/commands/__tests__/ui-loading-screen.test.js +16 -0
- package/cli/dist/commands/agent.js +182 -0
- package/cli/dist/commands/completion-candidates.js +116 -0
- package/cli/dist/commands/completion.js +843 -0
- package/cli/dist/commands/config.js +362 -0
- package/cli/dist/commands/doctor.js +1504 -0
- package/cli/dist/commands/down.js +114 -0
- package/cli/dist/commands/eject.js +108 -0
- package/cli/dist/commands/help.js +152 -0
- package/cli/dist/commands/import.js +164 -0
- package/cli/dist/commands/logs.js +119 -0
- package/cli/dist/commands/maintainers.js +102 -0
- package/cli/dist/commands/mcp.js +28 -0
- package/cli/dist/commands/networks.js +306 -0
- package/cli/dist/commands/project.js +447 -0
- package/cli/dist/commands/projects.js +103 -0
- package/cli/dist/commands/registry.js +53 -0
- package/cli/dist/commands/resource.js +992 -0
- package/cli/dist/commands/resources.js +127 -0
- package/cli/dist/commands/restart.js +89 -0
- package/cli/dist/commands/runtime.js +75 -0
- package/cli/dist/commands/stack.js +171 -0
- package/cli/dist/commands/stacks.js +71 -0
- package/cli/dist/commands/status.js +211 -0
- package/cli/dist/commands/ui.js +725 -0
- package/cli/dist/commands/up.js +609 -0
- package/cli/dist/commands/upgrade.js +840 -0
- package/cli/dist/commands/version.js +10 -0
- package/cli/dist/components/Accessible.js +11 -0
- package/cli/dist/components/BaseTooltip.js +30 -0
- package/cli/dist/components/DetailPanel.js +33 -0
- package/cli/dist/components/FileTree.js +51 -0
- package/cli/dist/components/ResourceSelectInput.js +42 -0
- package/cli/dist/components/ResourceTable.js +35 -0
- package/cli/dist/components/ServiceIssues.js +13 -0
- package/cli/dist/components/TUIHeader.js +27 -0
- package/cli/dist/components/TabBar.js +27 -0
- package/cli/dist/components/Tooltip.js +13 -0
- package/cli/dist/components/index.js +11 -0
- package/cli/dist/components/ui-theme.js +120 -0
- package/cli/dist/config/platform-standards.js +182 -0
- package/cli/dist/frontend-frameworks/lit.js +64 -0
- package/cli/dist/frontend-frameworks/preact.js +62 -0
- package/cli/dist/frontend-frameworks/qwik.js +61 -0
- package/cli/dist/frontend-frameworks/react.js +69 -0
- package/cli/dist/frontend-frameworks/registry.js +83 -0
- package/cli/dist/frontend-frameworks/solid.js +62 -0
- package/cli/dist/frontend-frameworks/svelte.js +67 -0
- package/cli/dist/frontend-frameworks/tanstack-router.js +101 -0
- package/cli/dist/frontend-frameworks/types.js +1 -0
- package/cli/dist/frontend-frameworks/vanilla.js +59 -0
- package/cli/dist/frontend-frameworks/vue.js +72 -0
- package/cli/dist/generator/__tests__/golden-helpers.js +43 -0
- package/cli/dist/generator/extension-fetch.js +291 -0
- package/cli/dist/generator/resource-templates.js +133 -0
- package/cli/dist/generator/template-engine.js +801 -0
- package/cli/dist/index.js +10 -0
- package/cli/dist/mcp/server.js +101 -0
- package/cli/dist/mcp/tools.js +351 -0
- package/cli/dist/program.js +37 -0
- package/cli/dist/types/index.js +38 -0
- package/cli/dist/utils/agent-host.js +36 -0
- package/cli/dist/utils/atomic-write.js +36 -0
- package/cli/dist/utils/bun-floor.js +9 -0
- package/cli/dist/utils/bun-requirement.js +10 -0
- package/cli/dist/utils/cache.js +63 -0
- package/cli/dist/utils/cold-preflight.js +257 -0
- package/cli/dist/utils/command-helpers.js +57 -0
- package/cli/dist/utils/constants.js +160 -0
- package/cli/dist/utils/discovery-context.js +71 -0
- package/cli/dist/utils/discovery-paths.js +93 -0
- package/cli/dist/utils/docker.js +34 -0
- package/cli/dist/utils/doctor-crashloop.js +161 -0
- package/cli/dist/utils/doctor-fix.js +391 -0
- package/cli/dist/utils/doctor-host.js +66 -0
- package/cli/dist/utils/doctor-report.js +78 -0
- package/cli/dist/utils/doctor-runtime.js +880 -0
- package/cli/dist/utils/doctor-starlark.js +132 -0
- package/cli/dist/utils/doctor-wiring.js +698 -0
- package/cli/dist/utils/down-cleanup.js +125 -0
- package/cli/dist/utils/env-validator.js +266 -0
- package/cli/dist/utils/errors.js +175 -0
- package/cli/dist/utils/exec-async.js +31 -0
- package/cli/dist/utils/file-helpers.js +104 -0
- package/cli/dist/utils/formatting.js +165 -0
- package/cli/dist/utils/generated-paths.js +51 -0
- package/cli/dist/utils/help-command.js +11 -0
- package/cli/dist/utils/host-port-config.js +140 -0
- package/cli/dist/utils/host-port-plan.js +100 -0
- package/cli/dist/utils/json-output.js +29 -0
- package/cli/dist/utils/machine-output.js +33 -0
- package/cli/dist/utils/paths.js +43 -0
- package/cli/dist/utils/platform.js +58 -0
- package/cli/dist/utils/port-assignment.js +75 -0
- package/cli/dist/utils/port-conflict-fix.js +25 -0
- package/cli/dist/utils/port-fallback-notice.js +17 -0
- package/cli/dist/utils/port-listener-probe.js +20 -0
- package/cli/dist/utils/project-config-defaults.js +17 -0
- package/cli/dist/utils/project-features.js +91 -0
- package/cli/dist/utils/project-templates.js +32 -0
- package/cli/dist/utils/prompt.js +97 -0
- package/cli/dist/utils/resource-features.js +184 -0
- package/cli/dist/utils/resource-kind.js +9 -0
- package/cli/dist/utils/schema-version-gate.js +45 -0
- package/cli/dist/utils/search-status.js +12 -0
- package/cli/dist/utils/secret-redaction.js +73 -0
- package/cli/dist/utils/service-config-checks.js +189 -0
- package/cli/dist/utils/service-manifest.js +254 -0
- package/cli/dist/utils/service-runtime-state.js +66 -0
- package/cli/dist/utils/service-urls.js +112 -0
- package/cli/dist/utils/services.js +360 -0
- package/cli/dist/utils/shared-infra.js +45 -0
- package/cli/dist/utils/shared-platform-postgres.js +232 -0
- package/cli/dist/utils/single-flight.js +21 -0
- package/cli/dist/utils/smoke.js +401 -0
- package/cli/dist/utils/spinner.js +40 -0
- package/cli/dist/utils/stack-features.js +15 -0
- package/cli/dist/utils/stack-status.js +14 -0
- package/cli/dist/utils/startup-report.js +78 -0
- package/cli/dist/utils/status-message.js +21 -0
- package/cli/dist/utils/status-ports.js +33 -0
- package/cli/dist/utils/suggestions.js +63 -0
- package/cli/dist/utils/tar.js +46 -0
- package/cli/dist/utils/tdk-version.js +51 -0
- package/cli/dist/utils/terminal-layout.js +19 -0
- package/cli/dist/utils/tilt-events.js +194 -0
- package/cli/dist/utils/tilt-logs.js +61 -0
- package/cli/dist/utils/tilt-port-owner.js +63 -0
- package/cli/dist/utils/tilt-process.js +54 -0
- package/cli/dist/utils/tilt-resource-state.js +32 -0
- package/cli/dist/utils/tilt-startup.js +49 -0
- package/cli/dist/utils/tilt-unreachable-message.js +9 -0
- package/cli/dist/utils/tilt.js +104 -0
- package/cli/dist/utils/ui-keymap.js +129 -0
- package/cli/dist/utils/ui-service-state.js +34 -0
- package/cli/dist/utils/up-only.js +28 -0
- package/cli/dist/utils/up-readiness.js +118 -0
- package/cli/dist/utils/url-actions.js +103 -0
- package/cli/dist/utils/validation.js +62 -0
- package/cli/dist/utils/which.js +56 -0
- package/cli/dist/utils/windows-doctor.js +176 -0
- package/cli/dist-bundle/chunk-6EA4DGCY.js +2 -0
- package/cli/dist-bundle/chunk-BZ4H7MM4.js +3 -0
- package/cli/dist-bundle/chunk-QWYXYAX6.js +510 -0
- package/cli/dist-bundle/cli.js +2017 -0
- package/cli/dist-bundle/cold-preflight-MM46GFQA.js +2 -0
- package/cli/dist-bundle/devtools-ZUHXW33W.js +5 -0
- package/cli/dist-bundle/extension-fetch-J4FFH7TJ.js +2 -0
- package/cli/package.json +83 -0
- package/cli/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +25 -0
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +466 -0
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +154 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +14 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +58 -0
- package/cli/templates/.tiltignore.hbs +72 -0
- package/cli/templates/TILT_RESOURCE_DEFAULTS.star.hbs +220 -0
- package/cli/templates/TILT_TECH_STACK.star.hbs +149 -0
- package/cli/templates/Tiltfile.hbs +381 -0
- package/cli/templates/spec.master.hbs +192 -0
- package/discovery/AGENTS.md +362 -0
- package/discovery/TILT_DISCOVERY.star +429 -0
- package/discovery/Tiltfile +58 -0
- package/discovery/config.star +265 -0
- package/discovery/constants.star +167 -0
- package/discovery/deterministic.star +213 -0
- package/discovery/discovery_daemon.star +193 -0
- package/discovery/discovery_orchestrator.star +492 -0
- package/discovery/filtering.star +7 -0
- package/discovery/identity-management-backend/service.yaml +26 -0
- package/discovery/identity-management-frontend/service.yaml +29 -0
- package/discovery/identity-sdk/service.yaml +9 -0
- package/discovery/incremental_discovery.star +215 -0
- package/discovery/indexing.star +9 -0
- package/discovery/json_manifest_scanner.star +57 -0
- package/discovery/libraries.star +48 -0
- package/discovery/loading.star +25 -0
- package/discovery/manifest/constants.star +106 -0
- package/discovery/manifest/loading.star +418 -0
- package/discovery/manifest/normalize.star +289 -0
- package/discovery/manifest/validation.star +110 -0
- package/discovery/normalization.star +13 -0
- package/discovery/registry.star +562 -0
- package/discovery/resource_snapshot.py +384 -0
- package/discovery/resource_snapshot.star +145 -0
- package/discovery/schemas.star +3 -0
- package/discovery/services/platform/cdc/debezium/nats-connector/service.yaml +9 -0
- package/discovery/services/platform/cdc/nats-http-bridge/service.yaml +9 -0
- package/discovery/services/platform/orchestrator/orchestrator-glue-backend/service.yaml +26 -0
- package/discovery/services/platform/synthetic-monitor/service.yaml +9 -0
- package/discovery/test_resource_snapshot.py +253 -0
- package/discovery/validation.star +80 -0
- package/discovery/versioning.star +3 -0
- package/engine/AGENTS.md +706 -0
- package/engine/README.md +31 -0
- package/engine/REFACTORING_MANIFEST_SYSTEM.md +974 -0
- package/engine/Tiltfile +86 -0
- package/engine/assets/docker/golden-layers.Dockerfile +204 -0
- package/engine/assets/docker/wake-gateway/Dockerfile +28 -0
- package/engine/assets/docker/wake-gateway/decide.test.ts +177 -0
- package/engine/assets/docker/wake-gateway/decide.ts +135 -0
- package/engine/assets/docker/wake-gateway/server.ts +363 -0
- package/engine/assets/scripts/cleanup-completed-migrator-images.sh +39 -0
- package/engine/assets/scripts/cleanup-tilt-images.sh +122 -0
- package/engine/assets/scripts/mac-m1-resource-monitor.sh +123 -0
- package/engine/config.star +5 -0
- package/engine/entrypoint.star +101 -0
- package/engine/lifecycle/orchestrator.star +263 -0
- package/engine/paths.star +719 -0
- package/engine/schemas/project-schema.json +147 -0
- package/engine/schemas/service-schema.json +537 -0
- package/engine/scripts/README.md +89 -0
- package/engine/scripts/build-and-publish-lib.sh +207 -0
- package/engine/scripts/check-lib-publish.sh +87 -0
- package/engine/scripts/debug-container.sh +265 -0
- package/engine/scripts/generate-manifest.sh +200 -0
- package/engine/spec.master +702 -0
- package/engine/spec.master.example +341 -0
- package/engine/topologies/README.md +33 -0
- package/engine/topologies/platform/docker/AGENTS.md +59 -0
- package/engine/topologies/platform/docker/auth/auth.star +207 -0
- package/engine/topologies/platform/docker/build/frontend_build_plan.star +65 -0
- package/engine/topologies/platform/docker/build/golden_image.star +37 -0
- package/engine/topologies/platform/docker/build/golden_image_build.star +144 -0
- package/engine/topologies/platform/docker/build/golden_image_constants.star +100 -0
- package/engine/topologies/platform/docker/build/golden_image_dockerfile.star +263 -0
- package/engine/topologies/platform/docker/compose/compose.star +637 -0
- package/engine/topologies/platform/docker/compose/compose_helpers.star +54 -0
- package/engine/topologies/platform/docker/compose/traefik_standalone.star +171 -0
- package/engine/topologies/platform/docker/config/bunignore.star +144 -0
- package/engine/topologies/platform/docker/config/dockerignore.star +152 -0
- package/engine/topologies/platform/docker/config/healthcheck.star +58 -0
- package/engine/topologies/platform/docker/constants.star +211 -0
- package/engine/topologies/platform/docker/dockerfile/dockerfile.star +56 -0
- package/engine/topologies/platform/docker/dockerfile/language_dockerfile.star +264 -0
- package/engine/topologies/platform/docker/generators/golden_docker_generator_v2.star +76 -0
- package/engine/topologies/platform/docker/index.star +40 -0
- package/engine/topologies/platform/docker/layers/bun_helpers.star +25 -0
- package/engine/topologies/platform/docker/layers/infisical/index.star +42 -0
- package/engine/topologies/platform/docker/layers/infisical/infisical_docker.star +264 -0
- package/engine/topologies/platform/docker/layers/l1_base_layers.star +89 -0
- package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +147 -0
- package/engine/topologies/platform/docker/layers/l3_builder_layers.star +229 -0
- package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +282 -0
- package/engine/topologies/platform/docker/layers/prisma/constants.star +138 -0
- package/engine/topologies/platform/docker/layers/prisma/db_readiness.star +98 -0
- package/engine/topologies/platform/docker/layers/prisma/filesystem_setup.star +131 -0
- package/engine/topologies/platform/docker/layers/prisma/migrate_script.star +100 -0
- package/engine/topologies/platform/docker/layers/prisma/prisma_build.star +128 -0
- package/engine/topologies/platform/docker/layers/prisma/prisma_runtime.star +205 -0
- package/engine/topologies/platform/docker/layers/prisma/secret_resolution.star +121 -0
- package/engine/topologies/platform/docker/networking/api_path_constants.star +206 -0
- package/engine/topologies/platform/docker/networking/sablier_container_cycle.star +31 -0
- package/engine/topologies/platform/docker/networking/traefik.star +266 -0
- package/engine/topologies/platform/docker/networking/traefik_constants.star +148 -0
- package/engine/topologies/platform/docker/networking/traefik_helpers.star +162 -0
- package/engine/topologies/platform/docker/networking/traefik_static_routes.star +165 -0
- package/engine/topologies/platform/docker/secrets/env_secrets.star +74 -0
- package/engine/topologies/platform/docker/secrets/infisical.star +109 -0
- package/engine/topologies/platform/net/AGENTS.md +64 -0
- package/engine/topologies/platform/net/proxy.star +6 -0
- package/engine/topologies/platform/registries/local.star +6 -0
- package/engine/topologies/platform/registries/verdaccio_loader.star +20 -0
- package/engine/topologies/platform/security/AGENTS.md +49 -0
- package/engine/topologies/platform/security/secrets.star +241 -0
- package/engine/topologies/platform/state/AGENTS.md +64 -0
- package/engine/topologies/platform/state/relational.star +6 -0
- package/engine/topologies/tilt/common/AGENTS.md +59 -0
- package/engine/topologies/tilt/common/utils.star +409 -0
- package/engine/topologies/tilt/common/utils_debug.star +71 -0
- package/engine/topologies/tilt/common/utils_deterministic.star +170 -0
- package/engine/topologies/tilt/common/utils_docker_networks.star +54 -0
- package/engine/topologies/tilt/common/utils_env.star +92 -0
- package/engine/topologies/tilt/common/utils_output.star +99 -0
- package/engine/topologies/tilt/config/AGENTS.md +68 -0
- package/engine/topologies/tilt/config/defaults.star +5 -0
- package/engine/topologies/tilt/config/feature_flags.star +12 -0
- package/engine/topologies/tilt/config/global.star +57 -0
- package/engine/topologies/tilt/config/profiles.star +398 -0
- package/engine/topologies/tilt/generators/agents_md.star +64 -0
- package/engine/topologies/tilt/generators/api_gateway.star +147 -0
- package/engine/topologies/tilt/generators/index.star +126 -0
- package/engine/topologies/tilt/generators/infisical/README.md +424 -0
- package/engine/topologies/tilt/generators/infisical/examples.star +314 -0
- package/engine/topologies/tilt/generators/infisical/index.star +59 -0
- package/engine/topologies/tilt/generators/infisical/machine_identity.star +422 -0
- package/engine/topologies/tilt/generators/infisical/organization.star +536 -0
- package/engine/topologies/tilt/generators/infisical/path_manager.star +478 -0
- package/engine/topologies/tilt/generators/infisical/secrets_generator.star +422 -0
- package/engine/topologies/tilt/generators/nginx_conf.star +145 -0
- package/engine/topologies/tilt/generators/npmrc.star +132 -0
- package/engine/topologies/tilt/generators/tsconfig.star +25 -0
- package/engine/topologies/tilt/generators/typescript/backend_library_tsconfig.star +73 -0
- package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +137 -0
- package/engine/topologies/tilt/generators/typescript/common.star +9 -0
- package/engine/topologies/tilt/generators/typescript/frontend_library_tsconfig.star +78 -0
- package/engine/topologies/tilt/generators/typescript/frontend_tsconfig.star +140 -0
- package/engine/topologies/tilt/generators/typescript/include.star +25 -0
- package/engine/topologies/tilt/generators/typescript/playwright_config.star +42 -0
- package/engine/topologies/tilt/generators/typescript/prisma_config.star +51 -0
- package/engine/topologies/tilt/generators/validators.star +868 -0
- package/engine/topologies/tilt/generators/vite/backend.star +80 -0
- package/engine/topologies/tilt/generators/vite/frameworks/lit.star +92 -0
- package/engine/topologies/tilt/generators/vite/frameworks/preact.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/qwik.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/react.star +128 -0
- package/engine/topologies/tilt/generators/vite/frameworks/solid.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/svelte.star +94 -0
- package/engine/topologies/tilt/generators/vite/frameworks/vanilla.star +92 -0
- package/engine/topologies/tilt/generators/vite/frameworks/vue.star +94 -0
- package/engine/topologies/tilt/generators/vite/frontend.star +153 -0
- package/engine/topologies/tilt/generators/vite/generators.star +45 -0
- package/engine/topologies/tilt/generators/vite/helpers.star +256 -0
- package/engine/topologies/tilt/generators/vite/library.star +67 -0
- package/engine/topologies/tilt/generators/vite/sdk.star +75 -0
- package/engine/topologies/tilt/generators/vite/templates.star +460 -0
- package/engine/topologies/tilt/generators/vite_config.star +24 -0
- package/engine/topologies/tilt/manifest/AGENTS.md +61 -0
- package/engine/topologies/tilt/manifest/README.md +679 -0
- package/engine/topologies/tilt/manifest/__init__.star +220 -0
- package/engine/topologies/tilt/manifest/constants.star +262 -0
- package/engine/topologies/tilt/manifest/errors.star +268 -0
- package/engine/topologies/tilt/manifest/integration.star +348 -0
- package/engine/topologies/tilt/manifest/json_to_yaml.py +61 -0
- package/engine/topologies/tilt/manifest/loader.star +239 -0
- package/engine/topologies/tilt/manifest/mapper.star +229 -0
- package/engine/topologies/tilt/manifest/parser.star +490 -0
- package/engine/topologies/tilt/manifest/schema.star +502 -0
- package/engine/topologies/tilt/manifest/tests/test_integration.star +278 -0
- package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +475 -0
- package/engine/topologies/tilt/manifest/tests/test_manifest.star +319 -0
- package/engine/topologies/tilt/manifest/tests/test_validator.star +472 -0
- package/engine/topologies/tilt/manifest/validator.star +744 -0
- package/engine/topologies/tilt/manifest/yaml_to_json.py +20 -0
- package/engine/topologies/tilt/resources/AGENTS.md +71 -0
- package/engine/topologies/tilt/resources/build_concurrency.star +56 -0
- package/engine/topologies/tilt/resources/conditions.star +5 -0
- package/engine/topologies/tilt/resources/databases.star +246 -0
- package/engine/topologies/tilt/resources/declaration.star +5 -0
- package/engine/topologies/tilt/resources/deps.star +5 -0
- package/engine/topologies/tilt/resources/infra-loader.star +504 -0
- package/engine/topologies/tilt/resources/libs.star +32 -0
- package/engine/topologies/tilt/resources/libs_discovery.star +104 -0
- package/engine/topologies/tilt/resources/libs_paths.star +81 -0
- package/engine/topologies/tilt/resources/libs_resource_definition.star +153 -0
- package/engine/topologies/tilt/resources/libs_setup.star +166 -0
- package/engine/topologies/tilt/resources/libs_tsconfig.star +39 -0
- package/engine/topologies/tilt/resources/orchestrator/apply.star +79 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +864 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_manifest_orchestration.star +90 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +150 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_resource_validation.star +38 -0
- package/engine/topologies/tilt/resources/orchestrator/apply_runtime_flags.star +46 -0
- package/engine/topologies/tilt/resources/orchestrator/builders/typescript.star +193 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/AGENTS.md +75 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/index.star +23 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/resolver.star +136 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/env.star +219 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/frontend.star +172 -0
- package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +577 -0
- package/engine/topologies/tilt/resources/orchestrator/helpers.star +35 -0
- package/engine/topologies/tilt/resources/orchestrator.star +56 -0
- package/engine/topologies/tilt/resources/ordering.star +5 -0
- package/engine/topologies/tilt/resources/shared-platform-postgres.star +30 -0
- package/engine/topologies/tilt/resources/triggers.star +5 -0
- package/engine/topologies/tilt/resources/watchers.star +304 -0
- package/engine/where-things-live.star +719 -0
- package/examples/tdk-example/LICENSE +21 -0
- package/examples/tdk-example/README.md +23 -0
- package/examples/tdk-example/TILT_SERVICE_DEFAULTS.star +42 -0
- package/examples/tdk-example/TILT_TECH_STACK.star +67 -0
- package/examples/tdk-example/Tiltfile +25 -0
- package/examples/tdk-example/services/platform/messaging/docker-compose.yml +26 -0
- package/examples/tdk-example/services/shop/orders-api/package.json +20 -0
- package/examples/tdk-example/services/shop/orders-api/service.json +14 -0
- package/examples/tdk-example/services/shop/orders-api/src/index.ts +81 -0
- package/examples/tdk-example/services/shop/orders-app/index.html +12 -0
- package/examples/tdk-example/services/shop/orders-app/package.json +23 -0
- package/examples/tdk-example/services/shop/orders-app/public/.gitkeep +0 -0
- package/examples/tdk-example/services/shop/orders-app/service.json +9 -0
- package/examples/tdk-example/services/shop/orders-app/src/main.tsx +9 -0
- package/examples/tdk-example/services/shop/orders-app/src/orders.tsx +67 -0
- package/examples/tdk-example/services/shop/orders-app/src/style.css +15 -0
- package/examples/tdk-example/services/shop/orders-worker/package.json +18 -0
- package/examples/tdk-example/services/shop/orders-worker/service.json +13 -0
- package/examples/tdk-example/services/shop/orders-worker/src/index.ts +33 -0
- package/ext/Tiltfile +66 -0
- package/ext/ide-components/README.md +221 -0
- package/ext/ide-components/code_viewer/server.py +208 -0
- package/ext/ide-components/config_inspector/server.py +1052 -0
- package/ext/ide-components/file_browser/server.py +287 -0
- package/ext/ide-components/shared/config_service.py +471 -0
- package/ext/ide-components/shared/file_utils.py +300 -0
- package/ext/ide-components/shared/http_utils.py +234 -0
- package/ext/ide-components/shared/static/styles.css +1334 -0
- package/ext/ide-components/shared/syntax_highlighter.py +142 -0
- package/ext/ide-components/shared/template_engine.py +125 -0
- package/ext/ide-components/shared/templates/base.html +121 -0
- package/ext/ide-components/shared/test_config_service.py +328 -0
- package/ext/ide-components/shared/tilt_integration.py +160 -0
- package/ext/ui-enhancements/cron-status-server.sh +51 -0
- package/ext/ui-enhancements/cron-status-tracker.sh +148 -0
- package/ext/ui-enhancements/extension.yaml +36 -0
- package/ext/ui-enhancements/tiltfile.py +101 -0
- package/ext/ui-enhancements/ui/cron-jobs-tab.css +396 -0
- package/ext/ui-enhancements/ui/help-panel.css +279 -0
- package/ext/ui-enhancements/ui/icons.css +125 -0
- package/ext/ui-enhancements/ui/tooltips.css +114 -0
- package/package.json +94 -4
- package/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +25 -0
- package/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +466 -0
- package/shared-platform-engineering/docker-templates/install-deps.sh +154 -0
- package/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +14 -0
- package/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +58 -0
- package/specs/specs/TILT_SERVICE_DEFAULTS.star +207 -0
- package/specs/specs/TILT_TECH_STACK.star +161 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 📚 TILT SDK - LIBRARY PATHS & DEP MAPPINGS
|
|
5
|
+
# =============================================================================
|
|
6
|
+
|
|
7
|
+
load('../../../topologies/tilt/common/utils.star', 'Utils')
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_lib_path_from_package_name(ctx, package_name):
|
|
11
|
+
"""
|
|
12
|
+
Converts @flisk/platform-logger -> shared-platform-engineering/platform-logger
|
|
13
|
+
|
|
14
|
+
Returns:
|
|
15
|
+
Tuple of (path, label, tilt_resource_name) or (None, None, None) if not a library
|
|
16
|
+
"""
|
|
17
|
+
lib_info = Utils.resolve_lib_path(package_name)
|
|
18
|
+
lib_path = lib_info[0]
|
|
19
|
+
lib_type = lib_info[1]
|
|
20
|
+
|
|
21
|
+
if not lib_path:
|
|
22
|
+
return (None, None, None)
|
|
23
|
+
|
|
24
|
+
lib_name = package_name[len(Utils.INTERNAL_SCOPE):]
|
|
25
|
+
tilt_resource = 'lib-' + lib_name
|
|
26
|
+
|
|
27
|
+
label_map = {
|
|
28
|
+
'platform': 'lib.platform',
|
|
29
|
+
'product': 'lib.product',
|
|
30
|
+
'ddd': 'lib.ddd',
|
|
31
|
+
}
|
|
32
|
+
label = label_map.get(lib_type, 'lib.platform')
|
|
33
|
+
|
|
34
|
+
return (lib_path, label, tilt_resource)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def read_package_json_deps(ctx, package_json_path):
|
|
38
|
+
"""Reads a package.json and returns all internal dependencies."""
|
|
39
|
+
resource_path = package_json_path.rsplit('/package.json', 1)[0]
|
|
40
|
+
return Utils.get_internal_deps(resource_path)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def get_resource_paths_for_focus(ctx, focus_enabled_all):
|
|
44
|
+
"""Returns list of service paths based on focus mode targets."""
|
|
45
|
+
if focus_enabled_all == None:
|
|
46
|
+
return []
|
|
47
|
+
|
|
48
|
+
resource_path_map = ctx.get('resource_path_map', {})
|
|
49
|
+
resource_paths = []
|
|
50
|
+
|
|
51
|
+
for resource in focus_enabled_all:
|
|
52
|
+
if resource in resource_path_map:
|
|
53
|
+
path = resource_path_map[resource]
|
|
54
|
+
if path not in resource_paths:
|
|
55
|
+
resource_paths.append(path)
|
|
56
|
+
|
|
57
|
+
return resource_paths
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def get_internal_deps_mapping(ctx, resource_path):
|
|
61
|
+
"""Returns a mapping of package_name -> source_path for internal dependencies."""
|
|
62
|
+
pkg_path = resource_path + '/package.json'
|
|
63
|
+
internal_deps = read_package_json_deps(ctx, pkg_path)
|
|
64
|
+
|
|
65
|
+
mapping = {}
|
|
66
|
+
for dep_name in internal_deps:
|
|
67
|
+
lib_info = get_lib_path_from_package_name(ctx, dep_name)
|
|
68
|
+
lib_path = lib_info[0]
|
|
69
|
+
|
|
70
|
+
if lib_path != None:
|
|
71
|
+
mapping[dep_name] = lib_path
|
|
72
|
+
|
|
73
|
+
return mapping
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
LibsPaths = struct(
|
|
77
|
+
get_path = get_lib_path_from_package_name,
|
|
78
|
+
read_package_json_deps = read_package_json_deps,
|
|
79
|
+
get_resource_paths = get_resource_paths_for_focus,
|
|
80
|
+
get_deps_mapping = get_internal_deps_mapping,
|
|
81
|
+
)
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 📦 TILT SDK - LIBRARY RESOURCE DEFINITION
|
|
5
|
+
# =============================================================================
|
|
6
|
+
|
|
7
|
+
load("../../platform/docker/constants.star", "PlatformDockerConstants")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _library_needs_vite(path):
|
|
11
|
+
"""Check if a library needs a Vite config."""
|
|
12
|
+
pkg_content = read_file(path + '/package.json', default='')
|
|
13
|
+
if not pkg_content:
|
|
14
|
+
return False
|
|
15
|
+
|
|
16
|
+
pkg = decode_json(pkg_content)
|
|
17
|
+
if not pkg:
|
|
18
|
+
return False
|
|
19
|
+
|
|
20
|
+
deps = {}
|
|
21
|
+
for dep_type in ['dependencies', 'devDependencies', 'peerDependencies']:
|
|
22
|
+
deps.update(pkg.get(dep_type, {}))
|
|
23
|
+
|
|
24
|
+
needs_vite = 'vitest' in deps or 'vite-plugin-dts' in deps or 'vite' in deps
|
|
25
|
+
if needs_vite:
|
|
26
|
+
print(" 🔍 Library at " + path + " needs Vite")
|
|
27
|
+
return needs_vite
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _library_has_react(path):
|
|
31
|
+
"""Check if a library has React components."""
|
|
32
|
+
pkg_content = read_file(path + '/package.json', default='')
|
|
33
|
+
if not pkg_content:
|
|
34
|
+
return False
|
|
35
|
+
|
|
36
|
+
pkg = decode_json(pkg_content)
|
|
37
|
+
if not pkg:
|
|
38
|
+
return False
|
|
39
|
+
|
|
40
|
+
deps = {}
|
|
41
|
+
for dep_type in ['dependencies', 'devDependencies', 'peerDependencies']:
|
|
42
|
+
deps.update(pkg.get(dep_type, {}))
|
|
43
|
+
|
|
44
|
+
return 'react' in deps or '@vitejs/plugin-react' in deps
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _library_has_dts(path):
|
|
48
|
+
"""Check if a library has vite-plugin-dts in dependencies."""
|
|
49
|
+
pkg_content = read_file(path + '/package.json', default='')
|
|
50
|
+
if not pkg_content:
|
|
51
|
+
return False
|
|
52
|
+
|
|
53
|
+
pkg = decode_json(pkg_content)
|
|
54
|
+
if not pkg:
|
|
55
|
+
return False
|
|
56
|
+
|
|
57
|
+
deps = {}
|
|
58
|
+
for dep_type in ['dependencies', 'devDependencies', 'peerDependencies']:
|
|
59
|
+
deps.update(pkg.get(dep_type, {}))
|
|
60
|
+
|
|
61
|
+
return 'vite-plugin-dts' in deps
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def library_is_frontend(path):
|
|
65
|
+
"""Check if library is marked as frontend in manifest or has React."""
|
|
66
|
+
# Check library manifest (libraries use their own naming convention)
|
|
67
|
+
lib_name = path.split('/')[-1]
|
|
68
|
+
manifest_content = read_file(path + '/' + lib_name + '.manifest.json', default='')
|
|
69
|
+
|
|
70
|
+
return _library_has_react(path)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def define_library_resource(ctx, name, path, labels, internal_deps=None, consumer_paths=None, write_fn=None, generate_vite_fn=None):
|
|
74
|
+
"""Defines a Tilt local_resource for a library with proper dependency management.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
ctx: Tilt context with global_config, verdaccio_url, etc.
|
|
78
|
+
name: Library name
|
|
79
|
+
path: Path to library directory
|
|
80
|
+
labels: Labels for Tilt UI organization
|
|
81
|
+
internal_deps: Optional list of internal dependencies
|
|
82
|
+
consumer_paths: Optional list of consumer resource paths
|
|
83
|
+
write_fn: Optional write function for file generation
|
|
84
|
+
generate_vite_fn: Optional Vite config generator function
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
str: Name of created Tilt resource
|
|
88
|
+
"""
|
|
89
|
+
global_config = ctx.get('global_config', {})
|
|
90
|
+
registry = (
|
|
91
|
+
ctx.get('verdaccio_url_docker')
|
|
92
|
+
or global_config.get('verdaccio_url_docker')
|
|
93
|
+
or ctx.get('verdaccio_url_local')
|
|
94
|
+
or global_config.get('verdaccio_url_local')
|
|
95
|
+
or PlatformDockerConstants.VERDACCIO_URL_DOCKER
|
|
96
|
+
)
|
|
97
|
+
internal_scope = ctx.get('internal_scope', '@flisk/')
|
|
98
|
+
pkg_name = internal_scope + name
|
|
99
|
+
|
|
100
|
+
if write_fn and generate_vite_fn:
|
|
101
|
+
lib_manifest = {
|
|
102
|
+
'appName': name,
|
|
103
|
+
'appType': 'library',
|
|
104
|
+
'_servicePath': path,
|
|
105
|
+
'needsVite': True,
|
|
106
|
+
'hasReact': _library_has_react(path),
|
|
107
|
+
'hasDts': _library_has_dts(path),
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if _library_needs_vite(path):
|
|
111
|
+
print(" 📚 Generating vite.config.ts for library: " + name)
|
|
112
|
+
generate_vite_fn(lib_manifest, None, write_fn)
|
|
113
|
+
|
|
114
|
+
consumer_paths_str = ''
|
|
115
|
+
if consumer_paths:
|
|
116
|
+
consumer_paths_str = ','.join(consumer_paths)
|
|
117
|
+
|
|
118
|
+
publish_cmd = './engine/scripts/build-and-publish-lib.sh "' + path + '" "' + registry + '" "' + pkg_name + '" "' + consumer_paths_str + '"'
|
|
119
|
+
|
|
120
|
+
# Sanitize name to remove invalid characters for Tilt resource names
|
|
121
|
+
# e.g., "introvertic/ui" -> "introvertic-ui"
|
|
122
|
+
resource_name = 'lib-' + name.replace('/', '-')
|
|
123
|
+
auto_init_libs = os.environ.get('TILT_AUTO_INIT_LIBS', 'false').lower() == 'true'
|
|
124
|
+
|
|
125
|
+
deps = [PlatformDockerConstants.VERDACCIO_RESOURCE_NAME]
|
|
126
|
+
if internal_deps:
|
|
127
|
+
for dep in internal_deps:
|
|
128
|
+
if dep not in deps:
|
|
129
|
+
deps.append(dep)
|
|
130
|
+
|
|
131
|
+
input_deps = [
|
|
132
|
+
path + '/src',
|
|
133
|
+
path + '/package.json',
|
|
134
|
+
path + '/tsconfig.json',
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
local_resource(
|
|
138
|
+
resource_name,
|
|
139
|
+
cmd=publish_cmd,
|
|
140
|
+
deps=input_deps,
|
|
141
|
+
labels=labels + ['lib'],
|
|
142
|
+
resource_deps=deps,
|
|
143
|
+
allow_parallel=True,
|
|
144
|
+
auto_init=auto_init_libs,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
return resource_name
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
LibsResourceDefinition = struct(
|
|
151
|
+
define_resource = define_library_resource,
|
|
152
|
+
is_frontend = library_is_frontend,
|
|
153
|
+
)
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 🚀 TILT SDK - LIBRARY SETUP ORCHESTRATOR
|
|
5
|
+
# =============================================================================
|
|
6
|
+
|
|
7
|
+
load('./libs_paths.star', 'LibsPaths')
|
|
8
|
+
load('./libs_discovery.star', 'LibsDiscovery')
|
|
9
|
+
load('./libs_resource_definition.star', 'LibsResourceDefinition')
|
|
10
|
+
load('../../platform/docker/constants.star', 'PlatformDockerConstants')
|
|
11
|
+
|
|
12
|
+
_get_lib_path_from_package_name = LibsPaths.get_path
|
|
13
|
+
_read_package_json_deps = LibsPaths.read_package_json_deps
|
|
14
|
+
_get_resource_paths_for_focus = LibsPaths.get_resource_paths
|
|
15
|
+
_discover_resource_libraries = LibsDiscovery.discover_resource_libs
|
|
16
|
+
_define_library_resource = LibsResourceDefinition.define_resource
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def setup_libraries(ctx, should_enable_fn, ddd_libs, platform_libs, product_libs, config_generators, focus_enabled_all=None):
|
|
20
|
+
"""
|
|
21
|
+
Sets up library resources with dynamic dependency scanning.
|
|
22
|
+
|
|
23
|
+
Returns:
|
|
24
|
+
Dict mapping package_name -> tilt_resource_name
|
|
25
|
+
"""
|
|
26
|
+
library_map = {}
|
|
27
|
+
internal_scope = ctx.get('internal_scope', '@flisk/')
|
|
28
|
+
library_roots = ctx.get('library_roots', {})
|
|
29
|
+
print("📚 setup_libraries called for " + str(len(platform_libs) + len(product_libs) + len(ddd_libs)) + " potential libraries")
|
|
30
|
+
|
|
31
|
+
generate_tsconfig = config_generators.get('tsconfig')
|
|
32
|
+
generate_npmrc = config_generators.get('npmrc')
|
|
33
|
+
generate_bunfig = config_generators.get('bunfig')
|
|
34
|
+
generate_vite = config_generators.get('vite')
|
|
35
|
+
write_fn = config_generators.get('write_fn')
|
|
36
|
+
|
|
37
|
+
if not should_enable_fn(PlatformDockerConstants.VERDACCIO_RESOURCE_NAME):
|
|
38
|
+
return library_map
|
|
39
|
+
|
|
40
|
+
if focus_enabled_all != None:
|
|
41
|
+
print("📚 Focus mode: Scanning service dependencies...")
|
|
42
|
+
|
|
43
|
+
resource_paths = _get_resource_paths_for_focus(ctx, focus_enabled_all)
|
|
44
|
+
|
|
45
|
+
if len(resource_paths) == 0:
|
|
46
|
+
print(" ⚠️ No service paths found for focus targets")
|
|
47
|
+
return library_map
|
|
48
|
+
|
|
49
|
+
print(" 🔍 Scanning " + str(len(resource_paths)) + " services")
|
|
50
|
+
|
|
51
|
+
needed_libs = _discover_resource_libraries(ctx, resource_paths)
|
|
52
|
+
|
|
53
|
+
if len(needed_libs) == 0:
|
|
54
|
+
print(" ℹ️ No internal library dependencies found")
|
|
55
|
+
return library_map
|
|
56
|
+
|
|
57
|
+
platform_count = 0
|
|
58
|
+
product_count = 0
|
|
59
|
+
ddd_count = 0
|
|
60
|
+
|
|
61
|
+
for pkg_name, lib_info in needed_libs.items():
|
|
62
|
+
lib_name = lib_info['name']
|
|
63
|
+
lib_path = lib_info['path']
|
|
64
|
+
lib_label = lib_info['label']
|
|
65
|
+
tilt_resource = lib_info['tilt_resource']
|
|
66
|
+
internal_deps = lib_info.get('internal_deps', [])
|
|
67
|
+
|
|
68
|
+
lib_res_deps = []
|
|
69
|
+
lib_ts_deps = {}
|
|
70
|
+
for dep_pkg in internal_deps:
|
|
71
|
+
dep_info = _get_lib_path_from_package_name(ctx, dep_pkg)
|
|
72
|
+
if dep_info[2]:
|
|
73
|
+
lib_res_deps.append(dep_info[2])
|
|
74
|
+
lib_ts_deps[dep_pkg] = dep_info[0]
|
|
75
|
+
|
|
76
|
+
consumer_paths = []
|
|
77
|
+
for resource_path in resource_paths:
|
|
78
|
+
resource_internal_deps = _read_package_json_deps(ctx, resource_path + '/package.json')
|
|
79
|
+
if pkg_name in resource_internal_deps:
|
|
80
|
+
consumer_paths.append(resource_path)
|
|
81
|
+
|
|
82
|
+
if generate_npmrc:
|
|
83
|
+
generate_npmrc(lib_path)
|
|
84
|
+
if generate_bunfig:
|
|
85
|
+
generate_bunfig(lib_path)
|
|
86
|
+
if generate_tsconfig:
|
|
87
|
+
generate_tsconfig(lib_path, lib_ts_deps)
|
|
88
|
+
|
|
89
|
+
_define_library_resource(
|
|
90
|
+
ctx,
|
|
91
|
+
lib_name,
|
|
92
|
+
lib_path,
|
|
93
|
+
[lib_label],
|
|
94
|
+
internal_deps=lib_res_deps,
|
|
95
|
+
consumer_paths=consumer_paths,
|
|
96
|
+
write_fn=write_fn,
|
|
97
|
+
generate_vite_fn=generate_vite,
|
|
98
|
+
)
|
|
99
|
+
library_map[pkg_name] = tilt_resource
|
|
100
|
+
|
|
101
|
+
if lib_label == 'lib.platform':
|
|
102
|
+
platform_count = platform_count + 1
|
|
103
|
+
elif lib_label == 'lib.product':
|
|
104
|
+
product_count = product_count + 1
|
|
105
|
+
elif lib_label == 'lib.ddd':
|
|
106
|
+
ddd_count = ddd_count + 1
|
|
107
|
+
|
|
108
|
+
print(" ✅ Discovered " + str(len(needed_libs)) + " libraries (platform: " + str(platform_count) + ", product: " + str(product_count) + ", ddd: " + str(ddd_count) + ")")
|
|
109
|
+
|
|
110
|
+
else:
|
|
111
|
+
all_libs_info = {}
|
|
112
|
+
|
|
113
|
+
for lib in ddd_libs:
|
|
114
|
+
pkg_name = internal_scope + lib['name']
|
|
115
|
+
lib_path = lib['path']
|
|
116
|
+
all_libs_info[pkg_name] = {'name': lib['name'], 'path': lib_path, 'label': 'lib.ddd'}
|
|
117
|
+
|
|
118
|
+
for lib_name in platform_libs:
|
|
119
|
+
pkg_name = internal_scope + lib_name
|
|
120
|
+
lib_path = library_roots.get('platform', 'shared-platform-engineering') + '/' + lib_name
|
|
121
|
+
all_libs_info[pkg_name] = {'name': lib_name, 'path': lib_path, 'label': 'lib.platform'}
|
|
122
|
+
|
|
123
|
+
for lib_name in product_libs:
|
|
124
|
+
pkg_name = internal_scope + lib_name
|
|
125
|
+
lib_path = library_roots.get('product', 'shared-product-engineering') + '/' + lib_name
|
|
126
|
+
all_libs_info[pkg_name] = {'name': lib_name, 'path': lib_path, 'label': 'lib.product'}
|
|
127
|
+
|
|
128
|
+
for pkg_name, lib_info in all_libs_info.items():
|
|
129
|
+
lib_name = lib_info['name']
|
|
130
|
+
lib_path = lib_info['path']
|
|
131
|
+
lib_label = lib_info['label']
|
|
132
|
+
|
|
133
|
+
internal_deps = _read_package_json_deps(ctx, lib_path + '/package.json')
|
|
134
|
+
|
|
135
|
+
lib_res_deps = []
|
|
136
|
+
lib_ts_deps = {}
|
|
137
|
+
for dep_pkg in internal_deps:
|
|
138
|
+
dep_info = _get_lib_path_from_package_name(ctx, dep_pkg)
|
|
139
|
+
if dep_info[2]:
|
|
140
|
+
lib_res_deps.append(dep_info[2])
|
|
141
|
+
lib_ts_deps[dep_pkg] = dep_info[0]
|
|
142
|
+
|
|
143
|
+
if generate_npmrc:
|
|
144
|
+
generate_npmrc(lib_path)
|
|
145
|
+
if generate_bunfig:
|
|
146
|
+
generate_bunfig(lib_path)
|
|
147
|
+
if generate_tsconfig:
|
|
148
|
+
generate_tsconfig(lib_path, lib_ts_deps)
|
|
149
|
+
|
|
150
|
+
_define_library_resource(
|
|
151
|
+
ctx,
|
|
152
|
+
lib_name,
|
|
153
|
+
lib_path,
|
|
154
|
+
[lib_label],
|
|
155
|
+
internal_deps=lib_res_deps,
|
|
156
|
+
write_fn=write_fn,
|
|
157
|
+
generate_vite_fn=generate_vite,
|
|
158
|
+
)
|
|
159
|
+
library_map[pkg_name] = 'lib-' + lib_name
|
|
160
|
+
|
|
161
|
+
return library_map
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
LibsSetup = struct(
|
|
165
|
+
setup_all = setup_libraries,
|
|
166
|
+
)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 🎯 TILT SDK - LIBRARY TSCONFIG FACTORY
|
|
5
|
+
# =============================================================================
|
|
6
|
+
|
|
7
|
+
load('./libs_resource_definition.star', 'LibsResourceDefinition')
|
|
8
|
+
|
|
9
|
+
_library_is_frontend = LibsResourceDefinition.is_frontend
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def make_smart_tsconfig_generator(tsconfig_provider, write_fn):
|
|
13
|
+
"""
|
|
14
|
+
Factory function that creates a smart tsconfig generator.
|
|
15
|
+
Detects if a library is frontend (manifest or has React) and uses appropriate tsconfig.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
tsconfig_provider: Provider with library_frontend and library_backend methods
|
|
19
|
+
write_fn: Write function for file output
|
|
20
|
+
|
|
21
|
+
Returns:
|
|
22
|
+
function: Config generator function taking (path, deps)
|
|
23
|
+
"""
|
|
24
|
+
def generate_tsconfig(path, deps=None):
|
|
25
|
+
is_frontend = _library_is_frontend(path)
|
|
26
|
+
|
|
27
|
+
if is_frontend:
|
|
28
|
+
tsconfig_provider.library_frontend(path, write_fn, internal_deps=deps, is_docker=True)
|
|
29
|
+
tsconfig_provider.library_frontend(path, write_fn, internal_deps=deps, is_docker=False)
|
|
30
|
+
else:
|
|
31
|
+
tsconfig_provider.library_backend(path, write_fn, internal_deps=deps, is_docker=True)
|
|
32
|
+
tsconfig_provider.library_backend(path, write_fn, internal_deps=deps, is_docker=False)
|
|
33
|
+
|
|
34
|
+
return generate_tsconfig
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
LibsTSConfig = struct(
|
|
38
|
+
make_smart_tsconfig = make_smart_tsconfig_generator,
|
|
39
|
+
)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 🎯 TILT SDK - ORCHESTRATOR APPLY
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Purpose: thin coordinator for service apply lifecycle.
|
|
7
|
+
# =============================================================================
|
|
8
|
+
|
|
9
|
+
load("../../common/utils_debug.star", "debug_log")
|
|
10
|
+
load('../databases.star', 'Database')
|
|
11
|
+
load('./apply_runtime_flags.star', 'RuntimeFlags')
|
|
12
|
+
load('./apply_resource_validation.star', 'ResourceValidation')
|
|
13
|
+
load('./apply_manifest_orchestration.star', 'ManifestOrchestration')
|
|
14
|
+
load('./apply_compose_resource_registration.star', 'ComposeResourceRegistration', 'resource_needs_database')
|
|
15
|
+
load('./apply_migrator_orchestration.star', 'MigratorOrchestration')
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def apply_app_service(resource_config, ctx):
|
|
19
|
+
"""
|
|
20
|
+
Load and configure an application service by delegating each responsibility
|
|
21
|
+
to a focused orchestration module.
|
|
22
|
+
"""
|
|
23
|
+
resource_name = resource_config.get('appName', resource_config.get('name', 'UNKNOWN'))
|
|
24
|
+
resource_path = resource_config.get('path', 'NO_PATH')
|
|
25
|
+
should_enable = ctx['should_enable']
|
|
26
|
+
|
|
27
|
+
# resource_config here is a STACK-level grouping from discovery_orchestrator.star
|
|
28
|
+
# (its own 'name'/'appName' is the stack, e.g. "auth") - the actual
|
|
29
|
+
# individual services live nested in resource_config['resources'], each
|
|
30
|
+
# with its own 'name' (e.g. "auth-api-backend"). flisk stack/flisk project -
|
|
31
|
+
# the CLI's own standard scaffolding - populates spec.master's
|
|
32
|
+
# PRE_ALPHA_RESOURCES etc. keyed by individual SERVICE name, not stack
|
|
33
|
+
# name. Checking should_enable() only at the stack level silently drops
|
|
34
|
+
# every service whose stack name isn't itself individually enabled, even
|
|
35
|
+
# when the service is - which is the common case for any project using
|
|
36
|
+
# the CLI's normal `flisk resource` + `flisk stack` workflow. Fall back to
|
|
37
|
+
# checking each nested service name before giving up on this group.
|
|
38
|
+
stack_enabled = should_enable(resource_name)
|
|
39
|
+
service_enabled = False
|
|
40
|
+
if not stack_enabled:
|
|
41
|
+
for nested in resource_config.get('resources', []):
|
|
42
|
+
nested_name = nested.get('name', '')
|
|
43
|
+
if nested_name and should_enable(nested_name):
|
|
44
|
+
debug_log("APPLY: stack '{}' not individually enabled, but nested service '{}' is - proceeding".format(resource_name, nested_name))
|
|
45
|
+
service_enabled = True
|
|
46
|
+
break
|
|
47
|
+
|
|
48
|
+
if not stack_enabled and not service_enabled:
|
|
49
|
+
return
|
|
50
|
+
|
|
51
|
+
runtime_flags = RuntimeFlags.resolve()
|
|
52
|
+
ctx['auto_init_config_gen'] = runtime_flags['auto_init_config_gen']
|
|
53
|
+
|
|
54
|
+
ResourceValidation.validate(resource_config)
|
|
55
|
+
|
|
56
|
+
# Provision the database when a resource receives DATABASE_URL (backend or bring-your-own), not for frontends only.
|
|
57
|
+
has_backend = False
|
|
58
|
+
for resource in resource_config.get('resources', []):
|
|
59
|
+
if resource_needs_database(resource.get('_manifest', {})):
|
|
60
|
+
has_backend = True
|
|
61
|
+
break
|
|
62
|
+
|
|
63
|
+
if should_enable('database-management') and has_backend:
|
|
64
|
+
Database.provision(resource_name)
|
|
65
|
+
|
|
66
|
+
manifest_state = ManifestOrchestration.prepare(resource_config, ctx)
|
|
67
|
+
compose_state = ComposeResourceRegistration.register(
|
|
68
|
+
resource_config,
|
|
69
|
+
ctx,
|
|
70
|
+
runtime_flags,
|
|
71
|
+
manifest_state,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
MigratorOrchestration.register(
|
|
75
|
+
resource_config,
|
|
76
|
+
ctx,
|
|
77
|
+
runtime_flags,
|
|
78
|
+
compose_state['compose_project_name'],
|
|
79
|
+
)
|