@nosana/types 0.1.6 → 0.1.8
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/literals.d.ts +1 -1
- package/dist/Jobs/JobDefinition/operations/index.d.ts +10 -1
- package/dist/Jobs/JobDefinition/operations/index.js +2 -1
- package/dist/Jobs/JobDefinition/operations/index.js.map +1 -1
- package/dist/Jobs/index.js +14 -6
- package/dist/Jobs/index.js.map +1 -1
- package/dist/Schemas/job.js +13 -1
- package/dist/Schemas/job.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export type LiteralString = string & tags.TagBase<{
|
|
|
12
12
|
}>;
|
|
13
13
|
export type SpreadMarker = {
|
|
14
14
|
__spread__: LiteralString;
|
|
15
|
+
chunked?: boolean;
|
|
15
16
|
} & tags.TagBase<{
|
|
16
17
|
kind: 'spreadMarker';
|
|
17
18
|
target: 'object';
|
|
@@ -20,7 +21,6 @@ export type SpreadMarker = {
|
|
|
20
21
|
typeof $input === "object" &&
|
|
21
22
|
$input !== null &&
|
|
22
23
|
!Array.isArray($input) &&
|
|
23
|
-
Object.keys($input).length === 1 &&
|
|
24
24
|
typeof $input.__spread__ === "string" &&
|
|
25
25
|
/^%%(ops|global).[^%]+%%$/.test($input.__spread__)
|
|
26
26
|
`;
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import type { ContainerCreateVolume, ContainerRun } from "../args/index.js";
|
|
2
2
|
import type { Execution } from "../execution/index.js";
|
|
3
3
|
import type { OperationResults } from "../results/index.js";
|
|
4
|
+
import type { tags } from "typia";
|
|
4
5
|
export type OperationArgsMap = {
|
|
5
6
|
'container/run': ContainerRun;
|
|
6
7
|
'container/create-volume': ContainerCreateVolume;
|
|
7
8
|
};
|
|
8
9
|
export type OperationType = keyof OperationArgsMap;
|
|
9
10
|
export type Ops = Array<Operation<OperationType>>;
|
|
11
|
+
export declare const OPERATION_ID_VALIDATE: "typeof $input === \"string\" && !$input.includes(\" \")";
|
|
12
|
+
export type OperationId = string & tags.TagBase<{
|
|
13
|
+
kind: 'operationId';
|
|
14
|
+
target: 'string';
|
|
15
|
+
value: 'operationId';
|
|
16
|
+
validate: typeof OPERATION_ID_VALIDATE;
|
|
17
|
+
message: 'ops[*].id must be a string and not contain spaces';
|
|
18
|
+
}>;
|
|
10
19
|
export type Operation<T extends OperationType> = {
|
|
11
20
|
type: OperationType;
|
|
12
|
-
id:
|
|
21
|
+
id: OperationId;
|
|
13
22
|
args: OperationArgsMap[T];
|
|
14
23
|
results?: OperationResults;
|
|
15
24
|
execution?: Execution;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/index.ts"],"names":[],"mappings":"AAcA,sDAAsD;AACtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,qDAA8D,CAAC"}
|
package/dist/Jobs/index.js
CHANGED
|
@@ -72,7 +72,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
72
72
|
if (undefined === value)
|
|
73
73
|
return true;
|
|
74
74
|
return "string" === typeof value;
|
|
75
|
-
}); const _io9 = (input, _exceptionable = true) => ("container/run" === input.type || "container/create-volume" === input.type) && "string" === typeof input.id && ("object" === typeof input.args && null !== input.args && _iu3(input.args, true && _exceptionable)) && (undefined === input.results || "object" === typeof input.results && null !== input.results && false === Array.isArray(input.results) && _io27(input.results, true && _exceptionable)) && (undefined === input.execution || "object" === typeof input.execution && null !== input.execution && false === Array.isArray(input.execution) && _iu4(input.execution, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
75
|
+
}); const _io9 = (input, _exceptionable = true) => ("container/run" === input.type || "container/create-volume" === input.type) && ("string" === typeof input.id && (typeof input.id === "string" && !input.id.includes(" "))) && ("object" === typeof input.args && null !== input.args && _iu3(input.args, true && _exceptionable)) && (undefined === input.results || "object" === typeof input.results && null !== input.results && false === Array.isArray(input.results) && _io27(input.results, true && _exceptionable)) && (undefined === input.execution || "object" === typeof input.execution && null !== input.execution && false === Array.isArray(input.execution) && _iu4(input.execution, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
76
76
|
if (["type", "id", "args", "results", "execution"].some(prop => key === prop))
|
|
77
77
|
return true;
|
|
78
78
|
const value = input[key];
|
|
@@ -128,8 +128,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
128
128
|
if (undefined === value)
|
|
129
129
|
return true;
|
|
130
130
|
return false;
|
|
131
|
-
})); const _io12 = (input, _exceptionable = true) => "string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
132
|
-
if (["__spread__"].some(prop => key === prop))
|
|
131
|
+
})); const _io12 = (input, _exceptionable = true) => "string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__)) && (undefined === input.chunked || "boolean" === typeof input.chunked) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
132
|
+
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
133
133
|
return true;
|
|
134
134
|
const value = input[key];
|
|
135
135
|
if (undefined === value)
|
|
@@ -588,9 +588,13 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
588
588
|
path: _path + ".type",
|
|
589
589
|
expected: "(\"container/create-volume\" | \"container/run\")",
|
|
590
590
|
value: input.type
|
|
591
|
-
}), "string" === typeof input.id || _report(_exceptionable, {
|
|
591
|
+
}), "string" === typeof input.id && (typeof input.id === "string" && !input.id.includes(" ") || _report(_exceptionable, {
|
|
592
592
|
path: _path + ".id",
|
|
593
|
-
expected: "string",
|
|
593
|
+
expected: "string & TagBase<__type>",
|
|
594
|
+
value: input.id
|
|
595
|
+
})) || _report(_exceptionable, {
|
|
596
|
+
path: _path + ".id",
|
|
597
|
+
expected: "(string & TagBase<__type>)",
|
|
594
598
|
value: input.id
|
|
595
599
|
}), ("object" === typeof input.args && null !== input.args || _report(_exceptionable, {
|
|
596
600
|
path: _path + ".args",
|
|
@@ -875,8 +879,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
875
879
|
path: _path + ".__spread__",
|
|
876
880
|
expected: "(string & TagBase<__type>)",
|
|
877
881
|
value: input.__spread__
|
|
882
|
+
}), undefined === input.chunked || "boolean" === typeof input.chunked || _report(_exceptionable, {
|
|
883
|
+
path: _path + ".chunked",
|
|
884
|
+
expected: "(boolean | undefined)",
|
|
885
|
+
value: input.chunked
|
|
878
886
|
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
879
|
-
if (["__spread__"].some(prop => key === prop))
|
|
887
|
+
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
880
888
|
return true;
|
|
881
889
|
const value = input[key];
|
|
882
890
|
if (undefined === value)
|
package/dist/Jobs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Jobs/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAwB/B,MAAM,CAAC,MAAM,qBAAqB,yvBA7BD,EAAE;;;qBAGV,EAAE;;;;;IAIT,CAAC;;AACP,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;04BARH,EAAG;;;;;;;;;;4CAgBJ,CAAE,SAAQ,CAAE;;;;;QAOrB,CAAC;;;;;;;;;YAMwR,CAAC;;QAAoD,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2GA5B7e,EAAG;;;;;;QAM1C,CAAC;;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqB+E,CAAC"}
|
package/dist/Schemas/job.js
CHANGED
|
@@ -199,7 +199,7 @@ export const jobSchemas = {
|
|
|
199
199
|
]
|
|
200
200
|
},
|
|
201
201
|
id: {
|
|
202
|
-
|
|
202
|
+
$ref: "#/components/schemas/OperationId"
|
|
203
203
|
},
|
|
204
204
|
args: {
|
|
205
205
|
oneOf: [
|
|
@@ -231,6 +231,9 @@ export const jobSchemas = {
|
|
|
231
231
|
"args"
|
|
232
232
|
]
|
|
233
233
|
},
|
|
234
|
+
OperationId: {
|
|
235
|
+
type: "string"
|
|
236
|
+
},
|
|
234
237
|
ContainerRun: {
|
|
235
238
|
type: "object",
|
|
236
239
|
properties: {
|
|
@@ -276,6 +279,9 @@ export const jobSchemas = {
|
|
|
276
279
|
properties: {
|
|
277
280
|
__spread__: {
|
|
278
281
|
$ref: "#/components/schemas/LiteralString"
|
|
282
|
+
},
|
|
283
|
+
chunked: {
|
|
284
|
+
type: "boolean"
|
|
279
285
|
}
|
|
280
286
|
},
|
|
281
287
|
required: [
|
|
@@ -474,6 +480,9 @@ export const jobSchemas = {
|
|
|
474
480
|
properties: {
|
|
475
481
|
__spread__: {
|
|
476
482
|
$ref: "#/components/schemas/LiteralString"
|
|
483
|
+
},
|
|
484
|
+
chunked: {
|
|
485
|
+
type: "boolean"
|
|
477
486
|
}
|
|
478
487
|
},
|
|
479
488
|
required: [
|
|
@@ -494,6 +503,9 @@ export const jobSchemas = {
|
|
|
494
503
|
properties: {
|
|
495
504
|
__spread__: {
|
|
496
505
|
$ref: "#/components/schemas/LiteralString"
|
|
506
|
+
},
|
|
507
|
+
chunked: {
|
|
508
|
+
type: "boolean"
|
|
497
509
|
}
|
|
498
510
|
},
|
|
499
511
|
required: [
|
package/dist/Schemas/job.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job.js","sourceRoot":"","sources":["../../src/Schemas/job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"job.js","sourceRoot":"","sources":["../../src/Schemas/job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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