arvo-core 1.1.10 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/ArvoOrchestrationSubject/index.d.ts +2 -2
- package/dist/ArvoOrchestrationSubject/schema.d.ts +1 -1
- package/dist/ArvoOrchestrationSubject/schema.js +3 -3
- package/dist/ArvoOrchestrationSubject/type.d.ts +2 -2
- package/dist/ArvoOrchestratorContract/helpers.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ArvoOrchestratorVersion, ArvoOrchestrationSubjectContent } from './type';
|
2
2
|
/**
|
3
3
|
* Handles the creation and parsing of Arvo orchestration subjects.
|
4
4
|
*/
|
@@ -14,7 +14,7 @@ export default class ArvoOrchestrationSubject {
|
|
14
14
|
*/
|
15
15
|
static new(param: {
|
16
16
|
orchestator: string;
|
17
|
-
version:
|
17
|
+
version: ArvoOrchestratorVersion;
|
18
18
|
initiator: string;
|
19
19
|
}): string;
|
20
20
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export declare const
|
2
|
+
export declare const ArvoOrchestratorVersionSchema: z.ZodEffects<z.ZodString, string, string>;
|
3
3
|
export declare const ArvoOrchestrationSubjectContentSchema: z.ZodObject<{
|
4
4
|
orchestrator: z.ZodObject<{
|
5
5
|
name: z.ZodEffects<z.ZodString, string, string>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ArvoOrchestrationSubjectContentSchema = exports.
|
3
|
+
exports.ArvoOrchestrationSubjectContentSchema = exports.ArvoOrchestratorVersionSchema = void 0;
|
4
4
|
var zod_1 = require("zod");
|
5
5
|
// Zod schema for ArvoOchestratorVersion
|
6
|
-
exports.
|
6
|
+
exports.ArvoOrchestratorVersionSchema = zod_1.z
|
7
7
|
.string()
|
8
8
|
.regex(/^\d+\.\d+\.\d+$/, 'Invalid version format')
|
9
9
|
.refine(function (value) { return !value.includes(';'); }, 'Version must not contain semicolon')
|
@@ -18,7 +18,7 @@ exports.ArvoOrchestrationSubjectContentSchema = zod_1.z
|
|
18
18
|
.regex(/^[a-z0-9]+(\.[a-z0-9]+)+\.[a-z0-9]+$/, 'Orchestrator name should be prefixed with a reverse-DNS name')
|
19
19
|
.refine(function (value) { return !value.includes(';'); }, 'Orchestrator name must not contain semicolon')
|
20
20
|
.describe('Name of the orchestrator'),
|
21
|
-
version: exports.
|
21
|
+
version: exports.ArvoOrchestratorVersionSchema,
|
22
22
|
})
|
23
23
|
.describe('Information about the orchestrator'),
|
24
24
|
execution: zod_1.z
|
@@ -8,7 +8,7 @@
|
|
8
8
|
* @example
|
9
9
|
* "1.0.0", "2.3.1", "0.5.2"
|
10
10
|
*/
|
11
|
-
export type
|
11
|
+
export type ArvoOrchestratorVersion = `${number}.${number}.${number}`;
|
12
12
|
/**
|
13
13
|
* Represents the content for Arvo orchestration subject.
|
14
14
|
* This type provides information about the orchestrator and the current execution.
|
@@ -32,7 +32,7 @@ export type ArvoOrchestrationSubjectContent = {
|
|
32
32
|
/**
|
33
33
|
* The version of the orchestrator.
|
34
34
|
*/
|
35
|
-
version:
|
35
|
+
version: ArvoOrchestratorVersion;
|
36
36
|
};
|
37
37
|
/**
|
38
38
|
* Details about the current execution.
|
@@ -52,7 +52,7 @@ function isLowerAlphanumeric(input) {
|
|
52
52
|
*/
|
53
53
|
var createArvoOrchestratorContract = function (param) {
|
54
54
|
if (!isLowerAlphanumeric(param.name)) {
|
55
|
-
throw new Error("Invalid 'name' = '".concat(param.name, "'. The 'name' must only contain alphanumeric characters."));
|
55
|
+
throw new Error("Invalid 'name' = '".concat(param.name, "'. The 'name' must only contain alphanumeric characters. e.g. test.orchestrator"));
|
56
56
|
}
|
57
57
|
return new _1.default({
|
58
58
|
uri: param.uri,
|
package/dist/index.d.ts
CHANGED
@@ -19,8 +19,8 @@ import ArvoExecution from './OpenTelemetry/ArvoExecution';
|
|
19
19
|
import { ArvoExecutionSpanKind } from './OpenTelemetry/ArvoExecution/types';
|
20
20
|
import { OpenInferenceSpanKind } from './OpenTelemetry/OpenInference/types';
|
21
21
|
import ArvoOrchestrationSubject from './ArvoOrchestrationSubject';
|
22
|
-
import { ArvoOrchestrationSubjectContentSchema,
|
23
|
-
import { ArvoOrchestrationSubjectContent,
|
22
|
+
import { ArvoOrchestrationSubjectContentSchema, ArvoOrchestratorVersionSchema } from './ArvoOrchestrationSubject/schema';
|
23
|
+
import { ArvoOrchestrationSubjectContent, ArvoOrchestratorVersion } from './ArvoOrchestrationSubject/type';
|
24
24
|
import ArvoEventHttp from './ArvoEventHttp';
|
25
25
|
import { ArvoEventHttpConfig } from './ArvoEventHttp/types';
|
26
26
|
import { InferArvoContract, InferArvoEvent, InferArvoOrchestratorContract } from './types';
|
@@ -94,4 +94,4 @@ declare const ArvoEventSchemas: {
|
|
94
94
|
tracestate: string | null;
|
95
95
|
}>;
|
96
96
|
};
|
97
|
-
export { ArvoEventHttpConfig, ArvoEventHttp, ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchemas, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, OpenTelemetryHeaders, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, createArvoContract, ArvoContractValidators, ArvoContractRecord, IArvoContract, ResolveArvoContractRecord, ArvoContractLibrary, createArvoContractLibrary, ArvoEventFactory, createArvoEventFactory, ArvoErrorSchema, currentOpenTelemetryHeaders, OpenInference, OpenInferenceSpanKind, ArvoExecution, ArvoExecutionSpanKind, ArvoContractJSONSchema, ArvoOrchestrationSubject, ArvoOrchestrationSubjectContentSchema,
|
97
|
+
export { ArvoEventHttpConfig, ArvoEventHttp, ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchemas, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, OpenTelemetryHeaders, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, createArvoContract, ArvoContractValidators, ArvoContractRecord, IArvoContract, ResolveArvoContractRecord, ArvoContractLibrary, createArvoContractLibrary, ArvoEventFactory, createArvoEventFactory, ArvoErrorSchema, currentOpenTelemetryHeaders, OpenInference, OpenInferenceSpanKind, ArvoExecution, ArvoExecutionSpanKind, ArvoContractJSONSchema, ArvoOrchestrationSubject, ArvoOrchestrationSubjectContentSchema, ArvoOrchestratorVersionSchema, ArvoOrchestrationSubjectContent, ArvoOrchestratorVersion, InferArvoEvent, InferArvoContract, InferArvoContractType, createArvoOrchestratorContract, ArvoOrchestratorContract, ICreateArvoOrchestratorContract, IArvoOrchestratorContract, InferArvoOrchestratorContract, ArvoOrchestratorEventTypeGen };
|
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.ArvoOrchestratorEventTypeGen = exports.ArvoOrchestratorContract = exports.createArvoOrchestratorContract = exports.
|
6
|
+
exports.ArvoOrchestratorEventTypeGen = exports.ArvoOrchestratorContract = exports.createArvoOrchestratorContract = exports.ArvoOrchestratorVersionSchema = exports.ArvoOrchestrationSubjectContentSchema = exports.ArvoOrchestrationSubject = exports.ArvoExecutionSpanKind = exports.ArvoExecution = exports.OpenInferenceSpanKind = exports.OpenInference = exports.currentOpenTelemetryHeaders = exports.ArvoErrorSchema = exports.createArvoEventFactory = exports.ArvoEventFactory = exports.createArvoContractLibrary = exports.ArvoContractLibrary = exports.ArvoContractValidators = exports.createArvoContract = exports.ArvoContract = exports.cleanString = exports.validateURI = exports.OTelNull = exports.logToSpan = exports.exceptionToSpan = exports.ArvoEventSchemas = exports.ArvoDataContentType = exports.createArvoEvent = exports.ArvoEvent = exports.ArvoEventHttp = 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");
|
@@ -46,7 +46,7 @@ var ArvoOrchestrationSubject_1 = __importDefault(require("./ArvoOrchestrationSub
|
|
46
46
|
exports.ArvoOrchestrationSubject = ArvoOrchestrationSubject_1.default;
|
47
47
|
var schema_3 = require("./ArvoOrchestrationSubject/schema");
|
48
48
|
Object.defineProperty(exports, "ArvoOrchestrationSubjectContentSchema", { enumerable: true, get: function () { return schema_3.ArvoOrchestrationSubjectContentSchema; } });
|
49
|
-
Object.defineProperty(exports, "
|
49
|
+
Object.defineProperty(exports, "ArvoOrchestratorVersionSchema", { enumerable: true, get: function () { return schema_3.ArvoOrchestratorVersionSchema; } });
|
50
50
|
var ArvoEventHttp_1 = __importDefault(require("./ArvoEventHttp"));
|
51
51
|
exports.ArvoEventHttp = ArvoEventHttp_1.default;
|
52
52
|
var helpers_5 = require("./ArvoOrchestratorContract/helpers");
|