@glutinum/cli 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/dist/Glutinum.Converter/Abbreviations.js +246 -0
- package/dist/Glutinum.Converter/FsharpAST.js +87 -28
- package/dist/Glutinum.Converter/Generate.js +55 -8
- package/dist/Glutinum.Converter/GlueAST.js +333 -34
- package/dist/Glutinum.Converter/Log.js +7 -8
- package/dist/Glutinum.Converter/Merge.js +683 -31
- package/dist/Glutinum.Converter/Packages.js +308 -0
- package/dist/Glutinum.Converter/Printer.js +323 -186
- package/dist/Glutinum.Converter/Read.js +279 -6
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +13 -7
- package/dist/Glutinum.Converter/Reader/Declaration.js +102 -17
- package/dist/Glutinum.Converter/Reader/Documentation.js +168 -73
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +7 -51
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +64 -15
- package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +165 -0
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +30 -5
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +122 -4
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +83 -7
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +8 -8
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +11 -9
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +3 -2
- package/dist/Glutinum.Converter/Reader/Node.js +24 -10
- package/dist/Glutinum.Converter/Reader/Parameters.js +110 -7
- package/dist/Glutinum.Converter/Reader/Report.js +31 -12
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +4 -3
- package/dist/Glutinum.Converter/Reader/TypeNode.js +1524 -253
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +75 -20
- package/dist/Glutinum.Converter/Reader/TypeParameters.js +8 -5
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +184 -50
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +32 -13
- package/dist/Glutinum.Converter/Reader/Types.js +180 -0
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +99 -43
- package/dist/Glutinum.Converter/Reader/Utils.js +1143 -55
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +59 -14
- package/dist/Glutinum.Converter/Transform.js +8292 -1119
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +3 -3
- package/dist/Glutinum.Converter/TypeScript.js +3 -3
- package/dist/Glutinum.Converter/Utils/Keywords.js +6 -6
- package/dist/Glutinum.Converter/Utils/List.js +3 -3
- package/dist/Glutinum.Converter/Utils/Naming.js +61 -12
- package/dist/Glutinum.Converter/Utils/String.js +7 -3
- package/dist/Program.js +230 -72
- package/dist/fable_modules/Fable.Promise.3.2.1/AsyncIterable.fs +89 -0
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/AsyncIterable.fs.js +29 -29
- package/dist/fable_modules/Fable.Promise.3.2.1/Fable.Promise.fableproj +25 -0
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs +842 -766
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs.js +26 -12
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs +31 -31
- package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs.js +5 -5
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs +235 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs.js +384 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AssemblyInfo.fs +4 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs +89 -9
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs.js +13 -12
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOption.fs +50 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs +30 -39
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs.js +10 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResult.fs +52 -8
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs +26 -42
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOption.fs +17 -5
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultOption.fs.js +26 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs +31 -33
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidation.fs +1 -6
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs +10 -18
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs.js +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/FsToolkit.ErrorHandling.fableproj +69 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs +68 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs.js +47 -41
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Nullness.fs +81 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Option.fs +133 -2
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs +139 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs.js +48 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/OptionOp.fs +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs +88 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs.js +30 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs +200 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidation.fs +34 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs +244 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs.js +18 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs +87 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs.js +8 -8
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs +8 -23
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs.js +5 -5
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs +1 -1
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs.js +10 -10
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs +7 -18
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs.js +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs +503 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs.js +295 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Validation.fs +0 -5
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs +7 -13
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs.js +3 -3
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValueOption.fs +1 -4
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOption.fs +102 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionCE.fs +587 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionOp.fs +10 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +3 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1 → FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0}/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
- package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
- package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Array.js +192 -86
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Async.js +58 -53
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/AsyncBuilder.js +29 -8
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BigInt.js +71 -46
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BitConverter.js +2 -2
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Boolean.js +4 -3
- package/dist/fable_modules/fable-library-js.5.17.2/CHANGELOG.md +348 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Char.js +64 -31
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Choice.js +2 -2
- package/dist/fable_modules/fable-library-js.5.17.2/CollectionUtil.js +182 -0
- package/dist/fable_modules/fable-library-js.5.17.2/ConditionalWeakTable.js +21 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Date.js +197 -112
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOffset.js +46 -62
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOnly.js +6 -6
- package/dist/fable_modules/fable-library-js.5.17.2/DateOnlyTemporal.js +146 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeFormat.js +523 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeOffsetTemporal.js +283 -0
- package/dist/fable_modules/fable-library-js.5.17.2/DateTimeTemporal.js +243 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Decimal.js +39 -13
- package/dist/fable_modules/fable-library-js.5.17.2/Directory.js +11 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Double.js +10 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Encoding.js +20 -8
- package/dist/fable_modules/fable-library-js.5.17.2/Environment.js +3 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Event.js +10 -1
- package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Collections.js +45 -0
- package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Core.js +156 -0
- package/dist/fable_modules/fable-library-js.5.17.2/File.js +27 -0
- package/dist/fable_modules/fable-library-js.5.17.2/Global.js +29 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Guid.js +33 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Int32.js +17 -17
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/List.js +170 -106
- package/dist/fable_modules/fable-library-js.5.17.2/Long.js +38 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MailboxProcessor.js +13 -6
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Map.js +65 -61
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MapUtil.js +22 -4
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableMap.js +28 -16
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableSet.js +7 -7
- package/dist/fable_modules/fable-library-js.5.17.2/Native.js +14 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Numeric.js +44 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Observable.js +5 -3
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Option.js +11 -20
- package/dist/fable_modules/fable-library-js.5.17.2/Path.js +31 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Random.js +22 -20
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Range.js +12 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Reflection.js +50 -22
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/RegExp.js +68 -30
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Result.js +6 -6
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq.js +229 -104
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq2.js +1 -1
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Set.js +153 -113
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/String.js +238 -50
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Collections.Generic.js +30 -14
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Text.js +69 -31
- package/dist/fable_modules/fable-library-js.5.17.2/System.js +289 -0
- package/dist/fable_modules/fable-library-js.5.17.2/Task.js +27 -0
- package/dist/fable_modules/fable-library-js.5.17.2/TaskBuilder.js +72 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeOnly.js +6 -6
- package/dist/fable_modules/fable-library-js.5.17.2/TimeOnlyTemporal.js +142 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeSpan.js +18 -15
- package/dist/fable_modules/fable-library-js.5.17.2/TimeSpanTemporal.js +259 -0
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Types.js +14 -24
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Uri.js +44 -21
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Util.js +49 -12
- package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/lib/big.js +14 -11
- package/dist/fable_modules/fable-library-js.5.17.2/package.json +24 -0
- package/dist/fable_modules/fable-library-js.5.17.2/quotation.js +682 -0
- package/package.json +4 -4
- package/src/Glutinum.Converter/js/bootstrap.js +109 -2
- package/src/Glutinum.Converter/js/host.js +144 -0
- package/src/Glutinum.Converter/js/npm.js +137 -0
- package/src/Glutinum.Converter/js/resolve.js +402 -0
- package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
- package/dist/Glutinum.Converter/Generate.js.map +0 -1
- package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
- package/dist/Glutinum.Converter/Log.js.map +0 -1
- package/dist/Glutinum.Converter/Merge.js.map +0 -1
- package/dist/Glutinum.Converter/Printer.js.map +0 -1
- package/dist/Glutinum.Converter/Read.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
- package/dist/Glutinum.Converter/Transform.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
- package/dist/Program.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
- package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
- package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
- package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
- package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
- package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
- package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
- package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
- package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
- package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
- package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
- package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
- package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
- package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
- package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
- package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
- package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
- package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
- package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
- package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
- package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
- package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
- package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
- package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
- package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
- package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
- package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
- package/dist/fable_modules/project_cracked.json +0 -1
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationOp.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/FSharp.Core.CompilerServices.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/README.md +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Timer.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Unicode.13.0.0.js +0 -0
- /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/big.d.ts +0 -0
|
@@ -99,8 +99,11 @@ class UTF16LE {
|
|
|
99
99
|
else if (index != null) {
|
|
100
100
|
str = str.substring(index);
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
// Allow to compile for Browser environment without @types/node being installed
|
|
103
|
+
// See https://github.com/fable-compiler/Fable/issues/4368
|
|
104
|
+
const g = globalThis;
|
|
105
|
+
if (typeof g.Buffer !== "undefined") {
|
|
106
|
+
const bytes = g.Buffer.from(str, "utf16le");
|
|
104
107
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
105
108
|
}
|
|
106
109
|
else {
|
|
@@ -116,11 +119,14 @@ class UTF16LE {
|
|
|
116
119
|
else if (index != null) {
|
|
117
120
|
buffer = buffer.subarray(index);
|
|
118
121
|
}
|
|
122
|
+
// Allow to compile for Browser environment without @types/node being installed
|
|
123
|
+
// See https://github.com/fable-compiler/Fable/issues/4368
|
|
124
|
+
const g = globalThis;
|
|
119
125
|
if (typeof TextDecoder !== "undefined") {
|
|
120
126
|
return new TextDecoder("utf-16le").decode(buffer);
|
|
121
127
|
}
|
|
122
|
-
else if (typeof Buffer !== "undefined") {
|
|
123
|
-
return Buffer.from(buffer).toString("utf16le");
|
|
128
|
+
else if (typeof g.Buffer !== "undefined") {
|
|
129
|
+
return g.Buffer.from(buffer).toString("utf16le");
|
|
124
130
|
}
|
|
125
131
|
else {
|
|
126
132
|
return utf16le_decode(buffer); // polyfill
|
|
@@ -136,11 +142,14 @@ class UTF8 {
|
|
|
136
142
|
else if (index != null) {
|
|
137
143
|
str = str.substring(index);
|
|
138
144
|
}
|
|
145
|
+
// Allow to compile for Browser environment without @types/node being installed
|
|
146
|
+
// See https://github.com/fable-compiler/Fable/issues/4368
|
|
147
|
+
const g = globalThis;
|
|
139
148
|
if (typeof TextEncoder !== "undefined") {
|
|
140
149
|
return new TextEncoder().encode(str);
|
|
141
150
|
}
|
|
142
|
-
else if (typeof Buffer !== "undefined") {
|
|
143
|
-
const bytes = Buffer.from(str, "utf8");
|
|
151
|
+
else if (typeof g.Buffer !== "undefined") {
|
|
152
|
+
const bytes = g.Buffer.from(str, "utf8");
|
|
144
153
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
145
154
|
}
|
|
146
155
|
else {
|
|
@@ -156,11 +165,14 @@ class UTF8 {
|
|
|
156
165
|
else if (index != null) {
|
|
157
166
|
buffer = buffer.subarray(index);
|
|
158
167
|
}
|
|
168
|
+
// Allow to compile for Browser environment without @types/node being installed
|
|
169
|
+
// See https://github.com/fable-compiler/Fable/issues/4368
|
|
170
|
+
const g = globalThis;
|
|
159
171
|
if (typeof TextDecoder !== "undefined") {
|
|
160
172
|
return new TextDecoder().decode(buffer);
|
|
161
173
|
}
|
|
162
|
-
else if (typeof Buffer !== "undefined") {
|
|
163
|
-
return Buffer.from(buffer).toString("utf8");
|
|
174
|
+
else if (typeof g.Buffer !== "undefined") {
|
|
175
|
+
return g.Buffer.from(buffer).toString("utf8");
|
|
164
176
|
}
|
|
165
177
|
else {
|
|
166
178
|
return utf8_decode(buffer); // polyfill
|
|
@@ -18,8 +18,17 @@ export class Event$2 {
|
|
|
18
18
|
return createEvent(h => { this._add(h); }, h => { this._remove(h); });
|
|
19
19
|
}
|
|
20
20
|
Trigger(senderOrValue, valueOrUndefined) {
|
|
21
|
+
// Disambiguate the overloads by arity, not by value: a two-argument call may
|
|
22
|
+
// legitimately pass `undefined` as the event value (e.g. unit events).
|
|
21
23
|
let sender = null;
|
|
22
|
-
|
|
24
|
+
let value;
|
|
25
|
+
if (arguments.length <= 1) {
|
|
26
|
+
value = senderOrValue;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
sender = senderOrValue;
|
|
30
|
+
value = valueOrUndefined;
|
|
31
|
+
}
|
|
23
32
|
this.delegates.forEach(f => { f(sender, value); });
|
|
24
33
|
}
|
|
25
34
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { compare, physicalHash, equals as equals_1, structuralHash } from "./Util.js";
|
|
2
|
+
export function HashIdentity_FromFunctions(hasher, equals) {
|
|
3
|
+
return {
|
|
4
|
+
GetHashCode(x) {
|
|
5
|
+
return hasher(x) | 0;
|
|
6
|
+
},
|
|
7
|
+
Equals(x_1, y) {
|
|
8
|
+
return (x_1 == null) ? (y == null) : ((y == null) ? false : equals(x_1, y));
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function HashIdentity_Structural() {
|
|
13
|
+
return {
|
|
14
|
+
GetHashCode(x) {
|
|
15
|
+
return structuralHash(x) | 0;
|
|
16
|
+
},
|
|
17
|
+
Equals(x_1, y) {
|
|
18
|
+
return equals_1(x_1, y);
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function HashIdentity_Reference() {
|
|
23
|
+
return {
|
|
24
|
+
GetHashCode(x) {
|
|
25
|
+
return physicalHash(x) | 0;
|
|
26
|
+
},
|
|
27
|
+
Equals(x_1, y) {
|
|
28
|
+
return equals_1(x_1, y);
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function ComparisonIdentity_FromFunction(comparer) {
|
|
33
|
+
return {
|
|
34
|
+
Compare(x, y) {
|
|
35
|
+
return ((x == null) ? ((y == null) ? 0 : -1) : ((y == null) ? 1 : comparer(x, y))) | 0;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function ComparisonIdentity_Structural() {
|
|
40
|
+
return {
|
|
41
|
+
Compare(x, y) {
|
|
42
|
+
return compare(x, y) | 0;
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { disposeSafe, defaultOf, Exception, structuralHash, equals } from "./Util.js";
|
|
2
|
+
import { HashIdentity_Structural, ComparisonIdentity_Structural } from "./FSharp.Collections.js";
|
|
3
|
+
import { nonNullValue } from "./Option.js";
|
|
4
|
+
import { NullReferenceException_$ctor, ArgumentNullException_$ctor_Z721C83C5 } from "./System.js";
|
|
5
|
+
import { FSharpChoice$2_Choice2Of2, FSharpChoice$2_Choice1Of2 } from "./Choice.js";
|
|
6
|
+
import { StringBuilder__Append_Z721C83C5 } from "./System.Text.js";
|
|
7
|
+
export const LanguagePrimitives_GenericEqualityComparer = {
|
|
8
|
+
Equals(x, y) {
|
|
9
|
+
return equals(x, y);
|
|
10
|
+
},
|
|
11
|
+
GetHashCode(x_1) {
|
|
12
|
+
return structuralHash(x_1) | 0;
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export const LanguagePrimitives_GenericEqualityERComparer = {
|
|
16
|
+
Equals(x, y) {
|
|
17
|
+
return equals(x, y);
|
|
18
|
+
},
|
|
19
|
+
GetHashCode(x_1) {
|
|
20
|
+
return structuralHash(x_1) | 0;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export function LanguagePrimitives_FastGenericComparer() {
|
|
24
|
+
return ComparisonIdentity_Structural();
|
|
25
|
+
}
|
|
26
|
+
export function LanguagePrimitives_FastGenericComparerFromTable() {
|
|
27
|
+
return ComparisonIdentity_Structural();
|
|
28
|
+
}
|
|
29
|
+
export function LanguagePrimitives_FastGenericEqualityComparer() {
|
|
30
|
+
return HashIdentity_Structural();
|
|
31
|
+
}
|
|
32
|
+
export function LanguagePrimitives_FastGenericEqualityComparerFromTable() {
|
|
33
|
+
return HashIdentity_Structural();
|
|
34
|
+
}
|
|
35
|
+
export function Operators_Failure(message) {
|
|
36
|
+
return new Exception(message);
|
|
37
|
+
}
|
|
38
|
+
export function Operators_FailurePattern(exn) {
|
|
39
|
+
return exn.message;
|
|
40
|
+
}
|
|
41
|
+
export function Operators_NullArg(argumentName) {
|
|
42
|
+
throw ArgumentNullException_$ctor_Z721C83C5(argumentName);
|
|
43
|
+
}
|
|
44
|
+
export function Operators_Using(resource, action) {
|
|
45
|
+
try {
|
|
46
|
+
return action(resource);
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
if (equals(resource, defaultOf())) {
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
let copyOfStruct = resource;
|
|
53
|
+
disposeSafe(copyOfStruct);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export function Operators_Lock(_lockObj, action) {
|
|
58
|
+
return action();
|
|
59
|
+
}
|
|
60
|
+
export function Operators_IsNull(value) {
|
|
61
|
+
if (equals(value, defaultOf())) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export function Operators_IsNotNull(value) {
|
|
69
|
+
if (equals(value, defaultOf())) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function Operators_IsNullV(value) {
|
|
77
|
+
return !(value != null);
|
|
78
|
+
}
|
|
79
|
+
export function Operators_NonNull(value) {
|
|
80
|
+
if (equals(value, defaultOf())) {
|
|
81
|
+
throw NullReferenceException_$ctor();
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export function Operators_NonNullV(value) {
|
|
88
|
+
if (value != null) {
|
|
89
|
+
return nonNullValue(value);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
throw NullReferenceException_$ctor();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export function Operators_NullMatchPattern(value) {
|
|
96
|
+
if (equals(value, defaultOf())) {
|
|
97
|
+
return FSharpChoice$2_Choice1Of2(undefined);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return FSharpChoice$2_Choice2Of2(value);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export function Operators_NullValueMatchPattern(value) {
|
|
104
|
+
if (value != null) {
|
|
105
|
+
return FSharpChoice$2_Choice2Of2(nonNullValue(value));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
return FSharpChoice$2_Choice1Of2(undefined);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
export function Operators_NonNullQuickPattern(value) {
|
|
112
|
+
if (equals(value, defaultOf())) {
|
|
113
|
+
throw NullReferenceException_$ctor();
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export function Operators_NonNullQuickValuePattern(value) {
|
|
120
|
+
if (value != null) {
|
|
121
|
+
return nonNullValue(value);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
throw NullReferenceException_$ctor();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
export function Operators_WithNull(value) {
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
export function Operators_WithNullV(value) {
|
|
131
|
+
return value;
|
|
132
|
+
}
|
|
133
|
+
export function Operators_NullV() {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
export function Operators_NullArgCheck(argumentName, value) {
|
|
137
|
+
if (equals(value, defaultOf())) {
|
|
138
|
+
throw ArgumentNullException_$ctor_Z721C83C5(argumentName);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export function ExtraTopLevelOperators_LazyPattern(input) {
|
|
145
|
+
return input.Value;
|
|
146
|
+
}
|
|
147
|
+
export function PrintfModule_PrintFormatToStringBuilderThen(continuation, builder, format) {
|
|
148
|
+
return format.cont((s) => {
|
|
149
|
+
StringBuilder__Append_Z721C83C5(builder, s);
|
|
150
|
+
return continuation();
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
export function PrintfModule_PrintFormatToStringBuilder(builder, format) {
|
|
154
|
+
return PrintfModule_PrintFormatToStringBuilderThen(() => {
|
|
155
|
+
}, builder, format);
|
|
156
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// This library doesn't depend on @types/node (to stay browser-compatible),
|
|
2
|
+
// so this Node.js built-in import can't be type-checked; the exported
|
|
3
|
+
// functions below still declare their own types for callers to rely on.
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
6
|
+
// byte[] is represented as a plain JS/TS array of numbers, not a typed array
|
|
7
|
+
// (see e.g. BitConverter.ts), so convert the Buffer returned by readFileSync.
|
|
8
|
+
export function readAllBytes(path) {
|
|
9
|
+
return Array.from(readFileSync(path));
|
|
10
|
+
}
|
|
11
|
+
export function readAllLines(path) {
|
|
12
|
+
const lines = readFileSync(path, "utf8").split(/\r\n|\r|\n/);
|
|
13
|
+
if (lines[lines.length - 1] === "") {
|
|
14
|
+
lines.pop();
|
|
15
|
+
}
|
|
16
|
+
return lines;
|
|
17
|
+
}
|
|
18
|
+
export function readAllText(path) {
|
|
19
|
+
return readFileSync(path, "utf8");
|
|
20
|
+
}
|
|
21
|
+
export function writeAllBytes(path, bytes) {
|
|
22
|
+
// Convert back from the plain array representation to a typed array Node's fs accepts.
|
|
23
|
+
writeFileSync(path, Uint8Array.from(bytes));
|
|
24
|
+
}
|
|
25
|
+
export function writeAllLines(path, lines) {
|
|
26
|
+
writeFileSync(path, lines.join("\n"));
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const SR_indexOutOfBounds = "The index was outside the range of elements in the collection.";
|
|
2
|
+
export const SR_inputWasEmpty = "Collection was empty.";
|
|
3
|
+
export const SR_inputMustBeNonNegative = "The input must be non-negative.";
|
|
4
|
+
export const SR_inputSequenceEmpty = "The input sequence was empty.";
|
|
5
|
+
export const SR_inputSequenceTooLong = "The input sequence contains more than one element.";
|
|
6
|
+
export const SR_keyNotFoundAlt = "An index satisfying the predicate was not found in the collection.";
|
|
7
|
+
export const SR_differentLengths = "The collections had different lengths.";
|
|
8
|
+
export const SR_notEnoughElements = "The input sequence has an insufficient number of elements.";
|
|
9
|
+
export const SR_Arg_ApplicationException = "Error in the application.";
|
|
10
|
+
export const SR_Arg_ArgumentException = "Value does not fall within the expected range.";
|
|
11
|
+
export const SR_Arg_ArgumentOutOfRangeException = "Specified argument was out of the range of valid values.";
|
|
12
|
+
export const SR_ArgumentNull_Generic = "Value cannot be null.";
|
|
13
|
+
export const SR_Arg_ParamName_Name = " (Parameter \'";
|
|
14
|
+
export const SR_Arg_ArithmeticException = "Overflow or underflow in the arithmetic operation.";
|
|
15
|
+
export const SR_Arg_DivideByZero = "Attempted to divide by zero.";
|
|
16
|
+
export const SR_Arg_FormatException = "One of the identified items was in an invalid format.";
|
|
17
|
+
export const SR_Arg_IndexOutOfRangeException = "Index was outside the bounds of the array.";
|
|
18
|
+
export const SR_Arg_InvalidOperationException = "Operation is not valid due to the current state of the object.";
|
|
19
|
+
export const SR_Arg_KeyNotFound = "The given key was not present in the dictionary.";
|
|
20
|
+
export const SR_Arg_NotFiniteNumberException = "Number encountered was not a finite quantity.";
|
|
21
|
+
export const SR_Arg_NotImplementedException = "The method or operation is not implemented.";
|
|
22
|
+
export const SR_Arg_NotSupportedException = "Specified method is not supported.";
|
|
23
|
+
export const SR_Arg_NullReferenceException = "Object reference not set to an instance of an object.";
|
|
24
|
+
export const SR_Arg_OutOfMemoryException = "Insufficient memory to continue the execution of the program.";
|
|
25
|
+
export const SR_Arg_OverflowException = "Arithmetic operation resulted in an overflow.";
|
|
26
|
+
export const SR_Arg_RankException = "Attempted to operate on an array with the incorrect number of dimensions.";
|
|
27
|
+
export const SR_Arg_StackOverflowException = "Operation caused a stack overflow.";
|
|
28
|
+
export const SR_Arg_SystemException = "System error.";
|
|
29
|
+
export const SR_Arg_TimeoutException = "The operation has timed out.";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { trim } from "./String.js";
|
|
2
|
+
import { Exception } from "./Util.js";
|
|
2
3
|
// RFC 4122 compliant. From https://stackoverflow.com/a/13653180/3922220
|
|
3
4
|
// const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
4
5
|
// Relax GUID parsing, see #1637
|
|
@@ -20,7 +21,7 @@ export function toString(str, format, _provider) {
|
|
|
20
21
|
case "X":
|
|
21
22
|
return str.replace(guidHexCaptures, "{0x$1,0x$3,0x$5,{0x$6,0x$7,0x$8,0x$9,0x$10,0x$11,0x$12,0x$13}}");
|
|
22
23
|
default:
|
|
23
|
-
throw new
|
|
24
|
+
throw new Exception("Unrecognized Guid print format");
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
else {
|
|
@@ -43,7 +44,7 @@ export function parse(str) {
|
|
|
43
44
|
return hyphenateGuid(wsTrimAndLowered.replace(/[\{\},]|0x/g, ''));
|
|
44
45
|
}
|
|
45
46
|
else {
|
|
46
|
-
throw new
|
|
47
|
+
throw new Exception("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
export function tryParse(str, defValue) {
|
|
@@ -55,15 +56,35 @@ export function tryParse(str, defValue) {
|
|
|
55
56
|
return false;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
|
-
// From https://gist.github.com/LeverOne/1308368
|
|
59
59
|
export function newGuid() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
60
|
+
const bytes = new Uint8Array(16);
|
|
61
|
+
crypto.getRandomValues(bytes);
|
|
62
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x40; // version 4
|
|
63
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80; // variant 1
|
|
64
|
+
const hex = Array.from(bytes, b => b.toString(16).padStart(2, "0")).join("");
|
|
65
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
66
|
+
}
|
|
67
|
+
// RFC 9562 UUID v7
|
|
68
|
+
export function createVersion7(timestamp) {
|
|
69
|
+
// A number/bigint timestamp is Unix milliseconds (used by the Temporal representation,
|
|
70
|
+
// whose DateTimeOffset is not a JS Date); a Date uses getTime().
|
|
71
|
+
const ms = timestamp == null ? Date.now() : typeof timestamp === "object" ? timestamp.getTime() : Number(timestamp);
|
|
72
|
+
// 48-bit timestamp as hex
|
|
73
|
+
const msHex = Math.floor(ms).toString(16).padStart(12, "0");
|
|
74
|
+
// random bits
|
|
75
|
+
const bytes = new Uint8Array(10);
|
|
76
|
+
crypto.getRandomValues(bytes);
|
|
77
|
+
const view = new DataView(bytes.buffer);
|
|
78
|
+
const randA = view.getUint16(0) & 0x0fff; // 12 bits
|
|
79
|
+
const randB1 = view.getUint16(2) & 0x3fff; // 14 bits
|
|
80
|
+
const randB2 = view.getUint32(4); // 32 bits
|
|
81
|
+
const randB3 = view.getUint16(8); // 16 bits
|
|
82
|
+
const timeLow = msHex.slice(0, 8);
|
|
83
|
+
const timeMid = msHex.slice(8, 12);
|
|
84
|
+
const ver = (0x7000 | randA).toString(16).padStart(4, "0");
|
|
85
|
+
const variantAndRandB = (0x8000 | randB1).toString(16).padStart(4, "0");
|
|
86
|
+
const node = randB2.toString(16).padStart(8, "0") + randB3.toString(16).padStart(4, "0");
|
|
87
|
+
return `${timeLow}-${timeMid}-${ver}-${variantAndRandB}-${node}`;
|
|
67
88
|
}
|
|
68
89
|
// Maps for number <-> hex string conversion
|
|
69
90
|
let _convertMapsInitialized = false;
|
|
@@ -73,7 +94,7 @@ function initConvertMaps() {
|
|
|
73
94
|
_byteToHex = new Array(256);
|
|
74
95
|
_hexToByte = {};
|
|
75
96
|
for (let i = 0; i < 256; i++) {
|
|
76
|
-
_byteToHex[i] =
|
|
97
|
+
_byteToHex[i] = i.toString(16).padStart(2, '0');
|
|
77
98
|
_hexToByte[_byteToHex[i]] = i;
|
|
78
99
|
}
|
|
79
100
|
_convertMapsInitialized = true;
|
|
@@ -125,7 +146,7 @@ export function guidToArray(s) {
|
|
|
125
146
|
/** Convert UUID byte array into a string */
|
|
126
147
|
export function arrayToGuid(buf) {
|
|
127
148
|
if (buf.length !== 16) {
|
|
128
|
-
throw new
|
|
149
|
+
throw new Exception("Byte array for GUID must be exactly 16 bytes long");
|
|
129
150
|
}
|
|
130
151
|
if (!_convertMapsInitialized) {
|
|
131
152
|
initConvertMaps();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// None
|
|
4
|
-
// AllowLeadingWhite
|
|
5
|
-
// AllowTrailingWhite
|
|
6
|
-
// AllowLeadingSign
|
|
7
|
-
// AllowTrailingSign
|
|
8
|
-
// AllowParentheses
|
|
9
|
-
// AllowDecimalPoint
|
|
10
|
-
// AllowThousands
|
|
11
|
-
// AllowExponent
|
|
12
|
-
// AllowCurrencySymbol
|
|
13
|
-
|
|
1
|
+
import { Exception } from "./Util.js";
|
|
2
|
+
export const NumberStyles = {
|
|
3
|
+
// None: 0x00000000,
|
|
4
|
+
// AllowLeadingWhite: 0x00000001,
|
|
5
|
+
// AllowTrailingWhite: 0x00000002,
|
|
6
|
+
// AllowLeadingSign: 0x00000004,
|
|
7
|
+
// AllowTrailingSign: 0x00000008,
|
|
8
|
+
// AllowParentheses: 0x00000010,
|
|
9
|
+
// AllowDecimalPoint: 0x00000020,
|
|
10
|
+
// AllowThousands: 0x00000040,
|
|
11
|
+
// AllowExponent: 0x00000080,
|
|
12
|
+
// AllowCurrencySymbol: 0x00000100,
|
|
13
|
+
AllowHexSpecifier: 0x00000200,
|
|
14
14
|
// Integer = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign,
|
|
15
15
|
// HexNumber = AllowLeadingWhite | AllowTrailingWhite | AllowHexSpecifier,
|
|
16
16
|
// Number = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |
|
|
@@ -21,7 +21,7 @@ export var NumberStyles;
|
|
|
21
21
|
// AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol,
|
|
22
22
|
// Any = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |
|
|
23
23
|
// AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol | AllowExponent,
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
function validResponse(regexMatch, radix) {
|
|
26
26
|
const [/*all*/ , sign, prefix, digits] = regexMatch;
|
|
27
27
|
return {
|
|
@@ -36,7 +36,7 @@ function getRange(unsigned, bitsize) {
|
|
|
36
36
|
case 8: return unsigned ? [0, 255] : [-128, 127];
|
|
37
37
|
case 16: return unsigned ? [0, 65535] : [-32768, 32767];
|
|
38
38
|
case 32: return unsigned ? [0, 4294967295] : [-2147483648, 2147483647];
|
|
39
|
-
default: throw new
|
|
39
|
+
default: throw new Exception("Invalid bit size.");
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
function getInvalidDigits(radix) {
|
|
@@ -46,7 +46,7 @@ function getInvalidDigits(radix) {
|
|
|
46
46
|
case 10: return /[^0-9]/;
|
|
47
47
|
case 16: return /[^0-9a-fA-F]/;
|
|
48
48
|
default:
|
|
49
|
-
throw new
|
|
49
|
+
throw new Exception("Invalid Base.");
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
export function getPrefix(radix) {
|
|
@@ -102,7 +102,7 @@ export function parse(str, style, unsigned, bitsize, radix) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
throw new
|
|
105
|
+
throw new Exception(`The input string ${str} was not in a correct format.`);
|
|
106
106
|
}
|
|
107
107
|
export function tryParse(str, style, unsigned, bitsize, defValue) {
|
|
108
108
|
try {
|