@glutinum/cli 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +35 -3
  2. package/dist/Glutinum.Converter/Abbreviations.js +246 -0
  3. package/dist/Glutinum.Converter/FsharpAST.js +98 -34
  4. package/dist/Glutinum.Converter/Generate.js +55 -8
  5. package/dist/Glutinum.Converter/GlueAST.js +446 -30
  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 +332 -170
  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 -8
  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 +1527 -248
  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 +8710 -1137
  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 +76 -14
  42. package/dist/Glutinum.Converter/Utils/String.js +7 -3
  43. package/dist/Program.js +230 -72
  44. package/package.json +4 -4
  45. package/src/Glutinum.Converter/js/bootstrap.js +109 -2
  46. package/src/Glutinum.Converter/js/host.js +144 -0
  47. package/src/Glutinum.Converter/js/npm.js +137 -0
  48. package/src/Glutinum.Converter/js/resolve.js +402 -0
  49. package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
  50. package/dist/Glutinum.Converter/Generate.js.map +0 -1
  51. package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
  52. package/dist/Glutinum.Converter/Log.js.map +0 -1
  53. package/dist/Glutinum.Converter/Merge.js.map +0 -1
  54. package/dist/Glutinum.Converter/Printer.js.map +0 -1
  55. package/dist/Glutinum.Converter/Read.js.map +0 -1
  56. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
  57. package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
  58. package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
  59. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
  60. package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
  61. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
  62. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
  63. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
  64. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
  65. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
  66. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
  67. package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
  68. package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
  69. package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
  70. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
  71. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
  72. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
  73. package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
  74. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
  75. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
  76. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
  77. package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
  78. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
  79. package/dist/Glutinum.Converter/Transform.js.map +0 -1
  80. package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
  81. package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
  82. package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
  83. package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
  84. package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
  85. package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
  86. package/dist/Program.js.map +0 -1
  87. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
  88. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +0 -105
  89. package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
  90. package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
  91. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs +0 -766
  92. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +0 -218
  93. package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
  94. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +0 -31
  95. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +0 -20
  96. package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
  97. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +0 -19
  98. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +0 -207
  99. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +0 -127
  100. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
  101. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +0 -81
  102. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +0 -183
  103. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +0 -37
  104. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
  105. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +0 -24
  106. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +0 -439
  107. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +0 -217
  108. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +0 -18
  109. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
  110. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +0 -24
  111. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +0 -75
  112. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
  113. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
  114. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +0 -238
  115. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +0 -18
  116. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
  117. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +0 -24
  118. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +0 -190
  119. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +0 -194
  120. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +0 -18
  121. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
  122. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +0 -35
  123. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
  124. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +0 -218
  125. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +0 -358
  126. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
  127. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +0 -331
  128. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
  129. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
  130. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
  131. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +0 -21
  132. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +0 -644
  133. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +0 -45
  134. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
  135. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +0 -155
  136. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +0 -23
  137. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
  138. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +0 -45
  139. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +0 -201
  140. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +0 -65
  141. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
  142. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +0 -146
  143. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +0 -18
  144. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
  145. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +0 -57
  146. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
  147. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
  148. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
  149. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
  150. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
  151. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
  152. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +0 -172
  153. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +0 -148
  154. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +0 -18
  155. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
  156. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +0 -35
  157. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +0 -151
  158. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
  159. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
  160. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
  161. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -3
  162. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
  163. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
  164. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
  165. package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
  166. package/dist/fable_modules/fable-library-js.4.14.0/Array.js +0 -1242
  167. package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
  168. package/dist/fable_modules/fable-library-js.4.14.0/Async.js +0 -158
  169. package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
  170. package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.js +0 -183
  171. package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
  172. package/dist/fable_modules/fable-library-js.4.14.0/BigInt.js +0 -282
  173. package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
  174. package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.js +0 -138
  175. package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
  176. package/dist/fable_modules/fable-library-js.4.14.0/Boolean.js +0 -21
  177. package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
  178. package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
  179. package/dist/fable_modules/fable-library-js.4.14.0/Char.js +0 -169
  180. package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
  181. package/dist/fable_modules/fable-library-js.4.14.0/Choice.js +0 -184
  182. package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
  183. package/dist/fable_modules/fable-library-js.4.14.0/Date.js +0 -749
  184. package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
  185. package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.js +0 -268
  186. package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
  187. package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.js +0 -124
  188. package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
  189. package/dist/fable_modules/fable-library-js.4.14.0/Decimal.js +0 -212
  190. package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
  191. package/dist/fable_modules/fable-library-js.4.14.0/Double.js +0 -46
  192. package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
  193. package/dist/fable_modules/fable-library-js.4.14.0/Encoding.js +0 -173
  194. package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
  195. package/dist/fable_modules/fable-library-js.4.14.0/Event.js +0 -93
  196. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
  197. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
  198. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
  199. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.js +0 -27
  200. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
  201. package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
  202. package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
  203. package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
  204. package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
  205. package/dist/fable_modules/fable-library-js.4.14.0/Guid.js +0 -142
  206. package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
  207. package/dist/fable_modules/fable-library-js.4.14.0/Int32.js +0 -135
  208. package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
  209. package/dist/fable_modules/fable-library-js.4.14.0/List.js +0 -1273
  210. package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
  211. package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
  212. package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
  213. package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.js +0 -93
  214. package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
  215. package/dist/fable_modules/fable-library-js.4.14.0/Map.js +0 -1396
  216. package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
  217. package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.js +0 -112
  218. package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
  219. package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.js +0 -327
  220. package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
  221. package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.js +0 -233
  222. package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
  223. package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
  224. package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
  225. package/dist/fable_modules/fable-library-js.4.14.0/Numeric.js +0 -71
  226. package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
  227. package/dist/fable_modules/fable-library-js.4.14.0/Observable.js +0 -113
  228. package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
  229. package/dist/fable_modules/fable-library-js.4.14.0/Option.js +0 -96
  230. package/dist/fable_modules/fable-library-js.4.14.0/README.md +0 -3
  231. package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
  232. package/dist/fable_modules/fable-library-js.4.14.0/Random.js +0 -170
  233. package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
  234. package/dist/fable_modules/fable-library-js.4.14.0/Range.js +0 -45
  235. package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
  236. package/dist/fable_modules/fable-library-js.4.14.0/Reflection.js +0 -461
  237. package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
  238. package/dist/fable_modules/fable-library-js.4.14.0/RegExp.js +0 -132
  239. package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
  240. package/dist/fable_modules/fable-library-js.4.14.0/Result.js +0 -165
  241. package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
  242. package/dist/fable_modules/fable-library-js.4.14.0/Seq.js +0 -1379
  243. package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
  244. package/dist/fable_modules/fable-library-js.4.14.0/Seq2.js +0 -111
  245. package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
  246. package/dist/fable_modules/fable-library-js.4.14.0/Set.js +0 -1789
  247. package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
  248. package/dist/fable_modules/fable-library-js.4.14.0/String.js +0 -543
  249. package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
  250. package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.js +0 -317
  251. package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
  252. package/dist/fable_modules/fable-library-js.4.14.0/System.Text.js +0 -162
  253. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
  254. package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
  255. package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
  256. package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.js +0 -122
  257. package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
  258. package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.js +0 -177
  259. package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
  260. package/dist/fable_modules/fable-library-js.4.14.0/Timer.js +0 -67
  261. package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
  262. package/dist/fable_modules/fable-library-js.4.14.0/Types.js +0 -208
  263. package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
  264. package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.js +0 -4
  265. package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
  266. package/dist/fable_modules/fable-library-js.4.14.0/Uri.js +0 -142
  267. package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
  268. package/dist/fable_modules/fable-library-js.4.14.0/Util.js +0 -770
  269. package/dist/fable_modules/fable-library-js.4.14.0/big.d.ts +0 -338
  270. package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
  271. package/dist/fable_modules/fable-library-js.4.14.0/lib/big.js +0 -826
  272. package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
  273. package/dist/fable_modules/project_cracked.json +0 -1
package/README.md CHANGED
@@ -2,13 +2,15 @@
2
2
 
3
3
  This is a compiler from `.d.ts` to F# bindings for [Fable](https://fable.io/).
4
4
 
5
+ The documentation is at [glutinum.net](https://glutinum.net/), the web application at [glutinum.net/app](https://glutinum.net/app/).
6
+
5
7
  ## Getting Started
6
8
 
7
9
  Glutinum is delivered both as a CLI tool and web interface.
8
10
 
9
11
  ### Web Interface
10
12
 
11
- The web interface is available [here](https://glutinum.net/).
13
+ The web interface is available [here](https://glutinum.net/app/).
12
14
 
13
15
  It is a simple and easy-to-use tool, allowing you to convert `.d.ts` files to F# bindings directly from your browser without installing anything.
14
16
 
@@ -48,6 +50,22 @@ npx @glutinum/cli ./node_modules/my-lib/index.d.ts > ./Glutinum.MyLib.fs
48
50
  npx glue ./node_modules/my-lib/index.d.ts > ./Glutinum.MyLib.fs
49
51
  ```
50
52
 
53
+ ## Published bindings
54
+
55
+ The bindings of the runtimes are generated from this repository and published on NuGet:
56
+
57
+ | Package | Generated from | Usage |
58
+ | --- | --- | --- |
59
+ | [Glutinum.Web](bindings/Glutinum.Web/README.md) | `@types/web` | `open type Glutinum.Web.Exports` |
60
+ | [Glutinum.Node](bindings/Glutinum.Node/README.md) | `@types/node` | `open Glutinum.Node.Exports` |
61
+ | Glutinum.Types | the `lib.es*.d.ts` files of `typescript` | `open Glutinum.Types.TypeScript` |
62
+
63
+ `Glutinum.Types` holds the ES library types Fable.Core does not define, `ReadonlyArray`, `ArrayLike`, `Iterator` or `PromiseLike`. The list is `esLibraryTypes` in `src/Glutinum.Build/Commands/Bindings.fs`; `Array`, `Date`, `Promise`, `Map` and the typed arrays stay on Fable.Core.
64
+
65
+ A binding generated for a package using the DOM or the Node types references them instead of generating them again, the header of the file tells which one to add. `--no-externals` generates them inline.
66
+
67
+ `./build.sh bindings` regenerates them from the versions pinned in `bindings/package.json`, `./build.sh test bindings` runs them in Node and Chromium.
68
+
51
69
  ## Contributing
52
70
 
53
71
  Glutinum.CLI use `./build.sh` or `./build.bat` as a build script.
@@ -61,12 +79,26 @@ You can see the available options by running:
61
79
  When using the test command, you can focus on a specific by forwarding arguments to `vitest`:
62
80
 
63
81
  ```bash
64
- # Focus all tests containing related to specs/class/
65
- ./build.sh test --watch -- -t class/
82
+ # Focus on all tests containing related to specs/references/class/
83
+ ./build.sh test specs -- -t class/
84
+ # Do the same, but in watch mode
85
+ ./build.sh test specs --watch -- -t class/
66
86
  ```
67
87
 
68
88
  If you need to run a local version of `@glutinum/cli`, you can use `./build.sh cli [--watch]` and then run `node cli.js <args>`.
69
89
 
90
+ ### Tmux setup
91
+
92
+ When working on Glutinum, I often need to start both the web interface and the tests watcher.
93
+
94
+ To make it easier, I created a tmux script that starts both in a single command.
95
+
96
+ ```bash
97
+ ./start-dev.sh
98
+ ```
99
+
100
+ > ℹ You need to have `tmux` installed.
101
+
70
102
  ### Debugging
71
103
 
72
104
  If you use VSCode, you can run the build script/commands from the `JavaScript Debug Terminal`. This allows you to have access to the debugger, breakpoints, etc. (it works from the F# files too).
@@ -0,0 +1,246 @@
1
+
2
+ import { join } from "../fable_modules/fable-library-js.5.17.2/String.js";
3
+ import { filter, iterate, map as map_1, empty as empty_1, isEmpty, tryFind, truncate, length, singleton, append } from "../fable_modules/fable-library-js.5.17.2/List.js";
4
+ import { defaultOf, equals, disposeSafe, getEnumerator, int32ToString } from "../fable_modules/fable-library-js.5.17.2/Util.js";
5
+ import { tryGetValue, getItemFromDict, addToSet } from "../fable_modules/fable-library-js.5.17.2/MapUtil.js";
6
+ import { empty, singleton as singleton_1, append as append_1, map, delay, toList } from "../fable_modules/fable-library-js.5.17.2/Seq.js";
7
+ import { rangeDouble } from "../fable_modules/fable-library-js.5.17.2/Range.js";
8
+ import { FSharpModule, FSharpTypeAlias, FSharpFunctionType, FSharpParameter, FSharpUnion, FSharpUnionCase, FSharpMapped, FSharpTypeParameter, FSharpTypeReference, FSharpType } from "./FsharpAST.js";
9
+ import { FSharpRef } from "../fable_modules/fable-library-js.5.17.2/Types.js";
10
+
11
+ function key(path, name, arity) {
12
+ return (join(".", append(path, singleton(name))) + "`") + int32ToString(arity);
13
+ }
14
+
15
+ function collect(path, types, acc, declared) {
16
+ const enumerator = getEnumerator(types);
17
+ try {
18
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
19
+ const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
20
+ switch (typ.tag) {
21
+ case 9: {
22
+ const aliasInfo = typ.fields[0];
23
+ const aliasKey = key(path, aliasInfo.Name, length(aliasInfo.TypeParameters));
24
+ acc.set(aliasKey, [path, aliasInfo]);
25
+ addToSet(aliasKey, declared);
26
+ break;
27
+ }
28
+ case 4: {
29
+ const moduleInfo = typ.fields[0];
30
+ collect(append(path, singleton(moduleInfo.Name)), moduleInfo.Types, acc, declared);
31
+ break;
32
+ }
33
+ case 5: {
34
+ const info = typ.fields[0];
35
+ addToSet(key(path, info.Name, length(info.TypeParameters)), declared);
36
+ break;
37
+ }
38
+ case 17: {
39
+ const info_1 = typ.fields[0];
40
+ addToSet(key(path, info_1.Name, length(info_1.TypeParameters)), declared);
41
+ break;
42
+ }
43
+ case 20: {
44
+ const info_2 = typ.fields[0];
45
+ addToSet(key(path, info_2.Name, length(info_2.TypeParameters)), declared);
46
+ break;
47
+ }
48
+ case 1: {
49
+ const info_3 = typ.fields[0];
50
+ addToSet(key(path, info_3.Name, length(info_3.TypeParameters)), declared);
51
+ break;
52
+ }
53
+ case 0: {
54
+ addToSet(key(path, typ.fields[0].Name, 0), declared);
55
+ break;
56
+ }
57
+ case 2: {
58
+ addToSet(key(path, typ.fields[0].Name, 1), declared);
59
+ break;
60
+ }
61
+ default:
62
+ undefined;
63
+ }
64
+ }
65
+ }
66
+ finally {
67
+ disposeSafe(enumerator);
68
+ }
69
+ }
70
+
71
+ function ancestors(path) {
72
+ return toList(delay(() => map((count) => truncate(count, path), rangeDouble(length(path), -1, 0))));
73
+ }
74
+
75
+ function resolve(aliases, declared, path, modulePath, name, arity) {
76
+ let key_1;
77
+ const option_1 = tryFind((item) => declared.has(item), toList(delay(() => append_1(!isEmpty(modulePath) ? singleton_1(key(modulePath, name, arity)) : empty(), delay(() => map((ancestor) => key(append(ancestor, modulePath), name, arity), ancestors(path)))))));
78
+ if (option_1 != null) {
79
+ if ((key_1 = option_1, aliases.has(key_1))) {
80
+ return option_1;
81
+ }
82
+ else {
83
+ return undefined;
84
+ }
85
+ }
86
+ else {
87
+ return undefined;
88
+ }
89
+ }
90
+
91
+ export function apply(types) {
92
+ const aliases = new Map([]);
93
+ const declared = new Set([]);
94
+ collect(empty_1(), types, aliases, declared);
95
+ const onStack = new Set([]);
96
+ const visited = new Set([]);
97
+ const rewritten = new Map([]);
98
+ const visit = (aliasKey) => {
99
+ if (addToSet(aliasKey, visited)) {
100
+ const patternInput = getItemFromDict(aliases, aliasKey);
101
+ const path = patternInput[0];
102
+ const aliasInfo = patternInput[1];
103
+ addToSet(aliasKey, onStack);
104
+ const cut = (typ) => {
105
+ let target_1, target_4;
106
+ switch (typ.tag) {
107
+ case 11: {
108
+ const typeReference = typ.fields[0];
109
+ const target = resolve(aliases, declared, path, typeReference.ModulePath, typeReference.Name, length(typeReference.TypeArguments));
110
+ let matchResult, target_2, target_3;
111
+ if (target != null) {
112
+ if ((target_1 = target, onStack.has(target_1))) {
113
+ matchResult = 0;
114
+ target_2 = target;
115
+ }
116
+ else {
117
+ matchResult = 1;
118
+ target_3 = target;
119
+ }
120
+ }
121
+ else {
122
+ matchResult = 1;
123
+ target_3 = target;
124
+ }
125
+ switch (matchResult) {
126
+ case 0:
127
+ return FSharpType.Object$;
128
+ default: {
129
+ const option_1 = target_3;
130
+ if (option_1 != null) {
131
+ visit(option_1);
132
+ }
133
+ return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(typeReference.Name, typeReference.FullName, typeReference.ModulePath, map_1(cut, typeReference.TypeArguments), typeReference.Type)]);
134
+ }
135
+ }
136
+ }
137
+ case 7: {
138
+ const mappedInfo = typ.fields[0];
139
+ const arguments$ = map_1((_arg) => {
140
+ if (_arg.tag === 0) {
141
+ return new FSharpTypeParameter(/* FSharpType */ 0, [cut(_arg.fields[0])]);
142
+ }
143
+ else {
144
+ return _arg;
145
+ }
146
+ }, mappedInfo.TypeParameters);
147
+ const matchValue = resolve(aliases, declared, path, empty_1(), mappedInfo.Name, length(arguments$));
148
+ let matchResult_1, target_5, target_6;
149
+ if (matchValue != null) {
150
+ if ((target_4 = matchValue, onStack.has(target_4))) {
151
+ matchResult_1 = 0;
152
+ target_5 = matchValue;
153
+ }
154
+ else {
155
+ matchResult_1 = 1;
156
+ target_6 = matchValue;
157
+ }
158
+ }
159
+ else {
160
+ matchResult_1 = 1;
161
+ target_6 = matchValue;
162
+ }
163
+ switch (matchResult_1) {
164
+ case 0:
165
+ return FSharpType.Object$;
166
+ default: {
167
+ const option_3 = target_6;
168
+ if (option_3 != null) {
169
+ visit(option_3);
170
+ }
171
+ return new FSharpType(/* Mapped */ 7, [new FSharpMapped(mappedInfo.Name, arguments$)]);
172
+ }
173
+ }
174
+ }
175
+ case 1: {
176
+ const unionInfo = typ.fields[0];
177
+ return new FSharpType(/* Union */ 1, [new FSharpUnion(unionInfo.Attributes, unionInfo.Name, map_1((_arg_1) => {
178
+ switch (_arg_1.tag) {
179
+ case 1:
180
+ return new FSharpUnionCase(/* Typed */ 1, [cut(_arg_1.fields[0])]);
181
+ case 2:
182
+ return new FSharpUnionCase(/* Field */ 2, [_arg_1.fields[0], cut(_arg_1.fields[1])]);
183
+ default:
184
+ return _arg_1;
185
+ }
186
+ }, unionInfo.Cases), unionInfo.IsOptional, unionInfo.TypeParameters, unionInfo.Constants)]);
187
+ }
188
+ case 3:
189
+ return new FSharpType(/* Option */ 3, [cut(typ.fields[0])]);
190
+ case 14:
191
+ return new FSharpType(/* ResizeArray */ 14, [cut(typ.fields[0])]);
192
+ case 12:
193
+ return new FSharpType(/* Tuple */ 12, [map_1(cut, typ.fields[0])]);
194
+ case 16: {
195
+ const functionInfo = typ.fields[0];
196
+ return new FSharpType(/* Function */ 16, [new FSharpFunctionType(map_1((parameter) => (new FSharpParameter(parameter.Attributes, parameter.Name, parameter.IsOptional, cut(parameter.Type), parameter.OriginalGlueMember)), functionInfo.Parameters), cut(functionInfo.ReturnType))]);
197
+ }
198
+ default:
199
+ return typ;
200
+ }
201
+ };
202
+ const cutType = cut(aliasInfo.Type);
203
+ if (!equals(cutType, aliasInfo.Type)) {
204
+ rewritten.set(aliasKey, new FSharpTypeAlias(aliasInfo.Attributes, aliasInfo.Name, aliasInfo.XmlDoc, cutType, aliasInfo.TypeParameters));
205
+ }
206
+ onStack.delete(aliasKey);
207
+ }
208
+ };
209
+ const keys = toList(aliases.keys());
210
+ iterate(visit, filter((k) => {
211
+ let matchValue_1;
212
+ return !((matchValue_1 = getItemFromDict(aliases, k)[1].Type, (matchValue_1.tag === 7) ? true : (matchValue_1.tag === 11)));
213
+ }, keys));
214
+ iterate(visit, keys);
215
+ if (rewritten.size === 0) {
216
+ return types;
217
+ }
218
+ else {
219
+ const rewrite = (path_1, types_2) => map_1((typ_6) => {
220
+ switch (typ_6.tag) {
221
+ case 9: {
222
+ const aliasInfo_2 = typ_6.fields[0];
223
+ let matchValue_2;
224
+ let outArg = defaultOf();
225
+ matchValue_2 = [tryGetValue(rewritten, key(path_1, aliasInfo_2.Name, length(aliasInfo_2.TypeParameters)), new FSharpRef(() => outArg, (v) => {
226
+ outArg = v;
227
+ })), outArg];
228
+ if (matchValue_2[0]) {
229
+ return new FSharpType(/* TypeAlias */ 9, [matchValue_2[1]]);
230
+ }
231
+ else {
232
+ return typ_6;
233
+ }
234
+ }
235
+ case 4: {
236
+ const moduleInfo = typ_6.fields[0];
237
+ return new FSharpType(/* Module */ 4, [new FSharpModule(moduleInfo.Name, moduleInfo.IsRecursive, moduleInfo.ImportSpecifier, rewrite(append(path_1, singleton(moduleInfo.Name)), moduleInfo.Types))]);
238
+ }
239
+ default:
240
+ return typ_6;
241
+ }
242
+ }, types_2);
243
+ return rewrite(empty_1(), types);
244
+ }
245
+ }
246
+