@schorts/shared-kernel 4.0.0 โ†’ 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.1.0] - 2025-10-21
9
+
10
+ ### Added
11
+
12
+ - Added `Telemetry`.
13
+
8
14
  ## [4.0.0] - 2025-10-21
9
15
 
10
16
  ### Added
package/README.md CHANGED
@@ -82,6 +82,10 @@ Translation keys are centralized in registries for discoverability and tooling,
82
82
  - **SessionStorageStateManager:** Concrete implementation using session storage.
83
83
  - **InMemoryStateManager:** Concrete implementation using in-memory.
84
84
 
85
+ ### ๐Ÿ“ˆ Telemetry
86
+
87
+ - **Telemetry:** Abstract interface for unified telemetry across frontend and backend environments. Supports initialization, error tracking, custom context attributes, and transaction naming. Enables integration with observability platforms like New Relic via a consistent API.
88
+
85
89
  ### ๐Ÿงช Value Objects
86
90
 
87
91
  - **CoordinatesValue**
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/telemetry/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=telemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../src/telemetry/telemetry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/telemetry/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=telemetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../src/telemetry/telemetry.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  export interface Subscription {
2
+ init(): void;
2
3
  connect(): void;
3
4
  subscribe(channel: string, event: string, handler: (payload: any) => void): void;
4
5
  unsubscribe(channel: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../src/pub-sub/subscription.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,IAAI,IAAI,CAAC;IAChB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IACjF,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,IAAI,IAAI,CAAC;CACpB"}
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../src/pub-sub/subscription.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,IAAI,IAAI,CAAC;IACb,OAAO,IAAI,IAAI,CAAC;IAChB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IACjF,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,UAAU,IAAI,IAAI,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export type { telemetry } from "./telemetry";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface telemetry {
2
+ init(): void;
3
+ trackError(error: Error): void;
4
+ setCustomContext(key: string, value: string): void;
5
+ setTransaction(name: string): void;
6
+ }
7
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../src/telemetry/telemetry.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,IAAI,IAAI,CAAC;IACb,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/B,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACnD,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schorts/shared-kernel",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "A modular, type-safe foundation for building expressive, maintainable applications. This package provides core abstractions for domain modeling, HTTP integration, authentication, state management, and more โ€” designed to be framework-agnostic and highly extensible.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -101,6 +101,11 @@
101
101
  "require": "./dist/cjs/state-manager/index.js",
102
102
  "types": "./dist/types/state-manager/index.d.ts"
103
103
  },
104
+ "./telemetry": {
105
+ "import": "./dist/esm/telemetry/index.js",
106
+ "require": "./dist/cjs/telemetry/index.js",
107
+ "types": "./dist/types/telemetry/index.d.ts"
108
+ },
104
109
  "./unit-of-work": {
105
110
  "import": "./dist/esm/unit-of-work/index.js",
106
111
  "require": "./dist/cjs/unit-of-work/index.js",
@@ -1,4 +1,5 @@
1
1
  export interface Subscription {
2
+ init(): void;
2
3
  connect(): void;
3
4
  subscribe(channel: string, event: string, handler: (payload: any) => void): void;
4
5
  unsubscribe(channel: string): void;
@@ -0,0 +1 @@
1
+ export type { telemetry } from "./telemetry";
@@ -0,0 +1,6 @@
1
+ export interface telemetry {
2
+ init(): void;
3
+ trackError(error: Error): void;
4
+ setCustomContext(key: string, value: string): void;
5
+ setTransaction(name: string): void;
6
+ }