@glutinum/cli 1.0.0-beta.1 → 1.0.0-beta.11

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.
Files changed (155) hide show
  1. package/README.md +16 -0
  2. package/dist/Glutinum.Converter/Abbreviations.js +16 -39
  3. package/dist/Glutinum.Converter/DelegateExtensions.js +378 -0
  4. package/dist/Glutinum.Converter/FreeTypeParameters.js +211 -0
  5. package/dist/Glutinum.Converter/FsharpAST.js +117 -66
  6. package/dist/Glutinum.Converter/Generate.js +52 -26
  7. package/dist/Glutinum.Converter/GlueAST.js +85 -46
  8. package/dist/Glutinum.Converter/Hosting.js +148 -174
  9. package/dist/Glutinum.Converter/Merge.js +463 -355
  10. package/dist/Glutinum.Converter/Packages.js +387 -97
  11. package/dist/Glutinum.Converter/Printer.js +439 -400
  12. package/dist/Glutinum.Converter/Read.js +362 -100
  13. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +7 -7
  14. package/dist/Glutinum.Converter/Reader/ConditionalTypeNode.js +90 -0
  15. package/dist/Glutinum.Converter/Reader/Declaration.js +13 -19
  16. package/dist/Glutinum.Converter/Reader/Deferred.js +706 -0
  17. package/dist/Glutinum.Converter/Reader/Documentation.js +28 -40
  18. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +2 -2
  19. package/dist/Glutinum.Converter/Reader/ExportAssignment.js +104 -37
  20. package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +24 -39
  21. package/dist/Glutinum.Converter/Reader/ExpressionWithTypeArguments.js +59 -0
  22. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +30 -17
  23. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +16 -22
  24. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +49 -6
  25. package/dist/Glutinum.Converter/Reader/IntersectionTypeNode.js +178 -0
  26. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +4 -4
  27. package/dist/Glutinum.Converter/Reader/MemberTypes.js +126 -0
  28. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +54 -6
  29. package/dist/Glutinum.Converter/Reader/Node.js +11 -14
  30. package/dist/Glutinum.Converter/Reader/Parameters.js +39 -30
  31. package/dist/Glutinum.Converter/Reader/Report.js +4 -4
  32. package/dist/Glutinum.Converter/Reader/TypeNode.js +390 -1584
  33. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +80 -53
  34. package/dist/Glutinum.Converter/Reader/TypeParameters.js +2 -2
  35. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +24 -47
  36. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +24 -6
  37. package/dist/Glutinum.Converter/Reader/Types.js +297 -17
  38. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +16 -30
  39. package/dist/Glutinum.Converter/Reader/UtilityType.js +811 -0
  40. package/dist/Glutinum.Converter/Reader/Utils.js +497 -111
  41. package/dist/Glutinum.Converter/Reader/VariableStatement.js +7 -8
  42. package/dist/Glutinum.Converter/Transform.js +2915 -8180
  43. package/dist/Glutinum.Converter/Transformer/AnyFunctionOverloads.js +116 -0
  44. package/dist/Glutinum.Converter/Transformer/CallableProperties.js +454 -0
  45. package/dist/Glutinum.Converter/Transformer/Comment.js +136 -0
  46. package/dist/Glutinum.Converter/Transformer/Conditionals.js +1087 -0
  47. package/dist/Glutinum.Converter/Transformer/Context.js +678 -0
  48. package/dist/Glutinum.Converter/Transformer/Enum.js +80 -0
  49. package/dist/Glutinum.Converter/Transformer/Exports.js +704 -0
  50. package/dist/Glutinum.Converter/Transformer/Heritage.js +493 -0
  51. package/dist/Glutinum.Converter/Transformer/KeyOfMaps.js +488 -0
  52. package/dist/Glutinum.Converter/Transformer/ParamObjectCandidate.js +460 -0
  53. package/dist/Glutinum.Converter/Transformer/TypeParameter.js +219 -0
  54. package/dist/Glutinum.Converter/Transformer/TypeParameters.js +448 -0
  55. package/dist/Glutinum.Converter/Transformer/UnionOverloads.js +338 -0
  56. package/dist/Glutinum.Converter/Transformer/Utils.js +341 -0
  57. package/dist/Glutinum.Converter/TypeScript.Extensions.js +0 -10
  58. package/dist/Glutinum.Converter/Utils/Keywords.js +3 -3
  59. package/dist/Glutinum.Converter/Utils/List.js +2 -2
  60. package/dist/Glutinum.Converter/Utils/Naming.js +6 -6
  61. package/dist/Glutinum.Converter/Utils/String.js +16 -5
  62. package/dist/Program.js +104 -241
  63. package/dist/fable_modules/Fable.Promise.3.2.1/AsyncIterable.fs.js +2 -2
  64. package/dist/fable_modules/Fable.Promise.3.2.1/Promise.fs.js +4 -4
  65. package/dist/fable_modules/Fable.Promise.3.2.1/PromiseImpl.fs.js +2 -2
  66. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs.js +5 -5
  67. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Async.fs.js +4 -4
  68. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncOptionCE.fs.js +3 -3
  69. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultCE.fs.js +1 -1
  70. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultOption.fs.js +3 -3
  71. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultOptionCE.fs.js +1 -1
  72. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncValidationCE.fs.js +1 -1
  73. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/List.fs.js +4 -4
  74. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs.js +1 -1
  75. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs.js +3 -3
  76. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs.js +1 -1
  77. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs.js +1 -1
  78. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Result.fs.js +1 -1
  79. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ResultCE.fs.js +2 -2
  80. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ResultOption.fs.js +2 -2
  81. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ResultOptionCE.fs.js +1 -1
  82. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs.js +7 -7
  83. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValidationCE.fs.js +1 -1
  84. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Async.js +21 -7
  85. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/AsyncBuilder.js +51 -6
  86. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/CHANGELOG.md +23 -1
  87. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/CollectionUtil.js +10 -16
  88. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/MailboxProcessor.js +19 -3
  89. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/MutableMap.js +5 -1
  90. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/MutableSet.js +5 -1
  91. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Util.js +15 -3
  92. package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/package.json +1 -1
  93. package/package.json +3 -2
  94. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Array.js +0 -0
  95. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/BigInt.js +0 -0
  96. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/BitConverter.js +0 -0
  97. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Boolean.js +0 -0
  98. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Char.js +0 -0
  99. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Choice.js +0 -0
  100. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/ConditionalWeakTable.js +0 -0
  101. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Date.js +0 -0
  102. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/DateOffset.js +0 -0
  103. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/DateOnly.js +0 -0
  104. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/DateOnlyTemporal.js +0 -0
  105. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/DateTimeFormat.js +0 -0
  106. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/DateTimeOffsetTemporal.js +0 -0
  107. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/DateTimeTemporal.js +0 -0
  108. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Decimal.js +0 -0
  109. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Directory.js +0 -0
  110. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Double.js +0 -0
  111. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Encoding.js +0 -0
  112. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Environment.js +0 -0
  113. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Event.js +0 -0
  114. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/FSharp.Collections.js +0 -0
  115. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/FSharp.Core.CompilerServices.js +0 -0
  116. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/FSharp.Core.js +0 -0
  117. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/File.js +0 -0
  118. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Global.js +0 -0
  119. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Guid.js +0 -0
  120. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Int32.js +0 -0
  121. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/List.js +0 -0
  122. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Long.js +0 -0
  123. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Map.js +0 -0
  124. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/MapUtil.js +0 -0
  125. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Native.js +0 -0
  126. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Numeric.js +0 -0
  127. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Observable.js +0 -0
  128. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Option.js +0 -0
  129. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Path.js +0 -0
  130. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/README.md +0 -0
  131. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Random.js +0 -0
  132. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Range.js +0 -0
  133. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Reflection.js +0 -0
  134. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/RegExp.js +0 -0
  135. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Result.js +0 -0
  136. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Seq.js +0 -0
  137. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Seq2.js +0 -0
  138. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Set.js +0 -0
  139. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/String.js +0 -0
  140. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/System.Collections.Generic.js +0 -0
  141. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/System.Text.js +0 -0
  142. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/System.js +0 -0
  143. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Task.js +0 -0
  144. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/TaskBuilder.js +0 -0
  145. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/TimeOnly.js +0 -0
  146. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/TimeOnlyTemporal.js +0 -0
  147. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/TimeSpan.js +0 -0
  148. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/TimeSpanTemporal.js +0 -0
  149. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Timer.js +0 -0
  150. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Types.js +0 -0
  151. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Unicode.13.0.0.js +0 -0
  152. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/Uri.js +0 -0
  153. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/big.d.ts +0 -0
  154. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/lib/big.js +0 -0
  155. /package/dist/fable_modules/{fable-library-js.5.17.2 → fable-library-js.5.21.0}/quotation.js +0 -0
@@ -1,6 +1,4 @@
1
1
 
2
- import { ofArray, iterate } from "../fable_modules/fable-library-js.5.17.2/List.js";
3
- import { printf, toConsole } from "../fable_modules/fable-library-js.5.17.2/String.js";
4
2
 
5
3
  export function TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(this$) {
6
4
  switch (this$) {
@@ -727,11 +725,3 @@ export function TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(this$) {
727
725
  }
728
726
  }
729
727
 
730
- export function TypeScript_Ts_TypeFlags__TypeFlags_Debug(this$) {
731
- iterate((tupledArg) => {
732
- if ((this$ & tupledArg[0]) !== 0) {
733
- toConsole(printf("%s"))(tupledArg[1]);
734
- }
735
- }, ofArray([[1, "Any"], [2, "Unknown"], [32, "String"], [64, "Number"], [256, "Boolean"], [65536, "Enum"], [128, "BigInt"], [1024, "StringLiteral"], [2048, "NumberLiteral"], [8192, "BooleanLiteral"], [32768, "EnumLiteral"], [4096, "BigIntLiteral"], [512, "ESSymbol"], [16384, "UniqueESSymbol"], [16, "Void"], [4, "Undefined"], [8, "Null"], [262144, "Never"], [524288, "TypeParameter"], [1048576, "Object"], [134217728, "Union"], [268435456, "Intersection"], [2097152, "Index"], [33554432, "IndexedAccess"], [67108864, "Conditional"], [16777216, "Substitution"], [131072, "NonPrimitive"], [4194304, "TemplateLiteral"], [8388608, "StringMapping"], [15360, "Literal"], [97292, "Unit"], [80896, "Freshable"], [3072, "StringOrNumberLiteral"], [15868, "PossiblyFalsy"], [12583968, "StringLike"], [67648, "NumberLike"], [4224, "BigIntLike"], [8448, "BooleanLike"], [98304, "EnumLike"], [16896, "ESSymbolLike"], [20, "VoidLike"], [402653184, "UnionOrIntersection"], [403701760, "StructuredType"], [34078720, "TypeVariable"], [117964800, "InstantiableNonPrimitive"], [14680064, "InstantiablePrimitive"], [132644864, "Instantiable"], [536346624, "StructuredOrInstantiable"]]));
736
- }
737
-
@@ -1,7 +1,7 @@
1
1
 
2
- import { ofList } from "../../fable_modules/fable-library-js.5.17.2/Set.js";
3
- import { ofArray } from "../../fable_modules/fable-library-js.5.17.2/List.js";
4
- import { comparePrimitives } from "../../fable_modules/fable-library-js.5.17.2/Util.js";
2
+ import { ofList } from "../../fable_modules/fable-library-js.5.21.0/Set.js";
3
+ import { ofArray } from "../../fable_modules/fable-library-js.5.21.0/List.js";
4
+ import { comparePrimitives } from "../../fable_modules/fable-library-js.5.21.0/Util.js";
5
5
 
6
6
  export const fsharp = ofList(ofArray(["abstract", "and", "as", "assert", "base", "begin", "class", "default", "delegate", "do", "done", "downcast", "downto", "elif", "else", "end", "exception", "extern", "false", "finally", "for", "fun", "function", "global", "if", "in", "inherit", "inline", "interface", "internal", "lazy", "let", "match", "member", "module", "mutable", "namespace", "new", "null", "of", "open", "or", "override", "private", "public", "rec", "return", "sig", "static", "struct", "then", "to", "true", "try", "type", "upcast", "use", "val", "void", "when", "while", "with", "yield", "atomic", "break", "checked", "component", "const", "constraint", "constructor", "continue", "eager", "fixed", "fori", "functor", "include", "measure", "method", "mixin", "object", "parallel", "params", "process", "protected", "pure", "recursive", "sealed", "tailcall", "trait", "virtual", "volatile", "mod", "land", "lor", "lxor", "lsl", "lsr", "asr"]), {
7
7
  Compare: (x, y) => (comparePrimitives(x, y) | 0),
@@ -1,6 +1,6 @@
1
1
 
2
- import { skipWhile, empty, tail, head, isEmpty, cons, reverse } from "../../fable_modules/fable-library-js.5.17.2/List.js";
3
- import { isNullOrEmpty } from "../../fable_modules/fable-library-js.5.17.2/String.js";
2
+ import { skipWhile, empty, tail, head, isEmpty, cons, reverse } from "../../fable_modules/fable-library-js.5.21.0/List.js";
3
+ import { isNullOrEmpty } from "../../fable_modules/fable-library-js.5.21.0/String.js";
4
4
 
5
5
  export function removeConsecutiveEmptyLines(list) {
6
6
  const loop = (acc_mut, _arg_mut) => {
@@ -1,11 +1,11 @@
1
1
 
2
- import { isLetterOrDigit, isDigit } from "../../fable_modules/fable-library-js.5.17.2/Char.js";
3
- import { exists } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
4
- import { FSharpSet__Contains } from "../../fable_modules/fable-library-js.5.17.2/Set.js";
2
+ import { isLetterOrDigit, isDigit } from "../../fable_modules/fable-library-js.5.21.0/Char.js";
3
+ import { exists } from "../../fable_modules/fable-library-js.5.21.0/Seq.js";
4
+ import { FSharpSet__Contains } from "../../fable_modules/fable-library-js.5.21.0/Set.js";
5
5
  import { fsharp } from "./Keywords.js";
6
- import { isNullOrWhiteSpace, replace, substring, isNullOrEmpty, concat } from "../../fable_modules/fable-library-js.5.17.2/String.js";
7
- import { Record } from "../../fable_modules/fable-library-js.5.17.2/Types.js";
8
- import { record_type, bool_type, string_type } from "../../fable_modules/fable-library-js.5.17.2/Reflection.js";
6
+ import { isNullOrWhiteSpace, replace, substring, isNullOrEmpty, concat } from "../../fable_modules/fable-library-js.5.21.0/String.js";
7
+ import { Record } from "../../fable_modules/fable-library-js.5.21.0/Types.js";
8
+ import { record_type, bool_type, string_type } from "../../fable_modules/fable-library-js.5.21.0/Reflection.js";
9
9
 
10
10
  function startWithDigit(name) {
11
11
  if (name.length > 0) {
@@ -1,6 +1,7 @@
1
1
 
2
- import { split, trim, replace as replace_1 } from "../../fable_modules/fable-library-js.5.17.2/String.js";
3
- import { ofArray } from "../../fable_modules/fable-library-js.5.17.2/List.js";
2
+ import { split, trim, replace as replace_1 } from "../../fable_modules/fable-library-js.5.21.0/String.js";
3
+ import { replace as replace_2 } from "../../fable_modules/fable-library-js.5.21.0/RegExp.js";
4
+ import { ofArray } from "../../fable_modules/fable-library-js.5.21.0/List.js";
4
5
 
5
6
  export function replace(oldValue, newValue, input) {
6
7
  return replace_1(input, oldValue, newValue);
@@ -22,11 +23,21 @@ export function capitalizeFirstLetter(text) {
22
23
  return text[0].toLocaleUpperCase() + text.slice(1, text.length);
23
24
  }
24
25
 
25
- export function lowercaseFirstLetter(text) {
26
- return text[0].toLocaleLowerCase() + text.slice(1, text.length);
26
+ /**
27
+ * `index.d.ts`, `index.d.mts` and `index.d.cts` without their extension
28
+ */
29
+ export function withoutDeclarationExtension(fileName) {
30
+ return replace_2(fileName, "\\.d\\.[cm]?ts$", "");
31
+ }
32
+
33
+ /**
34
+ * A declaration file written on Windows ends its lines with `\r\n`
35
+ */
36
+ export function normalizeLineEndings(text) {
37
+ return replace_1(replace_1(text, "\r\n", "\n"), "\r", "\n");
27
38
  }
28
39
 
29
40
  export function splitLines(text) {
30
- return ofArray(split(replace_1(replace_1(text, "\r\n", "\n"), "\r", "\n"), ["\n"], undefined, 0));
41
+ return ofArray(split(normalizeLineEndings(text), ["\n"], undefined, 0));
31
42
  }
32
43
 
package/dist/Program.js CHANGED
@@ -1,40 +1,57 @@
1
1
 
2
- import { success, info, error, log } from "./Glutinum.Converter/Log.js";
3
- import { generateBindingFileWith, generatePackagesFromDisk } from "./Glutinum.Converter/Generate.js";
4
- import { length, exists, filter, contains, cons, ofArray, singleton, append, reverse, tail as tail_5, head, isEmpty, empty } from "./fable_modules/fable-library-js.5.17.2/List.js";
5
- import { defaultArg } from "./fable_modules/fable-library-js.5.17.2/Option.js";
6
- import { join, concat, split } from "./fable_modules/fable-library-js.5.17.2/String.js";
7
- import { item, equalsWith } from "./fable_modules/fable-library-js.5.17.2/Array.js";
8
- import { stringHash, defaultOf } from "./fable_modules/fable-library-js.5.17.2/Util.js";
9
- import { defaultOptions, GenerateOptions } from "./Glutinum.Converter/Packages.js";
10
- import * as path from "path";
11
- import * as fs from "fs";
2
+ import path from "path";
3
+ import { fileURLToPath } from "url";
4
+ import { writeFileSync, mkdirSync, readFileSync } from "fs";
5
+ import { collect, map, toList } from "./fable_modules/fable-library-js.5.21.0/Seq.js";
6
+ import { join, concat, split } from "./fable_modules/fable-library-js.5.21.0/String.js";
7
+ import { item, equalsWith } from "./fable_modules/fable-library-js.5.21.0/Array.js";
8
+ import { defaultOf } from "./fable_modules/fable-library-js.5.21.0/Util.js";
9
+ import { defaultArg } from "./fable_modules/fable-library-js.5.21.0/Option.js";
10
+ import { parse } from "./fable_modules/fable-library-js.5.21.0/Int32.js";
11
+ import { defaultMaxOverloads } from "./Glutinum.Converter/Transformer/UnionOverloads.js";
12
+ import { GenerateOptions } from "./Glutinum.Converter/Packages.js";
13
+ import { generateBindingFileWithOptions, generatePackagesFromDisk } from "./Glutinum.Converter/Generate.js";
14
+ import { exists, length, head, tail, isEmpty, empty } from "./fable_modules/fable-library-js.5.21.0/List.js";
15
+ import { success, error, info } from "./Glutinum.Converter/Log.js";
16
+ import { program as program_1 } from "commander";
12
17
 
13
- export function printHelp() {
14
- const helpText = "\nGenerate Fable bindings from TypeScript definitions - https://github.com/glutinum-org/cl\n\nUSAGE\n\n glutinum <input>... [--out-file <output>]\n glutinum --all [--out-file <output>]\n glue <input>... [--out-file <output>]\n\n <input> can be:\n - an installed package name (e.g. chalk, @types/vscode)\n - a path to a package directory (e.g. ./node_modules/chalk)\n - a path to a .d.ts file (e.g. ./node_modules/chalk/source/index.d.ts)\n\n Several packages are generated in the same file, each one with every\n package it depends on. A .d.ts file is generated alone.\n --all generates every package installed in the nearest node_modules.\n\n The types of @types/node and @types/web (the DOM) are referenced from the\n Glutinum.Node and Glutinum.Web bindings, unless asked for or --no-externals.\n\nOPTIONS\n\n --out-file <output> Destination file to write in\n If not specified, the result will be printed to stdout\n --no-externals Generate @types/node and @types/web with the packages\n using them instead of referencing their bindings\n --external <package> Reference <package> from its own binding instead of\n generating it, `Glutinum.<Module>` is derived from its\n name unless given as <package>=<Module>\n Can be repeated\n --module-name <name> Full name of the generated module, `Glutinum.Types.TypeScript`,\n instead of `Glutinum.<Module>` derived from the package name\n --include <names> Comma-separated declarations to keep, the others are dropped\n Can be repeated\n --no-lib Create the program without the TypeScript library, for a\n package made of its files\n -h, --help Print this help message\n\nEXAMPLES\n\n glutinum chalk --out-file ./Glutinum.Chalk.fs\n glutinum vscode vscode-languageclient --out-file ./Glutinum.Vscode.fs\n glutinum leaflet --external @types/geojson --out-file ./Glutinum.Leaflet.fs\n glutinum --all --out-file ./Glutinum.fs\n glutinum ./node_modules/my-lib/index.d.ts\n ";
15
- log(helpText);
16
- }
18
+ const nodeProcess = process;
17
19
 
18
20
  function getVersion() {
19
- const pkg = JSON.parse(fs.readFileSync(new URL('./../package.json', import.meta.url)));
21
+ const moduleDir = path.dirname(fileURLToPath(import.meta.url));
22
+ let packageJson;
23
+ const text = readFileSync(path.join(moduleDir, "..", "package.json"), "utf8");
24
+ packageJson = JSON.parse(text);
25
+ return packageJson.version;
26
+ }
27
+
28
+ const helpText = "\n <input> can be:\n - an installed package name (e.g. chalk, @types/vscode)\n - a path to a package directory (e.g. ./node_modules/chalk)\n - a path to a .d.ts file (e.g. ./node_modules/chalk/source/index.d.ts)\n\n Several packages are generated in the same file, each one with every\n package it depends on. A .d.ts file is generated alone.\n\n The types of @types/node and @types/web (the DOM) are referenced from the\n Glutinum.Node and Glutinum.Web bindings, unless asked for or --no-externals.\n\nExamples:\n glutinum chalk --out-file ./Glutinum.Chalk.fs\n glutinum vscode vscode-languageclient --out-file ./Glutinum.Vscode.fs\n glutinum leaflet --external @types/geojson --out-file ./Glutinum.Leaflet.fs\n glutinum --all --out-file ./Glutinum.fs\n glutinum ./node_modules/my-lib/index.d.ts\n";
20
29
 
21
- return pkg.version;
22
- ;
30
+ function toGenerateOptions(options) {
31
+ let option_2;
32
+ const externals = toList(map((value) => {
33
+ const matchValue = split(value, ["="], undefined, 0);
34
+ if (!equalsWith((x, y) => (x === y), matchValue, defaultOf()) && (matchValue.length === 2)) {
35
+ return [item(0, matchValue), item(1, matchValue)];
36
+ }
37
+ else {
38
+ return [value, undefined];
39
+ }
40
+ }, options.external));
41
+ const includes = toList(collect((value_1) => split(value_1, [","], undefined, 0), options.include));
42
+ const ExternalPackages = options.externals;
43
+ const ModuleName = options.moduleName;
44
+ const NoLib = !options.lib;
45
+ return new GenerateOptions(ExternalPackages, externals, ModuleName, defaultArg(options.global, false), defaultArg((option_2 = options.maxOverloads, (option_2 != null) ? parse(option_2, 511, false, 32) : undefined), defaultMaxOverloads), includes, NoLib);
23
46
  }
24
47
 
25
- function generate(options, inputs) {
48
+ function generate(options, isAll, inputs) {
26
49
  let matchResult, input_1, inputs_1;
27
- if (!isEmpty(inputs)) {
28
- if (head(inputs) === "--all") {
29
- if (isEmpty(tail_5(inputs))) {
30
- matchResult = 0;
31
- }
32
- else {
33
- matchResult = 2;
34
- inputs_1 = inputs;
35
- }
36
- }
37
- else if (isEmpty(tail_5(inputs))) {
50
+ if (isAll) {
51
+ matchResult = 0;
52
+ }
53
+ else if (!isEmpty(inputs)) {
54
+ if (isEmpty(tail(inputs))) {
38
55
  if (head(inputs).endsWith(".d.ts")) {
39
56
  matchResult = 1;
40
57
  input_1 = head(inputs);
@@ -57,234 +74,80 @@ function generate(options, inputs) {
57
74
  case 0:
58
75
  return generatePackagesFromDisk(options, empty());
59
76
  case 1:
60
- return generateBindingFileWith(defaultArg(options.ModuleName, "Glutinum"), input_1);
77
+ return generateBindingFileWithOptions(defaultArg(options.ModuleName, "Glutinum"), options.GlobalScript, options.MaxOverloads, input_1);
61
78
  default:
62
79
  return generatePackagesFromDisk(options, inputs_1);
63
80
  }
64
81
  }
65
82
 
66
- function run(argv) {
67
- let matchResult;
68
- if (!isEmpty(argv)) {
69
- switch (head(argv)) {
70
- case "-h":
71
- case "--help":
72
- case "help": {
73
- matchResult = 0;
74
- break;
75
- }
76
- case "--version": {
77
- if (isEmpty(tail_5(argv))) {
78
- matchResult = 1;
79
- }
80
- else {
81
- matchResult = 2;
82
- }
83
- break;
84
- }
85
- default:
86
- matchResult = 2;
87
- }
83
+ function write(outFile, content) {
84
+ if (outFile == null) {
85
+ const stdout = nodeProcess.stdout;
86
+ stdout.write(content, "utf8");
88
87
  }
89
88
  else {
90
- matchResult = 0;
89
+ const outFile_1 = outFile;
90
+ mkdirSync(path.dirname(outFile_1), {
91
+ recursive: true,
92
+ });
93
+ writeFileSync(outFile_1, content);
94
+ info(concat("Bindings written to: ", path.resolve(outFile_1)));
91
95
  }
92
- switch (matchResult) {
93
- case 0: {
94
- printHelp();
95
- return 0;
96
+ }
97
+
98
+ function run(argv) {
99
+ const program = program_1;
100
+ program.name("glutinum").description("Generate Fable bindings from TypeScript definitions - https://github.com/glutinum-org/cli").version(getVersion());
101
+ program.argument("[inputs...]", "packages, a package directory, or a .d.ts file to generate").option("--out-file <path>", "destination file to write in, stdout otherwise").option("--all", "generate every package installed in the nearest node_modules").option("--module-name <name>", "full name of the generated module, instead of `Glutinum.<Module>`").option("--no-externals", "generate @types/node and @types/web instead of referencing them").option("--no-lib", "create the program without the TypeScript library").option("--global", "the .d.ts declares the globals of a script, nothing is imported").option("--max-overloads <count>", "overloads a signature gets at most from its union parameters, 16 by default");
102
+ program.option("--external <package>", "reference <package> from its own binding, as <package> or <package>=<Module>", (value_3, previous_1) => {
103
+ void (previous_1.push(value_3));
104
+ return previous_1;
105
+ }, []).option("--include <names>", "comma separated declarations to keep, the others are dropped", (value_2, previous) => {
106
+ void (previous.push(value_2));
107
+ return previous;
108
+ }, []).addHelpText("after", helpText).showHelpAfterError();
109
+ const parseOptions = {
110
+ from: "user",
111
+ };
112
+ program.parse(Array.from(argv), parseOptions);
113
+ const options = program.opts();
114
+ const inputs = toList(program.args);
115
+ const isAll = defaultArg(options.all, false);
116
+ const mixesFileAndPackages = (length(inputs) > 1) && exists((input) => input.endsWith(".d.ts"), inputs);
117
+ if (isEmpty(inputs) && !isAll) {
118
+ error("Give at least one input, or --all");
119
+ program.outputHelp({
120
+ error: true,
121
+ });
122
+ return 1;
123
+ }
124
+ else if (mixesFileAndPackages) {
125
+ error("A .d.ts file is generated alone, it can\'t be combined with other inputs");
126
+ return 1;
127
+ }
128
+ else {
129
+ if (isAll) {
130
+ info("Generating binding file for every installed package");
96
131
  }
97
- case 1: {
98
- log(getVersion());
132
+ else {
133
+ info(concat("Generating binding file for ", join(", ", inputs)));
134
+ }
135
+ try {
136
+ const content = generate(toGenerateOptions(options), isAll, inputs);
137
+ write(options.outFile, content);
138
+ success("Success!");
99
139
  return 0;
100
140
  }
101
- default: {
102
- let patternInput;
103
- const matchValue = reverse(argv);
104
- let matchResult_1, inputs, outFile;
105
- if (!isEmpty(matchValue)) {
106
- if (!isEmpty(tail_5(matchValue))) {
107
- if (head(tail_5(matchValue)) === "--out-file") {
108
- matchResult_1 = 0;
109
- inputs = tail_5(tail_5(matchValue));
110
- outFile = head(matchValue);
111
- }
112
- else {
113
- matchResult_1 = 1;
114
- }
115
- }
116
- else {
117
- matchResult_1 = 1;
118
- }
119
- }
120
- else {
121
- matchResult_1 = 1;
122
- }
123
- switch (matchResult_1) {
124
- case 0: {
125
- patternInput = [reverse(inputs), outFile];
126
- break;
127
- }
128
- default:
129
- patternInput = [argv, undefined];
130
- }
131
- const outFile_1 = patternInput[1];
132
- const takeOptions = (args_mut, options_mut, rest_mut) => {
133
- takeOptions:
134
- while (true) {
135
- const args = args_mut, options = options_mut, rest = rest_mut;
136
- let matchValue_1;
137
- let matchResult_2, tail, value, tail_1, value_1, tail_2, tail_3, value_2, arg, tail_4;
138
- if (isEmpty(args)) {
139
- matchResult_2 = 5;
140
- }
141
- else {
142
- switch (head(args)) {
143
- case "--external": {
144
- if (!isEmpty(tail_5(args))) {
145
- matchResult_2 = 0;
146
- tail = tail_5(tail_5(args));
147
- value = head(tail_5(args));
148
- }
149
- else {
150
- matchResult_2 = 4;
151
- arg = head(args);
152
- tail_4 = tail_5(args);
153
- }
154
- break;
155
- }
156
- case "--module-name": {
157
- if (!isEmpty(tail_5(args))) {
158
- matchResult_2 = 1;
159
- tail_1 = tail_5(tail_5(args));
160
- value_1 = head(tail_5(args));
161
- }
162
- else {
163
- matchResult_2 = 4;
164
- arg = head(args);
165
- tail_4 = tail_5(args);
166
- }
167
- break;
168
- }
169
- case "--no-lib": {
170
- matchResult_2 = 2;
171
- tail_2 = tail_5(args);
172
- break;
173
- }
174
- case "--include": {
175
- if (!isEmpty(tail_5(args))) {
176
- matchResult_2 = 3;
177
- tail_3 = tail_5(tail_5(args));
178
- value_2 = head(tail_5(args));
179
- }
180
- else {
181
- matchResult_2 = 4;
182
- arg = head(args);
183
- tail_4 = tail_5(args);
184
- }
185
- break;
186
- }
187
- default: {
188
- matchResult_2 = 4;
189
- arg = head(args);
190
- tail_4 = tail_5(args);
191
- }
192
- }
193
- }
194
- switch (matchResult_2) {
195
- case 0: {
196
- args_mut = tail;
197
- options_mut = (new GenerateOptions(options.ExternalPackages, append(options.Externals, singleton((matchValue_1 = split(value, ["="], undefined, 0), (!equalsWith((x, y) => (x === y), matchValue_1, defaultOf()) && (matchValue_1.length === 2)) ? [item(0, matchValue_1), item(1, matchValue_1)] : [value, undefined]))), options.ModuleName, options.Include, options.NoLib));
198
- rest_mut = rest;
199
- continue takeOptions;
200
- }
201
- case 1: {
202
- args_mut = tail_1;
203
- options_mut = (new GenerateOptions(options.ExternalPackages, options.Externals, value_1, options.Include, options.NoLib));
204
- rest_mut = rest;
205
- continue takeOptions;
206
- }
207
- case 2: {
208
- args_mut = tail_2;
209
- options_mut = (new GenerateOptions(options.ExternalPackages, options.Externals, options.ModuleName, options.Include, true));
210
- rest_mut = rest;
211
- continue takeOptions;
212
- }
213
- case 3: {
214
- args_mut = tail_3;
215
- options_mut = (new GenerateOptions(options.ExternalPackages, options.Externals, options.ModuleName, append(options.Include, ofArray(split(value_2, [","], undefined, 0))), options.NoLib));
216
- rest_mut = rest;
217
- continue takeOptions;
218
- }
219
- case 4: {
220
- args_mut = tail_4;
221
- options_mut = options;
222
- rest_mut = cons(arg, rest);
223
- continue takeOptions;
224
- }
225
- default:
226
- return [options, reverse(rest)];
227
- }
228
- break;
229
- }
230
- };
231
- const patternInput_1 = takeOptions(patternInput[0], defaultOptions, empty());
232
- const options_1 = patternInput_1[0];
233
- const inputs_2 = patternInput_1[1];
234
- const options_2 = new GenerateOptions(!contains("--no-externals", inputs_2, {
235
- Equals: (x_1, y_1) => (x_1 === y_1),
236
- GetHashCode: (x_1) => (stringHash(x_1) | 0),
237
- }), options_1.Externals, options_1.ModuleName, options_1.Include, options_1.NoLib);
238
- const inputs_3 = filter((input) => (input !== "--no-externals"), inputs_2);
239
- const hasUnknownOption = exists((input_1) => {
240
- if (input_1.startsWith("-")) {
241
- return input_1 !== "--all";
242
- }
243
- else {
244
- return false;
245
- }
246
- }, inputs_3);
247
- const mixesFileAndPackages = (length(inputs_3) > 1) && exists((input_2) => input_2.endsWith(".d.ts"), inputs_3);
248
- if (isEmpty(inputs_3) ? true : hasUnknownOption) {
249
- error("Invalid arguments");
250
- printHelp();
251
- return 1;
252
- }
253
- else if (mixesFileAndPackages) {
254
- error("A .d.ts file is generated alone, it can\'t be combined with other inputs");
255
- return 1;
256
- }
257
- else {
258
- info(concat("Generating binding file for ", join(", ", inputs_3)));
259
- try {
260
- const res = generate(options_2, inputs_3);
261
- if (outFile_1 == null) {
262
- process.stdout.write(res);
263
- }
264
- else {
265
- const outFile_2 = outFile_1;
266
- const outFileDir = path.dirname(outFile_2);
267
- fs.mkdirSync(outFileDir, {
268
- recursive: true,
269
- });
270
- fs.writeFileSync(outFile_2, res);
271
- info(concat("Bindings written to: ", path.join(process.cwd(), outFile_2)));
272
- }
273
- success("Success!");
274
- return 0;
275
- }
276
- catch (ex) {
277
- error(ex.message);
278
- return 1;
279
- }
280
- }
141
+ catch (ex) {
142
+ error(ex.message);
143
+ return 1;
281
144
  }
282
145
  }
283
146
  }
284
147
 
285
148
  (function (argv) {
286
- const exitCode = run(ofArray(argv)) | 0;
287
- process.exitCode = exitCode;
149
+ const exitCode = run(argv) | 0;
150
+ nodeProcess.exitCode = exitCode;
288
151
  return exitCode | 0;
289
152
  })(typeof process === 'object' ? process.argv.slice(2) : []);
290
153
 
@@ -1,6 +1,6 @@
1
1
 
2
- import { value as value_1 } from "../fable-library-js.5.17.2/Option.js";
3
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
2
+ import { value as value_1 } from "../fable-library-js.5.21.0/Option.js";
3
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
4
4
 
5
5
  /**
6
6
  * Creates AsyncIterable. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of#specifications
@@ -1,8 +1,8 @@
1
1
 
2
- import { Result_MapError, Result_Map, FSharpResult$2 } from "../fable-library-js.5.17.2/Result.js";
3
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
4
- import { disposeSafe, getEnumerator } from "../fable-library-js.5.17.2/Util.js";
5
- import { Operators_IsNull } from "../fable-library-js.5.17.2/FSharp.Core.js";
2
+ import { Result_MapError, Result_Map, FSharpResult$2 } from "../fable-library-js.5.21.0/Result.js";
3
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
4
+ import { disposeSafe, getEnumerator } from "../fable-library-js.5.21.0/Util.js";
5
+ import { Operators_IsNull } from "../fable-library-js.5.21.0/FSharp.Core.js";
6
6
 
7
7
  /**
8
8
  * This is an identity function, it calls the given function and return the promise value untouched.
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { PromiseBuilder_$ctor } from "./Promise.fs.js";
3
- import { value } from "../fable-library-js.5.17.2/Option.js";
4
- import { FSharpResult$2 } from "../fable-library-js.5.17.2/Result.js";
3
+ import { value } from "../fable-library-js.5.21.0/Option.js";
4
+ import { FSharpResult$2 } from "../fable-library-js.5.21.0/Result.js";
5
5
 
6
6
  export const promise = PromiseBuilder_$ctor();
7
7
 
@@ -1,9 +1,9 @@
1
1
 
2
- import { append, skip, head, reverse, equalsWith } from "../fable-library-js.5.17.2/Array.js";
3
- import { defaultOf, equals } from "../fable-library-js.5.17.2/Util.js";
4
- import { FSharpResult$2 } from "../fable-library-js.5.17.2/Result.js";
5
- import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
6
- import { some, value as value_10 } from "../fable-library-js.5.17.2/Option.js";
2
+ import { append, skip, head, reverse, equalsWith } from "../fable-library-js.5.21.0/Array.js";
3
+ import { defaultOf, equals } from "../fable-library-js.5.21.0/Util.js";
4
+ import { FSharpResult$2 } from "../fable-library-js.5.21.0/Result.js";
5
+ import { singleton } from "../fable-library-js.5.21.0/AsyncBuilder.js";
6
+ import { some, value as value_10 } from "../fable-library-js.5.21.0/Option.js";
7
7
 
8
8
  function traverseResultM$0027(state_mut, f_mut, xs_mut) {
9
9
  traverseResultM$0027:
@@ -1,8 +1,8 @@
1
1
 
2
- import { Exception } from "../fable-library-js.5.17.2/Util.js";
3
- import { fromContinuations, cancellationToken, startWithContinuations } from "../fable-library-js.5.17.2/Async.js";
4
- import { FSharpChoice$3 } from "../fable-library-js.5.17.2/Choice.js";
5
- import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
2
+ import { Exception } from "../fable-library-js.5.21.0/Util.js";
3
+ import { fromContinuations, cancellationToken, startWithContinuations } from "../fable-library-js.5.21.0/Async.js";
4
+ import { FSharpChoice$3 } from "../fable-library-js.5.21.0/Choice.js";
5
+ import { singleton } from "../fable-library-js.5.21.0/AsyncBuilder.js";
6
6
 
7
7
  export function Microsoft_FSharp_Control_FSharpAsync__Async_TryFinallyAsync_Static_Z753D11A1(comp, deferred) {
8
8
  const finish = (tupledArg, tupledArg_1) => {
@@ -1,7 +1,7 @@
1
1
 
2
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
3
- import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
4
- import { value as value_2, some } from "../fable-library-js.5.17.2/Option.js";
2
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
3
+ import { singleton } from "../fable-library-js.5.21.0/AsyncBuilder.js";
4
+ import { value as value_2, some } from "../fable-library-js.5.21.0/Option.js";
5
5
 
6
6
  export class AsyncOptionCE_AsyncOptionBuilder {
7
7
  constructor() {
@@ -1,5 +1,5 @@
1
1
 
2
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
2
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
3
3
 
4
4
  export class AsyncResultCE_AsyncResultBuilder {
5
5
  constructor() {
@@ -1,7 +1,7 @@
1
1
 
2
- import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
3
- import { FSharpResult$2 } from "../fable-library-js.5.17.2/Result.js";
4
- import { some, value as value_4 } from "../fable-library-js.5.17.2/Option.js";
2
+ import { singleton } from "../fable-library-js.5.21.0/AsyncBuilder.js";
3
+ import { FSharpResult$2 } from "../fable-library-js.5.21.0/Result.js";
4
+ import { some, value as value_4 } from "../fable-library-js.5.21.0/Option.js";
5
5
 
6
6
  export function AsyncResultOption_apply(applier, input) {
7
7
  return singleton.Bind(applier, (x_3) => singleton.Bind(input, (y_2) => {
@@ -1,5 +1,5 @@
1
1
 
2
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
2
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
3
3
 
4
4
  export class AsyncResultOptionCE_AsyncResultOptionBuilder {
5
5
  constructor() {
@@ -1,5 +1,5 @@
1
1
 
2
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
2
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
3
3
 
4
4
  export class AsyncValidationBuilder {
5
5
  constructor() {
@@ -1,8 +1,8 @@
1
1
 
2
- import { append, singleton as singleton_1, empty, reverse, tail, cons, head, isEmpty } from "../fable-library-js.5.17.2/List.js";
3
- import { FSharpResult$2 } from "../fable-library-js.5.17.2/Result.js";
4
- import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
5
- import { some, value as value_10 } from "../fable-library-js.5.17.2/Option.js";
2
+ import { append, singleton as singleton_1, empty, reverse, tail, cons, head, isEmpty } from "../fable-library-js.5.21.0/List.js";
3
+ import { FSharpResult$2 } from "../fable-library-js.5.21.0/Result.js";
4
+ import { singleton } from "../fable-library-js.5.21.0/AsyncBuilder.js";
5
+ import { some, value as value_10 } from "../fable-library-js.5.21.0/Option.js";
6
6
 
7
7
  function traverseResultM$0027(state_mut, f_mut, xs_mut) {
8
8
  traverseResultM$0027:
@@ -1,5 +1,5 @@
1
1
 
2
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
2
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
3
3
 
4
4
  export class OptionBuilderBase {
5
5
  constructor() {
@@ -1,7 +1,7 @@
1
1
 
2
- import { Exception } from "../fable-library-js.5.17.2/Util.js";
3
- import { class_type } from "../fable-library-js.5.17.2/Reflection.js";
4
- import { singleton } from "../fable-library-js.5.17.2/AsyncBuilder.js";
2
+ import { Exception } from "../fable-library-js.5.21.0/Util.js";
3
+ import { class_type } from "../fable-library-js.5.21.0/Reflection.js";
4
+ import { singleton } from "../fable-library-js.5.21.0/AsyncBuilder.js";
5
5
 
6
6
  export class InternalHelpers_AsyncResultErrorException$1 extends Exception {
7
7
  constructor(value) {