@nfdi4plants/arctrl 3.0.0-beta.9 → 3.0.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 (297) hide show
  1. package/README.md +30 -3
  2. package/dist/ts/index.d.ts +54 -16
  3. package/dist/ts/index.d.ts.map +1 -1
  4. package/dist/ts/index.js +56 -18
  5. package/dist/ts/ts/ARC.d.ts +26 -9
  6. package/dist/ts/ts/ARC.d.ts.map +1 -1
  7. package/dist/ts/ts/ARC.js +148 -63
  8. package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts +62 -0
  9. package/dist/ts/ts/CWL/CWLProcessingUnit.d.ts.map +1 -0
  10. package/dist/ts/ts/CWL/CWLProcessingUnit.js +250 -0
  11. package/dist/ts/ts/CWL/CWLTypes.d.ts +148 -0
  12. package/dist/ts/ts/CWL/CWLTypes.d.ts.map +1 -0
  13. package/dist/ts/ts/CWL/CWLTypes.js +384 -0
  14. package/dist/ts/ts/CWL/Decode.d.ts +214 -0
  15. package/dist/ts/ts/CWL/Decode.d.ts.map +1 -0
  16. package/dist/ts/ts/CWL/Decode.js +2667 -0
  17. package/dist/ts/ts/CWL/Encode.d.ts +103 -0
  18. package/dist/ts/ts/CWL/Encode.d.ts.map +1 -0
  19. package/dist/ts/ts/CWL/Encode.js +1513 -0
  20. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +50 -0
  21. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -0
  22. package/dist/ts/ts/CWL/ExpressionToolDescription.js +152 -0
  23. package/dist/ts/ts/CWL/HashHelpers.d.ts +9 -0
  24. package/dist/ts/ts/CWL/HashHelpers.d.ts.map +1 -0
  25. package/dist/ts/ts/CWL/HashHelpers.js +35 -0
  26. package/dist/ts/ts/CWL/Inputs.d.ts +31 -0
  27. package/dist/ts/ts/CWL/Inputs.d.ts.map +1 -0
  28. package/dist/ts/ts/CWL/Inputs.js +86 -0
  29. package/dist/ts/ts/CWL/OperationDescription.d.ts +46 -0
  30. package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -0
  31. package/dist/ts/ts/CWL/OperationDescription.js +133 -0
  32. package/dist/ts/ts/CWL/Outputs.d.ts +44 -0
  33. package/dist/ts/ts/CWL/Outputs.d.ts.map +1 -0
  34. package/dist/ts/ts/CWL/Outputs.js +143 -0
  35. package/dist/ts/ts/CWL/ParameterReference.d.ts +23 -0
  36. package/dist/ts/ts/CWL/ParameterReference.d.ts.map +1 -0
  37. package/dist/ts/ts/CWL/ParameterReference.js +60 -0
  38. package/dist/ts/ts/CWL/Requirements.d.ts +206 -0
  39. package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -0
  40. package/dist/ts/ts/CWL/Requirements.js +384 -0
  41. package/dist/ts/ts/CWL/ToolDescription.d.ts +50 -0
  42. package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -0
  43. package/dist/ts/ts/CWL/ToolDescription.js +152 -0
  44. package/dist/ts/ts/CWL/WorkflowDescription.d.ts +50 -0
  45. package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -0
  46. package/dist/ts/ts/CWL/WorkflowDescription.js +142 -0
  47. package/dist/ts/ts/CWL/WorkflowSteps.d.ts +160 -0
  48. package/dist/ts/ts/CWL/WorkflowSteps.d.ts.map +1 -0
  49. package/dist/ts/ts/CWL/WorkflowSteps.js +317 -0
  50. package/dist/ts/ts/CWLRunResolver.d.ts +45 -0
  51. package/dist/ts/ts/CWLRunResolver.d.ts.map +1 -0
  52. package/dist/ts/ts/CWLRunResolver.js +181 -0
  53. package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
  54. package/dist/ts/ts/Contract/ARC.js +27 -9
  55. package/dist/ts/ts/Contract/ArcRun.d.ts +6 -0
  56. package/dist/ts/ts/Contract/ArcRun.d.ts.map +1 -1
  57. package/dist/ts/ts/Contract/ArcRun.js +131 -4
  58. package/dist/ts/ts/Contract/ArcWorkflow.d.ts +3 -0
  59. package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
  60. package/dist/ts/ts/Contract/ArcWorkflow.js +70 -4
  61. package/dist/ts/ts/Contract/Datamap.d.ts +25 -25
  62. package/dist/ts/ts/Contract/Datamap.js +34 -34
  63. package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
  64. package/dist/ts/ts/ContractIO/ContractIO.js +3 -1
  65. package/dist/ts/ts/Conversion/Assay.d.ts +13 -0
  66. package/dist/ts/ts/Conversion/Assay.d.ts.map +1 -0
  67. package/dist/ts/ts/Conversion/Assay.js +69 -0
  68. package/dist/ts/ts/Conversion/Basic.d.ts +105 -0
  69. package/dist/ts/ts/Conversion/Basic.d.ts.map +1 -0
  70. package/dist/ts/ts/Conversion/Basic.js +452 -0
  71. package/dist/ts/ts/Conversion/ColumnIndex.d.ts +11 -0
  72. package/dist/ts/ts/Conversion/ColumnIndex.d.ts.map +1 -0
  73. package/dist/ts/ts/Conversion/ColumnIndex.js +71 -0
  74. package/dist/ts/ts/Conversion/Datamap.d.ts +11 -0
  75. package/dist/ts/ts/Conversion/Datamap.d.ts.map +1 -0
  76. package/dist/ts/ts/Conversion/Datamap.js +21 -0
  77. package/dist/ts/ts/Conversion/DateTime.d.ts +4 -0
  78. package/dist/ts/ts/Conversion/DateTime.d.ts.map +1 -0
  79. package/dist/ts/ts/Conversion/DateTime.js +23 -0
  80. package/dist/ts/ts/Conversion/Investigation.d.ts +12 -0
  81. package/dist/ts/ts/Conversion/Investigation.d.ts.map +1 -0
  82. package/dist/ts/ts/Conversion/Investigation.js +79 -0
  83. package/dist/ts/ts/Conversion/Person.d.ts +16 -0
  84. package/dist/ts/ts/Conversion/Person.d.ts.map +1 -0
  85. package/dist/ts/ts/Conversion/Person.js +100 -0
  86. package/dist/ts/ts/Conversion/Process.d.ts +84 -0
  87. package/dist/ts/ts/Conversion/Process.d.ts.map +1 -0
  88. package/dist/ts/ts/Conversion/Process.js +455 -0
  89. package/dist/ts/ts/Conversion/Run.d.ts +35 -0
  90. package/dist/ts/ts/Conversion/Run.d.ts.map +1 -0
  91. package/dist/ts/ts/Conversion/Run.js +254 -0
  92. package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts +16 -0
  93. package/dist/ts/ts/Conversion/ScholarlyArticle.d.ts.map +1 -0
  94. package/dist/ts/ts/Conversion/ScholarlyArticle.js +116 -0
  95. package/dist/ts/ts/Conversion/Study.d.ts +12 -0
  96. package/dist/ts/ts/Conversion/Study.d.ts.map +1 -0
  97. package/dist/ts/ts/Conversion/Study.js +51 -0
  98. package/dist/ts/ts/Conversion/Table.d.ts +45 -0
  99. package/dist/ts/ts/Conversion/Table.d.ts.map +1 -0
  100. package/dist/ts/ts/Conversion/Table.js +203 -0
  101. package/dist/ts/ts/Conversion/Workflow.d.ts +91 -0
  102. package/dist/ts/ts/Conversion/Workflow.d.ts.map +1 -0
  103. package/dist/ts/ts/Conversion/Workflow.js +455 -0
  104. package/dist/ts/ts/Conversion.d.ts +25 -276
  105. package/dist/ts/ts/Conversion.d.ts.map +1 -1
  106. package/dist/ts/ts/Conversion.js +64 -1477
  107. package/dist/ts/ts/Core/ArcTypes.d.ts +69 -59
  108. package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
  109. package/dist/ts/ts/Core/ArcTypes.js +222 -142
  110. package/dist/ts/ts/Core/{DataMap.d.ts → Datamap.d.ts} +24 -24
  111. package/dist/ts/ts/Core/{DataMap.d.ts.map → Datamap.d.ts.map} +1 -1
  112. package/dist/ts/ts/Core/{DataMap.js → Datamap.js} +36 -36
  113. package/dist/ts/ts/Core/Helper/Identifier.d.ts +24 -0
  114. package/dist/ts/ts/Core/Helper/Identifier.d.ts.map +1 -1
  115. package/dist/ts/ts/Core/Helper/Identifier.js +35 -2
  116. package/dist/ts/ts/Core/Table/ArcTable.d.ts +8 -8
  117. package/dist/ts/ts/Core/Table/ArcTable.d.ts.map +1 -1
  118. package/dist/ts/ts/Core/Table/ArcTable.js +20 -20
  119. package/dist/ts/ts/FileSystem/FileSystemTree.d.ts +4 -4
  120. package/dist/ts/ts/FileSystem/FileSystemTree.d.ts.map +1 -1
  121. package/dist/ts/ts/FileSystem/FileSystemTree.js +20 -27
  122. package/dist/ts/ts/FileSystem/Path.d.ts +22 -0
  123. package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
  124. package/dist/ts/ts/FileSystem/Path.js +173 -3
  125. package/dist/ts/ts/Json/Assay.js +5 -5
  126. package/dist/ts/ts/Json/{DataMap → Datamap}/DataContext.d.ts.map +1 -1
  127. package/dist/ts/ts/Json/{DataMap/DataMap.d.ts → Datamap/Datamap.d.ts} +6 -6
  128. package/dist/ts/ts/Json/{DataMap/DataMap.d.ts.map → Datamap/Datamap.d.ts.map} +1 -1
  129. package/dist/ts/ts/Json/{DataMap/DataMap.js → Datamap/Datamap.js} +2 -2
  130. package/dist/ts/ts/Json/ROCrate/LDContext.d.ts.map +1 -1
  131. package/dist/ts/ts/Json/ROCrate/LDContext.js +21 -11
  132. package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -0
  133. package/dist/ts/ts/Json/ROCrate/LDNode.d.ts.map +1 -1
  134. package/dist/ts/ts/Json/ROCrate/LDNode.js +18 -7
  135. package/dist/ts/ts/Json/Run.js +5 -5
  136. package/dist/ts/ts/Json/Study.js +5 -5
  137. package/dist/ts/ts/Json/Workflow.d.ts.map +1 -1
  138. package/dist/ts/ts/Json/Workflow.js +10 -11
  139. package/dist/ts/ts/Json.d.ts +3 -5
  140. package/dist/ts/ts/Json.d.ts.map +1 -1
  141. package/dist/ts/ts/Json.js +4 -10
  142. package/dist/ts/ts/JsonIO/Datamap.d.ts +4 -4
  143. package/dist/ts/ts/JsonIO/Datamap.js +6 -6
  144. package/dist/ts/ts/JsonIO/Investigation.d.ts +0 -6
  145. package/dist/ts/ts/JsonIO/Investigation.d.ts.map +1 -1
  146. package/dist/ts/ts/JsonIO/Investigation.js +2 -21
  147. package/dist/ts/ts/License.js +1 -1
  148. package/dist/ts/ts/ROCrate/LDContext.d.ts.map +1 -1
  149. package/dist/ts/ts/ROCrate/LDContext.js +35 -31
  150. package/dist/ts/ts/ROCrate/LDObject.d.ts +2 -2
  151. package/dist/ts/ts/ROCrate/LDObject.js +2 -2
  152. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts.map +1 -1
  153. package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts +63 -0
  154. package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.d.ts.map +1 -0
  155. package/dist/ts/ts/ROCrate/LDTypes/ComputationalWorkflow.js +361 -0
  156. package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts +39 -0
  157. package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.d.ts.map +1 -0
  158. package/dist/ts/ts/ROCrate/LDTypes/ComputerLanguage.js +219 -0
  159. package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts +43 -0
  160. package/dist/ts/ts/ROCrate/LDTypes/CreateAction.d.ts.map +1 -0
  161. package/dist/ts/ts/ROCrate/LDTypes/CreateAction.js +224 -0
  162. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts.map +1 -1
  163. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.js +1 -1
  164. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.d.ts +34 -22
  165. package/dist/ts/ts/ROCrate/LDTypes/Dataset.d.ts.map +1 -0
  166. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Dataset.js +59 -2
  167. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts.map +1 -1
  168. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.d.ts +10 -4
  169. package/dist/ts/ts/ROCrate/LDTypes/File.d.ts.map +1 -0
  170. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/File.js +34 -1
  171. package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts +59 -0
  172. package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.d.ts.map +1 -0
  173. package/dist/ts/ts/ROCrate/LDTypes/FormalParameter.js +344 -0
  174. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.d.ts +2 -0
  175. package/dist/ts/ts/ROCrate/LDTypes/LabProcess.d.ts.map +1 -0
  176. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProcess.js +31 -5
  177. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.d.ts +6 -2
  178. package/dist/ts/ts/ROCrate/LDTypes/LabProtocol.d.ts.map +1 -0
  179. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/LabProtocol.js +66 -15
  180. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts.map +1 -1
  181. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts.map +1 -1
  182. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts.map +1 -1
  183. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.d.ts +35 -11
  184. package/dist/ts/ts/ROCrate/LDTypes/PropertyValue.d.ts.map +1 -0
  185. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PropertyValue.js +191 -1
  186. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts.map +1 -1
  187. package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts.map +1 -1
  188. package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts +46 -0
  189. package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.d.ts.map +1 -0
  190. package/dist/ts/ts/ROCrate/LDTypes/SoftwareSourceCode.js +247 -0
  191. package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts +12 -0
  192. package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.d.ts.map +1 -0
  193. package/dist/ts/ts/ROCrate/LDTypes/WorkflowInvocation.js +40 -0
  194. package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts +11 -0
  195. package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.d.ts.map +1 -0
  196. package/dist/ts/ts/ROCrate/LDTypes/WorkflowProtocol.js +46 -0
  197. package/dist/ts/ts/ROCrate/ROCrateContext.d.ts +2 -2
  198. package/dist/ts/ts/ROCrate/ROCrateContext.d.ts.map +1 -1
  199. package/dist/ts/ts/ROCrate/ROCrateContext.js +6 -6
  200. package/dist/ts/ts/ROCrateIO.d.ts +7 -3
  201. package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
  202. package/dist/ts/ts/ROCrateIO.js +82 -13
  203. package/dist/ts/ts/Spreadsheet/ArcAssay.js +3 -3
  204. package/dist/ts/ts/Spreadsheet/ArcRun.js +2 -2
  205. package/dist/ts/ts/Spreadsheet/ArcStudy.js +3 -3
  206. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +2 -2
  207. package/dist/ts/ts/Spreadsheet/Datamap.d.ts +8 -0
  208. package/dist/ts/ts/Spreadsheet/{DataMap.d.ts.map → Datamap.d.ts.map} +1 -1
  209. package/dist/ts/ts/Spreadsheet/{DataMap.js → Datamap.js} +9 -9
  210. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapColumn.d.ts → DatamapTable/DatamapColumn.d.ts} +1 -1
  211. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapColumn.d.ts.map → DatamapTable/DatamapColumn.d.ts.map} +1 -1
  212. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapColumn.js → DatamapTable/DatamapColumn.js} +1 -1
  213. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapHeader.d.ts → DatamapTable/DatamapHeader.d.ts} +1 -1
  214. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapHeader.d.ts.map → DatamapTable/DatamapHeader.d.ts.map} +1 -1
  215. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapTable.d.ts → DatamapTable/DatamapTable.d.ts} +5 -5
  216. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapTable.d.ts.map → DatamapTable/DatamapTable.d.ts.map} +1 -1
  217. package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapTable.js → DatamapTable/DatamapTable.js} +6 -6
  218. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +1 -1
  219. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
  220. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +4 -4
  221. package/dist/ts/ts/WorkflowGraph/Adapters.d.ts +36 -0
  222. package/dist/ts/ts/WorkflowGraph/Adapters.d.ts.map +1 -0
  223. package/dist/ts/ts/WorkflowGraph/Adapters.js +94 -0
  224. package/dist/ts/ts/WorkflowGraph/BuildOptions.d.ts +37 -0
  225. package/dist/ts/ts/WorkflowGraph/BuildOptions.d.ts.map +1 -0
  226. package/dist/ts/ts/WorkflowGraph/BuildOptions.js +35 -0
  227. package/dist/ts/ts/WorkflowGraph/Builder.d.ts +160 -0
  228. package/dist/ts/ts/WorkflowGraph/Builder.d.ts.map +1 -0
  229. package/dist/ts/ts/WorkflowGraph/Builder.js +556 -0
  230. package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts +182 -0
  231. package/dist/ts/ts/WorkflowGraph/GraphTypes.d.ts.map +1 -0
  232. package/dist/ts/ts/WorkflowGraph/GraphTypes.js +281 -0
  233. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts +27 -0
  234. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.d.ts.map +1 -0
  235. package/dist/ts/ts/WorkflowGraph/ReferenceParsing.js +49 -0
  236. package/dist/ts/ts/Xlsx.d.ts +5 -5
  237. package/dist/ts/ts/Xlsx.js +1 -1
  238. package/dist/ts/ts/Yaml/ValidationPackage.d.ts +1 -1
  239. package/dist/ts/ts/Yaml/ValidationPackage.d.ts.map +1 -1
  240. package/dist/ts/ts/Yaml/ValidationPackage.js +6 -6
  241. package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +1 -1
  242. package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts.map +1 -1
  243. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +6 -6
  244. package/dist/ts/ts/Yaml.d.ts +24 -0
  245. package/dist/ts/ts/Yaml.d.ts.map +1 -0
  246. package/dist/ts/ts/Yaml.js +56 -0
  247. package/dist/ts/ts/fable_modules/DynamicObj.7.1.0/DynObj.fs.js +109 -0
  248. package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.4}/Encode.fs.js +9 -9
  249. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Escapes.fs.js +313 -0
  250. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/FlowToBlock.fs.js +956 -0
  251. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Interop/JsInterop.fs.js +10 -0
  252. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Persil.fs.js +562 -0
  253. package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.4}/Preprocessing.fs.js +52 -12
  254. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Reader.fs.js +1314 -0
  255. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Regex.fs.js +21 -0
  256. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/RegexActivePatterns.fs.js +313 -0
  257. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/StringBuffer.fs.js +60 -0
  258. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/Writer.fs.js +391 -0
  259. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.4/YAMLiciousTypes.fs.js +317 -0
  260. package/package.json +1 -1
  261. package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts.map +0 -1
  262. package/dist/ts/ts/ROCrate/Generic/File.d.ts.map +0 -1
  263. package/dist/ts/ts/ROCrate/Generic/LabProcess.d.ts.map +0 -1
  264. package/dist/ts/ts/ROCrate/Generic/LabProtocol.d.ts.map +0 -1
  265. package/dist/ts/ts/ROCrate/Generic/PropertyValue.d.ts.map +0 -1
  266. package/dist/ts/ts/Spreadsheet/DataMap.d.ts +0 -8
  267. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Interop/JsInterop.fs.js +0 -10
  268. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +0 -45
  269. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +0 -483
  270. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +0 -11
  271. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +0 -212
  272. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +0 -164
  273. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +0 -152
  274. /package/dist/ts/ts/Json/{DataMap → Datamap}/DataContext.d.ts +0 -0
  275. /package/dist/ts/ts/Json/{DataMap → Datamap}/DataContext.js +0 -0
  276. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.d.ts +0 -0
  277. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Comment.js +0 -0
  278. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/CreativeWork.d.ts +0 -0
  279. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.d.ts +0 -0
  280. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/DefinedTerm.js +0 -0
  281. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.d.ts +0 -0
  282. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Organization.js +0 -0
  283. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.d.ts +0 -0
  284. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Person.js +0 -0
  285. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.d.ts +0 -0
  286. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/PostalAddress.js +0 -0
  287. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.d.ts +0 -0
  288. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/Sample.js +0 -0
  289. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.d.ts +0 -0
  290. /package/dist/ts/ts/ROCrate/{Generic → LDTypes}/ScholarlyArticle.js +0 -0
  291. /package/dist/ts/ts/Spreadsheet/{DataMapTable/DataMapHeader.js → DatamapTable/DatamapHeader.js} +0 -0
  292. /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/DynamicObj.fs.js +0 -0
  293. /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/FableJS.fs.js +0 -0
  294. /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/HashCodes.fs.js +0 -0
  295. /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/PropertyHelper.fs.js +0 -0
  296. /package/dist/ts/ts/fable_modules/{DynamicObj.7.0.1 → DynamicObj.7.1.0}/ReflectionUtils.fs.js +0 -0
  297. /package/dist/ts/ts/fable_modules/{YAMLicious.0.0.3 → YAMLicious.1.0.0-alpha.4}/Decode.fs.js +0 -0
@@ -0,0 +1,556 @@
1
+ import { Record } from '../../node_modules/@fable-org/fable-library-js/Types.js';
2
+ import { WorkflowGraph_$reflection, WorkflowGraph_create_4D231A1, GraphBuildIssue_create_Z2F3B511A, WorkflowGraphEdge_create_5E4B5E48, GraphId_edgeId, GraphId_unitNodeId, WorkflowGraphNode_create_62C775C0, NodeKind_ProcessingUnitNode, GraphId_portNodeId, NodeKind_PortNode, GraphId_stepNodeId, NodeKind_StepNode, EdgeKind_Contains, PortDirection_Input, PortDirection_Output, GraphIssueKind_CycleDetected, GraphIssueKind_ResolutionFailed, ProcessingUnitKind_CommandLineTool, ProcessingUnitKind_Workflow, ProcessingUnitKind_Operation, ProcessingUnitKind_ExpressionTool, ProcessingUnitKind_UnresolvedReference, ProcessingUnitKind_ExternalReference, GraphIssueKind_UnexpectedRuntimeType, GraphIssueKind_InvalidReference, EdgeKind_BindsWorkflowInput, EdgeKind_DataFlow, GraphIssueKind_MissingReference, EdgeKind_BindsWorkflowOutput, EdgeKind_Calls, GraphId_childScope, GraphId_normalizeSegment } from './GraphTypes.js';
3
+ import { empty, FSharpSet__Contains, FSharpSet__Add } from '../../node_modules/@fable-org/fable-library-js/Set.js';
4
+ import { empty as empty$1, FSharpMap__ContainsKey, FSharpMap__get_Item, FSharpMap__Add, tryFind } from '../../node_modules/@fable-org/fable-library-js/Map.js';
5
+ import { WorkflowStepRun_$reflection, WorkflowStepRun_RunString } from '../CWL/WorkflowSteps.js';
6
+ import { WorkflowGraphBuildOptions_$reflection, WorkflowGraphBuildOptionsModule_defaultOptions } from './BuildOptions.js';
7
+ import { record_type, class_type, string_type, option_type, bool_type, array_type } from '../../node_modules/@fable-org/fable-library-js/Reflection.js';
8
+ import { unwrap, value, map, defaultArg, bind, some } from '../../node_modules/@fable-org/fable-library-js/Option.js';
9
+ import { comparePrimitives, getEnumerator, disposeSafe, stringHash } from '../../node_modules/@fable-org/fable-library-js/Util.js';
10
+ import { DynamicObj } from '../fable_modules/DynamicObj.7.1.0/DynamicObj.fs.js';
11
+ import { setProperty } from '../fable_modules/DynamicObj.7.1.0/DynObj.fs.js';
12
+ import { ofArray, tryPick, singleton } from '../../node_modules/@fable-org/fable-library-js/List.js';
13
+ import { toArray, iterate, tryHead, toList, delay, singleton as singleton$1 } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
14
+ import { ReferenceParsing_extractStepOutputId, ReferenceParsing_parseSourceReference } from './ReferenceParsing.js';
15
+ import { isNullOrWhiteSpace, substring, endsWith } from '../../node_modules/@fable-org/fable-library-js/String.js';
16
+ import { getFileName, normalize, resolvePathFromFile, normalizePathKey } from '../FileSystem/Path.js';
17
+ import { Array_distinct } from '../../node_modules/@fable-org/fable-library-js/Seq2.js';
18
+ import { WorkflowStepRunOps_fromTool, WorkflowStepRunOps_fromOperation, WorkflowStepRunOps_fromExpressionTool, WorkflowStepRunOps_fromWorkflow, WorkflowStepRunOps_tryGetOperation, CWLProcessingUnit_Operation, WorkflowStepRunOps_tryGetExpressionTool, CWLProcessingUnit_ExpressionTool, WorkflowStepRunOps_tryGetWorkflow, CWLProcessingUnit_Workflow, WorkflowStepRunOps_tryGetTool, CWLProcessingUnit_CommandLineTool } from '../CWL/CWLProcessingUnit.js';
19
+ import { map as map$1, item, tryPick as tryPick$1 } from '../../node_modules/@fable-org/fable-library-js/Array.js';
20
+
21
+ class BuildState extends Record {
22
+ constructor(Graph, NodeIds, EdgeIds, RunResolutionStack, RunResolutionCache, RunNodeCache, Options) {
23
+ super();
24
+ this.Graph = Graph;
25
+ this.NodeIds = NodeIds;
26
+ this.EdgeIds = EdgeIds;
27
+ this.RunResolutionStack = RunResolutionStack;
28
+ this.RunResolutionCache = RunResolutionCache;
29
+ this.RunNodeCache = RunNodeCache;
30
+ this.Options = Options;
31
+ }
32
+ }
33
+ function BuildState_$reflection() {
34
+ return record_type("ARCtrl.WorkflowGraph.Builder.BuildState", [], BuildState, () => [["Graph", WorkflowGraph_$reflection()], ["NodeIds", class_type("Microsoft.FSharp.Collections.FSharpSet`1", [string_type])], ["EdgeIds", class_type("Microsoft.FSharp.Collections.FSharpSet`1", [string_type])], ["RunResolutionStack", class_type("Microsoft.FSharp.Collections.FSharpSet`1", [string_type])], ["RunResolutionCache", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, WorkflowStepRun_$reflection()])], ["RunNodeCache", class_type("Microsoft.FSharp.Collections.FSharpMap`2", [string_type, string_type])], ["Options", WorkflowGraphBuildOptions_$reflection()]]);
35
+ }
36
+ class RunResolutionResult extends Record {
37
+ constructor(ResolvedRun, ResolvedFromPath, AttemptedLookup, ResolutionPathKeys) {
38
+ super();
39
+ this.ResolvedRun = ResolvedRun;
40
+ this.ResolvedFromPath = ResolvedFromPath;
41
+ this.AttemptedLookup = AttemptedLookup;
42
+ this.ResolutionPathKeys = ResolutionPathKeys;
43
+ }
44
+ }
45
+ function RunResolutionResult_$reflection() {
46
+ return record_type("ARCtrl.WorkflowGraph.Builder.RunResolutionResult", [], RunResolutionResult, () => [["ResolvedRun", WorkflowStepRun_$reflection()], ["ResolvedFromPath", option_type(string_type)], ["AttemptedLookup", bool_type], ["ResolutionPathKeys", array_type(string_type)]]);
47
+ }
48
+ function createGraph(rootNodeId) {
49
+ return WorkflowGraph_create_4D231A1(rootNodeId);
50
+ }
51
+ function createState(options, rootNodeId) {
52
+ return new BuildState(createGraph(rootNodeId), empty({
53
+ Compare: comparePrimitives
54
+ }), empty({
55
+ Compare: comparePrimitives
56
+ }), empty({
57
+ Compare: comparePrimitives
58
+ }), empty$1({
59
+ Compare: comparePrimitives
60
+ }), empty$1({
61
+ Compare: comparePrimitives
62
+ }), options);
63
+ }
64
+ function addDiagnostic(state, kind, message, scope, reference) {
65
+ void state.Graph.Diagnostics.push(GraphBuildIssue_create_Z2F3B511A(kind, message, unwrap(scope), unwrap(reference)));
66
+ }
67
+ function hasNode(state, nodeId) {
68
+ return FSharpSet__Contains(state.NodeIds, nodeId);
69
+ }
70
+ function addNode(state, node) {
71
+ if (!FSharpSet__Contains(state.NodeIds, node.Id)) {
72
+ state.NodeIds = FSharpSet__Add(state.NodeIds, node.Id);
73
+ void state.Graph.Nodes.push(node);
74
+ }
75
+ }
76
+ function addEdge(state, edge) {
77
+ if (!FSharpSet__Contains(state.EdgeIds, edge.Id)) {
78
+ state.EdgeIds = FSharpSet__Add(state.EdgeIds, edge.Id);
79
+ void state.Graph.Edges.push(edge);
80
+ }
81
+ }
82
+ function addEdgeByType(state, kind, sourceNodeId, targetNodeId, label) {
83
+ addEdge(state, WorkflowGraphEdge_create_5E4B5E48(GraphId_edgeId(kind, sourceNodeId, targetNodeId), sourceNodeId, targetNodeId, kind, unwrap(label)));
84
+ }
85
+ function createMetadata(pairs) {
86
+ const metadata = new DynamicObj();
87
+ let hasMetadata = false;
88
+ const enumerator = getEnumerator(pairs);
89
+ try {
90
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
91
+ const forLoopVar = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
92
+ const valueOpt = forLoopVar[1];
93
+ if (valueOpt == null) {
94
+ } else {
95
+ const value$1 = value(valueOpt);
96
+ hasMetadata = true;
97
+ setProperty(forLoopVar[0], value$1, metadata);
98
+ }
99
+ }
100
+ } finally {
101
+ disposeSafe(enumerator);
102
+ }
103
+ if (hasMetadata) {
104
+ return metadata;
105
+ } else {
106
+ return void 0;
107
+ }
108
+ }
109
+ function addProcessingUnitNode(state, scope, kind, label, ownerNodeId, reference, metadata) {
110
+ const nodeId = GraphId_unitNodeId(scope);
111
+ addNode(state, WorkflowGraphNode_create_62C775C0(nodeId, NodeKind_ProcessingUnitNode(kind), label, unwrap(ownerNodeId), unwrap(reference), unwrap(metadata)));
112
+ return nodeId;
113
+ }
114
+ function addPortNode(state, ownerNodeId, direction, portId, label) {
115
+ const nodeId = GraphId_portNodeId(ownerNodeId, direction, portId);
116
+ addNode(state, WorkflowGraphNode_create_62C775C0(nodeId, NodeKind_PortNode(direction), label, ownerNodeId));
117
+ return nodeId;
118
+ }
119
+ function addStepNode(state, scope, workflowNodeId, step) {
120
+ const stepNodeId = GraphId_stepNodeId(scope, step.Id);
121
+ const metadata = createMetadata(ofArray([["when", map((value) => value, step.When_)], ["scatterMethod", map((sm) => sm.AsCwlString, step.ScatterMethod)], ["scatter", map(toArray, step.Scatter)]]));
122
+ addNode(state, WorkflowGraphNode_create_62C775C0(stepNodeId, NodeKind_StepNode(), defaultArg(step.Label, step.Id), workflowNodeId, void 0, unwrap(metadata)));
123
+ addEdgeByType(state, EdgeKind_Contains(), workflowNodeId, stepNodeId, void 0);
124
+ return stepNodeId;
125
+ }
126
+ function addWorkflowPorts(state, workflowNodeId, workflow) {
127
+ iterate((input) => {
128
+ addPortNode(state, workflowNodeId, PortDirection_Input(), input.Name, input.Name);
129
+ }, workflow.Inputs);
130
+ iterate((output) => {
131
+ addPortNode(state, workflowNodeId, PortDirection_Output(), output.Name, output.Name);
132
+ }, workflow.Outputs);
133
+ }
134
+ function addToolPorts(state, toolNodeId, tool) {
135
+ iterate((input) => {
136
+ addPortNode(state, toolNodeId, PortDirection_Input(), input.Name, input.Name);
137
+ }, defaultArg(tool.Inputs, []));
138
+ iterate((output) => {
139
+ addPortNode(state, toolNodeId, PortDirection_Output(), output.Name, output.Name);
140
+ }, tool.Outputs);
141
+ }
142
+ function addExpressionToolPorts(state, toolNodeId, tool) {
143
+ iterate((input) => {
144
+ addPortNode(state, toolNodeId, PortDirection_Input(), input.Name, input.Name);
145
+ }, defaultArg(tool.Inputs, []));
146
+ iterate((output) => {
147
+ addPortNode(state, toolNodeId, PortDirection_Output(), output.Name, output.Name);
148
+ }, tool.Outputs);
149
+ }
150
+ function addOperationPorts(state, operationNodeId, operation) {
151
+ iterate((input) => {
152
+ addPortNode(state, operationNodeId, PortDirection_Input(), input.Name, input.Name);
153
+ }, operation.Inputs);
154
+ iterate((output) => {
155
+ addPortNode(state, operationNodeId, PortDirection_Output(), output.Name, output.Name);
156
+ }, operation.Outputs);
157
+ }
158
+ function addStepPorts(state, stepNodeId, step) {
159
+ iterate((input) => {
160
+ addPortNode(state, stepNodeId, PortDirection_Input(), input.Id, input.Id);
161
+ }, step.In);
162
+ iterate((output) => {
163
+ const outputId = ReferenceParsing_extractStepOutputId(output);
164
+ addPortNode(state, stepNodeId, PortDirection_Output(), outputId, outputId);
165
+ }, step.Out);
166
+ }
167
+ function trimToNameCandidate(value) {
168
+ if (isNullOrWhiteSpace(value)) {
169
+ return "";
170
+ } else {
171
+ const trimmed = value.trim();
172
+ if (trimmed.startsWith("#")) {
173
+ return substring(trimmed, 1);
174
+ } else {
175
+ const hashIndex = trimmed.indexOf("#") | 0;
176
+ const withoutHash = hashIndex >= 0 ? substring(trimmed, 0, hashIndex) : trimmed;
177
+ const queryIndex = withoutHash.indexOf("?") | 0;
178
+ if (queryIndex >= 0) {
179
+ return substring(withoutHash, 0, queryIndex);
180
+ } else {
181
+ return withoutHash;
182
+ }
183
+ }
184
+ }
185
+ }
186
+ function isCwlReference(runPath) {
187
+ const candidate = trimToNameCandidate(runPath);
188
+ if (!isNullOrWhiteSpace(candidate)) {
189
+ return endsWith(candidate, ".cwl", 5);
190
+ } else {
191
+ return false;
192
+ }
193
+ }
194
+ function tryBasenameNoCwlExtension(value) {
195
+ const candidate = trimToNameCandidate(value);
196
+ if (isNullOrWhiteSpace(candidate)) {
197
+ return void 0;
198
+ } else {
199
+ const fileName = (candidate.indexOf("/") >= 0 ? true : candidate.indexOf("\\") >= 0) ? getFileName(candidate) : candidate;
200
+ const withoutCwlExtension = endsWith(fileName, ".cwl", 5) ? substring(fileName, 0, fileName.length - ".cwl".length) : fileName;
201
+ if (isNullOrWhiteSpace(withoutCwlExtension)) {
202
+ return void 0;
203
+ } else {
204
+ return withoutCwlExtension;
205
+ }
206
+ }
207
+ }
208
+ function tryGetProcessingUnitName(processingUnit) {
209
+ return tryPick((key) => {
210
+ let dynObj, matchValue, o;
211
+ return bind(tryBasenameNoCwlExtension, (dynObj = processingUnit, matchValue = dynObj.TryGetPropertyValue(key), matchValue != null ? (o = value(matchValue), typeof o === "string" ? o : void 0) : void 0));
212
+ }, ofArray(["name", "id"]));
213
+ }
214
+ function chooseLabel(fallback, candidates) {
215
+ return defaultArg(tryPick((x) => x, candidates), fallback);
216
+ }
217
+ function getRunPathCandidates(workflowFilePath, runPath) {
218
+ let array, array_2;
219
+ if (isNullOrWhiteSpace(runPath)) {
220
+ return [];
221
+ } else {
222
+ const trimmedRunPath = runPath.trim();
223
+ const normalizedRunPath = normalize(trimmedRunPath);
224
+ let matchResult, workflowPath_1;
225
+ if (workflowFilePath != null) {
226
+ if (!isNullOrWhiteSpace(value(workflowFilePath))) {
227
+ matchResult = 0;
228
+ workflowPath_1 = value(workflowFilePath);
229
+ } else {
230
+ matchResult = 1;
231
+ }
232
+ } else {
233
+ matchResult = 1;
234
+ }
235
+ switch (matchResult) {
236
+ case 0: {
237
+ const pathFromWorkflowFile = resolvePathFromFile(workflowPath_1, trimmedRunPath);
238
+ return Array_distinct((array = [trimmedRunPath, normalizedRunPath, pathFromWorkflowFile, normalize(pathFromWorkflowFile)], array.filter((arg) => !isNullOrWhiteSpace(arg))), {
239
+ Equals: (x, y) => x === y,
240
+ GetHashCode: stringHash
241
+ });
242
+ }
243
+ default:
244
+ return Array_distinct((array_2 = [trimmedRunPath, normalizedRunPath], array_2.filter((arg_1) => !isNullOrWhiteSpace(arg_1))), {
245
+ Equals: (x_1, y_1) => x_1 === y_1,
246
+ GetHashCode: stringHash
247
+ });
248
+ }
249
+ }
250
+ }
251
+ function resolveRunString(state, workflowFilePath, runPath) {
252
+ if (isNullOrWhiteSpace(runPath) ? true : !isCwlReference(runPath)) {
253
+ return new RunResolutionResult(WorkflowStepRun_RunString(runPath), void 0, false, []);
254
+ } else {
255
+ const matchValue = state.Options.TryResolveRunPath;
256
+ if (matchValue != null) {
257
+ const tryResolveRunPath = value(matchValue);
258
+ const candidates = getRunPathCandidates(workflowFilePath, runPath);
259
+ const candidateKeys = Array_distinct(map$1(normalizePathKey, candidates), {
260
+ Equals: (x, y) => x === y,
261
+ GetHashCode: stringHash
262
+ });
263
+ let resolvedRun = void 0;
264
+ for (let idx = 0; idx <= candidates.length - 1; idx++) {
265
+ const candidate = item(idx, candidates);
266
+ if (resolvedRun == null) {
267
+ const pathKey = normalizePathKey(candidate);
268
+ if (FSharpSet__Contains(state.RunResolutionStack, pathKey)) {
269
+ addDiagnostic(state, GraphIssueKind_CycleDetected(), `Cycle detected while resolving run reference '${candidate}'.`, workflowFilePath, candidate);
270
+ } else if (FSharpMap__ContainsKey(state.RunResolutionCache, pathKey)) {
271
+ resolvedRun = [FSharpMap__get_Item(state.RunResolutionCache, pathKey), candidate];
272
+ } else {
273
+ const matchValue_1 = tryResolveRunPath(candidate);
274
+ if (matchValue_1 == null) {
275
+ } else {
276
+ switch (value(matchValue_1).tag) {
277
+ case /* Workflow */
278
+ 1: {
279
+ const workflow = value(matchValue_1).fields[0];
280
+ const run_1 = WorkflowStepRunOps_fromWorkflow(workflow);
281
+ for (let idx_2 = 0; idx_2 <= candidateKeys.length - 1; idx_2++) {
282
+ const key_1 = item(idx_2, candidateKeys);
283
+ state.RunResolutionCache = FSharpMap__Add(state.RunResolutionCache, key_1, run_1);
284
+ }
285
+ resolvedRun = [run_1, candidate];
286
+ break;
287
+ }
288
+ case /* ExpressionTool */
289
+ 2: {
290
+ const expressionTool = value(matchValue_1).fields[0];
291
+ const run_2 = WorkflowStepRunOps_fromExpressionTool(expressionTool);
292
+ for (let idx_3 = 0; idx_3 <= candidateKeys.length - 1; idx_3++) {
293
+ const key_2 = item(idx_3, candidateKeys);
294
+ state.RunResolutionCache = FSharpMap__Add(state.RunResolutionCache, key_2, run_2);
295
+ }
296
+ resolvedRun = [run_2, candidate];
297
+ break;
298
+ }
299
+ case /* Operation */
300
+ 3: {
301
+ const operation = value(matchValue_1).fields[0];
302
+ const run_3 = WorkflowStepRunOps_fromOperation(operation);
303
+ for (let idx_4 = 0; idx_4 <= candidateKeys.length - 1; idx_4++) {
304
+ const key_3 = item(idx_4, candidateKeys);
305
+ state.RunResolutionCache = FSharpMap__Add(state.RunResolutionCache, key_3, run_3);
306
+ }
307
+ resolvedRun = [run_3, candidate];
308
+ break;
309
+ }
310
+ default: {
311
+ const tool = value(matchValue_1).fields[0];
312
+ const run = WorkflowStepRunOps_fromTool(tool);
313
+ for (let idx_1 = 0; idx_1 <= candidateKeys.length - 1; idx_1++) {
314
+ const key = item(idx_1, candidateKeys);
315
+ state.RunResolutionCache = FSharpMap__Add(state.RunResolutionCache, key, run);
316
+ }
317
+ resolvedRun = [run, candidate];
318
+ }
319
+ }
320
+ }
321
+ }
322
+ }
323
+ }
324
+ if (resolvedRun == null) {
325
+ addDiagnostic(state, GraphIssueKind_ResolutionFailed(), `Unable to resolve CWL run reference '${runPath}'.`, workflowFilePath, runPath);
326
+ return new RunResolutionResult(WorkflowStepRun_RunString(runPath), void 0, true, candidateKeys);
327
+ } else {
328
+ return new RunResolutionResult(value(resolvedRun)[0], value(resolvedRun)[1], true, candidateKeys);
329
+ }
330
+ } else {
331
+ if (state.Options.StrictUnresolvedRunReferences) {
332
+ addDiagnostic(state, GraphIssueKind_ResolutionFailed(), `Unable to resolve CWL run reference '${runPath}' because no run resolver is configured.`, workflowFilePath, runPath);
333
+ }
334
+ return new RunResolutionResult(WorkflowStepRun_RunString(runPath), void 0, state.Options.StrictUnresolvedRunReferences, []);
335
+ }
336
+ }
337
+ }
338
+ function buildProcessingUnit(state, scope, workflowFilePath, ownerNodeId, isRoot, processingUnit) {
339
+ switch (processingUnit.tag) {
340
+ case /* ExpressionTool */
341
+ 2: {
342
+ const expressionTool = processingUnit.fields[0];
343
+ const nodeId_1 = addProcessingUnitNode(state, scope, ProcessingUnitKind_ExpressionTool(), chooseLabel("ExpressionTool", ofArray([tryGetProcessingUnitName(expressionTool), bind(tryBasenameNoCwlExtension, expressionTool.Label), bind(tryBasenameNoCwlExtension, workflowFilePath)])), ownerNodeId, void 0, createMetadata(ofArray([["cwlVersion", some(expressionTool.CWLVersion)], ["expression", some(expressionTool.Expression)]])));
344
+ addExpressionToolPorts(state, nodeId_1, expressionTool);
345
+ return nodeId_1;
346
+ }
347
+ case /* Operation */
348
+ 3: {
349
+ const operation = processingUnit.fields[0];
350
+ const nodeId_2 = addProcessingUnitNode(state, scope, ProcessingUnitKind_Operation(), chooseLabel("Operation", ofArray([tryGetProcessingUnitName(operation), bind(tryBasenameNoCwlExtension, operation.Label), bind(tryBasenameNoCwlExtension, workflowFilePath)])), ownerNodeId, void 0, createMetadata(singleton(["cwlVersion", some(operation.CWLVersion)])));
351
+ addOperationPorts(state, nodeId_2, operation);
352
+ return nodeId_2;
353
+ }
354
+ case /* Workflow */
355
+ 1: {
356
+ const workflow = processingUnit.fields[0];
357
+ const nodeId_3 = addProcessingUnitNode(state, scope, ProcessingUnitKind_Workflow(), chooseLabel("Workflow", ofArray([tryGetProcessingUnitName(workflow), bind(tryBasenameNoCwlExtension, workflow.Label), bind(tryBasenameNoCwlExtension, workflowFilePath)])), ownerNodeId, void 0, createMetadata(singleton(["cwlVersion", some(workflow.CWLVersion)])));
358
+ addWorkflowPorts(state, nodeId_3, workflow);
359
+ if (isRoot ? true : state.Options.ExpandNestedWorkflows) {
360
+ buildWorkflowSteps(state, scope, workflowFilePath, nodeId_3, workflow);
361
+ }
362
+ return nodeId_3;
363
+ }
364
+ default: {
365
+ const tool = processingUnit.fields[0];
366
+ const nodeId = addProcessingUnitNode(state, scope, ProcessingUnitKind_CommandLineTool(), chooseLabel("CommandLineTool", ofArray([tryGetProcessingUnitName(tool), bind(tryBasenameNoCwlExtension, tool.Label), bind(tryBasenameNoCwlExtension, bind(tryHead, tool.BaseCommand)), bind(tryBasenameNoCwlExtension, workflowFilePath)])), ownerNodeId, void 0, createMetadata(singleton(["cwlVersion", some(tool.CWLVersion)])));
367
+ addToolPorts(state, nodeId, tool);
368
+ return nodeId;
369
+ }
370
+ }
371
+ }
372
+ function buildRunNode(state, runScope, stepNodeId, workflowFilePath, run) {
373
+ let currentPath;
374
+ switch (run.tag) {
375
+ case /* RunCommandLineTool */
376
+ 1: {
377
+ const matchValue_2 = WorkflowStepRunOps_tryGetTool(run);
378
+ if (matchValue_2 == null) {
379
+ const badNodeId = addProcessingUnitNode(state, runScope, ProcessingUnitKind_UnresolvedReference(), "Invalid CommandLineTool payload", stepNodeId, void 0, void 0);
380
+ addDiagnostic(state, GraphIssueKind_UnexpectedRuntimeType(), "WorkflowStepRun.RunCommandLineTool had an unexpected payload type.", workflowFilePath, void 0);
381
+ return [run, badNodeId];
382
+ } else {
383
+ return [run, buildProcessingUnit(state, runScope, workflowFilePath, stepNodeId, false, CWLProcessingUnit_CommandLineTool(value(matchValue_2)))];
384
+ }
385
+ }
386
+ case /* RunWorkflow */
387
+ 2: {
388
+ const matchValue_3 = WorkflowStepRunOps_tryGetWorkflow(run);
389
+ if (matchValue_3 == null) {
390
+ const badNodeId_1 = addProcessingUnitNode(state, runScope, ProcessingUnitKind_UnresolvedReference(), "Invalid Workflow payload", stepNodeId, void 0, void 0);
391
+ addDiagnostic(state, GraphIssueKind_UnexpectedRuntimeType(), "WorkflowStepRun.RunWorkflow had an unexpected payload type.", workflowFilePath, void 0);
392
+ return [run, badNodeId_1];
393
+ } else {
394
+ const workflow = value(matchValue_3);
395
+ return [run, buildProcessingUnit(state, runScope, (currentPath = defaultArg(workflowFilePath, ""), isNullOrWhiteSpace(currentPath) ? void 0 : currentPath), stepNodeId, false, CWLProcessingUnit_Workflow(workflow))];
396
+ }
397
+ }
398
+ case /* RunExpressionTool */
399
+ 3: {
400
+ const matchValue_4 = WorkflowStepRunOps_tryGetExpressionTool(run);
401
+ if (matchValue_4 == null) {
402
+ const badNodeId_2 = addProcessingUnitNode(state, runScope, ProcessingUnitKind_UnresolvedReference(), "Invalid ExpressionTool payload", stepNodeId, void 0, void 0);
403
+ addDiagnostic(state, GraphIssueKind_UnexpectedRuntimeType(), "WorkflowStepRun.RunExpressionTool had an unexpected payload type.", workflowFilePath, void 0);
404
+ return [run, badNodeId_2];
405
+ } else {
406
+ return [run, buildProcessingUnit(state, runScope, workflowFilePath, stepNodeId, false, CWLProcessingUnit_ExpressionTool(value(matchValue_4)))];
407
+ }
408
+ }
409
+ case /* RunOperation */
410
+ 4: {
411
+ const matchValue_5 = WorkflowStepRunOps_tryGetOperation(run);
412
+ if (matchValue_5 == null) {
413
+ const badNodeId_3 = addProcessingUnitNode(state, runScope, ProcessingUnitKind_UnresolvedReference(), "Invalid Operation payload", stepNodeId, void 0, void 0);
414
+ addDiagnostic(state, GraphIssueKind_UnexpectedRuntimeType(), "WorkflowStepRun.RunOperation had an unexpected payload type.", workflowFilePath, void 0);
415
+ return [run, badNodeId_3];
416
+ } else {
417
+ return [run, buildProcessingUnit(state, runScope, workflowFilePath, stepNodeId, false, CWLProcessingUnit_Operation(value(matchValue_5)))];
418
+ }
419
+ }
420
+ default: {
421
+ const resolution = resolveRunString(state, workflowFilePath, run.fields[0]);
422
+ const matchValue = resolution.ResolvedRun;
423
+ if (matchValue.tag === /* RunString */
424
+ 0) {
425
+ const unresolvedPath = matchValue.fields[0];
426
+ const unresolvedLabel = chooseLabel(unresolvedPath, toList(delay(() => isCwlReference(unresolvedPath) ? singleton$1(tryBasenameNoCwlExtension(unresolvedPath)) : singleton$1(void 0))));
427
+ return [resolution.ResolvedRun, addProcessingUnitNode(state, runScope, resolution.AttemptedLookup && isCwlReference(unresolvedPath) ? ProcessingUnitKind_UnresolvedReference() : ProcessingUnitKind_ExternalReference(), unresolvedLabel, stepNodeId, unresolvedPath, void 0)];
428
+ } else {
429
+ const resolvedRun = matchValue;
430
+ const cachedRunNodeId = tryPick$1((key) => tryFind(key, state.RunNodeCache), resolution.ResolutionPathKeys);
431
+ if (cachedRunNodeId == null) {
432
+ let patternInput;
433
+ const matchValue_1 = resolution.ResolvedFromPath;
434
+ if (matchValue_1 == null) {
435
+ patternInput = buildRunNode(state, runScope, stepNodeId, resolution.ResolvedFromPath, resolvedRun);
436
+ } else {
437
+ const resolvedPathKey = normalizePathKey(value(matchValue_1));
438
+ const previousStack = state.RunResolutionStack;
439
+ state.RunResolutionStack = FSharpSet__Add(previousStack, resolvedPathKey);
440
+ try {
441
+ patternInput = buildRunNode(state, runScope, stepNodeId, resolution.ResolvedFromPath, resolvedRun);
442
+ } finally {
443
+ state.RunResolutionStack = previousStack;
444
+ }
445
+ }
446
+ const builtNodeId = patternInput[1];
447
+ const arr = resolution.ResolutionPathKeys;
448
+ for (let idx = 0; idx <= arr.length - 1; idx++) {
449
+ const key_1 = item(idx, arr);
450
+ state.RunNodeCache = FSharpMap__Add(state.RunNodeCache, key_1, builtNodeId);
451
+ }
452
+ return [patternInput[0], builtNodeId];
453
+ } else {
454
+ return [resolvedRun, value(cachedRunNodeId)];
455
+ }
456
+ }
457
+ }
458
+ }
459
+ }
460
+ function wireStepInputs(state, scope, workflowNodeId, step) {
461
+ const stepNodeId = GraphId_stepNodeId(scope, step.Id);
462
+ let enumerator = getEnumerator(step.In);
463
+ try {
464
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
465
+ const stepInput = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
466
+ const targetInputPortId = GraphId_portNodeId(stepNodeId, PortDirection_Input(), stepInput.Id);
467
+ const matchValue = stepInput.Source;
468
+ if (matchValue != null) {
469
+ let enumerator_1 = getEnumerator(value(matchValue));
470
+ try {
471
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
472
+ const source = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
473
+ const sourceRef = ReferenceParsing_parseSourceReference(source);
474
+ if (isNullOrWhiteSpace(sourceRef.PortId)) {
475
+ addDiagnostic(state, GraphIssueKind_InvalidReference(), `Step '${step.Id}' input '${stepInput.Id}' has invalid source '${source}'.`, scope, source);
476
+ } else {
477
+ let sourcePortId;
478
+ const matchValue_1 = sourceRef.StepId;
479
+ sourcePortId = matchValue_1 == null ? GraphId_portNodeId(workflowNodeId, PortDirection_Input(), sourceRef.PortId) : GraphId_portNodeId(GraphId_stepNodeId(scope, value(matchValue_1)), PortDirection_Output(), sourceRef.PortId);
480
+ if (hasNode(state, sourcePortId) && hasNode(state, targetInputPortId)) {
481
+ addEdgeByType(state, sourceRef.StepId == null ? EdgeKind_BindsWorkflowInput() : EdgeKind_DataFlow(), sourcePortId, targetInputPortId, void 0);
482
+ } else {
483
+ addDiagnostic(state, GraphIssueKind_MissingReference(), `Unable to wire source '${source}' to step input '${step.Id}/${stepInput.Id}'.`, scope, source);
484
+ }
485
+ }
486
+ }
487
+ } finally {
488
+ disposeSafe(enumerator_1);
489
+ }
490
+ }
491
+ }
492
+ } finally {
493
+ disposeSafe(enumerator);
494
+ }
495
+ }
496
+ function wireWorkflowOutputs(state, scope, workflowNodeId, workflow) {
497
+ let enumerator = getEnumerator(workflow.Outputs);
498
+ try {
499
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
500
+ const output = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
501
+ let enumerator_1 = getEnumerator(output.GetOutputSources());
502
+ try {
503
+ while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
504
+ const outputSource = enumerator_1["System.Collections.Generic.IEnumerator`1.get_Current"]();
505
+ const parsedSource = ReferenceParsing_parseSourceReference(outputSource);
506
+ if (isNullOrWhiteSpace(parsedSource.PortId)) {
507
+ addDiagnostic(state, GraphIssueKind_InvalidReference(), `Workflow output '${output.Name}' has invalid outputSource '${outputSource}'.`, scope, outputSource);
508
+ } else {
509
+ let sourcePortId;
510
+ const matchValue = parsedSource.StepId;
511
+ sourcePortId = matchValue == null ? GraphId_portNodeId(workflowNodeId, PortDirection_Input(), parsedSource.PortId) : GraphId_portNodeId(GraphId_stepNodeId(scope, value(matchValue)), PortDirection_Output(), parsedSource.PortId);
512
+ const targetPortId = GraphId_portNodeId(workflowNodeId, PortDirection_Output(), output.Name);
513
+ if (hasNode(state, sourcePortId) && hasNode(state, targetPortId)) {
514
+ addEdgeByType(state, EdgeKind_BindsWorkflowOutput(), sourcePortId, targetPortId, void 0);
515
+ } else {
516
+ addDiagnostic(state, GraphIssueKind_MissingReference(), `Unable to wire workflow output '${output.Name}' from source '${outputSource}'.`, scope, outputSource);
517
+ }
518
+ }
519
+ }
520
+ } finally {
521
+ disposeSafe(enumerator_1);
522
+ }
523
+ }
524
+ } finally {
525
+ disposeSafe(enumerator);
526
+ }
527
+ }
528
+ function buildWorkflowSteps(state, scope, workflowFilePath, workflowNodeId, workflow) {
529
+ let enumerator = getEnumerator(workflow.Steps);
530
+ try {
531
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
532
+ const step = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
533
+ const stepNodeId = addStepNode(state, scope, workflowNodeId, step);
534
+ addStepPorts(state, stepNodeId, step);
535
+ addEdgeByType(state, EdgeKind_Calls(), stepNodeId, buildRunNode(state, GraphId_childScope(scope, `${step.Id}/run`), stepNodeId, workflowFilePath, step.Run)[1], "calls");
536
+ }
537
+ } finally {
538
+ disposeSafe(enumerator);
539
+ }
540
+ iterate((step_1) => {
541
+ wireStepInputs(state, scope, workflowNodeId, step_1);
542
+ }, workflow.Steps);
543
+ wireWorkflowOutputs(state, scope, workflowNodeId, workflow);
544
+ }
545
+ function buildWith(options, processingUnit) {
546
+ const rootScope = GraphId_normalizeSegment(options.RootScope);
547
+ const rootScope_1 = isNullOrWhiteSpace(rootScope) ? "root" : rootScope;
548
+ const state = createState(options, GraphId_unitNodeId(rootScope_1));
549
+ buildProcessingUnit(state, rootScope_1, options.RootWorkflowFilePath, void 0, true, processingUnit);
550
+ return state.Graph;
551
+ }
552
+ function build(processingUnit) {
553
+ return buildWith(WorkflowGraphBuildOptionsModule_defaultOptions, processingUnit);
554
+ }
555
+
556
+ export { BuildState, BuildState_$reflection, RunResolutionResult, RunResolutionResult_$reflection, addDiagnostic, addEdge, addEdgeByType, addExpressionToolPorts, addNode, addOperationPorts, addPortNode, addProcessingUnitNode, addStepNode, addStepPorts, addToolPorts, addWorkflowPorts, build, buildProcessingUnit, buildRunNode, buildWith, buildWorkflowSteps, chooseLabel, createGraph, createMetadata, createState, getRunPathCandidates, hasNode, isCwlReference, resolveRunString, trimToNameCandidate, tryBasenameNoCwlExtension, tryGetProcessingUnitName, wireStepInputs, wireWorkflowOutputs };