@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.
Files changed (319) hide show
  1. package/README.md +19 -1
  2. package/dist/Glutinum.Converter/Abbreviations.js +246 -0
  3. package/dist/Glutinum.Converter/FsharpAST.js +87 -28
  4. package/dist/Glutinum.Converter/Generate.js +55 -8
  5. package/dist/Glutinum.Converter/GlueAST.js +333 -34
  6. package/dist/Glutinum.Converter/Log.js +7 -8
  7. package/dist/Glutinum.Converter/Merge.js +683 -31
  8. package/dist/Glutinum.Converter/Packages.js +308 -0
  9. package/dist/Glutinum.Converter/Printer.js +323 -186
  10. package/dist/Glutinum.Converter/Read.js +279 -6
  11. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +13 -7
  12. package/dist/Glutinum.Converter/Reader/Declaration.js +102 -17
  13. package/dist/Glutinum.Converter/Reader/Documentation.js +168 -73
  14. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +7 -51
  15. package/dist/Glutinum.Converter/Reader/ExportAssignment.js +64 -15
  16. package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +165 -0
  17. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +30 -5
  18. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +122 -4
  19. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +83 -7
  20. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +8 -8
  21. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +11 -9
  22. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +3 -2
  23. package/dist/Glutinum.Converter/Reader/Node.js +24 -10
  24. package/dist/Glutinum.Converter/Reader/Parameters.js +110 -7
  25. package/dist/Glutinum.Converter/Reader/Report.js +31 -12
  26. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +4 -3
  27. package/dist/Glutinum.Converter/Reader/TypeNode.js +1524 -253
  28. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +75 -20
  29. package/dist/Glutinum.Converter/Reader/TypeParameters.js +8 -5
  30. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +184 -50
  31. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +32 -13
  32. package/dist/Glutinum.Converter/Reader/Types.js +180 -0
  33. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +99 -43
  34. package/dist/Glutinum.Converter/Reader/Utils.js +1143 -55
  35. package/dist/Glutinum.Converter/Reader/VariableStatement.js +59 -14
  36. package/dist/Glutinum.Converter/Transform.js +8292 -1119
  37. package/dist/Glutinum.Converter/TypeScript.Extensions.js +3 -3
  38. package/dist/Glutinum.Converter/TypeScript.js +3 -3
  39. package/dist/Glutinum.Converter/Utils/Keywords.js +6 -6
  40. package/dist/Glutinum.Converter/Utils/List.js +3 -3
  41. package/dist/Glutinum.Converter/Utils/Naming.js +61 -12
  42. package/dist/Glutinum.Converter/Utils/String.js +7 -3
  43. package/dist/Program.js +230 -72
  44. package/dist/fable_modules/Fable.Promise.3.2.1/AsyncIterable.fs +89 -0
  45. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/AsyncIterable.fs.js +29 -29
  46. package/dist/fable_modules/Fable.Promise.3.2.1/Fable.Promise.fableproj +25 -0
  47. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs +842 -766
  48. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/Promise.fs.js +26 -12
  49. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs +31 -31
  50. package/dist/fable_modules/{Fable.Promise.3.2.0 → Fable.Promise.3.2.1}/PromiseImpl.fs.js +5 -5
  51. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs +235 -0
  52. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Array.fs.js +384 -0
  53. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AssemblyInfo.fs +4 -4
  54. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs +89 -9
  55. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Async.fs.js +13 -12
  56. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOption.fs +50 -4
  57. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs +30 -39
  58. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionCE.fs.js +10 -10
  59. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResult.fs +52 -8
  60. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs +26 -42
  61. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultCE.fs.js +3 -3
  62. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOption.fs +17 -5
  63. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/AsyncResultOption.fs.js +26 -0
  64. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs +31 -33
  65. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionCE.fs.js +3 -3
  66. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidation.fs +1 -6
  67. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs +10 -18
  68. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationCE.fs.js +3 -3
  69. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/FsToolkit.ErrorHandling.fableproj +69 -0
  70. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs +68 -10
  71. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/List.fs.js +47 -41
  72. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Nullness.fs +81 -0
  73. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Option.fs +133 -2
  74. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs +139 -0
  75. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/OptionCE.fs.js +48 -0
  76. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/OptionOp.fs +3 -3
  77. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs +88 -0
  78. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResult.fs.js +30 -0
  79. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs +200 -0
  80. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncResultCE.fs.js +18 -0
  81. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidation.fs +34 -0
  82. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs +244 -0
  83. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ParallelAsyncValidationCE.fs.js +18 -0
  84. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs +87 -0
  85. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Result.fs.js +8 -8
  86. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs +8 -23
  87. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultCE.fs.js +5 -5
  88. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs +1 -1
  89. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOption.fs.js +10 -10
  90. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs +7 -18
  91. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionCE.fs.js +3 -3
  92. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs +503 -0
  93. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/Seq.fs.js +295 -0
  94. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/Validation.fs +0 -5
  95. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs +7 -13
  96. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationCE.fs.js +3 -3
  97. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValueOption.fs +1 -4
  98. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOption.fs +102 -0
  99. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionCE.fs +587 -0
  100. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/ValueTaskValueOptionOp.fs +10 -0
  101. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +3 -3
  102. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.fs +3 -0
  103. 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
  104. package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +4 -4
  105. package/dist/fable_modules/FsToolkit.ErrorHandling.5.2.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  106. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Array.js +192 -86
  107. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Async.js +58 -53
  108. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/AsyncBuilder.js +29 -8
  109. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BigInt.js +71 -46
  110. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/BitConverter.js +2 -2
  111. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Boolean.js +4 -3
  112. package/dist/fable_modules/fable-library-js.5.17.2/CHANGELOG.md +348 -0
  113. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Char.js +64 -31
  114. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Choice.js +2 -2
  115. package/dist/fable_modules/fable-library-js.5.17.2/CollectionUtil.js +182 -0
  116. package/dist/fable_modules/fable-library-js.5.17.2/ConditionalWeakTable.js +21 -0
  117. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Date.js +197 -112
  118. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOffset.js +46 -62
  119. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/DateOnly.js +6 -6
  120. package/dist/fable_modules/fable-library-js.5.17.2/DateOnlyTemporal.js +146 -0
  121. package/dist/fable_modules/fable-library-js.5.17.2/DateTimeFormat.js +523 -0
  122. package/dist/fable_modules/fable-library-js.5.17.2/DateTimeOffsetTemporal.js +283 -0
  123. package/dist/fable_modules/fable-library-js.5.17.2/DateTimeTemporal.js +243 -0
  124. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Decimal.js +39 -13
  125. package/dist/fable_modules/fable-library-js.5.17.2/Directory.js +11 -0
  126. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Double.js +10 -3
  127. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Encoding.js +20 -8
  128. package/dist/fable_modules/fable-library-js.5.17.2/Environment.js +3 -0
  129. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Event.js +10 -1
  130. package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Collections.js +45 -0
  131. package/dist/fable_modules/fable-library-js.5.17.2/FSharp.Core.js +156 -0
  132. package/dist/fable_modules/fable-library-js.5.17.2/File.js +27 -0
  133. package/dist/fable_modules/fable-library-js.5.17.2/Global.js +29 -0
  134. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Guid.js +33 -12
  135. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Int32.js +17 -17
  136. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/List.js +170 -106
  137. package/dist/fable_modules/fable-library-js.5.17.2/Long.js +38 -0
  138. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MailboxProcessor.js +13 -6
  139. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Map.js +65 -61
  140. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MapUtil.js +22 -4
  141. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableMap.js +28 -16
  142. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/MutableSet.js +7 -7
  143. package/dist/fable_modules/fable-library-js.5.17.2/Native.js +14 -0
  144. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Numeric.js +44 -3
  145. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Observable.js +5 -3
  146. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Option.js +11 -20
  147. package/dist/fable_modules/fable-library-js.5.17.2/Path.js +31 -0
  148. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Random.js +22 -20
  149. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Range.js +12 -12
  150. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Reflection.js +50 -22
  151. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/RegExp.js +68 -30
  152. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Result.js +6 -6
  153. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq.js +229 -104
  154. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Seq2.js +1 -1
  155. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Set.js +153 -113
  156. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/String.js +238 -50
  157. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Collections.Generic.js +30 -14
  158. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/System.Text.js +69 -31
  159. package/dist/fable_modules/fable-library-js.5.17.2/System.js +289 -0
  160. package/dist/fable_modules/fable-library-js.5.17.2/Task.js +27 -0
  161. package/dist/fable_modules/fable-library-js.5.17.2/TaskBuilder.js +72 -0
  162. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeOnly.js +6 -6
  163. package/dist/fable_modules/fable-library-js.5.17.2/TimeOnlyTemporal.js +142 -0
  164. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/TimeSpan.js +18 -15
  165. package/dist/fable_modules/fable-library-js.5.17.2/TimeSpanTemporal.js +259 -0
  166. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Types.js +14 -24
  167. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Uri.js +44 -21
  168. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Util.js +49 -12
  169. package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/lib/big.js +14 -11
  170. package/dist/fable_modules/fable-library-js.5.17.2/package.json +24 -0
  171. package/dist/fable_modules/fable-library-js.5.17.2/quotation.js +682 -0
  172. package/package.json +4 -4
  173. package/src/Glutinum.Converter/js/bootstrap.js +109 -2
  174. package/src/Glutinum.Converter/js/host.js +144 -0
  175. package/src/Glutinum.Converter/js/npm.js +137 -0
  176. package/src/Glutinum.Converter/js/resolve.js +402 -0
  177. package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
  178. package/dist/Glutinum.Converter/Generate.js.map +0 -1
  179. package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
  180. package/dist/Glutinum.Converter/Log.js.map +0 -1
  181. package/dist/Glutinum.Converter/Merge.js.map +0 -1
  182. package/dist/Glutinum.Converter/Printer.js.map +0 -1
  183. package/dist/Glutinum.Converter/Read.js.map +0 -1
  184. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
  185. package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
  186. package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
  187. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
  188. package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
  189. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
  190. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
  191. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
  192. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
  193. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
  194. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
  195. package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
  196. package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
  197. package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
  198. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
  199. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
  200. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
  201. package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
  202. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
  203. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
  204. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
  205. package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
  206. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
  207. package/dist/Glutinum.Converter/Transform.js.map +0 -1
  208. package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
  209. package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
  210. package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
  211. package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
  212. package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
  213. package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
  214. package/dist/Program.js.map +0 -1
  215. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
  216. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
  217. package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
  218. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
  219. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
  220. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
  221. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
  222. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
  223. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
  224. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
  225. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
  226. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
  227. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
  228. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
  229. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
  230. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
  231. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
  232. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
  233. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
  234. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
  235. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
  236. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
  237. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
  238. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
  239. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
  240. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
  241. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
  242. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
  243. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
  244. package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
  245. package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
  246. package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
  247. package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
  248. package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
  249. package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
  250. package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
  251. package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
  252. package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
  253. package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
  254. package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
  255. package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
  256. package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
  257. package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
  258. package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
  259. package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
  260. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
  261. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
  262. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
  263. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
  264. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
  265. package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
  266. package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
  267. package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
  268. package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
  269. package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
  270. package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
  271. package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
  272. package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
  273. package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
  274. package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
  275. package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
  276. package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
  277. package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
  278. package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
  279. package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
  280. package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
  281. package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
  282. package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
  283. package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
  284. package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
  285. package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
  286. package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
  287. package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
  288. package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
  289. package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
  290. package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
  291. package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
  292. package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
  293. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
  294. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
  295. package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
  296. package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
  297. package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
  298. package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
  299. package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
  300. package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
  301. package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
  302. package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
  303. package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
  304. package/dist/fable_modules/project_cracked.json +0 -1
  305. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncOptionOp.fs +0 -0
  306. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOp.fs +0 -0
  307. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncResultOptionOp.fs +0 -0
  308. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/AsyncValidationOp.fs +0 -0
  309. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOp.fs +0 -0
  310. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ResultOptionOp.fs +0 -0
  311. /package/dist/fable_modules/{FsToolkit.ErrorHandling.4.16.0 → FsToolkit.ErrorHandling.5.2.0}/ValidationOp.fs +0 -0
  312. /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
  313. /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
  314. /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
  315. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/FSharp.Core.CompilerServices.js +0 -0
  316. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/README.md +0 -0
  317. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Timer.js +0 -0
  318. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/Unicode.13.0.0.js +0 -0
  319. /package/dist/fable_modules/{fable-library-js.4.14.0 → fable-library-js.5.17.2}/big.d.ts +0 -0
@@ -1,5 +1,6 @@
1
- import { ofArray, iterate } from "../fable_modules/fable-library-js.4.14.0/List.js";
2
- import { printf, toConsole } from "../fable_modules/fable-library-js.4.14.0/String.js";
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";
3
4
 
4
5
  export function TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(this$) {
5
6
  switch (this$) {
@@ -742,4 +743,3 @@ export function TypeScript_Ts_TypeFlags__TypeFlags_Debug(this$) {
742
743
  }, ofArray([[1, "Any"], [2, "Unknown"], [4, "String"], [8, "Number"], [16, "Boolean"], [32, "Enum"], [64, "BigInt"], [128, "StringLiteral"], [256, "NumberLiteral"], [512, "BooleanLiteral"], [1024, "EnumLiteral"], [2048, "BigIntLiteral"], [4096, "ESSymbol"], [8192, "UniqueESSymbol"], [16384, "Void"], [32768, "Undefined"], [65536, "Null"], [131072, "Never"], [262144, "TypeParameter"], [524288, "Object"], [1048576, "Union"], [2097152, "Intersection"], [4194304, "Index"], [8388608, "IndexedAccess"], [16777216, "Conditional"], [33554432, "Substitution"], [67108864, "NonPrimitive"], [134217728, "TemplateLiteral"], [268435456, "StringMapping"], [2944, "Literal"], [109472, "Unit"], [2976, "Freshable"], [384, "StringOrNumberLiteral"], [117724, "PossiblyFalsy"], [402653316, "StringLike"], [296, "NumberLike"], [2112, "BigIntLike"], [528, "BooleanLike"], [1056, "EnumLike"], [12288, "ESSymbolLike"], [49152, "VoidLike"], [3145728, "UnionOrIntersection"], [3670016, "StructuredType"], [8650752, "TypeVariable"], [58982400, "InstantiableNonPrimitive"], [406847488, "InstantiablePrimitive"], [465829888, "Instantiable"], [469499904, "StructuredOrInstantiable"]]));
743
744
  }
744
745
 
745
- //# sourceMappingURL=TypeScript.Extensions.js.map
@@ -1,4 +1,5 @@
1
- import { class_type } from "../fable_modules/fable-library-js.4.14.0/Reflection.js";
1
+
2
+ import { class_type } from "../fable_modules/fable-library-js.5.17.2/Reflection.js";
2
3
 
3
4
  export class Ts_NoisTypeNodede {
4
5
  constructor() {
@@ -6,7 +7,6 @@ export class Ts_NoisTypeNodede {
6
7
  }
7
8
 
8
9
  export function Ts_NoisTypeNodede_$reflection() {
9
- return class_type("TypeScript.Ts.NoisTypeNodede", void 0, Ts_NoisTypeNodede);
10
+ return class_type("TypeScript.Ts.NoisTypeNodede", undefined, Ts_NoisTypeNodede);
10
11
  }
11
12
 
12
- //# sourceMappingURL=TypeScript.js.map
@@ -1,9 +1,9 @@
1
- import { ofList } from "../../fable_modules/fable-library-js.4.14.0/Set.js";
2
- import { ofArray } from "../../fable_modules/fable-library-js.4.14.0/List.js";
3
- import { comparePrimitives } from "../../fable_modules/fable-library-js.4.14.0/Util.js";
4
1
 
5
- 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"]), {
6
- Compare: comparePrimitives,
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";
5
+
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
+ Compare: (x, y) => (comparePrimitives(x, y) | 0),
7
8
  });
8
9
 
9
- //# sourceMappingURL=Keywords.js.map
@@ -1,5 +1,6 @@
1
- import { skipWhile, empty, tail, head, isEmpty, cons, reverse } from "../../fable_modules/fable-library-js.4.14.0/List.js";
2
- import { isNullOrEmpty } from "../../fable_modules/fable-library-js.4.14.0/String.js";
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";
3
4
 
4
5
  export function removeConsecutiveEmptyLines(list) {
5
6
  const loop = (acc_mut, _arg_mut) => {
@@ -59,4 +60,3 @@ export function trimEmptyLines(list) {
59
60
  return reverse(skipWhile(isNullOrEmpty, reverse(skipWhile(isNullOrEmpty, list))));
60
61
  }
61
62
 
62
- //# sourceMappingURL=List.js.map
@@ -1,9 +1,11 @@
1
- import { isDigit } from "../../fable_modules/fable-library-js.4.14.0/Char.js";
2
- import { FSharpSet__Contains } from "../../fable_modules/fable-library-js.4.14.0/Set.js";
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";
3
5
  import { fsharp } from "./Keywords.js";
4
- import { isNullOrWhiteSpace, replace, substring, isNullOrEmpty } from "../../fable_modules/fable-library-js.4.14.0/String.js";
5
- import { Record } from "../../fable_modules/fable-library-js.4.14.0/Types.js";
6
- import { record_type, bool_type, string_type } from "../../fable_modules/fable-library-js.4.14.0/Reflection.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";
7
9
 
8
10
  function startWithDigit(name) {
9
11
  if (name.length > 0) {
@@ -15,8 +17,11 @@ function startWithDigit(name) {
15
17
  }
16
18
 
17
19
  function escapeName(name) {
18
- if (((((((((name.indexOf("-") >= 0) ? true : (name.indexOf("$") >= 0)) ? true : (name.indexOf("#") >= 0)) ? true : (name.indexOf("<") >= 0)) ? true : (name.indexOf(">") >= 0)) ? true : (name.indexOf(" ") >= 0)) ? true : (name.indexOf("~") >= 0)) ? true : startWithDigit(name)) ? true : FSharpSet__Contains(fsharp, name)) {
19
- return `\`\`${name}\`\``;
20
+ if (((name.length > 4) && name.startsWith("``")) && name.endsWith("``")) {
21
+ return name;
22
+ }
23
+ else if ((((name === "_") ? true : exists((c) => !((isLetterOrDigit(c) ? true : (c === "_")) ? true : (c === "\'")), name.split(""))) ? true : startWithDigit(name)) ? true : FSharpSet__Contains(fsharp, name)) {
24
+ return concat("``", name, "``");
20
25
  }
21
26
  else {
22
27
  return name;
@@ -27,7 +32,7 @@ export function removeSurroundingQuotes(text) {
27
32
  if (isNullOrEmpty(text)) {
28
33
  return "";
29
34
  }
30
- else if (text.length < 1) {
35
+ else if (text.length < 2) {
31
36
  return text;
32
37
  }
33
38
  else {
@@ -73,6 +78,10 @@ function replaceAt(text) {
73
78
  return replace(text, "@", "_AT_");
74
79
  }
75
80
 
81
+ function replaceControlChars(text) {
82
+ return replace(replace(replace(text, "\r", "_CARRIAGE_RETURN_"), "\n", "_NEWLINE_"), "\t", "_TAB_");
83
+ }
84
+
76
85
  function replaceEmpty(text) {
77
86
  if (isNullOrWhiteSpace(text)) {
78
87
  return "_EMPTY_";
@@ -86,6 +95,18 @@ function replacePlus(text) {
86
95
  return replace(text, "+", "_PLUS_");
87
96
  }
88
97
 
98
+ function replaceDollar(text) {
99
+ return replace(text, "$", "_DOLLAR_");
100
+ }
101
+
102
+ function replaceForwardSlash(text) {
103
+ return replace(text, "/", "_SLASH_");
104
+ }
105
+
106
+ function replaceTypeNameInvalidChars(text) {
107
+ return replace(replace(replace(replace(replace(replace(replace(replace(text, "\\", "_BACKSLASH_"), "*", "_STAR_"), "&", "_AMP_"), "[", "_LBRACKET_"), "]", "_RBRACKET_"), "\"", "_QUOTE_"), "\'", "_APOSTROPHE_"), "`", "_BACKTICK_");
108
+ }
109
+
89
110
  export class SanitizeNameResult extends Record {
90
111
  constructor(Name, IsDifferent) {
91
112
  super();
@@ -98,14 +119,42 @@ export function SanitizeNameResult_$reflection() {
98
119
  return record_type("Naming.SanitizeNameResult", [], SanitizeNameResult, () => [["Name", string_type], ["IsDifferent", bool_type]]);
99
120
  }
100
121
 
122
+ function sanitizeWith(extraReplace, name) {
123
+ if (((name.length > 4) && name.startsWith("``")) && name.endsWith("``")) {
124
+ return new SanitizeNameResult(name, false);
125
+ }
126
+ else {
127
+ const sanitizedName = extraReplace(removeSurroundingQuotes(replacePlus(replaceEmpty(replaceControlChars(replaceAt(replaceDot(name)))))));
128
+ const isDifferent = name !== sanitizedName;
129
+ return new SanitizeNameResult(escapeName(sanitizedName), isDifferent);
130
+ }
131
+ }
132
+
101
133
  export function sanitizeNameWithResult(name) {
102
- const sanitizedName = removeSurroundingQuotes(replacePlus(replaceEmpty(replaceAt(replaceDot(name)))));
103
- const isDifferent = name !== sanitizedName;
104
- return new SanitizeNameResult(escapeName(sanitizedName), isDifferent);
134
+ return sanitizeWith((x) => x, name);
135
+ }
136
+
137
+ /**
138
+ * Like <see cref="sanitizeNameWithResult"/> but also replaces characters that
139
+ * are invalid in F# namespace, module, type or union case names (<c>$</c> and
140
+ * <c>/</c>). Use this for type-level names and union/enum case names, not for
141
+ * member names.
142
+ */
143
+ export function sanitizeTypeNameWithResult(name) {
144
+ return sanitizeWith((arg_1) => replaceTypeNameInvalidChars(replaceForwardSlash(replaceDollar(arg_1))), name);
105
145
  }
106
146
 
107
147
  export function sanitizeName(name) {
108
148
  return sanitizeNameWithResult(name).Name;
109
149
  }
110
150
 
111
- //# sourceMappingURL=Naming.js.map
151
+ /**
152
+ * Like <see cref="sanitizeName"/> but also replaces characters that are
153
+ * invalid in F# namespace, module, type or union case names (<c>$</c> and
154
+ * <c>/</c>). Use this for type-level names and union/enum case names, not for
155
+ * member names.
156
+ */
157
+ export function sanitizeTypeName(name) {
158
+ return sanitizeTypeNameWithResult(name).Name;
159
+ }
160
+
@@ -1,10 +1,15 @@
1
- import { trim, replace as replace_1 } from "../../fable_modules/fable-library-js.4.14.0/String.js";
2
- import { ofArray } from "../../fable_modules/fable-library-js.4.14.0/List.js";
1
+
2
+ import { 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";
3
4
 
4
5
  export function replace(oldValue, newValue, input) {
5
6
  return replace_1(input, oldValue, newValue);
6
7
  }
7
8
 
9
+ export function normalizePath(path) {
10
+ return replace_1(path, "\\", "/");
11
+ }
12
+
8
13
  export function removeSingleQuote(text) {
9
14
  return trim(text, "\'");
10
15
  }
@@ -25,4 +30,3 @@ export function splitLines(text) {
25
30
  return ofArray(replace_1(replace_1(text, "\r\n", "\n"), "\r", "\n").split("\n"));
26
31
  }
27
32
 
28
- //# sourceMappingURL=String.js.map
package/dist/Program.js CHANGED
@@ -1,12 +1,17 @@
1
- import { error, success, info, log } from "./Glutinum.Converter/Log.js";
2
- import { tail, head, isEmpty, ofArray } from "./fable_modules/fable-library-js.4.14.0/List.js";
3
- import { generateBindingFile } from "./Glutinum.Converter/Generate.js";
1
+
2
+ import { success, info, error, log } from "./Glutinum.Converter/Log.js";
3
+ import { generateBindingFile, generatePackagesFromDisk } from "./Glutinum.Converter/Generate.js";
4
+ import { length, exists, filter, contains, cons, singleton, append, reverse, ofArray, tail as tail_5, head, isEmpty, empty } from "./fable_modules/fable-library-js.5.17.2/List.js";
5
+ import { item, equalsWith } from "./fable_modules/fable-library-js.5.17.2/Array.js";
6
+ import { stringHash, defaultOf } from "./fable_modules/fable-library-js.5.17.2/Util.js";
7
+ import { defaultOptions, GenerateOptions } from "./Glutinum.Converter/Packages.js";
8
+ import { join, concat } from "./fable_modules/fable-library-js.5.17.2/String.js";
4
9
  import * as path from "path";
5
10
  import * as fs from "fs";
6
11
 
7
12
  export function printHelp() {
8
- const helpText = "\nGenerate Fable bindings from TypeScript definitions - https://github.com/glutinum-org/cl\n\nUSAGE\n\n glutinum <input> [--out-file <output>]\n glue <input> [--out-file <output>]\n\nOPTIONS\n\n --out-file <output> Destination file to write in\n If not specified, the result will be printed to stdout\n -h, --help Print this help message\n\nEXAMPLES\n\n glutinum ./node_modules/my-lib/index.d.ts --out-file ./Glutinum.MyLib.fs\n glutinum ./node_modules/my-lib/index.d.ts\n ";
9
- log(`${helpText}`);
13
+ 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 ";
14
+ log(helpText);
10
15
  }
11
16
 
12
17
  function getVersion() {
@@ -16,9 +21,50 @@ function getVersion() {
16
21
  ;
17
22
  }
18
23
 
24
+ function generate(options, inputs) {
25
+ let matchResult, input_1, inputs_1;
26
+ if (!isEmpty(inputs)) {
27
+ if (head(inputs) === "--all") {
28
+ if (isEmpty(tail_5(inputs))) {
29
+ matchResult = 0;
30
+ }
31
+ else {
32
+ matchResult = 2;
33
+ inputs_1 = inputs;
34
+ }
35
+ }
36
+ else if (isEmpty(tail_5(inputs))) {
37
+ if (head(inputs).endsWith(".d.ts")) {
38
+ matchResult = 1;
39
+ input_1 = head(inputs);
40
+ }
41
+ else {
42
+ matchResult = 2;
43
+ inputs_1 = inputs;
44
+ }
45
+ }
46
+ else {
47
+ matchResult = 2;
48
+ inputs_1 = inputs;
49
+ }
50
+ }
51
+ else {
52
+ matchResult = 2;
53
+ inputs_1 = inputs;
54
+ }
55
+ switch (matchResult) {
56
+ case 0:
57
+ return generatePackagesFromDisk(options, empty());
58
+ case 1:
59
+ return generateBindingFile(input_1);
60
+ default:
61
+ return generatePackagesFromDisk(options, inputs_1);
62
+ }
63
+ }
64
+
19
65
  (function (argv) {
20
66
  const argv_1 = ofArray(argv);
21
- let matchResult, input, outFile, input_1;
67
+ let matchResult;
22
68
  if (!isEmpty(argv_1)) {
23
69
  switch (head(argv_1)) {
24
70
  case "-h":
@@ -28,54 +74,16 @@ function getVersion() {
28
74
  break;
29
75
  }
30
76
  case "--version": {
31
- if (!isEmpty(tail(argv_1))) {
32
- if (head(tail(argv_1)) === "--out-file") {
33
- if (!isEmpty(tail(tail(argv_1)))) {
34
- if (isEmpty(tail(tail(tail(argv_1))))) {
35
- matchResult = 2;
36
- input = head(argv_1);
37
- outFile = head(tail(tail(argv_1)));
38
- }
39
- else {
40
- matchResult = 4;
41
- }
42
- }
43
- else {
44
- matchResult = 4;
45
- }
46
- }
47
- else {
48
- matchResult = 4;
49
- }
77
+ if (isEmpty(tail_5(argv_1))) {
78
+ matchResult = 1;
50
79
  }
51
80
  else {
52
- matchResult = 1;
81
+ matchResult = 2;
53
82
  }
54
83
  break;
55
84
  }
56
85
  default:
57
- if (isEmpty(tail(argv_1))) {
58
- matchResult = 3;
59
- input_1 = head(argv_1);
60
- }
61
- else if (head(tail(argv_1)) === "--out-file") {
62
- if (!isEmpty(tail(tail(argv_1)))) {
63
- if (isEmpty(tail(tail(tail(argv_1))))) {
64
- matchResult = 2;
65
- input = head(argv_1);
66
- outFile = head(tail(tail(argv_1)));
67
- }
68
- else {
69
- matchResult = 4;
70
- }
71
- }
72
- else {
73
- matchResult = 4;
74
- }
75
- }
76
- else {
77
- matchResult = 4;
78
- }
86
+ matchResult = 2;
79
87
  }
80
88
  }
81
89
  else {
@@ -87,34 +95,184 @@ function getVersion() {
87
95
  return 0;
88
96
  }
89
97
  case 1: {
90
- log(`${getVersion()}`);
91
- return 0;
92
- }
93
- case 2: {
94
- info(`Generating binding file for ${input}`);
95
- const res = generateBindingFile(input);
96
- const outFileDir = path.dirname(outFile);
97
- fs.mkdirSync(outFileDir, {
98
- recursive: true,
99
- });
100
- fs.writeFileSync(outFile, res);
101
- info(`Bindings written to: ${path.join(process.cwd(), outFile)}`);
102
- success("Success!");
103
- return 0;
104
- }
105
- case 3: {
106
- info(`Generating binding file for ${input_1}`);
107
- const res_1 = generateBindingFile(input_1);
108
- process.stdout.write(res_1);
109
- success("Success!");
98
+ log(getVersion());
110
99
  return 0;
111
100
  }
112
101
  default: {
113
- error("Invalid arguments");
114
- printHelp();
115
- return 1;
102
+ let patternInput;
103
+ const matchValue = reverse(argv_1);
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_1, 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 = value.split("="), (!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(value_2.split(","))), 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
+ const res = generate(options_2, inputs_3);
260
+ if (outFile_1 == null) {
261
+ process.stdout.write(res);
262
+ }
263
+ else {
264
+ const outFile_2 = outFile_1;
265
+ const outFileDir = path.dirname(outFile_2);
266
+ fs.mkdirSync(outFileDir, {
267
+ recursive: true,
268
+ });
269
+ fs.writeFileSync(outFile_2, res);
270
+ info(concat("Bindings written to: ", path.join(process.cwd(), outFile_2)));
271
+ }
272
+ success("Success!");
273
+ return 0;
274
+ }
116
275
  }
117
276
  }
118
277
  })(typeof process === 'object' ? process.argv.slice(2) : []);
119
278
 
120
- //# sourceMappingURL=Program.js.map
@@ -0,0 +1,89 @@
1
+ [<RequireQualifiedAccess>]
2
+ module AsyncIterable
3
+
4
+ open Fable.Core
5
+ open Fable.Core.JsInterop
6
+
7
+ [<Emit("""{
8
+ [Symbol.asyncIterator]() {
9
+ return {
10
+ next: $0,
11
+ return: $1
12
+ }
13
+ }
14
+ }""")>]
15
+ let private createAsyncIterator
16
+ (onNext: unit -> JS.Promise<obj>)
17
+ (onCancel: unit -> obj)
18
+ : JS.AsyncIterable<'T>
19
+ =
20
+ jsNative
21
+
22
+ /// Creates AsyncIterable. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of#specifications
23
+ let create (onNext: unit -> JS.Promise<'T option>) : JS.AsyncIterable<'T> =
24
+ createAsyncIterator
25
+ (fun () ->
26
+ onNext ()
27
+ |> Promise.map (
28
+ function
29
+ | Some value ->
30
+ createObj
31
+ [
32
+ "value" ==> value
33
+ "done" ==> false
34
+ ]
35
+ | None -> createObj [ "done" ==> true ]
36
+ )
37
+ )
38
+ (fun () -> createObj [ "done" ==> true ])
39
+
40
+ /// Creates AsyncIterable with a cleaning function for cancellation (JS caller invokes `break` or `return` during iteration)
41
+ let createCancellable
42
+ (onCancel: unit -> unit)
43
+ (onNext: unit -> JS.Promise<'T option>)
44
+ : JS.AsyncIterable<'T>
45
+ =
46
+ createAsyncIterator
47
+ (fun () ->
48
+ onNext ()
49
+ |> Promise.map (
50
+ function
51
+ | Some value ->
52
+ createObj
53
+ [
54
+ "value" ==> value
55
+ "done" ==> false
56
+ ]
57
+ | None -> createObj [ "done" ==> true ]
58
+ )
59
+ )
60
+ (fun () ->
61
+ onCancel ()
62
+ createObj [ "done" ==> true ]
63
+ )
64
+
65
+ type CancellationToken() =
66
+ member this.Cancel() : unit = raise !!this
67
+
68
+ /// Iterates AsyncIterable. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
69
+ let iter
70
+ (action: CancellationToken -> 'T -> unit)
71
+ (iterable: JS.AsyncIterable<'T>)
72
+ : JS.Promise<unit>
73
+ =
74
+ let token = CancellationToken()
75
+
76
+ emitJsExpr
77
+ (action, iterable, token)
78
+ """(async () => {
79
+ for await (const value of $1) {
80
+ try {
81
+ $0($2, value)
82
+ } catch (err) {
83
+ if (err instanceof $2.constructor) {
84
+ break;
85
+ }
86
+ throw(err);
87
+ }
88
+ }
89
+ })()"""