@flisk-sh/flisk 0.0.0-stage → 1.3.190
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-CLCUIDBH.js +510 -0
- package/cli/dist-bundle/cli.js +2017 -0
- package/cli/dist-bundle/cold-preflight-SY26O2IG.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,54 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 🐳 TILT SDK - COMPOSE HELPERS
|
|
5
|
+
# =============================================================================
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# === INLINED CONSTANTS for pure extension loading ===
|
|
10
|
+
OUTPUT = struct(AUTOGENERATED_FOLDER = ".autogenerated")
|
|
11
|
+
# === END INLINED CONSTANTS ===
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def with_runtime_image_tag(image_name):
|
|
15
|
+
"""Apply stable local image tag (:dev)."""
|
|
16
|
+
tag = 'dev'
|
|
17
|
+
|
|
18
|
+
last_segment = image_name.split('/')[-1]
|
|
19
|
+
if ':' in last_segment:
|
|
20
|
+
return image_name[:image_name.rfind(':')] + ':' + tag
|
|
21
|
+
|
|
22
|
+
return image_name + ':' + tag
|
|
23
|
+
|
|
24
|
+
def compose_build_config(resource_path, res_name, dockerfile=OUTPUT.AUTOGENERATED_FOLDER + '/Dockerfile.app.autogenerated', target=None):
|
|
25
|
+
"""Generate build config for docker-compose."""
|
|
26
|
+
# Check if dockerfile is already a full path (contains resource_path)
|
|
27
|
+
if dockerfile.startswith(resource_path + '/'):
|
|
28
|
+
# dockerfile is already a full path, use it directly
|
|
29
|
+
full_dockerfile_path = dockerfile
|
|
30
|
+
elif res_name:
|
|
31
|
+
# Nested structure: construct path as resource_path/res_name/dockerfile
|
|
32
|
+
full_dockerfile_path = "{resource_path}/{res_name}/{dockerfile}".format(
|
|
33
|
+
resource_path=resource_path,
|
|
34
|
+
res_name=res_name,
|
|
35
|
+
dockerfile=dockerfile
|
|
36
|
+
)
|
|
37
|
+
else:
|
|
38
|
+
# Flat structure: construct path as resource_path/dockerfile
|
|
39
|
+
full_dockerfile_path = "{resource_path}/{dockerfile}".format(
|
|
40
|
+
resource_path=resource_path,
|
|
41
|
+
dockerfile=dockerfile
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
base_config = """ build:
|
|
45
|
+
context: ../../../.
|
|
46
|
+
dockerfile: {full_dockerfile_path}""".format(
|
|
47
|
+
full_dockerfile_path=full_dockerfile_path
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
if target:
|
|
51
|
+
base_config += """
|
|
52
|
+
target: {target}""".format(target=target)
|
|
53
|
+
|
|
54
|
+
return base_config
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Standalone Traefik compose for generated Flisk projects
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Full platform checkouts load Introvertic/platform proxy compose files.
|
|
7
|
+
# Standalone `flisk project` output does not ship those files, so Tilt used to
|
|
8
|
+
# skip Traefik entirely and api.{project}.localhost never served.
|
|
9
|
+
|
|
10
|
+
load("../constants.star", "PlatformDockerConstants")
|
|
11
|
+
load("../config/healthcheck.star", "compose_healthcheck_timing")
|
|
12
|
+
load("../networking/traefik_static_routes.star", "normalize_abs_path")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def generate_standalone_traefik_compose(sablier_enabled = False, http_host_port = "8080", https_host_port = "8443", bind_address = "127.0.0.1"):
|
|
16
|
+
"""Minimal Traefik that routes Docker labels on api.{project}.localhost.
|
|
17
|
+
|
|
18
|
+
The Sablier plugin, the sablier container and the wake gateway are only
|
|
19
|
+
emitted when sablier_enabled is True (a license grants "sablier"). Without
|
|
20
|
+
it they would run for nothing: a container holding a read-write Docker
|
|
21
|
+
socket, an image build, and a plugin download from GitHub on every start.
|
|
22
|
+
"""
|
|
23
|
+
network = PlatformDockerConstants.NETWORK_TRAEFIK_PUBLIC
|
|
24
|
+
name = PlatformDockerConstants.PROJECT_NAME
|
|
25
|
+
log_level = "DEBUG" if sablier_enabled else "INFO"
|
|
26
|
+
plugins_volume = " - plugins-storage:/plugins-storage\n" if sablier_enabled else ""
|
|
27
|
+
return """###############################################################################
|
|
28
|
+
# SYSTEM-GENERATED - DO NOT EDIT
|
|
29
|
+
# Standalone Traefik for Flisk projects without platform/introvertic proxy files.
|
|
30
|
+
###############################################################################
|
|
31
|
+
|
|
32
|
+
services:
|
|
33
|
+
traefik:
|
|
34
|
+
image: traefik:v3.7.14
|
|
35
|
+
container_name: {name}_traefik
|
|
36
|
+
restart: unless-stopped
|
|
37
|
+
{traefik_depends_on} command:
|
|
38
|
+
- "--ping=true"
|
|
39
|
+
- "--providers.docker=true"
|
|
40
|
+
- "--providers.docker.exposedbydefault=false"
|
|
41
|
+
- "--providers.docker.watch=true"
|
|
42
|
+
- "--providers.docker.network={network}"
|
|
43
|
+
# Static routes for sablier.deferStart resources (openspec/changes/
|
|
44
|
+
# prioritized-cold-start): a never-created resource has no container
|
|
45
|
+
# and thus no Docker labels for the provider above to discover, so its
|
|
46
|
+
# route is defined here instead, pointed at wake-gateway. Harmless when
|
|
47
|
+
# no deferStart resource exists (empty directory, no routes emitted).
|
|
48
|
+
- "--providers.file.directory=/etc/traefik/dynamic"
|
|
49
|
+
- "--providers.file.watch=true"
|
|
50
|
+
- "--entrypoints.web.address=:80"
|
|
51
|
+
- "--entrypoints.websecure.address=:443"
|
|
52
|
+
- "--log.level={log_level}"
|
|
53
|
+
{sablier_flags} ports:
|
|
54
|
+
- "{bind_address}:{http_host_port}:80"
|
|
55
|
+
- "{bind_address}:{https_host_port}:443"
|
|
56
|
+
volumes:
|
|
57
|
+
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
58
|
+
- ./{dynamic_dir_name}:/etc/traefik/dynamic:ro
|
|
59
|
+
{plugins_volume} networks:
|
|
60
|
+
- traefik-public
|
|
61
|
+
healthcheck:
|
|
62
|
+
test: ["CMD", "traefik", "healthcheck", "--ping"]
|
|
63
|
+
{healthcheck_timing}
|
|
64
|
+
{sablier_services}networks:
|
|
65
|
+
traefik-public:
|
|
66
|
+
name: {network}
|
|
67
|
+
external: true
|
|
68
|
+
volumes:
|
|
69
|
+
plugins-storage:
|
|
70
|
+
""".format(
|
|
71
|
+
name=name,
|
|
72
|
+
network=network,
|
|
73
|
+
http_host_port=http_host_port,
|
|
74
|
+
https_host_port=https_host_port,
|
|
75
|
+
bind_address=bind_address,
|
|
76
|
+
healthcheck_timing=compose_healthcheck_timing(10),
|
|
77
|
+
traefik_depends_on=_SABLIER_DEPENDS_ON if sablier_enabled else "",
|
|
78
|
+
sablier_flags=_SABLIER_FLAGS if sablier_enabled else "",
|
|
79
|
+
sablier_services=_SABLIER_SERVICES.format(
|
|
80
|
+
name=name,
|
|
81
|
+
gateway_container=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_CONTAINER,
|
|
82
|
+
gateway_port=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_PORT,
|
|
83
|
+
vendored_gateway_dir="tdk-cli-ext/engine/assets/docker/wake-gateway",
|
|
84
|
+
tilt_dev_dir=os.environ.get("HOME", "") + "/.tilt-dev",
|
|
85
|
+
project_root_mount=_project_root_mount(),
|
|
86
|
+
) if sablier_enabled else "",
|
|
87
|
+
dynamic_dir_name=PlatformDockerConstants.TRAEFIK_DYNAMIC_DIR_REL.split("/")[-1],
|
|
88
|
+
vendored_gateway_dir="tdk-cli-ext/engine/assets/docker/wake-gateway",
|
|
89
|
+
gateway_container=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_CONTAINER,
|
|
90
|
+
gateway_port=PlatformDockerConstants.TRAEFIK_WAKE_GATEWAY_PORT,
|
|
91
|
+
tilt_dev_dir=os.environ.get("HOME", "") + "/.tilt-dev",
|
|
92
|
+
project_root_mount=_project_root_mount(),
|
|
93
|
+
log_level=log_level,
|
|
94
|
+
plugins_volume=plugins_volume,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def _project_root_mount():
|
|
99
|
+
"""Read-only mount of the project at its own absolute host path.
|
|
100
|
+
|
|
101
|
+
The gateway runs `docker compose up --no-build` for a deferred resource
|
|
102
|
+
itself (bypassing Tilt's build queue), using the compose files Tilt uses.
|
|
103
|
+
Compose resolves relative paths in them (env_file etc.) client-side, so
|
|
104
|
+
they must exist at the same absolute paths inside the gateway container.
|
|
105
|
+
Empty when TDK_PROJECT_ROOT is unset (the generated Tiltfile sets it).
|
|
106
|
+
"""
|
|
107
|
+
root = project_root_abspath()
|
|
108
|
+
if not root:
|
|
109
|
+
return ""
|
|
110
|
+
return "\n - " + root + ":" + root + ":ro"
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def project_root_abspath():
|
|
114
|
+
"""Absolute, normalized project root (TDK_PROJECT_ROOT), or "" when unset."""
|
|
115
|
+
return normalize_abs_path(os.environ.get("TDK_PROJECT_ROOT", ""))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
_SABLIER_DEPENDS_ON = """ depends_on:
|
|
119
|
+
- sablier
|
|
120
|
+
- wake-gateway
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
_SABLIER_FLAGS = """ # On-demand scaling: routes to stopped containers (opt-in via a
|
|
124
|
+
# resource's `sablier:` manifest block), keeps idle services from
|
|
125
|
+
# burning memory. Requires Traefik >=3.6 (see allownonrunning below).
|
|
126
|
+
# Pinned to v1.3.0: Traefik v3.7.14 fails v1.3.1's integrity check ("plugin
|
|
127
|
+
# integrity check failed"), which disables ALL plugins, so every
|
|
128
|
+
# `<name>-sablier` middleware is "invalid middleware type" and the route
|
|
129
|
+
# never comes up. v1.3.0 and v1.2.0 load. Bump only after checking with
|
|
130
|
+
# tests/tilt-engine/test_sablier_plugin_loads.py (needs Docker + network).
|
|
131
|
+
- "--experimental.plugins.sablier.modulename=github.com/sablierapp/sablier-traefik-plugin"
|
|
132
|
+
- "--experimental.plugins.sablier.version=v1.3.0"
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
_SABLIER_SERVICES = """ sablier:
|
|
136
|
+
image: sablierapp/sablier:1.18.0
|
|
137
|
+
container_name: {name}_sablier
|
|
138
|
+
restart: unless-stopped
|
|
139
|
+
command:
|
|
140
|
+
- "start"
|
|
141
|
+
- "--provider.name=docker"
|
|
142
|
+
volumes:
|
|
143
|
+
# Read-write: Sablier stops/starts containers via the Docker API.
|
|
144
|
+
- /var/run/docker.sock:/var/run/docker.sock
|
|
145
|
+
networks:
|
|
146
|
+
- traefik-public
|
|
147
|
+
|
|
148
|
+
# Wake gateway (openspec/changes/prioritized-cold-start): fronts every
|
|
149
|
+
# deferStart resource's static route above. Triggers a cold resource (and
|
|
150
|
+
# its dependencies, which Tilt never cascades to on its own -- see design.md
|
|
151
|
+
# D3/task 1.5) via `tilt trigger`, or Sablier's own start when a container
|
|
152
|
+
# already exists, then holds the request until healthy. Needs the same
|
|
153
|
+
# Tilt session token Sablier/Traefik don't: confirmed empirically that
|
|
154
|
+
# `tilt trigger` from inside a container is otherwise rejected with
|
|
155
|
+
# "(403): invalid session token" even when the Tilt HTTP port is reachable.
|
|
156
|
+
wake-gateway:
|
|
157
|
+
build: ./{vendored_gateway_dir}
|
|
158
|
+
container_name: {gateway_container}
|
|
159
|
+
restart: unless-stopped
|
|
160
|
+
environment:
|
|
161
|
+
- TILT_HOST=host.docker.internal
|
|
162
|
+
- TILT_PORT=10350
|
|
163
|
+
- SABLIER_URL=http://sablier:10000
|
|
164
|
+
- PORT={gateway_port}
|
|
165
|
+
volumes:
|
|
166
|
+
- /var/run/docker.sock:/var/run/docker.sock
|
|
167
|
+
- {tilt_dev_dir}:/root/.tilt-dev:ro{project_root_mount}
|
|
168
|
+
networks:
|
|
169
|
+
- traefik-public
|
|
170
|
+
|
|
171
|
+
"""
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 🐳 TILT SDK - BUNIGNORE GENERATORS (Option 2: Reduce node_modules size)
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Path: .tilt/topologies/platform/docker/bunignore.star
|
|
7
|
+
# Purpose: .bunignore generation to prevent unnecessary files from being installed
|
|
8
|
+
# Strategy: Exclude test files, docs, examples, and other non-production files
|
|
9
|
+
# =============================================================================
|
|
10
|
+
|
|
11
|
+
load('../../../tilt/common/utils.star', 'Utils')
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_common_bunignore_rules():
|
|
15
|
+
"""Get common .bunignore rules for all packages."""
|
|
16
|
+
return """# Documentation files (not needed at runtime)
|
|
17
|
+
*.md
|
|
18
|
+
*.markdown
|
|
19
|
+
*.rst
|
|
20
|
+
*.adoc
|
|
21
|
+
README*
|
|
22
|
+
CHANGELOG*
|
|
23
|
+
HISTORY*
|
|
24
|
+
CONTRIBUTING*
|
|
25
|
+
LICENSE*
|
|
26
|
+
COPYING*
|
|
27
|
+
AUTHORS*
|
|
28
|
+
NOTICE*
|
|
29
|
+
|
|
30
|
+
# Test files and directories
|
|
31
|
+
__tests__
|
|
32
|
+
__mocks__
|
|
33
|
+
test
|
|
34
|
+
tests
|
|
35
|
+
spec
|
|
36
|
+
specs
|
|
37
|
+
.test
|
|
38
|
+
.spec
|
|
39
|
+
*.test.js
|
|
40
|
+
*.test.ts
|
|
41
|
+
*.test.tsx
|
|
42
|
+
*.spec.js
|
|
43
|
+
*.spec.ts
|
|
44
|
+
*.spec.tsx
|
|
45
|
+
*.test.mjs
|
|
46
|
+
*.spec.mjs
|
|
47
|
+
test-results
|
|
48
|
+
playwright-report
|
|
49
|
+
vitest.config.*
|
|
50
|
+
jest.config.*
|
|
51
|
+
mocha.opts
|
|
52
|
+
|
|
53
|
+
# Example and demo files
|
|
54
|
+
examples
|
|
55
|
+
example
|
|
56
|
+
demo
|
|
57
|
+
demos
|
|
58
|
+
sample
|
|
59
|
+
samples
|
|
60
|
+
|
|
61
|
+
# Development and build configuration
|
|
62
|
+
.github
|
|
63
|
+
.gitlab
|
|
64
|
+
.gitignore
|
|
65
|
+
.editorconfig
|
|
66
|
+
.prettierrc*
|
|
67
|
+
.eslintrc*
|
|
68
|
+
.eslintignore
|
|
69
|
+
biome.json
|
|
70
|
+
tsconfig.json
|
|
71
|
+
tsconfig.*.json
|
|
72
|
+
vite.config.*
|
|
73
|
+
webpack.config.*
|
|
74
|
+
rollup.config.*
|
|
75
|
+
babel.config.*
|
|
76
|
+
.babelrc*
|
|
77
|
+
.npmrc
|
|
78
|
+
.yarnrc*
|
|
79
|
+
bunfig.toml
|
|
80
|
+
|
|
81
|
+
# Source code (not needed in node_modules)
|
|
82
|
+
src
|
|
83
|
+
lib/src
|
|
84
|
+
source
|
|
85
|
+
|
|
86
|
+
# Development dependencies markers
|
|
87
|
+
.peerDependencies
|
|
88
|
+
.optionalDependencies
|
|
89
|
+
|
|
90
|
+
# CI/CD and automation
|
|
91
|
+
.github
|
|
92
|
+
.gitlab-ci.yml
|
|
93
|
+
.travis.yml
|
|
94
|
+
.circleci
|
|
95
|
+
azure-pipelines.yml
|
|
96
|
+
Jenkinsfile
|
|
97
|
+
.drone.yml
|
|
98
|
+
|
|
99
|
+
# IDE and editor files
|
|
100
|
+
.vscode
|
|
101
|
+
.idea
|
|
102
|
+
.sublime-project
|
|
103
|
+
.sublime-workspace
|
|
104
|
+
*.swp
|
|
105
|
+
*.swo
|
|
106
|
+
*~
|
|
107
|
+
.DS_Store
|
|
108
|
+
|
|
109
|
+
# Build artifacts (keep only dist/lib)
|
|
110
|
+
build
|
|
111
|
+
out
|
|
112
|
+
.next
|
|
113
|
+
.nuxt
|
|
114
|
+
.output
|
|
115
|
+
coverage
|
|
116
|
+
.nyc_output
|
|
117
|
+
|
|
118
|
+
# Package manager lock files (not needed in node_modules)
|
|
119
|
+
package-lock.json
|
|
120
|
+
yarn.lock
|
|
121
|
+
pnpm-lock.yaml
|
|
122
|
+
bun.lockb
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def generate_bunignore():
|
|
127
|
+
"""
|
|
128
|
+
Generate .bunignore file for the workspace root.
|
|
129
|
+
|
|
130
|
+
This file tells Bun which files to exclude when installing packages,
|
|
131
|
+
reducing node_modules size by ~30-40% without affecting functionality.
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
.bunignore content string
|
|
135
|
+
"""
|
|
136
|
+
header = Utils.get_template_header(
|
|
137
|
+
'bunignore',
|
|
138
|
+
'Docker.generate_bunignore()',
|
|
139
|
+
'workspace-root',
|
|
140
|
+
'PRODUCTION OPTIMIZATION'
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
return header + _get_common_bunignore_rules()
|
|
144
|
+
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# 🐳 TILT SDK - DOCKERIGNORE GENERATORS (modular)
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# Path: .tilt/topologies/platform/docker/dockerignore.star
|
|
7
|
+
# Purpose: .dockerignore generation helpers extracted from .tilt/providers/docker.star
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
# Import shared utilities for template headers
|
|
11
|
+
load('../../../tilt/common/utils.star', 'Utils')
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_common_dockerignore_rules():
|
|
15
|
+
"""Get common .dockerignore rules for all service types."""
|
|
16
|
+
return """# Development files
|
|
17
|
+
node_modules
|
|
18
|
+
.git
|
|
19
|
+
.gitignore
|
|
20
|
+
.DS_Store
|
|
21
|
+
.env
|
|
22
|
+
.env.*
|
|
23
|
+
!.env.example
|
|
24
|
+
|
|
25
|
+
# IDE files
|
|
26
|
+
.vscode
|
|
27
|
+
.idea
|
|
28
|
+
*.swp
|
|
29
|
+
*~
|
|
30
|
+
|
|
31
|
+
# Build artifacts
|
|
32
|
+
coverage
|
|
33
|
+
*.log
|
|
34
|
+
npm-debug.log*
|
|
35
|
+
yarn-debug.log*
|
|
36
|
+
|
|
37
|
+
# Documentation
|
|
38
|
+
*.md
|
|
39
|
+
*.adoc
|
|
40
|
+
docs/
|
|
41
|
+
README*
|
|
42
|
+
|
|
43
|
+
# Configuration files not needed in production
|
|
44
|
+
.prettierrc
|
|
45
|
+
.eslintrc*
|
|
46
|
+
biome.json
|
|
47
|
+
tsconfig.tsbuildinfo
|
|
48
|
+
playwright.config.ts
|
|
49
|
+
playwright.config.autogenerated.ts
|
|
50
|
+
playwright.config.js
|
|
51
|
+
playwright.config.mjs
|
|
52
|
+
playwright.config.cjs
|
|
53
|
+
playwright.config.mts
|
|
54
|
+
playwright.config.cts
|
|
55
|
+
playwright.config.tsx
|
|
56
|
+
|
|
57
|
+
# Temporary files
|
|
58
|
+
tmp/
|
|
59
|
+
.cache/
|
|
60
|
+
.tmp/
|
|
61
|
+
|
|
62
|
+
# Shared packages source code (published to Verdaccio, installed via bun)
|
|
63
|
+
# These are not needed in Docker build context
|
|
64
|
+
shared-platform-engineering/
|
|
65
|
+
!shared-platform-engineering/docker-templates/
|
|
66
|
+
shared-product-engineering/
|
|
67
|
+
cli-platform-engineering/
|
|
68
|
+
shared-ddd-layers/
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def _get_backend_specific_rules():
|
|
73
|
+
"""Get backend-specific .dockerignore rules."""
|
|
74
|
+
return """# Test files
|
|
75
|
+
**/__tests__
|
|
76
|
+
**/__mocks__
|
|
77
|
+
*.test.ts
|
|
78
|
+
*.spec.ts
|
|
79
|
+
test-results
|
|
80
|
+
playwright-report
|
|
81
|
+
|
|
82
|
+
# Config files
|
|
83
|
+
vitest.config.ts
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _get_frontend_specific_rules():
|
|
88
|
+
"""Get frontend-specific .dockerignore rules."""
|
|
89
|
+
return """# Test files
|
|
90
|
+
**/__tests__
|
|
91
|
+
**/__mocks__
|
|
92
|
+
*.test.ts
|
|
93
|
+
*.test.tsx
|
|
94
|
+
*.spec.ts
|
|
95
|
+
*.spec.tsx
|
|
96
|
+
**/*.stories.tsx
|
|
97
|
+
test-results
|
|
98
|
+
playwright-report
|
|
99
|
+
e2e/
|
|
100
|
+
cucumber/
|
|
101
|
+
|
|
102
|
+
# Config files
|
|
103
|
+
# vite.config.ts
|
|
104
|
+
# vite.config.autogenerated.ts
|
|
105
|
+
# vite.config.frontend.autogenerated.ts
|
|
106
|
+
# vite.config.backend.autogenerated.ts
|
|
107
|
+
vitest.config.ts
|
|
108
|
+
|
|
109
|
+
# Build artifacts (dist is included in final image)
|
|
110
|
+
.next
|
|
111
|
+
.nuxt
|
|
112
|
+
.output
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def _get_migrator_specific_rules():
|
|
117
|
+
"""Get migrator-specific .dockerignore rules."""
|
|
118
|
+
return """# Test files (migrators typically don't have tests)
|
|
119
|
+
**/__tests__
|
|
120
|
+
**/__mocks__
|
|
121
|
+
*.test.ts
|
|
122
|
+
*.spec.ts
|
|
123
|
+
|
|
124
|
+
# Build artifacts
|
|
125
|
+
dist
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def generate_dockerignore(res_path, resource_type='backend'):
|
|
130
|
+
"""
|
|
131
|
+
Generate .dockerignore file for a service.
|
|
132
|
+
"""
|
|
133
|
+
# Generate header using shared utility
|
|
134
|
+
header = Utils.get_template_header(
|
|
135
|
+
'dockerignore',
|
|
136
|
+
'Docker.generate_dockerignore()',
|
|
137
|
+
res_path.split('/')[-1],
|
|
138
|
+
resource_type.upper()
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
# Start with common rules
|
|
142
|
+
content = header + _get_common_dockerignore_rules()
|
|
143
|
+
|
|
144
|
+
# Add service-specific rules
|
|
145
|
+
if resource_type == 'frontend':
|
|
146
|
+
content += _get_frontend_specific_rules()
|
|
147
|
+
elif resource_type == 'migrator':
|
|
148
|
+
content += _get_migrator_specific_rules()
|
|
149
|
+
else: # backend
|
|
150
|
+
content += _get_backend_specific_rules()
|
|
151
|
+
|
|
152
|
+
return content
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Docker healthcheck timing - single source for golden images, L4 runtimes and
|
|
5
|
+
# generated compose files.
|
|
6
|
+
# =============================================================================
|
|
7
|
+
# Steady-state probes are infrequent (each probe is a `docker exec`, which adds
|
|
8
|
+
# up across 100+ containers), while `start_interval` keeps first-healthy time
|
|
9
|
+
# fast during the start period. `start_interval` needs Docker Engine 25+ and
|
|
10
|
+
# Compose 2.20.2+ (checked by `flisk doctor`).
|
|
11
|
+
#
|
|
12
|
+
# Override per run with environment variables, e.g.:
|
|
13
|
+
# TDK_HEALTHCHECK_INTERVAL_SECONDS=15 flisk up
|
|
14
|
+
# =============================================================================
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _env_int(name, default):
|
|
18
|
+
raw = os.environ.get(name, '')
|
|
19
|
+
if raw and raw.isdigit() and int(raw) > 0:
|
|
20
|
+
return int(raw)
|
|
21
|
+
return default
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
DOCKER_HEALTHCHECK = {
|
|
25
|
+
"path": "/health",
|
|
26
|
+
"interval_seconds": _env_int("TDK_HEALTHCHECK_INTERVAL_SECONDS", 30),
|
|
27
|
+
"start_interval_seconds": _env_int("TDK_HEALTHCHECK_START_INTERVAL_SECONDS", 2),
|
|
28
|
+
"timeout_seconds": _env_int("TDK_HEALTHCHECK_TIMEOUT_SECONDS", 5),
|
|
29
|
+
"start_period_seconds": _env_int("TDK_HEALTHCHECK_START_PERIOD_SECONDS", 30),
|
|
30
|
+
"frontend_start_period_seconds": _env_int("TDK_HEALTHCHECK_START_PERIOD_SECONDS", 30),
|
|
31
|
+
"retries": _env_int("TDK_HEALTHCHECK_RETRIES", 3),
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def dockerfile_healthcheck_flags(start_period_seconds = None):
|
|
36
|
+
"""Flags for a Dockerfile `HEALTHCHECK` instruction."""
|
|
37
|
+
h = DOCKER_HEALTHCHECK
|
|
38
|
+
start_period = start_period_seconds if start_period_seconds != None else h["start_period_seconds"]
|
|
39
|
+
return "--interval={}s --start-interval={}s --timeout={}s --start-period={}s --retries={}".format(
|
|
40
|
+
h["interval_seconds"],
|
|
41
|
+
h["start_interval_seconds"],
|
|
42
|
+
h["timeout_seconds"],
|
|
43
|
+
start_period,
|
|
44
|
+
h["retries"],
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def compose_healthcheck_timing(start_period_seconds = None, indent = " "):
|
|
49
|
+
"""Timing keys for a compose `healthcheck:` block (everything except `test:`)."""
|
|
50
|
+
h = DOCKER_HEALTHCHECK
|
|
51
|
+
start_period = start_period_seconds if start_period_seconds != None else h["start_period_seconds"]
|
|
52
|
+
return (
|
|
53
|
+
indent + "interval: {}s\n".format(h["interval_seconds"])
|
|
54
|
+
+ indent + "timeout: {}s\n".format(h["timeout_seconds"])
|
|
55
|
+
+ indent + "retries: {}\n".format(h["retries"])
|
|
56
|
+
+ indent + "start_period: {}s\n".format(start_period)
|
|
57
|
+
+ indent + "start_interval: {}s\n".format(h["start_interval_seconds"])
|
|
58
|
+
)
|