arvo-core 2.2.2 → 2.2.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/dist/ArvoContract/errors.d.ts +10 -0
- package/dist/ArvoContract/errors.js +36 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* Custom error class representing a violation of an ArvoContract.
|
3
|
+
*/
|
4
|
+
export declare class ArvoContractViolationError extends Error {
|
5
|
+
/**
|
6
|
+
* Creates an instance of ArvoContractViolationError.
|
7
|
+
* @param {string} [message='ArvoContract violated'] - The error message. Default is 'ArvoContract violated'.
|
8
|
+
*/
|
9
|
+
constructor(message?: string);
|
10
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
3
|
+
var extendStatics = function (d, b) {
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
+
return extendStatics(d, b);
|
8
|
+
};
|
9
|
+
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
+
extendStatics(d, b);
|
13
|
+
function __() { this.constructor = d; }
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
+
};
|
16
|
+
})();
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
+
exports.ArvoContractViolationError = void 0;
|
19
|
+
/**
|
20
|
+
* Custom error class representing a violation of an ArvoContract.
|
21
|
+
*/
|
22
|
+
var ArvoContractViolationError = /** @class */ (function (_super) {
|
23
|
+
__extends(ArvoContractViolationError, _super);
|
24
|
+
/**
|
25
|
+
* Creates an instance of ArvoContractViolationError.
|
26
|
+
* @param {string} [message='ArvoContract violated'] - The error message. Default is 'ArvoContract violated'.
|
27
|
+
*/
|
28
|
+
function ArvoContractViolationError(message) {
|
29
|
+
if (message === void 0) { message = 'ArvoContract violated'; }
|
30
|
+
var _this = _super.call(this, message) || this;
|
31
|
+
_this.name = 'ArvoContractViolationError';
|
32
|
+
return _this;
|
33
|
+
}
|
34
|
+
return ArvoContractViolationError;
|
35
|
+
}(Error));
|
36
|
+
exports.ArvoContractViolationError = ArvoContractViolationError;
|
package/dist/index.d.ts
CHANGED
@@ -28,6 +28,7 @@ import { isWildCardArvoSematicVersion, WildCardArvoSemanticVersion } from './Arv
|
|
28
28
|
import { createSimpleArvoContract } from './ArvoContract/SimpleArvoContract';
|
29
29
|
import { SimpleArvoContract } from './ArvoContract/SimpleArvoContract/types';
|
30
30
|
import { ArvoOrchestratorEventFactory } from './ArvoEventFactory/Orchestrator';
|
31
|
+
import { ArvoContractViolationError } from './ArvoContract/errors';
|
31
32
|
/**
|
32
33
|
* Collection of Zod schemas for validating various aspects of Arvo events.
|
33
34
|
* @property {z.ZodObject} CloudEventContextSchema - Schema for core CloudEvent properties.
|
@@ -102,4 +103,4 @@ declare const ArvoEventSchema: {
|
|
102
103
|
parentSubject$$: string | null;
|
103
104
|
}>;
|
104
105
|
};
|
105
|
-
export { ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchema, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, OpenTelemetryHeaders, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, createArvoContract, ArvoContractValidators, ArvoContractRecord, IArvoContract, ResolveArvoContractRecord, ArvoEventFactory, createArvoEventFactory, currentOpenTelemetryHeaders, OpenInference, OpenInferenceSpanKind, ArvoExecution, ArvoExecutionSpanKind, ArvoContractJSONSchema, ArvoOrchestrationSubject, ArvoOrchestrationSubjectContent, ArvoSemanticVersion, InferArvoEvent, createArvoOrchestratorContract, ICreateArvoOrchestratorContract, ArvoOrchestratorEventTypeGen, EventDataschemaUtil, ArvoOrchestrationSubjectContentSchema, ArvoSemanticVersionSchema, ArvoErrorSchema, ArvoErrorType, compareSemanticVersions, parseSemanticVersion, createSimpleArvoContract, ArvoOrchestratorContract, VersionedArvoContract, InferVersionedArvoContract, isWildCardArvoSematicVersion, WildCardArvoSemanticVersion, isValidArvoSemanticVersion, SimpleArvoContract, ArvoOrchestratorEventFactory, createArvoOrchestratorEventFactory, ArvoOpenTelemetry, };
|
106
|
+
export { ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchema, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, OpenTelemetryHeaders, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, ArvoContractViolationError, createArvoContract, ArvoContractValidators, ArvoContractRecord, IArvoContract, ResolveArvoContractRecord, ArvoEventFactory, createArvoEventFactory, currentOpenTelemetryHeaders, OpenInference, OpenInferenceSpanKind, ArvoExecution, ArvoExecutionSpanKind, ArvoContractJSONSchema, ArvoOrchestrationSubject, ArvoOrchestrationSubjectContent, ArvoSemanticVersion, InferArvoEvent, createArvoOrchestratorContract, ICreateArvoOrchestratorContract, ArvoOrchestratorEventTypeGen, EventDataschemaUtil, ArvoOrchestrationSubjectContentSchema, ArvoSemanticVersionSchema, ArvoErrorSchema, ArvoErrorType, compareSemanticVersions, parseSemanticVersion, createSimpleArvoContract, ArvoOrchestratorContract, VersionedArvoContract, InferVersionedArvoContract, isWildCardArvoSematicVersion, WildCardArvoSemanticVersion, isValidArvoSemanticVersion, SimpleArvoContract, ArvoOrchestratorEventFactory, createArvoOrchestratorEventFactory, ArvoOpenTelemetry, };
|
package/dist/index.js
CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.ArvoOpenTelemetry = exports.createArvoOrchestratorEventFactory = exports.ArvoOrchestratorEventFactory = exports.isValidArvoSemanticVersion = exports.WildCardArvoSemanticVersion = exports.isWildCardArvoSematicVersion = exports.VersionedArvoContract = exports.createSimpleArvoContract = exports.parseSemanticVersion = exports.compareSemanticVersions = exports.ArvoErrorSchema = exports.ArvoSemanticVersionSchema = exports.ArvoOrchestrationSubjectContentSchema = exports.EventDataschemaUtil = exports.ArvoOrchestratorEventTypeGen = exports.createArvoOrchestratorContract = exports.ArvoOrchestrationSubject = exports.ArvoExecutionSpanKind = exports.ArvoExecution = exports.OpenInferenceSpanKind = exports.OpenInference = exports.currentOpenTelemetryHeaders = exports.createArvoEventFactory = exports.ArvoEventFactory = exports.ArvoContractValidators = exports.createArvoContract = exports.ArvoContract = exports.cleanString = exports.validateURI = exports.OTelNull = exports.logToSpan = exports.exceptionToSpan = exports.ArvoEventSchema = exports.ArvoDataContentType = exports.createArvoEvent = exports.ArvoEvent = void 0;
|
6
|
+
exports.ArvoOpenTelemetry = exports.createArvoOrchestratorEventFactory = exports.ArvoOrchestratorEventFactory = exports.isValidArvoSemanticVersion = exports.WildCardArvoSemanticVersion = exports.isWildCardArvoSematicVersion = exports.VersionedArvoContract = exports.createSimpleArvoContract = exports.parseSemanticVersion = exports.compareSemanticVersions = exports.ArvoErrorSchema = exports.ArvoSemanticVersionSchema = exports.ArvoOrchestrationSubjectContentSchema = exports.EventDataschemaUtil = exports.ArvoOrchestratorEventTypeGen = exports.createArvoOrchestratorContract = exports.ArvoOrchestrationSubject = exports.ArvoExecutionSpanKind = exports.ArvoExecution = exports.OpenInferenceSpanKind = exports.OpenInference = exports.currentOpenTelemetryHeaders = exports.createArvoEventFactory = exports.ArvoEventFactory = exports.ArvoContractValidators = exports.createArvoContract = exports.ArvoContractViolationError = exports.ArvoContract = exports.cleanString = exports.validateURI = exports.OTelNull = exports.logToSpan = exports.exceptionToSpan = exports.ArvoEventSchema = exports.ArvoDataContentType = exports.createArvoEvent = exports.ArvoEvent = void 0;
|
7
7
|
var ArvoEvent_1 = __importDefault(require("./ArvoEvent"));
|
8
8
|
exports.ArvoEvent = ArvoEvent_1.default;
|
9
9
|
var schema_1 = require("./ArvoEvent/schema");
|
@@ -63,6 +63,8 @@ var SimpleArvoContract_1 = require("./ArvoContract/SimpleArvoContract");
|
|
63
63
|
Object.defineProperty(exports, "createSimpleArvoContract", { enumerable: true, get: function () { return SimpleArvoContract_1.createSimpleArvoContract; } });
|
64
64
|
var Orchestrator_1 = require("./ArvoEventFactory/Orchestrator");
|
65
65
|
Object.defineProperty(exports, "ArvoOrchestratorEventFactory", { enumerable: true, get: function () { return Orchestrator_1.ArvoOrchestratorEventFactory; } });
|
66
|
+
var errors_1 = require("./ArvoContract/errors");
|
67
|
+
Object.defineProperty(exports, "ArvoContractViolationError", { enumerable: true, get: function () { return errors_1.ArvoContractViolationError; } });
|
66
68
|
/**
|
67
69
|
* Collection of Zod schemas for validating various aspects of Arvo events.
|
68
70
|
* @property {z.ZodObject} CloudEventContextSchema - Schema for core CloudEvent properties.
|