@nosana/node 1.0.0-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -0
- package/dist/.env +7 -0
- package/dist/.env.dev +5 -0
- package/dist/.env.prd +4 -0
- package/dist/NodeManager/client/index.d.ts +4 -0
- package/dist/NodeManager/client/index.js +14 -0
- package/dist/NodeManager/configs/NodeConfigs.d.ts +14 -0
- package/dist/NodeManager/configs/NodeConfigs.js +32 -0
- package/dist/NodeManager/configs/__tests__/NodeConfigs.spec.d.ts +1 -0
- package/dist/NodeManager/configs/__tests__/NodeConfigs.spec.js +161 -0
- package/dist/NodeManager/configs/configs.d.ts +21 -0
- package/dist/NodeManager/configs/configs.js +23 -0
- package/dist/NodeManager/db/__tests__/index.spec.d.ts +1 -0
- package/dist/NodeManager/db/__tests__/index.spec.js +65 -0
- package/dist/NodeManager/db/index.d.ts +50 -0
- package/dist/NodeManager/db/index.js +64 -0
- package/dist/NodeManager/errors/NodeAlreadyActiveError.d.ts +3 -0
- package/dist/NodeManager/errors/NodeAlreadyActiveError.js +6 -0
- package/dist/NodeManager/index.d.ts +24 -0
- package/dist/NodeManager/index.js +317 -0
- package/dist/NodeManager/jobs/index.d.ts +6 -0
- package/dist/NodeManager/jobs/index.js +45 -0
- package/dist/NodeManager/monitoring/LogMonitoringRegistry.d.ts +9 -0
- package/dist/NodeManager/monitoring/LogMonitoringRegistry.js +23 -0
- package/dist/NodeManager/monitoring/log/NodeLog.d.ts +56 -0
- package/dist/NodeManager/monitoring/log/NodeLog.js +1357 -0
- package/dist/NodeManager/monitoring/log/console/ConsoleLogger.d.ts +20 -0
- package/dist/NodeManager/monitoring/log/console/ConsoleLogger.js +290 -0
- package/dist/NodeManager/monitoring/ping/PingHandler.d.ts +13 -0
- package/dist/NodeManager/monitoring/ping/PingHandler.js +68 -0
- package/dist/NodeManager/monitoring/proxy/loggingProxy.d.ts +15 -0
- package/dist/NodeManager/monitoring/proxy/loggingProxy.js +145 -0
- package/dist/NodeManager/monitoring/state/NodeState.d.ts +29 -0
- package/dist/NodeManager/monitoring/state/NodeState.js +680 -0
- package/dist/NodeManager/monitoring/state/classifyState.d.ts +14 -0
- package/dist/NodeManager/monitoring/state/classifyState.js +57 -0
- package/dist/NodeManager/monitoring/streaming/LogStreamer.d.ts +14 -0
- package/dist/NodeManager/monitoring/streaming/LogStreamer.js +58 -0
- package/dist/NodeManager/monitoring/streaming/StateStreamer.d.ts +15 -0
- package/dist/NodeManager/monitoring/streaming/StateStreamer.js +59 -0
- package/dist/NodeManager/node/Node.d.ts +44 -0
- package/dist/NodeManager/node/Node.js +321 -0
- package/dist/NodeManager/node/abort/NodeAbortController.d.ts +6 -0
- package/dist/NodeManager/node/abort/NodeAbortController.js +12 -0
- package/dist/NodeManager/node/abort/abortControllerSelector.d.ts +3 -0
- package/dist/NodeManager/node/abort/abortControllerSelector.js +13 -0
- package/dist/NodeManager/node/api/ApiEventEmitter.d.ts +8 -0
- package/dist/NodeManager/node/api/ApiEventEmitter.js +13 -0
- package/dist/NodeManager/node/api/ApiHandler.d.ts +28 -0
- package/dist/NodeManager/node/api/ApiHandler.js +193 -0
- package/dist/NodeManager/node/api/eventsource/index.d.ts +6 -0
- package/dist/NodeManager/node/api/eventsource/index.js +35 -0
- package/dist/NodeManager/node/api/middlewares/index.d.ts +5 -0
- package/dist/NodeManager/node/api/middlewares/index.js +7 -0
- package/dist/NodeManager/node/api/middlewares/rest/verifyBackendSignatureMiddleware.d.ts +3 -0
- package/dist/NodeManager/node/api/middlewares/rest/verifyBackendSignatureMiddleware.js +20 -0
- package/dist/NodeManager/node/api/middlewares/rest/verifyJobOwnerSignatureMiddleware.d.ts +5 -0
- package/dist/NodeManager/node/api/middlewares/rest/verifyJobOwnerSignatureMiddleware.js +28 -0
- package/dist/NodeManager/node/api/middlewares/ws/verifyWSJobOwnerSignatureMiddleware.d.ts +6 -0
- package/dist/NodeManager/node/api/middlewares/ws/verifyWSJobOwnerSignatureMiddleware.js +30 -0
- package/dist/NodeManager/node/api/middlewares/ws/verifyWSMiddleware.d.ts +6 -0
- package/dist/NodeManager/node/api/middlewares/ws/verifyWSMiddleware.js +20 -0
- package/dist/NodeManager/node/api/middlewares/ws/verifyWSNodeOrJobOwnerSignatureMiddleware.d.ts +6 -0
- package/dist/NodeManager/node/api/middlewares/ws/verifyWSNodeOrJobOwnerSignatureMiddleware.js +33 -0
- package/dist/NodeManager/node/api/routes/get/index.d.ts +6 -0
- package/dist/NodeManager/node/api/routes/get/index.js +6 -0
- package/dist/NodeManager/node/api/routes/get/job-definition.d.ts +5 -0
- package/dist/NodeManager/node/api/routes/get/job-definition.js +16 -0
- package/dist/NodeManager/node/api/routes/get/job-info/buildInfoObject.d.ts +17 -0
- package/dist/NodeManager/node/api/routes/get/job-info/buildInfoObject.js +15 -0
- package/dist/NodeManager/node/api/routes/get/job-info/job-info.d.ts +5 -0
- package/dist/NodeManager/node/api/routes/get/job-info/job-info.js +18 -0
- package/dist/NodeManager/node/api/routes/get/job-info/pollActiveJob.d.ts +6 -0
- package/dist/NodeManager/node/api/routes/get/job-info/pollActiveJob.js +42 -0
- package/dist/NodeManager/node/api/routes/get/job-operation-info.d.ts +28 -0
- package/dist/NodeManager/node/api/routes/get/job-operation-info.js +53 -0
- package/dist/NodeManager/node/api/routes/get/job-results.d.ts +5 -0
- package/dist/NodeManager/node/api/routes/get/job-results.js +15 -0
- package/dist/NodeManager/node/api/routes/get/node-info.d.ts +3 -0
- package/dist/NodeManager/node/api/routes/get/node-info.js +23 -0
- package/dist/NodeManager/node/api/routes/get/service-url.d.ts +5 -0
- package/dist/NodeManager/node/api/routes/get/service-url.js +27 -0
- package/dist/NodeManager/node/api/routes/index.d.ts +3 -0
- package/dist/NodeManager/node/api/routes/index.js +3 -0
- package/dist/NodeManager/node/api/routes/post/index.d.ts +4 -0
- package/dist/NodeManager/node/api/routes/post/index.js +4 -0
- package/dist/NodeManager/node/api/routes/post/job-definition.d.ts +6 -0
- package/dist/NodeManager/node/api/routes/post/job-definition.js +15 -0
- package/dist/NodeManager/node/api/routes/post/job-operation-actions.d.ts +24 -0
- package/dist/NodeManager/node/api/routes/post/job-operation-actions.js +79 -0
- package/dist/NodeManager/node/api/routes/post/node-validation.d.ts +4 -0
- package/dist/NodeManager/node/api/routes/post/node-validation.js +1783 -0
- package/dist/NodeManager/node/api/routes/post/service-stop.d.ts +5 -0
- package/dist/NodeManager/node/api/routes/post/service-stop.js +13 -0
- package/dist/NodeManager/node/api/routes/wss/index.d.ts +2 -0
- package/dist/NodeManager/node/api/routes/wss/index.js +2 -0
- package/dist/NodeManager/node/api/routes/wss/log.d.ts +14 -0
- package/dist/NodeManager/node/api/routes/wss/log.js +34 -0
- package/dist/NodeManager/node/api/routes/wss/status.d.ts +8 -0
- package/dist/NodeManager/node/api/routes/wss/status.js +11 -0
- package/dist/NodeManager/node/api/types/index.d.ts +12 -0
- package/dist/NodeManager/node/api/types/index.js +1 -0
- package/dist/NodeManager/node/balance/balanceHandler.d.ts +12 -0
- package/dist/NodeManager/node/balance/balanceHandler.js +52 -0
- package/dist/NodeManager/node/expiry/expiryHandler.d.ts +24 -0
- package/dist/NodeManager/node/expiry/expiryHandler.js +99 -0
- package/dist/NodeManager/node/grid/gridHandler.d.ts +19 -0
- package/dist/NodeManager/node/grid/gridHandler.js +168 -0
- package/dist/NodeManager/node/health/healthHandler.d.ts +16 -0
- package/dist/NodeManager/node/health/healthHandler.js +69 -0
- package/dist/NodeManager/node/job/JobRegistry.d.ts +14 -0
- package/dist/NodeManager/node/job/JobRegistry.js +48 -0
- package/dist/NodeManager/node/job/defination/JobDefinitionStrategy.d.ts +13 -0
- package/dist/NodeManager/node/job/defination/JobDefinitionStrategy.js +21 -0
- package/dist/NodeManager/node/job/defination/strategy/ApiJobDefinitionStrategy.d.ts +8 -0
- package/dist/NodeManager/node/job/defination/strategy/ApiJobDefinitionStrategy.js +40 -0
- package/dist/NodeManager/node/job/defination/strategy/ApiListenJobDefinitionStrategy.d.ts +9 -0
- package/dist/NodeManager/node/job/defination/strategy/ApiListenJobDefinitionStrategy.js +16 -0
- package/dist/NodeManager/node/job/defination/strategy/IpfsJobDefinitionStrategy.d.ts +7 -0
- package/dist/NodeManager/node/job/defination/strategy/IpfsJobDefinitionStrategy.js +13 -0
- package/dist/NodeManager/node/job/jobExternalUtil.d.ts +10 -0
- package/dist/NodeManager/node/job/jobExternalUtil.js +82 -0
- package/dist/NodeManager/node/job/jobHandler.d.ts +43 -0
- package/dist/NodeManager/node/job/jobHandler.js +193 -0
- package/dist/NodeManager/node/job/result/ResultReturnStrategy.d.ts +13 -0
- package/dist/NodeManager/node/job/result/ResultReturnStrategy.js +21 -0
- package/dist/NodeManager/node/job/result/startegy/ApiListenResultReturnStrategy.d.ts +8 -0
- package/dist/NodeManager/node/job/result/startegy/ApiListenResultReturnStrategy.js +22 -0
- package/dist/NodeManager/node/job/result/startegy/ApiResultReturnStrategy.d.ts +8 -0
- package/dist/NodeManager/node/job/result/startegy/ApiResultReturnStrategy.js +42 -0
- package/dist/NodeManager/node/key/keyHandler.d.ts +16 -0
- package/dist/NodeManager/node/key/keyHandler.js +74 -0
- package/dist/NodeManager/node/market/marketHandler.d.ts +30 -0
- package/dist/NodeManager/node/market/marketHandler.js +137 -0
- package/dist/NodeManager/node/register/index.d.ts +16 -0
- package/dist/NodeManager/node/register/index.js +88 -0
- package/dist/NodeManager/node/resource/definition/index.d.ts +2 -0
- package/dist/NodeManager/node/resource/definition/index.js +2 -0
- package/dist/NodeManager/node/resource/helpers/createHFArgs.d.ts +6 -0
- package/dist/NodeManager/node/resource/helpers/createHFArgs.js +26 -0
- package/dist/NodeManager/node/resource/helpers/createOllamaArgs.d.ts +2 -0
- package/dist/NodeManager/node/resource/helpers/createOllamaArgs.js +20 -0
- package/dist/NodeManager/node/resource/helpers/createResourceName.d.ts +2 -0
- package/dist/NodeManager/node/resource/helpers/createResourceName.js +18 -0
- package/dist/NodeManager/node/resource/helpers/createS3Args.d.ts +7 -0
- package/dist/NodeManager/node/resource/helpers/createS3Args.js +32 -0
- package/dist/NodeManager/node/resource/helpers/hasDockerVolume.d.ts +2 -0
- package/dist/NodeManager/node/resource/helpers/hasDockerVolume.js +3 -0
- package/dist/NodeManager/node/resource/helpers/hoursSunceDate.d.ts +1 -0
- package/dist/NodeManager/node/resource/helpers/hoursSunceDate.js +3 -0
- package/dist/NodeManager/node/resource/helpers/repoTagsContainsImage.d.ts +1 -0
- package/dist/NodeManager/node/resource/helpers/repoTagsContainsImage.js +13 -0
- package/dist/NodeManager/node/resource/image/imageManager.d.ts +13 -0
- package/dist/NodeManager/node/resource/image/imageManager.js +66 -0
- package/dist/NodeManager/node/resource/resourceManager.d.ts +21 -0
- package/dist/NodeManager/node/resource/resourceManager.js +57 -0
- package/dist/NodeManager/node/resource/volume/volumeManager.d.ts +20 -0
- package/dist/NodeManager/node/resource/volume/volumeManager.js +228 -0
- package/dist/NodeManager/node/run/runHandler.d.ts +18 -0
- package/dist/NodeManager/node/run/runHandler.js +139 -0
- package/dist/NodeManager/node/specs/specsHandler.d.ts +17 -0
- package/dist/NodeManager/node/specs/specsHandler.js +135 -0
- package/dist/NodeManager/node/specs/type.d.ts +15 -0
- package/dist/NodeManager/node/specs/type.js +1 -0
- package/dist/NodeManager/node/stake/StakeHandler.d.ts +22 -0
- package/dist/NodeManager/node/stake/StakeHandler.js +111 -0
- package/dist/NodeManager/node/task/TaskManager.d.ts +267 -0
- package/dist/NodeManager/node/task/TaskManager.js +480 -0
- package/dist/NodeManager/node/task/TaskManagerRegistry.d.ts +49 -0
- package/dist/NodeManager/node/task/TaskManagerRegistry.js +68 -0
- package/dist/NodeManager/node/task/executions/createDependencyMap.d.ts +18 -0
- package/dist/NodeManager/node/task/executions/createDependencyMap.js +32 -0
- package/dist/NodeManager/node/task/executions/createExecutionPlan.d.ts +14 -0
- package/dist/NodeManager/node/task/executions/createExecutionPlan.js +36 -0
- package/dist/NodeManager/node/task/executions/createOperationMap.d.ts +11 -0
- package/dist/NodeManager/node/task/executions/createOperationMap.js +34 -0
- package/dist/NodeManager/node/task/executions/validateExecutionPlan.d.ts +12 -0
- package/dist/NodeManager/node/task/executions/validateExecutionPlan.js +48 -0
- package/dist/NodeManager/node/task/globalStore/finalizeEnv.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/finalizeEnv.js +30 -0
- package/dist/NodeManager/node/task/globalStore/getByPath.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/getByPath.js +12 -0
- package/dist/NodeManager/node/task/globalStore/index.d.ts +9 -0
- package/dist/NodeManager/node/task/globalStore/index.js +9 -0
- package/dist/NodeManager/node/task/globalStore/interpolate.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/interpolate.js +16 -0
- package/dist/NodeManager/node/task/globalStore/interpolateOperation.d.ts +3 -0
- package/dist/NodeManager/node/task/globalStore/interpolateOperation.js +221 -0
- package/dist/NodeManager/node/task/globalStore/resolveLiteralsInString.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/resolveLiteralsInString.js +7 -0
- package/dist/NodeManager/node/task/globalStore/setDefaults.d.ts +4 -0
- package/dist/NodeManager/node/task/globalStore/setDefaults.js +65 -0
- package/dist/NodeManager/node/task/globalStore/setHost.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/setHost.js +9 -0
- package/dist/NodeManager/node/task/globalStore/setResult.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/setResult.js +10 -0
- package/dist/NodeManager/node/task/globalStore/setResults.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/setResults.js +9 -0
- package/dist/NodeManager/node/task/globalStore/stanatizeArrays.d.ts +2 -0
- package/dist/NodeManager/node/task/globalStore/stanatizeArrays.js +14 -0
- package/dist/NodeManager/node/task/globalStore/transformCollections.d.ts +13 -0
- package/dist/NodeManager/node/task/globalStore/transformCollections.js +152 -0
- package/dist/NodeManager/node/task/helpers/createDefaultOpState.d.ts +2 -0
- package/dist/NodeManager/node/task/helpers/createDefaultOpState.js +20 -0
- package/dist/NodeManager/node/task/helpers/createInitialFlow.d.ts +8 -0
- package/dist/NodeManager/node/task/helpers/createInitialFlow.js +24 -0
- package/dist/NodeManager/node/task/loggers/logManager.d.ts +8 -0
- package/dist/NodeManager/node/task/loggers/logManager.js +54 -0
- package/dist/NodeManager/node/task/operations/getOperationsInfos.d.ts +6 -0
- package/dist/NodeManager/node/task/operations/getOperationsInfos.js +33 -0
- package/dist/NodeManager/node/task/operations/moveTaskManagerGroupOperation.d.ts +2 -0
- package/dist/NodeManager/node/task/operations/moveTaskManagerGroupOperation.js +65 -0
- package/dist/NodeManager/node/task/operations/restartTaskManagerGroupOperation.d.ts +10 -0
- package/dist/NodeManager/node/task/operations/restartTaskManagerGroupOperation.js +37 -0
- package/dist/NodeManager/node/task/operations/restartTaskManagerOperation.d.ts +14 -0
- package/dist/NodeManager/node/task/operations/restartTaskManagerOperation.js +117 -0
- package/dist/NodeManager/node/task/operations/runTaskManagerOperation.d.ts +21 -0
- package/dist/NodeManager/node/task/operations/runTaskManagerOperation.js +488 -0
- package/dist/NodeManager/node/task/operations/stopAllTaskManagerOperations.d.ts +21 -0
- package/dist/NodeManager/node/task/operations/stopAllTaskManagerOperations.js +54 -0
- package/dist/NodeManager/node/task/operations/stopTaskManagerGroupOperation.d.ts +10 -0
- package/dist/NodeManager/node/task/operations/stopTaskManagerGroupOperation.js +43 -0
- package/dist/NodeManager/node/task/operations/stopTaskManagerOperation.d.ts +14 -0
- package/dist/NodeManager/node/task/operations/stopTaskManagerOperation.js +137 -0
- package/dist/NodeManager/node/utils/convertFromBytes.d.ts +4 -0
- package/dist/NodeManager/node/utils/convertFromBytes.js +11 -0
- package/dist/NodeManager/node/utils/extractLogsAndResultsFromLogBuffer.d.ts +7 -0
- package/dist/NodeManager/node/utils/extractLogsAndResultsFromLogBuffer.js +34 -0
- package/dist/NodeManager/node/utils/extractResultsFromLogs.d.ts +18 -0
- package/dist/NodeManager/node/utils/extractResultsFromLogs.js +37 -0
- package/dist/NodeManager/node/utils/generateRandomId.d.ts +1 -0
- package/dist/NodeManager/node/utils/generateRandomId.js +3 -0
- package/dist/NodeManager/node/utils/multiProgressBarReporter.d.ts +16 -0
- package/dist/NodeManager/node/utils/multiProgressBarReporter.js +22 -0
- package/dist/NodeManager/node/utils/poll.d.ts +5 -0
- package/dist/NodeManager/node/utils/poll.js +25 -0
- package/dist/NodeManager/node/utils/progressBarReporter.d.ts +9 -0
- package/dist/NodeManager/node/utils/progressBarReporter.js +28 -0
- package/dist/NodeManager/provider/ContainerStateManager.d.ts +24 -0
- package/dist/NodeManager/provider/ContainerStateManager.js +122 -0
- package/dist/NodeManager/provider/ExposedPortHealthCheck.d.ts +29 -0
- package/dist/NodeManager/provider/ExposedPortHealthCheck.js +183 -0
- package/dist/NodeManager/provider/Provider.d.ts +70 -0
- package/dist/NodeManager/provider/Provider.js +457 -0
- package/dist/NodeManager/provider/__tests__/Provider.spec.d.ts +1 -0
- package/dist/NodeManager/provider/__tests__/Provider.spec.js +337 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/dockerExtended/index.d.ts +6 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/dockerExtended/index.js +45 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/index.d.ts +43 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/index.js +366 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/utils/createServerObject.d.ts +5 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/utils/createServerObject.js +15 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/utils/deadline.d.ts +1 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/utils/deadline.js +15 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/utils/repoTagsContainsImage.d.ts +1 -0
- package/dist/NodeManager/provider/containerOrchestration/docker/utils/repoTagsContainsImage.js +13 -0
- package/dist/NodeManager/provider/containerOrchestration/interface.d.ts +53 -0
- package/dist/NodeManager/provider/containerOrchestration/interface.js +1 -0
- package/dist/NodeManager/provider/containerOrchestration/podman/index.d.ts +11 -0
- package/dist/NodeManager/provider/containerOrchestration/podman/index.js +69 -0
- package/dist/NodeManager/provider/containerOrchestration/podman/utils/createPodmanRunOptions.d.ts +103 -0
- package/dist/NodeManager/provider/containerOrchestration/podman/utils/createPodmanRunOptions.js +66 -0
- package/dist/NodeManager/provider/containerOrchestration/selectContainerOrchestration.d.ts +2 -0
- package/dist/NodeManager/provider/containerOrchestration/selectContainerOrchestration.js +11 -0
- package/dist/NodeManager/provider/types.d.ts +18 -0
- package/dist/NodeManager/provider/types.js +1 -0
- package/dist/NodeManager/provider/utils/parseBuffer.d.ts +4 -0
- package/dist/NodeManager/provider/utils/parseBuffer.js +19 -0
- package/dist/NodeManager/repository/NodeRepository.d.ts +53 -0
- package/dist/NodeManager/repository/NodeRepository.js +153 -0
- package/dist/NodeManager/sdk/index.d.ts +9 -0
- package/dist/NodeManager/sdk/index.js +146 -0
- package/dist/NodeManager/types/index.d.ts +27 -0
- package/dist/NodeManager/types/index.js +1 -0
- package/dist/NodeManager/utils/convertFromBytes.d.ts +4 -0
- package/dist/NodeManager/utils/convertFromBytes.js +11 -0
- package/dist/NodeManager/utils/expose-util.d.ts +14 -0
- package/dist/NodeManager/utils/expose-util.js +88 -0
- package/dist/NodeManager/utils/jobDefinitionParser.d.ts +12 -0
- package/dist/NodeManager/utils/jobDefinitionParser.js +31 -0
- package/dist/NodeManager/utils/ops-util.d.ts +3 -0
- package/dist/NodeManager/utils/ops-util.js +19 -0
- package/dist/NodeManager/utils/timeoutPromiseWrapper.d.ts +1 -0
- package/dist/NodeManager/utils/timeoutPromiseWrapper.js +27 -0
- package/dist/NodeManager/utils/utils.d.ts +39 -0
- package/dist/NodeManager/utils/utils.js +107 -0
- package/dist/NodeManager/utils/wslCheck.d.ts +14 -0
- package/dist/NodeManager/utils/wslCheck.js +54 -0
- package/dist/cli/address/__tests__/command.spec.d.ts +1 -0
- package/dist/cli/address/__tests__/command.spec.js +33 -0
- package/dist/cli/address/action.d.ts +4 -0
- package/dist/cli/address/action.js +4 -0
- package/dist/cli/address/command.d.ts +2 -0
- package/dist/cli/address/command.js +9 -0
- package/dist/cli/createNosanaCli.d.ts +2 -0
- package/dist/cli/createNosanaCli.js +32 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +16 -0
- package/dist/cli/node/__tests__/index.spec.d.ts +1 -0
- package/dist/cli/node/__tests__/index.spec.js +10 -0
- package/dist/cli/node/index.d.ts +5 -0
- package/dist/cli/node/index.js +12 -0
- package/dist/cli/node/prune/action.d.ts +4 -0
- package/dist/cli/node/prune/action.js +18 -0
- package/dist/cli/node/prune/command.d.ts +2 -0
- package/dist/cli/node/prune/command.js +10 -0
- package/dist/cli/node/run/__tests__/command.spec.d.ts +1 -0
- package/dist/cli/node/run/__tests__/command.spec.js +38 -0
- package/dist/cli/node/run/action.d.ts +3 -0
- package/dist/cli/node/run/action.js +82 -0
- package/dist/cli/node/run/command.d.ts +3 -0
- package/dist/cli/node/run/command.js +17 -0
- package/dist/cli/node/run/generateDeploymentEndpointsTable.d.ts +2 -0
- package/dist/cli/node/run/generateDeploymentEndpointsTable.js +45 -0
- package/dist/cli/node/start/__tests__/command.spec.d.ts +1 -0
- package/dist/cli/node/start/__tests__/command.spec.js +39 -0
- package/dist/cli/node/start/action.d.ts +4 -0
- package/dist/cli/node/start/action.js +48 -0
- package/dist/cli/node/start/command.d.ts +3 -0
- package/dist/cli/node/start/command.js +19 -0
- package/dist/cli/sharedOptions/--api.d.ts +2 -0
- package/dist/cli/sharedOptions/--api.js +2 -0
- package/dist/cli/sharedOptions/--format.d.ts +2 -0
- package/dist/cli/sharedOptions/--format.js +4 -0
- package/dist/cli/sharedOptions/--gpu.d.ts +2 -0
- package/dist/cli/sharedOptions/--gpu.js +12 -0
- package/dist/cli/sharedOptions/--network.d.ts +2 -0
- package/dist/cli/sharedOptions/--network.js +4 -0
- package/dist/cli/sharedOptions/--port.d.ts +2 -0
- package/dist/cli/sharedOptions/--port.js +2 -0
- package/dist/cli/sharedOptions/--rpc.d.ts +2 -0
- package/dist/cli/sharedOptions/--rpc.js +2 -0
- package/dist/cli/sharedOptions/--timeout.d.ts +2 -0
- package/dist/cli/sharedOptions/--timeout.js +12 -0
- package/dist/cli/sharedOptions/--verbose.d.ts +2 -0
- package/dist/cli/sharedOptions/--verbose.js +2 -0
- package/dist/cli/sharedOptions/--wallet.d.ts +2 -0
- package/dist/cli/sharedOptions/--wallet.js +2 -0
- package/dist/cli/sharedOptions/index.d.ts +7 -0
- package/dist/cli/sharedOptions/index.js +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/output-formatter/OutputFormatter.d.ts +61 -0
- package/dist/output-formatter/OutputFormatter.js +58 -0
- package/dist/output-formatter/OutputFormatterFactory.d.ts +4 -0
- package/dist/output-formatter/OutputFormatterFactory.js +18 -0
- package/dist/output-formatter/__mocks__/outputEvents.mock.d.ts +42 -0
- package/dist/output-formatter/__mocks__/outputEvents.mock.js +45 -0
- package/dist/output-formatter/__mocks__/outputFormatter.mock.d.ts +0 -0
- package/dist/output-formatter/__mocks__/outputFormatter.mock.js +21 -0
- package/dist/output-formatter/__tests__/OutputFormatter.spec.d.ts +1 -0
- package/dist/output-formatter/__tests__/OutputFormatter.spec.js +34 -0
- package/dist/output-formatter/__tests__/OutputFormatterFactory.spec.d.ts +1 -0
- package/dist/output-formatter/__tests__/OutputFormatterFactory.spec.js +26 -0
- package/dist/output-formatter/__tests__/outputFormatSelector.spec.d.ts +1 -0
- package/dist/output-formatter/__tests__/outputFormatSelector.spec.js +21 -0
- package/dist/output-formatter/json/JsonOutputEventHandlers.d.ts +8 -0
- package/dist/output-formatter/json/JsonOutputEventHandlers.js +191 -0
- package/dist/output-formatter/json/JsonOutputFormatter.d.ts +47 -0
- package/dist/output-formatter/json/JsonOutputFormatter.js +12 -0
- package/dist/output-formatter/json/__tests__/JsonOutputFormatter.spec.d.ts +1 -0
- package/dist/output-formatter/json/__tests__/JsonOutputFormatter.spec.js +36 -0
- package/dist/output-formatter/outputEvents.d.ts +213 -0
- package/dist/output-formatter/outputEvents.js +63 -0
- package/dist/output-formatter/outputFormatArgumentParser.d.ts +1 -0
- package/dist/output-formatter/outputFormatArgumentParser.js +10 -0
- package/dist/output-formatter/outputFormatSelector.d.ts +15 -0
- package/dist/output-formatter/outputFormatSelector.js +23 -0
- package/dist/output-formatter/text/TextOutputEventHandlers.d.ts +7 -0
- package/dist/output-formatter/text/TextOutputEventHandlers.js +128 -0
- package/dist/output-formatter/text/TextOutputFormatter.d.ts +6 -0
- package/dist/output-formatter/text/TextOutputFormatter.js +7 -0
- package/dist/output-formatter/text/VerboseTextOutputEventHandlers.d.ts +7 -0
- package/dist/output-formatter/text/VerboseTextOutputEventHandlers.js +138 -0
- package/dist/output-formatter/text/VerboseTextOutputFormatter.d.ts +6 -0
- package/dist/output-formatter/text/VerboseTextOutputFormatter.js +7 -0
- package/dist/output-formatter/text/__tests__/TextOutputFormatter.spec.d.ts +1 -0
- package/dist/output-formatter/text/__tests__/TextOutputFormatter.spec.js +25 -0
- package/dist/static/index.d.ts +7 -0
- package/dist/static/index.js +12 -0
- package/dist/version/index.d.ts +1 -0
- package/dist/version/index.js +47 -0
- package/npm-shrinkwrap.json +9928 -0
- package/package.json +102 -0
|
@@ -0,0 +1,1783 @@
|
|
|
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)) && (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"].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 || "websocket" === input.type || "web" === input.type || "api" === 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.o19 | __type.o8)",
|
|
663
|
+
value: input.args
|
|
664
|
+
})) && _vu3(input.args, _path + ".args", true && _exceptionable) || _report(_exceptionable, {
|
|
665
|
+
path: _path + ".args",
|
|
666
|
+
expected: "(__type.o19 | __type.o8)",
|
|
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
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
934
|
+
if (["image", "aliases", "cmd", "volumes", "expose", "private", "gpu", "work_dir", "output", "entrypoint", "env", "restart_policy", "required_vram", "resources", "authentication"].some(prop => key === prop))
|
|
935
|
+
return true;
|
|
936
|
+
const value = input[key];
|
|
937
|
+
if (undefined === value)
|
|
938
|
+
return true;
|
|
939
|
+
return _report(_exceptionable, {
|
|
940
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
941
|
+
expected: "undefined",
|
|
942
|
+
value: value,
|
|
943
|
+
description: [
|
|
944
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
945
|
+
"",
|
|
946
|
+
"Please remove the property next time."
|
|
947
|
+
].join("\n")
|
|
948
|
+
});
|
|
949
|
+
}).every(flag => flag))].every(flag => flag); const _vo13 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
950
|
+
path: _path + ".name",
|
|
951
|
+
expected: "string",
|
|
952
|
+
value: input.name
|
|
953
|
+
}), "string" === typeof input.dest || _report(_exceptionable, {
|
|
954
|
+
path: _path + ".dest",
|
|
955
|
+
expected: "string",
|
|
956
|
+
value: input.dest
|
|
957
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
958
|
+
if (["name", "dest"].some(prop => key === prop))
|
|
959
|
+
return true;
|
|
960
|
+
const value = input[key];
|
|
961
|
+
if (undefined === value)
|
|
962
|
+
return true;
|
|
963
|
+
return _report(_exceptionable, {
|
|
964
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
965
|
+
expected: "undefined",
|
|
966
|
+
value: value,
|
|
967
|
+
description: [
|
|
968
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
969
|
+
"",
|
|
970
|
+
"Please remove the property next time."
|
|
971
|
+
].join("\n")
|
|
972
|
+
});
|
|
973
|
+
}).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, {
|
|
974
|
+
path: _path + ".__spread__",
|
|
975
|
+
expected: "string & TagBase<__type>",
|
|
976
|
+
value: input.__spread__
|
|
977
|
+
})) || _report(_exceptionable, {
|
|
978
|
+
path: _path + ".__spread__",
|
|
979
|
+
expected: "(string & TagBase<__type>)",
|
|
980
|
+
value: input.__spread__
|
|
981
|
+
}), undefined === input.chunked || "boolean" === typeof input.chunked || _report(_exceptionable, {
|
|
982
|
+
path: _path + ".chunked",
|
|
983
|
+
expected: "(boolean | undefined)",
|
|
984
|
+
value: input.chunked
|
|
985
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
986
|
+
if (["__spread__", "chunked"].some(prop => key === prop))
|
|
987
|
+
return true;
|
|
988
|
+
const value = input[key];
|
|
989
|
+
if (undefined === value)
|
|
990
|
+
return true;
|
|
991
|
+
return _report(_exceptionable, {
|
|
992
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
993
|
+
expected: "undefined",
|
|
994
|
+
value: value,
|
|
995
|
+
description: [
|
|
996
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
997
|
+
"",
|
|
998
|
+
"Please remove the property next time."
|
|
999
|
+
].join("\n")
|
|
1000
|
+
});
|
|
1001
|
+
}).every(flag => flag))].every(flag => flag); const _vo15 = (input, _path, _exceptionable = true) => ["number" === typeof input.port || "string" === typeof input.port && (typeof input.port === "string" && (() => {
|
|
1002
|
+
const match = /^([0-9]+)-([0-9]+)$/.exec(input.port);
|
|
1003
|
+
if (!match)
|
|
1004
|
+
return false;
|
|
1005
|
+
const a = Number(match[1]), b = Number(match[2]);
|
|
1006
|
+
return a < b;
|
|
1007
|
+
})() || _report(_exceptionable, {
|
|
1008
|
+
path: _path + ".port",
|
|
1009
|
+
expected: "string & TagBase<__type>",
|
|
1010
|
+
value: input.port
|
|
1011
|
+
})) || _report(_exceptionable, {
|
|
1012
|
+
path: _path + ".port",
|
|
1013
|
+
expected: "((string & TagBase<__type>) | number)",
|
|
1014
|
+
value: input.port
|
|
1015
|
+
}), undefined === input.type || "websocket" === input.type || "web" === input.type || "api" === input.type || "webapi" === input.type || "none" === input.type || _report(_exceptionable, {
|
|
1016
|
+
path: _path + ".type",
|
|
1017
|
+
expected: "(\"api\" | \"none\" | \"web\" | \"webapi\" | \"websocket\" | undefined)",
|
|
1018
|
+
value: input.type
|
|
1019
|
+
}), undefined === input.health_checks || (Array.isArray(input.health_checks) || _report(_exceptionable, {
|
|
1020
|
+
path: _path + ".health_checks",
|
|
1021
|
+
expected: "(Array<HealthCheck> | undefined)",
|
|
1022
|
+
value: input.health_checks
|
|
1023
|
+
})) && input.health_checks.map((elem, _index23) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1024
|
+
path: _path + ".health_checks[" + _index23 + "]",
|
|
1025
|
+
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
1026
|
+
value: elem
|
|
1027
|
+
})) && _vu1(elem, _path + ".health_checks[" + _index23 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1028
|
+
path: _path + ".health_checks[" + _index23 + "]",
|
|
1029
|
+
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
1030
|
+
value: elem
|
|
1031
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1032
|
+
path: _path + ".health_checks",
|
|
1033
|
+
expected: "(Array<HealthCheck> | undefined)",
|
|
1034
|
+
value: input.health_checks
|
|
1035
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1036
|
+
if (["port", "type", "health_checks"].some(prop => key === prop))
|
|
1037
|
+
return true;
|
|
1038
|
+
const value = input[key];
|
|
1039
|
+
if (undefined === value)
|
|
1040
|
+
return true;
|
|
1041
|
+
return _report(_exceptionable, {
|
|
1042
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1043
|
+
expected: "undefined",
|
|
1044
|
+
value: value,
|
|
1045
|
+
description: [
|
|
1046
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1047
|
+
"",
|
|
1048
|
+
"Please remove the property next time."
|
|
1049
|
+
].join("\n")
|
|
1050
|
+
});
|
|
1051
|
+
}).every(flag => flag))].every(flag => flag); const _vo16 = (input, _path, _exceptionable = true) => ["http" === input.type || _report(_exceptionable, {
|
|
1052
|
+
path: _path + ".type",
|
|
1053
|
+
expected: "\"http\"",
|
|
1054
|
+
value: input.type
|
|
1055
|
+
}), "string" === typeof input.path || _report(_exceptionable, {
|
|
1056
|
+
path: _path + ".path",
|
|
1057
|
+
expected: "string",
|
|
1058
|
+
value: input.path
|
|
1059
|
+
}), "GET" === input.method || "POST" === input.method || "PUT" === input.method || "DELETE" === input.method || _report(_exceptionable, {
|
|
1060
|
+
path: _path + ".method",
|
|
1061
|
+
expected: "(\"DELETE\" | \"GET\" | \"POST\" | \"PUT\")",
|
|
1062
|
+
value: input.method
|
|
1063
|
+
}), "number" === typeof input.expected_status || _report(_exceptionable, {
|
|
1064
|
+
path: _path + ".expected_status",
|
|
1065
|
+
expected: "number",
|
|
1066
|
+
value: input.expected_status
|
|
1067
|
+
}), undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || _report(_exceptionable, {
|
|
1068
|
+
path: _path + ".headers",
|
|
1069
|
+
expected: "(Record<string, string> | undefined)",
|
|
1070
|
+
value: input.headers
|
|
1071
|
+
})) && _vo17(input.headers, _path + ".headers", true && _exceptionable) || _report(_exceptionable, {
|
|
1072
|
+
path: _path + ".headers",
|
|
1073
|
+
expected: "(Record<string, string> | undefined)",
|
|
1074
|
+
value: input.headers
|
|
1075
|
+
}), true, "boolean" === typeof input.continuous || _report(_exceptionable, {
|
|
1076
|
+
path: _path + ".continuous",
|
|
1077
|
+
expected: "boolean",
|
|
1078
|
+
value: input.continuous
|
|
1079
|
+
}), 5 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1080
|
+
if (["type", "path", "method", "expected_status", "headers", "body", "continuous"].some(prop => key === prop))
|
|
1081
|
+
return true;
|
|
1082
|
+
const value = input[key];
|
|
1083
|
+
if (undefined === value)
|
|
1084
|
+
return true;
|
|
1085
|
+
return _report(_exceptionable, {
|
|
1086
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1087
|
+
expected: "undefined",
|
|
1088
|
+
value: value,
|
|
1089
|
+
description: [
|
|
1090
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1091
|
+
"",
|
|
1092
|
+
"Please remove the property next time."
|
|
1093
|
+
].join("\n")
|
|
1094
|
+
});
|
|
1095
|
+
}).every(flag => flag))].every(flag => flag); const _vo17 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1096
|
+
const value = input[key];
|
|
1097
|
+
if (undefined === value)
|
|
1098
|
+
return true;
|
|
1099
|
+
return "string" === typeof value || _report(_exceptionable, {
|
|
1100
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1101
|
+
expected: "string",
|
|
1102
|
+
value: value
|
|
1103
|
+
});
|
|
1104
|
+
}).every(flag => flag)].every(flag => flag); const _vo18 = (input, _path, _exceptionable = true) => ["websocket" === input.type || _report(_exceptionable, {
|
|
1105
|
+
path: _path + ".type",
|
|
1106
|
+
expected: "\"websocket\"",
|
|
1107
|
+
value: input.type
|
|
1108
|
+
}), "string" === typeof input.expected_response || _report(_exceptionable, {
|
|
1109
|
+
path: _path + ".expected_response",
|
|
1110
|
+
expected: "string",
|
|
1111
|
+
value: input.expected_response
|
|
1112
|
+
}), "boolean" === typeof input.continuous || _report(_exceptionable, {
|
|
1113
|
+
path: _path + ".continuous",
|
|
1114
|
+
expected: "boolean",
|
|
1115
|
+
value: input.continuous
|
|
1116
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1117
|
+
if (["type", "expected_response", "continuous"].some(prop => key === prop))
|
|
1118
|
+
return true;
|
|
1119
|
+
const value = input[key];
|
|
1120
|
+
if (undefined === value)
|
|
1121
|
+
return true;
|
|
1122
|
+
return _report(_exceptionable, {
|
|
1123
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1124
|
+
expected: "undefined",
|
|
1125
|
+
value: value,
|
|
1126
|
+
description: [
|
|
1127
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1128
|
+
"",
|
|
1129
|
+
"Please remove the property next time."
|
|
1130
|
+
].join("\n")
|
|
1131
|
+
});
|
|
1132
|
+
}).every(flag => flag))].every(flag => flag); const _vo19 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1133
|
+
const value = input[key];
|
|
1134
|
+
if (undefined === value)
|
|
1135
|
+
return true;
|
|
1136
|
+
return "string" === typeof value || _report(_exceptionable, {
|
|
1137
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1138
|
+
expected: "string",
|
|
1139
|
+
value: value
|
|
1140
|
+
});
|
|
1141
|
+
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => ["on-failure" === input.policy || _report(_exceptionable, {
|
|
1142
|
+
path: _path + ".policy",
|
|
1143
|
+
expected: "\"on-failure\"",
|
|
1144
|
+
value: input.policy
|
|
1145
|
+
}), undefined === input.restart_tries || "number" === typeof input.restart_tries || _report(_exceptionable, {
|
|
1146
|
+
path: _path + ".restart_tries",
|
|
1147
|
+
expected: "(number | undefined)",
|
|
1148
|
+
value: input.restart_tries
|
|
1149
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1150
|
+
if (["policy", "restart_tries"].some(prop => key === prop))
|
|
1151
|
+
return true;
|
|
1152
|
+
const value = input[key];
|
|
1153
|
+
if (undefined === value)
|
|
1154
|
+
return true;
|
|
1155
|
+
return _report(_exceptionable, {
|
|
1156
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1157
|
+
expected: "undefined",
|
|
1158
|
+
value: value,
|
|
1159
|
+
description: [
|
|
1160
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1161
|
+
"",
|
|
1162
|
+
"Please remove the property next time."
|
|
1163
|
+
].join("\n")
|
|
1164
|
+
});
|
|
1165
|
+
}).every(flag => flag))].every(flag => flag); const _vo21 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1166
|
+
path: _path + ".type",
|
|
1167
|
+
expected: "\"S3\"",
|
|
1168
|
+
value: input.type
|
|
1169
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1170
|
+
path: _path + ".target",
|
|
1171
|
+
expected: "string",
|
|
1172
|
+
value: input.target
|
|
1173
|
+
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
1174
|
+
path: _path + ".url",
|
|
1175
|
+
expected: "(string | undefined)",
|
|
1176
|
+
value: input.url
|
|
1177
|
+
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
1178
|
+
path: _path + ".allowWrite",
|
|
1179
|
+
expected: "(boolean | undefined)",
|
|
1180
|
+
value: input.allowWrite
|
|
1181
|
+
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
1182
|
+
path: _path + ".files",
|
|
1183
|
+
expected: "(Array<string> | undefined)",
|
|
1184
|
+
value: input.files
|
|
1185
|
+
})) && input.files.map((elem, _index24) => "string" === typeof elem || _report(_exceptionable, {
|
|
1186
|
+
path: _path + ".files[" + _index24 + "]",
|
|
1187
|
+
expected: "string",
|
|
1188
|
+
value: elem
|
|
1189
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1190
|
+
path: _path + ".files",
|
|
1191
|
+
expected: "(Array<string> | undefined)",
|
|
1192
|
+
value: input.files
|
|
1193
|
+
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
1194
|
+
path: _path + ".IAM",
|
|
1195
|
+
expected: "(S3Auth | undefined)",
|
|
1196
|
+
value: input.IAM
|
|
1197
|
+
})) && _vo22(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1198
|
+
path: _path + ".IAM",
|
|
1199
|
+
expected: "(S3Auth | undefined)",
|
|
1200
|
+
value: input.IAM
|
|
1201
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1202
|
+
if (["type", "target", "url", "allowWrite", "files", "IAM"].some(prop => key === prop))
|
|
1203
|
+
return true;
|
|
1204
|
+
const value = input[key];
|
|
1205
|
+
if (undefined === value)
|
|
1206
|
+
return true;
|
|
1207
|
+
return _report(_exceptionable, {
|
|
1208
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1209
|
+
expected: "undefined",
|
|
1210
|
+
value: value,
|
|
1211
|
+
description: [
|
|
1212
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1213
|
+
"",
|
|
1214
|
+
"Please remove the property next time."
|
|
1215
|
+
].join("\n")
|
|
1216
|
+
});
|
|
1217
|
+
}).every(flag => flag))].every(flag => flag); const _vo22 = (input, _path, _exceptionable = true) => ["string" === typeof input.REGION || _report(_exceptionable, {
|
|
1218
|
+
path: _path + ".REGION",
|
|
1219
|
+
expected: "string",
|
|
1220
|
+
value: input.REGION
|
|
1221
|
+
}), "string" === typeof input.ACCESS_KEY_ID || _report(_exceptionable, {
|
|
1222
|
+
path: _path + ".ACCESS_KEY_ID",
|
|
1223
|
+
expected: "string",
|
|
1224
|
+
value: input.ACCESS_KEY_ID
|
|
1225
|
+
}), "string" === typeof input.SECRET_ACCESS_KEY || _report(_exceptionable, {
|
|
1226
|
+
path: _path + ".SECRET_ACCESS_KEY",
|
|
1227
|
+
expected: "string",
|
|
1228
|
+
value: input.SECRET_ACCESS_KEY
|
|
1229
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1230
|
+
if (["REGION", "ACCESS_KEY_ID", "SECRET_ACCESS_KEY"].some(prop => key === prop))
|
|
1231
|
+
return true;
|
|
1232
|
+
const value = input[key];
|
|
1233
|
+
if (undefined === value)
|
|
1234
|
+
return true;
|
|
1235
|
+
return _report(_exceptionable, {
|
|
1236
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1237
|
+
expected: "undefined",
|
|
1238
|
+
value: value,
|
|
1239
|
+
description: [
|
|
1240
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1241
|
+
"",
|
|
1242
|
+
"Please remove the property next time."
|
|
1243
|
+
].join("\n")
|
|
1244
|
+
});
|
|
1245
|
+
}).every(flag => flag))].every(flag => flag); const _vo23 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1246
|
+
path: _path + ".type",
|
|
1247
|
+
expected: "\"S3\"",
|
|
1248
|
+
value: input.type
|
|
1249
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1250
|
+
path: _path + ".target",
|
|
1251
|
+
expected: "string",
|
|
1252
|
+
value: input.target
|
|
1253
|
+
}), "string" === typeof input.bucket || _report(_exceptionable, {
|
|
1254
|
+
path: _path + ".bucket",
|
|
1255
|
+
expected: "string",
|
|
1256
|
+
value: input.bucket
|
|
1257
|
+
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
1258
|
+
path: _path + ".url",
|
|
1259
|
+
expected: "(string | undefined)",
|
|
1260
|
+
value: input.url
|
|
1261
|
+
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
1262
|
+
path: _path + ".allowWrite",
|
|
1263
|
+
expected: "(boolean | undefined)",
|
|
1264
|
+
value: input.allowWrite
|
|
1265
|
+
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
1266
|
+
path: _path + ".IAM",
|
|
1267
|
+
expected: "(S3Auth | undefined)",
|
|
1268
|
+
value: input.IAM
|
|
1269
|
+
})) && _vo22(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1270
|
+
path: _path + ".IAM",
|
|
1271
|
+
expected: "(S3Auth | undefined)",
|
|
1272
|
+
value: input.IAM
|
|
1273
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1274
|
+
if (["type", "target", "bucket", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
1275
|
+
return true;
|
|
1276
|
+
const value = input[key];
|
|
1277
|
+
if (undefined === value)
|
|
1278
|
+
return true;
|
|
1279
|
+
return _report(_exceptionable, {
|
|
1280
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1281
|
+
expected: "undefined",
|
|
1282
|
+
value: value,
|
|
1283
|
+
description: [
|
|
1284
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1285
|
+
"",
|
|
1286
|
+
"Please remove the property next time."
|
|
1287
|
+
].join("\n")
|
|
1288
|
+
});
|
|
1289
|
+
}).every(flag => flag))].every(flag => flag); const _vo24 = (input, _path, _exceptionable = true) => ["S3" === input.type || _report(_exceptionable, {
|
|
1290
|
+
path: _path + ".type",
|
|
1291
|
+
expected: "\"S3\"",
|
|
1292
|
+
value: input.type
|
|
1293
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1294
|
+
path: _path + ".target",
|
|
1295
|
+
expected: "string",
|
|
1296
|
+
value: input.target
|
|
1297
|
+
}), (Array.isArray(input.buckets) || _report(_exceptionable, {
|
|
1298
|
+
path: _path + ".buckets",
|
|
1299
|
+
expected: "Array<__type>",
|
|
1300
|
+
value: input.buckets
|
|
1301
|
+
})) && input.buckets.map((elem, _index25) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1302
|
+
path: _path + ".buckets[" + _index25 + "]",
|
|
1303
|
+
expected: "__type.o17",
|
|
1304
|
+
value: elem
|
|
1305
|
+
})) && _vo25(elem, _path + ".buckets[" + _index25 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1306
|
+
path: _path + ".buckets[" + _index25 + "]",
|
|
1307
|
+
expected: "__type.o17",
|
|
1308
|
+
value: elem
|
|
1309
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1310
|
+
path: _path + ".buckets",
|
|
1311
|
+
expected: "Array<__type>",
|
|
1312
|
+
value: input.buckets
|
|
1313
|
+
}), undefined === input.url || "string" === typeof input.url || _report(_exceptionable, {
|
|
1314
|
+
path: _path + ".url",
|
|
1315
|
+
expected: "(string | undefined)",
|
|
1316
|
+
value: input.url
|
|
1317
|
+
}), undefined === input.allowWrite || "boolean" === typeof input.allowWrite || _report(_exceptionable, {
|
|
1318
|
+
path: _path + ".allowWrite",
|
|
1319
|
+
expected: "(boolean | undefined)",
|
|
1320
|
+
value: input.allowWrite
|
|
1321
|
+
}), undefined === input.IAM || ("object" === typeof input.IAM && null !== input.IAM || _report(_exceptionable, {
|
|
1322
|
+
path: _path + ".IAM",
|
|
1323
|
+
expected: "(S3Auth | undefined)",
|
|
1324
|
+
value: input.IAM
|
|
1325
|
+
})) && _vo22(input.IAM, _path + ".IAM", true && _exceptionable) || _report(_exceptionable, {
|
|
1326
|
+
path: _path + ".IAM",
|
|
1327
|
+
expected: "(S3Auth | undefined)",
|
|
1328
|
+
value: input.IAM
|
|
1329
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1330
|
+
if (["type", "target", "buckets", "url", "allowWrite", "IAM"].some(prop => key === prop))
|
|
1331
|
+
return true;
|
|
1332
|
+
const value = input[key];
|
|
1333
|
+
if (undefined === value)
|
|
1334
|
+
return true;
|
|
1335
|
+
return _report(_exceptionable, {
|
|
1336
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1337
|
+
expected: "undefined",
|
|
1338
|
+
value: value,
|
|
1339
|
+
description: [
|
|
1340
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1341
|
+
"",
|
|
1342
|
+
"Please remove the property next time."
|
|
1343
|
+
].join("\n")
|
|
1344
|
+
});
|
|
1345
|
+
}).every(flag => flag))].every(flag => flag); const _vo25 = (input, _path, _exceptionable = true) => ["string" === typeof input.url || _report(_exceptionable, {
|
|
1346
|
+
path: _path + ".url",
|
|
1347
|
+
expected: "string",
|
|
1348
|
+
value: input.url
|
|
1349
|
+
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
1350
|
+
path: _path + ".files",
|
|
1351
|
+
expected: "(Array<string> | undefined)",
|
|
1352
|
+
value: input.files
|
|
1353
|
+
})) && input.files.map((elem, _index26) => "string" === typeof elem || _report(_exceptionable, {
|
|
1354
|
+
path: _path + ".files[" + _index26 + "]",
|
|
1355
|
+
expected: "string",
|
|
1356
|
+
value: elem
|
|
1357
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1358
|
+
path: _path + ".files",
|
|
1359
|
+
expected: "(Array<string> | undefined)",
|
|
1360
|
+
value: input.files
|
|
1361
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1362
|
+
if (["url", "files"].some(prop => key === prop))
|
|
1363
|
+
return true;
|
|
1364
|
+
const value = input[key];
|
|
1365
|
+
if (undefined === value)
|
|
1366
|
+
return true;
|
|
1367
|
+
return _report(_exceptionable, {
|
|
1368
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1369
|
+
expected: "undefined",
|
|
1370
|
+
value: value,
|
|
1371
|
+
description: [
|
|
1372
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1373
|
+
"",
|
|
1374
|
+
"Please remove the property next time."
|
|
1375
|
+
].join("\n")
|
|
1376
|
+
});
|
|
1377
|
+
}).every(flag => flag))].every(flag => flag); const _vo26 = (input, _path, _exceptionable = true) => ["HF" === input.type || _report(_exceptionable, {
|
|
1378
|
+
path: _path + ".type",
|
|
1379
|
+
expected: "\"HF\"",
|
|
1380
|
+
value: input.type
|
|
1381
|
+
}), "string" === typeof input.target || _report(_exceptionable, {
|
|
1382
|
+
path: _path + ".target",
|
|
1383
|
+
expected: "string",
|
|
1384
|
+
value: input.target
|
|
1385
|
+
}), "string" === typeof input.repo || _report(_exceptionable, {
|
|
1386
|
+
path: _path + ".repo",
|
|
1387
|
+
expected: "string",
|
|
1388
|
+
value: input.repo
|
|
1389
|
+
}), undefined === input.revision || "string" === typeof input.revision || _report(_exceptionable, {
|
|
1390
|
+
path: _path + ".revision",
|
|
1391
|
+
expected: "(string | undefined)",
|
|
1392
|
+
value: input.revision
|
|
1393
|
+
}), undefined === input.files || (Array.isArray(input.files) || _report(_exceptionable, {
|
|
1394
|
+
path: _path + ".files",
|
|
1395
|
+
expected: "(Array<string> | undefined)",
|
|
1396
|
+
value: input.files
|
|
1397
|
+
})) && input.files.map((elem, _index27) => "string" === typeof elem || _report(_exceptionable, {
|
|
1398
|
+
path: _path + ".files[" + _index27 + "]",
|
|
1399
|
+
expected: "string",
|
|
1400
|
+
value: elem
|
|
1401
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1402
|
+
path: _path + ".files",
|
|
1403
|
+
expected: "(Array<string> | undefined)",
|
|
1404
|
+
value: input.files
|
|
1405
|
+
}), undefined === input.accessToken || "string" === typeof input.accessToken || _report(_exceptionable, {
|
|
1406
|
+
path: _path + ".accessToken",
|
|
1407
|
+
expected: "(string | undefined)",
|
|
1408
|
+
value: input.accessToken
|
|
1409
|
+
}), 3 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1410
|
+
if (["type", "target", "repo", "revision", "files", "accessToken"].some(prop => key === prop))
|
|
1411
|
+
return true;
|
|
1412
|
+
const value = input[key];
|
|
1413
|
+
if (undefined === value)
|
|
1414
|
+
return true;
|
|
1415
|
+
return _report(_exceptionable, {
|
|
1416
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1417
|
+
expected: "undefined",
|
|
1418
|
+
value: value,
|
|
1419
|
+
description: [
|
|
1420
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1421
|
+
"",
|
|
1422
|
+
"Please remove the property next time."
|
|
1423
|
+
].join("\n")
|
|
1424
|
+
});
|
|
1425
|
+
}).every(flag => flag))].every(flag => flag); const _vo27 = (input, _path, _exceptionable = true) => ["Ollama" === input.type || _report(_exceptionable, {
|
|
1426
|
+
path: _path + ".type",
|
|
1427
|
+
expected: "\"Ollama\"",
|
|
1428
|
+
value: input.type
|
|
1429
|
+
}), "string" === typeof input.model || _report(_exceptionable, {
|
|
1430
|
+
path: _path + ".model",
|
|
1431
|
+
expected: "string",
|
|
1432
|
+
value: input.model
|
|
1433
|
+
}), undefined === input.target || "string" === typeof input.target || _report(_exceptionable, {
|
|
1434
|
+
path: _path + ".target",
|
|
1435
|
+
expected: "(string | undefined)",
|
|
1436
|
+
value: input.target
|
|
1437
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1438
|
+
if (["type", "model", "target"].some(prop => key === prop))
|
|
1439
|
+
return true;
|
|
1440
|
+
const value = input[key];
|
|
1441
|
+
if (undefined === value)
|
|
1442
|
+
return true;
|
|
1443
|
+
return _report(_exceptionable, {
|
|
1444
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1445
|
+
expected: "undefined",
|
|
1446
|
+
value: value,
|
|
1447
|
+
description: [
|
|
1448
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1449
|
+
"",
|
|
1450
|
+
"Please remove the property next time."
|
|
1451
|
+
].join("\n")
|
|
1452
|
+
});
|
|
1453
|
+
}).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, {
|
|
1454
|
+
path: _path + ".docker",
|
|
1455
|
+
expected: "(DockerAuth | undefined)",
|
|
1456
|
+
value: input.docker
|
|
1457
|
+
})) && _vo29(input.docker, _path + ".docker", true && _exceptionable) || _report(_exceptionable, {
|
|
1458
|
+
path: _path + ".docker",
|
|
1459
|
+
expected: "(DockerAuth | undefined)",
|
|
1460
|
+
value: input.docker
|
|
1461
|
+
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1462
|
+
if (["docker"].some(prop => key === prop))
|
|
1463
|
+
return true;
|
|
1464
|
+
const value = input[key];
|
|
1465
|
+
if (undefined === value)
|
|
1466
|
+
return true;
|
|
1467
|
+
return _report(_exceptionable, {
|
|
1468
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1469
|
+
expected: "undefined",
|
|
1470
|
+
value: value,
|
|
1471
|
+
description: [
|
|
1472
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1473
|
+
"",
|
|
1474
|
+
"Please remove the property next time."
|
|
1475
|
+
].join("\n")
|
|
1476
|
+
});
|
|
1477
|
+
}).every(flag => flag))].every(flag => flag); const _vo29 = (input, _path, _exceptionable = true) => [undefined === input.username || "string" === typeof input.username || _report(_exceptionable, {
|
|
1478
|
+
path: _path + ".username",
|
|
1479
|
+
expected: "(string | undefined)",
|
|
1480
|
+
value: input.username
|
|
1481
|
+
}), undefined === input.password || "string" === typeof input.password || _report(_exceptionable, {
|
|
1482
|
+
path: _path + ".password",
|
|
1483
|
+
expected: "(string | undefined)",
|
|
1484
|
+
value: input.password
|
|
1485
|
+
}), undefined === input.email || "string" === typeof input.email || _report(_exceptionable, {
|
|
1486
|
+
path: _path + ".email",
|
|
1487
|
+
expected: "(string | undefined)",
|
|
1488
|
+
value: input.email
|
|
1489
|
+
}), undefined === input.server || "string" === typeof input.server || _report(_exceptionable, {
|
|
1490
|
+
path: _path + ".server",
|
|
1491
|
+
expected: "(string | undefined)",
|
|
1492
|
+
value: input.server
|
|
1493
|
+
}), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1494
|
+
if (["username", "password", "email", "server"].some(prop => key === prop))
|
|
1495
|
+
return true;
|
|
1496
|
+
const value = input[key];
|
|
1497
|
+
if (undefined === value)
|
|
1498
|
+
return true;
|
|
1499
|
+
return _report(_exceptionable, {
|
|
1500
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1501
|
+
expected: "undefined",
|
|
1502
|
+
value: value,
|
|
1503
|
+
description: [
|
|
1504
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1505
|
+
"",
|
|
1506
|
+
"Please remove the property next time."
|
|
1507
|
+
].join("\n")
|
|
1508
|
+
});
|
|
1509
|
+
}).every(flag => flag))].every(flag => flag); const _vo30 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
1510
|
+
path: _path + ".name",
|
|
1511
|
+
expected: "string",
|
|
1512
|
+
value: input.name
|
|
1513
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1514
|
+
if (["name"].some(prop => key === prop))
|
|
1515
|
+
return true;
|
|
1516
|
+
const value = input[key];
|
|
1517
|
+
if (undefined === value)
|
|
1518
|
+
return true;
|
|
1519
|
+
return _report(_exceptionable, {
|
|
1520
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1521
|
+
expected: "undefined",
|
|
1522
|
+
value: value,
|
|
1523
|
+
description: [
|
|
1524
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1525
|
+
"",
|
|
1526
|
+
"Please remove the property next time."
|
|
1527
|
+
].join("\n")
|
|
1528
|
+
});
|
|
1529
|
+
}).every(flag => flag))].every(flag => flag); const _vo31 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
1530
|
+
const value = input[key];
|
|
1531
|
+
if (undefined === value)
|
|
1532
|
+
return true;
|
|
1533
|
+
return (null !== value || _report(_exceptionable, {
|
|
1534
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1535
|
+
expected: "(OperationResult | string)",
|
|
1536
|
+
value: value
|
|
1537
|
+
})) && (undefined !== value || _report(_exceptionable, {
|
|
1538
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1539
|
+
expected: "(OperationResult | string)",
|
|
1540
|
+
value: value
|
|
1541
|
+
})) && ("string" === typeof value || ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
1542
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1543
|
+
expected: "(OperationResult | string)",
|
|
1544
|
+
value: value
|
|
1545
|
+
})) && _vo32(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
1546
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1547
|
+
expected: "(OperationResult | string)",
|
|
1548
|
+
value: value
|
|
1549
|
+
}));
|
|
1550
|
+
}).every(flag => flag)].every(flag => flag); const _vo32 = (input, _path, _exceptionable = true) => ["string" === typeof input.regex || _report(_exceptionable, {
|
|
1551
|
+
path: _path + ".regex",
|
|
1552
|
+
expected: "string",
|
|
1553
|
+
value: input.regex
|
|
1554
|
+
}), (Array.isArray(input.logType) || _report(_exceptionable, {
|
|
1555
|
+
path: _path + ".logType",
|
|
1556
|
+
expected: "(Array<StdOptions> & UniqueLogTypeTag)",
|
|
1557
|
+
value: input.logType
|
|
1558
|
+
})) && ((Array.isArray(input.logType) && input.logType.length >= 1 && input.logType.length <= 4 && (() => {
|
|
1559
|
+
const seen = new Set();
|
|
1560
|
+
for (const v of input.logType) {
|
|
1561
|
+
if (seen.has(v))
|
|
1562
|
+
return false;
|
|
1563
|
+
seen.add(v);
|
|
1564
|
+
}
|
|
1565
|
+
return true;
|
|
1566
|
+
})() || _report(_exceptionable, {
|
|
1567
|
+
path: _path + ".logType",
|
|
1568
|
+
expected: "Array<> & UniqueLogTypeTag",
|
|
1569
|
+
value: input.logType
|
|
1570
|
+
})) && input.logType.map((elem, _index28) => "stdout" === elem || "stdin" === elem || "stderr" === elem || "nodeerr" === elem || _report(_exceptionable, {
|
|
1571
|
+
path: _path + ".logType[" + _index28 + "]",
|
|
1572
|
+
expected: "(\"nodeerr\" | \"stderr\" | \"stdin\" | \"stdout\")",
|
|
1573
|
+
value: elem
|
|
1574
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1575
|
+
path: _path + ".logType",
|
|
1576
|
+
expected: "(Array<StdOptions> & UniqueLogTypeTag)",
|
|
1577
|
+
value: input.logType
|
|
1578
|
+
}), 2 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1579
|
+
if (["regex", "logType"].some(prop => key === prop))
|
|
1580
|
+
return true;
|
|
1581
|
+
const value = input[key];
|
|
1582
|
+
if (undefined === value)
|
|
1583
|
+
return true;
|
|
1584
|
+
return _report(_exceptionable, {
|
|
1585
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1586
|
+
expected: "undefined",
|
|
1587
|
+
value: value,
|
|
1588
|
+
description: [
|
|
1589
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1590
|
+
"",
|
|
1591
|
+
"Please remove the property next time."
|
|
1592
|
+
].join("\n")
|
|
1593
|
+
});
|
|
1594
|
+
}).every(flag => flag))].every(flag => flag); const _vo33 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1595
|
+
path: _path + ".group",
|
|
1596
|
+
expected: "(string | undefined)",
|
|
1597
|
+
value: input.group
|
|
1598
|
+
}), (null !== input.depends_on || _report(_exceptionable, {
|
|
1599
|
+
path: _path + ".depends_on",
|
|
1600
|
+
expected: "undefined",
|
|
1601
|
+
value: input.depends_on
|
|
1602
|
+
})) && (undefined === input.depends_on || _report(_exceptionable, {
|
|
1603
|
+
path: _path + ".depends_on",
|
|
1604
|
+
expected: "undefined",
|
|
1605
|
+
value: input.depends_on
|
|
1606
|
+
})), (null !== input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1607
|
+
path: _path + ".stop_if_dependent_stops",
|
|
1608
|
+
expected: "undefined",
|
|
1609
|
+
value: input.stop_if_dependent_stops
|
|
1610
|
+
})) && (undefined === 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
|
+
})), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1615
|
+
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
1616
|
+
return true;
|
|
1617
|
+
const value = input[key];
|
|
1618
|
+
if (undefined === value)
|
|
1619
|
+
return true;
|
|
1620
|
+
return _report(_exceptionable, {
|
|
1621
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1622
|
+
expected: "undefined",
|
|
1623
|
+
value: value,
|
|
1624
|
+
description: [
|
|
1625
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1626
|
+
"",
|
|
1627
|
+
"Please remove the property next time."
|
|
1628
|
+
].join("\n")
|
|
1629
|
+
});
|
|
1630
|
+
}).every(flag => flag))].every(flag => flag); const _vo34 = (input, _path, _exceptionable = true) => [undefined === input.group || "string" === typeof input.group || _report(_exceptionable, {
|
|
1631
|
+
path: _path + ".group",
|
|
1632
|
+
expected: "(string | undefined)",
|
|
1633
|
+
value: input.group
|
|
1634
|
+
}), (Array.isArray(input.depends_on) || _report(_exceptionable, {
|
|
1635
|
+
path: _path + ".depends_on",
|
|
1636
|
+
expected: "Array<string>",
|
|
1637
|
+
value: input.depends_on
|
|
1638
|
+
})) && input.depends_on.map((elem, _index29) => "string" === typeof elem || _report(_exceptionable, {
|
|
1639
|
+
path: _path + ".depends_on[" + _index29 + "]",
|
|
1640
|
+
expected: "string",
|
|
1641
|
+
value: elem
|
|
1642
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1643
|
+
path: _path + ".depends_on",
|
|
1644
|
+
expected: "Array<string>",
|
|
1645
|
+
value: input.depends_on
|
|
1646
|
+
}), undefined === input.stop_if_dependent_stops || "boolean" === typeof input.stop_if_dependent_stops || _report(_exceptionable, {
|
|
1647
|
+
path: _path + ".stop_if_dependent_stops",
|
|
1648
|
+
expected: "(boolean | undefined)",
|
|
1649
|
+
value: input.stop_if_dependent_stops
|
|
1650
|
+
}), 1 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
|
|
1651
|
+
if (["group", "depends_on", "stop_if_dependent_stops"].some(prop => key === prop))
|
|
1652
|
+
return true;
|
|
1653
|
+
const value = input[key];
|
|
1654
|
+
if (undefined === value)
|
|
1655
|
+
return true;
|
|
1656
|
+
return _report(_exceptionable, {
|
|
1657
|
+
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
1658
|
+
expected: "undefined",
|
|
1659
|
+
value: value,
|
|
1660
|
+
description: [
|
|
1661
|
+
`The property \`${key}\` is not defined in the object type.`,
|
|
1662
|
+
"",
|
|
1663
|
+
"Please remove the property next time."
|
|
1664
|
+
].join("\n")
|
|
1665
|
+
});
|
|
1666
|
+
}).every(flag => flag))].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1667
|
+
if (undefined !== input.port)
|
|
1668
|
+
return _vo15(input, _path, true && _exceptionable);
|
|
1669
|
+
else if (undefined !== input.__spread__)
|
|
1670
|
+
return _vo14(input, _path, true && _exceptionable);
|
|
1671
|
+
else
|
|
1672
|
+
return _report(_exceptionable, {
|
|
1673
|
+
path: _path,
|
|
1674
|
+
expected: "(ExposedPort | __type.o12)",
|
|
1675
|
+
value: input
|
|
1676
|
+
});
|
|
1677
|
+
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
1678
|
+
if ("http" === input.type)
|
|
1679
|
+
return _vo16(input, _path, true && _exceptionable);
|
|
1680
|
+
else if ("websocket" === input.type)
|
|
1681
|
+
return _vo18(input, _path, true && _exceptionable);
|
|
1682
|
+
else
|
|
1683
|
+
return _report(_exceptionable, {
|
|
1684
|
+
path: _path,
|
|
1685
|
+
expected: "(HttpHealthCheck | WebSocketHealthCheck)",
|
|
1686
|
+
value: input
|
|
1687
|
+
});
|
|
1688
|
+
})(); const _vu2 = (input, _path, _exceptionable = true) => (() => {
|
|
1689
|
+
if (undefined !== input.bucket)
|
|
1690
|
+
return _vo23(input, _path, true && _exceptionable);
|
|
1691
|
+
else if (undefined !== input.buckets)
|
|
1692
|
+
return _vo24(input, _path, true && _exceptionable);
|
|
1693
|
+
else if ("HF" === input.type)
|
|
1694
|
+
return _vo26(input, _path, true && _exceptionable);
|
|
1695
|
+
else if ("Ollama" === input.type)
|
|
1696
|
+
return _vo27(input, _path, true && _exceptionable);
|
|
1697
|
+
else if (undefined !== input.__spread__)
|
|
1698
|
+
return _vo14(input, _path, true && _exceptionable);
|
|
1699
|
+
else
|
|
1700
|
+
return _vo21(input, _path, true && _exceptionable);
|
|
1701
|
+
})(); const _vu3 = (input, _path, _exceptionable = true) => (() => {
|
|
1702
|
+
if (undefined !== input.image)
|
|
1703
|
+
return _vo12(input, _path, true && _exceptionable);
|
|
1704
|
+
else if (undefined !== input.name)
|
|
1705
|
+
return _vo30(input, _path, true && _exceptionable);
|
|
1706
|
+
else
|
|
1707
|
+
return _report(_exceptionable, {
|
|
1708
|
+
path: _path,
|
|
1709
|
+
expected: "(__type.o8 | __type.o19)",
|
|
1710
|
+
value: input
|
|
1711
|
+
});
|
|
1712
|
+
})(); const _vu4 = (input, _path, _exceptionable = true) => (() => {
|
|
1713
|
+
if (Array.isArray(input.depends_on) && input.depends_on.map((elem, _index30) => "string" === typeof elem).every(flag => flag))
|
|
1714
|
+
return _vo34(input, _path, true && _exceptionable);
|
|
1715
|
+
else
|
|
1716
|
+
return _vo33(input, _path, true && _exceptionable);
|
|
1717
|
+
})(); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
|
|
1718
|
+
if (false === __is(input)) {
|
|
1719
|
+
errors = [];
|
|
1720
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1721
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1722
|
+
path: _path + "",
|
|
1723
|
+
expected: "JobDefinition",
|
|
1724
|
+
value: input
|
|
1725
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1726
|
+
path: _path + "",
|
|
1727
|
+
expected: "JobDefinition",
|
|
1728
|
+
value: input
|
|
1729
|
+
}))(input, "$input", true);
|
|
1730
|
+
const success = 0 === errors.length;
|
|
1731
|
+
return success ? {
|
|
1732
|
+
success,
|
|
1733
|
+
data: input
|
|
1734
|
+
} : {
|
|
1735
|
+
success,
|
|
1736
|
+
errors,
|
|
1737
|
+
data: input
|
|
1738
|
+
};
|
|
1739
|
+
}
|
|
1740
|
+
return {
|
|
1741
|
+
success: true,
|
|
1742
|
+
data: input
|
|
1743
|
+
};
|
|
1744
|
+
}); })();
|
|
1745
|
+
if (!req.body) {
|
|
1746
|
+
return res.status(400).send('Missing job definition.');
|
|
1747
|
+
}
|
|
1748
|
+
const isValid = validator(req.body);
|
|
1749
|
+
if (!isValid.success) {
|
|
1750
|
+
res.status(400).send(JSON.stringify({
|
|
1751
|
+
error: 'Failed to validate job defintion.',
|
|
1752
|
+
message: isValid.errors,
|
|
1753
|
+
}));
|
|
1754
|
+
}
|
|
1755
|
+
const sessionId = res.locals['session_id'];
|
|
1756
|
+
if (sessionId !== 'ADMIN') {
|
|
1757
|
+
res.status(200).send();
|
|
1758
|
+
}
|
|
1759
|
+
const id = generateRandomId(32);
|
|
1760
|
+
try {
|
|
1761
|
+
const task = new TaskManager(provider, repository, id, sessionId, req.body);
|
|
1762
|
+
task.bootstrap();
|
|
1763
|
+
await task.start();
|
|
1764
|
+
const result = repository.getFlow(id);
|
|
1765
|
+
if (sessionId === 'ADMIN') {
|
|
1766
|
+
res.status(200).send(result.state.opStates[0].results['prediction'][0]);
|
|
1767
|
+
return;
|
|
1768
|
+
}
|
|
1769
|
+
await fetch(`${configs().backendUrl}/benchmarks/submit`, {
|
|
1770
|
+
method: 'POST',
|
|
1771
|
+
headers: {
|
|
1772
|
+
Authorization: await sdk.authorization.generate(sessionId, {
|
|
1773
|
+
includeTime: true,
|
|
1774
|
+
}),
|
|
1775
|
+
'Content-Type': 'application/json',
|
|
1776
|
+
},
|
|
1777
|
+
body: JSON.stringify(result.state),
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
catch (error) {
|
|
1781
|
+
throw error;
|
|
1782
|
+
}
|
|
1783
|
+
}
|