@nfdi4plants/arctrl 3.2.2 → 3.3.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 (470) hide show
  1. package/README.md +0 -64
  2. package/dist/ts/index.d.ts +44 -7
  3. package/dist/ts/index.d.ts.map +1 -1
  4. package/dist/ts/index.js +45 -8
  5. package/dist/ts/node_modules/@fable-org/fable-library-ts/Array.js +195 -92
  6. package/dist/ts/node_modules/@fable-org/fable-library-ts/Async.js +251 -30
  7. package/dist/ts/node_modules/@fable-org/fable-library-ts/AsyncBuilder.js +61 -11
  8. package/dist/ts/node_modules/@fable-org/fable-library-ts/BigInt.js +15 -5
  9. package/dist/ts/node_modules/@fable-org/fable-library-ts/BitConverter.js +139 -0
  10. package/dist/ts/node_modules/@fable-org/fable-library-ts/Date.js +1 -1
  11. package/dist/ts/node_modules/@fable-org/fable-library-ts/Decimal.js +68 -12
  12. package/dist/ts/node_modules/@fable-org/fable-library-ts/Double.js +24 -10
  13. package/dist/ts/node_modules/@fable-org/fable-library-ts/FSharp.Core.js +8 -2
  14. package/dist/ts/node_modules/@fable-org/fable-library-ts/Global.js +1 -1
  15. package/dist/ts/node_modules/@fable-org/fable-library-ts/Int32.js +11 -2
  16. package/dist/ts/node_modules/@fable-org/fable-library-ts/List.js +220 -155
  17. package/dist/ts/node_modules/@fable-org/fable-library-ts/Long.js +7 -2
  18. package/dist/ts/node_modules/@fable-org/fable-library-ts/Map.js +46 -39
  19. package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableMap.js +75 -92
  20. package/dist/ts/node_modules/@fable-org/fable-library-ts/MutableSet.js +56 -76
  21. package/dist/ts/node_modules/@fable-org/fable-library-ts/NumberStyles.js +54 -0
  22. package/dist/ts/node_modules/@fable-org/fable-library-ts/Numeric.js +10 -5
  23. package/dist/ts/node_modules/@fable-org/fable-library-ts/Random.js +3 -4
  24. package/dist/ts/node_modules/@fable-org/fable-library-ts/Range.js +4 -3
  25. package/dist/ts/node_modules/@fable-org/fable-library-ts/RegExp.js +2 -2
  26. package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq.js +128 -64
  27. package/dist/ts/node_modules/@fable-org/fable-library-ts/Seq2.js +4 -8
  28. package/dist/ts/node_modules/@fable-org/fable-library-ts/Set.js +64 -57
  29. package/dist/ts/node_modules/@fable-org/fable-library-ts/String.js +68 -21
  30. package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Collections.Generic.js +3 -2
  31. package/dist/ts/node_modules/@fable-org/fable-library-ts/System.Text.js +2 -2
  32. package/dist/ts/node_modules/@fable-org/fable-library-ts/System.js +5 -5
  33. package/dist/ts/node_modules/@fable-org/fable-library-ts/Types.js +23 -12
  34. package/dist/ts/node_modules/@fable-org/fable-library-ts/Util.js +88 -49
  35. package/dist/ts/node_modules/@fable-org/fable-library-ts/lib/big.js +121 -74
  36. package/dist/ts/ts/ARC.d.ts +22 -5
  37. package/dist/ts/ts/ARC.d.ts.map +1 -1
  38. package/dist/ts/ts/ARC.js +282 -185
  39. package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts +0 -2
  40. package/dist/ts/ts/CWL/CWLKnownFieldNames.d.ts.map +1 -1
  41. package/dist/ts/ts/CWL/CWLKnownFieldNames.js +1 -7
  42. package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +46 -27
  43. package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -1
  44. package/dist/ts/ts/CWL/CWLProcessingUnit.js +312 -123
  45. package/dist/ts/ts/CWL/CWLTypes.d.ts +481 -148
  46. package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -1
  47. package/dist/ts/ts/CWL/CWLTypes.js +887 -201
  48. package/dist/ts/ts/CWL/Decode.d.ts +480 -211
  49. package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
  50. package/dist/ts/ts/CWL/Decode.js +3614 -2462
  51. package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts +9 -0
  52. package/dist/ts/ts/CWL/DynamicObjHelpers.d.ts.map +1 -1
  53. package/dist/ts/ts/CWL/DynamicObjHelpers.js +55 -5
  54. package/dist/ts/ts/CWL/Encode.d.ts +225 -85
  55. package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
  56. package/dist/ts/ts/CWL/Encode.js +1858 -970
  57. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +42 -28
  58. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -1
  59. package/dist/ts/ts/CWL/ExpressionToolDescription.js +34 -13
  60. package/dist/ts/ts/CWL/HashHelpers.d.ts +38 -0
  61. package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -1
  62. package/dist/ts/ts/CWL/HashHelpers.js +255 -6
  63. package/dist/ts/ts/CWL/Inputs.d.ts +127 -56
  64. package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -1
  65. package/dist/ts/ts/CWL/Inputs.js +107 -16
  66. package/dist/ts/ts/CWL/OperationDescription.d.ts +41 -21
  67. package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -1
  68. package/dist/ts/ts/CWL/OperationDescription.js +35 -9
  69. package/dist/ts/ts/CWL/Outputs.d.ts +93 -42
  70. package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -1
  71. package/dist/ts/ts/CWL/Outputs.js +101 -19
  72. package/dist/ts/ts/CWL/ParameterReference.d.ts +11 -8
  73. package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -1
  74. package/dist/ts/ts/CWL/ParameterReference.js +18 -25
  75. package/dist/ts/ts/CWL/ParameterValue.d.ts +15 -1
  76. package/dist/ts/ts/CWL/ParameterValue.d.ts.map +1 -1
  77. package/dist/ts/ts/CWL/ParameterValue.js +59 -35
  78. package/dist/ts/ts/CWL/Requirements.d.ts +240 -98
  79. package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -1
  80. package/dist/ts/ts/CWL/Requirements.js +462 -89
  81. package/dist/ts/ts/CWL/ScalarQuoting.d.ts +51 -0
  82. package/dist/ts/ts/CWL/ScalarQuoting.d.ts.map +1 -0
  83. package/dist/ts/ts/CWL/ScalarQuoting.js +250 -0
  84. package/dist/ts/ts/CWL/ToolDescription.d.ts +63 -50
  85. package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -1
  86. package/dist/ts/ts/CWL/ToolDescription.js +34 -13
  87. package/dist/ts/ts/CWL/WorkflowDescription.d.ts +45 -26
  88. package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -1
  89. package/dist/ts/ts/CWL/WorkflowDescription.js +38 -11
  90. package/dist/ts/ts/CWL/WorkflowSteps.d.ts +248 -65
  91. package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -1
  92. package/dist/ts/ts/CWL/WorkflowSteps.js +413 -43
  93. package/dist/ts/ts/CWLRunResolver.d.ts +30 -12
  94. package/dist/ts/ts/CWLRunResolver.d.ts.map +1 -1
  95. package/dist/ts/ts/CWLRunResolver.js +221 -86
  96. package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
  97. package/dist/ts/ts/Contract/ARC.js +13 -14
  98. package/dist/ts/ts/Contract/ArcAssay.d.ts.map +1 -1
  99. package/dist/ts/ts/Contract/ArcAssay.js +4 -4
  100. package/dist/ts/ts/Contract/ArcInvestigation.d.ts.map +1 -1
  101. package/dist/ts/ts/Contract/ArcInvestigation.js +3 -4
  102. package/dist/ts/ts/Contract/ArcRun.d.ts +12 -2
  103. package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
  104. package/dist/ts/ts/Contract/ArcRun.js +47 -20
  105. package/dist/ts/ts/Contract/ArcStudy.d.ts.map +1 -1
  106. package/dist/ts/ts/Contract/ArcStudy.js +4 -4
  107. package/dist/ts/ts/Contract/ArcWorkflow.d.ts +18 -4
  108. package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
  109. package/dist/ts/ts/Contract/ArcWorkflow.js +55 -17
  110. package/dist/ts/ts/Contract/Datamap.d.ts.map +1 -1
  111. package/dist/ts/ts/Contract/Datamap.js +16 -17
  112. package/dist/ts/ts/Contract/Git.js +1 -1
  113. package/dist/ts/ts/Contract/ValidationPackagesConfig.d.ts.map +1 -1
  114. package/dist/ts/ts/Contract/ValidationPackagesConfig.js +4 -5
  115. package/dist/ts/ts/ContractIO/ContractIO.d.ts +7 -0
  116. package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
  117. package/dist/ts/ts/ContractIO/ContractIO.js +95 -18
  118. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -0
  119. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
  120. package/dist/ts/ts/ContractIO/FileSystemHelper.js +12 -5
  121. package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -1
  122. package/dist/ts/ts/Conversion/Assay.js +26 -18
  123. package/dist/ts/ts/Conversion/Basic.d.ts +4 -0
  124. package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -1
  125. package/dist/ts/ts/Conversion/Basic.js +55 -31
  126. package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -1
  127. package/dist/ts/ts/Conversion/ColumnIndex.js +2 -4
  128. package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -1
  129. package/dist/ts/ts/Conversion/DateTime.js +1 -2
  130. package/dist/ts/ts/Conversion/Investigation.d.ts.map +1 -1
  131. package/dist/ts/ts/Conversion/Investigation.js +15 -14
  132. package/dist/ts/ts/Conversion/Person.js +11 -11
  133. package/dist/ts/ts/Conversion/Process.d.ts +4 -2
  134. package/dist/ts/ts/Conversion/Process.d.ts.map +1 -1
  135. package/dist/ts/ts/Conversion/Process.js +134 -97
  136. package/dist/ts/ts/Conversion/Run.d.ts +36 -6
  137. package/dist/ts/ts/Conversion/Run.d.ts.map +1 -1
  138. package/dist/ts/ts/Conversion/Run.js +320 -136
  139. package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -1
  140. package/dist/ts/ts/Conversion/ScholarlyArticle.js +75 -9
  141. package/dist/ts/ts/Conversion/Study.d.ts.map +1 -1
  142. package/dist/ts/ts/Conversion/Study.js +23 -12
  143. package/dist/ts/ts/Conversion/Table.d.ts +3 -2
  144. package/dist/ts/ts/Conversion/Table.d.ts.map +1 -1
  145. package/dist/ts/ts/Conversion/Table.js +8 -8
  146. package/dist/ts/ts/Conversion/Workflow.d.ts +48 -9
  147. package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -1
  148. package/dist/ts/ts/Conversion/Workflow.js +655 -163
  149. package/dist/ts/ts/Conversion.js +6 -6
  150. package/dist/ts/ts/Core/ArcTypes.d.ts +73 -28
  151. package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
  152. package/dist/ts/ts/Core/ArcTypes.js +219 -129
  153. package/dist/ts/ts/Core/Comment.d.ts.map +1 -1
  154. package/dist/ts/ts/Core/Comment.js +2 -2
  155. package/dist/ts/ts/Core/CommentList.js +7 -7
  156. package/dist/ts/ts/Core/Conversion.d.ts.map +1 -1
  157. package/dist/ts/ts/Core/Conversion.js +68 -59
  158. package/dist/ts/ts/Core/Data.d.ts +6 -0
  159. package/dist/ts/ts/Core/Data.d.ts.map +1 -1
  160. package/dist/ts/ts/Core/Data.js +32 -12
  161. package/dist/ts/ts/Core/DataContext.d.ts +1 -1
  162. package/dist/ts/ts/Core/DataContext.d.ts.map +1 -1
  163. package/dist/ts/ts/Core/DataContext.js +4 -4
  164. package/dist/ts/ts/Core/DataFile.d.ts +11 -8
  165. package/dist/ts/ts/Core/DataFile.d.ts.map +1 -1
  166. package/dist/ts/ts/Core/DataFile.js +55 -61
  167. package/dist/ts/ts/Core/Datamap.d.ts.map +1 -1
  168. package/dist/ts/ts/Core/Datamap.js +2 -3
  169. package/dist/ts/ts/Core/Helper/Collections.d.ts.map +1 -1
  170. package/dist/ts/ts/Core/Helper/Collections.js +2 -4
  171. package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
  172. package/dist/ts/ts/Core/Helper/Identifier.js +12 -15
  173. package/dist/ts/ts/Core/Helper/ORCID.d.ts.map +1 -1
  174. package/dist/ts/ts/Core/Helper/ORCID.js +2 -3
  175. package/dist/ts/ts/Core/Helper/Regex.d.ts.map +1 -1
  176. package/dist/ts/ts/Core/Helper/Regex.js +52 -53
  177. package/dist/ts/ts/Core/Helper/SemVer.d.ts +13 -3
  178. package/dist/ts/ts/Core/Helper/SemVer.d.ts.map +1 -1
  179. package/dist/ts/ts/Core/Helper/SemVer.js +96 -6
  180. package/dist/ts/ts/Core/Helper/Url.d.ts.map +1 -1
  181. package/dist/ts/ts/Core/Helper/Url.js +1 -1
  182. package/dist/ts/ts/Core/OntologyAnnotation.js +22 -22
  183. package/dist/ts/ts/Core/Person.d.ts.map +1 -1
  184. package/dist/ts/ts/Core/Person.js +2 -2
  185. package/dist/ts/ts/Core/Process/ColumnIndex.d.ts.map +1 -1
  186. package/dist/ts/ts/Core/Process/ColumnIndex.js +10 -12
  187. package/dist/ts/ts/Core/Process/Component.d.ts.map +1 -1
  188. package/dist/ts/ts/Core/Process/Component.js +22 -22
  189. package/dist/ts/ts/Core/Process/Factor.d.ts.map +1 -1
  190. package/dist/ts/ts/Core/Process/Factor.js +7 -7
  191. package/dist/ts/ts/Core/Process/FactorValue.d.ts.map +1 -1
  192. package/dist/ts/ts/Core/Process/FactorValue.js +15 -15
  193. package/dist/ts/ts/Core/Process/Material.d.ts.map +1 -1
  194. package/dist/ts/ts/Core/Process/Material.js +2 -2
  195. package/dist/ts/ts/Core/Process/MaterialAttribute.d.ts.map +1 -1
  196. package/dist/ts/ts/Core/Process/MaterialAttribute.js +6 -6
  197. package/dist/ts/ts/Core/Process/MaterialAttributeValue.d.ts.map +1 -1
  198. package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +16 -16
  199. package/dist/ts/ts/Core/Process/Process.js +21 -21
  200. package/dist/ts/ts/Core/Process/ProcessInput.d.ts.map +1 -1
  201. package/dist/ts/ts/Core/Process/ProcessInput.js +2 -2
  202. package/dist/ts/ts/Core/Process/ProcessOutput.d.ts.map +1 -1
  203. package/dist/ts/ts/Core/Process/ProcessOutput.js +2 -2
  204. package/dist/ts/ts/Core/Process/ProcessParameterValue.d.ts.map +1 -1
  205. package/dist/ts/ts/Core/Process/ProcessParameterValue.js +17 -17
  206. package/dist/ts/ts/Core/Process/ProcessSequence.js +4 -4
  207. package/dist/ts/ts/Core/Process/Protocol.d.ts.map +1 -1
  208. package/dist/ts/ts/Core/Process/Protocol.js +9 -9
  209. package/dist/ts/ts/Core/Process/ProtocolParameter.d.ts.map +1 -1
  210. package/dist/ts/ts/Core/Process/ProtocolParameter.js +6 -6
  211. package/dist/ts/ts/Core/Publication.d.ts.map +1 -1
  212. package/dist/ts/ts/Core/Publication.js +3 -3
  213. package/dist/ts/ts/Core/ScalarValue.d.ts.map +1 -1
  214. package/dist/ts/ts/Core/ScalarValue.js +9 -13
  215. package/dist/ts/ts/Core/Table/ArcTable.d.ts.map +1 -1
  216. package/dist/ts/ts/Core/Table/ArcTable.js +18 -18
  217. package/dist/ts/ts/Core/Table/ArcTableAux.d.ts +1 -1
  218. package/dist/ts/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
  219. package/dist/ts/ts/Core/Table/ArcTableAux.js +59 -70
  220. package/dist/ts/ts/Core/Table/ArcTables.js +16 -16
  221. package/dist/ts/ts/Core/Table/CompositeCell.d.ts +4 -0
  222. package/dist/ts/ts/Core/Table/CompositeCell.d.ts.map +1 -1
  223. package/dist/ts/ts/Core/Table/CompositeCell.js +39 -2
  224. package/dist/ts/ts/Core/Table/CompositeHeader.d.ts.map +1 -1
  225. package/dist/ts/ts/Core/Table/CompositeHeader.js +5 -6
  226. package/dist/ts/ts/Core/Templates.d.ts.map +1 -1
  227. package/dist/ts/ts/Core/Templates.js +2 -2
  228. package/dist/ts/ts/FileSystem/Path.d.ts +13 -2
  229. package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
  230. package/dist/ts/ts/FileSystem/Path.js +37 -19
  231. package/dist/ts/ts/Json/Assay.js +22 -22
  232. package/dist/ts/ts/Json/Comment.js +9 -9
  233. package/dist/ts/ts/Json/Data.d.ts.map +1 -1
  234. package/dist/ts/ts/Json/Data.js +11 -11
  235. package/dist/ts/ts/Json/Datamap/DataContext.js +2 -2
  236. package/dist/ts/ts/Json/Decode.d.ts.map +1 -1
  237. package/dist/ts/ts/Json/Decode.js +3 -5
  238. package/dist/ts/ts/Json/Encode.js +2 -2
  239. package/dist/ts/ts/Json/Investigation.d.ts.map +1 -1
  240. package/dist/ts/ts/Json/Investigation.js +20 -20
  241. package/dist/ts/ts/Json/OntologyAnnotation.d.ts.map +1 -1
  242. package/dist/ts/ts/Json/OntologyAnnotation.js +18 -18
  243. package/dist/ts/ts/Json/OntologySourceReference.d.ts.map +1 -1
  244. package/dist/ts/ts/Json/OntologySourceReference.js +9 -9
  245. package/dist/ts/ts/Json/Person.d.ts.map +1 -1
  246. package/dist/ts/ts/Json/Person.js +20 -20
  247. package/dist/ts/ts/Json/Process/AssayMaterials.d.ts.map +1 -1
  248. package/dist/ts/ts/Json/Process/AssayMaterials.js +1 -2
  249. package/dist/ts/ts/Json/Process/Component.d.ts.map +1 -1
  250. package/dist/ts/ts/Json/Process/Component.js +5 -6
  251. package/dist/ts/ts/Json/Process/Factor.d.ts.map +1 -1
  252. package/dist/ts/ts/Json/Process/Factor.js +7 -7
  253. package/dist/ts/ts/Json/Process/FactorValue.d.ts.map +1 -1
  254. package/dist/ts/ts/Json/Process/FactorValue.js +2 -3
  255. package/dist/ts/ts/Json/Process/Material.d.ts.map +1 -1
  256. package/dist/ts/ts/Json/Process/Material.js +9 -10
  257. package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts.map +1 -1
  258. package/dist/ts/ts/Json/Process/MaterialAttribute.js +5 -6
  259. package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts.map +1 -1
  260. package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +2 -3
  261. package/dist/ts/ts/Json/Process/Process.d.ts.map +1 -1
  262. package/dist/ts/ts/Json/Process/Process.js +8 -9
  263. package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts.map +1 -1
  264. package/dist/ts/ts/Json/Process/ProcessParameterValue.js +1 -2
  265. package/dist/ts/ts/Json/Process/Protocol.d.ts.map +1 -1
  266. package/dist/ts/ts/Json/Process/Protocol.js +17 -17
  267. package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts.map +1 -1
  268. package/dist/ts/ts/Json/Process/ProtocolParameter.js +6 -6
  269. package/dist/ts/ts/Json/Process/Sample.d.ts.map +1 -1
  270. package/dist/ts/ts/Json/Process/Sample.js +9 -9
  271. package/dist/ts/ts/Json/Process/Source.d.ts.map +1 -1
  272. package/dist/ts/ts/Json/Process/Source.js +10 -11
  273. package/dist/ts/ts/Json/Process/StudyMaterials.d.ts.map +1 -1
  274. package/dist/ts/ts/Json/Process/StudyMaterials.js +1 -2
  275. package/dist/ts/ts/Json/PropertyValue.d.ts.map +1 -1
  276. package/dist/ts/ts/Json/PropertyValue.js +24 -24
  277. package/dist/ts/ts/Json/Publication.d.ts.map +1 -1
  278. package/dist/ts/ts/Json/Publication.js +10 -10
  279. package/dist/ts/ts/Json/ROCrate/LDContext.js +1 -2
  280. package/dist/ts/ts/Json/ROCrate/LDGraph.js +2 -2
  281. package/dist/ts/ts/Json/ROCrate/LDNode.js +5 -5
  282. package/dist/ts/ts/Json/Run.js +9 -9
  283. package/dist/ts/ts/Json/StringTable.d.ts.map +1 -1
  284. package/dist/ts/ts/Json/StringTable.js +4 -7
  285. package/dist/ts/ts/Json/Study.js +20 -20
  286. package/dist/ts/ts/Json/Table/CellTable.js +1 -2
  287. package/dist/ts/ts/Json/Table/OATable.js +1 -2
  288. package/dist/ts/ts/Json/Workflow.js +9 -9
  289. package/dist/ts/ts/Json.d.ts +121 -1
  290. package/dist/ts/ts/Json.d.ts.map +1 -1
  291. package/dist/ts/ts/Json.js +310 -2
  292. package/dist/ts/ts/JsonIO/Comment.d.ts +15 -0
  293. package/dist/ts/ts/JsonIO/Comment.d.ts.map +1 -0
  294. package/dist/ts/ts/JsonIO/Comment.js +67 -0
  295. package/dist/ts/ts/JsonIO/Data.d.ts +9 -0
  296. package/dist/ts/ts/JsonIO/Data.d.ts.map +1 -0
  297. package/dist/ts/ts/JsonIO/Data.js +49 -0
  298. package/dist/ts/ts/JsonIO/DataFile.d.ts +9 -0
  299. package/dist/ts/ts/JsonIO/DataFile.d.ts.map +1 -0
  300. package/dist/ts/ts/JsonIO/DataFile.js +48 -0
  301. package/dist/ts/ts/JsonIO/LDObject.d.ts +6 -0
  302. package/dist/ts/ts/JsonIO/LDObject.d.ts.map +1 -1
  303. package/dist/ts/ts/JsonIO/LDObject.js +173 -17
  304. package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts +15 -0
  305. package/dist/ts/ts/JsonIO/OntologySourceReference.d.ts.map +1 -0
  306. package/dist/ts/ts/JsonIO/OntologySourceReference.js +67 -0
  307. package/dist/ts/ts/JsonIO/Publication.d.ts +15 -0
  308. package/dist/ts/ts/JsonIO/Publication.d.ts.map +1 -0
  309. package/dist/ts/ts/JsonIO/Publication.js +68 -0
  310. package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts +9 -0
  311. package/dist/ts/ts/JsonIO/Table/ArcTable.d.ts.map +1 -0
  312. package/dist/ts/ts/JsonIO/Table/ArcTable.js +74 -0
  313. package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts +6 -0
  314. package/dist/ts/ts/JsonIO/Table/CompositeCell.d.ts.map +1 -0
  315. package/dist/ts/ts/JsonIO/Table/CompositeCell.js +29 -0
  316. package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts +6 -0
  317. package/dist/ts/ts/JsonIO/Table/CompositeHeader.d.ts.map +1 -0
  318. package/dist/ts/ts/JsonIO/Table/CompositeHeader.js +29 -0
  319. package/dist/ts/ts/JsonIO/Table/IOType.d.ts +6 -0
  320. package/dist/ts/ts/JsonIO/Table/IOType.d.ts.map +1 -0
  321. package/dist/ts/ts/JsonIO/Table/IOType.js +29 -0
  322. package/dist/ts/ts/License.d.ts.map +1 -1
  323. package/dist/ts/ts/License.js +6 -6
  324. package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
  325. package/dist/ts/ts/ROCrate/LDContext.js +31 -39
  326. package/dist/ts/ts/ROCrate/LDObject.d.ts.map +1 -1
  327. package/dist/ts/ts/ROCrate/LDObject.js +56 -49
  328. package/dist/ts/ts/ROCrate/LDTypes/Comment.js +2 -2
  329. package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +3 -3
  330. package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +2 -2
  331. package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +5 -5
  332. package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts +1 -0
  333. package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.d.ts.map +1 -1
  334. package/dist/ts/ts/ROCrate/LDTypes/CreativeWork.js +3 -0
  335. package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -1
  336. package/dist/ts/ts/ROCrate/LDTypes/Dataset.js +22 -17
  337. package/dist/ts/ts/ROCrate/LDTypes/DefinedTerm.js +2 -2
  338. package/dist/ts/ts/ROCrate/LDTypes/File.js +5 -5
  339. package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +2 -2
  340. package/dist/ts/ts/ROCrate/LDTypes/LabProcess.js +9 -9
  341. package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.js +4 -4
  342. package/dist/ts/ts/ROCrate/LDTypes/Organization.js +1 -1
  343. package/dist/ts/ts/ROCrate/LDTypes/Person.js +7 -7
  344. package/dist/ts/ts/ROCrate/LDTypes/PostalAddress.js +1 -1
  345. package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -1
  346. package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.js +45 -48
  347. package/dist/ts/ts/ROCrate/LDTypes/Sample.js +3 -3
  348. package/dist/ts/ts/ROCrate/LDTypes/ScholarlyArticle.js +4 -4
  349. package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +3 -3
  350. package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +3 -3
  351. package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +2 -2
  352. package/dist/ts/ts/ROCrateIO.d.ts +18 -4
  353. package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
  354. package/dist/ts/ts/ROCrateIO.js +49 -38
  355. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  356. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +9 -10
  357. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.d.ts.map +1 -1
  358. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +7 -7
  359. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  360. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +6 -8
  361. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +20 -20
  362. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
  363. package/dist/ts/ts/Spreadsheet/ArcAssay.js +7 -7
  364. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  365. package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +10 -12
  366. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
  367. package/dist/ts/ts/Spreadsheet/ArcRun.js +5 -6
  368. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
  369. package/dist/ts/ts/Spreadsheet/ArcStudy.js +3 -3
  370. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
  371. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +5 -6
  372. package/dist/ts/ts/Spreadsheet/CollectionAux.d.ts.map +1 -1
  373. package/dist/ts/ts/Spreadsheet/CollectionAux.js +10 -14
  374. package/dist/ts/ts/Spreadsheet/Datamap.js +1 -2
  375. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapColumn.js +3 -3
  376. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapHeader.js +10 -10
  377. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.d.ts.map +1 -1
  378. package/dist/ts/ts/Spreadsheet/DatamapTable/DatamapTable.js +9 -10
  379. package/dist/ts/ts/Spreadsheet/Metadata/Assays.d.ts.map +1 -1
  380. package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +8 -10
  381. package/dist/ts/ts/Spreadsheet/Metadata/Comment.d.ts +8 -0
  382. package/dist/ts/ts/Spreadsheet/Metadata/Comment.d.ts.map +1 -1
  383. package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +18 -7
  384. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.d.ts.map +1 -1
  385. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +4 -6
  386. package/dist/ts/ts/Spreadsheet/Metadata/Factors.d.ts.map +1 -1
  387. package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +6 -8
  388. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.d.ts.map +1 -1
  389. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +5 -7
  390. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.d.ts.map +1 -1
  391. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +2 -4
  392. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.d.ts.map +1 -1
  393. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +7 -9
  394. package/dist/ts/ts/Spreadsheet/Metadata/Publication.d.ts.map +1 -1
  395. package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +6 -8
  396. package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts +1 -1
  397. package/dist/ts/ts/Spreadsheet/Metadata/Run.d.ts.map +1 -1
  398. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +9 -11
  399. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  400. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +17 -17
  401. package/dist/ts/ts/Spreadsheet/Metadata/Study.d.ts.map +1 -1
  402. package/dist/ts/ts/Spreadsheet/Metadata/Study.js +10 -12
  403. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
  404. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +7 -9
  405. package/dist/ts/ts/WorkflowGraph/Adapters.d.ts +1 -1
  406. package/dist/ts/ts/WorkflowGraph/Adapters.d.ts.map +1 -1
  407. package/dist/ts/ts/WorkflowGraph/Adapters.js +5 -6
  408. package/dist/ts/ts/WorkflowGraph/Builder.d.ts +25 -6
  409. package/dist/ts/ts/WorkflowGraph/Builder.d.ts.map +1 -1
  410. package/dist/ts/ts/WorkflowGraph/Builder.js +264 -138
  411. package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts +6 -0
  412. package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts.map +1 -1
  413. package/dist/ts/ts/WorkflowGraph/GraphTypes.js +4 -1
  414. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts +8 -5
  415. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts.map +1 -1
  416. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.js +27 -10
  417. package/dist/ts/ts/Xlsx.js +3 -3
  418. package/dist/ts/ts/Yaml/ValidationPackage.d.ts +3 -3
  419. package/dist/ts/ts/Yaml/ValidationPackage.d.ts.map +1 -1
  420. package/dist/ts/ts/Yaml/ValidationPackage.js +11 -23
  421. package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +3 -3
  422. package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts.map +1 -1
  423. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +11 -23
  424. package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/DynamicObj.fs.js +16 -20
  425. package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/FableJS.fs.js +1 -1
  426. package/dist/ts/ts/fable_modules/DynamicObj.8.0.0/ReflectionUtils.fs.js +8 -8
  427. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +1 -2
  428. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.6.0/Http.fs.js +4 -4
  429. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCell.fs.js +8 -8
  430. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Cells/FsCellsCollection.fs.js +18 -18
  431. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsAddress.fs.js +3 -3
  432. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorkbook.fs.js +1 -1
  433. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/FsWorksheet.fs.js +7 -7
  434. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Value.fs.js +3 -5
  435. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Json/Worksheet.fs.js +7 -7
  436. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Ranges/FsRangeBase.fs.js +1 -2
  437. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.1/Tables/FsTable.fs.js +7 -7
  438. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Cell.fs.js +2 -2
  439. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.1/Table.fs.js +1 -2
  440. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Decode.fs.js +49 -71
  441. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.9.1/Encode.fs.js +1 -1
  442. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.5.0/Decode.fs.js +1 -2
  443. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Compare.fs.js +857 -0
  444. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/CoreSchema.fs.js +725 -0
  445. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Decode.fs.js +1175 -0
  446. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Encode.fs.js +123 -0
  447. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Layout.fs.js +282 -0
  448. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexeme.fs.js +203 -0
  449. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Lexer.fs.js +1502 -0
  450. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Model.fs.js +564 -0
  451. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Node.fs.js +453 -0
  452. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Parser.fs.js +2622 -0
  453. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Reader.fs.js +108 -0
  454. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Source.fs.js +649 -0
  455. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Tag.fs.js +32 -0
  456. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Validate.fs.js +1084 -0
  457. package/dist/ts/ts/fable_modules/YAMLicious.2.0.0/Writer.fs.js +2927 -0
  458. package/package.json +5 -4
  459. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Decode.fs.js +0 -1669
  460. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Encode.fs.js +0 -57
  461. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Escapes.fs.js +0 -320
  462. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Interop/JsInterop.fs.js +0 -10
  463. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Persil.fs.js +0 -414
  464. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Preprocessing.fs.js +0 -319
  465. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Reader.fs.js +0 -1884
  466. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Regex.fs.js +0 -23
  467. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/RegexActivePatterns.fs.js +0 -313
  468. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Syntax.fs.js +0 -840
  469. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/Writer.fs.js +0 -689
  470. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0/YAMLiciousTypes.fs.js +0 -359
@@ -1,7 +1,7 @@
1
1
  import { protectedBind, CancellationToken, protectedCont, protectedReturn, OperationCanceledException, Trampoline } from './AsyncBuilder.js';
2
2
  import { Choice_makeChoice2Of2, Choice_makeChoice1Of2 } from './Choice.js';
3
- import { TimeoutException_$ctor } from './System.js';
4
- import { Exception } from './Util.js';
3
+ import { TimeoutException_$ctor, InvalidOperationException_$ctor_Z721C83C5, ArgumentException_$ctor_Z384F8060 } from './System.js';
4
+ import { Exception, ensureErrorOrException } from './Util.js';
5
5
 
6
6
  function emptyContinuation(_x) {
7
7
  }
@@ -42,27 +42,49 @@ function throwIfCancellationRequested(token) {
42
42
  throw new Exception("Operation is cancelled");
43
43
  }
44
44
  }
45
+ function createLinkedToken(parent) {
46
+ const token = new CancellationToken();
47
+ const id = parent.addListener(() => token.cancel());
48
+ return [token, () => {
49
+ parent.removeListener(id);
50
+ }];
51
+ }
45
52
  function startChild(computation, ms) {
46
53
  return protectedCont((ctx) => {
47
- const promise = startAsPromise(computation, ctx.cancelToken);
48
- let promiseToRun = promise;
49
- if (ms) {
50
- promiseToRun = new Promise((resolve, reject) => {
51
- const timeoutId = setTimeout(() => reject(TimeoutException_$ctor()), ms);
52
- promise.then(
53
- (value) => {
54
- clearTimeout(timeoutId);
55
- resolve(value);
56
- },
57
- (error) => {
58
- clearTimeout(timeoutId);
54
+ const timeout = ms == null || ms === -1 ? void 0 : ms;
55
+ const [childToken, unlink] = timeout === void 0 ? [ctx.cancelToken, () => {
56
+ }] : createLinkedToken(ctx.cancelToken);
57
+ const promise = startAsPromise(computation, childToken);
58
+ let settled = false;
59
+ const onSettled = () => {
60
+ settled = true;
61
+ unlink();
62
+ };
63
+ promise.then(onSettled, onSettled);
64
+ const awaitResult = () => timeout === void 0 || settled ? promise : new Promise((resolve, reject) => {
65
+ const timeoutId = setTimeout(() => {
66
+ if (timeout !== 0) {
67
+ try {
68
+ childToken.cancel();
69
+ } catch (error) {
59
70
  reject(error);
71
+ return;
60
72
  }
61
- );
62
- });
63
- }
64
- promiseToRun.catch(emptyContinuation);
65
- protectedReturn(awaitPromise(promiseToRun))(ctx);
73
+ }
74
+ reject(TimeoutException_$ctor());
75
+ }, timeout);
76
+ promise.then(
77
+ (value) => {
78
+ clearTimeout(timeoutId);
79
+ resolve(value);
80
+ },
81
+ (error) => {
82
+ clearTimeout(timeoutId);
83
+ reject(error);
84
+ }
85
+ );
86
+ });
87
+ protectedReturn(protectedCont((awaitCtx) => awaitPromise(awaitResult())(awaitCtx)))(ctx);
66
88
  });
67
89
  }
68
90
  function awaitPromise(p) {
@@ -83,6 +105,9 @@ function awaitEvent(event, cancelAction) {
83
105
  }
84
106
  ctx.onCancel(new OperationCanceledException());
85
107
  });
108
+ if (ctx.cancelToken.isCancelled) {
109
+ return;
110
+ }
86
111
  event.AddHandler(handler);
87
112
  });
88
113
  }
@@ -101,14 +126,194 @@ function catchAsync(work) {
101
126
  });
102
127
  });
103
128
  }
129
+ function tryCancelled(computation, compensation) {
130
+ return (ctx) => {
131
+ computation({
132
+ ...ctx,
133
+ onCancel: (error) => {
134
+ try {
135
+ compensation(error);
136
+ } catch {
137
+ }
138
+ if (ctx.trampoline.incrementAndCheck()) {
139
+ ctx.trampoline.hijack(() => ctx.onCancel(error));
140
+ } else {
141
+ ctx.onCancel(error);
142
+ }
143
+ }
144
+ });
145
+ };
146
+ }
104
147
  function fromContinuations(f) {
105
- return protectedCont((ctx) => f([ctx.onSuccess, ctx.onError, ctx.onCancel]));
148
+ return (ctx) => {
149
+ let settled = false;
150
+ const claim = () => {
151
+ if (settled) {
152
+ throw InvalidOperationException_$ctor_Z721C83C5("A continuation was invoked more than once");
153
+ }
154
+ settled = true;
155
+ };
156
+ const success = (x) => {
157
+ claim();
158
+ ctx.onSuccess(x);
159
+ };
160
+ const error = (x) => {
161
+ claim();
162
+ ctx.onError(x);
163
+ };
164
+ const cancelled = (x) => {
165
+ claim();
166
+ ctx.onCancel(x);
167
+ };
168
+ protectedCont(() => f([success, error, cancelled]))({
169
+ onSuccess: success,
170
+ onError: (x) => {
171
+ if (settled) {
172
+ throw x;
173
+ }
174
+ error(x);
175
+ },
176
+ onCancel: cancelled,
177
+ cancelToken: ctx.cancelToken,
178
+ trampoline: ctx.trampoline
179
+ });
180
+ };
106
181
  }
107
182
  function ignore(computation) {
108
183
  return protectedBind(computation, (_x) => protectedReturn(void 0));
109
184
  }
110
- function parallel(computations) {
111
- return protectedCont((ctx) => awaitPromise(Promise.all(Array.from(computations, (w) => startAsPromise(w, ctx.cancelToken))))(ctx));
185
+ function parallel(computations, maxDegreeOfParallelism) {
186
+ if (maxDegreeOfParallelism != null && maxDegreeOfParallelism < 1) {
187
+ throw ArgumentException_$ctor_Z384F8060(
188
+ `maxDegreeOfParallelism must be positive, was ${maxDegreeOfParallelism}`,
189
+ "maxDegreeOfParallelism"
190
+ );
191
+ }
192
+ return protectedCont((ctx) => awaitPromise(runParallel(Array.from(computations), maxDegreeOfParallelism, ctx.cancelToken))(ctx));
193
+ }
194
+ function runParallel(computations, limit, parentToken) {
195
+ return new Promise((resolve, reject) => {
196
+ const count = computations.length;
197
+ const results = new Array(count);
198
+ const [token, unlink] = createLinkedToken(parentToken);
199
+ let next = 0;
200
+ let running = 0;
201
+ let failed = false;
202
+ let failure;
203
+ const startNext = () => {
204
+ const i = next++;
205
+ running++;
206
+ startAsPromise(computations[i], token).then(
207
+ (x) => {
208
+ results[i] = x;
209
+ },
210
+ (err) => {
211
+ if (!failed) {
212
+ failed = true;
213
+ failure = err;
214
+ try {
215
+ token.cancel();
216
+ } catch (error) {
217
+ failure = error;
218
+ }
219
+ }
220
+ }
221
+ ).then(() => {
222
+ running--;
223
+ if (!failed && next < count) {
224
+ startNext();
225
+ } else if (running === 0) {
226
+ unlink();
227
+ if (failed) {
228
+ reject(failure);
229
+ } else {
230
+ resolve(results);
231
+ }
232
+ }
233
+ });
234
+ };
235
+ if (count === 0) {
236
+ unlink();
237
+ resolve(results);
238
+ }
239
+ const initial = Math.min(limit ?? count, count);
240
+ while (next < initial) {
241
+ startNext();
242
+ }
243
+ });
244
+ }
245
+ function choice(computations) {
246
+ return protectedCont((ctx) => {
247
+ const works = Array.from(computations);
248
+ let remaining = works.length;
249
+ if (remaining === 0) {
250
+ ctx.onSuccess(void 0);
251
+ return;
252
+ }
253
+ const [token, unlink] = createLinkedToken(ctx.cancelToken);
254
+ let done = false;
255
+ const finish = (report) => {
256
+ if (done) {
257
+ return;
258
+ }
259
+ done = true;
260
+ unlink();
261
+ try {
262
+ token.cancel();
263
+ } catch (error) {
264
+ ctx.onError(ensureErrorOrException(error));
265
+ return;
266
+ }
267
+ report();
268
+ };
269
+ for (const work of works) {
270
+ startWithContinuations(
271
+ work,
272
+ (x) => {
273
+ if (x != null) {
274
+ finish(() => ctx.onSuccess(x));
275
+ } else if (--remaining === 0) {
276
+ finish(() => ctx.onSuccess(void 0));
277
+ }
278
+ },
279
+ (err) => finish(() => ctx.onError(err)),
280
+ (err) => finish(() => ctx.onCancel(err)),
281
+ token
282
+ );
283
+ if (done) {
284
+ break;
285
+ }
286
+ }
287
+ });
288
+ }
289
+ function onCancel(interruption) {
290
+ return protectedCont((ctx) => {
291
+ const token = ctx.cancelToken;
292
+ let interrupted = false;
293
+ const interrupt = () => {
294
+ if (!interrupted) {
295
+ interrupted = true;
296
+ try {
297
+ interruption();
298
+ } catch {
299
+ }
300
+ }
301
+ };
302
+ const id = token.addListener(interrupt);
303
+ let disposed = false;
304
+ ctx.onSuccess({
305
+ Dispose() {
306
+ if (disposed) {
307
+ return;
308
+ }
309
+ disposed = true;
310
+ token.removeListener(id);
311
+ if (token.isCancelled) {
312
+ interrupt();
313
+ }
314
+ }
315
+ });
316
+ });
112
317
  }
113
318
  function sequential(computations) {
114
319
  function _sequential(computations2, cancelToken) {
@@ -122,15 +327,25 @@ function sequential(computations) {
122
327
  }
123
328
  function sleep(millisecondsDueTime) {
124
329
  return protectedCont((ctx) => {
330
+ let completed = false;
125
331
  let tokenId;
126
- const timeoutId = setTimeout(() => {
127
- ctx.cancelToken.removeListener(tokenId);
128
- ctx.onSuccess(void 0);
129
- }, millisecondsDueTime);
130
- tokenId = ctx.cancelToken.addListener(() => {
332
+ const settle = (cancelled) => {
333
+ if (completed) {
334
+ return;
335
+ }
336
+ completed = true;
131
337
  clearTimeout(timeoutId);
132
- ctx.onCancel(new OperationCanceledException());
133
- });
338
+ if (tokenId !== void 0) {
339
+ ctx.cancelToken.removeListener(tokenId);
340
+ }
341
+ if (cancelled) {
342
+ ctx.onCancel(new OperationCanceledException());
343
+ } else {
344
+ ctx.onSuccess(void 0);
345
+ }
346
+ };
347
+ const timeoutId = setTimeout(() => settle(false), millisecondsDueTime);
348
+ tokenId = ctx.cancelToken.addListener(() => settle(true));
134
349
  });
135
350
  }
136
351
  function start(computation, cancellationToken2) {
@@ -170,5 +385,11 @@ function startAsPromise(computation, cancellationToken2) {
170
385
  cancellationToken2 ? cancellationToken2 : defaultCancellationToken
171
386
  ));
172
387
  }
388
+ function startAsTask(computation, _taskCreationOptions, cancellationToken2) {
389
+ return startAsPromise(computation, cancellationToken2);
390
+ }
391
+ function startImmediateAsTask(computation, cancellationToken2) {
392
+ return startAsPromise(computation, cancellationToken2);
393
+ }
173
394
 
174
- export { awaitEvent, awaitPromise, bind, callThenInvoke, cancel, cancelAfter, cancellationToken, catchAsync, createCancellationToken, defaultCancellationToken, fromContinuations, ignore, invoke, isCancellationRequested, makeAsync, parallel, sequential, sleep, start, startAsPromise, startChild, startImmediate, startWithContinuations, throwIfCancellationRequested };
395
+ export { awaitEvent, awaitPromise, bind, callThenInvoke, cancel, cancelAfter, cancellationToken, catchAsync, choice, createCancellationToken, defaultCancellationToken, fromContinuations, ignore, invoke, isCancellationRequested, makeAsync, onCancel, parallel, sequential, sleep, start, startAsPromise, startAsTask, startChild, startImmediate, startImmediateAsTask, startWithContinuations, throwIfCancellationRequested, tryCancelled };
@@ -1,5 +1,11 @@
1
1
  import { Exception, ensureErrorOrException } from './Util.js';
2
2
 
3
+ class CancellationCallbackError extends Exception {
4
+ constructor(errors) {
5
+ super("Cancellation callbacks failed", errors[0]);
6
+ this.errors = errors;
7
+ }
8
+ }
3
9
  class CancellationToken {
4
10
  constructor(cancelled = false) {
5
11
  this._id = 0;
@@ -12,14 +18,32 @@ class CancellationToken {
12
18
  cancel() {
13
19
  if (!this._cancelled) {
14
20
  this._cancelled = true;
15
- for (const [, listener] of this._listeners) {
16
- listener();
21
+ const pending = Array.from(this._listeners.keys()).reverse();
22
+ const errors = [];
23
+ for (const id of pending) {
24
+ const listener = this._listeners.get(id);
25
+ this._listeners.delete(id);
26
+ if (listener) {
27
+ try {
28
+ listener();
29
+ } catch (error) {
30
+ errors.push(error);
31
+ }
32
+ }
33
+ }
34
+ if (errors.length > 0) {
35
+ throw new CancellationCallbackError(errors);
17
36
  }
18
37
  }
19
38
  }
20
39
  addListener(f) {
21
40
  const id = this._id;
22
- this._listeners.set(this._id++, f);
41
+ this._id++;
42
+ if (this._cancelled) {
43
+ f();
44
+ } else {
45
+ this._listeners.set(id, f);
46
+ }
23
47
  return id;
24
48
  }
25
49
  removeListener(id) {
@@ -132,24 +156,50 @@ class AsyncBuilder {
132
156
  return computation;
133
157
  }
134
158
  TryFinally(computation, compensation) {
135
- return protectedCont((ctx) => {
136
- computation({
159
+ return (ctx) => {
160
+ let settled = false;
161
+ protectedCont(computation)({
137
162
  onSuccess: (x) => {
138
- compensation();
163
+ if (settled) {
164
+ return;
165
+ }
166
+ settled = true;
167
+ try {
168
+ compensation();
169
+ } catch (error) {
170
+ ctx.onError(ensureErrorOrException(error));
171
+ return;
172
+ }
139
173
  ctx.onSuccess(x);
140
174
  },
141
175
  onError: (x) => {
142
- compensation();
176
+ if (settled) {
177
+ throw x;
178
+ }
179
+ settled = true;
180
+ try {
181
+ compensation();
182
+ } catch (error) {
183
+ ctx.onError(ensureErrorOrException(error));
184
+ return;
185
+ }
143
186
  ctx.onError(x);
144
187
  },
145
188
  onCancel: (x) => {
146
- compensation();
189
+ if (settled) {
190
+ return;
191
+ }
192
+ settled = true;
193
+ try {
194
+ compensation();
195
+ } catch {
196
+ }
147
197
  ctx.onCancel(x);
148
198
  },
149
199
  cancelToken: ctx.cancelToken,
150
200
  trampoline: ctx.trampoline
151
201
  });
152
- });
202
+ };
153
203
  }
154
204
  TryWith(computation, catchHandler) {
155
205
  return protectedCont((ctx) => {
@@ -172,7 +222,7 @@ class AsyncBuilder {
172
222
  });
173
223
  }
174
224
  Using(resource, binder) {
175
- return this.TryFinally(binder(resource), () => resource.Dispose());
225
+ return this.TryFinally(this.Delay(() => binder(resource)), () => resource.Dispose());
176
226
  }
177
227
  While(guard, computation) {
178
228
  if (guard()) {
@@ -187,4 +237,4 @@ class AsyncBuilder {
187
237
  }
188
238
  const singleton = new AsyncBuilder();
189
239
 
190
- export { AsyncBuilder, CancellationToken, OperationCanceledException, Trampoline, protectedBind, protectedCont, protectedReturn, singleton };
240
+ export { AsyncBuilder, CancellationCallbackError, CancellationToken, OperationCanceledException, Trampoline, protectedBind, protectedCont, protectedReturn, singleton };
@@ -1,5 +1,7 @@
1
+ import { FSharpRef } from './Types.js';
1
2
  import { truncate, fromParts } from './Decimal.js';
2
3
  import { bigintHash, Exception } from './Util.js';
4
+ import { ArgumentNullException_$ctor_Z721C83C5, FormatException_$ctor_Z721C83C5 } from './System.js';
3
5
 
4
6
  const isBigEndian = false;
5
7
  BigInt.prototype.toJSON = function() {
@@ -344,16 +346,24 @@ function toChar(x) {
344
346
  function toString(x) {
345
347
  return x.toString();
346
348
  }
349
+ const integerRegex = /^[\t-\r ]*([+-]?\d+)[\t-\r ]*\0*$/;
347
350
  function tryParse(s, res) {
348
- try {
349
- res.contents = BigInt(s);
351
+ const m = s == null ? null : integerRegex.exec(s);
352
+ if (m != null) {
353
+ res.contents = BigInt(m[1]);
350
354
  return true;
351
- } catch (err) {
352
- return false;
353
355
  }
356
+ return false;
354
357
  }
355
358
  function parse(s) {
356
- return BigInt(s);
359
+ const res = new FSharpRef(zero);
360
+ if (tryParse(s, res)) {
361
+ return res.contents;
362
+ } else if (s == null) {
363
+ throw ArgumentNullException_$ctor_Z721C83C5("value");
364
+ } else {
365
+ throw FormatException_$ctor_Z721C83C5("The value could not be parsed.");
366
+ }
357
367
  }
358
368
  function pow(x, n) {
359
369
  return x ** BigInt(n);
@@ -0,0 +1,139 @@
1
+ const littleEndian = true;
2
+ function isLittleEndian() {
3
+ return littleEndian;
4
+ }
5
+ function getBytesBoolean(value) {
6
+ const bytes = new Uint8Array(1);
7
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
8
+ view.setUint8(0, value ? 1 : 0);
9
+ return bytes;
10
+ }
11
+ function getBytesChar(value) {
12
+ const bytes = new Uint8Array(2);
13
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
14
+ view.setUint16(0, value.charCodeAt(0), littleEndian);
15
+ return bytes;
16
+ }
17
+ function getBytesInt16(value) {
18
+ const bytes = new Uint8Array(2);
19
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
20
+ view.setInt16(0, value, littleEndian);
21
+ return bytes;
22
+ }
23
+ function getBytesInt32(value) {
24
+ const bytes = new Uint8Array(4);
25
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
26
+ view.setInt32(0, value, littleEndian);
27
+ return bytes;
28
+ }
29
+ function getBytesInt64(value) {
30
+ const bytes = new Uint8Array(8);
31
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
32
+ view.setBigInt64(0, value, littleEndian);
33
+ return bytes;
34
+ }
35
+ function getBytesUInt16(value) {
36
+ const bytes = new Uint8Array(2);
37
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
38
+ view.setUint16(0, value, littleEndian);
39
+ return bytes;
40
+ }
41
+ function getBytesUInt32(value) {
42
+ const bytes = new Uint8Array(4);
43
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
44
+ view.setUint32(0, value, littleEndian);
45
+ return bytes;
46
+ }
47
+ function getBytesUInt64(value) {
48
+ const bytes = new Uint8Array(8);
49
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
50
+ view.setBigUint64(0, value, littleEndian);
51
+ return bytes;
52
+ }
53
+ function getBytesSingle(value) {
54
+ const bytes = new Uint8Array(4);
55
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
56
+ view.setFloat32(0, value, littleEndian);
57
+ return bytes;
58
+ }
59
+ function getBytesDouble(value) {
60
+ const bytes = new Uint8Array(8);
61
+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
62
+ view.setFloat64(0, value, littleEndian);
63
+ return bytes;
64
+ }
65
+ function int64BitsToDouble(value) {
66
+ const buffer = new ArrayBuffer(8);
67
+ const view = new DataView(buffer);
68
+ view.setBigInt64(0, value, littleEndian);
69
+ return view.getFloat64(0, littleEndian);
70
+ }
71
+ function doubleToInt64Bits(value) {
72
+ const buffer = new ArrayBuffer(8);
73
+ const view = new DataView(buffer);
74
+ view.setFloat64(0, value, littleEndian);
75
+ return view.getBigInt64(0, littleEndian);
76
+ }
77
+ function toBoolean(bytes, offset) {
78
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
79
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
80
+ return view.getUint8(offset) !== 0;
81
+ }
82
+ function toChar(bytes, offset) {
83
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
84
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
85
+ const code = view.getUint16(offset, littleEndian);
86
+ return String.fromCharCode(code);
87
+ }
88
+ function toInt16(bytes, offset) {
89
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
90
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
91
+ return view.getInt16(offset, littleEndian);
92
+ }
93
+ function toInt32(bytes, offset) {
94
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
95
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
96
+ return view.getInt32(offset, littleEndian);
97
+ }
98
+ function toInt64(bytes, offset) {
99
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
100
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
101
+ return view.getBigInt64(offset, littleEndian);
102
+ }
103
+ function toUInt16(bytes, offset) {
104
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
105
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
106
+ return view.getUint16(offset, littleEndian);
107
+ }
108
+ function toUInt32(bytes, offset) {
109
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
110
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
111
+ return view.getUint32(offset, littleEndian);
112
+ }
113
+ function toUInt64(bytes, offset) {
114
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
115
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
116
+ return view.getBigUint64(offset, littleEndian);
117
+ }
118
+ function toSingle(bytes, offset) {
119
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
120
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
121
+ return view.getFloat32(offset, littleEndian);
122
+ }
123
+ function toDouble(bytes, offset) {
124
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
125
+ const view = new DataView(array.buffer, array.byteOffset, array.byteLength);
126
+ return view.getFloat64(offset, littleEndian);
127
+ }
128
+ function toString(bytes, offset, count) {
129
+ const array = ArrayBuffer.isView(bytes) ? bytes : Uint8Array.from(bytes);
130
+ let buffer = new Uint8Array(array.buffer, array.byteOffset, array.byteLength);
131
+ if (offset != null && count != null) {
132
+ buffer = buffer.subarray(offset, offset + count);
133
+ } else if (offset != null) {
134
+ buffer = buffer.subarray(offset);
135
+ }
136
+ return Array.from(buffer).map((b) => ("0" + b.toString(16)).slice(-2).toUpperCase()).join("-");
137
+ }
138
+
139
+ export { doubleToInt64Bits, getBytesBoolean, getBytesChar, getBytesDouble, getBytesInt16, getBytesInt32, getBytesInt64, getBytesSingle, getBytesUInt16, getBytesUInt32, getBytesUInt64, int64BitsToDouble, isLittleEndian, toBoolean, toChar, toDouble, toInt16, toInt32, toInt64, toSingle, toString, toUInt16, toUInt32, toUInt64 };
@@ -371,7 +371,7 @@ function dateToISOStringWithOffset(dateWithOffset, offset) {
371
371
  return str.substring(0, str.length - 1) + dateOffsetToString(offset);
372
372
  }
373
373
  function dateToStringWithOffset(date2, format) {
374
- const d = new Date(date2.getTime() + (date2.offset ?? 0));
374
+ const d = DateTime(date2.getTime() + (date2.offset ?? 0), DateTimeKind.Utc);
375
375
  if (typeof format !== "string") {
376
376
  return d.toISOString().replace(/\.\d+/, "").replace(/[A-Z]|\.\d+/g, " ") + dateOffsetToString(date2.offset ?? 0);
377
377
  } else if (format.length === 1) {