@nosana/types 2.20.1 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/index.d.ts +29 -7
- package/dist/Common/index.d.ts.map +1 -1
- package/dist/Common/index.js +6 -0
- package/dist/Common/index.js.map +1 -1
- package/dist/Jobs/Flows/index.d.ts +9 -5
- package/dist/Jobs/Flows/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/args/expose.d.ts +17 -2
- package/dist/Jobs/JobDefinition/args/expose.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/args/expose.js.map +1 -1
- package/dist/Jobs/JobDefinition/args/index.d.ts +38 -0
- package/dist/Jobs/JobDefinition/args/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/args/index.js +660 -41
- package/dist/Jobs/JobDefinition/args/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/args/output.d.ts +2 -0
- package/dist/Jobs/JobDefinition/args/output.d.ts.map +1 -0
- package/dist/Jobs/JobDefinition/args/output.js +2 -0
- package/dist/Jobs/JobDefinition/args/output.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/required_vram.d.ts +2 -0
- package/dist/Jobs/JobDefinition/args/required_vram.d.ts.map +1 -0
- package/dist/Jobs/JobDefinition/args/required_vram.js +2 -0
- package/dist/Jobs/JobDefinition/args/required_vram.js.map +1 -0
- package/dist/Jobs/JobDefinition/args/trusted_execution_env.d.ts +6 -0
- package/dist/Jobs/JobDefinition/args/trusted_execution_env.d.ts.map +1 -0
- package/dist/Jobs/JobDefinition/args/trusted_execution_env.js +5 -0
- package/dist/Jobs/JobDefinition/args/trusted_execution_env.js.map +1 -0
- package/dist/Jobs/JobDefinition/index.d.ts +8 -4
- package/dist/Jobs/JobDefinition/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/logistics/index.d.ts +2 -2
- package/dist/Jobs/JobDefinition/logistics/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/logistics/index.js +10 -10
- package/dist/Jobs/JobDefinition/meta/index.d.ts +1 -1
- package/dist/Jobs/JobDefinition/meta/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/meta/index.js +2 -48
- package/dist/Jobs/JobDefinition/meta/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/operations/index.d.ts +18 -3
- package/dist/Jobs/JobDefinition/operations/index.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/operations/index.js +759 -201
- package/dist/Jobs/JobDefinition/operations/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/operations/rules.d.ts +1 -0
- package/dist/Jobs/JobDefinition/operations/rules.d.ts.map +1 -1
- package/dist/Jobs/JobDefinition/operations/rules.js +3 -0
- package/dist/Jobs/JobDefinition/operations/rules.js.map +1 -1
- package/dist/Jobs/index.d.ts +2 -2
- package/dist/Jobs/index.d.ts.map +1 -1
- package/dist/Jobs/index.js +450 -215
- package/dist/Jobs/index.js.map +1 -1
- package/dist/Schemas/job.js +198 -85
- package/dist/Schemas/job.js.map +1 -1
- package/dist/Schemas/node.d.ts +57 -17
- package/dist/Schemas/node.d.ts.map +1 -1
- package/dist/Schemas/nodeOpenApi.d.ts.map +1 -1
- package/dist/Schemas/nodeOpenApi.js +206 -79
- package/dist/Schemas/nodeOpenApi.js.map +1 -1
- package/openapi/node.openapi.json +211 -79
- package/package.json +2 -2
|
@@ -10,9 +10,12 @@ export * from "./expose.js";
|
|
|
10
10
|
export * from "./gpu.js";
|
|
11
11
|
export * from "./image.js";
|
|
12
12
|
export * from "./literals.js";
|
|
13
|
+
export * from "./output.js";
|
|
13
14
|
export * from "./private.js";
|
|
15
|
+
export * from "./required_vram.js";
|
|
14
16
|
export * from "./resources.js";
|
|
15
17
|
export * from "./restart_policy.js";
|
|
18
|
+
export * from "./trusted_execution_env.js";
|
|
16
19
|
export * from "./variables.js";
|
|
17
20
|
export * from "./volumes.js";
|
|
18
21
|
export * from "./work_dir.js";
|
|
@@ -194,7 +197,13 @@ export const validateExpose = (() => { const _io0 = (input, _exceptionable = tru
|
|
|
194
197
|
if (undefined === value)
|
|
195
198
|
return true;
|
|
196
199
|
return false;
|
|
197
|
-
})); const _io1 = (input, _exceptionable = true) => "number" === typeof input.port
|
|
200
|
+
})); const _io1 = (input, _exceptionable = true) => ("number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
201
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
202
|
+
if (!match)
|
|
203
|
+
return false;
|
|
204
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
205
|
+
return a < b;
|
|
206
|
+
})())) && (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, _index2) => "object" === typeof elem && null !== elem && _iu0(elem, true && _exceptionable))) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
198
207
|
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
199
208
|
return true;
|
|
200
209
|
const value = input[key];
|
|
@@ -262,9 +271,19 @@ export const validateExpose = (() => { const _io0 = (input, _exceptionable = tru
|
|
|
262
271
|
"Please remove the property next time."
|
|
263
272
|
].join("\n")
|
|
264
273
|
});
|
|
265
|
-
}).every(flag => flag))].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["number" === typeof input.port ||
|
|
274
|
+
}).every(flag => flag))].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
275
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
276
|
+
if (!match)
|
|
277
|
+
return false;
|
|
278
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
279
|
+
return a < b;
|
|
280
|
+
})() || _report(_exceptionable, {
|
|
266
281
|
path: _path + ".port",
|
|
267
|
-
expected: "
|
|
282
|
+
expected: "string & TagBase<__type>",
|
|
283
|
+
value: input.port
|
|
284
|
+
})) || _report(_exceptionable, {
|
|
285
|
+
path: _path + ".port",
|
|
286
|
+
expected: "((string & TagBase<__type>) | number)",
|
|
268
287
|
value: input.port
|
|
269
288
|
}), undefined === input.type || "api" === input.type || "web" === input.type || "websocket" === input.type || "webapi" === input.type || "none" === input.type || _report(_exceptionable, {
|
|
270
289
|
path: _path + ".type",
|
|
@@ -405,7 +424,13 @@ export const validateExpose = (() => { const _io0 = (input, _exceptionable = tru
|
|
|
405
424
|
expected: "(__type | ExposedPort)",
|
|
406
425
|
value: input
|
|
407
426
|
});
|
|
408
|
-
})(); const __is = (input, _exceptionable = true) => null !== input && undefined !== input && ("number" === typeof input || "string" === typeof input && (typeof input === "string" && /^%%(ops|global).[^%]+%%$/.test(input)
|
|
427
|
+
})(); const __is = (input, _exceptionable = true) => null !== input && undefined !== input && ("number" === typeof input || "string" === typeof input && (typeof input === "string" && /^%%(ops|global).[^%]+%%$/.test(input) || typeof input === "string" && (() => {
|
|
428
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input);
|
|
429
|
+
if (!match)
|
|
430
|
+
return false;
|
|
431
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
432
|
+
return a < b;
|
|
433
|
+
})()) || (Array.isArray(input) && ((() => {
|
|
409
434
|
if (!Array.isArray(input))
|
|
410
435
|
return true;
|
|
411
436
|
const numbers = new Set();
|
|
@@ -440,21 +465,33 @@ export const validateExpose = (() => { const _io0 = (input, _exceptionable = tru
|
|
|
440
465
|
}
|
|
441
466
|
}
|
|
442
467
|
return true;
|
|
443
|
-
})() && input.every((elem, _index1) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem)
|
|
468
|
+
})() && input.every((elem, _index1) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || typeof elem === "string" && (() => {
|
|
469
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
470
|
+
if (!match)
|
|
471
|
+
return false;
|
|
472
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
473
|
+
return a < b;
|
|
474
|
+
})()) || "object" === typeof elem && null !== elem && _iu1(elem, true)))) || "object" === typeof input && null !== input && _iu1(input, true))); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
444
475
|
if (false === __is(input)) {
|
|
445
476
|
errors = [];
|
|
446
477
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
447
478
|
((input, _path, _exceptionable = true) => (null !== input || _report(true, {
|
|
448
479
|
path: _path + "",
|
|
449
|
-
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
480
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
450
481
|
value: input
|
|
451
482
|
})) && (undefined !== input || _report(true, {
|
|
452
483
|
path: _path + "",
|
|
453
|
-
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
484
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
454
485
|
value: input
|
|
455
|
-
})) && ("number" === typeof input || "string" === typeof input && (typeof input === "string" && /^%%(ops|global).[^%]+%%$/.test(input) ||
|
|
486
|
+
})) && ("number" === typeof input || "string" === typeof input && (typeof input === "string" && /^%%(ops|global).[^%]+%%$/.test(input) || typeof input === "string" && (() => {
|
|
487
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input);
|
|
488
|
+
if (!match)
|
|
489
|
+
return false;
|
|
490
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
491
|
+
return a < b;
|
|
492
|
+
})() || _report(true, {
|
|
456
493
|
path: _path + "",
|
|
457
|
-
expected: "string & TagBase<__type>",
|
|
494
|
+
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
458
495
|
value: input
|
|
459
496
|
})) || (Array.isArray(input) && (((() => {
|
|
460
497
|
if (!Array.isArray(input))
|
|
@@ -497,31 +534,37 @@ export const validateExpose = (() => { const _io0 = (input, _exceptionable = tru
|
|
|
497
534
|
value: input
|
|
498
535
|
})) && input.map((elem, _index3) => (null !== elem || _report(true, {
|
|
499
536
|
path: _path + "[" + _index3 + "]",
|
|
500
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
537
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
501
538
|
value: elem
|
|
502
539
|
})) && (undefined !== elem || _report(true, {
|
|
503
540
|
path: _path + "[" + _index3 + "]",
|
|
504
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
541
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
505
542
|
value: elem
|
|
506
|
-
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) ||
|
|
543
|
+
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || typeof elem === "string" && (() => {
|
|
544
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
545
|
+
if (!match)
|
|
546
|
+
return false;
|
|
547
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
548
|
+
return a < b;
|
|
549
|
+
})() || _report(_exceptionable, {
|
|
507
550
|
path: _path + "[" + _index3 + "]",
|
|
508
|
-
expected: "string & TagBase<__type>",
|
|
551
|
+
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
509
552
|
value: elem
|
|
510
553
|
})) || ("object" === typeof elem && null !== elem || _report(true, {
|
|
511
554
|
path: _path + "[" + _index3 + "]",
|
|
512
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
555
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
513
556
|
value: elem
|
|
514
557
|
})) && _vu1(elem, _path + "[" + _index3 + "]", true) || _report(true, {
|
|
515
558
|
path: _path + "[" + _index3 + "]",
|
|
516
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
559
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
517
560
|
value: elem
|
|
518
561
|
}))).every(flag => flag)) || "object" === typeof input && null !== input && _vu1(input, _path + "", true) || _report(true, {
|
|
519
562
|
path: _path + "",
|
|
520
|
-
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
563
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
521
564
|
value: input
|
|
522
565
|
})) || _report(true, {
|
|
523
566
|
path: _path + "",
|
|
524
|
-
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
567
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
525
568
|
value: input
|
|
526
569
|
})))(input, "$input", true);
|
|
527
570
|
const success = 0 === errors.length;
|
|
@@ -1302,7 +1345,13 @@ export const validateVariables = (() => { const _io0 = (input, _exceptionable =
|
|
|
1302
1345
|
data: input
|
|
1303
1346
|
};
|
|
1304
1347
|
}); })();
|
|
1305
|
-
export const validateContainerRun = (() => { const _io0 = (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, _index1) => "string" === typeof elem))) && (null !== input.cmd && (undefined === input.cmd || "string" === typeof input.cmd || Array.isArray(input.cmd) && input.cmd.every((elem, _index2) => "string" === typeof elem))) && (undefined === input.volumes || Array.isArray(input.volumes) && input.volumes.every((elem, _index3) => "object" === typeof elem && null !== elem && _io1(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)
|
|
1348
|
+
export const validateContainerRun = (() => { const _io0 = (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, _index1) => "string" === typeof elem))) && (null !== input.cmd && (undefined === input.cmd || "string" === typeof input.cmd || Array.isArray(input.cmd) && input.cmd.every((elem, _index2) => "string" === typeof elem))) && (undefined === input.volumes || Array.isArray(input.volumes) && input.volumes.every((elem, _index3) => "object" === typeof elem && null !== elem && _io1(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) || typeof input.expose === "string" && (() => {
|
|
1349
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.expose);
|
|
1350
|
+
if (!match)
|
|
1351
|
+
return false;
|
|
1352
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
1353
|
+
return a < b;
|
|
1354
|
+
})()) || (Array.isArray(input.expose) && ((() => {
|
|
1306
1355
|
if (!Array.isArray(input.expose))
|
|
1307
1356
|
return true;
|
|
1308
1357
|
const numbers = new Set();
|
|
@@ -1337,8 +1386,14 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1337
1386
|
}
|
|
1338
1387
|
}
|
|
1339
1388
|
return true;
|
|
1340
|
-
})() && input.expose.every((elem, _index4) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem)
|
|
1341
|
-
|
|
1389
|
+
})() && input.expose.every((elem, _index4) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || typeof elem === "string" && (() => {
|
|
1390
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
1391
|
+
if (!match)
|
|
1392
|
+
return false;
|
|
1393
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
1394
|
+
return a < b;
|
|
1395
|
+
})()) || "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) && (undefined === input.output || "string" === typeof input.output) && (null !== input.entrypoint && (undefined === input.entrypoint || "string" === typeof input.entrypoint || Array.isArray(input.entrypoint) && input.entrypoint.every((elem, _index5) => "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 || "on-failure" === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || "object" === typeof input.restart_policy && null !== input.restart_policy && _io8(input.restart_policy, true && _exceptionable))) && (undefined === input.required_vram || "number" === typeof input.required_vram) && (undefined === input["private"] || "boolean" === typeof input["private"]) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every((elem, _index6) => 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) && _io16(input.authentication, true && _exceptionable)) && (undefined === input.trusted_execution_env || "SEV-SNP" === input.trusted_execution_env || "SEV-GUEST" === input.trusted_execution_env) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
1396
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "output", "entrypoint", "env", "restart_policy", "required_vram", "private", "resources", "authentication", "trusted_execution_env"].some(prop => key === prop))
|
|
1342
1397
|
return true;
|
|
1343
1398
|
const value = input[key];
|
|
1344
1399
|
if (undefined === value)
|
|
@@ -1358,7 +1413,13 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1358
1413
|
if (undefined === value)
|
|
1359
1414
|
return true;
|
|
1360
1415
|
return false;
|
|
1361
|
-
})); const _io3 = (input, _exceptionable = true) => "number" === typeof input.port
|
|
1416
|
+
})); const _io3 = (input, _exceptionable = true) => ("number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
1417
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
1418
|
+
if (!match)
|
|
1419
|
+
return false;
|
|
1420
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
1421
|
+
return a < b;
|
|
1422
|
+
})())) && (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, _index7) => "object" === typeof elem && null !== elem && _iu0(elem, true && _exceptionable))) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
1362
1423
|
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
1363
1424
|
return true;
|
|
1364
1425
|
const value = input[key];
|
|
@@ -1540,11 +1601,17 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1540
1601
|
value: input.volumes
|
|
1541
1602
|
}), (null !== input.expose || _report(_exceptionable, {
|
|
1542
1603
|
path: _path + ".expose",
|
|
1543
|
-
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number | undefined)",
|
|
1604
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number | undefined)",
|
|
1544
1605
|
value: input.expose
|
|
1545
|
-
})) && (undefined === input.expose || "number" === typeof input.expose || "string" === typeof input.expose && (typeof input.expose === "string" && /^%%(ops|global).[^%]+%%$/.test(input.expose) ||
|
|
1606
|
+
})) && (undefined === input.expose || "number" === typeof input.expose || "string" === typeof input.expose && (typeof input.expose === "string" && /^%%(ops|global).[^%]+%%$/.test(input.expose) || typeof input.expose === "string" && (() => {
|
|
1607
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.expose);
|
|
1608
|
+
if (!match)
|
|
1609
|
+
return false;
|
|
1610
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
1611
|
+
return a < b;
|
|
1612
|
+
})() || _report(_exceptionable, {
|
|
1546
1613
|
path: _path + ".expose",
|
|
1547
|
-
expected: "string & TagBase<__type>",
|
|
1614
|
+
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
1548
1615
|
value: input.expose
|
|
1549
1616
|
})) || (Array.isArray(input.expose) && (((() => {
|
|
1550
1617
|
if (!Array.isArray(input.expose))
|
|
@@ -1587,31 +1654,37 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1587
1654
|
value: input.expose
|
|
1588
1655
|
})) && input.expose.map((elem, _index15) => (null !== elem || _report(_exceptionable, {
|
|
1589
1656
|
path: _path + ".expose[" + _index15 + "]",
|
|
1590
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
1657
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
1591
1658
|
value: elem
|
|
1592
1659
|
})) && (undefined !== elem || _report(_exceptionable, {
|
|
1593
1660
|
path: _path + ".expose[" + _index15 + "]",
|
|
1594
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
1661
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
1595
1662
|
value: elem
|
|
1596
|
-
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) ||
|
|
1663
|
+
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || typeof elem === "string" && (() => {
|
|
1664
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
1665
|
+
if (!match)
|
|
1666
|
+
return false;
|
|
1667
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
1668
|
+
return a < b;
|
|
1669
|
+
})() || _report(_exceptionable, {
|
|
1597
1670
|
path: _path + ".expose[" + _index15 + "]",
|
|
1598
|
-
expected: "string & TagBase<__type>",
|
|
1671
|
+
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
1599
1672
|
value: elem
|
|
1600
1673
|
})) || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1601
1674
|
path: _path + ".expose[" + _index15 + "]",
|
|
1602
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
1675
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
1603
1676
|
value: elem
|
|
1604
1677
|
})) && _vu1(elem, _path + ".expose[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1605
1678
|
path: _path + ".expose[" + _index15 + "]",
|
|
1606
|
-
expected: "((__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number)",
|
|
1679
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
1607
1680
|
value: elem
|
|
1608
1681
|
}))).every(flag => flag)) || "object" === typeof input.expose && null !== input.expose && _vu1(input.expose, _path + ".expose", true && _exceptionable) || _report(_exceptionable, {
|
|
1609
1682
|
path: _path + ".expose",
|
|
1610
|
-
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number | undefined)",
|
|
1683
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number | undefined)",
|
|
1611
1684
|
value: input.expose
|
|
1612
1685
|
})) || _report(_exceptionable, {
|
|
1613
1686
|
path: _path + ".expose",
|
|
1614
|
-
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & TagBase<__type>) | ExposedPort | number | undefined)",
|
|
1687
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number | undefined)",
|
|
1615
1688
|
value: input.expose
|
|
1616
1689
|
})), undefined === input.gpu || "boolean" === typeof input.gpu || _report(_exceptionable, {
|
|
1617
1690
|
path: _path + ".gpu",
|
|
@@ -1621,6 +1694,10 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1621
1694
|
path: _path + ".work_dir",
|
|
1622
1695
|
expected: "(string | undefined)",
|
|
1623
1696
|
value: input.work_dir
|
|
1697
|
+
}), undefined === input.output || "string" === typeof input.output || _report(_exceptionable, {
|
|
1698
|
+
path: _path + ".output",
|
|
1699
|
+
expected: "(string | undefined)",
|
|
1700
|
+
value: input.output
|
|
1624
1701
|
}), (null !== input.entrypoint || _report(_exceptionable, {
|
|
1625
1702
|
path: _path + ".entrypoint",
|
|
1626
1703
|
expected: "(CMDArray | string | undefined)",
|
|
@@ -1647,17 +1724,21 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1647
1724
|
value: input.env
|
|
1648
1725
|
}), (null !== input.restart_policy || _report(_exceptionable, {
|
|
1649
1726
|
path: _path + ".restart_policy",
|
|
1650
|
-
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.
|
|
1727
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o5 | undefined)",
|
|
1651
1728
|
value: input.restart_policy
|
|
1652
1729
|
})) && (undefined === input.restart_policy || "on-failure" === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || ("object" === typeof input.restart_policy && null !== input.restart_policy || _report(_exceptionable, {
|
|
1653
1730
|
path: _path + ".restart_policy",
|
|
1654
|
-
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.
|
|
1731
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o5 | undefined)",
|
|
1655
1732
|
value: input.restart_policy
|
|
1656
1733
|
})) && _vo8(input.restart_policy, _path + ".restart_policy", true && _exceptionable) || _report(_exceptionable, {
|
|
1657
1734
|
path: _path + ".restart_policy",
|
|
1658
|
-
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.
|
|
1735
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o5 | undefined)",
|
|
1659
1736
|
value: input.restart_policy
|
|
1660
|
-
})), undefined === input
|
|
1737
|
+
})), undefined === input.required_vram || "number" === typeof input.required_vram || _report(_exceptionable, {
|
|
1738
|
+
path: _path + ".required_vram",
|
|
1739
|
+
expected: "(number | undefined)",
|
|
1740
|
+
value: input.required_vram
|
|
1741
|
+
}), undefined === input["private"] || "boolean" === typeof input["private"] || _report(_exceptionable, {
|
|
1661
1742
|
path: _path + "[\"private\"]",
|
|
1662
1743
|
expected: "(boolean | undefined)",
|
|
1663
1744
|
value: input["private"]
|
|
@@ -1693,8 +1774,12 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1693
1774
|
path: _path + ".authentication",
|
|
1694
1775
|
expected: "(Authentication | undefined)",
|
|
1695
1776
|
value: input.authentication
|
|
1777
|
+
}), undefined === input.trusted_execution_env || "SEV-SNP" === input.trusted_execution_env || "SEV-GUEST" === input.trusted_execution_env || _report(_exceptionable, {
|
|
1778
|
+
path: _path + ".trusted_execution_env",
|
|
1779
|
+
expected: "(\"SEV-GUEST\" | \"SEV-SNP\" | undefined)",
|
|
1780
|
+
value: input.trusted_execution_env
|
|
1696
1781
|
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1697
|
-
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "entrypoint", "env", "restart_policy", "private", "resources", "authentication"].some(prop => key === prop))
|
|
1782
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "gpu", "work_dir", "output", "entrypoint", "env", "restart_policy", "required_vram", "private", "resources", "authentication", "trusted_execution_env"].some(prop => key === prop))
|
|
1698
1783
|
return true;
|
|
1699
1784
|
const value = input[key];
|
|
1700
1785
|
if (undefined === value)
|
|
@@ -1761,9 +1846,19 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
1761
1846
|
"Please remove the property next time."
|
|
1762
1847
|
].join("\n")
|
|
1763
1848
|
});
|
|
1764
|
-
}).every(flag => flag))].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["number" === typeof input.port ||
|
|
1849
|
+
}).every(flag => flag))].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
1850
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
1851
|
+
if (!match)
|
|
1852
|
+
return false;
|
|
1853
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
1854
|
+
return a < b;
|
|
1855
|
+
})() || _report(_exceptionable, {
|
|
1765
1856
|
path: _path + ".port",
|
|
1766
|
-
expected: "
|
|
1857
|
+
expected: "string & TagBase<__type>",
|
|
1858
|
+
value: input.port
|
|
1859
|
+
})) || _report(_exceptionable, {
|
|
1860
|
+
path: _path + ".port",
|
|
1861
|
+
expected: "((string & TagBase<__type>) | number)",
|
|
1767
1862
|
value: input.port
|
|
1768
1863
|
}), undefined === input.type || "api" === input.type || "web" === input.type || "websocket" === input.type || "webapi" === input.type || "none" === input.type || _report(_exceptionable, {
|
|
1769
1864
|
path: _path + ".type",
|
|
@@ -2053,11 +2148,11 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
2053
2148
|
value: input.buckets
|
|
2054
2149
|
})) && input.buckets.map((elem, _index20) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2055
2150
|
path: _path + ".buckets[" + _index20 + "]",
|
|
2056
|
-
expected: "__type.
|
|
2151
|
+
expected: "__type.o6",
|
|
2057
2152
|
value: elem
|
|
2058
2153
|
})) && _vo13(elem, _path + ".buckets[" + _index20 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2059
2154
|
path: _path + ".buckets[" + _index20 + "]",
|
|
2060
|
-
expected: "__type.
|
|
2155
|
+
expected: "__type.o6",
|
|
2061
2156
|
value: elem
|
|
2062
2157
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
2063
2158
|
path: _path + ".buckets",
|
|
@@ -2322,6 +2417,530 @@ export const validateContainerRun = (() => { const _io0 = (input, _exceptionable
|
|
|
2322
2417
|
data: input
|
|
2323
2418
|
};
|
|
2324
2419
|
}); })();
|
|
2420
|
+
export const validateVmRunArgs = (() => { const _io0 = (input, _exceptionable = true) => "string" === typeof input.image && (undefined === input.cpu || "number" === typeof input.cpu) && (undefined === input.memory || "string" === typeof input.memory || "number" === typeof input.memory) && (undefined === input.disk || "string" === typeof input.disk || "number" === typeof input.disk) && (undefined === input.gpu || "boolean" === typeof input.gpu) && (null !== input.cmd && (undefined === input.cmd || "string" === typeof input.cmd || Array.isArray(input.cmd) && input.cmd.every((elem, _index1) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io1(input.env, 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) || typeof input.expose === "string" && (() => {
|
|
2421
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.expose);
|
|
2422
|
+
if (!match)
|
|
2423
|
+
return false;
|
|
2424
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
2425
|
+
return a < b;
|
|
2426
|
+
})()) || (Array.isArray(input.expose) && ((() => {
|
|
2427
|
+
if (!Array.isArray(input.expose))
|
|
2428
|
+
return true;
|
|
2429
|
+
const numbers = new Set();
|
|
2430
|
+
const ranges = [];
|
|
2431
|
+
for (const el of input.expose) {
|
|
2432
|
+
if (typeof el === "string" && /^%%(ops|global).[^%]+%%$/.test(el))
|
|
2433
|
+
continue;
|
|
2434
|
+
if (el && typeof el === "object" && !Array.isArray(el) && el.__spread__)
|
|
2435
|
+
continue;
|
|
2436
|
+
const port = typeof el === "object" ? el.port : el;
|
|
2437
|
+
if (typeof port === "number") {
|
|
2438
|
+
if (numbers.has(port))
|
|
2439
|
+
return false;
|
|
2440
|
+
numbers.add(port);
|
|
2441
|
+
}
|
|
2442
|
+
else if (typeof port === "string") {
|
|
2443
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(port);
|
|
2444
|
+
if (!match)
|
|
2445
|
+
return false;
|
|
2446
|
+
const start = Number(match[1]), end = Number(match[2]);
|
|
2447
|
+
for (const [rStart, rEnd] of ranges) {
|
|
2448
|
+
if (start <= rEnd && end >= rStart)
|
|
2449
|
+
return false;
|
|
2450
|
+
}
|
|
2451
|
+
ranges.push([start, end]);
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
for (const port of numbers) {
|
|
2455
|
+
for (const [start, end] of ranges) {
|
|
2456
|
+
if (port >= start && port <= end)
|
|
2457
|
+
return false;
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
return true;
|
|
2461
|
+
})() && input.expose.every((elem, _index2) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || typeof elem === "string" && (() => {
|
|
2462
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
2463
|
+
if (!match)
|
|
2464
|
+
return false;
|
|
2465
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
2466
|
+
return a < b;
|
|
2467
|
+
})()) || "object" === typeof elem && null !== elem && _iu1(elem, true && _exceptionable)))) || "object" === typeof input.expose && null !== input.expose && _iu1(input.expose, true && _exceptionable)))) && (undefined === input["private"] || "boolean" === typeof input["private"]) && (null !== input.restart_policy && (undefined === input.restart_policy || "on-failure" === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || "object" === typeof input.restart_policy && null !== input.restart_policy && _io7(input.restart_policy, true && _exceptionable))) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
2468
|
+
if (["image", "cpu", "memory", "disk", "gpu", "cmd", "env", "expose", "private", "restart_policy"].some(prop => key === prop))
|
|
2469
|
+
return true;
|
|
2470
|
+
const value = input[key];
|
|
2471
|
+
if (undefined === value)
|
|
2472
|
+
return true;
|
|
2473
|
+
return false;
|
|
2474
|
+
})); const _io1 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
2475
|
+
const value = input[key];
|
|
2476
|
+
if (undefined === value)
|
|
2477
|
+
return true;
|
|
2478
|
+
return "string" === typeof value;
|
|
2479
|
+
}); const _io2 = (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 => {
|
|
2480
|
+
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
2481
|
+
return true;
|
|
2482
|
+
const value = input[key];
|
|
2483
|
+
if (undefined === value)
|
|
2484
|
+
return true;
|
|
2485
|
+
return false;
|
|
2486
|
+
})); const _io3 = (input, _exceptionable = true) => ("number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
2487
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
2488
|
+
if (!match)
|
|
2489
|
+
return false;
|
|
2490
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
2491
|
+
return a < b;
|
|
2492
|
+
})())) && (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, _index3) => "object" === typeof elem && null !== elem && _iu0(elem, true && _exceptionable))) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
2493
|
+
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
2494
|
+
return true;
|
|
2495
|
+
const value = input[key];
|
|
2496
|
+
if (undefined === value)
|
|
2497
|
+
return true;
|
|
2498
|
+
return false;
|
|
2499
|
+
})); const _io4 = (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) && _io5(input.headers, true && _exceptionable)) && true && "boolean" === typeof input.continuous && (5 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
2500
|
+
if (["type", "path", "method", "expected_status", "headers", "body", "continuous"].some(prop => key === prop))
|
|
2501
|
+
return true;
|
|
2502
|
+
const value = input[key];
|
|
2503
|
+
if (undefined === value)
|
|
2504
|
+
return true;
|
|
2505
|
+
return false;
|
|
2506
|
+
})); const _io5 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
2507
|
+
const value = input[key];
|
|
2508
|
+
if (undefined === value)
|
|
2509
|
+
return true;
|
|
2510
|
+
return "string" === typeof value;
|
|
2511
|
+
}); const _io6 = (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 => {
|
|
2512
|
+
if (["type", "expected_response", "continuous"].some(prop => key === prop))
|
|
2513
|
+
return true;
|
|
2514
|
+
const value = input[key];
|
|
2515
|
+
if (undefined === value)
|
|
2516
|
+
return true;
|
|
2517
|
+
return false;
|
|
2518
|
+
})); const _io7 = (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 => {
|
|
2519
|
+
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
2520
|
+
return true;
|
|
2521
|
+
const value = input[key];
|
|
2522
|
+
if (undefined === value)
|
|
2523
|
+
return true;
|
|
2524
|
+
return false;
|
|
2525
|
+
})); const _iu0 = (input, _exceptionable = true) => (() => {
|
|
2526
|
+
if ("http" === input.type)
|
|
2527
|
+
return _io4(input, true && _exceptionable);
|
|
2528
|
+
else if ("websocket" === input.type)
|
|
2529
|
+
return _io6(input, true && _exceptionable);
|
|
2530
|
+
else
|
|
2531
|
+
return false;
|
|
2532
|
+
})(); const _iu1 = (input, _exceptionable = true) => (() => {
|
|
2533
|
+
if (undefined !== input.__spread__)
|
|
2534
|
+
return _io2(input, true && _exceptionable);
|
|
2535
|
+
else if (undefined !== input.port)
|
|
2536
|
+
return _io3(input, true && _exceptionable);
|
|
2537
|
+
else
|
|
2538
|
+
return false;
|
|
2539
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.image || _report(_exceptionable, {
|
|
2540
|
+
path: _path + ".image",
|
|
2541
|
+
expected: "string",
|
|
2542
|
+
value: input.image
|
|
2543
|
+
}), undefined === input.cpu || "number" === typeof input.cpu || _report(_exceptionable, {
|
|
2544
|
+
path: _path + ".cpu",
|
|
2545
|
+
expected: "(number | undefined)",
|
|
2546
|
+
value: input.cpu
|
|
2547
|
+
}), undefined === input.memory || "string" === typeof input.memory || "number" === typeof input.memory || _report(_exceptionable, {
|
|
2548
|
+
path: _path + ".memory",
|
|
2549
|
+
expected: "(number | string | undefined)",
|
|
2550
|
+
value: input.memory
|
|
2551
|
+
}), undefined === input.disk || "string" === typeof input.disk || "number" === typeof input.disk || _report(_exceptionable, {
|
|
2552
|
+
path: _path + ".disk",
|
|
2553
|
+
expected: "(number | string | undefined)",
|
|
2554
|
+
value: input.disk
|
|
2555
|
+
}), undefined === input.gpu || "boolean" === typeof input.gpu || _report(_exceptionable, {
|
|
2556
|
+
path: _path + ".gpu",
|
|
2557
|
+
expected: "(boolean | undefined)",
|
|
2558
|
+
value: input.gpu
|
|
2559
|
+
}), (null !== input.cmd || _report(_exceptionable, {
|
|
2560
|
+
path: _path + ".cmd",
|
|
2561
|
+
expected: "(Array<string> | string | undefined)",
|
|
2562
|
+
value: input.cmd
|
|
2563
|
+
})) && (undefined === input.cmd || "string" === typeof input.cmd || (Array.isArray(input.cmd) || _report(_exceptionable, {
|
|
2564
|
+
path: _path + ".cmd",
|
|
2565
|
+
expected: "(Array<string> | string | undefined)",
|
|
2566
|
+
value: input.cmd
|
|
2567
|
+
})) && input.cmd.map((elem, _index4) => "string" === typeof elem || _report(_exceptionable, {
|
|
2568
|
+
path: _path + ".cmd[" + _index4 + "]",
|
|
2569
|
+
expected: "string",
|
|
2570
|
+
value: elem
|
|
2571
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2572
|
+
path: _path + ".cmd",
|
|
2573
|
+
expected: "(Array<string> | string | undefined)",
|
|
2574
|
+
value: input.cmd
|
|
2575
|
+
})), undefined === input.env || ("object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) || _report(_exceptionable, {
|
|
2576
|
+
path: _path + ".env",
|
|
2577
|
+
expected: "(Env | undefined)",
|
|
2578
|
+
value: input.env
|
|
2579
|
+
})) && _vo1(input.env, _path + ".env", true && _exceptionable) || _report(_exceptionable, {
|
|
2580
|
+
path: _path + ".env",
|
|
2581
|
+
expected: "(Env | undefined)",
|
|
2582
|
+
value: input.env
|
|
2583
|
+
}), (null !== input.expose || _report(_exceptionable, {
|
|
2584
|
+
path: _path + ".expose",
|
|
2585
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number | undefined)",
|
|
2586
|
+
value: input.expose
|
|
2587
|
+
})) && (undefined === input.expose || "number" === typeof input.expose || "string" === typeof input.expose && (typeof input.expose === "string" && /^%%(ops|global).[^%]+%%$/.test(input.expose) || typeof input.expose === "string" && (() => {
|
|
2588
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.expose);
|
|
2589
|
+
if (!match)
|
|
2590
|
+
return false;
|
|
2591
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
2592
|
+
return a < b;
|
|
2593
|
+
})() || _report(_exceptionable, {
|
|
2594
|
+
path: _path + ".expose",
|
|
2595
|
+
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
2596
|
+
value: input.expose
|
|
2597
|
+
})) || (Array.isArray(input.expose) && (((() => {
|
|
2598
|
+
if (!Array.isArray(input.expose))
|
|
2599
|
+
return true;
|
|
2600
|
+
const numbers = new Set();
|
|
2601
|
+
const ranges = [];
|
|
2602
|
+
for (const el of input.expose) {
|
|
2603
|
+
if (typeof el === "string" && /^%%(ops|global).[^%]+%%$/.test(el))
|
|
2604
|
+
continue;
|
|
2605
|
+
if (el && typeof el === "object" && !Array.isArray(el) && el.__spread__)
|
|
2606
|
+
continue;
|
|
2607
|
+
const port = typeof el === "object" ? el.port : el;
|
|
2608
|
+
if (typeof port === "number") {
|
|
2609
|
+
if (numbers.has(port))
|
|
2610
|
+
return false;
|
|
2611
|
+
numbers.add(port);
|
|
2612
|
+
}
|
|
2613
|
+
else if (typeof port === "string") {
|
|
2614
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(port);
|
|
2615
|
+
if (!match)
|
|
2616
|
+
return false;
|
|
2617
|
+
const start = Number(match[1]), end = Number(match[2]);
|
|
2618
|
+
for (const [rStart, rEnd] of ranges) {
|
|
2619
|
+
if (start <= rEnd && end >= rStart)
|
|
2620
|
+
return false;
|
|
2621
|
+
}
|
|
2622
|
+
ranges.push([start, end]);
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
for (const port of numbers) {
|
|
2626
|
+
for (const [start, end] of ranges) {
|
|
2627
|
+
if (port >= start && port <= end)
|
|
2628
|
+
return false;
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
return true;
|
|
2632
|
+
})() || _report(_exceptionable, {
|
|
2633
|
+
path: _path + ".expose",
|
|
2634
|
+
expected: "Array<> & TagBase<__type>",
|
|
2635
|
+
value: input.expose
|
|
2636
|
+
})) && input.expose.map((elem, _index5) => (null !== elem || _report(_exceptionable, {
|
|
2637
|
+
path: _path + ".expose[" + _index5 + "]",
|
|
2638
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
2639
|
+
value: elem
|
|
2640
|
+
})) && (undefined !== elem || _report(_exceptionable, {
|
|
2641
|
+
path: _path + ".expose[" + _index5 + "]",
|
|
2642
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
2643
|
+
value: elem
|
|
2644
|
+
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || typeof elem === "string" && (() => {
|
|
2645
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
2646
|
+
if (!match)
|
|
2647
|
+
return false;
|
|
2648
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
2649
|
+
return a < b;
|
|
2650
|
+
})() || _report(_exceptionable, {
|
|
2651
|
+
path: _path + ".expose[" + _index5 + "]",
|
|
2652
|
+
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
2653
|
+
value: elem
|
|
2654
|
+
})) || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2655
|
+
path: _path + ".expose[" + _index5 + "]",
|
|
2656
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
2657
|
+
value: elem
|
|
2658
|
+
})) && _vu1(elem, _path + ".expose[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2659
|
+
path: _path + ".expose[" + _index5 + "]",
|
|
2660
|
+
expected: "((__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
2661
|
+
value: elem
|
|
2662
|
+
}))).every(flag => flag)) || "object" === typeof input.expose && null !== input.expose && _vu1(input.expose, _path + ".expose", true && _exceptionable) || _report(_exceptionable, {
|
|
2663
|
+
path: _path + ".expose",
|
|
2664
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number | undefined)",
|
|
2665
|
+
value: input.expose
|
|
2666
|
+
})) || _report(_exceptionable, {
|
|
2667
|
+
path: _path + ".expose",
|
|
2668
|
+
expected: "((Array<ExposeBase> & TagBase<__type>) | (__type & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number | undefined)",
|
|
2669
|
+
value: input.expose
|
|
2670
|
+
})), undefined === input["private"] || "boolean" === typeof input["private"] || _report(_exceptionable, {
|
|
2671
|
+
path: _path + "[\"private\"]",
|
|
2672
|
+
expected: "(boolean | undefined)",
|
|
2673
|
+
value: input["private"]
|
|
2674
|
+
}), (null !== input.restart_policy || _report(_exceptionable, {
|
|
2675
|
+
path: _path + ".restart_policy",
|
|
2676
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o5 | undefined)",
|
|
2677
|
+
value: input.restart_policy
|
|
2678
|
+
})) && (undefined === input.restart_policy || "on-failure" === input.restart_policy || "no" === input.restart_policy || "always" === input.restart_policy || "unless-stopped" === input.restart_policy || ("object" === typeof input.restart_policy && null !== input.restart_policy || _report(_exceptionable, {
|
|
2679
|
+
path: _path + ".restart_policy",
|
|
2680
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o5 | undefined)",
|
|
2681
|
+
value: input.restart_policy
|
|
2682
|
+
})) && _vo7(input.restart_policy, _path + ".restart_policy", true && _exceptionable) || _report(_exceptionable, {
|
|
2683
|
+
path: _path + ".restart_policy",
|
|
2684
|
+
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o5 | undefined)",
|
|
2685
|
+
value: input.restart_policy
|
|
2686
|
+
})), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
2687
|
+
if (["image", "cpu", "memory", "disk", "gpu", "cmd", "env", "expose", "private", "restart_policy"].some(prop => key === prop))
|
|
2688
|
+
return true;
|
|
2689
|
+
const value = input[key];
|
|
2690
|
+
if (undefined === value)
|
|
2691
|
+
return true;
|
|
2692
|
+
return _report(_exceptionable, {
|
|
2693
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2694
|
+
expected: "undefined",
|
|
2695
|
+
value: value,
|
|
2696
|
+
description: [
|
|
2697
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
2698
|
+
"",
|
|
2699
|
+
"Please remove the property next time."
|
|
2700
|
+
].join("\n")
|
|
2701
|
+
});
|
|
2702
|
+
}).every(flag => flag))].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
2703
|
+
const value = input[key];
|
|
2704
|
+
if (undefined === value)
|
|
2705
|
+
return true;
|
|
2706
|
+
return "string" === typeof value || _report(_exceptionable, {
|
|
2707
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2708
|
+
expected: "string",
|
|
2709
|
+
value: value
|
|
2710
|
+
});
|
|
2711
|
+
}).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__) || _report(_exceptionable, {
|
|
2712
|
+
path: _path + ".__spread__",
|
|
2713
|
+
expected: "string & TagBase<__type>",
|
|
2714
|
+
value: input.__spread__
|
|
2715
|
+
})) || _report(_exceptionable, {
|
|
2716
|
+
path: _path + ".__spread__",
|
|
2717
|
+
expected: "(string & TagBase<__type>)",
|
|
2718
|
+
value: input.__spread__
|
|
2719
|
+
}), undefined === input.chunked || "boolean" === typeof input.chunked || _report(_exceptionable, {
|
|
2720
|
+
path: _path + ".chunked",
|
|
2721
|
+
expected: "(boolean | undefined)",
|
|
2722
|
+
value: input.chunked
|
|
2723
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
2724
|
+
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
2725
|
+
return true;
|
|
2726
|
+
const value = input[key];
|
|
2727
|
+
if (undefined === value)
|
|
2728
|
+
return true;
|
|
2729
|
+
return _report(_exceptionable, {
|
|
2730
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2731
|
+
expected: "undefined",
|
|
2732
|
+
value: value,
|
|
2733
|
+
description: [
|
|
2734
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
2735
|
+
"",
|
|
2736
|
+
"Please remove the property next time."
|
|
2737
|
+
].join("\n")
|
|
2738
|
+
});
|
|
2739
|
+
}).every(flag => flag))].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
2740
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
2741
|
+
if (!match)
|
|
2742
|
+
return false;
|
|
2743
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
2744
|
+
return a < b;
|
|
2745
|
+
})() || _report(_exceptionable, {
|
|
2746
|
+
path: _path + ".port",
|
|
2747
|
+
expected: "string & TagBase<__type>",
|
|
2748
|
+
value: input.port
|
|
2749
|
+
})) || _report(_exceptionable, {
|
|
2750
|
+
path: _path + ".port",
|
|
2751
|
+
expected: "((string & TagBase<__type>) | number)",
|
|
2752
|
+
value: input.port
|
|
2753
|
+
}), undefined === input.type || "api" === input.type || "web" === input.type || "websocket" === input.type || "webapi" === input.type || "none" === input.type || _report(_exceptionable, {
|
|
2754
|
+
path: _path + ".type",
|
|
2755
|
+
expected: "(\"api\" | \"none\" | \"web\" | \"webapi\" | \"websocket\" | undefined)",
|
|
2756
|
+
value: input.type
|
|
2757
|
+
}), undefined === input.health_checks || (Array.isArray(input.health_checks) || _report(_exceptionable, {
|
|
2758
|
+
path: _path + ".health_checks",
|
|
2759
|
+
expected: "(Array<HealthCheck> | undefined)",
|
|
2760
|
+
value: input.health_checks
|
|
2761
|
+
})) && input.health_checks.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2762
|
+
path: _path + ".health_checks[" + _index6 + "]",
|
|
2763
|
+
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
2764
|
+
value: elem
|
|
2765
|
+
})) && _vu0(elem, _path + ".health_checks[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2766
|
+
path: _path + ".health_checks[" + _index6 + "]",
|
|
2767
|
+
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
2768
|
+
value: elem
|
|
2769
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2770
|
+
path: _path + ".health_checks",
|
|
2771
|
+
expected: "(Array<HealthCheck> | undefined)",
|
|
2772
|
+
value: input.health_checks
|
|
2773
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
2774
|
+
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
2775
|
+
return true;
|
|
2776
|
+
const value = input[key];
|
|
2777
|
+
if (undefined === value)
|
|
2778
|
+
return true;
|
|
2779
|
+
return _report(_exceptionable, {
|
|
2780
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2781
|
+
expected: "undefined",
|
|
2782
|
+
value: value,
|
|
2783
|
+
description: [
|
|
2784
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
2785
|
+
"",
|
|
2786
|
+
"Please remove the property next time."
|
|
2787
|
+
].join("\n")
|
|
2788
|
+
});
|
|
2789
|
+
}).every(flag => flag))].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["http" === input.type || _report(_exceptionable, {
|
|
2790
|
+
path: _path + ".type",
|
|
2791
|
+
expected: "\"http\"",
|
|
2792
|
+
value: input.type
|
|
2793
|
+
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
2794
|
+
path: _path + ".path",
|
|
2795
|
+
expected: "string",
|
|
2796
|
+
value: input.path
|
|
2797
|
+
}), "GET" === input.method || "POST" === input.method || "PUT" === input.method || "DELETE" === input.method || _report(_exceptionable, {
|
|
2798
|
+
path: _path + ".method",
|
|
2799
|
+
expected: "(\"DELETE\" | \"GET\" | \"POST\" | \"PUT\")",
|
|
2800
|
+
value: input.method
|
|
2801
|
+
}), "number" === typeof input.expected_status || _report(_exceptionable, {
|
|
2802
|
+
path: _path + ".expected_status",
|
|
2803
|
+
expected: "number",
|
|
2804
|
+
value: input.expected_status
|
|
2805
|
+
}), undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || _report(_exceptionable, {
|
|
2806
|
+
path: _path + ".headers",
|
|
2807
|
+
expected: "(Record<string, string> | undefined)",
|
|
2808
|
+
value: input.headers
|
|
2809
|
+
})) && _vo5(input.headers, _path + ".headers", true && _exceptionable) || _report(_exceptionable, {
|
|
2810
|
+
path: _path + ".headers",
|
|
2811
|
+
expected: "(Record<string, string> | undefined)",
|
|
2812
|
+
value: input.headers
|
|
2813
|
+
}), true, "boolean" === typeof input.continuous || _report(_exceptionable, {
|
|
2814
|
+
path: _path + ".continuous",
|
|
2815
|
+
expected: "boolean",
|
|
2816
|
+
value: input.continuous
|
|
2817
|
+
}), 5 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
2818
|
+
if (["type", "path", "method", "expected_status", "headers", "body", "continuous"].some(prop => key === prop))
|
|
2819
|
+
return true;
|
|
2820
|
+
const value = input[key];
|
|
2821
|
+
if (undefined === value)
|
|
2822
|
+
return true;
|
|
2823
|
+
return _report(_exceptionable, {
|
|
2824
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2825
|
+
expected: "undefined",
|
|
2826
|
+
value: value,
|
|
2827
|
+
description: [
|
|
2828
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
2829
|
+
"",
|
|
2830
|
+
"Please remove the property next time."
|
|
2831
|
+
].join("\n")
|
|
2832
|
+
});
|
|
2833
|
+
}).every(flag => flag))].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
2834
|
+
const value = input[key];
|
|
2835
|
+
if (undefined === value)
|
|
2836
|
+
return true;
|
|
2837
|
+
return "string" === typeof value || _report(_exceptionable, {
|
|
2838
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2839
|
+
expected: "string",
|
|
2840
|
+
value: value
|
|
2841
|
+
});
|
|
2842
|
+
}).every(flag => flag)].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["websocket" === input.type || _report(_exceptionable, {
|
|
2843
|
+
path: _path + ".type",
|
|
2844
|
+
expected: "\"websocket\"",
|
|
2845
|
+
value: input.type
|
|
2846
|
+
}), "string" === typeof input.expected_response || _report(_exceptionable, {
|
|
2847
|
+
path: _path + ".expected_response",
|
|
2848
|
+
expected: "string",
|
|
2849
|
+
value: input.expected_response
|
|
2850
|
+
}), "boolean" === typeof input.continuous || _report(_exceptionable, {
|
|
2851
|
+
path: _path + ".continuous",
|
|
2852
|
+
expected: "boolean",
|
|
2853
|
+
value: input.continuous
|
|
2854
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
2855
|
+
if (["type", "expected_response", "continuous"].some(prop => key === prop))
|
|
2856
|
+
return true;
|
|
2857
|
+
const value = input[key];
|
|
2858
|
+
if (undefined === value)
|
|
2859
|
+
return true;
|
|
2860
|
+
return _report(_exceptionable, {
|
|
2861
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2862
|
+
expected: "undefined",
|
|
2863
|
+
value: value,
|
|
2864
|
+
description: [
|
|
2865
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
2866
|
+
"",
|
|
2867
|
+
"Please remove the property next time."
|
|
2868
|
+
].join("\n")
|
|
2869
|
+
});
|
|
2870
|
+
}).every(flag => flag))].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["on-failure" === input.policy || _report(_exceptionable, {
|
|
2871
|
+
path: _path + ".policy",
|
|
2872
|
+
expected: "\"on-failure\"",
|
|
2873
|
+
value: input.policy
|
|
2874
|
+
}), undefined === input.restart_tries || "number" === typeof input.restart_tries || _report(_exceptionable, {
|
|
2875
|
+
path: _path + ".restart_tries",
|
|
2876
|
+
expected: "(number | undefined)",
|
|
2877
|
+
value: input.restart_tries
|
|
2878
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
2879
|
+
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
2880
|
+
return true;
|
|
2881
|
+
const value = input[key];
|
|
2882
|
+
if (undefined === value)
|
|
2883
|
+
return true;
|
|
2884
|
+
return _report(_exceptionable, {
|
|
2885
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
2886
|
+
expected: "undefined",
|
|
2887
|
+
value: value,
|
|
2888
|
+
description: [
|
|
2889
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
2890
|
+
"",
|
|
2891
|
+
"Please remove the property next time."
|
|
2892
|
+
].join("\n")
|
|
2893
|
+
});
|
|
2894
|
+
}).every(flag => flag))].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
2895
|
+
if ("http" === input.type)
|
|
2896
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
2897
|
+
else if ("websocket" === input.type)
|
|
2898
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
2899
|
+
else
|
|
2900
|
+
return _report(_exceptionable, {
|
|
2901
|
+
path: _path,
|
|
2902
|
+
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
2903
|
+
value: input
|
|
2904
|
+
});
|
|
2905
|
+
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
2906
|
+
if (undefined !== input.__spread__)
|
|
2907
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
2908
|
+
else if (undefined !== input.port)
|
|
2909
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
2910
|
+
else
|
|
2911
|
+
return _report(_exceptionable, {
|
|
2912
|
+
path: _path,
|
|
2913
|
+
expected: "(__type | ExposedPort)",
|
|
2914
|
+
value: input
|
|
2915
|
+
});
|
|
2916
|
+
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
2917
|
+
if (false === __is(input)) {
|
|
2918
|
+
errors = [];
|
|
2919
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
2920
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
2921
|
+
path: _path + "",
|
|
2922
|
+
expected: "VmRunArgs",
|
|
2923
|
+
value: input
|
|
2924
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
2925
|
+
path: _path + "",
|
|
2926
|
+
expected: "VmRunArgs",
|
|
2927
|
+
value: input
|
|
2928
|
+
}))(input, "$input", true);
|
|
2929
|
+
const success = 0 === errors.length;
|
|
2930
|
+
return success ? {
|
|
2931
|
+
success,
|
|
2932
|
+
data: input
|
|
2933
|
+
} : {
|
|
2934
|
+
success,
|
|
2935
|
+
errors,
|
|
2936
|
+
data: input
|
|
2937
|
+
};
|
|
2938
|
+
}
|
|
2939
|
+
return {
|
|
2940
|
+
success: true,
|
|
2941
|
+
data: input
|
|
2942
|
+
};
|
|
2943
|
+
}); })();
|
|
2325
2944
|
export const validateContainerCreateVolume = (() => { const _io0 = (input, _exceptionable = true) => "string" === typeof input.name && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
2326
2945
|
if (["name"].some(prop => key === prop))
|
|
2327
2946
|
return true;
|