@mcma/core 0.16.17 → 0.16.19
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/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/lib/config-variables.d.ts +12 -12
- package/dist/lib/config-variables.js +49 -49
- package/dist/lib/index.d.ts +5 -5
- package/dist/lib/index.js +21 -21
- package/dist/lib/logging/console-logger-provider.d.ts +8 -8
- package/dist/lib/logging/console-logger-provider.js +14 -14
- package/dist/lib/logging/console-logger.d.ts +7 -7
- package/dist/lib/logging/console-logger.js +24 -24
- package/dist/lib/logging/index.d.ts +5 -5
- package/dist/lib/logging/index.js +21 -21
- package/dist/lib/logging/log-event.d.ts +15 -15
- package/dist/lib/logging/log-event.js +75 -75
- package/dist/lib/logging/logger-provider.d.ts +5 -5
- package/dist/lib/logging/logger-provider.js +2 -2
- package/dist/lib/logging/logger.d.ts +41 -41
- package/dist/lib/logging/logger.js +87 -87
- package/dist/lib/mcma-exception.d.ts +8 -8
- package/dist/lib/mcma-exception.js +44 -44
- package/dist/lib/model/index.d.ts +19 -19
- package/dist/lib/model/index.js +35 -35
- package/dist/lib/model/job-assignment.d.ts +14 -14
- package/dist/lib/model/job-assignment.js +26 -26
- package/dist/lib/model/job-base.d.ts +17 -17
- package/dist/lib/model/job-base.js +27 -27
- package/dist/lib/model/job-execution.d.ts +14 -14
- package/dist/lib/model/job-execution.js +21 -21
- package/dist/lib/model/job-parameter-bag.d.ts +10 -10
- package/dist/lib/model/job-parameter-bag.js +12 -12
- package/dist/lib/model/job-parameter.d.ts +10 -10
- package/dist/lib/model/job-parameter.js +17 -17
- package/dist/lib/model/job-profile.d.ts +15 -15
- package/dist/lib/model/job-profile.js +24 -24
- package/dist/lib/model/job-status.d.ts +11 -11
- package/dist/lib/model/job-status.js +15 -15
- package/dist/lib/model/jobs/ai-job.d.ts +4 -4
- package/dist/lib/model/jobs/ai-job.js +10 -10
- package/dist/lib/model/jobs/ame-job.d.ts +4 -4
- package/dist/lib/model/jobs/ame-job.js +10 -10
- package/dist/lib/model/jobs/capture-job.d.ts +4 -4
- package/dist/lib/model/jobs/capture-job.js +10 -10
- package/dist/lib/model/jobs/distribution-job.d.ts +4 -4
- package/dist/lib/model/jobs/distribution-job.js +10 -10
- package/dist/lib/model/jobs/index.d.ts +9 -9
- package/dist/lib/model/jobs/index.js +25 -25
- package/dist/lib/model/jobs/job.d.ts +23 -23
- package/dist/lib/model/jobs/job.js +38 -38
- package/dist/lib/model/jobs/qa-job.d.ts +4 -4
- package/dist/lib/model/jobs/qa-job.js +10 -10
- package/dist/lib/model/jobs/storage-job.d.ts +4 -4
- package/dist/lib/model/jobs/storage-job.js +10 -10
- package/dist/lib/model/jobs/transform-job.d.ts +4 -4
- package/dist/lib/model/jobs/transform-job.js +10 -10
- package/dist/lib/model/jobs/workflow-job.d.ts +4 -4
- package/dist/lib/model/jobs/workflow-job.js +10 -10
- package/dist/lib/model/locator-status.d.ts +6 -6
- package/dist/lib/model/locator-status.js +10 -10
- package/dist/lib/model/locator.d.ts +12 -12
- package/dist/lib/model/locator.js +21 -21
- package/dist/lib/model/mcma-object.d.ts +7 -7
- package/dist/lib/model/mcma-object.js +10 -10
- package/dist/lib/model/mcma-resource-type.d.ts +6 -6
- package/dist/lib/model/mcma-resource-type.js +2 -2
- package/dist/lib/model/mcma-resource.d.ts +20 -20
- package/dist/lib/model/mcma-resource.js +34 -34
- package/dist/lib/model/mcma-tracker.d.ts +16 -16
- package/dist/lib/model/mcma-tracker.js +22 -22
- package/dist/lib/model/notification-endpoint.d.ts +8 -8
- package/dist/lib/model/notification-endpoint.js +14 -14
- package/dist/lib/model/notification.d.ts +10 -10
- package/dist/lib/model/notification.js +17 -17
- package/dist/lib/model/problem-detail.d.ts +16 -16
- package/dist/lib/model/problem-detail.js +24 -24
- package/dist/lib/model/resource-endpoint.d.ts +12 -12
- package/dist/lib/model/resource-endpoint.js +20 -20
- package/dist/lib/model/service.d.ts +17 -17
- package/dist/lib/model/service.js +29 -29
- package/dist/lib/utils.d.ts +23 -23
- package/dist/lib/utils.js +128 -128
- package/package.json +5 -5
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { McmaTrackerProperties } from "../model";
|
|
2
|
-
import { LogEvent } from "./log-event";
|
|
3
|
-
export declare enum LogLevel {
|
|
4
|
-
Fatal = 100,
|
|
5
|
-
Error = 200,
|
|
6
|
-
Warn = 300,
|
|
7
|
-
Info = 400,
|
|
8
|
-
Debug = 500
|
|
9
|
-
}
|
|
10
|
-
export declare enum LogType {
|
|
11
|
-
Fatal = "FATAL",
|
|
12
|
-
Error = "ERROR",
|
|
13
|
-
Warn = "WARN",
|
|
14
|
-
Info = "INFO",
|
|
15
|
-
Debug = "DEBUG"
|
|
16
|
-
}
|
|
17
|
-
export interface Logger {
|
|
18
|
-
debug(message: any, ...optionalParams: any[]): void;
|
|
19
|
-
info(message: any, ...optionalParams: any[]): void;
|
|
20
|
-
warn(message: any, ...optionalParams: any[]): void;
|
|
21
|
-
error(message: any, ...optionalParams: any[]): void;
|
|
22
|
-
fatal(message: any, ...optionalParams: any[]): void;
|
|
23
|
-
functionStart(message: any, ...optionalParams: any[]): void;
|
|
24
|
-
functionEnd(message: any, ...optionalParams: any[]): void;
|
|
25
|
-
jobStart(message: any, ...optionalParams: any[]): void;
|
|
26
|
-
jobUpdate(message: any, ...optionalParams: any[]): void;
|
|
27
|
-
jobEnd(message: any, ...optionalParams: any[]): void;
|
|
28
|
-
}
|
|
29
|
-
export declare abstract class Logger implements Logger {
|
|
30
|
-
private readonly _source;
|
|
31
|
-
private readonly _requestId;
|
|
32
|
-
private readonly _tracker?;
|
|
33
|
-
protected constructor(source: string, requestId?: string, tracker?: McmaTrackerProperties);
|
|
34
|
-
protected get source(): string;
|
|
35
|
-
protected get requestId(): string;
|
|
36
|
-
protected get tracker(): McmaTrackerProperties;
|
|
37
|
-
static System: Logger;
|
|
38
|
-
protected buildLogEvent(level: number, type: string, message: any, ...optionalParams: any[]): LogEvent;
|
|
39
|
-
log(level: number, type: string, message: any, ...optionalParams: any[]): void;
|
|
40
|
-
protected abstract writeLogEvent(logEvent: LogEvent): void;
|
|
41
|
-
}
|
|
1
|
+
import { McmaTrackerProperties } from "../model";
|
|
2
|
+
import { LogEvent } from "./log-event";
|
|
3
|
+
export declare enum LogLevel {
|
|
4
|
+
Fatal = 100,
|
|
5
|
+
Error = 200,
|
|
6
|
+
Warn = 300,
|
|
7
|
+
Info = 400,
|
|
8
|
+
Debug = 500
|
|
9
|
+
}
|
|
10
|
+
export declare enum LogType {
|
|
11
|
+
Fatal = "FATAL",
|
|
12
|
+
Error = "ERROR",
|
|
13
|
+
Warn = "WARN",
|
|
14
|
+
Info = "INFO",
|
|
15
|
+
Debug = "DEBUG"
|
|
16
|
+
}
|
|
17
|
+
export interface Logger {
|
|
18
|
+
debug(message: any, ...optionalParams: any[]): void;
|
|
19
|
+
info(message: any, ...optionalParams: any[]): void;
|
|
20
|
+
warn(message: any, ...optionalParams: any[]): void;
|
|
21
|
+
error(message: any, ...optionalParams: any[]): void;
|
|
22
|
+
fatal(message: any, ...optionalParams: any[]): void;
|
|
23
|
+
functionStart(message: any, ...optionalParams: any[]): void;
|
|
24
|
+
functionEnd(message: any, ...optionalParams: any[]): void;
|
|
25
|
+
jobStart(message: any, ...optionalParams: any[]): void;
|
|
26
|
+
jobUpdate(message: any, ...optionalParams: any[]): void;
|
|
27
|
+
jobEnd(message: any, ...optionalParams: any[]): void;
|
|
28
|
+
}
|
|
29
|
+
export declare abstract class Logger implements Logger {
|
|
30
|
+
private readonly _source;
|
|
31
|
+
private readonly _requestId;
|
|
32
|
+
private readonly _tracker?;
|
|
33
|
+
protected constructor(source: string, requestId?: string, tracker?: McmaTrackerProperties);
|
|
34
|
+
protected get source(): string;
|
|
35
|
+
protected get requestId(): string;
|
|
36
|
+
protected get tracker(): McmaTrackerProperties;
|
|
37
|
+
static System: Logger;
|
|
38
|
+
protected buildLogEvent(level: number, type: string, message: any, ...optionalParams: any[]): LogEvent;
|
|
39
|
+
log(level: number, type: string, message: any, ...optionalParams: any[]): void;
|
|
40
|
+
protected abstract writeLogEvent(logEvent: LogEvent): void;
|
|
41
|
+
}
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Logger = exports.LogType = exports.LogLevel = void 0;
|
|
4
|
-
const util = require("util");
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
6
|
-
const log_event_1 = require("./log-event");
|
|
7
|
-
var LogLevel;
|
|
8
|
-
(function (LogLevel) {
|
|
9
|
-
LogLevel[LogLevel["Fatal"] = 100] = "Fatal";
|
|
10
|
-
LogLevel[LogLevel["Error"] = 200] = "Error";
|
|
11
|
-
LogLevel[LogLevel["Warn"] = 300] = "Warn";
|
|
12
|
-
LogLevel[LogLevel["Info"] = 400] = "Info";
|
|
13
|
-
LogLevel[LogLevel["Debug"] = 500] = "Debug";
|
|
14
|
-
})(LogLevel
|
|
15
|
-
var LogType;
|
|
16
|
-
(function (LogType) {
|
|
17
|
-
LogType["Fatal"] = "FATAL";
|
|
18
|
-
LogType["Error"] = "ERROR";
|
|
19
|
-
LogType["Warn"] = "WARN";
|
|
20
|
-
LogType["Info"] = "INFO";
|
|
21
|
-
LogType["Debug"] = "DEBUG";
|
|
22
|
-
})(LogType
|
|
23
|
-
class Logger {
|
|
24
|
-
_source;
|
|
25
|
-
_requestId;
|
|
26
|
-
_tracker;
|
|
27
|
-
constructor(source, requestId, tracker) {
|
|
28
|
-
this._source = source;
|
|
29
|
-
this._requestId = requestId ?? (0, uuid_1.v4)();
|
|
30
|
-
this._tracker = tracker;
|
|
31
|
-
}
|
|
32
|
-
get source() {
|
|
33
|
-
return this._source;
|
|
34
|
-
}
|
|
35
|
-
get requestId() {
|
|
36
|
-
return this._requestId;
|
|
37
|
-
}
|
|
38
|
-
get tracker() {
|
|
39
|
-
return this._tracker;
|
|
40
|
-
}
|
|
41
|
-
static System;
|
|
42
|
-
buildLogEvent(level, type, message, ...optionalParams) {
|
|
43
|
-
if (optionalParams.length) {
|
|
44
|
-
if (typeof message === "string") {
|
|
45
|
-
message = util.format(message, ...optionalParams);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
message = [message, ...optionalParams];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return new log_event_1.LogEvent(type, level, this.source, this.requestId, new Date(), message, this.tracker);
|
|
52
|
-
}
|
|
53
|
-
fatal(message, ...optionalParams) {
|
|
54
|
-
this.log(LogLevel.Fatal, LogType.Fatal, message, ...optionalParams);
|
|
55
|
-
}
|
|
56
|
-
error(message, ...optionalParams) {
|
|
57
|
-
this.log(LogLevel.Error, LogType.Error, message, ...optionalParams);
|
|
58
|
-
}
|
|
59
|
-
warn(message, ...optionalParams) {
|
|
60
|
-
this.log(LogLevel.Warn, LogType.Warn, message, ...optionalParams);
|
|
61
|
-
}
|
|
62
|
-
info(message, ...optionalParams) {
|
|
63
|
-
this.log(LogLevel.Info, LogType.Info, message, ...optionalParams);
|
|
64
|
-
}
|
|
65
|
-
debug(message, ...optionalParams) {
|
|
66
|
-
this.log(LogLevel.Debug, LogType.Debug, message, ...optionalParams);
|
|
67
|
-
}
|
|
68
|
-
functionStart(message, ...optionalParams) {
|
|
69
|
-
this.log(450, "FUNCTION_START", message, ...optionalParams);
|
|
70
|
-
}
|
|
71
|
-
functionEnd(message, ...optionalParams) {
|
|
72
|
-
this.log(450, "FUNCTION_END", message, ...optionalParams);
|
|
73
|
-
}
|
|
74
|
-
jobStart(message, ...optionalParams) {
|
|
75
|
-
this.log(LogLevel.Info, "JOB_START", message, ...optionalParams);
|
|
76
|
-
}
|
|
77
|
-
jobUpdate(message, ...optionalParams) {
|
|
78
|
-
this.log(LogLevel.Info, "JOB_UPDATE", message, ...optionalParams);
|
|
79
|
-
}
|
|
80
|
-
jobEnd(message, ...optionalParams) {
|
|
81
|
-
this.log(LogLevel.Info, "JOB_END", message, ...optionalParams);
|
|
82
|
-
}
|
|
83
|
-
log(level, type, message, ...optionalParams) {
|
|
84
|
-
this.writeLogEvent(this.buildLogEvent(level, type, message, ...optionalParams));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.Logger = Logger;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logger = exports.LogType = exports.LogLevel = void 0;
|
|
4
|
+
const util = require("util");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
const log_event_1 = require("./log-event");
|
|
7
|
+
var LogLevel;
|
|
8
|
+
(function (LogLevel) {
|
|
9
|
+
LogLevel[LogLevel["Fatal"] = 100] = "Fatal";
|
|
10
|
+
LogLevel[LogLevel["Error"] = 200] = "Error";
|
|
11
|
+
LogLevel[LogLevel["Warn"] = 300] = "Warn";
|
|
12
|
+
LogLevel[LogLevel["Info"] = 400] = "Info";
|
|
13
|
+
LogLevel[LogLevel["Debug"] = 500] = "Debug";
|
|
14
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
15
|
+
var LogType;
|
|
16
|
+
(function (LogType) {
|
|
17
|
+
LogType["Fatal"] = "FATAL";
|
|
18
|
+
LogType["Error"] = "ERROR";
|
|
19
|
+
LogType["Warn"] = "WARN";
|
|
20
|
+
LogType["Info"] = "INFO";
|
|
21
|
+
LogType["Debug"] = "DEBUG";
|
|
22
|
+
})(LogType || (exports.LogType = LogType = {}));
|
|
23
|
+
class Logger {
|
|
24
|
+
_source;
|
|
25
|
+
_requestId;
|
|
26
|
+
_tracker;
|
|
27
|
+
constructor(source, requestId, tracker) {
|
|
28
|
+
this._source = source;
|
|
29
|
+
this._requestId = requestId ?? (0, uuid_1.v4)();
|
|
30
|
+
this._tracker = tracker;
|
|
31
|
+
}
|
|
32
|
+
get source() {
|
|
33
|
+
return this._source;
|
|
34
|
+
}
|
|
35
|
+
get requestId() {
|
|
36
|
+
return this._requestId;
|
|
37
|
+
}
|
|
38
|
+
get tracker() {
|
|
39
|
+
return this._tracker;
|
|
40
|
+
}
|
|
41
|
+
static System;
|
|
42
|
+
buildLogEvent(level, type, message, ...optionalParams) {
|
|
43
|
+
if (optionalParams.length) {
|
|
44
|
+
if (typeof message === "string") {
|
|
45
|
+
message = util.format(message, ...optionalParams);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
message = [message, ...optionalParams];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return new log_event_1.LogEvent(type, level, this.source, this.requestId, new Date(), message, this.tracker);
|
|
52
|
+
}
|
|
53
|
+
fatal(message, ...optionalParams) {
|
|
54
|
+
this.log(LogLevel.Fatal, LogType.Fatal, message, ...optionalParams);
|
|
55
|
+
}
|
|
56
|
+
error(message, ...optionalParams) {
|
|
57
|
+
this.log(LogLevel.Error, LogType.Error, message, ...optionalParams);
|
|
58
|
+
}
|
|
59
|
+
warn(message, ...optionalParams) {
|
|
60
|
+
this.log(LogLevel.Warn, LogType.Warn, message, ...optionalParams);
|
|
61
|
+
}
|
|
62
|
+
info(message, ...optionalParams) {
|
|
63
|
+
this.log(LogLevel.Info, LogType.Info, message, ...optionalParams);
|
|
64
|
+
}
|
|
65
|
+
debug(message, ...optionalParams) {
|
|
66
|
+
this.log(LogLevel.Debug, LogType.Debug, message, ...optionalParams);
|
|
67
|
+
}
|
|
68
|
+
functionStart(message, ...optionalParams) {
|
|
69
|
+
this.log(450, "FUNCTION_START", message, ...optionalParams);
|
|
70
|
+
}
|
|
71
|
+
functionEnd(message, ...optionalParams) {
|
|
72
|
+
this.log(450, "FUNCTION_END", message, ...optionalParams);
|
|
73
|
+
}
|
|
74
|
+
jobStart(message, ...optionalParams) {
|
|
75
|
+
this.log(LogLevel.Info, "JOB_START", message, ...optionalParams);
|
|
76
|
+
}
|
|
77
|
+
jobUpdate(message, ...optionalParams) {
|
|
78
|
+
this.log(LogLevel.Info, "JOB_UPDATE", message, ...optionalParams);
|
|
79
|
+
}
|
|
80
|
+
jobEnd(message, ...optionalParams) {
|
|
81
|
+
this.log(LogLevel.Info, "JOB_END", message, ...optionalParams);
|
|
82
|
+
}
|
|
83
|
+
log(level, type, message, ...optionalParams) {
|
|
84
|
+
this.writeLogEvent(this.buildLogEvent(level, type, message, ...optionalParams));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.Logger = Logger;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare class McmaException extends Error {
|
|
2
|
-
message: string;
|
|
3
|
-
cause?: Error;
|
|
4
|
-
context?: any;
|
|
5
|
-
originalStack: string;
|
|
6
|
-
constructor(message: string, cause?: Error, context?: any);
|
|
7
|
-
toString(includeDetails?: boolean): string;
|
|
8
|
-
}
|
|
1
|
+
export declare class McmaException extends Error {
|
|
2
|
+
message: string;
|
|
3
|
+
cause?: Error;
|
|
4
|
+
context?: any;
|
|
5
|
+
originalStack: string;
|
|
6
|
+
constructor(message: string, cause?: Error, context?: any);
|
|
7
|
+
toString(includeDetails?: boolean): string;
|
|
8
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.McmaException = void 0;
|
|
4
|
-
const utils_1 = require("./utils");
|
|
5
|
-
class McmaException extends Error {
|
|
6
|
-
message;
|
|
7
|
-
cause;
|
|
8
|
-
context;
|
|
9
|
-
originalStack;
|
|
10
|
-
constructor(message, cause, context) {
|
|
11
|
-
super(message);
|
|
12
|
-
this.message = message;
|
|
13
|
-
this.cause = cause;
|
|
14
|
-
this.context = context;
|
|
15
|
-
this.cause = cause;
|
|
16
|
-
this.context = context;
|
|
17
|
-
this.originalStack = this.stack;
|
|
18
|
-
this.stack = this.toString(true);
|
|
19
|
-
}
|
|
20
|
-
toString(includeDetails = false) {
|
|
21
|
-
let ret = "";
|
|
22
|
-
let c = this;
|
|
23
|
-
while (c) {
|
|
24
|
-
if (includeDetails && c.originalStack) {
|
|
25
|
-
ret += c.originalStack;
|
|
26
|
-
}
|
|
27
|
-
else if (includeDetails && c.stack) {
|
|
28
|
-
ret += c.stack;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
ret += "Error: " + (c.message ?? c);
|
|
32
|
-
}
|
|
33
|
-
if (includeDetails && c.context) {
|
|
34
|
-
ret += "\nContext:\n" + utils_1.Utils.stringify(c.context);
|
|
35
|
-
}
|
|
36
|
-
c = c.cause;
|
|
37
|
-
if (c) {
|
|
38
|
-
ret += "\nCaused by:\n";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return ret;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.McmaException = McmaException;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McmaException = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
class McmaException extends Error {
|
|
6
|
+
message;
|
|
7
|
+
cause;
|
|
8
|
+
context;
|
|
9
|
+
originalStack;
|
|
10
|
+
constructor(message, cause, context) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.message = message;
|
|
13
|
+
this.cause = cause;
|
|
14
|
+
this.context = context;
|
|
15
|
+
this.cause = cause;
|
|
16
|
+
this.context = context;
|
|
17
|
+
this.originalStack = this.stack;
|
|
18
|
+
this.stack = this.toString(true);
|
|
19
|
+
}
|
|
20
|
+
toString(includeDetails = false) {
|
|
21
|
+
let ret = "";
|
|
22
|
+
let c = this;
|
|
23
|
+
while (c) {
|
|
24
|
+
if (includeDetails && c.originalStack) {
|
|
25
|
+
ret += c.originalStack;
|
|
26
|
+
}
|
|
27
|
+
else if (includeDetails && c.stack) {
|
|
28
|
+
ret += c.stack;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
ret += "Error: " + (c.message ?? c);
|
|
32
|
+
}
|
|
33
|
+
if (includeDetails && c.context) {
|
|
34
|
+
ret += "\nContext:\n" + utils_1.Utils.stringify(c.context);
|
|
35
|
+
}
|
|
36
|
+
c = c.cause;
|
|
37
|
+
if (c) {
|
|
38
|
+
ret += "\nCaused by:\n";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return ret;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.McmaException = McmaException;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from "./mcma-object";
|
|
2
|
-
export * from "./mcma-resource";
|
|
3
|
-
export * from "./mcma-resource-type";
|
|
4
|
-
export * from "./job-assignment";
|
|
5
|
-
export * from "./job-base";
|
|
6
|
-
export * from "./job-parameter-bag";
|
|
7
|
-
export * from "./job-parameter";
|
|
8
|
-
export * from "./job-execution";
|
|
9
|
-
export * from "./job-profile";
|
|
10
|
-
export * from "./locator";
|
|
11
|
-
export * from "./locator-status";
|
|
12
|
-
export * from "./mcma-tracker";
|
|
13
|
-
export * from "./notification-endpoint";
|
|
14
|
-
export * from "./notification";
|
|
15
|
-
export * from "./problem-detail";
|
|
16
|
-
export * from "./resource-endpoint";
|
|
17
|
-
export * from "./service";
|
|
18
|
-
export * from "./job-status";
|
|
19
|
-
export * from "./jobs";
|
|
1
|
+
export * from "./mcma-object";
|
|
2
|
+
export * from "./mcma-resource";
|
|
3
|
+
export * from "./mcma-resource-type";
|
|
4
|
+
export * from "./job-assignment";
|
|
5
|
+
export * from "./job-base";
|
|
6
|
+
export * from "./job-parameter-bag";
|
|
7
|
+
export * from "./job-parameter";
|
|
8
|
+
export * from "./job-execution";
|
|
9
|
+
export * from "./job-profile";
|
|
10
|
+
export * from "./locator";
|
|
11
|
+
export * from "./locator-status";
|
|
12
|
+
export * from "./mcma-tracker";
|
|
13
|
+
export * from "./notification-endpoint";
|
|
14
|
+
export * from "./notification";
|
|
15
|
+
export * from "./problem-detail";
|
|
16
|
+
export * from "./resource-endpoint";
|
|
17
|
+
export * from "./service";
|
|
18
|
+
export * from "./job-status";
|
|
19
|
+
export * from "./jobs";
|
package/dist/lib/model/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./mcma-object"), exports);
|
|
18
|
-
__exportStar(require("./mcma-resource"), exports);
|
|
19
|
-
__exportStar(require("./mcma-resource-type"), exports);
|
|
20
|
-
__exportStar(require("./job-assignment"), exports);
|
|
21
|
-
__exportStar(require("./job-base"), exports);
|
|
22
|
-
__exportStar(require("./job-parameter-bag"), exports);
|
|
23
|
-
__exportStar(require("./job-parameter"), exports);
|
|
24
|
-
__exportStar(require("./job-execution"), exports);
|
|
25
|
-
__exportStar(require("./job-profile"), exports);
|
|
26
|
-
__exportStar(require("./locator"), exports);
|
|
27
|
-
__exportStar(require("./locator-status"), exports);
|
|
28
|
-
__exportStar(require("./mcma-tracker"), exports);
|
|
29
|
-
__exportStar(require("./notification-endpoint"), exports);
|
|
30
|
-
__exportStar(require("./notification"), exports);
|
|
31
|
-
__exportStar(require("./problem-detail"), exports);
|
|
32
|
-
__exportStar(require("./resource-endpoint"), exports);
|
|
33
|
-
__exportStar(require("./service"), exports);
|
|
34
|
-
__exportStar(require("./job-status"), exports);
|
|
35
|
-
__exportStar(require("./jobs"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./mcma-object"), exports);
|
|
18
|
+
__exportStar(require("./mcma-resource"), exports);
|
|
19
|
+
__exportStar(require("./mcma-resource-type"), exports);
|
|
20
|
+
__exportStar(require("./job-assignment"), exports);
|
|
21
|
+
__exportStar(require("./job-base"), exports);
|
|
22
|
+
__exportStar(require("./job-parameter-bag"), exports);
|
|
23
|
+
__exportStar(require("./job-parameter"), exports);
|
|
24
|
+
__exportStar(require("./job-execution"), exports);
|
|
25
|
+
__exportStar(require("./job-profile"), exports);
|
|
26
|
+
__exportStar(require("./locator"), exports);
|
|
27
|
+
__exportStar(require("./locator-status"), exports);
|
|
28
|
+
__exportStar(require("./mcma-tracker"), exports);
|
|
29
|
+
__exportStar(require("./notification-endpoint"), exports);
|
|
30
|
+
__exportStar(require("./notification"), exports);
|
|
31
|
+
__exportStar(require("./problem-detail"), exports);
|
|
32
|
+
__exportStar(require("./resource-endpoint"), exports);
|
|
33
|
+
__exportStar(require("./service"), exports);
|
|
34
|
+
__exportStar(require("./job-status"), exports);
|
|
35
|
+
__exportStar(require("./jobs"), exports);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { JobBase, JobBaseProperties } from "./job-base";
|
|
2
|
-
import { McmaTracker, McmaTrackerProperties } from "./mcma-tracker";
|
|
3
|
-
import { NotificationEndpoint, NotificationEndpointProperties } from "./notification-endpoint";
|
|
4
|
-
export interface JobAssignmentProperties extends JobBaseProperties {
|
|
5
|
-
jobId: string;
|
|
6
|
-
tracker?: McmaTrackerProperties;
|
|
7
|
-
notificationEndpoint?: NotificationEndpointProperties;
|
|
8
|
-
}
|
|
9
|
-
export declare class JobAssignment extends JobBase<JobAssignmentProperties> implements JobAssignmentProperties {
|
|
10
|
-
jobId: string;
|
|
11
|
-
tracker?: McmaTracker;
|
|
12
|
-
notificationEndpoint?: NotificationEndpoint;
|
|
13
|
-
constructor(properties: JobAssignmentProperties);
|
|
14
|
-
}
|
|
1
|
+
import { JobBase, JobBaseProperties } from "./job-base";
|
|
2
|
+
import { McmaTracker, McmaTrackerProperties } from "./mcma-tracker";
|
|
3
|
+
import { NotificationEndpoint, NotificationEndpointProperties } from "./notification-endpoint";
|
|
4
|
+
export interface JobAssignmentProperties extends JobBaseProperties {
|
|
5
|
+
jobId: string;
|
|
6
|
+
tracker?: McmaTrackerProperties;
|
|
7
|
+
notificationEndpoint?: NotificationEndpointProperties;
|
|
8
|
+
}
|
|
9
|
+
export declare class JobAssignment extends JobBase<JobAssignmentProperties> implements JobAssignmentProperties {
|
|
10
|
+
jobId: string;
|
|
11
|
+
tracker?: McmaTracker;
|
|
12
|
+
notificationEndpoint?: NotificationEndpoint;
|
|
13
|
+
constructor(properties: JobAssignmentProperties);
|
|
14
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JobAssignment = void 0;
|
|
4
|
-
const job_base_1 = require("./job-base");
|
|
5
|
-
const mcma_tracker_1 = require("./mcma-tracker");
|
|
6
|
-
const notification_endpoint_1 = require("./notification-endpoint");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
class JobAssignment extends job_base_1.JobBase {
|
|
9
|
-
jobId;
|
|
10
|
-
tracker;
|
|
11
|
-
notificationEndpoint;
|
|
12
|
-
constructor(properties) {
|
|
13
|
-
super("JobAssignment", properties);
|
|
14
|
-
this.jobId = properties.jobId;
|
|
15
|
-
if (typeof properties.tracker === "object") {
|
|
16
|
-
this.tracker = new mcma_tracker_1.McmaTracker(properties.tracker);
|
|
17
|
-
}
|
|
18
|
-
if (typeof properties.notificationEndpoint === "object") {
|
|
19
|
-
this.notificationEndpoint = new notification_endpoint_1.NotificationEndpoint(properties.notificationEndpoint);
|
|
20
|
-
}
|
|
21
|
-
utils_1.Utils.checkProperty(this, "jobId", "url");
|
|
22
|
-
utils_1.Utils.checkProperty(this, "tracker", "object", false);
|
|
23
|
-
utils_1.Utils.checkProperty(this, "notificationEndpoint", "object", false);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.JobAssignment = JobAssignment;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JobAssignment = void 0;
|
|
4
|
+
const job_base_1 = require("./job-base");
|
|
5
|
+
const mcma_tracker_1 = require("./mcma-tracker");
|
|
6
|
+
const notification_endpoint_1 = require("./notification-endpoint");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
class JobAssignment extends job_base_1.JobBase {
|
|
9
|
+
jobId;
|
|
10
|
+
tracker;
|
|
11
|
+
notificationEndpoint;
|
|
12
|
+
constructor(properties) {
|
|
13
|
+
super("JobAssignment", properties);
|
|
14
|
+
this.jobId = properties.jobId;
|
|
15
|
+
if (typeof properties.tracker === "object") {
|
|
16
|
+
this.tracker = new mcma_tracker_1.McmaTracker(properties.tracker);
|
|
17
|
+
}
|
|
18
|
+
if (typeof properties.notificationEndpoint === "object") {
|
|
19
|
+
this.notificationEndpoint = new notification_endpoint_1.NotificationEndpoint(properties.notificationEndpoint);
|
|
20
|
+
}
|
|
21
|
+
utils_1.Utils.checkProperty(this, "jobId", "url");
|
|
22
|
+
utils_1.Utils.checkProperty(this, "tracker", "object", false);
|
|
23
|
+
utils_1.Utils.checkProperty(this, "notificationEndpoint", "object", false);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.JobAssignment = JobAssignment;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { JobParameterBag, JobParameterBagProperties } from "./job-parameter-bag";
|
|
2
|
-
import { McmaResource, McmaResourceProperties } from "./mcma-resource";
|
|
3
|
-
import { ProblemDetail, ProblemDetailProperties } from "./problem-detail";
|
|
4
|
-
import { JobStatus } from "./job-status";
|
|
5
|
-
export interface JobBaseProperties extends McmaResourceProperties {
|
|
6
|
-
status?: JobStatus;
|
|
7
|
-
error?: ProblemDetailProperties;
|
|
8
|
-
jobOutput?: JobParameterBagProperties;
|
|
9
|
-
progress?: number;
|
|
10
|
-
}
|
|
11
|
-
export declare abstract class JobBase<T extends JobBaseProperties> extends McmaResource implements JobBaseProperties {
|
|
12
|
-
status?: JobStatus;
|
|
13
|
-
error?: ProblemDetail;
|
|
14
|
-
jobOutput?: JobParameterBag;
|
|
15
|
-
progress?: number;
|
|
16
|
-
protected constructor(type: string, properties: T);
|
|
17
|
-
}
|
|
1
|
+
import { JobParameterBag, JobParameterBagProperties } from "./job-parameter-bag";
|
|
2
|
+
import { McmaResource, McmaResourceProperties } from "./mcma-resource";
|
|
3
|
+
import { ProblemDetail, ProblemDetailProperties } from "./problem-detail";
|
|
4
|
+
import { JobStatus } from "./job-status";
|
|
5
|
+
export interface JobBaseProperties extends McmaResourceProperties {
|
|
6
|
+
status?: JobStatus;
|
|
7
|
+
error?: ProblemDetailProperties;
|
|
8
|
+
jobOutput?: JobParameterBagProperties;
|
|
9
|
+
progress?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class JobBase<T extends JobBaseProperties> extends McmaResource implements JobBaseProperties {
|
|
12
|
+
status?: JobStatus;
|
|
13
|
+
error?: ProblemDetail;
|
|
14
|
+
jobOutput?: JobParameterBag;
|
|
15
|
+
progress?: number;
|
|
16
|
+
protected constructor(type: string, properties: T);
|
|
17
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JobBase = void 0;
|
|
4
|
-
const job_parameter_bag_1 = require("./job-parameter-bag");
|
|
5
|
-
const mcma_resource_1 = require("./mcma-resource");
|
|
6
|
-
const problem_detail_1 = require("./problem-detail");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
class JobBase extends mcma_resource_1.McmaResource {
|
|
9
|
-
status;
|
|
10
|
-
error;
|
|
11
|
-
jobOutput;
|
|
12
|
-
progress;
|
|
13
|
-
constructor(type, properties) {
|
|
14
|
-
super(type, properties);
|
|
15
|
-
this.status = properties.status;
|
|
16
|
-
if (typeof properties.error === "object") {
|
|
17
|
-
this.error = new problem_detail_1.ProblemDetail(properties.error);
|
|
18
|
-
}
|
|
19
|
-
this.jobOutput = new job_parameter_bag_1.JobParameterBag(properties.jobOutput);
|
|
20
|
-
this.progress = properties.progress;
|
|
21
|
-
utils_1.Utils.checkProperty(this, "status", "string", false);
|
|
22
|
-
utils_1.Utils.checkProperty(this, "error", "object", false);
|
|
23
|
-
utils_1.Utils.checkProperty(this, "jobOutput", "object", false);
|
|
24
|
-
utils_1.Utils.checkProperty(this, "progress", "number", false);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.JobBase = JobBase;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JobBase = void 0;
|
|
4
|
+
const job_parameter_bag_1 = require("./job-parameter-bag");
|
|
5
|
+
const mcma_resource_1 = require("./mcma-resource");
|
|
6
|
+
const problem_detail_1 = require("./problem-detail");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
class JobBase extends mcma_resource_1.McmaResource {
|
|
9
|
+
status;
|
|
10
|
+
error;
|
|
11
|
+
jobOutput;
|
|
12
|
+
progress;
|
|
13
|
+
constructor(type, properties) {
|
|
14
|
+
super(type, properties);
|
|
15
|
+
this.status = properties.status;
|
|
16
|
+
if (typeof properties.error === "object") {
|
|
17
|
+
this.error = new problem_detail_1.ProblemDetail(properties.error);
|
|
18
|
+
}
|
|
19
|
+
this.jobOutput = new job_parameter_bag_1.JobParameterBag(properties.jobOutput);
|
|
20
|
+
this.progress = properties.progress;
|
|
21
|
+
utils_1.Utils.checkProperty(this, "status", "string", false);
|
|
22
|
+
utils_1.Utils.checkProperty(this, "error", "object", false);
|
|
23
|
+
utils_1.Utils.checkProperty(this, "jobOutput", "object", false);
|
|
24
|
+
utils_1.Utils.checkProperty(this, "progress", "number", false);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.JobBase = JobBase;
|