@nosana/types 2.2.15 → 2.2.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/Jobs/JobDefinition/args/index.d.ts +17 -0
- package/dist/Jobs/JobDefinition/args/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/args/index.js +2365 -0
- package/dist/Jobs/JobDefinition/args/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/execution/index.d.ts +2 -0
- package/dist/Jobs/JobDefinition/execution/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/execution/index.js +136 -1
- package/dist/Jobs/JobDefinition/execution/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/global/index.d.ts +2 -0
- package/dist/Jobs/JobDefinition/global/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/global/index.js +127 -1
- package/dist/Jobs/JobDefinition/global/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/index.d.ts +3 -0
- package/dist/Jobs/JobDefinition/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/index.js +1 -0
- package/dist/Jobs/JobDefinition/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/logistics/index.d.ts +2 -0
- package/dist/Jobs/JobDefinition/logistics/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/logistics/index.js +133 -0
- package/dist/Jobs/JobDefinition/logistics/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/meta/index.d.ts +2 -0
- package/dist/Jobs/JobDefinition/meta/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/meta/index.js +118 -1
- package/dist/Jobs/JobDefinition/meta/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/operations/index.d.ts +13 -2
- package/dist/Jobs/JobDefinition/operations/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/operations/index.js +2663 -2
- package/dist/Jobs/JobDefinition/operations/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/operations/rules.d.ts +11 -0
- package/dist/Jobs/JobDefinition/operations/rules.d.ts.map +1 -0
- package/dist/Jobs/JobDefinition/operations/rules.js +20 -0
- package/dist/Jobs/JobDefinition/operations/rules.js.map +1 -0
- package/dist/Jobs/JobDefinition/ssh/index.d.ts +6 -0
- package/dist/Jobs/JobDefinition/ssh/index.d.ts.map +1 -0
- package/dist/Jobs/JobDefinition/ssh/index.js +68 -0
- package/dist/Jobs/JobDefinition/ssh/index.js.map +1 -0
- package/dist/Jobs/index.d.ts +3 -19
- package/dist/Jobs/index.d.ts.map +1 -1
- package/dist/Jobs/index.js +207 -164
- package/dist/Jobs/index.js.map +1 -1
- package/dist/Schemas/job.js +15 -0
- package/dist/Schemas/job.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,119 @@
|
|
|
1
|
-
|
|
1
|
+
import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
|
|
2
|
+
import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js";
|
|
3
|
+
import * as __typia_transform__createStandardSchema from "typia/lib/internal/_createStandardSchema.js";
|
|
4
|
+
import typia from "typia";
|
|
5
|
+
export const validateMeta = (() => { const _io0 = (input, _exceptionable = true) => (undefined === input.trigger || "string" === typeof input.trigger) && (undefined === input.system_resources || "object" === typeof input.system_resources && null !== input.system_resources && false === Array.isArray(input.system_resources) && _io1(input.system_resources, true && _exceptionable)) && Object.keys(input).every(key => {
|
|
6
|
+
if (["trigger", "system_resources"].some(prop => key === prop))
|
|
7
|
+
return true;
|
|
8
|
+
const value = input[key];
|
|
9
|
+
if (undefined === value)
|
|
10
|
+
return true;
|
|
11
|
+
return null !== value && (undefined === value || "string" === typeof value || "number" === typeof value || (Array.isArray(value) && value.every((elem, _index1) => "string" === typeof elem || "number" === typeof elem) || "object" === typeof value && null !== value && false === Array.isArray(value) && _io2(value, true && _exceptionable)));
|
|
12
|
+
}); const _io1 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
13
|
+
const value = input[key];
|
|
14
|
+
if (undefined === value)
|
|
15
|
+
return true;
|
|
16
|
+
return "string" === typeof value || "number" === typeof value;
|
|
17
|
+
}); const _io2 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
18
|
+
const value = input[key];
|
|
19
|
+
if (undefined === value)
|
|
20
|
+
return true;
|
|
21
|
+
return null !== value && undefined !== value && ("string" === typeof value || "number" === typeof value || Array.isArray(value) && value.every((elem, _index2) => "string" === typeof elem || "number" === typeof elem));
|
|
22
|
+
}); const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.trigger || "string" === typeof input.trigger || _report(_exceptionable, {
|
|
23
|
+
path: _path + ".trigger",
|
|
24
|
+
expected: "(string | undefined)",
|
|
25
|
+
value: input.trigger
|
|
26
|
+
}), undefined === input.system_resources || ("object" === typeof input.system_resources && null !== input.system_resources && false === Array.isArray(input.system_resources) || _report(_exceptionable, {
|
|
27
|
+
path: _path + ".system_resources",
|
|
28
|
+
expected: "(Record<string, string | number> | undefined)",
|
|
29
|
+
value: input.system_resources
|
|
30
|
+
})) && _vo1(input.system_resources, _path + ".system_resources", true && _exceptionable) || _report(_exceptionable, {
|
|
31
|
+
path: _path + ".system_resources",
|
|
32
|
+
expected: "(Record<string, string | number> | undefined)",
|
|
33
|
+
value: input.system_resources
|
|
34
|
+
}), false === _exceptionable || Object.keys(input).map(key => {
|
|
35
|
+
if (["trigger", "system_resources"].some(prop => key === prop))
|
|
36
|
+
return true;
|
|
37
|
+
const value = input[key];
|
|
38
|
+
if (undefined === value)
|
|
39
|
+
return true;
|
|
40
|
+
return (null !== value || _report(_exceptionable, {
|
|
41
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
42
|
+
expected: "(Array<string | number> | Record<string, string | number | (string | number)[]> | number | string | undefined)",
|
|
43
|
+
value: value
|
|
44
|
+
})) && (undefined === value || "string" === typeof value || "number" === typeof value || (Array.isArray(value) && value.map((elem, _index3) => "string" === typeof elem || "number" === typeof elem || _report(_exceptionable, {
|
|
45
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key) + "[" + _index3 + "]",
|
|
46
|
+
expected: "(number | string)",
|
|
47
|
+
value: elem
|
|
48
|
+
})).every(flag => flag) || "object" === typeof value && null !== value && false === Array.isArray(value) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
49
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
50
|
+
expected: "(Array<string | number> | Record<string, string | number | (string | number)[]> | number | string | undefined)",
|
|
51
|
+
value: value
|
|
52
|
+
})) || _report(_exceptionable, {
|
|
53
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
54
|
+
expected: "(Array<string | number> | Record<string, string | number | (string | number)[]> | number | string | undefined)",
|
|
55
|
+
value: value
|
|
56
|
+
}));
|
|
57
|
+
}).every(flag => flag)].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
58
|
+
const value = input[key];
|
|
59
|
+
if (undefined === value)
|
|
60
|
+
return true;
|
|
61
|
+
return "string" === typeof value || "number" === typeof value || _report(_exceptionable, {
|
|
62
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
63
|
+
expected: "(number | string)",
|
|
64
|
+
value: value
|
|
65
|
+
});
|
|
66
|
+
}).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
67
|
+
const value = input[key];
|
|
68
|
+
if (undefined === value)
|
|
69
|
+
return true;
|
|
70
|
+
return (null !== value || _report(_exceptionable, {
|
|
71
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
72
|
+
expected: "(Array<string | number> | number | string)",
|
|
73
|
+
value: value
|
|
74
|
+
})) && (undefined !== value || _report(_exceptionable, {
|
|
75
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
76
|
+
expected: "(Array<string | number> | number | string)",
|
|
77
|
+
value: value
|
|
78
|
+
})) && ("string" === typeof value || "number" === typeof value || (Array.isArray(value) || _report(_exceptionable, {
|
|
79
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
80
|
+
expected: "(Array<string | number> | number | string)",
|
|
81
|
+
value: value
|
|
82
|
+
})) && value.map((elem, _index4) => "string" === typeof elem || "number" === typeof elem || _report(_exceptionable, {
|
|
83
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key) + "[" + _index4 + "]",
|
|
84
|
+
expected: "(number | string)",
|
|
85
|
+
value: elem
|
|
86
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
87
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
88
|
+
expected: "(Array<string | number> | number | string)",
|
|
89
|
+
value: value
|
|
90
|
+
}));
|
|
91
|
+
}).every(flag => flag)].every(flag => flag); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
92
|
+
if (false === __is(input)) {
|
|
93
|
+
errors = [];
|
|
94
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
95
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || _report(true, {
|
|
96
|
+
path: _path + "",
|
|
97
|
+
expected: "Meta",
|
|
98
|
+
value: input
|
|
99
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
100
|
+
path: _path + "",
|
|
101
|
+
expected: "Meta",
|
|
102
|
+
value: input
|
|
103
|
+
}))(input, "$input", true);
|
|
104
|
+
const success = 0 === errors.length;
|
|
105
|
+
return success ? {
|
|
106
|
+
success,
|
|
107
|
+
data: input
|
|
108
|
+
} : {
|
|
109
|
+
success,
|
|
110
|
+
errors,
|
|
111
|
+
data: input
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
success: true,
|
|
116
|
+
data: input
|
|
117
|
+
};
|
|
118
|
+
}); })();
|
|
2
119
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/meta/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/meta/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAQhD,MAAM,CAAC,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QACW,CAAC"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
+
import { type IValidation, tags } from "typia";
|
|
1
2
|
import type { ContainerCreateVolume, ContainerRun } from "../args/index.js";
|
|
2
3
|
import type { Execution } from "../execution/index.js";
|
|
3
4
|
import type { OperationResults } from "../results/index.js";
|
|
4
|
-
import
|
|
5
|
+
import { OPERATION_ID_VALIDATE, OPS_UNIQUE_BY_ID_VALIDATE } from "./rules.js";
|
|
6
|
+
export * from "./rules.js";
|
|
5
7
|
export type OperationArgsMap = {
|
|
6
8
|
'container/run': ContainerRun;
|
|
7
9
|
'container/create-volume': ContainerCreateVolume;
|
|
8
10
|
};
|
|
9
11
|
export type OperationType = keyof OperationArgsMap;
|
|
10
12
|
export type Ops = Array<Operation<OperationType>>;
|
|
11
|
-
export
|
|
13
|
+
export type UniqueById = tags.TagBase<{
|
|
14
|
+
kind: 'uniqueBy';
|
|
15
|
+
target: 'array';
|
|
16
|
+
value: 'id';
|
|
17
|
+
validate: typeof OPS_UNIQUE_BY_ID_VALIDATE;
|
|
18
|
+
message: 'ops[*].id must be unique';
|
|
19
|
+
}>;
|
|
20
|
+
export type OpsWithRule = Ops & UniqueById;
|
|
12
21
|
export type OperationId = string & tags.TagBase<{
|
|
13
22
|
kind: 'operationId';
|
|
14
23
|
target: 'string';
|
|
@@ -23,4 +32,6 @@ export type Operation<T extends OperationType> = {
|
|
|
23
32
|
results?: OperationResults;
|
|
24
33
|
execution?: Execution;
|
|
25
34
|
};
|
|
35
|
+
export declare const validateOperation: (input: unknown) => IValidation<Operation<OperationType>>;
|
|
36
|
+
export declare const validateOps: (input: unknown) => IValidation<OpsWithRule>;
|
|
26
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,WAAW,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE9E,cAAc,YAAY,CAAC;AAE3B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,eAAe,EAAE,YAAY,CAAC;IAC9B,yBAAyB,EAAE,qBAAqB,CAAC;CAClD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