@nosana/node 1.1.14-rc → 1.1.15
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/.env.dev +1 -2
- package/dist/.env.prd +1 -2
- package/dist/package.json +4 -2
- package/dist/src/NodeManager/checkForMaintenance.d.ts +1 -0
- package/dist/src/NodeManager/checkForMaintenance.js +40 -0
- package/dist/src/NodeManager/clients/hostManager/index.d.ts +4 -0
- package/dist/src/NodeManager/clients/hostManager/index.js +25 -0
- package/dist/src/NodeManager/clients/maintenanceMiddleware.d.ts +2 -0
- package/dist/src/NodeManager/clients/maintenanceMiddleware.js +11 -0
- package/dist/src/NodeManager/clients/maintenanceState.d.ts +10 -0
- package/dist/src/NodeManager/clients/maintenanceState.js +66 -0
- package/dist/src/NodeManager/clients/types.utils.d.ts +45 -0
- package/dist/src/NodeManager/configs/configs.d.ts +1 -3
- package/dist/src/NodeManager/configs/configs.js +1 -3
- package/dist/src/NodeManager/errors/NodeBannedError.d.ts +3 -0
- package/dist/src/NodeManager/errors/NodeBannedError.js +6 -0
- package/dist/src/NodeManager/errors/NodeNotQualifiedError.d.ts +3 -0
- package/dist/src/NodeManager/errors/NodeNotQualifiedError.js +6 -0
- package/dist/src/NodeManager/errors/NodeNotRegisteredError.d.ts +3 -0
- package/dist/src/NodeManager/errors/NodeNotRegisteredError.js +6 -0
- package/dist/src/NodeManager/index.js +25 -57
- package/dist/src/NodeManager/monitoring/log/NodeLog.d.ts +0 -1
- package/dist/src/NodeManager/monitoring/log/NodeLog.js +11 -38
- package/dist/src/NodeManager/monitoring/log/console/ConsoleLogger.d.ts +3 -0
- package/dist/src/NodeManager/monitoring/log/console/ConsoleLogger.js +33 -5
- package/dist/src/NodeManager/monitoring/ping/PingHandler.d.ts +2 -4
- package/dist/src/NodeManager/monitoring/ping/PingHandler.js +31 -26
- package/dist/src/NodeManager/monitoring/proxy/loggingProxy.d.ts +2 -1
- package/dist/src/NodeManager/monitoring/proxy/loggingProxy.js +2 -3
- package/dist/src/NodeManager/node/Node.d.ts +4 -6
- package/dist/src/NodeManager/node/Node.js +16 -29
- package/dist/src/NodeManager/node/api/ApiHandler.js +2 -3
- package/dist/src/NodeManager/node/api/middlewares/index.d.ts +0 -1
- package/dist/src/NodeManager/node/api/middlewares/index.js +0 -1
- package/dist/src/NodeManager/node/api/routes/post/index.d.ts +0 -1
- package/dist/src/NodeManager/node/api/routes/post/index.js +0 -1
- package/dist/src/NodeManager/node/grid/gridHandler.d.ts +2 -8
- package/dist/src/NodeManager/node/grid/gridHandler.js +10 -143
- package/dist/src/NodeManager/node/health/healthHandler.d.ts +1 -1
- package/dist/src/NodeManager/node/health/healthHandler.js +13 -11
- package/dist/src/NodeManager/node/job/JobRegistry.js +5 -3
- package/dist/src/NodeManager/node/job/defination/strategy/IpfsJobDefinitionStrategy.d.ts +1 -3
- package/dist/src/NodeManager/node/job/defination/strategy/IpfsJobDefinitionStrategy.js +2 -4
- package/dist/src/NodeManager/node/job/jobExternalUtil.d.ts +2 -3
- package/dist/src/NodeManager/node/job/jobExternalUtil.js +4 -4
- package/dist/src/NodeManager/node/job/jobHandler.js +5 -3
- package/dist/src/NodeManager/node/key/keyHandler.d.ts +0 -1
- package/dist/src/NodeManager/node/key/keyHandler.js +1 -38
- package/dist/src/NodeManager/node/market/benchmark.d.ts +15 -0
- package/dist/src/NodeManager/node/market/benchmark.js +84 -0
- package/dist/src/NodeManager/node/market/hostManager.d.ts +114 -0
- package/dist/src/NodeManager/node/market/hostManager.js +112 -0
- package/dist/src/NodeManager/node/market/marketAccess.d.ts +8 -0
- package/dist/src/NodeManager/node/market/marketAccess.js +53 -0
- package/dist/src/NodeManager/node/market/marketHandler.d.ts +10 -3
- package/dist/src/NodeManager/node/market/marketHandler.js +88 -6
- package/dist/src/NodeManager/node/register/index.d.ts +2 -12
- package/dist/src/NodeManager/node/register/index.js +12 -56
- package/dist/src/NodeManager/node/resource/resourceManager.d.ts +2 -1
- package/dist/src/NodeManager/node/resource/resourceManager.js +4 -4
- package/dist/src/NodeManager/sdk/index.js +4 -14
- package/dist/src/NodeManager/utils/wslCheck.js +1 -1
- package/dist/src/cli/createNosanaCli.js +2 -0
- package/dist/src/ipfs/IpfsClient.d.ts +7 -0
- package/dist/src/ipfs/IpfsClient.js +17 -0
- package/npm-shrinkwrap.json +30 -2
- package/package.json +5 -3
- package/dist/src/NodeManager/client/index.d.ts +0 -4
- package/dist/src/NodeManager/client/index.js +0 -14
- package/dist/src/NodeManager/node/api/middlewares/rest/verifyBackendSignatureMiddleware.d.ts +0 -3
- package/dist/src/NodeManager/node/api/middlewares/rest/verifyBackendSignatureMiddleware.js +0 -20
- package/dist/src/NodeManager/node/api/routes/post/node-validation.d.ts +0 -4
- package/dist/src/NodeManager/node/api/routes/post/node-validation.js +0 -1787
- package/dist/src/NodeManager/node/specs/specsHandler.d.ts +0 -17
- package/dist/src/NodeManager/node/specs/specsHandler.js +0 -135
- package/dist/src/NodeManager/node/specs/type.d.ts +0 -15
- /package/dist/src/NodeManager/{node/specs/type.js → clients/types.utils.js} +0 -0
|
@@ -1,1787 +0,0 @@
|
|
|
1
|
-
import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
|
|
2
|
-
import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js";
|
|
3
|
-
import * as __typia_transform__createStandardSchema from "typia/lib/internal/_createStandardSchema.js";
|
|
4
|
-
import typia from 'typia';
|
|
5
|
-
import { getSDK } from '../../../../sdk/index.js';
|
|
6
|
-
import { generateRandomId } from '../../../utils/generateRandomId.js';
|
|
7
|
-
import TaskManager from '../../../task/TaskManager.js';
|
|
8
|
-
import { configs } from '../../../../configs/configs.js';
|
|
9
|
-
export async function postNodeValidation(req, res) {
|
|
10
|
-
const sdk = getSDK();
|
|
11
|
-
const provider = req.provider;
|
|
12
|
-
const repository = req.repository;
|
|
13
|
-
const validator = (() => { const _io0 = (input, _exceptionable = true) => "string" === typeof input.version && "container" === input.type && (undefined === input.logistics || "object" === typeof input.logistics && null !== input.logistics && false === Array.isArray(input.logistics) && _io1(input.logistics, true && _exceptionable)) && (undefined === input.deployment_id || "string" === typeof input.deployment_id) && (undefined === input.meta || "object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) && _io6(input.meta, true && _exceptionable)) && (undefined === input.global || "object" === typeof input.global && null !== input.global && false === Array.isArray(input.global) && _io8(input.global, true && _exceptionable)) && (Array.isArray(input.ops) && input.ops.every((elem, _index1) => "object" === typeof elem && null !== elem && _io11(elem, true && _exceptionable))) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
14
|
-
if (["version", "type", "logistics", "deployment_id", "meta", "global", "ops"].some(prop => key === prop))
|
|
15
|
-
return true;
|
|
16
|
-
const value = input[key];
|
|
17
|
-
if (undefined === value)
|
|
18
|
-
return true;
|
|
19
|
-
return false;
|
|
20
|
-
})); const _io1 = (input, _exceptionable = true) => (undefined === input.send || "object" === typeof input.send && null !== input.send && _io2(input.send, true && _exceptionable)) && (undefined === input.receive || "object" === typeof input.receive && null !== input.receive && _io4(input.receive, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
21
|
-
if (["send", "receive"].some(prop => key === prop))
|
|
22
|
-
return true;
|
|
23
|
-
const value = input[key];
|
|
24
|
-
if (undefined === value)
|
|
25
|
-
return true;
|
|
26
|
-
return false;
|
|
27
|
-
})); const _io2 = (input, _exceptionable = true) => ("api" === input.type || "api-listen" === input.type) && ("object" === typeof input.args && null !== input.args && false === Array.isArray(input.args) && _io3(input.args, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
28
|
-
if (["type", "args"].some(prop => key === prop))
|
|
29
|
-
return true;
|
|
30
|
-
const value = input[key];
|
|
31
|
-
if (undefined === value)
|
|
32
|
-
return true;
|
|
33
|
-
return false;
|
|
34
|
-
})); const _io3 = (input, _exceptionable = true) => (undefined === input.endpoint || "string" === typeof input.endpoint) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
35
|
-
if (["endpoint"].some(prop => key === prop))
|
|
36
|
-
return true;
|
|
37
|
-
const value = input[key];
|
|
38
|
-
if (undefined === value)
|
|
39
|
-
return true;
|
|
40
|
-
return false;
|
|
41
|
-
})); const _io4 = (input, _exceptionable = true) => ("api" === input.type || "api-listen" === input.type) && ("object" === typeof input.args && null !== input.args && false === Array.isArray(input.args) && _io5(input.args, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
42
|
-
if (["type", "args"].some(prop => key === prop))
|
|
43
|
-
return true;
|
|
44
|
-
const value = input[key];
|
|
45
|
-
if (undefined === value)
|
|
46
|
-
return true;
|
|
47
|
-
return false;
|
|
48
|
-
})); const _io5 = (input, _exceptionable = true) => (undefined === input.endpoint || "string" === typeof input.endpoint) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
49
|
-
if (["endpoint"].some(prop => key === prop))
|
|
50
|
-
return true;
|
|
51
|
-
const value = input[key];
|
|
52
|
-
if (undefined === value)
|
|
53
|
-
return true;
|
|
54
|
-
return false;
|
|
55
|
-
})); const _io6 = (input, _exceptionable = true) => (undefined === input.trigger || "string" === typeof input.trigger) && (undefined === input.system_resources || "object" === typeof input.system_resources && null !== input.system_resources && false === Array.isArray(input.system_resources) && _io7(input.system_resources, true && _exceptionable)) && Object.keys(input).every(key => {
|
|
56
|
-
if (["trigger", "system_resources"].some(prop => key === prop))
|
|
57
|
-
return true;
|
|
58
|
-
const value = input[key];
|
|
59
|
-
if (undefined === value)
|
|
60
|
-
return true;
|
|
61
|
-
return true;
|
|
62
|
-
}); const _io7 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
63
|
-
const value = input[key];
|
|
64
|
-
if (undefined === value)
|
|
65
|
-
return true;
|
|
66
|
-
return "string" === typeof value || "number" === typeof value;
|
|
67
|
-
}); const _io8 = (input, _exceptionable = true) => (undefined === input.image || "string" === typeof input.image) && (undefined === input.gpu || "boolean" === typeof input.gpu) && (null !== input.entrypoint && (undefined === input.entrypoint || "string" === typeof input.entrypoint || Array.isArray(input.entrypoint) && input.entrypoint.every((elem, _index2) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io9(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) && _io10(input.variables, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
68
|
-
if (["image", "gpu", "entrypoint", "env", "work_dir", "variables"].some(prop => key === prop))
|
|
69
|
-
return true;
|
|
70
|
-
const value = input[key];
|
|
71
|
-
if (undefined === value)
|
|
72
|
-
return true;
|
|
73
|
-
return false;
|
|
74
|
-
})); const _io9 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
75
|
-
const value = input[key];
|
|
76
|
-
if (undefined === value)
|
|
77
|
-
return true;
|
|
78
|
-
return "string" === typeof value;
|
|
79
|
-
}); const _io10 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
80
|
-
const value = input[key];
|
|
81
|
-
if (undefined === value)
|
|
82
|
-
return true;
|
|
83
|
-
return "string" === typeof value;
|
|
84
|
-
}); const _io11 = (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) && _io31(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 => {
|
|
85
|
-
if (["type", "id", "args", "results", "execution"].some(prop => key === prop))
|
|
86
|
-
return true;
|
|
87
|
-
const value = input[key];
|
|
88
|
-
if (undefined === value)
|
|
89
|
-
return true;
|
|
90
|
-
return false;
|
|
91
|
-
})); const _io12 = (input, _exceptionable = true) => "string" === typeof input.image && (null !== input.aliases && (undefined === input.aliases || "string" === typeof input.aliases || Array.isArray(input.aliases) && input.aliases.every((elem, _index3) => "string" === typeof elem))) && (null !== input.cmd && (undefined === input.cmd || "string" === typeof input.cmd || Array.isArray(input.cmd) && input.cmd.every((elem, _index4) => "string" === typeof elem))) && (undefined === input.volumes || Array.isArray(input.volumes) && (input.volumes.length === 1 && ("object" === typeof input.volumes[0] && null !== input.volumes[0] && _io13(input.volumes[0], true && _exceptionable)))) && (null !== input.expose && (undefined === input.expose || "number" === typeof input.expose || "string" === typeof input.expose && (typeof input.expose === "string" && (() => {
|
|
92
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(input.expose);
|
|
93
|
-
if (!match)
|
|
94
|
-
return false;
|
|
95
|
-
const a = Number(match[1]), b = Number(match[2]);
|
|
96
|
-
return a < b;
|
|
97
|
-
})() || typeof input.expose === "string" && /^%%(ops|global).[^%]+%%$/.test(input.expose)) || (Array.isArray(input.expose) && ((() => {
|
|
98
|
-
if (!Array.isArray(input.expose))
|
|
99
|
-
return true;
|
|
100
|
-
const numbers = new Set();
|
|
101
|
-
const ranges = [];
|
|
102
|
-
for (const el of input.expose) {
|
|
103
|
-
if (typeof el === "string" && /^%%(ops|global).[^%]+%%$/.test(el))
|
|
104
|
-
continue;
|
|
105
|
-
if (el && typeof el === "object" && !Array.isArray(el) && el.__spread__)
|
|
106
|
-
continue;
|
|
107
|
-
const port = typeof el === "object" ? el.port : el;
|
|
108
|
-
if (typeof port === "number") {
|
|
109
|
-
if (numbers.has(port))
|
|
110
|
-
return false;
|
|
111
|
-
numbers.add(port);
|
|
112
|
-
}
|
|
113
|
-
else if (typeof port === "string") {
|
|
114
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(port);
|
|
115
|
-
if (!match)
|
|
116
|
-
return false;
|
|
117
|
-
const start = Number(match[1]), end = Number(match[2]);
|
|
118
|
-
for (const [rStart, rEnd] of ranges) {
|
|
119
|
-
if (start <= rEnd && end >= rStart)
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
ranges.push([start, end]);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
for (const port of numbers) {
|
|
126
|
-
for (const [start, end] of ranges) {
|
|
127
|
-
if (port >= start && port <= end)
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return true;
|
|
132
|
-
})() && input.expose.every((elem, _index5) => null !== elem && undefined !== elem && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && (() => {
|
|
133
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
134
|
-
if (!match)
|
|
135
|
-
return false;
|
|
136
|
-
const a = Number(match[1]), b = Number(match[2]);
|
|
137
|
-
return a < b;
|
|
138
|
-
})() || typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem)) || "object" === typeof elem && null !== elem && _iu0(elem, true && _exceptionable)))) || "object" === typeof input.expose && null !== input.expose && _io14(input.expose, true && _exceptionable)))) && (undefined === input["private"] || "boolean" === typeof input["private"]) && (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, _index6) => "string" === typeof elem))) && (undefined === input.env || "object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) && _io19(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 && _io20(input.restart_policy, true && _exceptionable))) && (undefined === input.required_vram || "number" === typeof input.required_vram) && (undefined === input.resources || Array.isArray(input.resources) && input.resources.every((elem, _index7) => 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) && _io28(input.authentication, true && _exceptionable)) && (undefined === input.trusted_execution_env || "SEV-SNP" === input.trusted_execution_env) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
139
|
-
if (["image", "aliases", "cmd", "volumes", "expose", "private", "gpu", "work_dir", "output", "entrypoint", "env", "restart_policy", "required_vram", "resources", "authentication", "trusted_execution_env"].some(prop => key === prop))
|
|
140
|
-
return true;
|
|
141
|
-
const value = input[key];
|
|
142
|
-
if (undefined === value)
|
|
143
|
-
return true;
|
|
144
|
-
return false;
|
|
145
|
-
})); const _io13 = (input, _exceptionable = true) => "string" === typeof input.name && "string" === typeof input.dest && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
146
|
-
if (["name", "dest"].some(prop => key === prop))
|
|
147
|
-
return true;
|
|
148
|
-
const value = input[key];
|
|
149
|
-
if (undefined === value)
|
|
150
|
-
return true;
|
|
151
|
-
return false;
|
|
152
|
-
})); const _io14 = (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 => {
|
|
153
|
-
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
154
|
-
return true;
|
|
155
|
-
const value = input[key];
|
|
156
|
-
if (undefined === value)
|
|
157
|
-
return true;
|
|
158
|
-
return false;
|
|
159
|
-
})); const _io15 = (input, _exceptionable = true) => ("number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
160
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
161
|
-
if (!match)
|
|
162
|
-
return false;
|
|
163
|
-
const a = Number(match[1]), b = Number(match[2]);
|
|
164
|
-
return a < b;
|
|
165
|
-
})())) && (undefined === input.type || "api" === input.type || "websocket" === input.type || "web" === input.type || "webapi" === input.type || "none" === input.type) && (undefined === input.health_checks || Array.isArray(input.health_checks) && input.health_checks.every((elem, _index8) => "object" === typeof elem && null !== elem && _iu1(elem, true && _exceptionable))) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
166
|
-
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
167
|
-
return true;
|
|
168
|
-
const value = input[key];
|
|
169
|
-
if (undefined === value)
|
|
170
|
-
return true;
|
|
171
|
-
return false;
|
|
172
|
-
})); const _io16 = (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) && _io17(input.headers, true && _exceptionable)) && true && "boolean" === typeof input.continuous && (5 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
173
|
-
if (["type", "path", "method", "expected_status", "headers", "body", "continuous"].some(prop => key === prop))
|
|
174
|
-
return true;
|
|
175
|
-
const value = input[key];
|
|
176
|
-
if (undefined === value)
|
|
177
|
-
return true;
|
|
178
|
-
return false;
|
|
179
|
-
})); const _io17 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
180
|
-
const value = input[key];
|
|
181
|
-
if (undefined === value)
|
|
182
|
-
return true;
|
|
183
|
-
return "string" === typeof value;
|
|
184
|
-
}); const _io18 = (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 => {
|
|
185
|
-
if (["type", "expected_response", "continuous"].some(prop => key === prop))
|
|
186
|
-
return true;
|
|
187
|
-
const value = input[key];
|
|
188
|
-
if (undefined === value)
|
|
189
|
-
return true;
|
|
190
|
-
return false;
|
|
191
|
-
})); const _io19 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
192
|
-
const value = input[key];
|
|
193
|
-
if (undefined === value)
|
|
194
|
-
return true;
|
|
195
|
-
return "string" === typeof value;
|
|
196
|
-
}); const _io20 = (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 => {
|
|
197
|
-
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
198
|
-
return true;
|
|
199
|
-
const value = input[key];
|
|
200
|
-
if (undefined === value)
|
|
201
|
-
return true;
|
|
202
|
-
return false;
|
|
203
|
-
})); const _io21 = (input, _exceptionable = true) => "S3" === input.type && "string" === typeof input.target && (undefined === input.url || "string" === typeof input.url) && (undefined === input.allowWrite || "boolean" === typeof input.allowWrite) && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index9) => "string" === typeof elem)) && (undefined === input.IAM || "object" === typeof input.IAM && null !== input.IAM && _io22(input.IAM, true && _exceptionable)) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
204
|
-
if (["type", "target", "url", "allowWrite", "files", "IAM"].some(prop => key === prop))
|
|
205
|
-
return true;
|
|
206
|
-
const value = input[key];
|
|
207
|
-
if (undefined === value)
|
|
208
|
-
return true;
|
|
209
|
-
return false;
|
|
210
|
-
})); const _io22 = (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 => {
|
|
211
|
-
if (["REGION", "ACCESS_KEY_ID", "SECRET_ACCESS_KEY"].some(prop => key === prop))
|
|
212
|
-
return true;
|
|
213
|
-
const value = input[key];
|
|
214
|
-
if (undefined === value)
|
|
215
|
-
return true;
|
|
216
|
-
return false;
|
|
217
|
-
})); const _io23 = (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 && _io22(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
218
|
-
if (["type", "target", "bucket", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
219
|
-
return true;
|
|
220
|
-
const value = input[key];
|
|
221
|
-
if (undefined === value)
|
|
222
|
-
return true;
|
|
223
|
-
return false;
|
|
224
|
-
})); const _io24 = (input, _exceptionable = true) => "S3" === input.type && "string" === typeof input.target && (Array.isArray(input.buckets) && input.buckets.every((elem, _index10) => "object" === typeof elem && null !== elem && _io25(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 && _io22(input.IAM, true && _exceptionable)) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
225
|
-
if (["type", "target", "buckets", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
226
|
-
return true;
|
|
227
|
-
const value = input[key];
|
|
228
|
-
if (undefined === value)
|
|
229
|
-
return true;
|
|
230
|
-
return false;
|
|
231
|
-
})); const _io25 = (input, _exceptionable = true) => "string" === typeof input.url && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index11) => "string" === typeof elem)) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
232
|
-
if (["url", "files"].some(prop => key === prop))
|
|
233
|
-
return true;
|
|
234
|
-
const value = input[key];
|
|
235
|
-
if (undefined === value)
|
|
236
|
-
return true;
|
|
237
|
-
return false;
|
|
238
|
-
})); const _io26 = (input, _exceptionable = true) => "HF" === input.type && "string" === typeof input.target && "string" === typeof input.repo && (undefined === input.revision || "string" === typeof input.revision) && (undefined === input.files || Array.isArray(input.files) && input.files.every((elem, _index12) => "string" === typeof elem)) && (undefined === input.accessToken || "string" === typeof input.accessToken) && (3 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
239
|
-
if (["type", "target", "repo", "revision", "files", "accessToken"].some(prop => key === prop))
|
|
240
|
-
return true;
|
|
241
|
-
const value = input[key];
|
|
242
|
-
if (undefined === value)
|
|
243
|
-
return true;
|
|
244
|
-
return false;
|
|
245
|
-
})); const _io27 = (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 => {
|
|
246
|
-
if (["type", "model", "target"].some(prop => key === prop))
|
|
247
|
-
return true;
|
|
248
|
-
const value = input[key];
|
|
249
|
-
if (undefined === value)
|
|
250
|
-
return true;
|
|
251
|
-
return false;
|
|
252
|
-
})); const _io28 = (input, _exceptionable = true) => (undefined === input.docker || "object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) && _io29(input.docker, true && _exceptionable)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
253
|
-
if (["docker"].some(prop => key === prop))
|
|
254
|
-
return true;
|
|
255
|
-
const value = input[key];
|
|
256
|
-
if (undefined === value)
|
|
257
|
-
return true;
|
|
258
|
-
return false;
|
|
259
|
-
})); const _io29 = (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 => {
|
|
260
|
-
if (["username", "password", "email", "server"].some(prop => key === prop))
|
|
261
|
-
return true;
|
|
262
|
-
const value = input[key];
|
|
263
|
-
if (undefined === value)
|
|
264
|
-
return true;
|
|
265
|
-
return false;
|
|
266
|
-
})); const _io30 = (input, _exceptionable = true) => "string" === typeof input.name && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
267
|
-
if (["name"].some(prop => key === prop))
|
|
268
|
-
return true;
|
|
269
|
-
const value = input[key];
|
|
270
|
-
if (undefined === value)
|
|
271
|
-
return true;
|
|
272
|
-
return false;
|
|
273
|
-
})); const _io31 = (input, _exceptionable = true) => Object.keys(input).every(key => {
|
|
274
|
-
const value = input[key];
|
|
275
|
-
if (undefined === value)
|
|
276
|
-
return true;
|
|
277
|
-
return null !== value && undefined !== value && ("string" === typeof value || "object" === typeof value && null !== value && _io32(value, true && _exceptionable));
|
|
278
|
-
}); const _io32 = (input, _exceptionable = true) => "string" === typeof input.regex && (Array.isArray(input.logType) && (Array.isArray(input.logType) && input.logType.length >= 1 && input.logType.length <= 4 && (() => {
|
|
279
|
-
const seen = new Set();
|
|
280
|
-
for (const v of input.logType) {
|
|
281
|
-
if (seen.has(v))
|
|
282
|
-
return false;
|
|
283
|
-
seen.add(v);
|
|
284
|
-
}
|
|
285
|
-
return true;
|
|
286
|
-
})() && input.logType.every((elem, _index13) => "stdout" === elem || "stdin" === elem || "stderr" === elem || "nodeerr" === elem))) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
287
|
-
if (["regex", "logType"].some(prop => key === prop))
|
|
288
|
-
return true;
|
|
289
|
-
const value = input[key];
|
|
290
|
-
if (undefined === value)
|
|
291
|
-
return true;
|
|
292
|
-
return false;
|
|
293
|
-
})); const _io33 = (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 => {
|
|
294
|
-
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
295
|
-
return true;
|
|
296
|
-
const value = input[key];
|
|
297
|
-
if (undefined === value)
|
|
298
|
-
return true;
|
|
299
|
-
return false;
|
|
300
|
-
})); const _io34 = (input, _exceptionable = true) => (undefined === input.group || "string" === typeof input.group) && (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index14) => "string" === typeof elem)) && (undefined === input.stop_if_dependent_stops || "boolean" === typeof input.stop_if_dependent_stops) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
301
|
-
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
302
|
-
return true;
|
|
303
|
-
const value = input[key];
|
|
304
|
-
if (undefined === value)
|
|
305
|
-
return true;
|
|
306
|
-
return false;
|
|
307
|
-
})); const _iu0 = (input, _exceptionable = true) => (() => {
|
|
308
|
-
if (undefined !== input.port)
|
|
309
|
-
return _io15(input, true && _exceptionable);
|
|
310
|
-
else if (undefined !== input.__spread__)
|
|
311
|
-
return _io14(input, true && _exceptionable);
|
|
312
|
-
else
|
|
313
|
-
return false;
|
|
314
|
-
})(); const _iu1 = (input, _exceptionable = true) => (() => {
|
|
315
|
-
if ("http" === input.type)
|
|
316
|
-
return _io16(input, true && _exceptionable);
|
|
317
|
-
else if ("websocket" === input.type)
|
|
318
|
-
return _io18(input, true && _exceptionable);
|
|
319
|
-
else
|
|
320
|
-
return false;
|
|
321
|
-
})(); const _iu2 = (input, _exceptionable = true) => (() => {
|
|
322
|
-
if (undefined !== input.bucket)
|
|
323
|
-
return _io23(input, true && _exceptionable);
|
|
324
|
-
else if (undefined !== input.buckets)
|
|
325
|
-
return _io24(input, true && _exceptionable);
|
|
326
|
-
else if ("HF" === input.type)
|
|
327
|
-
return _io26(input, true && _exceptionable);
|
|
328
|
-
else if ("Ollama" === input.type)
|
|
329
|
-
return _io27(input, true && _exceptionable);
|
|
330
|
-
else if (undefined !== input.__spread__)
|
|
331
|
-
return _io14(input, true && _exceptionable);
|
|
332
|
-
else
|
|
333
|
-
return _io21(input, true && _exceptionable);
|
|
334
|
-
})(); const _iu3 = (input, _exceptionable = true) => (() => {
|
|
335
|
-
if (undefined !== input.image)
|
|
336
|
-
return _io12(input, true && _exceptionable);
|
|
337
|
-
else if (undefined !== input.name)
|
|
338
|
-
return _io30(input, true && _exceptionable);
|
|
339
|
-
else
|
|
340
|
-
return false;
|
|
341
|
-
})(); const _iu4 = (input, _exceptionable = true) => (() => {
|
|
342
|
-
if (Array.isArray(input.depends_on) && input.depends_on.every((elem, _index15) => "string" === typeof elem))
|
|
343
|
-
return _io34(input, true && _exceptionable);
|
|
344
|
-
else
|
|
345
|
-
return _io33(input, true && _exceptionable);
|
|
346
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.version || _report(_exceptionable, {
|
|
347
|
-
path: _path + ".version",
|
|
348
|
-
expected: "string",
|
|
349
|
-
value: input.version
|
|
350
|
-
}), "container" === input.type || _report(_exceptionable, {
|
|
351
|
-
path: _path + ".type",
|
|
352
|
-
expected: "\"container\"",
|
|
353
|
-
value: input.type
|
|
354
|
-
}), undefined === input.logistics || ("object" === typeof input.logistics && null !== input.logistics && false === Array.isArray(input.logistics) || _report(_exceptionable, {
|
|
355
|
-
path: _path + ".logistics",
|
|
356
|
-
expected: "(JobLogistics | undefined)",
|
|
357
|
-
value: input.logistics
|
|
358
|
-
})) && _vo1(input.logistics, _path + ".logistics", true && _exceptionable) || _report(_exceptionable, {
|
|
359
|
-
path: _path + ".logistics",
|
|
360
|
-
expected: "(JobLogistics | undefined)",
|
|
361
|
-
value: input.logistics
|
|
362
|
-
}), undefined === input.deployment_id || "string" === typeof input.deployment_id || _report(_exceptionable, {
|
|
363
|
-
path: _path + ".deployment_id",
|
|
364
|
-
expected: "(string | undefined)",
|
|
365
|
-
value: input.deployment_id
|
|
366
|
-
}), undefined === input.meta || ("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) || _report(_exceptionable, {
|
|
367
|
-
path: _path + ".meta",
|
|
368
|
-
expected: "(__type.o2 | undefined)",
|
|
369
|
-
value: input.meta
|
|
370
|
-
})) && _vo6(input.meta, _path + ".meta", true && _exceptionable) || _report(_exceptionable, {
|
|
371
|
-
path: _path + ".meta",
|
|
372
|
-
expected: "(__type.o2 | undefined)",
|
|
373
|
-
value: input.meta
|
|
374
|
-
}), undefined === input.global || ("object" === typeof input.global && null !== input.global && false === Array.isArray(input.global) || _report(_exceptionable, {
|
|
375
|
-
path: _path + ".global",
|
|
376
|
-
expected: "(__type.o4 | undefined)",
|
|
377
|
-
value: input.global
|
|
378
|
-
})) && _vo8(input.global, _path + ".global", true && _exceptionable) || _report(_exceptionable, {
|
|
379
|
-
path: _path + ".global",
|
|
380
|
-
expected: "(__type.o4 | undefined)",
|
|
381
|
-
value: input.global
|
|
382
|
-
}), (Array.isArray(input.ops) || _report(_exceptionable, {
|
|
383
|
-
path: _path + ".ops",
|
|
384
|
-
expected: "Ops",
|
|
385
|
-
value: input.ops
|
|
386
|
-
})) && input.ops.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
387
|
-
path: _path + ".ops[" + _index16 + "]",
|
|
388
|
-
expected: "Operation<keyof OperationArgsMap>",
|
|
389
|
-
value: elem
|
|
390
|
-
})) && _vo11(elem, _path + ".ops[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
391
|
-
path: _path + ".ops[" + _index16 + "]",
|
|
392
|
-
expected: "Operation<keyof OperationArgsMap>",
|
|
393
|
-
value: elem
|
|
394
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
395
|
-
path: _path + ".ops",
|
|
396
|
-
expected: "Ops",
|
|
397
|
-
value: input.ops
|
|
398
|
-
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
399
|
-
if (["version", "type", "logistics", "deployment_id", "meta", "global", "ops"].some(prop => key === prop))
|
|
400
|
-
return true;
|
|
401
|
-
const value = input[key];
|
|
402
|
-
if (undefined === value)
|
|
403
|
-
return true;
|
|
404
|
-
return _report(_exceptionable, {
|
|
405
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
406
|
-
expected: "undefined",
|
|
407
|
-
value: value,
|
|
408
|
-
description: [
|
|
409
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
410
|
-
"",
|
|
411
|
-
"Please remove the property next time."
|
|
412
|
-
].join("\n")
|
|
413
|
-
});
|
|
414
|
-
}).every(flag => flag))].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.send || ("object" === typeof input.send && null !== input.send || _report(_exceptionable, {
|
|
415
|
-
path: _path + ".send",
|
|
416
|
-
expected: "(SendJobDefinationLogicstics | undefined)",
|
|
417
|
-
value: input.send
|
|
418
|
-
})) && _vo2(input.send, _path + ".send", true && _exceptionable) || _report(_exceptionable, {
|
|
419
|
-
path: _path + ".send",
|
|
420
|
-
expected: "(SendJobDefinationLogicstics | undefined)",
|
|
421
|
-
value: input.send
|
|
422
|
-
}), undefined === input.receive || ("object" === typeof input.receive && null !== input.receive || _report(_exceptionable, {
|
|
423
|
-
path: _path + ".receive",
|
|
424
|
-
expected: "(ReceiveJobResultLogicstics | undefined)",
|
|
425
|
-
value: input.receive
|
|
426
|
-
})) && _vo4(input.receive, _path + ".receive", true && _exceptionable) || _report(_exceptionable, {
|
|
427
|
-
path: _path + ".receive",
|
|
428
|
-
expected: "(ReceiveJobResultLogicstics | undefined)",
|
|
429
|
-
value: input.receive
|
|
430
|
-
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
431
|
-
if (["send", "receive"].some(prop => key === prop))
|
|
432
|
-
return true;
|
|
433
|
-
const value = input[key];
|
|
434
|
-
if (undefined === value)
|
|
435
|
-
return true;
|
|
436
|
-
return _report(_exceptionable, {
|
|
437
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
438
|
-
expected: "undefined",
|
|
439
|
-
value: value,
|
|
440
|
-
description: [
|
|
441
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
442
|
-
"",
|
|
443
|
-
"Please remove the property next time."
|
|
444
|
-
].join("\n")
|
|
445
|
-
});
|
|
446
|
-
}).every(flag => flag))].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["api" === input.type || "api-listen" === input.type || _report(_exceptionable, {
|
|
447
|
-
path: _path + ".type",
|
|
448
|
-
expected: "(\"api\" | \"api-listen\")",
|
|
449
|
-
value: input.type
|
|
450
|
-
}), ("object" === typeof input.args && null !== input.args && false === Array.isArray(input.args) || _report(_exceptionable, {
|
|
451
|
-
path: _path + ".args",
|
|
452
|
-
expected: "__type",
|
|
453
|
-
value: input.args
|
|
454
|
-
})) && _vo3(input.args, _path + ".args", true && _exceptionable) || _report(_exceptionable, {
|
|
455
|
-
path: _path + ".args",
|
|
456
|
-
expected: "__type",
|
|
457
|
-
value: input.args
|
|
458
|
-
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
459
|
-
if (["type", "args"].some(prop => key === prop))
|
|
460
|
-
return true;
|
|
461
|
-
const value = input[key];
|
|
462
|
-
if (undefined === value)
|
|
463
|
-
return true;
|
|
464
|
-
return _report(_exceptionable, {
|
|
465
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
466
|
-
expected: "undefined",
|
|
467
|
-
value: value,
|
|
468
|
-
description: [
|
|
469
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
470
|
-
"",
|
|
471
|
-
"Please remove the property next time."
|
|
472
|
-
].join("\n")
|
|
473
|
-
});
|
|
474
|
-
}).every(flag => flag))].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => [undefined === input.endpoint || "string" === typeof input.endpoint || _report(_exceptionable, {
|
|
475
|
-
path: _path + ".endpoint",
|
|
476
|
-
expected: "(string | undefined)",
|
|
477
|
-
value: input.endpoint
|
|
478
|
-
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
479
|
-
if (["endpoint"].some(prop => key === prop))
|
|
480
|
-
return true;
|
|
481
|
-
const value = input[key];
|
|
482
|
-
if (undefined === value)
|
|
483
|
-
return true;
|
|
484
|
-
return _report(_exceptionable, {
|
|
485
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
486
|
-
expected: "undefined",
|
|
487
|
-
value: value,
|
|
488
|
-
description: [
|
|
489
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
490
|
-
"",
|
|
491
|
-
"Please remove the property next time."
|
|
492
|
-
].join("\n")
|
|
493
|
-
});
|
|
494
|
-
}).every(flag => flag))].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["api" === input.type || "api-listen" === input.type || _report(_exceptionable, {
|
|
495
|
-
path: _path + ".type",
|
|
496
|
-
expected: "(\"api\" | \"api-listen\")",
|
|
497
|
-
value: input.type
|
|
498
|
-
}), ("object" === typeof input.args && null !== input.args && false === Array.isArray(input.args) || _report(_exceptionable, {
|
|
499
|
-
path: _path + ".args",
|
|
500
|
-
expected: "__type.o1",
|
|
501
|
-
value: input.args
|
|
502
|
-
})) && _vo5(input.args, _path + ".args", true && _exceptionable) || _report(_exceptionable, {
|
|
503
|
-
path: _path + ".args",
|
|
504
|
-
expected: "__type.o1",
|
|
505
|
-
value: input.args
|
|
506
|
-
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
507
|
-
if (["type", "args"].some(prop => key === prop))
|
|
508
|
-
return true;
|
|
509
|
-
const value = input[key];
|
|
510
|
-
if (undefined === value)
|
|
511
|
-
return true;
|
|
512
|
-
return _report(_exceptionable, {
|
|
513
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
514
|
-
expected: "undefined",
|
|
515
|
-
value: value,
|
|
516
|
-
description: [
|
|
517
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
518
|
-
"",
|
|
519
|
-
"Please remove the property next time."
|
|
520
|
-
].join("\n")
|
|
521
|
-
});
|
|
522
|
-
}).every(flag => flag))].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.endpoint || "string" === typeof input.endpoint || _report(_exceptionable, {
|
|
523
|
-
path: _path + ".endpoint",
|
|
524
|
-
expected: "(string | undefined)",
|
|
525
|
-
value: input.endpoint
|
|
526
|
-
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
527
|
-
if (["endpoint"].some(prop => key === prop))
|
|
528
|
-
return true;
|
|
529
|
-
const value = input[key];
|
|
530
|
-
if (undefined === value)
|
|
531
|
-
return true;
|
|
532
|
-
return _report(_exceptionable, {
|
|
533
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
534
|
-
expected: "undefined",
|
|
535
|
-
value: value,
|
|
536
|
-
description: [
|
|
537
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
538
|
-
"",
|
|
539
|
-
"Please remove the property next time."
|
|
540
|
-
].join("\n")
|
|
541
|
-
});
|
|
542
|
-
}).every(flag => flag))].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.trigger || "string" === typeof input.trigger || _report(_exceptionable, {
|
|
543
|
-
path: _path + ".trigger",
|
|
544
|
-
expected: "(string | undefined)",
|
|
545
|
-
value: input.trigger
|
|
546
|
-
}), undefined === input.system_resources || ("object" === typeof input.system_resources && null !== input.system_resources && false === Array.isArray(input.system_resources) || _report(_exceptionable, {
|
|
547
|
-
path: _path + ".system_resources",
|
|
548
|
-
expected: "(__type.o3 | undefined)",
|
|
549
|
-
value: input.system_resources
|
|
550
|
-
})) && _vo7(input.system_resources, _path + ".system_resources", true && _exceptionable) || _report(_exceptionable, {
|
|
551
|
-
path: _path + ".system_resources",
|
|
552
|
-
expected: "(__type.o3 | undefined)",
|
|
553
|
-
value: input.system_resources
|
|
554
|
-
}), false === _exceptionable || Object.keys(input).map(key => {
|
|
555
|
-
if (["trigger", "system_resources"].some(prop => key === prop))
|
|
556
|
-
return true;
|
|
557
|
-
const value = input[key];
|
|
558
|
-
if (undefined === value)
|
|
559
|
-
return true;
|
|
560
|
-
return true;
|
|
561
|
-
}).every(flag => flag)].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
562
|
-
const value = input[key];
|
|
563
|
-
if (undefined === value)
|
|
564
|
-
return true;
|
|
565
|
-
return "string" === typeof value || "number" === typeof value || _report(_exceptionable, {
|
|
566
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
567
|
-
expected: "(number | string)",
|
|
568
|
-
value: value
|
|
569
|
-
});
|
|
570
|
-
}).every(flag => flag)].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [undefined === input.image || "string" === typeof input.image || _report(_exceptionable, {
|
|
571
|
-
path: _path + ".image",
|
|
572
|
-
expected: "(string | undefined)",
|
|
573
|
-
value: input.image
|
|
574
|
-
}), undefined === input.gpu || "boolean" === typeof input.gpu || _report(_exceptionable, {
|
|
575
|
-
path: _path + ".gpu",
|
|
576
|
-
expected: "(boolean | undefined)",
|
|
577
|
-
value: input.gpu
|
|
578
|
-
}), (null !== input.entrypoint || _report(_exceptionable, {
|
|
579
|
-
path: _path + ".entrypoint",
|
|
580
|
-
expected: "(Array<string> | string | undefined)",
|
|
581
|
-
value: input.entrypoint
|
|
582
|
-
})) && (undefined === input.entrypoint || "string" === typeof input.entrypoint || (Array.isArray(input.entrypoint) || _report(_exceptionable, {
|
|
583
|
-
path: _path + ".entrypoint",
|
|
584
|
-
expected: "(Array<string> | string | undefined)",
|
|
585
|
-
value: input.entrypoint
|
|
586
|
-
})) && input.entrypoint.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, {
|
|
587
|
-
path: _path + ".entrypoint[" + _index17 + "]",
|
|
588
|
-
expected: "string",
|
|
589
|
-
value: elem
|
|
590
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
591
|
-
path: _path + ".entrypoint",
|
|
592
|
-
expected: "(Array<string> | string | undefined)",
|
|
593
|
-
value: input.entrypoint
|
|
594
|
-
})), undefined === input.env || ("object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) || _report(_exceptionable, {
|
|
595
|
-
path: _path + ".env",
|
|
596
|
-
expected: "(__type.o5 | undefined)",
|
|
597
|
-
value: input.env
|
|
598
|
-
})) && _vo9(input.env, _path + ".env", true && _exceptionable) || _report(_exceptionable, {
|
|
599
|
-
path: _path + ".env",
|
|
600
|
-
expected: "(__type.o5 | undefined)",
|
|
601
|
-
value: input.env
|
|
602
|
-
}), undefined === input.work_dir || "string" === typeof input.work_dir || _report(_exceptionable, {
|
|
603
|
-
path: _path + ".work_dir",
|
|
604
|
-
expected: "(string | undefined)",
|
|
605
|
-
value: input.work_dir
|
|
606
|
-
}), undefined === input.variables || ("object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) || _report(_exceptionable, {
|
|
607
|
-
path: _path + ".variables",
|
|
608
|
-
expected: "(__type.o6 | undefined)",
|
|
609
|
-
value: input.variables
|
|
610
|
-
})) && _vo10(input.variables, _path + ".variables", true && _exceptionable) || _report(_exceptionable, {
|
|
611
|
-
path: _path + ".variables",
|
|
612
|
-
expected: "(__type.o6 | undefined)",
|
|
613
|
-
value: input.variables
|
|
614
|
-
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
615
|
-
if (["image", "gpu", "entrypoint", "env", "work_dir", "variables"].some(prop => key === prop))
|
|
616
|
-
return true;
|
|
617
|
-
const value = input[key];
|
|
618
|
-
if (undefined === value)
|
|
619
|
-
return true;
|
|
620
|
-
return _report(_exceptionable, {
|
|
621
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
622
|
-
expected: "undefined",
|
|
623
|
-
value: value,
|
|
624
|
-
description: [
|
|
625
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
626
|
-
"",
|
|
627
|
-
"Please remove the property next time."
|
|
628
|
-
].join("\n")
|
|
629
|
-
});
|
|
630
|
-
}).every(flag => flag))].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
631
|
-
const value = input[key];
|
|
632
|
-
if (undefined === value)
|
|
633
|
-
return true;
|
|
634
|
-
return "string" === typeof value || _report(_exceptionable, {
|
|
635
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
636
|
-
expected: "string",
|
|
637
|
-
value: value
|
|
638
|
-
});
|
|
639
|
-
}).every(flag => flag)].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
640
|
-
const value = input[key];
|
|
641
|
-
if (undefined === value)
|
|
642
|
-
return true;
|
|
643
|
-
return "string" === typeof value || _report(_exceptionable, {
|
|
644
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
645
|
-
expected: "string",
|
|
646
|
-
value: value
|
|
647
|
-
});
|
|
648
|
-
}).every(flag => flag)].every(flag => flag); const _vo11 = (input, _path, _exceptionable = true) => ["container/run" === input.type || "container/create-volume" === input.type || _report(_exceptionable, {
|
|
649
|
-
path: _path + ".type",
|
|
650
|
-
expected: "(\"container/create-volume\" | \"container/run\")",
|
|
651
|
-
value: input.type
|
|
652
|
-
}), "string" === typeof input.id && (typeof input.id === "string" && !input.id.includes(" ") || _report(_exceptionable, {
|
|
653
|
-
path: _path + ".id",
|
|
654
|
-
expected: "string & TagBase<__type>",
|
|
655
|
-
value: input.id
|
|
656
|
-
})) || _report(_exceptionable, {
|
|
657
|
-
path: _path + ".id",
|
|
658
|
-
expected: "(string & TagBase<__type>)",
|
|
659
|
-
value: input.id
|
|
660
|
-
}), ("object" === typeof input.args && null !== input.args || _report(_exceptionable, {
|
|
661
|
-
path: _path + ".args",
|
|
662
|
-
expected: "((__type.o8 & TagBase<__type>) | __type.o20)",
|
|
663
|
-
value: input.args
|
|
664
|
-
})) && _vu3(input.args, _path + ".args", true && _exceptionable) || _report(_exceptionable, {
|
|
665
|
-
path: _path + ".args",
|
|
666
|
-
expected: "((__type.o8 & TagBase<__type>) | __type.o20)",
|
|
667
|
-
value: input.args
|
|
668
|
-
}), undefined === input.results || ("object" === typeof input.results && null !== input.results && false === Array.isArray(input.results) || _report(_exceptionable, {
|
|
669
|
-
path: _path + ".results",
|
|
670
|
-
expected: "(OperationResults | undefined)",
|
|
671
|
-
value: input.results
|
|
672
|
-
})) && _vo31(input.results, _path + ".results", true && _exceptionable) || _report(_exceptionable, {
|
|
673
|
-
path: _path + ".results",
|
|
674
|
-
expected: "(OperationResults | undefined)",
|
|
675
|
-
value: input.results
|
|
676
|
-
}), undefined === input.execution || ("object" === typeof input.execution && null !== input.execution && false === Array.isArray(input.execution) || _report(_exceptionable, {
|
|
677
|
-
path: _path + ".execution",
|
|
678
|
-
expected: "(undefined | { group?: string | undefined; } & { depends_on: string[]; stop_if_dependent_stops?: boolean | undefined; } | { group?: string | undefined; } & { depends_on?: undefined; stop_if_dependent_stops?: undefined; })",
|
|
679
|
-
value: input.execution
|
|
680
|
-
})) && _vu4(input.execution, _path + ".execution", true && _exceptionable) || _report(_exceptionable, {
|
|
681
|
-
path: _path + ".execution",
|
|
682
|
-
expected: "(undefined | { group?: string | undefined; } & { depends_on: string[]; stop_if_dependent_stops?: boolean | undefined; } | { group?: string | undefined; } & { depends_on?: undefined; stop_if_dependent_stops?: undefined; })",
|
|
683
|
-
value: input.execution
|
|
684
|
-
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
685
|
-
if (["type", "id", "args", "results", "execution"].some(prop => key === prop))
|
|
686
|
-
return true;
|
|
687
|
-
const value = input[key];
|
|
688
|
-
if (undefined === value)
|
|
689
|
-
return true;
|
|
690
|
-
return _report(_exceptionable, {
|
|
691
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
692
|
-
expected: "undefined",
|
|
693
|
-
value: value,
|
|
694
|
-
description: [
|
|
695
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
696
|
-
"",
|
|
697
|
-
"Please remove the property next time."
|
|
698
|
-
].join("\n")
|
|
699
|
-
});
|
|
700
|
-
}).every(flag => flag))].every(flag => flag); const _vo12 = (input, _path, _exceptionable = true) => ["string" === typeof input.image || _report(_exceptionable, {
|
|
701
|
-
path: _path + ".image",
|
|
702
|
-
expected: "string",
|
|
703
|
-
value: input.image
|
|
704
|
-
}), (null !== input.aliases || _report(_exceptionable, {
|
|
705
|
-
path: _path + ".aliases",
|
|
706
|
-
expected: "(Array<string> | string | undefined)",
|
|
707
|
-
value: input.aliases
|
|
708
|
-
})) && (undefined === input.aliases || "string" === typeof input.aliases || (Array.isArray(input.aliases) || _report(_exceptionable, {
|
|
709
|
-
path: _path + ".aliases",
|
|
710
|
-
expected: "(Array<string> | string | undefined)",
|
|
711
|
-
value: input.aliases
|
|
712
|
-
})) && input.aliases.map((elem, _index18) => "string" === typeof elem || _report(_exceptionable, {
|
|
713
|
-
path: _path + ".aliases[" + _index18 + "]",
|
|
714
|
-
expected: "string",
|
|
715
|
-
value: elem
|
|
716
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
717
|
-
path: _path + ".aliases",
|
|
718
|
-
expected: "(Array<string> | string | undefined)",
|
|
719
|
-
value: input.aliases
|
|
720
|
-
})), (null !== input.cmd || _report(_exceptionable, {
|
|
721
|
-
path: _path + ".cmd",
|
|
722
|
-
expected: "(Array<string> | string | undefined)",
|
|
723
|
-
value: input.cmd
|
|
724
|
-
})) && (undefined === input.cmd || "string" === typeof input.cmd || (Array.isArray(input.cmd) || _report(_exceptionable, {
|
|
725
|
-
path: _path + ".cmd",
|
|
726
|
-
expected: "(Array<string> | string | undefined)",
|
|
727
|
-
value: input.cmd
|
|
728
|
-
})) && input.cmd.map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
|
|
729
|
-
path: _path + ".cmd[" + _index19 + "]",
|
|
730
|
-
expected: "string",
|
|
731
|
-
value: elem
|
|
732
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
733
|
-
path: _path + ".cmd",
|
|
734
|
-
expected: "(Array<string> | string | undefined)",
|
|
735
|
-
value: input.cmd
|
|
736
|
-
})), undefined === input.volumes || (Array.isArray(input.volumes) || _report(_exceptionable, {
|
|
737
|
-
path: _path + ".volumes",
|
|
738
|
-
expected: "([{ name: string; dest: string; }] | undefined)",
|
|
739
|
-
value: input.volumes
|
|
740
|
-
})) && ((input.volumes.length === 1 || _report(_exceptionable, {
|
|
741
|
-
path: _path + ".volumes",
|
|
742
|
-
expected: "[__type.o9]",
|
|
743
|
-
value: input.volumes
|
|
744
|
-
})) && [
|
|
745
|
-
("object" === typeof input.volumes[0] && null !== input.volumes[0] || _report(_exceptionable, {
|
|
746
|
-
path: _path + ".volumes[0]",
|
|
747
|
-
expected: "__type.o9",
|
|
748
|
-
value: input.volumes[0]
|
|
749
|
-
})) && _vo13(input.volumes[0], _path + ".volumes[0]", true && _exceptionable) || _report(_exceptionable, {
|
|
750
|
-
path: _path + ".volumes[0]",
|
|
751
|
-
expected: "__type.o9",
|
|
752
|
-
value: input.volumes[0]
|
|
753
|
-
})
|
|
754
|
-
].every(flag => flag)) || _report(_exceptionable, {
|
|
755
|
-
path: _path + ".volumes",
|
|
756
|
-
expected: "([{ name: string; dest: string; }] | undefined)",
|
|
757
|
-
value: input.volumes
|
|
758
|
-
}), (null !== input.expose || _report(_exceptionable, {
|
|
759
|
-
path: _path + ".expose",
|
|
760
|
-
expected: "((Array<ExposeArrayElement> & TagBase<__type>) | (__type.o12 & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | number | undefined)",
|
|
761
|
-
value: input.expose
|
|
762
|
-
})) && (undefined === input.expose || "number" === typeof input.expose || "string" === typeof input.expose && (typeof input.expose === "string" && (() => {
|
|
763
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(input.expose);
|
|
764
|
-
if (!match)
|
|
765
|
-
return false;
|
|
766
|
-
const a = Number(match[1]), b = Number(match[2]);
|
|
767
|
-
return a < b;
|
|
768
|
-
})() || typeof input.expose === "string" && /^%%(ops|global).[^%]+%%$/.test(input.expose) || _report(_exceptionable, {
|
|
769
|
-
path: _path + ".expose",
|
|
770
|
-
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
771
|
-
value: input.expose
|
|
772
|
-
})) || (Array.isArray(input.expose) && (((() => {
|
|
773
|
-
if (!Array.isArray(input.expose))
|
|
774
|
-
return true;
|
|
775
|
-
const numbers = new Set();
|
|
776
|
-
const ranges = [];
|
|
777
|
-
for (const el of input.expose) {
|
|
778
|
-
if (typeof el === "string" && /^%%(ops|global).[^%]+%%$/.test(el))
|
|
779
|
-
continue;
|
|
780
|
-
if (el && typeof el === "object" && !Array.isArray(el) && el.__spread__)
|
|
781
|
-
continue;
|
|
782
|
-
const port = typeof el === "object" ? el.port : el;
|
|
783
|
-
if (typeof port === "number") {
|
|
784
|
-
if (numbers.has(port))
|
|
785
|
-
return false;
|
|
786
|
-
numbers.add(port);
|
|
787
|
-
}
|
|
788
|
-
else if (typeof port === "string") {
|
|
789
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(port);
|
|
790
|
-
if (!match)
|
|
791
|
-
return false;
|
|
792
|
-
const start = Number(match[1]), end = Number(match[2]);
|
|
793
|
-
for (const [rStart, rEnd] of ranges) {
|
|
794
|
-
if (start <= rEnd && end >= rStart)
|
|
795
|
-
return false;
|
|
796
|
-
}
|
|
797
|
-
ranges.push([start, end]);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
for (const port of numbers) {
|
|
801
|
-
for (const [start, end] of ranges) {
|
|
802
|
-
if (port >= start && port <= end)
|
|
803
|
-
return false;
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
return true;
|
|
807
|
-
})() || _report(_exceptionable, {
|
|
808
|
-
path: _path + ".expose",
|
|
809
|
-
expected: "Array<> & TagBase<__type>",
|
|
810
|
-
value: input.expose
|
|
811
|
-
})) && input.expose.map((elem, _index20) => (null !== elem || _report(_exceptionable, {
|
|
812
|
-
path: _path + ".expose[" + _index20 + "]",
|
|
813
|
-
expected: "((__type.o12 & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
814
|
-
value: elem
|
|
815
|
-
})) && (undefined !== elem || _report(_exceptionable, {
|
|
816
|
-
path: _path + ".expose[" + _index20 + "]",
|
|
817
|
-
expected: "((__type.o12 & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
818
|
-
value: elem
|
|
819
|
-
})) && ("number" === typeof elem || "string" === typeof elem && (typeof elem === "string" && (() => {
|
|
820
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(elem);
|
|
821
|
-
if (!match)
|
|
822
|
-
return false;
|
|
823
|
-
const a = Number(match[1]), b = Number(match[2]);
|
|
824
|
-
return a < b;
|
|
825
|
-
})() || typeof elem === "string" && /^%%(ops|global).[^%]+%%$/.test(elem) || _report(_exceptionable, {
|
|
826
|
-
path: _path + ".expose[" + _index20 + "]",
|
|
827
|
-
expected: "(string & (TagBase<__type> | TagBase<__type>))",
|
|
828
|
-
value: elem
|
|
829
|
-
})) || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
830
|
-
path: _path + ".expose[" + _index20 + "]",
|
|
831
|
-
expected: "((__type.o12 & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
832
|
-
value: elem
|
|
833
|
-
})) && _vu0(elem, _path + ".expose[" + _index20 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
834
|
-
path: _path + ".expose[" + _index20 + "]",
|
|
835
|
-
expected: "((__type.o12 & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | ExposedPort | number)",
|
|
836
|
-
value: elem
|
|
837
|
-
}))).every(flag => flag)) || "object" === typeof input.expose && null !== input.expose && _vo14(input.expose, _path + ".expose", true && _exceptionable) || _report(_exceptionable, {
|
|
838
|
-
path: _path + ".expose",
|
|
839
|
-
expected: "((Array<ExposeArrayElement> & TagBase<__type>) | (__type.o12 & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | number | undefined)",
|
|
840
|
-
value: input.expose
|
|
841
|
-
})) || _report(_exceptionable, {
|
|
842
|
-
path: _path + ".expose",
|
|
843
|
-
expected: "((Array<ExposeArrayElement> & TagBase<__type>) | (__type.o12 & TagBase<__type>) | (string & (TagBase<__type> | TagBase<__type>)) | number | undefined)",
|
|
844
|
-
value: input.expose
|
|
845
|
-
})), undefined === input["private"] || "boolean" === typeof input["private"] || _report(_exceptionable, {
|
|
846
|
-
path: _path + "[\"private\"]",
|
|
847
|
-
expected: "(boolean | undefined)",
|
|
848
|
-
value: input["private"]
|
|
849
|
-
}), undefined === input.gpu || "boolean" === typeof input.gpu || _report(_exceptionable, {
|
|
850
|
-
path: _path + ".gpu",
|
|
851
|
-
expected: "(boolean | undefined)",
|
|
852
|
-
value: input.gpu
|
|
853
|
-
}), undefined === input.work_dir || "string" === typeof input.work_dir || _report(_exceptionable, {
|
|
854
|
-
path: _path + ".work_dir",
|
|
855
|
-
expected: "(string | undefined)",
|
|
856
|
-
value: input.work_dir
|
|
857
|
-
}), undefined === input.output || "string" === typeof input.output || _report(_exceptionable, {
|
|
858
|
-
path: _path + ".output",
|
|
859
|
-
expected: "(string | undefined)",
|
|
860
|
-
value: input.output
|
|
861
|
-
}), (null !== input.entrypoint || _report(_exceptionable, {
|
|
862
|
-
path: _path + ".entrypoint",
|
|
863
|
-
expected: "(Array<string> | string | undefined)",
|
|
864
|
-
value: input.entrypoint
|
|
865
|
-
})) && (undefined === input.entrypoint || "string" === typeof input.entrypoint || (Array.isArray(input.entrypoint) || _report(_exceptionable, {
|
|
866
|
-
path: _path + ".entrypoint",
|
|
867
|
-
expected: "(Array<string> | string | undefined)",
|
|
868
|
-
value: input.entrypoint
|
|
869
|
-
})) && input.entrypoint.map((elem, _index21) => "string" === typeof elem || _report(_exceptionable, {
|
|
870
|
-
path: _path + ".entrypoint[" + _index21 + "]",
|
|
871
|
-
expected: "string",
|
|
872
|
-
value: elem
|
|
873
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
874
|
-
path: _path + ".entrypoint",
|
|
875
|
-
expected: "(Array<string> | string | undefined)",
|
|
876
|
-
value: input.entrypoint
|
|
877
|
-
})), undefined === input.env || ("object" === typeof input.env && null !== input.env && false === Array.isArray(input.env) || _report(_exceptionable, {
|
|
878
|
-
path: _path + ".env",
|
|
879
|
-
expected: "(__type.o15 | undefined)",
|
|
880
|
-
value: input.env
|
|
881
|
-
})) && _vo19(input.env, _path + ".env", true && _exceptionable) || _report(_exceptionable, {
|
|
882
|
-
path: _path + ".env",
|
|
883
|
-
expected: "(__type.o15 | undefined)",
|
|
884
|
-
value: input.env
|
|
885
|
-
}), (null !== input.restart_policy || _report(_exceptionable, {
|
|
886
|
-
path: _path + ".restart_policy",
|
|
887
|
-
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o16 | undefined)",
|
|
888
|
-
value: input.restart_policy
|
|
889
|
-
})) && (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, {
|
|
890
|
-
path: _path + ".restart_policy",
|
|
891
|
-
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o16 | undefined)",
|
|
892
|
-
value: input.restart_policy
|
|
893
|
-
})) && _vo20(input.restart_policy, _path + ".restart_policy", true && _exceptionable) || _report(_exceptionable, {
|
|
894
|
-
path: _path + ".restart_policy",
|
|
895
|
-
expected: "(\"always\" | \"no\" | \"on-failure\" | \"unless-stopped\" | __type.o16 | undefined)",
|
|
896
|
-
value: input.restart_policy
|
|
897
|
-
})), undefined === input.required_vram || "number" === typeof input.required_vram || _report(_exceptionable, {
|
|
898
|
-
path: _path + ".required_vram",
|
|
899
|
-
expected: "(number | undefined)",
|
|
900
|
-
value: input.required_vram
|
|
901
|
-
}), undefined === input.resources || (Array.isArray(input.resources) || _report(_exceptionable, {
|
|
902
|
-
path: _path + ".resources",
|
|
903
|
-
expected: "(Array<Resource | SpreadMarker | \"__remove-if-empty__\"> | undefined)",
|
|
904
|
-
value: input.resources
|
|
905
|
-
})) && input.resources.map((elem, _index22) => (null !== elem || _report(_exceptionable, {
|
|
906
|
-
path: _path + ".resources[" + _index22 + "]",
|
|
907
|
-
expected: "(\"__remove-if-empty__\" | (__type.o12 & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
908
|
-
value: elem
|
|
909
|
-
})) && (undefined !== elem || _report(_exceptionable, {
|
|
910
|
-
path: _path + ".resources[" + _index22 + "]",
|
|
911
|
-
expected: "(\"__remove-if-empty__\" | (__type.o12 & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
912
|
-
value: elem
|
|
913
|
-
})) && ("__remove-if-empty__" === elem || ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
914
|
-
path: _path + ".resources[" + _index22 + "]",
|
|
915
|
-
expected: "(\"__remove-if-empty__\" | (__type.o12 & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
916
|
-
value: elem
|
|
917
|
-
})) && _vu2(elem, _path + ".resources[" + _index22 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
918
|
-
path: _path + ".resources[" + _index22 + "]",
|
|
919
|
-
expected: "(\"__remove-if-empty__\" | (__type.o12 & TagBase<__type>) | HFResource | OllamaResource | S3Base | S3WithBucket | S3WithBuckets)",
|
|
920
|
-
value: elem
|
|
921
|
-
}))).every(flag => flag) || _report(_exceptionable, {
|
|
922
|
-
path: _path + ".resources",
|
|
923
|
-
expected: "(Array<Resource | SpreadMarker | \"__remove-if-empty__\"> | undefined)",
|
|
924
|
-
value: input.resources
|
|
925
|
-
}), undefined === input.authentication || ("object" === typeof input.authentication && null !== input.authentication && false === Array.isArray(input.authentication) || _report(_exceptionable, {
|
|
926
|
-
path: _path + ".authentication",
|
|
927
|
-
expected: "(__type.o18 | undefined)",
|
|
928
|
-
value: input.authentication
|
|
929
|
-
})) && _vo28(input.authentication, _path + ".authentication", true && _exceptionable) || _report(_exceptionable, {
|
|
930
|
-
path: _path + ".authentication",
|
|
931
|
-
expected: "(__type.o18 | undefined)",
|
|
932
|
-
value: input.authentication
|
|
933
|
-
}), undefined === input.trusted_execution_env || "SEV-SNP" === input.trusted_execution_env || _report(_exceptionable, {
|
|
934
|
-
path: _path + ".trusted_execution_env",
|
|
935
|
-
expected: "(\"SEV-SNP\" | undefined)",
|
|
936
|
-
value: input.trusted_execution_env
|
|
937
|
-
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
938
|
-
if (["image", "aliases", "cmd", "volumes", "expose", "private", "gpu", "work_dir", "output", "entrypoint", "env", "restart_policy", "required_vram", "resources", "authentication", "trusted_execution_env"].some(prop => key === prop))
|
|
939
|
-
return true;
|
|
940
|
-
const value = input[key];
|
|
941
|
-
if (undefined === value)
|
|
942
|
-
return true;
|
|
943
|
-
return _report(_exceptionable, {
|
|
944
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
945
|
-
expected: "undefined",
|
|
946
|
-
value: value,
|
|
947
|
-
description: [
|
|
948
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
949
|
-
"",
|
|
950
|
-
"Please remove the property next time."
|
|
951
|
-
].join("\n")
|
|
952
|
-
});
|
|
953
|
-
}).every(flag => flag))].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
954
|
-
path: _path + ".name",
|
|
955
|
-
expected: "string",
|
|
956
|
-
value: input.name
|
|
957
|
-
}), "string" === typeof input.dest || _report(_exceptionable, {
|
|
958
|
-
path: _path + ".dest",
|
|
959
|
-
expected: "string",
|
|
960
|
-
value: input.dest
|
|
961
|
-
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
962
|
-
if (["name", "dest"].some(prop => key === prop))
|
|
963
|
-
return true;
|
|
964
|
-
const value = input[key];
|
|
965
|
-
if (undefined === value)
|
|
966
|
-
return true;
|
|
967
|
-
return _report(_exceptionable, {
|
|
968
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
969
|
-
expected: "undefined",
|
|
970
|
-
value: value,
|
|
971
|
-
description: [
|
|
972
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
973
|
-
"",
|
|
974
|
-
"Please remove the property next time."
|
|
975
|
-
].join("\n")
|
|
976
|
-
});
|
|
977
|
-
}).every(flag => flag))].every(flag => flag); const _vo14 = (input, _path, _exceptionable = true) => ["string" === typeof input.__spread__ && (typeof input.__spread__ === "string" && /^%%(ops|global).[^%]+%%$/.test(input.__spread__) || _report(_exceptionable, {
|
|
978
|
-
path: _path + ".__spread__",
|
|
979
|
-
expected: "string & TagBase<__type>",
|
|
980
|
-
value: input.__spread__
|
|
981
|
-
})) || _report(_exceptionable, {
|
|
982
|
-
path: _path + ".__spread__",
|
|
983
|
-
expected: "(string & TagBase<__type>)",
|
|
984
|
-
value: input.__spread__
|
|
985
|
-
}), undefined === input.chunked || "boolean" === typeof input.chunked || _report(_exceptionable, {
|
|
986
|
-
path: _path + ".chunked",
|
|
987
|
-
expected: "(boolean | undefined)",
|
|
988
|
-
value: input.chunked
|
|
989
|
-
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
990
|
-
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
991
|
-
return true;
|
|
992
|
-
const value = input[key];
|
|
993
|
-
if (undefined === value)
|
|
994
|
-
return true;
|
|
995
|
-
return _report(_exceptionable, {
|
|
996
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
997
|
-
expected: "undefined",
|
|
998
|
-
value: value,
|
|
999
|
-
description: [
|
|
1000
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1001
|
-
"",
|
|
1002
|
-
"Please remove the property next time."
|
|
1003
|
-
].join("\n")
|
|
1004
|
-
});
|
|
1005
|
-
}).every(flag => flag))].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => ["number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
1006
|
-
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
1007
|
-
if (!match)
|
|
1008
|
-
return false;
|
|
1009
|
-
const a = Number(match[1]), b = Number(match[2]);
|
|
1010
|
-
return a < b;
|
|
1011
|
-
})() || _report(_exceptionable, {
|
|
1012
|
-
path: _path + ".port",
|
|
1013
|
-
expected: "string & TagBase<__type>",
|
|
1014
|
-
value: input.port
|
|
1015
|
-
})) || _report(_exceptionable, {
|
|
1016
|
-
path: _path + ".port",
|
|
1017
|
-
expected: "((string & TagBase<__type>) | number)",
|
|
1018
|
-
value: input.port
|
|
1019
|
-
}), undefined === input.type || "api" === input.type || "websocket" === input.type || "web" === input.type || "webapi" === input.type || "none" === input.type || _report(_exceptionable, {
|
|
1020
|
-
path: _path + ".type",
|
|
1021
|
-
expected: "(\"api\" | \"none\" | \"web\" | \"webapi\" | \"websocket\" | undefined)",
|
|
1022
|
-
value: input.type
|
|
1023
|
-
}), undefined === input.health_checks || (Array.isArray(input.health_checks) || _report(_exceptionable, {
|
|
1024
|
-
path: _path + ".health_checks",
|
|
1025
|
-
expected: "(Array<HealthCheck> | undefined)",
|
|
1026
|
-
value: input.health_checks
|
|
1027
|
-
})) && input.health_checks.map((elem, _index23) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1028
|
-
path: _path + ".health_checks[" + _index23 + "]",
|
|
1029
|
-
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
1030
|
-
value: elem
|
|
1031
|
-
})) && _vu1(elem, _path + ".health_checks[" + _index23 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1032
|
-
path: _path + ".health_checks[" + _index23 + "]",
|
|
1033
|
-
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
1034
|
-
value: elem
|
|
1035
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1036
|
-
path: _path + ".health_checks",
|
|
1037
|
-
expected: "(Array<HealthCheck> | undefined)",
|
|
1038
|
-
value: input.health_checks
|
|
1039
|
-
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1040
|
-
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
1041
|
-
return true;
|
|
1042
|
-
const value = input[key];
|
|
1043
|
-
if (undefined === value)
|
|
1044
|
-
return true;
|
|
1045
|
-
return _report(_exceptionable, {
|
|
1046
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1047
|
-
expected: "undefined",
|
|
1048
|
-
value: value,
|
|
1049
|
-
description: [
|
|
1050
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1051
|
-
"",
|
|
1052
|
-
"Please remove the property next time."
|
|
1053
|
-
].join("\n")
|
|
1054
|
-
});
|
|
1055
|
-
}).every(flag => flag))].every(flag => flag); const _vo16 = (input, _path, _exceptionable = true) => ["http" === input.type || _report(_exceptionable, {
|
|
1056
|
-
path: _path + ".type",
|
|
1057
|
-
expected: "\"http\"",
|
|
1058
|
-
value: input.type
|
|
1059
|
-
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
1060
|
-
path: _path + ".path",
|
|
1061
|
-
expected: "string",
|
|
1062
|
-
value: input.path
|
|
1063
|
-
}), "GET" === input.method || "POST" === input.method || "PUT" === input.method || "DELETE" === input.method || _report(_exceptionable, {
|
|
1064
|
-
path: _path + ".method",
|
|
1065
|
-
expected: "(\"DELETE\" | \"GET\" | \"POST\" | \"PUT\")",
|
|
1066
|
-
value: input.method
|
|
1067
|
-
}), "number" === typeof input.expected_status || _report(_exceptionable, {
|
|
1068
|
-
path: _path + ".expected_status",
|
|
1069
|
-
expected: "number",
|
|
1070
|
-
value: input.expected_status
|
|
1071
|
-
}), undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || _report(_exceptionable, {
|
|
1072
|
-
path: _path + ".headers",
|
|
1073
|
-
expected: "(Record<string, string> | undefined)",
|
|
1074
|
-
value: input.headers
|
|
1075
|
-
})) && _vo17(input.headers, _path + ".headers", true && _exceptionable) || _report(_exceptionable, {
|
|
1076
|
-
path: _path + ".headers",
|
|
1077
|
-
expected: "(Record<string, string> | undefined)",
|
|
1078
|
-
value: input.headers
|
|
1079
|
-
}), true, "boolean" === typeof input.continuous || _report(_exceptionable, {
|
|
1080
|
-
path: _path + ".continuous",
|
|
1081
|
-
expected: "boolean",
|
|
1082
|
-
value: input.continuous
|
|
1083
|
-
}), 5 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1084
|
-
if (["type", "path", "method", "expected_status", "headers", "body", "continuous"].some(prop => key === prop))
|
|
1085
|
-
return true;
|
|
1086
|
-
const value = input[key];
|
|
1087
|
-
if (undefined === value)
|
|
1088
|
-
return true;
|
|
1089
|
-
return _report(_exceptionable, {
|
|
1090
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1091
|
-
expected: "undefined",
|
|
1092
|
-
value: value,
|
|
1093
|
-
description: [
|
|
1094
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1095
|
-
"",
|
|
1096
|
-
"Please remove the property next time."
|
|
1097
|
-
].join("\n")
|
|
1098
|
-
});
|
|
1099
|
-
}).every(flag => flag))].every(flag => flag); const _vo17 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1100
|
-
const value = input[key];
|
|
1101
|
-
if (undefined === value)
|
|
1102
|
-
return true;
|
|
1103
|
-
return "string" === typeof value || _report(_exceptionable, {
|
|
1104
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1105
|
-
expected: "string",
|
|
1106
|
-
value: value
|
|
1107
|
-
});
|
|
1108
|
-
}).every(flag => flag)].every(flag => flag); const _vo18 = (input, _path, _exceptionable = true) => ["websocket" === input.type || _report(_exceptionable, {
|
|
1109
|
-
path: _path + ".type",
|
|
1110
|
-
expected: "\"websocket\"",
|
|
1111
|
-
value: input.type
|
|
1112
|
-
}), "string" === typeof input.expected_response || _report(_exceptionable, {
|
|
1113
|
-
path: _path + ".expected_response",
|
|
1114
|
-
expected: "string",
|
|
1115
|
-
value: input.expected_response
|
|
1116
|
-
}), "boolean" === typeof input.continuous || _report(_exceptionable, {
|
|
1117
|
-
path: _path + ".continuous",
|
|
1118
|
-
expected: "boolean",
|
|
1119
|
-
value: input.continuous
|
|
1120
|
-
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1121
|
-
if (["type", "expected_response", "continuous"].some(prop => key === prop))
|
|
1122
|
-
return true;
|
|
1123
|
-
const value = input[key];
|
|
1124
|
-
if (undefined === value)
|
|
1125
|
-
return true;
|
|
1126
|
-
return _report(_exceptionable, {
|
|
1127
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1128
|
-
expected: "undefined",
|
|
1129
|
-
value: value,
|
|
1130
|
-
description: [
|
|
1131
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1132
|
-
"",
|
|
1133
|
-
"Please remove the property next time."
|
|
1134
|
-
].join("\n")
|
|
1135
|
-
});
|
|
1136
|
-
}).every(flag => flag))].every(flag => flag); const _vo19 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1137
|
-
const value = input[key];
|
|
1138
|
-
if (undefined === value)
|
|
1139
|
-
return true;
|
|
1140
|
-
return "string" === typeof value || _report(_exceptionable, {
|
|
1141
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1142
|
-
expected: "string",
|
|
1143
|
-
value: value
|
|
1144
|
-
});
|
|
1145
|
-
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => ["on-failure" === input.policy || _report(_exceptionable, {
|
|
1146
|
-
path: _path + ".policy",
|
|
1147
|
-
expected: "\"on-failure\"",
|
|
1148
|
-
value: input.policy
|
|
1149
|
-
}), undefined === input.restart_tries || "number" === typeof input.restart_tries || _report(_exceptionable, {
|
|
1150
|
-
path: _path + ".restart_tries",
|
|
1151
|
-
expected: "(number | undefined)",
|
|
1152
|
-
value: input.restart_tries
|
|
1153
|
-
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1154
|
-
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
1155
|
-
return true;
|
|
1156
|
-
const value = input[key];
|
|
1157
|
-
if (undefined === value)
|
|
1158
|
-
return true;
|
|
1159
|
-
return _report(_exceptionable, {
|
|
1160
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1161
|
-
expected: "undefined",
|
|
1162
|
-
value: value,
|
|
1163
|
-
description: [
|
|
1164
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1165
|
-
"",
|
|
1166
|
-
"Please remove the property next time."
|
|
1167
|
-
].join("\n")
|
|
1168
|
-
});
|
|
1169
|
-
}).every(flag => flag))].every(flag => flag); const _vo21 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1170
|
-
path: _path + ".type",
|
|
1171
|
-
expected: "\"S3\"",
|
|
1172
|
-
value: input.type
|
|
1173
|
-
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1174
|
-
path: _path + ".target",
|
|
1175
|
-
expected: "string",
|
|
1176
|
-
value: input.target
|
|
1177
|
-
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
1178
|
-
path: _path + ".url",
|
|
1179
|
-
expected: "(string | undefined)",
|
|
1180
|
-
value: input.url
|
|
1181
|
-
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
1182
|
-
path: _path + ".allowWrite",
|
|
1183
|
-
expected: "(boolean | undefined)",
|
|
1184
|
-
value: input.allowWrite
|
|
1185
|
-
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
1186
|
-
path: _path + ".files",
|
|
1187
|
-
expected: "(Array<string> | undefined)",
|
|
1188
|
-
value: input.files
|
|
1189
|
-
})) && input.files.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
|
|
1190
|
-
path: _path + ".files[" + _index24 + "]",
|
|
1191
|
-
expected: "string",
|
|
1192
|
-
value: elem
|
|
1193
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1194
|
-
path: _path + ".files",
|
|
1195
|
-
expected: "(Array<string> | undefined)",
|
|
1196
|
-
value: input.files
|
|
1197
|
-
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
1198
|
-
path: _path + ".IAM",
|
|
1199
|
-
expected: "(S3Auth | undefined)",
|
|
1200
|
-
value: input.IAM
|
|
1201
|
-
})) && _vo22(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1202
|
-
path: _path + ".IAM",
|
|
1203
|
-
expected: "(S3Auth | undefined)",
|
|
1204
|
-
value: input.IAM
|
|
1205
|
-
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1206
|
-
if (["type", "target", "url", "allowWrite", "files", "IAM"].some(prop => key === prop))
|
|
1207
|
-
return true;
|
|
1208
|
-
const value = input[key];
|
|
1209
|
-
if (undefined === value)
|
|
1210
|
-
return true;
|
|
1211
|
-
return _report(_exceptionable, {
|
|
1212
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1213
|
-
expected: "undefined",
|
|
1214
|
-
value: value,
|
|
1215
|
-
description: [
|
|
1216
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1217
|
-
"",
|
|
1218
|
-
"Please remove the property next time."
|
|
1219
|
-
].join("\n")
|
|
1220
|
-
});
|
|
1221
|
-
}).every(flag => flag))].every(flag => flag); const _vo22 = (input, _path, _exceptionable = true) => ["string" === typeof input.REGION || _report(_exceptionable, {
|
|
1222
|
-
path: _path + ".REGION",
|
|
1223
|
-
expected: "string",
|
|
1224
|
-
value: input.REGION
|
|
1225
|
-
}), "string" === typeof input.ACCESS_KEY_ID || _report(_exceptionable, {
|
|
1226
|
-
path: _path + ".ACCESS_KEY_ID",
|
|
1227
|
-
expected: "string",
|
|
1228
|
-
value: input.ACCESS_KEY_ID
|
|
1229
|
-
}), "string" === typeof input.SECRET_ACCESS_KEY || _report(_exceptionable, {
|
|
1230
|
-
path: _path + ".SECRET_ACCESS_KEY",
|
|
1231
|
-
expected: "string",
|
|
1232
|
-
value: input.SECRET_ACCESS_KEY
|
|
1233
|
-
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1234
|
-
if (["REGION", "ACCESS_KEY_ID", "SECRET_ACCESS_KEY"].some(prop => key === prop))
|
|
1235
|
-
return true;
|
|
1236
|
-
const value = input[key];
|
|
1237
|
-
if (undefined === value)
|
|
1238
|
-
return true;
|
|
1239
|
-
return _report(_exceptionable, {
|
|
1240
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1241
|
-
expected: "undefined",
|
|
1242
|
-
value: value,
|
|
1243
|
-
description: [
|
|
1244
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1245
|
-
"",
|
|
1246
|
-
"Please remove the property next time."
|
|
1247
|
-
].join("\n")
|
|
1248
|
-
});
|
|
1249
|
-
}).every(flag => flag))].every(flag => flag); const _vo23 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1250
|
-
path: _path + ".type",
|
|
1251
|
-
expected: "\"S3\"",
|
|
1252
|
-
value: input.type
|
|
1253
|
-
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1254
|
-
path: _path + ".target",
|
|
1255
|
-
expected: "string",
|
|
1256
|
-
value: input.target
|
|
1257
|
-
}), "string" === typeof input.bucket || _report(_exceptionable, {
|
|
1258
|
-
path: _path + ".bucket",
|
|
1259
|
-
expected: "string",
|
|
1260
|
-
value: input.bucket
|
|
1261
|
-
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
1262
|
-
path: _path + ".url",
|
|
1263
|
-
expected: "(string | undefined)",
|
|
1264
|
-
value: input.url
|
|
1265
|
-
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
1266
|
-
path: _path + ".allowWrite",
|
|
1267
|
-
expected: "(boolean | undefined)",
|
|
1268
|
-
value: input.allowWrite
|
|
1269
|
-
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
1270
|
-
path: _path + ".IAM",
|
|
1271
|
-
expected: "(S3Auth | undefined)",
|
|
1272
|
-
value: input.IAM
|
|
1273
|
-
})) && _vo22(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1274
|
-
path: _path + ".IAM",
|
|
1275
|
-
expected: "(S3Auth | undefined)",
|
|
1276
|
-
value: input.IAM
|
|
1277
|
-
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1278
|
-
if (["type", "target", "bucket", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
1279
|
-
return true;
|
|
1280
|
-
const value = input[key];
|
|
1281
|
-
if (undefined === value)
|
|
1282
|
-
return true;
|
|
1283
|
-
return _report(_exceptionable, {
|
|
1284
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1285
|
-
expected: "undefined",
|
|
1286
|
-
value: value,
|
|
1287
|
-
description: [
|
|
1288
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1289
|
-
"",
|
|
1290
|
-
"Please remove the property next time."
|
|
1291
|
-
].join("\n")
|
|
1292
|
-
});
|
|
1293
|
-
}).every(flag => flag))].every(flag => flag); const _vo24 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1294
|
-
path: _path + ".type",
|
|
1295
|
-
expected: "\"S3\"",
|
|
1296
|
-
value: input.type
|
|
1297
|
-
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1298
|
-
path: _path + ".target",
|
|
1299
|
-
expected: "string",
|
|
1300
|
-
value: input.target
|
|
1301
|
-
}), (Array.isArray(input.buckets) || _report(_exceptionable, {
|
|
1302
|
-
path: _path + ".buckets",
|
|
1303
|
-
expected: "Array<__type>",
|
|
1304
|
-
value: input.buckets
|
|
1305
|
-
})) && input.buckets.map((elem, _index25) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1306
|
-
path: _path + ".buckets[" + _index25 + "]",
|
|
1307
|
-
expected: "__type.o17",
|
|
1308
|
-
value: elem
|
|
1309
|
-
})) && _vo25(elem, _path + ".buckets[" + _index25 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1310
|
-
path: _path + ".buckets[" + _index25 + "]",
|
|
1311
|
-
expected: "__type.o17",
|
|
1312
|
-
value: elem
|
|
1313
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1314
|
-
path: _path + ".buckets",
|
|
1315
|
-
expected: "Array<__type>",
|
|
1316
|
-
value: input.buckets
|
|
1317
|
-
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
1318
|
-
path: _path + ".url",
|
|
1319
|
-
expected: "(string | undefined)",
|
|
1320
|
-
value: input.url
|
|
1321
|
-
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
1322
|
-
path: _path + ".allowWrite",
|
|
1323
|
-
expected: "(boolean | undefined)",
|
|
1324
|
-
value: input.allowWrite
|
|
1325
|
-
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
1326
|
-
path: _path + ".IAM",
|
|
1327
|
-
expected: "(S3Auth | undefined)",
|
|
1328
|
-
value: input.IAM
|
|
1329
|
-
})) && _vo22(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1330
|
-
path: _path + ".IAM",
|
|
1331
|
-
expected: "(S3Auth | undefined)",
|
|
1332
|
-
value: input.IAM
|
|
1333
|
-
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1334
|
-
if (["type", "target", "buckets", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
1335
|
-
return true;
|
|
1336
|
-
const value = input[key];
|
|
1337
|
-
if (undefined === value)
|
|
1338
|
-
return true;
|
|
1339
|
-
return _report(_exceptionable, {
|
|
1340
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1341
|
-
expected: "undefined",
|
|
1342
|
-
value: value,
|
|
1343
|
-
description: [
|
|
1344
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1345
|
-
"",
|
|
1346
|
-
"Please remove the property next time."
|
|
1347
|
-
].join("\n")
|
|
1348
|
-
});
|
|
1349
|
-
}).every(flag => flag))].every(flag => flag); const _vo25 = (input, _path, _exceptionable = true) => ["string" === typeof input.url || _report(_exceptionable, {
|
|
1350
|
-
path: _path + ".url",
|
|
1351
|
-
expected: "string",
|
|
1352
|
-
value: input.url
|
|
1353
|
-
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
1354
|
-
path: _path + ".files",
|
|
1355
|
-
expected: "(Array<string> | undefined)",
|
|
1356
|
-
value: input.files
|
|
1357
|
-
})) && input.files.map((elem, _index26) => "string" === typeof elem || _report(_exceptionable, {
|
|
1358
|
-
path: _path + ".files[" + _index26 + "]",
|
|
1359
|
-
expected: "string",
|
|
1360
|
-
value: elem
|
|
1361
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1362
|
-
path: _path + ".files",
|
|
1363
|
-
expected: "(Array<string> | undefined)",
|
|
1364
|
-
value: input.files
|
|
1365
|
-
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1366
|
-
if (["url", "files"].some(prop => key === prop))
|
|
1367
|
-
return true;
|
|
1368
|
-
const value = input[key];
|
|
1369
|
-
if (undefined === value)
|
|
1370
|
-
return true;
|
|
1371
|
-
return _report(_exceptionable, {
|
|
1372
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1373
|
-
expected: "undefined",
|
|
1374
|
-
value: value,
|
|
1375
|
-
description: [
|
|
1376
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1377
|
-
"",
|
|
1378
|
-
"Please remove the property next time."
|
|
1379
|
-
].join("\n")
|
|
1380
|
-
});
|
|
1381
|
-
}).every(flag => flag))].every(flag => flag); const _vo26 = (input, _path, _exceptionable = true) => ["HF" === input.type || _report(_exceptionable, {
|
|
1382
|
-
path: _path + ".type",
|
|
1383
|
-
expected: "\"HF\"",
|
|
1384
|
-
value: input.type
|
|
1385
|
-
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1386
|
-
path: _path + ".target",
|
|
1387
|
-
expected: "string",
|
|
1388
|
-
value: input.target
|
|
1389
|
-
}), "string" === typeof input.repo || _report(_exceptionable, {
|
|
1390
|
-
path: _path + ".repo",
|
|
1391
|
-
expected: "string",
|
|
1392
|
-
value: input.repo
|
|
1393
|
-
}), undefined === input.revision || "string" === typeof input.revision || _report(_exceptionable, {
|
|
1394
|
-
path: _path + ".revision",
|
|
1395
|
-
expected: "(string | undefined)",
|
|
1396
|
-
value: input.revision
|
|
1397
|
-
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
1398
|
-
path: _path + ".files",
|
|
1399
|
-
expected: "(Array<string> | undefined)",
|
|
1400
|
-
value: input.files
|
|
1401
|
-
})) && input.files.map((elem, _index27) => "string" === typeof elem || _report(_exceptionable, {
|
|
1402
|
-
path: _path + ".files[" + _index27 + "]",
|
|
1403
|
-
expected: "string",
|
|
1404
|
-
value: elem
|
|
1405
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1406
|
-
path: _path + ".files",
|
|
1407
|
-
expected: "(Array<string> | undefined)",
|
|
1408
|
-
value: input.files
|
|
1409
|
-
}), undefined === input.accessToken || "string" === typeof input.accessToken || _report(_exceptionable, {
|
|
1410
|
-
path: _path + ".accessToken",
|
|
1411
|
-
expected: "(string | undefined)",
|
|
1412
|
-
value: input.accessToken
|
|
1413
|
-
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1414
|
-
if (["type", "target", "repo", "revision", "files", "accessToken"].some(prop => key === prop))
|
|
1415
|
-
return true;
|
|
1416
|
-
const value = input[key];
|
|
1417
|
-
if (undefined === value)
|
|
1418
|
-
return true;
|
|
1419
|
-
return _report(_exceptionable, {
|
|
1420
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1421
|
-
expected: "undefined",
|
|
1422
|
-
value: value,
|
|
1423
|
-
description: [
|
|
1424
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1425
|
-
"",
|
|
1426
|
-
"Please remove the property next time."
|
|
1427
|
-
].join("\n")
|
|
1428
|
-
});
|
|
1429
|
-
}).every(flag => flag))].every(flag => flag); const _vo27 = (input, _path, _exceptionable = true) => ["Ollama" === input.type || _report(_exceptionable, {
|
|
1430
|
-
path: _path + ".type",
|
|
1431
|
-
expected: "\"Ollama\"",
|
|
1432
|
-
value: input.type
|
|
1433
|
-
}), "string" === typeof input.model || _report(_exceptionable, {
|
|
1434
|
-
path: _path + ".model",
|
|
1435
|
-
expected: "string",
|
|
1436
|
-
value: input.model
|
|
1437
|
-
}), undefined === input.target || "string" === typeof input.target || _report(_exceptionable, {
|
|
1438
|
-
path: _path + ".target",
|
|
1439
|
-
expected: "(string | undefined)",
|
|
1440
|
-
value: input.target
|
|
1441
|
-
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1442
|
-
if (["type", "model", "target"].some(prop => key === prop))
|
|
1443
|
-
return true;
|
|
1444
|
-
const value = input[key];
|
|
1445
|
-
if (undefined === value)
|
|
1446
|
-
return true;
|
|
1447
|
-
return _report(_exceptionable, {
|
|
1448
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1449
|
-
expected: "undefined",
|
|
1450
|
-
value: value,
|
|
1451
|
-
description: [
|
|
1452
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1453
|
-
"",
|
|
1454
|
-
"Please remove the property next time."
|
|
1455
|
-
].join("\n")
|
|
1456
|
-
});
|
|
1457
|
-
}).every(flag => flag))].every(flag => flag); const _vo28 = (input, _path, _exceptionable = true) => [undefined === input.docker || ("object" === typeof input.docker && null !== input.docker && false === Array.isArray(input.docker) || _report(_exceptionable, {
|
|
1458
|
-
path: _path + ".docker",
|
|
1459
|
-
expected: "(DockerAuth | undefined)",
|
|
1460
|
-
value: input.docker
|
|
1461
|
-
})) && _vo29(input.docker, _path + ".docker", true && _exceptionable) || _report(_exceptionable, {
|
|
1462
|
-
path: _path + ".docker",
|
|
1463
|
-
expected: "(DockerAuth | undefined)",
|
|
1464
|
-
value: input.docker
|
|
1465
|
-
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1466
|
-
if (["docker"].some(prop => key === prop))
|
|
1467
|
-
return true;
|
|
1468
|
-
const value = input[key];
|
|
1469
|
-
if (undefined === value)
|
|
1470
|
-
return true;
|
|
1471
|
-
return _report(_exceptionable, {
|
|
1472
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1473
|
-
expected: "undefined",
|
|
1474
|
-
value: value,
|
|
1475
|
-
description: [
|
|
1476
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1477
|
-
"",
|
|
1478
|
-
"Please remove the property next time."
|
|
1479
|
-
].join("\n")
|
|
1480
|
-
});
|
|
1481
|
-
}).every(flag => flag))].every(flag => flag); const _vo29 = (input, _path, _exceptionable = true) => [undefined === input.username || "string" === typeof input.username || _report(_exceptionable, {
|
|
1482
|
-
path: _path + ".username",
|
|
1483
|
-
expected: "(string | undefined)",
|
|
1484
|
-
value: input.username
|
|
1485
|
-
}), undefined === input.password || "string" === typeof input.password || _report(_exceptionable, {
|
|
1486
|
-
path: _path + ".password",
|
|
1487
|
-
expected: "(string | undefined)",
|
|
1488
|
-
value: input.password
|
|
1489
|
-
}), undefined === input.email || "string" === typeof input.email || _report(_exceptionable, {
|
|
1490
|
-
path: _path + ".email",
|
|
1491
|
-
expected: "(string | undefined)",
|
|
1492
|
-
value: input.email
|
|
1493
|
-
}), undefined === input.server || "string" === typeof input.server || _report(_exceptionable, {
|
|
1494
|
-
path: _path + ".server",
|
|
1495
|
-
expected: "(string | undefined)",
|
|
1496
|
-
value: input.server
|
|
1497
|
-
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1498
|
-
if (["username", "password", "email", "server"].some(prop => key === prop))
|
|
1499
|
-
return true;
|
|
1500
|
-
const value = input[key];
|
|
1501
|
-
if (undefined === value)
|
|
1502
|
-
return true;
|
|
1503
|
-
return _report(_exceptionable, {
|
|
1504
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1505
|
-
expected: "undefined",
|
|
1506
|
-
value: value,
|
|
1507
|
-
description: [
|
|
1508
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1509
|
-
"",
|
|
1510
|
-
"Please remove the property next time."
|
|
1511
|
-
].join("\n")
|
|
1512
|
-
});
|
|
1513
|
-
}).every(flag => flag))].every(flag => flag); const _vo30 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
1514
|
-
path: _path + ".name",
|
|
1515
|
-
expected: "string",
|
|
1516
|
-
value: input.name
|
|
1517
|
-
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1518
|
-
if (["name"].some(prop => key === prop))
|
|
1519
|
-
return true;
|
|
1520
|
-
const value = input[key];
|
|
1521
|
-
if (undefined === value)
|
|
1522
|
-
return true;
|
|
1523
|
-
return _report(_exceptionable, {
|
|
1524
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1525
|
-
expected: "undefined",
|
|
1526
|
-
value: value,
|
|
1527
|
-
description: [
|
|
1528
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1529
|
-
"",
|
|
1530
|
-
"Please remove the property next time."
|
|
1531
|
-
].join("\n")
|
|
1532
|
-
});
|
|
1533
|
-
}).every(flag => flag))].every(flag => flag); const _vo31 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1534
|
-
const value = input[key];
|
|
1535
|
-
if (undefined === value)
|
|
1536
|
-
return true;
|
|
1537
|
-
return (null !== value || _report(_exceptionable, {
|
|
1538
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1539
|
-
expected: "(OperationResult | string)",
|
|
1540
|
-
value: value
|
|
1541
|
-
})) && (undefined !== value || _report(_exceptionable, {
|
|
1542
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1543
|
-
expected: "(OperationResult | string)",
|
|
1544
|
-
value: value
|
|
1545
|
-
})) && ("string" === typeof value || ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
1546
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1547
|
-
expected: "(OperationResult | string)",
|
|
1548
|
-
value: value
|
|
1549
|
-
})) && _vo32(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
1550
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1551
|
-
expected: "(OperationResult | string)",
|
|
1552
|
-
value: value
|
|
1553
|
-
}));
|
|
1554
|
-
}).every(flag => flag)].every(flag => flag); const _vo32 = (input, _path, _exceptionable = true) => ["string" === typeof input.regex || _report(_exceptionable, {
|
|
1555
|
-
path: _path + ".regex",
|
|
1556
|
-
expected: "string",
|
|
1557
|
-
value: input.regex
|
|
1558
|
-
}), (Array.isArray(input.logType) || _report(_exceptionable, {
|
|
1559
|
-
path: _path + ".logType",
|
|
1560
|
-
expected: "(Array<StdOptions> & UniqueLogTypeTag)",
|
|
1561
|
-
value: input.logType
|
|
1562
|
-
})) && ((Array.isArray(input.logType) && input.logType.length >= 1 && input.logType.length <= 4 && (() => {
|
|
1563
|
-
const seen = new Set();
|
|
1564
|
-
for (const v of input.logType) {
|
|
1565
|
-
if (seen.has(v))
|
|
1566
|
-
return false;
|
|
1567
|
-
seen.add(v);
|
|
1568
|
-
}
|
|
1569
|
-
return true;
|
|
1570
|
-
})() || _report(_exceptionable, {
|
|
1571
|
-
path: _path + ".logType",
|
|
1572
|
-
expected: "Array<> & UniqueLogTypeTag",
|
|
1573
|
-
value: input.logType
|
|
1574
|
-
})) && input.logType.map((elem, _index28) => "stdout" === elem || "stdin" === elem || "stderr" === elem || "nodeerr" === elem || _report(_exceptionable, {
|
|
1575
|
-
path: _path + ".logType[" + _index28 + "]",
|
|
1576
|
-
expected: "(\"nodeerr\" | \"stderr\" | \"stdin\" | \"stdout\")",
|
|
1577
|
-
value: elem
|
|
1578
|
-
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1579
|
-
path: _path + ".logType",
|
|
1580
|
-
expected: "(Array<StdOptions> & UniqueLogTypeTag)",
|
|
1581
|
-
value: input.logType
|
|
1582
|
-
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1583
|
-
if (["regex", "logType"].some(prop => key === prop))
|
|
1584
|
-
return true;
|
|
1585
|
-
const value = input[key];
|
|
1586
|
-
if (undefined === value)
|
|
1587
|
-
return true;
|
|
1588
|
-
return _report(_exceptionable, {
|
|
1589
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1590
|
-
expected: "undefined",
|
|
1591
|
-
value: value,
|
|
1592
|
-
description: [
|
|
1593
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1594
|
-
"",
|
|
1595
|
-
"Please remove the property next time."
|
|
1596
|
-
].join("\n")
|
|
1597
|
-
});
|
|
1598
|
-
}).every(flag => flag))].every(flag => flag); const _vo33 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1599
|
-
path: _path + ".group",
|
|
1600
|
-
expected: "(string | undefined)",
|
|
1601
|
-
value: input.group
|
|
1602
|
-
}), (null !== input.depends_on || _report(_exceptionable, {
|
|
1603
|
-
path: _path + ".depends_on",
|
|
1604
|
-
expected: "undefined",
|
|
1605
|
-
value: input.depends_on
|
|
1606
|
-
})) && (undefined === input.depends_on || _report(_exceptionable, {
|
|
1607
|
-
path: _path + ".depends_on",
|
|
1608
|
-
expected: "undefined",
|
|
1609
|
-
value: input.depends_on
|
|
1610
|
-
})), (null !== input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1611
|
-
path: _path + ".stop_if_dependent_stops",
|
|
1612
|
-
expected: "undefined",
|
|
1613
|
-
value: input.stop_if_dependent_stops
|
|
1614
|
-
})) && (undefined === input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1615
|
-
path: _path + ".stop_if_dependent_stops",
|
|
1616
|
-
expected: "undefined",
|
|
1617
|
-
value: input.stop_if_dependent_stops
|
|
1618
|
-
})), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1619
|
-
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
1620
|
-
return true;
|
|
1621
|
-
const value = input[key];
|
|
1622
|
-
if (undefined === value)
|
|
1623
|
-
return true;
|
|
1624
|
-
return _report(_exceptionable, {
|
|
1625
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1626
|
-
expected: "undefined",
|
|
1627
|
-
value: value,
|
|
1628
|
-
description: [
|
|
1629
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1630
|
-
"",
|
|
1631
|
-
"Please remove the property next time."
|
|
1632
|
-
].join("\n")
|
|
1633
|
-
});
|
|
1634
|
-
}).every(flag => flag))].every(flag => flag); const _vo34 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1635
|
-
path: _path + ".group",
|
|
1636
|
-
expected: "(string | undefined)",
|
|
1637
|
-
value: input.group
|
|
1638
|
-
}), (Array.isArray(input.depends_on) || _report(_exceptionable, {
|
|
1639
|
-
path: _path + ".depends_on",
|
|
1640
|
-
expected: "Array<string>",
|
|
1641
|
-
value: input.depends_on
|
|
1642
|
-
})) && input.depends_on.map((elem, _index29) => "string" === typeof elem || _report(_exceptionable, {
|
|
1643
|
-
path: _path + ".depends_on[" + _index29 + "]",
|
|
1644
|
-
expected: "string",
|
|
1645
|
-
value: elem
|
|
1646
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1647
|
-
path: _path + ".depends_on",
|
|
1648
|
-
expected: "Array<string>",
|
|
1649
|
-
value: input.depends_on
|
|
1650
|
-
}), undefined === input.stop_if_dependent_stops || "boolean" === typeof input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1651
|
-
path: _path + ".stop_if_dependent_stops",
|
|
1652
|
-
expected: "(boolean | undefined)",
|
|
1653
|
-
value: input.stop_if_dependent_stops
|
|
1654
|
-
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1655
|
-
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
1656
|
-
return true;
|
|
1657
|
-
const value = input[key];
|
|
1658
|
-
if (undefined === value)
|
|
1659
|
-
return true;
|
|
1660
|
-
return _report(_exceptionable, {
|
|
1661
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1662
|
-
expected: "undefined",
|
|
1663
|
-
value: value,
|
|
1664
|
-
description: [
|
|
1665
|
-
`The property \`${key}\` is not defined in the object type.`,
|
|
1666
|
-
"",
|
|
1667
|
-
"Please remove the property next time."
|
|
1668
|
-
].join("\n")
|
|
1669
|
-
});
|
|
1670
|
-
}).every(flag => flag))].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1671
|
-
if (undefined !== input.port)
|
|
1672
|
-
return _vo15(input, _path, true && _exceptionable);
|
|
1673
|
-
else if (undefined !== input.__spread__)
|
|
1674
|
-
return _vo14(input, _path, true && _exceptionable);
|
|
1675
|
-
else
|
|
1676
|
-
return _report(_exceptionable, {
|
|
1677
|
-
path: _path,
|
|
1678
|
-
expected: "(ExposedPort | __type.o12)",
|
|
1679
|
-
value: input
|
|
1680
|
-
});
|
|
1681
|
-
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
1682
|
-
if ("http" === input.type)
|
|
1683
|
-
return _vo16(input, _path, true && _exceptionable);
|
|
1684
|
-
else if ("websocket" === input.type)
|
|
1685
|
-
return _vo18(input, _path, true && _exceptionable);
|
|
1686
|
-
else
|
|
1687
|
-
return _report(_exceptionable, {
|
|
1688
|
-
path: _path,
|
|
1689
|
-
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
1690
|
-
value: input
|
|
1691
|
-
});
|
|
1692
|
-
})(); const _vu2 = (input, _path, _exceptionable = true) => (() => {
|
|
1693
|
-
if (undefined !== input.bucket)
|
|
1694
|
-
return _vo23(input, _path, true && _exceptionable);
|
|
1695
|
-
else if (undefined !== input.buckets)
|
|
1696
|
-
return _vo24(input, _path, true && _exceptionable);
|
|
1697
|
-
else if ("HF" === input.type)
|
|
1698
|
-
return _vo26(input, _path, true && _exceptionable);
|
|
1699
|
-
else if ("Ollama" === input.type)
|
|
1700
|
-
return _vo27(input, _path, true && _exceptionable);
|
|
1701
|
-
else if (undefined !== input.__spread__)
|
|
1702
|
-
return _vo14(input, _path, true && _exceptionable);
|
|
1703
|
-
else
|
|
1704
|
-
return _vo21(input, _path, true && _exceptionable);
|
|
1705
|
-
})(); const _vu3 = (input, _path, _exceptionable = true) => (() => {
|
|
1706
|
-
if (undefined !== input.image)
|
|
1707
|
-
return _vo12(input, _path, true && _exceptionable);
|
|
1708
|
-
else if (undefined !== input.name)
|
|
1709
|
-
return _vo30(input, _path, true && _exceptionable);
|
|
1710
|
-
else
|
|
1711
|
-
return _report(_exceptionable, {
|
|
1712
|
-
path: _path,
|
|
1713
|
-
expected: "(__type.o8 | __type.o20)",
|
|
1714
|
-
value: input
|
|
1715
|
-
});
|
|
1716
|
-
})(); const _vu4 = (input, _path, _exceptionable = true) => (() => {
|
|
1717
|
-
if (Array.isArray(input.depends_on) && input.depends_on.map((elem, _index30) => "string" === typeof elem).every(flag => flag))
|
|
1718
|
-
return _vo34(input, _path, true && _exceptionable);
|
|
1719
|
-
else
|
|
1720
|
-
return _vo33(input, _path, true && _exceptionable);
|
|
1721
|
-
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
1722
|
-
if (false === __is(input)) {
|
|
1723
|
-
errors = [];
|
|
1724
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1725
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1726
|
-
path: _path + "",
|
|
1727
|
-
expected: "JobDefinition",
|
|
1728
|
-
value: input
|
|
1729
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1730
|
-
path: _path + "",
|
|
1731
|
-
expected: "JobDefinition",
|
|
1732
|
-
value: input
|
|
1733
|
-
}))(input, "$input", true);
|
|
1734
|
-
const success = 0 === errors.length;
|
|
1735
|
-
return success ? {
|
|
1736
|
-
success,
|
|
1737
|
-
data: input
|
|
1738
|
-
} : {
|
|
1739
|
-
success,
|
|
1740
|
-
errors,
|
|
1741
|
-
data: input
|
|
1742
|
-
};
|
|
1743
|
-
}
|
|
1744
|
-
return {
|
|
1745
|
-
success: true,
|
|
1746
|
-
data: input
|
|
1747
|
-
};
|
|
1748
|
-
}); })();
|
|
1749
|
-
if (!req.body) {
|
|
1750
|
-
return res.status(400).send('Missing job definition.');
|
|
1751
|
-
}
|
|
1752
|
-
const isValid = validator(req.body);
|
|
1753
|
-
if (!isValid.success) {
|
|
1754
|
-
res.status(400).send(JSON.stringify({
|
|
1755
|
-
error: 'Failed to validate job defintion.',
|
|
1756
|
-
message: isValid.errors,
|
|
1757
|
-
}));
|
|
1758
|
-
}
|
|
1759
|
-
const sessionId = res.locals['session_id'];
|
|
1760
|
-
if (sessionId !== 'ADMIN') {
|
|
1761
|
-
res.status(200).send();
|
|
1762
|
-
}
|
|
1763
|
-
const id = generateRandomId(32);
|
|
1764
|
-
try {
|
|
1765
|
-
const task = new TaskManager(provider, repository, id, sessionId, req.body);
|
|
1766
|
-
task.bootstrap();
|
|
1767
|
-
await task.start();
|
|
1768
|
-
const result = repository.getFlow(id);
|
|
1769
|
-
if (sessionId === 'ADMIN') {
|
|
1770
|
-
res.status(200).send(result.state.opStates[0].results['prediction'][0]);
|
|
1771
|
-
return;
|
|
1772
|
-
}
|
|
1773
|
-
await fetch(`${configs().backendUrl}/benchmarks/submit`, {
|
|
1774
|
-
method: 'POST',
|
|
1775
|
-
headers: {
|
|
1776
|
-
Authorization: await sdk.authorization.generate(sessionId, {
|
|
1777
|
-
includeTime: true,
|
|
1778
|
-
}),
|
|
1779
|
-
'Content-Type': 'application/json',
|
|
1780
|
-
},
|
|
1781
|
-
body: JSON.stringify(result.state),
|
|
1782
|
-
});
|
|
1783
|
-
}
|
|
1784
|
-
catch (error) {
|
|
1785
|
-
throw error;
|
|
1786
|
-
}
|
|
1787
|
-
}
|