@nfdi4plants/arctrl 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ts/index.d.ts +44 -7
- package/dist/ts/index.d.ts.map +1 -1
- package/dist/ts/index.js +45 -8
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Array.js +195 -92
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Async.js +251 -30
- package/dist/ts/node_modules/@fable-org/fable-library-ts/AsyncBuilder.js +61 -11
- package/dist/ts/node_modules/@fable-org/fable-library-ts/BigInt.js +15 -5
- package/dist/ts/node_modules/@fable-org/fable-library-ts/BitConverter.js +139 -0
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Date.js +1 -1
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Decimal.js +68 -12
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Double.js +24 -10
- package/dist/ts/node_modules/@fable-org/fable-library-ts/FSharp.Core.js +8 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Global.js +1 -1
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Int32.js +11 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/List.js +220 -155
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Long.js +7 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Map.js +46 -39
- package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableMap.js +75 -92
- package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableSet.js +56 -76
- package/dist/ts/node_modules/@fable-org/fable-library-ts/NumberStyles.js +54 -0
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Numeric.js +10 -5
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Random.js +3 -4
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Range.js +4 -3
- package/dist/ts/node_modules/@fable-org/fable-library-ts/RegExp.js +2 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq.js +128 -64
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq2.js +4 -8
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Set.js +64 -57
- package/dist/ts/node_modules/@fable-org/fable-library-ts/String.js +68 -21
- package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Collections.Generic.js +3 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Text.js +2 -2
- package/dist/ts/node_modules/@fable-org/fable-library-ts/System.js +5 -5
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Types.js +23 -12
- package/dist/ts/node_modules/@fable-org/fable-library-ts/Util.js +88 -49
- package/dist/ts/node_modules/@fable-org/fable-library-ts/lib/big.js +121 -74
- package/dist/ts/ts/ARC.d.ts +19 -2
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +128 -89
- package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts +0 -2
- package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts.map +1 -1
- package/dist/ts/ts/CWL/CWLKnownFieldNames.js +1 -7
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +46 -27
- package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -1
- package/dist/ts/ts/CWL/CWLProcessingUnit.js +312 -123
- package/dist/ts/ts/CWL/CWLTypes.d.ts +481 -148
- package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -1
- package/dist/ts/ts/CWL/CWLTypes.js +887 -201
- package/dist/ts/ts/CWL/Decode.d.ts +480 -211
- package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Decode.js +3614 -2462
- package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts +9 -0
- package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts.map +1 -1
- package/dist/ts/ts/CWL/DynamicObjHelpers.js +55 -5
- package/dist/ts/ts/CWL/Encode.d.ts +225 -85
- package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Encode.js +1858 -970
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +42 -28
- package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ExpressionToolDescription.js +34 -13
- package/dist/ts/ts/CWL/HashHelpers.d.ts +38 -0
- package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -1
- package/dist/ts/ts/CWL/HashHelpers.js +255 -6
- package/dist/ts/ts/CWL/Inputs.d.ts +127 -56
- package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Inputs.js +107 -16
- package/dist/ts/ts/CWL/OperationDescription.d.ts +41 -21
- package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/OperationDescription.js +35 -9
- package/dist/ts/ts/CWL/Outputs.d.ts +93 -42
- package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Outputs.js +101 -19
- package/dist/ts/ts/CWL/ParameterReference.d.ts +11 -8
- package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ParameterReference.js +18 -25
- package/dist/ts/ts/CWL/ParameterValue.d.ts +15 -1
- package/dist/ts/ts/CWL/ParameterValue.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ParameterValue.js +59 -35
- package/dist/ts/ts/CWL/Requirements.d.ts +240 -98
- package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -1
- package/dist/ts/ts/CWL/Requirements.js +462 -89
- package/dist/ts/ts/CWL/ScalarQuoting.d.ts +51 -0
- package/dist/ts/ts/CWL/ScalarQuoting.d.ts.map +1 -0
- package/dist/ts/ts/CWL/ScalarQuoting.js +250 -0
- package/dist/ts/ts/CWL/ToolDescription.d.ts +63 -50
- package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/ToolDescription.js +34 -13
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts +45 -26
- package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -1
- package/dist/ts/ts/CWL/WorkflowDescription.js +38 -11
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts +248 -65
- package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -1
- package/dist/ts/ts/CWL/WorkflowSteps.js +413 -43
- package/dist/ts/ts/CWLRunResolver.d.ts +30 -12
- package/dist/ts/ts/CWLRunResolver.d.ts.map +1 -1
- package/dist/ts/ts/CWLRunResolver.js +221 -86
- package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ARC.js +13 -14
- package/dist/ts/ts/Contract/ArcAssay.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcAssay.js +4 -4
- package/dist/ts/ts/Contract/ArcInvestigation.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcInvestigation.js +3 -4
- package/dist/ts/ts/Contract/ArcRun.d.ts +12 -2
- package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcRun.js +47 -20
- package/dist/ts/ts/Contract/ArcStudy.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcStudy.js +4 -4
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts +18 -4
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcWorkflow.js +55 -17
- package/dist/ts/ts/Contract/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Contract/Datamap.js +16 -17
- package/dist/ts/ts/Contract/Git.js +1 -1
- package/dist/ts/ts/Contract/ValidationPackagesConfig.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ValidationPackagesConfig.js +4 -5
- package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/ContractIO.js +15 -16
- package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Assay.js +26 -18
- package/dist/ts/ts/Conversion/Basic.d.ts +4 -0
- package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Basic.js +55 -31
- package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/ColumnIndex.js +2 -4
- package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/DateTime.js +1 -2
- package/dist/ts/ts/Conversion/Investigation.js +11 -11
- package/dist/ts/ts/Conversion/Person.js +11 -11
- package/dist/ts/ts/Conversion/Process.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Process.js +107 -86
- package/dist/ts/ts/Conversion/Run.d.ts +36 -6
- package/dist/ts/ts/Conversion/Run.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Run.js +320 -136
- package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/ScholarlyArticle.js +75 -9
- package/dist/ts/ts/Conversion/Study.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Study.js +23 -12
- package/dist/ts/ts/Conversion/Table.js +5 -5
- package/dist/ts/ts/Conversion/Workflow.d.ts +48 -9
- package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Conversion/Workflow.js +655 -163
- package/dist/ts/ts/Conversion.js +6 -6
- package/dist/ts/ts/Core/ArcTypes.d.ts +73 -28
- package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/ts/Core/ArcTypes.js +219 -129
- package/dist/ts/ts/Core/Comment.d.ts.map +1 -1
- package/dist/ts/ts/Core/Comment.js +2 -2
- package/dist/ts/ts/Core/CommentList.js +7 -7
- package/dist/ts/ts/Core/Conversion.d.ts.map +1 -1
- package/dist/ts/ts/Core/Conversion.js +41 -41
- package/dist/ts/ts/Core/Data.d.ts.map +1 -1
- package/dist/ts/ts/Core/Data.js +14 -11
- package/dist/ts/ts/Core/DataContext.d.ts +1 -1
- package/dist/ts/ts/Core/DataContext.d.ts.map +1 -1
- package/dist/ts/ts/Core/DataContext.js +4 -4
- package/dist/ts/ts/Core/DataFile.d.ts +11 -8
- package/dist/ts/ts/Core/DataFile.d.ts.map +1 -1
- package/dist/ts/ts/Core/DataFile.js +55 -61
- package/dist/ts/ts/Core/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Core/Datamap.js +2 -3
- package/dist/ts/ts/Core/Helper/Collections.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Collections.js +2 -4
- package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Identifier.js +12 -15
- package/dist/ts/ts/Core/Helper/ORCID.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/ORCID.js +2 -3
- package/dist/ts/ts/Core/Helper/Regex.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Regex.js +52 -53
- package/dist/ts/ts/Core/Helper/SemVer.d.ts +13 -3
- package/dist/ts/ts/Core/Helper/SemVer.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/SemVer.js +96 -6
- package/dist/ts/ts/Core/Helper/Url.d.ts.map +1 -1
- package/dist/ts/ts/Core/Helper/Url.js +1 -1
- package/dist/ts/ts/Core/OntologyAnnotation.js +22 -22
- package/dist/ts/ts/Core/Person.d.ts.map +1 -1
- package/dist/ts/ts/Core/Person.js +2 -2
- package/dist/ts/ts/Core/Process/ColumnIndex.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ColumnIndex.js +10 -12
- package/dist/ts/ts/Core/Process/Component.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Component.js +22 -22
- package/dist/ts/ts/Core/Process/Factor.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Factor.js +7 -7
- package/dist/ts/ts/Core/Process/FactorValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/FactorValue.js +15 -15
- package/dist/ts/ts/Core/Process/Material.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Material.js +2 -2
- package/dist/ts/ts/Core/Process/MaterialAttribute.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/MaterialAttribute.js +6 -6
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +16 -16
- package/dist/ts/ts/Core/Process/Process.js +21 -21
- package/dist/ts/ts/Core/Process/ProcessInput.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProcessInput.js +2 -2
- package/dist/ts/ts/Core/Process/ProcessOutput.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProcessOutput.js +2 -2
- package/dist/ts/ts/Core/Process/ProcessParameterValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProcessParameterValue.js +17 -17
- package/dist/ts/ts/Core/Process/ProcessSequence.js +4 -4
- package/dist/ts/ts/Core/Process/Protocol.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/Protocol.js +9 -9
- package/dist/ts/ts/Core/Process/ProtocolParameter.d.ts.map +1 -1
- package/dist/ts/ts/Core/Process/ProtocolParameter.js +6 -6
- package/dist/ts/ts/Core/Publication.d.ts.map +1 -1
- package/dist/ts/ts/Core/Publication.js +3 -3
- package/dist/ts/ts/Core/ScalarValue.d.ts.map +1 -1
- package/dist/ts/ts/Core/ScalarValue.js +9 -13
- package/dist/ts/ts/Core/Table/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/ArcTable.js +18 -18
- package/dist/ts/ts/Core/Table/ArcTableAux.d.ts +1 -1
- package/dist/ts/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/ArcTableAux.js +50 -70
- package/dist/ts/ts/Core/Table/ArcTables.js +16 -16
- package/dist/ts/ts/Core/Table/CompositeHeader.d.ts.map +1 -1
- package/dist/ts/ts/Core/Table/CompositeHeader.js +5 -6
- package/dist/ts/ts/Core/Templates.d.ts.map +1 -1
- package/dist/ts/ts/Core/Templates.js +2 -2
- package/dist/ts/ts/FileSystem/Path.d.ts +13 -2
- package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/Path.js +37 -19
- package/dist/ts/ts/Json/Assay.js +22 -22
- package/dist/ts/ts/Json/Comment.js +9 -9
- package/dist/ts/ts/Json/Data.d.ts.map +1 -1
- package/dist/ts/ts/Json/Data.js +11 -11
- package/dist/ts/ts/Json/Datamap/DataContext.js +2 -2
- package/dist/ts/ts/Json/Decode.d.ts.map +1 -1
- package/dist/ts/ts/Json/Decode.js +3 -5
- package/dist/ts/ts/Json/Encode.js +2 -2
- package/dist/ts/ts/Json/Investigation.d.ts.map +1 -1
- package/dist/ts/ts/Json/Investigation.js +20 -20
- package/dist/ts/ts/Json/OntologyAnnotation.d.ts.map +1 -1
- package/dist/ts/ts/Json/OntologyAnnotation.js +18 -18
- package/dist/ts/ts/Json/OntologySourceReference.d.ts.map +1 -1
- package/dist/ts/ts/Json/OntologySourceReference.js +9 -9
- package/dist/ts/ts/Json/Person.d.ts.map +1 -1
- package/dist/ts/ts/Json/Person.js +20 -20
- package/dist/ts/ts/Json/Process/AssayMaterials.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/AssayMaterials.js +1 -2
- package/dist/ts/ts/Json/Process/Component.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Component.js +5 -6
- package/dist/ts/ts/Json/Process/Factor.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Factor.js +7 -7
- package/dist/ts/ts/Json/Process/FactorValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/FactorValue.js +2 -3
- package/dist/ts/ts/Json/Process/Material.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Material.js +9 -10
- package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttribute.js +5 -6
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +2 -3
- package/dist/ts/ts/Json/Process/Process.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Process.js +8 -9
- package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/ProcessParameterValue.js +1 -2
- package/dist/ts/ts/Json/Process/Protocol.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Protocol.js +17 -17
- package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/ProtocolParameter.js +6 -6
- package/dist/ts/ts/Json/Process/Sample.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Sample.js +9 -9
- package/dist/ts/ts/Json/Process/Source.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/Source.js +10 -11
- package/dist/ts/ts/Json/Process/StudyMaterials.d.ts.map +1 -1
- package/dist/ts/ts/Json/Process/StudyMaterials.js +1 -2
- package/dist/ts/ts/Json/PropertyValue.d.ts.map +1 -1
- package/dist/ts/ts/Json/PropertyValue.js +24 -24
- package/dist/ts/ts/Json/Publication.d.ts.map +1 -1
- package/dist/ts/ts/Json/Publication.js +10 -10
- package/dist/ts/ts/Json/ROCrate/LDContext.js +1 -2
- package/dist/ts/ts/Json/ROCrate/LDGraph.js +2 -2
- package/dist/ts/ts/Json/ROCrate/LDNode.js +5 -5
- package/dist/ts/ts/Json/Run.js +9 -9
- package/dist/ts/ts/Json/StringTable.d.ts.map +1 -1
- package/dist/ts/ts/Json/StringTable.js +4 -7
- package/dist/ts/ts/Json/Study.js +20 -20
- package/dist/ts/ts/Json/Table/CellTable.js +1 -2
- package/dist/ts/ts/Json/Table/OATable.js +1 -2
- package/dist/ts/ts/Json/Workflow.js +9 -9
- package/dist/ts/ts/Json.d.ts +121 -1
- package/dist/ts/ts/Json.d.ts.map +1 -1
- package/dist/ts/ts/Json.js +310 -2
- package/dist/ts/ts/JsonIO/Comment.d.ts +15 -0
- package/dist/ts/ts/JsonIO/Comment.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Comment.js +67 -0
- package/dist/ts/ts/JsonIO/Data.d.ts +9 -0
- package/dist/ts/ts/JsonIO/Data.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Data.js +49 -0
- package/dist/ts/ts/JsonIO/DataFile.d.ts +9 -0
- package/dist/ts/ts/JsonIO/DataFile.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/DataFile.js +48 -0
- package/dist/ts/ts/JsonIO/LDObject.d.ts +6 -0
- package/dist/ts/ts/JsonIO/LDObject.d.ts.map +1 -1
- package/dist/ts/ts/JsonIO/LDObject.js +173 -17
- package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts +15 -0
- package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/OntologySourceReference.js +67 -0
- package/dist/ts/ts/JsonIO/Publication.d.ts +15 -0
- package/dist/ts/ts/JsonIO/Publication.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Publication.js +68 -0
- package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts +9 -0
- package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/ArcTable.js +74 -0
- package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts +6 -0
- package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/CompositeCell.js +29 -0
- package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts +6 -0
- package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/CompositeHeader.js +29 -0
- package/dist/ts/ts/JsonIO/Table/IOType.d.ts +6 -0
- package/dist/ts/ts/JsonIO/Table/IOType.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Table/IOType.js +29 -0
- package/dist/ts/ts/License.d.ts.map +1 -1
- package/dist/ts/ts/License.js +6 -6
- package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDContext.js +31 -39
- package/dist/ts/ts/ROCrate/LDObject.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDObject.js +56 -49
- package/dist/ts/ts/ROCrate/LDTypes/Comment.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +5 -5
- package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts +1 -0
- package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.js +3 -0
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/Dataset.js +22 -17
- package/dist/ts/ts/ROCrate/LDTypes/DefinedTerm.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/File.js +5 -5
- package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +2 -2
- package/dist/ts/ts/ROCrate/LDTypes/LabProcess.js +9 -9
- package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.js +4 -4
- package/dist/ts/ts/ROCrate/LDTypes/Organization.js +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/Person.js +7 -7
- package/dist/ts/ts/ROCrate/LDTypes/PostalAddress.js +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.js +45 -48
- package/dist/ts/ts/ROCrate/LDTypes/Sample.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/ScholarlyArticle.js +4 -4
- package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +3 -3
- package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +2 -2
- package/dist/ts/ts/ROCrateIO.d.ts +18 -4
- package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/ts/ROCrateIO.js +49 -38
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +9 -10
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +7 -7
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +6 -8
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +20 -20
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +7 -7
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +8 -8
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcRun.js +5 -6
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +3 -3
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +5 -6
- package/dist/ts/ts/Spreadsheet/CollectionAux.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/CollectionAux.js +10 -14
- package/dist/ts/ts/Spreadsheet/Datamap.js +1 -2
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapColumn.js +3 -3
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapHeader.js +10 -10
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.js +9 -10
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +5 -5
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +2 -2
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +4 -4
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +3 -3
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +5 -5
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +4 -4
- package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +7 -7
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +17 -17
- package/dist/ts/ts/Spreadsheet/Metadata/Study.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Study.js +8 -8
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +5 -5
- package/dist/ts/ts/WorkflowGraph/Adapters.d.ts +1 -1
- package/dist/ts/ts/WorkflowGraph/Adapters.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/Adapters.js +5 -6
- package/dist/ts/ts/WorkflowGraph/Builder.d.ts +25 -6
- package/dist/ts/ts/WorkflowGraph/Builder.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/Builder.js +264 -138
- package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts +6 -0
- package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/GraphTypes.js +4 -1
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts +8 -5
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts.map +1 -1
- package/dist/ts/ts/WorkflowGraph/ReferenceParsing.js +27 -10
- package/dist/ts/ts/Xlsx.js +3 -3
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts +3 -3
- package/dist/ts/ts/Yaml/ValidationPackage.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackage.js +11 -23
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +3 -3
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts.map +1 -1
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +11 -23
- package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/DynamicObj.fs.js +16 -20
- package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/FableJS.fs.js +1 -1
- package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/ReflectionUtils.fs.js +8 -8
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +1 -2
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.6.0/Http.fs.js +4 -4
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCell.fs.js +8 -8
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCellsCollection.fs.js +18 -18
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsAddress.fs.js +3 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorkbook.fs.js +1 -1
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorksheet.fs.js +7 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Value.fs.js +3 -5
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Worksheet.fs.js +7 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Ranges/FsRangeBase.fs.js +1 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Tables/FsTable.fs.js +7 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Cell.fs.js +2 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Table.fs.js +1 -2
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Decode.fs.js +49 -71
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Encode.fs.js +1 -1
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs.js +1 -2
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Compare.fs.js +857 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/CoreSchema.fs.js +725 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Decode.fs.js +1175 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Encode.fs.js +123 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Layout.fs.js +282 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexeme.fs.js +203 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexer.fs.js +1502 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Model.fs.js +564 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Node.fs.js +453 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Parser.fs.js +2622 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Reader.fs.js +108 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Source.fs.js +649 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Tag.fs.js +32 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Validate.fs.js +1084 -0
- package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Writer.fs.js +2927 -0
- package/package.json +5 -4
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Decode.fs.js +0 -1669
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Encode.fs.js +0 -57
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Escapes.fs.js +0 -320
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Interop/JsInterop.fs.js +0 -10
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Persil.fs.js +0 -414
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Preprocessing.fs.js +0 -319
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Reader.fs.js +0 -1884
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Regex.fs.js +0 -23
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/RegexActivePatterns.fs.js +0 -313
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Syntax.fs.js +0 -840
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Writer.fs.js +0 -689
- package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/YAMLiciousTypes.fs.js +0 -359
|
@@ -0,0 +1,1175 @@
|
|
|
1
|
+
import { Record, toString, FSharpException, Union, FSharpRef } from '../../../node_modules/@fable-org/fable-library-ts/Types.js';
|
|
2
|
+
import { isEmpty, empty, cons, FSharpList__get_Head, FSharpList__get_Tail, length, toArray, map, ofArray, exists, append, ofSeq } from '../../../node_modules/@fable-org/fable-library-ts/List.js';
|
|
3
|
+
import { value, some } from '../../../node_modules/@fable-org/fable-library-ts/Option.js';
|
|
4
|
+
import { SourceSpan_$reflection, ScalarStyle, YamlNode_$reflection } from './Model.fs.js';
|
|
5
|
+
import { getEnumerator, disposeSafe, int32ToString, equals, physicalHash, comparePrimitives, safeHash, defaultOf, compare, structuralHash } from '../../../node_modules/@fable-org/fable-library-ts/Util.js';
|
|
6
|
+
import { record_type, string_type, list_type, option_type, class_type, union_type, int32_type, array_type } from '../../../node_modules/@fable-org/fable-library-ts/Reflection.js';
|
|
7
|
+
import { StringBuilder_$ctor, StringBuilder__Append_Z721C83C5 } from '../../../node_modules/@fable-org/fable-library-ts/System.Text.js';
|
|
8
|
+
import { replace, substring, getCharAtIndex } from '../../../node_modules/@fable-org/fable-library-ts/String.js';
|
|
9
|
+
import { YamlTagModule_coreNamespace, YamlTagModule_identifier } from './Tag.fs.js';
|
|
10
|
+
import { YamlNodeModule_isMissingValue } from './Node.fs.js';
|
|
11
|
+
import { CoreSchema_isNull, CoreSchema_resolveKind, CoreSchema_isString, CoreSchema_IntegerNames_$ctor, CoreSchema_resolvesToNull, CoreSchema_IntegerNames__Name_Z721C83C5, CoreSchema_canonicalFloat, CoreSchema_tryParseInt, CoreSchema_tryParseInt64, CoreSchema_tryParseFloat, CoreSchema_tryParseBool } from './CoreSchema.fs.js';
|
|
12
|
+
import { tryGetValue, getItemFromDict } from '../../../node_modules/@fable-org/fable-library-ts/MapUtil.js';
|
|
13
|
+
import { item, map as map$1, fill, setItem, sortBy } from '../../../node_modules/@fable-org/fable-library-ts/Array.js';
|
|
14
|
+
import { Dictionary } from '../../../node_modules/@fable-org/fable-library-ts/MutableMap.js';
|
|
15
|
+
import { minValue, tryParse } from '../../../node_modules/@fable-org/fable-library-ts/Date.js';
|
|
16
|
+
import { minValue as minValue$1, tryParse as tryParse$1 } from '../../../node_modules/@fable-org/fable-library-ts/DateOffset.js';
|
|
17
|
+
import { toList, delay, collect, singleton, empty as empty$1 } from '../../../node_modules/@fable-org/fable-library-ts/Seq.js';
|
|
18
|
+
import { rangeDouble } from '../../../node_modules/@fable-org/fable-library-ts/Range.js';
|
|
19
|
+
import { ofSeq as ofSeq$1 } from '../../../node_modules/@fable-org/fable-library-ts/Map.js';
|
|
20
|
+
import { FSharpResult$2_Ok, FSharpResult$2_Error$ } from '../../../node_modules/@fable-org/fable-library-ts/Result.js';
|
|
21
|
+
|
|
22
|
+
class DecodeError extends Record {
|
|
23
|
+
constructor(Message, Path, Span) {
|
|
24
|
+
super();
|
|
25
|
+
this.Message = Message;
|
|
26
|
+
this.Path = Path;
|
|
27
|
+
this.Span = Span;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function DecodeError_$reflection() {
|
|
31
|
+
return record_type("YAMLicious.DecodeError", [], DecodeError, () => [["Message", string_type], ["Path", list_type(string_type)], ["Span", option_type(SourceSpan_$reflection())]]);
|
|
32
|
+
}
|
|
33
|
+
function DecodeErrorModule_pathText(error) {
|
|
34
|
+
const sb = StringBuilder_$ctor();
|
|
35
|
+
let first = true;
|
|
36
|
+
const enumerator = getEnumerator(error.Path);
|
|
37
|
+
try {
|
|
38
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
39
|
+
const segment = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
40
|
+
if (segment.startsWith("[") ? true : segment.startsWith("{")) {
|
|
41
|
+
StringBuilder__Append_Z721C83C5(sb, segment);
|
|
42
|
+
} else {
|
|
43
|
+
if (!first) {
|
|
44
|
+
StringBuilder__Append_Z721C83C5(sb, ".");
|
|
45
|
+
}
|
|
46
|
+
StringBuilder__Append_Z721C83C5(sb, segment);
|
|
47
|
+
}
|
|
48
|
+
first = false;
|
|
49
|
+
}
|
|
50
|
+
} finally {
|
|
51
|
+
disposeSafe(enumerator);
|
|
52
|
+
}
|
|
53
|
+
return toString(sb);
|
|
54
|
+
}
|
|
55
|
+
function DecodeErrorModule_text(error) {
|
|
56
|
+
let place;
|
|
57
|
+
const matchValue = error.Span;
|
|
58
|
+
if (matchValue == null) {
|
|
59
|
+
place = "";
|
|
60
|
+
} else {
|
|
61
|
+
const span = matchValue;
|
|
62
|
+
place = " (line " + int32ToString(span.Start.Line) + ", column " + int32ToString(span.Start.Column) + ")";
|
|
63
|
+
}
|
|
64
|
+
if (isEmpty(error.Path)) {
|
|
65
|
+
return error.Message + place;
|
|
66
|
+
} else {
|
|
67
|
+
return "At " + DecodeErrorModule_pathText(error) + ": " + error.Message + place;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
class YamlDecodeException extends FSharpException {
|
|
71
|
+
constructor(Data0) {
|
|
72
|
+
super();
|
|
73
|
+
this.Data0 = Data0;
|
|
74
|
+
}
|
|
75
|
+
"System.Exception.get_Message"() {
|
|
76
|
+
const this$ = this;
|
|
77
|
+
return DecodeErrorModule_text(this$.Data0);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function YamlDecodeException_$reflection() {
|
|
81
|
+
return class_type("YAMLicious.YamlDecodeException", void 0, YamlDecodeException, class_type("System.Exception"));
|
|
82
|
+
}
|
|
83
|
+
function PairKey$1_Null() {
|
|
84
|
+
return PairKey$1.Null;
|
|
85
|
+
}
|
|
86
|
+
function PairKey$1_NotANumber() {
|
|
87
|
+
return PairKey$1.NotANumber;
|
|
88
|
+
}
|
|
89
|
+
function PairKey$1_Value(Item) {
|
|
90
|
+
return new PairKey$1(2, [Item]);
|
|
91
|
+
}
|
|
92
|
+
class PairKey$1 extends Union {
|
|
93
|
+
constructor(tag, fields) {
|
|
94
|
+
super();
|
|
95
|
+
this.tag = tag;
|
|
96
|
+
this.fields = fields;
|
|
97
|
+
}
|
|
98
|
+
cases() {
|
|
99
|
+
return ["Null", "NotANumber", "Value"];
|
|
100
|
+
}
|
|
101
|
+
static {
|
|
102
|
+
this.Null = new PairKey$1(0, []);
|
|
103
|
+
}
|
|
104
|
+
static {
|
|
105
|
+
this.NotANumber = new PairKey$1(1, []);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function PairKey$1_$reflection(gen0) {
|
|
109
|
+
return union_type("YAMLicious.PairKey`1", [gen0], PairKey$1, () => [[], [], [["Item", gen0]]]);
|
|
110
|
+
}
|
|
111
|
+
function DecodeSupport_spanText(span) {
|
|
112
|
+
return "line " + int32ToString(span.Start.Line) + ", column " + int32ToString(span.Start.Column);
|
|
113
|
+
}
|
|
114
|
+
function DecodeSupport_shorten(text) {
|
|
115
|
+
const flat = replace(text, "\n", "\\n");
|
|
116
|
+
if (flat.length > 40) {
|
|
117
|
+
return substring(flat, 0, 37) + "...";
|
|
118
|
+
} else {
|
|
119
|
+
return flat;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function DecodeSupport_tagText(tag) {
|
|
123
|
+
if (tag.tag === /* Named */
|
|
124
|
+
1) {
|
|
125
|
+
const name = tag.fields[0];
|
|
126
|
+
if (name.Prefix === YamlTagModule_coreNamespace) {
|
|
127
|
+
return "!!" + name.Suffix;
|
|
128
|
+
} else if (name.Prefix === "!") {
|
|
129
|
+
return "!" + name.Suffix;
|
|
130
|
+
} else {
|
|
131
|
+
return "!<" + name.Prefix + name.Suffix + ">";
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
return "!";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function DecodeSupport_describeNode(node) {
|
|
138
|
+
const matchValue = node.Kind;
|
|
139
|
+
switch (matchValue.tag) {
|
|
140
|
+
case /* Sequence */
|
|
141
|
+
2:
|
|
142
|
+
return "a sequence";
|
|
143
|
+
case /* Alias */
|
|
144
|
+
3:
|
|
145
|
+
return "the alias *" + matchValue.fields[0];
|
|
146
|
+
case /* Scalar */
|
|
147
|
+
0: {
|
|
148
|
+
const scalar = matchValue.fields[0];
|
|
149
|
+
if (YamlNodeModule_isMissingValue(node)) {
|
|
150
|
+
return "a missing value";
|
|
151
|
+
} else {
|
|
152
|
+
let style;
|
|
153
|
+
const matchValue_1 = scalar.Style;
|
|
154
|
+
style = matchValue_1.tag === /* SingleQuoted */
|
|
155
|
+
1 ? "single-quoted" : matchValue_1.tag === /* DoubleQuoted */
|
|
156
|
+
2 ? "double-quoted" : matchValue_1.tag === /* Block */
|
|
157
|
+
3 ? matchValue_1.fields[0].tag === /* Folded */
|
|
158
|
+
1 ? "folded block" : "literal block" : "plain";
|
|
159
|
+
let tag;
|
|
160
|
+
const matchValue_2 = node.Properties.Tag;
|
|
161
|
+
tag = matchValue_2 == null ? "" : " with the tag " + DecodeSupport_tagText(matchValue_2);
|
|
162
|
+
return "the " + style + ' scalar "' + DecodeSupport_shorten(scalar.Value) + '"' + tag;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
default:
|
|
166
|
+
return "a mapping";
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function DecodeSupport_expected(what, node) {
|
|
170
|
+
return "Expected " + what + ", found " + DecodeSupport_describeNode(node) + ".";
|
|
171
|
+
}
|
|
172
|
+
function DecodeSupport_describeNull(node) {
|
|
173
|
+
if (YamlNodeModule_isMissingValue(node)) {
|
|
174
|
+
return "a missing value";
|
|
175
|
+
} else {
|
|
176
|
+
const matchValue = node.Kind;
|
|
177
|
+
if (matchValue.tag === /* Scalar */
|
|
178
|
+
0) {
|
|
179
|
+
return 'the null "' + DecodeSupport_shorten(matchValue.fields[0].Value) + '"';
|
|
180
|
+
} else {
|
|
181
|
+
return "a null";
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function DecodeSupport_failAt(message, span) {
|
|
186
|
+
throw new YamlDecodeException(new DecodeError(message, empty(), span));
|
|
187
|
+
}
|
|
188
|
+
function DecodeSupport_fail(message, node) {
|
|
189
|
+
return DecodeSupport_failAt(message, node.Span);
|
|
190
|
+
}
|
|
191
|
+
function DecodeSupport_failAlias(name, node) {
|
|
192
|
+
let matchValue = void 0;
|
|
193
|
+
return DecodeSupport_fail("The alias *" + name + (matchValue = node.Span, matchValue == null ? "" : " at " + DecodeSupport_spanText(matchValue)) + " cannot be read as a value. Aliases stay symbolic, so only Decode.alias and Decode.node accept them.", node);
|
|
194
|
+
}
|
|
195
|
+
function DecodeSupport_withSegment(segment, error) {
|
|
196
|
+
return new DecodeError(error.Message, cons(segment, error.Path), error.Span);
|
|
197
|
+
}
|
|
198
|
+
function DecodeSupport_inSegment(segment, decoder, node) {
|
|
199
|
+
try {
|
|
200
|
+
return decoder(node);
|
|
201
|
+
} catch (matchValue) {
|
|
202
|
+
if (matchValue instanceof YamlDecodeException) {
|
|
203
|
+
const error = matchValue.Data0;
|
|
204
|
+
throw new YamlDecodeException(DecodeSupport_withSegment(segment, error));
|
|
205
|
+
} else {
|
|
206
|
+
throw matchValue;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function DecodeSupport_inItem(index, decoder, node) {
|
|
211
|
+
try {
|
|
212
|
+
return decoder(node);
|
|
213
|
+
} catch (matchValue) {
|
|
214
|
+
if (matchValue instanceof YamlDecodeException) {
|
|
215
|
+
const error = matchValue.Data0;
|
|
216
|
+
throw new YamlDecodeException(DecodeSupport_withSegment("[" + int32ToString(index) + "]", error));
|
|
217
|
+
} else {
|
|
218
|
+
throw matchValue;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function DecodeSupport_keyLabel(key) {
|
|
223
|
+
const matchValue = key.Kind;
|
|
224
|
+
switch (matchValue.tag) {
|
|
225
|
+
case /* Alias */
|
|
226
|
+
3:
|
|
227
|
+
return "*" + matchValue.fields[0];
|
|
228
|
+
case /* Mapping */
|
|
229
|
+
1:
|
|
230
|
+
return "(mapping)";
|
|
231
|
+
case /* Sequence */
|
|
232
|
+
2:
|
|
233
|
+
return "(sequence)";
|
|
234
|
+
default:
|
|
235
|
+
return matchValue.fields[0].Value;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function DecodeSupport_inEntry(key, decoder, node) {
|
|
239
|
+
try {
|
|
240
|
+
return decoder(node);
|
|
241
|
+
} catch (matchValue) {
|
|
242
|
+
if (matchValue instanceof YamlDecodeException) {
|
|
243
|
+
const error = matchValue.Data0;
|
|
244
|
+
throw new YamlDecodeException(DecodeSupport_withSegment("{" + DecodeSupport_keyLabel(key) + "}", error));
|
|
245
|
+
} else {
|
|
246
|
+
throw matchValue;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function DecodeSupport_isNullTag(tag) {
|
|
251
|
+
if (tag == null) {
|
|
252
|
+
return false;
|
|
253
|
+
} else {
|
|
254
|
+
return YamlTagModule_identifier(tag) === YamlTagModule_coreNamespace + "null";
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function DecodeSupport_nullTagMessage(text) {
|
|
258
|
+
return 'The tag !!null needs null, Null, NULL, ~ or an empty text, found "' + DecodeSupport_shorten(text) + '".';
|
|
259
|
+
}
|
|
260
|
+
function DecodeSupport_checkNullTag(node, scalar) {
|
|
261
|
+
if (DecodeSupport_isNullTag(node.Properties.Tag) && !CoreSchema_isNull(node.Properties.Tag, scalar)) {
|
|
262
|
+
DecodeSupport_fail(DecodeSupport_nullTagMessage(scalar.Value), node);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function DecodeSupport_scalarOf(what, node) {
|
|
266
|
+
const matchValue = node.Kind;
|
|
267
|
+
switch (matchValue.tag) {
|
|
268
|
+
case /* Scalar */
|
|
269
|
+
0: {
|
|
270
|
+
const scalar = matchValue.fields[0];
|
|
271
|
+
DecodeSupport_checkNullTag(node, scalar);
|
|
272
|
+
return scalar;
|
|
273
|
+
}
|
|
274
|
+
case /* Alias */
|
|
275
|
+
3:
|
|
276
|
+
return DecodeSupport_failAlias(matchValue.fields[0], node);
|
|
277
|
+
default:
|
|
278
|
+
return DecodeSupport_fail(DecodeSupport_expected(what, node), node);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function DecodeSupport_typedScalar(what, parse, node) {
|
|
282
|
+
const matchValue = parse(node.Properties.Tag, DecodeSupport_scalarOf(what, node));
|
|
283
|
+
if (matchValue == null) {
|
|
284
|
+
return DecodeSupport_fail(DecodeSupport_expected(what, node), node);
|
|
285
|
+
} else {
|
|
286
|
+
return value(matchValue);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
function DecodeSupport_describeNonString(node) {
|
|
290
|
+
let scalar = void 0;
|
|
291
|
+
const matchValue = node.Kind;
|
|
292
|
+
let matchResult = void 0, scalar_1 = void 0;
|
|
293
|
+
if (matchValue.tag === /* Scalar */
|
|
294
|
+
0) {
|
|
295
|
+
if (scalar = matchValue.fields[0], node.Properties.Tag == null && equals(scalar.Style, ScalarStyle.Plain)) {
|
|
296
|
+
matchResult = 0;
|
|
297
|
+
scalar_1 = matchValue.fields[0];
|
|
298
|
+
} else {
|
|
299
|
+
matchResult = 1;
|
|
300
|
+
}
|
|
301
|
+
} else {
|
|
302
|
+
matchResult = 1;
|
|
303
|
+
}
|
|
304
|
+
switch (matchResult) {
|
|
305
|
+
case 0:
|
|
306
|
+
if (scalar_1.Value === "") {
|
|
307
|
+
return "a missing value";
|
|
308
|
+
} else {
|
|
309
|
+
let resolved;
|
|
310
|
+
const matchValue_1 = CoreSchema_resolveKind(scalar_1.Value);
|
|
311
|
+
resolved = matchValue_1.tag === /* Bool */
|
|
312
|
+
1 ? "!!bool" : matchValue_1.tag === /* Integer */
|
|
313
|
+
2 ? "!!int" : matchValue_1.tag === /* Float */
|
|
314
|
+
3 ? "!!float" : matchValue_1.tag === /* Str */
|
|
315
|
+
4 ? "!!str" : "!!null";
|
|
316
|
+
return DecodeSupport_describeNode(node) + ", which resolves to " + resolved;
|
|
317
|
+
}
|
|
318
|
+
default:
|
|
319
|
+
return DecodeSupport_describeNode(node);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function DecodeSupport_stringOf(what, node) {
|
|
323
|
+
const scalar = DecodeSupport_scalarOf(what, node);
|
|
324
|
+
if (CoreSchema_isString(node.Properties.Tag, scalar)) {
|
|
325
|
+
return scalar.Value;
|
|
326
|
+
} else {
|
|
327
|
+
return DecodeSupport_fail("Expected " + what + ", found " + DecodeSupport_describeNonString(node) + ".", node);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function DecodeSupport_isNullNode(node) {
|
|
331
|
+
const matchValue = node.Kind;
|
|
332
|
+
if (matchValue.tag === /* Scalar */
|
|
333
|
+
0) {
|
|
334
|
+
const scalar = matchValue.fields[0];
|
|
335
|
+
DecodeSupport_checkNullTag(node, scalar);
|
|
336
|
+
return CoreSchema_isNull(node.Properties.Tag, scalar);
|
|
337
|
+
} else {
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function DecodeSupport_sequenceItems(what, node) {
|
|
342
|
+
const matchValue = node.Kind;
|
|
343
|
+
switch (matchValue.tag) {
|
|
344
|
+
case /* Sequence */
|
|
345
|
+
2:
|
|
346
|
+
return matchValue.fields[0].Items;
|
|
347
|
+
case /* Alias */
|
|
348
|
+
3:
|
|
349
|
+
return DecodeSupport_failAlias(matchValue.fields[0], node);
|
|
350
|
+
default:
|
|
351
|
+
return DecodeSupport_fail(DecodeSupport_expected(what, node), node);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function DecodeSupport_mappingEntries(what, node) {
|
|
355
|
+
const matchValue = node.Kind;
|
|
356
|
+
switch (matchValue.tag) {
|
|
357
|
+
case /* Mapping */
|
|
358
|
+
1:
|
|
359
|
+
return matchValue.fields[0].Items;
|
|
360
|
+
case /* Alias */
|
|
361
|
+
3:
|
|
362
|
+
return DecodeSupport_failAlias(matchValue.fields[0], node);
|
|
363
|
+
default:
|
|
364
|
+
return DecodeSupport_fail(DecodeSupport_expected(what, node), node);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
function DecodeSupport_decodeItems(what, decoder, node) {
|
|
368
|
+
const result = [];
|
|
369
|
+
let remaining = DecodeSupport_sequenceItems(what, node);
|
|
370
|
+
let index = 0;
|
|
371
|
+
try {
|
|
372
|
+
while (!isEmpty(remaining)) {
|
|
373
|
+
void result.push(decoder(FSharpList__get_Head(remaining).Node));
|
|
374
|
+
remaining = FSharpList__get_Tail(remaining);
|
|
375
|
+
index = index + 1 | 0;
|
|
376
|
+
}
|
|
377
|
+
} catch (matchValue) {
|
|
378
|
+
if (matchValue instanceof YamlDecodeException) {
|
|
379
|
+
const error = matchValue.Data0;
|
|
380
|
+
throw new YamlDecodeException(DecodeSupport_withSegment("[" + int32ToString(index) + "]", error));
|
|
381
|
+
} else {
|
|
382
|
+
throw matchValue;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
return result;
|
|
386
|
+
}
|
|
387
|
+
function DecodeSupport_tupleNodes(size, node) {
|
|
388
|
+
const items = DecodeSupport_sequenceItems("a sequence of " + int32ToString(size) + " items", node);
|
|
389
|
+
const count = length(items) | 0;
|
|
390
|
+
if (count !== size) {
|
|
391
|
+
return DecodeSupport_fail("Expected a sequence of " + int32ToString(size) + " items, found a sequence of " + int32ToString(count) + " items.", node);
|
|
392
|
+
} else {
|
|
393
|
+
return toArray(map((item) => item.Node, items));
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function DecodeSupport_coreTag(suffix) {
|
|
397
|
+
return YamlTagModule_coreNamespace + suffix;
|
|
398
|
+
}
|
|
399
|
+
class DecodeSupport_KeyIndex {
|
|
400
|
+
constructor() {
|
|
401
|
+
this["Numbers@"] = /* @__PURE__ */ new Map([]);
|
|
402
|
+
this["Integers@"] = CoreSchema_IntegerNames_$ctor();
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function DecodeSupport_KeyIndex_$reflection() {
|
|
406
|
+
return class_type("YAMLicious.DecodeSupport.KeyIndex", void 0, DecodeSupport_KeyIndex);
|
|
407
|
+
}
|
|
408
|
+
function DecodeSupport_KeyIndex_$ctor() {
|
|
409
|
+
return new DecodeSupport_KeyIndex();
|
|
410
|
+
}
|
|
411
|
+
function DecodeSupport_KeyIndex__get_Numbers(__) {
|
|
412
|
+
return __["Numbers@"];
|
|
413
|
+
}
|
|
414
|
+
function DecodeSupport_KeyIndex__get_Integers(__) {
|
|
415
|
+
return __["Integers@"];
|
|
416
|
+
}
|
|
417
|
+
const DecodeSupport_scalarTagSuffixes = ofArray(["str", "null", "bool", "int", "float"]);
|
|
418
|
+
function DecodeSupport_placeOf(key, fallback) {
|
|
419
|
+
const matchValue = key.Span;
|
|
420
|
+
if (matchValue == null) {
|
|
421
|
+
return fallback;
|
|
422
|
+
} else {
|
|
423
|
+
return "at " + DecodeSupport_spanText(matchValue);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
function DecodeSupport_failRepeatedKey(first, second) {
|
|
427
|
+
const firstLabel = DecodeSupport_keyLabel(first);
|
|
428
|
+
const secondLabel = DecodeSupport_keyLabel(second);
|
|
429
|
+
const firstPlace = DecodeSupport_placeOf(first, "at an earlier entry");
|
|
430
|
+
const place = DecodeSupport_placeOf(second, "at a later entry");
|
|
431
|
+
return DecodeSupport_fail(firstLabel === secondLabel ? (secondLabel === "" ? "The empty key" : "The key " + secondLabel) + " occurs twice, " + firstPlace + " and " + place + "." : (secondLabel === "" ? "The empty key " : "The key " + secondLabel + " ") + place + " repeats " + (firstLabel === "" ? "the empty key " : "the key " + firstLabel + " ") + firstPlace + ".", second);
|
|
432
|
+
}
|
|
433
|
+
function DecodeSupport_scalarToken(integers, node, scalar) {
|
|
434
|
+
const text = scalar.Value;
|
|
435
|
+
if (CoreSchema_isString(node.Properties.Tag, scalar)) {
|
|
436
|
+
return "s" + text;
|
|
437
|
+
} else {
|
|
438
|
+
let identifier;
|
|
439
|
+
const matchValue = node.Properties.Tag;
|
|
440
|
+
if (matchValue == null) {
|
|
441
|
+
const matchValue_1 = CoreSchema_resolveKind(text);
|
|
442
|
+
identifier = matchValue_1.tag === /* Null */
|
|
443
|
+
0 ? DecodeSupport_coreTag("null") : matchValue_1.tag === /* Bool */
|
|
444
|
+
1 ? DecodeSupport_coreTag("bool") : matchValue_1.tag === /* Integer */
|
|
445
|
+
2 ? DecodeSupport_coreTag("int") : DecodeSupport_coreTag("float");
|
|
446
|
+
} else {
|
|
447
|
+
identifier = YamlTagModule_identifier(matchValue);
|
|
448
|
+
}
|
|
449
|
+
const wrong = (expected) => DecodeSupport_fail("The tag !!" + substring(identifier, YamlTagModule_coreNamespace.length) + " needs " + expected + ', found "' + DecodeSupport_shorten(text) + '".', node);
|
|
450
|
+
if (identifier === DecodeSupport_coreTag("null")) {
|
|
451
|
+
if (CoreSchema_resolvesToNull(text)) {
|
|
452
|
+
return "n";
|
|
453
|
+
} else {
|
|
454
|
+
return DecodeSupport_fail(DecodeSupport_nullTagMessage(text), node);
|
|
455
|
+
}
|
|
456
|
+
} else if (identifier === DecodeSupport_coreTag("bool")) {
|
|
457
|
+
switch (text) {
|
|
458
|
+
case "true":
|
|
459
|
+
case "True":
|
|
460
|
+
case "TRUE":
|
|
461
|
+
return "btrue";
|
|
462
|
+
case "false":
|
|
463
|
+
case "False":
|
|
464
|
+
case "FALSE":
|
|
465
|
+
return "bfalse";
|
|
466
|
+
default:
|
|
467
|
+
return wrong("true, True, TRUE, false, False or FALSE");
|
|
468
|
+
}
|
|
469
|
+
} else if (identifier === DecodeSupport_coreTag("int")) {
|
|
470
|
+
const matchValue_2 = CoreSchema_IntegerNames__Name_Z721C83C5(integers, text);
|
|
471
|
+
if (matchValue_2 == null) {
|
|
472
|
+
return wrong("an int of the core schema");
|
|
473
|
+
} else {
|
|
474
|
+
return "i" + matchValue_2;
|
|
475
|
+
}
|
|
476
|
+
} else if (identifier === DecodeSupport_coreTag("float")) {
|
|
477
|
+
const matchValue_3 = CoreSchema_canonicalFloat(text);
|
|
478
|
+
if (matchValue_3 == null) {
|
|
479
|
+
return wrong("a float of the core schema");
|
|
480
|
+
} else {
|
|
481
|
+
return "f" + matchValue_3;
|
|
482
|
+
}
|
|
483
|
+
} else if (identifier === DecodeSupport_coreTag("seq")) {
|
|
484
|
+
return wrong("a sequence");
|
|
485
|
+
} else if (identifier === DecodeSupport_coreTag("map")) {
|
|
486
|
+
return wrong("a mapping");
|
|
487
|
+
} else {
|
|
488
|
+
return "x" + int32ToString(identifier.length) + ":" + identifier + text;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
function DecodeSupport_collectionTag(node, own) {
|
|
493
|
+
const matchValue = node.Properties.Tag;
|
|
494
|
+
let matchResult = void 0, explicit = void 0;
|
|
495
|
+
if (matchValue != null) {
|
|
496
|
+
if (matchValue.tag === /* NonSpecific */
|
|
497
|
+
0) {
|
|
498
|
+
matchResult = 0;
|
|
499
|
+
} else {
|
|
500
|
+
matchResult = 1;
|
|
501
|
+
explicit = matchValue;
|
|
502
|
+
}
|
|
503
|
+
} else {
|
|
504
|
+
matchResult = 0;
|
|
505
|
+
}
|
|
506
|
+
switch (matchResult) {
|
|
507
|
+
case 0:
|
|
508
|
+
return DecodeSupport_coreTag(own);
|
|
509
|
+
default: {
|
|
510
|
+
const identifier = YamlTagModule_identifier(explicit);
|
|
511
|
+
const found = own === "seq" ? "a sequence" : "a mapping";
|
|
512
|
+
if (identifier === DecodeSupport_coreTag("seq") && own !== "seq") {
|
|
513
|
+
return DecodeSupport_fail("The tag " + DecodeSupport_tagText(explicit) + " needs a sequence, found " + found + ".", node);
|
|
514
|
+
} else if (identifier === DecodeSupport_coreTag("map") && own !== "map") {
|
|
515
|
+
return DecodeSupport_fail("The tag " + DecodeSupport_tagText(explicit) + " needs a mapping, found " + found + ".", node);
|
|
516
|
+
} else if (exists((suffix) => identifier === DecodeSupport_coreTag(suffix), DecodeSupport_scalarTagSuffixes)) {
|
|
517
|
+
return DecodeSupport_fail("The tag " + DecodeSupport_tagText(explicit) + " needs a scalar, found " + found + ".", node);
|
|
518
|
+
} else {
|
|
519
|
+
return identifier;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
function DecodeSupport_TokenStep_Visit(Item) {
|
|
525
|
+
return new DecodeSupport_TokenStep(0, [Item]);
|
|
526
|
+
}
|
|
527
|
+
function DecodeSupport_TokenStep_FinishSequence(tag, count) {
|
|
528
|
+
return new DecodeSupport_TokenStep(1, [tag, count]);
|
|
529
|
+
}
|
|
530
|
+
function DecodeSupport_TokenStep_FinishMapping(tag, keys) {
|
|
531
|
+
return new DecodeSupport_TokenStep(2, [tag, keys]);
|
|
532
|
+
}
|
|
533
|
+
class DecodeSupport_TokenStep extends Union {
|
|
534
|
+
constructor(tag, fields) {
|
|
535
|
+
super();
|
|
536
|
+
this.tag = tag;
|
|
537
|
+
this.fields = fields;
|
|
538
|
+
}
|
|
539
|
+
cases() {
|
|
540
|
+
return ["Visit", "FinishSequence", "FinishMapping"];
|
|
541
|
+
}
|
|
542
|
+
Equals(other) {
|
|
543
|
+
return this === other;
|
|
544
|
+
}
|
|
545
|
+
GetHashCode() {
|
|
546
|
+
return physicalHash(this);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
function DecodeSupport_TokenStep_$reflection() {
|
|
550
|
+
return union_type("YAMLicious.DecodeSupport.TokenStep", [], DecodeSupport_TokenStep, () => [[["Item", YamlNode_$reflection()]], [["tag", string_type], ["count", int32_type]], [["tag", string_type], ["keys", array_type(YamlNode_$reflection())]]]);
|
|
551
|
+
}
|
|
552
|
+
function DecodeSupport_nodeToken(index, root) {
|
|
553
|
+
const interned = DecodeSupport_KeyIndex__get_Numbers(index);
|
|
554
|
+
const numberOf = (token) => {
|
|
555
|
+
let matchValue;
|
|
556
|
+
const cell = new FSharpRef(0);
|
|
557
|
+
matchValue = [tryGetValue(interned, token, cell), cell.contents];
|
|
558
|
+
if (matchValue[0]) {
|
|
559
|
+
return matchValue[1] | 0;
|
|
560
|
+
} else {
|
|
561
|
+
const number_1 = interned.size | 0;
|
|
562
|
+
interned.set(token, number_1);
|
|
563
|
+
return number_1 | 0;
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
const steps = [];
|
|
567
|
+
const tokens = [];
|
|
568
|
+
void steps.push(DecodeSupport_TokenStep_Visit(root));
|
|
569
|
+
while (steps.length > 0) {
|
|
570
|
+
const step = item(steps.length - 1, steps);
|
|
571
|
+
steps.splice(steps.length - 1, 1);
|
|
572
|
+
switch (step.tag) {
|
|
573
|
+
case /* FinishSequence */
|
|
574
|
+
1: {
|
|
575
|
+
const tag = step.fields[0];
|
|
576
|
+
const count = step.fields[1] | 0;
|
|
577
|
+
const start = tokens.length - count | 0;
|
|
578
|
+
const sb = StringBuilder_$ctor();
|
|
579
|
+
StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(sb, "q"), int32ToString(tag.length)), ":"), tag), "[");
|
|
580
|
+
for (let i_2 = start; i_2 <= tokens.length - 1; i_2++) {
|
|
581
|
+
if (i_2 > start) {
|
|
582
|
+
StringBuilder__Append_Z721C83C5(sb, ",");
|
|
583
|
+
}
|
|
584
|
+
StringBuilder__Append_Z721C83C5(sb, int32ToString(numberOf(item(i_2, tokens))));
|
|
585
|
+
}
|
|
586
|
+
tokens.splice(start, count);
|
|
587
|
+
void tokens.push(toString(sb));
|
|
588
|
+
break;
|
|
589
|
+
}
|
|
590
|
+
case /* FinishMapping */
|
|
591
|
+
2: {
|
|
592
|
+
const tag_1 = step.fields[0];
|
|
593
|
+
const keys = step.fields[1];
|
|
594
|
+
const start_1 = tokens.length - 2 * keys.length | 0;
|
|
595
|
+
const first = /* @__PURE__ */ new Map([]);
|
|
596
|
+
const pairs = fill(new Array(keys.length), 0, keys.length, null);
|
|
597
|
+
for (let i_3 = 0; i_3 <= keys.length - 1; i_3++) {
|
|
598
|
+
const keyNumber = numberOf(item(start_1 + 2 * i_3, tokens)) | 0;
|
|
599
|
+
if (first.has(keyNumber)) {
|
|
600
|
+
DecodeSupport_failRepeatedKey(item(getItemFromDict(first, keyNumber), keys), item(i_3, keys));
|
|
601
|
+
}
|
|
602
|
+
first.set(keyNumber, i_3);
|
|
603
|
+
setItem(pairs, i_3, [keyNumber, numberOf(item(start_1 + 2 * i_3 + 1, tokens))]);
|
|
604
|
+
}
|
|
605
|
+
const sorted = sortBy((tuple) => tuple[0] | 0, pairs, {
|
|
606
|
+
Compare: (x, y) => comparePrimitives(x, y) | 0
|
|
607
|
+
});
|
|
608
|
+
const sb_1 = StringBuilder_$ctor();
|
|
609
|
+
StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(sb_1, "m"), int32ToString(tag_1.length)), ":"), tag_1), "{");
|
|
610
|
+
for (let i_4 = 0; i_4 <= sorted.length - 1; i_4++) {
|
|
611
|
+
if (i_4 > 0) {
|
|
612
|
+
StringBuilder__Append_Z721C83C5(sb_1, ",");
|
|
613
|
+
}
|
|
614
|
+
StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(StringBuilder__Append_Z721C83C5(sb_1, int32ToString(item(i_4, sorted)[0])), ":"), int32ToString(item(i_4, sorted)[1]));
|
|
615
|
+
}
|
|
616
|
+
tokens.splice(start_1, 2 * keys.length);
|
|
617
|
+
void tokens.push(toString(sb_1));
|
|
618
|
+
break;
|
|
619
|
+
}
|
|
620
|
+
default: {
|
|
621
|
+
const node = step.fields[0];
|
|
622
|
+
const matchValue_1 = node.Kind;
|
|
623
|
+
switch (matchValue_1.tag) {
|
|
624
|
+
case /* Alias */
|
|
625
|
+
3: {
|
|
626
|
+
DecodeSupport_failAlias(matchValue_1.fields[0], node);
|
|
627
|
+
break;
|
|
628
|
+
}
|
|
629
|
+
case /* Sequence */
|
|
630
|
+
2: {
|
|
631
|
+
const items = toArray(matchValue_1.fields[0].Items);
|
|
632
|
+
void steps.push(DecodeSupport_TokenStep_FinishSequence(DecodeSupport_collectionTag(node, "seq"), items.length));
|
|
633
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
634
|
+
void steps.push(DecodeSupport_TokenStep_Visit(item(i, items).Node));
|
|
635
|
+
}
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
case /* Mapping */
|
|
639
|
+
1: {
|
|
640
|
+
const entries = toArray(matchValue_1.fields[0].Items);
|
|
641
|
+
void steps.push(DecodeSupport_TokenStep_FinishMapping(DecodeSupport_collectionTag(node, "map"), map$1((entry) => entry.Key, entries)));
|
|
642
|
+
for (let i_1 = entries.length - 1; i_1 >= 0; i_1--) {
|
|
643
|
+
void steps.push(DecodeSupport_TokenStep_Visit(item(i_1, entries).Value));
|
|
644
|
+
void steps.push(DecodeSupport_TokenStep_Visit(item(i_1, entries).Key));
|
|
645
|
+
}
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
default: {
|
|
649
|
+
const scalar = matchValue_1.fields[0];
|
|
650
|
+
void tokens.push(DecodeSupport_scalarToken(DecodeSupport_KeyIndex__get_Integers(index), node, scalar));
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
return item(0, tokens);
|
|
657
|
+
}
|
|
658
|
+
function DecodeSupport_keyTokens(index, entries) {
|
|
659
|
+
const tokens = fill(new Array(entries.length), 0, entries.length, "");
|
|
660
|
+
const first = /* @__PURE__ */ new Map([]);
|
|
661
|
+
for (let i = 0; i <= entries.length - 1; i++) {
|
|
662
|
+
const key = item(i, entries).Key;
|
|
663
|
+
let token;
|
|
664
|
+
const matchValue = key.Kind;
|
|
665
|
+
if (matchValue.tag === /* Scalar */
|
|
666
|
+
0) {
|
|
667
|
+
const scalar = matchValue.fields[0];
|
|
668
|
+
token = DecodeSupport_scalarToken(DecodeSupport_KeyIndex__get_Integers(index), key, scalar);
|
|
669
|
+
} else {
|
|
670
|
+
token = DecodeSupport_nodeToken(index, key);
|
|
671
|
+
}
|
|
672
|
+
if (first.has(token)) {
|
|
673
|
+
DecodeSupport_failRepeatedKey(item(getItemFromDict(first, token), entries).Key, key);
|
|
674
|
+
}
|
|
675
|
+
first.set(token, i);
|
|
676
|
+
setItem(tokens, i, token);
|
|
677
|
+
}
|
|
678
|
+
return tokens;
|
|
679
|
+
}
|
|
680
|
+
function DecodeSupport_keyText(token) {
|
|
681
|
+
if (getCharAtIndex(token, 0) === "s") {
|
|
682
|
+
return substring(token, 1);
|
|
683
|
+
} else {
|
|
684
|
+
return void 0;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
class DecodeSupport_KeyWalkPlace extends Record {
|
|
688
|
+
constructor(Parent, Key, Index) {
|
|
689
|
+
super();
|
|
690
|
+
this.Parent = Parent;
|
|
691
|
+
this.Key = Key;
|
|
692
|
+
this.Index = Index | 0;
|
|
693
|
+
}
|
|
694
|
+
Equals(other) {
|
|
695
|
+
return this === other;
|
|
696
|
+
}
|
|
697
|
+
GetHashCode() {
|
|
698
|
+
return physicalHash(this);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
function DecodeSupport_KeyWalkPlace_$reflection() {
|
|
702
|
+
return record_type("YAMLicious.DecodeSupport.KeyWalkPlace", [], DecodeSupport_KeyWalkPlace, () => [["Parent", option_type(DecodeSupport_KeyWalkPlace_$reflection())], ["Key", option_type(YamlNode_$reflection())], ["Index", int32_type]]);
|
|
703
|
+
}
|
|
704
|
+
function DecodeSupport_pathOf(place) {
|
|
705
|
+
let segments = empty();
|
|
706
|
+
let current = place;
|
|
707
|
+
while (current != null) {
|
|
708
|
+
const here = value(current);
|
|
709
|
+
let segment;
|
|
710
|
+
const matchValue = here.Key;
|
|
711
|
+
segment = matchValue == null ? "[" + int32ToString(here.Index) + "]" : "{" + DecodeSupport_keyLabel(matchValue) + "}";
|
|
712
|
+
segments = cons(segment, segments);
|
|
713
|
+
current = here.Parent;
|
|
714
|
+
}
|
|
715
|
+
return segments;
|
|
716
|
+
}
|
|
717
|
+
function DecodeSupport_checkKeysBelow(root) {
|
|
718
|
+
const index = DecodeSupport_KeyIndex_$ctor();
|
|
719
|
+
const stack = [];
|
|
720
|
+
void stack.push([root, void 0]);
|
|
721
|
+
while (stack.length > 0) {
|
|
722
|
+
const patternInput = item(stack.length - 1, stack);
|
|
723
|
+
const place = patternInput[1];
|
|
724
|
+
stack.splice(stack.length - 1, 1);
|
|
725
|
+
const matchValue = patternInput[0].Kind;
|
|
726
|
+
switch (matchValue.tag) {
|
|
727
|
+
case /* Mapping */
|
|
728
|
+
1: {
|
|
729
|
+
const entries = toArray(matchValue.fields[0].Items);
|
|
730
|
+
try {
|
|
731
|
+
DecodeSupport_keyTokens(index, entries);
|
|
732
|
+
} catch (matchValue_1) {
|
|
733
|
+
if (matchValue_1 instanceof YamlDecodeException) {
|
|
734
|
+
const error = matchValue_1.Data0;
|
|
735
|
+
throw new YamlDecodeException(new DecodeError(error.Message, append(DecodeSupport_pathOf(place), error.Path), error.Span));
|
|
736
|
+
} else {
|
|
737
|
+
throw matchValue_1;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
741
|
+
void stack.push([item(i, entries).Value, new DecodeSupport_KeyWalkPlace(place, item(i, entries).Key, i)]);
|
|
742
|
+
}
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
case /* Sequence */
|
|
746
|
+
2: {
|
|
747
|
+
const items = toArray(matchValue.fields[0].Items);
|
|
748
|
+
for (let i_1 = items.length - 1; i_1 >= 0; i_1--) {
|
|
749
|
+
void stack.push([item(i_1, items).Node, new DecodeSupport_KeyWalkPlace(place, void 0, i_1)]);
|
|
750
|
+
}
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
default:
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
function DecodeSupport_pairKey(key) {
|
|
758
|
+
let number = void 0;
|
|
759
|
+
const boxed = key;
|
|
760
|
+
if (boxed == null) {
|
|
761
|
+
return PairKey$1.Null;
|
|
762
|
+
} else {
|
|
763
|
+
let matchResult = void 0;
|
|
764
|
+
if (typeof boxed === "number") {
|
|
765
|
+
if (number = boxed, Number.isNaN(number)) {
|
|
766
|
+
matchResult = 0;
|
|
767
|
+
} else {
|
|
768
|
+
matchResult = 1;
|
|
769
|
+
}
|
|
770
|
+
} else {
|
|
771
|
+
matchResult = 1;
|
|
772
|
+
}
|
|
773
|
+
switch (matchResult) {
|
|
774
|
+
case 0: {
|
|
775
|
+
return PairKey$1.NotANumber;
|
|
776
|
+
}
|
|
777
|
+
default:
|
|
778
|
+
return PairKey$1_Value(key);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
function DecodeSupport_decodePairs(allowNullKey, keyDecoder, valueDecoder, node) {
|
|
783
|
+
const entries = toArray(DecodeSupport_mappingEntries("a mapping", node));
|
|
784
|
+
DecodeSupport_keyTokens(DecodeSupport_KeyIndex_$ctor(), entries);
|
|
785
|
+
const pairs = [];
|
|
786
|
+
const seen = new Dictionary([], {
|
|
787
|
+
Equals: equals,
|
|
788
|
+
GetHashCode: (x) => safeHash(x) | 0
|
|
789
|
+
});
|
|
790
|
+
for (let idx = 0; idx <= entries.length - 1; idx++) {
|
|
791
|
+
const entry = item(idx, entries);
|
|
792
|
+
const key = DecodeSupport_inEntry(entry.Key, keyDecoder, entry.Key);
|
|
793
|
+
if (!allowNullKey && key == null) {
|
|
794
|
+
DecodeSupport_fail("The key " + DecodeSupport_keyLabel(entry.Key) + " decodes to null, which a dictionary cannot hold. Decode a map instead.", entry.Key);
|
|
795
|
+
}
|
|
796
|
+
let matchValue;
|
|
797
|
+
const cell = new FSharpRef(defaultOf());
|
|
798
|
+
matchValue = [tryGetValue(seen, DecodeSupport_pairKey(key), cell), cell.contents];
|
|
799
|
+
if (matchValue[0]) {
|
|
800
|
+
const first = matchValue[1];
|
|
801
|
+
const firstPlace = DecodeSupport_placeOf(first, "at an earlier entry");
|
|
802
|
+
const place = DecodeSupport_placeOf(entry.Key, "at a later entry");
|
|
803
|
+
DecodeSupport_fail("Distinct YAML keys decode to the same map key: " + DecodeSupport_describeNode(first) + " " + firstPlace + " and " + DecodeSupport_describeNode(entry.Key) + " " + place + ".", entry.Key);
|
|
804
|
+
} else {
|
|
805
|
+
seen.set(DecodeSupport_pairKey(key), entry.Key);
|
|
806
|
+
void pairs.push([key, DecodeSupport_inEntry(entry.Key, valueDecoder, entry.Value)]);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
return pairs;
|
|
810
|
+
}
|
|
811
|
+
function DecodeSupport_digitsAt(text, start, count) {
|
|
812
|
+
if (start + count > text.length) {
|
|
813
|
+
return -1;
|
|
814
|
+
} else {
|
|
815
|
+
let value = 0;
|
|
816
|
+
let valid = true;
|
|
817
|
+
for (let i = start; i <= start + count - 1; i++) {
|
|
818
|
+
const c = getCharAtIndex(text, i);
|
|
819
|
+
if (c >= "0" && c <= "9") {
|
|
820
|
+
value = value * 10 + (~~c.charCodeAt(0) - ~~"0".charCodeAt(0)) | 0;
|
|
821
|
+
} else {
|
|
822
|
+
valid = false;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
if (valid) {
|
|
826
|
+
return value | 0;
|
|
827
|
+
} else {
|
|
828
|
+
return -1;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
function DecodeSupport_daysInMonth(year, month) {
|
|
833
|
+
if (month === 2) {
|
|
834
|
+
if (year % 4 === 0 && year % 100 !== 0 ? true : year % 400 === 0) {
|
|
835
|
+
return 29;
|
|
836
|
+
} else {
|
|
837
|
+
return 28;
|
|
838
|
+
}
|
|
839
|
+
} else if (((month === 4 ? true : month === 6) ? true : month === 9) ? true : month === 11) {
|
|
840
|
+
return 30;
|
|
841
|
+
} else {
|
|
842
|
+
return 31;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
function DecodeSupport_normalizeTimestamp(text, zoneRequired) {
|
|
846
|
+
const length = text.length | 0;
|
|
847
|
+
if ((length < 10 ? true : getCharAtIndex(text, 4) !== "-") ? true : getCharAtIndex(text, 7) !== "-") {
|
|
848
|
+
return void 0;
|
|
849
|
+
} else {
|
|
850
|
+
const year = DecodeSupport_digitsAt(text, 0, 4) | 0;
|
|
851
|
+
const month = DecodeSupport_digitsAt(text, 5, 2) | 0;
|
|
852
|
+
const day = DecodeSupport_digitsAt(text, 8, 2) | 0;
|
|
853
|
+
if ((((year < 0 ? true : month < 1) ? true : month > 12) ? true : day < 1) ? true : day > DecodeSupport_daysInMonth(year, month)) {
|
|
854
|
+
return void 0;
|
|
855
|
+
} else if (length === 10) {
|
|
856
|
+
if (zoneRequired) {
|
|
857
|
+
return void 0;
|
|
858
|
+
} else {
|
|
859
|
+
return text + "T00:00:00";
|
|
860
|
+
}
|
|
861
|
+
} else if (((getCharAtIndex(text, 10) !== "T" && getCharAtIndex(text, 10) !== " " ? true : length < 19) ? true : getCharAtIndex(text, 13) !== ":") ? true : getCharAtIndex(text, 16) !== ":") {
|
|
862
|
+
return void 0;
|
|
863
|
+
} else {
|
|
864
|
+
const hour = DecodeSupport_digitsAt(text, 11, 2) | 0;
|
|
865
|
+
const minute = DecodeSupport_digitsAt(text, 14, 2) | 0;
|
|
866
|
+
const second = DecodeSupport_digitsAt(text, 17, 2) | 0;
|
|
867
|
+
if (((((hour < 0 ? true : hour > 23) ? true : minute < 0) ? true : minute > 59) ? true : second < 0) ? true : second > 59) {
|
|
868
|
+
return void 0;
|
|
869
|
+
} else {
|
|
870
|
+
let index = 19;
|
|
871
|
+
let valid = true;
|
|
872
|
+
if (index < length && getCharAtIndex(text, index) === ".") {
|
|
873
|
+
index = index + 1 | 0;
|
|
874
|
+
const start = index | 0;
|
|
875
|
+
while (index < length && getCharAtIndex(text, index) >= "0" && getCharAtIndex(text, index) <= "9") {
|
|
876
|
+
index = index + 1 | 0;
|
|
877
|
+
}
|
|
878
|
+
if (index - start < 1 ? true : index - start > 7) {
|
|
879
|
+
valid = false;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
let hasZone = false;
|
|
883
|
+
if (valid && index < length) {
|
|
884
|
+
if (getCharAtIndex(text, index) === "Z" && index + 1 === length) {
|
|
885
|
+
hasZone = true;
|
|
886
|
+
} else if ((getCharAtIndex(text, index) === "+" ? true : getCharAtIndex(text, index) === "-") && index + 6 === length && getCharAtIndex(text, index + 3) === ":") {
|
|
887
|
+
const zoneHours = DecodeSupport_digitsAt(text, index + 1, 2) | 0;
|
|
888
|
+
const zoneMinutes = DecodeSupport_digitsAt(text, index + 4, 2) | 0;
|
|
889
|
+
if (zoneHours >= 0 && zoneMinutes >= 0 && zoneMinutes <= 59 && zoneHours * 60 + zoneMinutes <= 840) {
|
|
890
|
+
hasZone = true;
|
|
891
|
+
} else {
|
|
892
|
+
valid = false;
|
|
893
|
+
}
|
|
894
|
+
} else {
|
|
895
|
+
valid = false;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
if (!valid ? true : zoneRequired && !hasZone) {
|
|
899
|
+
return void 0;
|
|
900
|
+
} else {
|
|
901
|
+
return substring(text, 0, 10) + "T" + substring(text, 11);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
function DecodeSupport_parseDateTime(text) {
|
|
908
|
+
const matchValue = DecodeSupport_normalizeTimestamp(text, false);
|
|
909
|
+
if (matchValue != null) {
|
|
910
|
+
const normalized = matchValue;
|
|
911
|
+
let matchValue_1;
|
|
912
|
+
const cell = new FSharpRef(minValue());
|
|
913
|
+
matchValue_1 = [tryParse(normalized, cell), cell.contents];
|
|
914
|
+
if (matchValue_1[0]) {
|
|
915
|
+
return matchValue_1[1];
|
|
916
|
+
} else {
|
|
917
|
+
return void 0;
|
|
918
|
+
}
|
|
919
|
+
} else {
|
|
920
|
+
return void 0;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
function DecodeSupport_parseDateTimeOffset(text) {
|
|
924
|
+
const matchValue = DecodeSupport_normalizeTimestamp(text, true);
|
|
925
|
+
if (matchValue != null) {
|
|
926
|
+
const normalized = matchValue;
|
|
927
|
+
let matchValue_1;
|
|
928
|
+
const cell = new FSharpRef(minValue$1());
|
|
929
|
+
matchValue_1 = [tryParse$1(normalized, cell), cell.contents];
|
|
930
|
+
if (matchValue_1[0]) {
|
|
931
|
+
return matchValue_1[1];
|
|
932
|
+
} else {
|
|
933
|
+
return void 0;
|
|
934
|
+
}
|
|
935
|
+
} else {
|
|
936
|
+
return void 0;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
function Decode_createGetters(mapping) {
|
|
940
|
+
const entryList = DecodeSupport_mappingEntries("a mapping", mapping);
|
|
941
|
+
const entries = toArray(entryList);
|
|
942
|
+
const tokens = DecodeSupport_keyTokens(DecodeSupport_KeyIndex_$ctor(), entries);
|
|
943
|
+
const names = fill(new Array(entries.length), 0, entries.length, "");
|
|
944
|
+
const index = /* @__PURE__ */ new Map([]);
|
|
945
|
+
for (let i = 0; i <= entries.length - 1; i++) {
|
|
946
|
+
const matchValue = DecodeSupport_keyText(item(i, tokens));
|
|
947
|
+
if (matchValue == null) {
|
|
948
|
+
const key = item(i, entries).Key;
|
|
949
|
+
DecodeSupport_fail("Expected a string as a field name, found " + DecodeSupport_describeNonString(key) + ".", key);
|
|
950
|
+
} else {
|
|
951
|
+
const name = matchValue;
|
|
952
|
+
index.set(name, i);
|
|
953
|
+
setItem(names, i, name);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
const required = {
|
|
957
|
+
Field(name_1, decoder) {
|
|
958
|
+
let matchValue_1;
|
|
959
|
+
const cell = new FSharpRef(0);
|
|
960
|
+
matchValue_1 = [tryGetValue(index, name_1, cell), cell.contents];
|
|
961
|
+
return matchValue_1[0] ? DecodeSupport_inSegment(name_1, decoder, item(matchValue_1[1], entries).Value) : DecodeSupport_fail("The mapping has no field " + name_1 + ".", mapping);
|
|
962
|
+
}
|
|
963
|
+
};
|
|
964
|
+
const optional = {
|
|
965
|
+
Field(name_2, decoder_1) {
|
|
966
|
+
let matchValue_2;
|
|
967
|
+
const cell_1 = new FSharpRef(0);
|
|
968
|
+
matchValue_2 = [tryGetValue(index, name_2, cell_1), cell_1.contents];
|
|
969
|
+
return matchValue_2[0] ? DecodeSupport_inSegment(name_2, (value) => {
|
|
970
|
+
if (DecodeSupport_isNullNode(value)) {
|
|
971
|
+
return void 0;
|
|
972
|
+
} else {
|
|
973
|
+
return some(decoder_1(value));
|
|
974
|
+
}
|
|
975
|
+
}, item(matchValue_2[1], entries).Value) : void 0;
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
const multipleOptional = {
|
|
979
|
+
FieldList(fieldNames) {
|
|
980
|
+
const wanted = new Set(fieldNames);
|
|
981
|
+
return toList(delay(() => collect((i_3) => wanted.has(item(i_3, names)) ? singleton(item(i_3, entries)) : empty$1(), rangeDouble(0, 1, entries.length - 1))));
|
|
982
|
+
}
|
|
983
|
+
};
|
|
984
|
+
const overflow = {
|
|
985
|
+
FieldList(fieldNames_1) {
|
|
986
|
+
const known = new Set(fieldNames_1);
|
|
987
|
+
return toList(delay(() => collect((i_4) => !known.has(item(i_4, names)) ? singleton(item(i_4, entries)) : empty$1(), rangeDouble(0, 1, entries.length - 1))));
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
return {
|
|
991
|
+
Required: required,
|
|
992
|
+
Optional: optional,
|
|
993
|
+
MultipleOptional: multipleOptional,
|
|
994
|
+
Overflow: overflow,
|
|
995
|
+
Entries: entryList
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
function Decode_string(node) {
|
|
999
|
+
return DecodeSupport_stringOf("a string", node);
|
|
1000
|
+
}
|
|
1001
|
+
function Decode_scalarText(node) {
|
|
1002
|
+
const matchValue = node.Kind;
|
|
1003
|
+
switch (matchValue.tag) {
|
|
1004
|
+
case /* Scalar */
|
|
1005
|
+
0:
|
|
1006
|
+
return matchValue.fields[0].Value;
|
|
1007
|
+
case /* Alias */
|
|
1008
|
+
3:
|
|
1009
|
+
return DecodeSupport_failAlias(matchValue.fields[0], node);
|
|
1010
|
+
default:
|
|
1011
|
+
return DecodeSupport_fail(DecodeSupport_expected("a scalar", node), node);
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
function Decode_int(node) {
|
|
1015
|
+
return DecodeSupport_typedScalar("an int", CoreSchema_tryParseInt, node) | 0;
|
|
1016
|
+
}
|
|
1017
|
+
function Decode_int64(node) {
|
|
1018
|
+
return DecodeSupport_typedScalar("an int64", CoreSchema_tryParseInt64, node);
|
|
1019
|
+
}
|
|
1020
|
+
function Decode_float(node) {
|
|
1021
|
+
return DecodeSupport_typedScalar("a float", CoreSchema_tryParseFloat, node);
|
|
1022
|
+
}
|
|
1023
|
+
function Decode_bool(node) {
|
|
1024
|
+
return DecodeSupport_typedScalar("a bool", CoreSchema_tryParseBool, node);
|
|
1025
|
+
}
|
|
1026
|
+
function Decode_char(node) {
|
|
1027
|
+
const text = DecodeSupport_stringOf("a char", node);
|
|
1028
|
+
if (text.length === 1) {
|
|
1029
|
+
return getCharAtIndex(text, 0);
|
|
1030
|
+
} else {
|
|
1031
|
+
return DecodeSupport_fail(DecodeSupport_expected("a char", node), node);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
function Decode_datetime(node) {
|
|
1035
|
+
const matchValue = DecodeSupport_parseDateTime(DecodeSupport_scalarOf("a DateTime", node).Value);
|
|
1036
|
+
if (matchValue == null) {
|
|
1037
|
+
return DecodeSupport_fail(DecodeSupport_expected("a DateTime", node), node);
|
|
1038
|
+
} else {
|
|
1039
|
+
return matchValue;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
function Decode_datetimeOffset(node) {
|
|
1043
|
+
const matchValue = DecodeSupport_parseDateTimeOffset(DecodeSupport_scalarOf("a DateTimeOffset", node).Value);
|
|
1044
|
+
if (matchValue == null) {
|
|
1045
|
+
return DecodeSupport_fail(DecodeSupport_expected("a DateTimeOffset", node), node);
|
|
1046
|
+
} else {
|
|
1047
|
+
return matchValue;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
function Decode_option(decoder, node) {
|
|
1051
|
+
if (DecodeSupport_isNullNode(node)) {
|
|
1052
|
+
return void 0;
|
|
1053
|
+
} else {
|
|
1054
|
+
return some(decoder(node));
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
function Decode_nonNull(decoder, node) {
|
|
1058
|
+
if (DecodeSupport_isNullNode(node)) {
|
|
1059
|
+
return DecodeSupport_fail("Expected a value, found " + DecodeSupport_describeNull(node) + ".", node);
|
|
1060
|
+
} else {
|
|
1061
|
+
return decoder(node);
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
function Decode_list(decoder, node) {
|
|
1065
|
+
return ofSeq(DecodeSupport_decodeItems("a sequence", decoder, node));
|
|
1066
|
+
}
|
|
1067
|
+
function Decode_array(decoder, node) {
|
|
1068
|
+
return DecodeSupport_decodeItems("a sequence", decoder, node).slice();
|
|
1069
|
+
}
|
|
1070
|
+
function Decode_seq(decoder, node) {
|
|
1071
|
+
return DecodeSupport_decodeItems("a sequence", decoder, node);
|
|
1072
|
+
}
|
|
1073
|
+
function Decode_resizearray(decoder, node) {
|
|
1074
|
+
return DecodeSupport_decodeItems("a sequence", decoder, node);
|
|
1075
|
+
}
|
|
1076
|
+
function Decode_values(decoder) {
|
|
1077
|
+
return (node_1) => ofSeq(DecodeSupport_decodeItems("a sequence of scalars", (node) => {
|
|
1078
|
+
const matchValue = node.Kind;
|
|
1079
|
+
switch (matchValue.tag) {
|
|
1080
|
+
case /* Scalar */
|
|
1081
|
+
0:
|
|
1082
|
+
return decoder(node);
|
|
1083
|
+
case /* Alias */
|
|
1084
|
+
3:
|
|
1085
|
+
return DecodeSupport_failAlias(matchValue.fields[0], node);
|
|
1086
|
+
default:
|
|
1087
|
+
return DecodeSupport_fail(DecodeSupport_expected("a scalar", node), node);
|
|
1088
|
+
}
|
|
1089
|
+
}, node_1));
|
|
1090
|
+
}
|
|
1091
|
+
function Decode_tuple2(decoderA, decoderB, node) {
|
|
1092
|
+
const nodes = DecodeSupport_tupleNodes(2, node);
|
|
1093
|
+
return [DecodeSupport_inItem(0, decoderA, item(0, nodes)), DecodeSupport_inItem(1, decoderB, item(1, nodes))];
|
|
1094
|
+
}
|
|
1095
|
+
function Decode_tuple3(decoderA, decoderB, decoderC, node) {
|
|
1096
|
+
const nodes = DecodeSupport_tupleNodes(3, node);
|
|
1097
|
+
return [DecodeSupport_inItem(0, decoderA, item(0, nodes)), DecodeSupport_inItem(1, decoderB, item(1, nodes)), DecodeSupport_inItem(2, decoderC, item(2, nodes))];
|
|
1098
|
+
}
|
|
1099
|
+
function Decode_tuple4(decoderA, decoderB, decoderC, decoderD, node) {
|
|
1100
|
+
const nodes = DecodeSupport_tupleNodes(4, node);
|
|
1101
|
+
return [DecodeSupport_inItem(0, decoderA, item(0, nodes)), DecodeSupport_inItem(1, decoderB, item(1, nodes)), DecodeSupport_inItem(2, decoderC, item(2, nodes)), DecodeSupport_inItem(3, decoderD, item(3, nodes))];
|
|
1102
|
+
}
|
|
1103
|
+
function Decode_tuple5(decoderA, decoderB, decoderC, decoderD, decoderE, node) {
|
|
1104
|
+
const nodes = DecodeSupport_tupleNodes(5, node);
|
|
1105
|
+
return [DecodeSupport_inItem(0, decoderA, item(0, nodes)), DecodeSupport_inItem(1, decoderB, item(1, nodes)), DecodeSupport_inItem(2, decoderC, item(2, nodes)), DecodeSupport_inItem(3, decoderD, item(3, nodes)), DecodeSupport_inItem(4, decoderE, item(4, nodes))];
|
|
1106
|
+
}
|
|
1107
|
+
function Decode_tuple6(decoderA, decoderB, decoderC, decoderD, decoderE, decoderF, node) {
|
|
1108
|
+
const nodes = DecodeSupport_tupleNodes(6, node);
|
|
1109
|
+
return [DecodeSupport_inItem(0, decoderA, item(0, nodes)), DecodeSupport_inItem(1, decoderB, item(1, nodes)), DecodeSupport_inItem(2, decoderC, item(2, nodes)), DecodeSupport_inItem(3, decoderD, item(3, nodes)), DecodeSupport_inItem(4, decoderE, item(4, nodes)), DecodeSupport_inItem(5, decoderF, item(5, nodes))];
|
|
1110
|
+
}
|
|
1111
|
+
function Decode_tuple7(decoderA, decoderB, decoderC, decoderD, decoderE, decoderF, decoderG, node) {
|
|
1112
|
+
const nodes = DecodeSupport_tupleNodes(7, node);
|
|
1113
|
+
return [DecodeSupport_inItem(0, decoderA, item(0, nodes)), DecodeSupport_inItem(1, decoderB, item(1, nodes)), DecodeSupport_inItem(2, decoderC, item(2, nodes)), DecodeSupport_inItem(3, decoderD, item(3, nodes)), DecodeSupport_inItem(4, decoderE, item(4, nodes)), DecodeSupport_inItem(5, decoderF, item(5, nodes)), DecodeSupport_inItem(6, decoderG, item(6, nodes))];
|
|
1114
|
+
}
|
|
1115
|
+
function Decode_tuple8(decoderA, decoderB, decoderC, decoderD, decoderE, decoderF, decoderG, decoderH, node) {
|
|
1116
|
+
const nodes = DecodeSupport_tupleNodes(8, node);
|
|
1117
|
+
return [DecodeSupport_inItem(0, decoderA, item(0, nodes)), DecodeSupport_inItem(1, decoderB, item(1, nodes)), DecodeSupport_inItem(2, decoderC, item(2, nodes)), DecodeSupport_inItem(3, decoderD, item(3, nodes)), DecodeSupport_inItem(4, decoderE, item(4, nodes)), DecodeSupport_inItem(5, decoderF, item(5, nodes)), DecodeSupport_inItem(6, decoderG, item(6, nodes)), DecodeSupport_inItem(7, decoderH, item(7, nodes))];
|
|
1118
|
+
}
|
|
1119
|
+
function Decode_map(keyDecoder, valueDecoder, node) {
|
|
1120
|
+
return ofSeq$1(DecodeSupport_decodePairs(true, keyDecoder, valueDecoder, node), {
|
|
1121
|
+
Compare: (x, y) => compare(x, y) | 0
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
function Decode_dict(keyDecoder, valueDecoder, node) {
|
|
1125
|
+
const result = new Dictionary([], {
|
|
1126
|
+
Equals: equals,
|
|
1127
|
+
GetHashCode: (x) => structuralHash(x) | 0
|
|
1128
|
+
});
|
|
1129
|
+
let enumerator = getEnumerator(DecodeSupport_decodePairs(false, keyDecoder, valueDecoder, node));
|
|
1130
|
+
try {
|
|
1131
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1132
|
+
const forLoopVar = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
1133
|
+
result.set(forLoopVar[0], forLoopVar[1]);
|
|
1134
|
+
}
|
|
1135
|
+
} finally {
|
|
1136
|
+
disposeSafe(enumerator);
|
|
1137
|
+
}
|
|
1138
|
+
return result;
|
|
1139
|
+
}
|
|
1140
|
+
function Decode_entries(node) {
|
|
1141
|
+
return DecodeSupport_mappingEntries("a mapping", node);
|
|
1142
|
+
}
|
|
1143
|
+
function Decode_node(node) {
|
|
1144
|
+
return node;
|
|
1145
|
+
}
|
|
1146
|
+
function Decode_alias(node) {
|
|
1147
|
+
const matchValue = node.Kind;
|
|
1148
|
+
if (matchValue.tag === /* Alias */
|
|
1149
|
+
3) {
|
|
1150
|
+
return matchValue.fields[0];
|
|
1151
|
+
} else {
|
|
1152
|
+
return DecodeSupport_fail(DecodeSupport_expected("an alias", node), node);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
function Decode_object(build, node) {
|
|
1156
|
+
return build(Decode_createGetters(node));
|
|
1157
|
+
}
|
|
1158
|
+
function Decode_uniqueKeys(decoder, node) {
|
|
1159
|
+
DecodeSupport_checkKeysBelow(node);
|
|
1160
|
+
return decoder(node);
|
|
1161
|
+
}
|
|
1162
|
+
function Decode_tryDecode(decoder, node) {
|
|
1163
|
+
try {
|
|
1164
|
+
return FSharpResult$2_Ok(decoder(node));
|
|
1165
|
+
} catch (matchValue) {
|
|
1166
|
+
if (matchValue instanceof YamlDecodeException) {
|
|
1167
|
+
const error = matchValue.Data0;
|
|
1168
|
+
return FSharpResult$2_Error$(error);
|
|
1169
|
+
} else {
|
|
1170
|
+
throw matchValue;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
export { DecodeError, DecodeErrorModule_pathText, DecodeErrorModule_text, DecodeError_$reflection, DecodeSupport_KeyIndex, DecodeSupport_KeyIndex_$ctor, DecodeSupport_KeyIndex_$reflection, DecodeSupport_KeyIndex__get_Integers, DecodeSupport_KeyIndex__get_Numbers, DecodeSupport_KeyWalkPlace, DecodeSupport_KeyWalkPlace_$reflection, DecodeSupport_checkKeysBelow, DecodeSupport_decodeItems, DecodeSupport_decodePairs, DecodeSupport_describeNode, DecodeSupport_describeNonString, DecodeSupport_describeNull, DecodeSupport_expected, DecodeSupport_fail, DecodeSupport_failAlias, DecodeSupport_failAt, DecodeSupport_failRepeatedKey, DecodeSupport_inEntry, DecodeSupport_inItem, DecodeSupport_inSegment, DecodeSupport_isNullNode, DecodeSupport_keyLabel, DecodeSupport_keyText, DecodeSupport_keyTokens, DecodeSupport_mappingEntries, DecodeSupport_normalizeTimestamp, DecodeSupport_parseDateTime, DecodeSupport_parseDateTimeOffset, DecodeSupport_scalarOf, DecodeSupport_sequenceItems, DecodeSupport_spanText, DecodeSupport_stringOf, DecodeSupport_tagText, DecodeSupport_tupleNodes, DecodeSupport_typedScalar, DecodeSupport_withSegment, Decode_alias, Decode_array, Decode_bool, Decode_char, Decode_datetime, Decode_datetimeOffset, Decode_dict, Decode_entries, Decode_float, Decode_int, Decode_int64, Decode_list, Decode_map, Decode_node, Decode_nonNull, Decode_object, Decode_option, Decode_resizearray, Decode_scalarText, Decode_seq, Decode_string, Decode_tryDecode, Decode_tuple2, Decode_tuple3, Decode_tuple4, Decode_tuple5, Decode_tuple6, Decode_tuple7, Decode_tuple8, Decode_uniqueKeys, Decode_values, PairKey$1, PairKey$1_$reflection, PairKey$1_NotANumber, PairKey$1_Null, PairKey$1_Value, YamlDecodeException, YamlDecodeException_$reflection };
|