@nfdi4plants/arctrl 3.0.0-beta.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -3
- package/dist/ts/index.d.ts +54 -16
- package/dist/ts/index.d.ts.map +1 -1
- package/dist/ts/index.js +56 -18
- package/dist/ts/ts/ARC.d.ts +38 -15
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +285 -140
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +62 -0
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -0
- package/dist/ts/ts/CWL/CWLProcessingUnit.js +250 -0
- package/dist/ts/ts/CWL/CWLTypes.d.ts +148 -0
- package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -0
- package/dist/ts/ts/CWL/CWLTypes.js +384 -0
- package/dist/ts/ts/CWL/Decode.d.ts +210 -0
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Decode.js +2617 -0
- package/dist/ts/ts/CWL/Encode.d.ts +96 -0
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Encode.js +1509 -0
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +50 -0
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ExpressionToolDescription.js +152 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts +9 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -0
- package/dist/ts/ts/CWL/HashHelpers.js +35 -0
- package/dist/ts/ts/CWL/Inputs.d.ts +31 -0
- package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Inputs.js +86 -0
- package/dist/ts/ts/CWL/OperationDescription.d.ts +46 -0
- package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/OperationDescription.js +133 -0
- package/dist/ts/ts/CWL/Outputs.d.ts +44 -0
- package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Outputs.js +143 -0
- package/dist/ts/ts/CWL/ParameterReference.d.ts +23 -0
- package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ParameterReference.js +60 -0
- package/dist/ts/ts/CWL/Requirements.d.ts +206 -0
- package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -0
- package/dist/ts/ts/CWL/Requirements.js +384 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts +50 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ToolDescription.js +152 -0
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts +50 -0
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -0
- package/dist/ts/ts/CWL/WorkflowDescription.js +142 -0
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +160 -0
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -0
- package/dist/ts/ts/CWL/WorkflowSteps.js +317 -0
- package/dist/ts/ts/CWLRunResolver.d.ts +45 -0
- package/dist/ts/ts/CWLRunResolver.d.ts.map +1 -0
- package/dist/ts/ts/CWLRunResolver.js +181 -0
- package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ARC.js +27 -9
- package/dist/ts/ts/Contract/ArcRun.d.ts +6 -0
- package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcRun.js +131 -4
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts +3 -0
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcWorkflow.js +70 -4
- package/dist/ts/ts/Contract/Datamap.d.ts +25 -25
- package/dist/ts/ts/Contract/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Contract/Datamap.js +61 -42
- package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/ContractIO.js +3 -1
- package/dist/ts/ts/Conversion/Assay.d.ts +13 -0
- package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Assay.js +69 -0
- package/dist/ts/ts/Conversion/Basic.d.ts +105 -0
- package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Basic.js +452 -0
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts +11 -0
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/ColumnIndex.js +71 -0
- package/dist/ts/ts/Conversion/Datamap.d.ts +11 -0
- package/dist/ts/ts/Conversion/Datamap.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Datamap.js +21 -0
- package/dist/ts/ts/Conversion/DateTime.d.ts +4 -0
- package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/DateTime.js +23 -0
- package/dist/ts/ts/Conversion/Investigation.d.ts +12 -0
- package/dist/ts/ts/Conversion/Investigation.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Investigation.js +79 -0
- package/dist/ts/ts/Conversion/Person.d.ts +16 -0
- package/dist/ts/ts/Conversion/Person.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Person.js +100 -0
- package/dist/ts/ts/Conversion/Process.d.ts +84 -0
- package/dist/ts/ts/Conversion/Process.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Process.js +455 -0
- package/dist/ts/ts/Conversion/Run.d.ts +35 -0
- package/dist/ts/ts/Conversion/Run.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Run.js +254 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts +16 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/ScholarlyArticle.js +116 -0
- package/dist/ts/ts/Conversion/Study.d.ts +12 -0
- package/dist/ts/ts/Conversion/Study.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Study.js +51 -0
- package/dist/ts/ts/Conversion/Table.d.ts +45 -0
- package/dist/ts/ts/Conversion/Table.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Table.js +203 -0
- package/dist/ts/ts/Conversion/Workflow.d.ts +91 -0
- package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -0
- package/dist/ts/ts/Conversion/Workflow.js +455 -0
- package/dist/ts/ts/Conversion.d.ts +25 -276
- package/dist/ts/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/ts/Conversion.js +64 -1477
- package/dist/ts/ts/Core/ArcTypes.d.ts +69 -59
- package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/ts/Core/ArcTypes.js +251 -146
- package/dist/ts/ts/Core/Datamap.d.ts +53 -0
- package/dist/ts/ts/Core/{DataMap.d.ts.map → Datamap.d.ts.map} +1 -1
- package/dist/ts/ts/Core/Datamap.js +177 -0
- package/dist/ts/ts/Core/Helper/Identifier.d.ts +24 -0
- package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Identifier.js +35 -2
- package/dist/ts/ts/Core/Table/ArcTable.d.ts +8 -8
- package/dist/ts/ts/Core/Table/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/ArcTable.js +20 -20
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts +4 -4
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/FileSystemTree.js +20 -27
- package/dist/ts/ts/FileSystem/Path.d.ts +22 -0
- package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/Path.js +173 -3
- package/dist/ts/ts/Json/Assay.js +5 -5
- package/dist/ts/ts/Json/{DataMap → Datamap}/DataContext.d.ts.map +1 -1
- package/dist/ts/ts/Json/{DataMap/DataMap.d.ts → Datamap/Datamap.d.ts} +6 -6
- package/dist/ts/ts/Json/Datamap/Datamap.d.ts.map +1 -0
- package/dist/ts/ts/Json/{DataMap/DataMap.js → Datamap/Datamap.js} +3 -3
- package/dist/ts/ts/Json/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/Json/ROCrate/LDContext.js +21 -11
- package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -0
- package/dist/ts/ts/Json/ROCrate/LDNode.d.ts.map +1 -1
- package/dist/ts/ts/Json/ROCrate/LDNode.js +18 -7
- package/dist/ts/ts/Json/Run.js +5 -5
- package/dist/ts/ts/Json/Study.js +5 -5
- package/dist/ts/ts/Json/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Json/Workflow.js +10 -11
- package/dist/ts/ts/Json.d.ts +3 -5
- package/dist/ts/ts/Json.d.ts.map +1 -1
- package/dist/ts/ts/Json.js +4 -10
- package/dist/ts/ts/JsonIO/Datamap.d.ts +4 -4
- package/dist/ts/ts/JsonIO/Datamap.js +6 -6
- package/dist/ts/ts/JsonIO/Investigation.d.ts +0 -6
- package/dist/ts/ts/JsonIO/Investigation.d.ts.map +1 -1
- package/dist/ts/ts/JsonIO/Investigation.js +2 -21
- package/dist/ts/ts/License.js +1 -1
- package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDContext.js +35 -31
- package/dist/ts/ts/ROCrate/LDObject.d.ts +2 -2
- package/dist/ts/ts/ROCrate/LDObject.js +2 -2
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts +63 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +361 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts +39 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +219 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts +43 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +224 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.js +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.d.ts +34 -22
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.js +59 -2
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.d.ts +10 -4
- package/dist/ts/ts/ROCrate/LDTypes/File.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.js +34 -1
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts +59 -0
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +344 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.d.ts +2 -0
- package/dist/ts/ts/ROCrate/LDTypes/LabProcess.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.js +31 -5
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.d.ts +6 -2
- package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.js +66 -15
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.d.ts +35 -11
- package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.js +191 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts +46 -0
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +247 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts +12 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +40 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts +11 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +46 -0
- package/dist/ts/ts/ROCrate/ROCrateContext.d.ts +2 -2
- package/dist/ts/ts/ROCrate/ROCrateContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/ROCrateContext.js +6 -6
- package/dist/ts/ts/ROCrateIO.d.ts +7 -3
- package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/ts/ROCrateIO.js +82 -13
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +3 -3
- package/dist/ts/ts/Spreadsheet/ArcRun.js +2 -2
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +3 -3
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +2 -2
- package/dist/ts/ts/Spreadsheet/Datamap.d.ts +8 -0
- package/dist/ts/ts/Spreadsheet/Datamap.d.ts.map +1 -0
- package/dist/ts/ts/Spreadsheet/{DataMap.js → Datamap.js} +9 -9
- package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapColumn.d.ts → DatamapTable/DatamapColumn.d.ts} +1 -1
- package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapColumn.d.ts.map → DatamapTable/DatamapColumn.d.ts.map} +1 -1
- package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapColumn.js → DatamapTable/DatamapColumn.js} +1 -1
- package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapHeader.d.ts → DatamapTable/DatamapHeader.d.ts} +1 -1
- package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapHeader.d.ts.map → DatamapTable/DatamapHeader.d.ts.map} +1 -1
- package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapTable.d.ts → DatamapTable/DatamapTable.d.ts} +5 -5
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.d.ts.map +1 -0
- package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapTable.js → DatamapTable/DatamapTable.js} +8 -8
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +4 -4
- package/dist/ts/ts/WorkflowGraph/Adapters.d.ts +36 -0
- package/dist/ts/ts/WorkflowGraph/Adapters.d.ts.map +1 -0
- package/dist/ts/ts/WorkflowGraph/Adapters.js +94 -0
- package/dist/ts/ts/WorkflowGraph/BuildOptions.d.ts +37 -0
- package/dist/ts/ts/WorkflowGraph/BuildOptions.d.ts.map +1 -0
- package/dist/ts/ts/WorkflowGraph/BuildOptions.js +35 -0
- package/dist/ts/ts/WorkflowGraph/Builder.d.ts +160 -0
- package/dist/ts/ts/WorkflowGraph/Builder.d.ts.map +1 -0
- package/dist/ts/ts/WorkflowGraph/Builder.js +556 -0
- package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts +182 -0
- package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts.map +1 -0
- package/dist/ts/ts/WorkflowGraph/GraphTypes.js +281 -0
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts +27 -0
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts.map +1 -0
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.js +49 -0
- package/dist/ts/ts/Xlsx.d.ts +5 -5
- package/dist/ts/ts/Xlsx.js +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.js +5 -5
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +1 -1
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +5 -5
- package/dist/ts/ts/Yaml.d.ts +24 -0
- package/dist/ts/ts/Yaml.d.ts.map +1 -0
- package/dist/ts/ts/Yaml.js +56 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.1.0/DynObj.fs.js +109 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/Encode.fs.js +1 -1
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/FlowToBlock.fs.js +954 -0
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/Interop/JsInterop.fs.js +10 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/Persil.fs.js +1 -1
- package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/Reader.fs.js +208 -152
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.3/Regex.fs.js +15 -0
- package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/RegexActivePatterns.fs.js +14 -10
- package/package.json +1 -1
- package/dist/ts/ts/Core/DataMap.d.ts +0 -52
- package/dist/ts/ts/Core/DataMap.js +0 -159
- package/dist/ts/ts/Json/DataMap/DataMap.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/File.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/LabProcess.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.d.ts.map +0 -1
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.d.ts.map +0 -1
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts +0 -8
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +0 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +0 -1
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Interop/JsInterop.fs.js +0 -10
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +0 -11
- /package/dist/ts/ts/Json/{DataMap → Datamap}/DataContext.d.ts +0 -0
- /package/dist/ts/ts/Json/{DataMap → Datamap}/DataContext.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.js +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts +0 -0
- /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.js +0 -0
- /package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapHeader.js → DatamapTable/DatamapHeader.js} +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/DynamicObj.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/FableJS.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/HashCodes.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/PropertyHelper.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/ReflectionUtils.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/Decode.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/Preprocessing.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/Writer.fs.js +0 -0
- /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.3}/YAMLiciousTypes.fs.js +0 -0
|
@@ -0,0 +1,2617 @@
|
|
|
1
|
+
import { getEnumerator, disposeSafe, Lazy } from '../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
2
|
+
import { replace, trimEnd, join, trimStart, toText, interpolate, printf, substring, trim } from '../../node_modules/@fable-org/fable-library-js/String.js';
|
|
3
|
+
import { item } from '../../node_modules/@fable-org/fable-library-js/Array.js';
|
|
4
|
+
import { choose, isEmpty, head, tail, iterate, map, empty, exists, tryPick, cons, singleton as singleton$1, ofArray, tryHead } from '../../node_modules/@fable-org/fable-library-js/List.js';
|
|
5
|
+
import { YAMLElement_Mapping, YAMLElement_Sequence, YAMLElement_Object, YAMLContent, YAMLElement_Value } from '../fable_modules/YAMLicious.1.0.0-alpha.3/YAMLiciousTypes.fs.js';
|
|
6
|
+
import { value, map as map$1, unwrap, defaultArg, some, bind } from '../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
7
|
+
import { read, object, string, bool, resizearray, int } from '../fable_modules/YAMLicious.1.0.0-alpha.3/Decode.fs.js';
|
|
8
|
+
import { setProperty, setOptionalProperty } from '../fable_modules/DynamicObj.7.1.0/DynObj.fs.js';
|
|
9
|
+
import { DynamicObj } from '../fable_modules/DynamicObj.7.1.0/DynamicObj.fs.js';
|
|
10
|
+
import { SchemaSaladString_Literal, SchemaSaladString_Import, SchemaSaladString_Include, SchemaSaladStringModule_toDirectiveString, CWLType_Dirent, DirentInstance, DirectoryInstance_$ctor, FileInstance_$ctor, CWLType_Null, CWLType_Stdout, CWLType_Boolean, CWLType_Double, CWLType_Float, CWLType_Long, CWLType_Int, CWLType_String, CWLType_Directory, CWLType_File, CWLType_Array, InputArraySchema, InputRecordField, InputRecordSchema, InputEnumSchema, CWLType_Union, CWLType_Record, CWLType_Enum, SoftwarePackage, SchemaDefRequirementType } from './CWLTypes.js';
|
|
11
|
+
import { OutputBinding, CWLOutput, OutputSource_Multiple, OutputSource_Single } from './Outputs.js';
|
|
12
|
+
import { InitialWorkDirEntry_StringEntry, InitialWorkDirEntry_DirentEntry, InitialWorkDirEntry_DirectoryEntry, InitialWorkDirEntry_FileEntry, DockerRequirement_create_Z14898805, EnvironmentDef, LoadListingRequirementValue, LoadListingEnum_tryParse_Z721C83C5, ResourceRequirementInstance_$ctor_D76FC00, Requirement_WorkReuseExpressionRequirement, Requirement_WorkReuseRequirement, WorkReuseRequirementValue, Requirement_NetworkAccessExpressionRequirement, Requirement_NetworkAccessRequirement, NetworkAccessRequirementValue, InplaceUpdateRequirementValue, ToolTimeLimitValue_ToolTimeLimitExpression, ToolTimeLimitValue_ToolTimeLimitSeconds, InlineJavascriptRequirementValue, Requirement_StepInputExpressionRequirement, Requirement_MultipleInputFeatureRequirement, Requirement_ScatterFeatureRequirement, Requirement_SubworkflowFeatureRequirement, Requirement_ToolTimeLimitRequirement, Requirement_InplaceUpdateRequirement, Requirement_ResourceRequirement, Requirement_ShellCommandRequirement, Requirement_EnvVarRequirement, Requirement_InitialWorkDirRequirement, Requirement_LoadListingRequirement, Requirement_SoftwareRequirement, Requirement_DockerRequirement, Requirement_SchemaDefRequirement, Requirement_InlineJavascriptRequirement, HintEntry_UnknownHint, HintUnknownValue, HintEntry_KnownHint } from './Requirements.js';
|
|
13
|
+
import { toArray, delay, collect, append, empty as empty$1, singleton, head as head$1, map as map$2, length } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
14
|
+
import { getItemFromDict } from '../../node_modules/@fable-org/fable-library-js/MapUtil.js';
|
|
15
|
+
import { compare } from '../../node_modules/@fable-org/fable-library-js/BigInt.js';
|
|
16
|
+
import { tryParse } from '../../node_modules/@fable-org/fable-library-js/Long.js';
|
|
17
|
+
import { FSharpRef } from '../../node_modules/@fable-org/fable-library-js/Types.js';
|
|
18
|
+
import { tryParse as tryParse$1 } from '../../node_modules/@fable-org/fable-library-js/Double.js';
|
|
19
|
+
import { InputBinding, CWLInput } from './Inputs.js';
|
|
20
|
+
import { LinkMergeMethod, PickValueMethod, ScatterMethod, StepInput, StepOutput_StepOutputRecord, StepOutputParameter, StepOutput_StepOutputString, WorkflowStepRun_RunString, WorkflowStep } from './WorkflowSteps.js';
|
|
21
|
+
import { WorkflowStepRunOps_fromTool, WorkflowStepRunOps_fromOperation, WorkflowStepRunOps_fromExpressionTool, WorkflowStepRunOps_fromWorkflow, CWLProcessingUnit_Operation, CWLProcessingUnit_ExpressionTool, CWLProcessingUnit_Workflow, CWLProcessingUnit_CommandLineTool } from './CWLProcessingUnit.js';
|
|
22
|
+
import { CWLToolDescription } from './ToolDescription.js';
|
|
23
|
+
import { CWLExpressionToolDescription } from './ExpressionToolDescription.js';
|
|
24
|
+
import { CWLOperationDescription } from './OperationDescription.js';
|
|
25
|
+
import { CWLWorkflowDescription } from './WorkflowDescription.js';
|
|
26
|
+
import { CWLParameterReference } from './ParameterReference.js';
|
|
27
|
+
|
|
28
|
+
function ResizeArray_map(f, a) {
|
|
29
|
+
const b = [];
|
|
30
|
+
let enumerator = getEnumerator(a);
|
|
31
|
+
try {
|
|
32
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
33
|
+
const i = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
34
|
+
void b.push(f(i));
|
|
35
|
+
}
|
|
36
|
+
} finally {
|
|
37
|
+
disposeSafe(enumerator);
|
|
38
|
+
}
|
|
39
|
+
return b;
|
|
40
|
+
}
|
|
41
|
+
function Decode_normalizeYamlInput(yaml) {
|
|
42
|
+
const normalized = yaml == null ? "" : replace(yaml, "\r\n", "\n");
|
|
43
|
+
const lines = normalized.split("\n");
|
|
44
|
+
return trimEnd(join("\n", lines.length > 0 && item(0, lines).startsWith("#!") ? lines.slice(1, lines.length) : lines));
|
|
45
|
+
}
|
|
46
|
+
function Decode_removeFullLineComments(yaml) {
|
|
47
|
+
let array;
|
|
48
|
+
return join("\n", (array = yaml.split("\n"), array.filter((line) => !trimStart(line).startsWith("#"))));
|
|
49
|
+
}
|
|
50
|
+
function Decode_removeYamlComments(yamlElement) {
|
|
51
|
+
switch (yamlElement.tag) {
|
|
52
|
+
case /* Object */
|
|
53
|
+
3:
|
|
54
|
+
return YAMLElement_Object(choose((element) => {
|
|
55
|
+
if (element.tag === /* Comment */
|
|
56
|
+
4) {
|
|
57
|
+
return void 0;
|
|
58
|
+
} else {
|
|
59
|
+
return Decode_removeYamlComments(element);
|
|
60
|
+
}
|
|
61
|
+
}, yamlElement.fields[0]));
|
|
62
|
+
case /* Sequence */
|
|
63
|
+
2:
|
|
64
|
+
return YAMLElement_Sequence(choose((element_1) => {
|
|
65
|
+
const matchValue = Decode_removeYamlComments(element_1);
|
|
66
|
+
let matchResult, other_1;
|
|
67
|
+
switch (matchValue.tag) {
|
|
68
|
+
case /* Comment */
|
|
69
|
+
4: {
|
|
70
|
+
matchResult = 0;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
case /* Object */
|
|
74
|
+
3: {
|
|
75
|
+
if (isEmpty(matchValue.fields[0])) {
|
|
76
|
+
matchResult = 1;
|
|
77
|
+
} else {
|
|
78
|
+
matchResult = 2;
|
|
79
|
+
other_1 = matchValue;
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
default: {
|
|
84
|
+
matchResult = 2;
|
|
85
|
+
other_1 = matchValue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
switch (matchResult) {
|
|
89
|
+
case 0:
|
|
90
|
+
return void 0;
|
|
91
|
+
case 1:
|
|
92
|
+
return void 0;
|
|
93
|
+
default:
|
|
94
|
+
return other_1;
|
|
95
|
+
}
|
|
96
|
+
}, yamlElement.fields[0]));
|
|
97
|
+
case /* Mapping */
|
|
98
|
+
0:
|
|
99
|
+
return YAMLElement_Mapping(yamlElement.fields[0], Decode_removeYamlComments(yamlElement.fields[1]));
|
|
100
|
+
default:
|
|
101
|
+
return yamlElement;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function Decode_isRecoverableDecodingError(ex) {
|
|
105
|
+
let matchResult;
|
|
106
|
+
if (ex.message.indexOf("Expected") >= 0) {
|
|
107
|
+
matchResult = 4;
|
|
108
|
+
} else if (ex.message.indexOf("Required") >= 0) {
|
|
109
|
+
matchResult = 5;
|
|
110
|
+
} else {
|
|
111
|
+
matchResult = 6;
|
|
112
|
+
}
|
|
113
|
+
switch (matchResult) {
|
|
114
|
+
case 0:
|
|
115
|
+
return true;
|
|
116
|
+
case 1:
|
|
117
|
+
return true;
|
|
118
|
+
case 2:
|
|
119
|
+
return true;
|
|
120
|
+
case 3:
|
|
121
|
+
return true;
|
|
122
|
+
case 4:
|
|
123
|
+
return true;
|
|
124
|
+
case 5:
|
|
125
|
+
return true;
|
|
126
|
+
default:
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function Decode_readSanitizedYaml(yaml) {
|
|
131
|
+
const normalized = Decode_normalizeYamlInput(yaml);
|
|
132
|
+
const tryRead = (text) => Decode_removeYamlComments(read(text));
|
|
133
|
+
try {
|
|
134
|
+
return tryRead(normalized);
|
|
135
|
+
} catch (matchValue) {
|
|
136
|
+
if (Decode_isRecoverableDecodingError(matchValue)) {
|
|
137
|
+
return tryRead(Decode_removeFullLineComments(normalized));
|
|
138
|
+
} else {
|
|
139
|
+
throw matchValue;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function Decode_overflowDecoder(dynObj, dict) {
|
|
144
|
+
let enumerator = getEnumerator(dict);
|
|
145
|
+
try {
|
|
146
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
147
|
+
const e = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
148
|
+
const matchValue = e[1];
|
|
149
|
+
let matchResult, v, s;
|
|
150
|
+
if (matchValue.tag === /* Object */
|
|
151
|
+
3) {
|
|
152
|
+
if (!isEmpty(matchValue.fields[0])) {
|
|
153
|
+
switch (head(matchValue.fields[0]).tag) {
|
|
154
|
+
case /* Value */
|
|
155
|
+
1: {
|
|
156
|
+
if (isEmpty(tail(matchValue.fields[0]))) {
|
|
157
|
+
matchResult = 0;
|
|
158
|
+
v = head(matchValue.fields[0]).fields[0];
|
|
159
|
+
} else {
|
|
160
|
+
matchResult = 2;
|
|
161
|
+
}
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
case /* Sequence */
|
|
165
|
+
2: {
|
|
166
|
+
if (isEmpty(tail(matchValue.fields[0]))) {
|
|
167
|
+
matchResult = 1;
|
|
168
|
+
s = head(matchValue.fields[0]).fields[0];
|
|
169
|
+
} else {
|
|
170
|
+
matchResult = 2;
|
|
171
|
+
}
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
default:
|
|
175
|
+
matchResult = 2;
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
matchResult = 2;
|
|
179
|
+
}
|
|
180
|
+
} else {
|
|
181
|
+
matchResult = 2;
|
|
182
|
+
}
|
|
183
|
+
switch (matchResult) {
|
|
184
|
+
case 0: {
|
|
185
|
+
setProperty(e[0], v.Value, dynObj);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
case 1: {
|
|
189
|
+
const newDynObj = new DynamicObj();
|
|
190
|
+
iterate((x) => {
|
|
191
|
+
setProperty(e[0], x, dynObj);
|
|
192
|
+
}, map((arg) => Decode_overflowDecoder(newDynObj, object((get$) => get$.Overflow.FieldList(empty()), arg)), s));
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
case 2: {
|
|
196
|
+
setProperty(e[0], e[1], dynObj);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
} finally {
|
|
202
|
+
disposeSafe(enumerator);
|
|
203
|
+
}
|
|
204
|
+
return dynObj;
|
|
205
|
+
}
|
|
206
|
+
function Decode_decodeSchemaSaladString(yEle) {
|
|
207
|
+
let matchResult, v, c, v_1;
|
|
208
|
+
switch (yEle.tag) {
|
|
209
|
+
case /* Value */
|
|
210
|
+
1: {
|
|
211
|
+
matchResult = 0;
|
|
212
|
+
v = yEle.fields[0];
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
case /* Object */
|
|
216
|
+
3: {
|
|
217
|
+
if (!isEmpty(yEle.fields[0])) {
|
|
218
|
+
switch (head(yEle.fields[0]).tag) {
|
|
219
|
+
case /* Value */
|
|
220
|
+
1: {
|
|
221
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
222
|
+
matchResult = 0;
|
|
223
|
+
v = head(yEle.fields[0]).fields[0];
|
|
224
|
+
} else {
|
|
225
|
+
matchResult = 2;
|
|
226
|
+
}
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
case /* Mapping */
|
|
230
|
+
0: {
|
|
231
|
+
switch (head(yEle.fields[0]).fields[1].tag) {
|
|
232
|
+
case /* Value */
|
|
233
|
+
1: {
|
|
234
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
235
|
+
matchResult = 1;
|
|
236
|
+
c = head(yEle.fields[0]).fields[0];
|
|
237
|
+
v_1 = head(yEle.fields[0]).fields[1].fields[0];
|
|
238
|
+
} else {
|
|
239
|
+
matchResult = 2;
|
|
240
|
+
}
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
case /* Object */
|
|
244
|
+
3: {
|
|
245
|
+
if (!isEmpty(head(yEle.fields[0]).fields[1].fields[0])) {
|
|
246
|
+
if (head(head(yEle.fields[0]).fields[1].fields[0]).tag === /* Value */
|
|
247
|
+
1) {
|
|
248
|
+
if (isEmpty(tail(head(yEle.fields[0]).fields[1].fields[0]))) {
|
|
249
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
250
|
+
matchResult = 1;
|
|
251
|
+
c = head(yEle.fields[0]).fields[0];
|
|
252
|
+
v_1 = head(head(yEle.fields[0]).fields[1].fields[0]).fields[0];
|
|
253
|
+
} else {
|
|
254
|
+
matchResult = 2;
|
|
255
|
+
}
|
|
256
|
+
} else {
|
|
257
|
+
matchResult = 2;
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
matchResult = 2;
|
|
261
|
+
}
|
|
262
|
+
} else {
|
|
263
|
+
matchResult = 2;
|
|
264
|
+
}
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
default:
|
|
268
|
+
matchResult = 2;
|
|
269
|
+
}
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
default:
|
|
273
|
+
matchResult = 2;
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
matchResult = 2;
|
|
277
|
+
}
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
default:
|
|
281
|
+
matchResult = 2;
|
|
282
|
+
}
|
|
283
|
+
switch (matchResult) {
|
|
284
|
+
case 0:
|
|
285
|
+
return SchemaSaladString_Literal(v.Value);
|
|
286
|
+
case 1: {
|
|
287
|
+
const matchValue = c.Value;
|
|
288
|
+
switch (matchValue) {
|
|
289
|
+
case "$include":
|
|
290
|
+
return SchemaSaladString_Include(v_1.Value);
|
|
291
|
+
case "$import":
|
|
292
|
+
return SchemaSaladString_Import(v_1.Value);
|
|
293
|
+
default:
|
|
294
|
+
return SchemaSaladString_Literal(toText(printf("%s: %s"))(c.Value)(v_1.Value));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
default:
|
|
298
|
+
throw new Error(toText(interpolate("Unexpected YAMLElement format in decodeSchemaSaladString: %A%P()", [yEle])));
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
function Decode_decodeStringOrExpression(yEle) {
|
|
302
|
+
return SchemaSaladStringModule_toDirectiveString(Decode_decodeSchemaSaladString(yEle));
|
|
303
|
+
}
|
|
304
|
+
const Decode_outputBindingGlobDecoder = (value_1) => object((get$) => {
|
|
305
|
+
let objectArg;
|
|
306
|
+
return new OutputBinding((objectArg = get$.Optional, objectArg.Field("glob", string)));
|
|
307
|
+
}, value_1);
|
|
308
|
+
const Decode_outputBindingDecoder = (value) => object((get$) => {
|
|
309
|
+
const objectArg = get$.Optional;
|
|
310
|
+
return objectArg.Field("outputBinding", Decode_outputBindingGlobDecoder);
|
|
311
|
+
}, value);
|
|
312
|
+
function Decode_decodeStringArrayOrScalar(value) {
|
|
313
|
+
let matchResult, items;
|
|
314
|
+
switch (value.tag) {
|
|
315
|
+
case /* Object */
|
|
316
|
+
3: {
|
|
317
|
+
if (!isEmpty(value.fields[0])) {
|
|
318
|
+
if (head(value.fields[0]).tag === /* Sequence */
|
|
319
|
+
2) {
|
|
320
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
321
|
+
matchResult = 0;
|
|
322
|
+
items = head(value.fields[0]).fields[0];
|
|
323
|
+
} else {
|
|
324
|
+
matchResult = 1;
|
|
325
|
+
}
|
|
326
|
+
} else {
|
|
327
|
+
matchResult = 1;
|
|
328
|
+
}
|
|
329
|
+
} else {
|
|
330
|
+
matchResult = 1;
|
|
331
|
+
}
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
case /* Sequence */
|
|
335
|
+
2: {
|
|
336
|
+
matchResult = 0;
|
|
337
|
+
items = value.fields[0];
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
default:
|
|
341
|
+
matchResult = 1;
|
|
342
|
+
}
|
|
343
|
+
switch (matchResult) {
|
|
344
|
+
case 0: {
|
|
345
|
+
const collection = map(Decode_decodeStringOrExpression, items);
|
|
346
|
+
return Array.from(collection);
|
|
347
|
+
}
|
|
348
|
+
default:
|
|
349
|
+
return [Decode_decodeStringOrExpression(value)];
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
const Decode_outputSourceDecoder = (value_1) => object((get$) => {
|
|
353
|
+
const objectArg = get$.Optional;
|
|
354
|
+
return objectArg.Field("outputSource", Decode_decodeStringArrayOrScalar);
|
|
355
|
+
}, value_1);
|
|
356
|
+
const Decode_direntDecoder = (value_1) => object((get$) => {
|
|
357
|
+
let objectArg, objectArg_1, objectArg_2;
|
|
358
|
+
return CWLType_Dirent(new DirentInstance((objectArg = get$.Required, objectArg.Field("entry", Decode_decodeSchemaSaladString)), (objectArg_1 = get$.Optional, objectArg_1.Field("entryname", Decode_decodeSchemaSaladString)), (objectArg_2 = get$.Optional, objectArg_2.Field("writable", bool))));
|
|
359
|
+
}, value_1);
|
|
360
|
+
function Decode_initialWorkDirEntryDecoder(value$1) {
|
|
361
|
+
let fileInstance, directoryInstance;
|
|
362
|
+
switch (value$1.tag) {
|
|
363
|
+
case /* Object */
|
|
364
|
+
3: {
|
|
365
|
+
const mappings = value$1.fields[0];
|
|
366
|
+
if (exists((_arg) => {
|
|
367
|
+
let matchResult, k_1;
|
|
368
|
+
if (_arg.tag === /* Mapping */
|
|
369
|
+
0) {
|
|
370
|
+
if (_arg.fields[0].Value === "entry") {
|
|
371
|
+
matchResult = 0;
|
|
372
|
+
k_1 = _arg.fields[0];
|
|
373
|
+
} else {
|
|
374
|
+
matchResult = 1;
|
|
375
|
+
}
|
|
376
|
+
} else {
|
|
377
|
+
matchResult = 1;
|
|
378
|
+
}
|
|
379
|
+
switch (matchResult) {
|
|
380
|
+
case 0:
|
|
381
|
+
return true;
|
|
382
|
+
default:
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
}, mappings)) {
|
|
386
|
+
const matchValue = Decode_direntDecoder(value$1);
|
|
387
|
+
if (matchValue.tag === /* Dirent */
|
|
388
|
+
2) {
|
|
389
|
+
return InitialWorkDirEntry_DirentEntry(matchValue.fields[0]);
|
|
390
|
+
} else {
|
|
391
|
+
throw new Error("Unexpected InitialWorkDir Dirent decoding result.");
|
|
392
|
+
}
|
|
393
|
+
} else {
|
|
394
|
+
const classValue = tryPick((_arg_1) => {
|
|
395
|
+
let v, v_1;
|
|
396
|
+
let matchResult_1, k_4, v_2, k_5, v_3;
|
|
397
|
+
if (_arg_1.tag === /* Mapping */
|
|
398
|
+
0) {
|
|
399
|
+
switch (_arg_1.fields[1].tag) {
|
|
400
|
+
case /* Object */
|
|
401
|
+
3: {
|
|
402
|
+
if (!isEmpty(_arg_1.fields[1].fields[0])) {
|
|
403
|
+
if (head(_arg_1.fields[1].fields[0]).tag === /* Value */
|
|
404
|
+
1) {
|
|
405
|
+
if (isEmpty(tail(_arg_1.fields[1].fields[0]))) {
|
|
406
|
+
if (v = head(_arg_1.fields[1].fields[0]).fields[0], _arg_1.fields[0].Value === "class") {
|
|
407
|
+
matchResult_1 = 0;
|
|
408
|
+
k_4 = _arg_1.fields[0];
|
|
409
|
+
v_2 = head(_arg_1.fields[1].fields[0]).fields[0];
|
|
410
|
+
} else {
|
|
411
|
+
matchResult_1 = 2;
|
|
412
|
+
}
|
|
413
|
+
} else {
|
|
414
|
+
matchResult_1 = 2;
|
|
415
|
+
}
|
|
416
|
+
} else {
|
|
417
|
+
matchResult_1 = 2;
|
|
418
|
+
}
|
|
419
|
+
} else {
|
|
420
|
+
matchResult_1 = 2;
|
|
421
|
+
}
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
case /* Value */
|
|
425
|
+
1: {
|
|
426
|
+
if (v_1 = _arg_1.fields[1].fields[0], _arg_1.fields[0].Value === "class") {
|
|
427
|
+
matchResult_1 = 1;
|
|
428
|
+
k_5 = _arg_1.fields[0];
|
|
429
|
+
v_3 = _arg_1.fields[1].fields[0];
|
|
430
|
+
} else {
|
|
431
|
+
matchResult_1 = 2;
|
|
432
|
+
}
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
default:
|
|
436
|
+
matchResult_1 = 2;
|
|
437
|
+
}
|
|
438
|
+
} else {
|
|
439
|
+
matchResult_1 = 2;
|
|
440
|
+
}
|
|
441
|
+
switch (matchResult_1) {
|
|
442
|
+
case 0:
|
|
443
|
+
return v_2.Value;
|
|
444
|
+
case 1:
|
|
445
|
+
return v_3.Value;
|
|
446
|
+
default:
|
|
447
|
+
return void 0;
|
|
448
|
+
}
|
|
449
|
+
}, mappings);
|
|
450
|
+
let matchResult_2;
|
|
451
|
+
if (classValue != null) {
|
|
452
|
+
switch (value(classValue)) {
|
|
453
|
+
case "File": {
|
|
454
|
+
matchResult_2 = 0;
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
case "Directory": {
|
|
458
|
+
matchResult_2 = 1;
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
default:
|
|
462
|
+
matchResult_2 = 2;
|
|
463
|
+
}
|
|
464
|
+
} else {
|
|
465
|
+
matchResult_2 = 2;
|
|
466
|
+
}
|
|
467
|
+
switch (matchResult_2) {
|
|
468
|
+
case 0:
|
|
469
|
+
return InitialWorkDirEntry_FileEntry((fileInstance = FileInstance_$ctor(), void object((get$) => Decode_overflowDecoder(fileInstance, get$.Overflow.FieldList(empty())), value$1), fileInstance));
|
|
470
|
+
case 1:
|
|
471
|
+
return InitialWorkDirEntry_DirectoryEntry((directoryInstance = DirectoryInstance_$ctor(), void object((get$_1) => Decode_overflowDecoder(directoryInstance, get$_1.Overflow.FieldList(empty())), value$1), directoryInstance));
|
|
472
|
+
default:
|
|
473
|
+
return InitialWorkDirEntry_StringEntry(Decode_decodeSchemaSaladString(value$1));
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
case /* Value */
|
|
478
|
+
1:
|
|
479
|
+
return InitialWorkDirEntry_StringEntry(Decode_decodeSchemaSaladString(value$1));
|
|
480
|
+
default:
|
|
481
|
+
throw new Error(toText(interpolate("Invalid InitialWorkDir listing entry: %A%P()", [value$1])));
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function Decode_cwlSimpleTypeFromString(s) {
|
|
485
|
+
switch (s) {
|
|
486
|
+
case "File":
|
|
487
|
+
return CWLType_File(FileInstance_$ctor());
|
|
488
|
+
case "Directory":
|
|
489
|
+
return CWLType_Directory(DirectoryInstance_$ctor());
|
|
490
|
+
case "string":
|
|
491
|
+
return CWLType_String();
|
|
492
|
+
case "int":
|
|
493
|
+
return CWLType_Int();
|
|
494
|
+
case "long":
|
|
495
|
+
return CWLType_Long();
|
|
496
|
+
case "float":
|
|
497
|
+
return CWLType_Float();
|
|
498
|
+
case "double":
|
|
499
|
+
return CWLType_Double();
|
|
500
|
+
case "boolean":
|
|
501
|
+
return CWLType_Boolean();
|
|
502
|
+
case "stdout":
|
|
503
|
+
return CWLType_Stdout();
|
|
504
|
+
case "null":
|
|
505
|
+
return CWLType_Null();
|
|
506
|
+
default:
|
|
507
|
+
throw new Error(`Invalid CWL simple type: ${s}`);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
function Decode_parseArrayShorthand(typeStr) {
|
|
511
|
+
if (typeStr.endsWith("[]")) {
|
|
512
|
+
const innerType = substring(typeStr, 0, typeStr.length - 2);
|
|
513
|
+
const matchValue = Decode_parseArrayShorthand(innerType);
|
|
514
|
+
if (matchValue == null) {
|
|
515
|
+
try {
|
|
516
|
+
return CWLType_Array(new InputArraySchema(Decode_cwlSimpleTypeFromString(innerType), void 0, void 0, void 0));
|
|
517
|
+
} catch (matchValue_1) {
|
|
518
|
+
if (Decode_isRecoverableDecodingError(matchValue_1)) {
|
|
519
|
+
return void 0;
|
|
520
|
+
} else {
|
|
521
|
+
throw matchValue_1;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
return CWLType_Array(new InputArraySchema(value(matchValue), void 0, void 0, void 0));
|
|
526
|
+
}
|
|
527
|
+
} else {
|
|
528
|
+
return void 0;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
function inputArraySchemaDecoder$0040261() {
|
|
532
|
+
return (value_3) => object((get$) => {
|
|
533
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3;
|
|
534
|
+
return new InputArraySchema(Decode_cwlTypeDecoder$0027((objectArg = get$.Required, objectArg.Field("items", (x) => x))), (objectArg_1 = get$.Optional, objectArg_1.Field("label", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("name", string)));
|
|
535
|
+
}, value_3);
|
|
536
|
+
}
|
|
537
|
+
const inputArraySchemaDecoder$0040261$002D1 = new Lazy(inputArraySchemaDecoder$0040261);
|
|
538
|
+
function inputRecordFieldDecoder$0040275() {
|
|
539
|
+
return (value_3) => object((get$) => {
|
|
540
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3;
|
|
541
|
+
return new InputRecordField((objectArg = get$.Required, objectArg.Field("name", string)), Decode_cwlTypeDecoder$0027((objectArg_1 = get$.Required, objectArg_1.Field("type", (x) => x))), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("label", string)));
|
|
542
|
+
}, value_3);
|
|
543
|
+
}
|
|
544
|
+
const inputRecordFieldDecoder$0040275$002D1 = new Lazy(inputRecordFieldDecoder$0040275);
|
|
545
|
+
function inputRecordSchemaDecoder$0040314() {
|
|
546
|
+
return (value_3) => object((get$) => {
|
|
547
|
+
let fieldsElement, objectArg, element, matchValue, objectArg_1, objectArg_2, objectArg_3;
|
|
548
|
+
return new InputRecordSchema((fieldsElement = (objectArg = get$.Optional, objectArg.Field("fields", (x) => x)), fieldsElement == null ? void 0 : value(fieldsElement).tag === /* Object */
|
|
549
|
+
3 ? isEmpty(value(fieldsElement).fields[0]) ? [] : (element = value(fieldsElement), matchValue = Decode_tryDecodeFieldsAsArray(element), matchValue == null ? Decode_tryDecodeFieldsAsMap(element) : value(matchValue)) : (element = value(fieldsElement), matchValue = Decode_tryDecodeFieldsAsArray(element), matchValue == null ? Decode_tryDecodeFieldsAsMap(element) : value(matchValue))), (objectArg_1 = get$.Optional, objectArg_1.Field("label", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("name", string)));
|
|
550
|
+
}, value_3);
|
|
551
|
+
}
|
|
552
|
+
const inputRecordSchemaDecoder$0040314$002D1 = new Lazy(inputRecordSchemaDecoder$0040314);
|
|
553
|
+
function inputEnumSchemaDecoder$0040341() {
|
|
554
|
+
return (value_5) => object((get$) => {
|
|
555
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3;
|
|
556
|
+
return new InputEnumSchema((objectArg = get$.Required, objectArg.Field("symbols", (value) => resizearray(string, value))), (objectArg_1 = get$.Optional, objectArg_1.Field("label", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("doc", string)), (objectArg_3 = get$.Optional, objectArg_3.Field("name", string)));
|
|
557
|
+
}, value_5);
|
|
558
|
+
}
|
|
559
|
+
const inputEnumSchemaDecoder$0040341$002D1 = new Lazy(inputEnumSchemaDecoder$0040341);
|
|
560
|
+
const Decode_inputArraySchemaDecoder = inputArraySchemaDecoder$0040261$002D1.Value;
|
|
561
|
+
const Decode_inputRecordFieldDecoder = inputRecordFieldDecoder$0040275$002D1.Value;
|
|
562
|
+
function Decode_tryDecodeFieldsAsArray(element) {
|
|
563
|
+
try {
|
|
564
|
+
return resizearray(inputRecordFieldDecoder$0040275$002D1.Value, element);
|
|
565
|
+
} catch (matchValue) {
|
|
566
|
+
if (Decode_isRecoverableDecodingError(matchValue)) {
|
|
567
|
+
return void 0;
|
|
568
|
+
} else {
|
|
569
|
+
throw matchValue;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
function Decode_tryDecodeFieldsAsMap(element) {
|
|
574
|
+
try {
|
|
575
|
+
const fields = [];
|
|
576
|
+
let enumerator = getEnumerator(object((get2) => get2.Overflow.FieldList(empty()), element));
|
|
577
|
+
try {
|
|
578
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
579
|
+
const kvp = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
580
|
+
const fieldType = Decode_cwlTypeDecoder$0027(kvp[1]);
|
|
581
|
+
void fields.push(new InputRecordField(kvp[0], fieldType, void 0, void 0));
|
|
582
|
+
}
|
|
583
|
+
} finally {
|
|
584
|
+
disposeSafe(enumerator);
|
|
585
|
+
}
|
|
586
|
+
return fields;
|
|
587
|
+
} catch (matchValue) {
|
|
588
|
+
if (Decode_isRecoverableDecodingError(matchValue)) {
|
|
589
|
+
return void 0;
|
|
590
|
+
} else {
|
|
591
|
+
throw matchValue;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
const Decode_inputRecordSchemaDecoder = inputRecordSchemaDecoder$0040314$002D1.Value;
|
|
596
|
+
const Decode_inputEnumSchemaDecoder = inputEnumSchemaDecoder$0040341$002D1.Value;
|
|
597
|
+
function Decode_cwlTypeDecoder$0027(element) {
|
|
598
|
+
let collection;
|
|
599
|
+
const parseTypeString = (typeStr) => {
|
|
600
|
+
const patternInput = typeStr.endsWith("?") ? [replace(typeStr, "?", ""), true] : [typeStr, false];
|
|
601
|
+
const stripped = patternInput[0];
|
|
602
|
+
let baseType;
|
|
603
|
+
const matchValue = Decode_parseArrayShorthand(stripped);
|
|
604
|
+
baseType = matchValue == null ? Decode_cwlSimpleTypeFromString(stripped) : value(matchValue);
|
|
605
|
+
if (patternInput[1]) {
|
|
606
|
+
return CWLType_Union([CWLType_Null(), baseType]);
|
|
607
|
+
} else {
|
|
608
|
+
return baseType;
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
let matchResult, v, items;
|
|
612
|
+
switch (element.tag) {
|
|
613
|
+
case /* Value */
|
|
614
|
+
1: {
|
|
615
|
+
matchResult = 0;
|
|
616
|
+
v = element.fields[0];
|
|
617
|
+
break;
|
|
618
|
+
}
|
|
619
|
+
case /* Object */
|
|
620
|
+
3: {
|
|
621
|
+
if (!isEmpty(element.fields[0])) {
|
|
622
|
+
if (head(element.fields[0]).tag === /* Value */
|
|
623
|
+
1) {
|
|
624
|
+
if (isEmpty(tail(element.fields[0]))) {
|
|
625
|
+
matchResult = 0;
|
|
626
|
+
v = head(element.fields[0]).fields[0];
|
|
627
|
+
} else {
|
|
628
|
+
matchResult = 2;
|
|
629
|
+
}
|
|
630
|
+
} else {
|
|
631
|
+
matchResult = 2;
|
|
632
|
+
}
|
|
633
|
+
} else {
|
|
634
|
+
matchResult = 2;
|
|
635
|
+
}
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
case /* Sequence */
|
|
639
|
+
2: {
|
|
640
|
+
matchResult = 1;
|
|
641
|
+
items = element.fields[0];
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
default:
|
|
645
|
+
matchResult = 3;
|
|
646
|
+
}
|
|
647
|
+
switch (matchResult) {
|
|
648
|
+
case 0:
|
|
649
|
+
return parseTypeString(v.Value);
|
|
650
|
+
case 1:
|
|
651
|
+
return CWLType_Union((collection = map(Decode_cwlTypeDecoder$0027, items), Array.from(collection)));
|
|
652
|
+
case 2:
|
|
653
|
+
return object((get$) => {
|
|
654
|
+
let objectArg_1;
|
|
655
|
+
let typeField;
|
|
656
|
+
const objectArg = get$.Optional;
|
|
657
|
+
typeField = objectArg.Field("type", (x) => x);
|
|
658
|
+
let matchResult_1, v_1;
|
|
659
|
+
if (typeField != null) {
|
|
660
|
+
if (value(typeField).tag === /* Object */
|
|
661
|
+
3) {
|
|
662
|
+
if (!isEmpty(value(typeField).fields[0])) {
|
|
663
|
+
if (head(value(typeField).fields[0]).tag === /* Value */
|
|
664
|
+
1) {
|
|
665
|
+
if (isEmpty(tail(value(typeField).fields[0]))) {
|
|
666
|
+
matchResult_1 = 0;
|
|
667
|
+
v_1 = head(value(typeField).fields[0]).fields[0];
|
|
668
|
+
} else {
|
|
669
|
+
matchResult_1 = 1;
|
|
670
|
+
}
|
|
671
|
+
} else {
|
|
672
|
+
matchResult_1 = 1;
|
|
673
|
+
}
|
|
674
|
+
} else {
|
|
675
|
+
matchResult_1 = 1;
|
|
676
|
+
}
|
|
677
|
+
} else {
|
|
678
|
+
matchResult_1 = 2;
|
|
679
|
+
}
|
|
680
|
+
} else {
|
|
681
|
+
matchResult_1 = 2;
|
|
682
|
+
}
|
|
683
|
+
switch (matchResult_1) {
|
|
684
|
+
case 0: {
|
|
685
|
+
const matchValue_1 = v_1.Value;
|
|
686
|
+
return matchValue_1 === "record" ? CWLType_Record(inputRecordSchemaDecoder$0040314$002D1.Value(element)) : matchValue_1 === "enum" ? CWLType_Enum(inputEnumSchemaDecoder$0040341$002D1.Value(element)) : matchValue_1 === "array" ? CWLType_Array(inputArraySchemaDecoder$0040261$002D1.Value(element)) : parseTypeString(matchValue_1);
|
|
687
|
+
}
|
|
688
|
+
case 1:
|
|
689
|
+
return Decode_cwlTypeDecoder$0027((objectArg_1 = get$.Required, objectArg_1.Field("type", (x_1) => x_1)));
|
|
690
|
+
default:
|
|
691
|
+
throw new Error("Unexpected type format in cwlTypeDecoder'");
|
|
692
|
+
}
|
|
693
|
+
}, element);
|
|
694
|
+
default:
|
|
695
|
+
throw new Error("Unexpected YAMLElement in cwlTypeDecoder'");
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
function Decode_cwlTypeStringMatcher(t, get$) {
|
|
699
|
+
const patternInput = t.endsWith("?") ? [true, replace(t, "?", "")] : [false, t];
|
|
700
|
+
const optional = patternInput[0];
|
|
701
|
+
const newT = patternInput[1];
|
|
702
|
+
let cwlType;
|
|
703
|
+
const matchValue = Decode_parseArrayShorthand(newT);
|
|
704
|
+
if (matchValue == null) {
|
|
705
|
+
switch (newT) {
|
|
706
|
+
case "File": {
|
|
707
|
+
cwlType = CWLType_File(FileInstance_$ctor());
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
case "Directory": {
|
|
711
|
+
cwlType = CWLType_Directory(DirectoryInstance_$ctor());
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
case "Dirent": {
|
|
715
|
+
const objectArg = get$.Required;
|
|
716
|
+
cwlType = objectArg.Field("listing", Decode_direntDecoder);
|
|
717
|
+
break;
|
|
718
|
+
}
|
|
719
|
+
case "string": {
|
|
720
|
+
cwlType = CWLType_String();
|
|
721
|
+
break;
|
|
722
|
+
}
|
|
723
|
+
case "int": {
|
|
724
|
+
cwlType = CWLType_Int();
|
|
725
|
+
break;
|
|
726
|
+
}
|
|
727
|
+
case "long": {
|
|
728
|
+
cwlType = CWLType_Long();
|
|
729
|
+
break;
|
|
730
|
+
}
|
|
731
|
+
case "float": {
|
|
732
|
+
cwlType = CWLType_Float();
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
case "double": {
|
|
736
|
+
cwlType = CWLType_Double();
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
739
|
+
case "boolean": {
|
|
740
|
+
cwlType = CWLType_Boolean();
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
case "stdout": {
|
|
744
|
+
cwlType = CWLType_Stdout();
|
|
745
|
+
break;
|
|
746
|
+
}
|
|
747
|
+
case "null": {
|
|
748
|
+
cwlType = CWLType_Null();
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
default:
|
|
752
|
+
throw new Error("Invalid CWL type");
|
|
753
|
+
}
|
|
754
|
+
} else {
|
|
755
|
+
cwlType = value(matchValue);
|
|
756
|
+
}
|
|
757
|
+
return [optional ? CWLType_Union([CWLType_Null(), cwlType]) : cwlType, optional];
|
|
758
|
+
}
|
|
759
|
+
const Decode_cwlTypeDecoder = (value_1) => object((get$) => {
|
|
760
|
+
let objectArg_1;
|
|
761
|
+
let cwlType;
|
|
762
|
+
const objectArg = get$.Required;
|
|
763
|
+
cwlType = objectArg.Field("type", (value) => {
|
|
764
|
+
let matchResult, v, o;
|
|
765
|
+
switch (value.tag) {
|
|
766
|
+
case /* Value */
|
|
767
|
+
1: {
|
|
768
|
+
matchResult = 0;
|
|
769
|
+
v = value.fields[0];
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
case /* Object */
|
|
773
|
+
3: {
|
|
774
|
+
if (!isEmpty(value.fields[0])) {
|
|
775
|
+
if (head(value.fields[0]).tag === /* Value */
|
|
776
|
+
1) {
|
|
777
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
778
|
+
matchResult = 0;
|
|
779
|
+
v = head(value.fields[0]).fields[0];
|
|
780
|
+
} else {
|
|
781
|
+
matchResult = 1;
|
|
782
|
+
o = value.fields[0];
|
|
783
|
+
}
|
|
784
|
+
} else {
|
|
785
|
+
matchResult = 1;
|
|
786
|
+
o = value.fields[0];
|
|
787
|
+
}
|
|
788
|
+
} else {
|
|
789
|
+
matchResult = 1;
|
|
790
|
+
o = value.fields[0];
|
|
791
|
+
}
|
|
792
|
+
break;
|
|
793
|
+
}
|
|
794
|
+
default:
|
|
795
|
+
matchResult = 2;
|
|
796
|
+
}
|
|
797
|
+
switch (matchResult) {
|
|
798
|
+
case 0:
|
|
799
|
+
return v.Value;
|
|
800
|
+
case 1:
|
|
801
|
+
return void 0;
|
|
802
|
+
default:
|
|
803
|
+
throw new Error("Unexpected YAMLElement in cwlTypeDecoder");
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
if (cwlType == null) {
|
|
807
|
+
return [(objectArg_1 = get$.Required, objectArg_1.Field("type", Decode_cwlTypeDecoder$0027)), false];
|
|
808
|
+
} else {
|
|
809
|
+
return Decode_cwlTypeStringMatcher(value(cwlType), get$);
|
|
810
|
+
}
|
|
811
|
+
}, value_1);
|
|
812
|
+
const Decode_outputArrayDecoder = (value_1) => object((get$) => {
|
|
813
|
+
const dict = get$.Overflow.FieldList(empty());
|
|
814
|
+
const collection = toArray(delay(() => collect((key) => {
|
|
815
|
+
let v;
|
|
816
|
+
const value$1 = getItemFromDict(dict, key);
|
|
817
|
+
const outputBinding = Decode_outputBindingDecoder(value$1);
|
|
818
|
+
const outputSourceValues = Decode_outputSourceDecoder(value$1);
|
|
819
|
+
const output = new CWLOutput(key, value$1.tag === /* Object */
|
|
820
|
+
3 ? !isEmpty(value$1.fields[0]) ? head(value$1.fields[0]).tag === /* Value */
|
|
821
|
+
1 ? isEmpty(tail(value$1.fields[0])) ? (v = head(value$1.fields[0]).fields[0], Decode_cwlTypeStringMatcher(v.Value, get$)[0]) : Decode_cwlTypeDecoder(value$1)[0] : Decode_cwlTypeDecoder(value$1)[0] : Decode_cwlTypeDecoder(value$1)[0] : Decode_cwlTypeDecoder(value$1)[0]);
|
|
822
|
+
return append(outputBinding != null ? (setOptionalProperty("outputBinding", outputBinding, output), empty$1()) : empty$1(), delay(() => {
|
|
823
|
+
let matchValue, values, values_2, values_1, values_3;
|
|
824
|
+
return append((matchValue = outputSourceValues, matchValue != null ? (values = value(matchValue), values.length > 1) ? (values_2 = value(matchValue), output.OutputSource = OutputSource_Multiple(values_2), empty$1()) : (values_1 = value(matchValue), values_1.length === 1) ? (values_3 = value(matchValue), output.OutputSource = OutputSource_Single(values_3[0]), empty$1()) : empty$1() : empty$1()), delay(() => singleton(output)));
|
|
825
|
+
}));
|
|
826
|
+
}, dict.keys())));
|
|
827
|
+
return Array.from(collection);
|
|
828
|
+
}, value_1);
|
|
829
|
+
const Decode_outputsDecoder = (value) => object((get$) => {
|
|
830
|
+
const objectArg = get$.Required;
|
|
831
|
+
return objectArg.Field("outputs", Decode_outputArrayDecoder);
|
|
832
|
+
}, value);
|
|
833
|
+
function Decode_dockerRequirementDecoder(get$) {
|
|
834
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5;
|
|
835
|
+
const dockerFile = map$1(Decode_decodeSchemaSaladString, (objectArg = get$.Optional, objectArg.Field("dockerFile", (x) => x)));
|
|
836
|
+
return DockerRequirement_create_Z14898805(unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("dockerPull", string))), void 0, unwrap(dockerFile), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("dockerImageId", string))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("dockerLoad", string))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("dockerImport", string))), unwrap((objectArg_5 = get$.Optional, objectArg_5.Field("dockerOutputDirectory", string))));
|
|
837
|
+
}
|
|
838
|
+
function Decode_envVarRequirementDecoder(get$) {
|
|
839
|
+
let envDefElement;
|
|
840
|
+
let _arg;
|
|
841
|
+
const objectArg = get$.Required;
|
|
842
|
+
_arg = objectArg.Field("envDef", (x) => x);
|
|
843
|
+
let matchResult, sequence, mappings, other;
|
|
844
|
+
if (_arg.tag === /* Object */
|
|
845
|
+
3) {
|
|
846
|
+
if (!isEmpty(_arg.fields[0])) {
|
|
847
|
+
switch (head(_arg.fields[0]).tag) {
|
|
848
|
+
case /* Sequence */
|
|
849
|
+
2: {
|
|
850
|
+
if (isEmpty(tail(_arg.fields[0]))) {
|
|
851
|
+
matchResult = 0;
|
|
852
|
+
sequence = head(_arg.fields[0]).fields[0];
|
|
853
|
+
} else {
|
|
854
|
+
matchResult = 2;
|
|
855
|
+
other = _arg;
|
|
856
|
+
}
|
|
857
|
+
break;
|
|
858
|
+
}
|
|
859
|
+
case /* Object */
|
|
860
|
+
3: {
|
|
861
|
+
if (isEmpty(tail(_arg.fields[0]))) {
|
|
862
|
+
matchResult = 1;
|
|
863
|
+
mappings = head(_arg.fields[0]).fields[0];
|
|
864
|
+
} else {
|
|
865
|
+
matchResult = 2;
|
|
866
|
+
other = _arg;
|
|
867
|
+
}
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
default: {
|
|
871
|
+
matchResult = 2;
|
|
872
|
+
other = _arg;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
} else {
|
|
876
|
+
matchResult = 2;
|
|
877
|
+
other = _arg;
|
|
878
|
+
}
|
|
879
|
+
} else {
|
|
880
|
+
matchResult = 2;
|
|
881
|
+
other = _arg;
|
|
882
|
+
}
|
|
883
|
+
switch (matchResult) {
|
|
884
|
+
case 0: {
|
|
885
|
+
envDefElement = YAMLElement_Sequence(sequence);
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
case 1: {
|
|
889
|
+
envDefElement = YAMLElement_Object(mappings);
|
|
890
|
+
break;
|
|
891
|
+
}
|
|
892
|
+
default:
|
|
893
|
+
envDefElement = other;
|
|
894
|
+
}
|
|
895
|
+
switch (envDefElement.tag) {
|
|
896
|
+
case /* Sequence */
|
|
897
|
+
2:
|
|
898
|
+
return resizearray((value_3) => object((get2) => {
|
|
899
|
+
let objectArg_1, objectArg_2;
|
|
900
|
+
return new EnvironmentDef((objectArg_1 = get2.Required, objectArg_1.Field("envName", string)), (objectArg_2 = get2.Required, objectArg_2.Field("envValue", string)));
|
|
901
|
+
}, value_3), envDefElement);
|
|
902
|
+
case /* Object */
|
|
903
|
+
3: {
|
|
904
|
+
const collection = choose((_arg_2) => {
|
|
905
|
+
let _arg_1, value;
|
|
906
|
+
if (_arg_2.tag === /* Mapping */
|
|
907
|
+
0) {
|
|
908
|
+
return new EnvironmentDef(_arg_2.fields[0].Value, (_arg_1 = _arg_2.fields[1], _arg_1.tag === /* Value */
|
|
909
|
+
1 ? (value = _arg_1.fields[0], trim(value.Value, '"')) : _arg_1.tag === /* Object */
|
|
910
|
+
3 ? !isEmpty(_arg_1.fields[0]) ? head(_arg_1.fields[0]).tag === /* Value */
|
|
911
|
+
1 ? isEmpty(tail(_arg_1.fields[0])) ? (value = head(_arg_1.fields[0]).fields[0], trim(value.Value, '"')) : Decode_decodeStringOrExpression(_arg_1) : Decode_decodeStringOrExpression(_arg_1) : Decode_decodeStringOrExpression(_arg_1) : Decode_decodeStringOrExpression(_arg_1)));
|
|
912
|
+
} else {
|
|
913
|
+
return void 0;
|
|
914
|
+
}
|
|
915
|
+
}, envDefElement.fields[0]);
|
|
916
|
+
return Array.from(collection);
|
|
917
|
+
}
|
|
918
|
+
default:
|
|
919
|
+
throw new Error("Invalid envDef format. Expected array or map.");
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
function Decode_softwareRequirementDecoder(get$) {
|
|
923
|
+
let objectArg;
|
|
924
|
+
const normalizeCollectionElement = (_arg) => {
|
|
925
|
+
let matchResult, sequence, mappings, other;
|
|
926
|
+
if (_arg.tag === /* Object */
|
|
927
|
+
3) {
|
|
928
|
+
if (!isEmpty(_arg.fields[0])) {
|
|
929
|
+
switch (head(_arg.fields[0]).tag) {
|
|
930
|
+
case /* Sequence */
|
|
931
|
+
2: {
|
|
932
|
+
if (isEmpty(tail(_arg.fields[0]))) {
|
|
933
|
+
matchResult = 0;
|
|
934
|
+
sequence = head(_arg.fields[0]).fields[0];
|
|
935
|
+
} else {
|
|
936
|
+
matchResult = 2;
|
|
937
|
+
other = _arg;
|
|
938
|
+
}
|
|
939
|
+
break;
|
|
940
|
+
}
|
|
941
|
+
case /* Object */
|
|
942
|
+
3: {
|
|
943
|
+
if (isEmpty(tail(_arg.fields[0]))) {
|
|
944
|
+
matchResult = 1;
|
|
945
|
+
mappings = head(_arg.fields[0]).fields[0];
|
|
946
|
+
} else {
|
|
947
|
+
matchResult = 2;
|
|
948
|
+
other = _arg;
|
|
949
|
+
}
|
|
950
|
+
break;
|
|
951
|
+
}
|
|
952
|
+
default: {
|
|
953
|
+
matchResult = 2;
|
|
954
|
+
other = _arg;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
} else {
|
|
958
|
+
matchResult = 2;
|
|
959
|
+
other = _arg;
|
|
960
|
+
}
|
|
961
|
+
} else {
|
|
962
|
+
matchResult = 2;
|
|
963
|
+
other = _arg;
|
|
964
|
+
}
|
|
965
|
+
switch (matchResult) {
|
|
966
|
+
case 0:
|
|
967
|
+
return YAMLElement_Sequence(sequence);
|
|
968
|
+
case 1:
|
|
969
|
+
return YAMLElement_Object(mappings);
|
|
970
|
+
default:
|
|
971
|
+
return other;
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
const packagesElement = normalizeCollectionElement((objectArg = get$.Required, objectArg.Field("packages", (x) => x)));
|
|
975
|
+
const decodeSpecsArray = (element) => resizearray(Decode_decodeStringOrExpression, normalizeCollectionElement(element));
|
|
976
|
+
switch (packagesElement.tag) {
|
|
977
|
+
case /* Sequence */
|
|
978
|
+
2:
|
|
979
|
+
return resizearray((value_5) => object((get2) => {
|
|
980
|
+
let objectArg_1, objectArg_2, objectArg_3;
|
|
981
|
+
return new SoftwarePackage((objectArg_1 = get2.Required, objectArg_1.Field("package", string)), (objectArg_2 = get2.Optional, objectArg_2.Field("version", (value_1) => resizearray(string, value_1))), (objectArg_3 = get2.Optional, objectArg_3.Field("specs", (value_3) => resizearray(string, value_3))));
|
|
982
|
+
}, value_5), packagesElement);
|
|
983
|
+
case /* Object */
|
|
984
|
+
3: {
|
|
985
|
+
const collection = choose((_arg_3) => {
|
|
986
|
+
let packageName, packageValue, normalizedPackageValue, mappings_1;
|
|
987
|
+
if (_arg_3.tag === /* Mapping */
|
|
988
|
+
0) {
|
|
989
|
+
return packageName = _arg_3.fields[0].Value, packageValue = _arg_3.fields[1], normalizedPackageValue = normalizeCollectionElement(packageValue), normalizedPackageValue.tag === /* Object */
|
|
990
|
+
3 ? isEmpty(normalizedPackageValue.fields[0]) ? new SoftwarePackage(packageName, void 0, void 0) : (mappings_1 = normalizedPackageValue.fields[0], new SoftwarePackage(packageName, tryPick((_arg_1) => {
|
|
991
|
+
let v;
|
|
992
|
+
let matchResult_1, k_1, v_1;
|
|
993
|
+
if (_arg_1.tag === /* Mapping */
|
|
994
|
+
0) {
|
|
995
|
+
if (v = _arg_1.fields[1], _arg_1.fields[0].Value === "version") {
|
|
996
|
+
matchResult_1 = 0;
|
|
997
|
+
k_1 = _arg_1.fields[0];
|
|
998
|
+
v_1 = _arg_1.fields[1];
|
|
999
|
+
} else {
|
|
1000
|
+
matchResult_1 = 1;
|
|
1001
|
+
}
|
|
1002
|
+
} else {
|
|
1003
|
+
matchResult_1 = 1;
|
|
1004
|
+
}
|
|
1005
|
+
switch (matchResult_1) {
|
|
1006
|
+
case 0:
|
|
1007
|
+
return decodeSpecsArray(v_1);
|
|
1008
|
+
default:
|
|
1009
|
+
return void 0;
|
|
1010
|
+
}
|
|
1011
|
+
}, mappings_1), tryPick((_arg_2) => {
|
|
1012
|
+
let v_2;
|
|
1013
|
+
let matchResult_2, k_3, v_3;
|
|
1014
|
+
if (_arg_2.tag === /* Mapping */
|
|
1015
|
+
0) {
|
|
1016
|
+
if (v_2 = _arg_2.fields[1], _arg_2.fields[0].Value === "specs") {
|
|
1017
|
+
matchResult_2 = 0;
|
|
1018
|
+
k_3 = _arg_2.fields[0];
|
|
1019
|
+
v_3 = _arg_2.fields[1];
|
|
1020
|
+
} else {
|
|
1021
|
+
matchResult_2 = 1;
|
|
1022
|
+
}
|
|
1023
|
+
} else {
|
|
1024
|
+
matchResult_2 = 1;
|
|
1025
|
+
}
|
|
1026
|
+
switch (matchResult_2) {
|
|
1027
|
+
case 0:
|
|
1028
|
+
return decodeSpecsArray(v_3);
|
|
1029
|
+
default:
|
|
1030
|
+
return void 0;
|
|
1031
|
+
}
|
|
1032
|
+
}, mappings_1))) : normalizedPackageValue.tag === /* Sequence */
|
|
1033
|
+
2 ? new SoftwarePackage(packageName, void 0, decodeSpecsArray(normalizedPackageValue)) : new SoftwarePackage(packageName, void 0, [Decode_decodeStringOrExpression(packageValue)]);
|
|
1034
|
+
} else {
|
|
1035
|
+
return void 0;
|
|
1036
|
+
}
|
|
1037
|
+
}, packagesElement.fields[0]);
|
|
1038
|
+
return Array.from(collection);
|
|
1039
|
+
}
|
|
1040
|
+
default:
|
|
1041
|
+
throw new Error("Invalid packages format. Expected array or map.");
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
function Decode_initialWorkDirRequirementDecoder(get$) {
|
|
1045
|
+
let listingElement;
|
|
1046
|
+
const objectArg = get$.Required;
|
|
1047
|
+
listingElement = objectArg.Field("listing", (x) => x);
|
|
1048
|
+
let matchResult;
|
|
1049
|
+
switch (listingElement.tag) {
|
|
1050
|
+
case /* Object */
|
|
1051
|
+
3: {
|
|
1052
|
+
if (!isEmpty(listingElement.fields[0])) {
|
|
1053
|
+
if (head(listingElement.fields[0]).tag === /* Sequence */
|
|
1054
|
+
2) {
|
|
1055
|
+
if (isEmpty(tail(listingElement.fields[0]))) {
|
|
1056
|
+
matchResult = 0;
|
|
1057
|
+
} else {
|
|
1058
|
+
matchResult = 1;
|
|
1059
|
+
}
|
|
1060
|
+
} else {
|
|
1061
|
+
matchResult = 1;
|
|
1062
|
+
}
|
|
1063
|
+
} else {
|
|
1064
|
+
matchResult = 1;
|
|
1065
|
+
}
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
case /* Sequence */
|
|
1069
|
+
2: {
|
|
1070
|
+
matchResult = 0;
|
|
1071
|
+
break;
|
|
1072
|
+
}
|
|
1073
|
+
default:
|
|
1074
|
+
matchResult = 1;
|
|
1075
|
+
}
|
|
1076
|
+
switch (matchResult) {
|
|
1077
|
+
case 0:
|
|
1078
|
+
return resizearray(Decode_initialWorkDirEntryDecoder, listingElement);
|
|
1079
|
+
default:
|
|
1080
|
+
return [Decode_initialWorkDirEntryDecoder(listingElement)];
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
function Decode_loadListingRequirementDecoder(get$) {
|
|
1084
|
+
let objectArg, matchValue;
|
|
1085
|
+
const loadListingValue = defaultArg((objectArg = get$.Optional, objectArg.Field("loadListing", string)), "no_listing");
|
|
1086
|
+
return new LoadListingRequirementValue((matchValue = LoadListingEnum_tryParse_Z721C83C5(loadListingValue), matchValue == null ? (() => {
|
|
1087
|
+
throw new Error(`Invalid loadListing value '${loadListingValue}'. Expected one of: no_listing, shallow_listing, deep_listing.`);
|
|
1088
|
+
})() : value(matchValue)));
|
|
1089
|
+
}
|
|
1090
|
+
function Decode_decodeResourceScalar(element) {
|
|
1091
|
+
let matchValue;
|
|
1092
|
+
const _arg = element;
|
|
1093
|
+
let matchResult, value$1;
|
|
1094
|
+
switch (_arg.tag) {
|
|
1095
|
+
case /* Value */
|
|
1096
|
+
1: {
|
|
1097
|
+
matchResult = 0;
|
|
1098
|
+
value$1 = _arg.fields[0];
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
case /* Object */
|
|
1102
|
+
3: {
|
|
1103
|
+
if (!isEmpty(_arg.fields[0])) {
|
|
1104
|
+
if (head(_arg.fields[0]).tag === /* Value */
|
|
1105
|
+
1) {
|
|
1106
|
+
if (isEmpty(tail(_arg.fields[0]))) {
|
|
1107
|
+
matchResult = 0;
|
|
1108
|
+
value$1 = head(_arg.fields[0]).fields[0];
|
|
1109
|
+
} else {
|
|
1110
|
+
matchResult = 1;
|
|
1111
|
+
}
|
|
1112
|
+
} else {
|
|
1113
|
+
matchResult = 1;
|
|
1114
|
+
}
|
|
1115
|
+
} else {
|
|
1116
|
+
matchResult = 1;
|
|
1117
|
+
}
|
|
1118
|
+
break;
|
|
1119
|
+
}
|
|
1120
|
+
default:
|
|
1121
|
+
matchResult = 1;
|
|
1122
|
+
}
|
|
1123
|
+
switch (matchResult) {
|
|
1124
|
+
case 0: {
|
|
1125
|
+
matchValue = value$1.Value;
|
|
1126
|
+
break;
|
|
1127
|
+
}
|
|
1128
|
+
default:
|
|
1129
|
+
matchValue = void 0;
|
|
1130
|
+
}
|
|
1131
|
+
if (matchValue == null) {
|
|
1132
|
+
return Decode_decodeStringOrExpression(element);
|
|
1133
|
+
} else {
|
|
1134
|
+
const scalarValue = value(matchValue);
|
|
1135
|
+
let matchValue_1;
|
|
1136
|
+
let outArg = 0n;
|
|
1137
|
+
matchValue_1 = [tryParse(scalarValue, 7, false, 64, new FSharpRef(() => outArg, (v) => {
|
|
1138
|
+
outArg = v;
|
|
1139
|
+
})), outArg];
|
|
1140
|
+
if (matchValue_1[0]) {
|
|
1141
|
+
return matchValue_1[1];
|
|
1142
|
+
} else {
|
|
1143
|
+
let matchValue_2;
|
|
1144
|
+
let outArg_1 = 0;
|
|
1145
|
+
matchValue_2 = [tryParse$1(scalarValue, new FSharpRef(() => outArg_1, (v_1) => {
|
|
1146
|
+
outArg_1 = v_1;
|
|
1147
|
+
})), outArg_1];
|
|
1148
|
+
if (matchValue_2[0]) {
|
|
1149
|
+
return matchValue_2[1];
|
|
1150
|
+
} else {
|
|
1151
|
+
return Decode_decodeStringOrExpression(element);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
function Decode_optionalResourceField(get$, fieldName) {
|
|
1157
|
+
let objectArg;
|
|
1158
|
+
return map$1(Decode_decodeResourceScalar, (objectArg = get$.Optional, objectArg.Field(fieldName, (x) => x)));
|
|
1159
|
+
}
|
|
1160
|
+
function Decode_resourceRequirementDecoder(get$) {
|
|
1161
|
+
return ResourceRequirementInstance_$ctor_D76FC00(some(Decode_optionalResourceField(get$, "coresMin")), some(Decode_optionalResourceField(get$, "coresMax")), some(Decode_optionalResourceField(get$, "ramMin")), some(Decode_optionalResourceField(get$, "ramMax")), some(Decode_optionalResourceField(get$, "tmpdirMin")), some(Decode_optionalResourceField(get$, "tmpdirMax")), some(Decode_optionalResourceField(get$, "outdirMin")), some(Decode_optionalResourceField(get$, "outdirMax")));
|
|
1162
|
+
}
|
|
1163
|
+
function Decode_schemaDefRequirementTypeDecoder(value) {
|
|
1164
|
+
const dict = object((get$) => get$.Overflow.FieldList(empty()), value);
|
|
1165
|
+
if (dict.has("name")) {
|
|
1166
|
+
return new SchemaDefRequirementType(Decode_decodeStringOrExpression(getItemFromDict(dict, "name")), Decode_cwlTypeDecoder$0027(value));
|
|
1167
|
+
} else {
|
|
1168
|
+
if (dict.size === 0) {
|
|
1169
|
+
throw new Error("SchemaDefRequirement entry cannot be empty.");
|
|
1170
|
+
}
|
|
1171
|
+
const kv = head$1(dict);
|
|
1172
|
+
return new SchemaDefRequirementType(kv[0], Decode_cwlTypeDecoder$0027(kv[1]));
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
function Decode_schemaDefRequirementDecoder(get$) {
|
|
1176
|
+
const objectArg = get$.Required;
|
|
1177
|
+
return objectArg.Field("types", (value) => resizearray(Decode_schemaDefRequirementTypeDecoder, value));
|
|
1178
|
+
}
|
|
1179
|
+
function Decode_tryDecodeBoolScalar(element) {
|
|
1180
|
+
let matchResult, value;
|
|
1181
|
+
switch (element.tag) {
|
|
1182
|
+
case /* Value */
|
|
1183
|
+
1: {
|
|
1184
|
+
matchResult = 0;
|
|
1185
|
+
value = element.fields[0];
|
|
1186
|
+
break;
|
|
1187
|
+
}
|
|
1188
|
+
case /* Object */
|
|
1189
|
+
3: {
|
|
1190
|
+
if (!isEmpty(element.fields[0])) {
|
|
1191
|
+
if (head(element.fields[0]).tag === /* Value */
|
|
1192
|
+
1) {
|
|
1193
|
+
if (isEmpty(tail(element.fields[0]))) {
|
|
1194
|
+
matchResult = 0;
|
|
1195
|
+
value = head(element.fields[0]).fields[0];
|
|
1196
|
+
} else {
|
|
1197
|
+
matchResult = 1;
|
|
1198
|
+
}
|
|
1199
|
+
} else {
|
|
1200
|
+
matchResult = 1;
|
|
1201
|
+
}
|
|
1202
|
+
} else {
|
|
1203
|
+
matchResult = 1;
|
|
1204
|
+
}
|
|
1205
|
+
break;
|
|
1206
|
+
}
|
|
1207
|
+
default:
|
|
1208
|
+
matchResult = 1;
|
|
1209
|
+
}
|
|
1210
|
+
switch (matchResult) {
|
|
1211
|
+
case 0: {
|
|
1212
|
+
const matchValue = value.Value.trim().toLowerCase();
|
|
1213
|
+
switch (matchValue) {
|
|
1214
|
+
case "true":
|
|
1215
|
+
return true;
|
|
1216
|
+
case "false":
|
|
1217
|
+
return false;
|
|
1218
|
+
default:
|
|
1219
|
+
return void 0;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
default:
|
|
1223
|
+
return void 0;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
function Decode_workReuseRequirementDecoder(get$) {
|
|
1227
|
+
let matchValue;
|
|
1228
|
+
const objectArg = get$.Optional;
|
|
1229
|
+
matchValue = objectArg.Field("enableReuse", (x) => x);
|
|
1230
|
+
if (matchValue != null) {
|
|
1231
|
+
const value$1 = value(matchValue);
|
|
1232
|
+
const matchValue_1 = Decode_tryDecodeBoolScalar(value$1);
|
|
1233
|
+
if (matchValue_1 == null) {
|
|
1234
|
+
return Requirement_WorkReuseExpressionRequirement(Decode_decodeStringOrExpression(value$1));
|
|
1235
|
+
} else {
|
|
1236
|
+
return Requirement_WorkReuseRequirement(new WorkReuseRequirementValue(value(matchValue_1)));
|
|
1237
|
+
}
|
|
1238
|
+
} else {
|
|
1239
|
+
return Requirement_WorkReuseRequirement(new WorkReuseRequirementValue(true));
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
function Decode_networkAccessRequirementDecoder(get$) {
|
|
1243
|
+
let matchValue;
|
|
1244
|
+
const objectArg = get$.Optional;
|
|
1245
|
+
matchValue = objectArg.Field("networkAccess", (x) => x);
|
|
1246
|
+
if (matchValue != null) {
|
|
1247
|
+
const value$1 = value(matchValue);
|
|
1248
|
+
const matchValue_1 = Decode_tryDecodeBoolScalar(value$1);
|
|
1249
|
+
if (matchValue_1 == null) {
|
|
1250
|
+
return Requirement_NetworkAccessExpressionRequirement(Decode_decodeStringOrExpression(value$1));
|
|
1251
|
+
} else {
|
|
1252
|
+
return Requirement_NetworkAccessRequirement(new NetworkAccessRequirementValue(value(matchValue_1)));
|
|
1253
|
+
}
|
|
1254
|
+
} else {
|
|
1255
|
+
return Requirement_NetworkAccessRequirement(new NetworkAccessRequirementValue(true));
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
function Decode_inplaceUpdateRequirementDecoder(get$) {
|
|
1259
|
+
let objectArg;
|
|
1260
|
+
return new InplaceUpdateRequirementValue(defaultArg((objectArg = get$.Optional, objectArg.Field("inplaceUpdate", bool)), true));
|
|
1261
|
+
}
|
|
1262
|
+
function Decode_toolTimeLimitRequirementDecoder(get$) {
|
|
1263
|
+
let value$1;
|
|
1264
|
+
let timeLimitElement;
|
|
1265
|
+
const objectArg = get$.Required;
|
|
1266
|
+
timeLimitElement = objectArg.Field("timelimit", (x) => x);
|
|
1267
|
+
const tryGetScalarString = timeLimitElement.tag === /* Value */
|
|
1268
|
+
1 ? (value$1 = timeLimitElement.fields[0], value$1.Value) : timeLimitElement.tag === /* Object */
|
|
1269
|
+
3 ? !isEmpty(timeLimitElement.fields[0]) ? head(timeLimitElement.fields[0]).tag === /* Value */
|
|
1270
|
+
1 ? isEmpty(tail(timeLimitElement.fields[0])) ? (value$1 = head(timeLimitElement.fields[0]).fields[0], value$1.Value) : void 0 : void 0 : void 0 : void 0;
|
|
1271
|
+
if (tryGetScalarString == null) {
|
|
1272
|
+
return ToolTimeLimitValue_ToolTimeLimitExpression(Decode_decodeStringOrExpression(timeLimitElement));
|
|
1273
|
+
} else {
|
|
1274
|
+
let matchValue;
|
|
1275
|
+
let outArg = 0n;
|
|
1276
|
+
matchValue = [tryParse(value(tryGetScalarString), 7, false, 64, new FSharpRef(() => outArg, (v) => {
|
|
1277
|
+
outArg = v;
|
|
1278
|
+
})), outArg];
|
|
1279
|
+
if (matchValue[0]) {
|
|
1280
|
+
if (compare(matchValue[1], 0n) >= 0) {
|
|
1281
|
+
return ToolTimeLimitValue_ToolTimeLimitSeconds(matchValue[1]);
|
|
1282
|
+
} else {
|
|
1283
|
+
throw new Error("ToolTimeLimit timelimit must be non-negative.");
|
|
1284
|
+
}
|
|
1285
|
+
} else {
|
|
1286
|
+
return ToolTimeLimitValue_ToolTimeLimitExpression(Decode_decodeStringOrExpression(timeLimitElement));
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
function Decode_inlineJavascriptRequirementDecoder(get$) {
|
|
1291
|
+
let objectArg;
|
|
1292
|
+
return new InlineJavascriptRequirementValue((objectArg = get$.Optional, objectArg.Field("expressionLib", Decode_decodeStringArrayOrScalar)));
|
|
1293
|
+
}
|
|
1294
|
+
function Decode_requirementFromTypeName(cls, get$) {
|
|
1295
|
+
switch (cls) {
|
|
1296
|
+
case "InlineJavascriptRequirement":
|
|
1297
|
+
return Requirement_InlineJavascriptRequirement(Decode_inlineJavascriptRequirementDecoder(get$));
|
|
1298
|
+
case "SchemaDefRequirement":
|
|
1299
|
+
return Requirement_SchemaDefRequirement(Decode_schemaDefRequirementDecoder(get$));
|
|
1300
|
+
case "DockerRequirement":
|
|
1301
|
+
return Requirement_DockerRequirement(Decode_dockerRequirementDecoder(get$));
|
|
1302
|
+
case "SoftwareRequirement":
|
|
1303
|
+
return Requirement_SoftwareRequirement(Decode_softwareRequirementDecoder(get$));
|
|
1304
|
+
case "LoadListingRequirement":
|
|
1305
|
+
return Requirement_LoadListingRequirement(Decode_loadListingRequirementDecoder(get$));
|
|
1306
|
+
case "InitialWorkDirRequirement":
|
|
1307
|
+
return Requirement_InitialWorkDirRequirement(Decode_initialWorkDirRequirementDecoder(get$));
|
|
1308
|
+
case "EnvVarRequirement":
|
|
1309
|
+
return Requirement_EnvVarRequirement(Decode_envVarRequirementDecoder(get$));
|
|
1310
|
+
case "ShellCommandRequirement":
|
|
1311
|
+
return Requirement_ShellCommandRequirement();
|
|
1312
|
+
case "ResourceRequirement":
|
|
1313
|
+
return Requirement_ResourceRequirement(Decode_resourceRequirementDecoder(get$));
|
|
1314
|
+
case "WorkReuse":
|
|
1315
|
+
case "WorkReuseRequirement":
|
|
1316
|
+
return Decode_workReuseRequirementDecoder(get$);
|
|
1317
|
+
case "NetworkAccess":
|
|
1318
|
+
case "NetworkAccessRequirement":
|
|
1319
|
+
return Decode_networkAccessRequirementDecoder(get$);
|
|
1320
|
+
case "InplaceUpdateRequirement":
|
|
1321
|
+
case "InplaceUpdate":
|
|
1322
|
+
return Requirement_InplaceUpdateRequirement(Decode_inplaceUpdateRequirementDecoder(get$));
|
|
1323
|
+
case "ToolTimeLimit":
|
|
1324
|
+
case "ToolTimeLimitRequirement":
|
|
1325
|
+
return Requirement_ToolTimeLimitRequirement(Decode_toolTimeLimitRequirementDecoder(get$));
|
|
1326
|
+
case "SubworkflowFeatureRequirement":
|
|
1327
|
+
return Requirement_SubworkflowFeatureRequirement();
|
|
1328
|
+
case "ScatterFeatureRequirement":
|
|
1329
|
+
return Requirement_ScatterFeatureRequirement();
|
|
1330
|
+
case "MultipleInputFeatureRequirement":
|
|
1331
|
+
return Requirement_MultipleInputFeatureRequirement();
|
|
1332
|
+
case "StepInputExpressionRequirement":
|
|
1333
|
+
return Requirement_StepInputExpressionRequirement();
|
|
1334
|
+
default:
|
|
1335
|
+
throw new Error(`Invalid or unsupported requirement class: ${cls}`);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
function Decode_requirementArrayDecoder(yEle) {
|
|
1339
|
+
let matchResult, items, other;
|
|
1340
|
+
if (yEle.tag === /* Object */
|
|
1341
|
+
3) {
|
|
1342
|
+
if (!isEmpty(yEle.fields[0])) {
|
|
1343
|
+
if (head(yEle.fields[0]).tag === /* Sequence */
|
|
1344
|
+
2) {
|
|
1345
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
1346
|
+
matchResult = 0;
|
|
1347
|
+
items = head(yEle.fields[0]).fields[0];
|
|
1348
|
+
} else {
|
|
1349
|
+
matchResult = 1;
|
|
1350
|
+
}
|
|
1351
|
+
} else {
|
|
1352
|
+
matchResult = 1;
|
|
1353
|
+
}
|
|
1354
|
+
} else {
|
|
1355
|
+
matchResult = 1;
|
|
1356
|
+
}
|
|
1357
|
+
} else {
|
|
1358
|
+
matchResult = 2;
|
|
1359
|
+
other = yEle;
|
|
1360
|
+
}
|
|
1361
|
+
switch (matchResult) {
|
|
1362
|
+
case 0: {
|
|
1363
|
+
const collection = map((ele) => object((get$) => {
|
|
1364
|
+
let objectArg;
|
|
1365
|
+
return Decode_requirementFromTypeName((objectArg = get$.Required, objectArg.Field("class", string)), get$);
|
|
1366
|
+
}, ele), items);
|
|
1367
|
+
return Array.from(collection);
|
|
1368
|
+
}
|
|
1369
|
+
case 1:
|
|
1370
|
+
return object((get$_1) => {
|
|
1371
|
+
const collection_1 = map$2((kv) => object((get$_2) => Decode_requirementFromTypeName(kv[0], get$_2), kv[1]), get$_1.Overflow.FieldList(empty()));
|
|
1372
|
+
return Array.from(collection_1);
|
|
1373
|
+
}, yEle);
|
|
1374
|
+
default:
|
|
1375
|
+
throw new Error(`Invalid CWL requirements syntax: ${other}`);
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
function Decode_tryDecodeKnownRequirementFromElement(element) {
|
|
1379
|
+
try {
|
|
1380
|
+
return object((get$) => {
|
|
1381
|
+
let objectArg;
|
|
1382
|
+
return Decode_requirementFromTypeName((objectArg = get$.Required, objectArg.Field("class", string)), get$);
|
|
1383
|
+
}, element);
|
|
1384
|
+
} catch (ex) {
|
|
1385
|
+
let hintClass;
|
|
1386
|
+
try {
|
|
1387
|
+
hintClass = object((get$_1) => {
|
|
1388
|
+
const objectArg_1 = get$_1.Optional;
|
|
1389
|
+
return objectArg_1.Field("class", string);
|
|
1390
|
+
}, element);
|
|
1391
|
+
} catch (matchValue) {
|
|
1392
|
+
hintClass = void 0;
|
|
1393
|
+
}
|
|
1394
|
+
if (hintClass == null) {
|
|
1395
|
+
} else {
|
|
1396
|
+
const knownClass = value(hintClass);
|
|
1397
|
+
}
|
|
1398
|
+
return void 0;
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
function Decode_decodeHintElement(element) {
|
|
1402
|
+
const matchValue = Decode_tryDecodeKnownRequirementFromElement(element);
|
|
1403
|
+
if (matchValue == null) {
|
|
1404
|
+
return HintEntry_UnknownHint(new HintUnknownValue((() => {
|
|
1405
|
+
try {
|
|
1406
|
+
return object((get$) => {
|
|
1407
|
+
const objectArg = get$.Optional;
|
|
1408
|
+
return objectArg.Field("class", string);
|
|
1409
|
+
}, element);
|
|
1410
|
+
} catch (matchValue_1) {
|
|
1411
|
+
return void 0;
|
|
1412
|
+
}
|
|
1413
|
+
})(), element));
|
|
1414
|
+
} else {
|
|
1415
|
+
return HintEntry_KnownHint(value(matchValue));
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
function Decode_hintArrayDecoder(yEle) {
|
|
1419
|
+
let matchResult, items, other_1;
|
|
1420
|
+
switch (yEle.tag) {
|
|
1421
|
+
case /* Object */
|
|
1422
|
+
3: {
|
|
1423
|
+
if (!isEmpty(yEle.fields[0])) {
|
|
1424
|
+
if (head(yEle.fields[0]).tag === /* Sequence */
|
|
1425
|
+
2) {
|
|
1426
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
1427
|
+
matchResult = 0;
|
|
1428
|
+
items = head(yEle.fields[0]).fields[0];
|
|
1429
|
+
} else {
|
|
1430
|
+
matchResult = 1;
|
|
1431
|
+
}
|
|
1432
|
+
} else {
|
|
1433
|
+
matchResult = 1;
|
|
1434
|
+
}
|
|
1435
|
+
} else {
|
|
1436
|
+
matchResult = 1;
|
|
1437
|
+
}
|
|
1438
|
+
break;
|
|
1439
|
+
}
|
|
1440
|
+
case /* Sequence */
|
|
1441
|
+
2: {
|
|
1442
|
+
matchResult = 0;
|
|
1443
|
+
items = yEle.fields[0];
|
|
1444
|
+
break;
|
|
1445
|
+
}
|
|
1446
|
+
default: {
|
|
1447
|
+
matchResult = 2;
|
|
1448
|
+
other_1 = yEle;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
switch (matchResult) {
|
|
1452
|
+
case 0: {
|
|
1453
|
+
const collection = map(Decode_decodeHintElement, items);
|
|
1454
|
+
return Array.from(collection);
|
|
1455
|
+
}
|
|
1456
|
+
case 1:
|
|
1457
|
+
return object((get$) => {
|
|
1458
|
+
const collection_1 = map$2((kv) => {
|
|
1459
|
+
let matchValue, mappings;
|
|
1460
|
+
return Decode_decodeHintElement((matchValue = kv[1], matchValue.tag === /* Object */
|
|
1461
|
+
3 ? (mappings = matchValue.fields[0], exists((_arg) => {
|
|
1462
|
+
let matchResult_1, k_1;
|
|
1463
|
+
if (_arg.tag === /* Mapping */
|
|
1464
|
+
0) {
|
|
1465
|
+
if (_arg.fields[0].Value === "class") {
|
|
1466
|
+
matchResult_1 = 0;
|
|
1467
|
+
k_1 = _arg.fields[0];
|
|
1468
|
+
} else {
|
|
1469
|
+
matchResult_1 = 1;
|
|
1470
|
+
}
|
|
1471
|
+
} else {
|
|
1472
|
+
matchResult_1 = 1;
|
|
1473
|
+
}
|
|
1474
|
+
switch (matchResult_1) {
|
|
1475
|
+
case 0:
|
|
1476
|
+
return true;
|
|
1477
|
+
default:
|
|
1478
|
+
return false;
|
|
1479
|
+
}
|
|
1480
|
+
}, mappings) ? kv[1] : YAMLElement_Object(cons(YAMLElement_Mapping(new YAMLContent("class", void 0), YAMLElement_Object(singleton$1(YAMLElement_Value(new YAMLContent(kv[0], void 0))))), mappings))) : YAMLElement_Object(ofArray([YAMLElement_Mapping(new YAMLContent("class", void 0), YAMLElement_Object(singleton$1(YAMLElement_Value(new YAMLContent(kv[0], void 0))))), YAMLElement_Mapping(new YAMLContent("value", void 0), matchValue)]))));
|
|
1481
|
+
}, get$.Overflow.FieldList(empty()));
|
|
1482
|
+
return Array.from(collection_1);
|
|
1483
|
+
}, yEle);
|
|
1484
|
+
default:
|
|
1485
|
+
throw new Error(`Invalid CWL hints syntax: ${other_1}`);
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
const Decode_requirementsDecoder = (value) => object((get$) => {
|
|
1489
|
+
const objectArg = get$.Optional;
|
|
1490
|
+
return objectArg.Field("requirements", Decode_requirementArrayDecoder);
|
|
1491
|
+
}, value);
|
|
1492
|
+
const Decode_hintsDecoder = (value) => object((get$) => {
|
|
1493
|
+
const objectArg = get$.Optional;
|
|
1494
|
+
return objectArg.Field("hints", Decode_hintArrayDecoder);
|
|
1495
|
+
}, value);
|
|
1496
|
+
const Decode_inputBindingDecoder = (value_5) => object((get$) => {
|
|
1497
|
+
const objectArg = get$.Optional;
|
|
1498
|
+
return objectArg.Field("inputBinding", (value_4) => object((get$0027) => {
|
|
1499
|
+
let objectArg_1, objectArg_2, objectArg_3, objectArg_4;
|
|
1500
|
+
return new InputBinding((objectArg_1 = get$0027.Optional, objectArg_1.Field("prefix", string)), (objectArg_2 = get$0027.Optional, objectArg_2.Field("position", int)), (objectArg_3 = get$0027.Optional, objectArg_3.Field("itemSeparator", string)), (objectArg_4 = get$0027.Optional, objectArg_4.Field("separate", bool)));
|
|
1501
|
+
}, value_4));
|
|
1502
|
+
}, value_5);
|
|
1503
|
+
const Decode_inputArrayDecoder = (value_1) => object((get$) => {
|
|
1504
|
+
const dict = get$.Overflow.FieldList(empty());
|
|
1505
|
+
const collection = toArray(delay(() => collect((key) => {
|
|
1506
|
+
const value = getItemFromDict(dict, key);
|
|
1507
|
+
const inputBinding = Decode_inputBindingDecoder(value);
|
|
1508
|
+
let patternInput;
|
|
1509
|
+
let matchResult, v, mappings;
|
|
1510
|
+
if (value.tag === /* Object */
|
|
1511
|
+
3) {
|
|
1512
|
+
if (!isEmpty(value.fields[0])) {
|
|
1513
|
+
if (head(value.fields[0]).tag === /* Value */
|
|
1514
|
+
1) {
|
|
1515
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
1516
|
+
matchResult = 0;
|
|
1517
|
+
v = head(value.fields[0]).fields[0];
|
|
1518
|
+
} else {
|
|
1519
|
+
matchResult = 1;
|
|
1520
|
+
mappings = value.fields[0];
|
|
1521
|
+
}
|
|
1522
|
+
} else {
|
|
1523
|
+
matchResult = 1;
|
|
1524
|
+
mappings = value.fields[0];
|
|
1525
|
+
}
|
|
1526
|
+
} else {
|
|
1527
|
+
matchResult = 1;
|
|
1528
|
+
mappings = value.fields[0];
|
|
1529
|
+
}
|
|
1530
|
+
} else {
|
|
1531
|
+
matchResult = 2;
|
|
1532
|
+
}
|
|
1533
|
+
switch (matchResult) {
|
|
1534
|
+
case 0: {
|
|
1535
|
+
patternInput = Decode_cwlTypeStringMatcher(v.Value, get$);
|
|
1536
|
+
break;
|
|
1537
|
+
}
|
|
1538
|
+
case 1: {
|
|
1539
|
+
if (exists((m) => {
|
|
1540
|
+
let matchResult_1, k_1;
|
|
1541
|
+
if (m.tag === /* Mapping */
|
|
1542
|
+
0) {
|
|
1543
|
+
if (m.fields[0].Value === "type") {
|
|
1544
|
+
matchResult_1 = 0;
|
|
1545
|
+
k_1 = m.fields[0];
|
|
1546
|
+
} else {
|
|
1547
|
+
matchResult_1 = 1;
|
|
1548
|
+
}
|
|
1549
|
+
} else {
|
|
1550
|
+
matchResult_1 = 1;
|
|
1551
|
+
}
|
|
1552
|
+
switch (matchResult_1) {
|
|
1553
|
+
case 0:
|
|
1554
|
+
return true;
|
|
1555
|
+
default:
|
|
1556
|
+
return false;
|
|
1557
|
+
}
|
|
1558
|
+
}, mappings)) {
|
|
1559
|
+
patternInput = Decode_cwlTypeDecoder(value);
|
|
1560
|
+
} else {
|
|
1561
|
+
let matchResult_2, v_1;
|
|
1562
|
+
if (value.tag === /* Object */
|
|
1563
|
+
3) {
|
|
1564
|
+
if (!isEmpty(value.fields[0])) {
|
|
1565
|
+
if (head(value.fields[0]).tag === /* Value */
|
|
1566
|
+
1) {
|
|
1567
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
1568
|
+
matchResult_2 = 0;
|
|
1569
|
+
v_1 = head(value.fields[0]).fields[0];
|
|
1570
|
+
} else {
|
|
1571
|
+
matchResult_2 = 1;
|
|
1572
|
+
}
|
|
1573
|
+
} else {
|
|
1574
|
+
matchResult_2 = 1;
|
|
1575
|
+
}
|
|
1576
|
+
} else {
|
|
1577
|
+
matchResult_2 = 1;
|
|
1578
|
+
}
|
|
1579
|
+
} else {
|
|
1580
|
+
matchResult_2 = 1;
|
|
1581
|
+
}
|
|
1582
|
+
switch (matchResult_2) {
|
|
1583
|
+
case 0: {
|
|
1584
|
+
patternInput = Decode_cwlTypeStringMatcher(v_1.Value, get$);
|
|
1585
|
+
break;
|
|
1586
|
+
}
|
|
1587
|
+
default:
|
|
1588
|
+
throw new Error("Unexpected input format without type field");
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
break;
|
|
1592
|
+
}
|
|
1593
|
+
default:
|
|
1594
|
+
throw new Error("Unexpected input format in inputArrayDecoder");
|
|
1595
|
+
}
|
|
1596
|
+
const input = new CWLInput(key, patternInput[0]);
|
|
1597
|
+
return append(patternInput[1] ? (setOptionalProperty("optional", true, input), empty$1()) : empty$1(), delay(() => append(inputBinding != null ? (setOptionalProperty("inputBinding", inputBinding, input), empty$1()) : empty$1(), delay(() => singleton(input)))));
|
|
1598
|
+
}, dict.keys())));
|
|
1599
|
+
return Array.from(collection);
|
|
1600
|
+
}, value_1);
|
|
1601
|
+
const Decode_inputsDecoder = (value) => object((get$) => {
|
|
1602
|
+
const objectArg = get$.Optional;
|
|
1603
|
+
return objectArg.Field("inputs", Decode_inputArrayDecoder);
|
|
1604
|
+
}, value);
|
|
1605
|
+
const Decode_baseCommandDecoder = (value_2) => object((get$) => {
|
|
1606
|
+
let baseCommandField;
|
|
1607
|
+
const objectArg = get$.Optional;
|
|
1608
|
+
baseCommandField = objectArg.Field("baseCommand", (x) => x);
|
|
1609
|
+
let matchResult, v, v_1, s, s_1;
|
|
1610
|
+
if (baseCommandField == null) {
|
|
1611
|
+
matchResult = 4;
|
|
1612
|
+
} else {
|
|
1613
|
+
switch (value(baseCommandField).tag) {
|
|
1614
|
+
case /* Object */
|
|
1615
|
+
3: {
|
|
1616
|
+
if (!isEmpty(value(baseCommandField).fields[0])) {
|
|
1617
|
+
switch (head(value(baseCommandField).fields[0]).tag) {
|
|
1618
|
+
case /* Value */
|
|
1619
|
+
1: {
|
|
1620
|
+
if (isEmpty(tail(value(baseCommandField).fields[0]))) {
|
|
1621
|
+
matchResult = 0;
|
|
1622
|
+
v = head(value(baseCommandField).fields[0]).fields[0];
|
|
1623
|
+
} else {
|
|
1624
|
+
matchResult = 5;
|
|
1625
|
+
}
|
|
1626
|
+
break;
|
|
1627
|
+
}
|
|
1628
|
+
case /* Sequence */
|
|
1629
|
+
2: {
|
|
1630
|
+
if (isEmpty(tail(value(baseCommandField).fields[0]))) {
|
|
1631
|
+
matchResult = 2;
|
|
1632
|
+
s = head(value(baseCommandField).fields[0]).fields[0];
|
|
1633
|
+
} else {
|
|
1634
|
+
matchResult = 5;
|
|
1635
|
+
}
|
|
1636
|
+
break;
|
|
1637
|
+
}
|
|
1638
|
+
default:
|
|
1639
|
+
matchResult = 5;
|
|
1640
|
+
}
|
|
1641
|
+
} else {
|
|
1642
|
+
matchResult = 5;
|
|
1643
|
+
}
|
|
1644
|
+
break;
|
|
1645
|
+
}
|
|
1646
|
+
case /* Value */
|
|
1647
|
+
1: {
|
|
1648
|
+
matchResult = 1;
|
|
1649
|
+
v_1 = value(baseCommandField).fields[0];
|
|
1650
|
+
break;
|
|
1651
|
+
}
|
|
1652
|
+
case /* Sequence */
|
|
1653
|
+
2: {
|
|
1654
|
+
matchResult = 3;
|
|
1655
|
+
s_1 = value(baseCommandField).fields[0];
|
|
1656
|
+
break;
|
|
1657
|
+
}
|
|
1658
|
+
default:
|
|
1659
|
+
matchResult = 5;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
switch (matchResult) {
|
|
1663
|
+
case 0:
|
|
1664
|
+
return [v.Value];
|
|
1665
|
+
case 1:
|
|
1666
|
+
return [v_1.Value];
|
|
1667
|
+
case 2:
|
|
1668
|
+
return resizearray(string, YAMLElement_Sequence(s));
|
|
1669
|
+
case 3:
|
|
1670
|
+
return resizearray(string, YAMLElement_Sequence(s_1));
|
|
1671
|
+
case 4:
|
|
1672
|
+
return void 0;
|
|
1673
|
+
default:
|
|
1674
|
+
return void 0;
|
|
1675
|
+
}
|
|
1676
|
+
}, value_2);
|
|
1677
|
+
const Decode_versionDecoder = (value_1) => object((get$) => {
|
|
1678
|
+
const objectArg = get$.Required;
|
|
1679
|
+
return objectArg.Field("cwlVersion", string);
|
|
1680
|
+
}, value_1);
|
|
1681
|
+
const Decode_classDecoder = (value_1) => object((get$) => {
|
|
1682
|
+
const objectArg = get$.Required;
|
|
1683
|
+
return objectArg.Field("class", string);
|
|
1684
|
+
}, value_1);
|
|
1685
|
+
function Decode_stringOptionFieldDecoder(field) {
|
|
1686
|
+
return (value_1) => object((get$) => {
|
|
1687
|
+
const objectArg = get$.Optional;
|
|
1688
|
+
return objectArg.Field(field, string);
|
|
1689
|
+
}, value_1);
|
|
1690
|
+
}
|
|
1691
|
+
function Decode_boolOptionFieldDecoder(field) {
|
|
1692
|
+
return (value_1) => object((get$) => {
|
|
1693
|
+
const objectArg = get$.Optional;
|
|
1694
|
+
return objectArg.Field(field, bool);
|
|
1695
|
+
}, value_1);
|
|
1696
|
+
}
|
|
1697
|
+
function Decode_yamlElementOptionFieldDecoder(field) {
|
|
1698
|
+
return (value) => object((get$) => {
|
|
1699
|
+
const objectArg = get$.Optional;
|
|
1700
|
+
return objectArg.Field(field, (x) => x);
|
|
1701
|
+
}, value);
|
|
1702
|
+
}
|
|
1703
|
+
function Decode_stringFieldDecoder(field) {
|
|
1704
|
+
return (value_1) => object((get$) => {
|
|
1705
|
+
const objectArg = get$.Required;
|
|
1706
|
+
return objectArg.Field(field, string);
|
|
1707
|
+
}, value_1);
|
|
1708
|
+
}
|
|
1709
|
+
function Decode_stringOrStringArrayDecoder(value) {
|
|
1710
|
+
let matchResult, v, s;
|
|
1711
|
+
switch (value.tag) {
|
|
1712
|
+
case /* Object */
|
|
1713
|
+
3: {
|
|
1714
|
+
if (!isEmpty(value.fields[0])) {
|
|
1715
|
+
switch (head(value.fields[0]).tag) {
|
|
1716
|
+
case /* Value */
|
|
1717
|
+
1: {
|
|
1718
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
1719
|
+
matchResult = 0;
|
|
1720
|
+
v = head(value.fields[0]).fields[0];
|
|
1721
|
+
} else {
|
|
1722
|
+
matchResult = 2;
|
|
1723
|
+
}
|
|
1724
|
+
break;
|
|
1725
|
+
}
|
|
1726
|
+
case /* Sequence */
|
|
1727
|
+
2: {
|
|
1728
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
1729
|
+
matchResult = 1;
|
|
1730
|
+
s = head(value.fields[0]).fields[0];
|
|
1731
|
+
} else {
|
|
1732
|
+
matchResult = 2;
|
|
1733
|
+
}
|
|
1734
|
+
break;
|
|
1735
|
+
}
|
|
1736
|
+
default:
|
|
1737
|
+
matchResult = 2;
|
|
1738
|
+
}
|
|
1739
|
+
} else {
|
|
1740
|
+
matchResult = 2;
|
|
1741
|
+
}
|
|
1742
|
+
break;
|
|
1743
|
+
}
|
|
1744
|
+
case /* Value */
|
|
1745
|
+
1: {
|
|
1746
|
+
matchResult = 0;
|
|
1747
|
+
v = value.fields[0];
|
|
1748
|
+
break;
|
|
1749
|
+
}
|
|
1750
|
+
case /* Sequence */
|
|
1751
|
+
2: {
|
|
1752
|
+
matchResult = 1;
|
|
1753
|
+
s = value.fields[0];
|
|
1754
|
+
break;
|
|
1755
|
+
}
|
|
1756
|
+
default:
|
|
1757
|
+
matchResult = 2;
|
|
1758
|
+
}
|
|
1759
|
+
switch (matchResult) {
|
|
1760
|
+
case 0:
|
|
1761
|
+
return [v.Value];
|
|
1762
|
+
case 1:
|
|
1763
|
+
return resizearray(string, YAMLElement_Sequence(s));
|
|
1764
|
+
default:
|
|
1765
|
+
return void 0;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
function Decode_sourceArrayFieldDecoder(field) {
|
|
1769
|
+
return (value_1) => object((get$) => {
|
|
1770
|
+
let objectArg;
|
|
1771
|
+
return bind(Decode_stringOrStringArrayDecoder, (objectArg = get$.Optional, objectArg.Field(field, (x) => x)));
|
|
1772
|
+
}, value_1);
|
|
1773
|
+
}
|
|
1774
|
+
function Decode_linkMergeFieldDecoder(field) {
|
|
1775
|
+
return (value_1) => object((get$) => {
|
|
1776
|
+
let linkMergeField;
|
|
1777
|
+
const objectArg = get$.Optional;
|
|
1778
|
+
linkMergeField = objectArg.Field(field, string);
|
|
1779
|
+
if (linkMergeField == null) {
|
|
1780
|
+
return void 0;
|
|
1781
|
+
} else {
|
|
1782
|
+
const linkMergeString = value(linkMergeField);
|
|
1783
|
+
const matchValue = LinkMergeMethod.tryParse(linkMergeString);
|
|
1784
|
+
if (matchValue == null) {
|
|
1785
|
+
throw new Error(`Invalid linkMerge value: ${linkMergeString}`);
|
|
1786
|
+
} else {
|
|
1787
|
+
return value(matchValue);
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
}, value_1);
|
|
1791
|
+
}
|
|
1792
|
+
function Decode_pickValueFieldDecoder(field) {
|
|
1793
|
+
return (value_1) => object((get$) => {
|
|
1794
|
+
let pickValueField;
|
|
1795
|
+
const objectArg = get$.Optional;
|
|
1796
|
+
pickValueField = objectArg.Field(field, string);
|
|
1797
|
+
if (pickValueField == null) {
|
|
1798
|
+
return void 0;
|
|
1799
|
+
} else {
|
|
1800
|
+
const pickValueString = value(pickValueField);
|
|
1801
|
+
const matchValue = PickValueMethod.tryParse(pickValueString);
|
|
1802
|
+
if (matchValue == null) {
|
|
1803
|
+
throw new Error(`Invalid pickValue value: ${pickValueString}`);
|
|
1804
|
+
} else {
|
|
1805
|
+
return value(matchValue);
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
}, value_1);
|
|
1809
|
+
}
|
|
1810
|
+
function Decode_scatterFieldDecoder(field) {
|
|
1811
|
+
return (value_1) => object((get$) => {
|
|
1812
|
+
let objectArg;
|
|
1813
|
+
return bind(Decode_stringOrStringArrayDecoder, (objectArg = get$.Optional, objectArg.Field(field, (x) => x)));
|
|
1814
|
+
}, value_1);
|
|
1815
|
+
}
|
|
1816
|
+
function Decode_scatterMethodFieldDecoder(field) {
|
|
1817
|
+
return (value_1) => object((get$) => {
|
|
1818
|
+
let scatterMethodField;
|
|
1819
|
+
const objectArg = get$.Optional;
|
|
1820
|
+
scatterMethodField = objectArg.Field(field, string);
|
|
1821
|
+
if (scatterMethodField == null) {
|
|
1822
|
+
return void 0;
|
|
1823
|
+
} else {
|
|
1824
|
+
const scatterMethodString = value(scatterMethodField);
|
|
1825
|
+
const matchValue = ScatterMethod.tryParse(scatterMethodString);
|
|
1826
|
+
if (matchValue == null) {
|
|
1827
|
+
throw new Error(`Invalid scatterMethod value: ${scatterMethodString}`);
|
|
1828
|
+
} else {
|
|
1829
|
+
return value(matchValue);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}, value_1);
|
|
1833
|
+
}
|
|
1834
|
+
function Decode_expressionStringOptionFieldDecoder(field) {
|
|
1835
|
+
return (value) => object((get$) => {
|
|
1836
|
+
let objectArg;
|
|
1837
|
+
return map$1(Decode_decodeStringOrExpression, (objectArg = get$.Optional, objectArg.Field(field, (x) => x)));
|
|
1838
|
+
}, value);
|
|
1839
|
+
}
|
|
1840
|
+
function Decode_decodeStepInputFromValue(id, value$1, allowScalarSource) {
|
|
1841
|
+
const scalarSource = allowScalarSource ? Decode_stringOrStringArrayDecoder(value$1) : void 0;
|
|
1842
|
+
const fieldSource = Decode_sourceArrayFieldDecoder("source")(value$1);
|
|
1843
|
+
return new StepInput(id, scalarSource != null ? value(scalarSource) : fieldSource != null ? value(fieldSource) : void 0, Decode_yamlElementOptionFieldDecoder("default")(value$1), Decode_stringOptionFieldDecoder("valueFrom")(value$1), Decode_linkMergeFieldDecoder("linkMerge")(value$1), Decode_pickValueFieldDecoder("pickValue")(value$1), Decode_stringOptionFieldDecoder("doc")(value$1), Decode_boolOptionFieldDecoder("loadContents")(value$1), Decode_stringOptionFieldDecoder("loadListing")(value$1), Decode_stringOptionFieldDecoder("label")(value$1));
|
|
1844
|
+
}
|
|
1845
|
+
function Decode_decodeStepInputsFromMap(value) {
|
|
1846
|
+
const dict = object((get$) => get$.Overflow.FieldList(empty()), value);
|
|
1847
|
+
const collection = toArray(delay(() => map$2((key) => Decode_decodeStepInputFromValue(key, getItemFromDict(dict, key), true), dict.keys())));
|
|
1848
|
+
return Array.from(collection);
|
|
1849
|
+
}
|
|
1850
|
+
function Decode_decodeStepInputFromArrayItem(item) {
|
|
1851
|
+
return Decode_decodeStepInputFromValue(Decode_stringFieldDecoder("id")(item), item, false);
|
|
1852
|
+
}
|
|
1853
|
+
function Decode_decodeStepInputsFromArray(items) {
|
|
1854
|
+
const collection = map(Decode_decodeStepInputFromArrayItem, items);
|
|
1855
|
+
return Array.from(collection);
|
|
1856
|
+
}
|
|
1857
|
+
function Decode_inputStepDecoder(value) {
|
|
1858
|
+
let matchResult, items;
|
|
1859
|
+
switch (value.tag) {
|
|
1860
|
+
case /* Object */
|
|
1861
|
+
3: {
|
|
1862
|
+
if (!isEmpty(value.fields[0])) {
|
|
1863
|
+
if (head(value.fields[0]).tag === /* Sequence */
|
|
1864
|
+
2) {
|
|
1865
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
1866
|
+
matchResult = 0;
|
|
1867
|
+
items = head(value.fields[0]).fields[0];
|
|
1868
|
+
} else {
|
|
1869
|
+
matchResult = 1;
|
|
1870
|
+
}
|
|
1871
|
+
} else {
|
|
1872
|
+
matchResult = 1;
|
|
1873
|
+
}
|
|
1874
|
+
} else {
|
|
1875
|
+
matchResult = 1;
|
|
1876
|
+
}
|
|
1877
|
+
break;
|
|
1878
|
+
}
|
|
1879
|
+
case /* Sequence */
|
|
1880
|
+
2: {
|
|
1881
|
+
matchResult = 0;
|
|
1882
|
+
items = value.fields[0];
|
|
1883
|
+
break;
|
|
1884
|
+
}
|
|
1885
|
+
default:
|
|
1886
|
+
matchResult = 1;
|
|
1887
|
+
}
|
|
1888
|
+
switch (matchResult) {
|
|
1889
|
+
case 0:
|
|
1890
|
+
return Decode_decodeStepInputsFromArray(items);
|
|
1891
|
+
default:
|
|
1892
|
+
return Decode_decodeStepInputsFromMap(value);
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
function Decode_decodeStepOutputItem(value) {
|
|
1896
|
+
let matchResult, v;
|
|
1897
|
+
switch (value.tag) {
|
|
1898
|
+
case /* Object */
|
|
1899
|
+
3: {
|
|
1900
|
+
if (!isEmpty(value.fields[0])) {
|
|
1901
|
+
if (head(value.fields[0]).tag === /* Value */
|
|
1902
|
+
1) {
|
|
1903
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
1904
|
+
matchResult = 0;
|
|
1905
|
+
v = head(value.fields[0]).fields[0];
|
|
1906
|
+
} else {
|
|
1907
|
+
matchResult = 1;
|
|
1908
|
+
}
|
|
1909
|
+
} else {
|
|
1910
|
+
matchResult = 1;
|
|
1911
|
+
}
|
|
1912
|
+
} else {
|
|
1913
|
+
matchResult = 1;
|
|
1914
|
+
}
|
|
1915
|
+
break;
|
|
1916
|
+
}
|
|
1917
|
+
case /* Value */
|
|
1918
|
+
1: {
|
|
1919
|
+
matchResult = 0;
|
|
1920
|
+
v = value.fields[0];
|
|
1921
|
+
break;
|
|
1922
|
+
}
|
|
1923
|
+
default:
|
|
1924
|
+
matchResult = 1;
|
|
1925
|
+
}
|
|
1926
|
+
switch (matchResult) {
|
|
1927
|
+
case 0:
|
|
1928
|
+
return StepOutput_StepOutputString(v.Value);
|
|
1929
|
+
default:
|
|
1930
|
+
return StepOutput_StepOutputRecord(new StepOutputParameter(Decode_stringFieldDecoder("id")(value)));
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
const Decode_outputStepsDecoder = (value_2) => object((get$) => {
|
|
1934
|
+
let outField;
|
|
1935
|
+
const objectArg = get$.Required;
|
|
1936
|
+
outField = objectArg.Field("out", (x) => x);
|
|
1937
|
+
let matchResult, v_1, outputs, value_1;
|
|
1938
|
+
switch (outField.tag) {
|
|
1939
|
+
case /* Object */
|
|
1940
|
+
3: {
|
|
1941
|
+
if (!isEmpty(outField.fields[0])) {
|
|
1942
|
+
switch (head(outField.fields[0]).tag) {
|
|
1943
|
+
case /* Value */
|
|
1944
|
+
1: {
|
|
1945
|
+
if (isEmpty(tail(outField.fields[0]))) {
|
|
1946
|
+
if (head(outField.fields[0]).fields[0].Value === "[]") {
|
|
1947
|
+
matchResult = 1;
|
|
1948
|
+
v_1 = head(outField.fields[0]).fields[0];
|
|
1949
|
+
} else {
|
|
1950
|
+
matchResult = 4;
|
|
1951
|
+
value_1 = outField;
|
|
1952
|
+
}
|
|
1953
|
+
} else {
|
|
1954
|
+
matchResult = 4;
|
|
1955
|
+
value_1 = outField;
|
|
1956
|
+
}
|
|
1957
|
+
break;
|
|
1958
|
+
}
|
|
1959
|
+
case /* Sequence */
|
|
1960
|
+
2: {
|
|
1961
|
+
if (isEmpty(head(outField.fields[0]).fields[0])) {
|
|
1962
|
+
if (isEmpty(tail(outField.fields[0]))) {
|
|
1963
|
+
matchResult = 2;
|
|
1964
|
+
} else {
|
|
1965
|
+
matchResult = 4;
|
|
1966
|
+
value_1 = outField;
|
|
1967
|
+
}
|
|
1968
|
+
} else if (isEmpty(tail(outField.fields[0]))) {
|
|
1969
|
+
matchResult = 3;
|
|
1970
|
+
outputs = head(outField.fields[0]).fields[0];
|
|
1971
|
+
} else {
|
|
1972
|
+
matchResult = 4;
|
|
1973
|
+
value_1 = outField;
|
|
1974
|
+
}
|
|
1975
|
+
break;
|
|
1976
|
+
}
|
|
1977
|
+
default: {
|
|
1978
|
+
matchResult = 4;
|
|
1979
|
+
value_1 = outField;
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
} else {
|
|
1983
|
+
matchResult = 0;
|
|
1984
|
+
}
|
|
1985
|
+
break;
|
|
1986
|
+
}
|
|
1987
|
+
case /* Sequence */
|
|
1988
|
+
2: {
|
|
1989
|
+
if (isEmpty(outField.fields[0])) {
|
|
1990
|
+
matchResult = 2;
|
|
1991
|
+
} else {
|
|
1992
|
+
matchResult = 3;
|
|
1993
|
+
outputs = outField.fields[0];
|
|
1994
|
+
}
|
|
1995
|
+
break;
|
|
1996
|
+
}
|
|
1997
|
+
default: {
|
|
1998
|
+
matchResult = 4;
|
|
1999
|
+
value_1 = outField;
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
switch (matchResult) {
|
|
2003
|
+
case 0:
|
|
2004
|
+
return [];
|
|
2005
|
+
case 1:
|
|
2006
|
+
return [];
|
|
2007
|
+
case 2:
|
|
2008
|
+
return [];
|
|
2009
|
+
case 3: {
|
|
2010
|
+
const collection = map(Decode_decodeStepOutputItem, outputs);
|
|
2011
|
+
return Array.from(collection);
|
|
2012
|
+
}
|
|
2013
|
+
default:
|
|
2014
|
+
return [Decode_decodeStepOutputItem(value_1)];
|
|
2015
|
+
}
|
|
2016
|
+
}, value_2);
|
|
2017
|
+
const Decode_docDecoder = (value_1) => object((get$) => {
|
|
2018
|
+
const objectArg = get$.Optional;
|
|
2019
|
+
return objectArg.Field("doc", string);
|
|
2020
|
+
}, value_1);
|
|
2021
|
+
const Decode_labelDecoder = (value_1) => object((get$) => {
|
|
2022
|
+
const objectArg = get$.Optional;
|
|
2023
|
+
return objectArg.Field("label", string);
|
|
2024
|
+
}, value_1);
|
|
2025
|
+
const Decode_intentDecoder = (value_1) => object((get$) => {
|
|
2026
|
+
let objectArg;
|
|
2027
|
+
return bind(Decode_stringOrStringArrayDecoder, (objectArg = get$.Optional, objectArg.Field("intent", (x) => x)));
|
|
2028
|
+
}, value_1);
|
|
2029
|
+
function Decode_hasField(fieldName, yamlElement) {
|
|
2030
|
+
if (yamlElement.tag === /* Object */
|
|
2031
|
+
3) {
|
|
2032
|
+
return exists((_arg) => {
|
|
2033
|
+
let matchResult, k_1;
|
|
2034
|
+
if (_arg.tag === /* Mapping */
|
|
2035
|
+
0) {
|
|
2036
|
+
if (_arg.fields[0].Value === fieldName) {
|
|
2037
|
+
matchResult = 0;
|
|
2038
|
+
k_1 = _arg.fields[0];
|
|
2039
|
+
} else {
|
|
2040
|
+
matchResult = 1;
|
|
2041
|
+
}
|
|
2042
|
+
} else {
|
|
2043
|
+
matchResult = 1;
|
|
2044
|
+
}
|
|
2045
|
+
switch (matchResult) {
|
|
2046
|
+
case 0:
|
|
2047
|
+
return true;
|
|
2048
|
+
default:
|
|
2049
|
+
return false;
|
|
2050
|
+
}
|
|
2051
|
+
}, yamlElement.fields[0]);
|
|
2052
|
+
} else {
|
|
2053
|
+
return false;
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
function Decode_withDefaultCwlVersion(defaultCwlVersion, yamlElement) {
|
|
2057
|
+
let fields;
|
|
2058
|
+
if (yamlElement.tag === /* Object */
|
|
2059
|
+
3) {
|
|
2060
|
+
if (fields = yamlElement.fields[0], Decode_hasField("cwlVersion", yamlElement)) {
|
|
2061
|
+
const fields_1 = yamlElement.fields[0];
|
|
2062
|
+
return yamlElement;
|
|
2063
|
+
} else {
|
|
2064
|
+
const fields_2 = yamlElement.fields[0];
|
|
2065
|
+
return YAMLElement_Object(cons(YAMLElement_Mapping(new YAMLContent("cwlVersion", void 0), YAMLElement_Object(singleton$1(YAMLElement_Value(new YAMLContent(defaultCwlVersion, void 0))))), fields_2));
|
|
2066
|
+
}
|
|
2067
|
+
} else {
|
|
2068
|
+
return yamlElement;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
function Decode_workflowStepRunDecoder(defaultCwlVersion, runValue) {
|
|
2072
|
+
let matchResult, v;
|
|
2073
|
+
switch (runValue.tag) {
|
|
2074
|
+
case /* Object */
|
|
2075
|
+
3: {
|
|
2076
|
+
if (!isEmpty(runValue.fields[0])) {
|
|
2077
|
+
if (head(runValue.fields[0]).tag === /* Value */
|
|
2078
|
+
1) {
|
|
2079
|
+
if (isEmpty(tail(runValue.fields[0]))) {
|
|
2080
|
+
matchResult = 0;
|
|
2081
|
+
v = head(runValue.fields[0]).fields[0];
|
|
2082
|
+
} else {
|
|
2083
|
+
matchResult = 1;
|
|
2084
|
+
}
|
|
2085
|
+
} else {
|
|
2086
|
+
matchResult = 1;
|
|
2087
|
+
}
|
|
2088
|
+
} else {
|
|
2089
|
+
matchResult = 1;
|
|
2090
|
+
}
|
|
2091
|
+
break;
|
|
2092
|
+
}
|
|
2093
|
+
case /* Value */
|
|
2094
|
+
1: {
|
|
2095
|
+
matchResult = 0;
|
|
2096
|
+
v = runValue.fields[0];
|
|
2097
|
+
break;
|
|
2098
|
+
}
|
|
2099
|
+
default:
|
|
2100
|
+
matchResult = 2;
|
|
2101
|
+
}
|
|
2102
|
+
switch (matchResult) {
|
|
2103
|
+
case 0:
|
|
2104
|
+
return WorkflowStepRun_RunString(v.Value);
|
|
2105
|
+
case 1: {
|
|
2106
|
+
const matchValue = Decode_decodeCWLProcessingUnitElement(Decode_withDefaultCwlVersion(defaultCwlVersion, runValue));
|
|
2107
|
+
switch (matchValue.tag) {
|
|
2108
|
+
case /* Workflow */
|
|
2109
|
+
1:
|
|
2110
|
+
return WorkflowStepRunOps_fromWorkflow(matchValue.fields[0]);
|
|
2111
|
+
case /* ExpressionTool */
|
|
2112
|
+
2:
|
|
2113
|
+
return WorkflowStepRunOps_fromExpressionTool(matchValue.fields[0]);
|
|
2114
|
+
case /* Operation */
|
|
2115
|
+
3:
|
|
2116
|
+
return WorkflowStepRunOps_fromOperation(matchValue.fields[0]);
|
|
2117
|
+
default:
|
|
2118
|
+
return WorkflowStepRunOps_fromTool(matchValue.fields[0]);
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
default:
|
|
2122
|
+
throw new Error(toText(interpolate("Unsupported run value for workflow step: %A%P()", [runValue])));
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
function Decode_decodeWorkflowStepFromValueWithId(defaultCwlVersion, stepId, value) {
|
|
2126
|
+
const run = Decode_workflowStepRunDecoder(defaultCwlVersion, object((get$0027) => {
|
|
2127
|
+
const objectArg = get$0027.Required;
|
|
2128
|
+
return objectArg.Field("run", (x) => x);
|
|
2129
|
+
}, value));
|
|
2130
|
+
const inputs = object((get$0027_1) => {
|
|
2131
|
+
const objectArg_1 = get$0027_1.Required;
|
|
2132
|
+
return objectArg_1.Field("in", Decode_inputStepDecoder);
|
|
2133
|
+
}, value);
|
|
2134
|
+
const outputs = Decode_outputStepsDecoder(value);
|
|
2135
|
+
const requirements = Decode_requirementsDecoder(value);
|
|
2136
|
+
const hints = Decode_hintsDecoder(value);
|
|
2137
|
+
const doc = Decode_docDecoder(value);
|
|
2138
|
+
const wfStep = new WorkflowStep(stepId, inputs, outputs, run, unwrap(Decode_labelDecoder(value)), unwrap(doc), unwrap(Decode_scatterFieldDecoder("scatter")(value)), unwrap(Decode_scatterMethodFieldDecoder("scatterMethod")(value)), unwrap(Decode_expressionStringOptionFieldDecoder("when")(value)));
|
|
2139
|
+
if (requirements != null) {
|
|
2140
|
+
wfStep.Requirements = requirements;
|
|
2141
|
+
}
|
|
2142
|
+
if (hints != null) {
|
|
2143
|
+
wfStep.Hints = hints;
|
|
2144
|
+
}
|
|
2145
|
+
return wfStep;
|
|
2146
|
+
}
|
|
2147
|
+
function Decode_decodeWorkflowStepFromArrayItem(defaultCwlVersion, item) {
|
|
2148
|
+
return Decode_decodeWorkflowStepFromValueWithId(defaultCwlVersion, Decode_stringFieldDecoder("id")(item), item);
|
|
2149
|
+
}
|
|
2150
|
+
function Decode_stepArrayDecoderWithVersion(defaultCwlVersion, value) {
|
|
2151
|
+
let matchResult, items;
|
|
2152
|
+
switch (value.tag) {
|
|
2153
|
+
case /* Object */
|
|
2154
|
+
3: {
|
|
2155
|
+
if (!isEmpty(value.fields[0])) {
|
|
2156
|
+
if (head(value.fields[0]).tag === /* Sequence */
|
|
2157
|
+
2) {
|
|
2158
|
+
if (isEmpty(tail(value.fields[0]))) {
|
|
2159
|
+
matchResult = 0;
|
|
2160
|
+
items = head(value.fields[0]).fields[0];
|
|
2161
|
+
} else {
|
|
2162
|
+
matchResult = 1;
|
|
2163
|
+
}
|
|
2164
|
+
} else {
|
|
2165
|
+
matchResult = 1;
|
|
2166
|
+
}
|
|
2167
|
+
} else {
|
|
2168
|
+
matchResult = 1;
|
|
2169
|
+
}
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
case /* Sequence */
|
|
2173
|
+
2: {
|
|
2174
|
+
matchResult = 0;
|
|
2175
|
+
items = value.fields[0];
|
|
2176
|
+
break;
|
|
2177
|
+
}
|
|
2178
|
+
default:
|
|
2179
|
+
matchResult = 1;
|
|
2180
|
+
}
|
|
2181
|
+
switch (matchResult) {
|
|
2182
|
+
case 0: {
|
|
2183
|
+
const collection = map((item) => Decode_decodeWorkflowStepFromArrayItem(defaultCwlVersion, item), items);
|
|
2184
|
+
return Array.from(collection);
|
|
2185
|
+
}
|
|
2186
|
+
default: {
|
|
2187
|
+
const dict = object((get$) => get$.Overflow.FieldList(empty()), value);
|
|
2188
|
+
const collection_1 = toArray(delay(() => map$2((key) => Decode_decodeWorkflowStepFromValueWithId(defaultCwlVersion, key, getItemFromDict(dict, key)), dict.keys())));
|
|
2189
|
+
return Array.from(collection_1);
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
function Decode_stepsDecoderWithVersion(defaultCwlVersion) {
|
|
2194
|
+
return (value_1) => object((get$) => {
|
|
2195
|
+
const objectArg = get$.Required;
|
|
2196
|
+
return objectArg.Field("steps", (value) => Decode_stepArrayDecoderWithVersion(defaultCwlVersion, value));
|
|
2197
|
+
}, value_1);
|
|
2198
|
+
}
|
|
2199
|
+
function Decode_commandLineToolDecoder(yamlCWL) {
|
|
2200
|
+
const cwlVersion = Decode_versionDecoder(yamlCWL);
|
|
2201
|
+
const outputs = Decode_outputsDecoder(yamlCWL);
|
|
2202
|
+
const inputs = Decode_inputsDecoder(yamlCWL);
|
|
2203
|
+
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
2204
|
+
const hints = Decode_hintsDecoder(yamlCWL);
|
|
2205
|
+
const intent = Decode_intentDecoder(yamlCWL);
|
|
2206
|
+
const baseCommand = Decode_baseCommandDecoder(yamlCWL);
|
|
2207
|
+
const doc = Decode_docDecoder(yamlCWL);
|
|
2208
|
+
const label = Decode_labelDecoder(yamlCWL);
|
|
2209
|
+
const description = new CWLToolDescription(outputs, cwlVersion);
|
|
2210
|
+
let metadata;
|
|
2211
|
+
const md = new DynamicObj();
|
|
2212
|
+
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "class", "id", "label", "doc", "intent", "requirements", "hints", "cwlVersion", "baseCommand", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"]))), yamlCWL);
|
|
2213
|
+
metadata = md;
|
|
2214
|
+
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(ofArray(["id", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"]))), yamlCWL);
|
|
2215
|
+
if (inputs != null) {
|
|
2216
|
+
description.Inputs = inputs;
|
|
2217
|
+
}
|
|
2218
|
+
if (requirements != null) {
|
|
2219
|
+
description.Requirements = requirements;
|
|
2220
|
+
}
|
|
2221
|
+
if (hints != null) {
|
|
2222
|
+
description.Hints = hints;
|
|
2223
|
+
}
|
|
2224
|
+
if (intent != null) {
|
|
2225
|
+
description.Intent = intent;
|
|
2226
|
+
}
|
|
2227
|
+
if (baseCommand != null) {
|
|
2228
|
+
description.BaseCommand = baseCommand;
|
|
2229
|
+
}
|
|
2230
|
+
if (doc != null) {
|
|
2231
|
+
description.Doc = doc;
|
|
2232
|
+
}
|
|
2233
|
+
if (label != null) {
|
|
2234
|
+
description.Label = label;
|
|
2235
|
+
}
|
|
2236
|
+
if (length(metadata.GetProperties(false)) > 0) {
|
|
2237
|
+
description.Metadata = metadata;
|
|
2238
|
+
}
|
|
2239
|
+
return description;
|
|
2240
|
+
}
|
|
2241
|
+
function Decode_expressionToolDecoder(yamlCWL) {
|
|
2242
|
+
const cwlVersion = Decode_versionDecoder(yamlCWL);
|
|
2243
|
+
const outputs = Decode_outputsDecoder(yamlCWL);
|
|
2244
|
+
const inputs = Decode_inputsDecoder(yamlCWL);
|
|
2245
|
+
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
2246
|
+
const hints = Decode_hintsDecoder(yamlCWL);
|
|
2247
|
+
const intent = Decode_intentDecoder(yamlCWL);
|
|
2248
|
+
const doc = Decode_docDecoder(yamlCWL);
|
|
2249
|
+
const label = Decode_labelDecoder(yamlCWL);
|
|
2250
|
+
const description = new CWLExpressionToolDescription(outputs, object((get$) => {
|
|
2251
|
+
const objectArg = get$.Required;
|
|
2252
|
+
return objectArg.Field("expression", Decode_decodeStringOrExpression);
|
|
2253
|
+
}, yamlCWL), cwlVersion);
|
|
2254
|
+
let metadata;
|
|
2255
|
+
const md = new DynamicObj();
|
|
2256
|
+
object((get$_1) => Decode_overflowDecoder(md, get$_1.Overflow.FieldList(ofArray(["inputs", "outputs", "class", "id", "label", "doc", "intent", "requirements", "hints", "cwlVersion", "expression"]))), yamlCWL);
|
|
2257
|
+
metadata = md;
|
|
2258
|
+
object((get$_2) => Decode_overflowDecoder(description, get$_2.MultipleOptional.FieldList(singleton$1("id"))), yamlCWL);
|
|
2259
|
+
if (inputs != null) {
|
|
2260
|
+
description.Inputs = inputs;
|
|
2261
|
+
}
|
|
2262
|
+
if (requirements != null) {
|
|
2263
|
+
description.Requirements = requirements;
|
|
2264
|
+
}
|
|
2265
|
+
if (hints != null) {
|
|
2266
|
+
description.Hints = hints;
|
|
2267
|
+
}
|
|
2268
|
+
if (intent != null) {
|
|
2269
|
+
description.Intent = intent;
|
|
2270
|
+
}
|
|
2271
|
+
if (doc != null) {
|
|
2272
|
+
description.Doc = doc;
|
|
2273
|
+
}
|
|
2274
|
+
if (label != null) {
|
|
2275
|
+
description.Label = label;
|
|
2276
|
+
}
|
|
2277
|
+
if (length(metadata.GetProperties(false)) > 0) {
|
|
2278
|
+
description.Metadata = metadata;
|
|
2279
|
+
}
|
|
2280
|
+
return description;
|
|
2281
|
+
}
|
|
2282
|
+
function Decode_operationDecoder(yamlCWL) {
|
|
2283
|
+
const cwlVersion = Decode_versionDecoder(yamlCWL);
|
|
2284
|
+
const outputs = Decode_outputsDecoder(yamlCWL);
|
|
2285
|
+
let inputs;
|
|
2286
|
+
const matchValue = Decode_inputsDecoder(yamlCWL);
|
|
2287
|
+
if (matchValue == null) {
|
|
2288
|
+
throw new Error("Inputs are required for an operation");
|
|
2289
|
+
} else {
|
|
2290
|
+
inputs = value(matchValue);
|
|
2291
|
+
}
|
|
2292
|
+
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
2293
|
+
const hints = Decode_hintsDecoder(yamlCWL);
|
|
2294
|
+
const intent = Decode_intentDecoder(yamlCWL);
|
|
2295
|
+
const doc = Decode_docDecoder(yamlCWL);
|
|
2296
|
+
const label = Decode_labelDecoder(yamlCWL);
|
|
2297
|
+
const description = new CWLOperationDescription(inputs, outputs, cwlVersion);
|
|
2298
|
+
let metadata;
|
|
2299
|
+
const md = new DynamicObj();
|
|
2300
|
+
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "label", "doc", "intent", "class", "id", "requirements", "hints", "cwlVersion"]))), yamlCWL);
|
|
2301
|
+
metadata = md;
|
|
2302
|
+
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(singleton$1("id"))), yamlCWL);
|
|
2303
|
+
if (requirements != null) {
|
|
2304
|
+
description.Requirements = requirements;
|
|
2305
|
+
}
|
|
2306
|
+
if (hints != null) {
|
|
2307
|
+
description.Hints = hints;
|
|
2308
|
+
}
|
|
2309
|
+
if (intent != null) {
|
|
2310
|
+
description.Intent = intent;
|
|
2311
|
+
}
|
|
2312
|
+
if (doc != null) {
|
|
2313
|
+
description.Doc = doc;
|
|
2314
|
+
}
|
|
2315
|
+
if (label != null) {
|
|
2316
|
+
description.Label = label;
|
|
2317
|
+
}
|
|
2318
|
+
if (length(metadata.GetProperties(false)) > 0) {
|
|
2319
|
+
description.Metadata = metadata;
|
|
2320
|
+
}
|
|
2321
|
+
return description;
|
|
2322
|
+
}
|
|
2323
|
+
function Decode_workflowDecoder(yamlCWL) {
|
|
2324
|
+
const cwlVersion = Decode_versionDecoder(yamlCWL);
|
|
2325
|
+
const outputs = Decode_outputsDecoder(yamlCWL);
|
|
2326
|
+
let inputs;
|
|
2327
|
+
const matchValue = Decode_inputsDecoder(yamlCWL);
|
|
2328
|
+
if (matchValue == null) {
|
|
2329
|
+
throw new Error("Inputs are required for a workflow");
|
|
2330
|
+
} else {
|
|
2331
|
+
inputs = value(matchValue);
|
|
2332
|
+
}
|
|
2333
|
+
const requirements = Decode_requirementsDecoder(yamlCWL);
|
|
2334
|
+
const hints = Decode_hintsDecoder(yamlCWL);
|
|
2335
|
+
const intent = Decode_intentDecoder(yamlCWL);
|
|
2336
|
+
const steps = Decode_stepsDecoderWithVersion(cwlVersion)(yamlCWL);
|
|
2337
|
+
const doc = Decode_docDecoder(yamlCWL);
|
|
2338
|
+
const label = Decode_labelDecoder(yamlCWL);
|
|
2339
|
+
const description = new CWLWorkflowDescription(steps, inputs, outputs, cwlVersion);
|
|
2340
|
+
let metadata;
|
|
2341
|
+
const md = new DynamicObj();
|
|
2342
|
+
object((get$) => Decode_overflowDecoder(md, get$.Overflow.FieldList(ofArray(["inputs", "outputs", "label", "doc", "intent", "class", "steps", "id", "requirements", "hints", "cwlVersion"]))), yamlCWL);
|
|
2343
|
+
metadata = md;
|
|
2344
|
+
object((get$_1) => Decode_overflowDecoder(description, get$_1.MultipleOptional.FieldList(singleton$1("id"))), yamlCWL);
|
|
2345
|
+
if (requirements != null) {
|
|
2346
|
+
description.Requirements = requirements;
|
|
2347
|
+
}
|
|
2348
|
+
if (hints != null) {
|
|
2349
|
+
description.Hints = hints;
|
|
2350
|
+
}
|
|
2351
|
+
if (intent != null) {
|
|
2352
|
+
description.Intent = intent;
|
|
2353
|
+
}
|
|
2354
|
+
if (doc != null) {
|
|
2355
|
+
description.Doc = doc;
|
|
2356
|
+
}
|
|
2357
|
+
if (label != null) {
|
|
2358
|
+
description.Label = label;
|
|
2359
|
+
}
|
|
2360
|
+
if (length(metadata.GetProperties(false)) > 0) {
|
|
2361
|
+
description.Metadata = metadata;
|
|
2362
|
+
}
|
|
2363
|
+
return description;
|
|
2364
|
+
}
|
|
2365
|
+
function Decode_decodeCWLProcessingUnitElement(yamlCWL) {
|
|
2366
|
+
const cls = Decode_classDecoder(yamlCWL);
|
|
2367
|
+
switch (cls) {
|
|
2368
|
+
case "CommandLineTool":
|
|
2369
|
+
return CWLProcessingUnit_CommandLineTool(Decode_commandLineToolDecoder(yamlCWL));
|
|
2370
|
+
case "Workflow":
|
|
2371
|
+
return CWLProcessingUnit_Workflow(Decode_workflowDecoder(yamlCWL));
|
|
2372
|
+
case "ExpressionTool":
|
|
2373
|
+
return CWLProcessingUnit_ExpressionTool(Decode_expressionToolDecoder(yamlCWL));
|
|
2374
|
+
case "Operation":
|
|
2375
|
+
return CWLProcessingUnit_Operation(Decode_operationDecoder(yamlCWL));
|
|
2376
|
+
default:
|
|
2377
|
+
throw new Error(`Invalid or unsupported CWL class: ${cls}`);
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
const Decode_stepArrayDecoder = (value) => Decode_stepArrayDecoderWithVersion("v1.2", value);
|
|
2381
|
+
const Decode_stepsDecoder = Decode_stepsDecoderWithVersion("v1.2");
|
|
2382
|
+
function Decode_decodeCommandLineTool(cwl) {
|
|
2383
|
+
return Decode_commandLineToolDecoder(Decode_readSanitizedYaml(cwl));
|
|
2384
|
+
}
|
|
2385
|
+
function Decode_decodeWorkflow(cwl) {
|
|
2386
|
+
return Decode_workflowDecoder(Decode_readSanitizedYaml(cwl));
|
|
2387
|
+
}
|
|
2388
|
+
function Decode_decodeExpressionTool(cwl) {
|
|
2389
|
+
return Decode_expressionToolDecoder(Decode_readSanitizedYaml(cwl));
|
|
2390
|
+
}
|
|
2391
|
+
function Decode_decodeOperation(cwl) {
|
|
2392
|
+
return Decode_operationDecoder(Decode_readSanitizedYaml(cwl));
|
|
2393
|
+
}
|
|
2394
|
+
function Decode_decodeCWLProcessingUnit(cwl) {
|
|
2395
|
+
return Decode_decodeCWLProcessingUnitElement(Decode_readSanitizedYaml(cwl));
|
|
2396
|
+
}
|
|
2397
|
+
function DecodeParameters_cwlParameterReferenceDecoder(get$, key, yEle) {
|
|
2398
|
+
let v_1;
|
|
2399
|
+
let matchResult, v, v1, v2, s;
|
|
2400
|
+
if (yEle.tag === /* Object */
|
|
2401
|
+
3) {
|
|
2402
|
+
if (!isEmpty(yEle.fields[0])) {
|
|
2403
|
+
switch (head(yEle.fields[0]).tag) {
|
|
2404
|
+
case /* Value */
|
|
2405
|
+
1: {
|
|
2406
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
2407
|
+
matchResult = 0;
|
|
2408
|
+
v = head(yEle.fields[0]).fields[0];
|
|
2409
|
+
} else {
|
|
2410
|
+
matchResult = 3;
|
|
2411
|
+
}
|
|
2412
|
+
break;
|
|
2413
|
+
}
|
|
2414
|
+
case /* Mapping */
|
|
2415
|
+
0: {
|
|
2416
|
+
if (head(yEle.fields[0]).fields[1].tag === /* Object */
|
|
2417
|
+
3) {
|
|
2418
|
+
if (!isEmpty(head(yEle.fields[0]).fields[1].fields[0])) {
|
|
2419
|
+
if (head(head(yEle.fields[0]).fields[1].fields[0]).tag === /* Value */
|
|
2420
|
+
1) {
|
|
2421
|
+
if (isEmpty(tail(head(yEle.fields[0]).fields[1].fields[0]))) {
|
|
2422
|
+
if (!isEmpty(tail(yEle.fields[0]))) {
|
|
2423
|
+
if (head(tail(yEle.fields[0])).tag === /* Mapping */
|
|
2424
|
+
0) {
|
|
2425
|
+
if (head(tail(yEle.fields[0])).fields[1].tag === /* Object */
|
|
2426
|
+
3) {
|
|
2427
|
+
if (!isEmpty(head(tail(yEle.fields[0])).fields[1].fields[0])) {
|
|
2428
|
+
if (head(head(tail(yEle.fields[0])).fields[1].fields[0]).tag === /* Value */
|
|
2429
|
+
1) {
|
|
2430
|
+
if (isEmpty(tail(head(tail(yEle.fields[0])).fields[1].fields[0]))) {
|
|
2431
|
+
if (isEmpty(tail(tail(yEle.fields[0])))) {
|
|
2432
|
+
matchResult = 1;
|
|
2433
|
+
v1 = head(head(yEle.fields[0]).fields[1].fields[0]).fields[0];
|
|
2434
|
+
v2 = head(head(tail(yEle.fields[0])).fields[1].fields[0]).fields[0];
|
|
2435
|
+
} else {
|
|
2436
|
+
matchResult = 3;
|
|
2437
|
+
}
|
|
2438
|
+
} else {
|
|
2439
|
+
matchResult = 3;
|
|
2440
|
+
}
|
|
2441
|
+
} else {
|
|
2442
|
+
matchResult = 3;
|
|
2443
|
+
}
|
|
2444
|
+
} else {
|
|
2445
|
+
matchResult = 3;
|
|
2446
|
+
}
|
|
2447
|
+
} else {
|
|
2448
|
+
matchResult = 3;
|
|
2449
|
+
}
|
|
2450
|
+
} else {
|
|
2451
|
+
matchResult = 3;
|
|
2452
|
+
}
|
|
2453
|
+
} else {
|
|
2454
|
+
matchResult = 3;
|
|
2455
|
+
}
|
|
2456
|
+
} else {
|
|
2457
|
+
matchResult = 3;
|
|
2458
|
+
}
|
|
2459
|
+
} else {
|
|
2460
|
+
matchResult = 3;
|
|
2461
|
+
}
|
|
2462
|
+
} else {
|
|
2463
|
+
matchResult = 3;
|
|
2464
|
+
}
|
|
2465
|
+
} else {
|
|
2466
|
+
matchResult = 3;
|
|
2467
|
+
}
|
|
2468
|
+
break;
|
|
2469
|
+
}
|
|
2470
|
+
case /* Sequence */
|
|
2471
|
+
2: {
|
|
2472
|
+
if (isEmpty(tail(yEle.fields[0]))) {
|
|
2473
|
+
matchResult = 2;
|
|
2474
|
+
s = head(yEle.fields[0]).fields[0];
|
|
2475
|
+
} else {
|
|
2476
|
+
matchResult = 3;
|
|
2477
|
+
}
|
|
2478
|
+
break;
|
|
2479
|
+
}
|
|
2480
|
+
default:
|
|
2481
|
+
matchResult = 3;
|
|
2482
|
+
}
|
|
2483
|
+
} else {
|
|
2484
|
+
matchResult = 3;
|
|
2485
|
+
}
|
|
2486
|
+
} else {
|
|
2487
|
+
matchResult = 3;
|
|
2488
|
+
}
|
|
2489
|
+
switch (matchResult) {
|
|
2490
|
+
case 0:
|
|
2491
|
+
return new CWLParameterReference(key, [v.Value]);
|
|
2492
|
+
case 1:
|
|
2493
|
+
return new CWLParameterReference(key, [v2.Value], Decode_cwlTypeStringMatcher(v1.Value, get$)[0]);
|
|
2494
|
+
case 2: {
|
|
2495
|
+
const matchValue = tryHead(s);
|
|
2496
|
+
let matchResult_1, mappings;
|
|
2497
|
+
if (matchValue != null) {
|
|
2498
|
+
if (value(matchValue).tag === /* Object */
|
|
2499
|
+
3) {
|
|
2500
|
+
matchResult_1 = 0;
|
|
2501
|
+
mappings = value(matchValue).fields[0];
|
|
2502
|
+
} else {
|
|
2503
|
+
matchResult_1 = 1;
|
|
2504
|
+
}
|
|
2505
|
+
} else {
|
|
2506
|
+
matchResult_1 = 1;
|
|
2507
|
+
}
|
|
2508
|
+
switch (matchResult_1) {
|
|
2509
|
+
case 0:
|
|
2510
|
+
if (!exists((_arg) => {
|
|
2511
|
+
if (_arg.tag === /* Mapping */
|
|
2512
|
+
0) {
|
|
2513
|
+
return true;
|
|
2514
|
+
} else {
|
|
2515
|
+
return false;
|
|
2516
|
+
}
|
|
2517
|
+
}, mappings)) {
|
|
2518
|
+
return new CWLParameterReference(key, resizearray(string, YAMLElement_Sequence(s)));
|
|
2519
|
+
} else if (exists((_arg_1) => {
|
|
2520
|
+
let matchResult_2, k_1;
|
|
2521
|
+
if (_arg_1.tag === /* Mapping */
|
|
2522
|
+
0) {
|
|
2523
|
+
if (_arg_1.fields[0].Value === "class") {
|
|
2524
|
+
matchResult_2 = 0;
|
|
2525
|
+
k_1 = _arg_1.fields[0];
|
|
2526
|
+
} else {
|
|
2527
|
+
matchResult_2 = 1;
|
|
2528
|
+
}
|
|
2529
|
+
} else {
|
|
2530
|
+
matchResult_2 = 1;
|
|
2531
|
+
}
|
|
2532
|
+
switch (matchResult_2) {
|
|
2533
|
+
case 0:
|
|
2534
|
+
return true;
|
|
2535
|
+
default:
|
|
2536
|
+
return false;
|
|
2537
|
+
}
|
|
2538
|
+
}, mappings)) {
|
|
2539
|
+
const paths = [];
|
|
2540
|
+
const enumerator = getEnumerator(s);
|
|
2541
|
+
try {
|
|
2542
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
2543
|
+
const item = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
2544
|
+
if (item.tag === /* Object */
|
|
2545
|
+
3) {
|
|
2546
|
+
const enumerator_1 = getEnumerator(item.fields[0]);
|
|
2547
|
+
try {
|
|
2548
|
+
while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
|
|
2549
|
+
const mapping = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
2550
|
+
let matchResult_3, k_3, v_2;
|
|
2551
|
+
if (mapping.tag === /* Mapping */
|
|
2552
|
+
0) {
|
|
2553
|
+
if (mapping.fields[1].tag === /* Object */
|
|
2554
|
+
3) {
|
|
2555
|
+
if (!isEmpty(mapping.fields[1].fields[0])) {
|
|
2556
|
+
if (head(mapping.fields[1].fields[0]).tag === /* Value */
|
|
2557
|
+
1) {
|
|
2558
|
+
if (isEmpty(tail(mapping.fields[1].fields[0]))) {
|
|
2559
|
+
if (v_1 = head(mapping.fields[1].fields[0]).fields[0], mapping.fields[0].Value === "path") {
|
|
2560
|
+
matchResult_3 = 0;
|
|
2561
|
+
k_3 = mapping.fields[0];
|
|
2562
|
+
v_2 = head(mapping.fields[1].fields[0]).fields[0];
|
|
2563
|
+
} else {
|
|
2564
|
+
matchResult_3 = 1;
|
|
2565
|
+
}
|
|
2566
|
+
} else {
|
|
2567
|
+
matchResult_3 = 1;
|
|
2568
|
+
}
|
|
2569
|
+
} else {
|
|
2570
|
+
matchResult_3 = 1;
|
|
2571
|
+
}
|
|
2572
|
+
} else {
|
|
2573
|
+
matchResult_3 = 1;
|
|
2574
|
+
}
|
|
2575
|
+
} else {
|
|
2576
|
+
matchResult_3 = 1;
|
|
2577
|
+
}
|
|
2578
|
+
} else {
|
|
2579
|
+
matchResult_3 = 1;
|
|
2580
|
+
}
|
|
2581
|
+
switch (matchResult_3) {
|
|
2582
|
+
case 0: {
|
|
2583
|
+
void paths.push(v_2.Value);
|
|
2584
|
+
break;
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
} finally {
|
|
2589
|
+
disposeSafe(enumerator_1);
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
} finally {
|
|
2594
|
+
disposeSafe(enumerator);
|
|
2595
|
+
}
|
|
2596
|
+
return new CWLParameterReference(key, paths, CWLType_Array(new InputArraySchema(CWLType_File(FileInstance_$ctor()), void 0, void 0, void 0)));
|
|
2597
|
+
} else {
|
|
2598
|
+
return new CWLParameterReference(key, []);
|
|
2599
|
+
}
|
|
2600
|
+
default:
|
|
2601
|
+
return new CWLParameterReference(key, resizearray(string, YAMLElement_Sequence(s)));
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
default:
|
|
2605
|
+
throw new Error(toText(interpolate("Unexpected YAMLElement format in cwlParameterReferenceDecoder: %A%P()", [yEle])));
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
const DecodeParameters_cwlparameterReferenceArrayDecoder = (value) => object((get$) => {
|
|
2609
|
+
const dict = get$.Overflow.FieldList(empty());
|
|
2610
|
+
const collection = toArray(delay(() => map$2((ele) => DecodeParameters_cwlParameterReferenceDecoder(get$, ele[0], ele[1]), dict)));
|
|
2611
|
+
return Array.from(collection);
|
|
2612
|
+
}, value);
|
|
2613
|
+
function DecodeParameters_decodeYAMLParameterFile(yaml) {
|
|
2614
|
+
return DecodeParameters_cwlparameterReferenceArrayDecoder(read(yaml));
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
export { DecodeParameters_cwlParameterReferenceDecoder, DecodeParameters_cwlparameterReferenceArrayDecoder, DecodeParameters_decodeYAMLParameterFile, Decode_baseCommandDecoder, Decode_boolOptionFieldDecoder, Decode_classDecoder, Decode_commandLineToolDecoder, Decode_cwlSimpleTypeFromString, Decode_cwlTypeDecoder, Decode_cwlTypeDecoder$0027, Decode_cwlTypeStringMatcher, Decode_decodeCWLProcessingUnit, Decode_decodeCWLProcessingUnitElement, Decode_decodeCommandLineTool, Decode_decodeExpressionTool, Decode_decodeHintElement, Decode_decodeOperation, Decode_decodeResourceScalar, Decode_decodeSchemaSaladString, Decode_decodeStepInputFromArrayItem, Decode_decodeStepInputFromValue, Decode_decodeStepInputsFromArray, Decode_decodeStepInputsFromMap, Decode_decodeStepOutputItem, Decode_decodeStringArrayOrScalar, Decode_decodeStringOrExpression, Decode_decodeWorkflow, Decode_decodeWorkflowStepFromArrayItem, Decode_decodeWorkflowStepFromValueWithId, Decode_direntDecoder, Decode_docDecoder, Decode_dockerRequirementDecoder, Decode_envVarRequirementDecoder, Decode_expressionStringOptionFieldDecoder, Decode_expressionToolDecoder, Decode_hasField, Decode_hintArrayDecoder, Decode_hintsDecoder, Decode_initialWorkDirEntryDecoder, Decode_initialWorkDirRequirementDecoder, Decode_inlineJavascriptRequirementDecoder, Decode_inplaceUpdateRequirementDecoder, Decode_inputArrayDecoder, Decode_inputArraySchemaDecoder, Decode_inputBindingDecoder, Decode_inputEnumSchemaDecoder, Decode_inputRecordFieldDecoder, Decode_inputRecordSchemaDecoder, Decode_inputStepDecoder, Decode_inputsDecoder, Decode_intentDecoder, Decode_isRecoverableDecodingError, Decode_labelDecoder, Decode_linkMergeFieldDecoder, Decode_loadListingRequirementDecoder, Decode_networkAccessRequirementDecoder, Decode_normalizeYamlInput, Decode_operationDecoder, Decode_optionalResourceField, Decode_outputArrayDecoder, Decode_outputBindingDecoder, Decode_outputBindingGlobDecoder, Decode_outputSourceDecoder, Decode_outputStepsDecoder, Decode_outputsDecoder, Decode_overflowDecoder, Decode_parseArrayShorthand, Decode_pickValueFieldDecoder, Decode_readSanitizedYaml, Decode_removeFullLineComments, Decode_removeYamlComments, Decode_requirementArrayDecoder, Decode_requirementFromTypeName, Decode_requirementsDecoder, Decode_resourceRequirementDecoder, Decode_scatterFieldDecoder, Decode_scatterMethodFieldDecoder, Decode_schemaDefRequirementDecoder, Decode_schemaDefRequirementTypeDecoder, Decode_softwareRequirementDecoder, Decode_sourceArrayFieldDecoder, Decode_stepArrayDecoder, Decode_stepArrayDecoderWithVersion, Decode_stepsDecoder, Decode_stepsDecoderWithVersion, Decode_stringFieldDecoder, Decode_stringOptionFieldDecoder, Decode_stringOrStringArrayDecoder, Decode_toolTimeLimitRequirementDecoder, Decode_tryDecodeBoolScalar, Decode_tryDecodeFieldsAsArray, Decode_tryDecodeFieldsAsMap, Decode_tryDecodeKnownRequirementFromElement, Decode_versionDecoder, Decode_withDefaultCwlVersion, Decode_workReuseRequirementDecoder, Decode_workflowDecoder, Decode_workflowStepRunDecoder, Decode_yamlElementOptionFieldDecoder, ResizeArray_map, inputArraySchemaDecoder$0040261, inputArraySchemaDecoder$0040261$002D1, inputEnumSchemaDecoder$0040341, inputEnumSchemaDecoder$0040341$002D1, inputRecordFieldDecoder$0040275, inputRecordFieldDecoder$0040275$002D1, inputRecordSchemaDecoder$0040314, inputRecordSchemaDecoder$0040314$002D1 };
|