arvo-event-handler 2.1.1 → 2.1.3
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.md
CHANGED
|
@@ -27,7 +27,11 @@
|
|
|
27
27
|
## [2.0.0] - 2024-11-26
|
|
28
28
|
|
|
29
29
|
- Added support for versioned contracts in event handler for better versioning support
|
|
30
|
+
|
|
30
31
|
## [2.1.1] - 2024-12-10
|
|
31
32
|
|
|
32
33
|
- Updated the telemetry implementation to be more streamlined, fixed some minor bugs and added better telemetry logging
|
|
34
|
+
## [2.1.3] - 2024-12-19
|
|
35
|
+
|
|
36
|
+
- Updated the opentelemetry core version and arvo core versions
|
|
33
37
|
|
|
@@ -176,6 +176,10 @@ var ArvoEventHandler = /** @class */ (function (_super) {
|
|
|
176
176
|
message: "Event type '".concat(event.type, "' validated against contract '").concat(this.contract.uri, "'"),
|
|
177
177
|
});
|
|
178
178
|
parsedDataSchema = arvo_core_1.EventDataschemaUtil.parse(event);
|
|
179
|
+
if ((parsedDataSchema === null || parsedDataSchema === void 0 ? void 0 : parsedDataSchema.uri) &&
|
|
180
|
+
(parsedDataSchema === null || parsedDataSchema === void 0 ? void 0 : parsedDataSchema.uri) !== this.contract.uri) {
|
|
181
|
+
throw new Error("Contract URI mismatch: Handler expects '".concat(this.contract.uri, "' but event dataschema specifies '").concat(event.dataschema, "'. Events must reference the same contract URI as their handler."));
|
|
182
|
+
}
|
|
179
183
|
if (!(parsedDataSchema === null || parsedDataSchema === void 0 ? void 0 : parsedDataSchema.version)) {
|
|
180
184
|
(0, arvo_core_1.logToSpan)({
|
|
181
185
|
level: 'WARNING',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arvo-event-handler",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Type-safe event handler system with versioning, telemetry, and contract validation for distributed Arvo event-driven architectures, featuring routing and multi-handler support.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@opentelemetry/api": "^1.9.0",
|
|
52
|
-
"@opentelemetry/core": "^1.
|
|
53
|
-
"arvo-core": "^2.1.
|
|
52
|
+
"@opentelemetry/core": "^1.28.0",
|
|
53
|
+
"arvo-core": "^2.1.12",
|
|
54
54
|
"uuid": "^10.0.0",
|
|
55
55
|
"zod": "^3.23.8"
|
|
56
56
|
}
|