@camstack/core 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon/addon-api-factory.d.ts +36 -0
- package/dist/addon/addon-api-factory.d.ts.map +1 -0
- package/dist/addon-routes/addon-route-registry.d.ts +38 -0
- package/dist/addon-routes/addon-route-registry.d.ts.map +1 -0
- package/dist/auth/api-key-manager.d.ts +27 -0
- package/dist/auth/api-key-manager.d.ts.map +1 -0
- package/dist/auth/auth-manager.d.ts +47 -0
- package/dist/auth/auth-manager.d.ts.map +1 -0
- package/dist/auth/parse-record.d.ts +19 -0
- package/dist/auth/parse-record.d.ts.map +1 -0
- package/dist/auth/scoped-token-manager.d.ts +18 -0
- package/dist/auth/scoped-token-manager.d.ts.map +1 -0
- package/dist/auth/user-manager.d.ts +34 -0
- package/dist/auth/user-manager.d.ts.map +1 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +54 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts.map +1 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +226 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js.map +1 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +218 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs.map +1 -0
- package/dist/builtins/addon-pages-aggregator/index.d.ts +2 -0
- package/dist/builtins/addon-pages-aggregator/index.d.ts.map +1 -0
- package/dist/builtins/addon-pages-aggregator/index.js +7 -0
- package/dist/builtins/addon-pages-aggregator/index.mjs +2 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts +33 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +202 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +194 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/index.d.ts +2 -0
- package/dist/builtins/addon-widgets-aggregator/index.d.ts.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/index.js +7 -0
- package/dist/builtins/addon-widgets-aggregator/index.mjs +2 -0
- package/dist/builtins/alerts/alerts.addon.d.ts +82 -0
- package/dist/builtins/alerts/alerts.addon.d.ts.map +1 -0
- package/dist/builtins/alerts/alerts.addon.js +603 -0
- package/dist/builtins/alerts/alerts.addon.js.map +1 -0
- package/dist/builtins/alerts/alerts.addon.mjs +597 -0
- package/dist/builtins/alerts/alerts.addon.mjs.map +1 -0
- package/dist/builtins/alerts/index.d.ts +2 -0
- package/dist/builtins/alerts/index.d.ts.map +1 -0
- package/dist/builtins/alerts/index.js +3 -0
- package/dist/builtins/alerts/index.mjs +2 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts +8 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js +56 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js.map +1 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs +50 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/auth-orchestrator/index.d.ts +2 -0
- package/dist/builtins/auth-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/auth-orchestrator/index.js +7 -0
- package/dist/builtins/auth-orchestrator/index.mjs +2 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +148 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +7639 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js.map +1 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +7627 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/backup-orchestrator/cron-helpers.d.ts +24 -0
- package/dist/builtins/backup-orchestrator/cron-helpers.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/destination-policy.d.ts +73 -0
- package/dist/builtins/backup-orchestrator/destination-policy.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/download-helpers.d.ts +13 -0
- package/dist/builtins/backup-orchestrator/download-helpers.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/index.d.ts +3 -0
- package/dist/builtins/backup-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/index.js +7 -0
- package/dist/builtins/backup-orchestrator/index.mjs +2 -0
- package/dist/builtins/backup-orchestrator/manifest-store.d.ts +78 -0
- package/dist/builtins/backup-orchestrator/manifest-store.d.ts.map +1 -0
- package/dist/builtins/console-logging/console-destination.d.ts +14 -0
- package/dist/builtins/console-logging/console-destination.d.ts.map +1 -0
- package/dist/builtins/console-logging/console-logging.addon.d.ts +26 -0
- package/dist/builtins/console-logging/console-logging.addon.d.ts.map +1 -0
- package/dist/builtins/console-logging/index.d.ts +4 -0
- package/dist/builtins/console-logging/index.d.ts.map +1 -0
- package/dist/builtins/console-logging/index.js +106 -0
- package/dist/builtins/console-logging/index.js.map +1 -0
- package/dist/builtins/console-logging/index.mjs +97 -0
- package/dist/builtins/console-logging/index.mjs.map +1 -0
- package/dist/builtins/device-manager/device-event-propagator.d.ts +27 -0
- package/dist/builtins/device-manager/device-event-propagator.d.ts.map +1 -0
- package/dist/builtins/device-manager/device-manager.addon.d.ts +259 -0
- package/dist/builtins/device-manager/device-manager.addon.d.ts.map +1 -0
- package/dist/builtins/device-manager/device-manager.addon.js +2153 -0
- package/dist/builtins/device-manager/device-manager.addon.js.map +1 -0
- package/dist/builtins/device-manager/device-manager.addon.mjs +2147 -0
- package/dist/builtins/device-manager/device-manager.addon.mjs.map +1 -0
- package/dist/builtins/device-manager/index.d.ts +3 -0
- package/dist/builtins/device-manager/index.d.ts.map +1 -0
- package/dist/builtins/device-manager/index.js +7 -0
- package/dist/builtins/device-manager/index.mjs +2 -0
- package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts +45 -0
- package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts.map +1 -0
- package/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts +16 -0
- package/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts.map +1 -0
- package/dist/builtins/hub-forwarder/index.d.ts +4 -0
- package/dist/builtins/hub-forwarder/index.d.ts.map +1 -0
- package/dist/builtins/hub-forwarder/index.js +156 -0
- package/dist/builtins/hub-forwarder/index.js.map +1 -0
- package/dist/builtins/hub-forwarder/index.mjs +147 -0
- package/dist/builtins/hub-forwarder/index.mjs.map +1 -0
- package/dist/builtins/local-auth/auth-schema.d.ts +12 -0
- package/dist/builtins/local-auth/auth-schema.d.ts.map +1 -0
- package/dist/builtins/local-auth/index.d.ts +2 -0
- package/dist/builtins/local-auth/index.d.ts.map +1 -0
- package/dist/builtins/local-auth/index.js +3 -0
- package/dist/builtins/local-auth/index.mjs +2 -0
- package/dist/builtins/local-auth/local-auth.addon.d.ts +17 -0
- package/dist/builtins/local-auth/local-auth.addon.d.ts.map +1 -0
- package/dist/builtins/local-auth/local-auth.addon.js +6895 -0
- package/dist/builtins/local-auth/local-auth.addon.js.map +1 -0
- package/dist/builtins/local-auth/local-auth.addon.mjs +6885 -0
- package/dist/builtins/local-auth/local-auth.addon.mjs.map +1 -0
- package/dist/builtins/local-network/index.d.ts +3 -0
- package/dist/builtins/local-network/index.d.ts.map +1 -0
- package/dist/builtins/local-network/index.js +9 -0
- package/dist/builtins/local-network/index.mjs +2 -0
- package/dist/builtins/local-network/local-network.addon.d.ts +102 -0
- package/dist/builtins/local-network/local-network.addon.d.ts.map +1 -0
- package/dist/builtins/local-network/local-network.addon.js +404 -0
- package/dist/builtins/local-network/local-network.addon.js.map +1 -0
- package/dist/builtins/local-network/local-network.addon.mjs +392 -0
- package/dist/builtins/local-network/local-network.addon.mjs.map +1 -0
- package/dist/builtins/mesh-orchestrator/index.d.ts +2 -0
- package/dist/builtins/mesh-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/mesh-orchestrator/index.js +7 -0
- package/dist/builtins/mesh-orchestrator/index.mjs +2 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts +9 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js +83 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js.map +1 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs +77 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/native-metrics/index.d.ts +3 -0
- package/dist/builtins/native-metrics/index.d.ts.map +1 -0
- package/dist/builtins/native-metrics/native-metrics-provider.d.ts +49 -0
- package/dist/builtins/native-metrics/native-metrics-provider.d.ts.map +1 -0
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts +74 -0
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts.map +1 -0
- package/dist/builtins/native-metrics/native-metrics.addon.js +924 -0
- package/dist/builtins/native-metrics/native-metrics.addon.js.map +1 -0
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +916 -0
- package/dist/builtins/native-metrics/native-metrics.addon.mjs.map +1 -0
- package/dist/builtins/platform-probe/index.d.ts +12 -0
- package/dist/builtins/platform-probe/index.d.ts.map +1 -0
- package/dist/builtins/platform-probe/index.js +539 -0
- package/dist/builtins/platform-probe/index.js.map +1 -0
- package/dist/builtins/platform-probe/index.mjs +530 -0
- package/dist/builtins/platform-probe/index.mjs.map +1 -0
- package/dist/builtins/platform-probe/inference-config-resolver.d.ts +30 -0
- package/dist/builtins/platform-probe/inference-config-resolver.d.ts.map +1 -0
- package/dist/builtins/platform-probe/platform-scorer.d.ts +22 -0
- package/dist/builtins/platform-probe/platform-scorer.d.ts.map +1 -0
- package/dist/builtins/remote-access-orchestrator/index.d.ts +2 -0
- package/dist/builtins/remote-access-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/remote-access-orchestrator/index.js +7 -0
- package/dist/builtins/remote-access-orchestrator/index.mjs +2 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts +9 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +72 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js.map +1 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +66 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/snapshot/index.d.ts +3 -0
- package/dist/builtins/snapshot/index.d.ts.map +1 -0
- package/dist/builtins/snapshot/index.js +494 -0
- package/dist/builtins/snapshot/index.js.map +1 -0
- package/dist/builtins/snapshot/index.mjs +488 -0
- package/dist/builtins/snapshot/index.mjs.map +1 -0
- package/dist/builtins/snapshot/snapshot.addon.d.ts +121 -0
- package/dist/builtins/snapshot/snapshot.addon.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/config-store.d.ts +9 -0
- package/dist/builtins/sqlite-storage/config-store.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/device-store.d.ts +24 -0
- package/dist/builtins/sqlite-storage/device-store.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts +87 -0
- package/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +32 -2
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +311 -205
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js.map +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +305 -7
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs.map +1 -1
- package/dist/builtins/sqlite-storage/index.d.ts +12 -4
- package/dist/builtins/sqlite-storage/index.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/index.js +258 -1097
- package/dist/builtins/sqlite-storage/index.js.map +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +268 -28
- package/dist/builtins/sqlite-storage/index.mjs.map +1 -1
- package/dist/builtins/sqlite-storage/integration-registry.d.ts +28 -0
- package/dist/builtins/sqlite-storage/integration-registry.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/settings-store.d.ts +40 -0
- package/dist/builtins/sqlite-storage/settings-store.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sql-schema.d.ts +33 -0
- package/dist/builtins/sqlite-storage/sql-schema.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +94 -0
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +15 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +588 -417
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js.map +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +582 -7
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs.map +1 -1
- package/dist/builtins/storage-orchestrator/index.d.ts +7 -0
- package/dist/builtins/storage-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/storage-orchestrator/index.js +9 -0
- package/dist/builtins/storage-orchestrator/index.mjs +2 -0
- package/dist/builtins/storage-orchestrator/location-store.d.ts +50 -0
- package/dist/builtins/storage-orchestrator/location-store.d.ts.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +60 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +755 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +746 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +121 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts.map +1 -0
- package/dist/builtins/system-backup/system-backup.service.d.ts +138 -0
- package/dist/builtins/system-backup/system-backup.service.d.ts.map +1 -0
- package/dist/builtins/system-config/index.d.ts +2 -0
- package/dist/builtins/system-config/index.d.ts.map +1 -0
- package/dist/builtins/system-config/index.js +7 -0
- package/dist/builtins/system-config/index.mjs +2 -0
- package/dist/builtins/system-config/system-config.addon.d.ts +11 -0
- package/dist/builtins/system-config/system-config.addon.d.ts.map +1 -0
- package/dist/builtins/system-config/system-config.addon.js +234 -0
- package/dist/builtins/system-config/system-config.addon.js.map +1 -0
- package/dist/builtins/system-config/system-config.addon.mjs +228 -0
- package/dist/builtins/system-config/system-config.addon.mjs.map +1 -0
- package/dist/builtins/turn-orchestrator/index.d.ts +2 -0
- package/dist/builtins/turn-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/turn-orchestrator/index.js +7 -0
- package/dist/builtins/turn-orchestrator/index.mjs +2 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts +10 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js +78 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js.map +1 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs +72 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/winston-logging/index.d.ts +4 -30
- package/dist/builtins/winston-logging/index.d.ts.map +1 -0
- package/dist/builtins/winston-logging/index.js +153 -180
- package/dist/builtins/winston-logging/index.js.map +1 -1
- package/dist/builtins/winston-logging/index.mjs +144 -8
- package/dist/builtins/winston-logging/index.mjs.map +1 -1
- package/dist/builtins/winston-logging/winston-destination.d.ts +22 -0
- package/dist/builtins/winston-logging/winston-destination.d.ts.map +1 -0
- package/dist/builtins/winston-logging/winston-logging.addon.d.ts +20 -0
- package/dist/builtins/winston-logging/winston-logging.addon.d.ts.map +1 -0
- package/dist/chunk-C13QxCFV.js +50 -0
- package/dist/chunk-hT5z_Zn9.mjs +35 -0
- package/dist/download/model-download-service.d.ts +42 -0
- package/dist/download/model-download-service.d.ts.map +1 -0
- package/dist/download/model-downloader.d.ts +32 -0
- package/dist/download/model-downloader.d.ts.map +1 -0
- package/dist/events/event-bus.d.ts +11 -0
- package/dist/events/event-bus.d.ts.map +1 -0
- package/dist/events/system-event-bus.d.ts +15 -0
- package/dist/events/system-event-bus.d.ts.map +1 -0
- package/dist/feature/feature-manager.d.ts +12 -0
- package/dist/feature/feature-manager.d.ts.map +1 -0
- package/dist/formatter-C-5An4Bl.mjs +164 -0
- package/dist/formatter-C-5An4Bl.mjs.map +1 -0
- package/dist/formatter-Dr_6NNZc.js +169 -0
- package/dist/formatter-Dr_6NNZc.js.map +1 -0
- package/dist/index.d.ts +76 -1137
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7761 -7017
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7699 -3798
- package/dist/index.mjs.map +1 -1
- package/dist/lifecycle/lifecycle-state-machine.d.ts +29 -0
- package/dist/lifecycle/lifecycle-state-machine.d.ts.map +1 -0
- package/dist/logging/formatter.d.ts +31 -0
- package/dist/logging/formatter.d.ts.map +1 -0
- package/dist/logging/log-manager.d.ts +52 -0
- package/dist/logging/log-manager.d.ts.map +1 -0
- package/dist/logging/log-ring-buffer.d.ts +48 -0
- package/dist/logging/log-ring-buffer.d.ts.map +1 -0
- package/dist/logging/scoped-logger.d.ts +18 -0
- package/dist/logging/scoped-logger.d.ts.map +1 -0
- package/dist/network/network-quality.d.ts +12 -0
- package/dist/network/network-quality.d.ts.map +1 -0
- package/dist/notification/notification-service.d.ts +38 -0
- package/dist/notification/notification-service.d.ts.map +1 -0
- package/dist/notification/toast-service.d.ts +23 -0
- package/dist/notification/toast-service.d.ts.map +1 -0
- package/dist/pipeline/engine-manager-resolver.d.ts +16 -0
- package/dist/pipeline/engine-manager-resolver.d.ts.map +1 -0
- package/dist/pipeline/pipeline-runner.d.ts +9 -0
- package/dist/pipeline/pipeline-runner.d.ts.map +1 -0
- package/dist/pipeline/pipeline-validator.d.ts +14 -0
- package/dist/pipeline/pipeline-validator.d.ts.map +1 -0
- package/dist/process/resource-monitor.d.ts +12 -0
- package/dist/process/resource-monitor.d.ts.map +1 -0
- package/dist/python/python-env-manager.d.ts +13 -0
- package/dist/python/python-env-manager.d.ts.map +1 -0
- package/dist/repl/interfaces.d.ts +32 -0
- package/dist/repl/interfaces.d.ts.map +1 -0
- package/dist/repl/repl-engine.d.ts +9 -0
- package/dist/repl/repl-engine.d.ts.map +1 -0
- package/dist/resource-monitor-CmuWlmap.js +76 -0
- package/dist/resource-monitor-CmuWlmap.js.map +1 -0
- package/dist/resource-monitor-DcQdKGYU.mjs +59 -0
- package/dist/resource-monitor-DcQdKGYU.mjs.map +1 -0
- package/dist/storage/fs-storage-backend.d.ts +41 -0
- package/dist/storage/fs-storage-backend.d.ts.map +1 -0
- package/dist/storage/storage-location-manager.d.ts +24 -0
- package/dist/storage/storage-location-manager.d.ts.map +1 -0
- package/dist/storage/storage-manager.d.ts +77 -0
- package/dist/storage/storage-manager.d.ts.map +1 -0
- package/dist/tls/cert-manager.d.ts +27 -0
- package/dist/tls/cert-manager.d.ts.map +1 -0
- package/dist/tls/index.d.ts +2 -0
- package/dist/tls/index.d.ts.map +1 -0
- package/package.json +230 -13
- package/dist/builtins/local-backup/index.d.mts +0 -42
- package/dist/builtins/local-backup/index.d.ts +0 -42
- package/dist/builtins/local-backup/index.js +0 -188
- package/dist/builtins/local-backup/index.js.map +0 -1
- package/dist/builtins/local-backup/index.mjs +0 -10
- package/dist/builtins/local-backup/index.mjs.map +0 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.mts +0 -2
- package/dist/builtins/sqlite-storage/index.d.mts +0 -4
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.mts +0 -2
- package/dist/builtins/winston-logging/index.d.mts +0 -30
- package/dist/chunk-2F3XZYRW.mjs +0 -89
- package/dist/chunk-2F3XZYRW.mjs.map +0 -1
- package/dist/chunk-LQFPAEQF.mjs +0 -147
- package/dist/chunk-LQFPAEQF.mjs.map +0 -1
- package/dist/chunk-R3DIIBBX.mjs +0 -532
- package/dist/chunk-R3DIIBBX.mjs.map +0 -1
- package/dist/chunk-SMNR44VG.mjs +0 -386
- package/dist/chunk-SMNR44VG.mjs.map +0 -1
- package/dist/chunk-SO4LROOT.mjs +0 -150
- package/dist/chunk-SO4LROOT.mjs.map +0 -1
- package/dist/chunk-SPA4JBKN.mjs +0 -175
- package/dist/chunk-SPA4JBKN.mjs.map +0 -1
- package/dist/dist-3BY63UQ5.mjs +0 -2151
- package/dist/dist-3BY63UQ5.mjs.map +0 -1
- package/dist/filesystem-storage.addon-C42r589X.d.mts +0 -57
- package/dist/filesystem-storage.addon-C42r589X.d.ts +0 -57
- package/dist/index.d.mts +0 -1137
- package/dist/sql-schema-CKz78rId.d.mts +0 -97
- package/dist/sql-schema-CKz78rId.d.ts +0 -97
- package/dist/sqlite-settings.addon-KwG-uKMP.d.mts +0 -79
- package/dist/sqlite-settings.addon-KwG-uKMP.d.ts +0 -79
- package/dist/storage-location-manager-KKDQNAKA.mjs +0 -7
- package/dist/storage-location-manager-KKDQNAKA.mjs.map +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { BaseAddon, turnOrchestratorCapability } from "@camstack/types";
|
|
2
|
+
//#region src/builtins/turn-orchestrator/turn-orchestrator.addon.ts
|
|
3
|
+
/**
|
|
4
|
+
* TURN orchestrator — singleton facade over the `turn-provider`
|
|
5
|
+
* collection (Cloudflare TURN, coturn, Twilio, …). Mirrors the
|
|
6
|
+
* auth-orchestrator / remote-access-orchestrator patterns.
|
|
7
|
+
*
|
|
8
|
+
* Provides:
|
|
9
|
+
* - listProviders() — admin UI inventory
|
|
10
|
+
* - getAllServers() — combined ICE server list across enabled
|
|
11
|
+
* providers, consumed by the WebRTC layer at session creation
|
|
12
|
+
*/
|
|
13
|
+
var TurnOrchestratorAddon = class extends BaseAddon {
|
|
14
|
+
constructor() {
|
|
15
|
+
super({});
|
|
16
|
+
}
|
|
17
|
+
async onInitialize() {
|
|
18
|
+
const provider = {
|
|
19
|
+
listProviders: async () => this.listProviders(),
|
|
20
|
+
getAllServers: async () => this.getAllServers(),
|
|
21
|
+
setProviderEnabled: async () => {
|
|
22
|
+
return { success: true };
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
this.ctx.logger.info("TURN orchestrator initialized");
|
|
26
|
+
return [{
|
|
27
|
+
capability: turnOrchestratorCapability,
|
|
28
|
+
provider
|
|
29
|
+
}];
|
|
30
|
+
}
|
|
31
|
+
getEntries() {
|
|
32
|
+
return this.capabilities?.getCollectionEntries("turn-provider") ?? [];
|
|
33
|
+
}
|
|
34
|
+
async listProviders() {
|
|
35
|
+
const out = [];
|
|
36
|
+
for (const [addonId, impl] of this.getEntries()) {
|
|
37
|
+
let serverCount = 0;
|
|
38
|
+
let error;
|
|
39
|
+
if (impl.getTurnServers) try {
|
|
40
|
+
serverCount = (await impl.getTurnServers()).length;
|
|
41
|
+
} catch (err) {
|
|
42
|
+
error = err instanceof Error ? err.message : String(err);
|
|
43
|
+
}
|
|
44
|
+
out.push({
|
|
45
|
+
addonId,
|
|
46
|
+
displayName: impl.displayName ?? addonId,
|
|
47
|
+
kind: impl.kind ?? (addonId.includes("cloudflare") ? "cloudflare" : addonId.includes("coturn") ? "coturn" : "other"),
|
|
48
|
+
enabled: true,
|
|
49
|
+
serverCount,
|
|
50
|
+
...error !== void 0 ? { error } : {}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return out;
|
|
54
|
+
}
|
|
55
|
+
async getAllServers() {
|
|
56
|
+
const out = [];
|
|
57
|
+
for (const [, impl] of this.getEntries()) {
|
|
58
|
+
if (!impl.getTurnServers) continue;
|
|
59
|
+
try {
|
|
60
|
+
const servers = await impl.getTurnServers();
|
|
61
|
+
out.push(...servers);
|
|
62
|
+
} catch (err) {
|
|
63
|
+
this.ctx.logger.warn("TURN provider failed to enumerate servers", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { TurnOrchestratorAddon, TurnOrchestratorAddon as default };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=turn-orchestrator.addon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-orchestrator.addon.mjs","names":[],"sources":["../../../src/builtins/turn-orchestrator/turn-orchestrator.addon.ts"],"sourcesContent":["/**\n * TURN orchestrator — singleton facade over the `turn-provider`\n * collection (Cloudflare TURN, coturn, Twilio, …). Mirrors the\n * auth-orchestrator / remote-access-orchestrator patterns.\n *\n * Provides:\n * - listProviders() — admin UI inventory\n * - getAllServers() — combined ICE server list across enabled\n * providers, consumed by the WebRTC layer at session creation\n */\nimport {\n BaseAddon,\n turnOrchestratorCapability,\n type ITurnOrchestratorProvider,\n type TurnProviderInfo,\n type ProviderRegistration,\n} from '@camstack/types'\n\ninterface TurnProviderLike {\n getTurnServers?: () => Promise<readonly { urls: string | string[]; username?: string; credential?: string }[]>\n readonly displayName?: string\n readonly kind?: TurnProviderInfo['kind']\n}\n\nexport class TurnOrchestratorAddon extends BaseAddon<Record<string, never>> {\n constructor() {\n super({})\n }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const provider: ITurnOrchestratorProvider = {\n listProviders: async () => this.listProviders(),\n getAllServers: async () => this.getAllServers(),\n setProviderEnabled: async () => {\n // Persistence per-addon for now — see auth-orchestrator\n // rationale.\n return { success: true as const }\n },\n }\n this.ctx.logger.info('TURN orchestrator initialized')\n return [{ capability: turnOrchestratorCapability, provider }]\n }\n\n private getEntries(): readonly (readonly [string, TurnProviderLike])[] {\n return this.capabilities?.getCollectionEntries<TurnProviderLike>('turn-provider') ?? []\n }\n\n private async listProviders(): Promise<readonly TurnProviderInfo[]> {\n const out: TurnProviderInfo[] = []\n for (const [addonId, impl] of this.getEntries()) {\n let serverCount = 0\n let error: string | undefined\n if (impl.getTurnServers) {\n try {\n const servers = await impl.getTurnServers()\n serverCount = servers.length\n } catch (err) {\n error = err instanceof Error ? err.message : String(err)\n }\n }\n out.push({\n addonId,\n displayName: impl.displayName ?? addonId,\n kind: impl.kind ?? (addonId.includes('cloudflare') ? 'cloudflare' as const : addonId.includes('coturn') ? 'coturn' as const : 'other' as const),\n enabled: true,\n serverCount,\n ...(error !== undefined ? { error } : {}),\n })\n }\n return out\n }\n\n private async getAllServers(): Promise<readonly { urls: string | string[]; username?: string; credential?: string }[]> {\n const out: { urls: string | string[]; username?: string; credential?: string }[] = []\n for (const [, impl] of this.getEntries()) {\n if (!impl.getTurnServers) continue\n try {\n const servers = await impl.getTurnServers()\n out.push(...servers)\n } catch (err) {\n this.ctx.logger.warn('TURN provider failed to enumerate servers', {\n meta: { error: err instanceof Error ? err.message : String(err) },\n })\n }\n }\n return out\n }\n}\n\nexport default TurnOrchestratorAddon\n"],"mappings":";;;;;;;;;;;;AAwBA,IAAa,wBAAb,cAA2C,UAAiC;CAC1E,cAAc;EACZ,MAAM,EAAE,CAAC;;CAGX,MAAgB,eAAgD;EAC9D,MAAM,WAAsC;GAC1C,eAAe,YAAY,KAAK,eAAe;GAC/C,eAAe,YAAY,KAAK,eAAe;GAC/C,oBAAoB,YAAY;IAG9B,OAAO,EAAE,SAAS,MAAe;;GAEpC;EACD,KAAK,IAAI,OAAO,KAAK,gCAAgC;EACrD,OAAO,CAAC;GAAE,YAAY;GAA4B;GAAU,CAAC;;CAG/D,aAAuE;EACrE,OAAO,KAAK,cAAc,qBAAuC,gBAAgB,IAAI,EAAE;;CAGzF,MAAc,gBAAsD;EAClE,MAAM,MAA0B,EAAE;EAClC,KAAK,MAAM,CAAC,SAAS,SAAS,KAAK,YAAY,EAAE;GAC/C,IAAI,cAAc;GAClB,IAAI;GACJ,IAAI,KAAK,gBACP,IAAI;IAEF,eAAc,MADQ,KAAK,gBAAgB,EACrB;YACf,KAAK;IACZ,QAAQ,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;;GAG5D,IAAI,KAAK;IACP;IACA,aAAa,KAAK,eAAe;IACjC,MAAM,KAAK,SAAS,QAAQ,SAAS,aAAa,GAAG,eAAwB,QAAQ,SAAS,SAAS,GAAG,WAAoB;IAC9H,SAAS;IACT;IACA,GAAI,UAAU,KAAA,IAAY,EAAE,OAAO,GAAG,EAAE;IACzC,CAAC;;EAEJ,OAAO;;CAGT,MAAc,gBAAyG;EACrH,MAAM,MAA6E,EAAE;EACrF,KAAK,MAAM,GAAG,SAAS,KAAK,YAAY,EAAE;GACxC,IAAI,CAAC,KAAK,gBAAgB;GAC1B,IAAI;IACF,MAAM,UAAU,MAAM,KAAK,gBAAgB;IAC3C,IAAI,KAAK,GAAG,QAAQ;YACb,KAAK;IACZ,KAAK,IAAI,OAAO,KAAK,6CAA6C,EAChE,MAAM,EAAE,OAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI,EAAE,EAClE,CAAC;;;EAGN,OAAO"}
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly retentionDays: number;
|
|
6
|
-
/** Resolved absolute path to the logs directory (replaces the old dataPath field). */
|
|
7
|
-
readonly logsDir: string;
|
|
8
|
-
}
|
|
9
|
-
declare class WinstonDestination implements ILogDestination {
|
|
10
|
-
private logger;
|
|
11
|
-
initialize(config?: WinstonConfig): Promise<void>;
|
|
12
|
-
write(entry: LogEntry): void;
|
|
13
|
-
query(_filter: LogFilter): Promise<readonly LogEntry[]>;
|
|
14
|
-
shutdown(): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare class WinstonLoggingAddon implements ICamstackAddon, IConfigurable {
|
|
18
|
-
readonly manifest: AddonManifest;
|
|
19
|
-
private destination;
|
|
20
|
-
private currentConfig;
|
|
21
|
-
initialize(context: AddonContext): Promise<void>;
|
|
22
|
-
shutdown(): Promise<void>;
|
|
23
|
-
getDestination(): WinstonDestination;
|
|
24
|
-
getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
|
|
25
|
-
getConfigSchema(): ConfigUISchema;
|
|
26
|
-
getConfig(): Record<string, unknown>;
|
|
27
|
-
onConfigChange(config: Record<string, unknown>): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { WinstonDestination, WinstonLoggingAddon, WinstonLoggingAddon as default };
|
|
1
|
+
export { WinstonLoggingAddon } from './winston-logging.addon.js';
|
|
2
|
+
export { WinstonDestination } from './winston-destination.js';
|
|
3
|
+
export { WinstonLoggingAddon as default } from './winston-logging.addon.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtins/winston-logging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAA"}
|
|
@@ -1,185 +1,158 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/builtins/winston-logging/index.ts
|
|
31
|
-
var winston_logging_exports = {};
|
|
32
|
-
__export(winston_logging_exports, {
|
|
33
|
-
WinstonDestination: () => WinstonDestination,
|
|
34
|
-
WinstonLoggingAddon: () => WinstonLoggingAddon,
|
|
35
|
-
default: () => WinstonLoggingAddon
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
36
4
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
5
|
+
const require_chunk = require("../../chunk-C13QxCFV.js");
|
|
6
|
+
const require_formatter = require("../../formatter-Dr_6NNZc.js");
|
|
7
|
+
let node_path = require("node:path");
|
|
8
|
+
node_path = require_chunk.__toESM(node_path);
|
|
9
|
+
let _camstack_types = require("@camstack/types");
|
|
10
|
+
let winston = require("winston");
|
|
11
|
+
winston = require_chunk.__toESM(winston);
|
|
12
|
+
let winston_daily_rotate_file = require("winston-daily-rotate-file");
|
|
13
|
+
winston_daily_rotate_file = require_chunk.__toESM(winston_daily_rotate_file);
|
|
14
|
+
//#region src/builtins/winston-logging/winston-destination.ts
|
|
15
|
+
/**
|
|
16
|
+
* Rotated-file log destination. Console output goes through the shared
|
|
17
|
+
* `formatLogLine` so every console sink (Winston, ConsoleDestination,
|
|
18
|
+
* HubForwarderDestination) emits identical lines. File output keeps a
|
|
19
|
+
* structured JSON shape so log tooling can query tags/meta.
|
|
20
|
+
*/
|
|
49
21
|
var WinstonDestination = class {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return [];
|
|
99
|
-
}
|
|
100
|
-
async shutdown() {
|
|
101
|
-
if (!this.logger) return;
|
|
102
|
-
await new Promise((resolve) => {
|
|
103
|
-
this.logger.on("finish", resolve);
|
|
104
|
-
this.logger.end();
|
|
105
|
-
});
|
|
106
|
-
this.logger = null;
|
|
107
|
-
}
|
|
22
|
+
logger = null;
|
|
23
|
+
async initialize(config) {
|
|
24
|
+
const { level = "info", retentionDays = 30, logsDir = node_path.join("camstack-data", "logs") } = config ?? {};
|
|
25
|
+
winston.format.printf((info) => {
|
|
26
|
+
const rendered = info._rendered;
|
|
27
|
+
return typeof rendered === "string" ? rendered : String(info.message);
|
|
28
|
+
});
|
|
29
|
+
const stripRendered = winston.format((info) => {
|
|
30
|
+
delete info["_rendered"];
|
|
31
|
+
return info;
|
|
32
|
+
});
|
|
33
|
+
const fileFormat = winston.format.combine(winston.format.timestamp(), stripRendered(), winston.format.json());
|
|
34
|
+
this.logger = winston.createLogger({
|
|
35
|
+
level,
|
|
36
|
+
transports: [new winston_daily_rotate_file.default({
|
|
37
|
+
dirname: logsDir,
|
|
38
|
+
filename: "camstack-%DATE%.log",
|
|
39
|
+
datePattern: "YYYY-MM-DD",
|
|
40
|
+
maxFiles: `${retentionDays}d`,
|
|
41
|
+
format: fileFormat
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
write(entry) {
|
|
46
|
+
if (!this.logger) return;
|
|
47
|
+
const ts = entry.timestamp instanceof Date ? entry.timestamp.toISOString() : String(entry.timestamp);
|
|
48
|
+
const rendered = require_formatter.formatLogLine(entry, { colorize: true });
|
|
49
|
+
this.logger.log({
|
|
50
|
+
level: entry.level,
|
|
51
|
+
message: entry.message,
|
|
52
|
+
_rendered: rendered,
|
|
53
|
+
timestamp: ts,
|
|
54
|
+
scope: entry.scope,
|
|
55
|
+
...entry.tags ? { tags: entry.tags } : {},
|
|
56
|
+
...entry.meta ? { meta: entry.meta } : {}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async query(_filter) {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
async shutdown() {
|
|
63
|
+
if (!this.logger) return;
|
|
64
|
+
await new Promise((resolve) => {
|
|
65
|
+
this.logger.on("finish", resolve);
|
|
66
|
+
this.logger.end();
|
|
67
|
+
});
|
|
68
|
+
this.logger = null;
|
|
69
|
+
}
|
|
108
70
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/builtins/winston-logging/winston-logging.addon.ts
|
|
73
|
+
/**
|
|
74
|
+
* Winston logging addon — rotated log files + console output.
|
|
75
|
+
* Settings appear under Cluster → NodeDetail → Settings.
|
|
76
|
+
*/
|
|
77
|
+
var WinstonLoggingAddon = class extends _camstack_types.BaseAddon {
|
|
78
|
+
destination = null;
|
|
79
|
+
constructor() {
|
|
80
|
+
super({
|
|
81
|
+
level: "info",
|
|
82
|
+
retentionDays: 30
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async onInitialize() {
|
|
86
|
+
const logsDir = await this.ctx.api.storage.resolve.query({
|
|
87
|
+
location: "logs",
|
|
88
|
+
relativePath: ""
|
|
89
|
+
}).catch(() => "camstack-data/logs");
|
|
90
|
+
this.destination = new WinstonDestination();
|
|
91
|
+
await this.destination.initialize({
|
|
92
|
+
...this.config,
|
|
93
|
+
logsDir
|
|
94
|
+
});
|
|
95
|
+
this.ctx.logger.info("Winston logging initialized");
|
|
96
|
+
return [{
|
|
97
|
+
capability: _camstack_types.logDestinationCapability,
|
|
98
|
+
provider: this.destination
|
|
99
|
+
}];
|
|
100
|
+
}
|
|
101
|
+
async onShutdown() {
|
|
102
|
+
await this.destination?.shutdown();
|
|
103
|
+
}
|
|
104
|
+
getDestination() {
|
|
105
|
+
if (!this.destination) throw new Error("Winston not initialized");
|
|
106
|
+
return this.destination;
|
|
107
|
+
}
|
|
108
|
+
globalSettingsSchema() {
|
|
109
|
+
return this.schema({ sections: [{
|
|
110
|
+
id: "winston-logging",
|
|
111
|
+
title: "Logging",
|
|
112
|
+
description: "Global log verbosity + retention for rotated log files on this node.",
|
|
113
|
+
columns: 2,
|
|
114
|
+
fields: [this.field({
|
|
115
|
+
type: "select",
|
|
116
|
+
key: "level",
|
|
117
|
+
label: "Log Level",
|
|
118
|
+
default: "info",
|
|
119
|
+
options: [
|
|
120
|
+
{
|
|
121
|
+
value: "debug",
|
|
122
|
+
label: "Debug"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
value: "info",
|
|
126
|
+
label: "Info"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
value: "warn",
|
|
130
|
+
label: "Warn"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
value: "error",
|
|
134
|
+
label: "Error"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}), this.field({
|
|
138
|
+
type: "number",
|
|
139
|
+
key: "retentionDays",
|
|
140
|
+
label: "Retention (days)",
|
|
141
|
+
description: "Number of days to keep rotated log files before deletion",
|
|
142
|
+
min: 1,
|
|
143
|
+
max: 365,
|
|
144
|
+
step: 1,
|
|
145
|
+
default: 30,
|
|
146
|
+
unit: "days"
|
|
147
|
+
})]
|
|
148
|
+
}] });
|
|
149
|
+
}
|
|
179
150
|
};
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
151
|
+
//#endregion
|
|
152
|
+
exports.WinstonDestination = WinstonDestination;
|
|
153
|
+
exports.WinstonDestination$1 = WinstonDestination;
|
|
154
|
+
exports.WinstonLoggingAddon = WinstonLoggingAddon;
|
|
155
|
+
exports.WinstonLoggingAddon$1 = WinstonLoggingAddon;
|
|
156
|
+
exports.default = WinstonLoggingAddon;
|
|
157
|
+
|
|
185
158
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/builtins/winston-logging/winston-destination.ts","../../../src/builtins/winston-logging/winston-logging.addon.ts"],"sourcesContent":["import * as winston from 'winston'\nimport DailyRotateFile from 'winston-daily-rotate-file'\nimport * as path from 'node:path'\nimport type { ILogDestination, LogEntry, LogFilter } from '@camstack/types'\nimport { formatLogLine } from '../../logging/formatter.js'\n\ninterface WinstonConfig {\n readonly level: string\n readonly retentionDays: number\n /** Resolved absolute path to the logs directory (replaces the old dataPath field). */\n readonly logsDir: string\n}\n\n/**\n * Rotated-file log destination. Console output goes through the shared\n * `formatLogLine` so every console sink (Winston, ConsoleDestination,\n * HubForwarderDestination) emits identical lines. File output keeps a\n * structured JSON shape so log tooling can query tags/meta.\n */\nexport class WinstonDestination implements ILogDestination {\n private logger: winston.Logger | null = null\n\n async initialize(config?: WinstonConfig): Promise<void> {\n const {\n level = 'info',\n retentionDays = 30,\n logsDir = path.join('camstack-data', 'logs'),\n } = config ?? {}\n\n // Console: canonical single-line formatter — `_rendered` already\n // carries level-based ANSI colour codes (see `formatLogLine` in\n // `@camstack/core/logging/formatter.ts`). Using Winston's colorize\n // here would just decorate unused `info.level` and leave the\n // rendered line uncoloured.\n const consoleFormat = winston.format.printf((info) => {\n const rendered = (info as unknown as { _rendered?: string })._rendered\n return typeof rendered === 'string' ? rendered : String(info.message)\n })\n\n // File: structured JSON. Strip `_rendered` first — it carries ANSI\n // escape codes intended for the terminal and has no place in a\n // rotated-file store used for ops queries.\n const stripRendered = winston.format((info) => {\n delete (info as Record<string, unknown>)['_rendered']\n return info\n })\n const fileFormat = winston.format.combine(\n winston.format.timestamp(),\n stripRendered(),\n winston.format.json(),\n )\n\n // File-only winston. Stdout is owned by `ConsoleDestination`\n // (the `console-logging` builtin addon) — adding a Winston console\n // transport here would re-render every log line a second time on\n // the hub terminal, which is the historic cause of the duplicate\n // output operators have been seeing. The `consoleFormat` printf\n // above stays wired in so a future opt-in transport can use it\n // without re-deriving the layout.\n void consoleFormat\n this.logger = winston.createLogger({\n level,\n transports: [\n new DailyRotateFile({\n dirname: logsDir,\n filename: 'camstack-%DATE%.log',\n datePattern: 'YYYY-MM-DD',\n maxFiles: `${retentionDays}d`,\n format: fileFormat,\n }),\n ],\n })\n }\n\n write(entry: LogEntry): void {\n if (!this.logger) return\n\n // Moleculer JSON serialization converts Date → string; normalize back\n const ts = entry.timestamp instanceof Date\n ? entry.timestamp.toISOString()\n : String(entry.timestamp)\n // Render once with colours for the console transport; file transport\n // strips `_rendered` via the format chain above so disk stays plain.\n const rendered = formatLogLine(entry, { colorize: true })\n\n this.logger.log({\n level: entry.level,\n message: entry.message,\n _rendered: rendered,\n timestamp: ts,\n scope: entry.scope,\n ...(entry.tags ? { tags: entry.tags } : {}),\n ...(entry.meta ? { meta: entry.meta } : {}),\n })\n }\n\n async query(_filter: LogFilter): Promise<readonly LogEntry[]> {\n // File-based log querying is not implemented; use structured storage for log queries\n return []\n }\n\n async shutdown(): Promise<void> {\n if (!this.logger) return\n\n await new Promise<void>((resolve) => {\n this.logger!.on('finish', resolve)\n this.logger!.end()\n })\n this.logger = null\n }\n}\n","import type { ProviderRegistration } from '@camstack/types'\nimport { BaseAddon, logDestinationCapability } from '@camstack/types'\nimport { WinstonDestination } from './winston-destination.js'\n\ninterface WinstonConfig {\n readonly level: string\n readonly retentionDays: number\n}\n\n/**\n * Winston logging addon — rotated log files + console output.\n * Settings appear under Cluster → NodeDetail → Settings.\n */\nexport class WinstonLoggingAddon extends BaseAddon<WinstonConfig> {\n private destination: WinstonDestination | null = null\n\n constructor() {\n super({ level: 'info', retentionDays: 30 })\n }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const logsDir = await this.ctx.api.storage.resolve.query({ location: 'logs', relativePath: '' })\n .catch(() => 'camstack-data/logs')\n this.destination = new WinstonDestination()\n await this.destination.initialize({ ...this.config, logsDir })\n this.ctx.logger.info('Winston logging initialized')\n return [{ capability: logDestinationCapability, provider: this.destination }]\n }\n\n protected async onShutdown(): Promise<void> {\n await this.destination?.shutdown()\n }\n\n getDestination(): WinstonDestination {\n if (!this.destination) throw new Error('Winston not initialized')\n return this.destination\n }\n\n protected globalSettingsSchema() {\n return this.schema({\n sections: [\n {\n id: 'winston-logging',\n title: 'Logging',\n description: 'Global log verbosity + retention for rotated log files on this node.',\n columns: 2,\n fields: [\n this.field({\n type: 'select',\n key: 'level',\n label: 'Log Level',\n default: 'info',\n options: [\n { value: 'debug', label: 'Debug' },\n { value: 'info', label: 'Info' },\n { value: 'warn', label: 'Warn' },\n { value: 'error', label: 'Error' },\n ],\n }),\n this.field({\n type: 'number',\n key: 'retentionDays',\n label: 'Retention (days)',\n description: 'Number of days to keep rotated log files before deletion',\n min: 1,\n max: 365,\n step: 1,\n default: 30,\n unit: 'days',\n }),\n ],\n },\n ],\n })\n }\n}\n"],"mappings":"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"}
|