@glutinum/cli 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -3
- package/dist/Glutinum.Converter/Abbreviations.js +246 -0
- package/dist/Glutinum.Converter/FsharpAST.js +98 -34
- package/dist/Glutinum.Converter/Generate.js +55 -8
- package/dist/Glutinum.Converter/GlueAST.js +446 -30
- 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 +332 -170
- 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 -8
- 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 +1527 -248
- 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 +8710 -1137
- 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 +76 -14
- package/dist/Glutinum.Converter/Utils/String.js +7 -3
- package/dist/Program.js +230 -72
- 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 +0 -105
- 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 +0 -766
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +0 -218
- 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 +0 -31
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +0 -20
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +0 -19
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +0 -207
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +0 -127
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +0 -81
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +0 -183
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +0 -37
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +0 -24
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +0 -439
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +0 -217
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +0 -24
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +0 -75
- 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 +0 -238
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +0 -24
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +0 -190
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +0 -194
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +0 -35
- 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 +0 -218
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +0 -358
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +0 -331
- 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/OptionOp.fs +0 -21
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +0 -644
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +0 -45
- 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 +0 -155
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +0 -23
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +0 -45
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +0 -201
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +0 -65
- 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 +0 -146
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +0 -57
- 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/Validation.fs +0 -172
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +0 -148
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +0 -35
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +0 -151
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
- 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/Array.js +0 -1242
- 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/Async.js +0 -158
- 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/AsyncBuilder.js +0 -183
- 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/BigInt.js +0 -282
- 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/BitConverter.js +0 -138
- 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/Boolean.js +0 -21
- 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/Char.js +0 -169
- 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/Choice.js +0 -184
- 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/Date.js +0 -749
- 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/DateOffset.js +0 -268
- 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/DateOnly.js +0 -124
- 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/Decimal.js +0 -212
- 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/Double.js +0 -46
- 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/Encoding.js +0 -173
- 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/Event.js +0 -93
- 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.CompilerServices.js +0 -27
- 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/Guid.js +0 -142
- 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/Int32.js +0 -135
- 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/List.js +0 -1273
- 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/MailboxProcessor.js +0 -93
- 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/Map.js +0 -1396
- 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/MapUtil.js +0 -112
- 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/MutableMap.js +0 -327
- 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/MutableSet.js +0 -233
- 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/Numeric.js +0 -71
- 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/Observable.js +0 -113
- 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/Option.js +0 -96
- package/dist/fable_modules/fable-library-js.4.14.0/README.md +0 -3
- 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/Random.js +0 -170
- 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/Range.js +0 -45
- 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/Reflection.js +0 -461
- 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/RegExp.js +0 -132
- 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/Result.js +0 -165
- 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/Seq.js +0 -1379
- 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/Seq2.js +0 -111
- 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/Set.js +0 -1789
- 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/String.js +0 -543
- 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.Collections.Generic.js +0 -317
- 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/System.Text.js +0 -162
- 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/TimeOnly.js +0 -122
- 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/TimeSpan.js +0 -177
- 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/Timer.js +0 -67
- 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/Types.js +0 -208
- 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/Unicode.13.0.0.js +0 -4
- 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/Uri.js +0 -142
- 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/Util.js +0 -770
- package/dist/fable_modules/fable-library-js.4.14.0/big.d.ts +0 -338
- 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/lib/big.js +0 -826
- package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
- package/dist/fable_modules/project_cracked.json +0 -1
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
|
|
2
|
+
import { toString, Record } from "../fable_modules/fable-library-js.5.17.2/Types.js";
|
|
3
|
+
import { GlueModuleDeclaration, GlueType, GlueFileModule, GlueType_$reflection } from "./GlueAST.js";
|
|
4
|
+
import { tuple_type, option_type, bool_type, record_type, string_type, list_type } from "../fable_modules/fable-library-js.5.17.2/Reflection.js";
|
|
5
|
+
import { FSharpType_$reflection } from "./FsharpAST.js";
|
|
6
|
+
import { FSharpSet__get_IsEmpty, FSharpSet__Contains, filter, map as map_2, ofSeq } from "../fable_modules/fable-library-js.5.17.2/Set.js";
|
|
7
|
+
import { stringHash, Exception, defaultOf, equals, comparePrimitives } from "../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
8
|
+
import { replace, concat, split, substring, join } from "../fable_modules/fable-library-js.5.17.2/String.js";
|
|
9
|
+
import { map } from "../fable_modules/fable-library-js.5.17.2/Array.js";
|
|
10
|
+
import { normalizePath } from "./Utils/String.js";
|
|
11
|
+
import { append as append_1, contains, sortBy, tryFind, filter as filter_1, exists, cons, collect, toArray, singleton, isEmpty, choose, empty, ofArray, map as map_1 } from "../fable_modules/fable-library-js.5.17.2/List.js";
|
|
12
|
+
import { PackageContext__TryFindPackage_Z721C83C5, PackageContext, ExternalPackage, PackageInfo } from "./Reader/Types.js";
|
|
13
|
+
import { findPackageDir, resolveInput, listInstalledPackages, describePackage } from "../../src/Glutinum.Converter/js/resolve.js";
|
|
14
|
+
import { List_distinct } from "../fable_modules/fable-library-js.5.17.2/Seq2.js";
|
|
15
|
+
import { reachableFiles, createProgramFromFiles } from "../../src/Glutinum.Converter/js/bootstrap.js";
|
|
16
|
+
import { singleton as singleton_1, collect as collect_1, empty as empty_1, append, delay, toList } from "../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
17
|
+
import { readPackages } from "./Read.js";
|
|
18
|
+
import { applyWith } from "./Transform.js";
|
|
19
|
+
import { printFileWith, Printer_$ctor } from "./Printer.js";
|
|
20
|
+
|
|
21
|
+
export class GenerationResult extends Record {
|
|
22
|
+
constructor(GlueAST, FSharpAST, FSharpCode, Warnings, Errors) {
|
|
23
|
+
super();
|
|
24
|
+
this.GlueAST = GlueAST;
|
|
25
|
+
this.FSharpAST = FSharpAST;
|
|
26
|
+
this.FSharpCode = FSharpCode;
|
|
27
|
+
this.Warnings = Warnings;
|
|
28
|
+
this.Errors = Errors;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function GenerationResult_$reflection() {
|
|
33
|
+
return record_type("Glutinum.Converter.Packages.GenerationResult", [], GenerationResult, () => [["GlueAST", list_type(GlueType_$reflection())], ["FSharpAST", list_type(FSharpType_$reflection())], ["FSharpCode", string_type], ["Warnings", list_type(string_type)], ["Errors", list_type(string_type)]]);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const domLibReplacements = ofSeq(["@types/web", "@typescript/lib-dom"], {
|
|
37
|
+
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
function moduleNameForPackage(runtimeName) {
|
|
41
|
+
return join("", map((part) => (part[0].toLocaleUpperCase() + substring(part, 1)), split(runtimeName, ["@", "/", "-", ".", "_"], undefined, 1)));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function toPackageInfo(description) {
|
|
45
|
+
return new PackageInfo(moduleNameForPackage(description.runtimeName), description.runtimeName, normalizePath(description.dir) + "/", normalizePath(description.typesRoot) + "/", normalizePath(description.entryFile), map_1((entry) => [normalizePath(entry.file), entry.subpath], ofArray(description.subpathEntries)));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function isTypeScriptLibFile(fileName) {
|
|
49
|
+
return normalizePath(fileName).indexOf("/typescript/lib/lib.") >= 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export class GenerateOptions extends Record {
|
|
53
|
+
constructor(ExternalPackages, Externals, ModuleName, Include, NoLib) {
|
|
54
|
+
super();
|
|
55
|
+
this.ExternalPackages = ExternalPackages;
|
|
56
|
+
this.Externals = Externals;
|
|
57
|
+
this.ModuleName = ModuleName;
|
|
58
|
+
this.Include = Include;
|
|
59
|
+
this.NoLib = NoLib;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function GenerateOptions_$reflection() {
|
|
64
|
+
return record_type("Glutinum.Converter.Packages.GenerateOptions", [], GenerateOptions, () => [["ExternalPackages", bool_type], ["Externals", list_type(tuple_type(string_type, option_type(string_type)))], ["ModuleName", option_type(string_type)], ["Include", list_type(string_type)], ["NoLib", bool_type]]);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const defaultOptions = new GenerateOptions(true, empty(), undefined, empty(), false);
|
|
68
|
+
|
|
69
|
+
function splitModuleName(fullName) {
|
|
70
|
+
const matchValue = fullName.lastIndexOf(".") | 0;
|
|
71
|
+
if (matchValue === -1) {
|
|
72
|
+
return ["Glutinum", fullName];
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const index = matchValue | 0;
|
|
76
|
+
return [substring(fullName, 0, index), substring(fullName, index + 1)];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function declarationName(glueType_mut) {
|
|
81
|
+
declarationName:
|
|
82
|
+
while (true) {
|
|
83
|
+
const glueType = glueType_mut;
|
|
84
|
+
switch (glueType.tag) {
|
|
85
|
+
case 1:
|
|
86
|
+
return glueType.fields[0].Name;
|
|
87
|
+
case 12:
|
|
88
|
+
return glueType.fields[0].Name;
|
|
89
|
+
case 5:
|
|
90
|
+
return glueType.fields[0].Name;
|
|
91
|
+
case 4:
|
|
92
|
+
return glueType.fields[0].Name;
|
|
93
|
+
case 2:
|
|
94
|
+
return glueType.fields[0].Name;
|
|
95
|
+
case 6:
|
|
96
|
+
return glueType.fields[0].Name;
|
|
97
|
+
case 24: {
|
|
98
|
+
glueType_mut = glueType.fields[0];
|
|
99
|
+
continue declarationName;
|
|
100
|
+
}
|
|
101
|
+
default:
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function isValue(glueType_mut) {
|
|
109
|
+
isValue:
|
|
110
|
+
while (true) {
|
|
111
|
+
const glueType = glueType_mut;
|
|
112
|
+
switch (glueType.tag) {
|
|
113
|
+
case 2:
|
|
114
|
+
case 6:
|
|
115
|
+
return true;
|
|
116
|
+
case 24: {
|
|
117
|
+
glueType_mut = glueType.fields[0];
|
|
118
|
+
continue isValue;
|
|
119
|
+
}
|
|
120
|
+
default:
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function keepIncluded(included, types) {
|
|
128
|
+
const values = map_2((name_1) => substring(name_1, "value:".length), filter((name) => name.startsWith("value:"), included), {
|
|
129
|
+
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
130
|
+
});
|
|
131
|
+
return choose((glueType) => {
|
|
132
|
+
switch (glueType.tag) {
|
|
133
|
+
case 30: {
|
|
134
|
+
const matchValue = keepIncluded(included, glueType.fields[0].Types);
|
|
135
|
+
if (isEmpty(matchValue)) {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
return new GlueType(/* FileModule */ 30, [new GlueFileModule(glueType.fields[0].Name, glueType.fields[0].ImportSpecifier, glueType.fields[0].IsGlobal, matchValue)]);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
case 11:
|
|
143
|
+
if (FSharpSet__Contains(included, glueType.fields[0].Name)) {
|
|
144
|
+
return glueType;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
const matchValue_1 = keepIncluded(included, glueType.fields[0].Types);
|
|
148
|
+
if (isEmpty(matchValue_1)) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
return new GlueType(/* ModuleDeclaration */ 11, [new GlueModuleDeclaration(glueType.fields[0].Documentation, glueType.fields[0].Name, glueType.fields[0].IsTopLevel, glueType.fields[0].IsNamespace, glueType.fields[0].IsGlobal, glueType.fields[0].IsRecursive, matchValue_1)]);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
default: {
|
|
156
|
+
const matchValue_2 = declarationName(glueType);
|
|
157
|
+
let matchResult, name_4, name_5;
|
|
158
|
+
if (matchValue_2 != null) {
|
|
159
|
+
if (FSharpSet__Contains(included, matchValue_2)) {
|
|
160
|
+
matchResult = 0;
|
|
161
|
+
name_4 = matchValue_2;
|
|
162
|
+
}
|
|
163
|
+
else if (FSharpSet__Contains(values, matchValue_2) && isValue(glueType)) {
|
|
164
|
+
matchResult = 1;
|
|
165
|
+
name_5 = matchValue_2;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
matchResult = 2;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
matchResult = 2;
|
|
173
|
+
}
|
|
174
|
+
switch (matchResult) {
|
|
175
|
+
case 0:
|
|
176
|
+
return glueType;
|
|
177
|
+
case 1:
|
|
178
|
+
return glueType;
|
|
179
|
+
default:
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}, types);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const builtInExternalPackageNames = ofArray([["@types/node", "Node", empty()], ["@types/web", "Web", singleton("/typescript/lib/lib.dom")]]);
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Generate a single binding file for the packages, and the packages they depend on.
|
|
191
|
+
* An empty list generates every package installed in the nearest <c>node_modules</c>.
|
|
192
|
+
*/
|
|
193
|
+
export function generateWith(options, host, inputs) {
|
|
194
|
+
let matchValue_8;
|
|
195
|
+
const targets = map_1((dir) => {
|
|
196
|
+
const matchValue_2 = describePackage(host, dir);
|
|
197
|
+
if (equals(matchValue_2, defaultOf())) {
|
|
198
|
+
throw new Exception(concat("Could not find a declaration file for the package in ", dir));
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
return matchValue_2;
|
|
202
|
+
}
|
|
203
|
+
}, isEmpty(inputs) ? ofArray(listInstalledPackages(host)) : List_distinct(map_1((input) => {
|
|
204
|
+
const resolved = resolveInput(host, input);
|
|
205
|
+
if (resolved.kind === "package") {
|
|
206
|
+
return resolved.packageDir;
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
const matchValue_1 = findPackageDir(host, resolved.file);
|
|
210
|
+
if (matchValue_1 === defaultOf()) {
|
|
211
|
+
throw new Exception(concat("Could not find the package of ", resolved.file));
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
return matchValue_1;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}, inputs), {
|
|
218
|
+
Equals: (x, y) => (x === y),
|
|
219
|
+
GetHashCode: (x) => (stringHash(x) | 0),
|
|
220
|
+
}));
|
|
221
|
+
const entryFiles = toArray(collect((target) => cons(target.entryFile, map_1((_arg) => _arg.file, ofArray(target.subpathEntries))), targets));
|
|
222
|
+
const program = createProgramFromFiles(host, entryFiles, {
|
|
223
|
+
noLib: options.NoLib,
|
|
224
|
+
withoutDomLib: exists((target_1) => FSharpSet__Contains(domLibReplacements, target_1.name), targets),
|
|
225
|
+
});
|
|
226
|
+
const checker = program.getTypeChecker();
|
|
227
|
+
const targetDirs_1 = ofSeq(map_1((target_2) => normalizePath(target_2.dir), targets), {
|
|
228
|
+
Compare: (x_1, y_1) => (comparePrimitives(x_1, y_1) | 0),
|
|
229
|
+
});
|
|
230
|
+
const describeReachable = (excludedRuntimeNames) => choose((dir_3) => {
|
|
231
|
+
const matchValue_4 = describePackage(host, dir_3);
|
|
232
|
+
if (equals(matchValue_4, defaultOf())) {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
return matchValue_4;
|
|
237
|
+
}
|
|
238
|
+
}, filter_1((dir_2) => !FSharpSet__Contains(targetDirs_1, dir_2), List_distinct(choose((fileName_1) => {
|
|
239
|
+
const matchValue_3 = findPackageDir(host, fileName_1);
|
|
240
|
+
if (matchValue_3 === defaultOf()) {
|
|
241
|
+
return undefined;
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
return normalizePath(matchValue_3);
|
|
245
|
+
}
|
|
246
|
+
}, filter_1((fileName) => !isTypeScriptLibFile(fileName), ofArray(reachableFiles(host, program, entryFiles, toArray(excludedRuntimeNames))))), {
|
|
247
|
+
Equals: (x_2, y_2) => (x_2 === y_2),
|
|
248
|
+
GetHashCode: (x_2) => (stringHash(x_2) | 0),
|
|
249
|
+
})));
|
|
250
|
+
const externalPackageNames = toList(delay(() => append(options.ExternalPackages ? builtInExternalPackageNames : empty_1(), delay(() => collect_1((matchValue_5) => singleton_1([matchValue_5[0], matchValue_5[1], empty()]), options.Externals)))));
|
|
251
|
+
let externals;
|
|
252
|
+
if (isEmpty(externalPackageNames)) {
|
|
253
|
+
externals = empty();
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
const reachable = describeReachable(empty());
|
|
257
|
+
externals = map_1((tupledArg_1) => {
|
|
258
|
+
let package$_1, option_1;
|
|
259
|
+
const name_2 = tupledArg_1[0];
|
|
260
|
+
const moduleName_1 = tupledArg_1[1];
|
|
261
|
+
const package$ = tryFind((description_2) => (description_2.name === name_2), reachable);
|
|
262
|
+
return new ExternalPackage((moduleName_1 == null) ? ((package$ == null) ? moduleNameForPackage(replace(name_2, "@types/", "")) : ((package$_1 = package$, moduleNameForPackage(package$_1.runtimeName)))) : moduleName_1, (option_1 = package$, (option_1 != null) ? toPackageInfo(option_1) : undefined), tupledArg_1[2]);
|
|
263
|
+
}, filter_1((tupledArg) => !exists((target_3) => (target_3.name === tupledArg[0]), targets), externalPackageNames));
|
|
264
|
+
}
|
|
265
|
+
const externalRuntimeNames = choose((external) => {
|
|
266
|
+
const option_3 = external.Package;
|
|
267
|
+
if (option_3 != null) {
|
|
268
|
+
return option_3.RuntimeName;
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
return undefined;
|
|
272
|
+
}
|
|
273
|
+
}, externals);
|
|
274
|
+
const dependencies = sortBy((_arg_4) => _arg_4.runtimeName, filter_1((description_4) => !contains(description_4.runtimeName, externalRuntimeNames, {
|
|
275
|
+
Equals: (x_3, y_3) => (x_3 === y_3),
|
|
276
|
+
GetHashCode: (x_3) => (stringHash(x_3) | 0),
|
|
277
|
+
}), describeReachable(externalRuntimeNames)), {
|
|
278
|
+
Compare: (x_4, y_4) => (comparePrimitives(x_4, y_4) | 0),
|
|
279
|
+
});
|
|
280
|
+
let patternInput;
|
|
281
|
+
const matchValue_7 = options.ModuleName;
|
|
282
|
+
patternInput = ((matchValue_7 == null) ? ["Glutinum", ""] : splitModuleName(matchValue_7));
|
|
283
|
+
const moduleName_3 = patternInput[1];
|
|
284
|
+
const targetPackages = map_1((package$_2) => {
|
|
285
|
+
if (moduleName_3 === "") {
|
|
286
|
+
return package$_2;
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
return new PackageInfo(moduleName_3, package$_2.RuntimeName, package$_2.Dir, package$_2.TypesRoot, package$_2.EntryFile, package$_2.SubpathEntries);
|
|
290
|
+
}
|
|
291
|
+
}, map_1(toPackageInfo, targets));
|
|
292
|
+
const included = ofSeq(options.Include, {
|
|
293
|
+
Compare: (x_5, y_5) => (comparePrimitives(x_5, y_5) | 0),
|
|
294
|
+
});
|
|
295
|
+
const packageContext = new PackageContext(append_1(targetPackages, map_1(toPackageInfo, dependencies)), externals, (name_3) => ((options.NoLib && !FSharpSet__get_IsEmpty(included)) && !FSharpSet__Contains(included, name_3)));
|
|
296
|
+
const readerResult = readPackages(checker, packageContext, filter_1((sourceFile) => (PackageContext__TryFindPackage_Z721C83C5(packageContext, sourceFile.fileName) != null), toList(program.getSourceFiles())));
|
|
297
|
+
const transformResult = applyWith("REPLACE_ME_WITH_MODULE_NAME", readerResult.TypeMemory, (matchValue_8 = options.Include, isEmpty(matchValue_8) ? readerResult.GlueAST : keepIncluded(ofSeq(matchValue_8, {
|
|
298
|
+
Compare: (x_6, y_6) => (comparePrimitives(x_6, y_6) | 0),
|
|
299
|
+
}), readerResult.GlueAST)));
|
|
300
|
+
const printer = Printer_$ctor();
|
|
301
|
+
printFileWith(patternInput[0], true, map_1((_arg_5) => _arg_5.ModuleName, externals), printer, transformResult);
|
|
302
|
+
return new GenerationResult(readerResult.GlueAST, transformResult.FSharpAST, toString(printer), toList(delay(() => append(readerResult.Warnings, delay(() => transformResult.Warnings)))), toList(transformResult.Errors));
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export function generate(host, inputs) {
|
|
306
|
+
return generateWith(defaultOptions, host, inputs);
|
|
307
|
+
}
|
|
308
|
+
|