arvo-core 3.0.24 → 3.0.25

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.
@@ -77,7 +77,7 @@ var ArvoOrchestratorEventFactory = /** @class */ (function (_super) {
77
77
  name: "".concat(this._name, ".init<").concat(this.contract.accepts.type, ">"),
78
78
  spanOptions: (0, utils_2.createSpanOptions)(this.contract),
79
79
  fn: function (span) {
80
- var _a, _b, _c, _d, _e, _f, _g, _h;
80
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
81
81
  var otelHeaders = (0, OpenTelemetry_1.currentOpenTelemetryHeaders)();
82
82
  var validationResult = _this.contract.accepts.schema.safeParse(event.data);
83
83
  if (!validationResult.success) {
@@ -89,22 +89,23 @@ var ArvoOrchestratorEventFactory = /** @class */ (function (_super) {
89
89
  orchestator: _this.contract.accepts.type,
90
90
  subject: parentSubject,
91
91
  version: _this.contract.version,
92
+ domain: (_b = event.domain) !== null && _b !== void 0 ? _b : null,
92
93
  meta: Object.fromEntries(Object.entries({
93
- redirectto: (_b = event.redirectto) !== null && _b !== void 0 ? _b : ArvoOrchestrationSubject_1.default.parse(parentSubject).execution.initiator,
94
+ redirectto: (_c = event.redirectto) !== null && _c !== void 0 ? _c : ArvoOrchestrationSubject_1.default.parse(parentSubject).execution.initiator,
94
95
  }).filter(function (item) { return Boolean(item[1]); })),
95
96
  })
96
97
  : ArvoOrchestrationSubject_1.default.new({
97
98
  orchestator: _this.contract.accepts.type,
98
99
  initiator: event.source,
99
100
  version: _this.contract.version,
100
- domain: (_c = event.domain) !== null && _c !== void 0 ? _c : null,
101
+ domain: (_d = event.domain) !== null && _d !== void 0 ? _d : null,
101
102
  meta: event.redirectto
102
103
  ? {
103
104
  redirectto: event.redirectto,
104
105
  }
105
106
  : undefined,
106
107
  }));
107
- var generatedEvent = (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { subject: eventSubject, traceparent: (_e = (_d = event.traceparent) !== null && _d !== void 0 ? _d : otelHeaders.traceparent) !== null && _e !== void 0 ? _e : undefined, tracestate: (_g = (_f = event.tracestate) !== null && _f !== void 0 ? _f : otelHeaders.tracestate) !== null && _g !== void 0 ? _g : undefined, type: _this.contract.accepts.type, datacontenttype: schema_1.ArvoDataContentType, dataschema: utils_1.EventDataschemaUtil.create(_this.contract), data: validationResult.data, domain: (_h = event.domain) !== null && _h !== void 0 ? _h : undefined }), extensions, { disable: true });
108
+ var generatedEvent = (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { subject: eventSubject, traceparent: (_f = (_e = event.traceparent) !== null && _e !== void 0 ? _e : otelHeaders.traceparent) !== null && _f !== void 0 ? _f : undefined, tracestate: (_h = (_g = event.tracestate) !== null && _g !== void 0 ? _g : otelHeaders.tracestate) !== null && _h !== void 0 ? _h : undefined, type: _this.contract.accepts.type, datacontenttype: schema_1.ArvoDataContentType, dataschema: utils_1.EventDataschemaUtil.create(_this.contract), data: validationResult.data, domain: (_j = event.domain) !== null && _j !== void 0 ? _j : undefined }), extensions, { disable: true });
108
109
  span.setAttributes(generatedEvent.otelAttributes);
109
110
  return generatedEvent;
110
111
  },
@@ -113,7 +113,7 @@ var ArvoOrchestrationSubject = /** @class */ (function () {
113
113
  initiator: parsedSubject.orchestrator.name,
114
114
  version: (_a = param.version) !== null && _a !== void 0 ? _a : WildCardArvoSemanticVersion_1.WildCardArvoSemanticVersion,
115
115
  orchestator: param.orchestator,
116
- domain: param.domain === null ? null : ((_c = (_b = param.domain) !== null && _b !== void 0 ? _b : parsedSubject.execution.domain) !== null && _c !== void 0 ? _c : null),
116
+ domain: (_c = (_b = param.domain) !== null && _b !== void 0 ? _b : parsedSubject.execution.domain) !== null && _c !== void 0 ? _c : null,
117
117
  meta: __assign(__assign({}, ((_d = parsedSubject.meta) !== null && _d !== void 0 ? _d : {})), ((_e = param.meta) !== null && _e !== void 0 ? _e : {})),
118
118
  });
119
119
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arvo-core",
3
- "version": "3.0.24",
3
+ "version": "3.0.25",
4
4
  "main": "dist/index.js",
5
5
  "description": "The core Arvo package which provides application tier core primitives and contract system for building production-grade event-driven application. Provides ArvoEvent (CloudEvents-compliant), ArvoContract for type-safe service interfaces, event factories, OpenTelemetry integration, and orchestration utilities - enabling infrastructure-agnostic, composable, and observable distributed systems-compliant applications.",
6
6
  "repository": {