@nosana/types 0.1.8 → 0.1.13
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/Diagnostics/index.d.ts +2 -0
- package/dist/Jobs/Diagnostics/index.js +3 -0
- package/dist/Jobs/Diagnostics/index.js.map +1 -0
- package/dist/Jobs/Diagnostics/reason.d.ts +5 -0
- package/dist/Jobs/Diagnostics/reason.js +2 -0
- package/dist/Jobs/Diagnostics/reason.js.map +1 -0
- package/dist/Jobs/Diagnostics/state.d.ts +18 -0
- package/dist/Jobs/Diagnostics/state.js +2 -0
- package/dist/Jobs/Diagnostics/state.js.map +1 -0
- package/dist/Jobs/Flows/index.d.ts +6 -0
- package/dist/Jobs/JobDefinition/args/index.d.ts +3 -0
- package/dist/Jobs/JobDefinition/args/index.js +1 -0
- package/dist/Jobs/JobDefinition/args/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/args/restart_policy.d.ts +10 -0
- package/dist/Jobs/JobDefinition/args/restart_policy.js +7 -0
- package/dist/Jobs/JobDefinition/args/restart_policy.js.map +1 -0
- package/dist/Jobs/JobDefinition/meta/index.d.ts +1 -1
- package/dist/Jobs/Logs/index.d.ts +1 -0
- package/dist/Jobs/index.d.ts +1 -0
- package/dist/Jobs/index.js +233 -155
- package/dist/Jobs/index.js.map +1 -1
- package/dist/Schemas/api.d.ts +284 -140
- package/dist/Schemas/job.js +185 -3
- package/dist/Schemas/job.js.map +1 -1
- package/package.json +1 -1
package/dist/Jobs/index.js
CHANGED
|
@@ -2,10 +2,11 @@ import * as __typia_transform__accessExpressionAsString from "typia/lib/internal
|
|
|
2
2
|
import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js";
|
|
3
3
|
import * as __typia_transform__createStandardSchema from "typia/lib/internal/_createStandardSchema.js";
|
|
4
4
|
import typia from "typia";
|
|
5
|
+
export * from "./Diagnostics/index.js";
|
|
5
6
|
export * from "./Flows/index.js";
|
|
6
7
|
export * from "./JobDefinition/index.js";
|
|
7
8
|
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) && _io4(input.meta, true && _exceptionable)) && (undefined === input.global || "object" === typeof input.global && null !== input.global && false === Array.isArray(input.global) &&
|
|
9
|
+
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) && _io4(input.meta, true && _exceptionable)) && (undefined === input.global || "object" === typeof input.global && null !== input.global && false === Array.isArray(input.global) && _io7(input.global, true && _exceptionable)) && (Array.isArray(input.ops) && (Array.isArray(input.ops) && (() => {
|
|
9
10
|
const seen = new Set();
|
|
10
11
|
for (const it of input.ops) {
|
|
11
12
|
if (typeof it?.id !== "string")
|
|
@@ -15,7 +16,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
15
16
|
seen.add(it.id);
|
|
16
17
|
}
|
|
17
18
|
return true;
|
|
18
|
-
})() && input.ops.every((elem, _index1) => "object" === typeof elem && null !== elem &&
|
|
19
|
+
})() && input.ops.every((elem, _index1) => "object" === typeof elem && null !== elem && _io10(elem, true && _exceptionable)))) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
19
20
|
if (["type", "version", "logistics", "deployment_id", "meta", "global", "ops"].some(prop => key === prop))
|
|
20
21
|
return true;
|
|
21
22
|
const value = input[key];
|
|
@@ -49,37 +50,42 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
49
50
|
const value = input[key];
|
|
50
51
|
if (undefined === value)
|
|
51
52
|
return true;
|
|
52
|
-
return null !== value && (undefined === value || "string" === typeof value || "number" === typeof value || "object" === typeof value && null !== value && false === Array.isArray(value) &&
|
|
53
|
+
return null !== value && (undefined === value || "string" === typeof value || "number" === typeof value || (Array.isArray(value) && value.every((elem, _index2) => "string" === typeof elem || "number" === typeof elem) || "object" === typeof value && null !== value && false === Array.isArray(value) && _io6(value, true && _exceptionable)));
|
|
53
54
|
}); const _io5 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
54
55
|
const value = input[key];
|
|
55
56
|
if (undefined === value)
|
|
56
57
|
return true;
|
|
57
58
|
return "string" === typeof value || "number" === typeof value;
|
|
58
|
-
}); const _io6 = (input, _exceptionable = true) =>
|
|
59
|
+
}); const _io6 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
60
|
+
const value = input[key];
|
|
61
|
+
if (undefined === value)
|
|
62
|
+
return true;
|
|
63
|
+
return null !== value && undefined !== value && ("string" === typeof value || "number" === typeof value || Array.isArray(value) && value.every((elem, _index3) => "string" === typeof elem || "number" === typeof elem));
|
|
64
|
+
}); const _io7 = (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, _index4) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io8(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) && _io9(input.variables, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
59
65
|
if (["image", "gpu", "entrypoint", "env", "work_dir", "variables"].some(prop => key === prop))
|
|
60
66
|
return true;
|
|
61
67
|
const value = input[key];
|
|
62
68
|
if (undefined === value)
|
|
63
69
|
return true;
|
|
64
70
|
return false;
|
|
65
|
-
})); const
|
|
71
|
+
})); const _io8 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
66
72
|
const value = input[key];
|
|
67
73
|
if (undefined === value)
|
|
68
74
|
return true;
|
|
69
75
|
return "string" === typeof value;
|
|
70
|
-
}); const
|
|
76
|
+
}); const _io9 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
71
77
|
const value = input[key];
|
|
72
78
|
if (undefined === value)
|
|
73
79
|
return true;
|
|
74
80
|
return "string" === typeof value;
|
|
75
|
-
}); const
|
|
81
|
+
}); const _io10 = (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) && _io29(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
82
|
if (["type", "id", "args", "results", "execution"].some(prop => key === prop))
|
|
77
83
|
return true;
|
|
78
84
|
const value = input[key];
|
|
79
85
|
if (undefined === value)
|
|
80
86
|
return true;
|
|
81
87
|
return false;
|
|
82
|
-
})); const
|
|
88
|
+
})); const _io11 = (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, _index5) => "string" === typeof elem))) && (null !== input.cmd && (undefined === input.cmd || "string" === typeof input.cmd || Array.isArray(input.cmd) && input.cmd.every((elem, _index6) => "string" === typeof elem))) && (undefined === input.volumes || Array.isArray(input.volumes) && input.volumes.every((elem, _index7) => "object" === typeof elem && null !== elem && _io12(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) && ((() => {
|
|
83
89
|
if (!Array.isArray(input.expose))
|
|
84
90
|
return true;
|
|
85
91
|
const numbers = new Set();
|
|
@@ -114,129 +120,136 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
114
120
|
}
|
|
115
121
|
}
|
|
116
122
|
return true;
|
|
117
|
-
})() && input.expose.every((elem,
|
|
118
|
-
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "private", "resources", "authentication"].some(prop => key === prop))
|
|
123
|
+
})() && input.expose.every((elem, _index8) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem)) || "object" === typeof elem && null !== elem && _iu1(elem, true && _exceptionable)))) || "object" === typeof input.expose && null !== input.expose && _iu1(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, _index9) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io8(input.env, true && _exceptionable)) && (null !== input.restart_policy && (undefined === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || "on-failure" === input.restart_policy || "object" === typeof input.restart_policy && null !== input.restart_policy && _io18(input.restart_policy, true && _exceptionable))) && (undefined === input["private"] || "boolean" === typeof input["private"]) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every((elem, _index10) => null !== elem && undefined !== elem && ("__remove-if-empty__" === elem || "object" === typeof elem && null !== elem && _iu2(elem, true && _exceptionable)))) && (undefined === input.authentication || "object" === typeof input.authentication && null !== input.authentication && false === Array.isArray(input.authentication) && _io26(input.authentication, true && _exceptionable)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
124
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "restart_policy", "private", "resources", "authentication"].some(prop => key === prop))
|
|
119
125
|
return true;
|
|
120
126
|
const value = input[key];
|
|
121
127
|
if (undefined === value)
|
|
122
128
|
return true;
|
|
123
129
|
return false;
|
|
124
|
-
})); const
|
|
130
|
+
})); const _io12 = (input, _exceptionable = true) => "string" === typeof input.name && "string" === typeof input.dest && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
125
131
|
if (["name", "dest"].some(prop => key === prop))
|
|
126
132
|
return true;
|
|
127
133
|
const value = input[key];
|
|
128
134
|
if (undefined === value)
|
|
129
135
|
return true;
|
|
130
136
|
return false;
|
|
131
|
-
})); const
|
|
137
|
+
})); const _io13 = (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
138
|
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
133
139
|
return true;
|
|
134
140
|
const value = input[key];
|
|
135
141
|
if (undefined === value)
|
|
136
142
|
return true;
|
|
137
143
|
return false;
|
|
138
|
-
})); const
|
|
144
|
+
})); const _io14 = (input, _exceptionable = true) => "number" === typeof input.port && (undefined === input.type || "api" === input.type || "web" === input.type || "websocket" === input.type || "webapi" === input.type || "none" === input.type) && (undefined === input.health_checks || Array.isArray(input.health_checks) && input.health_checks.every((elem, _index11) => "object" === typeof elem && null !== elem && _iu0(elem, true && _exceptionable))) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
139
145
|
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
140
146
|
return true;
|
|
141
147
|
const value = input[key];
|
|
142
148
|
if (undefined === value)
|
|
143
149
|
return true;
|
|
144
150
|
return false;
|
|
145
|
-
})); const
|
|
151
|
+
})); const _io15 = (input, _exceptionable = true) => "http" === input.type && "string" === typeof input.path && ("GET" === input.method || "POST" === input.method || "PUT" === input.method || "DELETE" === input.method) && "number" === typeof input.expected_status && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io16(input.headers, true && _exceptionable)) && true && "boolean" === typeof input.continuous && (5 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
146
152
|
if (["type", "path", "method", "expected_status", "headers", "body", "continuous"].some(prop => key === prop))
|
|
147
153
|
return true;
|
|
148
154
|
const value = input[key];
|
|
149
155
|
if (undefined === value)
|
|
150
156
|
return true;
|
|
151
157
|
return false;
|
|
152
|
-
})); const
|
|
158
|
+
})); const _io16 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
153
159
|
const value = input[key];
|
|
154
160
|
if (undefined === value)
|
|
155
161
|
return true;
|
|
156
162
|
return "string" === typeof value;
|
|
157
|
-
}); const
|
|
163
|
+
}); const _io17 = (input, _exceptionable = true) => "websocket" === input.type && "string" === typeof input.expected_response && "boolean" === typeof input.continuous && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
158
164
|
if (["type", "expected_response", "continuous"].some(prop => key === prop))
|
|
159
165
|
return true;
|
|
160
166
|
const value = input[key];
|
|
161
167
|
if (undefined === value)
|
|
162
168
|
return true;
|
|
163
169
|
return false;
|
|
164
|
-
})); const
|
|
170
|
+
})); const _io18 = (input, _exceptionable = true) => "on-failure" === input.policy && (undefined === input.restart_tries || "number" === typeof input.restart_tries) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
171
|
+
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
172
|
+
return true;
|
|
173
|
+
const value = input[key];
|
|
174
|
+
if (undefined === value)
|
|
175
|
+
return true;
|
|
176
|
+
return false;
|
|
177
|
+
})); const _io19 = (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, _index12) => "string" === typeof elem)) && (undefined === input.IAM || "object" === typeof input.IAM && null !== input.IAM && _io20(input.IAM, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
165
178
|
if (["type", "target", "url", "allowWrite", "files", "IAM"].some(prop => key === prop))
|
|
166
179
|
return true;
|
|
167
180
|
const value = input[key];
|
|
168
181
|
if (undefined === value)
|
|
169
182
|
return true;
|
|
170
183
|
return false;
|
|
171
|
-
})); const
|
|
184
|
+
})); const _io20 = (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 => {
|
|
172
185
|
if (["REGION", "ACCESS_KEY_ID", "SECRET_ACCESS_KEY"].some(prop => key === prop))
|
|
173
186
|
return true;
|
|
174
187
|
const value = input[key];
|
|
175
188
|
if (undefined === value)
|
|
176
189
|
return true;
|
|
177
190
|
return false;
|
|
178
|
-
})); const
|
|
191
|
+
})); const _io21 = (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 && _io20(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
179
192
|
if (["type", "target", "bucket", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
180
193
|
return true;
|
|
181
194
|
const value = input[key];
|
|
182
195
|
if (undefined === value)
|
|
183
196
|
return true;
|
|
184
197
|
return false;
|
|
185
|
-
})); const
|
|
198
|
+
})); const _io22 = (input, _exceptionable = true) => "S3" === input.type && "string" === typeof input.target && (Array.isArray(input.buckets) && input.buckets.every((elem, _index13) => "object" === typeof elem && null !== elem && _io23(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 && _io20(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
186
199
|
if (["type", "target", "buckets", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
187
200
|
return true;
|
|
188
201
|
const value = input[key];
|
|
189
202
|
if (undefined === value)
|
|
190
203
|
return true;
|
|
191
204
|
return false;
|
|
192
|
-
})); const
|
|
205
|
+
})); const _io23 = (input, _exceptionable = true) => "string" === typeof input.url && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index14) => "string" === typeof elem)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
193
206
|
if (["url", "files"].some(prop => key === prop))
|
|
194
207
|
return true;
|
|
195
208
|
const value = input[key];
|
|
196
209
|
if (undefined === value)
|
|
197
210
|
return true;
|
|
198
211
|
return false;
|
|
199
|
-
})); const
|
|
212
|
+
})); const _io24 = (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, _index15) => "string" === typeof elem)) && (undefined === input.accessToken || "string" === typeof input.accessToken) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
200
213
|
if (["type", "target", "repo", "revision", "files", "accessToken"].some(prop => key === prop))
|
|
201
214
|
return true;
|
|
202
215
|
const value = input[key];
|
|
203
216
|
if (undefined === value)
|
|
204
217
|
return true;
|
|
205
218
|
return false;
|
|
206
|
-
})); const
|
|
219
|
+
})); const _io25 = (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 => {
|
|
207
220
|
if (["type", "model", "target"].some(prop => key === prop))
|
|
208
221
|
return true;
|
|
209
222
|
const value = input[key];
|
|
210
223
|
if (undefined === value)
|
|
211
224
|
return true;
|
|
212
225
|
return false;
|
|
213
|
-
})); const
|
|
226
|
+
})); const _io26 = (input, _exceptionable = true) => (undefined === input.docker || "object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) && _io27(input.docker, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
214
227
|
if (["docker"].some(prop => key === prop))
|
|
215
228
|
return true;
|
|
216
229
|
const value = input[key];
|
|
217
230
|
if (undefined === value)
|
|
218
231
|
return true;
|
|
219
232
|
return false;
|
|
220
|
-
})); const
|
|
233
|
+
})); const _io27 = (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 => {
|
|
221
234
|
if (["username", "password", "email", "server"].some(prop => key === prop))
|
|
222
235
|
return true;
|
|
223
236
|
const value = input[key];
|
|
224
237
|
if (undefined === value)
|
|
225
238
|
return true;
|
|
226
239
|
return false;
|
|
227
|
-
})); const
|
|
240
|
+
})); const _io28 = (input, _exceptionable = true) => "string" === typeof input.name && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
228
241
|
if (["name"].some(prop => key === prop))
|
|
229
242
|
return true;
|
|
230
243
|
const value = input[key];
|
|
231
244
|
if (undefined === value)
|
|
232
245
|
return true;
|
|
233
246
|
return false;
|
|
234
|
-
})); const
|
|
247
|
+
})); const _io29 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
235
248
|
const value = input[key];
|
|
236
249
|
if (undefined === value)
|
|
237
250
|
return true;
|
|
238
|
-
return null !== value && undefined !== value && ("string" === typeof value || "object" === typeof value && null !== value &&
|
|
239
|
-
}); const
|
|
251
|
+
return null !== value && undefined !== value && ("string" === typeof value || "object" === typeof value && null !== value && _io30(value, true && _exceptionable));
|
|
252
|
+
}); const _io30 = (input, _exceptionable = true) => "string" === typeof input.regex && (Array.isArray(input.logType) && (Array.isArray(input.logType) && input.logType.length >= 1 && input.logType.length <= 4 && (() => {
|
|
240
253
|
const seen = new Set();
|
|
241
254
|
for (const v of input.logType) {
|
|
242
255
|
if (seen.has(v))
|
|
@@ -244,21 +257,21 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
244
257
|
seen.add(v);
|
|
245
258
|
}
|
|
246
259
|
return true;
|
|
247
|
-
})() && input.logType.every((elem,
|
|
260
|
+
})() && input.logType.every((elem, _index16) => "stdin" === elem || "stdout" === elem || "stderr" === elem || "nodeerr" === elem))) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
248
261
|
if (["regex", "logType"].some(prop => key === prop))
|
|
249
262
|
return true;
|
|
250
263
|
const value = input[key];
|
|
251
264
|
if (undefined === value)
|
|
252
265
|
return true;
|
|
253
266
|
return false;
|
|
254
|
-
})); const
|
|
267
|
+
})); const _io31 = (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 => {
|
|
255
268
|
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
256
269
|
return true;
|
|
257
270
|
const value = input[key];
|
|
258
271
|
if (undefined === value)
|
|
259
272
|
return true;
|
|
260
273
|
return false;
|
|
261
|
-
})); const
|
|
274
|
+
})); const _io32 = (input, _exceptionable = true) => (undefined === input.group || "string" === typeof input.group) && (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index17) => "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 => {
|
|
262
275
|
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
263
276
|
return true;
|
|
264
277
|
const value = input[key];
|
|
@@ -267,43 +280,43 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
267
280
|
return false;
|
|
268
281
|
})); const _iu0 = (input, _exceptionable = true) => (() => {
|
|
269
282
|
if ("http" === input.type)
|
|
270
|
-
return
|
|
283
|
+
return _io15(input, true && _exceptionable);
|
|
271
284
|
else if ("websocket" === input.type)
|
|
272
|
-
return
|
|
285
|
+
return _io17(input, true && _exceptionable);
|
|
273
286
|
else
|
|
274
287
|
return false;
|
|
275
288
|
})(); const _iu1 = (input, _exceptionable = true) => (() => {
|
|
276
289
|
if (undefined !== input.__spread__)
|
|
277
|
-
return _io12(input, true && _exceptionable);
|
|
278
|
-
else if (undefined !== input.port)
|
|
279
290
|
return _io13(input, true && _exceptionable);
|
|
291
|
+
else if (undefined !== input.port)
|
|
292
|
+
return _io14(input, true && _exceptionable);
|
|
280
293
|
else
|
|
281
294
|
return false;
|
|
282
295
|
})(); const _iu2 = (input, _exceptionable = true) => (() => {
|
|
283
296
|
if (undefined !== input.__spread__)
|
|
284
|
-
return
|
|
297
|
+
return _io13(input, true && _exceptionable);
|
|
285
298
|
else if (undefined !== input.bucket)
|
|
286
|
-
return
|
|
299
|
+
return _io21(input, true && _exceptionable);
|
|
287
300
|
else if (undefined !== input.buckets)
|
|
288
|
-
return _io20(input, true && _exceptionable);
|
|
289
|
-
else if ("HF" === input.type)
|
|
290
301
|
return _io22(input, true && _exceptionable);
|
|
302
|
+
else if ("HF" === input.type)
|
|
303
|
+
return _io24(input, true && _exceptionable);
|
|
291
304
|
else if ("Ollama" === input.type)
|
|
292
|
-
return
|
|
305
|
+
return _io25(input, true && _exceptionable);
|
|
293
306
|
else
|
|
294
|
-
return
|
|
307
|
+
return _io19(input, true && _exceptionable);
|
|
295
308
|
})(); const _iu3 = (input, _exceptionable = true) => (() => {
|
|
296
309
|
if (undefined !== input.image)
|
|
297
|
-
return
|
|
310
|
+
return _io11(input, true && _exceptionable);
|
|
298
311
|
else if (undefined !== input.name)
|
|
299
|
-
return
|
|
312
|
+
return _io28(input, true && _exceptionable);
|
|
300
313
|
else
|
|
301
314
|
return false;
|
|
302
315
|
})(); const _iu4 = (input, _exceptionable = true) => (() => {
|
|
303
|
-
if (Array.isArray(input.depends_on) && input.depends_on.every((elem,
|
|
304
|
-
return
|
|
316
|
+
if (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index18) => "string" === typeof elem))
|
|
317
|
+
return _io32(input, true && _exceptionable);
|
|
305
318
|
else
|
|
306
|
-
return
|
|
319
|
+
return _io31(input, true && _exceptionable);
|
|
307
320
|
})(); const _vo0 = (input, _path, _exceptionable = true) => ["container" === input.type || _report(_exceptionable, {
|
|
308
321
|
path: _path + ".type",
|
|
309
322
|
expected: "\"container\"",
|
|
@@ -336,7 +349,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
336
349
|
path: _path + ".global",
|
|
337
350
|
expected: "(Global | undefined)",
|
|
338
351
|
value: input.global
|
|
339
|
-
})) &&
|
|
352
|
+
})) && _vo7(input.global, _path + ".global", true && _exceptionable) || _report(_exceptionable, {
|
|
340
353
|
path: _path + ".global",
|
|
341
354
|
expected: "(Global | undefined)",
|
|
342
355
|
value: input.global
|
|
@@ -358,12 +371,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
358
371
|
path: _path + ".ops",
|
|
359
372
|
expected: "Array<> & UniqueById",
|
|
360
373
|
value: input.ops
|
|
361
|
-
})) && input.ops.map((elem,
|
|
362
|
-
path: _path + ".ops[" +
|
|
374
|
+
})) && input.ops.map((elem, _index19) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
375
|
+
path: _path + ".ops[" + _index19 + "]",
|
|
363
376
|
expected: "Operation<keyof OperationArgsMap>",
|
|
364
377
|
value: elem
|
|
365
|
-
})) &&
|
|
366
|
-
path: _path + ".ops[" +
|
|
378
|
+
})) && _vo10(elem, _path + ".ops[" + _index19 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
379
|
+
path: _path + ".ops[" + _index19 + "]",
|
|
367
380
|
expected: "Operation<keyof OperationArgsMap>",
|
|
368
381
|
value: elem
|
|
369
382
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -486,15 +499,19 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
486
499
|
return true;
|
|
487
500
|
return (null !== value || _report(_exceptionable, {
|
|
488
501
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
489
|
-
expected: "(Record<string, string | number> | number | string | undefined)",
|
|
502
|
+
expected: "(Array<string | number> | Record<string, string | number | (string | number)[]> | number | string | undefined)",
|
|
490
503
|
value: value
|
|
491
|
-
})) && (undefined === value || "string" === typeof value || "number" === typeof value || ("
|
|
504
|
+
})) && (undefined === value || "string" === typeof value || "number" === typeof value || (Array.isArray(value) && value.map((elem, _index20) => "string" === typeof elem || "number" === typeof elem || _report(_exceptionable, {
|
|
505
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key) + "[" + _index20 + "]",
|
|
506
|
+
expected: "(number | string)",
|
|
507
|
+
value: elem
|
|
508
|
+
})).every(flag => flag) || "object" === typeof value && null !== value && false === Array.isArray(value) && _vo6(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
492
509
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
493
|
-
expected: "(Record<string, string | number> | number | string | undefined)",
|
|
510
|
+
expected: "(Array<string | number> | Record<string, string | number | (string | number)[]> | number | string | undefined)",
|
|
494
511
|
value: value
|
|
495
|
-
}))
|
|
512
|
+
})) || _report(_exceptionable, {
|
|
496
513
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
497
|
-
expected: "(Record<string, string | number> | number | string | undefined)",
|
|
514
|
+
expected: "(Array<string | number> | Record<string, string | number | (string | number)[]> | number | string | undefined)",
|
|
498
515
|
value: value
|
|
499
516
|
}));
|
|
500
517
|
}).every(flag => flag)].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
@@ -506,7 +523,32 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
506
523
|
expected: "(number | string)",
|
|
507
524
|
value: value
|
|
508
525
|
});
|
|
509
|
-
}).every(flag => flag)].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [
|
|
526
|
+
}).every(flag => flag)].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
527
|
+
const value = input[key];
|
|
528
|
+
if (undefined === value)
|
|
529
|
+
return true;
|
|
530
|
+
return (null !== value || _report(_exceptionable, {
|
|
531
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
532
|
+
expected: "(Array<string | number> | number | string)",
|
|
533
|
+
value: value
|
|
534
|
+
})) && (undefined !== value || _report(_exceptionable, {
|
|
535
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
536
|
+
expected: "(Array<string | number> | number | string)",
|
|
537
|
+
value: value
|
|
538
|
+
})) && ("string" === typeof value || "number" === typeof value || (Array.isArray(value) || _report(_exceptionable, {
|
|
539
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
540
|
+
expected: "(Array<string | number> | number | string)",
|
|
541
|
+
value: value
|
|
542
|
+
})) && value.map((elem, _index21) => "string" === typeof elem || "number" === typeof elem || _report(_exceptionable, {
|
|
543
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key) + "[" + _index21 + "]",
|
|
544
|
+
expected: "(number | string)",
|
|
545
|
+
value: elem
|
|
546
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
547
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
548
|
+
expected: "(Array<string | number> | number | string)",
|
|
549
|
+
value: value
|
|
550
|
+
}));
|
|
551
|
+
}).every(flag => flag)].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [undefined === input.image || "string" === typeof input.image || _report(_exceptionable, {
|
|
510
552
|
path: _path + ".image",
|
|
511
553
|
expected: "(string | undefined)",
|
|
512
554
|
value: input.image
|
|
@@ -522,8 +564,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
522
564
|
path: _path + ".entrypoint",
|
|
523
565
|
expected: "(CMDArray | string | undefined)",
|
|
524
566
|
value: input.entrypoint
|
|
525
|
-
})) && input.entrypoint.map((elem,
|
|
526
|
-
path: _path + ".entrypoint[" +
|
|
567
|
+
})) && input.entrypoint.map((elem, _index22) => "string" === typeof elem || _report(_exceptionable, {
|
|
568
|
+
path: _path + ".entrypoint[" + _index22 + "]",
|
|
527
569
|
expected: "string",
|
|
528
570
|
value: elem
|
|
529
571
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -534,7 +576,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
534
576
|
path: _path + ".env",
|
|
535
577
|
expected: "(Env | undefined)",
|
|
536
578
|
value: input.env
|
|
537
|
-
})) &&
|
|
579
|
+
})) && _vo8(input.env, _path + ".env", true && _exceptionable) || _report(_exceptionable, {
|
|
538
580
|
path: _path + ".env",
|
|
539
581
|
expected: "(Env | undefined)",
|
|
540
582
|
value: input.env
|
|
@@ -546,7 +588,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
546
588
|
path: _path + ".variables",
|
|
547
589
|
expected: "(Variables | undefined)",
|
|
548
590
|
value: input.variables
|
|
549
|
-
})) &&
|
|
591
|
+
})) && _vo9(input.variables, _path + ".variables", true && _exceptionable) || _report(_exceptionable, {
|
|
550
592
|
path: _path + ".variables",
|
|
551
593
|
expected: "(Variables | undefined)",
|
|
552
594
|
value: input.variables
|
|
@@ -566,7 +608,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
566
608
|
"Please remove the property next time."
|
|
567
609
|
].join("\n")
|
|
568
610
|
});
|
|
569
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
611
|
+
}).every(flag => flag))].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
570
612
|
const value = input[key];
|
|
571
613
|
if (undefined === value)
|
|
572
614
|
return true;
|
|
@@ -575,7 +617,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
575
617
|
expected: "string",
|
|
576
618
|
value: value
|
|
577
619
|
});
|
|
578
|
-
}).every(flag => flag)].every(flag => flag); const
|
|
620
|
+
}).every(flag => flag)].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
579
621
|
const value = input[key];
|
|
580
622
|
if (undefined === value)
|
|
581
623
|
return true;
|
|
@@ -584,7 +626,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
584
626
|
expected: "string",
|
|
585
627
|
value: value
|
|
586
628
|
});
|
|
587
|
-
}).every(flag => flag)].every(flag => flag); const
|
|
629
|
+
}).every(flag => flag)].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["container/run" === input.type || "container/create-volume" === input.type || _report(_exceptionable, {
|
|
588
630
|
path: _path + ".type",
|
|
589
631
|
expected: "(\"container/create-volume\" | \"container/run\")",
|
|
590
632
|
value: input.type
|
|
@@ -608,7 +650,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
608
650
|
path: _path + ".results",
|
|
609
651
|
expected: "(OperationResults | undefined)",
|
|
610
652
|
value: input.results
|
|
611
|
-
})) &&
|
|
653
|
+
})) && _vo29(input.results, _path + ".results", true && _exceptionable) || _report(_exceptionable, {
|
|
612
654
|
path: _path + ".results",
|
|
613
655
|
expected: "(OperationResults | undefined)",
|
|
614
656
|
value: input.results
|
|
@@ -636,7 +678,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
636
678
|
"Please remove the property next time."
|
|
637
679
|
].join("\n")
|
|
638
680
|
});
|
|
639
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
681
|
+
}).every(flag => flag))].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.image || _report(_exceptionable, {
|
|
640
682
|
path: _path + ".image",
|
|
641
683
|
expected: "string",
|
|
642
684
|
value: input.image
|
|
@@ -648,8 +690,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
648
690
|
path: _path + ".aliases",
|
|
649
691
|
expected: "(Aliases | string | undefined)",
|
|
650
692
|
value: input.aliases
|
|
651
|
-
})) && input.aliases.map((elem,
|
|
652
|
-
path: _path + ".aliases[" +
|
|
693
|
+
})) && input.aliases.map((elem, _index23) => "string" === typeof elem || _report(_exceptionable, {
|
|
694
|
+
path: _path + ".aliases[" + _index23 + "]",
|
|
653
695
|
expected: "string",
|
|
654
696
|
value: elem
|
|
655
697
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -664,8 +706,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
664
706
|
path: _path + ".cmd",
|
|
665
707
|
expected: "(CMDArray | string | undefined)",
|
|
666
708
|
value: input.cmd
|
|
667
|
-
})) && input.cmd.map((elem,
|
|
668
|
-
path: _path + ".cmd[" +
|
|
709
|
+
})) && input.cmd.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
|
|
710
|
+
path: _path + ".cmd[" + _index24 + "]",
|
|
669
711
|
expected: "string",
|
|
670
712
|
value: elem
|
|
671
713
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -676,12 +718,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
676
718
|
path: _path + ".volumes",
|
|
677
719
|
expected: "(Array<Volume> | undefined)",
|
|
678
720
|
value: input.volumes
|
|
679
|
-
})) && input.volumes.map((elem,
|
|
680
|
-
path: _path + ".volumes[" +
|
|
721
|
+
})) && input.volumes.map((elem, _index25) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
722
|
+
path: _path + ".volumes[" + _index25 + "]",
|
|
681
723
|
expected: "Volume",
|
|
682
724
|
value: elem
|
|
683
|
-
})) &&
|
|
684
|
-
path: _path + ".volumes[" +
|
|
725
|
+
})) && _vo12(elem, _path + ".volumes[" + _index25 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
726
|
+
path: _path + ".volumes[" + _index25 + "]",
|
|
685
727
|
expected: "Volume",
|
|
686
728
|
value: elem
|
|
687
729
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -735,24 +777,24 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
735
777
|
path: _path + ".expose",
|
|
736
778
|
expected: "Array<> & TagBase<__type>",
|
|
737
779
|
value: input.expose
|
|
738
|
-
})) && input.expose.map((elem,
|
|
739
|
-
path: _path + ".expose[" +
|
|
780
|
+
})) && input.expose.map((elem, _index26) => (null !== elem || _report(_exceptionable, {
|
|
781
|
+
path: _path + ".expose[" + _index26 + "]",
|
|
740
782
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
741
783
|
value: elem
|
|
742
784
|
})) && (undefined !== elem || _report(_exceptionable, {
|
|
743
|
-
path: _path + ".expose[" +
|
|
785
|
+
path: _path + ".expose[" + _index26 + "]",
|
|
744
786
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
745
787
|
value: elem
|
|
746
788
|
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || _report(_exceptionable, {
|
|
747
|
-
path: _path + ".expose[" +
|
|
789
|
+
path: _path + ".expose[" + _index26 + "]",
|
|
748
790
|
expected: "string & TagBase<__type>",
|
|
749
791
|
value: elem
|
|
750
792
|
})) || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
751
|
-
path: _path + ".expose[" +
|
|
793
|
+
path: _path + ".expose[" + _index26 + "]",
|
|
752
794
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
753
795
|
value: elem
|
|
754
|
-
})) && _vu1(elem, _path + ".expose[" +
|
|
755
|
-
path: _path + ".expose[" +
|
|
796
|
+
})) && _vu1(elem, _path + ".expose[" + _index26 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
797
|
+
path: _path + ".expose[" + _index26 + "]",
|
|
756
798
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
757
799
|
value: elem
|
|
758
800
|
}))).every(flag => flag)) || "object" === typeof input.expose && null !== input.expose && _vu1(input.expose, _path + ".expose", true && _exceptionable) || _report(_exceptionable, {
|
|
@@ -779,8 +821,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
779
821
|
path: _path + ".entrypoint",
|
|
780
822
|
expected: "(CMDArray | string | undefined)",
|
|
781
823
|
value: input.entrypoint
|
|
782
|
-
})) && input.entrypoint.map((elem,
|
|
783
|
-
path: _path + ".entrypoint[" +
|
|
824
|
+
})) && input.entrypoint.map((elem, _index27) => "string" === typeof elem || _report(_exceptionable, {
|
|
825
|
+
path: _path + ".entrypoint[" + _index27 + "]",
|
|
784
826
|
expected: "string",
|
|
785
827
|
value: elem
|
|
786
828
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -791,11 +833,23 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
791
833
|
path: _path + ".env",
|
|
792
834
|
expected: "(Env | undefined)",
|
|
793
835
|
value: input.env
|
|
794
|
-
})) &&
|
|
836
|
+
})) && _vo8(input.env, _path + ".env", true && _exceptionable) || _report(_exceptionable, {
|
|
795
837
|
path: _path + ".env",
|
|
796
838
|
expected: "(Env | undefined)",
|
|
797
839
|
value: input.env
|
|
798
|
-
}),
|
|
840
|
+
}), (null !== input.restart_policy || _report(_exceptionable, {
|
|
841
|
+
path: _path + ".restart_policy",
|
|
842
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
|
|
843
|
+
value: input.restart_policy
|
|
844
|
+
})) && (undefined === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || "on-failure" === input.restart_policy || ("object" === typeof input.restart_policy && null !== input.restart_policy || _report(_exceptionable, {
|
|
845
|
+
path: _path + ".restart_policy",
|
|
846
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
|
|
847
|
+
value: input.restart_policy
|
|
848
|
+
})) && _vo18(input.restart_policy, _path + ".restart_policy", true && _exceptionable) || _report(_exceptionable, {
|
|
849
|
+
path: _path + ".restart_policy",
|
|
850
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
|
|
851
|
+
value: input.restart_policy
|
|
852
|
+
})), undefined === input["private"] || "boolean" === typeof input["private"] || _report(_exceptionable, {
|
|
799
853
|
path: _path + "[\"private\"]",
|
|
800
854
|
expected: "(boolean | undefined)",
|
|
801
855
|
value: input["private"]
|
|
@@ -803,20 +857,20 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
803
857
|
path: _path + ".resources",
|
|
804
858
|
expected: "(Resources | undefined)",
|
|
805
859
|
value: input.resources
|
|
806
|
-
})) && input.resources.map((elem,
|
|
807
|
-
path: _path + ".resources[" +
|
|
860
|
+
})) && input.resources.map((elem, _index28) => (null !== elem || _report(_exceptionable, {
|
|
861
|
+
path: _path + ".resources[" + _index28 + "]",
|
|
808
862
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
809
863
|
value: elem
|
|
810
864
|
})) && (undefined !== elem || _report(_exceptionable, {
|
|
811
|
-
path: _path + ".resources[" +
|
|
865
|
+
path: _path + ".resources[" + _index28 + "]",
|
|
812
866
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
813
867
|
value: elem
|
|
814
868
|
})) && ("__remove-if-empty__" === elem || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
815
|
-
path: _path + ".resources[" +
|
|
869
|
+
path: _path + ".resources[" + _index28 + "]",
|
|
816
870
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
817
871
|
value: elem
|
|
818
|
-
})) && _vu2(elem, _path + ".resources[" +
|
|
819
|
-
path: _path + ".resources[" +
|
|
872
|
+
})) && _vu2(elem, _path + ".resources[" + _index28 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
873
|
+
path: _path + ".resources[" + _index28 + "]",
|
|
820
874
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
821
875
|
value: elem
|
|
822
876
|
}))).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -827,12 +881,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
827
881
|
path: _path + ".authentication",
|
|
828
882
|
expected: "(Authentication | undefined)",
|
|
829
883
|
value: input.authentication
|
|
830
|
-
})) &&
|
|
884
|
+
})) && _vo26(input.authentication, _path + ".authentication", true && _exceptionable) || _report(_exceptionable, {
|
|
831
885
|
path: _path + ".authentication",
|
|
832
886
|
expected: "(Authentication | undefined)",
|
|
833
887
|
value: input.authentication
|
|
834
888
|
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
835
|
-
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "private", "resources", "authentication"].some(prop => key === prop))
|
|
889
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "restart_policy", "private", "resources", "authentication"].some(prop => key === prop))
|
|
836
890
|
return true;
|
|
837
891
|
const value = input[key];
|
|
838
892
|
if (undefined === value)
|
|
@@ -847,7 +901,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
847
901
|
"Please remove the property next time."
|
|
848
902
|
].join("\n")
|
|
849
903
|
});
|
|
850
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
904
|
+
}).every(flag => flag))].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
851
905
|
path: _path + ".name",
|
|
852
906
|
expected: "string",
|
|
853
907
|
value: input.name
|
|
@@ -871,7 +925,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
871
925
|
"Please remove the property next time."
|
|
872
926
|
].join("\n")
|
|
873
927
|
});
|
|
874
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
928
|
+
}).every(flag => flag))].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => ["string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__) || _report(_exceptionable, {
|
|
875
929
|
path: _path + ".__spread__",
|
|
876
930
|
expected: "string & TagBase<__type>",
|
|
877
931
|
value: input.__spread__
|
|
@@ -899,7 +953,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
899
953
|
"Please remove the property next time."
|
|
900
954
|
].join("\n")
|
|
901
955
|
});
|
|
902
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
956
|
+
}).every(flag => flag))].every(flag => flag); const _vo14 = (input, _path, _exceptionable = true) => ["number" === typeof input.port || _report(_exceptionable, {
|
|
903
957
|
path: _path + ".port",
|
|
904
958
|
expected: "number",
|
|
905
959
|
value: input.port
|
|
@@ -911,12 +965,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
911
965
|
path: _path + ".health_checks",
|
|
912
966
|
expected: "(Array<HealthCheck> | undefined)",
|
|
913
967
|
value: input.health_checks
|
|
914
|
-
})) && input.health_checks.map((elem,
|
|
915
|
-
path: _path + ".health_checks[" +
|
|
968
|
+
})) && input.health_checks.map((elem, _index29) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
969
|
+
path: _path + ".health_checks[" + _index29 + "]",
|
|
916
970
|
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
917
971
|
value: elem
|
|
918
|
-
})) && _vu0(elem, _path + ".health_checks[" +
|
|
919
|
-
path: _path + ".health_checks[" +
|
|
972
|
+
})) && _vu0(elem, _path + ".health_checks[" + _index29 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
973
|
+
path: _path + ".health_checks[" + _index29 + "]",
|
|
920
974
|
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
921
975
|
value: elem
|
|
922
976
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -939,7 +993,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
939
993
|
"Please remove the property next time."
|
|
940
994
|
].join("\n")
|
|
941
995
|
});
|
|
942
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
996
|
+
}).every(flag => flag))].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => ["http" === input.type || _report(_exceptionable, {
|
|
943
997
|
path: _path + ".type",
|
|
944
998
|
expected: "\"http\"",
|
|
945
999
|
value: input.type
|
|
@@ -959,7 +1013,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
959
1013
|
path: _path + ".headers",
|
|
960
1014
|
expected: "(Record<string, string> | undefined)",
|
|
961
1015
|
value: input.headers
|
|
962
|
-
})) &&
|
|
1016
|
+
})) && _vo16(input.headers, _path + ".headers", true && _exceptionable) || _report(_exceptionable, {
|
|
963
1017
|
path: _path + ".headers",
|
|
964
1018
|
expected: "(Record<string, string> | undefined)",
|
|
965
1019
|
value: input.headers
|
|
@@ -983,7 +1037,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
983
1037
|
"Please remove the property next time."
|
|
984
1038
|
].join("\n")
|
|
985
1039
|
});
|
|
986
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1040
|
+
}).every(flag => flag))].every(flag => flag); const _vo16 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
987
1041
|
const value = input[key];
|
|
988
1042
|
if (undefined === value)
|
|
989
1043
|
return true;
|
|
@@ -992,7 +1046,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
992
1046
|
expected: "string",
|
|
993
1047
|
value: value
|
|
994
1048
|
});
|
|
995
|
-
}).every(flag => flag)].every(flag => flag); const
|
|
1049
|
+
}).every(flag => flag)].every(flag => flag); const _vo17 = (input, _path, _exceptionable = true) => ["websocket" === input.type || _report(_exceptionable, {
|
|
996
1050
|
path: _path + ".type",
|
|
997
1051
|
expected: "\"websocket\"",
|
|
998
1052
|
value: input.type
|
|
@@ -1020,7 +1074,31 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1020
1074
|
"Please remove the property next time."
|
|
1021
1075
|
].join("\n")
|
|
1022
1076
|
});
|
|
1023
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1077
|
+
}).every(flag => flag))].every(flag => flag); const _vo18 = (input, _path, _exceptionable = true) => ["on-failure" === input.policy || _report(_exceptionable, {
|
|
1078
|
+
path: _path + ".policy",
|
|
1079
|
+
expected: "\"on-failure\"",
|
|
1080
|
+
value: input.policy
|
|
1081
|
+
}), undefined === input.restart_tries || "number" === typeof input.restart_tries || _report(_exceptionable, {
|
|
1082
|
+
path: _path + ".restart_tries",
|
|
1083
|
+
expected: "(number | undefined)",
|
|
1084
|
+
value: input.restart_tries
|
|
1085
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1086
|
+
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
1087
|
+
return true;
|
|
1088
|
+
const value = input[key];
|
|
1089
|
+
if (undefined === value)
|
|
1090
|
+
return true;
|
|
1091
|
+
return _report(_exceptionable, {
|
|
1092
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1093
|
+
expected: "undefined",
|
|
1094
|
+
value: value,
|
|
1095
|
+
description: [
|
|
1096
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1097
|
+
"",
|
|
1098
|
+
"Please remove the property next time."
|
|
1099
|
+
].join("\n")
|
|
1100
|
+
});
|
|
1101
|
+
}).every(flag => flag))].every(flag => flag); const _vo19 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1024
1102
|
path: _path + ".type",
|
|
1025
1103
|
expected: "\"S3\"",
|
|
1026
1104
|
value: input.type
|
|
@@ -1040,8 +1118,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1040
1118
|
path: _path + ".files",
|
|
1041
1119
|
expected: "(Array<string> | undefined)",
|
|
1042
1120
|
value: input.files
|
|
1043
|
-
})) && input.files.map((elem,
|
|
1044
|
-
path: _path + ".files[" +
|
|
1121
|
+
})) && input.files.map((elem, _index30) => "string" === typeof elem || _report(_exceptionable, {
|
|
1122
|
+
path: _path + ".files[" + _index30 + "]",
|
|
1045
1123
|
expected: "string",
|
|
1046
1124
|
value: elem
|
|
1047
1125
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1052,7 +1130,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1052
1130
|
path: _path + ".IAM",
|
|
1053
1131
|
expected: "(S3Auth | undefined)",
|
|
1054
1132
|
value: input.IAM
|
|
1055
|
-
})) &&
|
|
1133
|
+
})) && _vo20(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1056
1134
|
path: _path + ".IAM",
|
|
1057
1135
|
expected: "(S3Auth | undefined)",
|
|
1058
1136
|
value: input.IAM
|
|
@@ -1072,7 +1150,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1072
1150
|
"Please remove the property next time."
|
|
1073
1151
|
].join("\n")
|
|
1074
1152
|
});
|
|
1075
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1153
|
+
}).every(flag => flag))].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => ["string" === typeof input.REGION || _report(_exceptionable, {
|
|
1076
1154
|
path: _path + ".REGION",
|
|
1077
1155
|
expected: "string",
|
|
1078
1156
|
value: input.REGION
|
|
@@ -1100,7 +1178,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1100
1178
|
"Please remove the property next time."
|
|
1101
1179
|
].join("\n")
|
|
1102
1180
|
});
|
|
1103
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1181
|
+
}).every(flag => flag))].every(flag => flag); const _vo21 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1104
1182
|
path: _path + ".type",
|
|
1105
1183
|
expected: "\"S3\"",
|
|
1106
1184
|
value: input.type
|
|
@@ -1124,7 +1202,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1124
1202
|
path: _path + ".IAM",
|
|
1125
1203
|
expected: "(S3Auth | undefined)",
|
|
1126
1204
|
value: input.IAM
|
|
1127
|
-
})) &&
|
|
1205
|
+
})) && _vo20(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1128
1206
|
path: _path + ".IAM",
|
|
1129
1207
|
expected: "(S3Auth | undefined)",
|
|
1130
1208
|
value: input.IAM
|
|
@@ -1144,7 +1222,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1144
1222
|
"Please remove the property next time."
|
|
1145
1223
|
].join("\n")
|
|
1146
1224
|
});
|
|
1147
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1225
|
+
}).every(flag => flag))].every(flag => flag); const _vo22 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1148
1226
|
path: _path + ".type",
|
|
1149
1227
|
expected: "\"S3\"",
|
|
1150
1228
|
value: input.type
|
|
@@ -1156,13 +1234,13 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1156
1234
|
path: _path + ".buckets",
|
|
1157
1235
|
expected: "Array<__type>",
|
|
1158
1236
|
value: input.buckets
|
|
1159
|
-
})) && input.buckets.map((elem,
|
|
1160
|
-
path: _path + ".buckets[" +
|
|
1161
|
-
expected: "__type.
|
|
1237
|
+
})) && input.buckets.map((elem, _index31) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1238
|
+
path: _path + ".buckets[" + _index31 + "]",
|
|
1239
|
+
expected: "__type.o5",
|
|
1162
1240
|
value: elem
|
|
1163
|
-
})) &&
|
|
1164
|
-
path: _path + ".buckets[" +
|
|
1165
|
-
expected: "__type.
|
|
1241
|
+
})) && _vo23(elem, _path + ".buckets[" + _index31 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1242
|
+
path: _path + ".buckets[" + _index31 + "]",
|
|
1243
|
+
expected: "__type.o5",
|
|
1166
1244
|
value: elem
|
|
1167
1245
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
1168
1246
|
path: _path + ".buckets",
|
|
@@ -1180,7 +1258,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1180
1258
|
path: _path + ".IAM",
|
|
1181
1259
|
expected: "(S3Auth | undefined)",
|
|
1182
1260
|
value: input.IAM
|
|
1183
|
-
})) &&
|
|
1261
|
+
})) && _vo20(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1184
1262
|
path: _path + ".IAM",
|
|
1185
1263
|
expected: "(S3Auth | undefined)",
|
|
1186
1264
|
value: input.IAM
|
|
@@ -1200,7 +1278,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1200
1278
|
"Please remove the property next time."
|
|
1201
1279
|
].join("\n")
|
|
1202
1280
|
});
|
|
1203
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1281
|
+
}).every(flag => flag))].every(flag => flag); const _vo23 = (input, _path, _exceptionable = true) => ["string" === typeof input.url || _report(_exceptionable, {
|
|
1204
1282
|
path: _path + ".url",
|
|
1205
1283
|
expected: "string",
|
|
1206
1284
|
value: input.url
|
|
@@ -1208,8 +1286,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1208
1286
|
path: _path + ".files",
|
|
1209
1287
|
expected: "(Array<string> | undefined)",
|
|
1210
1288
|
value: input.files
|
|
1211
|
-
})) && input.files.map((elem,
|
|
1212
|
-
path: _path + ".files[" +
|
|
1289
|
+
})) && input.files.map((elem, _index32) => "string" === typeof elem || _report(_exceptionable, {
|
|
1290
|
+
path: _path + ".files[" + _index32 + "]",
|
|
1213
1291
|
expected: "string",
|
|
1214
1292
|
value: elem
|
|
1215
1293
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1232,7 +1310,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1232
1310
|
"Please remove the property next time."
|
|
1233
1311
|
].join("\n")
|
|
1234
1312
|
});
|
|
1235
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1313
|
+
}).every(flag => flag))].every(flag => flag); const _vo24 = (input, _path, _exceptionable = true) => ["HF" === input.type || _report(_exceptionable, {
|
|
1236
1314
|
path: _path + ".type",
|
|
1237
1315
|
expected: "\"HF\"",
|
|
1238
1316
|
value: input.type
|
|
@@ -1252,8 +1330,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1252
1330
|
path: _path + ".files",
|
|
1253
1331
|
expected: "(Array<string> | undefined)",
|
|
1254
1332
|
value: input.files
|
|
1255
|
-
})) && input.files.map((elem,
|
|
1256
|
-
path: _path + ".files[" +
|
|
1333
|
+
})) && input.files.map((elem, _index33) => "string" === typeof elem || _report(_exceptionable, {
|
|
1334
|
+
path: _path + ".files[" + _index33 + "]",
|
|
1257
1335
|
expected: "string",
|
|
1258
1336
|
value: elem
|
|
1259
1337
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1280,7 +1358,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1280
1358
|
"Please remove the property next time."
|
|
1281
1359
|
].join("\n")
|
|
1282
1360
|
});
|
|
1283
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1361
|
+
}).every(flag => flag))].every(flag => flag); const _vo25 = (input, _path, _exceptionable = true) => ["Ollama" === input.type || _report(_exceptionable, {
|
|
1284
1362
|
path: _path + ".type",
|
|
1285
1363
|
expected: "\"Ollama\"",
|
|
1286
1364
|
value: input.type
|
|
@@ -1308,11 +1386,11 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1308
1386
|
"Please remove the property next time."
|
|
1309
1387
|
].join("\n")
|
|
1310
1388
|
});
|
|
1311
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1389
|
+
}).every(flag => flag))].every(flag => flag); const _vo26 = (input, _path, _exceptionable = true) => [undefined === input.docker || ("object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) || _report(_exceptionable, {
|
|
1312
1390
|
path: _path + ".docker",
|
|
1313
1391
|
expected: "(DockerAuth | undefined)",
|
|
1314
1392
|
value: input.docker
|
|
1315
|
-
})) &&
|
|
1393
|
+
})) && _vo27(input.docker, _path + ".docker", true && _exceptionable) || _report(_exceptionable, {
|
|
1316
1394
|
path: _path + ".docker",
|
|
1317
1395
|
expected: "(DockerAuth | undefined)",
|
|
1318
1396
|
value: input.docker
|
|
@@ -1332,7 +1410,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1332
1410
|
"Please remove the property next time."
|
|
1333
1411
|
].join("\n")
|
|
1334
1412
|
});
|
|
1335
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1413
|
+
}).every(flag => flag))].every(flag => flag); const _vo27 = (input, _path, _exceptionable = true) => [undefined === input.username || "string" === typeof input.username || _report(_exceptionable, {
|
|
1336
1414
|
path: _path + ".username",
|
|
1337
1415
|
expected: "(string | undefined)",
|
|
1338
1416
|
value: input.username
|
|
@@ -1364,7 +1442,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1364
1442
|
"Please remove the property next time."
|
|
1365
1443
|
].join("\n")
|
|
1366
1444
|
});
|
|
1367
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1445
|
+
}).every(flag => flag))].every(flag => flag); const _vo28 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
1368
1446
|
path: _path + ".name",
|
|
1369
1447
|
expected: "string",
|
|
1370
1448
|
value: input.name
|
|
@@ -1384,7 +1462,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1384
1462
|
"Please remove the property next time."
|
|
1385
1463
|
].join("\n")
|
|
1386
1464
|
});
|
|
1387
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1465
|
+
}).every(flag => flag))].every(flag => flag); const _vo29 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1388
1466
|
const value = input[key];
|
|
1389
1467
|
if (undefined === value)
|
|
1390
1468
|
return true;
|
|
@@ -1400,12 +1478,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1400
1478
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1401
1479
|
expected: "(OperationResult | string)",
|
|
1402
1480
|
value: value
|
|
1403
|
-
})) &&
|
|
1481
|
+
})) && _vo30(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
1404
1482
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1405
1483
|
expected: "(OperationResult | string)",
|
|
1406
1484
|
value: value
|
|
1407
1485
|
}));
|
|
1408
|
-
}).every(flag => flag)].every(flag => flag); const
|
|
1486
|
+
}).every(flag => flag)].every(flag => flag); const _vo30 = (input, _path, _exceptionable = true) => ["string" === typeof input.regex || _report(_exceptionable, {
|
|
1409
1487
|
path: _path + ".regex",
|
|
1410
1488
|
expected: "string",
|
|
1411
1489
|
value: input.regex
|
|
@@ -1425,8 +1503,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1425
1503
|
path: _path + ".logType",
|
|
1426
1504
|
expected: "Array<> & UniqueLogTypeTag",
|
|
1427
1505
|
value: input.logType
|
|
1428
|
-
})) && input.logType.map((elem,
|
|
1429
|
-
path: _path + ".logType[" +
|
|
1506
|
+
})) && input.logType.map((elem, _index34) => "stdin" === elem || "stdout" === elem || "stderr" === elem || "nodeerr" === elem || _report(_exceptionable, {
|
|
1507
|
+
path: _path + ".logType[" + _index34 + "]",
|
|
1430
1508
|
expected: "(\"nodeerr\" | \"stderr\" | \"stdin\" | \"stdout\")",
|
|
1431
1509
|
value: elem
|
|
1432
1510
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -1449,7 +1527,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1449
1527
|
"Please remove the property next time."
|
|
1450
1528
|
].join("\n")
|
|
1451
1529
|
});
|
|
1452
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1530
|
+
}).every(flag => flag))].every(flag => flag); const _vo31 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1453
1531
|
path: _path + ".group",
|
|
1454
1532
|
expected: "(string | undefined)",
|
|
1455
1533
|
value: input.group
|
|
@@ -1485,7 +1563,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1485
1563
|
"Please remove the property next time."
|
|
1486
1564
|
].join("\n")
|
|
1487
1565
|
});
|
|
1488
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1566
|
+
}).every(flag => flag))].every(flag => flag); const _vo32 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1489
1567
|
path: _path + ".group",
|
|
1490
1568
|
expected: "(string | undefined)",
|
|
1491
1569
|
value: input.group
|
|
@@ -1493,8 +1571,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1493
1571
|
path: _path + ".depends_on",
|
|
1494
1572
|
expected: "Array<string>",
|
|
1495
1573
|
value: input.depends_on
|
|
1496
|
-
})) && input.depends_on.map((elem,
|
|
1497
|
-
path: _path + ".depends_on[" +
|
|
1574
|
+
})) && input.depends_on.map((elem, _index35) => "string" === typeof elem || _report(_exceptionable, {
|
|
1575
|
+
path: _path + ".depends_on[" + _index35 + "]",
|
|
1498
1576
|
expected: "string",
|
|
1499
1577
|
value: elem
|
|
1500
1578
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1523,9 +1601,9 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1523
1601
|
});
|
|
1524
1602
|
}).every(flag => flag))].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1525
1603
|
if ("http" === input.type)
|
|
1526
|
-
return
|
|
1604
|
+
return _vo15(input, _path, true && _exceptionable);
|
|
1527
1605
|
else if ("websocket" === input.type)
|
|
1528
|
-
return
|
|
1606
|
+
return _vo17(input, _path, true && _exceptionable);
|
|
1529
1607
|
else
|
|
1530
1608
|
return _report(_exceptionable, {
|
|
1531
1609
|
path: _path,
|
|
@@ -1534,9 +1612,9 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1534
1612
|
});
|
|
1535
1613
|
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
1536
1614
|
if (undefined !== input.__spread__)
|
|
1537
|
-
return _vo12(input, _path, true && _exceptionable);
|
|
1538
|
-
else if (undefined !== input.port)
|
|
1539
1615
|
return _vo13(input, _path, true && _exceptionable);
|
|
1616
|
+
else if (undefined !== input.port)
|
|
1617
|
+
return _vo14(input, _path, true && _exceptionable);
|
|
1540
1618
|
else
|
|
1541
1619
|
return _report(_exceptionable, {
|
|
1542
1620
|
path: _path,
|
|
@@ -1545,22 +1623,22 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1545
1623
|
});
|
|
1546
1624
|
})(); const _vu2 = (input, _path, _exceptionable = true) => (() => {
|
|
1547
1625
|
if (undefined !== input.__spread__)
|
|
1548
|
-
return
|
|
1626
|
+
return _vo13(input, _path, true && _exceptionable);
|
|
1549
1627
|
else if (undefined !== input.bucket)
|
|
1550
|
-
return
|
|
1628
|
+
return _vo21(input, _path, true && _exceptionable);
|
|
1551
1629
|
else if (undefined !== input.buckets)
|
|
1552
|
-
return _vo20(input, _path, true && _exceptionable);
|
|
1553
|
-
else if ("HF" === input.type)
|
|
1554
1630
|
return _vo22(input, _path, true && _exceptionable);
|
|
1631
|
+
else if ("HF" === input.type)
|
|
1632
|
+
return _vo24(input, _path, true && _exceptionable);
|
|
1555
1633
|
else if ("Ollama" === input.type)
|
|
1556
|
-
return
|
|
1634
|
+
return _vo25(input, _path, true && _exceptionable);
|
|
1557
1635
|
else
|
|
1558
|
-
return
|
|
1636
|
+
return _vo19(input, _path, true && _exceptionable);
|
|
1559
1637
|
})(); const _vu3 = (input, _path, _exceptionable = true) => (() => {
|
|
1560
1638
|
if (undefined !== input.image)
|
|
1561
|
-
return
|
|
1639
|
+
return _vo11(input, _path, true && _exceptionable);
|
|
1562
1640
|
else if (undefined !== input.name)
|
|
1563
|
-
return
|
|
1641
|
+
return _vo28(input, _path, true && _exceptionable);
|
|
1564
1642
|
else
|
|
1565
1643
|
return _report(_exceptionable, {
|
|
1566
1644
|
path: _path,
|
|
@@ -1568,10 +1646,10 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1568
1646
|
value: input
|
|
1569
1647
|
});
|
|
1570
1648
|
})(); const _vu4 = (input, _path, _exceptionable = true) => (() => {
|
|
1571
|
-
if (Array.isArray(input.depends_on) && input.depends_on.map((elem,
|
|
1572
|
-
return
|
|
1649
|
+
if (Array.isArray(input.depends_on) && input.depends_on.map((elem, _index36) => "string" === typeof elem).every(flag => flag))
|
|
1650
|
+
return _vo32(input, _path, true && _exceptionable);
|
|
1573
1651
|
else
|
|
1574
|
-
return
|
|
1652
|
+
return _vo31(input, _path, true && _exceptionable);
|
|
1575
1653
|
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
1576
1654
|
if (false === __is(input)) {
|
|
1577
1655
|
errors = [];
|