@nosana/types 0.1.0
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/README.md +45 -0
- package/dist/Accounts/index.d.ts +3 -0
- package/dist/Accounts/index.js +4 -0
- package/dist/Accounts/index.js.map +1 -0
- package/dist/Accounts/job.d.ts +17 -0
- package/dist/Accounts/job.js +2 -0
- package/dist/Accounts/job.js.map +1 -0
- package/dist/Accounts/market.d.ts +24 -0
- package/dist/Accounts/market.js +6 -0
- package/dist/Accounts/market.js.map +1 -0
- package/dist/Accounts/run.d.ts +14 -0
- package/dist/Accounts/run.js +2 -0
- package/dist/Accounts/run.js.map +1 -0
- package/dist/Deployments/index.d.ts +15 -0
- package/dist/Deployments/index.js +17 -0
- package/dist/Deployments/index.js.map +1 -0
- package/dist/Jobs/Flows/index.d.ts +43 -0
- package/dist/Jobs/Flows/index.js +2 -0
- package/dist/Jobs/Flows/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/aliases.d.ts +2 -0
- package/dist/Jobs/JobDefinition/args/aliases.js +2 -0
- package/dist/Jobs/JobDefinition/args/aliases.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/authentication.d.ts +9 -0
- package/dist/Jobs/JobDefinition/args/authentication.js +2 -0
- package/dist/Jobs/JobDefinition/args/authentication.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/cmd.d.ts +3 -0
- package/dist/Jobs/JobDefinition/args/cmd.js +2 -0
- package/dist/Jobs/JobDefinition/args/cmd.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/env.d.ts +1 -0
- package/dist/Jobs/JobDefinition/args/env.js +2 -0
- package/dist/Jobs/JobDefinition/args/env.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/expose.d.ts +44 -0
- package/dist/Jobs/JobDefinition/args/expose.js +2 -0
- package/dist/Jobs/JobDefinition/args/expose.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/gpu.d.ts +1 -0
- package/dist/Jobs/JobDefinition/args/gpu.js +2 -0
- package/dist/Jobs/JobDefinition/args/gpu.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/image.d.ts +1 -0
- package/dist/Jobs/JobDefinition/args/image.js +2 -0
- package/dist/Jobs/JobDefinition/args/image.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/index.d.ts +38 -0
- package/dist/Jobs/JobDefinition/args/index.js +13 -0
- package/dist/Jobs/JobDefinition/args/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/literals.d.ts +28 -0
- package/dist/Jobs/JobDefinition/args/literals.js +2 -0
- package/dist/Jobs/JobDefinition/args/literals.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/resources.d.ts +70 -0
- package/dist/Jobs/JobDefinition/args/resources.js +6 -0
- package/dist/Jobs/JobDefinition/args/resources.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/variables.d.ts +1 -0
- package/dist/Jobs/JobDefinition/args/variables.js +2 -0
- package/dist/Jobs/JobDefinition/args/variables.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/volumes.d.ts +4 -0
- package/dist/Jobs/JobDefinition/args/volumes.js +2 -0
- package/dist/Jobs/JobDefinition/args/volumes.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/work_dir.d.ts +1 -0
- package/dist/Jobs/JobDefinition/args/work_dir.js +2 -0
- package/dist/Jobs/JobDefinition/args/work_dir.js.map +1 -0
- package/dist/Jobs/JobDefinition/execution/index.d.ts +11 -0
- package/dist/Jobs/JobDefinition/execution/index.js +2 -0
- package/dist/Jobs/JobDefinition/execution/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/global/index.d.ts +9 -0
- package/dist/Jobs/JobDefinition/global/index.js +2 -0
- package/dist/Jobs/JobDefinition/global/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/index.d.ts +23 -0
- package/dist/Jobs/JobDefinition/index.js +8 -0
- package/dist/Jobs/JobDefinition/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/logistics/index.d.ts +17 -0
- package/dist/Jobs/JobDefinition/logistics/index.js +9 -0
- package/dist/Jobs/JobDefinition/logistics/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/meta/index.d.ts +4 -0
- package/dist/Jobs/JobDefinition/meta/index.js +2 -0
- package/dist/Jobs/JobDefinition/meta/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/operations/index.d.ts +16 -0
- package/dist/Jobs/JobDefinition/operations/index.js +2 -0
- package/dist/Jobs/JobDefinition/operations/index.js.map +1 -0
- package/dist/Jobs/JobDefinition/results/index.d.ts +6 -0
- package/dist/Jobs/JobDefinition/results/index.js +2 -0
- package/dist/Jobs/JobDefinition/results/index.js.map +1 -0
- package/dist/Jobs/Logs/index.d.ts +32 -0
- package/dist/Jobs/Logs/index.js +7 -0
- package/dist/Jobs/Logs/index.js.map +1 -0
- package/dist/Jobs/index.d.ts +26 -0
- package/dist/Jobs/index.js +1361 -0
- package/dist/Jobs/index.js.map +1 -0
- package/dist/Schemas/api.d.ts +3551 -0
- package/dist/Schemas/api.js +2 -0
- package/dist/Schemas/api.js.map +1 -0
- package/dist/Schemas/index.d.ts +2 -0
- package/dist/Schemas/index.js +3 -0
- package/dist/Schemas/index.js.map +1 -0
- package/dist/Schemas/job.d.ts +3 -0
- package/dist/Schemas/job.js +889 -0
- package/dist/Schemas/job.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +2 -0
- package/dist/utils.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,1361 @@
|
|
|
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 * from "./Flows/index.js";
|
|
6
|
+
export * from "./JobDefinition/index.js";
|
|
7
|
+
export * from "./Logs/index.js";
|
|
8
|
+
export const validateJobDefinition = (() => { const _io0 = (input, _exceptionable = true) => "container" === input.type && "0.1" === input.version && (undefined === input.logistics || "object" === typeof input.logistics && null !== input.logistics && _io1(input.logistics, true && _exceptionable)) && (undefined === input.deployment_id || "string" === typeof input.deployment_id) && (undefined === input.meta || "object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) && _io3(input.meta, true && _exceptionable)) && (undefined === input.global || "object" === typeof input.global && null !== input.global && false === Array.isArray(input.global) && _io5(input.global, true && _exceptionable)) && (Array.isArray(input.ops) && (Array.isArray(input.ops) && (() => {
|
|
9
|
+
const seen = new Set();
|
|
10
|
+
for (const it of input.ops) {
|
|
11
|
+
if (typeof it?.id !== "string")
|
|
12
|
+
return false;
|
|
13
|
+
if (seen.has(it.id))
|
|
14
|
+
return false;
|
|
15
|
+
seen.add(it.id);
|
|
16
|
+
}
|
|
17
|
+
return true;
|
|
18
|
+
})() && input.ops.every((elem, _index1) => "object" === typeof elem && null !== elem && _io8(elem, true && _exceptionable)))) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
19
|
+
if (["type", "version", "logistics", "deployment_id", "meta", "global", "ops"].some(prop => key === prop))
|
|
20
|
+
return true;
|
|
21
|
+
const value = input[key];
|
|
22
|
+
if (undefined === value)
|
|
23
|
+
return true;
|
|
24
|
+
return false;
|
|
25
|
+
})); const _io1 = (input, _exceptionable = true) => ("api" === input.type || "api-listen" === input.type) && ("object" === typeof input.args && null !== input.args && false === Array.isArray(input.args) && _io2(input.args, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
26
|
+
if (["type", "args"].some(prop => key === prop))
|
|
27
|
+
return true;
|
|
28
|
+
const value = input[key];
|
|
29
|
+
if (undefined === value)
|
|
30
|
+
return true;
|
|
31
|
+
return false;
|
|
32
|
+
})); const _io2 = (input, _exceptionable = true) => (undefined === input.endpoint || "string" === typeof input.endpoint) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
33
|
+
if (["endpoint"].some(prop => key === prop))
|
|
34
|
+
return true;
|
|
35
|
+
const value = input[key];
|
|
36
|
+
if (undefined === value)
|
|
37
|
+
return true;
|
|
38
|
+
return false;
|
|
39
|
+
})); const _io3 = (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) && _io4(input.system_resources, true && _exceptionable)) && Object.keys(input).every(key => {
|
|
40
|
+
if (["trigger", "system_resources"].some(prop => key === prop))
|
|
41
|
+
return true;
|
|
42
|
+
const value = input[key];
|
|
43
|
+
if (undefined === value)
|
|
44
|
+
return true;
|
|
45
|
+
return "string" === typeof value || "number" === typeof value;
|
|
46
|
+
}); const _io4 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
47
|
+
const value = input[key];
|
|
48
|
+
if (undefined === value)
|
|
49
|
+
return true;
|
|
50
|
+
return "string" === typeof value || "number" === typeof value;
|
|
51
|
+
}); const _io5 = (input, _exceptionable = true) => (undefined === input.image || "string" === typeof input.image) && (undefined === input.gpu || "boolean" === typeof input.gpu) && (null !== input.entrypoint && (undefined === input.entrypoint || "string" === typeof input.entrypoint || Array.isArray(input.entrypoint) && input.entrypoint.every((elem, _index2) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io6(input.env, true && _exceptionable)) && (undefined === input.work_dir || "string" === typeof input.work_dir) && (undefined === input.variables || "object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) && _io7(input.variables, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
52
|
+
if (["image", "gpu", "entrypoint", "env", "work_dir", "variables"].some(prop => key === prop))
|
|
53
|
+
return true;
|
|
54
|
+
const value = input[key];
|
|
55
|
+
if (undefined === value)
|
|
56
|
+
return true;
|
|
57
|
+
return false;
|
|
58
|
+
})); const _io6 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
59
|
+
const value = input[key];
|
|
60
|
+
if (undefined === value)
|
|
61
|
+
return true;
|
|
62
|
+
return "string" === typeof value;
|
|
63
|
+
}); const _io7 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
64
|
+
const value = input[key];
|
|
65
|
+
if (undefined === value)
|
|
66
|
+
return true;
|
|
67
|
+
return "string" === typeof value;
|
|
68
|
+
}); const _io8 = (input, _exceptionable = true) => ("container/run" === input.type || "container/create-volume" === input.type) && "string" === typeof input.id && ("object" === typeof input.args && null !== input.args && _iu1(input.args, true && _exceptionable)) && (undefined === input.results || "object" === typeof input.results && null !== input.results && false === Array.isArray(input.results) && _io22(input.results, true && _exceptionable)) && (undefined === input.execution || "object" === typeof input.execution && null !== input.execution && false === Array.isArray(input.execution) && _iu2(input.execution, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
69
|
+
if (["type", "id", "args", "results", "execution"].some(prop => key === prop))
|
|
70
|
+
return true;
|
|
71
|
+
const value = input[key];
|
|
72
|
+
if (undefined === value)
|
|
73
|
+
return true;
|
|
74
|
+
return false;
|
|
75
|
+
})); const _io9 = (input, _exceptionable = true) => "string" === typeof input.image && (null !== input.aliases && (undefined === input.aliases || "string" === typeof input.aliases || Array.isArray(input.aliases) && input.aliases.every((elem, _index3) => "string" === typeof elem))) && (null !== input.cmd && (undefined === input.cmd || "string" === typeof input.cmd || Array.isArray(input.cmd) && input.cmd.every((elem, _index4) => "string" === typeof elem))) && (undefined === input.volumes || Array.isArray(input.volumes) && input.volumes.every((elem, _index5) => "object" === typeof elem && null !== elem && _io10(elem, true && _exceptionable))) && (null !== input.expose && (undefined === input.expose || "number" === typeof input.expose || "string" === typeof input.expose && (typeof input.expose === "string" && /^%%(ops|global).[^%]+%%$/.test(input.expose)) || (Array.isArray(input.expose) && ((() => {
|
|
76
|
+
if (!Array.isArray(input.expose))
|
|
77
|
+
return true;
|
|
78
|
+
const numbers = new Set();
|
|
79
|
+
const ranges = [];
|
|
80
|
+
for (const el of input.expose) {
|
|
81
|
+
if (typeof el === "string" && /^%%(ops|global).[^%]+%%$/.test(el))
|
|
82
|
+
continue;
|
|
83
|
+
if (el && typeof el === "object" && !Array.isArray(el) && el.__spread__)
|
|
84
|
+
continue;
|
|
85
|
+
const port = typeof el === "object" ? el.port : el;
|
|
86
|
+
if (typeof port === "number") {
|
|
87
|
+
if (numbers.has(port))
|
|
88
|
+
return false;
|
|
89
|
+
numbers.add(port);
|
|
90
|
+
}
|
|
91
|
+
else if (typeof port === "string") {
|
|
92
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(port);
|
|
93
|
+
if (!match)
|
|
94
|
+
return false;
|
|
95
|
+
const start = Number(match[1]), end = Number(match[2]);
|
|
96
|
+
for (const [rStart, rEnd] of ranges) {
|
|
97
|
+
if (start <= rEnd && end >= rStart)
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
ranges.push([start, end]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
for (const port of numbers) {
|
|
104
|
+
for (const [start, end] of ranges) {
|
|
105
|
+
if (port >= start && port <= end)
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
})() && input.expose.every((elem, _index6) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem)) || "object" === typeof elem && null !== elem && _io11(elem, true && _exceptionable)))) || "object" === typeof input.expose && null !== input.expose && _io11(input.expose, true && _exceptionable)))) && (undefined === input.gpu || "boolean" === typeof input.gpu) && (undefined === input.work_dir || "string" === typeof input.work_dir) && (null !== input.entrypoint && (undefined === input.entrypoint || "string" === typeof input.entrypoint || Array.isArray(input.entrypoint) && input.entrypoint.every((elem, _index7) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io6(input.env, true && _exceptionable)) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every((elem, _index8) => null !== elem && undefined !== elem && ("__remove-if-empty__" === elem || "object" === typeof elem && null !== elem && _iu0(elem, true && _exceptionable)))) && (undefined === input.authentication || "object" === typeof input.authentication && null !== input.authentication && false === Array.isArray(input.authentication) && _io19(input.authentication, true && _exceptionable)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
111
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "resources", "authentication"].some(prop => key === prop))
|
|
112
|
+
return true;
|
|
113
|
+
const value = input[key];
|
|
114
|
+
if (undefined === value)
|
|
115
|
+
return true;
|
|
116
|
+
return false;
|
|
117
|
+
})); const _io10 = (input, _exceptionable = true) => "string" === typeof input.name && "string" === typeof input.dest && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
118
|
+
if (["name", "dest"].some(prop => key === prop))
|
|
119
|
+
return true;
|
|
120
|
+
const value = input[key];
|
|
121
|
+
if (undefined === value)
|
|
122
|
+
return true;
|
|
123
|
+
return false;
|
|
124
|
+
})); const _io11 = (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 => {
|
|
125
|
+
if (["__spread__"].some(prop => key === prop))
|
|
126
|
+
return true;
|
|
127
|
+
const value = input[key];
|
|
128
|
+
if (undefined === value)
|
|
129
|
+
return true;
|
|
130
|
+
return false;
|
|
131
|
+
})); const _io12 = (input, _exceptionable = true) => "S3" === input.type && "string" === typeof input.target && (undefined === input.url || "string" === typeof input.url) && (undefined === input.allowWrite || "boolean" === typeof input.allowWrite) && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index9) => "string" === typeof elem)) && (undefined === input.IAM || "object" === typeof input.IAM && null !== input.IAM && _io13(input.IAM, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
132
|
+
if (["type", "target", "url", "allowWrite", "files", "IAM"].some(prop => key === prop))
|
|
133
|
+
return true;
|
|
134
|
+
const value = input[key];
|
|
135
|
+
if (undefined === value)
|
|
136
|
+
return true;
|
|
137
|
+
return false;
|
|
138
|
+
})); const _io13 = (input, _exceptionable = true) => "string" === typeof input.REGION && "string" === typeof input.ACCESS_KEY_ID && "string" === typeof input.SECRET_ACCESS_KEY && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
139
|
+
if (["REGION", "ACCESS_KEY_ID", "SECRET_ACCESS_KEY"].some(prop => key === prop))
|
|
140
|
+
return true;
|
|
141
|
+
const value = input[key];
|
|
142
|
+
if (undefined === value)
|
|
143
|
+
return true;
|
|
144
|
+
return false;
|
|
145
|
+
})); const _io14 = (input, _exceptionable = true) => "S3" === input.type && "string" === typeof input.target && "string" === typeof input.bucket && (undefined === input.url || "string" === typeof input.url) && (undefined === input.allowWrite || "boolean" === typeof input.allowWrite) && (undefined === input.IAM || "object" === typeof input.IAM && null !== input.IAM && _io13(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
146
|
+
if (["type", "target", "bucket", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
147
|
+
return true;
|
|
148
|
+
const value = input[key];
|
|
149
|
+
if (undefined === value)
|
|
150
|
+
return true;
|
|
151
|
+
return false;
|
|
152
|
+
})); const _io15 = (input, _exceptionable = true) => "S3" === input.type && "string" === typeof input.target && (Array.isArray(input.buckets) && input.buckets.every((elem, _index10) => "object" === typeof elem && null !== elem && _io16(elem, true && _exceptionable))) && (undefined === input.url || "string" === typeof input.url) && (undefined === input.allowWrite || "boolean" === typeof input.allowWrite) && (undefined === input.IAM || "object" === typeof input.IAM && null !== input.IAM && _io13(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
153
|
+
if (["type", "target", "buckets", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
154
|
+
return true;
|
|
155
|
+
const value = input[key];
|
|
156
|
+
if (undefined === value)
|
|
157
|
+
return true;
|
|
158
|
+
return false;
|
|
159
|
+
})); const _io16 = (input, _exceptionable = true) => "string" === typeof input.url && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index11) => "string" === typeof elem)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
160
|
+
if (["url", "files"].some(prop => key === prop))
|
|
161
|
+
return true;
|
|
162
|
+
const value = input[key];
|
|
163
|
+
if (undefined === value)
|
|
164
|
+
return true;
|
|
165
|
+
return false;
|
|
166
|
+
})); const _io17 = (input, _exceptionable = true) => "HF" === input.type && "string" === typeof input.target && "string" === typeof input.repo && (undefined === input.revision || "string" === typeof input.revision) && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index12) => "string" === typeof elem)) && (undefined === input.accessToken || "string" === typeof input.accessToken) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
167
|
+
if (["type", "target", "repo", "revision", "files", "accessToken"].some(prop => key === prop))
|
|
168
|
+
return true;
|
|
169
|
+
const value = input[key];
|
|
170
|
+
if (undefined === value)
|
|
171
|
+
return true;
|
|
172
|
+
return false;
|
|
173
|
+
})); const _io18 = (input, _exceptionable = true) => "Ollama" === input.type && "string" === typeof input.model && (undefined === input.target || "string" === typeof input.target) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
174
|
+
if (["type", "model", "target"].some(prop => key === prop))
|
|
175
|
+
return true;
|
|
176
|
+
const value = input[key];
|
|
177
|
+
if (undefined === value)
|
|
178
|
+
return true;
|
|
179
|
+
return false;
|
|
180
|
+
})); const _io19 = (input, _exceptionable = true) => (undefined === input.docker || "object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) && _io20(input.docker, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
181
|
+
if (["docker"].some(prop => key === prop))
|
|
182
|
+
return true;
|
|
183
|
+
const value = input[key];
|
|
184
|
+
if (undefined === value)
|
|
185
|
+
return true;
|
|
186
|
+
return false;
|
|
187
|
+
})); const _io20 = (input, _exceptionable = true) => (undefined === input.username || "string" === typeof input.username) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.email || "string" === typeof input.email) && (undefined === input.server || "string" === typeof input.server) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
188
|
+
if (["username", "password", "email", "server"].some(prop => key === prop))
|
|
189
|
+
return true;
|
|
190
|
+
const value = input[key];
|
|
191
|
+
if (undefined === value)
|
|
192
|
+
return true;
|
|
193
|
+
return false;
|
|
194
|
+
})); const _io21 = (input, _exceptionable = true) => "string" === typeof input.name && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
195
|
+
if (["name"].some(prop => key === prop))
|
|
196
|
+
return true;
|
|
197
|
+
const value = input[key];
|
|
198
|
+
if (undefined === value)
|
|
199
|
+
return true;
|
|
200
|
+
return false;
|
|
201
|
+
})); const _io22 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
202
|
+
const value = input[key];
|
|
203
|
+
if (undefined === value)
|
|
204
|
+
return true;
|
|
205
|
+
return null !== value && undefined !== value && ("string" === typeof value || "object" === typeof value && null !== value && _io23(value, true && _exceptionable));
|
|
206
|
+
}); const _io23 = (input, _exceptionable = true) => "string" === typeof input.regex && (Array.isArray(input.logType) && (Array.isArray(input.logType) && input.logType.length >= 1 && input.logType.length <= 4 && (() => {
|
|
207
|
+
const seen = new Set();
|
|
208
|
+
for (const v of input.logType) {
|
|
209
|
+
if (seen.has(v))
|
|
210
|
+
return false;
|
|
211
|
+
seen.add(v);
|
|
212
|
+
}
|
|
213
|
+
return true;
|
|
214
|
+
})() && input.logType.every((elem, _index13) => "stdin" === elem || "stdout" === elem || "stderr" === elem || "nodeerr" === elem))) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
215
|
+
if (["regex", "logType"].some(prop => key === prop))
|
|
216
|
+
return true;
|
|
217
|
+
const value = input[key];
|
|
218
|
+
if (undefined === value)
|
|
219
|
+
return true;
|
|
220
|
+
return false;
|
|
221
|
+
})); const _io24 = (input, _exceptionable = true) => (undefined === input.group || "string" === typeof input.group) && (null !== input.depends_on && undefined === input.depends_on) && (null !== input.stop_if_dependent_stops && undefined === input.stop_if_dependent_stops) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
222
|
+
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
223
|
+
return true;
|
|
224
|
+
const value = input[key];
|
|
225
|
+
if (undefined === value)
|
|
226
|
+
return true;
|
|
227
|
+
return false;
|
|
228
|
+
})); const _io25 = (input, _exceptionable = true) => (undefined === input.group || "string" === typeof input.group) && (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index14) => "string" === typeof elem)) && (undefined === input.stop_if_dependent_stops || "boolean" === typeof input.stop_if_dependent_stops) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
229
|
+
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
230
|
+
return true;
|
|
231
|
+
const value = input[key];
|
|
232
|
+
if (undefined === value)
|
|
233
|
+
return true;
|
|
234
|
+
return false;
|
|
235
|
+
})); const _iu0 = (input, _exceptionable = true) => (() => {
|
|
236
|
+
if (undefined !== input.__spread__)
|
|
237
|
+
return _io11(input, true && _exceptionable);
|
|
238
|
+
else if (undefined !== input.bucket)
|
|
239
|
+
return _io14(input, true && _exceptionable);
|
|
240
|
+
else if (undefined !== input.buckets)
|
|
241
|
+
return _io15(input, true && _exceptionable);
|
|
242
|
+
else if ("HF" === input.type)
|
|
243
|
+
return _io17(input, true && _exceptionable);
|
|
244
|
+
else if ("Ollama" === input.type)
|
|
245
|
+
return _io18(input, true && _exceptionable);
|
|
246
|
+
else
|
|
247
|
+
return _io12(input, true && _exceptionable);
|
|
248
|
+
})(); const _iu1 = (input, _exceptionable = true) => (() => {
|
|
249
|
+
if (undefined !== input.image)
|
|
250
|
+
return _io9(input, true && _exceptionable);
|
|
251
|
+
else if (undefined !== input.name)
|
|
252
|
+
return _io21(input, true && _exceptionable);
|
|
253
|
+
else
|
|
254
|
+
return false;
|
|
255
|
+
})(); const _iu2 = (input, _exceptionable = true) => (() => {
|
|
256
|
+
if (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index15) => "string" === typeof elem))
|
|
257
|
+
return _io25(input, true && _exceptionable);
|
|
258
|
+
else
|
|
259
|
+
return _io24(input, true && _exceptionable);
|
|
260
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["container" === input.type || _report(_exceptionable, {
|
|
261
|
+
path: _path + ".type",
|
|
262
|
+
expected: "\"container\"",
|
|
263
|
+
value: input.type
|
|
264
|
+
}), "0.1" === input.version || _report(_exceptionable, {
|
|
265
|
+
path: _path + ".version",
|
|
266
|
+
expected: "\"0.1\"",
|
|
267
|
+
value: input.version
|
|
268
|
+
}), undefined === input.logistics || ("object" === typeof input.logistics && null !== input.logistics || _report(_exceptionable, {
|
|
269
|
+
path: _path + ".logistics",
|
|
270
|
+
expected: "(Logistics | undefined)",
|
|
271
|
+
value: input.logistics
|
|
272
|
+
})) && _vo1(input.logistics, _path + ".logistics", true && _exceptionable) || _report(_exceptionable, {
|
|
273
|
+
path: _path + ".logistics",
|
|
274
|
+
expected: "(Logistics | undefined)",
|
|
275
|
+
value: input.logistics
|
|
276
|
+
}), undefined === input.deployment_id || "string" === typeof input.deployment_id || _report(_exceptionable, {
|
|
277
|
+
path: _path + ".deployment_id",
|
|
278
|
+
expected: "(string | undefined)",
|
|
279
|
+
value: input.deployment_id
|
|
280
|
+
}), undefined === input.meta || ("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) || _report(_exceptionable, {
|
|
281
|
+
path: _path + ".meta",
|
|
282
|
+
expected: "(Meta | undefined)",
|
|
283
|
+
value: input.meta
|
|
284
|
+
})) && _vo3(input.meta, _path + ".meta", true && _exceptionable) || _report(_exceptionable, {
|
|
285
|
+
path: _path + ".meta",
|
|
286
|
+
expected: "(Meta | undefined)",
|
|
287
|
+
value: input.meta
|
|
288
|
+
}), undefined === input.global || ("object" === typeof input.global && null !== input.global && false === Array.isArray(input.global) || _report(_exceptionable, {
|
|
289
|
+
path: _path + ".global",
|
|
290
|
+
expected: "(Global | undefined)",
|
|
291
|
+
value: input.global
|
|
292
|
+
})) && _vo5(input.global, _path + ".global", true && _exceptionable) || _report(_exceptionable, {
|
|
293
|
+
path: _path + ".global",
|
|
294
|
+
expected: "(Global | undefined)",
|
|
295
|
+
value: input.global
|
|
296
|
+
}), (Array.isArray(input.ops) || _report(_exceptionable, {
|
|
297
|
+
path: _path + ".ops",
|
|
298
|
+
expected: "(Ops & UniqueById)",
|
|
299
|
+
value: input.ops
|
|
300
|
+
})) && ((Array.isArray(input.ops) && (() => {
|
|
301
|
+
const seen = new Set();
|
|
302
|
+
for (const it of input.ops) {
|
|
303
|
+
if (typeof it?.id !== "string")
|
|
304
|
+
return false;
|
|
305
|
+
if (seen.has(it.id))
|
|
306
|
+
return false;
|
|
307
|
+
seen.add(it.id);
|
|
308
|
+
}
|
|
309
|
+
return true;
|
|
310
|
+
})() || _report(_exceptionable, {
|
|
311
|
+
path: _path + ".ops",
|
|
312
|
+
expected: "Array<> & UniqueById",
|
|
313
|
+
value: input.ops
|
|
314
|
+
})) && input.ops.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
315
|
+
path: _path + ".ops[" + _index16 + "]",
|
|
316
|
+
expected: "Operation<keyof OperationArgsMap>",
|
|
317
|
+
value: elem
|
|
318
|
+
})) && _vo8(elem, _path + ".ops[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
319
|
+
path: _path + ".ops[" + _index16 + "]",
|
|
320
|
+
expected: "Operation<keyof OperationArgsMap>",
|
|
321
|
+
value: elem
|
|
322
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
323
|
+
path: _path + ".ops",
|
|
324
|
+
expected: "(Ops & UniqueById)",
|
|
325
|
+
value: input.ops
|
|
326
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
327
|
+
if (["type", "version", "logistics", "deployment_id", "meta", "global", "ops"].some(prop => key === prop))
|
|
328
|
+
return true;
|
|
329
|
+
const value = input[key];
|
|
330
|
+
if (undefined === value)
|
|
331
|
+
return true;
|
|
332
|
+
return _report(_exceptionable, {
|
|
333
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
334
|
+
expected: "undefined",
|
|
335
|
+
value: value,
|
|
336
|
+
description: [
|
|
337
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
338
|
+
"",
|
|
339
|
+
"Please remove the property next time."
|
|
340
|
+
].join("\n")
|
|
341
|
+
});
|
|
342
|
+
}).every(flag => flag))].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["api" === input.type || "api-listen" === input.type || _report(_exceptionable, {
|
|
343
|
+
path: _path + ".type",
|
|
344
|
+
expected: "(\"api\" | \"api-listen\")",
|
|
345
|
+
value: input.type
|
|
346
|
+
}), ("object" === typeof input.args && null !== input.args && false === Array.isArray(input.args) || _report(_exceptionable, {
|
|
347
|
+
path: _path + ".args",
|
|
348
|
+
expected: "Partial<__type>",
|
|
349
|
+
value: input.args
|
|
350
|
+
})) && _vo2(input.args, _path + ".args", true && _exceptionable) || _report(_exceptionable, {
|
|
351
|
+
path: _path + ".args",
|
|
352
|
+
expected: "Partial<__type>",
|
|
353
|
+
value: input.args
|
|
354
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
355
|
+
if (["type", "args"].some(prop => key === prop))
|
|
356
|
+
return true;
|
|
357
|
+
const value = input[key];
|
|
358
|
+
if (undefined === value)
|
|
359
|
+
return true;
|
|
360
|
+
return _report(_exceptionable, {
|
|
361
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
362
|
+
expected: "undefined",
|
|
363
|
+
value: value,
|
|
364
|
+
description: [
|
|
365
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
366
|
+
"",
|
|
367
|
+
"Please remove the property next time."
|
|
368
|
+
].join("\n")
|
|
369
|
+
});
|
|
370
|
+
}).every(flag => flag))].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => [undefined === input.endpoint || "string" === typeof input.endpoint || _report(_exceptionable, {
|
|
371
|
+
path: _path + ".endpoint",
|
|
372
|
+
expected: "(string | undefined)",
|
|
373
|
+
value: input.endpoint
|
|
374
|
+
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
375
|
+
if (["endpoint"].some(prop => key === prop))
|
|
376
|
+
return true;
|
|
377
|
+
const value = input[key];
|
|
378
|
+
if (undefined === value)
|
|
379
|
+
return true;
|
|
380
|
+
return _report(_exceptionable, {
|
|
381
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
382
|
+
expected: "undefined",
|
|
383
|
+
value: value,
|
|
384
|
+
description: [
|
|
385
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
386
|
+
"",
|
|
387
|
+
"Please remove the property next time."
|
|
388
|
+
].join("\n")
|
|
389
|
+
});
|
|
390
|
+
}).every(flag => flag))].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => [undefined === input.trigger || "string" === typeof input.trigger || _report(_exceptionable, {
|
|
391
|
+
path: _path + ".trigger",
|
|
392
|
+
expected: "(string | undefined)",
|
|
393
|
+
value: input.trigger
|
|
394
|
+
}), undefined === input.system_resources || ("object" === typeof input.system_resources && null !== input.system_resources && false === Array.isArray(input.system_resources) || _report(_exceptionable, {
|
|
395
|
+
path: _path + ".system_resources",
|
|
396
|
+
expected: "(Record<string, string | number> | undefined)",
|
|
397
|
+
value: input.system_resources
|
|
398
|
+
})) && _vo4(input.system_resources, _path + ".system_resources", true && _exceptionable) || _report(_exceptionable, {
|
|
399
|
+
path: _path + ".system_resources",
|
|
400
|
+
expected: "(Record<string, string | number> | undefined)",
|
|
401
|
+
value: input.system_resources
|
|
402
|
+
}), false === _exceptionable || Object.keys(input).map(key => {
|
|
403
|
+
if (["trigger", "system_resources"].some(prop => key === prop))
|
|
404
|
+
return true;
|
|
405
|
+
const value = input[key];
|
|
406
|
+
if (undefined === value)
|
|
407
|
+
return true;
|
|
408
|
+
return "string" === typeof value || "number" === typeof value || _report(_exceptionable, {
|
|
409
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
410
|
+
expected: "(number | string)",
|
|
411
|
+
value: value
|
|
412
|
+
});
|
|
413
|
+
}).every(flag => flag)].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
414
|
+
const value = input[key];
|
|
415
|
+
if (undefined === value)
|
|
416
|
+
return true;
|
|
417
|
+
return "string" === typeof value || "number" === typeof value || _report(_exceptionable, {
|
|
418
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
419
|
+
expected: "(number | string)",
|
|
420
|
+
value: value
|
|
421
|
+
});
|
|
422
|
+
}).every(flag => flag)].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.image || "string" === typeof input.image || _report(_exceptionable, {
|
|
423
|
+
path: _path + ".image",
|
|
424
|
+
expected: "(string | undefined)",
|
|
425
|
+
value: input.image
|
|
426
|
+
}), undefined === input.gpu || "boolean" === typeof input.gpu || _report(_exceptionable, {
|
|
427
|
+
path: _path + ".gpu",
|
|
428
|
+
expected: "(boolean | undefined)",
|
|
429
|
+
value: input.gpu
|
|
430
|
+
}), (null !== input.entrypoint || _report(_exceptionable, {
|
|
431
|
+
path: _path + ".entrypoint",
|
|
432
|
+
expected: "(CMDArray | string | undefined)",
|
|
433
|
+
value: input.entrypoint
|
|
434
|
+
})) && (undefined === input.entrypoint || "string" === typeof input.entrypoint || (Array.isArray(input.entrypoint) || _report(_exceptionable, {
|
|
435
|
+
path: _path + ".entrypoint",
|
|
436
|
+
expected: "(CMDArray | string | undefined)",
|
|
437
|
+
value: input.entrypoint
|
|
438
|
+
})) && input.entrypoint.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, {
|
|
439
|
+
path: _path + ".entrypoint[" + _index17 + "]",
|
|
440
|
+
expected: "string",
|
|
441
|
+
value: elem
|
|
442
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
443
|
+
path: _path + ".entrypoint",
|
|
444
|
+
expected: "(CMDArray | string | undefined)",
|
|
445
|
+
value: input.entrypoint
|
|
446
|
+
})), undefined === input.env || ("object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) || _report(_exceptionable, {
|
|
447
|
+
path: _path + ".env",
|
|
448
|
+
expected: "(Env | undefined)",
|
|
449
|
+
value: input.env
|
|
450
|
+
})) && _vo6(input.env, _path + ".env", true && _exceptionable) || _report(_exceptionable, {
|
|
451
|
+
path: _path + ".env",
|
|
452
|
+
expected: "(Env | undefined)",
|
|
453
|
+
value: input.env
|
|
454
|
+
}), undefined === input.work_dir || "string" === typeof input.work_dir || _report(_exceptionable, {
|
|
455
|
+
path: _path + ".work_dir",
|
|
456
|
+
expected: "(string | undefined)",
|
|
457
|
+
value: input.work_dir
|
|
458
|
+
}), undefined === input.variables || ("object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) || _report(_exceptionable, {
|
|
459
|
+
path: _path + ".variables",
|
|
460
|
+
expected: "(Variables | undefined)",
|
|
461
|
+
value: input.variables
|
|
462
|
+
})) && _vo7(input.variables, _path + ".variables", true && _exceptionable) || _report(_exceptionable, {
|
|
463
|
+
path: _path + ".variables",
|
|
464
|
+
expected: "(Variables | undefined)",
|
|
465
|
+
value: input.variables
|
|
466
|
+
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
467
|
+
if (["image", "gpu", "entrypoint", "env", "work_dir", "variables"].some(prop => key === prop))
|
|
468
|
+
return true;
|
|
469
|
+
const value = input[key];
|
|
470
|
+
if (undefined === value)
|
|
471
|
+
return true;
|
|
472
|
+
return _report(_exceptionable, {
|
|
473
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
474
|
+
expected: "undefined",
|
|
475
|
+
value: value,
|
|
476
|
+
description: [
|
|
477
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
478
|
+
"",
|
|
479
|
+
"Please remove the property next time."
|
|
480
|
+
].join("\n")
|
|
481
|
+
});
|
|
482
|
+
}).every(flag => flag))].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
483
|
+
const value = input[key];
|
|
484
|
+
if (undefined === value)
|
|
485
|
+
return true;
|
|
486
|
+
return "string" === typeof value || _report(_exceptionable, {
|
|
487
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
488
|
+
expected: "string",
|
|
489
|
+
value: value
|
|
490
|
+
});
|
|
491
|
+
}).every(flag => flag)].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
492
|
+
const value = input[key];
|
|
493
|
+
if (undefined === value)
|
|
494
|
+
return true;
|
|
495
|
+
return "string" === typeof value || _report(_exceptionable, {
|
|
496
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
497
|
+
expected: "string",
|
|
498
|
+
value: value
|
|
499
|
+
});
|
|
500
|
+
}).every(flag => flag)].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["container/run" === input.type || "container/create-volume" === input.type || _report(_exceptionable, {
|
|
501
|
+
path: _path + ".type",
|
|
502
|
+
expected: "(\"container/create-volume\" | \"container/run\")",
|
|
503
|
+
value: input.type
|
|
504
|
+
}), "string" === typeof input.id || _report(_exceptionable, {
|
|
505
|
+
path: _path + ".id",
|
|
506
|
+
expected: "string",
|
|
507
|
+
value: input.id
|
|
508
|
+
}), ("object" === typeof input.args && null !== input.args || _report(_exceptionable, {
|
|
509
|
+
path: _path + ".args",
|
|
510
|
+
expected: "(ContainerCreateVolume | ContainerRun)",
|
|
511
|
+
value: input.args
|
|
512
|
+
})) && _vu1(input.args, _path + ".args", true && _exceptionable) || _report(_exceptionable, {
|
|
513
|
+
path: _path + ".args",
|
|
514
|
+
expected: "(ContainerCreateVolume | ContainerRun)",
|
|
515
|
+
value: input.args
|
|
516
|
+
}), undefined === input.results || ("object" === typeof input.results && null !== input.results && false === Array.isArray(input.results) || _report(_exceptionable, {
|
|
517
|
+
path: _path + ".results",
|
|
518
|
+
expected: "(OperationResults | undefined)",
|
|
519
|
+
value: input.results
|
|
520
|
+
})) && _vo22(input.results, _path + ".results", true && _exceptionable) || _report(_exceptionable, {
|
|
521
|
+
path: _path + ".results",
|
|
522
|
+
expected: "(OperationResults | undefined)",
|
|
523
|
+
value: input.results
|
|
524
|
+
}), undefined === input.execution || ("object" === typeof input.execution && null !== input.execution && false === Array.isArray(input.execution) || _report(_exceptionable, {
|
|
525
|
+
path: _path + ".execution",
|
|
526
|
+
expected: "(undefined | { group?: string | undefined; } & { depends_on: string[]; stop_if_dependent_stops?: boolean | undefined; } | { group?: string | undefined; } & { depends_on?: undefined; stop_if_dependent_stops?: undefined; })",
|
|
527
|
+
value: input.execution
|
|
528
|
+
})) && _vu2(input.execution, _path + ".execution", true && _exceptionable) || _report(_exceptionable, {
|
|
529
|
+
path: _path + ".execution",
|
|
530
|
+
expected: "(undefined | { group?: string | undefined; } & { depends_on: string[]; stop_if_dependent_stops?: boolean | undefined; } | { group?: string | undefined; } & { depends_on?: undefined; stop_if_dependent_stops?: undefined; })",
|
|
531
|
+
value: input.execution
|
|
532
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
533
|
+
if (["type", "id", "args", "results", "execution"].some(prop => key === prop))
|
|
534
|
+
return true;
|
|
535
|
+
const value = input[key];
|
|
536
|
+
if (undefined === value)
|
|
537
|
+
return true;
|
|
538
|
+
return _report(_exceptionable, {
|
|
539
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
540
|
+
expected: "undefined",
|
|
541
|
+
value: value,
|
|
542
|
+
description: [
|
|
543
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
544
|
+
"",
|
|
545
|
+
"Please remove the property next time."
|
|
546
|
+
].join("\n")
|
|
547
|
+
});
|
|
548
|
+
}).every(flag => flag))].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.image || _report(_exceptionable, {
|
|
549
|
+
path: _path + ".image",
|
|
550
|
+
expected: "string",
|
|
551
|
+
value: input.image
|
|
552
|
+
}), (null !== input.aliases || _report(_exceptionable, {
|
|
553
|
+
path: _path + ".aliases",
|
|
554
|
+
expected: "(Aliases | string | undefined)",
|
|
555
|
+
value: input.aliases
|
|
556
|
+
})) && (undefined === input.aliases || "string" === typeof input.aliases || (Array.isArray(input.aliases) || _report(_exceptionable, {
|
|
557
|
+
path: _path + ".aliases",
|
|
558
|
+
expected: "(Aliases | string | undefined)",
|
|
559
|
+
value: input.aliases
|
|
560
|
+
})) && input.aliases.map((elem, _index18) => "string" === typeof elem || _report(_exceptionable, {
|
|
561
|
+
path: _path + ".aliases[" + _index18 + "]",
|
|
562
|
+
expected: "string",
|
|
563
|
+
value: elem
|
|
564
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
565
|
+
path: _path + ".aliases",
|
|
566
|
+
expected: "(Aliases | string | undefined)",
|
|
567
|
+
value: input.aliases
|
|
568
|
+
})), (null !== input.cmd || _report(_exceptionable, {
|
|
569
|
+
path: _path + ".cmd",
|
|
570
|
+
expected: "(CMDArray | string | undefined)",
|
|
571
|
+
value: input.cmd
|
|
572
|
+
})) && (undefined === input.cmd || "string" === typeof input.cmd || (Array.isArray(input.cmd) || _report(_exceptionable, {
|
|
573
|
+
path: _path + ".cmd",
|
|
574
|
+
expected: "(CMDArray | string | undefined)",
|
|
575
|
+
value: input.cmd
|
|
576
|
+
})) && input.cmd.map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
|
|
577
|
+
path: _path + ".cmd[" + _index19 + "]",
|
|
578
|
+
expected: "string",
|
|
579
|
+
value: elem
|
|
580
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
581
|
+
path: _path + ".cmd",
|
|
582
|
+
expected: "(CMDArray | string | undefined)",
|
|
583
|
+
value: input.cmd
|
|
584
|
+
})), undefined === input.volumes || (Array.isArray(input.volumes) || _report(_exceptionable, {
|
|
585
|
+
path: _path + ".volumes",
|
|
586
|
+
expected: "(Array<Volume> | undefined)",
|
|
587
|
+
value: input.volumes
|
|
588
|
+
})) && input.volumes.map((elem, _index20) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
589
|
+
path: _path + ".volumes[" + _index20 + "]",
|
|
590
|
+
expected: "Volume",
|
|
591
|
+
value: elem
|
|
592
|
+
})) && _vo10(elem, _path + ".volumes[" + _index20 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
593
|
+
path: _path + ".volumes[" + _index20 + "]",
|
|
594
|
+
expected: "Volume",
|
|
595
|
+
value: elem
|
|
596
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
597
|
+
path: _path + ".volumes",
|
|
598
|
+
expected: "(Array<Volume> | undefined)",
|
|
599
|
+
value: input.volumes
|
|
600
|
+
}), (null !== input.expose || _report(_exceptionable, {
|
|
601
|
+
path: _path + ".expose",
|
|
602
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | number | undefined)",
|
|
603
|
+
value: input.expose
|
|
604
|
+
})) && (undefined === input.expose || "number" === typeof input.expose || "string" === typeof input.expose && (typeof input.expose === "string" && /^%%(ops|global).[^%]+%%$/.test(input.expose) || _report(_exceptionable, {
|
|
605
|
+
path: _path + ".expose",
|
|
606
|
+
expected: "string & TagBase<__type>",
|
|
607
|
+
value: input.expose
|
|
608
|
+
})) || (Array.isArray(input.expose) && (((() => {
|
|
609
|
+
if (!Array.isArray(input.expose))
|
|
610
|
+
return true;
|
|
611
|
+
const numbers = new Set();
|
|
612
|
+
const ranges = [];
|
|
613
|
+
for (const el of input.expose) {
|
|
614
|
+
if (typeof el === "string" && /^%%(ops|global).[^%]+%%$/.test(el))
|
|
615
|
+
continue;
|
|
616
|
+
if (el && typeof el === "object" && !Array.isArray(el) && el.__spread__)
|
|
617
|
+
continue;
|
|
618
|
+
const port = typeof el === "object" ? el.port : el;
|
|
619
|
+
if (typeof port === "number") {
|
|
620
|
+
if (numbers.has(port))
|
|
621
|
+
return false;
|
|
622
|
+
numbers.add(port);
|
|
623
|
+
}
|
|
624
|
+
else if (typeof port === "string") {
|
|
625
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(port);
|
|
626
|
+
if (!match)
|
|
627
|
+
return false;
|
|
628
|
+
const start = Number(match[1]), end = Number(match[2]);
|
|
629
|
+
for (const [rStart, rEnd] of ranges) {
|
|
630
|
+
if (start <= rEnd && end >= rStart)
|
|
631
|
+
return false;
|
|
632
|
+
}
|
|
633
|
+
ranges.push([start, end]);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
for (const port of numbers) {
|
|
637
|
+
for (const [start, end] of ranges) {
|
|
638
|
+
if (port >= start && port <= end)
|
|
639
|
+
return false;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
return true;
|
|
643
|
+
})() || _report(_exceptionable, {
|
|
644
|
+
path: _path + ".expose",
|
|
645
|
+
expected: "Array<> & TagBase<__type>",
|
|
646
|
+
value: input.expose
|
|
647
|
+
})) && input.expose.map((elem, _index21) => (null !== elem || _report(_exceptionable, {
|
|
648
|
+
path: _path + ".expose[" + _index21 + "]",
|
|
649
|
+
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | number)",
|
|
650
|
+
value: elem
|
|
651
|
+
})) && (undefined !== elem || _report(_exceptionable, {
|
|
652
|
+
path: _path + ".expose[" + _index21 + "]",
|
|
653
|
+
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | number)",
|
|
654
|
+
value: elem
|
|
655
|
+
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || _report(_exceptionable, {
|
|
656
|
+
path: _path + ".expose[" + _index21 + "]",
|
|
657
|
+
expected: "string & TagBase<__type>",
|
|
658
|
+
value: elem
|
|
659
|
+
})) || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
660
|
+
path: _path + ".expose[" + _index21 + "]",
|
|
661
|
+
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | number)",
|
|
662
|
+
value: elem
|
|
663
|
+
})) && _vo11(elem, _path + ".expose[" + _index21 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
664
|
+
path: _path + ".expose[" + _index21 + "]",
|
|
665
|
+
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | number)",
|
|
666
|
+
value: elem
|
|
667
|
+
}))).every(flag => flag)) || "object" === typeof input.expose && null !== input.expose && _vo11(input.expose, _path + ".expose", true && _exceptionable) || _report(_exceptionable, {
|
|
668
|
+
path: _path + ".expose",
|
|
669
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | number | undefined)",
|
|
670
|
+
value: input.expose
|
|
671
|
+
})) || _report(_exceptionable, {
|
|
672
|
+
path: _path + ".expose",
|
|
673
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | number | undefined)",
|
|
674
|
+
value: input.expose
|
|
675
|
+
})), undefined === input.gpu || "boolean" === typeof input.gpu || _report(_exceptionable, {
|
|
676
|
+
path: _path + ".gpu",
|
|
677
|
+
expected: "(boolean | undefined)",
|
|
678
|
+
value: input.gpu
|
|
679
|
+
}), undefined === input.work_dir || "string" === typeof input.work_dir || _report(_exceptionable, {
|
|
680
|
+
path: _path + ".work_dir",
|
|
681
|
+
expected: "(string | undefined)",
|
|
682
|
+
value: input.work_dir
|
|
683
|
+
}), (null !== input.entrypoint || _report(_exceptionable, {
|
|
684
|
+
path: _path + ".entrypoint",
|
|
685
|
+
expected: "(CMDArray | string | undefined)",
|
|
686
|
+
value: input.entrypoint
|
|
687
|
+
})) && (undefined === input.entrypoint || "string" === typeof input.entrypoint || (Array.isArray(input.entrypoint) || _report(_exceptionable, {
|
|
688
|
+
path: _path + ".entrypoint",
|
|
689
|
+
expected: "(CMDArray | string | undefined)",
|
|
690
|
+
value: input.entrypoint
|
|
691
|
+
})) && input.entrypoint.map((elem, _index22) => "string" === typeof elem || _report(_exceptionable, {
|
|
692
|
+
path: _path + ".entrypoint[" + _index22 + "]",
|
|
693
|
+
expected: "string",
|
|
694
|
+
value: elem
|
|
695
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
696
|
+
path: _path + ".entrypoint",
|
|
697
|
+
expected: "(CMDArray | string | undefined)",
|
|
698
|
+
value: input.entrypoint
|
|
699
|
+
})), undefined === input.env || ("object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) || _report(_exceptionable, {
|
|
700
|
+
path: _path + ".env",
|
|
701
|
+
expected: "(Env | undefined)",
|
|
702
|
+
value: input.env
|
|
703
|
+
})) && _vo6(input.env, _path + ".env", true && _exceptionable) || _report(_exceptionable, {
|
|
704
|
+
path: _path + ".env",
|
|
705
|
+
expected: "(Env | undefined)",
|
|
706
|
+
value: input.env
|
|
707
|
+
}), undefined === input.resources || (Array.isArray(input.resources) || _report(_exceptionable, {
|
|
708
|
+
path: _path + ".resources",
|
|
709
|
+
expected: "(Resources | undefined)",
|
|
710
|
+
value: input.resources
|
|
711
|
+
})) && input.resources.map((elem, _index23) => (null !== elem || _report(_exceptionable, {
|
|
712
|
+
path: _path + ".resources[" + _index23 + "]",
|
|
713
|
+
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
714
|
+
value: elem
|
|
715
|
+
})) && (undefined !== elem || _report(_exceptionable, {
|
|
716
|
+
path: _path + ".resources[" + _index23 + "]",
|
|
717
|
+
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
718
|
+
value: elem
|
|
719
|
+
})) && ("__remove-if-empty__" === elem || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
720
|
+
path: _path + ".resources[" + _index23 + "]",
|
|
721
|
+
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
722
|
+
value: elem
|
|
723
|
+
})) && _vu0(elem, _path + ".resources[" + _index23 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
724
|
+
path: _path + ".resources[" + _index23 + "]",
|
|
725
|
+
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
726
|
+
value: elem
|
|
727
|
+
}))).every(flag => flag) || _report(_exceptionable, {
|
|
728
|
+
path: _path + ".resources",
|
|
729
|
+
expected: "(Resources | undefined)",
|
|
730
|
+
value: input.resources
|
|
731
|
+
}), undefined === input.authentication || ("object" === typeof input.authentication && null !== input.authentication && false === Array.isArray(input.authentication) || _report(_exceptionable, {
|
|
732
|
+
path: _path + ".authentication",
|
|
733
|
+
expected: "(Authentication | undefined)",
|
|
734
|
+
value: input.authentication
|
|
735
|
+
})) && _vo19(input.authentication, _path + ".authentication", true && _exceptionable) || _report(_exceptionable, {
|
|
736
|
+
path: _path + ".authentication",
|
|
737
|
+
expected: "(Authentication | undefined)",
|
|
738
|
+
value: input.authentication
|
|
739
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
740
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "resources", "authentication"].some(prop => key === prop))
|
|
741
|
+
return true;
|
|
742
|
+
const value = input[key];
|
|
743
|
+
if (undefined === value)
|
|
744
|
+
return true;
|
|
745
|
+
return _report(_exceptionable, {
|
|
746
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
747
|
+
expected: "undefined",
|
|
748
|
+
value: value,
|
|
749
|
+
description: [
|
|
750
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
751
|
+
"",
|
|
752
|
+
"Please remove the property next time."
|
|
753
|
+
].join("\n")
|
|
754
|
+
});
|
|
755
|
+
}).every(flag => flag))].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
756
|
+
path: _path + ".name",
|
|
757
|
+
expected: "string",
|
|
758
|
+
value: input.name
|
|
759
|
+
}), "string" === typeof input.dest || _report(_exceptionable, {
|
|
760
|
+
path: _path + ".dest",
|
|
761
|
+
expected: "string",
|
|
762
|
+
value: input.dest
|
|
763
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
764
|
+
if (["name", "dest"].some(prop => key === prop))
|
|
765
|
+
return true;
|
|
766
|
+
const value = input[key];
|
|
767
|
+
if (undefined === value)
|
|
768
|
+
return true;
|
|
769
|
+
return _report(_exceptionable, {
|
|
770
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
771
|
+
expected: "undefined",
|
|
772
|
+
value: value,
|
|
773
|
+
description: [
|
|
774
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
775
|
+
"",
|
|
776
|
+
"Please remove the property next time."
|
|
777
|
+
].join("\n")
|
|
778
|
+
});
|
|
779
|
+
}).every(flag => flag))].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__) || _report(_exceptionable, {
|
|
780
|
+
path: _path + ".__spread__",
|
|
781
|
+
expected: "string & TagBase<__type>",
|
|
782
|
+
value: input.__spread__
|
|
783
|
+
})) || _report(_exceptionable, {
|
|
784
|
+
path: _path + ".__spread__",
|
|
785
|
+
expected: "(string & TagBase<__type>)",
|
|
786
|
+
value: input.__spread__
|
|
787
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
788
|
+
if (["__spread__"].some(prop => key === prop))
|
|
789
|
+
return true;
|
|
790
|
+
const value = input[key];
|
|
791
|
+
if (undefined === value)
|
|
792
|
+
return true;
|
|
793
|
+
return _report(_exceptionable, {
|
|
794
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
795
|
+
expected: "undefined",
|
|
796
|
+
value: value,
|
|
797
|
+
description: [
|
|
798
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
799
|
+
"",
|
|
800
|
+
"Please remove the property next time."
|
|
801
|
+
].join("\n")
|
|
802
|
+
});
|
|
803
|
+
}).every(flag => flag))].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
804
|
+
path: _path + ".type",
|
|
805
|
+
expected: "\"S3\"",
|
|
806
|
+
value: input.type
|
|
807
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
808
|
+
path: _path + ".target",
|
|
809
|
+
expected: "string",
|
|
810
|
+
value: input.target
|
|
811
|
+
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
812
|
+
path: _path + ".url",
|
|
813
|
+
expected: "(string | undefined)",
|
|
814
|
+
value: input.url
|
|
815
|
+
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
816
|
+
path: _path + ".allowWrite",
|
|
817
|
+
expected: "(boolean | undefined)",
|
|
818
|
+
value: input.allowWrite
|
|
819
|
+
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
820
|
+
path: _path + ".files",
|
|
821
|
+
expected: "(Array<string> | undefined)",
|
|
822
|
+
value: input.files
|
|
823
|
+
})) && input.files.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
|
|
824
|
+
path: _path + ".files[" + _index24 + "]",
|
|
825
|
+
expected: "string",
|
|
826
|
+
value: elem
|
|
827
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
828
|
+
path: _path + ".files",
|
|
829
|
+
expected: "(Array<string> | undefined)",
|
|
830
|
+
value: input.files
|
|
831
|
+
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
832
|
+
path: _path + ".IAM",
|
|
833
|
+
expected: "(S3Auth | undefined)",
|
|
834
|
+
value: input.IAM
|
|
835
|
+
})) && _vo13(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
836
|
+
path: _path + ".IAM",
|
|
837
|
+
expected: "(S3Auth | undefined)",
|
|
838
|
+
value: input.IAM
|
|
839
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
840
|
+
if (["type", "target", "url", "allowWrite", "files", "IAM"].some(prop => key === prop))
|
|
841
|
+
return true;
|
|
842
|
+
const value = input[key];
|
|
843
|
+
if (undefined === value)
|
|
844
|
+
return true;
|
|
845
|
+
return _report(_exceptionable, {
|
|
846
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
847
|
+
expected: "undefined",
|
|
848
|
+
value: value,
|
|
849
|
+
description: [
|
|
850
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
851
|
+
"",
|
|
852
|
+
"Please remove the property next time."
|
|
853
|
+
].join("\n")
|
|
854
|
+
});
|
|
855
|
+
}).every(flag => flag))].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => ["string" === typeof input.REGION || _report(_exceptionable, {
|
|
856
|
+
path: _path + ".REGION",
|
|
857
|
+
expected: "string",
|
|
858
|
+
value: input.REGION
|
|
859
|
+
}), "string" === typeof input.ACCESS_KEY_ID || _report(_exceptionable, {
|
|
860
|
+
path: _path + ".ACCESS_KEY_ID",
|
|
861
|
+
expected: "string",
|
|
862
|
+
value: input.ACCESS_KEY_ID
|
|
863
|
+
}), "string" === typeof input.SECRET_ACCESS_KEY || _report(_exceptionable, {
|
|
864
|
+
path: _path + ".SECRET_ACCESS_KEY",
|
|
865
|
+
expected: "string",
|
|
866
|
+
value: input.SECRET_ACCESS_KEY
|
|
867
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
868
|
+
if (["REGION", "ACCESS_KEY_ID", "SECRET_ACCESS_KEY"].some(prop => key === prop))
|
|
869
|
+
return true;
|
|
870
|
+
const value = input[key];
|
|
871
|
+
if (undefined === value)
|
|
872
|
+
return true;
|
|
873
|
+
return _report(_exceptionable, {
|
|
874
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
875
|
+
expected: "undefined",
|
|
876
|
+
value: value,
|
|
877
|
+
description: [
|
|
878
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
879
|
+
"",
|
|
880
|
+
"Please remove the property next time."
|
|
881
|
+
].join("\n")
|
|
882
|
+
});
|
|
883
|
+
}).every(flag => flag))].every(flag => flag); const _vo14 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
884
|
+
path: _path + ".type",
|
|
885
|
+
expected: "\"S3\"",
|
|
886
|
+
value: input.type
|
|
887
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
888
|
+
path: _path + ".target",
|
|
889
|
+
expected: "string",
|
|
890
|
+
value: input.target
|
|
891
|
+
}), "string" === typeof input.bucket || _report(_exceptionable, {
|
|
892
|
+
path: _path + ".bucket",
|
|
893
|
+
expected: "string",
|
|
894
|
+
value: input.bucket
|
|
895
|
+
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
896
|
+
path: _path + ".url",
|
|
897
|
+
expected: "(string | undefined)",
|
|
898
|
+
value: input.url
|
|
899
|
+
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
900
|
+
path: _path + ".allowWrite",
|
|
901
|
+
expected: "(boolean | undefined)",
|
|
902
|
+
value: input.allowWrite
|
|
903
|
+
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
904
|
+
path: _path + ".IAM",
|
|
905
|
+
expected: "(S3Auth | undefined)",
|
|
906
|
+
value: input.IAM
|
|
907
|
+
})) && _vo13(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
908
|
+
path: _path + ".IAM",
|
|
909
|
+
expected: "(S3Auth | undefined)",
|
|
910
|
+
value: input.IAM
|
|
911
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
912
|
+
if (["type", "target", "bucket", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
913
|
+
return true;
|
|
914
|
+
const value = input[key];
|
|
915
|
+
if (undefined === value)
|
|
916
|
+
return true;
|
|
917
|
+
return _report(_exceptionable, {
|
|
918
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
919
|
+
expected: "undefined",
|
|
920
|
+
value: value,
|
|
921
|
+
description: [
|
|
922
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
923
|
+
"",
|
|
924
|
+
"Please remove the property next time."
|
|
925
|
+
].join("\n")
|
|
926
|
+
});
|
|
927
|
+
}).every(flag => flag))].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
928
|
+
path: _path + ".type",
|
|
929
|
+
expected: "\"S3\"",
|
|
930
|
+
value: input.type
|
|
931
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
932
|
+
path: _path + ".target",
|
|
933
|
+
expected: "string",
|
|
934
|
+
value: input.target
|
|
935
|
+
}), (Array.isArray(input.buckets) || _report(_exceptionable, {
|
|
936
|
+
path: _path + ".buckets",
|
|
937
|
+
expected: "Array<__type>",
|
|
938
|
+
value: input.buckets
|
|
939
|
+
})) && input.buckets.map((elem, _index25) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
940
|
+
path: _path + ".buckets[" + _index25 + "]",
|
|
941
|
+
expected: "__type.o4",
|
|
942
|
+
value: elem
|
|
943
|
+
})) && _vo16(elem, _path + ".buckets[" + _index25 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
944
|
+
path: _path + ".buckets[" + _index25 + "]",
|
|
945
|
+
expected: "__type.o4",
|
|
946
|
+
value: elem
|
|
947
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
948
|
+
path: _path + ".buckets",
|
|
949
|
+
expected: "Array<__type>",
|
|
950
|
+
value: input.buckets
|
|
951
|
+
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
952
|
+
path: _path + ".url",
|
|
953
|
+
expected: "(string | undefined)",
|
|
954
|
+
value: input.url
|
|
955
|
+
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
956
|
+
path: _path + ".allowWrite",
|
|
957
|
+
expected: "(boolean | undefined)",
|
|
958
|
+
value: input.allowWrite
|
|
959
|
+
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
960
|
+
path: _path + ".IAM",
|
|
961
|
+
expected: "(S3Auth | undefined)",
|
|
962
|
+
value: input.IAM
|
|
963
|
+
})) && _vo13(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
964
|
+
path: _path + ".IAM",
|
|
965
|
+
expected: "(S3Auth | undefined)",
|
|
966
|
+
value: input.IAM
|
|
967
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
968
|
+
if (["type", "target", "buckets", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
969
|
+
return true;
|
|
970
|
+
const value = input[key];
|
|
971
|
+
if (undefined === value)
|
|
972
|
+
return true;
|
|
973
|
+
return _report(_exceptionable, {
|
|
974
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
975
|
+
expected: "undefined",
|
|
976
|
+
value: value,
|
|
977
|
+
description: [
|
|
978
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
979
|
+
"",
|
|
980
|
+
"Please remove the property next time."
|
|
981
|
+
].join("\n")
|
|
982
|
+
});
|
|
983
|
+
}).every(flag => flag))].every(flag => flag); const _vo16 = (input, _path, _exceptionable = true) => ["string" === typeof input.url || _report(_exceptionable, {
|
|
984
|
+
path: _path + ".url",
|
|
985
|
+
expected: "string",
|
|
986
|
+
value: input.url
|
|
987
|
+
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
988
|
+
path: _path + ".files",
|
|
989
|
+
expected: "(Array<string> | undefined)",
|
|
990
|
+
value: input.files
|
|
991
|
+
})) && input.files.map((elem, _index26) => "string" === typeof elem || _report(_exceptionable, {
|
|
992
|
+
path: _path + ".files[" + _index26 + "]",
|
|
993
|
+
expected: "string",
|
|
994
|
+
value: elem
|
|
995
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
996
|
+
path: _path + ".files",
|
|
997
|
+
expected: "(Array<string> | undefined)",
|
|
998
|
+
value: input.files
|
|
999
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1000
|
+
if (["url", "files"].some(prop => key === prop))
|
|
1001
|
+
return true;
|
|
1002
|
+
const value = input[key];
|
|
1003
|
+
if (undefined === value)
|
|
1004
|
+
return true;
|
|
1005
|
+
return _report(_exceptionable, {
|
|
1006
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1007
|
+
expected: "undefined",
|
|
1008
|
+
value: value,
|
|
1009
|
+
description: [
|
|
1010
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1011
|
+
"",
|
|
1012
|
+
"Please remove the property next time."
|
|
1013
|
+
].join("\n")
|
|
1014
|
+
});
|
|
1015
|
+
}).every(flag => flag))].every(flag => flag); const _vo17 = (input, _path, _exceptionable = true) => ["HF" === input.type || _report(_exceptionable, {
|
|
1016
|
+
path: _path + ".type",
|
|
1017
|
+
expected: "\"HF\"",
|
|
1018
|
+
value: input.type
|
|
1019
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1020
|
+
path: _path + ".target",
|
|
1021
|
+
expected: "string",
|
|
1022
|
+
value: input.target
|
|
1023
|
+
}), "string" === typeof input.repo || _report(_exceptionable, {
|
|
1024
|
+
path: _path + ".repo",
|
|
1025
|
+
expected: "string",
|
|
1026
|
+
value: input.repo
|
|
1027
|
+
}), undefined === input.revision || "string" === typeof input.revision || _report(_exceptionable, {
|
|
1028
|
+
path: _path + ".revision",
|
|
1029
|
+
expected: "(string | undefined)",
|
|
1030
|
+
value: input.revision
|
|
1031
|
+
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
1032
|
+
path: _path + ".files",
|
|
1033
|
+
expected: "(Array<string> | undefined)",
|
|
1034
|
+
value: input.files
|
|
1035
|
+
})) && input.files.map((elem, _index27) => "string" === typeof elem || _report(_exceptionable, {
|
|
1036
|
+
path: _path + ".files[" + _index27 + "]",
|
|
1037
|
+
expected: "string",
|
|
1038
|
+
value: elem
|
|
1039
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1040
|
+
path: _path + ".files",
|
|
1041
|
+
expected: "(Array<string> | undefined)",
|
|
1042
|
+
value: input.files
|
|
1043
|
+
}), undefined === input.accessToken || "string" === typeof input.accessToken || _report(_exceptionable, {
|
|
1044
|
+
path: _path + ".accessToken",
|
|
1045
|
+
expected: "(string | undefined)",
|
|
1046
|
+
value: input.accessToken
|
|
1047
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1048
|
+
if (["type", "target", "repo", "revision", "files", "accessToken"].some(prop => key === prop))
|
|
1049
|
+
return true;
|
|
1050
|
+
const value = input[key];
|
|
1051
|
+
if (undefined === value)
|
|
1052
|
+
return true;
|
|
1053
|
+
return _report(_exceptionable, {
|
|
1054
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1055
|
+
expected: "undefined",
|
|
1056
|
+
value: value,
|
|
1057
|
+
description: [
|
|
1058
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1059
|
+
"",
|
|
1060
|
+
"Please remove the property next time."
|
|
1061
|
+
].join("\n")
|
|
1062
|
+
});
|
|
1063
|
+
}).every(flag => flag))].every(flag => flag); const _vo18 = (input, _path, _exceptionable = true) => ["Ollama" === input.type || _report(_exceptionable, {
|
|
1064
|
+
path: _path + ".type",
|
|
1065
|
+
expected: "\"Ollama\"",
|
|
1066
|
+
value: input.type
|
|
1067
|
+
}), "string" === typeof input.model || _report(_exceptionable, {
|
|
1068
|
+
path: _path + ".model",
|
|
1069
|
+
expected: "string",
|
|
1070
|
+
value: input.model
|
|
1071
|
+
}), undefined === input.target || "string" === typeof input.target || _report(_exceptionable, {
|
|
1072
|
+
path: _path + ".target",
|
|
1073
|
+
expected: "(string | undefined)",
|
|
1074
|
+
value: input.target
|
|
1075
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1076
|
+
if (["type", "model", "target"].some(prop => key === prop))
|
|
1077
|
+
return true;
|
|
1078
|
+
const value = input[key];
|
|
1079
|
+
if (undefined === value)
|
|
1080
|
+
return true;
|
|
1081
|
+
return _report(_exceptionable, {
|
|
1082
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1083
|
+
expected: "undefined",
|
|
1084
|
+
value: value,
|
|
1085
|
+
description: [
|
|
1086
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1087
|
+
"",
|
|
1088
|
+
"Please remove the property next time."
|
|
1089
|
+
].join("\n")
|
|
1090
|
+
});
|
|
1091
|
+
}).every(flag => flag))].every(flag => flag); const _vo19 = (input, _path, _exceptionable = true) => [undefined === input.docker || ("object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) || _report(_exceptionable, {
|
|
1092
|
+
path: _path + ".docker",
|
|
1093
|
+
expected: "(DockerAuth | undefined)",
|
|
1094
|
+
value: input.docker
|
|
1095
|
+
})) && _vo20(input.docker, _path + ".docker", true && _exceptionable) || _report(_exceptionable, {
|
|
1096
|
+
path: _path + ".docker",
|
|
1097
|
+
expected: "(DockerAuth | undefined)",
|
|
1098
|
+
value: input.docker
|
|
1099
|
+
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1100
|
+
if (["docker"].some(prop => key === prop))
|
|
1101
|
+
return true;
|
|
1102
|
+
const value = input[key];
|
|
1103
|
+
if (undefined === value)
|
|
1104
|
+
return true;
|
|
1105
|
+
return _report(_exceptionable, {
|
|
1106
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1107
|
+
expected: "undefined",
|
|
1108
|
+
value: value,
|
|
1109
|
+
description: [
|
|
1110
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1111
|
+
"",
|
|
1112
|
+
"Please remove the property next time."
|
|
1113
|
+
].join("\n")
|
|
1114
|
+
});
|
|
1115
|
+
}).every(flag => flag))].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => [undefined === input.username || "string" === typeof input.username || _report(_exceptionable, {
|
|
1116
|
+
path: _path + ".username",
|
|
1117
|
+
expected: "(string | undefined)",
|
|
1118
|
+
value: input.username
|
|
1119
|
+
}), undefined === input.password || "string" === typeof input.password || _report(_exceptionable, {
|
|
1120
|
+
path: _path + ".password",
|
|
1121
|
+
expected: "(string | undefined)",
|
|
1122
|
+
value: input.password
|
|
1123
|
+
}), undefined === input.email || "string" === typeof input.email || _report(_exceptionable, {
|
|
1124
|
+
path: _path + ".email",
|
|
1125
|
+
expected: "(string | undefined)",
|
|
1126
|
+
value: input.email
|
|
1127
|
+
}), undefined === input.server || "string" === typeof input.server || _report(_exceptionable, {
|
|
1128
|
+
path: _path + ".server",
|
|
1129
|
+
expected: "(string | undefined)",
|
|
1130
|
+
value: input.server
|
|
1131
|
+
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1132
|
+
if (["username", "password", "email", "server"].some(prop => key === prop))
|
|
1133
|
+
return true;
|
|
1134
|
+
const value = input[key];
|
|
1135
|
+
if (undefined === value)
|
|
1136
|
+
return true;
|
|
1137
|
+
return _report(_exceptionable, {
|
|
1138
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1139
|
+
expected: "undefined",
|
|
1140
|
+
value: value,
|
|
1141
|
+
description: [
|
|
1142
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1143
|
+
"",
|
|
1144
|
+
"Please remove the property next time."
|
|
1145
|
+
].join("\n")
|
|
1146
|
+
});
|
|
1147
|
+
}).every(flag => flag))].every(flag => flag); const _vo21 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
1148
|
+
path: _path + ".name",
|
|
1149
|
+
expected: "string",
|
|
1150
|
+
value: input.name
|
|
1151
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1152
|
+
if (["name"].some(prop => key === prop))
|
|
1153
|
+
return true;
|
|
1154
|
+
const value = input[key];
|
|
1155
|
+
if (undefined === value)
|
|
1156
|
+
return true;
|
|
1157
|
+
return _report(_exceptionable, {
|
|
1158
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1159
|
+
expected: "undefined",
|
|
1160
|
+
value: value,
|
|
1161
|
+
description: [
|
|
1162
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1163
|
+
"",
|
|
1164
|
+
"Please remove the property next time."
|
|
1165
|
+
].join("\n")
|
|
1166
|
+
});
|
|
1167
|
+
}).every(flag => flag))].every(flag => flag); const _vo22 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1168
|
+
const value = input[key];
|
|
1169
|
+
if (undefined === value)
|
|
1170
|
+
return true;
|
|
1171
|
+
return (null !== value || _report(_exceptionable, {
|
|
1172
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1173
|
+
expected: "(OperationResult | string)",
|
|
1174
|
+
value: value
|
|
1175
|
+
})) && (undefined !== value || _report(_exceptionable, {
|
|
1176
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1177
|
+
expected: "(OperationResult | string)",
|
|
1178
|
+
value: value
|
|
1179
|
+
})) && ("string" === typeof value || ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
1180
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1181
|
+
expected: "(OperationResult | string)",
|
|
1182
|
+
value: value
|
|
1183
|
+
})) && _vo23(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
1184
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1185
|
+
expected: "(OperationResult | string)",
|
|
1186
|
+
value: value
|
|
1187
|
+
}));
|
|
1188
|
+
}).every(flag => flag)].every(flag => flag); const _vo23 = (input, _path, _exceptionable = true) => ["string" === typeof input.regex || _report(_exceptionable, {
|
|
1189
|
+
path: _path + ".regex",
|
|
1190
|
+
expected: "string",
|
|
1191
|
+
value: input.regex
|
|
1192
|
+
}), (Array.isArray(input.logType) || _report(_exceptionable, {
|
|
1193
|
+
path: _path + ".logType",
|
|
1194
|
+
expected: "(Array<StdOption> & UniqueLogTypeTag)",
|
|
1195
|
+
value: input.logType
|
|
1196
|
+
})) && ((Array.isArray(input.logType) && input.logType.length >= 1 && input.logType.length <= 4 && (() => {
|
|
1197
|
+
const seen = new Set();
|
|
1198
|
+
for (const v of input.logType) {
|
|
1199
|
+
if (seen.has(v))
|
|
1200
|
+
return false;
|
|
1201
|
+
seen.add(v);
|
|
1202
|
+
}
|
|
1203
|
+
return true;
|
|
1204
|
+
})() || _report(_exceptionable, {
|
|
1205
|
+
path: _path + ".logType",
|
|
1206
|
+
expected: "Array<> & UniqueLogTypeTag",
|
|
1207
|
+
value: input.logType
|
|
1208
|
+
})) && input.logType.map((elem, _index28) => "stdin" === elem || "stdout" === elem || "stderr" === elem || "nodeerr" === elem || _report(_exceptionable, {
|
|
1209
|
+
path: _path + ".logType[" + _index28 + "]",
|
|
1210
|
+
expected: "(\"nodeerr\" | \"stderr\" | \"stdin\" | \"stdout\")",
|
|
1211
|
+
value: elem
|
|
1212
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1213
|
+
path: _path + ".logType",
|
|
1214
|
+
expected: "(Array<StdOption> & UniqueLogTypeTag)",
|
|
1215
|
+
value: input.logType
|
|
1216
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1217
|
+
if (["regex", "logType"].some(prop => key === prop))
|
|
1218
|
+
return true;
|
|
1219
|
+
const value = input[key];
|
|
1220
|
+
if (undefined === value)
|
|
1221
|
+
return true;
|
|
1222
|
+
return _report(_exceptionable, {
|
|
1223
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1224
|
+
expected: "undefined",
|
|
1225
|
+
value: value,
|
|
1226
|
+
description: [
|
|
1227
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1228
|
+
"",
|
|
1229
|
+
"Please remove the property next time."
|
|
1230
|
+
].join("\n")
|
|
1231
|
+
});
|
|
1232
|
+
}).every(flag => flag))].every(flag => flag); const _vo24 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1233
|
+
path: _path + ".group",
|
|
1234
|
+
expected: "(string | undefined)",
|
|
1235
|
+
value: input.group
|
|
1236
|
+
}), (null !== input.depends_on || _report(_exceptionable, {
|
|
1237
|
+
path: _path + ".depends_on",
|
|
1238
|
+
expected: "undefined",
|
|
1239
|
+
value: input.depends_on
|
|
1240
|
+
})) && (undefined === input.depends_on || _report(_exceptionable, {
|
|
1241
|
+
path: _path + ".depends_on",
|
|
1242
|
+
expected: "undefined",
|
|
1243
|
+
value: input.depends_on
|
|
1244
|
+
})), (null !== input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1245
|
+
path: _path + ".stop_if_dependent_stops",
|
|
1246
|
+
expected: "undefined",
|
|
1247
|
+
value: input.stop_if_dependent_stops
|
|
1248
|
+
})) && (undefined === input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1249
|
+
path: _path + ".stop_if_dependent_stops",
|
|
1250
|
+
expected: "undefined",
|
|
1251
|
+
value: input.stop_if_dependent_stops
|
|
1252
|
+
})), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1253
|
+
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
1254
|
+
return true;
|
|
1255
|
+
const value = input[key];
|
|
1256
|
+
if (undefined === value)
|
|
1257
|
+
return true;
|
|
1258
|
+
return _report(_exceptionable, {
|
|
1259
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1260
|
+
expected: "undefined",
|
|
1261
|
+
value: value,
|
|
1262
|
+
description: [
|
|
1263
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1264
|
+
"",
|
|
1265
|
+
"Please remove the property next time."
|
|
1266
|
+
].join("\n")
|
|
1267
|
+
});
|
|
1268
|
+
}).every(flag => flag))].every(flag => flag); const _vo25 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1269
|
+
path: _path + ".group",
|
|
1270
|
+
expected: "(string | undefined)",
|
|
1271
|
+
value: input.group
|
|
1272
|
+
}), (Array.isArray(input.depends_on) || _report(_exceptionable, {
|
|
1273
|
+
path: _path + ".depends_on",
|
|
1274
|
+
expected: "Array<string>",
|
|
1275
|
+
value: input.depends_on
|
|
1276
|
+
})) && input.depends_on.map((elem, _index29) => "string" === typeof elem || _report(_exceptionable, {
|
|
1277
|
+
path: _path + ".depends_on[" + _index29 + "]",
|
|
1278
|
+
expected: "string",
|
|
1279
|
+
value: elem
|
|
1280
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1281
|
+
path: _path + ".depends_on",
|
|
1282
|
+
expected: "Array<string>",
|
|
1283
|
+
value: input.depends_on
|
|
1284
|
+
}), undefined === input.stop_if_dependent_stops || "boolean" === typeof input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1285
|
+
path: _path + ".stop_if_dependent_stops",
|
|
1286
|
+
expected: "(boolean | undefined)",
|
|
1287
|
+
value: input.stop_if_dependent_stops
|
|
1288
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1289
|
+
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
1290
|
+
return true;
|
|
1291
|
+
const value = input[key];
|
|
1292
|
+
if (undefined === value)
|
|
1293
|
+
return true;
|
|
1294
|
+
return _report(_exceptionable, {
|
|
1295
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1296
|
+
expected: "undefined",
|
|
1297
|
+
value: value,
|
|
1298
|
+
description: [
|
|
1299
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1300
|
+
"",
|
|
1301
|
+
"Please remove the property next time."
|
|
1302
|
+
].join("\n")
|
|
1303
|
+
});
|
|
1304
|
+
}).every(flag => flag))].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1305
|
+
if (undefined !== input.__spread__)
|
|
1306
|
+
return _vo11(input, _path, true && _exceptionable);
|
|
1307
|
+
else if (undefined !== input.bucket)
|
|
1308
|
+
return _vo14(input, _path, true && _exceptionable);
|
|
1309
|
+
else if (undefined !== input.buckets)
|
|
1310
|
+
return _vo15(input, _path, true && _exceptionable);
|
|
1311
|
+
else if ("HF" === input.type)
|
|
1312
|
+
return _vo17(input, _path, true && _exceptionable);
|
|
1313
|
+
else if ("Ollama" === input.type)
|
|
1314
|
+
return _vo18(input, _path, true && _exceptionable);
|
|
1315
|
+
else
|
|
1316
|
+
return _vo12(input, _path, true && _exceptionable);
|
|
1317
|
+
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
1318
|
+
if (undefined !== input.image)
|
|
1319
|
+
return _vo9(input, _path, true && _exceptionable);
|
|
1320
|
+
else if (undefined !== input.name)
|
|
1321
|
+
return _vo21(input, _path, true && _exceptionable);
|
|
1322
|
+
else
|
|
1323
|
+
return _report(_exceptionable, {
|
|
1324
|
+
path: _path,
|
|
1325
|
+
expected: "(ContainerRun | ContainerCreateVolume)",
|
|
1326
|
+
value: input
|
|
1327
|
+
});
|
|
1328
|
+
})(); const _vu2 = (input, _path, _exceptionable = true) => (() => {
|
|
1329
|
+
if (Array.isArray(input.depends_on) && input.depends_on.map((elem, _index30) => "string" === typeof elem).every(flag => flag))
|
|
1330
|
+
return _vo25(input, _path, true && _exceptionable);
|
|
1331
|
+
else
|
|
1332
|
+
return _vo24(input, _path, true && _exceptionable);
|
|
1333
|
+
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
1334
|
+
if (false === __is(input)) {
|
|
1335
|
+
errors = [];
|
|
1336
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1337
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1338
|
+
path: _path + "",
|
|
1339
|
+
expected: "JobDefinitionWithRule",
|
|
1340
|
+
value: input
|
|
1341
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1342
|
+
path: _path + "",
|
|
1343
|
+
expected: "JobDefinitionWithRule",
|
|
1344
|
+
value: input
|
|
1345
|
+
}))(input, "$input", true);
|
|
1346
|
+
const success = 0 === errors.length;
|
|
1347
|
+
return success ? {
|
|
1348
|
+
success,
|
|
1349
|
+
data: input
|
|
1350
|
+
} : {
|
|
1351
|
+
success,
|
|
1352
|
+
errors,
|
|
1353
|
+
data: input
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
return {
|
|
1357
|
+
success: true,
|
|
1358
|
+
data: input
|
|
1359
|
+
};
|
|
1360
|
+
}); })();
|
|
1361
|
+
//# sourceMappingURL=index.js.map
|