@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,58 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { delimiter, extname } from "node:path";
|
|
4
|
+
export function isWindows() {
|
|
5
|
+
return process.platform === "win32";
|
|
6
|
+
}
|
|
7
|
+
export function tdkOsFor(platformName) {
|
|
8
|
+
if (platformName === "linux")
|
|
9
|
+
return "linux";
|
|
10
|
+
if (platformName === "darwin")
|
|
11
|
+
return "darwin";
|
|
12
|
+
if (platformName === "win32")
|
|
13
|
+
return "windows";
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
export function tdkOs() {
|
|
17
|
+
return tdkOsFor(process.platform);
|
|
18
|
+
}
|
|
19
|
+
export function tdkArchFor(architecture) {
|
|
20
|
+
if (architecture === "x64")
|
|
21
|
+
return "amd64";
|
|
22
|
+
if (architecture === "arm64")
|
|
23
|
+
return "arm64";
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
export function tdkArch() {
|
|
27
|
+
return tdkArchFor(process.arch);
|
|
28
|
+
}
|
|
29
|
+
export function binaryAssetNameFor(platformName, architecture) {
|
|
30
|
+
const osName = tdkOsFor(platformName);
|
|
31
|
+
const archName = tdkArchFor(architecture);
|
|
32
|
+
if (!osName || !archName)
|
|
33
|
+
return null;
|
|
34
|
+
if (osName === "windows" && archName !== "amd64")
|
|
35
|
+
return null;
|
|
36
|
+
const base = `flisk-${osName}-${archName}`;
|
|
37
|
+
return osName === "windows" ? `${base}.exe` : base;
|
|
38
|
+
}
|
|
39
|
+
export function binaryAssetName() {
|
|
40
|
+
return binaryAssetNameFor(process.platform, process.arch);
|
|
41
|
+
}
|
|
42
|
+
export function executableName() {
|
|
43
|
+
return isWindows() ? "flisk.exe" : "flisk";
|
|
44
|
+
}
|
|
45
|
+
/** Installs published before the Flisk rename shipped the binary as `tdk`. */
|
|
46
|
+
export function legacyExecutableName() {
|
|
47
|
+
return isWindows() ? "tdk.exe" : "tdk";
|
|
48
|
+
}
|
|
49
|
+
export function pathLookups(binName, windows = isWindows()) {
|
|
50
|
+
if (!windows)
|
|
51
|
+
return [binName];
|
|
52
|
+
if (extname(binName))
|
|
53
|
+
return [binName];
|
|
54
|
+
return [binName, `${binName}.exe`, `${binName}.cmd`, `${binName}.bat`];
|
|
55
|
+
}
|
|
56
|
+
export function pathDelimiter(windows = isWindows()) {
|
|
57
|
+
return windows ? ";" : delimiter;
|
|
58
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { createConnection, createServer } from "node:net";
|
|
4
|
+
import { PORT_RANGES } from "./constants.js";
|
|
5
|
+
function isPortAvailable(port) {
|
|
6
|
+
return new Promise((resolve) => {
|
|
7
|
+
const server = createConnection({ port, host: "127.0.0.1" }, () => {
|
|
8
|
+
server.destroy();
|
|
9
|
+
resolve(false);
|
|
10
|
+
});
|
|
11
|
+
server.on("error", () => {
|
|
12
|
+
resolve(true);
|
|
13
|
+
});
|
|
14
|
+
// A connect that neither accepts nor refuses means something is holding
|
|
15
|
+
// the port (e.g. a firewall drop) - treat it as taken rather than wait.
|
|
16
|
+
server.setTimeout(1000, () => {
|
|
17
|
+
server.destroy();
|
|
18
|
+
resolve(false);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export async function checkPortStatus(port) {
|
|
23
|
+
return new Promise((resolve) => {
|
|
24
|
+
const server = createServer();
|
|
25
|
+
const timer = setTimeout(() => {
|
|
26
|
+
server.close();
|
|
27
|
+
resolve("unknown");
|
|
28
|
+
}, 3000);
|
|
29
|
+
server.once("error", (error) => {
|
|
30
|
+
clearTimeout(timer);
|
|
31
|
+
resolve(error.code === "EADDRINUSE" ? "running" : "unknown");
|
|
32
|
+
});
|
|
33
|
+
server.once("listening", () => {
|
|
34
|
+
clearTimeout(timer);
|
|
35
|
+
server.close(() => resolve("stopped"));
|
|
36
|
+
});
|
|
37
|
+
server.listen(port, "127.0.0.1");
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export async function findAvailablePort(basePort, maxAttempts = 10) {
|
|
41
|
+
for (let i = 0; i < maxAttempts; i++) {
|
|
42
|
+
const port = basePort + i;
|
|
43
|
+
if (await isPortAvailable(port)) {
|
|
44
|
+
return port;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
export function getUsedPorts(resources) {
|
|
50
|
+
const usedPorts = new Set();
|
|
51
|
+
for (const r of resources) {
|
|
52
|
+
if (r.port && r.port > 0) {
|
|
53
|
+
usedPorts.add(r.port);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return usedPorts;
|
|
57
|
+
}
|
|
58
|
+
function findNextAvailablePort(usedPorts, range) {
|
|
59
|
+
for (let port = range.base; port <= range.max; port++) {
|
|
60
|
+
if (!usedPorts.has(port)) {
|
|
61
|
+
return port;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
export function assignPort(resourceType, existingResources) {
|
|
67
|
+
const usedPorts = getUsedPorts(existingResources);
|
|
68
|
+
const portRange = PORT_RANGES[resourceType];
|
|
69
|
+
const assignedPort = findNextAvailablePort(usedPorts, portRange);
|
|
70
|
+
if (assignedPort === null) {
|
|
71
|
+
throw new Error(`No available ports in range ${portRange.base}-${portRange.max}. ` +
|
|
72
|
+
"Check TILT_RESOURCE_DEFAULTS.star for port configuration.");
|
|
73
|
+
}
|
|
74
|
+
return assignedPort;
|
|
75
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
/** The env var that moves each host port Flisk publishes. Services publish no host ports, so only these conflict. */
|
|
4
|
+
const PORT_ENV_VARS = {
|
|
5
|
+
"80": "TDK_HTTP_PORT",
|
|
6
|
+
"443": "TDK_HTTPS_PORT",
|
|
7
|
+
"5432": "TDK_POSTGRES_PORT",
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The next step for a host port another process already holds. The occupant is not named: finding it needs the OS, so
|
|
11
|
+
* the command that finds it is given instead.
|
|
12
|
+
*/
|
|
13
|
+
export function portConflictFix(message) {
|
|
14
|
+
// The raw Docker error can reach the report when the readiness check fails before the summary runs.
|
|
15
|
+
const match = message.match(/^host port (\d+) is already allocated$/) ??
|
|
16
|
+
message.match(/Bind for [^ ]+:(\d+) failed: port is already allocated/i);
|
|
17
|
+
if (!match)
|
|
18
|
+
return null;
|
|
19
|
+
const port = match[1];
|
|
20
|
+
const find = `find it with: lsof -nP -iTCP:${port} -sTCP:LISTEN`;
|
|
21
|
+
const envVar = PORT_ENV_VARS[port];
|
|
22
|
+
if (!envVar)
|
|
23
|
+
return `Fix: stop the process using port ${port} (${find})`;
|
|
24
|
+
return `Fix: stop the process using port ${port} (${find}), or set ${envVar} to a free port and run flisk up`;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const PORT_KEYS = [
|
|
2
|
+
{ key: "ingressHttp", label: "HTTP", env: "TDK_HTTP_PORT" },
|
|
3
|
+
{ key: "ingressHttps", label: "HTTPS", env: "TDK_HTTPS_PORT" },
|
|
4
|
+
{ key: "postgres", label: "Postgres", env: "TDK_POSTGRES_PORT" },
|
|
5
|
+
];
|
|
6
|
+
/** One line per port Flisk moved off the one it wanted. Ports the user set explicitly are never listed. */
|
|
7
|
+
export function formatPortFallbackNotice(plan) {
|
|
8
|
+
const lines = [];
|
|
9
|
+
for (const { key, label, env } of PORT_KEYS) {
|
|
10
|
+
const requested = plan.requested[key];
|
|
11
|
+
const chosen = plan[key];
|
|
12
|
+
if (plan.explicit[key] || chosen === requested)
|
|
13
|
+
continue;
|
|
14
|
+
lines.push(`${label}: wanted ${requested}, using ${chosen} (${plan.reason[key]}). To force ${requested}: ${env}=${requested} flisk up`);
|
|
15
|
+
}
|
|
16
|
+
return lines;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { connect } from "node:net";
|
|
4
|
+
/**
|
|
5
|
+
* True when something already accepts connections on 127.0.0.1:port. Binding a socket to find out is not enough:
|
|
6
|
+
* on macOS a bind on 127.0.0.1 succeeds even while another process listens on the same port, so a busy port such as
|
|
7
|
+
* 5432 looked free and `flisk doctor` passed before Docker failed to publish it.
|
|
8
|
+
*/
|
|
9
|
+
export function hasLocalListener(port, timeoutMs = 500) {
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
|
+
const socket = connect({ port, host: "127.0.0.1" });
|
|
12
|
+
const finish = (result) => {
|
|
13
|
+
socket.destroy();
|
|
14
|
+
resolve(result);
|
|
15
|
+
};
|
|
16
|
+
socket.setTimeout(timeoutMs, () => finish(false));
|
|
17
|
+
socket.once("connect", () => finish(true));
|
|
18
|
+
socket.once("error", () => finish(false));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
|
|
4
|
+
/**
|
|
5
|
+
* Defaults shared by project generation and CLI predicates.
|
|
6
|
+
*
|
|
7
|
+
* Source of truth for `always_enabled_infra` when `.tdk/project.json` omits
|
|
8
|
+
* the field. The generator bakes this into the Tiltfile
|
|
9
|
+
* (`Tiltfile.hbs` → `ALWAYS_ENABLED_INFRA`); `should_enable` then returns
|
|
10
|
+
* `RESOURCE_DEFAULTS.get(name, True)` for names in that list — so an omitted
|
|
11
|
+
* field means database-management is ON for `flisk up`.
|
|
12
|
+
*
|
|
13
|
+
* `flisk doctor` / `flisk config verify` must use the same default, otherwise
|
|
14
|
+
* they report Postgres-will-start while the engine does not start it (or
|
|
15
|
+
* the reverse). See shared-platform-postgres.ts.
|
|
16
|
+
*/
|
|
17
|
+
export const DEFAULT_ALWAYS_ENABLED_INFRA = [DATABASE_MANAGEMENT_FEATURE, "proxy"];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { DATABASE_MANAGEMENT_FEATURE } from "./constants.js";
|
|
4
|
+
export const PROJECT_FEATURES = {
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// CORE INFRASTRUCTURE (always enabled in pre_alpha)
|
|
7
|
+
// ============================================================================
|
|
8
|
+
proxy: {
|
|
9
|
+
name: "proxy",
|
|
10
|
+
description: "Traefik reverse proxy and API gateway for routing all services",
|
|
11
|
+
category: "core",
|
|
12
|
+
phase: "pre_alpha",
|
|
13
|
+
enabled_by_default: true,
|
|
14
|
+
dependsOn: [],
|
|
15
|
+
},
|
|
16
|
+
// Key/name must be the literal Tilt resource name (PlatformDockerConstants.VERDACCIO_RESOURCE_NAME
|
|
17
|
+
// in tdk-cli-extensions), since project.json's services list is copied verbatim into
|
|
18
|
+
// PRE_ALPHA_RESOURCES and matched against that name by should_enable(). "registry" would
|
|
19
|
+
// silently fail to enable Verdaccio.
|
|
20
|
+
verdaccio: {
|
|
21
|
+
name: "verdaccio",
|
|
22
|
+
description: "Verdaccio npm registry for package management and local publishing (Premium - requires TDK_LICENSE_KEY)",
|
|
23
|
+
category: "premium",
|
|
24
|
+
phase: "pre_alpha",
|
|
25
|
+
enabled_by_default: false,
|
|
26
|
+
dependsOn: [],
|
|
27
|
+
},
|
|
28
|
+
[DATABASE_MANAGEMENT_FEATURE]: {
|
|
29
|
+
name: DATABASE_MANAGEMENT_FEATURE,
|
|
30
|
+
description: "PostgreSQL database for data persistence and SQL operations",
|
|
31
|
+
category: "core",
|
|
32
|
+
phase: "pre_alpha",
|
|
33
|
+
enabled_by_default: true,
|
|
34
|
+
dependsOn: [],
|
|
35
|
+
},
|
|
36
|
+
// ============================================================================
|
|
37
|
+
// OPTIONAL INFRASTRUCTURE (disabled by default, enable in optional_infra)
|
|
38
|
+
// ============================================================================
|
|
39
|
+
monitoring: {
|
|
40
|
+
name: "monitoring",
|
|
41
|
+
description: "SigNoz or SkyWalking observability platform for monitoring and tracing",
|
|
42
|
+
category: "optional",
|
|
43
|
+
phase: "pre_alpha",
|
|
44
|
+
enabled_by_default: false,
|
|
45
|
+
dependsOn: [DATABASE_MANAGEMENT_FEATURE],
|
|
46
|
+
},
|
|
47
|
+
elk: {
|
|
48
|
+
name: "elk",
|
|
49
|
+
description: "Elasticsearch, Logstash, Kibana stack for log aggregation and analysis",
|
|
50
|
+
category: "optional",
|
|
51
|
+
phase: "pre_alpha",
|
|
52
|
+
enabled_by_default: false,
|
|
53
|
+
dependsOn: [],
|
|
54
|
+
},
|
|
55
|
+
debezium: {
|
|
56
|
+
name: "debezium",
|
|
57
|
+
description: "Change Data Capture for real-time data streaming from databases",
|
|
58
|
+
category: "optional",
|
|
59
|
+
phase: "pre_alpha",
|
|
60
|
+
enabled_by_default: false,
|
|
61
|
+
dependsOn: [DATABASE_MANAGEMENT_FEATURE],
|
|
62
|
+
},
|
|
63
|
+
"golden-image": {
|
|
64
|
+
name: "golden-image",
|
|
65
|
+
description: "Pre-built Docker image layer for faster builds and smaller deployments",
|
|
66
|
+
category: "optional",
|
|
67
|
+
phase: "pre_alpha",
|
|
68
|
+
enabled_by_default: true,
|
|
69
|
+
dependsOn: [],
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Get all enabled project features
|
|
74
|
+
*/
|
|
75
|
+
export function getEnabledProjectFeatures(optional_infra) {
|
|
76
|
+
const enabled = [];
|
|
77
|
+
for (const [key, feature] of Object.entries(PROJECT_FEATURES)) {
|
|
78
|
+
if (feature.enabled_by_default) {
|
|
79
|
+
enabled.push(key);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Add optional features if enabled
|
|
83
|
+
if (optional_infra) {
|
|
84
|
+
for (const [key, isEnabled] of Object.entries(optional_infra)) {
|
|
85
|
+
if (isEnabled && PROJECT_FEATURES[key]) {
|
|
86
|
+
enabled.push(key);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return enabled;
|
|
91
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Public starter repositories plus the bundled default product example. */
|
|
2
|
+
export const PROJECT_TEMPLATES = {
|
|
3
|
+
restaurant: {
|
|
4
|
+
repo: "https://github.com/tdk-landscape/tdk-restaurant-example.git",
|
|
5
|
+
description: "Restaurant ops: reservations, kitchen, floor control (Hono + Vite + Bun)",
|
|
6
|
+
},
|
|
7
|
+
saas: {
|
|
8
|
+
repo: "https://github.com/tdk-landscape/tdk-saas-starter.git",
|
|
9
|
+
description: "SaaS starter: account dashboard and a working checkout button (Hono + Vite + Bun)",
|
|
10
|
+
},
|
|
11
|
+
erp: {
|
|
12
|
+
repo: "https://github.com/tdk-landscape/tdk-erp-system.git",
|
|
13
|
+
description: "Enterprise ERP: 100 microservices across 7 business domains",
|
|
14
|
+
},
|
|
15
|
+
"user-management": {
|
|
16
|
+
repo: "https://github.com/tdk-landscape/tdk-user-management.git",
|
|
17
|
+
description: "User/auth management services",
|
|
18
|
+
},
|
|
19
|
+
ecommerce: {
|
|
20
|
+
repo: "https://github.com/tdk-landscape/tdk-ecommerce-example.git",
|
|
21
|
+
description: "Vue 3 storefront and Hono catalog API (needs Flisk 1.3.75+ for --framework vue)",
|
|
22
|
+
},
|
|
23
|
+
example: {
|
|
24
|
+
repo: "https://github.com/tdk-landscape/tdk-example.git",
|
|
25
|
+
bundledPath: "examples/tdk-example",
|
|
26
|
+
description: "Hono + Postgres + NATS worker + Vite example with a routed write path",
|
|
27
|
+
},
|
|
28
|
+
"agent-stack": {
|
|
29
|
+
repo: "https://github.com/tdk-landscape/tdk-agent-stack.git",
|
|
30
|
+
description: "AI agent stack: Bun agent + MCP tool server + Postgres + NATS",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import { stdin as input, stdout as output } from "node:process";
|
|
4
|
+
import { createInterface } from "node:readline/promises";
|
|
5
|
+
async function question(prompt) {
|
|
6
|
+
const rl = createInterface({ input, output });
|
|
7
|
+
try {
|
|
8
|
+
// Without this, a closed stdin (CI, `< /dev/null`, a pipe) leaves the
|
|
9
|
+
// question pending forever and Node exits 0 having done nothing.
|
|
10
|
+
return await new Promise((resolve, reject) => {
|
|
11
|
+
rl.once("close", () => reject(new Error("No input available to answer the prompt. Run this in a terminal.")));
|
|
12
|
+
rl.question(prompt).then((answer) => resolve(answer.trim()), reject);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
finally {
|
|
16
|
+
rl.close();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export async function promptText(options) {
|
|
20
|
+
const suffix = options.initial ? ` (${options.initial})` : "";
|
|
21
|
+
while (true) {
|
|
22
|
+
const answer = await question(`${options.message}${suffix} `);
|
|
23
|
+
const value = answer || options.initial || "";
|
|
24
|
+
const validation = options.validate?.(value) ?? true;
|
|
25
|
+
if (validation === true) {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
console.log(validation);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export async function promptConfirm(options) {
|
|
32
|
+
const defaultValue = options.initial ?? true;
|
|
33
|
+
const suffix = defaultValue ? "Y/n" : "y/N";
|
|
34
|
+
while (true) {
|
|
35
|
+
const answer = (await question(`${options.message} (${suffix}) `)).toLowerCase();
|
|
36
|
+
if (!answer)
|
|
37
|
+
return defaultValue;
|
|
38
|
+
if (["y", "yes"].includes(answer))
|
|
39
|
+
return true;
|
|
40
|
+
if (["n", "no"].includes(answer))
|
|
41
|
+
return false;
|
|
42
|
+
console.log("Please answer yes or no.");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export async function promptSelect(options) {
|
|
46
|
+
console.log(options.message);
|
|
47
|
+
options.choices.forEach((choice, index) => {
|
|
48
|
+
console.log(` ${index + 1}. ${choice.title}`);
|
|
49
|
+
});
|
|
50
|
+
while (true) {
|
|
51
|
+
const answer = await question("Choose one: ");
|
|
52
|
+
const selectedIndex = Number.parseInt(answer, 10) - 1;
|
|
53
|
+
const selected = options.choices[selectedIndex];
|
|
54
|
+
if (selected) {
|
|
55
|
+
return selected.value;
|
|
56
|
+
}
|
|
57
|
+
console.log(`Enter a number from 1 to ${options.choices.length}.`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export async function promptMultiSelect(options) {
|
|
61
|
+
const defaults = options.choices
|
|
62
|
+
.map((choice, index) => (choice.selected ? index + 1 : null))
|
|
63
|
+
.filter((index) => index !== null);
|
|
64
|
+
const defaultHint = defaults.length > 0 ? ` [${defaults.join(",")}]` : "";
|
|
65
|
+
console.log(options.message);
|
|
66
|
+
options.choices.forEach((choice, index) => {
|
|
67
|
+
const marker = choice.selected ? "*" : " ";
|
|
68
|
+
console.log(` ${marker} ${index + 1}. ${choice.title}`);
|
|
69
|
+
});
|
|
70
|
+
while (true) {
|
|
71
|
+
const answer = await question(`Choose one or more numbers, comma-separated${defaultHint}: `);
|
|
72
|
+
let rawIndexes = defaults;
|
|
73
|
+
if (answer) {
|
|
74
|
+
const tokens = answer.split(",").map((value) => value.trim());
|
|
75
|
+
const invalidToken = tokens.find((token) => {
|
|
76
|
+
if (!/^\d+$/.test(token))
|
|
77
|
+
return true;
|
|
78
|
+
const index = Number.parseInt(token, 10);
|
|
79
|
+
return !options.choices[index - 1];
|
|
80
|
+
});
|
|
81
|
+
if (invalidToken !== undefined) {
|
|
82
|
+
console.log(`"${invalidToken}" is not a valid choice (1-${options.choices.length})`);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
rawIndexes = tokens.map((token) => Number.parseInt(token, 10));
|
|
86
|
+
}
|
|
87
|
+
const selected = Array.from(new Set(rawIndexes))
|
|
88
|
+
.map((index) => options.choices[index - 1])
|
|
89
|
+
.filter((choice) => Boolean(choice))
|
|
90
|
+
.map((choice) => choice.value);
|
|
91
|
+
const validation = options.validate?.(selected) ?? true;
|
|
92
|
+
if (validation === true) {
|
|
93
|
+
return selected;
|
|
94
|
+
}
|
|
95
|
+
console.log(validation);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
/**
|
|
4
|
+
* Resource-Level Features
|
|
5
|
+
*
|
|
6
|
+
* These are code generators and configurations that run per-service/resource.
|
|
7
|
+
* They are controlled via the featuresEnabled: [] array in each service.json file.
|
|
8
|
+
*
|
|
9
|
+
* Frontend services: api-client, env-config, api-index (enabled by default)
|
|
10
|
+
* Backend services: prisma (enabled by default)
|
|
11
|
+
*/
|
|
12
|
+
import { BRING_YOUR_OWN_TYPE } from "./constants.js";
|
|
13
|
+
export const RESOURCE_FEATURES = {
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// FRONTEND GENERATORS
|
|
16
|
+
// ============================================================================
|
|
17
|
+
"api-client": {
|
|
18
|
+
name: "api-client",
|
|
19
|
+
description: "Pre-configured API client for backend communication (createApiClient wrapper)",
|
|
20
|
+
applies_to: ["frontend"],
|
|
21
|
+
enabled_by_default: true,
|
|
22
|
+
generator_file: "engine/topologies/tilt/resources/orchestrator/generators/frontend.star",
|
|
23
|
+
output_file: ".autogenerated/api-client.ts",
|
|
24
|
+
},
|
|
25
|
+
"env-config": {
|
|
26
|
+
name: "env-config",
|
|
27
|
+
description: "Environment constants and configuration (Vite env vars)",
|
|
28
|
+
applies_to: ["frontend"],
|
|
29
|
+
enabled_by_default: true,
|
|
30
|
+
generator_file: "engine/topologies/tilt/resources/orchestrator/generators/frontend.star",
|
|
31
|
+
output_file: ".autogenerated/env.ts",
|
|
32
|
+
},
|
|
33
|
+
"api-index": {
|
|
34
|
+
name: "api-index",
|
|
35
|
+
description: "Barrel export for clean API client imports",
|
|
36
|
+
applies_to: ["frontend"],
|
|
37
|
+
enabled_by_default: true,
|
|
38
|
+
generator_file: "engine/topologies/tilt/resources/orchestrator/generators/frontend.star",
|
|
39
|
+
output_file: ".autogenerated/api-index.ts",
|
|
40
|
+
},
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// BACKEND GENERATORS
|
|
43
|
+
// ============================================================================
|
|
44
|
+
prisma: {
|
|
45
|
+
name: "prisma",
|
|
46
|
+
description: "Prisma CLI configuration for migrations and database client generation",
|
|
47
|
+
applies_to: ["backend", "worker", "migrator"],
|
|
48
|
+
// Opt-in: it needs a prisma/schema.prisma and the prisma dependency, which
|
|
49
|
+
// `flisk resource` does not create. Enabled by default it made every new
|
|
50
|
+
// backend's image build fail on `COPY .../prisma` and `test -f prisma/schema.prisma`.
|
|
51
|
+
enabled_by_default: false,
|
|
52
|
+
generator_file: "engine/topologies/tilt/generators/typescript/prisma_config.star",
|
|
53
|
+
output_file: ".autogenerated/prisma.config.autogenerated.ts",
|
|
54
|
+
},
|
|
55
|
+
// ============================================================================
|
|
56
|
+
// BUILD CONFIGURATION GENERATORS (always enabled, not listed in features)
|
|
57
|
+
// ============================================================================
|
|
58
|
+
// Note: These always run regardless of features array. They are core to the build.
|
|
59
|
+
// Listed here for reference only.
|
|
60
|
+
vite: {
|
|
61
|
+
name: "vite",
|
|
62
|
+
description: "Vite configuration for frontend/backend/SDK builds",
|
|
63
|
+
applies_to: ["frontend", "backend", "sdk"],
|
|
64
|
+
enabled_by_default: true, // Always enabled
|
|
65
|
+
generator_file: "engine/topologies/tilt/generators/vite_config.star",
|
|
66
|
+
output_file: ".autogenerated/vite.config.*.ts",
|
|
67
|
+
},
|
|
68
|
+
tsconfig: {
|
|
69
|
+
name: "tsconfig",
|
|
70
|
+
description: "TypeScript configuration (local and Docker variants)",
|
|
71
|
+
applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
|
|
72
|
+
enabled_by_default: true, // Always enabled
|
|
73
|
+
generator_file: "engine/topologies/tilt/generators/typescript/",
|
|
74
|
+
output_file: ".autogenerated/tsconfig.*.json",
|
|
75
|
+
},
|
|
76
|
+
dockerfile: {
|
|
77
|
+
name: "dockerfile",
|
|
78
|
+
description: "Docker container configuration for production builds",
|
|
79
|
+
applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
|
|
80
|
+
enabled_by_default: true, // Always enabled
|
|
81
|
+
generator_file: "engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star",
|
|
82
|
+
output_file: ".autogenerated/Dockerfile.app",
|
|
83
|
+
},
|
|
84
|
+
npmrc: {
|
|
85
|
+
name: "npmrc",
|
|
86
|
+
description: "NPM registry configuration for package installation",
|
|
87
|
+
applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
|
|
88
|
+
enabled_by_default: true, // Always enabled
|
|
89
|
+
generator_file: "engine/topologies/tilt/generators/npmrc.star",
|
|
90
|
+
output_file: ".autogenerated/.npmrc*",
|
|
91
|
+
},
|
|
92
|
+
bunfig: {
|
|
93
|
+
name: "bunfig",
|
|
94
|
+
description: "Bun runtime configuration for package management",
|
|
95
|
+
applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
|
|
96
|
+
enabled_by_default: true, // Always enabled
|
|
97
|
+
generator_file: "engine/topologies/tilt/generators/npmrc.star",
|
|
98
|
+
output_file: ".autogenerated/bunfig.toml*",
|
|
99
|
+
},
|
|
100
|
+
nginx: {
|
|
101
|
+
name: "nginx",
|
|
102
|
+
description: "Nginx configuration for static file serving (frontend only)",
|
|
103
|
+
applies_to: ["frontend"],
|
|
104
|
+
enabled_by_default: true, // Always enabled
|
|
105
|
+
generator_file: "engine/topologies/tilt/generators/nginx_conf.star",
|
|
106
|
+
output_file: ".autogenerated/nginx.conf",
|
|
107
|
+
},
|
|
108
|
+
env: {
|
|
109
|
+
name: "env",
|
|
110
|
+
description: "Backend environment file configuration",
|
|
111
|
+
applies_to: ["backend", "worker", "migrator"],
|
|
112
|
+
enabled_by_default: true, // Always enabled
|
|
113
|
+
generator_file: "engine/topologies/tilt/resources/orchestrator/generators/env.star",
|
|
114
|
+
output_file: ".autogenerated/.env*",
|
|
115
|
+
},
|
|
116
|
+
playwright: {
|
|
117
|
+
name: "playwright",
|
|
118
|
+
description: "Playwright test configuration (if playwright: true in manifest)",
|
|
119
|
+
applies_to: ["frontend", "backend"],
|
|
120
|
+
enabled_by_default: false, // Only if explicitly enabled in manifest
|
|
121
|
+
generator_file: "engine/topologies/tilt/generators/typescript/playwright_config.star",
|
|
122
|
+
output_file: ".autogenerated/playwright.config.ts",
|
|
123
|
+
},
|
|
124
|
+
"agents-md": {
|
|
125
|
+
name: "agents-md",
|
|
126
|
+
description: "AI agent guard rails for .autogenerated/ folder (paid Flisk feature - free tier writes a stub notice; see extension-fetch.ts KNOWN_RESOURCES)",
|
|
127
|
+
applies_to: ["frontend", "backend", "worker", "migrator", "sdk"],
|
|
128
|
+
enabled_by_default: true, // Always attempted; real content is license-gated
|
|
129
|
+
generator_file: "engine/topologies/tilt/generators/agents_md.star",
|
|
130
|
+
output_file: ".autogenerated/AGENTS.md",
|
|
131
|
+
},
|
|
132
|
+
ddd: {
|
|
133
|
+
name: "ddd",
|
|
134
|
+
description: "Domain-driven design folder structure (domain/application/infrastructure/presentation) " +
|
|
135
|
+
"and matching @domain/@application/@infrastructure/@presentation/@test path aliases " +
|
|
136
|
+
"(Premium - requires TDK_LICENSE_KEY; see hasDddLicense() in extension-fetch.ts)",
|
|
137
|
+
applies_to: ["backend", "worker", "migrator"],
|
|
138
|
+
enabled_by_default: false,
|
|
139
|
+
category: "premium",
|
|
140
|
+
generator_file: "engine/topologies/tilt/generators/vite/helpers.star, engine/topologies/tilt/generators/typescript/backend_tsconfig.star",
|
|
141
|
+
output_file: ".autogenerated/vite.config.*.ts, .autogenerated/tsconfig.*.json",
|
|
142
|
+
},
|
|
143
|
+
sablier: {
|
|
144
|
+
name: "sablier",
|
|
145
|
+
description: "On-demand scaling: stop this resource when idle, wake it on the next request via a " +
|
|
146
|
+
"`sablier: {enable: true}` manifest block (not the featuresEnabled array). Add " +
|
|
147
|
+
"`deferStart: true` to also skip this resource during `flisk up` entirely — no container " +
|
|
148
|
+
"is created or started, and a Traefik static route wakes it on the first request instead " +
|
|
149
|
+
"(backends only for now), so it doesn't wait behind the rest of a large landscape's " +
|
|
150
|
+
"bring-up. Requires `enable: true`. " +
|
|
151
|
+
"(Premium - requires TDK_LICENSE_KEY; free tier writes a disabled stub; see " +
|
|
152
|
+
"hasSablierLicense() in extension-fetch.ts KNOWN_RESOURCES/PREMIUM_PATH_MAP)",
|
|
153
|
+
applies_to: ["backend", "frontend"],
|
|
154
|
+
enabled_by_default: false,
|
|
155
|
+
category: "premium",
|
|
156
|
+
generator_file: "engine/topologies/platform/docker/networking/sablier_container_cycle.star (stub; real generator in tdk-cli-extensions/premium/networking/), engine/topologies/platform/docker/networking/traefik.star, engine/topologies/platform/docker/compose/traefik_standalone.star (deferStart wake gateway + static route), engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star (deferred image prebuild + wake route wiring)",
|
|
157
|
+
output_file: "(Traefik + Sablier Docker labels on the resource's own compose service; with deferStart, also a generated Traefik file-provider dynamic-config entry, wake gateway, and image prebuild resource)",
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Get default features for a resource type
|
|
162
|
+
*/
|
|
163
|
+
export function getDefaultFeaturesForResourceType(appType) {
|
|
164
|
+
// bring-your-own doesn't generate application code, so no features
|
|
165
|
+
if (appType === BRING_YOUR_OWN_TYPE) {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
const defaults = [];
|
|
169
|
+
for (const [key, feature] of Object.entries(RESOURCE_FEATURES)) {
|
|
170
|
+
if (feature.enabled_by_default &&
|
|
171
|
+
feature.applies_to.includes(appType) &&
|
|
172
|
+
// Only include if it's something users control via features array
|
|
173
|
+
["api-client", "env-config", "api-index", "prisma"].includes(key)) {
|
|
174
|
+
defaults.push(key);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return defaults;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Get all generators for a resource type (for documentation)
|
|
181
|
+
*/
|
|
182
|
+
export function getGeneratorsForResourceType(appType) {
|
|
183
|
+
return Object.values(RESOURCE_FEATURES).filter((f) => f.applies_to.includes(appType));
|
|
184
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) 2026 Flisk Landscape contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
/**
|
|
4
|
+
* True for a resource that runs as an HTTP API service behind the Traefik API host: a backend, or an `mcp` server (a Model Context
|
|
5
|
+
* Protocol endpoint, which the engine builds, routes and health-checks exactly like a backend).
|
|
6
|
+
*/
|
|
7
|
+
export function isApiServiceType(appType) {
|
|
8
|
+
return appType === "backend" || appType === "mcp" || appType === "agent";
|
|
9
|
+
}
|