feat(#369): install @mosaicstack/telemetry-client in API

- Add .npmrc with scoped Gitea npm registry for @mosaicstack packages
- Create MosaicTelemetryModule (global, lifecycle-aware) at
  apps/api/src/mosaic-telemetry/
- Create MosaicTelemetryService wrapping TelemetryClient with
  convenience methods: trackTaskCompletion, getPrediction,
  refreshPredictions, eventBuilder
- Create mosaic-telemetry.config.ts for env var integration via
  NestJS ConfigService
- Register MosaicTelemetryModule in AppModule
- Add 32 unit tests covering module init, service methods, disabled
  mode, dry-run mode, and lifecycle management

Refs #369

Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
2026-02-15 02:10:22 -06:00
co-authored by Claude Opus 4.6
parent 8d8d37dbf9
commit 314dd24dce
10 changed files with 1026 additions and 0 deletions
+8
View File
@@ -66,6 +66,9 @@ importers:
'@mosaic/shared':
specifier: workspace:*
version: link:../../packages/shared
'@mosaicstack/telemetry-client':
specifier: ^0.1.0
version: 0.1.0
'@nestjs/axios':
specifier: ^4.0.1
version: 4.0.1(@nestjs/[email protected]([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])
@@ -1500,6 +1503,9 @@ packages:
'@mermaid-js/[email protected]':
resolution: {integrity: sha512-lnjOhe7zyHjc+If7yT4zoedx2vo4sHaTmtkl1+or8BRTnCtDmcTpAjpzDSfCZrshM5bCoz0GyidzadJAH1xobA==}
'@mosaicstack/[email protected]':
resolution: {integrity: sha512-j78u9QDIAhTPzGfi9hfiM1wIhw9DUsjshGQ8PrXBdMcp22hfocdmjys4VwwvGiHYTn45um9rY04H4W1NdCaMiA==, tarball: https://git.mosaicstack.dev/api/packages/mosaic/npm/%40mosaicstack%2Ftelemetry-client/-/0.1.0/telemetry-client-0.1.0.tgz}
'@mrleebo/[email protected]':
resolution: {integrity: sha512-XyroGQXcHrZdvmrGJvsA9KNeOOgGMg1Vg9OlheUsBOSKznLMDl+YChxbkboRHvtFYJEMRYmlV3uoo/njCw05iw==}
engines: {node: '>=16'}
@@ -7732,6 +7738,8 @@ snapshots:
dependencies:
langium: 3.3.1
'@mosaicstack/[email protected]': {}
'@mrleebo/[email protected]':
dependencies:
chevrotain: 10.5.0