@omnitron-dev/omnitron 0.2.0 → 0.3.1
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/README.md +4 -0
- package/dist/BUILD.json +5 -0
- package/dist/cli/omnitron.js +375 -29
- package/dist/cli/omnitron.js.map +1 -1
- package/dist/cluster/cluster.rpc-service.d.ts +40 -0
- package/dist/cluster/cluster.rpc-service.d.ts.map +1 -1
- package/dist/cluster/cluster.rpc-service.js +49 -3
- package/dist/cluster/cluster.rpc-service.js.map +1 -1
- package/dist/cluster/config-sync.d.ts.map +1 -1
- package/dist/cluster/config-sync.js.map +1 -1
- package/dist/cluster/leader-election.d.ts +90 -2
- package/dist/cluster/leader-election.d.ts.map +1 -1
- package/dist/cluster/leader-election.js +176 -22
- package/dist/cluster/leader-election.js.map +1 -1
- package/dist/cluster/mesh-link.d.ts +136 -0
- package/dist/cluster/mesh-link.d.ts.map +1 -0
- package/dist/cluster/mesh-link.js +212 -0
- package/dist/cluster/mesh-link.js.map +1 -0
- package/dist/cluster/mesh.d.ts +59 -0
- package/dist/cluster/mesh.d.ts.map +1 -0
- package/dist/cluster/mesh.js +117 -0
- package/dist/cluster/mesh.js.map +1 -0
- package/dist/cluster/slave-connector.d.ts +193 -9
- package/dist/cluster/slave-connector.d.ts.map +1 -1
- package/dist/cluster/slave-connector.js +409 -37
- package/dist/cluster/slave-connector.js.map +1 -1
- package/dist/commands/audit.d.ts +65 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +233 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/backup.d.ts +4 -0
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +255 -33
- package/dist/commands/backup.js.map +1 -1
- package/dist/commands/cluster.d.ts.map +1 -1
- package/dist/commands/cluster.js +78 -47
- package/dist/commands/cluster.js.map +1 -1
- package/dist/commands/daemon-cmd.d.ts +7 -1
- package/dist/commands/daemon-cmd.d.ts.map +1 -1
- package/dist/commands/daemon-cmd.js +87 -21
- package/dist/commands/daemon-cmd.js.map +1 -1
- package/dist/commands/daemon-required.d.ts +34 -0
- package/dist/commands/daemon-required.d.ts.map +1 -0
- package/dist/commands/daemon-required.js +92 -0
- package/dist/commands/daemon-required.js.map +1 -0
- package/dist/commands/deploy.d.ts +70 -8
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +99 -64
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/discover.d.ts +25 -4
- package/dist/commands/discover.d.ts.map +1 -1
- package/dist/commands/discover.js +155 -102
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/doctor.d.ts +293 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +1706 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/env.d.ts +8 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +13 -8
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +3 -2
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/fleet-asking.d.ts +87 -0
- package/dist/commands/fleet-asking.d.ts.map +1 -0
- package/dist/commands/fleet-asking.js +176 -0
- package/dist/commands/fleet-asking.js.map +1 -0
- package/dist/commands/fleet-recover.d.ts +2 -0
- package/dist/commands/fleet-recover.d.ts.map +1 -0
- package/dist/commands/fleet-recover.js +30 -0
- package/dist/commands/fleet-recover.js.map +1 -0
- package/dist/commands/fleet.d.ts +18 -0
- package/dist/commands/fleet.d.ts.map +1 -1
- package/dist/commands/fleet.js +314 -74
- package/dist/commands/fleet.js.map +1 -1
- package/dist/commands/health-check.d.ts +8 -6
- package/dist/commands/health-check.d.ts.map +1 -1
- package/dist/commands/health-check.js +26 -23
- package/dist/commands/health-check.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +22 -8
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/host-ingress.d.ts +3 -0
- package/dist/commands/host-ingress.d.ts.map +1 -0
- package/dist/commands/host-ingress.js +31 -0
- package/dist/commands/host-ingress.js.map +1 -0
- package/dist/commands/infra.d.ts +42 -1
- package/dist/commands/infra.d.ts.map +1 -1
- package/dist/commands/infra.js +418 -49
- package/dist/commands/infra.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +21 -36
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/inspect-graph.d.ts.map +1 -1
- package/dist/commands/inspect-graph.js +2 -6
- package/dist/commands/inspect-graph.js.map +1 -1
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +110 -14
- package/dist/commands/inspect.js.map +1 -1
- package/dist/commands/k8s.d.ts.map +1 -1
- package/dist/commands/k8s.js +23 -18
- package/dist/commands/k8s.js.map +1 -1
- package/dist/commands/kb.d.ts.map +1 -1
- package/dist/commands/kb.js +88 -29
- package/dist/commands/kb.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +21 -9
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/log-health.d.ts +120 -0
- package/dist/commands/log-health.d.ts.map +1 -0
- package/dist/commands/log-health.js +212 -0
- package/dist/commands/log-health.js.map +1 -0
- package/dist/commands/logs.d.ts +96 -2
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +522 -196
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/metrics.d.ts.map +1 -1
- package/dist/commands/metrics.js +35 -17
- package/dist/commands/metrics.js.map +1 -1
- package/dist/commands/monit.d.ts.map +1 -1
- package/dist/commands/monit.js +3 -2
- package/dist/commands/monit.js.map +1 -1
- package/dist/commands/node.d.ts +56 -0
- package/dist/commands/node.d.ts.map +1 -1
- package/dist/commands/node.js +297 -69
- package/dist/commands/node.js.map +1 -1
- package/dist/commands/output.d.ts +10 -0
- package/dist/commands/output.d.ts.map +1 -1
- package/dist/commands/output.js +41 -1
- package/dist/commands/output.js.map +1 -1
- package/dist/commands/pipeline.d.ts.map +1 -1
- package/dist/commands/pipeline.js +33 -19
- package/dist/commands/pipeline.js.map +1 -1
- package/dist/commands/project.d.ts +19 -0
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +125 -27
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/release-store.d.ts +28 -0
- package/dist/commands/release-store.d.ts.map +1 -0
- package/dist/commands/release-store.js +158 -0
- package/dist/commands/release-store.js.map +1 -0
- package/dist/commands/release.d.ts +61 -0
- package/dist/commands/release.d.ts.map +1 -0
- package/dist/commands/release.js +555 -0
- package/dist/commands/release.js.map +1 -0
- package/dist/commands/reload.d.ts +16 -0
- package/dist/commands/reload.d.ts.map +1 -1
- package/dist/commands/reload.js +21 -5
- package/dist/commands/reload.js.map +1 -1
- package/dist/commands/remote.d.ts +40 -0
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +146 -35
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/restart.d.ts +16 -0
- package/dist/commands/restart.d.ts.map +1 -1
- package/dist/commands/restart.js +21 -5
- package/dist/commands/restart.js.map +1 -1
- package/dist/commands/scale.d.ts.map +1 -1
- package/dist/commands/scale.js +4 -3
- package/dist/commands/scale.js.map +1 -1
- package/dist/commands/secret.d.ts +54 -0
- package/dist/commands/secret.d.ts.map +1 -1
- package/dist/commands/secret.js +236 -34
- package/dist/commands/secret.js.map +1 -1
- package/dist/commands/service-units.d.ts +181 -0
- package/dist/commands/service-units.d.ts.map +1 -0
- package/dist/commands/service-units.js +291 -0
- package/dist/commands/service-units.js.map +1 -0
- package/dist/commands/service.d.ts +39 -0
- package/dist/commands/service.d.ts.map +1 -0
- package/dist/commands/service.js +370 -0
- package/dist/commands/service.js.map +1 -0
- package/dist/commands/spinner.d.ts +29 -0
- package/dist/commands/spinner.d.ts.map +1 -0
- package/dist/commands/spinner.js +44 -0
- package/dist/commands/spinner.js.map +1 -0
- package/dist/commands/stack.d.ts +49 -1
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +325 -12
- package/dist/commands/stack.js.map +1 -1
- package/dist/commands/start.d.ts +16 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +20 -3
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts +9 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +45 -29
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stop.d.ts +16 -0
- package/dist/commands/stop.d.ts.map +1 -1
- package/dist/commands/stop.js +34 -6
- package/dist/commands/stop.js.map +1 -1
- package/dist/commands/tor.d.ts +14 -7
- package/dist/commands/tor.d.ts.map +1 -1
- package/dist/commands/tor.js +113 -33
- package/dist/commands/tor.js.map +1 -1
- package/dist/commands/up.d.ts +85 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +180 -32
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/webapp.d.ts.map +1 -1
- package/dist/commands/webapp.js +2 -1
- package/dist/commands/webapp.js.map +1 -1
- package/dist/config/defaults.d.ts +16 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +26 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/define-ecosystem.d.ts.map +1 -1
- package/dist/config/define-ecosystem.js +2 -0
- package/dist/config/define-ecosystem.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts +45 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +64 -6
- package/dist/config/loader.js.map +1 -1
- package/dist/config/omnitron-config.schema.d.ts.map +1 -1
- package/dist/config/omnitron-config.schema.js +16 -0
- package/dist/config/omnitron-config.schema.js.map +1 -1
- package/dist/config/types.d.ts +416 -44
- package/dist/config/types.d.ts.map +1 -1
- package/dist/daemon/config-reload.d.ts +27 -0
- package/dist/daemon/config-reload.d.ts.map +1 -0
- package/dist/daemon/config-reload.js +42 -0
- package/dist/daemon/config-reload.js.map +1 -0
- package/dist/daemon/daemon-client.d.ts +136 -2
- package/dist/daemon/daemon-client.d.ts.map +1 -1
- package/dist/daemon/daemon-client.js +307 -21
- package/dist/daemon/daemon-client.js.map +1 -1
- package/dist/daemon/daemon-entry.js +90 -30
- package/dist/daemon/daemon-entry.js.map +1 -1
- package/dist/daemon/daemon-scheduler.d.ts +4 -0
- package/dist/daemon/daemon-scheduler.d.ts.map +1 -1
- package/dist/daemon/daemon-scheduler.js +137 -7
- package/dist/daemon/daemon-scheduler.js.map +1 -1
- package/dist/daemon/daemon-state-store.service.d.ts +263 -0
- package/dist/daemon/daemon-state-store.service.d.ts.map +1 -0
- package/dist/daemon/daemon-state-store.service.js +446 -0
- package/dist/daemon/daemon-state-store.service.js.map +1 -0
- package/dist/daemon/daemon.d.ts +194 -4
- package/dist/daemon/daemon.d.ts.map +1 -1
- package/dist/daemon/daemon.js +1160 -157
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/daemon.module.d.ts.map +1 -1
- package/dist/daemon/daemon.module.js +163 -85
- package/dist/daemon/daemon.module.js.map +1 -1
- package/dist/daemon/daemon.rpc-service.d.ts +90 -1
- package/dist/daemon/daemon.rpc-service.d.ts.map +1 -1
- package/dist/daemon/daemon.rpc-service.js +439 -97
- package/dist/daemon/daemon.rpc-service.js.map +1 -1
- package/dist/daemon/pid-manager.d.ts +16 -3
- package/dist/daemon/pid-manager.d.ts.map +1 -1
- package/dist/daemon/pid-manager.js +31 -4
- package/dist/daemon/pid-manager.js.map +1 -1
- package/dist/daemon/spawn-daemon.d.ts +73 -0
- package/dist/daemon/spawn-daemon.d.ts.map +1 -0
- package/dist/daemon/spawn-daemon.js +101 -0
- package/dist/daemon/spawn-daemon.js.map +1 -0
- package/dist/daemon/state-store.d.ts +65 -3
- package/dist/daemon/state-store.d.ts.map +1 -1
- package/dist/daemon/state-store.js +100 -58
- package/dist/daemon/state-store.js.map +1 -1
- package/dist/database/connection.d.ts +71 -0
- package/dist/database/connection.d.ts.map +1 -0
- package/dist/database/connection.js +129 -0
- package/dist/database/connection.js.map +1 -0
- package/dist/database/dialect.d.ts +60 -0
- package/dist/database/dialect.d.ts.map +1 -0
- package/dist/database/dialect.js +80 -0
- package/dist/database/dialect.js.map +1 -0
- package/dist/database/migrate.d.ts +5 -2
- package/dist/database/migrate.d.ts.map +1 -1
- package/dist/database/migrate.js +23 -33
- package/dist/database/migrate.js.map +1 -1
- package/dist/database/migration-runner.d.ts +50 -0
- package/dist/database/migration-runner.d.ts.map +1 -0
- package/dist/database/migration-runner.js +143 -0
- package/dist/database/migration-runner.js.map +1 -0
- package/dist/database/migrations/006_login_throttle.d.ts +17 -0
- package/dist/database/migrations/006_login_throttle.d.ts.map +1 -0
- package/dist/database/migrations/006_login_throttle.js +33 -0
- package/dist/database/migrations/006_login_throttle.js.map +1 -0
- package/dist/database/migrations/007_sync_ingested.d.ts +21 -0
- package/dist/database/migrations/007_sync_ingested.d.ts.map +1 -0
- package/dist/database/migrations/007_sync_ingested.js +39 -0
- package/dist/database/migrations/007_sync_ingested.js.map +1 -0
- package/dist/database/migrations/008_node_health_version_text.d.ts +24 -0
- package/dist/database/migrations/008_node_health_version_text.d.ts.map +1 -0
- package/dist/database/migrations/008_node_health_version_text.js +35 -0
- package/dist/database/migrations/008_node_health_version_text.js.map +1 -0
- package/dist/database/migrations/009_node_health_unmeasured.d.ts +40 -0
- package/dist/database/migrations/009_node_health_unmeasured.d.ts.map +1 -0
- package/dist/database/migrations/009_node_health_unmeasured.js +63 -0
- package/dist/database/migrations/009_node_health_unmeasured.js.map +1 -0
- package/dist/database/migrations/010_metrics_raw_had_no_reader.d.ts +22 -0
- package/dist/database/migrations/010_metrics_raw_had_no_reader.d.ts.map +1 -0
- package/dist/database/migrations/010_metrics_raw_had_no_reader.js +26 -0
- package/dist/database/migrations/010_metrics_raw_had_no_reader.js.map +1 -0
- package/dist/database/migrations/011_alerts_nobody_had_to_write.d.ts +56 -0
- package/dist/database/migrations/011_alerts_nobody_had_to_write.d.ts.map +1 -0
- package/dist/database/migrations/011_alerts_nobody_had_to_write.js +79 -0
- package/dist/database/migrations/011_alerts_nobody_had_to_write.js.map +1 -0
- package/dist/database/migrations/012_a_disk_nobody_watched.d.ts +26 -0
- package/dist/database/migrations/012_a_disk_nobody_watched.d.ts.map +1 -0
- package/dist/database/migrations/012_a_disk_nobody_watched.js +40 -0
- package/dist/database/migrations/012_a_disk_nobody_watched.js.map +1 -0
- package/dist/database/migrations/013_an_alarm_delivered.d.ts +14 -0
- package/dist/database/migrations/013_an_alarm_delivered.d.ts.map +1 -0
- package/dist/database/migrations/013_an_alarm_delivered.js +28 -0
- package/dist/database/migrations/013_an_alarm_delivered.js.map +1 -0
- package/dist/database/migrations/index.d.ts +21 -0
- package/dist/database/migrations/index.d.ts.map +1 -0
- package/dist/database/migrations/index.js +47 -0
- package/dist/database/migrations/index.js.map +1 -0
- package/dist/database/schema.d.ts +27 -11
- package/dist/database/schema.d.ts.map +1 -1
- package/dist/database/sqlite-date-binding.d.ts +71 -0
- package/dist/database/sqlite-date-binding.d.ts.map +1 -0
- package/dist/database/sqlite-date-binding.js +174 -0
- package/dist/database/sqlite-date-binding.js.map +1 -0
- package/dist/execution/data-channel.d.ts +48 -0
- package/dist/execution/data-channel.d.ts.map +1 -0
- package/dist/execution/data-channel.js +55 -0
- package/dist/execution/data-channel.js.map +1 -0
- package/dist/execution/execution.service.d.ts +146 -0
- package/dist/execution/execution.service.d.ts.map +1 -1
- package/dist/execution/execution.service.js +330 -10
- package/dist/execution/execution.service.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/infrastructure/bare-metal-plan.d.ts +208 -0
- package/dist/infrastructure/bare-metal-plan.d.ts.map +1 -0
- package/dist/infrastructure/bare-metal-plan.js +363 -0
- package/dist/infrastructure/bare-metal-plan.js.map +1 -0
- package/dist/infrastructure/bare-metal-runner.d.ts +65 -0
- package/dist/infrastructure/bare-metal-runner.d.ts.map +1 -0
- package/dist/infrastructure/bare-metal-runner.js +354 -0
- package/dist/infrastructure/bare-metal-runner.js.map +1 -0
- package/dist/infrastructure/config-payload.d.ts +149 -0
- package/dist/infrastructure/config-payload.d.ts.map +1 -0
- package/dist/infrastructure/config-payload.js +235 -0
- package/dist/infrastructure/config-payload.js.map +1 -0
- package/dist/infrastructure/container-runtime.d.ts +170 -10
- package/dist/infrastructure/container-runtime.d.ts.map +1 -1
- package/dist/infrastructure/container-runtime.js +565 -52
- package/dist/infrastructure/container-runtime.js.map +1 -1
- package/dist/infrastructure/gateway-reachability.d.ts +85 -0
- package/dist/infrastructure/gateway-reachability.d.ts.map +1 -0
- package/dist/infrastructure/gateway-reachability.js +116 -0
- package/dist/infrastructure/gateway-reachability.js.map +1 -0
- package/dist/infrastructure/gateway-redis-db.d.ts +29 -0
- package/dist/infrastructure/gateway-redis-db.d.ts.map +1 -0
- package/dist/infrastructure/gateway-redis-db.js +32 -0
- package/dist/infrastructure/gateway-redis-db.js.map +1 -0
- package/dist/infrastructure/host-ingress-config.d.ts +12 -0
- package/dist/infrastructure/host-ingress-config.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-config.js +197 -0
- package/dist/infrastructure/host-ingress-config.js.map +1 -0
- package/dist/infrastructure/host-ingress-lock.d.ts +4 -0
- package/dist/infrastructure/host-ingress-lock.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-lock.js +36 -0
- package/dist/infrastructure/host-ingress-lock.js.map +1 -0
- package/dist/infrastructure/host-ingress-runtime.d.ts +25 -0
- package/dist/infrastructure/host-ingress-runtime.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-runtime.js +114 -0
- package/dist/infrastructure/host-ingress-runtime.js.map +1 -0
- package/dist/infrastructure/host-ingress-takeover.d.ts +18 -0
- package/dist/infrastructure/host-ingress-takeover.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-takeover.js +142 -0
- package/dist/infrastructure/host-ingress-takeover.js.map +1 -0
- package/dist/infrastructure/host-ingress-types.d.ts +173 -0
- package/dist/infrastructure/host-ingress-types.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-types.js +2 -0
- package/dist/infrastructure/host-ingress-types.js.map +1 -0
- package/dist/infrastructure/host-ingress.service.d.ts +47 -0
- package/dist/infrastructure/host-ingress.service.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress.service.js +514 -0
- package/dist/infrastructure/host-ingress.service.js.map +1 -0
- package/dist/infrastructure/host-inspection.d.ts +223 -0
- package/dist/infrastructure/host-inspection.d.ts.map +1 -0
- package/dist/infrastructure/host-inspection.js +501 -0
- package/dist/infrastructure/host-inspection.js.map +1 -0
- package/dist/infrastructure/infrastructure-gate.d.ts.map +1 -1
- package/dist/infrastructure/infrastructure.service.d.ts +223 -7
- package/dist/infrastructure/infrastructure.service.d.ts.map +1 -1
- package/dist/infrastructure/infrastructure.service.js +500 -93
- package/dist/infrastructure/infrastructure.service.js.map +1 -1
- package/dist/infrastructure/known-machines.d.ts +76 -0
- package/dist/infrastructure/known-machines.d.ts.map +1 -0
- package/dist/infrastructure/known-machines.js +94 -0
- package/dist/infrastructure/known-machines.js.map +1 -0
- package/dist/infrastructure/node-credentials.d.ts +45 -0
- package/dist/infrastructure/node-credentials.d.ts.map +1 -0
- package/dist/infrastructure/node-credentials.js +80 -0
- package/dist/infrastructure/node-credentials.js.map +1 -0
- package/dist/infrastructure/orphan-containers.d.ts +99 -0
- package/dist/infrastructure/orphan-containers.d.ts.map +1 -0
- package/dist/infrastructure/orphan-containers.js +106 -0
- package/dist/infrastructure/orphan-containers.js.map +1 -0
- package/dist/infrastructure/phantom-endpoint-janitor.d.ts +20 -0
- package/dist/infrastructure/phantom-endpoint-janitor.d.ts.map +1 -1
- package/dist/infrastructure/phantom-endpoint-janitor.js +56 -6
- package/dist/infrastructure/phantom-endpoint-janitor.js.map +1 -1
- package/dist/infrastructure/presets/gateway-openresty.d.ts.map +1 -1
- package/dist/infrastructure/presets/gateway-openresty.js +29 -3
- package/dist/infrastructure/presets/gateway-openresty.js.map +1 -1
- package/dist/infrastructure/presets/minio.d.ts.map +1 -1
- package/dist/infrastructure/presets/minio.js +36 -3
- package/dist/infrastructure/presets/minio.js.map +1 -1
- package/dist/infrastructure/presets/postgres.d.ts.map +1 -1
- package/dist/infrastructure/presets/postgres.js +69 -2
- package/dist/infrastructure/presets/postgres.js.map +1 -1
- package/dist/infrastructure/presets/redis.d.ts.map +1 -1
- package/dist/infrastructure/presets/redis.js +13 -0
- package/dist/infrastructure/presets/redis.js.map +1 -1
- package/dist/infrastructure/presets/registry.d.ts.map +1 -1
- package/dist/infrastructure/presets/registry.js +81 -12
- package/dist/infrastructure/presets/registry.js.map +1 -1
- package/dist/infrastructure/presets/tor.d.ts +38 -0
- package/dist/infrastructure/presets/tor.d.ts.map +1 -1
- package/dist/infrastructure/presets/tor.js +78 -69
- package/dist/infrastructure/presets/tor.js.map +1 -1
- package/dist/infrastructure/presets/torrc.d.ts +54 -0
- package/dist/infrastructure/presets/torrc.d.ts.map +1 -0
- package/dist/infrastructure/presets/torrc.js +153 -0
- package/dist/infrastructure/presets/torrc.js.map +1 -0
- package/dist/infrastructure/presets/types.d.ts +17 -0
- package/dist/infrastructure/presets/types.d.ts.map +1 -1
- package/dist/infrastructure/provisioning-outcome.d.ts +85 -0
- package/dist/infrastructure/provisioning-outcome.d.ts.map +1 -0
- package/dist/infrastructure/provisioning-outcome.js +122 -0
- package/dist/infrastructure/provisioning-outcome.js.map +1 -0
- package/dist/infrastructure/server-registry.d.ts +27 -0
- package/dist/infrastructure/server-registry.d.ts.map +1 -1
- package/dist/infrastructure/server-registry.js +60 -5
- package/dist/infrastructure/server-registry.js.map +1 -1
- package/dist/infrastructure/service-binding.d.ts +60 -0
- package/dist/infrastructure/service-binding.d.ts.map +1 -0
- package/dist/infrastructure/service-binding.js +90 -0
- package/dist/infrastructure/service-binding.js.map +1 -0
- package/dist/infrastructure/service-credentials.d.ts +105 -0
- package/dist/infrastructure/service-credentials.d.ts.map +1 -0
- package/dist/infrastructure/service-credentials.js +141 -0
- package/dist/infrastructure/service-credentials.js.map +1 -0
- package/dist/infrastructure/service-resolver.d.ts +166 -12
- package/dist/infrastructure/service-resolver.d.ts.map +1 -1
- package/dist/infrastructure/service-resolver.js +535 -82
- package/dist/infrastructure/service-resolver.js.map +1 -1
- package/dist/infrastructure/shipped-config.d.ts +43 -0
- package/dist/infrastructure/shipped-config.d.ts.map +1 -0
- package/dist/infrastructure/shipped-config.js +159 -0
- package/dist/infrastructure/shipped-config.js.map +1 -0
- package/dist/infrastructure/stack-infra-manager.d.ts +16 -1
- package/dist/infrastructure/stack-infra-manager.d.ts.map +1 -1
- package/dist/infrastructure/stack-infra-manager.js +81 -53
- package/dist/infrastructure/stack-infra-manager.js.map +1 -1
- package/dist/infrastructure/types.d.ts +263 -6
- package/dist/infrastructure/types.d.ts.map +1 -1
- package/dist/mcp/mcp-bridge.d.ts.map +1 -1
- package/dist/mcp/mcp-bridge.js.map +1 -1
- package/dist/mcp/tool-groups/apps.tools.d.ts +2 -1
- package/dist/mcp/tool-groups/apps.tools.d.ts.map +1 -1
- package/dist/mcp/tool-groups/apps.tools.js +2 -2
- package/dist/mcp/tool-groups/apps.tools.js.map +1 -1
- package/dist/mcp/tool-groups/infra.tools.d.ts +16 -2
- package/dist/mcp/tool-groups/infra.tools.d.ts.map +1 -1
- package/dist/mcp/tool-groups/infra.tools.js +51 -41
- package/dist/mcp/tool-groups/infra.tools.js.map +1 -1
- package/dist/mcp/tool-groups/kb.tools.d.ts.map +1 -1
- package/dist/mcp/tool-groups/kb.tools.js +4 -6
- package/dist/mcp/tool-groups/kb.tools.js.map +1 -1
- package/dist/mcp/tool-groups/management.tools.d.ts +20 -3
- package/dist/mcp/tool-groups/management.tools.d.ts.map +1 -1
- package/dist/mcp/tool-groups/management.tools.js +158 -125
- package/dist/mcp/tool-groups/management.tools.js.map +1 -1
- package/dist/mcp/tool-groups/monitoring.tools.d.ts +10 -1
- package/dist/mcp/tool-groups/monitoring.tools.d.ts.map +1 -1
- package/dist/mcp/tool-groups/monitoring.tools.js +65 -18
- package/dist/mcp/tool-groups/monitoring.tools.js.map +1 -1
- package/dist/mcp/unavailable-tools.d.ts +35 -0
- package/dist/mcp/unavailable-tools.d.ts.map +1 -0
- package/dist/mcp/unavailable-tools.js +59 -0
- package/dist/mcp/unavailable-tools.js.map +1 -0
- package/dist/monitoring/app-health.indicator.d.ts.map +1 -1
- package/dist/monitoring/app-health.indicator.js +12 -0
- package/dist/monitoring/app-health.indicator.js.map +1 -1
- package/dist/monitoring/desktop-notifier.d.ts +26 -0
- package/dist/monitoring/desktop-notifier.d.ts.map +1 -0
- package/dist/monitoring/desktop-notifier.js +49 -0
- package/dist/monitoring/desktop-notifier.js.map +1 -0
- package/dist/monitoring/docker-health.indicator.d.ts +17 -1
- package/dist/monitoring/docker-health.indicator.d.ts.map +1 -1
- package/dist/monitoring/docker-health.indicator.js +38 -8
- package/dist/monitoring/docker-health.indicator.js.map +1 -1
- package/dist/monitoring/event-loop-stall.indicator.d.ts +26 -0
- package/dist/monitoring/event-loop-stall.indicator.d.ts.map +1 -0
- package/dist/monitoring/event-loop-stall.indicator.js +47 -0
- package/dist/monitoring/event-loop-stall.indicator.js.map +1 -0
- package/dist/monitoring/event-loop-watch.d.ts +124 -0
- package/dist/monitoring/event-loop-watch.d.ts.map +1 -0
- package/dist/monitoring/event-loop-watch.js +179 -0
- package/dist/monitoring/event-loop-watch.js.map +1 -0
- package/dist/monitoring/host-disk.d.ts +6 -0
- package/dist/monitoring/host-disk.d.ts.map +1 -0
- package/dist/monitoring/host-disk.js +26 -0
- package/dist/monitoring/host-disk.js.map +1 -0
- package/dist/monitoring/log-line.d.ts +188 -0
- package/dist/monitoring/log-line.d.ts.map +1 -0
- package/dist/monitoring/log-line.js +458 -0
- package/dist/monitoring/log-line.js.map +1 -0
- package/dist/monitoring/log-manager.d.ts +89 -8
- package/dist/monitoring/log-manager.d.ts.map +1 -1
- package/dist/monitoring/log-manager.js +246 -77
- package/dist/monitoring/log-manager.js.map +1 -1
- package/dist/observability/metrics-bridge.d.ts.map +1 -1
- package/dist/observability/metrics-server.d.ts.map +1 -1
- package/dist/operations.d.ts +16 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +13 -0
- package/dist/operations.js.map +1 -0
- package/dist/orchestrator/app-handle.d.ts +157 -2
- package/dist/orchestrator/app-handle.d.ts.map +1 -1
- package/dist/orchestrator/app-handle.js +165 -3
- package/dist/orchestrator/app-handle.js.map +1 -1
- package/dist/orchestrator/app-health.d.ts +33 -0
- package/dist/orchestrator/app-health.d.ts.map +1 -0
- package/dist/orchestrator/app-health.js +74 -0
- package/dist/orchestrator/app-health.js.map +1 -0
- package/dist/orchestrator/app-traffic.d.ts +14 -0
- package/dist/orchestrator/app-traffic.d.ts.map +1 -0
- package/dist/orchestrator/app-traffic.js +33 -0
- package/dist/orchestrator/app-traffic.js.map +1 -0
- package/dist/orchestrator/bootstrap-loader-child.d.ts +19 -0
- package/dist/orchestrator/bootstrap-loader-child.d.ts.map +1 -0
- package/dist/orchestrator/bootstrap-loader-child.js +43 -0
- package/dist/orchestrator/bootstrap-loader-child.js.map +1 -0
- package/dist/orchestrator/bootstrap-loader.d.ts +72 -0
- package/dist/orchestrator/bootstrap-loader.d.ts.map +1 -1
- package/dist/orchestrator/bootstrap-loader.js +350 -5
- package/dist/orchestrator/bootstrap-loader.js.map +1 -1
- package/dist/orchestrator/bootstrap-process.d.ts +99 -4
- package/dist/orchestrator/bootstrap-process.d.ts.map +1 -1
- package/dist/orchestrator/bootstrap-process.js +332 -20
- package/dist/orchestrator/bootstrap-process.js.map +1 -1
- package/dist/orchestrator/build-service.d.ts +6 -12
- package/dist/orchestrator/build-service.d.ts.map +1 -1
- package/dist/orchestrator/build-service.js +120 -83
- package/dist/orchestrator/build-service.js.map +1 -1
- package/dist/orchestrator/call-exposed-service.d.ts +7 -0
- package/dist/orchestrator/call-exposed-service.d.ts.map +1 -0
- package/dist/orchestrator/call-exposed-service.js +50 -0
- package/dist/orchestrator/call-exposed-service.js.map +1 -0
- package/dist/orchestrator/classic-launcher.d.ts +1 -0
- package/dist/orchestrator/classic-launcher.d.ts.map +1 -1
- package/dist/orchestrator/classic-launcher.js +40 -4
- package/dist/orchestrator/classic-launcher.js.map +1 -1
- package/dist/orchestrator/file-watcher.d.ts +79 -1
- package/dist/orchestrator/file-watcher.d.ts.map +1 -1
- package/dist/orchestrator/file-watcher.js +193 -7
- package/dist/orchestrator/file-watcher.js.map +1 -1
- package/dist/orchestrator/http-routes.d.ts +4 -0
- package/dist/orchestrator/http-routes.d.ts.map +1 -0
- package/dist/orchestrator/http-routes.js +19 -0
- package/dist/orchestrator/http-routes.js.map +1 -0
- package/dist/orchestrator/module-worker-process.d.ts.map +1 -1
- package/dist/orchestrator/module-worker-process.js +10 -0
- package/dist/orchestrator/module-worker-process.js.map +1 -1
- package/dist/orchestrator/orchestrator.service.d.ts +385 -11
- package/dist/orchestrator/orchestrator.service.d.ts.map +1 -1
- package/dist/orchestrator/orchestrator.service.js +1738 -364
- package/dist/orchestrator/orchestrator.service.js.map +1 -1
- package/dist/orchestrator/owned-pids.d.ts +83 -0
- package/dist/orchestrator/owned-pids.d.ts.map +1 -0
- package/dist/orchestrator/owned-pids.js +93 -0
- package/dist/orchestrator/owned-pids.js.map +1 -0
- package/dist/orchestrator/port-conflict.d.ts +102 -0
- package/dist/orchestrator/port-conflict.d.ts.map +1 -0
- package/dist/orchestrator/port-conflict.js +131 -0
- package/dist/orchestrator/port-conflict.js.map +1 -0
- package/dist/orchestrator/process-janitor.d.ts +78 -4
- package/dist/orchestrator/process-janitor.d.ts.map +1 -1
- package/dist/orchestrator/process-janitor.js +246 -30
- package/dist/orchestrator/process-janitor.js.map +1 -1
- package/dist/orchestrator/ps-metrics.d.ts +37 -0
- package/dist/orchestrator/ps-metrics.d.ts.map +1 -0
- package/dist/orchestrator/ps-metrics.js +60 -0
- package/dist/orchestrator/ps-metrics.js.map +1 -0
- package/dist/orchestrator/service-router.d.ts +58 -2
- package/dist/orchestrator/service-router.d.ts.map +1 -1
- package/dist/orchestrator/service-router.js +157 -25
- package/dist/orchestrator/service-router.js.map +1 -1
- package/dist/orchestrator/topology-query.d.ts +49 -0
- package/dist/orchestrator/topology-query.d.ts.map +1 -0
- package/dist/orchestrator/topology-query.js +54 -0
- package/dist/orchestrator/topology-query.js.map +1 -0
- package/dist/project/artifact-builder.d.ts +174 -3
- package/dist/project/artifact-builder.d.ts.map +1 -1
- package/dist/project/artifact-builder.js +454 -42
- package/dist/project/artifact-builder.js.map +1 -1
- package/dist/project/build-decision.d.ts +58 -0
- package/dist/project/build-decision.d.ts.map +1 -0
- package/dist/project/build-decision.js +59 -0
- package/dist/project/build-decision.js.map +1 -0
- package/dist/project/config-resolver.d.ts +6 -4
- package/dist/project/config-resolver.d.ts.map +1 -1
- package/dist/project/config-resolver.js +128 -74
- package/dist/project/config-resolver.js.map +1 -1
- package/dist/project/declared-config.d.ts +42 -0
- package/dist/project/declared-config.d.ts.map +1 -0
- package/dist/project/declared-config.js +60 -0
- package/dist/project/declared-config.js.map +1 -0
- package/dist/project/dependency-analyzer.d.ts.map +1 -1
- package/dist/project/dependency-analyzer.js.map +1 -1
- package/dist/project/deploy-phases.d.ts +35 -0
- package/dist/project/deploy-phases.d.ts.map +1 -0
- package/dist/project/deploy-phases.js +75 -0
- package/dist/project/deploy-phases.js.map +1 -0
- package/dist/project/exec-in-group.d.ts +49 -0
- package/dist/project/exec-in-group.d.ts.map +1 -0
- package/dist/project/exec-in-group.js +100 -0
- package/dist/project/exec-in-group.js.map +1 -0
- package/dist/project/node-app-config.d.ts +101 -0
- package/dist/project/node-app-config.d.ts.map +1 -0
- package/dist/project/node-app-config.js +134 -0
- package/dist/project/node-app-config.js.map +1 -0
- package/dist/project/node-app-health.d.ts +76 -0
- package/dist/project/node-app-health.d.ts.map +1 -0
- package/dist/project/node-app-health.js +119 -0
- package/dist/project/node-app-health.js.map +1 -0
- package/dist/project/operator-account.d.ts +293 -0
- package/dist/project/operator-account.d.ts.map +1 -0
- package/dist/project/operator-account.js +373 -0
- package/dist/project/operator-account.js.map +1 -0
- package/dist/project/registry.d.ts +45 -8
- package/dist/project/registry.d.ts.map +1 -1
- package/dist/project/registry.js +214 -64
- package/dist/project/registry.js.map +1 -1
- package/dist/project/requirements-scanner.d.ts +1 -0
- package/dist/project/requirements-scanner.d.ts.map +1 -1
- package/dist/project/requirements-scanner.js +28 -3
- package/dist/project/requirements-scanner.js.map +1 -1
- package/dist/project/stack-env.d.ts +37 -0
- package/dist/project/stack-env.d.ts.map +1 -0
- package/dist/project/stack-env.js +85 -0
- package/dist/project/stack-env.js.map +1 -0
- package/dist/project/stand-containers.d.ts +11 -0
- package/dist/project/stand-containers.d.ts.map +1 -0
- package/dist/project/stand-containers.js +27 -0
- package/dist/project/stand-containers.js.map +1 -0
- package/dist/project/working-tree.d.ts +62 -0
- package/dist/project/working-tree.d.ts.map +1 -0
- package/dist/project/working-tree.js +101 -0
- package/dist/project/working-tree.js.map +1 -0
- package/dist/release/artifact-store.d.ts +360 -0
- package/dist/release/artifact-store.d.ts.map +1 -0
- package/dist/release/artifact-store.js +1040 -0
- package/dist/release/artifact-store.js.map +1 -0
- package/dist/release/attest-on-node.d.ts +93 -0
- package/dist/release/attest-on-node.d.ts.map +1 -0
- package/dist/release/attest-on-node.js +207 -0
- package/dist/release/attest-on-node.js.map +1 -0
- package/dist/release/attest.d.ts +135 -0
- package/dist/release/attest.d.ts.map +1 -0
- package/dist/release/attest.js +199 -0
- package/dist/release/attest.js.map +1 -0
- package/dist/release/build-run.d.ts +151 -0
- package/dist/release/build-run.d.ts.map +1 -0
- package/dist/release/build-run.js +609 -0
- package/dist/release/build-run.js.map +1 -0
- package/dist/release/builder.d.ts +57 -0
- package/dist/release/builder.d.ts.map +1 -0
- package/dist/release/builder.js +120 -0
- package/dist/release/builder.js.map +1 -0
- package/dist/release/daemon-omni.d.ts +41 -0
- package/dist/release/daemon-omni.d.ts.map +1 -0
- package/dist/release/daemon-omni.js +59 -0
- package/dist/release/daemon-omni.js.map +1 -0
- package/dist/release/definition-inputs.d.ts +34 -0
- package/dist/release/definition-inputs.d.ts.map +1 -0
- package/dist/release/definition-inputs.js +90 -0
- package/dist/release/definition-inputs.js.map +1 -0
- package/dist/release/delivered.d.ts +53 -0
- package/dist/release/delivered.d.ts.map +1 -0
- package/dist/release/delivered.js +81 -0
- package/dist/release/delivered.js.map +1 -0
- package/dist/release/layout.d.ts +61 -0
- package/dist/release/layout.d.ts.map +1 -0
- package/dist/release/layout.js +114 -0
- package/dist/release/layout.js.map +1 -0
- package/dist/release/load.d.ts +44 -0
- package/dist/release/load.d.ts.map +1 -0
- package/dist/release/load.js +84 -0
- package/dist/release/load.js.map +1 -0
- package/dist/release/manifest.d.ts +299 -0
- package/dist/release/manifest.d.ts.map +1 -0
- package/dist/release/manifest.js +176 -0
- package/dist/release/manifest.js.map +1 -0
- package/dist/release/migrations.d.ts +32 -0
- package/dist/release/migrations.d.ts.map +1 -0
- package/dist/release/migrations.js +51 -0
- package/dist/release/migrations.js.map +1 -0
- package/dist/release/publish.d.ts +71 -0
- package/dist/release/publish.d.ts.map +1 -0
- package/dist/release/publish.js +102 -0
- package/dist/release/publish.js.map +1 -0
- package/dist/release/store.d.ts +174 -0
- package/dist/release/store.d.ts.map +1 -0
- package/dist/release/store.js +257 -0
- package/dist/release/store.js.map +1 -0
- package/dist/services/alert.rpc-service.d.ts +11 -15
- package/dist/services/alert.rpc-service.d.ts.map +1 -1
- package/dist/services/alert.rpc-service.js +29 -14
- package/dist/services/alert.rpc-service.js.map +1 -1
- package/dist/services/alert.service.d.ts +96 -59
- package/dist/services/alert.service.d.ts.map +1 -1
- package/dist/services/alert.service.js +455 -70
- package/dist/services/alert.service.js.map +1 -1
- package/dist/services/anonymous-input.d.ts +26 -0
- package/dist/services/anonymous-input.d.ts.map +1 -0
- package/dist/services/anonymous-input.js +44 -0
- package/dist/services/anonymous-input.js.map +1 -0
- package/dist/services/audit.rpc-service.d.ts +27 -0
- package/dist/services/audit.rpc-service.d.ts.map +1 -0
- package/dist/services/audit.rpc-service.js +57 -0
- package/dist/services/audit.rpc-service.js.map +1 -0
- package/dist/services/audit.service.d.ts +165 -0
- package/dist/services/audit.service.d.ts.map +1 -0
- package/dist/services/audit.service.js +242 -0
- package/dist/services/audit.service.js.map +1 -0
- package/dist/services/auth-context.d.ts +21 -1
- package/dist/services/auth-context.d.ts.map +1 -1
- package/dist/services/auth-context.js +51 -5
- package/dist/services/auth-context.js.map +1 -1
- package/dist/services/auth.rpc-service.d.ts +0 -1
- package/dist/services/auth.rpc-service.d.ts.map +1 -1
- package/dist/services/auth.rpc-service.js +23 -9
- package/dist/services/auth.rpc-service.js.map +1 -1
- package/dist/services/auth.service.d.ts +47 -33
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +155 -23
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/backup-pipeline.d.ts +97 -0
- package/dist/services/backup-pipeline.d.ts.map +1 -0
- package/dist/services/backup-pipeline.js +286 -0
- package/dist/services/backup-pipeline.js.map +1 -0
- package/dist/services/backup-schedule.d.ts +69 -0
- package/dist/services/backup-schedule.d.ts.map +1 -0
- package/dist/services/backup-schedule.js +132 -0
- package/dist/services/backup-schedule.js.map +1 -0
- package/dist/services/backup.rpc-service.d.ts +31 -2
- package/dist/services/backup.rpc-service.d.ts.map +1 -1
- package/dist/services/backup.rpc-service.js +53 -0
- package/dist/services/backup.rpc-service.js.map +1 -1
- package/dist/services/backup.service.d.ts +458 -14
- package/dist/services/backup.service.d.ts.map +1 -1
- package/dist/services/backup.service.js +1368 -170
- package/dist/services/backup.service.js.map +1 -1
- package/dist/services/bundle-build-worker.d.ts +19 -0
- package/dist/services/bundle-build-worker.d.ts.map +1 -0
- package/dist/services/bundle-build-worker.js +40 -0
- package/dist/services/bundle-build-worker.js.map +1 -0
- package/dist/services/bundle-builder.d.ts +490 -0
- package/dist/services/bundle-builder.d.ts.map +1 -0
- package/dist/services/bundle-builder.js +1159 -0
- package/dist/services/bundle-builder.js.map +1 -0
- package/dist/services/bundle-worker-protocol.d.ts +19 -0
- package/dist/services/bundle-worker-protocol.d.ts.map +1 -0
- package/dist/services/bundle-worker-protocol.js +32 -0
- package/dist/services/bundle-worker-protocol.js.map +1 -0
- package/dist/services/deploy.rpc-service.d.ts +4 -1
- package/dist/services/deploy.rpc-service.d.ts.map +1 -1
- package/dist/services/deploy.rpc-service.js +10 -0
- package/dist/services/deploy.rpc-service.js.map +1 -1
- package/dist/services/deploy.service.d.ts +14 -24
- package/dist/services/deploy.service.d.ts.map +1 -1
- package/dist/services/deploy.service.js +46 -5
- package/dist/services/deploy.service.js.map +1 -1
- package/dist/services/discovery.rpc-service.d.ts +2 -1
- package/dist/services/discovery.rpc-service.d.ts.map +1 -1
- package/dist/services/discovery.rpc-service.js.map +1 -1
- package/dist/services/discovery.service.d.ts +32 -28
- package/dist/services/discovery.service.d.ts.map +1 -1
- package/dist/services/discovery.service.js +108 -133
- package/dist/services/discovery.service.js.map +1 -1
- package/dist/services/event-broadcaster.rpc-service.d.ts +36 -23
- package/dist/services/event-broadcaster.rpc-service.d.ts.map +1 -1
- package/dist/services/event-broadcaster.rpc-service.js +70 -32
- package/dist/services/event-broadcaster.rpc-service.js.map +1 -1
- package/dist/services/event-broadcaster.service.d.ts.map +1 -1
- package/dist/services/event-broadcaster.service.js.map +1 -1
- package/dist/services/fleet.rpc-service.d.ts +2 -1
- package/dist/services/fleet.rpc-service.d.ts.map +1 -1
- package/dist/services/fleet.rpc-service.js +3 -1
- package/dist/services/fleet.rpc-service.js.map +1 -1
- package/dist/services/fleet.service.d.ts +32 -34
- package/dist/services/fleet.service.d.ts.map +1 -1
- package/dist/services/fleet.service.js +66 -10
- package/dist/services/fleet.service.js.map +1 -1
- package/dist/services/health-check.rpc-service.d.ts +2 -1
- package/dist/services/health-check.rpc-service.d.ts.map +1 -1
- package/dist/services/health-check.rpc-service.js.map +1 -1
- package/dist/services/health-check.service.d.ts +50 -36
- package/dist/services/health-check.service.d.ts.map +1 -1
- package/dist/services/health-check.service.js +179 -182
- package/dist/services/health-check.service.js.map +1 -1
- package/dist/services/host-operation-barrier.d.ts +8 -0
- package/dist/services/host-operation-barrier.d.ts.map +1 -0
- package/dist/services/host-operation-barrier.js +44 -0
- package/dist/services/host-operation-barrier.js.map +1 -0
- package/dist/services/host-upgrade.d.ts +129 -0
- package/dist/services/host-upgrade.d.ts.map +1 -0
- package/dist/services/host-upgrade.js +352 -0
- package/dist/services/host-upgrade.js.map +1 -0
- package/dist/services/infrastructure.rpc-service.d.ts +312 -2
- package/dist/services/infrastructure.rpc-service.d.ts.map +1 -1
- package/dist/services/infrastructure.rpc-service.js +584 -11
- package/dist/services/infrastructure.rpc-service.js.map +1 -1
- package/dist/services/kubernetes.rpc-service.d.ts +2 -1
- package/dist/services/kubernetes.rpc-service.d.ts.map +1 -1
- package/dist/services/kubernetes.rpc-service.js.map +1 -1
- package/dist/services/kubernetes.service.d.ts +5 -39
- package/dist/services/kubernetes.service.d.ts.map +1 -1
- package/dist/services/kubernetes.service.js +29 -5
- package/dist/services/kubernetes.service.js.map +1 -1
- package/dist/services/local-bundle.d.ts +160 -0
- package/dist/services/local-bundle.d.ts.map +1 -0
- package/dist/services/local-bundle.js +242 -0
- package/dist/services/local-bundle.js.map +1 -0
- package/dist/services/lockout.d.ts +28 -0
- package/dist/services/lockout.d.ts.map +1 -0
- package/dist/services/lockout.js +41 -0
- package/dist/services/lockout.js.map +1 -0
- package/dist/services/log-collector.rpc-service.d.ts +16 -0
- package/dist/services/log-collector.rpc-service.d.ts.map +1 -1
- package/dist/services/log-collector.rpc-service.js +16 -0
- package/dist/services/log-collector.rpc-service.js.map +1 -1
- package/dist/services/log-collector.service.d.ts +172 -54
- package/dist/services/log-collector.service.d.ts.map +1 -1
- package/dist/services/log-collector.service.js +492 -102
- package/dist/services/log-collector.service.js.map +1 -1
- package/dist/services/log-retention.d.ts +50 -0
- package/dist/services/log-retention.d.ts.map +1 -0
- package/dist/services/log-retention.js +52 -0
- package/dist/services/log-retention.js.map +1 -0
- package/dist/services/maintenance-lock.d.ts +162 -0
- package/dist/services/maintenance-lock.d.ts.map +1 -0
- package/dist/services/maintenance-lock.js +316 -0
- package/dist/services/maintenance-lock.js.map +1 -0
- package/dist/services/master-address.d.ts +107 -0
- package/dist/services/master-address.d.ts.map +1 -0
- package/dist/services/master-address.js +154 -0
- package/dist/services/master-address.js.map +1 -0
- package/dist/services/migration-output.d.ts +16 -0
- package/dist/services/migration-output.d.ts.map +1 -0
- package/dist/services/migration-output.js +22 -0
- package/dist/services/migration-output.js.map +1 -0
- package/dist/services/netron-telemetry-transport.d.ts.map +1 -1
- package/dist/services/netron-telemetry-transport.js.map +1 -1
- package/dist/services/node-deploy-lease.d.ts +171 -0
- package/dist/services/node-deploy-lease.d.ts.map +1 -0
- package/dist/services/node-deploy-lease.js +460 -0
- package/dist/services/node-deploy-lease.js.map +1 -0
- package/dist/services/node-health.repository.d.ts +63 -4
- package/dist/services/node-health.repository.d.ts.map +1 -1
- package/dist/services/node-health.repository.js +108 -67
- package/dist/services/node-health.repository.js.map +1 -1
- package/dist/services/node-manager.rpc-service.d.ts +360 -10
- package/dist/services/node-manager.rpc-service.d.ts.map +1 -1
- package/dist/services/node-manager.rpc-service.js +754 -34
- package/dist/services/node-manager.rpc-service.js.map +1 -1
- package/dist/services/node-manager.service.d.ts +267 -95
- package/dist/services/node-manager.service.d.ts.map +1 -1
- package/dist/services/node-manager.service.js +805 -103
- package/dist/services/node-manager.service.js.map +1 -1
- package/dist/services/node-upgrade.d.ts +129 -0
- package/dist/services/node-upgrade.d.ts.map +1 -0
- package/dist/services/node-upgrade.js +161 -0
- package/dist/services/node-upgrade.js.map +1 -0
- package/dist/services/node-upgrade.service.d.ts +232 -0
- package/dist/services/node-upgrade.service.d.ts.map +1 -0
- package/dist/services/node-upgrade.service.js +468 -0
- package/dist/services/node-upgrade.service.js.map +1 -0
- package/dist/services/pipeline.rpc-service.d.ts +6 -1
- package/dist/services/pipeline.rpc-service.d.ts.map +1 -1
- package/dist/services/pipeline.rpc-service.js +9 -0
- package/dist/services/pipeline.rpc-service.js.map +1 -1
- package/dist/services/pipeline.service.d.ts +17 -46
- package/dist/services/pipeline.service.d.ts.map +1 -1
- package/dist/services/pipeline.service.js +84 -9
- package/dist/services/pipeline.service.js.map +1 -1
- package/dist/services/project.rpc-service.d.ts +140 -5
- package/dist/services/project.rpc-service.d.ts.map +1 -1
- package/dist/services/project.rpc-service.js +260 -22
- package/dist/services/project.rpc-service.js.map +1 -1
- package/dist/services/project.service.d.ts +687 -15
- package/dist/services/project.service.d.ts.map +1 -1
- package/dist/services/project.service.js +2846 -337
- package/dist/services/project.service.js.map +1 -1
- package/dist/services/redeploy-decision.d.ts +176 -0
- package/dist/services/redeploy-decision.d.ts.map +1 -0
- package/dist/services/redeploy-decision.js +142 -0
- package/dist/services/redeploy-decision.js.map +1 -0
- package/dist/services/release.rpc-service.d.ts +159 -0
- package/dist/services/release.rpc-service.d.ts.map +1 -0
- package/dist/services/release.rpc-service.js +395 -0
- package/dist/services/release.rpc-service.js.map +1 -0
- package/dist/services/release.service.d.ts +114 -0
- package/dist/services/release.service.d.ts.map +1 -0
- package/dist/services/release.service.js +208 -0
- package/dist/services/release.service.js.map +1 -0
- package/dist/services/remote-deployer.service.d.ts +580 -8
- package/dist/services/remote-deployer.service.d.ts.map +1 -1
- package/dist/services/remote-deployer.service.js +1786 -169
- package/dist/services/remote-deployer.service.js.map +1 -1
- package/dist/services/remote-ops.service.d.ts +51 -9
- package/dist/services/remote-ops.service.d.ts.map +1 -1
- package/dist/services/remote-ops.service.js +235 -39
- package/dist/services/remote-ops.service.js.map +1 -1
- package/dist/services/remote-provisioner.d.ts +124 -0
- package/dist/services/remote-provisioner.d.ts.map +1 -0
- package/dist/services/remote-provisioner.js +258 -0
- package/dist/services/remote-provisioner.js.map +1 -0
- package/dist/services/secrets.rpc-service.d.ts +51 -2
- package/dist/services/secrets.rpc-service.d.ts.map +1 -1
- package/dist/services/secrets.rpc-service.js +81 -2
- package/dist/services/secrets.rpc-service.js.map +1 -1
- package/dist/services/secrets.service.d.ts +108 -9
- package/dist/services/secrets.service.d.ts.map +1 -1
- package/dist/services/secrets.service.js +313 -48
- package/dist/services/secrets.service.js.map +1 -1
- package/dist/services/slave-storage.service.d.ts +107 -0
- package/dist/services/slave-storage.service.d.ts.map +1 -1
- package/dist/services/slave-storage.service.js +171 -2
- package/dist/services/slave-storage.service.js.map +1 -1
- package/dist/services/static-carry-forward.d.ts +110 -0
- package/dist/services/static-carry-forward.d.ts.map +1 -0
- package/dist/services/static-carry-forward.js +433 -0
- package/dist/services/static-carry-forward.js.map +1 -0
- package/dist/services/sync-policy.d.ts +167 -0
- package/dist/services/sync-policy.d.ts.map +1 -0
- package/dist/services/sync-policy.js +161 -0
- package/dist/services/sync-policy.js.map +1 -0
- package/dist/services/sync-summary.d.ts +39 -0
- package/dist/services/sync-summary.d.ts.map +1 -0
- package/dist/services/sync-summary.js +62 -0
- package/dist/services/sync-summary.js.map +1 -0
- package/dist/services/sync.rpc-service.d.ts +19 -7
- package/dist/services/sync.rpc-service.d.ts.map +1 -1
- package/dist/services/sync.rpc-service.js +36 -5
- package/dist/services/sync.rpc-service.js.map +1 -1
- package/dist/services/sync.service.d.ts +350 -18
- package/dist/services/sync.service.d.ts.map +1 -1
- package/dist/services/sync.service.js +864 -116
- package/dist/services/sync.service.js.map +1 -1
- package/dist/services/system-info.rpc-service.d.ts +2 -1
- package/dist/services/system-info.rpc-service.d.ts.map +1 -1
- package/dist/services/system-info.rpc-service.js.map +1 -1
- package/dist/services/system-info.service.d.ts +56 -68
- package/dist/services/system-info.service.d.ts.map +1 -1
- package/dist/services/system-info.service.js +240 -127
- package/dist/services/system-info.service.js.map +1 -1
- package/dist/services/telemetry.rpc-service.d.ts.map +1 -1
- package/dist/services/telemetry.rpc-service.js +9 -3
- package/dist/services/telemetry.rpc-service.js.map +1 -1
- package/dist/services/telemetry.service.d.ts +4 -2
- package/dist/services/telemetry.service.d.ts.map +1 -1
- package/dist/services/telemetry.service.js +4 -2
- package/dist/services/telemetry.service.js.map +1 -1
- package/dist/services/trace-collector.rpc-service.d.ts +2 -1
- package/dist/services/trace-collector.rpc-service.d.ts.map +1 -1
- package/dist/services/trace-collector.rpc-service.js.map +1 -1
- package/dist/services/trace-collector.service.d.ts +2 -41
- package/dist/services/trace-collector.service.d.ts.map +1 -1
- package/dist/services/trace-collector.service.js +27 -7
- package/dist/services/trace-collector.service.js.map +1 -1
- package/dist/services/wait-for-postgres.d.ts +28 -0
- package/dist/services/wait-for-postgres.d.ts.map +1 -0
- package/dist/services/wait-for-postgres.js +77 -0
- package/dist/services/wait-for-postgres.js.map +1 -0
- package/dist/shared/alert-expression.d.ts +60 -0
- package/dist/shared/alert-expression.d.ts.map +1 -0
- package/dist/shared/alert-expression.js +124 -0
- package/dist/shared/alert-expression.js.map +1 -0
- package/dist/shared/audit-outcome.d.ts +39 -0
- package/dist/shared/audit-outcome.d.ts.map +1 -0
- package/dist/shared/audit-outcome.js +45 -0
- package/dist/shared/audit-outcome.js.map +1 -0
- package/dist/shared/build-freshness.d.ts +59 -0
- package/dist/shared/build-freshness.d.ts.map +1 -0
- package/dist/shared/build-freshness.js +113 -0
- package/dist/shared/build-freshness.js.map +1 -0
- package/dist/shared/build-stamp.d.ts +26 -0
- package/dist/shared/build-stamp.d.ts.map +1 -0
- package/dist/shared/build-stamp.js +36 -0
- package/dist/shared/build-stamp.js.map +1 -0
- package/dist/shared/describe-error.d.ts +22 -0
- package/dist/shared/describe-error.d.ts.map +1 -0
- package/dist/shared/describe-error.js +39 -0
- package/dist/shared/describe-error.js.map +1 -0
- package/dist/shared/dto/alerts.d.ts +101 -0
- package/dist/shared/dto/alerts.d.ts.map +1 -0
- package/dist/shared/dto/alerts.js +9 -0
- package/dist/shared/dto/alerts.js.map +1 -0
- package/dist/shared/dto/auth.d.ts +49 -0
- package/dist/shared/dto/auth.d.ts.map +1 -0
- package/dist/shared/dto/auth.js +14 -0
- package/dist/shared/dto/auth.js.map +1 -0
- package/dist/shared/dto/backups.d.ts +16 -0
- package/dist/shared/dto/backups.d.ts.map +1 -0
- package/dist/shared/dto/backups.js +9 -0
- package/dist/shared/dto/backups.js.map +1 -0
- package/dist/shared/dto/deploy.d.ts +28 -0
- package/dist/shared/dto/deploy.d.ts.map +1 -0
- package/dist/shared/dto/deploy.js +8 -0
- package/dist/shared/dto/deploy.js.map +1 -0
- package/dist/shared/dto/discovery.d.ts +24 -0
- package/dist/shared/dto/discovery.d.ts.map +1 -0
- package/dist/shared/dto/discovery.js +9 -0
- package/dist/shared/dto/discovery.js.map +1 -0
- package/dist/shared/dto/fleet.d.ts +35 -0
- package/dist/shared/dto/fleet.d.ts.map +1 -0
- package/dist/shared/dto/fleet.js +8 -0
- package/dist/shared/dto/fleet.js.map +1 -0
- package/dist/shared/dto/health.d.ts +26 -0
- package/dist/shared/dto/health.d.ts.map +1 -0
- package/dist/shared/dto/health.js +9 -0
- package/dist/shared/dto/health.js.map +1 -0
- package/dist/shared/dto/kubernetes.d.ts +44 -0
- package/dist/shared/dto/kubernetes.d.ts.map +1 -0
- package/dist/shared/dto/kubernetes.js +9 -0
- package/dist/shared/dto/kubernetes.js.map +1 -0
- package/dist/shared/dto/logs.d.ts +77 -0
- package/dist/shared/dto/logs.d.ts.map +1 -0
- package/dist/shared/dto/logs.js +10 -0
- package/dist/shared/dto/logs.js.map +1 -0
- package/dist/shared/dto/metrics.d.ts +65 -0
- package/dist/shared/dto/metrics.d.ts.map +1 -0
- package/dist/shared/dto/metrics.js +17 -0
- package/dist/shared/dto/metrics.js.map +1 -0
- package/dist/shared/dto/nodes.d.ts +347 -0
- package/dist/shared/dto/nodes.d.ts.map +1 -0
- package/dist/shared/dto/nodes.js +8 -0
- package/dist/shared/dto/nodes.js.map +1 -0
- package/dist/shared/dto/pipelines.d.ts +53 -0
- package/dist/shared/dto/pipelines.d.ts.map +1 -0
- package/dist/shared/dto/pipelines.js +9 -0
- package/dist/shared/dto/pipelines.js.map +1 -0
- package/dist/shared/dto/project.d.ts +142 -8
- package/dist/shared/dto/project.d.ts.map +1 -1
- package/dist/shared/dto/services.d.ts +858 -7
- package/dist/shared/dto/services.d.ts.map +1 -1
- package/dist/shared/dto/system-info.d.ts +93 -0
- package/dist/shared/dto/system-info.d.ts.map +1 -0
- package/dist/shared/dto/system-info.js +9 -0
- package/dist/shared/dto/system-info.js.map +1 -0
- package/dist/shared/dto/traces.d.ts +49 -0
- package/dist/shared/dto/traces.d.ts.map +1 -0
- package/dist/shared/dto/traces.js +9 -0
- package/dist/shared/dto/traces.js.map +1 -0
- package/dist/shared/env-config.d.ts +74 -0
- package/dist/shared/env-config.d.ts.map +1 -0
- package/dist/shared/env-config.js +99 -0
- package/dist/shared/env-config.js.map +1 -0
- package/dist/shared/events.d.ts +45 -39
- package/dist/shared/events.d.ts.map +1 -1
- package/dist/shared/events.js +6 -0
- package/dist/shared/events.js.map +1 -1
- package/dist/shared/format.d.ts +1 -1
- package/dist/shared/format.d.ts.map +1 -1
- package/dist/shared/format.js +4 -0
- package/dist/shared/format.js.map +1 -1
- package/dist/shared/local-infra-host.d.ts +28 -0
- package/dist/shared/local-infra-host.d.ts.map +1 -0
- package/dist/shared/local-infra-host.js +28 -0
- package/dist/shared/local-infra-host.js.map +1 -0
- package/dist/shared/node-check.d.ts +37 -0
- package/dist/shared/node-check.d.ts.map +1 -0
- package/dist/shared/node-check.js +41 -0
- package/dist/shared/node-check.js.map +1 -0
- package/dist/shared/paths.d.ts +29 -0
- package/dist/shared/paths.d.ts.map +1 -0
- package/dist/shared/paths.js +54 -0
- package/dist/shared/paths.js.map +1 -0
- package/dist/shared/pnpm.d.ts +29 -0
- package/dist/shared/pnpm.d.ts.map +1 -0
- package/dist/shared/pnpm.js +57 -0
- package/dist/shared/pnpm.js.map +1 -0
- package/dist/shared/private-files.d.ts +29 -0
- package/dist/shared/private-files.d.ts.map +1 -0
- package/dist/shared/private-files.js +109 -0
- package/dist/shared/private-files.js.map +1 -0
- package/dist/shared/redact-env.d.ts +24 -0
- package/dist/shared/redact-env.d.ts.map +1 -0
- package/dist/shared/redact-env.js +36 -0
- package/dist/shared/redact-env.js.map +1 -0
- package/dist/shared/release-reading.d.ts +85 -0
- package/dist/shared/release-reading.d.ts.map +1 -0
- package/dist/shared/release-reading.js +81 -0
- package/dist/shared/release-reading.js.map +1 -0
- package/dist/shared/roles.d.ts +58 -3
- package/dist/shared/roles.d.ts.map +1 -1
- package/dist/shared/roles.js +55 -0
- package/dist/shared/roles.js.map +1 -1
- package/dist/shared/rpcauth.d.ts +13 -0
- package/dist/shared/rpcauth.d.ts.map +1 -0
- package/dist/shared/rpcauth.js +23 -0
- package/dist/shared/rpcauth.js.map +1 -0
- package/dist/shared/shell-escape.d.ts +9 -0
- package/dist/shared/shell-escape.d.ts.map +1 -0
- package/dist/shared/shell-escape.js +11 -0
- package/dist/shared/shell-escape.js.map +1 -0
- package/dist/shared/sync-reading.d.ts +45 -0
- package/dist/shared/sync-reading.d.ts.map +1 -0
- package/dist/shared/sync-reading.js +42 -0
- package/dist/shared/sync-reading.js.map +1 -0
- package/dist/shared/tokens.d.ts +19 -0
- package/dist/shared/tokens.d.ts.map +1 -1
- package/dist/shared/tokens.js +28 -0
- package/dist/shared/tokens.js.map +1 -1
- package/dist/webapp/webapp.service.d.ts +33 -2
- package/dist/webapp/webapp.service.d.ts.map +1 -1
- package/dist/webapp/webapp.service.js +143 -31
- package/dist/webapp/webapp.service.js.map +1 -1
- package/dist/workers/health-monitor-process.d.ts.map +1 -1
- package/dist/workers/health-monitor-process.js +10 -0
- package/dist/workers/health-monitor-process.js.map +1 -1
- package/dist/workers/health-monitor.service.d.ts +45 -3
- package/dist/workers/health-monitor.service.d.ts.map +1 -1
- package/dist/workers/health-monitor.service.js +152 -25
- package/dist/workers/health-monitor.service.js.map +1 -1
- package/dist/workers/system-worker-manager.d.ts +43 -0
- package/dist/workers/system-worker-manager.d.ts.map +1 -1
- package/dist/workers/system-worker-manager.js +150 -3
- package/dist/workers/system-worker-manager.js.map +1 -1
- package/dist/workers/types.d.ts +8 -2
- package/dist/workers/types.d.ts.map +1 -1
- package/package.json +68 -30
- package/webapp/dist/BUILD.json +5 -0
- package/webapp/dist/assets/FormControlLabel-BbSxpQwN.js +1 -0
- package/webapp/dist/assets/Grid-DizFZYue.js +1 -0
- package/webapp/dist/assets/Switch-Bfiqzx8l.js +1 -0
- package/webapp/dist/assets/alerts-DH_RVRS3.js +1 -0
- package/webapp/dist/assets/apps-B96355sz.js +1 -0
- package/webapp/dist/assets/audit-CYGtbi4k.js +1 -0
- package/webapp/dist/assets/client-BmqFExWT.js +1 -0
- package/webapp/dist/assets/constants-veKGFkC6.js +1 -0
- package/webapp/dist/assets/containers-B_TpThln.js +2 -0
- package/webapp/dist/assets/daemon-memory-CCPZ4cV_.js +1 -0
- package/webapp/dist/assets/dashboard-DHf2_65N.js +1 -0
- package/webapp/dist/assets/dashboard-builder-CWY2pjeG.js +1 -0
- package/webapp/dist/assets/deploy-release-dialog-Dp-zpSAd.js +1 -0
- package/webapp/dist/assets/deployments-tJI6O3fK.js +1 -0
- package/webapp/dist/assets/detail-B2zP1Hto.js +8 -0
- package/webapp/dist/assets/detail-CoIrwmsy.js +1 -0
- package/webapp/dist/assets/detail-DWaGaOtL.js +2 -0
- package/webapp/dist/assets/formatters-BqjL73N3.js +1 -0
- package/webapp/dist/assets/index-Dvo0iprx.css +1 -0
- package/webapp/dist/assets/index-vMnY_4jR.js +412 -0
- package/webapp/dist/assets/logs-DTRjOfX8.js +12 -0
- package/webapp/dist/assets/maplibre-gl-DowHoZAx.js +814 -0
- package/webapp/dist/assets/metrics-UCajtdox.js +2 -0
- package/webapp/dist/assets/nodes-DuTVU0f6.js +7 -0
- package/webapp/dist/assets/pipelines-C8BeDcAl.js +4 -0
- package/webapp/dist/assets/projects-Dp_zFfLY.js +1 -0
- package/webapp/dist/assets/react-DlmbjZJV.js +1 -0
- package/webapp/dist/assets/react-apexcharts.esm-C8pn45ml.js +97 -0
- package/webapp/dist/assets/release-bits-BzTKz5fM.js +1 -0
- package/webapp/dist/assets/release-build-panel-DcW9YcXQ.js +1 -0
- package/webapp/dist/assets/releases-B4hcr1bE.js +2 -0
- package/webapp/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/webapp/dist/assets/settings-DIteZTbe.js +1 -0
- package/webapp/dist/assets/settled-pair-C7SjZuns.js +1 -0
- package/webapp/dist/assets/sign-in-D4kMBOHp.js +1 -0
- package/webapp/dist/assets/stacks-Brnf-EB7.js +1 -0
- package/webapp/dist/assets/sync-reading-C3PnJ7AX.js +1 -0
- package/webapp/dist/assets/system-info-CFDNVKkU.js +1 -0
- package/webapp/dist/assets/topology-7WeTUsDN.js +12 -0
- package/webapp/dist/assets/topology-DLioOiRN.css +1 -0
- package/webapp/dist/assets/traces-9c3gwCN-.js +1 -0
- package/webapp/dist/assets/use-stack-context-CnA5FTHu.js +1 -0
- package/webapp/dist/index.html +6 -6
- package/dist/commands/dev.d.ts +0 -23
- package/dist/commands/dev.d.ts.map +0 -1
- package/dist/commands/dev.js +0 -76
- package/dist/commands/dev.js.map +0 -1
- package/dist/config/define-app.d.ts +0 -6
- package/dist/config/define-app.d.ts.map +0 -1
- package/dist/config/define-app.js +0 -38
- package/dist/config/define-app.js.map +0 -1
- package/dist/infrastructure/gateway-generator.d.ts +0 -63
- package/dist/infrastructure/gateway-generator.d.ts.map +0 -1
- package/dist/infrastructure/gateway-generator.js +0 -253
- package/dist/infrastructure/gateway-generator.js.map +0 -1
- package/dist/monitoring/health.service.d.ts +0 -14
- package/dist/monitoring/health.service.d.ts.map +0 -1
- package/dist/monitoring/health.service.js +0 -50
- package/dist/monitoring/health.service.js.map +0 -1
- package/dist/monitoring/metrics.service.d.ts +0 -14
- package/dist/monitoring/metrics.service.d.ts.map +0 -1
- package/dist/monitoring/metrics.service.js +0 -40
- package/dist/monitoring/metrics.service.js.map +0 -1
- package/dist/orchestrator/bootstrap-runner.d.ts +0 -15
- package/dist/orchestrator/bootstrap-runner.d.ts.map +0 -1
- package/dist/orchestrator/bootstrap-runner.js +0 -152
- package/dist/orchestrator/bootstrap-runner.js.map +0 -1
- package/dist/orchestrator/topology-proxy.d.ts +0 -65
- package/dist/orchestrator/topology-proxy.d.ts.map +0 -1
- package/dist/orchestrator/topology-proxy.js +0 -209
- package/dist/orchestrator/topology-proxy.js.map +0 -1
- package/dist/orchestrator/topology-relay.d.ts +0 -111
- package/dist/orchestrator/topology-relay.d.ts.map +0 -1
- package/dist/orchestrator/topology-relay.js +0 -255
- package/dist/orchestrator/topology-relay.js.map +0 -1
- package/dist/services/auth-middleware.d.ts +0 -47
- package/dist/services/auth-middleware.d.ts.map +0 -1
- package/dist/services/auth-middleware.js +0 -158
- package/dist/services/auth-middleware.js.map +0 -1
- package/dist/services/environment.rpc-service.d.ts +0 -22
- package/dist/services/environment.rpc-service.d.ts.map +0 -1
- package/dist/services/environment.rpc-service.js +0 -65
- package/dist/services/environment.rpc-service.js.map +0 -1
- package/dist/services/environment.service.d.ts +0 -87
- package/dist/services/environment.service.d.ts.map +0 -1
- package/dist/services/environment.service.js +0 -220
- package/dist/services/environment.service.js.map +0 -1
- package/dist/services/metrics-collector.service.d.ts +0 -103
- package/dist/services/metrics-collector.service.d.ts.map +0 -1
- package/dist/services/metrics-collector.service.js +0 -235
- package/dist/services/metrics-collector.service.js.map +0 -1
- package/dist/services/metrics.rpc-service.d.ts +0 -41
- package/dist/services/metrics.rpc-service.d.ts.map +0 -1
- package/dist/services/metrics.rpc-service.js +0 -90
- package/dist/services/metrics.rpc-service.js.map +0 -1
- package/dist/services/metrics.service.d.ts +0 -72
- package/dist/services/metrics.service.d.ts.map +0 -1
- package/dist/services/metrics.service.js +0 -185
- package/dist/services/metrics.service.js.map +0 -1
- package/dist/supervisor/omnitron-supervisor.d.ts +0 -21
- package/dist/supervisor/omnitron-supervisor.d.ts.map +0 -1
- package/dist/supervisor/omnitron-supervisor.js +0 -43
- package/dist/supervisor/omnitron-supervisor.js.map +0 -1
- package/dist/webapp/static-server.d.ts +0 -24
- package/dist/webapp/static-server.d.ts.map +0 -1
- package/dist/webapp/static-server.js +0 -152
- package/dist/webapp/static-server.js.map +0 -1
- package/webapp/dist/assets/Badge-D2ZBP5iK.js +0 -1
- package/webapp/dist/assets/Card-vO88g06B.js +0 -1
- package/webapp/dist/assets/CardActions-C9h7Q2wW.js +0 -1
- package/webapp/dist/assets/CardContent-BA_Xmmhk.js +0 -1
- package/webapp/dist/assets/CardHeader-ceIs__6x.js +0 -1
- package/webapp/dist/assets/Chip-Ckk0xUhK.js +0 -1
- package/webapp/dist/assets/DialogActions-BhHM7hov.js +0 -1
- package/webapp/dist/assets/DialogContentText-BT2JQRmK.js +0 -1
- package/webapp/dist/assets/FormControlLabel-CcQByVS8.js +0 -1
- package/webapp/dist/assets/Grid-14PETRQW.js +0 -1
- package/webapp/dist/assets/InputAdornment-B8aHIsQ7.js +0 -1
- package/webapp/dist/assets/Skeleton-B74-Ds6O.js +0 -37
- package/webapp/dist/assets/Switch-DvWD2wh4.js +0 -1
- package/webapp/dist/assets/SwitchBase-CDU4nY8O.js +0 -1
- package/webapp/dist/assets/Tab-DcCOYYp5.js +0 -1
- package/webapp/dist/assets/TableContainer-CzTh4mu-.js +0 -1
- package/webapp/dist/assets/TableRow-BySEreZR.js +0 -2
- package/webapp/dist/assets/TextField-BLf-BHz2.js +0 -1
- package/webapp/dist/assets/alerts-DnRbT41C.js +0 -1
- package/webapp/dist/assets/apps-CdR0VH2d.js +0 -1
- package/webapp/dist/assets/chunk-DtcAfS_W.js +0 -1
- package/webapp/dist/assets/client-DU8I_lDc.js +0 -2
- package/webapp/dist/assets/constants-BgnT-Xdy.js +0 -1
- package/webapp/dist/assets/containers-Dw-rRXV1.js +0 -1
- package/webapp/dist/assets/dashboard-CzgB0uZz.js +0 -1
- package/webapp/dist/assets/dashboard-builder-DsA0yg33.js +0 -1
- package/webapp/dist/assets/deployments-DtQAoIcQ.js +0 -1
- package/webapp/dist/assets/detail-BJR-G7JG.js +0 -1
- package/webapp/dist/assets/detail-nlCeSltl.js +0 -8
- package/webapp/dist/assets/formatters-Do41SRmE.js +0 -1
- package/webapp/dist/assets/index-ByQDwp2r.js +0 -566
- package/webapp/dist/assets/index-CHVXOsTS.css +0 -1
- package/webapp/dist/assets/isMuiElement-DwF2naaF.js +0 -1
- package/webapp/dist/assets/logs-Kn8o4H7k.js +0 -11
- package/webapp/dist/assets/metrics-DN8Zu5wT.js +0 -2
- package/webapp/dist/assets/nodes-Bgch7AtN.js +0 -7
- package/webapp/dist/assets/pipelines-Cry3qm-S.js +0 -4
- package/webapp/dist/assets/popper-BJFSj6rc.js +0 -1
- package/webapp/dist/assets/preload-helper-DSXbuxSR.js +0 -1
- package/webapp/dist/assets/projects-Dym2GI1U.js +0 -1
- package/webapp/dist/assets/react-apexcharts.esm-CSGK5Cxn.js +0 -958
- package/webapp/dist/assets/react-apexcharts.esm-DEAWOwx5.js +0 -1003
- package/webapp/dist/assets/settings-va3zTcow.js +0 -1
- package/webapp/dist/assets/sign-in-ik35umbp.js +0 -1
- package/webapp/dist/assets/stacks-CVFOnxbF.js +0 -1
- package/webapp/dist/assets/system-info-npIXAjX2.js +0 -1
- package/webapp/dist/assets/topology-CHpVij2M.css +0 -1
- package/webapp/dist/assets/topology-bDe70vLs.js +0 -12
- package/webapp/dist/assets/traces-DIIcT8DF.js +0 -1
- package/webapp/dist/assets/use-stack-context-DHLwZv1r.js +0 -1
- /package/webapp/dist/assets/{fs-CgZLtHiQ.js → fs-Ccl3sAcp.js} +0 -0
|
@@ -0,0 +1,1159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Building the bundle the planner describes.
|
|
3
|
+
*
|
|
4
|
+
* `local-bundle.ts` decides what travels; this puts it on disk. Kept apart
|
|
5
|
+
* because the decision is where the mistakes live and the decision is pure —
|
|
6
|
+
* this half runs `pnpm pack` and writes files, and can only be checked by
|
|
7
|
+
* doing it.
|
|
8
|
+
*
|
|
9
|
+
* The layout:
|
|
10
|
+
*
|
|
11
|
+
* <out>/package.json root manifest: file: deps + overrides
|
|
12
|
+
* <out>/dist/ the built daemon
|
|
13
|
+
* <out>/webapp/dist/ the console
|
|
14
|
+
* <out>/vendor/*.tgz every workspace package, packed
|
|
15
|
+
* <out>/BUNDLE.json what this is, and what it was built from
|
|
16
|
+
*
|
|
17
|
+
* `node_modules` is deliberately absent. It is the one thing that must NOT
|
|
18
|
+
* travel: a tree installed here carries `@esbuild/darwin-arm64` and no
|
|
19
|
+
* `linux-x64`, and the target is the only machine that knows what it is.
|
|
20
|
+
*/
|
|
21
|
+
import fs from 'node:fs';
|
|
22
|
+
import os from 'node:os';
|
|
23
|
+
import path from 'node:path';
|
|
24
|
+
import { execFile } from 'node:child_process';
|
|
25
|
+
import { promisify } from 'node:util';
|
|
26
|
+
import { resolvePnpm } from '../shared/pnpm.js';
|
|
27
|
+
import { readBuildStamp } from '../shared/build-stamp.js';
|
|
28
|
+
import { planBundle, bundleRootManifest, isLinkRange, localVersion, VENDOR_DIR, } from './local-bundle.js';
|
|
29
|
+
const exec = promisify(execFile);
|
|
30
|
+
/**
|
|
31
|
+
* Find the repository root from a directory inside it.
|
|
32
|
+
*
|
|
33
|
+
* `process.cwd()` is where the operator was standing, and for a command run
|
|
34
|
+
* from `apps/omnitron` that is two levels below the packages it needs to
|
|
35
|
+
* bundle. Measured: `fleet upgrade` from the package directory reported
|
|
36
|
+
* "@omnitron-dev/omnitron is not a package in this workspace" — true of the
|
|
37
|
+
* directory it was given, and useless about the mistake.
|
|
38
|
+
*
|
|
39
|
+
* `pnpm-workspace.yaml` is the marker, because it is what defines the
|
|
40
|
+
* workspace this file reads. Null rather than a guess when there is none.
|
|
41
|
+
*/
|
|
42
|
+
export function findWorkspaceRoot(from) {
|
|
43
|
+
let dir = path.resolve(from);
|
|
44
|
+
for (;;) {
|
|
45
|
+
if (fs.existsSync(path.join(dir, 'pnpm-workspace.yaml')))
|
|
46
|
+
return dir;
|
|
47
|
+
const parent = path.dirname(dir);
|
|
48
|
+
if (parent === dir)
|
|
49
|
+
return null;
|
|
50
|
+
dir = parent;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Why `fleet upgrade` must not build from here — or null.
|
|
55
|
+
*
|
|
56
|
+
* Three refusals, each naming the place rather than a package. No workspace
|
|
57
|
+
* above the directory. A workspace, but somebody else's: run from
|
|
58
|
+
* `~/projects/examples/sample`, the command found sample's root and failed inside the
|
|
59
|
+
* bundler with «@omnitron-dev/omnitron is not a package in this workspace»,
|
|
60
|
+
* which reads as a broken omnitron checkout (`planBundle` keeps that refusal
|
|
61
|
+
* for callers that arrive some other way). And a tree with uncommitted
|
|
62
|
+
* changes: the version a node reports names the commit, so a bundle built
|
|
63
|
+
* from a dirty tree is a node reporting a commit that is not what it runs —
|
|
64
|
+
* the record that outlives everyone who knew. That one is lifted only by
|
|
65
|
+
* `--allow-dirty`, as for `stack start`.
|
|
66
|
+
*/
|
|
67
|
+
export function upgradeWorkspaceRefusal(input) {
|
|
68
|
+
if (!input.root) {
|
|
69
|
+
return `This command builds omnitron from source, and there is no workspace above ${input.cwd}. Run it from inside the omnitron repository.`;
|
|
70
|
+
}
|
|
71
|
+
if (!input.hasOmnitron) {
|
|
72
|
+
return (`This command builds omnitron from source, and ${input.root} is a workspace — but not omnitron's: ` +
|
|
73
|
+
`it holds no ${OMNITRON_PACKAGE}. Run it from inside the omnitron repository.`);
|
|
74
|
+
}
|
|
75
|
+
if (input.dirty && !input.allowDirty) {
|
|
76
|
+
return (`The omnitron working tree at ${input.root} has uncommitted changes, and a node would report a version ` +
|
|
77
|
+
`naming a commit that is not what it runs. Commit or stash them, or pass --allow-dirty to ship this disk deliberately.`);
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Read every workspace package's manifest.
|
|
83
|
+
*
|
|
84
|
+
* The root is resolved to an absolute path first, and every directory
|
|
85
|
+
* recorded below is absolute too. `pnpm --dir` resolves a relative path
|
|
86
|
+
* against ITS OWN working directory, not against the caller's — so a
|
|
87
|
+
* `workspaceRoot` of `../..` produced `/Users/taaliman/projects/luxquant/
|
|
88
|
+
* packages`, two levels above where it meant, and the error named a
|
|
89
|
+
* directory nobody had written down. Paths that cross a process boundary are
|
|
90
|
+
* absolute.
|
|
91
|
+
*/
|
|
92
|
+
/**
|
|
93
|
+
* Read several workspace roots into one map.
|
|
94
|
+
*
|
|
95
|
+
* An app can depend on packages of another checkout — sample declares every
|
|
96
|
+
* omni package as `link:/Users/…/omni/packages/<name>` — and a planner given
|
|
97
|
+
* only the app's own workspace refuses those as missing, which is true of
|
|
98
|
+
* that workspace and useless about the artifact.
|
|
99
|
+
*
|
|
100
|
+
* Earlier roots win a name collision: the first root is the one whose package
|
|
101
|
+
* is being built, and a package it defines is the one it meant.
|
|
102
|
+
*/
|
|
103
|
+
export function readWorkspaces(roots) {
|
|
104
|
+
const merged = new Map();
|
|
105
|
+
for (const root of roots) {
|
|
106
|
+
for (const [name, manifest] of readWorkspace(root)) {
|
|
107
|
+
if (!merged.has(name))
|
|
108
|
+
merged.set(name, manifest);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return merged;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Every workspace root a manifest's `link:` dependencies are INSTALLED from.
|
|
115
|
+
*
|
|
116
|
+
* Asked of the installed tree first — `<packageDir>/node_modules/<name>` is
|
|
117
|
+
* the link pnpm made, and it is what the package's code actually loads — and
|
|
118
|
+
* of the declared range only when nothing is installed. The two differ where
|
|
119
|
+
* it matters: sample declares every omni package as an ABSOLUTE
|
|
120
|
+
* `link:/Users/…/omni/…`, while its lockfile records them relative, and a
|
|
121
|
+
* release is built in a layout where the relative links land on a clean
|
|
122
|
+
* clone of omni (`release/layout.ts`). Reading the declaration, the release
|
|
123
|
+
* builder's packer found the DEVELOPER'S omni instead: on 2026-09-22 both
|
|
124
|
+
* releases of the day vendored `@omnitron-dev/omnitron` from the working tree
|
|
125
|
+
* — «rebuilding @omnitron-dev/omnitron — src/services/node-upgrade.service.ts
|
|
126
|
+
* is newer than anything in dist», a file edited after the clone was made —
|
|
127
|
+
* and rebuilt the running daemon's own `dist` in passing, uncommitted edits
|
|
128
|
+
* of other sessions included. The install had been checked to resolve inside
|
|
129
|
+
* the clone (98 of 98 links); the packer never asked it.
|
|
130
|
+
*
|
|
131
|
+
* A relative range is resolved against the package's directory, as pnpm
|
|
132
|
+
* resolves it — not against whatever directory this process runs in.
|
|
133
|
+
*/
|
|
134
|
+
export function linkedWorkspaceRoots(manifest, packageDir) {
|
|
135
|
+
const roots = [];
|
|
136
|
+
for (const group of [manifest.dependencies, manifest.optionalDependencies]) {
|
|
137
|
+
for (const [name, range] of Object.entries(group ?? {})) {
|
|
138
|
+
if (!isLinkRange(range))
|
|
139
|
+
continue;
|
|
140
|
+
let target = null;
|
|
141
|
+
if (packageDir) {
|
|
142
|
+
try {
|
|
143
|
+
target = fs.realpathSync(path.join(packageDir, 'node_modules', name));
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// Not installed: the declaration is all there is.
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
target ??= path.resolve(packageDir ?? process.cwd(), range.slice('link:'.length));
|
|
150
|
+
const root = findWorkspaceRoot(target);
|
|
151
|
+
if (root && !roots.includes(root))
|
|
152
|
+
roots.push(root);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return roots;
|
|
156
|
+
}
|
|
157
|
+
export function readWorkspace(workspaceRootInput) {
|
|
158
|
+
const workspaceRoot = path.resolve(workspaceRootInput);
|
|
159
|
+
const found = new Map();
|
|
160
|
+
for (const group of ['packages', 'apps']) {
|
|
161
|
+
const dir = path.join(workspaceRoot, group);
|
|
162
|
+
if (!fs.existsSync(dir))
|
|
163
|
+
continue;
|
|
164
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
165
|
+
if (!entry.isDirectory())
|
|
166
|
+
continue;
|
|
167
|
+
const manifestPath = path.join(dir, entry.name, 'package.json');
|
|
168
|
+
if (!fs.existsSync(manifestPath))
|
|
169
|
+
continue;
|
|
170
|
+
try {
|
|
171
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
172
|
+
if (!manifest.name)
|
|
173
|
+
continue;
|
|
174
|
+
manifest.__dir = path.join(dir, entry.name);
|
|
175
|
+
found.set(manifest.name, manifest);
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// A manifest that does not parse is not a workspace package. The
|
|
179
|
+
// planner refuses later if something needed it.
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return found;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Where packed tarballs are kept for the rest of a run.
|
|
187
|
+
*
|
|
188
|
+
* One directory per process, under the system temp dir. It is not cleaned up
|
|
189
|
+
* here: the cache is handed in by the caller and lives exactly as long as the
|
|
190
|
+
* caller keeps the map, and a directory of tarballs in `TMPDIR` is what the
|
|
191
|
+
* operating system already knows how to reclaim.
|
|
192
|
+
*/
|
|
193
|
+
function cacheDir() {
|
|
194
|
+
const dir = path.join(os.tmpdir(), 'omnitron-pack-cache');
|
|
195
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
196
|
+
return dir;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Where a packed workspace package is kept, named by what is in it.
|
|
200
|
+
*
|
|
201
|
+
* The version is in the name because two versions of one package are two
|
|
202
|
+
* packages; the content hash is in it because during development a version
|
|
203
|
+
* stands still for weeks while the code under it moves, and a cache keyed on
|
|
204
|
+
* the version alone would hand a deployment last week's package under this
|
|
205
|
+
* week's number. Nothing has to be invalidated: a package that changed has a
|
|
206
|
+
* different name here and is packed.
|
|
207
|
+
*/
|
|
208
|
+
export function packedCachePath(cacheRoot, name, version, contentHash) {
|
|
209
|
+
const flat = name.replace(/^@/, '').replace(/\//g, '-');
|
|
210
|
+
return path.join(cacheRoot, `${flat}-${version}-${contentHash.slice(0, 16)}.tgz`);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Remove every incremental-build record a package keeps.
|
|
214
|
+
*
|
|
215
|
+
* `tsc` trusts `tsBuildInfoFile`: if the inputs have not changed since that
|
|
216
|
+
* record was written, it emits nothing and exits zero. The record is written
|
|
217
|
+
* by whatever machine last built, and a `build` script of `rm -rf dist && tsc`
|
|
218
|
+
* removes the OUTPUT while leaving the record saying the output is current —
|
|
219
|
+
* so the build succeeds and `dist` stays exactly as stale as it was.
|
|
220
|
+
*
|
|
221
|
+
* Measured on `@sample/bitcoin-rpc`: `src/errors.ts` dated 2026-09-16,
|
|
222
|
+
* `dist/errors.js` dated 2026-09-10, and `pnpm build` leaving it at
|
|
223
|
+
* 2026-09-10. Six days of source changes that the build refused to emit,
|
|
224
|
+
* silently, with a zero exit code — which is why the staleness guard above
|
|
225
|
+
* has to re-check AFTER building rather than trusting the build.
|
|
226
|
+
*
|
|
227
|
+
* Every spelling, because the path is a per-package choice: the root, `dist`,
|
|
228
|
+
* and `node_modules/.tmp`, which is where a `tsconfig.build.json` in this
|
|
229
|
+
* workspace tends to put it.
|
|
230
|
+
*/
|
|
231
|
+
export function clearBuildInfo(packageDir) {
|
|
232
|
+
const candidates = [
|
|
233
|
+
'tsconfig.tsbuildinfo',
|
|
234
|
+
'.tsbuildinfo',
|
|
235
|
+
'tsconfig.build.tsbuildinfo',
|
|
236
|
+
'dist/tsconfig.tsbuildinfo',
|
|
237
|
+
'dist/.tsbuildinfo',
|
|
238
|
+
'dist/tsconfig.build.tsbuildinfo',
|
|
239
|
+
];
|
|
240
|
+
for (const rel of candidates) {
|
|
241
|
+
try {
|
|
242
|
+
fs.rmSync(path.join(packageDir, rel), { force: true });
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
// Not there, or not ours to remove: the build is what reports.
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// `node_modules/.tmp` is a directory of them, one per tsconfig.
|
|
249
|
+
const tmp = path.join(packageDir, 'node_modules', '.tmp');
|
|
250
|
+
try {
|
|
251
|
+
for (const name of fs.readdirSync(tmp)) {
|
|
252
|
+
if (name.endsWith('.tsbuildinfo'))
|
|
253
|
+
fs.rmSync(path.join(tmp, name), { force: true });
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
// No such directory is the common case.
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* The most recently modified file under a directory, by a filter.
|
|
262
|
+
*
|
|
263
|
+
* `node_modules` and `.git` are skipped: neither says anything about whether
|
|
264
|
+
* this project's own output is current, and walking them turns a handful of
|
|
265
|
+
* `stat` calls into tens of thousands.
|
|
266
|
+
*/
|
|
267
|
+
function newestFile(dir, filter) {
|
|
268
|
+
let best = null;
|
|
269
|
+
const walk = (d) => {
|
|
270
|
+
let entries;
|
|
271
|
+
try {
|
|
272
|
+
entries = fs.readdirSync(d, { withFileTypes: true });
|
|
273
|
+
}
|
|
274
|
+
catch {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
for (const entry of entries) {
|
|
278
|
+
const full = path.join(d, entry.name);
|
|
279
|
+
if (entry.isDirectory()) {
|
|
280
|
+
if (entry.name === 'node_modules' || entry.name === '.git')
|
|
281
|
+
continue;
|
|
282
|
+
walk(full);
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
if (!filter(entry.name))
|
|
286
|
+
continue;
|
|
287
|
+
const mtime = fs.statSync(full).mtimeMs;
|
|
288
|
+
if (!best || mtime > best.mtime)
|
|
289
|
+
best = { file: full, mtime };
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
walk(dir);
|
|
293
|
+
return best;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Whether a built frontend is older than the sources it was built from.
|
|
297
|
+
*
|
|
298
|
+
* The gateway serves `apps/portal/dist` and the deployment ships it exactly
|
|
299
|
+
* as it finds it. Measured on the test stack: the `index.html` on the node
|
|
300
|
+
* was built on 2026-09-10 and **879 source files were newer than it** — so
|
|
301
|
+
* the "test portal", the thing the whole deployment exists to put in front of
|
|
302
|
+
* someone, was ten days behind the tree it was supposedly testing. Nothing
|
|
303
|
+
* said so, because nothing looked.
|
|
304
|
+
*
|
|
305
|
+
* Same reasoning as `staleDist` and a different shape: a frontend has no
|
|
306
|
+
* manifest pointing at its output, so the caller names both directories.
|
|
307
|
+
*
|
|
308
|
+
* **A frontend's sources are not all under its own `src`.** The portal
|
|
309
|
+
* resolves several workspace packages from source through Vite aliases, two
|
|
310
|
+
* of them in a DIFFERENT repository (`@omnitron-dev/prism`,
|
|
311
|
+
* `@omnitron-dev/netron-browser`), so a change confined to the design system
|
|
312
|
+
* left `apps/portal/src` untouched, this check said «current», and the
|
|
313
|
+
* deployment shipped yesterday's bundle. Measured 2026-09-21: all ten «behind
|
|
314
|
+
* its sources» entries in the daemon log name files under `apps/portal/src`,
|
|
315
|
+
* not one came from prism, while prism changed on several of those days.
|
|
316
|
+
*
|
|
317
|
+
* So the sources are the frontend's own `src` PLUS the `src` of every
|
|
318
|
+
* dependency that resolves outside `node_modules` — which is what a workspace
|
|
319
|
+
* link is. Under pnpm every dependency is a symlink (57 of 57 for the
|
|
320
|
+
* portal), so the symlink itself says nothing; the real path does, and seven
|
|
321
|
+
* of the portal's dependencies live outside `node_modules`.
|
|
322
|
+
*
|
|
323
|
+
* The answer names the directories it watched, because the caller logs it:
|
|
324
|
+
* a reader must be able to tell «no linked sources» from «never looked».
|
|
325
|
+
*
|
|
326
|
+
* **Every linked package counts, even one the frontend imports only for its
|
|
327
|
+
* types.** Measured on the portal: of its seven, `@sample/geo` is type-only (3
|
|
328
|
+
* imports, all `import type`) and contributes nothing to the bundle, so
|
|
329
|
+
* watching it can cost a rebuild nobody needed. Telling types from values
|
|
330
|
+
* statically is an import-parsing heuristic, and the same counting done twice
|
|
331
|
+
* here gave 47 value-imports and then 8 — the difference being multi-line
|
|
332
|
+
* `import type {` blocks whose closing line looks like a value import. The
|
|
333
|
+
* asymmetry decides it: a false rebuild costs a couple of minutes of CPU, a
|
|
334
|
+
* missed one puts yesterday's portal in front of a person.
|
|
335
|
+
*/
|
|
336
|
+
export function staleBuild(srcDir, buildDir) {
|
|
337
|
+
if (!fs.existsSync(buildDir))
|
|
338
|
+
return 'there is no build at all';
|
|
339
|
+
if (!fs.existsSync(srcDir))
|
|
340
|
+
return null;
|
|
341
|
+
const isSource = (n) => /\.(ts|tsx|js|jsx|css|scss|html|json|svg|png|jpg|webp)$/.test(n) && !/\.(spec|test)\.[jt]sx?$/.test(n);
|
|
342
|
+
const watched = [srcDir, ...linkedSourceDirs(path.dirname(srcDir))];
|
|
343
|
+
const names = watched.map((d) => path.basename(path.dirname(d)) + '/' + path.basename(d)).join(', ');
|
|
344
|
+
const newestBuilt = newestFile(buildDir, () => true);
|
|
345
|
+
if (!newestBuilt)
|
|
346
|
+
return 'the build directory is empty';
|
|
347
|
+
let newestSource = null;
|
|
348
|
+
for (const dir of watched) {
|
|
349
|
+
const found = newestFile(dir, isSource);
|
|
350
|
+
if (found && (!newestSource || found.mtime > newestSource.mtime)) {
|
|
351
|
+
newestSource = { ...found, root: dir };
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
if (!newestSource)
|
|
355
|
+
return null;
|
|
356
|
+
if (newestSource.mtime <= newestBuilt.mtime)
|
|
357
|
+
return null;
|
|
358
|
+
const count = watched.reduce((n, dir) => n + countNewerThan(dir, isSource, newestBuilt.mtime), 0);
|
|
359
|
+
const where = path.relative(newestSource.root, newestSource.file);
|
|
360
|
+
return `${count} source file${count === 1 ? '' : 's'} newer than the build, the most recent being ${where} (watched: ${names})`;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* The `src` of every dependency that lives outside `node_modules`.
|
|
364
|
+
*
|
|
365
|
+
* That is what a workspace link is, and it is the only reliable tell: pnpm
|
|
366
|
+
* makes EVERY dependency a symlink into its store, so `isSymbolicLink()`
|
|
367
|
+
* matches all of them. What separates a package being developed here from one
|
|
368
|
+
* that was installed is where the link lands.
|
|
369
|
+
*
|
|
370
|
+
* A package without a `src/` contributes nothing to look at and is skipped,
|
|
371
|
+
* which also drops anything vendored as built output.
|
|
372
|
+
*/
|
|
373
|
+
/**
|
|
374
|
+
* The `src` of every dependency that resolves to a working package rather
|
|
375
|
+
* than an installed copy — what this bundle is actually built FROM.
|
|
376
|
+
*
|
|
377
|
+
* Exported because two questions need the same answer and neither may
|
|
378
|
+
* re-derive it: whether the build is stale, and whether the trees it reads
|
|
379
|
+
* are the commits they claim.
|
|
380
|
+
*/
|
|
381
|
+
export function linkedSourceDirs(pkgDir) {
|
|
382
|
+
let manifest;
|
|
383
|
+
try {
|
|
384
|
+
manifest = JSON.parse(fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf8'));
|
|
385
|
+
}
|
|
386
|
+
catch {
|
|
387
|
+
return [];
|
|
388
|
+
}
|
|
389
|
+
const names = Object.keys({ ...manifest.dependencies, ...manifest.devDependencies });
|
|
390
|
+
const dirs = [];
|
|
391
|
+
for (const name of names) {
|
|
392
|
+
const linked = path.join(pkgDir, 'node_modules', ...name.split('/'));
|
|
393
|
+
let real;
|
|
394
|
+
try {
|
|
395
|
+
real = fs.realpathSync(linked);
|
|
396
|
+
}
|
|
397
|
+
catch {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
if (real.includes(`${path.sep}node_modules${path.sep}`))
|
|
401
|
+
continue;
|
|
402
|
+
const src = path.join(real, 'src');
|
|
403
|
+
if (fs.existsSync(src))
|
|
404
|
+
dirs.push(src);
|
|
405
|
+
}
|
|
406
|
+
return dirs;
|
|
407
|
+
}
|
|
408
|
+
/** How many files under `dir` are newer than `mtime` — for a message worth reading. */
|
|
409
|
+
function countNewerThan(dir, filter, mtime) {
|
|
410
|
+
let n = 0;
|
|
411
|
+
const walk = (d) => {
|
|
412
|
+
let entries;
|
|
413
|
+
try {
|
|
414
|
+
entries = fs.readdirSync(d, { withFileTypes: true });
|
|
415
|
+
}
|
|
416
|
+
catch {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
for (const entry of entries) {
|
|
420
|
+
const full = path.join(d, entry.name);
|
|
421
|
+
if (entry.isDirectory()) {
|
|
422
|
+
if (entry.name === 'node_modules' || entry.name === '.git')
|
|
423
|
+
continue;
|
|
424
|
+
walk(full);
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if (filter(entry.name) && fs.statSync(full).mtimeMs > mtime)
|
|
428
|
+
n += 1;
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
walk(dir);
|
|
432
|
+
return n;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Whether a package's shipped `dist` is older than its sources.
|
|
436
|
+
*
|
|
437
|
+
* Only asked of packages that actually ship one — a package whose manifest
|
|
438
|
+
* points at `src` is consumed as TypeScript by whatever transpiles it, and
|
|
439
|
+
* has no `dist` to be stale. `publishConfig` is consulted because that is
|
|
440
|
+
* what `pnpm pack` applies, so the question is about the file the TARBALL
|
|
441
|
+
* will name, not the one this working tree uses.
|
|
442
|
+
*
|
|
443
|
+
* Returns a sentence naming the newest source file, or null when there is
|
|
444
|
+
* nothing to say — the message is the useful part, since "rebuild it" is
|
|
445
|
+
* only actionable once you know which package and why.
|
|
446
|
+
*/
|
|
447
|
+
export function staleDist(packageDir) {
|
|
448
|
+
let manifest;
|
|
449
|
+
try {
|
|
450
|
+
manifest = JSON.parse(fs.readFileSync(path.join(packageDir, 'package.json'), 'utf8'));
|
|
451
|
+
}
|
|
452
|
+
catch {
|
|
453
|
+
return null;
|
|
454
|
+
}
|
|
455
|
+
const effective = JSON.stringify({
|
|
456
|
+
main: manifest.publishConfig?.main ?? manifest.main,
|
|
457
|
+
exports: manifest.publishConfig?.exports ?? manifest.exports,
|
|
458
|
+
});
|
|
459
|
+
if (!effective.includes('dist/'))
|
|
460
|
+
return null;
|
|
461
|
+
const dist = path.join(packageDir, 'dist');
|
|
462
|
+
if (!fs.existsSync(dist))
|
|
463
|
+
return 'there is no dist at all';
|
|
464
|
+
const src = path.join(packageDir, 'src');
|
|
465
|
+
if (!fs.existsSync(src))
|
|
466
|
+
return null;
|
|
467
|
+
// Tests are not shipped and their timestamps are not evidence about `dist`.
|
|
468
|
+
const newestSource = newestFile(src, (n) => n.endsWith('.ts') && !/\.(spec|test)\.ts$/.test(n));
|
|
469
|
+
const newestBuilt = newestFile(dist, (n) => n.endsWith('.js'));
|
|
470
|
+
if (!newestSource)
|
|
471
|
+
return null;
|
|
472
|
+
if (!newestBuilt)
|
|
473
|
+
return 'dist holds no compiled JavaScript';
|
|
474
|
+
if (newestSource.mtime <= newestBuilt.mtime)
|
|
475
|
+
return null;
|
|
476
|
+
return `${path.relative(packageDir, newestSource.file)} is newer than anything in dist`;
|
|
477
|
+
}
|
|
478
|
+
/** Where a workspace package lives, as recorded by `readWorkspace`. */
|
|
479
|
+
function directoryOf(manifest) {
|
|
480
|
+
const dir = manifest.__dir;
|
|
481
|
+
if (!dir)
|
|
482
|
+
throw new Error(`No directory recorded for ${manifest.name}`);
|
|
483
|
+
return dir;
|
|
484
|
+
}
|
|
485
|
+
/** `git rev-parse HEAD` and whether the tree is clean. */
|
|
486
|
+
export async function describeTree(cwd) {
|
|
487
|
+
let commit = '';
|
|
488
|
+
let dirty = false;
|
|
489
|
+
try {
|
|
490
|
+
const { stdout } = await exec('git', ['rev-parse', 'HEAD'], { cwd });
|
|
491
|
+
commit = stdout.trim();
|
|
492
|
+
}
|
|
493
|
+
catch {
|
|
494
|
+
// Not a repository, or no commits. `localVersion` says `nocommit`.
|
|
495
|
+
}
|
|
496
|
+
try {
|
|
497
|
+
const { stdout } = await exec('git', ['status', '--porcelain'], { cwd });
|
|
498
|
+
dirty = stdout.trim().length > 0;
|
|
499
|
+
}
|
|
500
|
+
catch {
|
|
501
|
+
// Same.
|
|
502
|
+
}
|
|
503
|
+
return { commit, dirty };
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Build the bundle.
|
|
507
|
+
*
|
|
508
|
+
* Packs into a temporary sibling and renames at the end, so `<out>` either
|
|
509
|
+
* does not exist or holds a complete bundle. A half-built one is worse than
|
|
510
|
+
* none: the transfer step has no way to tell it from a finished one, and the
|
|
511
|
+
* failure lands on the node.
|
|
512
|
+
*/
|
|
513
|
+
export async function buildBundle(options) {
|
|
514
|
+
const workspaceRoot = path.resolve(options.workspaceRoot);
|
|
515
|
+
const workspace = readWorkspaces([workspaceRoot, ...(options.additionalWorkspaceRoots ?? [])]);
|
|
516
|
+
const plan = planBundle(options.rootPackage, workspace);
|
|
517
|
+
if (plan.refusal)
|
|
518
|
+
throw new Error(plan.refusal);
|
|
519
|
+
const tree = await describeTree(workspaceRoot);
|
|
520
|
+
const version = localVersion(plan.root.version, tree.commit, new Date());
|
|
521
|
+
const outDir = path.resolve(options.outDir);
|
|
522
|
+
const staging = `${outDir}.building`;
|
|
523
|
+
fs.rmSync(staging, { recursive: true, force: true });
|
|
524
|
+
fs.mkdirSync(path.join(staging, VENDOR_DIR), { recursive: true });
|
|
525
|
+
try {
|
|
526
|
+
const rootDir = directoryOf(workspace.get(options.rootPackage));
|
|
527
|
+
// The package's own built output. Copied rather than packed: `npm pack`
|
|
528
|
+
// of the root would produce a tarball we would immediately unpack, and
|
|
529
|
+
// the bundle's root IS the install directory.
|
|
530
|
+
for (const rel of options.include ?? ['dist', 'webapp/dist', 'data', 'README.md']) {
|
|
531
|
+
const from = path.join(rootDir, rel);
|
|
532
|
+
if (!fs.existsSync(from))
|
|
533
|
+
continue;
|
|
534
|
+
const to = path.join(staging, rel);
|
|
535
|
+
fs.mkdirSync(path.dirname(to), { recursive: true });
|
|
536
|
+
fs.cpSync(from, to, { recursive: true });
|
|
537
|
+
}
|
|
538
|
+
// A package that ships `dist` must have a `dist` that is not older than
|
|
539
|
+
// its sources.
|
|
540
|
+
//
|
|
541
|
+
// `pnpm pack` packs what is on disk. Six sample packages declare
|
|
542
|
+
// `publishConfig.main = dist/…` — because a tarball cannot ship
|
|
543
|
+
// TypeScript and expect `node` to read it — and NOTHING in the workspace
|
|
544
|
+
// imported that `dist`, so it had been drifting since whenever it was
|
|
545
|
+
// last built by hand. Measured the first time one shipped:
|
|
546
|
+
//
|
|
547
|
+
// The requested module '@sample/titan-kit' does not provide an export
|
|
548
|
+
// named 'DEFAULT_PAGE_SIZE'
|
|
549
|
+
//
|
|
550
|
+
// — a constant that had been in `src` for months and in `dist` never.
|
|
551
|
+
// Worse than a missing package, because it looks like an API mistake in
|
|
552
|
+
// the code that imports it.
|
|
553
|
+
//
|
|
554
|
+
// Built rather than refused: the deployment already builds the app it is
|
|
555
|
+
// deploying, and a dependency of that app is the same question. A build
|
|
556
|
+
// that fails still stops the artifact.
|
|
557
|
+
for (const vendored of plan.vendored) {
|
|
558
|
+
const dir = directoryOf(workspace.get(vendored.name));
|
|
559
|
+
const stale = staleDist(dir);
|
|
560
|
+
if (!stale)
|
|
561
|
+
continue;
|
|
562
|
+
options.logger?.info(`rebuilding ${vendored.name} — ${stale}`);
|
|
563
|
+
// Without this the build exits zero and changes nothing: see
|
|
564
|
+
// `clearBuildInfo`. It is what made this guard's own rebuild useless
|
|
565
|
+
// on the first package that needed it.
|
|
566
|
+
clearBuildInfo(dir);
|
|
567
|
+
try {
|
|
568
|
+
await exec(resolvePnpm(), ['--dir', dir, 'run', 'build'], {
|
|
569
|
+
cwd: workspaceRoot,
|
|
570
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
catch (err) {
|
|
574
|
+
throw new Error(`${vendored.name} ships 'dist' and its 'dist' is out of date (${stale}), and rebuilding it failed: ` +
|
|
575
|
+
`${err.message.slice(0, 300)}`, { cause: err });
|
|
576
|
+
}
|
|
577
|
+
// What this package hashed to a moment ago is no longer what it is:
|
|
578
|
+
// the build decision and the packing step both read that number.
|
|
579
|
+
options.packCache?.delete(dir);
|
|
580
|
+
const still = staleDist(dir);
|
|
581
|
+
if (still) {
|
|
582
|
+
throw new Error(`${vendored.name} ships 'dist' and its 'dist' is still out of date after a build (${still}). ` +
|
|
583
|
+
`Packing it would put months-old compiled code on a node under a current version number.`);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
// Every workspace package, packed where npm can install it from.
|
|
587
|
+
for (const vendored of plan.vendored) {
|
|
588
|
+
const produced = path.join(staging, VENDOR_DIR, vendored.tarball);
|
|
589
|
+
const dir = directoryOf(workspace.get(vendored.name));
|
|
590
|
+
// What is in the package decides whether it is packed again — never
|
|
591
|
+
// when it was last packed. `pnpm pack` resolves `workspace:*` to the
|
|
592
|
+
// concrete version and rebuilds that object in the order it resolved
|
|
593
|
+
// them, so packing one unchanged package twice produced two tarballs
|
|
594
|
+
// differing in the ORDER of `peerDependencies` and nothing else. Every
|
|
595
|
+
// bundle was therefore a new bundle, and a deployment that skips what
|
|
596
|
+
// the node already has could never skip anything.
|
|
597
|
+
let contentHash = options.packCache?.get(dir);
|
|
598
|
+
if (!contentHash) {
|
|
599
|
+
contentHash = await bundleChecksum(dir, { skip: withoutNodeModules });
|
|
600
|
+
options.packCache?.set(dir, contentHash);
|
|
601
|
+
}
|
|
602
|
+
const kept = packedCachePath(cacheDir(), vendored.name, vendored.version, contentHash);
|
|
603
|
+
if (fs.existsSync(kept)) {
|
|
604
|
+
fs.copyFileSync(kept, produced);
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
options.logger?.info(`packing ${vendored.name}@${vendored.version}`);
|
|
608
|
+
// `resolvePnpm()`, not `'pnpm'`: launchd's PATH does not include the
|
|
609
|
+
// directory pnpm installs itself into, so a bare name is an ENOENT for
|
|
610
|
+
// every build the daemon runs and for none that a developer runs by
|
|
611
|
+
// hand. See `shared/pnpm.ts`.
|
|
612
|
+
await exec(resolvePnpm(), ['--dir', dir, 'pack', '--pack-destination', path.join(staging, VENDOR_DIR)], {
|
|
613
|
+
cwd: workspaceRoot,
|
|
614
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
615
|
+
});
|
|
616
|
+
if (!fs.existsSync(produced)) {
|
|
617
|
+
// `pnpm pack` names the file from the manifest, and the planner named
|
|
618
|
+
// it the same way — a mismatch here means one of them changed, and
|
|
619
|
+
// the override would point at a file that is not there.
|
|
620
|
+
throw new Error(`Packing ${vendored.name} produced no ${vendored.tarball}. ` +
|
|
621
|
+
`The bundle's overrides would point at a file that does not exist.`);
|
|
622
|
+
}
|
|
623
|
+
// Kept where the next bundle can copy it from — this build's, and any
|
|
624
|
+
// later one that finds the package in the same state. The staging
|
|
625
|
+
// directory this file is in is removed at the end, so the cache holds a
|
|
626
|
+
// copy of its own rather than a path that is about to stop existing.
|
|
627
|
+
// Written aside and renamed, because another build may be reading this
|
|
628
|
+
// name while this one writes it and half a tarball is not a tarball.
|
|
629
|
+
const staged = `${kept}.${process.pid}.part`;
|
|
630
|
+
fs.copyFileSync(produced, staged);
|
|
631
|
+
fs.renameSync(staged, kept);
|
|
632
|
+
}
|
|
633
|
+
fs.writeFileSync(path.join(staging, 'package.json'), JSON.stringify(bundleRootManifest(plan, version), null, 2) + '\n');
|
|
634
|
+
const metadata = {
|
|
635
|
+
version,
|
|
636
|
+
commit: tree.commit,
|
|
637
|
+
dirty: tree.dirty,
|
|
638
|
+
builtAt: new Date().toISOString(),
|
|
639
|
+
vendored: plan.vendored.map((v) => `${v.name}@${v.version}`),
|
|
640
|
+
};
|
|
641
|
+
fs.writeFileSync(path.join(staging, BUNDLE_METADATA_FILE), JSON.stringify(metadata, null, 2) + '\n');
|
|
642
|
+
fs.rmSync(outDir, { recursive: true, force: true });
|
|
643
|
+
fs.renameSync(staging, outDir);
|
|
644
|
+
return { outDir, metadata, plan };
|
|
645
|
+
}
|
|
646
|
+
catch (err) {
|
|
647
|
+
fs.rmSync(staging, { recursive: true, force: true });
|
|
648
|
+
throw err;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Tar a built bundle for transfer.
|
|
653
|
+
*
|
|
654
|
+
* `-C <dir> .` so the archive holds the bundle's contents at its root rather
|
|
655
|
+
* than a directory named after wherever it was built. The unpack step extracts
|
|
656
|
+
* into a version directory it chose; an archive carrying its own top-level
|
|
657
|
+
* name would put everything one level deeper, and every path after that —
|
|
658
|
+
* `dist/cli/omnitron.js`, the symlinks, the install — would be wrong by one
|
|
659
|
+
* segment.
|
|
660
|
+
*/
|
|
661
|
+
/** The file a bundle carries about its own making. */
|
|
662
|
+
export const BUNDLE_METADATA_FILE = 'BUNDLE.json';
|
|
663
|
+
/**
|
|
664
|
+
* The record of the packing, which is not part of what was packed.
|
|
665
|
+
*
|
|
666
|
+
* It carries `builtAt` and a version stamped from the clock, so a bundle
|
|
667
|
+
* that includes it in its identity is a different bundle every time it is
|
|
668
|
+
* built. What it says about the commit and the vendored packages is a
|
|
669
|
+
* statement about the build, and the files those produced are hashed on
|
|
670
|
+
* their own account.
|
|
671
|
+
*/
|
|
672
|
+
export const isBuildRecord = (relativePath) => relativePath === BUNDLE_METADATA_FILE;
|
|
673
|
+
/**
|
|
674
|
+
* The name a build gave itself, which is not part of what it built.
|
|
675
|
+
*
|
|
676
|
+
* `localVersion` stamps the minute of the build into the bundle's root
|
|
677
|
+
* manifest — `0.2.0+local.<sha>.202609201755` — so that a node can say which
|
|
678
|
+
* of two builds of one commit it is running. It is also the one thing in a
|
|
679
|
+
* bundle that cannot be the same twice, and comparing bundles with it in
|
|
680
|
+
* hand says "different" about two builds of an untouched tree. Everything
|
|
681
|
+
* else in that manifest decides what gets installed and is compared.
|
|
682
|
+
*
|
|
683
|
+
* Only the bundle's own manifest: a `package.json` below it belongs to a
|
|
684
|
+
* package that travels, and its version is that package's.
|
|
685
|
+
*/
|
|
686
|
+
export const withoutBuildVersion = {
|
|
687
|
+
appliesTo: (relativePath) => relativePath === 'package.json',
|
|
688
|
+
to: (bytes) => {
|
|
689
|
+
let manifest;
|
|
690
|
+
try {
|
|
691
|
+
manifest = JSON.parse(bytes.toString('utf8'));
|
|
692
|
+
}
|
|
693
|
+
catch {
|
|
694
|
+
// Not a manifest this understands. Hashed as the bytes it is, which is
|
|
695
|
+
// the conservative answer: a bundle nobody can read is not a bundle
|
|
696
|
+
// anybody should call unchanged.
|
|
697
|
+
return bytes;
|
|
698
|
+
}
|
|
699
|
+
delete manifest['version'];
|
|
700
|
+
return Buffer.from(JSON.stringify(manifest));
|
|
701
|
+
},
|
|
702
|
+
};
|
|
703
|
+
/**
|
|
704
|
+
* Build output, which is what a compiler produces and never what it reads.
|
|
705
|
+
*
|
|
706
|
+
* Matched on the whole last segment, so `dist-tools/` and
|
|
707
|
+
* `node_modules_shim.ts` are sources like any other.
|
|
708
|
+
*/
|
|
709
|
+
const BUILD_OUTPUT = new Set(['node_modules', 'dist', 'coverage', '.turbo', '.omnitron-build', '.git', '.cache']);
|
|
710
|
+
export const withoutBuildOutput = (relativePath) => BUILD_OUTPUT.has(relativePath.slice(relativePath.lastIndexOf('/') + 1));
|
|
711
|
+
/**
|
|
712
|
+
* Installed dependencies, which are not sources and are not packed.
|
|
713
|
+
*
|
|
714
|
+
* Matched on the whole last segment: `node_modules_shim.ts` is a source file.
|
|
715
|
+
*/
|
|
716
|
+
export const withoutNodeModules = (relativePath) => relativePath === 'node_modules' || relativePath.endsWith('/node_modules');
|
|
717
|
+
/**
|
|
718
|
+
* What a bundle IS, independent of when it was packed.
|
|
719
|
+
*
|
|
720
|
+
* The archive cannot answer this. `tar -czf` writes the compression time
|
|
721
|
+
* into the gzip header and every file's own mtime into its entry, and a
|
|
722
|
+
* bundle is assembled into a fresh staging tree on each build, so two packs
|
|
723
|
+
* of byte-identical sources are two different files. A deployment that asks
|
|
724
|
+
* "does the node already have this?" by comparing archive hashes is asking
|
|
725
|
+
* what time it is.
|
|
726
|
+
*
|
|
727
|
+
* So the identity is read from the tree that will travel: every path under
|
|
728
|
+
* it, sorted, each with the bytes at that path, whether it may be executed,
|
|
729
|
+
* and — for a symlink — where it points, which is read rather than followed.
|
|
730
|
+
* Nothing here is a property of this machine or this minute.
|
|
731
|
+
*
|
|
732
|
+
* Framed with NULs and lengths so that no rearrangement of names and bodies
|
|
733
|
+
* can produce the same stream as a different tree.
|
|
734
|
+
*/
|
|
735
|
+
export async function bundleChecksum(bundleDir, options) {
|
|
736
|
+
const { createHash } = await import('node:crypto');
|
|
737
|
+
const root = path.resolve(bundleDir);
|
|
738
|
+
const paths = [];
|
|
739
|
+
const walk = (dir) => {
|
|
740
|
+
// Deliberately unguarded: a directory this cannot read is a bundle this
|
|
741
|
+
// cannot identify, and a hash over the part that happened to be readable
|
|
742
|
+
// would be a confident answer to a question nobody asked.
|
|
743
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
744
|
+
const full = path.join(dir, entry.name);
|
|
745
|
+
const rel = path.relative(root, full).split(path.sep).join('/');
|
|
746
|
+
if (options?.skip?.(rel))
|
|
747
|
+
continue;
|
|
748
|
+
paths.push(rel);
|
|
749
|
+
// `isDirectory()` is lstat's answer, so a symlink to a directory is a
|
|
750
|
+
// link here and is never descended into.
|
|
751
|
+
if (entry.isDirectory())
|
|
752
|
+
walk(full);
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
walk(root);
|
|
756
|
+
paths.sort();
|
|
757
|
+
const hash = createHash('sha256');
|
|
758
|
+
for (const rel of paths) {
|
|
759
|
+
const full = path.join(root, rel);
|
|
760
|
+
const stat = fs.lstatSync(full);
|
|
761
|
+
if (stat.isSymbolicLink()) {
|
|
762
|
+
const target = fs.readlinkSync(full);
|
|
763
|
+
hash.update(`L\0${rel}\0${target.length}\0${target}\0`);
|
|
764
|
+
continue;
|
|
765
|
+
}
|
|
766
|
+
if (stat.isDirectory()) {
|
|
767
|
+
hash.update(`D\0${rel}\0`);
|
|
768
|
+
continue;
|
|
769
|
+
}
|
|
770
|
+
const mode = stat.mode & 0o111 ? 'x' : '-';
|
|
771
|
+
if (options?.rewrite?.appliesTo(rel)) {
|
|
772
|
+
// Framed by the length of what is hashed, not of what is on disk: the
|
|
773
|
+
// original size would put back the difference the rewrite took out.
|
|
774
|
+
const bytes = options.rewrite.to(fs.readFileSync(full));
|
|
775
|
+
hash.update(`F\0${rel}\0${mode}\0${bytes.length}\0`);
|
|
776
|
+
hash.update(bytes);
|
|
777
|
+
continue;
|
|
778
|
+
}
|
|
779
|
+
hash.update(`F\0${rel}\0${mode}\0${stat.size}\0`);
|
|
780
|
+
await new Promise((resolve, reject) => {
|
|
781
|
+
const stream = fs.createReadStream(full);
|
|
782
|
+
stream.on('data', (chunk) => hash.update(chunk));
|
|
783
|
+
stream.on('end', () => resolve());
|
|
784
|
+
stream.on('error', reject);
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
return hash.digest('hex');
|
|
788
|
+
}
|
|
789
|
+
export async function archiveBundle(bundleDir, archivePath) {
|
|
790
|
+
const resolved = path.resolve(archivePath);
|
|
791
|
+
fs.mkdirSync(path.dirname(resolved), { recursive: true });
|
|
792
|
+
await exec('tar', ['-czf', resolved, '-C', path.resolve(bundleDir), '.'], {
|
|
793
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
794
|
+
// `COPYFILE_DISABLE=1`, because macOS `tar` writes an AppleDouble
|
|
795
|
+
// sidecar — `._index.html`, `._dist`, 163 bytes each — for every file
|
|
796
|
+
// carrying an extended attribute. Measured on the test node: they are in
|
|
797
|
+
// every artifact and in the gateway's web root, where `/._index.html` is
|
|
798
|
+
// a 163-byte binary the server will happily hand to anyone who asks.
|
|
799
|
+
// They are this machine's metadata about its own filesystem and they
|
|
800
|
+
// mean nothing on the far side.
|
|
801
|
+
env: { ...process.env, COPYFILE_DISABLE: '1' },
|
|
802
|
+
});
|
|
803
|
+
return resolved;
|
|
804
|
+
}
|
|
805
|
+
/** The package omnitron itself is — what a node's own upgrade is built from. */
|
|
806
|
+
export const OMNITRON_PACKAGE = '@omnitron-dev/omnitron';
|
|
807
|
+
/**
|
|
808
|
+
* Where one build of omnitron's own bundle is staged.
|
|
809
|
+
*
|
|
810
|
+
* Under the temporary directory and named by the caller's label, so that the
|
|
811
|
+
* console upgrading one node and a `fleet upgrade` running in a terminal
|
|
812
|
+
* never stage into each other's directory.
|
|
813
|
+
*/
|
|
814
|
+
export function ownBundleStaging(label) {
|
|
815
|
+
return path.join(os.tmpdir(), `omnitron-bundle-${label}`);
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Why omnitron's own build may not travel under the tree's commit — or null.
|
|
819
|
+
*
|
|
820
|
+
* The bundle copies `dist` and `webapp/dist` as they are on disk and names
|
|
821
|
+
* itself after the working tree's HEAD, and nothing compared the two.
|
|
822
|
+
* Measured 2026-09-23: a node installed as `0.2.0+local.f1715106…` received a
|
|
823
|
+
* console build older than f1715106, whose only change was that console. A
|
|
824
|
+
* `dist` compiled before the last commit ships the code before it under the
|
|
825
|
+
* commit's name, and the node's version is the record everyone reads
|
|
826
|
+
* afterwards. Each build now carries its own stamp (`BUILD.json`, written by
|
|
827
|
+
* `scripts/stamp-build.mjs`), and it must name the commit the tree is on,
|
|
828
|
+
* from a clean tree.
|
|
829
|
+
*/
|
|
830
|
+
export function ownBuildRefusal(input) {
|
|
831
|
+
const short = (sha) => sha.slice(0, 8);
|
|
832
|
+
for (const rel of ['dist', 'webapp/dist']) {
|
|
833
|
+
const dir = path.join(input.packageDir, rel);
|
|
834
|
+
const name = `${path.basename(input.packageDir)}/${rel}`;
|
|
835
|
+
if (!fs.existsSync(dir)) {
|
|
836
|
+
if (rel === 'dist')
|
|
837
|
+
return `${name} does not exist: there is no build to ship. Build omnitron first.`;
|
|
838
|
+
continue;
|
|
839
|
+
}
|
|
840
|
+
const stamp = readBuildStamp(dir);
|
|
841
|
+
if (!stamp) {
|
|
842
|
+
return (`${name} carries no build stamp, so nothing says which commit it was compiled from. ` +
|
|
843
|
+
`Rebuild it (\`pnpm --filter ${rel === 'dist' ? OMNITRON_PACKAGE : '@omnitron/console'} build\`), which stamps it.`);
|
|
844
|
+
}
|
|
845
|
+
if (stamp.dirty) {
|
|
846
|
+
return (`${name} was compiled from a tree with uncommitted changes (${stamp.builtAt}): what it holds is no commit ` +
|
|
847
|
+
`at all. Rebuild it from a clean tree.`);
|
|
848
|
+
}
|
|
849
|
+
if (stamp.commit !== input.tree.commit) {
|
|
850
|
+
return (`${name} was compiled from ${short(stamp.commit)} (${stamp.builtAt}) and the tree is at ` +
|
|
851
|
+
`${short(input.tree.commit)}: a node would run ${short(stamp.commit)} under ${short(input.tree.commit)}'s ` +
|
|
852
|
+
`name. Rebuild it.`);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
return null;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Build omnitron from a working tree, for installing on a node.
|
|
859
|
+
*
|
|
860
|
+
* Two callers do this — `omnitron fleet upgrade` from a terminal, and the
|
|
861
|
+
* daemon when the console asks — and each used to write it out: the package
|
|
862
|
+
* name, the staging path, the `buildBundle`/`archiveBundle` pair. The copies
|
|
863
|
+
* had already drifted, in the way copies do: the daemon removed its staging
|
|
864
|
+
* tree in a `finally`, and the CLI left several hundred megabytes in the
|
|
865
|
+
* temporary directory on every run, including every `--dry-run` that shipped
|
|
866
|
+
* nothing at all.
|
|
867
|
+
*
|
|
868
|
+
* Packing is separate from building because a dry run wants the version and
|
|
869
|
+
* not the tarball.
|
|
870
|
+
*/
|
|
871
|
+
export async function buildOwnBundle(options) {
|
|
872
|
+
const own = readWorkspaces([path.resolve(options.workspaceRoot)]).get(OMNITRON_PACKAGE);
|
|
873
|
+
if (own) {
|
|
874
|
+
const refusal = ownBuildRefusal({
|
|
875
|
+
packageDir: directoryOf(own),
|
|
876
|
+
tree: await describeTree(path.resolve(options.workspaceRoot)),
|
|
877
|
+
});
|
|
878
|
+
if (refusal)
|
|
879
|
+
throw new Error(refusal);
|
|
880
|
+
}
|
|
881
|
+
const staging = ownBundleStaging(options.label);
|
|
882
|
+
const archivePath = `${staging}.tar.gz`;
|
|
883
|
+
const built = await buildBundle({
|
|
884
|
+
workspaceRoot: options.workspaceRoot,
|
|
885
|
+
rootPackage: OMNITRON_PACKAGE,
|
|
886
|
+
outDir: staging,
|
|
887
|
+
...(options.logger ? { logger: options.logger } : {}),
|
|
888
|
+
});
|
|
889
|
+
let packed = null;
|
|
890
|
+
return {
|
|
891
|
+
version: built.metadata.version,
|
|
892
|
+
dirty: built.metadata.dirty,
|
|
893
|
+
pack: () => (packed ??= archiveBundle(built.outDir, archivePath)),
|
|
894
|
+
cleanup: async () => {
|
|
895
|
+
// The staging tree is hundreds of megabytes; leaving it behind fills
|
|
896
|
+
// the temporary directory one upgrade at a time.
|
|
897
|
+
await fs.promises.rm(staging, { recursive: true, force: true }).catch(() => undefined);
|
|
898
|
+
await fs.promises.rm(archivePath, { force: true }).catch(() => undefined);
|
|
899
|
+
},
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* Everything that decides what an application's compiler emits.
|
|
904
|
+
*
|
|
905
|
+
* The application's own sources, and every workspace package that travels
|
|
906
|
+
* with it — the same closure the bundle vendors, because a package whose
|
|
907
|
+
* code moved changes both what the app compiles against and what ships
|
|
908
|
+
* beside it. A dependency is read whole, sources and `dist` together: which
|
|
909
|
+
* of the two moved is not the question, only whether anything did.
|
|
910
|
+
*
|
|
911
|
+
* `null` for every answer that cannot be had — no workspace above the app, a
|
|
912
|
+
* manifest that will not parse, a plan that refuses. The caller compiles.
|
|
913
|
+
*
|
|
914
|
+
* `memo` is shared with the packing step, which asks the same question of
|
|
915
|
+
* the same directories; `buildBundle` drops an entry for any package it
|
|
916
|
+
* rebuilds, so nothing here outlives the state it measured.
|
|
917
|
+
*/
|
|
918
|
+
export async function buildInputsChecksum(appDir, options) {
|
|
919
|
+
const workspaceRoot = findWorkspaceRoot(appDir);
|
|
920
|
+
if (!workspaceRoot)
|
|
921
|
+
return null;
|
|
922
|
+
let manifest;
|
|
923
|
+
try {
|
|
924
|
+
manifest = JSON.parse(fs.readFileSync(path.join(appDir, 'package.json'), 'utf8'));
|
|
925
|
+
}
|
|
926
|
+
catch {
|
|
927
|
+
return null;
|
|
928
|
+
}
|
|
929
|
+
if (!manifest.name)
|
|
930
|
+
return null;
|
|
931
|
+
const workspace = readWorkspaces([workspaceRoot, ...(options?.additionalWorkspaceRoots ?? [])]);
|
|
932
|
+
const plan = planBundle(manifest.name, workspace);
|
|
933
|
+
if (plan.refusal)
|
|
934
|
+
return null;
|
|
935
|
+
const memo = options?.memo;
|
|
936
|
+
const readOnce = async (key, dir, skip) => {
|
|
937
|
+
const seen = memo?.get(key);
|
|
938
|
+
if (seen)
|
|
939
|
+
return seen;
|
|
940
|
+
const hash = await bundleChecksum(dir, { skip });
|
|
941
|
+
memo?.set(key, hash);
|
|
942
|
+
return hash;
|
|
943
|
+
};
|
|
944
|
+
const parts = [`app ${manifest.name} ${await readOnce(sourcesKey(appDir), appDir, withoutBuildOutput)}`];
|
|
945
|
+
for (const vendored of plan.vendored) {
|
|
946
|
+
const entry = workspace.get(vendored.name);
|
|
947
|
+
if (!entry)
|
|
948
|
+
return null;
|
|
949
|
+
const dir = directoryOf(entry);
|
|
950
|
+
parts.push(`dep ${vendored.name}@${vendored.version} ${await readOnce(dir, dir, withoutNodeModules)}`);
|
|
951
|
+
}
|
|
952
|
+
parts.sort();
|
|
953
|
+
const { createHash } = await import('node:crypto');
|
|
954
|
+
return createHash('sha256').update(parts.join('\n')).digest('hex');
|
|
955
|
+
}
|
|
956
|
+
/** The memo key for an app's own sources, which are read without its output. */
|
|
957
|
+
const sourcesKey = (appDir) => `sources:${path.resolve(appDir)}`;
|
|
958
|
+
export function versionDir(layout) {
|
|
959
|
+
if (!/^\d+\.\d+\.\d+(?:-[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*)?(?:\+[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*)?$/.test(layout.version))
|
|
960
|
+
throw new Error('Bundle version must be one complete semantic-version path segment');
|
|
961
|
+
if (!path.posix.isAbsolute(layout.prefix) || layout.prefix === '/' || path.posix.normalize(layout.prefix) !== layout.prefix || /[\\\r\n\0]/.test(layout.prefix))
|
|
962
|
+
throw new Error('Bundle prefix must be a canonical absolute directory');
|
|
963
|
+
return `${layout.prefix}/versions/${layout.version}`;
|
|
964
|
+
}
|
|
965
|
+
/** Shell-quote for the remote's POSIX shell. */
|
|
966
|
+
function q(value) {
|
|
967
|
+
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* Unpack and install a transferred bundle archive, without disturbing the
|
|
971
|
+
* version that is running.
|
|
972
|
+
*
|
|
973
|
+
* `archivePath` is where the caller put the tarball on the target.
|
|
974
|
+
*/
|
|
975
|
+
const installPrefixSource = String.raw `
|
|
976
|
+
function directory(p) {
|
|
977
|
+
let parent=p;
|
|
978
|
+
while (!fs.existsSync(parent)) {
|
|
979
|
+
try { fs.lstatSync(parent); throw Error('Dangling installation path: '+parent); }
|
|
980
|
+
catch(e) { if(e.code!=='ENOENT') throw e; }
|
|
981
|
+
const next=path.dirname(parent); if(next===parent) throw Error('Missing installation root'); parent=next;
|
|
982
|
+
}
|
|
983
|
+
if(fs.realpathSync(parent)!==parent || !fs.statSync(parent).isDirectory()) throw Error('Noncanonical installation parent: '+parent);
|
|
984
|
+
fs.mkdirSync(p,{recursive:true});
|
|
985
|
+
if(fs.realpathSync(p)!==p || !fs.lstatSync(p).isDirectory()) throw Error('Noncanonical installation directory: '+p);
|
|
986
|
+
}
|
|
987
|
+
for(const p of [prefix,prefix+'/versions',prefix+'/releases']) directory(p);
|
|
988
|
+
`;
|
|
989
|
+
/** Check physical ownership before even uploading into the prefix. */
|
|
990
|
+
export function installPreflightCommand(layout) {
|
|
991
|
+
versionDir(layout);
|
|
992
|
+
const code = `const fs=require('node:fs'),path=require('node:path'),prefix=${JSON.stringify(layout.prefix)};${installPrefixSource}`;
|
|
993
|
+
return `node -e ${q(code)}`;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* A completed version is never unpacked or installed again. Each attempt gets
|
|
997
|
+
* a fresh sibling and publishes it only after npm and the actual CLI pass.
|
|
998
|
+
* The receipt hashes the complete installed tree, so reuse verifies both the
|
|
999
|
+
* archive identity and physical dependencies, including modes and symlinks.
|
|
1000
|
+
* Failed siblings remain available for diagnosis; they are never reused.
|
|
1001
|
+
*/
|
|
1002
|
+
export function installSteps(layout, archivePath, expectedArchiveSha256) {
|
|
1003
|
+
versionDir(layout);
|
|
1004
|
+
if (expectedArchiveSha256 !== undefined && !/^[a-f0-9]{64}$/.test(expectedArchiveSha256))
|
|
1005
|
+
throw new Error('Bundle archive identity must be a SHA256');
|
|
1006
|
+
const code = String.raw `
|
|
1007
|
+
const fs=require('node:fs'),path=require('node:path'),crypto=require('node:crypto'),cp=require('node:child_process');
|
|
1008
|
+
const [prefix,version,archive,expected]=process.argv.slice(1),dir=prefix+'/versions/'+version;
|
|
1009
|
+
${installPrefixSource}
|
|
1010
|
+
const sha=b=>crypto.createHash('sha256').update(b).digest('hex');
|
|
1011
|
+
const archiveHash=sha(fs.readFileSync(archive));
|
|
1012
|
+
if(expected && archiveHash!==expected) throw Error('Bundle archive SHA256 mismatch');
|
|
1013
|
+
const record='.omnitron-install.json';
|
|
1014
|
+
function present(p){try{fs.lstatSync(p);return true}catch(e){if(e.code==='ENOENT')return false;throw e}}
|
|
1015
|
+
function snapshot(root) {
|
|
1016
|
+
const entries={};
|
|
1017
|
+
function visit(relative) {
|
|
1018
|
+
for(const name of fs.readdirSync(path.join(root,relative)).sort()) {
|
|
1019
|
+
const rel=relative?relative+'/'+name:name;
|
|
1020
|
+
if(rel===record)continue;
|
|
1021
|
+
const p=path.join(root,rel),st=fs.lstatSync(p);
|
|
1022
|
+
if(st.isSymbolicLink()) {
|
|
1023
|
+
const link=fs.readlinkSync(p),resolved=path.resolve(path.dirname(p),link);
|
|
1024
|
+
if(path.isAbsolute(link))throw Error('Installed symlink must remain relative after promotion: '+rel);
|
|
1025
|
+
if(!resolved.startsWith(root+'/'))throw Error('Installed symlink escapes bundle: '+rel);
|
|
1026
|
+
entries[rel]={kind:'link',link};
|
|
1027
|
+
} else if(st.isDirectory()){entries[rel]={kind:'directory',mode:st.mode&0o777};visit(rel)}
|
|
1028
|
+
else if(st.isFile())entries[rel]={kind:'file',mode:st.mode&0o777,sha256:sha(fs.readFileSync(p))};
|
|
1029
|
+
else throw Error('Unsupported installed entry: '+rel);
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
visit('');return entries;
|
|
1033
|
+
}
|
|
1034
|
+
function identity(root){
|
|
1035
|
+
const pkg=JSON.parse(fs.readFileSync(root+'/package.json','utf8'));
|
|
1036
|
+
const bundle=JSON.parse(fs.readFileSync(root+'/BUNDLE.json','utf8'));
|
|
1037
|
+
if(pkg.version!==version || bundle.version!==version)throw Error('Bundle metadata version mismatch');
|
|
1038
|
+
}
|
|
1039
|
+
function check(root){
|
|
1040
|
+
identity(root);
|
|
1041
|
+
const out=cp.execFileSync(root+'/dist/cli/omnitron.js',['--version'],{encoding:'utf8',timeout:120000,stdio:['ignore','pipe','pipe']});
|
|
1042
|
+
if(out.trim().split('\n').pop().trim()!==version)throw Error('Installed CLI version mismatch');
|
|
1043
|
+
}
|
|
1044
|
+
function reuse(){
|
|
1045
|
+
if(fs.realpathSync(dir)!==dir || !fs.lstatSync(dir).isDirectory())throw Error('Existing bundle path is not an immutable directory');
|
|
1046
|
+
const r=JSON.parse(fs.readFileSync(dir+'/'+record,'utf8'));
|
|
1047
|
+
if(r.schema!==1 || r.version!==version || r.archiveSha256!==archiveHash)throw Error('Existing bundle identity conflicts with archive');
|
|
1048
|
+
if(JSON.stringify(r.entries)!==JSON.stringify(snapshot(dir)))throw Error('Existing bundle content differs from install receipt');
|
|
1049
|
+
check(dir);console.log(version);
|
|
1050
|
+
}
|
|
1051
|
+
if(present(dir)){reuse();process.exit(0)}
|
|
1052
|
+
// Refuse unsafe archive paths and links before tar can write anything. Bundle
|
|
1053
|
+
// archives created by packBundle contain regular files/directories only.
|
|
1054
|
+
const names=cp.execFileSync('tar',['-tzf',archive],{encoding:'utf8',maxBuffer:32*1024*1024}).trim().split('\n');
|
|
1055
|
+
for(const name of names){
|
|
1056
|
+
if(!name || name.startsWith('/') || name.split('/').includes('..') || name.includes('\r'))throw Error('Unsafe bundle archive path');
|
|
1057
|
+
}
|
|
1058
|
+
const listing=cp.execFileSync('tar',['-tvzf',archive],{encoding:'utf8',maxBuffer:32*1024*1024}).trim().split('\n');
|
|
1059
|
+
if(listing.some(line=>!['-','d'].includes(line[0])))throw Error('Bundle archive must contain regular files and directories only');
|
|
1060
|
+
const stage=prefix+'/versions/.install-'+version+'-'+crypto.randomUUID();fs.mkdirSync(stage,{mode:0o700});
|
|
1061
|
+
cp.execFileSync('tar',['-xzf',archive,'-C',stage],{timeout:300000,stdio:'inherit'});
|
|
1062
|
+
identity(stage);
|
|
1063
|
+
if(present(stage+'/'+record))throw Error('Archive may not supply an installation receipt');
|
|
1064
|
+
fs.chmodSync(stage+'/dist/cli/omnitron.js',0o755);
|
|
1065
|
+
cp.execFileSync('npm',['install','--omit=dev','--no-audit','--no-fund'],{cwd:stage,timeout:900000,stdio:'inherit'});
|
|
1066
|
+
check(stage);
|
|
1067
|
+
const entries=snapshot(stage);
|
|
1068
|
+
fs.writeFileSync(stage+'/'+record,JSON.stringify({schema:1,version,archiveSha256:archiveHash,entries})+'\n',{flag:'wx',mode:0o600});
|
|
1069
|
+
function syncTree(p){
|
|
1070
|
+
const st=fs.lstatSync(p);if(st.isSymbolicLink())return;
|
|
1071
|
+
if(st.isDirectory())for(const name of fs.readdirSync(p))syncTree(path.join(p,name));
|
|
1072
|
+
const fd=fs.openSync(p,'r');try{fs.fsyncSync(fd)}finally{fs.closeSync(fd)}
|
|
1073
|
+
}
|
|
1074
|
+
syncTree(stage);
|
|
1075
|
+
if(present(dir))throw Error('Bundle appeared while the sibling was installing; refusing replacement');
|
|
1076
|
+
fs.renameSync(stage,dir);
|
|
1077
|
+
const fd=fs.openSync(prefix+'/versions','r');try{fs.fsyncSync(fd)}finally{fs.closeSync(fd)}
|
|
1078
|
+
console.log(version);
|
|
1079
|
+
`;
|
|
1080
|
+
return [{
|
|
1081
|
+
what: 'install dependencies in an immutable sibling and check that it runs',
|
|
1082
|
+
command: `node -e ${q(code)} ${q(layout.prefix)} ${q(layout.version)} ${q(archivePath)} ${q(expectedArchiveSha256 ?? '')}`,
|
|
1083
|
+
timeoutMs: 1_500_000,
|
|
1084
|
+
}];
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Make an installed version the live one.
|
|
1088
|
+
*
|
|
1089
|
+
* Separate from `installSteps` because this is the only step that changes
|
|
1090
|
+
* what runs, and a caller that stopped before it has changed nothing.
|
|
1091
|
+
*/
|
|
1092
|
+
export function activateSteps(layout, pathDir = '/usr/local/bin') {
|
|
1093
|
+
const dir = versionDir(layout);
|
|
1094
|
+
const cli = `${layout.prefix}/current/dist/cli/omnitron.js`;
|
|
1095
|
+
return [
|
|
1096
|
+
{
|
|
1097
|
+
what: `point current at ${layout.version}`,
|
|
1098
|
+
// `-n` so a `current` that is already a symlink to a directory is
|
|
1099
|
+
// replaced rather than followed — without it the second upgrade
|
|
1100
|
+
// creates `current/<version>` inside the first one.
|
|
1101
|
+
command: `mkdir -p ${q(`${layout.prefix}/bin`)} && ` +
|
|
1102
|
+
`ln -sfn ${q(dir)} ${q(`${layout.prefix}/current`)} && ` +
|
|
1103
|
+
`ln -sfn ${q(cli)} ${q(`${layout.prefix}/bin/omnitron`)}`,
|
|
1104
|
+
timeoutMs: 60_000,
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
// The step this design was missing, and the node said so.
|
|
1108
|
+
//
|
|
1109
|
+
// `<prefix>/bin` is not on anyone's PATH. So after `current` moved, a
|
|
1110
|
+
// bare `omnitron` still resolved to whatever was there before — on the
|
|
1111
|
+
// test host, the registry copy in the runtime's own bin. The activation
|
|
1112
|
+
// then restarted THAT, and the failure it reported was the old version's
|
|
1113
|
+
// missing dependency, under a message saying the new version had not
|
|
1114
|
+
// come up. Everything was true and nothing pointed at the cause.
|
|
1115
|
+
//
|
|
1116
|
+
// Guarded like every other link this code makes: only over nothing, or
|
|
1117
|
+
// over a symlink, which is what an earlier install of ours leaves. A
|
|
1118
|
+
// real binary somebody else put there is kept, and `<prefix>/bin` still
|
|
1119
|
+
// has the CLI.
|
|
1120
|
+
what: `make omnitron on PATH resolve to ${layout.version}`,
|
|
1121
|
+
command: `if [ ! -e ${q(`${pathDir}/omnitron`)} ] || [ -L ${q(`${pathDir}/omnitron`)} ]; then ` +
|
|
1122
|
+
`ln -sfn ${q(cli)} ${q(`${pathDir}/omnitron`)}; fi`,
|
|
1123
|
+
timeoutMs: 60_000,
|
|
1124
|
+
},
|
|
1125
|
+
];
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Keep the last `keep` versions and remove the rest.
|
|
1129
|
+
*
|
|
1130
|
+
* «Last» by the build stamp that ends every local version —
|
|
1131
|
+
* `0.2.0+local.<sha>.<stamp>` — not by the name. The name was the sort key,
|
|
1132
|
+
* on the stated ground that it «is chronological»; it is not, because the
|
|
1133
|
+
* sha comes first. On sample/test (2026-09-25) three upgrades in one morning
|
|
1134
|
+
* left the node with the running version and three from 22–23 September,
|
|
1135
|
+
* and deleted 311bddb1 and de454a80 — the two a rollback would have wanted.
|
|
1136
|
+
* A version without a numeric stamp counts as the oldest.
|
|
1137
|
+
*
|
|
1138
|
+
* `current` is never removed whatever its age: a retention that reasons
|
|
1139
|
+
* about age must not be the thing that deletes what is running. Portable
|
|
1140
|
+
* `awk` rather than GNU `head -n -N`, so the court can run the command
|
|
1141
|
+
* itself on the machine that builds.
|
|
1142
|
+
*/
|
|
1143
|
+
export function pruneSteps(layout, keep, protectedRoots = []) {
|
|
1144
|
+
const versions = `${layout.prefix}/versions`;
|
|
1145
|
+
return [
|
|
1146
|
+
{
|
|
1147
|
+
what: `keep the ${keep} most recent versions`,
|
|
1148
|
+
command: `cd ${q(versions)} 2>/dev/null || exit 0; ` +
|
|
1149
|
+
`CURRENT=$(readlink ${q(`${layout.prefix}/current`)} 2>/dev/null); ` +
|
|
1150
|
+
`ls -1 | awk -F. '{ s = $NF; if (s !~ /^[0-9]+$/) s = 0; print s "\\t" $0 }' | sort -n -k1,1 | cut -f2- | ` +
|
|
1151
|
+
`awk -v keep=${keep} '{ a[NR] = $0 } END { for (i = 1; i <= NR - keep; i++) print a[i] }' | while read -r v; do ` +
|
|
1152
|
+
`[ "${versions}/$v" = "$CURRENT" ] && continue; ` +
|
|
1153
|
+
protectedRoots.map(root => `[ "${versions}/$v" = ${q(root)} ] && continue; `).join('') +
|
|
1154
|
+
`rm -rf -- "$v"; done; true`,
|
|
1155
|
+
timeoutMs: 120_000,
|
|
1156
|
+
},
|
|
1157
|
+
];
|
|
1158
|
+
}
|
|
1159
|
+
//# sourceMappingURL=bundle-builder.js.map
|