@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,253 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright (c) 2026 Flisk contributors
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
"""
|
|
5
|
+
๐งช Tests for resource_snapshot.py
|
|
6
|
+
|
|
7
|
+
Run with: python3 -m pytest test_resource_snapshot.py -v
|
|
8
|
+
Or: python3 test_resource_snapshot.py
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
import tempfile
|
|
15
|
+
import shutil
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
import pytest
|
|
18
|
+
|
|
19
|
+
# Add parent directory to path
|
|
20
|
+
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
21
|
+
|
|
22
|
+
from resource_snapshot import (
|
|
23
|
+
save_snapshot,
|
|
24
|
+
load_snapshot,
|
|
25
|
+
diff_snapshots,
|
|
26
|
+
get_current_services,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@pytest.fixture
|
|
31
|
+
def temp_workspace(tmp_path):
|
|
32
|
+
"""Provide a temporary workspace with automatic cleanup."""
|
|
33
|
+
original_dir = os.getcwd()
|
|
34
|
+
os.chdir(tmp_path)
|
|
35
|
+
yield tmp_path
|
|
36
|
+
os.chdir(original_dir)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class TestSaveSnapshot:
|
|
40
|
+
"""Tests for save_snapshot function."""
|
|
41
|
+
|
|
42
|
+
def test_save_creates_file(self, temp_workspace):
|
|
43
|
+
"""Test that save_snapshot creates the snapshot file."""
|
|
44
|
+
services = ["services/a/service.json", "services/b/service.json"]
|
|
45
|
+
save_snapshot(services)
|
|
46
|
+
|
|
47
|
+
snapshot_file = Path(".tdk/.tdk-out/snapshots/resource-snapshot.json")
|
|
48
|
+
assert snapshot_file.exists(), "Snapshot file should be created"
|
|
49
|
+
|
|
50
|
+
# Verify content
|
|
51
|
+
with open(snapshot_file) as f:
|
|
52
|
+
data = json.load(f)
|
|
53
|
+
assert data["count"] == 2
|
|
54
|
+
assert data["services"] == services
|
|
55
|
+
assert "timestamp" in data
|
|
56
|
+
|
|
57
|
+
def test_save_creates_directory(self, temp_workspace):
|
|
58
|
+
"""Test that save_snapshot creates the .flisk directory if needed."""
|
|
59
|
+
services = ["services/test/service.json"]
|
|
60
|
+
save_snapshot(services)
|
|
61
|
+
|
|
62
|
+
assert Path(".tdk/.tdk-out/snapshots").exists(), ".tdk/.tdk-out/snapshots directory should be created"
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class TestLoadSnapshot:
|
|
66
|
+
"""Tests for load_snapshot function."""
|
|
67
|
+
|
|
68
|
+
def test_load_existing(self, temp_workspace):
|
|
69
|
+
"""Test loading an existing snapshot."""
|
|
70
|
+
# Create a snapshot first
|
|
71
|
+
services = ["services/a/service.json"]
|
|
72
|
+
save_snapshot(services)
|
|
73
|
+
|
|
74
|
+
# Load it
|
|
75
|
+
snapshot = load_snapshot()
|
|
76
|
+
|
|
77
|
+
assert snapshot["count"] == 1
|
|
78
|
+
assert snapshot["services"] == services
|
|
79
|
+
assert "timestamp" in snapshot
|
|
80
|
+
|
|
81
|
+
def test_load_nonexistent(self, temp_workspace):
|
|
82
|
+
"""Test loading when snapshot doesn't exist."""
|
|
83
|
+
snapshot = load_snapshot()
|
|
84
|
+
|
|
85
|
+
assert snapshot["count"] == 0
|
|
86
|
+
assert snapshot["services"] == []
|
|
87
|
+
assert snapshot["timestamp"] is None
|
|
88
|
+
|
|
89
|
+
def test_load_invalid_json(self, temp_workspace):
|
|
90
|
+
"""Test loading when snapshot has invalid JSON."""
|
|
91
|
+
# Create invalid snapshot
|
|
92
|
+
Path(".tdk/.tdk-out/snapshots").mkdir(parents=True, exist_ok=True)
|
|
93
|
+
with open(".tdk/.tdk-out/snapshots/resource-snapshot.json", "w") as f:
|
|
94
|
+
f.write("not valid json")
|
|
95
|
+
|
|
96
|
+
snapshot = load_snapshot()
|
|
97
|
+
|
|
98
|
+
# Should return empty snapshot on error
|
|
99
|
+
assert snapshot["count"] == 0
|
|
100
|
+
assert snapshot["services"] == []
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class TestDiffSnapshots:
|
|
104
|
+
"""Tests for diff_snapshots function."""
|
|
105
|
+
|
|
106
|
+
def test_detect_added(self):
|
|
107
|
+
"""Test detecting added services."""
|
|
108
|
+
old = {"services": ["a/service.json", "b/service.json"]}
|
|
109
|
+
new = ["a/service.json", "b/service.json", "c/service.json"]
|
|
110
|
+
|
|
111
|
+
added, removed, modified = diff_snapshots(old, new)
|
|
112
|
+
|
|
113
|
+
assert added == {"c/service.json"}
|
|
114
|
+
assert removed == set()
|
|
115
|
+
assert modified == set()
|
|
116
|
+
|
|
117
|
+
def test_detect_removed(self):
|
|
118
|
+
"""Test detecting removed services."""
|
|
119
|
+
old = {"services": ["a/service.json", "b/service.json", "c/service.json"]}
|
|
120
|
+
new = ["a/service.json", "b/service.json"]
|
|
121
|
+
|
|
122
|
+
added, removed, modified = diff_snapshots(old, new)
|
|
123
|
+
|
|
124
|
+
assert added == set()
|
|
125
|
+
assert removed == {"c/service.json"}
|
|
126
|
+
assert modified == set()
|
|
127
|
+
|
|
128
|
+
def test_detect_both(self):
|
|
129
|
+
"""Test detecting both added and removed."""
|
|
130
|
+
old = {"services": ["a/service.json", "b/service.json"]}
|
|
131
|
+
new = ["b/service.json", "c/service.json"]
|
|
132
|
+
|
|
133
|
+
added, removed, modified = diff_snapshots(old, new)
|
|
134
|
+
|
|
135
|
+
assert added == {"c/service.json"}
|
|
136
|
+
assert removed == {"a/service.json"}
|
|
137
|
+
assert modified == set()
|
|
138
|
+
|
|
139
|
+
def test_no_changes(self):
|
|
140
|
+
"""Test when nothing changed."""
|
|
141
|
+
old = {"services": ["a/service.json", "b/service.json"]}
|
|
142
|
+
new = ["a/service.json", "b/service.json"]
|
|
143
|
+
|
|
144
|
+
added, removed, modified = diff_snapshots(old, new)
|
|
145
|
+
|
|
146
|
+
assert added == set()
|
|
147
|
+
assert removed == set()
|
|
148
|
+
assert modified == set()
|
|
149
|
+
|
|
150
|
+
def test_empty_old(self):
|
|
151
|
+
"""Test when old snapshot is empty."""
|
|
152
|
+
old = {"services": []}
|
|
153
|
+
new = ["a/service.json", "b/service.json"]
|
|
154
|
+
|
|
155
|
+
added, removed, modified = diff_snapshots(old, new)
|
|
156
|
+
|
|
157
|
+
assert added == {"a/service.json", "b/service.json"}
|
|
158
|
+
assert removed == set()
|
|
159
|
+
assert modified == set()
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class TestGetCurrentServices:
|
|
163
|
+
"""Tests for get_current_services function."""
|
|
164
|
+
|
|
165
|
+
def test_finds_services(self, temp_workspace):
|
|
166
|
+
"""Test finding service.json files."""
|
|
167
|
+
# Create test directory structure
|
|
168
|
+
(Path("services/product/a") / "a-backend").mkdir(parents=True)
|
|
169
|
+
(Path("services/product/a") / "a-backend" / "service.json").touch()
|
|
170
|
+
|
|
171
|
+
(Path("services/product/b") / "b-backend").mkdir(parents=True)
|
|
172
|
+
(Path("services/product/b") / "b-backend" / "service.json").touch()
|
|
173
|
+
|
|
174
|
+
services = get_current_services("services/product")
|
|
175
|
+
|
|
176
|
+
assert len(services) == 2
|
|
177
|
+
assert all("service.json" in s for s in services)
|
|
178
|
+
|
|
179
|
+
def test_empty_result(self, temp_workspace):
|
|
180
|
+
"""Test when no services exist."""
|
|
181
|
+
# Create empty directory
|
|
182
|
+
Path("services/product").mkdir(parents=True)
|
|
183
|
+
|
|
184
|
+
services = get_current_services("services/product")
|
|
185
|
+
|
|
186
|
+
assert services == []
|
|
187
|
+
|
|
188
|
+
def test_nonexistent_root(self, temp_workspace):
|
|
189
|
+
"""Test when scan root doesn't exist."""
|
|
190
|
+
services = get_current_services("nonexistent/path")
|
|
191
|
+
|
|
192
|
+
assert services == []
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def run_tests():
|
|
196
|
+
"""Run all tests with basic output."""
|
|
197
|
+
import tempfile
|
|
198
|
+
import inspect
|
|
199
|
+
|
|
200
|
+
print("๐งช Running resource_snapshot tests...")
|
|
201
|
+
print("=" * 50)
|
|
202
|
+
|
|
203
|
+
passed = 0
|
|
204
|
+
failed = 0
|
|
205
|
+
|
|
206
|
+
test_classes = [
|
|
207
|
+
TestSaveSnapshot,
|
|
208
|
+
TestLoadSnapshot,
|
|
209
|
+
TestDiffSnapshots,
|
|
210
|
+
TestGetCurrentServices,
|
|
211
|
+
]
|
|
212
|
+
|
|
213
|
+
for test_class in test_classes:
|
|
214
|
+
print(f"\n๐ฆ {test_class.__name__}")
|
|
215
|
+
|
|
216
|
+
# Get all test methods
|
|
217
|
+
for method_name in dir(test_class):
|
|
218
|
+
if method_name.startswith("test_"):
|
|
219
|
+
test_method = getattr(test_class(), method_name)
|
|
220
|
+
|
|
221
|
+
# Check if method needs tmp_path parameter
|
|
222
|
+
sig = inspect.signature(test_method)
|
|
223
|
+
needs_tmp_path = len(sig.parameters) > 0
|
|
224
|
+
|
|
225
|
+
# Create temp directory for test
|
|
226
|
+
with tempfile.TemporaryDirectory() as tmp_dir:
|
|
227
|
+
try:
|
|
228
|
+
if needs_tmp_path:
|
|
229
|
+
test_method(Path(tmp_dir))
|
|
230
|
+
else:
|
|
231
|
+
test_method()
|
|
232
|
+
print(f" โ {method_name}")
|
|
233
|
+
passed += 1
|
|
234
|
+
except AssertionError as e:
|
|
235
|
+
print(f" โ {method_name}: {e}")
|
|
236
|
+
failed += 1
|
|
237
|
+
except Exception as e:
|
|
238
|
+
print(f" โ {method_name}: Exception - {e}")
|
|
239
|
+
failed += 1
|
|
240
|
+
|
|
241
|
+
print("\n" + "=" * 50)
|
|
242
|
+
print(f"๐ Results: {passed} passed, {failed} failed")
|
|
243
|
+
|
|
244
|
+
if failed == 0:
|
|
245
|
+
print("๐ All tests passed!")
|
|
246
|
+
return 0
|
|
247
|
+
else:
|
|
248
|
+
print(f"โ ๏ธ {failed} test(s) failed")
|
|
249
|
+
return 1
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
if __name__ == "__main__":
|
|
253
|
+
sys.exit(run_tests())
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
load("./TILT_DISCOVERY.star",
|
|
4
|
+
"VALID_STACKS",
|
|
5
|
+
"VALID_RESOURCE_FEATURES",
|
|
6
|
+
"PORT_RANGES",
|
|
7
|
+
)
|
|
8
|
+
load("../engine/topologies/tilt/manifest/constants.star", "VALID_APP_TYPES")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def validate(manifest):
|
|
12
|
+
issues = []
|
|
13
|
+
|
|
14
|
+
app_name = manifest.get("appName")
|
|
15
|
+
if not app_name:
|
|
16
|
+
issues.append("Missing required field: appName")
|
|
17
|
+
elif type(app_name) != "string":
|
|
18
|
+
issues.append("appName must be a string")
|
|
19
|
+
elif len(app_name) < 3:
|
|
20
|
+
issues.append("appName too short: '" + app_name + "'. Minimum 3 characters")
|
|
21
|
+
elif len(app_name) > 64:
|
|
22
|
+
issues.append("appName too long: '" + app_name + "'. Maximum 64 characters")
|
|
23
|
+
|
|
24
|
+
for i in range(len(app_name or "")):
|
|
25
|
+
char = app_name[i]
|
|
26
|
+
if not (char.islower() or char.isdigit() or char == "-"):
|
|
27
|
+
issues.append("Invalid character in appName: '" + char + "'. Must be kebab-case")
|
|
28
|
+
break
|
|
29
|
+
if app_name and (app_name.startswith("-") or app_name.endswith("-")):
|
|
30
|
+
issues.append("appName cannot start or end with a hyphen")
|
|
31
|
+
|
|
32
|
+
app_type = manifest.get("appType")
|
|
33
|
+
if not app_type:
|
|
34
|
+
issues.append("Missing required field: appType")
|
|
35
|
+
elif app_type not in VALID_APP_TYPES:
|
|
36
|
+
issues.append("Invalid appType: " + str(app_type) + ". Must be one of: " + ", ".join(VALID_APP_TYPES))
|
|
37
|
+
|
|
38
|
+
stack = manifest.get("stack")
|
|
39
|
+
if not stack:
|
|
40
|
+
issues.append("Missing required field: stack")
|
|
41
|
+
elif len(VALID_STACKS) > 0 and stack not in VALID_STACKS:
|
|
42
|
+
# Only validate against list if VALID_STACKS is not empty
|
|
43
|
+
issues.append("Invalid stack: " + str(stack) + ". Must be one of: " + ", ".join(VALID_STACKS))
|
|
44
|
+
|
|
45
|
+
port = manifest.get("port")
|
|
46
|
+
if port == None:
|
|
47
|
+
if app_type != "infra":
|
|
48
|
+
issues.append("Missing required field: port")
|
|
49
|
+
elif type(port) != "int":
|
|
50
|
+
issues.append("Invalid port: " + str(port) + ". Must be an integer")
|
|
51
|
+
elif app_type != "infra":
|
|
52
|
+
if port < 3000 or port > 9999:
|
|
53
|
+
issues.append("Invalid port: " + str(port) + ". Must be integer 3000-9999")
|
|
54
|
+
elif app_type and app_type in PORT_RANGES:
|
|
55
|
+
port_range = PORT_RANGES[app_type]
|
|
56
|
+
if port < port_range["min"] or port > port_range["max"]:
|
|
57
|
+
issues.append("Port " + str(port) + " out of range for " + app_type)
|
|
58
|
+
|
|
59
|
+
features = manifest.get("featuresEnabled", [])
|
|
60
|
+
if type(features) != "list":
|
|
61
|
+
issues.append("Invalid features: must be an array")
|
|
62
|
+
else:
|
|
63
|
+
for feature in features:
|
|
64
|
+
if feature not in VALID_RESOURCE_FEATURES:
|
|
65
|
+
issues.append("Invalid feature: " + str(feature))
|
|
66
|
+
|
|
67
|
+
deps = manifest.get("dependsOn", [])
|
|
68
|
+
if type(deps) != "list":
|
|
69
|
+
issues.append("Invalid dependsOn: must be an array")
|
|
70
|
+
|
|
71
|
+
replicas = manifest.get("replicas")
|
|
72
|
+
if replicas != None:
|
|
73
|
+
if type(replicas) != "int":
|
|
74
|
+
issues.append("Invalid replicas: must be an integer")
|
|
75
|
+
elif replicas < 1:
|
|
76
|
+
issues.append("Invalid replicas: " + str(replicas) + ". Minimum is 1")
|
|
77
|
+
elif replicas > 10:
|
|
78
|
+
issues.append("Invalid replicas: " + str(replicas) + ". Maximum is 10")
|
|
79
|
+
|
|
80
|
+
return issues
|