@nfdi4plants/arctrl 3.0.0-beta.3 → 3.0.0-beta.4

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 (380) hide show
  1. package/README.md +2 -0
  2. package/dist/ts/index.js +63 -0
  3. package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +354 -0
  4. package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +28 -0
  5. package/dist/ts/node_modules/@fable-org/fable-library-js/AsyncBuilder.js +186 -0
  6. package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +8 -0
  7. package/dist/ts/node_modules/@fable-org/fable-library-js/Boolean.js +24 -0
  8. package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +73 -0
  9. package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +31 -0
  10. package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +574 -0
  11. package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +59 -0
  12. package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +65 -0
  13. package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +30 -0
  14. package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +5 -0
  15. package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +5 -0
  16. package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +48 -0
  17. package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +120 -0
  18. package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +680 -0
  19. package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +40 -0
  20. package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +655 -0
  21. package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +105 -0
  22. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +320 -0
  23. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +204 -0
  24. package/dist/ts/node_modules/@fable-org/fable-library-js/Native.js +10 -0
  25. package/dist/ts/node_modules/@fable-org/fable-library-js/Numeric.js +73 -0
  26. package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +65 -0
  27. package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +23 -0
  28. package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +111 -0
  29. package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +114 -0
  30. package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +36 -0
  31. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +846 -0
  32. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +65 -0
  33. package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +1160 -0
  34. package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +364 -0
  35. package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +40 -0
  36. package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +193 -0
  37. package/dist/ts/node_modules/@fable-org/fable-library-js/Unicode.13.0.0.js +6 -0
  38. package/dist/ts/node_modules/@fable-org/fable-library-js/Uri.js +160 -0
  39. package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +367 -0
  40. package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +825 -0
  41. package/dist/ts/ts/ARC.js +914 -0
  42. package/dist/ts/ts/Contract/ARC.js +52 -0
  43. package/dist/ts/ts/Contract/ArcAssay.js +80 -0
  44. package/dist/ts/ts/Contract/ArcInvestigation.js +57 -0
  45. package/dist/ts/ts/Contract/ArcRun.js +76 -0
  46. package/dist/ts/ts/Contract/ArcStudy.js +76 -0
  47. package/dist/ts/ts/Contract/ArcWorkflow.js +77 -0
  48. package/dist/ts/ts/Contract/Contract.js +45 -0
  49. package/dist/ts/ts/Contract/Datamap.js +221 -0
  50. package/dist/ts/ts/Contract/Git.js +57 -0
  51. package/dist/ts/ts/Contract/ValidationPackagesConfig.js +57 -0
  52. package/dist/ts/ts/ContractIO/ContractIO.js +202 -0
  53. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -1
  54. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
  55. package/dist/ts/ts/ContractIO/FileSystemHelper.js +273 -0
  56. package/dist/ts/ts/Conversion.js +1247 -0
  57. package/dist/ts/ts/Core/ArcTypes.js +3393 -0
  58. package/dist/ts/ts/Core/Comment.js +91 -0
  59. package/dist/ts/ts/Core/CommentList.js +27 -0
  60. package/dist/ts/ts/Core/Conversion.js +923 -0
  61. package/dist/ts/ts/Core/Data.js +179 -0
  62. package/dist/ts/ts/Core/DataContext.js +108 -0
  63. package/dist/ts/ts/Core/DataFile.js +50 -0
  64. package/dist/ts/ts/Core/DataMap.js +53 -0
  65. package/dist/ts/ts/Core/Helper/Collections.js +323 -0
  66. package/dist/ts/ts/Core/Helper/HashCodes.js +35 -0
  67. package/dist/ts/ts/Core/Helper/Identifier.js +96 -0
  68. package/dist/ts/ts/Core/Helper/ORCID.js +34 -0
  69. package/dist/ts/ts/Core/Helper/Regex.js +296 -0
  70. package/dist/ts/ts/Core/Helper/SemVer.js +31 -0
  71. package/dist/ts/ts/Core/Helper/Url.js +32 -0
  72. package/dist/ts/ts/Core/IdentifierSetters.js +9 -0
  73. package/dist/ts/ts/Core/OntologyAnnotation.js +207 -0
  74. package/dist/ts/ts/Core/OntologySourceReference.js +84 -0
  75. package/dist/ts/ts/Core/Person.js +183 -0
  76. package/dist/ts/ts/Core/Process/ColumnIndex.js +73 -0
  77. package/dist/ts/ts/Core/Process/Component.js +121 -0
  78. package/dist/ts/ts/Core/Process/Factor.js +104 -0
  79. package/dist/ts/ts/Core/Process/FactorValue.js +68 -0
  80. package/dist/ts/ts/Core/Process/Material.js +49 -0
  81. package/dist/ts/ts/Core/Process/MaterialAttribute.js +30 -0
  82. package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +68 -0
  83. package/dist/ts/ts/Core/Process/MaterialType.js +28 -0
  84. package/dist/ts/ts/Core/Process/Process.js +136 -0
  85. package/dist/ts/ts/Core/Process/ProcessInput.js +207 -0
  86. package/dist/ts/ts/Core/Process/ProcessOutput.js +178 -0
  87. package/dist/ts/ts/Core/Process/ProcessParameterValue.js +135 -0
  88. package/dist/ts/ts/Core/Process/ProcessSequence.js +56 -0
  89. package/dist/ts/ts/Core/Process/Protocol.js +54 -0
  90. package/dist/ts/ts/Core/Process/ProtocolParameter.js +69 -0
  91. package/dist/ts/ts/Core/Process/Sample.js +44 -0
  92. package/dist/ts/ts/Core/Process/Source.js +38 -0
  93. package/dist/ts/ts/Core/Publication.js +108 -0
  94. package/dist/ts/ts/Core/Table/ArcTable.js +889 -0
  95. package/dist/ts/ts/Core/Table/ArcTableAux.js +993 -0
  96. package/dist/ts/ts/Core/Table/ArcTables.js +415 -0
  97. package/dist/ts/ts/Core/Table/CompositeCell.js +334 -0
  98. package/dist/ts/ts/Core/Table/CompositeColumn.js +52 -0
  99. package/dist/ts/ts/Core/Table/CompositeHeader.js +792 -0
  100. package/dist/ts/ts/Core/Template.js +180 -0
  101. package/dist/ts/ts/Core/Templates.js +75 -0
  102. package/dist/ts/ts/Core/URI.js +8 -0
  103. package/dist/ts/ts/Core/Value.js +194 -0
  104. package/dist/ts/ts/CrossAsync.js +20 -0
  105. package/dist/ts/ts/FileSystem/DefaultGitattributes.js +3 -0
  106. package/dist/ts/ts/FileSystem/DefaultGitignore.js +3 -0
  107. package/dist/ts/ts/FileSystem/FileSystem.js +48 -0
  108. package/dist/ts/ts/FileSystem/FileSystemTree.js +339 -0
  109. package/dist/ts/ts/FileSystem/Path.js +36 -0
  110. package/dist/ts/ts/Json/Assay.d.ts +1 -1
  111. package/dist/ts/ts/Json/Assay.js +221 -0
  112. package/dist/ts/ts/Json/Comment.d.ts +1 -1
  113. package/dist/ts/ts/Json/Comment.js +112 -0
  114. package/dist/ts/ts/Json/Data.d.ts +1 -1
  115. package/dist/ts/ts/Json/Data.js +138 -0
  116. package/dist/ts/ts/Json/DataFile.d.ts +1 -1
  117. package/dist/ts/ts/Json/DataFile.js +55 -0
  118. package/dist/ts/ts/Json/DataMap/DataContext.d.ts +1 -1
  119. package/dist/ts/ts/Json/DataMap/DataContext.js +39 -0
  120. package/dist/ts/ts/Json/DataMap/DataMap.d.ts +1 -1
  121. package/dist/ts/ts/Json/DataMap/DataMap.js +27 -0
  122. package/dist/ts/ts/Json/Decode.d.ts +2 -2
  123. package/dist/ts/ts/Json/Decode.js +209 -0
  124. package/dist/ts/ts/Json/Encode.d.ts +1 -1
  125. package/dist/ts/ts/Json/Encode.js +65 -0
  126. package/dist/ts/ts/Json/IDTable.d.ts +1 -1
  127. package/dist/ts/ts/Json/IDTable.js +28 -0
  128. package/dist/ts/ts/Json/Investigation.d.ts +1 -1
  129. package/dist/ts/ts/Json/Investigation.js +229 -0
  130. package/dist/ts/ts/Json/OntologyAnnotation.d.ts +1 -1
  131. package/dist/ts/ts/Json/OntologyAnnotation.js +194 -0
  132. package/dist/ts/ts/Json/OntologySourceReference.d.ts +1 -1
  133. package/dist/ts/ts/Json/OntologySourceReference.js +119 -0
  134. package/dist/ts/ts/Json/Person.d.ts +1 -1
  135. package/dist/ts/ts/Json/Person.js +316 -0
  136. package/dist/ts/ts/Json/Process/AssayMaterials.d.ts +1 -1
  137. package/dist/ts/ts/Json/Process/AssayMaterials.js +21 -0
  138. package/dist/ts/ts/Json/Process/Component.d.ts +1 -1
  139. package/dist/ts/ts/Json/Process/Component.js +41 -0
  140. package/dist/ts/ts/Json/Process/Factor.d.ts +1 -1
  141. package/dist/ts/ts/Json/Process/Factor.js +53 -0
  142. package/dist/ts/ts/Json/Process/FactorValue.d.ts +1 -1
  143. package/dist/ts/ts/Json/Process/FactorValue.js +44 -0
  144. package/dist/ts/ts/Json/Process/Material.d.ts +1 -1
  145. package/dist/ts/ts/Json/Process/Material.js +112 -0
  146. package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts +1 -1
  147. package/dist/ts/ts/Json/Process/MaterialAttribute.js +43 -0
  148. package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts +1 -1
  149. package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +44 -0
  150. package/dist/ts/ts/Json/Process/MaterialType.d.ts +1 -1
  151. package/dist/ts/ts/Json/Process/MaterialType.js +45 -0
  152. package/dist/ts/ts/Json/Process/Process.d.ts +1 -1
  153. package/dist/ts/ts/Json/Process/Process.js +103 -0
  154. package/dist/ts/ts/Json/Process/ProcessInput.d.ts +1 -1
  155. package/dist/ts/ts/Json/Process/ProcessInput.js +42 -0
  156. package/dist/ts/ts/Json/Process/ProcessOutput.d.ts +1 -1
  157. package/dist/ts/ts/Json/Process/ProcessOutput.js +35 -0
  158. package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts +1 -1
  159. package/dist/ts/ts/Json/Process/ProcessParameterValue.js +28 -0
  160. package/dist/ts/ts/Json/Process/Protocol.d.ts +1 -1
  161. package/dist/ts/ts/Json/Process/Protocol.js +166 -0
  162. package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +1 -1
  163. package/dist/ts/ts/Json/Process/ProtocolParameter.js +43 -0
  164. package/dist/ts/ts/Json/Process/Sample.d.ts +1 -1
  165. package/dist/ts/ts/Json/Process/Sample.js +165 -0
  166. package/dist/ts/ts/Json/Process/Source.d.ts +1 -1
  167. package/dist/ts/ts/Json/Process/Source.js +133 -0
  168. package/dist/ts/ts/Json/Process/StudyMaterials.d.ts +1 -1
  169. package/dist/ts/ts/Json/Process/StudyMaterials.js +23 -0
  170. package/dist/ts/ts/Json/Process/Value.d.ts +1 -1
  171. package/dist/ts/ts/Json/Process/Value.js +41 -0
  172. package/dist/ts/ts/Json/PropertyValue.d.ts +1 -1
  173. package/dist/ts/ts/Json/PropertyValue.js +280 -0
  174. package/dist/ts/ts/Json/Publication.d.ts +1 -1
  175. package/dist/ts/ts/Json/Publication.js +123 -0
  176. package/dist/ts/ts/Json/ROCrate/LDContext.d.ts +1 -1
  177. package/dist/ts/ts/Json/ROCrate/LDContext.js +115 -0
  178. package/dist/ts/ts/Json/ROCrate/LDGraph.d.ts +1 -1
  179. package/dist/ts/ts/Json/ROCrate/LDGraph.js +83 -0
  180. package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -1
  181. package/dist/ts/ts/Json/ROCrate/LDNode.js +190 -0
  182. package/dist/ts/ts/Json/ROCrate/LDRef.d.ts +1 -1
  183. package/dist/ts/ts/Json/ROCrate/LDRef.js +24 -0
  184. package/dist/ts/ts/Json/ROCrate/LDValue.d.ts +1 -1
  185. package/dist/ts/ts/Json/ROCrate/LDValue.js +63 -0
  186. package/dist/ts/ts/Json/StringTable.d.ts +1 -1
  187. package/dist/ts/ts/Json/StringTable.js +66 -0
  188. package/dist/ts/ts/Json/Study.d.ts +1 -1
  189. package/dist/ts/ts/Json/Study.js +326 -0
  190. package/dist/ts/ts/Json/Table/ArcTable.d.ts +1 -1
  191. package/dist/ts/ts/Json/Table/ArcTable.js +210 -0
  192. package/dist/ts/ts/Json/Table/CellTable.d.ts +1 -1
  193. package/dist/ts/ts/Json/Table/CellTable.js +53 -0
  194. package/dist/ts/ts/Json/Table/CompositeCell.d.ts +1 -1
  195. package/dist/ts/ts/Json/Table/CompositeCell.js +106 -0
  196. package/dist/ts/ts/Json/Table/CompositeHeader.d.ts +1 -1
  197. package/dist/ts/ts/Json/Table/CompositeHeader.js +121 -0
  198. package/dist/ts/ts/Json/Table/IOType.d.ts +1 -1
  199. package/dist/ts/ts/Json/Table/IOType.js +15 -0
  200. package/dist/ts/ts/Json/Table/OATable.d.ts +1 -1
  201. package/dist/ts/ts/Json/Table/OATable.js +50 -0
  202. package/dist/ts/ts/Json/Table/Templates.d.ts +1 -1
  203. package/dist/ts/ts/Json/Table/Templates.js +15 -0
  204. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.d.ts +1 -1
  205. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +61 -0
  206. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.d.ts +1 -1
  207. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +29 -0
  208. package/dist/ts/ts/Json/context/rocrate/isa_data_context.d.ts +1 -1
  209. package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +41 -0
  210. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.d.ts +1 -1
  211. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +69 -0
  212. package/dist/ts/ts/Json/context/rocrate/isa_material_context.d.ts +1 -1
  213. package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +37 -0
  214. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.d.ts +1 -1
  215. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +37 -0
  216. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.d.ts +1 -1
  217. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +41 -0
  218. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.d.ts +1 -1
  219. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +25 -0
  220. package/dist/ts/ts/Json/context/rocrate/isa_person_context.d.ts +1 -1
  221. package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +86 -0
  222. package/dist/ts/ts/Json/context/rocrate/isa_process_context.d.ts +1 -1
  223. package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +57 -0
  224. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.d.ts +1 -1
  225. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +61 -0
  226. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.d.ts +1 -1
  227. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +45 -0
  228. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.d.ts +1 -1
  229. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +33 -0
  230. package/dist/ts/ts/Json/context/rocrate/isa_source_context.d.ts +1 -1
  231. package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +33 -0
  232. package/dist/ts/ts/Json/context/rocrate/isa_study_context.d.ts +1 -1
  233. package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +77 -0
  234. package/dist/ts/ts/Json/context/rocrate/property_value_context.d.ts +1 -1
  235. package/dist/ts/ts/Json/context/rocrate/property_value_context.js +61 -0
  236. package/dist/ts/ts/Json/context/rocrate/rocrate_context.d.ts +1 -1
  237. package/dist/ts/ts/Json.js +171 -0
  238. package/dist/ts/ts/JsonIO/Assay.js +77 -0
  239. package/dist/ts/ts/JsonIO/Investigation.js +77 -0
  240. package/dist/ts/ts/JsonIO/LDObject.js +77 -0
  241. package/dist/ts/ts/JsonIO/OntologyAnnotation.js +56 -0
  242. package/dist/ts/ts/JsonIO/Study.js +77 -0
  243. package/dist/ts/ts/JsonIO/Table/Compression.d.ts +1 -1
  244. package/dist/ts/ts/JsonIO/Table/Compression.js +39 -0
  245. package/dist/ts/ts/JsonIO/Table/Templates.d.ts +1 -1
  246. package/dist/ts/ts/JsonIO/Table/Templates.js +25 -0
  247. package/dist/ts/ts/ROCrate/Generic/Comment.js +103 -0
  248. package/dist/ts/ts/ROCrate/Generic/Dataset.js +624 -0
  249. package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +103 -0
  250. package/dist/ts/ts/ROCrate/Generic/File.js +184 -0
  251. package/dist/ts/ts/ROCrate/Generic/LabProcess.js +222 -0
  252. package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +257 -0
  253. package/dist/ts/ts/ROCrate/Generic/Organization.js +63 -0
  254. package/dist/ts/ts/ROCrate/Generic/Person.js +377 -0
  255. package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +143 -0
  256. package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +512 -0
  257. package/dist/ts/ts/ROCrate/Generic/Sample.js +131 -0
  258. package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +173 -0
  259. package/dist/ts/ts/ROCrate/Helper.js +7 -0
  260. package/dist/ts/ts/ROCrate/LDContext.js +288 -0
  261. package/dist/ts/ts/ROCrate/LDObject.js +855 -0
  262. package/dist/ts/ts/ROCrate/ROCrateContext.js +39 -0
  263. package/dist/ts/ts/ROCrateIO.d.ts +1 -1
  264. package/dist/ts/ts/ROCrateIO.js +58 -0
  265. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +2 -2
  266. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  267. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +149 -0
  268. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +63 -0
  269. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +2 -2
  270. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  271. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +108 -0
  272. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +410 -0
  273. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts +2 -2
  274. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
  275. package/dist/ts/ts/Spreadsheet/ArcAssay.js +169 -0
  276. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts +2 -2
  277. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  278. package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +316 -0
  279. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts +2 -2
  280. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
  281. package/dist/ts/ts/Spreadsheet/ArcRun.js +136 -0
  282. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts +2 -2
  283. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
  284. package/dist/ts/ts/Spreadsheet/ArcStudy.js +92 -0
  285. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts +2 -2
  286. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
  287. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +125 -0
  288. package/dist/ts/ts/Spreadsheet/CollectionAux.js +34 -0
  289. package/dist/ts/ts/Spreadsheet/DataMap.d.ts +1 -1
  290. package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
  291. package/dist/ts/ts/Spreadsheet/DataMap.js +33 -0
  292. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts +2 -2
  293. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts.map +1 -1
  294. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +41 -0
  295. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts +1 -1
  296. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts.map +1 -1
  297. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +418 -0
  298. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts +3 -3
  299. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
  300. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +85 -0
  301. package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +90 -0
  302. package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +58 -0
  303. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +85 -0
  304. package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +133 -0
  305. package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +15 -0
  306. package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +74 -0
  307. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +58 -0
  308. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +62 -0
  309. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +94 -0
  310. package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +81 -0
  311. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +91 -0
  312. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts +3 -3
  313. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  314. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +193 -0
  315. package/dist/ts/ts/Spreadsheet/Metadata/Study.js +238 -0
  316. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +105 -0
  317. package/dist/ts/ts/Template.Web.js +22 -0
  318. package/dist/ts/ts/ValidationPackages/ValidationPackage.js +53 -0
  319. package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +78 -0
  320. package/dist/ts/ts/WebRequest/WebRequest.Node.js +13 -0
  321. package/dist/ts/ts/WebRequest/WebRequest.js +19 -0
  322. package/dist/ts/ts/Xlsx.d.ts +1 -1
  323. package/dist/ts/ts/Xlsx.d.ts.map +1 -1
  324. package/dist/ts/ts/Xlsx.js +91 -0
  325. package/dist/ts/ts/Yaml/Encode.js +8 -0
  326. package/dist/ts/ts/Yaml/ValidationPackage.js +26 -0
  327. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +40 -0
  328. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +344 -0
  329. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +103 -0
  330. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +19 -0
  331. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +17 -0
  332. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +7 -0
  333. package/dist/ts/ts/fable_modules/Fable.Exceljs.1.6.0/ExcelJs.fs.js +5 -0
  334. package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +18 -0
  335. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +44 -0
  336. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +5 -0
  337. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +142 -0
  338. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +76 -0
  339. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +359 -0
  340. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +344 -0
  341. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +154 -0
  342. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +116 -0
  343. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +126 -0
  344. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +135 -0
  345. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +422 -0
  346. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +5 -0
  347. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +25 -0
  348. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +28 -0
  349. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -0
  350. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +69 -0
  351. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +42 -0
  352. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +29 -0
  353. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +348 -0
  354. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +86 -0
  355. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +68 -0
  356. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +12 -0
  357. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +54 -0
  358. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +33 -0
  359. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +63 -0
  360. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +66 -0
  361. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +544 -0
  362. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +31 -0
  363. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +38 -0
  364. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +79 -0
  365. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Encode.fs.js +57 -0
  366. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +235 -0
  367. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +16 -0
  368. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +45 -0
  369. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +89 -0
  370. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +480 -0
  371. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +11 -0
  372. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +212 -0
  373. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +164 -0
  374. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +136 -0
  375. package/package.json +10 -7
  376. package/dist/ts/__vite-browser-external-2447137e.js +0 -4
  377. package/dist/ts/__vite-browser-external-b3701507.cjs +0 -1
  378. package/dist/ts/arctrl.cjs.js +0 -5691
  379. package/dist/ts/arctrl.es.js +0 -35562
  380. package/dist/ts/arctrl.umd.js +0 -5691
@@ -0,0 +1,57 @@
1
+ import { Contract, CLITool } from './Contract.js';
2
+ import { dgi } from '../FileSystem/DefaultGitignore.js';
3
+ import { dga } from '../FileSystem/DefaultGitattributes.js';
4
+ import { defaultArg, value } from '../../node_modules/@fable-org/fable-library-js/Option.js';
5
+ import { replace } from '../../node_modules/@fable-org/fable-library-js/String.js';
6
+ import { toArray, delay, append, singleton, empty } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
7
+
8
+ function gitWithArgs(arguments$) {
9
+ return CLITool.create("git", arguments$);
10
+ }
11
+ function createGitContract(arguments$) {
12
+ return Contract.createExecute(gitWithArgs(arguments$));
13
+ }
14
+ const gitignoreContract = Contract.createCreate(".gitignore", "PlainText", dgi);
15
+ const gitattributesContract = Contract.createCreate(".gitattributes", "PlainText", dga);
16
+ function Init_get_init() {
17
+ return "init";
18
+ }
19
+ function Init_get_branchFlag() {
20
+ return "-b";
21
+ }
22
+ function Init_get_remote() {
23
+ return "remote";
24
+ }
25
+ function Init_get_add() {
26
+ return "add";
27
+ }
28
+ function Init_get_origin() {
29
+ return "origin";
30
+ }
31
+ function Init_createInitContract_6DFDD678(branch) {
32
+ const branch_1 = defaultArg(branch, "main");
33
+ return createGitContract([Init_get_init(), Init_get_branchFlag(), branch_1]);
34
+ }
35
+ function Init_createAddRemoteContract_Z721C83C5(remoteUrl) {
36
+ return createGitContract([Init_get_remote(), Init_get_add(), Init_get_origin(), remoteUrl]);
37
+ }
38
+ function Clone_get_clone() {
39
+ return "clone";
40
+ }
41
+ function Clone_get_branchFlag() {
42
+ return "-b";
43
+ }
44
+ function Clone_get_noLFSConfig() {
45
+ return '-c "filter.lfs.smudge = git-lfs smudge --skip -- %f" -c "filter.lfs.process = git-lfs filter-process --skip"';
46
+ }
47
+ function Clone_formatRepoString(username, pass, url) {
48
+ return replace(url, "https://", "https://" + (username + ":" + pass + "@"));
49
+ }
50
+ function Clone_createCloneContract_5000466F(remoteUrl, merge, branch, token, nolfs) {
51
+ const nolfs_1 = defaultArg(nolfs, false);
52
+ const merge_1 = defaultArg(merge, false);
53
+ const remoteUrl_1 = token == null ? remoteUrl : Clone_formatRepoString(value(token)[0], value(token)[1], remoteUrl);
54
+ return createGitContract(toArray(delay(() => append(singleton(Clone_get_clone()), delay(() => append(nolfs_1 ? singleton(Clone_get_noLFSConfig()) : empty(), delay(() => append(branch != null ? singleton(Clone_get_branchFlag()) : empty(), delay(() => append(branch != null ? singleton(value(branch)) : empty(), delay(() => append(singleton(remoteUrl_1), delay(() => merge_1 ? singleton(".") : empty())))))))))))));
55
+ }
56
+
57
+ export { Clone_createCloneContract_5000466F, Clone_formatRepoString, Clone_get_branchFlag, Clone_get_clone, Clone_get_noLFSConfig, Init_createAddRemoteContract_Z721C83C5, Init_createInitContract_6DFDD678, Init_get_add, Init_get_branchFlag, Init_get_init, Init_get_origin, Init_get_remote, createGitContract, gitWithArgs, gitattributesContract, gitignoreContract };
@@ -0,0 +1,57 @@
1
+ import { combineMany } from '../FileSystem/Path.js';
2
+ import { Contract } from './Contract.js';
3
+ import { value } from '../../node_modules/@fable-org/fable-library-js/Option.js';
4
+ import { ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_fromYamlString_Static_Z721C83C5, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toYamlString_Static_71136F3F } from '../Yaml/ValidationPackagesConfig.js';
5
+
6
+ const ValidationPackagesConfigHelper_ConfigFilePath = combineMany([".arc", "validation_packages.yml"]);
7
+ const ValidationPackagesConfigHelper_ReadContract = new Contract("READ", ValidationPackagesConfigHelper_ConfigFilePath, "YAML", void 0);
8
+ function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToCreateContract(this$) {
9
+ return Contract.createCreate(ValidationPackagesConfigHelper_ConfigFilePath, "YAML", ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toYamlString_Static_71136F3F()(this$));
10
+ }
11
+ function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToDeleteContract(this$) {
12
+ return Contract.createDelete(ValidationPackagesConfigHelper_ConfigFilePath);
13
+ }
14
+ function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55(config) {
15
+ return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToDeleteContract();
16
+ }
17
+ function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55(config) {
18
+ return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToCreateContract(config);
19
+ }
20
+ function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F(c) {
21
+ let matchResult, yaml_1;
22
+ if (c.Operation === "READ") {
23
+ if (c.DTOType != null) {
24
+ if (value(c.DTOType) === "YAML") {
25
+ if (c.DTO != null) {
26
+ if (typeof value(c.DTO) === "string") {
27
+ if (value(c.DTO), c.Path === ValidationPackagesConfigHelper_ConfigFilePath) {
28
+ matchResult = 0;
29
+ c.Path;
30
+ yaml_1 = value(c.DTO);
31
+ } else {
32
+ matchResult = 1;
33
+ }
34
+ } else {
35
+ matchResult = 1;
36
+ }
37
+ } else {
38
+ matchResult = 1;
39
+ }
40
+ } else {
41
+ matchResult = 1;
42
+ }
43
+ } else {
44
+ matchResult = 1;
45
+ }
46
+ } else {
47
+ matchResult = 1;
48
+ }
49
+ switch (matchResult) {
50
+ case 0:
51
+ return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_fromYamlString_Static_Z721C83C5(yaml_1);
52
+ default:
53
+ return void 0;
54
+ }
55
+ }
56
+
57
+ export { ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToCreateContract, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToDeleteContract, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F, ValidationPackagesConfigHelper_ConfigFilePath, ValidationPackagesConfigHelper_ReadContract };
@@ -0,0 +1,202 @@
1
+ import { startSequential, catchWith } from '../CrossAsync.js';
2
+ import { toText, printf } from '../../node_modules/@fable-org/fable-library-js/String.js';
3
+ import { FSharpResult$2_Ok, FSharpResult$2_Error } from '../../node_modules/@fable-org/fable-library-js/Result.js';
4
+ import { Contract } from '../Contract/Contract.js';
5
+ import { PromiseBuilder__Run_212F1D4B, PromiseBuilder__Delay_62FBFDE1 } from '../fable_modules/Fable.Promise.3.2.0/Promise.fs.js';
6
+ import { promise } from '../fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js';
7
+ import { value } from '../../node_modules/@fable-org/fable-library-js/Option.js';
8
+ import { combine } from '../FileSystem/Path.js';
9
+ import { readFileTextAsync, readFileXlsxAsync, ensureDirectoryOfFileAsync, writeFileTextAsync, writeFileXlsxAsync, deleteFileOrDirectoryAsync, renameFileOrDirectoryAsync } from './FileSystemHelper.js';
10
+ import { curry2 } from '../../node_modules/@fable-org/fable-library-js/Util.js';
11
+ import { fold, append } from '../../node_modules/@fable-org/fable-library-js/Array.js';
12
+
13
+ function fulfillReadContractAsync(basePath, c) {
14
+ return catchWith((e_1) => {
15
+ let arg_4;
16
+ return FSharpResult$2_Error((arg_4 = e_1.message, toText(printf("Error reading contract %s: %s"))(c.Path)(arg_4)));
17
+ }, PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => PromiseBuilder__Delay_62FBFDE1(promise, () => {
18
+ const matchValue = c.DTOType;
19
+ let matchResult;
20
+ if (matchValue != null) {
21
+ switch (value(matchValue)) {
22
+ case "ISA_Assay":
23
+ case "ISA_Investigation":
24
+ case "ISA_Study":
25
+ case "ISA_Workflow":
26
+ case "ISA_Run":
27
+ case "ISA_Datamap": {
28
+ matchResult = 0;
29
+ break;
30
+ }
31
+ case "PlainText": {
32
+ matchResult = 1;
33
+ break;
34
+ }
35
+ default:
36
+ matchResult = 2;
37
+ }
38
+ } else {
39
+ matchResult = 2;
40
+ }
41
+ switch (matchResult) {
42
+ case 0: {
43
+ const path = combine(basePath, c.Path);
44
+ return readFileXlsxAsync(path).then((_arg) => {
45
+ const dto = _arg;
46
+ return Promise.resolve(FSharpResult$2_Ok(new Contract(c.Operation, c.Path, c.DTOType, dto)));
47
+ });
48
+ }
49
+ case 1: {
50
+ const path_1 = combine(basePath, c.Path);
51
+ return readFileTextAsync(path_1).then((_arg_1) => Promise.resolve(FSharpResult$2_Ok(new Contract(c.Operation, c.Path, c.DTOType, _arg_1))));
52
+ }
53
+ default:
54
+ return Promise.resolve(FSharpResult$2_Error(toText(printf("Contract %s is neither an ISA nor a freetext contract"))(c.Path)));
55
+ }
56
+ }).catch((_arg_2) => {
57
+ let arg_2;
58
+ return Promise.resolve(FSharpResult$2_Error((arg_2 = _arg_2.message, toText(printf("Error reading contract %s: %s"))(c.Path)(arg_2))));
59
+ }))));
60
+ }
61
+ function fullfillContractBatchAsyncBy(contractF, basePath, cs) {
62
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => startSequential(curry2(contractF)(basePath), cs).then((_arg) => {
63
+ const res = fold((acc, cr) => {
64
+ const copyOfStruct = acc;
65
+ if (copyOfStruct.tag === /* Error */
66
+ 1) {
67
+ const copyOfStruct_1 = cr;
68
+ if (copyOfStruct_1.tag === /* Error */
69
+ 1) {
70
+ const acc_2 = copyOfStruct.fields[0];
71
+ const e_1 = copyOfStruct_1.fields[0];
72
+ return FSharpResult$2_Error(append(acc_2, [e_1]));
73
+ } else {
74
+ const e = copyOfStruct.fields[0];
75
+ return FSharpResult$2_Error(e);
76
+ }
77
+ } else {
78
+ const copyOfStruct_2 = cr;
79
+ if (copyOfStruct_2.tag === /* Error */
80
+ 1) {
81
+ const e_2 = copyOfStruct_2.fields[0];
82
+ return FSharpResult$2_Error([e_2]);
83
+ } else {
84
+ const acc_1 = copyOfStruct.fields[0];
85
+ const cr_1 = copyOfStruct_2.fields[0];
86
+ return FSharpResult$2_Ok(append(acc_1, [cr_1]));
87
+ }
88
+ }
89
+ }, FSharpResult$2_Ok([]), _arg);
90
+ return Promise.resolve(res);
91
+ })));
92
+ }
93
+ function fulfillWriteContractAsync(basePath, c) {
94
+ return catchWith((e_1) => {
95
+ let arg_4;
96
+ return FSharpResult$2_Error((arg_4 = e_1.message, toText(printf("Error writing contract %s: %s"))(c.Path)(arg_4)));
97
+ }, PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => PromiseBuilder__Delay_62FBFDE1(promise, () => {
98
+ const matchValue = c.DTO;
99
+ if (matchValue == null) {
100
+ const path_2 = combine(basePath, c.Path);
101
+ return ensureDirectoryOfFileAsync(path_2).then(() => writeFileTextAsync(path_2, "").then(() => Promise.resolve(FSharpResult$2_Ok(c))));
102
+ } else if (typeof value(matchValue) === "string") {
103
+ const t = value(matchValue);
104
+ const path = combine(basePath, c.Path);
105
+ return ensureDirectoryOfFileAsync(path).then(() => writeFileTextAsync(path, t).then(() => Promise.resolve(FSharpResult$2_Ok(c))));
106
+ } else {
107
+ const wb = value(matchValue);
108
+ const path_1 = combine(basePath, c.Path);
109
+ return ensureDirectoryOfFileAsync(path_1).then(() => writeFileXlsxAsync(path_1, wb).then(() => Promise.resolve(FSharpResult$2_Ok(c))));
110
+ }
111
+ }).catch((_arg_6) => {
112
+ let arg_2;
113
+ return Promise.resolve(FSharpResult$2_Error((arg_2 = _arg_6.message, toText(printf("Error writing contract %s: %s"))(c.Path)(arg_2))));
114
+ }))));
115
+ }
116
+ function fulfillUpdateContractAsync(basePath, c) {
117
+ return catchWith((e_1) => {
118
+ let arg_4;
119
+ return FSharpResult$2_Error((arg_4 = e_1.message, toText(printf("Error updating contract %s: %s"))(c.Path)(arg_4)));
120
+ }, PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => PromiseBuilder__Delay_62FBFDE1(promise, () => {
121
+ const matchValue = c.DTO;
122
+ if (matchValue == null) {
123
+ const path_2 = combine(basePath, c.Path);
124
+ return ensureDirectoryOfFileAsync(path_2).then(() => writeFileTextAsync(path_2, "").then(() => Promise.resolve(FSharpResult$2_Ok(c))));
125
+ } else if (typeof value(matchValue) === "string") {
126
+ const t = value(matchValue);
127
+ const path = combine(basePath, c.Path);
128
+ return ensureDirectoryOfFileAsync(path).then(() => writeFileTextAsync(path, t).then(() => Promise.resolve(FSharpResult$2_Ok(c))));
129
+ } else {
130
+ const wb = value(matchValue);
131
+ const path_1 = combine(basePath, c.Path);
132
+ return ensureDirectoryOfFileAsync(path_1).then(() => writeFileXlsxAsync(path_1, wb).then(() => Promise.resolve(FSharpResult$2_Ok(c))));
133
+ }
134
+ }).catch((_arg_6) => {
135
+ let arg_2;
136
+ return Promise.resolve(FSharpResult$2_Error((arg_2 = _arg_6.message, toText(printf("Error updating contract %s: %s"))(c.Path)(arg_2))));
137
+ }))));
138
+ }
139
+ function fullfillRenameContractAsync(basePath, c) {
140
+ return catchWith((e_1) => {
141
+ let arg_5;
142
+ return FSharpResult$2_Error((arg_5 = e_1.message, toText(printf("Error renaming contract %s: %s"))(c.Path)(arg_5)));
143
+ }, PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => PromiseBuilder__Delay_62FBFDE1(promise, () => {
144
+ const matchValue = c.DTO;
145
+ let matchResult, t_2;
146
+ if (matchValue != null) {
147
+ if (typeof value(matchValue) === "string") {
148
+ if (value(matchValue) === c.Path) {
149
+ matchResult = 0;
150
+ value(matchValue);
151
+ } else {
152
+ matchResult = 1;
153
+ t_2 = value(matchValue);
154
+ }
155
+ } else {
156
+ matchResult = 2;
157
+ }
158
+ } else {
159
+ matchResult = 2;
160
+ }
161
+ switch (matchResult) {
162
+ case 0:
163
+ return Promise.resolve(FSharpResult$2_Error(toText(printf("Rename Contract %s old and new Path are the same"))(c.Path)));
164
+ case 1: {
165
+ const newPath = combine(basePath, t_2);
166
+ const oldPath = combine(basePath, c.Path);
167
+ return renameFileOrDirectoryAsync(oldPath, newPath).then(() => Promise.resolve(FSharpResult$2_Ok(c)));
168
+ }
169
+ default:
170
+ return Promise.resolve(FSharpResult$2_Error(toText(printf("Rename Contract %s does not contain new Path"))(c.Path)));
171
+ }
172
+ }).catch((_arg_1) => {
173
+ let arg_3;
174
+ return Promise.resolve(FSharpResult$2_Error((arg_3 = _arg_1.message, toText(printf("Error renaming contract %s: %s"))(c.Path)(arg_3))));
175
+ }))));
176
+ }
177
+ function fullfillDeleteContractAsync(basePath, c) {
178
+ return catchWith((e_1) => {
179
+ let arg_3;
180
+ return FSharpResult$2_Error((arg_3 = e_1.message, toText(printf("Error deleting contract %s: %s"))(c.Path)(arg_3)));
181
+ }, PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => PromiseBuilder__Delay_62FBFDE1(promise, () => {
182
+ const path = combine(basePath, c.Path);
183
+ return deleteFileOrDirectoryAsync(path).then(() => Promise.resolve(FSharpResult$2_Ok(c)));
184
+ }).catch((_arg_1) => {
185
+ let arg_1;
186
+ return Promise.resolve(FSharpResult$2_Error((arg_1 = _arg_1.message, toText(printf("Error deleting contract %s: %s"))(c.Path)(arg_1))));
187
+ }))));
188
+ }
189
+ function fullFillContract(basePath, c) {
190
+ return catchWith((e) => {
191
+ let arg_2;
192
+ return FSharpResult$2_Error((arg_2 = e.message, toText(printf("Error fulfilling contract %s: %s"))(c.Path)(arg_2)));
193
+ }, PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => {
194
+ const matchValue = c.Operation;
195
+ return matchValue === "READ" ? fulfillReadContractAsync(basePath, c) : matchValue === "CREATE" ? fulfillWriteContractAsync(basePath, c) : matchValue === "UPDATE" ? fulfillUpdateContractAsync(basePath, c) : matchValue === "DELETE" ? fullfillDeleteContractAsync(basePath, c) : matchValue === "RENAME" ? fullfillRenameContractAsync(basePath, c) : Promise.resolve(FSharpResult$2_Error(toText(printf("Operation %A not supported"))(c.Operation)));
196
+ })));
197
+ }
198
+ function fullFillContractBatchAsync(basePath, cs) {
199
+ return fullfillContractBatchAsyncBy(fullFillContract, basePath, cs);
200
+ }
201
+
202
+ export { fulfillReadContractAsync, fulfillUpdateContractAsync, fulfillWriteContractAsync, fullFillContract, fullFillContractBatchAsync, fullfillContractBatchAsyncBy, fullfillDeleteContractAsync, fullfillRenameContractAsync };
@@ -1,6 +1,6 @@
1
1
  import { Option } from '@fable-org/fable-library-js/Option.js';
2
2
  import { uint8 } from '@fable-org/fable-library-js/Int32.js';
3
- import { FsWorkbook } from '../fable_modules/FsSpreadsheet.6.3.1/FsWorkbook.fs.js';
3
+ import { FsWorkbook } from '../fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js';
4
4
  export declare function FS_stat_Z721C83C5(path: string): Promise<any>;
5
5
  export declare function FS_mkdir(path: string, options: any): Promise<Option<string>>;
6
6
  export declare function FS_readdir(path: string, options: any): Promise<any[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"FileSystemHelper.d.ts","sourceRoot":"","sources":["../../../../src/ARCtrl/ts/ContractIO/FileSystemHelper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GAAG,OAAO,CAAC,IAAI,CAAC,CAYtE"}
@@ -0,0 +1,273 @@
1
+ import { PromiseBuilder__Run_212F1D4B, PromiseBuilder__Delay_62FBFDE1 } from '../fable_modules/Fable.Promise.3.2.0/Promise.fs.js';
2
+ import { promise } from '../fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js';
3
+ import { FsSpreadsheet_FsWorkbook__FsWorkbook_fromXlsxFile_Static_Z721C83C5, FsSpreadsheet_FsWorkbook__FsWorkbook_toXlsxFile_Static } from '../fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js';
4
+ import { replace, substring, trim as trim$1 } from '../../node_modules/@fable-org/fable-library-js/String.js';
5
+ import { map, choose } from '../../node_modules/@fable-org/fable-library-js/Array.js';
6
+ import { toArray, isEmpty, empty, append, map as map$1, concat } from '../../node_modules/@fable-org/fable-library-js/Seq.js';
7
+ import { all } from '../CrossAsync.js';
8
+
9
+ function FS_stat_Z721C83C5(path) {
10
+ const props = path;
11
+ return (async () => {
12
+ if (typeof process !== "undefined" && process.versions?.node) {
13
+ const dynImport = await import('fs/promises');
14
+ const args = Array.isArray(props) ? props : [props];
15
+ return await dynImport["stat"].apply(null, args);
16
+ } else {
17
+ throw new Error(`${"stat"} is not available in the browser.`);
18
+ }
19
+ })();
20
+ }
21
+ function FS_mkdir(path, options) {
22
+ const props = [path, options];
23
+ return (async () => {
24
+ if (typeof process !== "undefined" && process.versions?.node) {
25
+ const dynImport = await import('fs/promises');
26
+ const args = Array.isArray(props) ? props : [props];
27
+ return await dynImport["mkdir"].apply(null, args);
28
+ } else {
29
+ throw new Error(`${"mkdir"} is not available in the browser.`);
30
+ }
31
+ })();
32
+ }
33
+ function FS_readdir(path, options) {
34
+ const props = [path, options];
35
+ return (async () => {
36
+ if (typeof process !== "undefined" && process.versions?.node) {
37
+ const dynImport = await import('fs/promises');
38
+ const args = Array.isArray(props) ? props : [props];
39
+ return await dynImport["readdir"].apply(null, args);
40
+ } else {
41
+ throw new Error(`${"readdir"} is not available in the browser.`);
42
+ }
43
+ })();
44
+ }
45
+ function FS_rename(oldName, newName) {
46
+ const props = [oldName, newName];
47
+ return (async () => {
48
+ if (typeof process !== "undefined" && process.versions?.node) {
49
+ const dynImport = await import('fs/promises');
50
+ const args = Array.isArray(props) ? props : [props];
51
+ return await dynImport["rename"].apply(null, args);
52
+ } else {
53
+ throw new Error(`${"rename"} is not available in the browser.`);
54
+ }
55
+ })();
56
+ }
57
+ function FS_unlink_Z721C83C5(path) {
58
+ const props = path;
59
+ return (async () => {
60
+ if (typeof process !== "undefined" && process.versions?.node) {
61
+ const dynImport = await import('fs/promises');
62
+ const args = Array.isArray(props) ? props : [props];
63
+ return await dynImport["unlink"].apply(null, args);
64
+ } else {
65
+ throw new Error(`${"unlink"} is not available in the browser.`);
66
+ }
67
+ })();
68
+ }
69
+ function FS_rm(path, options) {
70
+ const props = [path, options];
71
+ return (async () => {
72
+ if (typeof process !== "undefined" && process.versions?.node) {
73
+ const dynImport = await import('fs/promises');
74
+ const args = Array.isArray(props) ? props : [props];
75
+ return await dynImport["rm"].apply(null, args);
76
+ } else {
77
+ throw new Error(`${"rm"} is not available in the browser.`);
78
+ }
79
+ })();
80
+ }
81
+ function FS_readFile(path, encoding) {
82
+ const props = [path, encoding];
83
+ return (async () => {
84
+ if (typeof process !== "undefined" && process.versions?.node) {
85
+ const dynImport = await import('fs/promises');
86
+ const args = Array.isArray(props) ? props : [props];
87
+ return await dynImport["readFile"].apply(null, args);
88
+ } else {
89
+ throw new Error(`${"readFile"} is not available in the browser.`);
90
+ }
91
+ })();
92
+ }
93
+ function FS_writeFile(path, fileContent, encoding) {
94
+ const props = [path, fileContent, encoding];
95
+ return (async () => {
96
+ if (typeof process !== "undefined" && process.versions?.node) {
97
+ const dynImport = await import('fs/promises');
98
+ const args = Array.isArray(props) ? props : [props];
99
+ return await dynImport["writeFile"].apply(null, args);
100
+ } else {
101
+ throw new Error(`${"writeFile"} is not available in the browser.`);
102
+ }
103
+ })();
104
+ }
105
+ function FS_readFileText_Z721C83C5(path) {
106
+ return FS_readFile(path, "utf-8");
107
+ }
108
+ function FS_writeFileText(path, text) {
109
+ return FS_writeFile(path, text, "utf-8");
110
+ }
111
+ function PathModule_dirname_Z721C83C5(path) {
112
+ const props = path;
113
+ return (async () => {
114
+ if (typeof process !== "undefined" && process.versions?.node) {
115
+ const dynImport = await import('path');
116
+ const args = Array.isArray(props) ? props : [props];
117
+ return await dynImport["dirname"].apply(null, args);
118
+ } else {
119
+ throw new Error(`${"dirname"} is not available in the browser.`);
120
+ }
121
+ })();
122
+ }
123
+ function PathModule_join_Z35CD86D0(paths) {
124
+ const props = paths;
125
+ return (async () => {
126
+ if (typeof process !== "undefined" && process.versions?.node) {
127
+ const dynImport = await import('path');
128
+ const args = Array.isArray(props) ? props : [props];
129
+ return await dynImport["join"].apply(null, args);
130
+ } else {
131
+ throw new Error(`${"join"} is not available in the browser.`);
132
+ }
133
+ })();
134
+ }
135
+ function directoryExistsAsync(path) {
136
+ const pr = PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => FS_stat_Z721C83C5(path).then((_arg) => Promise.resolve(_arg.isDirectory()))));
137
+ return pr.catch((_arg_1) => false);
138
+ }
139
+ function createDirectoryAsync(path) {
140
+ const pr = FS_mkdir(path, {
141
+ recursive: true
142
+ });
143
+ return pr.then((value) => {
144
+ });
145
+ }
146
+ function ensureDirectoryAsync(path) {
147
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => directoryExistsAsync(path).then((_arg) => !_arg ? createDirectoryAsync(path) : Promise.resolve())));
148
+ }
149
+ function ensureDirectoryOfFileAsync(filePath) {
150
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => PathModule_dirname_Z721C83C5(filePath).then((_arg) => ensureDirectoryAsync(_arg))));
151
+ }
152
+ function fileExistsAsync(path) {
153
+ const pr = PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => FS_stat_Z721C83C5(path).then((_arg) => Promise.resolve(_arg.isFile()))));
154
+ return pr.catch((_arg_1) => false);
155
+ }
156
+ function readFileTextAsync(path) {
157
+ return FS_readFileText_Z721C83C5(path);
158
+ }
159
+ function readFileXlsxAsync(path) {
160
+ return FsSpreadsheet_FsWorkbook__FsWorkbook_fromXlsxFile_Static_Z721C83C5(path);
161
+ }
162
+ function moveFileAsync(oldPath, newPath) {
163
+ return FS_rename(oldPath, newPath);
164
+ }
165
+ function moveDirectoryAsync(oldPath, newPath) {
166
+ return FS_rename(oldPath, newPath);
167
+ }
168
+ function deleteFileAsync(path) {
169
+ return FS_unlink_Z721C83C5(path);
170
+ }
171
+ function deleteDirectoryAsync(path) {
172
+ return FS_rm(path, {
173
+ force: true,
174
+ recursive: true
175
+ });
176
+ }
177
+ function writeFileTextAsync(path, text) {
178
+ return FS_writeFileText(path, text);
179
+ }
180
+ function writeFileXlsxAsync(path, wb) {
181
+ return FsSpreadsheet_FsWorkbook__FsWorkbook_toXlsxFile_Static(path, wb);
182
+ }
183
+ function trim(path) {
184
+ if (path.startsWith("./")) {
185
+ return trim$1(replace(path, "./", ""), "/");
186
+ } else {
187
+ return trim$1(path, "/");
188
+ }
189
+ }
190
+ function makeRelative(directoryPath, path) {
191
+ if ((directoryPath === "." ? true : directoryPath === "/") ? true : directoryPath === "") {
192
+ return path;
193
+ } else {
194
+ const directoryPath_1 = trim(directoryPath);
195
+ const path_1 = trim(path);
196
+ if (path_1.startsWith(directoryPath_1)) {
197
+ return substring(path_1, directoryPath_1.length);
198
+ } else {
199
+ return path_1;
200
+ }
201
+ }
202
+ }
203
+ function standardizeSlashes(path) {
204
+ return replace(path, "\\", "/");
205
+ }
206
+ function getSubDirectoriesAsync(path) {
207
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => FS_readdir(path, {
208
+ withFileTypes: true
209
+ }).then((_arg) => {
210
+ let pr;
211
+ return (pr = choose((entry) => {
212
+ if (entry.isDirectory()) {
213
+ return PathModule_join_Z35CD86D0([path, entry.name]);
214
+ } else {
215
+ return void 0;
216
+ }
217
+ }, _arg), Promise.all(pr)).then((_arg_1) => Promise.resolve(map(standardizeSlashes, _arg_1)));
218
+ })));
219
+ }
220
+ function getSubFilesAsync(path) {
221
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => FS_readdir(path, {
222
+ withFileTypes: true
223
+ }).then((_arg) => {
224
+ let pr;
225
+ return (pr = choose((entry) => {
226
+ if (entry.isFile()) {
227
+ return PathModule_join_Z35CD86D0([path, entry.name]);
228
+ } else {
229
+ return void 0;
230
+ }
231
+ }, _arg), Promise.all(pr)).then((_arg_1) => Promise.resolve(map(standardizeSlashes, _arg_1)));
232
+ })));
233
+ }
234
+ function getAllFilePathsAsync(directoryPath) {
235
+ const directoryPath_1 = standardizeSlashes(directoryPath);
236
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => {
237
+ const allFiles = (dirs) => PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => isEmpty(dirs) ? Promise.resolve(empty()) : all(map$1(getSubFilesAsync, dirs)).then((_arg) => {
238
+ const subFiles_1 = concat(_arg);
239
+ return all(map$1(getSubDirectoriesAsync, dirs)).then((_arg_1) => all(map$1(allFiles, _arg_1)).then((_arg_2) => {
240
+ const subDirContents_1 = concat(_arg_2);
241
+ return Promise.resolve(append(subDirContents_1, subFiles_1));
242
+ }));
243
+ })));
244
+ return allFiles([directoryPath_1]).then((_arg_3) => {
245
+ const allFilesRelative = map((arg_2) => standardizeSlashes(makeRelative(directoryPath_1, arg_2)), toArray(_arg_3));
246
+ return Promise.resolve(allFilesRelative);
247
+ });
248
+ }));
249
+ }
250
+ function renameFileOrDirectoryAsync(oldPath, newPath) {
251
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => fileExistsAsync(oldPath).then((_arg) => directoryExistsAsync(oldPath).then((_arg_1) => {
252
+ if (_arg) {
253
+ return moveFileAsync(oldPath, newPath);
254
+ } else if (_arg_1) {
255
+ return moveDirectoryAsync(oldPath, newPath);
256
+ } else {
257
+ return Promise.resolve();
258
+ }
259
+ }))));
260
+ }
261
+ function deleteFileOrDirectoryAsync(path) {
262
+ return PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => fileExistsAsync(path).then((_arg) => directoryExistsAsync(path).then((_arg_1) => {
263
+ if (_arg) {
264
+ return deleteFileAsync(path);
265
+ } else if (_arg_1) {
266
+ return deleteDirectoryAsync(path);
267
+ } else {
268
+ return Promise.resolve();
269
+ }
270
+ }))));
271
+ }
272
+
273
+ export { FS_mkdir, FS_readFile, FS_readFileText_Z721C83C5, FS_readdir, FS_rename, FS_rm, FS_stat_Z721C83C5, FS_unlink_Z721C83C5, FS_writeFile, FS_writeFileText, PathModule_dirname_Z721C83C5, PathModule_join_Z35CD86D0, createDirectoryAsync, deleteDirectoryAsync, deleteFileAsync, deleteFileOrDirectoryAsync, directoryExistsAsync, ensureDirectoryAsync, ensureDirectoryOfFileAsync, fileExistsAsync, getAllFilePathsAsync, getSubDirectoriesAsync, getSubFilesAsync, makeRelative, moveDirectoryAsync, moveFileAsync, readFileTextAsync, readFileXlsxAsync, renameFileOrDirectoryAsync, standardizeSlashes, trim, writeFileTextAsync, writeFileXlsxAsync };