@nosana/types 0.1.6 → 0.1.12
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/literals.d.ts +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/JobDefinition/operations/index.d.ts +10 -1
- package/dist/Jobs/JobDefinition/operations/index.js +2 -1
- package/dist/Jobs/JobDefinition/operations/index.js.map +1 -1
- package/dist/Jobs/Logs/index.d.ts +1 -0
- package/dist/Jobs/index.d.ts +1 -0
- package/dist/Jobs/index.js +179 -123
- package/dist/Jobs/index.js.map +1 -1
- package/dist/Schemas/api.d.ts +284 -140
- package/dist/Schemas/job.js +168 -3
- package/dist/Schemas/job.js.map +1 -1
- package/package.json +1 -1
package/dist/Jobs/index.js
CHANGED
|
@@ -2,6 +2,7 @@ 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";
|
|
@@ -49,13 +50,13 @@ 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) && _io5(value, true && _exceptionable));
|
|
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) && _io5(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) => (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,
|
|
59
|
+
}); const _io6 = (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, _index3) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io7(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) && _io8(input.variables, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
59
60
|
if (["image", "gpu", "entrypoint", "env", "work_dir", "variables"].some(prop => key === prop))
|
|
60
61
|
return true;
|
|
61
62
|
const value = input[key];
|
|
@@ -72,14 +73,14 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
72
73
|
if (undefined === value)
|
|
73
74
|
return true;
|
|
74
75
|
return "string" === typeof value;
|
|
75
|
-
}); const _io9 = (input, _exceptionable = true) => ("container/run" === input.type || "container/create-volume" === input.type) && "string" === typeof input.id && ("object" === typeof input.args && null !== input.args && _iu3(input.args, true && _exceptionable)) && (undefined === input.results || "object" === typeof input.results && null !== input.results && false === Array.isArray(input.results) &&
|
|
76
|
+
}); const _io9 = (input, _exceptionable = true) => ("container/run" === input.type || "container/create-volume" === input.type) && ("string" === typeof input.id && (typeof input.id === "string" && !input.id.includes(" "))) && ("object" === typeof input.args && null !== input.args && _iu3(input.args, true && _exceptionable)) && (undefined === input.results || "object" === typeof input.results && null !== input.results && false === Array.isArray(input.results) && _io28(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
77
|
if (["type", "id", "args", "results", "execution"].some(prop => key === prop))
|
|
77
78
|
return true;
|
|
78
79
|
const value = input[key];
|
|
79
80
|
if (undefined === value)
|
|
80
81
|
return true;
|
|
81
82
|
return false;
|
|
82
|
-
})); const _io10 = (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,
|
|
83
|
+
})); const _io10 = (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, _index4) => "string" === typeof elem))) && (null !== input.cmd && (undefined === input.cmd || "string" === typeof input.cmd || Array.isArray(input.cmd) && input.cmd.every((elem, _index5) => "string" === typeof elem))) && (undefined === input.volumes || Array.isArray(input.volumes) && input.volumes.every((elem, _index6) => "object" === typeof elem && null !== elem && _io11(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
84
|
if (!Array.isArray(input.expose))
|
|
84
85
|
return true;
|
|
85
86
|
const numbers = new Set();
|
|
@@ -114,8 +115,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
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))
|
|
118
|
+
})() && input.expose.every((elem, _index7) => 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, _index8) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io7(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 && _io17(input.restart_policy, true && _exceptionable))) && (undefined === input["private"] || "boolean" === typeof input["private"]) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every((elem, _index9) => 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) && _io25(input.authentication, true && _exceptionable)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
119
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "restart_policy", "private", "resources", "authentication"].some(prop => key === prop))
|
|
119
120
|
return true;
|
|
120
121
|
const value = input[key];
|
|
121
122
|
if (undefined === value)
|
|
@@ -128,14 +129,14 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
128
129
|
if (undefined === value)
|
|
129
130
|
return true;
|
|
130
131
|
return false;
|
|
131
|
-
})); const _io12 = (input, _exceptionable = true) => "string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
132
|
-
if (["__spread__"].some(prop => key === prop))
|
|
132
|
+
})); const _io12 = (input, _exceptionable = true) => "string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__)) && (undefined === input.chunked || "boolean" === typeof input.chunked) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
133
|
+
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
133
134
|
return true;
|
|
134
135
|
const value = input[key];
|
|
135
136
|
if (undefined === value)
|
|
136
137
|
return true;
|
|
137
138
|
return false;
|
|
138
|
-
})); const _io13 = (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,
|
|
139
|
+
})); const _io13 = (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, _index10) => "object" === typeof elem && null !== elem && _iu0(elem, true && _exceptionable))) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
139
140
|
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
140
141
|
return true;
|
|
141
142
|
const value = input[key];
|
|
@@ -161,82 +162,89 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
161
162
|
if (undefined === value)
|
|
162
163
|
return true;
|
|
163
164
|
return false;
|
|
164
|
-
})); const _io17 = (input, _exceptionable = true) => "
|
|
165
|
+
})); const _io17 = (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 => {
|
|
166
|
+
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
167
|
+
return true;
|
|
168
|
+
const value = input[key];
|
|
169
|
+
if (undefined === value)
|
|
170
|
+
return true;
|
|
171
|
+
return false;
|
|
172
|
+
})); const _io18 = (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, _index11) => "string" === typeof elem)) && (undefined === input.IAM || "object" === typeof input.IAM && null !== input.IAM && _io19(input.IAM, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
165
173
|
if (["type", "target", "url", "allowWrite", "files", "IAM"].some(prop => key === prop))
|
|
166
174
|
return true;
|
|
167
175
|
const value = input[key];
|
|
168
176
|
if (undefined === value)
|
|
169
177
|
return true;
|
|
170
178
|
return false;
|
|
171
|
-
})); const
|
|
179
|
+
})); const _io19 = (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
180
|
if (["REGION", "ACCESS_KEY_ID", "SECRET_ACCESS_KEY"].some(prop => key === prop))
|
|
173
181
|
return true;
|
|
174
182
|
const value = input[key];
|
|
175
183
|
if (undefined === value)
|
|
176
184
|
return true;
|
|
177
185
|
return false;
|
|
178
|
-
})); const
|
|
186
|
+
})); const _io20 = (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 && _io19(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
179
187
|
if (["type", "target", "bucket", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
180
188
|
return true;
|
|
181
189
|
const value = input[key];
|
|
182
190
|
if (undefined === value)
|
|
183
191
|
return true;
|
|
184
192
|
return false;
|
|
185
|
-
})); const
|
|
193
|
+
})); const _io21 = (input, _exceptionable = true) => "S3" === input.type && "string" === typeof input.target && (Array.isArray(input.buckets) && input.buckets.every((elem, _index12) => "object" === typeof elem && null !== elem && _io22(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 && _io19(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
186
194
|
if (["type", "target", "buckets", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
187
195
|
return true;
|
|
188
196
|
const value = input[key];
|
|
189
197
|
if (undefined === value)
|
|
190
198
|
return true;
|
|
191
199
|
return false;
|
|
192
|
-
})); const
|
|
200
|
+
})); const _io22 = (input, _exceptionable = true) => "string" === typeof input.url && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index13) => "string" === typeof elem)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
193
201
|
if (["url", "files"].some(prop => key === prop))
|
|
194
202
|
return true;
|
|
195
203
|
const value = input[key];
|
|
196
204
|
if (undefined === value)
|
|
197
205
|
return true;
|
|
198
206
|
return false;
|
|
199
|
-
})); const
|
|
207
|
+
})); const _io23 = (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, _index14) => "string" === typeof elem)) && (undefined === input.accessToken || "string" === typeof input.accessToken) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
200
208
|
if (["type", "target", "repo", "revision", "files", "accessToken"].some(prop => key === prop))
|
|
201
209
|
return true;
|
|
202
210
|
const value = input[key];
|
|
203
211
|
if (undefined === value)
|
|
204
212
|
return true;
|
|
205
213
|
return false;
|
|
206
|
-
})); const
|
|
214
|
+
})); const _io24 = (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
215
|
if (["type", "model", "target"].some(prop => key === prop))
|
|
208
216
|
return true;
|
|
209
217
|
const value = input[key];
|
|
210
218
|
if (undefined === value)
|
|
211
219
|
return true;
|
|
212
220
|
return false;
|
|
213
|
-
})); const
|
|
221
|
+
})); const _io25 = (input, _exceptionable = true) => (undefined === input.docker || "object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) && _io26(input.docker, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
214
222
|
if (["docker"].some(prop => key === prop))
|
|
215
223
|
return true;
|
|
216
224
|
const value = input[key];
|
|
217
225
|
if (undefined === value)
|
|
218
226
|
return true;
|
|
219
227
|
return false;
|
|
220
|
-
})); const
|
|
228
|
+
})); const _io26 = (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
229
|
if (["username", "password", "email", "server"].some(prop => key === prop))
|
|
222
230
|
return true;
|
|
223
231
|
const value = input[key];
|
|
224
232
|
if (undefined === value)
|
|
225
233
|
return true;
|
|
226
234
|
return false;
|
|
227
|
-
})); const
|
|
235
|
+
})); const _io27 = (input, _exceptionable = true) => "string" === typeof input.name && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
228
236
|
if (["name"].some(prop => key === prop))
|
|
229
237
|
return true;
|
|
230
238
|
const value = input[key];
|
|
231
239
|
if (undefined === value)
|
|
232
240
|
return true;
|
|
233
241
|
return false;
|
|
234
|
-
})); const
|
|
242
|
+
})); const _io28 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
235
243
|
const value = input[key];
|
|
236
244
|
if (undefined === value)
|
|
237
245
|
return true;
|
|
238
|
-
return null !== value && undefined !== value && ("string" === typeof value || "object" === typeof value && null !== value &&
|
|
239
|
-
}); const
|
|
246
|
+
return null !== value && undefined !== value && ("string" === typeof value || "object" === typeof value && null !== value && _io29(value, true && _exceptionable));
|
|
247
|
+
}); const _io29 = (input, _exceptionable = true) => "string" === typeof input.regex && (Array.isArray(input.logType) && (Array.isArray(input.logType) && input.logType.length >= 1 && input.logType.length <= 4 && (() => {
|
|
240
248
|
const seen = new Set();
|
|
241
249
|
for (const v of input.logType) {
|
|
242
250
|
if (seen.has(v))
|
|
@@ -244,21 +252,21 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
244
252
|
seen.add(v);
|
|
245
253
|
}
|
|
246
254
|
return true;
|
|
247
|
-
})() && input.logType.every((elem,
|
|
255
|
+
})() && input.logType.every((elem, _index15) => "stdin" === elem || "stdout" === elem || "stderr" === elem || "nodeerr" === elem))) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
248
256
|
if (["regex", "logType"].some(prop => key === prop))
|
|
249
257
|
return true;
|
|
250
258
|
const value = input[key];
|
|
251
259
|
if (undefined === value)
|
|
252
260
|
return true;
|
|
253
261
|
return false;
|
|
254
|
-
})); const
|
|
262
|
+
})); const _io30 = (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
263
|
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
256
264
|
return true;
|
|
257
265
|
const value = input[key];
|
|
258
266
|
if (undefined === value)
|
|
259
267
|
return true;
|
|
260
268
|
return false;
|
|
261
|
-
})); const
|
|
269
|
+
})); const _io31 = (input, _exceptionable = true) => (undefined === input.group || "string" === typeof input.group) && (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index16) => "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
270
|
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
263
271
|
return true;
|
|
264
272
|
const value = input[key];
|
|
@@ -283,27 +291,27 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
283
291
|
if (undefined !== input.__spread__)
|
|
284
292
|
return _io12(input, true && _exceptionable);
|
|
285
293
|
else if (undefined !== input.bucket)
|
|
286
|
-
return _io19(input, true && _exceptionable);
|
|
287
|
-
else if (undefined !== input.buckets)
|
|
288
294
|
return _io20(input, true && _exceptionable);
|
|
295
|
+
else if (undefined !== input.buckets)
|
|
296
|
+
return _io21(input, true && _exceptionable);
|
|
289
297
|
else if ("HF" === input.type)
|
|
290
|
-
return _io22(input, true && _exceptionable);
|
|
291
|
-
else if ("Ollama" === input.type)
|
|
292
298
|
return _io23(input, true && _exceptionable);
|
|
299
|
+
else if ("Ollama" === input.type)
|
|
300
|
+
return _io24(input, true && _exceptionable);
|
|
293
301
|
else
|
|
294
|
-
return
|
|
302
|
+
return _io18(input, true && _exceptionable);
|
|
295
303
|
})(); const _iu3 = (input, _exceptionable = true) => (() => {
|
|
296
304
|
if (undefined !== input.image)
|
|
297
305
|
return _io10(input, true && _exceptionable);
|
|
298
306
|
else if (undefined !== input.name)
|
|
299
|
-
return
|
|
307
|
+
return _io27(input, true && _exceptionable);
|
|
300
308
|
else
|
|
301
309
|
return false;
|
|
302
310
|
})(); const _iu4 = (input, _exceptionable = true) => (() => {
|
|
303
|
-
if (Array.isArray(input.depends_on) && input.depends_on.every((elem,
|
|
304
|
-
return
|
|
311
|
+
if (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index17) => "string" === typeof elem))
|
|
312
|
+
return _io31(input, true && _exceptionable);
|
|
305
313
|
else
|
|
306
|
-
return
|
|
314
|
+
return _io30(input, true && _exceptionable);
|
|
307
315
|
})(); const _vo0 = (input, _path, _exceptionable = true) => ["container" === input.type || _report(_exceptionable, {
|
|
308
316
|
path: _path + ".type",
|
|
309
317
|
expected: "\"container\"",
|
|
@@ -358,12 +366,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
358
366
|
path: _path + ".ops",
|
|
359
367
|
expected: "Array<> & UniqueById",
|
|
360
368
|
value: input.ops
|
|
361
|
-
})) && input.ops.map((elem,
|
|
362
|
-
path: _path + ".ops[" +
|
|
369
|
+
})) && input.ops.map((elem, _index18) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
370
|
+
path: _path + ".ops[" + _index18 + "]",
|
|
363
371
|
expected: "Operation<keyof OperationArgsMap>",
|
|
364
372
|
value: elem
|
|
365
|
-
})) && _vo9(elem, _path + ".ops[" +
|
|
366
|
-
path: _path + ".ops[" +
|
|
373
|
+
})) && _vo9(elem, _path + ".ops[" + _index18 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
374
|
+
path: _path + ".ops[" + _index18 + "]",
|
|
367
375
|
expected: "Operation<keyof OperationArgsMap>",
|
|
368
376
|
value: elem
|
|
369
377
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -486,15 +494,19 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
486
494
|
return true;
|
|
487
495
|
return (null !== value || _report(_exceptionable, {
|
|
488
496
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
489
|
-
expected: "(Record<string, string | number> | number | string | undefined)",
|
|
497
|
+
expected: "(Array<string | number> | Record<string, string | number> | number | string | undefined)",
|
|
490
498
|
value: value
|
|
491
|
-
})) && (undefined === value || "string" === typeof value || "number" === typeof value || ("
|
|
499
|
+
})) && (undefined === value || "string" === typeof value || "number" === typeof value || (Array.isArray(value) && value.map((elem, _index19) => "string" === typeof elem || "number" === typeof elem || _report(_exceptionable, {
|
|
500
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key) + "[" + _index19 + "]",
|
|
501
|
+
expected: "(number | string)",
|
|
502
|
+
value: elem
|
|
503
|
+
})).every(flag => flag) || "object" === typeof value && null !== value && false === Array.isArray(value) && _vo5(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
492
504
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
493
|
-
expected: "(Record<string, string | number> | number | string | undefined)",
|
|
505
|
+
expected: "(Array<string | number> | Record<string, string | number> | number | string | undefined)",
|
|
494
506
|
value: value
|
|
495
|
-
}))
|
|
507
|
+
})) || _report(_exceptionable, {
|
|
496
508
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
497
|
-
expected: "(Record<string, string | number> | number | string | undefined)",
|
|
509
|
+
expected: "(Array<string | number> | Record<string, string | number> | number | string | undefined)",
|
|
498
510
|
value: value
|
|
499
511
|
}));
|
|
500
512
|
}).every(flag => flag)].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
@@ -522,8 +534,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
522
534
|
path: _path + ".entrypoint",
|
|
523
535
|
expected: "(CMDArray | string | undefined)",
|
|
524
536
|
value: input.entrypoint
|
|
525
|
-
})) && input.entrypoint.map((elem,
|
|
526
|
-
path: _path + ".entrypoint[" +
|
|
537
|
+
})) && input.entrypoint.map((elem, _index20) => "string" === typeof elem || _report(_exceptionable, {
|
|
538
|
+
path: _path + ".entrypoint[" + _index20 + "]",
|
|
527
539
|
expected: "string",
|
|
528
540
|
value: elem
|
|
529
541
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -588,9 +600,13 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
588
600
|
path: _path + ".type",
|
|
589
601
|
expected: "(\"container/create-volume\" | \"container/run\")",
|
|
590
602
|
value: input.type
|
|
591
|
-
}), "string" === typeof input.id || _report(_exceptionable, {
|
|
603
|
+
}), "string" === typeof input.id && (typeof input.id === "string" && !input.id.includes(" ") || _report(_exceptionable, {
|
|
592
604
|
path: _path + ".id",
|
|
593
|
-
expected: "string",
|
|
605
|
+
expected: "string & TagBase<__type>",
|
|
606
|
+
value: input.id
|
|
607
|
+
})) || _report(_exceptionable, {
|
|
608
|
+
path: _path + ".id",
|
|
609
|
+
expected: "(string & TagBase<__type>)",
|
|
594
610
|
value: input.id
|
|
595
611
|
}), ("object" === typeof input.args && null !== input.args || _report(_exceptionable, {
|
|
596
612
|
path: _path + ".args",
|
|
@@ -604,7 +620,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
604
620
|
path: _path + ".results",
|
|
605
621
|
expected: "(OperationResults | undefined)",
|
|
606
622
|
value: input.results
|
|
607
|
-
})) &&
|
|
623
|
+
})) && _vo28(input.results, _path + ".results", true && _exceptionable) || _report(_exceptionable, {
|
|
608
624
|
path: _path + ".results",
|
|
609
625
|
expected: "(OperationResults | undefined)",
|
|
610
626
|
value: input.results
|
|
@@ -644,8 +660,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
644
660
|
path: _path + ".aliases",
|
|
645
661
|
expected: "(Aliases | string | undefined)",
|
|
646
662
|
value: input.aliases
|
|
647
|
-
})) && input.aliases.map((elem,
|
|
648
|
-
path: _path + ".aliases[" +
|
|
663
|
+
})) && input.aliases.map((elem, _index21) => "string" === typeof elem || _report(_exceptionable, {
|
|
664
|
+
path: _path + ".aliases[" + _index21 + "]",
|
|
649
665
|
expected: "string",
|
|
650
666
|
value: elem
|
|
651
667
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -660,8 +676,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
660
676
|
path: _path + ".cmd",
|
|
661
677
|
expected: "(CMDArray | string | undefined)",
|
|
662
678
|
value: input.cmd
|
|
663
|
-
})) && input.cmd.map((elem,
|
|
664
|
-
path: _path + ".cmd[" +
|
|
679
|
+
})) && input.cmd.map((elem, _index22) => "string" === typeof elem || _report(_exceptionable, {
|
|
680
|
+
path: _path + ".cmd[" + _index22 + "]",
|
|
665
681
|
expected: "string",
|
|
666
682
|
value: elem
|
|
667
683
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -672,12 +688,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
672
688
|
path: _path + ".volumes",
|
|
673
689
|
expected: "(Array<Volume> | undefined)",
|
|
674
690
|
value: input.volumes
|
|
675
|
-
})) && input.volumes.map((elem,
|
|
676
|
-
path: _path + ".volumes[" +
|
|
691
|
+
})) && input.volumes.map((elem, _index23) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
692
|
+
path: _path + ".volumes[" + _index23 + "]",
|
|
677
693
|
expected: "Volume",
|
|
678
694
|
value: elem
|
|
679
|
-
})) && _vo11(elem, _path + ".volumes[" +
|
|
680
|
-
path: _path + ".volumes[" +
|
|
695
|
+
})) && _vo11(elem, _path + ".volumes[" + _index23 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
696
|
+
path: _path + ".volumes[" + _index23 + "]",
|
|
681
697
|
expected: "Volume",
|
|
682
698
|
value: elem
|
|
683
699
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -731,24 +747,24 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
731
747
|
path: _path + ".expose",
|
|
732
748
|
expected: "Array<> & TagBase<__type>",
|
|
733
749
|
value: input.expose
|
|
734
|
-
})) && input.expose.map((elem,
|
|
735
|
-
path: _path + ".expose[" +
|
|
750
|
+
})) && input.expose.map((elem, _index24) => (null !== elem || _report(_exceptionable, {
|
|
751
|
+
path: _path + ".expose[" + _index24 + "]",
|
|
736
752
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
737
753
|
value: elem
|
|
738
754
|
})) && (undefined !== elem || _report(_exceptionable, {
|
|
739
|
-
path: _path + ".expose[" +
|
|
755
|
+
path: _path + ".expose[" + _index24 + "]",
|
|
740
756
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
741
757
|
value: elem
|
|
742
758
|
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || _report(_exceptionable, {
|
|
743
|
-
path: _path + ".expose[" +
|
|
759
|
+
path: _path + ".expose[" + _index24 + "]",
|
|
744
760
|
expected: "string & TagBase<__type>",
|
|
745
761
|
value: elem
|
|
746
762
|
})) || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
747
|
-
path: _path + ".expose[" +
|
|
763
|
+
path: _path + ".expose[" + _index24 + "]",
|
|
748
764
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
749
765
|
value: elem
|
|
750
|
-
})) && _vu1(elem, _path + ".expose[" +
|
|
751
|
-
path: _path + ".expose[" +
|
|
766
|
+
})) && _vu1(elem, _path + ".expose[" + _index24 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
767
|
+
path: _path + ".expose[" + _index24 + "]",
|
|
752
768
|
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
753
769
|
value: elem
|
|
754
770
|
}))).every(flag => flag)) || "object" === typeof input.expose && null !== input.expose && _vu1(input.expose, _path + ".expose", true && _exceptionable) || _report(_exceptionable, {
|
|
@@ -775,8 +791,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
775
791
|
path: _path + ".entrypoint",
|
|
776
792
|
expected: "(CMDArray | string | undefined)",
|
|
777
793
|
value: input.entrypoint
|
|
778
|
-
})) && input.entrypoint.map((elem,
|
|
779
|
-
path: _path + ".entrypoint[" +
|
|
794
|
+
})) && input.entrypoint.map((elem, _index25) => "string" === typeof elem || _report(_exceptionable, {
|
|
795
|
+
path: _path + ".entrypoint[" + _index25 + "]",
|
|
780
796
|
expected: "string",
|
|
781
797
|
value: elem
|
|
782
798
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -791,7 +807,19 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
791
807
|
path: _path + ".env",
|
|
792
808
|
expected: "(Env | undefined)",
|
|
793
809
|
value: input.env
|
|
794
|
-
}),
|
|
810
|
+
}), (null !== input.restart_policy || _report(_exceptionable, {
|
|
811
|
+
path: _path + ".restart_policy",
|
|
812
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
|
|
813
|
+
value: input.restart_policy
|
|
814
|
+
})) && (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, {
|
|
815
|
+
path: _path + ".restart_policy",
|
|
816
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
|
|
817
|
+
value: input.restart_policy
|
|
818
|
+
})) && _vo17(input.restart_policy, _path + ".restart_policy", true && _exceptionable) || _report(_exceptionable, {
|
|
819
|
+
path: _path + ".restart_policy",
|
|
820
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o4 | undefined)",
|
|
821
|
+
value: input.restart_policy
|
|
822
|
+
})), undefined === input["private"] || "boolean" === typeof input["private"] || _report(_exceptionable, {
|
|
795
823
|
path: _path + "[\"private\"]",
|
|
796
824
|
expected: "(boolean | undefined)",
|
|
797
825
|
value: input["private"]
|
|
@@ -799,20 +827,20 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
799
827
|
path: _path + ".resources",
|
|
800
828
|
expected: "(Resources | undefined)",
|
|
801
829
|
value: input.resources
|
|
802
|
-
})) && input.resources.map((elem,
|
|
803
|
-
path: _path + ".resources[" +
|
|
830
|
+
})) && input.resources.map((elem, _index26) => (null !== elem || _report(_exceptionable, {
|
|
831
|
+
path: _path + ".resources[" + _index26 + "]",
|
|
804
832
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
805
833
|
value: elem
|
|
806
834
|
})) && (undefined !== elem || _report(_exceptionable, {
|
|
807
|
-
path: _path + ".resources[" +
|
|
835
|
+
path: _path + ".resources[" + _index26 + "]",
|
|
808
836
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
809
837
|
value: elem
|
|
810
838
|
})) && ("__remove-if-empty__" === elem || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
811
|
-
path: _path + ".resources[" +
|
|
839
|
+
path: _path + ".resources[" + _index26 + "]",
|
|
812
840
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
813
841
|
value: elem
|
|
814
|
-
})) && _vu2(elem, _path + ".resources[" +
|
|
815
|
-
path: _path + ".resources[" +
|
|
842
|
+
})) && _vu2(elem, _path + ".resources[" + _index26 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
843
|
+
path: _path + ".resources[" + _index26 + "]",
|
|
816
844
|
expected: "(\"__remove-if-empty__\" | (__type & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
817
845
|
value: elem
|
|
818
846
|
}))).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -823,12 +851,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
823
851
|
path: _path + ".authentication",
|
|
824
852
|
expected: "(Authentication | undefined)",
|
|
825
853
|
value: input.authentication
|
|
826
|
-
})) &&
|
|
854
|
+
})) && _vo25(input.authentication, _path + ".authentication", true && _exceptionable) || _report(_exceptionable, {
|
|
827
855
|
path: _path + ".authentication",
|
|
828
856
|
expected: "(Authentication | undefined)",
|
|
829
857
|
value: input.authentication
|
|
830
858
|
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
831
|
-
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "private", "resources", "authentication"].some(prop => key === prop))
|
|
859
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "restart_policy", "private", "resources", "authentication"].some(prop => key === prop))
|
|
832
860
|
return true;
|
|
833
861
|
const value = input[key];
|
|
834
862
|
if (undefined === value)
|
|
@@ -875,8 +903,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
875
903
|
path: _path + ".__spread__",
|
|
876
904
|
expected: "(string & TagBase<__type>)",
|
|
877
905
|
value: input.__spread__
|
|
906
|
+
}), undefined === input.chunked || "boolean" === typeof input.chunked || _report(_exceptionable, {
|
|
907
|
+
path: _path + ".chunked",
|
|
908
|
+
expected: "(boolean | undefined)",
|
|
909
|
+
value: input.chunked
|
|
878
910
|
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
879
|
-
if (["__spread__"].some(prop => key === prop))
|
|
911
|
+
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
880
912
|
return true;
|
|
881
913
|
const value = input[key];
|
|
882
914
|
if (undefined === value)
|
|
@@ -903,12 +935,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
903
935
|
path: _path + ".health_checks",
|
|
904
936
|
expected: "(Array<HealthCheck> | undefined)",
|
|
905
937
|
value: input.health_checks
|
|
906
|
-
})) && input.health_checks.map((elem,
|
|
907
|
-
path: _path + ".health_checks[" +
|
|
938
|
+
})) && input.health_checks.map((elem, _index27) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
939
|
+
path: _path + ".health_checks[" + _index27 + "]",
|
|
908
940
|
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
909
941
|
value: elem
|
|
910
|
-
})) && _vu0(elem, _path + ".health_checks[" +
|
|
911
|
-
path: _path + ".health_checks[" +
|
|
942
|
+
})) && _vu0(elem, _path + ".health_checks[" + _index27 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
943
|
+
path: _path + ".health_checks[" + _index27 + "]",
|
|
912
944
|
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
913
945
|
value: elem
|
|
914
946
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1012,7 +1044,31 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1012
1044
|
"Please remove the property next time."
|
|
1013
1045
|
].join("\n")
|
|
1014
1046
|
});
|
|
1015
|
-
}).every(flag => flag))].every(flag => flag); const _vo17 = (input, _path, _exceptionable = true) => ["
|
|
1047
|
+
}).every(flag => flag))].every(flag => flag); const _vo17 = (input, _path, _exceptionable = true) => ["on-failure" === input.policy || _report(_exceptionable, {
|
|
1048
|
+
path: _path + ".policy",
|
|
1049
|
+
expected: "\"on-failure\"",
|
|
1050
|
+
value: input.policy
|
|
1051
|
+
}), undefined === input.restart_tries || "number" === typeof input.restart_tries || _report(_exceptionable, {
|
|
1052
|
+
path: _path + ".restart_tries",
|
|
1053
|
+
expected: "(number | undefined)",
|
|
1054
|
+
value: input.restart_tries
|
|
1055
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1056
|
+
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
1057
|
+
return true;
|
|
1058
|
+
const value = input[key];
|
|
1059
|
+
if (undefined === value)
|
|
1060
|
+
return true;
|
|
1061
|
+
return _report(_exceptionable, {
|
|
1062
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1063
|
+
expected: "undefined",
|
|
1064
|
+
value: value,
|
|
1065
|
+
description: [
|
|
1066
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1067
|
+
"",
|
|
1068
|
+
"Please remove the property next time."
|
|
1069
|
+
].join("\n")
|
|
1070
|
+
});
|
|
1071
|
+
}).every(flag => flag))].every(flag => flag); const _vo18 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1016
1072
|
path: _path + ".type",
|
|
1017
1073
|
expected: "\"S3\"",
|
|
1018
1074
|
value: input.type
|
|
@@ -1032,8 +1088,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1032
1088
|
path: _path + ".files",
|
|
1033
1089
|
expected: "(Array<string> | undefined)",
|
|
1034
1090
|
value: input.files
|
|
1035
|
-
})) && input.files.map((elem,
|
|
1036
|
-
path: _path + ".files[" +
|
|
1091
|
+
})) && input.files.map((elem, _index28) => "string" === typeof elem || _report(_exceptionable, {
|
|
1092
|
+
path: _path + ".files[" + _index28 + "]",
|
|
1037
1093
|
expected: "string",
|
|
1038
1094
|
value: elem
|
|
1039
1095
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1044,7 +1100,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1044
1100
|
path: _path + ".IAM",
|
|
1045
1101
|
expected: "(S3Auth | undefined)",
|
|
1046
1102
|
value: input.IAM
|
|
1047
|
-
})) &&
|
|
1103
|
+
})) && _vo19(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1048
1104
|
path: _path + ".IAM",
|
|
1049
1105
|
expected: "(S3Auth | undefined)",
|
|
1050
1106
|
value: input.IAM
|
|
@@ -1064,7 +1120,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1064
1120
|
"Please remove the property next time."
|
|
1065
1121
|
].join("\n")
|
|
1066
1122
|
});
|
|
1067
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1123
|
+
}).every(flag => flag))].every(flag => flag); const _vo19 = (input, _path, _exceptionable = true) => ["string" === typeof input.REGION || _report(_exceptionable, {
|
|
1068
1124
|
path: _path + ".REGION",
|
|
1069
1125
|
expected: "string",
|
|
1070
1126
|
value: input.REGION
|
|
@@ -1092,7 +1148,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1092
1148
|
"Please remove the property next time."
|
|
1093
1149
|
].join("\n")
|
|
1094
1150
|
});
|
|
1095
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1151
|
+
}).every(flag => flag))].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1096
1152
|
path: _path + ".type",
|
|
1097
1153
|
expected: "\"S3\"",
|
|
1098
1154
|
value: input.type
|
|
@@ -1116,7 +1172,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1116
1172
|
path: _path + ".IAM",
|
|
1117
1173
|
expected: "(S3Auth | undefined)",
|
|
1118
1174
|
value: input.IAM
|
|
1119
|
-
})) &&
|
|
1175
|
+
})) && _vo19(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1120
1176
|
path: _path + ".IAM",
|
|
1121
1177
|
expected: "(S3Auth | undefined)",
|
|
1122
1178
|
value: input.IAM
|
|
@@ -1136,7 +1192,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1136
1192
|
"Please remove the property next time."
|
|
1137
1193
|
].join("\n")
|
|
1138
1194
|
});
|
|
1139
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1195
|
+
}).every(flag => flag))].every(flag => flag); const _vo21 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1140
1196
|
path: _path + ".type",
|
|
1141
1197
|
expected: "\"S3\"",
|
|
1142
1198
|
value: input.type
|
|
@@ -1148,13 +1204,13 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1148
1204
|
path: _path + ".buckets",
|
|
1149
1205
|
expected: "Array<__type>",
|
|
1150
1206
|
value: input.buckets
|
|
1151
|
-
})) && input.buckets.map((elem,
|
|
1152
|
-
path: _path + ".buckets[" +
|
|
1153
|
-
expected: "__type.
|
|
1207
|
+
})) && input.buckets.map((elem, _index29) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1208
|
+
path: _path + ".buckets[" + _index29 + "]",
|
|
1209
|
+
expected: "__type.o5",
|
|
1154
1210
|
value: elem
|
|
1155
|
-
})) &&
|
|
1156
|
-
path: _path + ".buckets[" +
|
|
1157
|
-
expected: "__type.
|
|
1211
|
+
})) && _vo22(elem, _path + ".buckets[" + _index29 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1212
|
+
path: _path + ".buckets[" + _index29 + "]",
|
|
1213
|
+
expected: "__type.o5",
|
|
1158
1214
|
value: elem
|
|
1159
1215
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
1160
1216
|
path: _path + ".buckets",
|
|
@@ -1172,7 +1228,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1172
1228
|
path: _path + ".IAM",
|
|
1173
1229
|
expected: "(S3Auth | undefined)",
|
|
1174
1230
|
value: input.IAM
|
|
1175
|
-
})) &&
|
|
1231
|
+
})) && _vo19(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1176
1232
|
path: _path + ".IAM",
|
|
1177
1233
|
expected: "(S3Auth | undefined)",
|
|
1178
1234
|
value: input.IAM
|
|
@@ -1192,7 +1248,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1192
1248
|
"Please remove the property next time."
|
|
1193
1249
|
].join("\n")
|
|
1194
1250
|
});
|
|
1195
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1251
|
+
}).every(flag => flag))].every(flag => flag); const _vo22 = (input, _path, _exceptionable = true) => ["string" === typeof input.url || _report(_exceptionable, {
|
|
1196
1252
|
path: _path + ".url",
|
|
1197
1253
|
expected: "string",
|
|
1198
1254
|
value: input.url
|
|
@@ -1200,8 +1256,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1200
1256
|
path: _path + ".files",
|
|
1201
1257
|
expected: "(Array<string> | undefined)",
|
|
1202
1258
|
value: input.files
|
|
1203
|
-
})) && input.files.map((elem,
|
|
1204
|
-
path: _path + ".files[" +
|
|
1259
|
+
})) && input.files.map((elem, _index30) => "string" === typeof elem || _report(_exceptionable, {
|
|
1260
|
+
path: _path + ".files[" + _index30 + "]",
|
|
1205
1261
|
expected: "string",
|
|
1206
1262
|
value: elem
|
|
1207
1263
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1224,7 +1280,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1224
1280
|
"Please remove the property next time."
|
|
1225
1281
|
].join("\n")
|
|
1226
1282
|
});
|
|
1227
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1283
|
+
}).every(flag => flag))].every(flag => flag); const _vo23 = (input, _path, _exceptionable = true) => ["HF" === input.type || _report(_exceptionable, {
|
|
1228
1284
|
path: _path + ".type",
|
|
1229
1285
|
expected: "\"HF\"",
|
|
1230
1286
|
value: input.type
|
|
@@ -1244,8 +1300,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1244
1300
|
path: _path + ".files",
|
|
1245
1301
|
expected: "(Array<string> | undefined)",
|
|
1246
1302
|
value: input.files
|
|
1247
|
-
})) && input.files.map((elem,
|
|
1248
|
-
path: _path + ".files[" +
|
|
1303
|
+
})) && input.files.map((elem, _index31) => "string" === typeof elem || _report(_exceptionable, {
|
|
1304
|
+
path: _path + ".files[" + _index31 + "]",
|
|
1249
1305
|
expected: "string",
|
|
1250
1306
|
value: elem
|
|
1251
1307
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1272,7 +1328,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1272
1328
|
"Please remove the property next time."
|
|
1273
1329
|
].join("\n")
|
|
1274
1330
|
});
|
|
1275
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1331
|
+
}).every(flag => flag))].every(flag => flag); const _vo24 = (input, _path, _exceptionable = true) => ["Ollama" === input.type || _report(_exceptionable, {
|
|
1276
1332
|
path: _path + ".type",
|
|
1277
1333
|
expected: "\"Ollama\"",
|
|
1278
1334
|
value: input.type
|
|
@@ -1300,11 +1356,11 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1300
1356
|
"Please remove the property next time."
|
|
1301
1357
|
].join("\n")
|
|
1302
1358
|
});
|
|
1303
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1359
|
+
}).every(flag => flag))].every(flag => flag); const _vo25 = (input, _path, _exceptionable = true) => [undefined === input.docker || ("object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) || _report(_exceptionable, {
|
|
1304
1360
|
path: _path + ".docker",
|
|
1305
1361
|
expected: "(DockerAuth | undefined)",
|
|
1306
1362
|
value: input.docker
|
|
1307
|
-
})) &&
|
|
1363
|
+
})) && _vo26(input.docker, _path + ".docker", true && _exceptionable) || _report(_exceptionable, {
|
|
1308
1364
|
path: _path + ".docker",
|
|
1309
1365
|
expected: "(DockerAuth | undefined)",
|
|
1310
1366
|
value: input.docker
|
|
@@ -1324,7 +1380,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1324
1380
|
"Please remove the property next time."
|
|
1325
1381
|
].join("\n")
|
|
1326
1382
|
});
|
|
1327
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1383
|
+
}).every(flag => flag))].every(flag => flag); const _vo26 = (input, _path, _exceptionable = true) => [undefined === input.username || "string" === typeof input.username || _report(_exceptionable, {
|
|
1328
1384
|
path: _path + ".username",
|
|
1329
1385
|
expected: "(string | undefined)",
|
|
1330
1386
|
value: input.username
|
|
@@ -1356,7 +1412,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1356
1412
|
"Please remove the property next time."
|
|
1357
1413
|
].join("\n")
|
|
1358
1414
|
});
|
|
1359
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1415
|
+
}).every(flag => flag))].every(flag => flag); const _vo27 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
1360
1416
|
path: _path + ".name",
|
|
1361
1417
|
expected: "string",
|
|
1362
1418
|
value: input.name
|
|
@@ -1376,7 +1432,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1376
1432
|
"Please remove the property next time."
|
|
1377
1433
|
].join("\n")
|
|
1378
1434
|
});
|
|
1379
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1435
|
+
}).every(flag => flag))].every(flag => flag); const _vo28 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1380
1436
|
const value = input[key];
|
|
1381
1437
|
if (undefined === value)
|
|
1382
1438
|
return true;
|
|
@@ -1392,12 +1448,12 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1392
1448
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1393
1449
|
expected: "(OperationResult | string)",
|
|
1394
1450
|
value: value
|
|
1395
|
-
})) &&
|
|
1451
|
+
})) && _vo29(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
1396
1452
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1397
1453
|
expected: "(OperationResult | string)",
|
|
1398
1454
|
value: value
|
|
1399
1455
|
}));
|
|
1400
|
-
}).every(flag => flag)].every(flag => flag); const
|
|
1456
|
+
}).every(flag => flag)].every(flag => flag); const _vo29 = (input, _path, _exceptionable = true) => ["string" === typeof input.regex || _report(_exceptionable, {
|
|
1401
1457
|
path: _path + ".regex",
|
|
1402
1458
|
expected: "string",
|
|
1403
1459
|
value: input.regex
|
|
@@ -1417,8 +1473,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1417
1473
|
path: _path + ".logType",
|
|
1418
1474
|
expected: "Array<> & UniqueLogTypeTag",
|
|
1419
1475
|
value: input.logType
|
|
1420
|
-
})) && input.logType.map((elem,
|
|
1421
|
-
path: _path + ".logType[" +
|
|
1476
|
+
})) && input.logType.map((elem, _index32) => "stdin" === elem || "stdout" === elem || "stderr" === elem || "nodeerr" === elem || _report(_exceptionable, {
|
|
1477
|
+
path: _path + ".logType[" + _index32 + "]",
|
|
1422
1478
|
expected: "(\"nodeerr\" | \"stderr\" | \"stdin\" | \"stdout\")",
|
|
1423
1479
|
value: elem
|
|
1424
1480
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -1441,7 +1497,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1441
1497
|
"Please remove the property next time."
|
|
1442
1498
|
].join("\n")
|
|
1443
1499
|
});
|
|
1444
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1500
|
+
}).every(flag => flag))].every(flag => flag); const _vo30 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1445
1501
|
path: _path + ".group",
|
|
1446
1502
|
expected: "(string | undefined)",
|
|
1447
1503
|
value: input.group
|
|
@@ -1477,7 +1533,7 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1477
1533
|
"Please remove the property next time."
|
|
1478
1534
|
].join("\n")
|
|
1479
1535
|
});
|
|
1480
|
-
}).every(flag => flag))].every(flag => flag); const
|
|
1536
|
+
}).every(flag => flag))].every(flag => flag); const _vo31 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1481
1537
|
path: _path + ".group",
|
|
1482
1538
|
expected: "(string | undefined)",
|
|
1483
1539
|
value: input.group
|
|
@@ -1485,8 +1541,8 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1485
1541
|
path: _path + ".depends_on",
|
|
1486
1542
|
expected: "Array<string>",
|
|
1487
1543
|
value: input.depends_on
|
|
1488
|
-
})) && input.depends_on.map((elem,
|
|
1489
|
-
path: _path + ".depends_on[" +
|
|
1544
|
+
})) && input.depends_on.map((elem, _index33) => "string" === typeof elem || _report(_exceptionable, {
|
|
1545
|
+
path: _path + ".depends_on[" + _index33 + "]",
|
|
1490
1546
|
expected: "string",
|
|
1491
1547
|
value: elem
|
|
1492
1548
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1539,20 +1595,20 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1539
1595
|
if (undefined !== input.__spread__)
|
|
1540
1596
|
return _vo12(input, _path, true && _exceptionable);
|
|
1541
1597
|
else if (undefined !== input.bucket)
|
|
1542
|
-
return _vo19(input, _path, true && _exceptionable);
|
|
1543
|
-
else if (undefined !== input.buckets)
|
|
1544
1598
|
return _vo20(input, _path, true && _exceptionable);
|
|
1599
|
+
else if (undefined !== input.buckets)
|
|
1600
|
+
return _vo21(input, _path, true && _exceptionable);
|
|
1545
1601
|
else if ("HF" === input.type)
|
|
1546
|
-
return _vo22(input, _path, true && _exceptionable);
|
|
1547
|
-
else if ("Ollama" === input.type)
|
|
1548
1602
|
return _vo23(input, _path, true && _exceptionable);
|
|
1603
|
+
else if ("Ollama" === input.type)
|
|
1604
|
+
return _vo24(input, _path, true && _exceptionable);
|
|
1549
1605
|
else
|
|
1550
|
-
return
|
|
1606
|
+
return _vo18(input, _path, true && _exceptionable);
|
|
1551
1607
|
})(); const _vu3 = (input, _path, _exceptionable = true) => (() => {
|
|
1552
1608
|
if (undefined !== input.image)
|
|
1553
1609
|
return _vo10(input, _path, true && _exceptionable);
|
|
1554
1610
|
else if (undefined !== input.name)
|
|
1555
|
-
return
|
|
1611
|
+
return _vo27(input, _path, true && _exceptionable);
|
|
1556
1612
|
else
|
|
1557
1613
|
return _report(_exceptionable, {
|
|
1558
1614
|
path: _path,
|
|
@@ -1560,10 +1616,10 @@ export const validateJobDefinition = (() => { const _io0 = (input, _exceptionabl
|
|
|
1560
1616
|
value: input
|
|
1561
1617
|
});
|
|
1562
1618
|
})(); const _vu4 = (input, _path, _exceptionable = true) => (() => {
|
|
1563
|
-
if (Array.isArray(input.depends_on) && input.depends_on.map((elem,
|
|
1564
|
-
return
|
|
1619
|
+
if (Array.isArray(input.depends_on) && input.depends_on.map((elem, _index34) => "string" === typeof elem).every(flag => flag))
|
|
1620
|
+
return _vo31(input, _path, true && _exceptionable);
|
|
1565
1621
|
else
|
|
1566
|
-
return
|
|
1622
|
+
return _vo30(input, _path, true && _exceptionable);
|
|
1567
1623
|
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
1568
1624
|
if (false === __is(input)) {
|
|
1569
1625
|
errors = [];
|