@nfdi4plants/arctrl 1.0.0-alpha10
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/ARC.js +262 -0
- package/Contract/Contract.js +95 -0
- package/Contracts/Contracts.ARCtrl.js +35 -0
- package/Contracts/Contracts.ArcAssay.js +65 -0
- package/Contracts/Contracts.ArcInvestigation.js +58 -0
- package/Contracts/Contracts.ArcStudy.js +65 -0
- package/Contracts/Contracts.Git.js +91 -0
- package/FileSystem/Commit.js +18 -0
- package/FileSystem/DefaultGitignore.js +3 -0
- package/FileSystem/FileSystem.js +53 -0
- package/FileSystem/FileSystemTree.js +223 -0
- package/FileSystem/Path.js +38 -0
- package/FileSystemTree.js +51 -0
- package/ISA/ISA/ArcTypes/ArcTable.js +848 -0
- package/ISA/ISA/ArcTypes/ArcTableAux.js +1105 -0
- package/ISA/ISA/ArcTypes/ArcTables.js +479 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +2281 -0
- package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
- package/ISA/ISA/ArcTypes/CompositeColumn.js +48 -0
- package/ISA/ISA/ArcTypes/CompositeHeader.js +668 -0
- package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
- package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
- package/ISA/ISA/Builder/Types.js +243 -0
- package/ISA/ISA/Fable.js +50 -0
- package/ISA/ISA/Helper.js +338 -0
- package/ISA/ISA/Identifier.js +76 -0
- package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
- package/ISA/ISA/JsonTypes/Assay.js +620 -0
- package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
- package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
- package/ISA/ISA/JsonTypes/Comment.js +58 -0
- package/ISA/ISA/JsonTypes/CommentList.js +139 -0
- package/ISA/ISA/JsonTypes/Component.js +158 -0
- package/ISA/ISA/JsonTypes/Data.js +55 -0
- package/ISA/ISA/JsonTypes/DataFile.js +68 -0
- package/ISA/ISA/JsonTypes/Factor.js +128 -0
- package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
- package/ISA/ISA/JsonTypes/Investigation.js +204 -0
- package/ISA/ISA/JsonTypes/Material.js +66 -0
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
- package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
- package/ISA/ISA/JsonTypes/Person.js +137 -0
- package/ISA/ISA/JsonTypes/Process.js +401 -0
- package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
- package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
- package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
- package/ISA/ISA/JsonTypes/Protocol.js +277 -0
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
- package/ISA/ISA/JsonTypes/Publication.js +105 -0
- package/ISA/ISA/JsonTypes/Sample.js +71 -0
- package/ISA/ISA/JsonTypes/Source.js +54 -0
- package/ISA/ISA/JsonTypes/Study.js +942 -0
- package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
- package/ISA/ISA/JsonTypes/URI.js +19 -0
- package/ISA/ISA/JsonTypes/Value.js +210 -0
- package/ISA/ISA/Regex.js +588 -0
- package/ISA/ISA.Json/Assay.js +123 -0
- package/ISA/ISA.Json/Comment.js +84 -0
- package/ISA/ISA.Json/ConverterOptions.js +33 -0
- package/ISA/ISA.Json/Data.js +271 -0
- package/ISA/ISA.Json/Decode.js +46 -0
- package/ISA/ISA.Json/Factor.js +194 -0
- package/ISA/ISA.Json/GEncode.js +15 -0
- package/ISA/ISA.Json/Investigation.js +132 -0
- package/ISA/ISA.Json/Material.js +233 -0
- package/ISA/ISA.Json/Ontology.js +204 -0
- package/ISA/ISA.Json/Person.js +204 -0
- package/ISA/ISA.Json/Process.js +291 -0
- package/ISA/ISA.Json/Protocol.js +242 -0
- package/ISA/ISA.Json/Publication.js +92 -0
- package/ISA/ISA.Json/Study.js +230 -0
- package/ISA/ISA.Json/Validation/Fable.js +69 -0
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
- package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
- package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
- package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
- package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
- package/README.md +277 -0
- package/SemVer.js +60 -0
- package/Templates/Template.Json.js +85 -0
- package/Templates/Template.Spreadsheet.js +315 -0
- package/Templates/Template.Web.js +27 -0
- package/Templates/Template.js +179 -0
- package/Templates/Templates.js +82 -0
- package/WebRequest/WebRequest.js +38 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fable.Fetch.fableproj +21 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs +469 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +111 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +104 -0
- package/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +217 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +19 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Fable.SimpleHttp.fableproj +23 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs +357 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +429 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs +52 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +112 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
- package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
- package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
- package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
- package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Async.js +158 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
- package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
- package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
- package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
- package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
- package/fable_modules/fable-library.4.1.4/Char.js +169 -0
- package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
- package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
- package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
- package/fable_modules/fable-library.4.1.4/Date.js +451 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
- package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
- package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
- package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
- package/fable_modules/fable-library.4.1.4/Double.js +46 -0
- package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
- package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
- package/fable_modules/fable-library.4.1.4/Event.js +93 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
- package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
- package/fable_modules/fable-library.4.1.4/Global.js +8 -0
- package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
- package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
- package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
- package/fable_modules/fable-library.4.1.4/List.js +1273 -0
- package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Long.js +46 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
- package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
- package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
- package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Native.js +8 -0
- package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
- package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
- package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Option.js +96 -0
- package/fable_modules/fable-library.4.1.4/README.md +3 -0
- package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
- package/fable_modules/fable-library.4.1.4/Random.js +170 -0
- package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Range.js +45 -0
- package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
- package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
- package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
- package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
- package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
- package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
- package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
- package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
- package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
- package/fable_modules/fable-library.4.1.4/String.js +540 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
- package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
- package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
- package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
- package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
- package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
- package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
- package/fable_modules/fable-library.4.1.4/Types.js +208 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
- package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
- package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
- package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
- package/fable_modules/fable-library.4.1.4/Util.js +662 -0
- package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
- package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
- package/fable_modules/fable-library.4.1.4/package.json +23 -0
- package/fable_modules/project_cracked.json +1 -0
- package/index.js +13 -0
- package/package.json +24 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
/// The Fetch API provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses.
|
|
2
|
+
/// It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
|
|
3
|
+
module Fetch
|
|
4
|
+
|
|
5
|
+
#nowarn "1182" // Unused values
|
|
6
|
+
|
|
7
|
+
open System
|
|
8
|
+
open Fable.Core
|
|
9
|
+
open Fable.Core.JsInterop
|
|
10
|
+
open Browser.Types
|
|
11
|
+
|
|
12
|
+
[<AutoOpen>]
|
|
13
|
+
module Types =
|
|
14
|
+
[<StringEnum; RequireQualifiedAccess>]
|
|
15
|
+
type RequestDestination =
|
|
16
|
+
| [<CompiledName("")>] Empty
|
|
17
|
+
| Audio
|
|
18
|
+
| [<CompiledName("audioworklet")>] AudioWorklet
|
|
19
|
+
| Document
|
|
20
|
+
| Embed
|
|
21
|
+
| Font
|
|
22
|
+
| Frame
|
|
23
|
+
| Iframe
|
|
24
|
+
| Image
|
|
25
|
+
| Manifest
|
|
26
|
+
| Object
|
|
27
|
+
| [<CompiledName("paintworklet")>] PaintWorklet
|
|
28
|
+
| Report
|
|
29
|
+
| Script
|
|
30
|
+
| [<CompiledName("sharedworker")>] SharedWorker
|
|
31
|
+
| Style
|
|
32
|
+
| Track
|
|
33
|
+
| Video
|
|
34
|
+
| Worker
|
|
35
|
+
| [<CompiledName("xslt")>] XSLT
|
|
36
|
+
|
|
37
|
+
type Body =
|
|
38
|
+
abstract bodyUsed: bool with get, set
|
|
39
|
+
abstract arrayBuffer: unit -> JS.Promise<JS.ArrayBuffer>
|
|
40
|
+
abstract blob: unit -> JS.Promise<Blob>
|
|
41
|
+
abstract formData: unit -> JS.Promise<FormData>
|
|
42
|
+
abstract json : unit -> JS.Promise<obj>
|
|
43
|
+
abstract json<'T> : unit -> JS.Promise<'T>
|
|
44
|
+
abstract text : unit -> JS.Promise<string>
|
|
45
|
+
|
|
46
|
+
and Request = //(input: U2<string, Request>, ?init: RequestInit) =
|
|
47
|
+
inherit Body
|
|
48
|
+
abstract ``method`` : string with get
|
|
49
|
+
abstract url: string with get
|
|
50
|
+
abstract headers: Headers with get
|
|
51
|
+
abstract destination : RequestDestination with get
|
|
52
|
+
abstract referrer: string with get
|
|
53
|
+
abstract referrerPolicy: ReferrerPolicy with get
|
|
54
|
+
abstract mode: U2<string,RequestMode> with get
|
|
55
|
+
abstract credentials: U2<string,RequestCredentials> with get
|
|
56
|
+
abstract cache: U2<string,RequestCache> with get
|
|
57
|
+
abstract redirect: RedirectMode with get
|
|
58
|
+
abstract integrity: string with get
|
|
59
|
+
abstract keepalive: bool with get
|
|
60
|
+
abstract isReloadNavigation: bool with get
|
|
61
|
+
abstract isHistoryNavigation: bool with get
|
|
62
|
+
abstract clone: unit -> Request
|
|
63
|
+
|
|
64
|
+
and RequestInit =
|
|
65
|
+
abstract ``method``: string option with get, set
|
|
66
|
+
abstract headers: HeaderInit option with get, set
|
|
67
|
+
abstract body: BodyInit option with get, set
|
|
68
|
+
abstract referrer: string with get, set
|
|
69
|
+
abstract referrerPolicy: ReferrerPolicy with get, set
|
|
70
|
+
abstract mode: RequestMode option with get, set
|
|
71
|
+
abstract credentials: RequestCredentials option with get, set
|
|
72
|
+
abstract cache: RequestCache option with get, set
|
|
73
|
+
abstract redirect: RedirectMode with get, set
|
|
74
|
+
abstract integrity: string with get, set
|
|
75
|
+
abstract keepalive: bool with get, set
|
|
76
|
+
|
|
77
|
+
and [<StringEnum; RequireQualifiedAccess>] RequestContext =
|
|
78
|
+
| Audio | Beacon | Cspreport | Download | Embed | Eventsource | Favicon | Fetch | Font
|
|
79
|
+
| Form | Frame | Hyperlink | Iframe | Image | Imageset | Import | Internal | Location
|
|
80
|
+
| Manifest | Object | Ping | Plugin | Prefetch | Script | Serviceworker | Sharedworker
|
|
81
|
+
| Subresource | Style | Track | Video | Worker | Xmlhttprequest | Xslt
|
|
82
|
+
|
|
83
|
+
and [<StringEnum; RequireQualifiedAccess>] RequestMode =
|
|
84
|
+
| [<CompiledName("same-origin")>]Sameorigin | [<CompiledName("no-cors")>]Nocors | Cors
|
|
85
|
+
|
|
86
|
+
and [<StringEnum; RequireQualifiedAccess>] RequestCredentials =
|
|
87
|
+
Omit | [<CompiledName("same-origin")>]Sameorigin | Include
|
|
88
|
+
|
|
89
|
+
and [<StringEnum; RequireQualifiedAccess>] RequestCache =
|
|
90
|
+
| Default
|
|
91
|
+
| [<CompiledName("no-store")>]Nostore
|
|
92
|
+
| Reload
|
|
93
|
+
| [<CompiledName("no-cache")>]Nocache
|
|
94
|
+
| [<CompiledName("force-cache")>]Forcecache
|
|
95
|
+
| [<CompiledName("only-if-cached")>]Onlyifcached
|
|
96
|
+
|
|
97
|
+
and [<StringEnum; RequireQualifiedAccess>] RedirectMode =
|
|
98
|
+
| Follow | Error | Manual
|
|
99
|
+
|
|
100
|
+
and [<StringEnum; RequireQualifiedAccess>] ReferrerPolicy =
|
|
101
|
+
| [<CompiledName("no-referrer")>]NoReferrer
|
|
102
|
+
| [<CompiledName("no-referrer-when-downgrade")>]NoReferrerWhenDowngrade
|
|
103
|
+
| Origin
|
|
104
|
+
| [<CompiledName("origin-when-cross-origin")>]OriginWhenCrossOrigin
|
|
105
|
+
| [<CompiledName("unsafe-url")>]UnsafeUrl
|
|
106
|
+
|
|
107
|
+
and Headers =
|
|
108
|
+
abstract append : string * string -> unit
|
|
109
|
+
abstract delete : string -> unit
|
|
110
|
+
abstract get : string -> string
|
|
111
|
+
abstract getAll : string -> string[]
|
|
112
|
+
abstract has : string -> bool
|
|
113
|
+
abstract set : string * string -> unit
|
|
114
|
+
|
|
115
|
+
/// Specifying which web sites can participate in cross-origin resource sharing
|
|
116
|
+
[<Emit("$0.get('Access-Control-Allow-Origin')")>] abstract AccessControlAllowOrigin: string option
|
|
117
|
+
|
|
118
|
+
/// Specifies which patch document formats this server supports
|
|
119
|
+
[<Emit("$0.get('Accept-Patch')")>] abstract AcceptPatch: string option
|
|
120
|
+
|
|
121
|
+
/// What partial content range types this server supports via byte serving
|
|
122
|
+
[<Emit("$0.get('Accept-Ranges')")>] abstract AcceptRanges: string option
|
|
123
|
+
|
|
124
|
+
/// The age the object has been in a proxy cache in seconds
|
|
125
|
+
[<Emit("$0.get('Age')")>] abstract Age: string option
|
|
126
|
+
|
|
127
|
+
/// Valid actions for a specified resource. To be used for a 405 Method not allowed
|
|
128
|
+
[<Emit("$0.get('Allow')")>] abstract Allow: string option
|
|
129
|
+
|
|
130
|
+
/// A server uses "Alt-Svc" header (meaning Alternative Services) to indicate that its resources can also be accessed at a different network location (host or port) or using a different protocol
|
|
131
|
+
[<Emit("$0.get('Alt-Svc')")>] abstract AltSvc: string option
|
|
132
|
+
|
|
133
|
+
/// Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds
|
|
134
|
+
[<Emit("$0.get('Cache-Control')")>] abstract CacheControl: string option
|
|
135
|
+
|
|
136
|
+
/// Control options for the current connection and list of hop-by-hop response fields
|
|
137
|
+
[<Emit("$0.get('Connection')")>] abstract Connection: string option
|
|
138
|
+
|
|
139
|
+
/// An opportunity to raise a "File Download" dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters.
|
|
140
|
+
[<Emit("$0.get('Content-Disposition')")>] abstract ContentDisposition: string option
|
|
141
|
+
|
|
142
|
+
/// The type of encoding used on the data
|
|
143
|
+
[<Emit("$0.get('Content-Encoding')")>] abstract ContentEncoding: string option
|
|
144
|
+
|
|
145
|
+
/// The natural language or languages of the intended audience for the enclosed content
|
|
146
|
+
[<Emit("$0.get('Content-Language')")>] abstract ContentLanguage: string option
|
|
147
|
+
|
|
148
|
+
/// The length of the response body in octets (8-bit bytes)
|
|
149
|
+
[<Emit("$0.get('Content-Length')")>] abstract ContentLength: string option
|
|
150
|
+
|
|
151
|
+
/// An alternate location for the returned data
|
|
152
|
+
[<Emit("$0.get('Content-Location')")>] abstract ContentLocation: string option
|
|
153
|
+
|
|
154
|
+
/// A Base64-encoded binary MD5 sum of the content of the response
|
|
155
|
+
[<Emit("$0.get('Content-MD5')")>] abstract ContentMD5: string option
|
|
156
|
+
|
|
157
|
+
/// Where in a full body message this partial message belongs
|
|
158
|
+
[<Emit("$0.get('Content-Range'')")>] abstract ContentRange: string option
|
|
159
|
+
|
|
160
|
+
/// The MIME type of this content
|
|
161
|
+
[<Emit("$0.get('Content-Type')")>] abstract ContentType: string option
|
|
162
|
+
|
|
163
|
+
/// The date and time that the message was sent (in "HTTP-date" format as defined by RFC 7231)
|
|
164
|
+
[<Emit("$0.get('Date')")>] abstract Date: string option
|
|
165
|
+
|
|
166
|
+
/// An identifier for a specific version of a resource, often a message digest
|
|
167
|
+
[<Emit("$0.get('ETag')")>] abstract ETag: string option
|
|
168
|
+
|
|
169
|
+
/// Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 7231)
|
|
170
|
+
[<Emit("$0.get('Expires')")>] abstract Expires: string option
|
|
171
|
+
|
|
172
|
+
/// The last modified date for the requested object (in "HTTP-date" format as defined by RFC 7231)
|
|
173
|
+
[<Emit("$0.get('Last-Modified')")>] abstract LastModified: string option
|
|
174
|
+
|
|
175
|
+
/// Used to express a typed relationship with another resource, where the relation type is defined by RFC 5988
|
|
176
|
+
[<Emit("$0.get('Link')")>] abstract Link: string option
|
|
177
|
+
|
|
178
|
+
/// Used in redirection, or when a new resource has been created.
|
|
179
|
+
[<Emit("$0.get('Location')")>] abstract Location: string option
|
|
180
|
+
|
|
181
|
+
/// This field is supposed to set P3P policy, in the form of P3P:CP="your_compact_policy".
|
|
182
|
+
[<Emit("$0.get('P3P')")>] abstract P3P: string option
|
|
183
|
+
|
|
184
|
+
/// Implementation-specific fields that may have various effects anywhere along the request-response chain.
|
|
185
|
+
[<Emit("$0.get('Pragma')")>] abstract Pragma: string option
|
|
186
|
+
|
|
187
|
+
/// Request authentication to access the proxy.
|
|
188
|
+
[<Emit("$0.get('Proxy-Authenticate')")>] abstract ProxyAuthenticate: string option
|
|
189
|
+
|
|
190
|
+
/// HTTP Public Key Pinning, announces hash of website's authentic TLS certificate
|
|
191
|
+
[<Emit("$0.get('Public-Key-Pins')")>] abstract PublicKeyPins: string option
|
|
192
|
+
|
|
193
|
+
/// Used in redirection, or when a new resource has been created. This refresh redirects after 5 seconds.
|
|
194
|
+
[<Emit("$0.get('Refresh')")>] abstract Refresh: string option
|
|
195
|
+
|
|
196
|
+
/// If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.
|
|
197
|
+
[<Emit("$0.get('Retry-After')")>] abstract RetryAfter: string option
|
|
198
|
+
|
|
199
|
+
/// A name for the server
|
|
200
|
+
[<Emit("$0.get('Server')")>] abstract Server: string option
|
|
201
|
+
|
|
202
|
+
/// An HTTP cookie
|
|
203
|
+
[<Emit("$0.get('Set-Cookie')")>] abstract SetCookie: string option
|
|
204
|
+
|
|
205
|
+
/// CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 7230
|
|
206
|
+
[<Emit("$0.get('Status')")>] abstract Status: string option
|
|
207
|
+
|
|
208
|
+
/// A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains.
|
|
209
|
+
[<Emit("$0.get('Strict-Transport-Security')")>] abstract StrictTransportSecurity: string option
|
|
210
|
+
|
|
211
|
+
/// The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.
|
|
212
|
+
[<Emit("$0.get('Trailer')")>] abstract Trailer: string option
|
|
213
|
+
|
|
214
|
+
/// The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
|
|
215
|
+
[<Emit("$0.get('Transfer-Encoding')")>] abstract TransferEncoding: string option
|
|
216
|
+
|
|
217
|
+
/// Tracking Status Value, value suggested to be sent in response to a DNT(do-not-track)
|
|
218
|
+
[<Emit("$0.get('TSV')")>] abstract TSV: string option
|
|
219
|
+
|
|
220
|
+
/// Ask the client to upgrade to another protocol.
|
|
221
|
+
[<Emit("$0.get('Upgrade')")>] abstract Upgrade: string option
|
|
222
|
+
|
|
223
|
+
/// Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.
|
|
224
|
+
[<Emit("$0.get('Vary')")>] abstract Vary: string option
|
|
225
|
+
|
|
226
|
+
/// Informs the client of proxies through which the response was sent.
|
|
227
|
+
[<Emit("$0.get('Via')")>] abstract Via: string option
|
|
228
|
+
|
|
229
|
+
/// A general warning about possible problems with the entity body.
|
|
230
|
+
[<Emit("$0.get('Warning')")>] abstract Warning: string option
|
|
231
|
+
|
|
232
|
+
/// Indicates the authentication scheme that should be used to access the requested entity.
|
|
233
|
+
[<Emit("$0.get('WWW-Authenticate')")>] abstract WWWAuthenticate: string option
|
|
234
|
+
|
|
235
|
+
/// Clickjacking protection: deny - no rendering within a frame, sameorigin - no rendering if origin mismatch, allow-from - allow from specified location, allowall - non-standard, allow from any location
|
|
236
|
+
[<Emit("$0.get('X-Frame-Options')")>] abstract XFrameOptions: string option
|
|
237
|
+
|
|
238
|
+
/// Cross-site scripting (XSS) filter
|
|
239
|
+
[<Emit("$0.get('X-XSS-Protection')")>] abstract XXSSProtection: string option
|
|
240
|
+
|
|
241
|
+
/// Content Security Policy definition.
|
|
242
|
+
[<Emit("$0.get('Content-Security-Policy')")>] abstract ContentSecurityPolicy: string option
|
|
243
|
+
|
|
244
|
+
/// The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions
|
|
245
|
+
[<Emit("$0.get('X-Content-Type-Options')")>] abstract XContentTypeOptions: string option
|
|
246
|
+
|
|
247
|
+
/// Specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)
|
|
248
|
+
[<Emit("$0.get('X-Powered-By')")>] abstract XPoweredBy: string option
|
|
249
|
+
|
|
250
|
+
/// Recommends the preferred rendering engine (often a backward-compatibility mode) to use to display the content. Also used to activate Chrome Frame in Internet Explorer.
|
|
251
|
+
[<Emit("$0.get('X-UA-Compatible')")>] abstract XUACompatible: string option
|
|
252
|
+
|
|
253
|
+
/// Provide the duration of the audio or video in seconds; only supported by Gecko browsers
|
|
254
|
+
[<Emit("$0.get('X-Content-Duration')")>] abstract XContentDuration: string option
|
|
255
|
+
|
|
256
|
+
/// Tells a server which (presumably in the middle of a HTTP -> HTTPS migration) hosts mixed content that the client would prefer redirection to HTTPS and can handle Content-Security-Policy: upgrade-insecure-requests
|
|
257
|
+
[<Emit("$0.get('Upgrade-Insecure-Requests')")>] abstract UpgradeInsecureRequests: string option
|
|
258
|
+
|
|
259
|
+
/// Correlates HTTP requests between a client and server.
|
|
260
|
+
[<Emit("$0.get('X-Request-ID')")>] abstract XRequestID: string option
|
|
261
|
+
|
|
262
|
+
/// Correlates HTTP requests between a client and server.
|
|
263
|
+
[<Emit("$0.get('X-Correlation-ID')")>] abstract XCorrelationID: string option
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
and Response = //(?body: BodyInit, ?init: ResponseInit) =
|
|
267
|
+
inherit Body
|
|
268
|
+
|
|
269
|
+
[<Emit("$0.type")>] abstract Type: ResponseType
|
|
270
|
+
|
|
271
|
+
[<Emit("$0.redirected")>] abstract Redirected: bool
|
|
272
|
+
|
|
273
|
+
/// Verifies that the fetch was successful
|
|
274
|
+
[<Emit("$0.ok")>] abstract Ok: bool
|
|
275
|
+
|
|
276
|
+
/// Returns the HTTP status code
|
|
277
|
+
[<Emit("$0.status")>] abstract Status: int
|
|
278
|
+
|
|
279
|
+
/// Returns the HTTP status message
|
|
280
|
+
[<Emit("$0.statusText")>] abstract StatusText: string
|
|
281
|
+
|
|
282
|
+
/// Returns the response URL
|
|
283
|
+
[<Emit("$0.url")>] abstract Url: string
|
|
284
|
+
|
|
285
|
+
/// Returns the headers objct
|
|
286
|
+
[<Emit("$0.headers")>] abstract Headers : Headers
|
|
287
|
+
|
|
288
|
+
[<Emit("$0.clone()")>] abstract clone: unit -> Response
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
and [<StringEnum; RequireQualifiedAccess>] ResponseType =
|
|
292
|
+
| Basic | Cors | Default | Error | Opaque
|
|
293
|
+
|
|
294
|
+
and ResponseInit =
|
|
295
|
+
abstract status: float with get, set
|
|
296
|
+
abstract statusText: string option with get, set
|
|
297
|
+
abstract headers: HeaderInit option with get, set
|
|
298
|
+
|
|
299
|
+
and HeaderInit =
|
|
300
|
+
U2<Headers, string[]>
|
|
301
|
+
|
|
302
|
+
and BodyInit =
|
|
303
|
+
U3<Blob, FormData, string>
|
|
304
|
+
|
|
305
|
+
[<Erase; RequireQualifiedAccess; NoComparison>]
|
|
306
|
+
type RequestInfo =
|
|
307
|
+
/// Uses a simple Url as string to create the request info
|
|
308
|
+
| Url of string
|
|
309
|
+
/// Uses a Request object as request info
|
|
310
|
+
| Req of Request
|
|
311
|
+
|
|
312
|
+
type [<Erase>] GlobalFetch =
|
|
313
|
+
[<Global>]static member fetch (req: RequestInfo, ?init: RequestInit) = jsNative :JS.Promise<Response>
|
|
314
|
+
|
|
315
|
+
[<StringEnum; RequireQualifiedAccess>]
|
|
316
|
+
type HttpMethod =
|
|
317
|
+
| [<CompiledName("CONNECT")>] CONNECT
|
|
318
|
+
| [<CompiledName("DELETE")>] DELETE
|
|
319
|
+
| [<CompiledName("GET")>] GET
|
|
320
|
+
| [<CompiledName("HEAD")>] HEAD
|
|
321
|
+
| [<CompiledName("OPTIONS")>] OPTIONS
|
|
322
|
+
| [<CompiledName("PATCH")>] PATCH
|
|
323
|
+
| [<CompiledName("POST")>] POST
|
|
324
|
+
| [<CompiledName("PUT")>] PUT
|
|
325
|
+
| [<CompiledName("TRACE")>] TRACE
|
|
326
|
+
|
|
327
|
+
type IHttpRequestHeaders =
|
|
328
|
+
interface end
|
|
329
|
+
|
|
330
|
+
type HttpRequestHeaders =
|
|
331
|
+
| Accept of string
|
|
332
|
+
| [<CompiledName("Accept-Charset")>] AcceptCharset of string
|
|
333
|
+
| [<CompiledName("Accept-Encoding")>] AcceptEncoding of string
|
|
334
|
+
| [<CompiledName("Accept-Language")>] AcceptLanguage of string
|
|
335
|
+
| [<CompiledName("Accept-Datetime")>] AcceptDatetime of string
|
|
336
|
+
| Authorization of string
|
|
337
|
+
| [<CompiledName("Cache-Control")>] CacheControl of string
|
|
338
|
+
| Connection of string
|
|
339
|
+
| Cookie of string
|
|
340
|
+
| [<CompiledName("Content-Length")>] ContentLength of string
|
|
341
|
+
| [<CompiledName("Content-MD5")>] ContentMD5 of string
|
|
342
|
+
| [<CompiledName("Content-Type")>] ContentType of string
|
|
343
|
+
| Date of string
|
|
344
|
+
| Expect of string
|
|
345
|
+
| Forwarded of string
|
|
346
|
+
| From of string
|
|
347
|
+
| Host of string
|
|
348
|
+
| [<CompiledName("If-Match")>] IfMatch of string
|
|
349
|
+
| [<CompiledName("If-Modified-Since")>] IfModifiedSince of string
|
|
350
|
+
| [<CompiledName("If-None-Match")>] IfNoneMatch of string
|
|
351
|
+
| [<CompiledName("If-Range")>] IfRange of string
|
|
352
|
+
| [<CompiledName("If-Unmodified-Since")>] IfUnmodifiedSince of string
|
|
353
|
+
| [<CompiledName("Max-Forwards")>] MaxForwards of int
|
|
354
|
+
| Origin of string
|
|
355
|
+
| Pragma of string
|
|
356
|
+
| [<CompiledName("Proxy-Authorization")>] ProxyAuthorization of string
|
|
357
|
+
| Range of string
|
|
358
|
+
| Referer of string
|
|
359
|
+
| [<CompiledName("SOAPAction")>] SOAPAction of string
|
|
360
|
+
| [<CompiledName("TE")>] TE of string
|
|
361
|
+
| [<CompiledName("User-Agent")>] UserAgent of string
|
|
362
|
+
| Upgrade of string
|
|
363
|
+
| Via of string
|
|
364
|
+
| Warning of string
|
|
365
|
+
| [<CompiledName("X-Requested-With")>] XRequestedWith of string
|
|
366
|
+
| [<CompiledName("DNT")>] DNT of string
|
|
367
|
+
| [<CompiledName("X-Forwarded-For")>] XForwardedFor of string
|
|
368
|
+
| [<CompiledName("X-Forwarded-Host")>] XForwardedHost of string
|
|
369
|
+
| [<CompiledName("X-Forwarded-Proto")>] XForwardedProto of string
|
|
370
|
+
| [<CompiledName("Front-End-Https")>] FrontEndHttps of string
|
|
371
|
+
| [<CompiledName("X-Http-Method-Override")>] XHttpMethodOverride of string
|
|
372
|
+
| [<CompiledName("X-ATT-DeviceId")>] XATTDeviceId of string
|
|
373
|
+
| [<CompiledName("X-Wap-Profile")>] XWapProfile of string
|
|
374
|
+
| [<CompiledName("Proxy-Connection")>] ProxyConnection of string
|
|
375
|
+
| [<CompiledName("X-UIDH")>] XUIDH of string
|
|
376
|
+
| [<CompiledName("X-Csrf-Token")>] XCsrfToken of string
|
|
377
|
+
| [<Erase>] Custom of key:string * value:obj
|
|
378
|
+
|
|
379
|
+
type AbortSignal =
|
|
380
|
+
inherit Browser.Types.EventTarget
|
|
381
|
+
abstract aborted : bool with get
|
|
382
|
+
abstract onabort : (unit -> unit) with get, set
|
|
383
|
+
abstract reason: obj with get
|
|
384
|
+
abstract throwIfAborted: unit -> unit
|
|
385
|
+
|
|
386
|
+
type AbortController =
|
|
387
|
+
abstract signal : AbortSignal with get
|
|
388
|
+
abstract abort : (unit -> unit) with get
|
|
389
|
+
|
|
390
|
+
[<NoComparison>]
|
|
391
|
+
type RequestProperties =
|
|
392
|
+
| Method of HttpMethod
|
|
393
|
+
| Headers of IHttpRequestHeaders
|
|
394
|
+
| Body of BodyInit
|
|
395
|
+
| Mode of RequestMode
|
|
396
|
+
| Credentials of RequestCredentials
|
|
397
|
+
| Cache of RequestCache
|
|
398
|
+
| Redirect of RedirectMode
|
|
399
|
+
| Referrer of string
|
|
400
|
+
| ReferrerPolicy of ReferrerPolicy
|
|
401
|
+
| Integrity of string
|
|
402
|
+
| KeepAlive of bool
|
|
403
|
+
| Signal of AbortSignal
|
|
404
|
+
|
|
405
|
+
type ResponseInitProperties =
|
|
406
|
+
| Status of int
|
|
407
|
+
| StatusText of string
|
|
408
|
+
| Headers of (string * string)[]
|
|
409
|
+
|
|
410
|
+
[<Emit("new Response($0...)")>]
|
|
411
|
+
let private createResponseInit (content: obj, options: obj): Response = jsNative
|
|
412
|
+
|
|
413
|
+
type Response with
|
|
414
|
+
|
|
415
|
+
static member create(content: string, ?options: seq<ResponseInitProperties>) : Response =
|
|
416
|
+
let options = defaultArg options Seq.empty
|
|
417
|
+
createResponseInit (content, keyValueList CaseRules.LowerFirst options)
|
|
418
|
+
|
|
419
|
+
static member create(content: Blob, ?options: seq<ResponseInitProperties>) : Response =
|
|
420
|
+
let options = defaultArg options Seq.empty
|
|
421
|
+
createResponseInit (content, keyValueList CaseRules.LowerFirst options)
|
|
422
|
+
|
|
423
|
+
static member create(content: JS.ArrayBuffer, ?options: seq<ResponseInitProperties>) : Response =
|
|
424
|
+
let options = defaultArg options Seq.empty
|
|
425
|
+
createResponseInit (content, keyValueList CaseRules.LowerFirst options)
|
|
426
|
+
|
|
427
|
+
static member create(content: JS.ArrayBufferView, ?options: seq<ResponseInitProperties>) : Response =
|
|
428
|
+
let options = defaultArg options Seq.empty
|
|
429
|
+
createResponseInit (content, keyValueList CaseRules.LowerFirst options)
|
|
430
|
+
|
|
431
|
+
[<Emit("Response.json($0...)")>]
|
|
432
|
+
static member json<'T>(value: 'T, ?status: int): Response = jsNative
|
|
433
|
+
|
|
434
|
+
[<Emit("Response.redirect($0...)")>]
|
|
435
|
+
static member redirect(url: string, ?status: int): Response = jsNative
|
|
436
|
+
|
|
437
|
+
[<Emit("Response.error()")>]
|
|
438
|
+
static member error(): Response = jsNative
|
|
439
|
+
|
|
440
|
+
[<Emit("new AbortController()")>]
|
|
441
|
+
let newAbortController () : AbortController = jsNative
|
|
442
|
+
|
|
443
|
+
let inline requestHeaders (headers: HttpRequestHeaders list) =
|
|
444
|
+
RequestProperties.Headers(keyValueList CaseRules.None headers :?> IHttpRequestHeaders)
|
|
445
|
+
|
|
446
|
+
let inline requestProps (props: RequestProperties list) =
|
|
447
|
+
keyValueList CaseRules.LowerFirst props :?> RequestInit
|
|
448
|
+
|
|
449
|
+
let private errorString (response: Response) =
|
|
450
|
+
string response.Status + " " + response.StatusText + " for URL " + response.Url
|
|
451
|
+
|
|
452
|
+
/// Retrieves data from the specified resource. Fails if `response.Ok` evals to false.
|
|
453
|
+
let fetch (url: string) (init: RequestProperties list) : JS.Promise<Response> =
|
|
454
|
+
GlobalFetch.fetch(RequestInfo.Url url, requestProps init)
|
|
455
|
+
|> Promise.map (fun response ->
|
|
456
|
+
if response.Ok
|
|
457
|
+
then response
|
|
458
|
+
else errorString response |> failwith)
|
|
459
|
+
|
|
460
|
+
/// Retrieves data from the specified resource without check for 2xx status.
|
|
461
|
+
let fetchUnsafe (url: string) (init: RequestProperties list) : JS.Promise<Response> =
|
|
462
|
+
GlobalFetch.fetch(RequestInfo.Url url, requestProps init)
|
|
463
|
+
|
|
464
|
+
let tryFetch (url: string) (init: RequestProperties list) : JS.Promise<Result<Response, Exception>> =
|
|
465
|
+
fetch url init |> Promise.result
|
|
466
|
+
|
|
467
|
+
/// Sends a HTTP OPTIONS request.
|
|
468
|
+
let tryOptionsRequest (url:string) : JS.Promise<Result<Response, Exception>> =
|
|
469
|
+
fetch url [RequestProperties.Method HttpMethod.OPTIONS] |> Promise.result
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Union } from "../fable-library.4.1.4/Types.js";
|
|
2
|
+
import { array_type, tuple_type, bool_type, class_type, union_type, obj_type, int32_type, string_type } from "../fable-library.4.1.4/Reflection.js";
|
|
3
|
+
import { defaultArg } from "../fable-library.4.1.4/Option.js";
|
|
4
|
+
import { empty } from "../fable-library.4.1.4/Seq.js";
|
|
5
|
+
import { keyValueList } from "../fable-library.4.1.4/MapUtil.js";
|
|
6
|
+
import { int32ToString } from "../fable-library.4.1.4/Util.js";
|
|
7
|
+
import { result } from "../Fable.Promise.3.2.0/Promise.fs.js";
|
|
8
|
+
import { singleton } from "../fable-library.4.1.4/List.js";
|
|
9
|
+
|
|
10
|
+
export class Types_HttpRequestHeaders extends Union {
|
|
11
|
+
constructor(tag, fields) {
|
|
12
|
+
super();
|
|
13
|
+
this.tag = tag;
|
|
14
|
+
this.fields = fields;
|
|
15
|
+
}
|
|
16
|
+
cases() {
|
|
17
|
+
return ["Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", "Accept-Datetime", "Authorization", "Cache-Control", "Connection", "Cookie", "Content-Length", "Content-MD5", "Content-Type", "Date", "Expect", "Forwarded", "From", "Host", "If-Match", "If-Modified-Since", "If-None-Match", "If-Range", "If-Unmodified-Since", "Max-Forwards", "Origin", "Pragma", "Proxy-Authorization", "Range", "Referer", "SOAPAction", "TE", "User-Agent", "Upgrade", "Via", "Warning", "X-Requested-With", "DNT", "X-Forwarded-For", "X-Forwarded-Host", "X-Forwarded-Proto", "Front-End-Https", "X-Http-Method-Override", "X-ATT-DeviceId", "X-Wap-Profile", "Proxy-Connection", "X-UIDH", "X-Csrf-Token", "Custom"];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function Types_HttpRequestHeaders_$reflection() {
|
|
22
|
+
return union_type("Fetch.Types.HttpRequestHeaders", [], Types_HttpRequestHeaders, () => [[["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", int32_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["key", string_type], ["value", obj_type]]]);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class Types_RequestProperties extends Union {
|
|
26
|
+
constructor(tag, fields) {
|
|
27
|
+
super();
|
|
28
|
+
this.tag = tag;
|
|
29
|
+
this.fields = fields;
|
|
30
|
+
}
|
|
31
|
+
cases() {
|
|
32
|
+
return ["Method", "Headers", "Body", "Mode", "Credentials", "Cache", "Redirect", "Referrer", "ReferrerPolicy", "Integrity", "KeepAlive", "Signal"];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function Types_RequestProperties_$reflection() {
|
|
37
|
+
return union_type("Fetch.Types.RequestProperties", [], Types_RequestProperties, () => [[["Item", string_type]], [["Item", class_type("Fetch.Types.IHttpRequestHeaders")]], [["Item", class_type("Fable.Core.U3`3", [class_type("Browser.Types.Blob", void 0), class_type("Browser.Types.FormData", void 0), string_type])]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", string_type]], [["Item", bool_type]], [["Item", class_type("Fetch.Types.AbortSignal")]]]);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class Types_ResponseInitProperties extends Union {
|
|
41
|
+
constructor(tag, fields) {
|
|
42
|
+
super();
|
|
43
|
+
this.tag = tag;
|
|
44
|
+
this.fields = fields;
|
|
45
|
+
}
|
|
46
|
+
cases() {
|
|
47
|
+
return ["Status", "StatusText", "Headers"];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function Types_ResponseInitProperties_$reflection() {
|
|
52
|
+
return union_type("Fetch.Types.ResponseInitProperties", [], Types_ResponseInitProperties, () => [[["Item", int32_type]], [["Item", string_type]], [["Item", array_type(tuple_type(string_type, string_type))]]]);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function Fetch_Types_Response__Response_create_Static_36F1D09D(content, options) {
|
|
56
|
+
const options_1 = defaultArg(options, empty());
|
|
57
|
+
return new Response(content, keyValueList(options_1, 1));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function Fetch_Types_Response__Response_create_Static_Z7AF41C79(content, options) {
|
|
61
|
+
const options_1 = defaultArg(options, empty());
|
|
62
|
+
return new Response(content, keyValueList(options_1, 1));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function Fetch_Types_Response__Response_create_Static_Z43D75E86(content, options) {
|
|
66
|
+
const options_1 = defaultArg(options, empty());
|
|
67
|
+
return new Response(content, keyValueList(options_1, 1));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function Fetch_Types_Response__Response_create_Static_7B93BED7(content, options) {
|
|
71
|
+
const options_1 = defaultArg(options, empty());
|
|
72
|
+
return new Response(content, keyValueList(options_1, 1));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function errorString(response) {
|
|
76
|
+
return (((int32ToString(response.status) + " ") + (response.statusText)) + " for URL ") + (response.url);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Retrieves data from the specified resource. Fails if `response.Ok` evals to false.
|
|
81
|
+
*/
|
|
82
|
+
export function fetch$(url, init) {
|
|
83
|
+
const pr = fetch(url, keyValueList(init, 1));
|
|
84
|
+
return pr.then((response) => {
|
|
85
|
+
if (response.ok) {
|
|
86
|
+
return response;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
throw new Error(errorString(response));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Retrieves data from the specified resource without check for 2xx status.
|
|
96
|
+
*/
|
|
97
|
+
export function fetchUnsafe(url, init) {
|
|
98
|
+
return fetch(url, keyValueList(init, 1));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function tryFetch(url, init) {
|
|
102
|
+
return result(fetch$(url, init));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Sends a HTTP OPTIONS request.
|
|
107
|
+
*/
|
|
108
|
+
export function tryOptionsRequest(url) {
|
|
109
|
+
return result(fetch$(url, singleton(new Types_RequestProperties(0, ["OPTIONS"]))));
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[<RequireQualifiedAccess>]
|
|
2
|
+
module AsyncIterable
|
|
3
|
+
|
|
4
|
+
open Fable.Core
|
|
5
|
+
open Fable.Core.JsInterop
|
|
6
|
+
|
|
7
|
+
[<Emit("""{
|
|
8
|
+
[Symbol.asyncIterator]() {
|
|
9
|
+
return {
|
|
10
|
+
next: $0,
|
|
11
|
+
return: $1
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}""")>]
|
|
15
|
+
let private createAsyncIterator (onNext: unit -> JS.Promise<obj>) (onCancel: unit -> obj): JS.AsyncIterable<'T> = jsNative
|
|
16
|
+
|
|
17
|
+
/// Creates AsyncIterable. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of#specifications
|
|
18
|
+
let create (onNext: unit -> JS.Promise<'T option>): JS.AsyncIterable<'T> =
|
|
19
|
+
createAsyncIterator
|
|
20
|
+
(fun () ->
|
|
21
|
+
onNext() |> Promise.map (function
|
|
22
|
+
| Some value -> createObj ["value" ==> value; "done" ==> false]
|
|
23
|
+
| None -> createObj ["done" ==> true]
|
|
24
|
+
))
|
|
25
|
+
(fun () -> createObj [ "done" ==> true ])
|
|
26
|
+
|
|
27
|
+
/// Creates AsyncIterable with a cleaning function for cancellation (JS caller invokes `break` or `return` during iteration)
|
|
28
|
+
let createCancellable (onCancel: unit -> unit) (onNext: unit -> JS.Promise<'T option>): JS.AsyncIterable<'T> =
|
|
29
|
+
createAsyncIterator
|
|
30
|
+
(fun () ->
|
|
31
|
+
onNext() |> Promise.map (function
|
|
32
|
+
| Some value -> createObj ["value" ==> value; "done" ==> false]
|
|
33
|
+
| None -> createObj ["done" ==> true]
|
|
34
|
+
))
|
|
35
|
+
(fun () ->
|
|
36
|
+
onCancel()
|
|
37
|
+
createObj [ "done" ==> true ])
|
|
38
|
+
|
|
39
|
+
type CancellationToken() =
|
|
40
|
+
member this.Cancel(): unit =
|
|
41
|
+
raise !!this
|
|
42
|
+
|
|
43
|
+
/// Iterates AsyncIterable. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
|
|
44
|
+
let iter (action: CancellationToken -> 'T -> unit) (iterable: JS.AsyncIterable<'T>): JS.Promise<unit> =
|
|
45
|
+
let token = CancellationToken()
|
|
46
|
+
emitJsExpr () """(async () => {
|
|
47
|
+
for await (const value of iterable) {
|
|
48
|
+
try {
|
|
49
|
+
action(token, value)
|
|
50
|
+
} catch (err) {
|
|
51
|
+
if (err instanceof token.constructor) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
throw(err);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
})()"""
|