@better-openclaw/core 1.0.22 → 1.0.23
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/dist/composer.cjs +27 -13
- package/dist/composer.cjs.map +1 -1
- package/dist/composer.d.cts.map +1 -1
- package/dist/composer.d.mts.map +1 -1
- package/dist/composer.mjs +27 -13
- package/dist/composer.mjs.map +1 -1
- package/dist/generate.cjs +1 -0
- package/dist/generate.cjs.map +1 -1
- package/dist/generate.d.cts.map +1 -1
- package/dist/generate.d.mts.map +1 -1
- package/dist/generate.mjs +1 -0
- package/dist/generate.mjs.map +1 -1
- package/dist/generators/env.cjs +146 -0
- package/dist/generators/env.cjs.map +1 -1
- package/dist/generators/env.d.cts.map +1 -1
- package/dist/generators/env.d.mts.map +1 -1
- package/dist/generators/env.mjs +146 -0
- package/dist/generators/env.mjs.map +1 -1
- package/dist/generators/openclaw-json.cjs +102 -7
- package/dist/generators/openclaw-json.cjs.map +1 -1
- package/dist/generators/openclaw-json.mjs +102 -7
- package/dist/generators/openclaw-json.mjs.map +1 -1
- package/dist/generators/readme.cjs +2 -1
- package/dist/generators/readme.cjs.map +1 -1
- package/dist/generators/readme.mjs +2 -1
- package/dist/generators/readme.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/presets/registry.cjs +19 -0
- package/dist/presets/registry.cjs.map +1 -1
- package/dist/presets/registry.d.cts.map +1 -1
- package/dist/presets/registry.d.mts.map +1 -1
- package/dist/presets/registry.mjs +19 -0
- package/dist/presets/registry.mjs.map +1 -1
- package/dist/{schema-C_hc7e4k.d.cts → schema-B4c64P8N.d.cts} +17 -1
- package/dist/schema-B4c64P8N.d.cts.map +1 -0
- package/dist/{schema-CaesJaS2.d.mts → schema-CXNhYci1.d.mts} +17 -1
- package/dist/schema-CXNhYci1.d.mts.map +1 -0
- package/dist/schema.cjs +5 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +1 -1
- package/dist/schema.d.mts +1 -1
- package/dist/schema.mjs +5 -1
- package/dist/schema.mjs.map +1 -1
- package/dist/services/definitions/adguard-home.cjs +74 -0
- package/dist/services/definitions/adguard-home.cjs.map +1 -0
- package/dist/services/definitions/adguard-home.d.cts +7 -0
- package/dist/services/definitions/adguard-home.d.cts.map +1 -0
- package/dist/services/definitions/adguard-home.d.mts +7 -0
- package/dist/services/definitions/adguard-home.d.mts.map +1 -0
- package/dist/services/definitions/adguard-home.mjs +73 -0
- package/dist/services/definitions/adguard-home.mjs.map +1 -0
- package/dist/services/definitions/audiobookshelf.cjs +81 -0
- package/dist/services/definitions/audiobookshelf.cjs.map +1 -0
- package/dist/services/definitions/audiobookshelf.d.cts +7 -0
- package/dist/services/definitions/audiobookshelf.d.cts.map +1 -0
- package/dist/services/definitions/audiobookshelf.d.mts +7 -0
- package/dist/services/definitions/audiobookshelf.d.mts.map +1 -0
- package/dist/services/definitions/audiobookshelf.mjs +80 -0
- package/dist/services/definitions/audiobookshelf.mjs.map +1 -0
- package/dist/services/definitions/baserow.cjs +115 -0
- package/dist/services/definitions/baserow.cjs.map +1 -0
- package/dist/services/definitions/baserow.d.cts +7 -0
- package/dist/services/definitions/baserow.d.cts.map +1 -0
- package/dist/services/definitions/baserow.d.mts +7 -0
- package/dist/services/definitions/baserow.d.mts.map +1 -0
- package/dist/services/definitions/baserow.mjs +114 -0
- package/dist/services/definitions/baserow.mjs.map +1 -0
- package/dist/services/definitions/calibre-web.cjs +91 -0
- package/dist/services/definitions/calibre-web.cjs.map +1 -0
- package/dist/services/definitions/calibre-web.d.cts +7 -0
- package/dist/services/definitions/calibre-web.d.cts.map +1 -0
- package/dist/services/definitions/calibre-web.d.mts +7 -0
- package/dist/services/definitions/calibre-web.d.mts.map +1 -0
- package/dist/services/definitions/calibre-web.mjs +90 -0
- package/dist/services/definitions/calibre-web.mjs.map +1 -0
- package/dist/services/definitions/clickhouse.cjs +113 -0
- package/dist/services/definitions/clickhouse.cjs.map +1 -0
- package/dist/services/definitions/clickhouse.d.cts +7 -0
- package/dist/services/definitions/clickhouse.d.cts.map +1 -0
- package/dist/services/definitions/clickhouse.d.mts +7 -0
- package/dist/services/definitions/clickhouse.d.mts.map +1 -0
- package/dist/services/definitions/clickhouse.mjs +112 -0
- package/dist/services/definitions/clickhouse.mjs.map +1 -0
- package/dist/services/definitions/cloudflared.cjs +55 -0
- package/dist/services/definitions/cloudflared.cjs.map +1 -0
- package/dist/services/definitions/cloudflared.d.cts +7 -0
- package/dist/services/definitions/cloudflared.d.cts.map +1 -0
- package/dist/services/definitions/cloudflared.d.mts +7 -0
- package/dist/services/definitions/cloudflared.d.mts.map +1 -0
- package/dist/services/definitions/cloudflared.mjs +54 -0
- package/dist/services/definitions/cloudflared.mjs.map +1 -0
- package/dist/services/definitions/cockroachdb.cjs +70 -0
- package/dist/services/definitions/cockroachdb.cjs.map +1 -0
- package/dist/services/definitions/cockroachdb.d.cts +7 -0
- package/dist/services/definitions/cockroachdb.d.cts.map +1 -0
- package/dist/services/definitions/cockroachdb.d.mts +7 -0
- package/dist/services/definitions/cockroachdb.d.mts.map +1 -0
- package/dist/services/definitions/cockroachdb.mjs +69 -0
- package/dist/services/definitions/cockroachdb.mjs.map +1 -0
- package/dist/services/definitions/coder.cjs +64 -0
- package/dist/services/definitions/coder.cjs.map +1 -0
- package/dist/services/definitions/coder.d.cts +7 -0
- package/dist/services/definitions/coder.d.cts.map +1 -0
- package/dist/services/definitions/coder.d.mts +7 -0
- package/dist/services/definitions/coder.d.mts.map +1 -0
- package/dist/services/definitions/coder.mjs +63 -0
- package/dist/services/definitions/coder.mjs.map +1 -0
- package/dist/services/definitions/dragonfly.cjs +64 -0
- package/dist/services/definitions/dragonfly.cjs.map +1 -0
- package/dist/services/definitions/dragonfly.d.cts +7 -0
- package/dist/services/definitions/dragonfly.d.cts.map +1 -0
- package/dist/services/definitions/dragonfly.d.mts +7 -0
- package/dist/services/definitions/dragonfly.d.mts.map +1 -0
- package/dist/services/definitions/dragonfly.mjs +63 -0
- package/dist/services/definitions/dragonfly.mjs.map +1 -0
- package/dist/services/definitions/drone-ci.cjs +95 -0
- package/dist/services/definitions/drone-ci.cjs.map +1 -0
- package/dist/services/definitions/drone-ci.d.cts +7 -0
- package/dist/services/definitions/drone-ci.d.cts.map +1 -0
- package/dist/services/definitions/drone-ci.d.mts +7 -0
- package/dist/services/definitions/drone-ci.d.mts.map +1 -0
- package/dist/services/definitions/drone-ci.mjs +94 -0
- package/dist/services/definitions/drone-ci.mjs.map +1 -0
- package/dist/services/definitions/element-web.cjs +61 -0
- package/dist/services/definitions/element-web.cjs.map +1 -0
- package/dist/services/definitions/element-web.d.cts +7 -0
- package/dist/services/definitions/element-web.d.cts.map +1 -0
- package/dist/services/definitions/element-web.d.mts +7 -0
- package/dist/services/definitions/element-web.d.mts.map +1 -0
- package/dist/services/definitions/element-web.mjs +60 -0
- package/dist/services/definitions/element-web.mjs.map +1 -0
- package/dist/services/definitions/focalboard.cjs +65 -0
- package/dist/services/definitions/focalboard.cjs.map +1 -0
- package/dist/services/definitions/focalboard.d.cts +7 -0
- package/dist/services/definitions/focalboard.d.cts.map +1 -0
- package/dist/services/definitions/focalboard.d.mts +7 -0
- package/dist/services/definitions/focalboard.d.mts.map +1 -0
- package/dist/services/definitions/focalboard.mjs +64 -0
- package/dist/services/definitions/focalboard.mjs.map +1 -0
- package/dist/services/definitions/forgejo.cjs +108 -0
- package/dist/services/definitions/forgejo.cjs.map +1 -0
- package/dist/services/definitions/forgejo.d.cts +7 -0
- package/dist/services/definitions/forgejo.d.cts.map +1 -0
- package/dist/services/definitions/forgejo.d.mts +7 -0
- package/dist/services/definitions/forgejo.d.mts.map +1 -0
- package/dist/services/definitions/forgejo.mjs +107 -0
- package/dist/services/definitions/forgejo.mjs.map +1 -0
- package/dist/services/definitions/graylog.cjs +103 -0
- package/dist/services/definitions/graylog.cjs.map +1 -0
- package/dist/services/definitions/graylog.d.cts +7 -0
- package/dist/services/definitions/graylog.d.cts.map +1 -0
- package/dist/services/definitions/graylog.d.mts +7 -0
- package/dist/services/definitions/graylog.d.mts.map +1 -0
- package/dist/services/definitions/graylog.mjs +102 -0
- package/dist/services/definitions/graylog.mjs.map +1 -0
- package/dist/services/definitions/index.cjs +139 -1
- package/dist/services/definitions/index.cjs.map +1 -1
- package/dist/services/definitions/index.d.cts +47 -1
- package/dist/services/definitions/index.d.cts.map +1 -1
- package/dist/services/definitions/index.d.mts +47 -1
- package/dist/services/definitions/index.d.mts.map +1 -1
- package/dist/services/definitions/index.mjs +94 -2
- package/dist/services/definitions/index.mjs.map +1 -1
- package/dist/services/definitions/influxdb.cjs +105 -0
- package/dist/services/definitions/influxdb.cjs.map +1 -0
- package/dist/services/definitions/influxdb.d.cts +7 -0
- package/dist/services/definitions/influxdb.d.cts.map +1 -0
- package/dist/services/definitions/influxdb.d.mts +7 -0
- package/dist/services/definitions/influxdb.d.mts.map +1 -0
- package/dist/services/definitions/influxdb.mjs +104 -0
- package/dist/services/definitions/influxdb.mjs.map +1 -0
- package/dist/services/definitions/invoke-ai.cjs +70 -0
- package/dist/services/definitions/invoke-ai.cjs.map +1 -0
- package/dist/services/definitions/invoke-ai.d.cts +7 -0
- package/dist/services/definitions/invoke-ai.d.cts.map +1 -0
- package/dist/services/definitions/invoke-ai.d.mts +7 -0
- package/dist/services/definitions/invoke-ai.d.mts.map +1 -0
- package/dist/services/definitions/invoke-ai.mjs +69 -0
- package/dist/services/definitions/invoke-ai.mjs.map +1 -0
- package/dist/services/definitions/jaeger.cjs +95 -0
- package/dist/services/definitions/jaeger.cjs.map +1 -0
- package/dist/services/definitions/jaeger.d.cts +7 -0
- package/dist/services/definitions/jaeger.d.cts.map +1 -0
- package/dist/services/definitions/jaeger.d.mts +7 -0
- package/dist/services/definitions/jaeger.d.mts.map +1 -0
- package/dist/services/definitions/jaeger.mjs +94 -0
- package/dist/services/definitions/jaeger.mjs.map +1 -0
- package/dist/services/definitions/jan.cjs +64 -0
- package/dist/services/definitions/jan.cjs.map +1 -0
- package/dist/services/definitions/jan.d.cts +7 -0
- package/dist/services/definitions/jan.d.cts.map +1 -0
- package/dist/services/definitions/jan.d.mts +7 -0
- package/dist/services/definitions/jan.d.mts.map +1 -0
- package/dist/services/definitions/jan.mjs +63 -0
- package/dist/services/definitions/jan.mjs.map +1 -0
- package/dist/services/definitions/jitsi-meet.cjs +102 -0
- package/dist/services/definitions/jitsi-meet.cjs.map +1 -0
- package/dist/services/definitions/jitsi-meet.d.cts +7 -0
- package/dist/services/definitions/jitsi-meet.d.cts.map +1 -0
- package/dist/services/definitions/jitsi-meet.d.mts +7 -0
- package/dist/services/definitions/jitsi-meet.d.mts.map +1 -0
- package/dist/services/definitions/jitsi-meet.mjs +101 -0
- package/dist/services/definitions/jitsi-meet.mjs.map +1 -0
- package/dist/services/definitions/local-ai.cjs +86 -0
- package/dist/services/definitions/local-ai.cjs.map +1 -0
- package/dist/services/definitions/local-ai.d.cts +7 -0
- package/dist/services/definitions/local-ai.d.cts.map +1 -0
- package/dist/services/definitions/local-ai.d.mts +7 -0
- package/dist/services/definitions/local-ai.d.mts.map +1 -0
- package/dist/services/definitions/local-ai.mjs +85 -0
- package/dist/services/definitions/local-ai.mjs.map +1 -0
- package/dist/services/definitions/metabase.cjs +108 -0
- package/dist/services/definitions/metabase.cjs.map +1 -0
- package/dist/services/definitions/metabase.d.cts +7 -0
- package/dist/services/definitions/metabase.d.cts.map +1 -0
- package/dist/services/definitions/metabase.d.mts +7 -0
- package/dist/services/definitions/metabase.d.mts.map +1 -0
- package/dist/services/definitions/metabase.mjs +107 -0
- package/dist/services/definitions/metabase.mjs.map +1 -0
- package/dist/services/definitions/mosquitto.cjs +82 -0
- package/dist/services/definitions/mosquitto.cjs.map +1 -0
- package/dist/services/definitions/mosquitto.d.cts +7 -0
- package/dist/services/definitions/mosquitto.d.cts.map +1 -0
- package/dist/services/definitions/mosquitto.d.mts +7 -0
- package/dist/services/definitions/mosquitto.d.mts.map +1 -0
- package/dist/services/definitions/mosquitto.mjs +81 -0
- package/dist/services/definitions/mosquitto.mjs.map +1 -0
- package/dist/services/definitions/navidrome.cjs +90 -0
- package/dist/services/definitions/navidrome.cjs.map +1 -0
- package/dist/services/definitions/navidrome.d.cts +7 -0
- package/dist/services/definitions/navidrome.d.cts.map +1 -0
- package/dist/services/definitions/navidrome.d.mts +7 -0
- package/dist/services/definitions/navidrome.d.mts.map +1 -0
- package/dist/services/definitions/navidrome.mjs +89 -0
- package/dist/services/definitions/navidrome.mjs.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.cjs +71 -0
- package/dist/services/definitions/nginx-proxy-manager.cjs.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.d.cts +7 -0
- package/dist/services/definitions/nginx-proxy-manager.d.cts.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.d.mts +7 -0
- package/dist/services/definitions/nginx-proxy-manager.d.mts.map +1 -0
- package/dist/services/definitions/nginx-proxy-manager.mjs +70 -0
- package/dist/services/definitions/nginx-proxy-manager.mjs.map +1 -0
- package/dist/services/definitions/node-red.cjs +77 -0
- package/dist/services/definitions/node-red.cjs.map +1 -0
- package/dist/services/definitions/node-red.d.cts +7 -0
- package/dist/services/definitions/node-red.d.cts.map +1 -0
- package/dist/services/definitions/node-red.d.mts +7 -0
- package/dist/services/definitions/node-red.d.mts.map +1 -0
- package/dist/services/definitions/node-red.mjs +76 -0
- package/dist/services/definitions/node-red.mjs.map +1 -0
- package/dist/services/definitions/photoprism.cjs +126 -0
- package/dist/services/definitions/photoprism.cjs.map +1 -0
- package/dist/services/definitions/photoprism.d.cts +7 -0
- package/dist/services/definitions/photoprism.d.cts.map +1 -0
- package/dist/services/definitions/photoprism.d.mts +7 -0
- package/dist/services/definitions/photoprism.d.mts.map +1 -0
- package/dist/services/definitions/photoprism.mjs +125 -0
- package/dist/services/definitions/photoprism.mjs.map +1 -0
- package/dist/services/definitions/pihole.cjs +73 -0
- package/dist/services/definitions/pihole.cjs.map +1 -0
- package/dist/services/definitions/pihole.d.cts +7 -0
- package/dist/services/definitions/pihole.d.cts.map +1 -0
- package/dist/services/definitions/pihole.d.mts +7 -0
- package/dist/services/definitions/pihole.d.mts.map +1 -0
- package/dist/services/definitions/pihole.mjs +72 -0
- package/dist/services/definitions/pihole.mjs.map +1 -0
- package/dist/services/definitions/piper-tts.cjs +70 -0
- package/dist/services/definitions/piper-tts.cjs.map +1 -0
- package/dist/services/definitions/piper-tts.d.cts +7 -0
- package/dist/services/definitions/piper-tts.d.cts.map +1 -0
- package/dist/services/definitions/piper-tts.d.mts +7 -0
- package/dist/services/definitions/piper-tts.d.mts.map +1 -0
- package/dist/services/definitions/piper-tts.mjs +69 -0
- package/dist/services/definitions/piper-tts.mjs.map +1 -0
- package/dist/services/definitions/plane.cjs +75 -0
- package/dist/services/definitions/plane.cjs.map +1 -0
- package/dist/services/definitions/plane.d.cts +7 -0
- package/dist/services/definitions/plane.d.cts.map +1 -0
- package/dist/services/definitions/plane.d.mts +7 -0
- package/dist/services/definitions/plane.d.mts.map +1 -0
- package/dist/services/definitions/plane.mjs +74 -0
- package/dist/services/definitions/plane.mjs.map +1 -0
- package/dist/services/definitions/plausible.cjs +94 -0
- package/dist/services/definitions/plausible.cjs.map +1 -0
- package/dist/services/definitions/plausible.d.cts +7 -0
- package/dist/services/definitions/plausible.d.cts.map +1 -0
- package/dist/services/definitions/plausible.d.mts +7 -0
- package/dist/services/definitions/plausible.d.mts.map +1 -0
- package/dist/services/definitions/plausible.mjs +93 -0
- package/dist/services/definitions/plausible.mjs.map +1 -0
- package/dist/services/definitions/pocket-id.cjs +101 -0
- package/dist/services/definitions/pocket-id.cjs.map +1 -0
- package/dist/services/definitions/pocket-id.d.cts +7 -0
- package/dist/services/definitions/pocket-id.d.cts.map +1 -0
- package/dist/services/definitions/pocket-id.d.mts +7 -0
- package/dist/services/definitions/pocket-id.d.mts.map +1 -0
- package/dist/services/definitions/pocket-id.mjs +100 -0
- package/dist/services/definitions/pocket-id.mjs.map +1 -0
- package/dist/services/definitions/posthog.cjs +94 -0
- package/dist/services/definitions/posthog.cjs.map +1 -0
- package/dist/services/definitions/posthog.d.cts +7 -0
- package/dist/services/definitions/posthog.d.cts.map +1 -0
- package/dist/services/definitions/posthog.d.mts +7 -0
- package/dist/services/definitions/posthog.d.mts.map +1 -0
- package/dist/services/definitions/posthog.mjs +93 -0
- package/dist/services/definitions/posthog.mjs.map +1 -0
- package/dist/services/definitions/redis.cjs +1 -1
- package/dist/services/definitions/redis.cjs.map +1 -1
- package/dist/services/definitions/redis.mjs +1 -1
- package/dist/services/definitions/redis.mjs.map +1 -1
- package/dist/services/definitions/revolt.cjs +64 -0
- package/dist/services/definitions/revolt.cjs.map +1 -0
- package/dist/services/definitions/revolt.d.cts +7 -0
- package/dist/services/definitions/revolt.d.cts.map +1 -0
- package/dist/services/definitions/revolt.d.mts +7 -0
- package/dist/services/definitions/revolt.d.mts.map +1 -0
- package/dist/services/definitions/revolt.mjs +63 -0
- package/dist/services/definitions/revolt.mjs.map +1 -0
- package/dist/services/definitions/sentry.cjs +101 -0
- package/dist/services/definitions/sentry.cjs.map +1 -0
- package/dist/services/definitions/sentry.d.cts +7 -0
- package/dist/services/definitions/sentry.d.cts.map +1 -0
- package/dist/services/definitions/sentry.d.mts +7 -0
- package/dist/services/definitions/sentry.d.mts.map +1 -0
- package/dist/services/definitions/sentry.mjs +100 -0
- package/dist/services/definitions/sentry.mjs.map +1 -0
- package/dist/services/definitions/sonarqube.cjs +86 -0
- package/dist/services/definitions/sonarqube.cjs.map +1 -0
- package/dist/services/definitions/sonarqube.d.cts +7 -0
- package/dist/services/definitions/sonarqube.d.cts.map +1 -0
- package/dist/services/definitions/sonarqube.d.mts +7 -0
- package/dist/services/definitions/sonarqube.d.mts.map +1 -0
- package/dist/services/definitions/sonarqube.mjs +85 -0
- package/dist/services/definitions/sonarqube.mjs.map +1 -0
- package/dist/services/definitions/superset.cjs +77 -0
- package/dist/services/definitions/superset.cjs.map +1 -0
- package/dist/services/definitions/superset.d.cts +7 -0
- package/dist/services/definitions/superset.d.cts.map +1 -0
- package/dist/services/definitions/superset.d.mts +7 -0
- package/dist/services/definitions/superset.d.mts.map +1 -0
- package/dist/services/definitions/superset.mjs +76 -0
- package/dist/services/definitions/superset.mjs.map +1 -0
- package/dist/services/definitions/surrealdb.cjs +72 -0
- package/dist/services/definitions/surrealdb.cjs.map +1 -0
- package/dist/services/definitions/surrealdb.d.cts +7 -0
- package/dist/services/definitions/surrealdb.d.cts.map +1 -0
- package/dist/services/definitions/surrealdb.d.mts +7 -0
- package/dist/services/definitions/surrealdb.d.mts.map +1 -0
- package/dist/services/definitions/surrealdb.mjs +71 -0
- package/dist/services/definitions/surrealdb.mjs.map +1 -0
- package/dist/services/definitions/tabby-ml.cjs +70 -0
- package/dist/services/definitions/tabby-ml.cjs.map +1 -0
- package/dist/services/definitions/tabby-ml.d.cts +7 -0
- package/dist/services/definitions/tabby-ml.d.cts.map +1 -0
- package/dist/services/definitions/tabby-ml.d.mts +7 -0
- package/dist/services/definitions/tabby-ml.d.mts.map +1 -0
- package/dist/services/definitions/tabby-ml.mjs +69 -0
- package/dist/services/definitions/tabby-ml.mjs.map +1 -0
- package/dist/services/definitions/tempo.cjs +57 -0
- package/dist/services/definitions/tempo.cjs.map +1 -0
- package/dist/services/definitions/tempo.d.cts +7 -0
- package/dist/services/definitions/tempo.d.cts.map +1 -0
- package/dist/services/definitions/tempo.d.mts +7 -0
- package/dist/services/definitions/tempo.d.mts.map +1 -0
- package/dist/services/definitions/tempo.mjs +56 -0
- package/dist/services/definitions/tempo.mjs.map +1 -0
- package/dist/services/definitions/text-gen-webui.cjs +88 -0
- package/dist/services/definitions/text-gen-webui.cjs.map +1 -0
- package/dist/services/definitions/text-gen-webui.d.cts +7 -0
- package/dist/services/definitions/text-gen-webui.d.cts.map +1 -0
- package/dist/services/definitions/text-gen-webui.d.mts +7 -0
- package/dist/services/definitions/text-gen-webui.d.mts.map +1 -0
- package/dist/services/definitions/text-gen-webui.mjs +87 -0
- package/dist/services/definitions/text-gen-webui.mjs.map +1 -0
- package/dist/services/definitions/timescaledb.cjs +87 -0
- package/dist/services/definitions/timescaledb.cjs.map +1 -0
- package/dist/services/definitions/timescaledb.d.cts +7 -0
- package/dist/services/definitions/timescaledb.d.cts.map +1 -0
- package/dist/services/definitions/timescaledb.d.mts +7 -0
- package/dist/services/definitions/timescaledb.d.mts.map +1 -0
- package/dist/services/definitions/timescaledb.mjs +86 -0
- package/dist/services/definitions/timescaledb.mjs.map +1 -0
- package/dist/services/definitions/valkey.cjs +1 -1
- package/dist/services/definitions/valkey.cjs.map +1 -1
- package/dist/services/definitions/valkey.mjs +1 -1
- package/dist/services/definitions/valkey.mjs.map +1 -1
- package/dist/services/definitions/vector-log.cjs +59 -0
- package/dist/services/definitions/vector-log.cjs.map +1 -0
- package/dist/services/definitions/vector-log.d.cts +7 -0
- package/dist/services/definitions/vector-log.d.cts.map +1 -0
- package/dist/services/definitions/vector-log.d.mts +7 -0
- package/dist/services/definitions/vector-log.d.mts.map +1 -0
- package/dist/services/definitions/vector-log.mjs +58 -0
- package/dist/services/definitions/vector-log.mjs.map +1 -0
- package/dist/services/definitions/vikunja.cjs +96 -0
- package/dist/services/definitions/vikunja.cjs.map +1 -0
- package/dist/services/definitions/vikunja.d.cts +7 -0
- package/dist/services/definitions/vikunja.d.cts.map +1 -0
- package/dist/services/definitions/vikunja.d.mts +7 -0
- package/dist/services/definitions/vikunja.d.mts.map +1 -0
- package/dist/services/definitions/vikunja.mjs +95 -0
- package/dist/services/definitions/vikunja.mjs.map +1 -0
- package/dist/services/definitions/wireguard.cjs +88 -0
- package/dist/services/definitions/wireguard.cjs.map +1 -0
- package/dist/services/definitions/wireguard.d.cts +7 -0
- package/dist/services/definitions/wireguard.d.cts.map +1 -0
- package/dist/services/definitions/wireguard.d.mts +7 -0
- package/dist/services/definitions/wireguard.d.mts.map +1 -0
- package/dist/services/definitions/wireguard.mjs +87 -0
- package/dist/services/definitions/wireguard.mjs.map +1 -0
- package/dist/services/definitions/woodpecker-ci.cjs +93 -0
- package/dist/services/definitions/woodpecker-ci.cjs.map +1 -0
- package/dist/services/definitions/woodpecker-ci.d.cts +7 -0
- package/dist/services/definitions/woodpecker-ci.d.cts.map +1 -0
- package/dist/services/definitions/woodpecker-ci.d.mts +7 -0
- package/dist/services/definitions/woodpecker-ci.d.mts.map +1 -0
- package/dist/services/definitions/woodpecker-ci.mjs +92 -0
- package/dist/services/definitions/woodpecker-ci.mjs.map +1 -0
- package/dist/services/definitions/zulip.cjs +116 -0
- package/dist/services/definitions/zulip.cjs.map +1 -0
- package/dist/services/definitions/zulip.d.cts +7 -0
- package/dist/services/definitions/zulip.d.cts.map +1 -0
- package/dist/services/definitions/zulip.d.mts +7 -0
- package/dist/services/definitions/zulip.d.mts.map +1 -0
- package/dist/services/definitions/zulip.mjs +115 -0
- package/dist/services/definitions/zulip.mjs.map +1 -0
- package/dist/types.cjs +28 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +2 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +28 -0
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
- package/src/__snapshots__/composer.snapshot.test.ts.snap +130 -65
- package/src/composer.ts +25 -15
- package/src/generate.ts +1 -0
- package/src/generators/env.ts +214 -0
- package/src/generators/openclaw-json.ts +156 -1
- package/src/generators/readme.ts +2 -1
- package/src/presets/registry.ts +329 -221
- package/src/schema.ts +4 -0
- package/src/services/definitions/adguard-home.ts +79 -0
- package/src/services/definitions/audiobookshelf.ts +83 -0
- package/src/services/definitions/baserow.ts +118 -0
- package/src/services/definitions/calibre-web.ts +95 -0
- package/src/services/definitions/clickhouse.ts +115 -0
- package/src/services/definitions/cloudflared.ts +55 -0
- package/src/services/definitions/cockroachdb.ts +75 -0
- package/src/services/definitions/coder.ts +68 -0
- package/src/services/definitions/dragonfly.ts +68 -0
- package/src/services/definitions/drone-ci.ts +96 -0
- package/src/services/definitions/element-web.ts +62 -0
- package/src/services/definitions/focalboard.ts +69 -0
- package/src/services/definitions/forgejo.ts +109 -0
- package/src/services/definitions/graylog.ts +101 -0
- package/src/services/definitions/index.ts +139 -0
- package/src/services/definitions/influxdb.ts +109 -0
- package/src/services/definitions/invoke-ai.ts +76 -0
- package/src/services/definitions/jaeger.ts +94 -0
- package/src/services/definitions/jan.ts +68 -0
- package/src/services/definitions/jitsi-meet.ts +108 -0
- package/src/services/definitions/local-ai.ts +90 -0
- package/src/services/definitions/metabase.ts +111 -0
- package/src/services/definitions/mosquitto.ts +84 -0
- package/src/services/definitions/navidrome.ts +95 -0
- package/src/services/definitions/nginx-proxy-manager.ts +70 -0
- package/src/services/definitions/node-red.ts +83 -0
- package/src/services/definitions/photoprism.ts +130 -0
- package/src/services/definitions/pihole.ts +79 -0
- package/src/services/definitions/piper-tts.ts +76 -0
- package/src/services/definitions/plane.ts +75 -0
- package/src/services/definitions/plausible.ts +97 -0
- package/src/services/definitions/pocket-id.ts +98 -0
- package/src/services/definitions/posthog.ts +97 -0
- package/src/services/definitions/redis.ts +1 -1
- package/src/services/definitions/revolt.ts +68 -0
- package/src/services/definitions/sentry.ts +104 -0
- package/src/services/definitions/sonarqube.ts +85 -0
- package/src/services/definitions/superset.ts +84 -0
- package/src/services/definitions/surrealdb.ts +77 -0
- package/src/services/definitions/tabby-ml.ts +76 -0
- package/src/services/definitions/tempo.ts +59 -0
- package/src/services/definitions/text-gen-webui.ts +92 -0
- package/src/services/definitions/timescaledb.ts +90 -0
- package/src/services/definitions/valkey.ts +1 -1
- package/src/services/definitions/vector-log.ts +61 -0
- package/src/services/definitions/vikunja.ts +96 -0
- package/src/services/definitions/wireguard.ts +89 -0
- package/src/services/definitions/woodpecker-ci.ts +97 -0
- package/src/services/definitions/zulip.ts +117 -0
- package/src/types.ts +29 -0
- package/dist/schema-C_hc7e4k.d.cts.map +0 -1
- package/dist/schema-CaesJaS2.d.mts.map +0 -1
package/dist/generate.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.cjs","names":["migrateConfig","resolve","StackConfigError","partitionBareMetal","resolvedWithOnlyServices","generateTraefikConfig","composeMultiFile","validate","ValidationError","generateEnvFiles","generateStackManifest","generateSkillFiles","generateOpenClawConfig","generateReadme","generateScripts","generateHealthCheck","generateN8nWorkflows","generatePostgresInit","generateCaddyfile","generatePrometheusConfig","generateGrafanaConfig","generateGrafanaDashboard","platformToNativePlatform","generateNativeInstallScripts","generateBareMetalInstall","generateGsdScripts","generateOpenclawInstallScript","generateCloudInit"],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,mBAAmB,UAAmD;AAC9E,KAAI,aAAa,iBAAiB,aAAa,cAAe,QAAO;AACrE,QAAO;;;;;;AAOR,SAAgB,SAAS,UAA6C;CAErE,MAAM,QAAQA,mBAAAA,cAAc,SAAoC;CAEhE,MAAM,kBAAkB,mBAAmB,MAAM,SAAS;CAY1D,MAAM,WAAWC,iBAAAA,QAToB;EACpC,UAAU,MAAM;EAChB,YAAY,MAAM;EAClB,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,KAAK,MAAM;EACX,UAAU;EACV,YAAY,MAAM;EAClB,CACsC;AAEvC,KAAI,CAAC,SAAS,QACb,OAAM,IAAIC,eAAAA,iBACT,gCAAgC,SAAS,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,KAA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AC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
|
|
1
|
+
{"version":3,"file":"generate.cjs","names":["migrateConfig","resolve","StackConfigError","partitionBareMetal","resolvedWithOnlyServices","generateTraefikConfig","composeMultiFile","validate","ValidationError","generateEnvFiles","generateStackManifest","generateSkillFiles","generateOpenClawConfig","generateReadme","generateScripts","generateHealthCheck","generateN8nWorkflows","generatePostgresInit","generateCaddyfile","generatePrometheusConfig","generateGrafanaConfig","generateGrafanaDashboard","platformToNativePlatform","generateNativeInstallScripts","generateBareMetalInstall","generateGsdScripts","generateOpenclawInstallScript","generateCloudInit"],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tresolvedServices: resolved.services.map((s) => s.definition.id),\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,mBAAmB,UAAmD;AAC9E,KAAI,aAAa,iBAAiB,aAAa,cAAe,QAAO;AACrE,QAAO;;;;;;AAOR,SAAgB,SAAS,UAA6C;CAErE,MAAM,QAAQA,mBAAAA,cAAc,SAAoC;CAEhE,MAAM,kBAAkB,mBAAmB,MAAM,SAAS;CAY1D,MAAM,WAAWC,iBAAAA,QAToB;EACpC,UAAU,MAAM;EAChB,YAAY,MAAM;EAClB,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,KAAK,MAAM;EACX,UAAU;EACV,YAAY,MAAM;EAClB,CACsC;AAEvC,KAAI,CAAC,SAAS,QAC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,SAAS,GAAG;AACzB,SAAM,KAAK,eAAe;AAC1B,QAAK,MAAM,KAAK,IAAI,MACnB,OAAM,KACL,SAAS,EAAE,UAAU,OAAO,EAAE,cAAc,EAAE,UAAU,KAAK,qBAC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
|
package/dist/generate.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.cts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;AA8CA;;iBAAgB,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,gBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"generate.d.cts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;AA8CA;;iBAAgB,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,gBAAA;AAAA,iBA6QrC,mBAAA,CAAoB,QAAA,EAAD,cAAA"}
|
package/dist/generate.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.mts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;;AA8CA;iBAAgB,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,gBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"generate.d.mts","names":[],"sources":["../src/generate.ts"],"mappings":";;;;;;AA8CA;iBAAgB,QAAA,CAAS,QAAA,EAAU,eAAA,GAAkB,gBAAA;AAAA,iBA6QrC,mBAAA,CAAoB,QAAA,EAAD,cAAA"}
|
package/dist/generate.mjs
CHANGED
|
@@ -186,6 +186,7 @@ function generate(rawInput) {
|
|
|
186
186
|
serviceCount: resolved.services.length,
|
|
187
187
|
skillCount,
|
|
188
188
|
estimatedMemoryMB: resolved.estimatedMemoryMB,
|
|
189
|
+
resolvedServices: resolved.services.map((s) => s.definition.id),
|
|
189
190
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
190
191
|
}
|
|
191
192
|
};
|
package/dist/generate.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.mjs","names":[],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,mBAAmB,UAAmD;AAC9E,KAAI,aAAa,iBAAiB,aAAa,cAAe,QAAO;AACrE,QAAO;;;;;;AAOR,SAAgB,SAAS,UAA6C;CAErE,MAAM,QAAQ,cAAc,SAAoC;CAEhE,MAAM,kBAAkB,mBAAmB,MAAM,SAAS;CAY1D,MAAM,WAAW,QAToB;EACpC,UAAU,MAAM;EAChB,YAAY,MAAM;EAClB,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,KAAK,MAAM;EACX,UAAU;EACV,YAAY,MAAM;EAClB,CACsC;AAEvC,KAAI,CAAC,SAAS,QACb,OAAM,IAAI,iBACT,gCAAgC,SAAS,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,KAAK,KAAK,GAChF;CAGF,MAAM,cAAc,MAAM,mBAAmB;CAC7C,IAAI,qBAAqB;CACzB,IAAI,4BAAY,IAAI,KAAa;CACjC,IAAI,iBAA2C,EAAE;CACjD,IAAI,qBAA+C,EAAE;AAErD,KAAI,aAAa;EAChB,MAAM,YAAY,mBAAmB,UAAU,MAAM,SAAS;AAC9D,mBAAiB,UAAU;AAC3B,uBAAqB,UAAU;AAC/B,cAAY,UAAU;AACtB,MAAI,eAAe,SAAS,EAC3B,sBAAqB,yBAAyB,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AI,MAAM,EAAC,aAAa;GACrC;EACD;;AAGF,SAAgB,oBAAoB,UAAuD;CAC1F,MAAM,QAAkB;EACvB;EACA;EACA;EACA;EACA;AAED,MAAK,MAAM,OAAO,SAAS,UAAU;EACpC,MAAM,MAAM,IAAI;AAChB,QAAM,KAAK,MAAM,IAAI,KAAK,GAAG,IAAI,OAAO;AACxC,QAAM,KAAK,GAAG;AACd,QAAM,KAAK,IAAI,YAAY;AAC3B,QAAM,KAAK,GAAG;AACd,QAAM,KAAK,kBAAkB,IAAI,MAAM,GAAG,IAAI,SAAS,IAAI;AAC3D,QAAM,KAAK,mBAAmB,IAAI,WAAW;AAC7C,QAAM,KAAK,mBAAmB,IAAI,WAAW;AAC7C,MAAI,IAAI,YACP,OAAM,KAAK,qBAAqB,IAAI,YAAY,IAAI;AAErD,MAAI,IAAI,MAAM,SAAS,GAAG;AACzB,SAAM,KAAK,eAAe;AAC1B,QAAK,MAAM,KAAK,IAAI,MACnB,OAAM,KACL,SAAS,EAAE,UAAU,OAAO,EAAE,cAAc,EAAE,UAAU,KAAK,qBAC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
|
|
1
|
+
{"version":3,"file":"generate.mjs","names":[],"sources":["../src/generate.ts"],"sourcesContent":["import {\n\tpartitionBareMetal,\n\tplatformToNativePlatform,\n\tresolvedWithOnlyServices,\n} from \"./bare-metal-partition.js\";\nimport { composeMultiFile } from \"./composer.js\";\nimport { StackConfigError, ValidationError } from \"./errors.js\";\nimport { generateBareMetalInstall } from \"./generators/bare-metal-install.js\";\nimport { generateCaddyfile } from \"./generators/caddy.js\";\nimport { generateCloudInit } from \"./generators/cloud-init.js\";\nimport { generateEnvFiles } from \"./generators/env.js\";\nimport { generateGsdScripts } from \"./generators/get-shit-done.js\";\nimport { generateGrafanaConfig, generateGrafanaDashboard } from \"./generators/grafana.js\";\nimport { generateHealthCheck } from \"./generators/health-check.js\";\nimport { generateN8nWorkflows } from \"./generators/n8n-workflows.js\";\nimport { generateNativeInstallScripts } from \"./generators/native-services.js\";\nimport { generateOpenclawInstallScript } from \"./generators/openclaw-install-script.js\";\nimport { generateOpenClawConfig } from \"./generators/openclaw-json.js\";\nimport { generatePostgresInit } from \"./generators/postgres-init.js\";\nimport { generatePrometheusConfig } from \"./generators/prometheus.js\";\nimport { generateReadme } from \"./generators/readme.js\";\nimport { generateScripts } from \"./generators/scripts.js\";\nimport { generateSkillFiles } from \"./generators/skills.js\";\nimport { generateStackManifest } from \"./generators/stack-manifest.js\";\nimport { generateTraefikConfig } from \"./generators/traefik.js\";\nimport { migrateConfig } from \"./migrations.js\";\nimport { resolve } from \"./resolver.js\";\nimport type {\n\tGeneratedFiles,\n\tGenerationInput,\n\tGenerationResult,\n\tPlatform,\n\tResolverInput,\n} from \"./types.js\";\nimport { validate } from \"./validator.js\";\n\n/** Resolver/compose only support linux image platforms; normalize for bare-metal (windows/macos). */\nfunction getComposePlatform(platform: Platform): \"linux/amd64\" | \"linux/arm64\" {\n\tif (platform === \"linux/amd64\" || platform === \"linux/arm64\") return platform;\n\treturn \"linux/amd64\";\n}\n\n/**\n * Main orchestration function: takes generation input, resolves dependencies,\n * generates all files, validates, and returns the complete file tree.\n */\nexport function generate(rawInput: GenerationInput): GenerationResult {\n\t// Apply config migrations if needed\n\tconst input = migrateConfig(rawInput as Record<string, unknown>) as GenerationInput;\n\n\tconst composePlatform = getComposePlatform(input.platform);\n\n\t// 1. Resolve dependencies\n\tconst resolverInput: ResolverInput = {\n\t\tservices: input.services,\n\t\tskillPacks: input.skillPacks,\n\t\taiProviders: input.aiProviders,\n\t\tproxy: input.proxy,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tmonitoring: input.monitoring,\n\t};\n\tconst resolved = resolve(resolverInput);\n\n\tif (!resolved.isValid) {\n\t\tthrow new StackConfigError(\n\t\t\t`Invalid stack configuration: ${resolved.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\tconst isBareMetal = input.deploymentType === \"bare-metal\";\n\tlet resolvedForCompose = resolved;\n\tlet nativeIds = new Set<string>();\n\tlet nativeServices: typeof resolved.services = [];\n\tlet dockerOnlyServices: typeof resolved.services = [];\n\n\tif (isBareMetal) {\n\t\tconst partition = partitionBareMetal(resolved, input.platform);\n\t\tnativeServices = partition.nativeServices;\n\t\tdockerOnlyServices = partition.dockerOnlyServices;\n\t\tnativeIds = partition.nativeIds;\n\t\tif (nativeServices.length > 0) {\n\t\t\tresolvedForCompose = resolvedWithOnlyServices(resolved, dockerOnlyServices);\n\t\t}\n\t}\n\n\t// 2. Generate Docker Compose YAML (multi-file)\n\t// Compute Traefik labels before composing (labels get injected into docker-compose services)\n\tlet traefikOutput: ReturnType<typeof generateTraefikConfig> | undefined;\n\tif (input.proxy === \"traefik\" && input.domain) {\n\t\ttraefikOutput = generateTraefikConfig(resolvedForCompose, input.domain);\n\t}\n\n\tconst composeOptions = {\n\t\tprojectName: input.projectName,\n\t\tproxy: input.proxy,\n\t\tproxyHttpPort: input.proxyHttpPort,\n\t\tproxyHttpsPort: input.proxyHttpsPort,\n\t\tportOverrides: input.portOverrides,\n\t\tdomain: input.domain,\n\t\tgpu: input.gpu,\n\t\tplatform: composePlatform,\n\t\tdeployment: input.deployment,\n\t\topenclawVersion: input.openclawVersion,\n\t\tbareMetalNativeHost: isBareMetal && nativeIds.size > 0,\n\t\ttraefikLabels: traefikOutput?.serviceLabels,\n\t\topenclawImage: input.openclawImage ?? \"official\",\n\t\thardened: input.hardened ?? true,\n\t\topenclawInstallMethod: input.openclawInstallMethod ?? \"docker\",\n\t};\n\tconst composeResult = composeMultiFile(resolvedForCompose, composeOptions);\n\n\t// 3. Validate (using the base docker-compose.yml)\n\tconst validation = validate(resolvedForCompose, composeResult.files[\"docker-compose.yml\"] ?? \"\", {\n\t\tdomain: input.domain,\n\t\tgenerateSecrets: input.generateSecrets,\n\t});\n\tif (!validation.valid) {\n\t\tthrow new ValidationError(\n\t\t\t`Validation failed: ${validation.errors.map((e) => e.message).join(\"; \")}`,\n\t\t);\n\t}\n\n\t// 4. Generate all files\n\tconst files: GeneratedFiles = {};\n\n\t// Docker Compose (multi-file output)\n\tfor (const [filename, content] of Object.entries(composeResult.files)) {\n\t\tfiles[filename] = content;\n\t}\n\n\t// Environment files (when bare-metal with native services, host vars use host.docker.internal)\n\tconst envFiles = generateEnvFiles(resolved, {\n\t\tgenerateSecrets: input.generateSecrets,\n\t\tdomain: input.domain,\n\t\topenclawVersion: input.openclawVersion,\n\t\tnativeServiceIds: isBareMetal ? nativeIds : undefined,\n\t\tcomposeFiles: Object.keys(composeResult.files),\n\t\tcomposeProfiles: composeResult.profiles,\n\t\topenclawImage: input.openclawImage,\n\t});\n\tfiles[\".env.example\"] = envFiles.envExample;\n\tfiles[\".env\"] = envFiles.env;\n\n\t// .gitignore\n\tfiles[\".gitignore\"] = [\n\t\t\".env\",\n\t\t\".env.local\",\n\t\t\".env.*.local\",\n\t\t\"*.log\",\n\t\t\"docker-compose.override.yml\",\n\t].join(\"\\n\");\n\n\t// Stack manifest (consumed by Mission Control)\n\tconst manifestFiles = generateStackManifest(resolved, input);\n\tfor (const [path, content] of Object.entries(manifestFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Skills\n\tconst skillFiles = generateSkillFiles(resolved);\n\tfor (const [path, content] of Object.entries(skillFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// OpenClaw Core Configuration\n\tfiles[\"openclaw/config/openclaw.json\"] = generateOpenClawConfig(resolved, {\n\t\tdeploymentType: input.deploymentType,\n\t\tgatewayPort: 18789,\n\t\topenclawVersion: input.openclawVersion,\n\t});\n\n\t// README\n\tfiles[\"README.md\"] = generateReadme(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdomain: input.domain,\n\t\tproxy: input.proxy,\n\t\tdeploymentType: input.deploymentType,\n\t\thasNativeServices: isBareMetal && nativeServices.length > 0,\n\t\topenclawInstallMethod: input.openclawInstallMethod,\n\t});\n\n\t// Scripts\n\tconst scripts = generateScripts();\n\tfor (const [path, content] of Object.entries(scripts)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// Health check scripts (dynamic, stack-specific)\n\tconst healthCheckFiles = generateHealthCheck(resolved, {\n\t\tprojectName: input.projectName,\n\t\tdeploymentType: input.deploymentType,\n\t});\n\tfor (const [path, content] of Object.entries(healthCheckFiles)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// n8n workflows\n\tconst n8nWorkflows = generateN8nWorkflows(resolved);\n\tfor (const [path, content] of Object.entries(n8nWorkflows)) {\n\t\tfiles[path] = content;\n\t}\n\n\t// PostgreSQL init script (creates per-service databases and users)\n\tconst postgresInit = generatePostgresInit(resolved);\n\tif (postgresInit) {\n\t\tfiles[\"postgres/init-databases.sh\"] = postgresInit;\n\t}\n\n\t// Caddy config\n\tif (input.proxy === \"caddy\" && input.domain) {\n\t\tfiles[\"caddy/Caddyfile\"] = generateCaddyfile(resolved, input.domain);\n\t}\n\n\t// Traefik config (labels are already injected via composeOptions.traefikLabels)\n\tif (traefikOutput) {\n\t\tfiles[\"traefik/traefik.yml\"] = traefikOutput.staticConfig;\n\t}\n\n\t// Prometheus config\n\tconst hasPrometheus = resolved.services.some((s) => s.definition.id === \"prometheus\");\n\tif (hasPrometheus) {\n\t\tfiles[\"prometheus/prometheus.yml\"] = generatePrometheusConfig(resolved);\n\t}\n\n\t// Grafana config\n\tconst hasGrafana = resolved.services.some((s) => s.definition.id === \"grafana\");\n\tif (hasGrafana) {\n\t\tconst grafanaFiles = generateGrafanaConfig();\n\t\tfor (const [path, content] of Object.entries(grafanaFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t\t// Grafana dashboard\n\t\tfiles[\"config/grafana/dashboards/openclaw-stack-overview.json\"] = generateGrafanaDashboard();\n\t}\n\n\t// Docker Compose override (empty template)\n\tfiles[\"docker-compose.override.yml\"] = [\n\t\t\"# Local overrides for docker-compose.yml\",\n\t\t\"# This file is gitignored — use it for personal port changes, extra volumes, etc.\",\n\t\t\"services: {}\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\t// SERVICES.md documentation\n\tfiles[\"docs/SERVICES.md\"] = generateServicesDoc(resolved);\n\n\t// Bare-metal: native install scripts + top-level installer\n\tif (isBareMetal) {\n\t\tif (nativeServices.length > 0) {\n\t\t\tconst nativePlatform = platformToNativePlatform(input.platform);\n\t\t\tconst nativeScripts = generateNativeInstallScripts({\n\t\t\t\tnativeServices,\n\t\t\t\tplatform: nativePlatform,\n\t\t\t\tprojectName: input.projectName,\n\t\t\t});\n\t\t\tfor (const [path, content] of Object.entries(nativeScripts)) {\n\t\t\t\tfiles[path] = content;\n\t\t\t}\n\t\t}\n\t\tconst bareMetalFiles = generateBareMetalInstall({\n\t\t\tplatform: input.platform,\n\t\t\tprojectName: input.projectName,\n\t\t\thasNativeServices: nativeServices.length > 0,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(bareMetalFiles)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Get-Shit-Done setup scripts\n\tif (input.gsdRuntimes && input.gsdRuntimes.length > 0) {\n\t\tconst gsdScripts = generateGsdScripts(input.gsdRuntimes);\n\t\tif (gsdScripts) {\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.sh\"] = gsdScripts.sh;\n\t\t\tfiles[\"openclaw/scripts/setup-gsd.ps1\"] = gsdScripts.ps1;\n\t\t}\n\t}\n\n\t// OpenClaw direct install scripts (host-based, no Docker gateway)\n\tif (input.openclawInstallMethod === \"direct\") {\n\t\tconst installScripts = generateOpenclawInstallScript({\n\t\t\tprojectName: input.projectName,\n\t\t});\n\t\tfor (const [path, content] of Object.entries(installScripts)) {\n\t\t\tfiles[path] = content;\n\t\t}\n\t}\n\n\t// Cloud-init deploy target\n\tif (input.deployTarget === \"cloud-init\") {\n\t\tconst mainCompose = composeResult.files[\"docker-compose.yml\"] ?? \"\";\n\t\tfiles[\"cloud-init.yml\"] = generateCloudInit({\n\t\t\tcomposeYaml: mainCompose,\n\t\t\tenvContent: envFiles.env,\n\t\t\tprojectName: input.projectName,\n\t\t\tgatewayPort: 18789,\n\t\t});\n\t}\n\n\t// 5. Calculate metadata\n\tconst skillCount = resolved.services.reduce((sum, s) => sum + s.definition.skills.length, 0);\n\n\treturn {\n\t\tfiles,\n\t\tmetadata: {\n\t\t\tserviceCount: resolved.services.length,\n\t\t\tskillCount,\n\t\t\testimatedMemoryMB: resolved.estimatedMemoryMB,\n\t\t\tresolvedServices: resolved.services.map((s) => s.definition.id),\n\t\t\tgeneratedAt: new Date().toISOString(),\n\t\t},\n\t};\n}\n\nexport function generateServicesDoc(resolved: import(\"./types.js\").ResolverOutput): string {\n\tconst lines: string[] = [\n\t\t\"# Service Reference\",\n\t\t\"\",\n\t\t\"This document describes all companion services in your OpenClaw stack.\",\n\t\t\"\",\n\t];\n\n\tfor (const svc of resolved.services) {\n\t\tconst def = svc.definition;\n\t\tlines.push(`## ${def.icon} ${def.name}`);\n\t\tlines.push(\"\");\n\t\tlines.push(def.description);\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Image**: \\`${def.image}:${def.imageTag}\\``);\n\t\tlines.push(`- **Category**: ${def.category}`);\n\t\tlines.push(`- **Maturity**: ${def.maturity}`);\n\t\tif (def.minMemoryMB) {\n\t\t\tlines.push(`- **Min Memory**: ${def.minMemoryMB}MB`);\n\t\t}\n\t\tif (def.ports.length > 0) {\n\t\t\tlines.push(\"- **Ports**:\");\n\t\t\tfor (const p of def.ports) {\n\t\t\t\tlines.push(\n\t\t\t\t\t` - \\`${p.container}\\` — ${p.description}${p.exposed ? \"\" : \" (internal only)\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tlines.push(`- **Docs**: ${def.docsUrl}`);\n\t\tlines.push(\"\");\n\t}\n\n\treturn lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,mBAAmB,UAAmD;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B,IAAI,WAAW;AAC7C,MAAI,IAAI,YACP,OAAM,KAAK,qBAAqB,IAAI,YAAY,IAAI;AAErD,MAAI,IAAI,MAAM,SAAS,GAAG;AACzB,SAAM,KAAK,eAAe;AAC1B,QAAK,MAAM,KAAK,IAAI,MACnB,OAAM,KACL,SAAS,EAAE,UAAU,OAAO,EAAE,cAAc,EAAE,UAAU,KAAK,qBAC7D;;AAGH,QAAM,KAAK,eAAe,IAAI,UAAU;AACxC,QAAM,KAAK,GAAG;;AAGf,QAAO,MAAM,KAAK,KAAK"}
|
package/dist/generators/env.cjs
CHANGED
|
@@ -104,12 +104,84 @@ function generateEnvFiles(resolved, options) {
|
|
|
104
104
|
exampleValue: "",
|
|
105
105
|
actualValue: ""
|
|
106
106
|
});
|
|
107
|
+
lines.push({
|
|
108
|
+
comment: formatComment("Alternative auth: gateway password (use token OR password, not both)", "OpenClaw Core", false, true),
|
|
109
|
+
key: "OPENCLAW_GATEWAY_PASSWORD",
|
|
110
|
+
exampleValue: "",
|
|
111
|
+
actualValue: ""
|
|
112
|
+
});
|
|
113
|
+
lines.push({
|
|
114
|
+
comment: formatComment("Override state directory path (default: ~/.openclaw)", "OpenClaw Core", false, false),
|
|
115
|
+
key: "OPENCLAW_STATE_DIR",
|
|
116
|
+
exampleValue: "",
|
|
117
|
+
actualValue: ""
|
|
118
|
+
});
|
|
119
|
+
lines.push({
|
|
120
|
+
comment: formatComment("Override config file path (default: ~/.openclaw/openclaw.json)", "OpenClaw Core", false, false),
|
|
121
|
+
key: "OPENCLAW_CONFIG_PATH",
|
|
122
|
+
exampleValue: "",
|
|
123
|
+
actualValue: ""
|
|
124
|
+
});
|
|
125
|
+
lines.push({
|
|
126
|
+
comment: formatComment("Import missing keys from login shell profile (set to 1 to enable)", "OpenClaw Core", false, false),
|
|
127
|
+
key: "OPENCLAW_LOAD_SHELL_ENV",
|
|
128
|
+
exampleValue: "",
|
|
129
|
+
actualValue: ""
|
|
130
|
+
});
|
|
107
131
|
if (options.domain) lines.push({
|
|
108
132
|
comment: formatComment("Primary domain for service routing", "OpenClaw Core", false, false),
|
|
109
133
|
key: "OPENCLAW_DOMAIN",
|
|
110
134
|
exampleValue: "example.com",
|
|
111
135
|
actualValue: options.domain
|
|
112
136
|
});
|
|
137
|
+
lines.push({
|
|
138
|
+
comment: "\n# ═══════════════════════════════════════════════════════════════════════════════\n# Tools API Keys (web search, fetch, voice)\n# ═══════════════════════════════════════════════════════════════════════════════",
|
|
139
|
+
key: "",
|
|
140
|
+
exampleValue: "",
|
|
141
|
+
actualValue: ""
|
|
142
|
+
});
|
|
143
|
+
lines.push({
|
|
144
|
+
comment: formatComment("Brave Search API key for web search tool (default provider)", "OpenClaw Tools", false, true),
|
|
145
|
+
key: "BRAVE_API_KEY",
|
|
146
|
+
exampleValue: "your_brave_api_key_here",
|
|
147
|
+
actualValue: ""
|
|
148
|
+
});
|
|
149
|
+
lines.push({
|
|
150
|
+
comment: formatComment("Perplexity API key for web search tool (alternative provider)", "OpenClaw Tools", false, true),
|
|
151
|
+
key: "PERPLEXITY_API_KEY",
|
|
152
|
+
exampleValue: "",
|
|
153
|
+
actualValue: ""
|
|
154
|
+
});
|
|
155
|
+
lines.push({
|
|
156
|
+
comment: formatComment("Firecrawl API key for enhanced web fetch fallback", "OpenClaw Tools", false, true),
|
|
157
|
+
key: "FIRECRAWL_API_KEY",
|
|
158
|
+
exampleValue: "",
|
|
159
|
+
actualValue: ""
|
|
160
|
+
});
|
|
161
|
+
lines.push({
|
|
162
|
+
comment: formatComment("ElevenLabs API key for Talk mode (text-to-speech)", "OpenClaw Tools", false, true),
|
|
163
|
+
key: "ELEVENLABS_API_KEY",
|
|
164
|
+
exampleValue: "",
|
|
165
|
+
actualValue: ""
|
|
166
|
+
});
|
|
167
|
+
lines.push({
|
|
168
|
+
comment: "\n# ═══════════════════════════════════════════════════════════════════════════════\n# Swarm / Remote Gateway Connection\n# ═══════════════════════════════════════════════════════════════════════════════",
|
|
169
|
+
key: "",
|
|
170
|
+
exampleValue: "",
|
|
171
|
+
actualValue: ""
|
|
172
|
+
});
|
|
173
|
+
lines.push({
|
|
174
|
+
comment: formatComment("Auth token for connecting to a remote OpenClaw gateway (swarm upstream)", "OpenClaw Swarm", false, true),
|
|
175
|
+
key: "OPENCLAW_REMOTE_GATEWAY_TOKEN",
|
|
176
|
+
exampleValue: "",
|
|
177
|
+
actualValue: ""
|
|
178
|
+
});
|
|
179
|
+
lines.push({
|
|
180
|
+
comment: formatComment("Password for remote gateway auth (alternative to token)", "OpenClaw Swarm", false, true),
|
|
181
|
+
key: "OPENCLAW_REMOTE_GATEWAY_PASSWORD",
|
|
182
|
+
exampleValue: "",
|
|
183
|
+
actualValue: ""
|
|
184
|
+
});
|
|
113
185
|
if (resolved.aiProviders && resolved.aiProviders.length > 0) {
|
|
114
186
|
lines.push({
|
|
115
187
|
comment: "\n# ═══════════════════════════════════════════════════════════════════════════════\n# AI Provider API Keys\n# ═══════════════════════════════════════════════════════════════════════════════",
|
|
@@ -186,7 +258,17 @@ function generateEnvFiles(resolved, options) {
|
|
|
186
258
|
"OPENCLAW_EXTRA_MOUNTS",
|
|
187
259
|
"OPENCLAW_HOME_VOLUME",
|
|
188
260
|
"OPENCLAW_DOCKER_APT_PACKAGES",
|
|
261
|
+
"OPENCLAW_GATEWAY_PASSWORD",
|
|
262
|
+
"OPENCLAW_STATE_DIR",
|
|
263
|
+
"OPENCLAW_CONFIG_PATH",
|
|
264
|
+
"OPENCLAW_LOAD_SHELL_ENV",
|
|
189
265
|
"OPENCLAW_DOMAIN",
|
|
266
|
+
"BRAVE_API_KEY",
|
|
267
|
+
"PERPLEXITY_API_KEY",
|
|
268
|
+
"FIRECRAWL_API_KEY",
|
|
269
|
+
"ELEVENLABS_API_KEY",
|
|
270
|
+
"OPENCLAW_REMOTE_GATEWAY_TOKEN",
|
|
271
|
+
"OPENCLAW_REMOTE_GATEWAY_PASSWORD",
|
|
190
272
|
"CLAUDE_AI_SESSION_KEY",
|
|
191
273
|
"CLAUDE_WEB_SESSION_KEY",
|
|
192
274
|
"CLAUDE_WEB_COOKIE",
|
|
@@ -230,6 +312,7 @@ function generateEnvFiles(resolved, options) {
|
|
|
230
312
|
"# ═══════════════════════════════════════════════════════════════════════════════",
|
|
231
313
|
"# OpenClaw Environment Configuration",
|
|
232
314
|
`# Generated at ${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
315
|
+
"# Docs: https://better-openclaw.dev/docs | Cloud: https://clawexa.net",
|
|
233
316
|
"# ═══════════════════════════════════════════════════════════════════════════════",
|
|
234
317
|
""
|
|
235
318
|
].join("\n");
|
|
@@ -284,6 +367,69 @@ function getStructuredEnvVars(resolved) {
|
|
|
284
367
|
secret: false,
|
|
285
368
|
required: true,
|
|
286
369
|
defaultValue: "18789"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
key: "OPENCLAW_GATEWAY_PASSWORD",
|
|
373
|
+
description: "Alternative auth: gateway password (use token OR password)",
|
|
374
|
+
secret: true,
|
|
375
|
+
required: false,
|
|
376
|
+
defaultValue: ""
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
key: "OPENCLAW_STATE_DIR",
|
|
380
|
+
description: "Override state directory path (default: ~/.openclaw)",
|
|
381
|
+
secret: false,
|
|
382
|
+
required: false,
|
|
383
|
+
defaultValue: ""
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
key: "OPENCLAW_CONFIG_PATH",
|
|
387
|
+
description: "Override config file path (default: ~/.openclaw/openclaw.json)",
|
|
388
|
+
secret: false,
|
|
389
|
+
required: false,
|
|
390
|
+
defaultValue: ""
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
key: "BRAVE_API_KEY",
|
|
394
|
+
description: "Brave Search API key for web search tool (default provider)",
|
|
395
|
+
secret: true,
|
|
396
|
+
required: false,
|
|
397
|
+
defaultValue: ""
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
key: "PERPLEXITY_API_KEY",
|
|
401
|
+
description: "Perplexity API key for web search (alternative provider)",
|
|
402
|
+
secret: true,
|
|
403
|
+
required: false,
|
|
404
|
+
defaultValue: ""
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
key: "FIRECRAWL_API_KEY",
|
|
408
|
+
description: "Firecrawl API key for enhanced web fetch fallback",
|
|
409
|
+
secret: true,
|
|
410
|
+
required: false,
|
|
411
|
+
defaultValue: ""
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
key: "ELEVENLABS_API_KEY",
|
|
415
|
+
description: "ElevenLabs API key for Talk mode (text-to-speech)",
|
|
416
|
+
secret: true,
|
|
417
|
+
required: false,
|
|
418
|
+
defaultValue: ""
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
key: "OPENCLAW_REMOTE_GATEWAY_TOKEN",
|
|
422
|
+
description: "Auth token for connecting to a remote OpenClaw gateway (swarm upstream)",
|
|
423
|
+
secret: true,
|
|
424
|
+
required: false,
|
|
425
|
+
defaultValue: ""
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
key: "OPENCLAW_REMOTE_GATEWAY_PASSWORD",
|
|
429
|
+
description: "Password for remote gateway auth (alternative to token)",
|
|
430
|
+
secret: true,
|
|
431
|
+
required: false,
|
|
432
|
+
defaultValue: ""
|
|
287
433
|
}
|
|
288
434
|
];
|
|
289
435
|
for (const v of coreVars) seenKeys.add(v.key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.cjs","names":["getDbRequirements"],"sources":["../../src/generators/env.ts"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport type { ResolverOutput } from \"../types.js\";\nimport { getDbRequirements } from \"./postgres-init.js\";\n\n/**\n * Options for environment file generation.\n */\nexport interface EnvGeneratorOptions {\n\tgenerateSecrets: boolean;\n\tdomain?: string;\n\topenclawVersion?: string;\n\t/** When set, host-like vars (e.g. REDIS_HOST) for these services use host.docker.internal so gateway in Docker can reach native services on host. */\n\tnativeServiceIds?: Set<string>;\n\t/** Compose file names for COMPOSE_FILE env var (enables `docker compose up` without -f flags). */\n\tcomposeFiles?: string[];\n\t/** Compose profiles for COMPOSE_PROFILES env var (enables `docker compose up` without --profile flags). */\n\tcomposeProfiles?: string[];\n\t/** OpenClaw image variant (official, coolify, alpine). */\n\topenclawImage?: \"official\" | \"coolify\" | \"alpine\";\n}\n\n/**\n * Generates `.env.example` and `.env` file contents from resolved services.\n *\n * - `.env.example`: every env var with descriptive comments, placeholders for secrets\n * - `.env`: same vars but secrets filled with cryptographically random values when generateSecrets is true\n */\nexport function generateEnvFiles(\n\tresolved: ResolverOutput,\n\toptions: EnvGeneratorOptions,\n): { envExample: string; env: string } {\n\tconst version = options.openclawVersion ?? \"latest\";\n\tconst lines: { comment: string; key: string; exampleValue: string; actualValue: string }[] = [];\n\n\t// Track all env var values for resolving references later\n\tconst envVarValues = new Map<string, string>();\n\n\t// ── Docker Compose convenience vars ─────────────────────────────────────\n\t// These let you run `docker compose up -d` without -f and --profile flags.\n\n\tif (options.composeFiles && options.composeFiles.length > 0) {\n\t\tconst separator = process.platform === \"win32\" ? \";\" : \":\";\n\t\tconst composeFileValue = options.composeFiles.join(separator);\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Compose files to load (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_FILE\",\n\t\t\texampleValue: composeFileValue,\n\t\t\tactualValue: composeFileValue,\n\t\t});\n\t}\n\n\tif (options.composeProfiles && options.composeProfiles.length > 0) {\n\t\tconst profilesValue = options.composeProfiles.join(\",\");\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Profiles to activate (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_PROFILES\",\n\t\t\texampleValue: profilesValue,\n\t\t\tactualValue: profilesValue,\n\t\t});\n\t}\n\n\t// ── Base OpenClaw Variables ──────────────────────────────────────────────\n\n\tlines.push({\n\t\tcomment: formatComment(\"OpenClaw version to deploy\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_VERSION\",\n\t\texampleValue: version,\n\t\tactualValue: version,\n\t});\n\n\tconst gatewayToken = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Authentication token for the OpenClaw gateway API\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\texampleValue: \"your_gateway_token_here\",\n\t\tactualValue: gatewayToken,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\"Port the OpenClaw gateway listens on\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\texampleValue: \"18789\",\n\t\tactualValue: \"18789\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Port for the OpenClaw ACP bridge (WebSocket)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_BRIDGE_PORT\",\n\t\texampleValue: \"18790\",\n\t\tactualValue: \"18790\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Gateway network bind mode: 'lan' (all interfaces, required for Docker). Use 'loopback' only for native (non-Docker) installs with Tailscale serve/funnel\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_BIND\",\n\t\texampleValue: \"lan\",\n\t\tactualValue: \"lan\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw configuration directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_CONFIG_DIR\",\n\t\texampleValue: \"./openclaw/config\",\n\t\tactualValue: \"./openclaw/config\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw workspace directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_WORKSPACE_DIR\",\n\t\texampleValue: \"./openclaw/workspace\",\n\t\tactualValue: \"./openclaw/workspace\",\n\t});\n\n\t// Set OPENCLAW_IMAGE based on variant (empty = use compose default)\n\tconst imageVariantMap: Record<string, string> = {\n\t\tofficial: \"\", // use compose default (ghcr.io/openclaw/openclaw:VERSION)\n\t\tcoolify: \"coollabsio/openclaw:latest\",\n\t\talpine: \"alpine/openclaw:latest\",\n\t};\n\tconst imageValue = imageVariantMap[options.openclawImage ?? \"official\"] ?? \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t`OpenClaw Docker image variant: ${options.openclawImage ?? \"official\"} (official, coolify, alpine)`,\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_IMAGE\",\n\t\texampleValue: \"\",\n\t\tactualValue: imageValue,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra bind mounts for gateway and CLI containers (comma-separated, format: source:target[:options])\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_EXTRA_MOUNTS\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Named volume or host path for /home/node persistence across container restarts\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_HOME_VOLUME\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra apt packages to install during Docker image build (space-separated)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tif (options.domain) {\n\t\tlines.push({\n\t\t\tcomment: formatComment(\"Primary domain for service routing\", \"OpenClaw Core\", false, false),\n\t\t\tkey: \"OPENCLAW_DOMAIN\",\n\t\t\texampleValue: \"example.com\",\n\t\t\tactualValue: options.domain,\n\t\t});\n\t}\n\n\t// ── AI Provider API Keys ─────────────────────────────────────────────────\n\n\tif (resolved.aiProviders && resolved.aiProviders.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# AI Provider API Keys\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const provider of resolved.aiProviders) {\n\t\t\t// Local-only providers don't need API keys\n\t\t\tif (provider === \"ollama\" || provider === \"lmstudio\" || provider === \"vllm\") continue;\n\n\t\t\t// Ollama Cloud uses OLLAMA_API_KEY (matches Ollama's official env var name)\n\t\t\tconst envKey =\n\t\t\t\tprovider === \"ollama-cloud\" ? \"OLLAMA_API_KEY\" : `${provider.toUpperCase()}_API_KEY`;\n\t\t\tconst label = provider === \"ollama-cloud\" ? \"Ollama Cloud\" : provider;\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(`API Key for ${label} AI models`, \"OpenClaw Core\", true, true),\n\t\t\t\tkey: envKey,\n\t\t\t\texampleValue: `your_${provider.toLowerCase().replace(\"-\", \"_\")}_api_key_here`,\n\t\t\t\tactualValue: \"\",\n\t\t\t});\n\t\t}\n\t}\n\n\t// Claude web-provider session variables (optional)\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Claude Web Provider (optional)\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude AI session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_AI_SESSION_KEY\",\n\t\texampleValue: \"your_claude_ai_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_SESSION_KEY\",\n\t\texampleValue: \"your_claude_web_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web cookie for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_COOKIE\",\n\t\texampleValue: \"your_claude_web_cookie_here\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── Per-Service Database Passwords ──────────────────────────────────────\n\n\tconst dbReqs = getDbRequirements(resolved);\n\n\tif (dbReqs.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Per-Service Database Passwords\\n# Each service gets its own PostgreSQL database and credentials\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const req of dbReqs) {\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(req.passwordEnvVar, secretValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(\n\t\t\t\t\t`PostgreSQL password for ${req.serviceName} (database: ${req.dbName}, user: ${req.dbUser})`,\n\t\t\t\t\treq.serviceName,\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tkey: req.passwordEnvVar,\n\t\t\t\texampleValue: `your_${req.passwordEnvVar.toLowerCase()}_here`,\n\t\t\t\tactualValue: secretValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Service-Specific Variables ───────────────────────────────────────────\n\n\tconst dbPasswordKeys = dbReqs.map((r) => r.passwordEnvVar);\n\tconst aiProviderKeys = (resolved.aiProviders || []).map((p) => `${p.toUpperCase()}_API_KEY`);\n\tconst seenKeys = new Set<string>([\n\t\t\"OPENCLAW_VERSION\",\n\t\t\"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\"OPENCLAW_GATEWAY_PORT\",\n\t\t\"OPENCLAW_BRIDGE_PORT\",\n\t\t\"OPENCLAW_GATEWAY_BIND\",\n\t\t\"OPENCLAW_CONFIG_DIR\",\n\t\t\"OPENCLAW_WORKSPACE_DIR\",\n\t\t\"OPENCLAW_IMAGE\",\n\t\t\"OPENCLAW_EXTRA_MOUNTS\",\n\t\t\"OPENCLAW_HOME_VOLUME\",\n\t\t\"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\t\"OPENCLAW_DOMAIN\",\n\t\t\"CLAUDE_AI_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_COOKIE\",\n\t\t...dbPasswordKeys,\n\t\t...aiProviderKeys,\n\t]);\n\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tif (allEnvVars.length === 0) continue;\n\n\t\t// Section separator for this service\n\t\tlines.push({\n\t\t\tcomment: `\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# ${definition.icon} ${definition.name}\\n# ═══════════════════════════════════════════════════════════════════════════════`,\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tconst isNative = options.nativeServiceIds?.has(definition.id);\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// For native services, host-like vars must point to host so gateway (in Docker) can reach them\n\t\t\tconst isHostVar = envVar.key.endsWith(\"_HOST\");\n\t\t\tconst hostValue = isNative && isHostVar ? \"host.docker.internal\" : null;\n\n\t\t\tconst exampleValue = hostValue\n\t\t\t\t? hostValue\n\t\t\t\t: envVar.secret\n\t\t\t\t\t? `your_${envVar.key.toLowerCase()}_here`\n\t\t\t\t\t: envVar.defaultValue;\n\n\t\t\tlet actualValue: string;\n\t\t\tif (hostValue) {\n\t\t\t\tactualValue = hostValue;\n\t\t\t} else if (envVar.secret) {\n\t\t\t\t// Resolve env var references like ${N8N_DB_PASSWORD}\n\t\t\t\tif (envVar.defaultValue.startsWith(\"${\") && envVar.defaultValue.endsWith(\"}\")) {\n\t\t\t\t\tconst refKey = envVar.defaultValue.slice(2, -1); // Extract var name from ${VAR_NAME}\n\t\t\t\t\tactualValue = envVarValues.get(refKey) || envVar.defaultValue;\n\t\t\t\t} else {\n\t\t\t\t\tactualValue = secretValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tactualValue = envVar.defaultValue;\n\t\t\t}\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(envVar.key, actualValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(envVar.description, definition.name, envVar.required, envVar.secret),\n\t\t\t\tkey: envVar.key,\n\t\t\t\texampleValue,\n\t\t\t\tactualValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Build output strings ────────────────────────────────────────────────\n\n\tconst header = [\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"# OpenClaw Environment Configuration\",\n\t\t`# Generated at ${new Date().toISOString()}`,\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\tlet envExample = header;\n\tlet env = header;\n\n\tfor (const line of lines) {\n\t\tif (line.key === \"\") {\n\t\t\t// Section comment\n\t\t\tenvExample += `${line.comment}\\n`;\n\t\t\tenv += `${line.comment}\\n`;\n\t\t} else {\n\t\t\tenvExample += `${line.comment}\\n${line.key}=${line.exampleValue}\\n\\n`;\n\t\t\tenv += `${line.comment}\\n${line.key}=${line.actualValue}\\n\\n`;\n\t\t}\n\t}\n\n\treturn { envExample, env };\n}\n\n/**\n * Format a descriptive comment block for an environment variable.\n */\nfunction formatComment(\n\tdescription: string,\n\tserviceName: string,\n\trequired: boolean,\n\tsecret: boolean,\n): string {\n\treturn [\n\t\t`# ${description}`,\n\t\t`# Service: ${serviceName} | Required: ${required ? \"Yes\" : \"No\"} | Secret: ${secret ? \"Yes\" : \"No\"}`,\n\t].join(\"\\n\");\n}\n\n// ── Structured Env Vars ─────────────────────────────────────────────────────\n\nexport interface EnvVarGroup {\n\tserviceName: string;\n\tserviceIcon: string;\n\tserviceId: string;\n\tvars: {\n\t\tkey: string;\n\t\tdescription: string;\n\t\tsecret: boolean;\n\t\trequired: boolean;\n\t\tdefaultValue: string;\n\t}[];\n}\n\n/**\n * Returns environment variables grouped by service, suitable for UI rendering.\n *\n * - First group is always \"OpenClaw Core\" with base variables.\n * - Subsequent groups correspond to each resolved service.\n * - Variables are deduplicated across groups (first occurrence wins).\n */\nexport function getStructuredEnvVars(resolved: ResolverOutput): EnvVarGroup[] {\n\tconst groups: EnvVarGroup[] = [];\n\tconst seenKeys = new Set<string>();\n\n\t// ── OpenClaw Core group ──────────────────────────────────────────────────\n\tconst coreVars: EnvVarGroup[\"vars\"] = [\n\t\t{\n\t\t\tkey: \"OPENCLAW_VERSION\",\n\t\t\tdescription: \"OpenClaw version to deploy\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"latest\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\tdescription: \"Authentication token for the OpenClaw gateway API\",\n\t\t\tsecret: true,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\t\tdescription: \"Port the OpenClaw gateway listens on\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"18789\",\n\t\t},\n\t];\n\n\tfor (const v of coreVars) {\n\t\tseenKeys.add(v.key);\n\t}\n\n\tgroups.push({\n\t\tserviceName: \"OpenClaw Core\",\n\t\tserviceIcon: \"⚙️\",\n\t\tserviceId: \"openclaw-core\",\n\t\tvars: coreVars,\n\t});\n\n\t// ── Per-service groups ───────────────────────────────────────────────────\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tconst vars: EnvVarGroup[\"vars\"] = [];\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tvars.push({\n\t\t\t\tkey: envVar.key,\n\t\t\t\tdescription: envVar.description,\n\t\t\t\tsecret: envVar.secret,\n\t\t\t\trequired: envVar.required,\n\t\t\t\tdefaultValue: envVar.defaultValue,\n\t\t\t});\n\t\t}\n\n\t\tif (vars.length === 0) continue;\n\n\t\tgroups.push({\n\t\t\tserviceName: definition.name,\n\t\t\tserviceIcon: definition.icon,\n\t\t\tserviceId: definition.id,\n\t\t\tvars,\n\t\t});\n\t}\n\n\treturn groups;\n}\n"],"mappings":";;;;;;;;;;;AA2BA,SA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a,WAAW;GACxB,aAAa,WAAW;GACxB,WAAW,WAAW;GACtB;GACA,CAAC;;AAGH,QAAO"}
|
|
1
|
+
{"version":3,"file":"env.cjs","names":["getDbRequirements"],"sources":["../../src/generators/env.ts"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport type { ResolverOutput } from \"../types.js\";\nimport { getDbRequirements } from \"./postgres-init.js\";\n\n/**\n * Options for environment file generation.\n */\nexport interface EnvGeneratorOptions {\n\tgenerateSecrets: boolean;\n\tdomain?: string;\n\topenclawVersion?: string;\n\t/** When set, host-like vars (e.g. REDIS_HOST) for these services use host.docker.internal so gateway in Docker can reach native services on host. */\n\tnativeServiceIds?: Set<string>;\n\t/** Compose file names for COMPOSE_FILE env var (enables `docker compose up` without -f flags). */\n\tcomposeFiles?: string[];\n\t/** Compose profiles for COMPOSE_PROFILES env var (enables `docker compose up` without --profile flags). */\n\tcomposeProfiles?: string[];\n\t/** OpenClaw image variant (official, coolify, alpine). */\n\topenclawImage?: \"official\" | \"coolify\" | \"alpine\";\n}\n\n/**\n * Generates `.env.example` and `.env` file contents from resolved services.\n *\n * - `.env.example`: every env var with descriptive comments, placeholders for secrets\n * - `.env`: same vars but secrets filled with cryptographically random values when generateSecrets is true\n */\nexport function generateEnvFiles(\n\tresolved: ResolverOutput,\n\toptions: EnvGeneratorOptions,\n): { envExample: string; env: string } {\n\tconst version = options.openclawVersion ?? \"latest\";\n\tconst lines: { comment: string; key: string; exampleValue: string; actualValue: string }[] = [];\n\n\t// Track all env var values for resolving references later\n\tconst envVarValues = new Map<string, string>();\n\n\t// ── Docker Compose convenience vars ─────────────────────────────────────\n\t// These let you run `docker compose up -d` without -f and --profile flags.\n\n\tif (options.composeFiles && options.composeFiles.length > 0) {\n\t\tconst separator = process.platform === \"win32\" ? \";\" : \":\";\n\t\tconst composeFileValue = options.composeFiles.join(separator);\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Compose files to load (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_FILE\",\n\t\t\texampleValue: composeFileValue,\n\t\t\tactualValue: composeFileValue,\n\t\t});\n\t}\n\n\tif (options.composeProfiles && options.composeProfiles.length > 0) {\n\t\tconst profilesValue = options.composeProfiles.join(\",\");\n\t\tlines.push({\n\t\t\tcomment: formatComment(\n\t\t\t\t\"Profiles to activate (allows plain `docker compose up -d`)\",\n\t\t\t\t\"Docker Compose\",\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t),\n\t\t\tkey: \"COMPOSE_PROFILES\",\n\t\t\texampleValue: profilesValue,\n\t\t\tactualValue: profilesValue,\n\t\t});\n\t}\n\n\t// ── Base OpenClaw Variables ──────────────────────────────────────────────\n\n\tlines.push({\n\t\tcomment: formatComment(\"OpenClaw version to deploy\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_VERSION\",\n\t\texampleValue: version,\n\t\tactualValue: version,\n\t});\n\n\tconst gatewayToken = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Authentication token for the OpenClaw gateway API\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\texampleValue: \"your_gateway_token_here\",\n\t\tactualValue: gatewayToken,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\"Port the OpenClaw gateway listens on\", \"OpenClaw Core\", true, false),\n\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\texampleValue: \"18789\",\n\t\tactualValue: \"18789\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Port for the OpenClaw ACP bridge (WebSocket)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_BRIDGE_PORT\",\n\t\texampleValue: \"18790\",\n\t\tactualValue: \"18790\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Gateway network bind mode: 'lan' (all interfaces, required for Docker). Use 'loopback' only for native (non-Docker) installs with Tailscale serve/funnel\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_BIND\",\n\t\texampleValue: \"lan\",\n\t\tactualValue: \"lan\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw configuration directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_CONFIG_DIR\",\n\t\texampleValue: \"./openclaw/config\",\n\t\tactualValue: \"./openclaw/config\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Host path to OpenClaw workspace directory\",\n\t\t\t\"OpenClaw Core\",\n\t\t\ttrue,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_WORKSPACE_DIR\",\n\t\texampleValue: \"./openclaw/workspace\",\n\t\tactualValue: \"./openclaw/workspace\",\n\t});\n\n\t// Set OPENCLAW_IMAGE based on variant (empty = use compose default)\n\tconst imageVariantMap: Record<string, string> = {\n\t\tofficial: \"\", // use compose default (ghcr.io/openclaw/openclaw:VERSION)\n\t\tcoolify: \"coollabsio/openclaw:latest\",\n\t\talpine: \"alpine/openclaw:latest\",\n\t};\n\tconst imageValue = imageVariantMap[options.openclawImage ?? \"official\"] ?? \"\";\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t`OpenClaw Docker image variant: ${options.openclawImage ?? \"official\"} (official, coolify, alpine)`,\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_IMAGE\",\n\t\texampleValue: \"\",\n\t\tactualValue: imageValue,\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra bind mounts for gateway and CLI containers (comma-separated, format: source:target[:options])\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_EXTRA_MOUNTS\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Named volume or host path for /home/node persistence across container restarts\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_HOME_VOLUME\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Extra apt packages to install during Docker image build (space-separated)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Alternative auth: gateway password (use token OR password, not both)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_GATEWAY_PASSWORD\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Override state directory path (default: ~/.openclaw)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_STATE_DIR\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Override config file path (default: ~/.openclaw/openclaw.json)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_CONFIG_PATH\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Import missing keys from login shell profile (set to 1 to enable)\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t),\n\t\tkey: \"OPENCLAW_LOAD_SHELL_ENV\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tif (options.domain) {\n\t\tlines.push({\n\t\t\tcomment: formatComment(\"Primary domain for service routing\", \"OpenClaw Core\", false, false),\n\t\t\tkey: \"OPENCLAW_DOMAIN\",\n\t\t\texampleValue: \"example.com\",\n\t\t\tactualValue: options.domain,\n\t\t});\n\t}\n\n\t// ── Tools API Keys (web search, fetch) ──────────────────────────────────\n\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Tools API Keys (web search, fetch, voice)\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Brave Search API key for web search tool (default provider)\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"BRAVE_API_KEY\",\n\t\texampleValue: \"your_brave_api_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Perplexity API key for web search tool (alternative provider)\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"PERPLEXITY_API_KEY\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Firecrawl API key for enhanced web fetch fallback\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"FIRECRAWL_API_KEY\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"ElevenLabs API key for Talk mode (text-to-speech)\",\n\t\t\t\"OpenClaw Tools\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"ELEVENLABS_API_KEY\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── Swarm / Remote Gateway ───────────────────────────────────────────────\n\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Swarm / Remote Gateway Connection\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Auth token for connecting to a remote OpenClaw gateway (swarm upstream)\",\n\t\t\t\"OpenClaw Swarm\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_TOKEN\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Password for remote gateway auth (alternative to token)\",\n\t\t\t\"OpenClaw Swarm\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_PASSWORD\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── AI Provider API Keys ─────────────────────────────────────────────────\n\n\tif (resolved.aiProviders && resolved.aiProviders.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# AI Provider API Keys\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const provider of resolved.aiProviders) {\n\t\t\t// Local-only providers don't need API keys\n\t\t\tif (provider === \"ollama\" || provider === \"lmstudio\" || provider === \"vllm\") continue;\n\n\t\t\t// Ollama Cloud uses OLLAMA_API_KEY (matches Ollama's official env var name)\n\t\t\tconst envKey =\n\t\t\t\tprovider === \"ollama-cloud\" ? \"OLLAMA_API_KEY\" : `${provider.toUpperCase()}_API_KEY`;\n\t\t\tconst label = provider === \"ollama-cloud\" ? \"Ollama Cloud\" : provider;\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(`API Key for ${label} AI models`, \"OpenClaw Core\", true, true),\n\t\t\t\tkey: envKey,\n\t\t\t\texampleValue: `your_${provider.toLowerCase().replace(\"-\", \"_\")}_api_key_here`,\n\t\t\t\tactualValue: \"\",\n\t\t\t});\n\t\t}\n\t}\n\n\t// Claude web-provider session variables (optional)\n\tlines.push({\n\t\tcomment:\n\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Claude Web Provider (optional)\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\tkey: \"\",\n\t\texampleValue: \"\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude AI session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_AI_SESSION_KEY\",\n\t\texampleValue: \"your_claude_ai_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web session key for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_SESSION_KEY\",\n\t\texampleValue: \"your_claude_web_session_key_here\",\n\t\tactualValue: \"\",\n\t});\n\n\tlines.push({\n\t\tcomment: formatComment(\n\t\t\t\"Claude web cookie for web provider authentication\",\n\t\t\t\"OpenClaw Core\",\n\t\t\tfalse,\n\t\t\ttrue,\n\t\t),\n\t\tkey: \"CLAUDE_WEB_COOKIE\",\n\t\texampleValue: \"your_claude_web_cookie_here\",\n\t\tactualValue: \"\",\n\t});\n\n\t// ── Per-Service Database Passwords ──────────────────────────────────────\n\n\tconst dbReqs = getDbRequirements(resolved);\n\n\tif (dbReqs.length > 0) {\n\t\tlines.push({\n\t\t\tcomment:\n\t\t\t\t\"\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# Per-Service Database Passwords\\n# Each service gets its own PostgreSQL database and credentials\\n# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tfor (const req of dbReqs) {\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(req.passwordEnvVar, secretValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(\n\t\t\t\t\t`PostgreSQL password for ${req.serviceName} (database: ${req.dbName}, user: ${req.dbUser})`,\n\t\t\t\t\treq.serviceName,\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue,\n\t\t\t\t),\n\t\t\t\tkey: req.passwordEnvVar,\n\t\t\t\texampleValue: `your_${req.passwordEnvVar.toLowerCase()}_here`,\n\t\t\t\tactualValue: secretValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Service-Specific Variables ───────────────────────────────────────────\n\n\tconst dbPasswordKeys = dbReqs.map((r) => r.passwordEnvVar);\n\tconst aiProviderKeys = (resolved.aiProviders || []).map((p) => `${p.toUpperCase()}_API_KEY`);\n\tconst seenKeys = new Set<string>([\n\t\t\"OPENCLAW_VERSION\",\n\t\t\"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\"OPENCLAW_GATEWAY_PORT\",\n\t\t\"OPENCLAW_BRIDGE_PORT\",\n\t\t\"OPENCLAW_GATEWAY_BIND\",\n\t\t\"OPENCLAW_CONFIG_DIR\",\n\t\t\"OPENCLAW_WORKSPACE_DIR\",\n\t\t\"OPENCLAW_IMAGE\",\n\t\t\"OPENCLAW_EXTRA_MOUNTS\",\n\t\t\"OPENCLAW_HOME_VOLUME\",\n\t\t\"OPENCLAW_DOCKER_APT_PACKAGES\",\n\t\t\"OPENCLAW_GATEWAY_PASSWORD\",\n\t\t\"OPENCLAW_STATE_DIR\",\n\t\t\"OPENCLAW_CONFIG_PATH\",\n\t\t\"OPENCLAW_LOAD_SHELL_ENV\",\n\t\t\"OPENCLAW_DOMAIN\",\n\t\t\"BRAVE_API_KEY\",\n\t\t\"PERPLEXITY_API_KEY\",\n\t\t\"FIRECRAWL_API_KEY\",\n\t\t\"ELEVENLABS_API_KEY\",\n\t\t\"OPENCLAW_REMOTE_GATEWAY_TOKEN\",\n\t\t\"OPENCLAW_REMOTE_GATEWAY_PASSWORD\",\n\t\t\"CLAUDE_AI_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_SESSION_KEY\",\n\t\t\"CLAUDE_WEB_COOKIE\",\n\t\t...dbPasswordKeys,\n\t\t...aiProviderKeys,\n\t]);\n\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tif (allEnvVars.length === 0) continue;\n\n\t\t// Section separator for this service\n\t\tlines.push({\n\t\t\tcomment: `\\n# ═══════════════════════════════════════════════════════════════════════════════\\n# ${definition.icon} ${definition.name}\\n# ═══════════════════════════════════════════════════════════════════════════════`,\n\t\t\tkey: \"\",\n\t\t\texampleValue: \"\",\n\t\t\tactualValue: \"\",\n\t\t});\n\n\t\tconst isNative = options.nativeServiceIds?.has(definition.id);\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tconst secretValue = options.generateSecrets ? randomBytes(24).toString(\"hex\") : \"\";\n\n\t\t\t// For native services, host-like vars must point to host so gateway (in Docker) can reach them\n\t\t\tconst isHostVar = envVar.key.endsWith(\"_HOST\");\n\t\t\tconst hostValue = isNative && isHostVar ? \"host.docker.internal\" : null;\n\n\t\t\tconst exampleValue = hostValue\n\t\t\t\t? hostValue\n\t\t\t\t: envVar.secret\n\t\t\t\t\t? `your_${envVar.key.toLowerCase()}_here`\n\t\t\t\t\t: envVar.defaultValue;\n\n\t\t\tlet actualValue: string;\n\t\t\tif (hostValue) {\n\t\t\t\tactualValue = hostValue;\n\t\t\t} else if (envVar.secret) {\n\t\t\t\t// Resolve env var references like ${N8N_DB_PASSWORD}\n\t\t\t\tif (envVar.defaultValue.startsWith(\"${\") && envVar.defaultValue.endsWith(\"}\")) {\n\t\t\t\t\tconst refKey = envVar.defaultValue.slice(2, -1); // Extract var name from ${VAR_NAME}\n\t\t\t\t\tactualValue = envVarValues.get(refKey) || envVar.defaultValue;\n\t\t\t\t} else {\n\t\t\t\t\tactualValue = secretValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tactualValue = envVar.defaultValue;\n\t\t\t}\n\n\t\t\t// Store in map for later reference resolution\n\t\t\tenvVarValues.set(envVar.key, actualValue);\n\n\t\t\tlines.push({\n\t\t\t\tcomment: formatComment(envVar.description, definition.name, envVar.required, envVar.secret),\n\t\t\t\tkey: envVar.key,\n\t\t\t\texampleValue,\n\t\t\t\tactualValue,\n\t\t\t});\n\t\t}\n\t}\n\n\t// ── Build output strings ────────────────────────────────────────────────\n\n\tconst header = [\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"# OpenClaw Environment Configuration\",\n\t\t`# Generated at ${new Date().toISOString()}`,\n\t\t\"# Docs: https://better-openclaw.dev/docs | Cloud: https://clawexa.net\",\n\t\t\"# ═══════════════════════════════════════════════════════════════════════════════\",\n\t\t\"\",\n\t].join(\"\\n\");\n\n\tlet envExample = header;\n\tlet env = header;\n\n\tfor (const line of lines) {\n\t\tif (line.key === \"\") {\n\t\t\t// Section comment\n\t\t\tenvExample += `${line.comment}\\n`;\n\t\t\tenv += `${line.comment}\\n`;\n\t\t} else {\n\t\t\tenvExample += `${line.comment}\\n${line.key}=${line.exampleValue}\\n\\n`;\n\t\t\tenv += `${line.comment}\\n${line.key}=${line.actualValue}\\n\\n`;\n\t\t}\n\t}\n\n\treturn { envExample, env };\n}\n\n/**\n * Format a descriptive comment block for an environment variable.\n */\nfunction formatComment(\n\tdescription: string,\n\tserviceName: string,\n\trequired: boolean,\n\tsecret: boolean,\n): string {\n\treturn [\n\t\t`# ${description}`,\n\t\t`# Service: ${serviceName} | Required: ${required ? \"Yes\" : \"No\"} | Secret: ${secret ? \"Yes\" : \"No\"}`,\n\t].join(\"\\n\");\n}\n\n// ── Structured Env Vars ─────────────────────────────────────────────────────\n\nexport interface EnvVarGroup {\n\tserviceName: string;\n\tserviceIcon: string;\n\tserviceId: string;\n\tvars: {\n\t\tkey: string;\n\t\tdescription: string;\n\t\tsecret: boolean;\n\t\trequired: boolean;\n\t\tdefaultValue: string;\n\t}[];\n}\n\n/**\n * Returns environment variables grouped by service, suitable for UI rendering.\n *\n * - First group is always \"OpenClaw Core\" with base variables.\n * - Subsequent groups correspond to each resolved service.\n * - Variables are deduplicated across groups (first occurrence wins).\n */\nexport function getStructuredEnvVars(resolved: ResolverOutput): EnvVarGroup[] {\n\tconst groups: EnvVarGroup[] = [];\n\tconst seenKeys = new Set<string>();\n\n\t// ── OpenClaw Core group ──────────────────────────────────────────────────\n\tconst coreVars: EnvVarGroup[\"vars\"] = [\n\t\t{\n\t\t\tkey: \"OPENCLAW_VERSION\",\n\t\t\tdescription: \"OpenClaw version to deploy\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"latest\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_TOKEN\",\n\t\t\tdescription: \"Authentication token for the OpenClaw gateway API\",\n\t\t\tsecret: true,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_PORT\",\n\t\t\tdescription: \"Port the OpenClaw gateway listens on\",\n\t\t\tsecret: false,\n\t\t\trequired: true,\n\t\t\tdefaultValue: \"18789\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_GATEWAY_PASSWORD\",\n\t\t\tdescription: \"Alternative auth: gateway password (use token OR password)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_STATE_DIR\",\n\t\t\tdescription: \"Override state directory path (default: ~/.openclaw)\",\n\t\t\tsecret: false,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_CONFIG_PATH\",\n\t\t\tdescription: \"Override config file path (default: ~/.openclaw/openclaw.json)\",\n\t\t\tsecret: false,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"BRAVE_API_KEY\",\n\t\t\tdescription: \"Brave Search API key for web search tool (default provider)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"PERPLEXITY_API_KEY\",\n\t\t\tdescription: \"Perplexity API key for web search (alternative provider)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"FIRECRAWL_API_KEY\",\n\t\t\tdescription: \"Firecrawl API key for enhanced web fetch fallback\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"ELEVENLABS_API_KEY\",\n\t\t\tdescription: \"ElevenLabs API key for Talk mode (text-to-speech)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_TOKEN\",\n\t\t\tdescription: \"Auth token for connecting to a remote OpenClaw gateway (swarm upstream)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t\t{\n\t\t\tkey: \"OPENCLAW_REMOTE_GATEWAY_PASSWORD\",\n\t\t\tdescription: \"Password for remote gateway auth (alternative to token)\",\n\t\t\tsecret: true,\n\t\t\trequired: false,\n\t\t\tdefaultValue: \"\",\n\t\t},\n\t];\n\n\tfor (const v of coreVars) {\n\t\tseenKeys.add(v.key);\n\t}\n\n\tgroups.push({\n\t\tserviceName: \"OpenClaw Core\",\n\t\tserviceIcon: \"⚙️\",\n\t\tserviceId: \"openclaw-core\",\n\t\tvars: coreVars,\n\t});\n\n\t// ── Per-service groups ───────────────────────────────────────────────────\n\tfor (const { definition } of resolved.services) {\n\t\tconst allEnvVars = [...definition.environment, ...definition.openclawEnvVars];\n\n\t\tconst vars: EnvVarGroup[\"vars\"] = [];\n\n\t\tfor (const envVar of allEnvVars) {\n\t\t\tif (seenKeys.has(envVar.key)) continue;\n\t\t\tseenKeys.add(envVar.key);\n\n\t\t\tvars.push({\n\t\t\t\tkey: envVar.key,\n\t\t\t\tdescription: envVar.description,\n\t\t\t\tsecret: envVar.secret,\n\t\t\t\trequired: envVar.required,\n\t\t\t\tdefaultValue: envVar.defaultValue,\n\t\t\t});\n\t\t}\n\n\t\tif (vars.length === 0) continue;\n\n\t\tgroups.push({\n\t\t\tserviceName: definition.name,\n\t\t\tserviceIcon: definition.icon,\n\t\t\tserviceId: definition.id,\n\t\t\tvars,\n\t\t});\n\t}\n\n\treturn groups;\n}\n"],"mappings":";;;;;;;;;;;AA2BA,SAAgB,iBACf,UACA,SACsC;CACtC,MAAM,UAAU,QAAQ,mBAAmB;CAC3C,MAAM,QAAuF,EAAE;CAG/F,MAAM,+BAAe,IAAI,KAAqB;AAK9C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,MAAK,MAAM,EAAE,gBAAgB,SAAS,UAAU;EAC/C,MAAM,aAAa,CAAC,GAAG,WAAW,aAAa,GAAG,WAAW,gBAAgB;EAE7E,MAAM,OAA4B,EAAE;AAEpC,OAAK,MAAM,UAAU,YAAY;AAChC,OAAI,SAAS,IAAI,OAAO,IAAI,CAAE;AAC9B,YAAS,IAAI,OAAO,IAAI;AAExB,QAAK,KAAK;IACT,KAAK,OAAO;IACZ,aAAa,OAAO;IACpB,QAAQ,OAAO;IACf,UAAU,OAAO;IACjB,cAAc,OAAO;IACrB,CAAC;;AAGH,MAAI,KAAK,WAAW,EAAG;AAEvB,SAAO,KAAK;GACX,aAAa,WAAW;GACxB,aAAa,WAAW;GACxB,WAAW,WAAW;GACtB;GACA,CAAC;;AAGH,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.cts","names":[],"sources":["../../src/generators/env.ts"],"mappings":";;;;;AAOA;UAAiB,mBAAA;EAChB,eAAA;EACA,MAAA;EACA,eAAA;EADA;EAGA,gBAAA,GAAmB,GAAA;EAAnB;EAEA,YAAA;EAAA;EAEA,eAAA;EAEA;EAAA,aAAA;AAAA;AASD;;;;;;AAAA,iBAAgB,gBAAA,CACf,QAAA,EAAU,cAAA,EACV,OAAA,EAAS,mBAAA;EACL,UAAA;EAAoB,GAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"env.d.cts","names":[],"sources":["../../src/generators/env.ts"],"mappings":";;;;;AAOA;UAAiB,mBAAA;EAChB,eAAA;EACA,MAAA;EACA,eAAA;EADA;EAGA,gBAAA,GAAmB,GAAA;EAAnB;EAEA,YAAA;EAAA;EAEA,eAAA;EAEA;EAAA,aAAA;AAAA;AASD;;;;;;AAAA,iBAAgB,gBAAA,CACf,QAAA,EAAU,cAAA,EACV,OAAA,EAAS,mBAAA;EACL,UAAA;EAAoB,GAAA;AAAA;AAAA,UAujBR,WAAA;EAChB,WAAA;EACA,WAAA;EACA,SAAA;EACA,IAAA;IACC,GAAA;IACA,WAAA;IACA,MAAA;IACA,QAAA;IACA,YAAA;EAAA;AAAA;;;;;;AAWF;;iBAAgB,oBAAA,CAAqB,QAAA,EAAU,cAAA,GAAiB,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.mts","names":[],"sources":["../../src/generators/env.ts"],"mappings":";;;;;;UAOiB,mBAAA;EAChB,eAAA;EACA,MAAA;EACA,eAAA;EAFA;EAIA,gBAAA,GAAmB,GAAA;EAFnB;EAIA,YAAA;EAFmB;EAInB,eAAA;EAAA;EAEA,aAAA;AAAA;;AASD;;;;;iBAAgB,gBAAA,CACf,QAAA,EAAU,cAAA,EACV,OAAA,EAAS,mBAAA;EACL,UAAA;EAAoB,GAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"env.d.mts","names":[],"sources":["../../src/generators/env.ts"],"mappings":";;;;;;UAOiB,mBAAA;EAChB,eAAA;EACA,MAAA;EACA,eAAA;EAFA;EAIA,gBAAA,GAAmB,GAAA;EAFnB;EAIA,YAAA;EAFmB;EAInB,eAAA;EAAA;EAEA,aAAA;AAAA;;AASD;;;;;iBAAgB,gBAAA,CACf,QAAA,EAAU,cAAA,EACV,OAAA,EAAS,mBAAA;EACL,UAAA;EAAoB,GAAA;AAAA;AAAA,UAujBR,WAAA;EAChB,WAAA;EACA,WAAA;EACA,SAAA;EACA,IAAA;IACC,GAAA;IACA,WAAA;IACA,MAAA;IACA,QAAA;IACA,YAAA;EAAA;AAAA;;;;;;;AAWF;iBAAgB,oBAAA,CAAqB,QAAA,EAAU,cAAA,GAAiB,WAAA"}
|