@mat3ra/esse 2024.2.6-0 → 2024.2.19-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (964) hide show
  1. package/.eslintrc.json +9 -1
  2. package/.mocharc.json +5 -0
  3. package/build_schemas.js +7 -32
  4. package/compile_ts.ts +3 -0
  5. package/example/models_directory/re.json +1 -0
  6. package/example/workflow/subworkflow.json +1 -1
  7. package/example/workflow.json +2 -1
  8. package/lib/js/esse/JSONSchemasGenerator.d.ts +20 -0
  9. package/lib/js/esse/JSONSchemasGenerator.js +64 -0
  10. package/lib/js/esse/JSONSchemasInterface.d.ts +31 -0
  11. package/lib/js/esse/JSONSchemasInterface.js +48 -0
  12. package/lib/js/esse/JSONSchemasInterfaceServer.d.ts +9 -0
  13. package/lib/js/esse/JSONSchemasInterfaceServer.js +46 -0
  14. package/lib/js/esse/schemaUtils.d.ts +4 -0
  15. package/lib/js/esse/schemaUtils.js +13 -74
  16. package/lib/js/esse/settings.d.ts +3 -0
  17. package/lib/js/esse/settings.js +9 -21
  18. package/lib/js/esse/types.d.ts +3 -0
  19. package/lib/js/esse/types.js +2 -0
  20. package/lib/js/esse/utils.d.ts +14 -0
  21. package/lib/js/esse/utils.js +42 -62
  22. package/lib/js/example/3pse/file/applications/espresso/7.2/pw.x.json +94 -0
  23. package/lib/js/example/core/abstract/2d_data.json +19 -0
  24. package/lib/js/example/core/abstract/2d_plot.json +26 -0
  25. package/lib/js/example/core/abstract/3d_grid.json +12 -0
  26. package/lib/js/example/core/abstract/3d_tensor.json +17 -0
  27. package/lib/js/example/core/abstract/3d_vector_basis.json +17 -0
  28. package/lib/js/example/core/abstract/point.json +5 -0
  29. package/lib/js/example/core/abstract/vector.json +5 -0
  30. package/lib/js/example/core/primitive/1d_data_series.json +12 -0
  31. package/lib/js/example/core/primitive/3d_lattice.json +8 -0
  32. package/lib/js/example/core/primitive/array_of_3_booleans.json +5 -0
  33. package/lib/js/example/core/primitive/array_of_3_numbers.json +5 -0
  34. package/lib/js/example/core/primitive/array_of_ids.json +8 -0
  35. package/lib/js/example/core/primitive/axis.json +4 -0
  36. package/lib/js/example/core/primitive/scalar.json +3 -0
  37. package/lib/js/example/core/primitive/string.json +3 -0
  38. package/lib/js/example/core/reference/experiment/condition.json +12 -0
  39. package/lib/js/example/core/reference/experiment/location.json +4 -0
  40. package/lib/js/example/core/reference/experiment.json +38 -0
  41. package/lib/js/example/core/reference/literature/name.json +5 -0
  42. package/lib/js/example/core/reference/literature/pages.json +4 -0
  43. package/lib/js/example/core/reference/literature.json +10 -0
  44. package/lib/js/example/core/reference/modeling/exabyte.json +9 -0
  45. package/lib/js/example/core/reference/modeling.json +9 -0
  46. package/lib/js/example/core/reference.json +9 -0
  47. package/lib/js/example/core/reusable/atomic_vectors.json +18 -0
  48. package/lib/js/example/core/reusable/band_gap.json +16 -0
  49. package/lib/js/example/core/reusable/energy.json +5 -0
  50. package/lib/js/example/core/reusable/file_metadata.json +5 -0
  51. package/lib/js/example/core/reusable/object_storage_container_data.json +8 -0
  52. package/lib/js/example/element.json +17 -0
  53. package/lib/js/example/job/compute.json +26 -0
  54. package/lib/js/example/job.json +183 -0
  55. package/lib/js/example/material.json +128 -0
  56. package/lib/js/example/method/categorized_method.json +47 -0
  57. package/lib/js/example/method/method_parameters.json +3 -0
  58. package/lib/js/example/method.json +7 -0
  59. package/lib/js/example/methods_directory/legacy/localorbital.json +4 -0
  60. package/lib/js/example/methods_directory/legacy/pseudopotential.json +4 -0
  61. package/lib/js/example/methods_directory/legacy/regression.json +61 -0
  62. package/lib/js/example/methods_directory/legacy/unknown.json +4 -0
  63. package/lib/js/example/methods_directory/mathematical/cg.json +10 -0
  64. package/lib/js/example/methods_directory/mathematical/regression.json +65 -0
  65. package/lib/js/example/methods_directory/physical/ao/dunning.json +13 -0
  66. package/lib/js/example/methods_directory/physical/psp/file.json +54 -0
  67. package/lib/js/example/methods_directory/physical/psp.json +67 -0
  68. package/lib/js/example/methods_directory/physical/pw.json +9 -0
  69. package/lib/js/example/methods_directory/physical/smearing.json +10 -0
  70. package/lib/js/example/methods_directory/physical/tetrahedron.json +10 -0
  71. package/lib/js/example/model/categorized_model.json +77 -0
  72. package/lib/js/example/model/model_parameters.json +7 -0
  73. package/lib/js/example/model.json +11 -0
  74. package/lib/js/example/models_category/pb/qm/abin/gw.json +7 -0
  75. package/lib/js/example/models_category/pb/qm/dft/ksdft.json +6 -0
  76. package/lib/js/example/models_category/pb/qm/semp.json +5 -0
  77. package/lib/js/example/models_directory/gga.json +15 -0
  78. package/lib/js/example/models_directory/gw.json +15 -0
  79. package/lib/js/example/models_directory/hybrid.json +15 -0
  80. package/lib/js/example/models_directory/lda.json +15 -0
  81. package/lib/js/example/models_directory/legacy/dft.json +12 -0
  82. package/lib/js/example/models_directory/legacy/ml.json +11 -0
  83. package/lib/js/example/models_directory/legacy/unknown.json +11 -0
  84. package/lib/js/example/models_directory/re.json +10 -0
  85. package/lib/js/example/project.json +25 -0
  86. package/lib/js/example/properties_directory/electronic_configuration.json +4 -0
  87. package/lib/js/example/properties_directory/elemental/atomic_radius.json +4 -0
  88. package/lib/js/example/properties_directory/elemental/electronegativity.json +4 -0
  89. package/lib/js/example/properties_directory/elemental/ionization_potential.json +4 -0
  90. package/lib/js/example/properties_directory/non_scalar/band_gaps.json +25 -0
  91. package/lib/js/example/properties_directory/non_scalar/band_structure.json +47 -0
  92. package/lib/js/example/properties_directory/non_scalar/charge_density_profile.json +22 -0
  93. package/lib/js/example/properties_directory/non_scalar/density_of_states.json +55 -0
  94. package/lib/js/example/properties_directory/non_scalar/dielectric_tensor.json +133 -0
  95. package/lib/js/example/properties_directory/non_scalar/file_content.json +13 -0
  96. package/lib/js/example/properties_directory/non_scalar/hubbard_u.json +24 -0
  97. package/lib/js/example/properties_directory/non_scalar/hubbard_v.json +22 -0
  98. package/lib/js/example/properties_directory/non_scalar/hubbard_v_nn.json +24 -0
  99. package/lib/js/example/properties_directory/non_scalar/phonon_dispersions.json +41 -0
  100. package/lib/js/example/properties_directory/non_scalar/phonon_dos.json +37 -0
  101. package/lib/js/example/properties_directory/non_scalar/potential_profile.json +32 -0
  102. package/lib/js/example/properties_directory/non_scalar/reaction_energy_profile.json +30 -0
  103. package/lib/js/example/properties_directory/non_scalar/stress_tensor.json +21 -0
  104. package/lib/js/example/properties_directory/non_scalar/total_energy_contributions.json +44 -0
  105. package/lib/js/example/properties_directory/non_scalar/vibrational_spectrum.json +25 -0
  106. package/lib/js/example/properties_directory/scalar/electron_affinity.json +5 -0
  107. package/lib/js/example/properties_directory/scalar/fermi_energy.json +5 -0
  108. package/lib/js/example/properties_directory/scalar/formation_energy.json +5 -0
  109. package/lib/js/example/properties_directory/scalar/ionization_potential.json +5 -0
  110. package/lib/js/example/properties_directory/scalar/pressure.json +5 -0
  111. package/lib/js/example/properties_directory/scalar/reaction_energy_barrier.json +5 -0
  112. package/lib/js/example/properties_directory/scalar/surface_energy.json +5 -0
  113. package/lib/js/example/properties_directory/scalar/total_energy.json +5 -0
  114. package/lib/js/example/properties_directory/scalar/total_force.json +5 -0
  115. package/lib/js/example/properties_directory/scalar/valence_band_offset.json +5 -0
  116. package/lib/js/example/properties_directory/scalar/zero_point_energy.json +5 -0
  117. package/lib/js/example/properties_directory/structural/atomic_forces.json +22 -0
  118. package/lib/js/example/properties_directory/structural/basis/atomic_constraints.json +21 -0
  119. package/lib/js/example/properties_directory/structural/basis/atomic_coordinate.json +8 -0
  120. package/lib/js/example/properties_directory/structural/basis/atomic_coordinates.json +21 -0
  121. package/lib/js/example/properties_directory/structural/basis/atomic_element.json +4 -0
  122. package/lib/js/example/properties_directory/structural/basis/bonds.json +24 -0
  123. package/lib/js/example/properties_directory/structural/basis.json +46 -0
  124. package/lib/js/example/properties_directory/structural/density.json +5 -0
  125. package/lib/js/example/properties_directory/structural/elemental_ratio.json +5 -0
  126. package/lib/js/example/properties_directory/structural/inchi.json +4 -0
  127. package/lib/js/example/properties_directory/structural/inchi_key.json +4 -0
  128. package/lib/js/example/properties_directory/structural/lattice/lattice_bravais.json +13 -0
  129. package/lib/js/example/properties_directory/structural/lattice/lattice_vectors.json +19 -0
  130. package/lib/js/example/properties_directory/structural/lattice.json +33 -0
  131. package/lib/js/example/properties_directory/structural/magnetic_moments.json +22 -0
  132. package/lib/js/example/properties_directory/structural/molecular_pattern.json +71 -0
  133. package/lib/js/example/properties_directory/structural/p_norm.json +5 -0
  134. package/lib/js/example/properties_directory/structural/symmetry.json +9 -0
  135. package/lib/js/example/properties_directory/structural/volume.json +5 -0
  136. package/lib/js/example/properties_directory/workflow/convergence/electronic.json +15 -0
  137. package/lib/js/example/properties_directory/workflow/convergence/ionic.json +20 -0
  138. package/lib/js/example/properties_directory/workflow/convergence/kpoint.json +22 -0
  139. package/lib/js/example/property/base.json +31 -0
  140. package/lib/js/example/software/application.json +7 -0
  141. package/lib/js/example/software/executable.json +20 -0
  142. package/lib/js/example/software/flavor.json +9 -0
  143. package/lib/js/example/software/template.json +14 -0
  144. package/lib/js/example/software_directory/ml/exabyteml.json +6 -0
  145. package/lib/js/example/software_directory/ml/unit/execution/evaluate/cross_validate.json +20 -0
  146. package/lib/js/example/software_directory/ml/unit/execution/initialize.json +23 -0
  147. package/lib/js/example/software_directory/ml/unit/execution/score.json +18 -0
  148. package/lib/js/example/software_directory/ml/unit/execution/train.json +29 -0
  149. package/lib/js/example/software_directory/ml/unit/processing/data_transformation/manipulation.json +14 -0
  150. package/lib/js/example/software_directory/ml/unit/processing/data_transformation/scale_and_reduce.json +26 -0
  151. package/lib/js/example/software_directory/ml/unit/processing/feature_selection/filter_based.json +13 -0
  152. package/lib/js/example/software_directory/modeling/espresso/arguments.json +5 -0
  153. package/lib/js/example/software_directory/modeling/espresso.json +6 -0
  154. package/lib/js/example/software_directory/modeling/nwchem.json +6 -0
  155. package/lib/js/example/software_directory/modeling/unit/execution.json +19 -0
  156. package/lib/js/example/software_directory/modeling/vasp.json +6 -0
  157. package/lib/js/example/software_directory/scripting/jupyter_lab.json +8 -0
  158. package/lib/js/example/software_directory/scripting/python.json +8 -0
  159. package/lib/js/example/software_directory/scripting/shell.json +8 -0
  160. package/lib/js/example/software_directory/scripting/unit/execution.json +22 -0
  161. package/lib/js/example/system/_material.json +5 -0
  162. package/lib/js/example/system/_parent_job.json +5 -0
  163. package/lib/js/example/system/_project.json +5 -0
  164. package/lib/js/example/system/consistency_check.json +6 -0
  165. package/lib/js/example/system/creator.json +5 -0
  166. package/lib/js/example/system/entity_reference.json +5 -0
  167. package/lib/js/example/system/file_source.json +6 -0
  168. package/lib/js/example/system/message.json +16 -0
  169. package/lib/js/example/system/owner.json +5 -0
  170. package/lib/js/example/workflow/subworkflow.json +93 -0
  171. package/lib/js/example/workflow/unit/assignment.json +19 -0
  172. package/lib/js/example/workflow/unit/condition.json +22 -0
  173. package/lib/js/example/workflow/unit/execution.json +66 -0
  174. package/lib/js/example/workflow/unit/input/_inputItemScope.json +4 -0
  175. package/lib/js/example/workflow/unit/io/api.json +31 -0
  176. package/lib/js/example/workflow/unit/io/db.json +15 -0
  177. package/lib/js/example/workflow/unit/io/object_storage.json +12 -0
  178. package/lib/js/example/workflow/unit/io.json +41 -0
  179. package/lib/js/example/workflow/unit/map.json +16 -0
  180. package/lib/js/example/workflow/unit/processing.json +13 -0
  181. package/lib/js/example/workflow/unit/reduce.json +16 -0
  182. package/lib/js/example/workflow/unit/runtime/runtime_items.json +14 -0
  183. package/lib/js/example/workflow.json +129 -0
  184. package/lib/js/json_include/index.d.ts +20 -0
  185. package/lib/js/json_include/index.js +61 -97
  186. package/lib/js/json_include/settings.d.ts +3 -0
  187. package/lib/js/json_include/settings.js +4 -11
  188. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json +72 -0
  189. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json +30 -0
  190. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/cell.json +89 -0
  191. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json +54 -0
  192. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/control.json +181 -0
  193. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/electrons.json +163 -0
  194. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json +219 -0
  195. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/ions.json +216 -0
  196. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json +87 -0
  197. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x/system.json +652 -0
  198. package/lib/js/schema/3pse/file/applications/espresso/7.2/pw.x.json +1776 -0
  199. package/lib/js/schema/core/abstract/2d_data.json +31 -0
  200. package/lib/js/schema/core/abstract/2d_plot.json +74 -0
  201. package/lib/js/schema/core/abstract/3d_grid.json +32 -0
  202. package/lib/js/schema/core/abstract/3d_tensor.json +18 -0
  203. package/lib/js/schema/core/abstract/3d_vector_basis.json +43 -0
  204. package/lib/js/schema/core/abstract/point.json +11 -0
  205. package/lib/js/schema/core/abstract/vector.json +27 -0
  206. package/lib/js/schema/core/primitive/1d_data_series.json +16 -0
  207. package/lib/js/schema/core/primitive/3d_lattice.json +40 -0
  208. package/lib/js/schema/core/primitive/array_of_3_booleans.json +11 -0
  209. package/lib/js/schema/core/primitive/array_of_3_numbers.json +11 -0
  210. package/lib/js/schema/core/primitive/array_of_ids.json +16 -0
  211. package/lib/js/schema/core/primitive/array_of_strings.json +11 -0
  212. package/lib/js/schema/core/primitive/axis.json +19 -0
  213. package/lib/js/schema/core/primitive/group_info.json +16 -0
  214. package/lib/js/schema/core/primitive/integer_one_or_zero.json +8 -0
  215. package/lib/js/schema/core/primitive/linked_list/base_node.json +36 -0
  216. package/lib/js/schema/core/primitive/linked_list/named_node.json +40 -0
  217. package/lib/js/schema/core/primitive/linked_list/named_node_in_group.json +48 -0
  218. package/lib/js/schema/core/primitive/linked_list/node_with_type.json +39 -0
  219. package/lib/js/schema/core/primitive/linked_list.json +171 -0
  220. package/lib/js/schema/core/primitive/scalar.json +14 -0
  221. package/lib/js/schema/core/primitive/slugified_entry.json +21 -0
  222. package/lib/js/schema/core/primitive/slugified_entry_or_slug.json +31 -0
  223. package/lib/js/schema/core/primitive/string.json +14 -0
  224. package/lib/js/schema/core/reference/exabyte.json +19 -0
  225. package/lib/js/schema/core/reference/experiment/condition.json +31 -0
  226. package/lib/js/schema/core/reference/experiment/location.json +20 -0
  227. package/lib/js/schema/core/reference/experiment.json +249 -0
  228. package/lib/js/schema/core/reference/literature/name.json +24 -0
  229. package/lib/js/schema/core/reference/literature/pages.json +17 -0
  230. package/lib/js/schema/core/reference/literature.json +131 -0
  231. package/lib/js/schema/core/reference/modeling/exabyte.json +46 -0
  232. package/lib/js/schema/core/reference/modeling.json +52 -0
  233. package/lib/js/schema/core/reference.json +436 -0
  234. package/lib/js/schema/core/reusable/atomic_data/per_orbital.json +22 -0
  235. package/lib/js/schema/core/reusable/atomic_data/per_orbital_pair.json +39 -0
  236. package/lib/js/schema/core/reusable/atomic_data/value_number.json +13 -0
  237. package/lib/js/schema/core/reusable/atomic_data/value_string.json +13 -0
  238. package/lib/js/schema/core/reusable/atomic_data_per_orbital_numeric.json +26 -0
  239. package/lib/js/schema/core/reusable/atomic_data_per_orbital_pair_numeric.json +43 -0
  240. package/lib/js/schema/core/reusable/atomic_orbital.json +32 -0
  241. package/lib/js/schema/core/reusable/atomic_scalars.json +29 -0
  242. package/lib/js/schema/core/reusable/atomic_strings.json +19 -0
  243. package/lib/js/schema/core/reusable/atomic_vectors.json +42 -0
  244. package/lib/js/schema/core/reusable/band_gap.json +64 -0
  245. package/lib/js/schema/core/reusable/categories.json +159 -0
  246. package/lib/js/schema/core/reusable/category_path.json +7 -0
  247. package/lib/js/schema/core/reusable/dielectric_tensor_component.json +46 -0
  248. package/lib/js/schema/core/reusable/energy.json +39 -0
  249. package/lib/js/schema/core/reusable/file_metadata.json +21 -0
  250. package/lib/js/schema/core/reusable/frequency_function_matrix.json +30 -0
  251. package/lib/js/schema/core/reusable/object_storage_container_data.json +38 -0
  252. package/lib/js/schema/definitions/units.json +103 -0
  253. package/lib/js/schema/element.json +103 -0
  254. package/lib/js/schema/in_memory_entity/base.json +65 -0
  255. package/lib/js/schema/in_memory_entity/defaultable.json +70 -0
  256. package/lib/js/schema/in_memory_entity/named.json +69 -0
  257. package/lib/js/schema/in_memory_entity/named_defaultable.json +74 -0
  258. package/lib/js/schema/in_memory_entity/named_defaultable_has_metadata.json +77 -0
  259. package/lib/js/schema/in_memory_entity/named_defaultable_runtime_items.json +194 -0
  260. package/lib/js/schema/job/base.json +376 -0
  261. package/lib/js/schema/job/compute.json +176 -0
  262. package/lib/js/schema/job.json +6868 -0
  263. package/lib/js/schema/material/conventional.json +11 -0
  264. package/lib/js/schema/material.json +624 -0
  265. package/lib/js/schema/method/categorized_method.json +221 -0
  266. package/lib/js/schema/method/method_parameters.json +47 -0
  267. package/lib/js/schema/method/unit_method.json +191 -0
  268. package/lib/js/schema/method.json +28 -0
  269. package/lib/js/schema/methods_category/mathematical/diff/enum_options.json +8 -0
  270. package/lib/js/schema/methods_category/mathematical/diff/fd.json +165 -0
  271. package/lib/js/schema/methods_category/mathematical/diff.json +162 -0
  272. package/lib/js/schema/methods_category/mathematical/discr/enum_options.json +8 -0
  273. package/lib/js/schema/methods_category/mathematical/discr/mesh/enum_options.json +18 -0
  274. package/lib/js/schema/methods_category/mathematical/discr/mesh/hybrid.json +168 -0
  275. package/lib/js/schema/methods_category/mathematical/discr/mesh/nstruct.json +168 -0
  276. package/lib/js/schema/methods_category/mathematical/discr/mesh/struct/cartesian.json +171 -0
  277. package/lib/js/schema/methods_category/mathematical/discr/mesh/struct/enum_options.json +8 -0
  278. package/lib/js/schema/methods_category/mathematical/discr/mesh/struct.json +168 -0
  279. package/lib/js/schema/methods_category/mathematical/discr/mesh.json +165 -0
  280. package/lib/js/schema/methods_category/mathematical/discr.json +162 -0
  281. package/lib/js/schema/methods_category/mathematical/enum_options.json +45 -0
  282. package/lib/js/schema/methods_category/mathematical/fapprx/basisexp.json +165 -0
  283. package/lib/js/schema/methods_category/mathematical/fapprx/enum_options.json +13 -0
  284. package/lib/js/schema/methods_category/mathematical/fapprx/ipol/enum_options.json +18 -0
  285. package/lib/js/schema/methods_category/mathematical/fapprx/ipol/lin.json +168 -0
  286. package/lib/js/schema/methods_category/mathematical/fapprx/ipol/poly.json +168 -0
  287. package/lib/js/schema/methods_category/mathematical/fapprx/ipol/spline.json +168 -0
  288. package/lib/js/schema/methods_category/mathematical/fapprx/ipol.json +165 -0
  289. package/lib/js/schema/methods_category/mathematical/fapprx.json +162 -0
  290. package/lib/js/schema/methods_category/mathematical/intgr/analytic/enum_options.json +20 -0
  291. package/lib/js/schema/methods_category/mathematical/intgr/analytic/volume.json +178 -0
  292. package/lib/js/schema/methods_category/mathematical/intgr/analytic.json +165 -0
  293. package/lib/js/schema/methods_category/mathematical/intgr/diffeq/enum_options.json +13 -0
  294. package/lib/js/schema/methods_category/mathematical/intgr/diffeq/order1.json +168 -0
  295. package/lib/js/schema/methods_category/mathematical/intgr/diffeq/order2.json +168 -0
  296. package/lib/js/schema/methods_category/mathematical/intgr/diffeq.json +165 -0
  297. package/lib/js/schema/methods_category/mathematical/intgr/enum_options.json +23 -0
  298. package/lib/js/schema/methods_category/mathematical/intgr/numquad/enum_options.json +13 -0
  299. package/lib/js/schema/methods_category/mathematical/intgr/numquad/gauss.json +168 -0
  300. package/lib/js/schema/methods_category/mathematical/intgr/numquad/newcot.json +168 -0
  301. package/lib/js/schema/methods_category/mathematical/intgr/numquad.json +165 -0
  302. package/lib/js/schema/methods_category/mathematical/intgr/transf/enum_options.json +8 -0
  303. package/lib/js/schema/methods_category/mathematical/intgr/transf/fourier.json +168 -0
  304. package/lib/js/schema/methods_category/mathematical/intgr/transf.json +165 -0
  305. package/lib/js/schema/methods_category/mathematical/intgr.json +162 -0
  306. package/lib/js/schema/methods_category/mathematical/linalg/dcomp.json +165 -0
  307. package/lib/js/schema/methods_category/mathematical/linalg/diag/davidson.json +168 -0
  308. package/lib/js/schema/methods_category/mathematical/linalg/diag/enum_options.json +8 -0
  309. package/lib/js/schema/methods_category/mathematical/linalg/diag.json +165 -0
  310. package/lib/js/schema/methods_category/mathematical/linalg/enum_options.json +23 -0
  311. package/lib/js/schema/methods_category/mathematical/linalg/lintra.json +165 -0
  312. package/lib/js/schema/methods_category/mathematical/linalg/matf.json +165 -0
  313. package/lib/js/schema/methods_category/mathematical/linalg.json +162 -0
  314. package/lib/js/schema/methods_category/mathematical/opt/diff/bracket.json +168 -0
  315. package/lib/js/schema/methods_category/mathematical/opt/diff/enum_options.json +28 -0
  316. package/lib/js/schema/methods_category/mathematical/opt/diff/local.json +168 -0
  317. package/lib/js/schema/methods_category/mathematical/opt/diff/order1.json +168 -0
  318. package/lib/js/schema/methods_category/mathematical/opt/diff/order2.json +168 -0
  319. package/lib/js/schema/methods_category/mathematical/opt/diff/ordern/cg.json +171 -0
  320. package/lib/js/schema/methods_category/mathematical/opt/diff/ordern/enum_options.json +8 -0
  321. package/lib/js/schema/methods_category/mathematical/opt/diff/ordern.json +168 -0
  322. package/lib/js/schema/methods_category/mathematical/opt/diff.json +165 -0
  323. package/lib/js/schema/methods_category/mathematical/opt/enum_options.json +18 -0
  324. package/lib/js/schema/methods_category/mathematical/opt/ndiff/direct.json +168 -0
  325. package/lib/js/schema/methods_category/mathematical/opt/ndiff/enum_options.json +18 -0
  326. package/lib/js/schema/methods_category/mathematical/opt/ndiff/pop.json +168 -0
  327. package/lib/js/schema/methods_category/mathematical/opt/ndiff/stoch.json +168 -0
  328. package/lib/js/schema/methods_category/mathematical/opt/ndiff.json +165 -0
  329. package/lib/js/schema/methods_category/mathematical/opt/root/bracket.json +168 -0
  330. package/lib/js/schema/methods_category/mathematical/opt/root/enum_options.json +13 -0
  331. package/lib/js/schema/methods_category/mathematical/opt/root/iter.json +168 -0
  332. package/lib/js/schema/methods_category/mathematical/opt/root.json +165 -0
  333. package/lib/js/schema/methods_category/mathematical/opt.json +162 -0
  334. package/lib/js/schema/methods_category/mathematical/regression.json +167 -0
  335. package/lib/js/schema/methods_category/physical/enum_options.json +8 -0
  336. package/lib/js/schema/methods_category/physical/qm/enum_options.json +8 -0
  337. package/lib/js/schema/methods_category/physical/qm/wf/ao/dunning.json +171 -0
  338. package/lib/js/schema/methods_category/physical/qm/wf/ao/other.json +171 -0
  339. package/lib/js/schema/methods_category/physical/qm/wf/ao/pople.json +171 -0
  340. package/lib/js/schema/methods_category/physical/qm/wf/ao.json +173 -0
  341. package/lib/js/schema/methods_category/physical/qm/wf/enum_options.json +63 -0
  342. package/lib/js/schema/methods_category/physical/qm/wf/psp.json +174 -0
  343. package/lib/js/schema/methods_category/physical/qm/wf/pw.json +168 -0
  344. package/lib/js/schema/methods_category/physical/qm/wf/smearing.json +174 -0
  345. package/lib/js/schema/methods_category/physical/qm/wf/tetrahedron.json +173 -0
  346. package/lib/js/schema/methods_category/physical/qm/wf.json +165 -0
  347. package/lib/js/schema/methods_category/physical/qm.json +162 -0
  348. package/lib/js/schema/methods_directory/legacy/localorbital.json +34 -0
  349. package/lib/js/schema/methods_directory/legacy/pseudopotential.json +37 -0
  350. package/lib/js/schema/methods_directory/legacy/regression.json +185 -0
  351. package/lib/js/schema/methods_directory/legacy/unknown.json +34 -0
  352. package/lib/js/schema/methods_directory/mathematical/cg.json +207 -0
  353. package/lib/js/schema/methods_directory/mathematical/davidson.json +204 -0
  354. package/lib/js/schema/methods_directory/mathematical/regression/data.json +122 -0
  355. package/lib/js/schema/methods_directory/mathematical/regression/dataset.json +21 -0
  356. package/lib/js/schema/methods_directory/mathematical/regression/kernel_ridge/data_per_property.json +47 -0
  357. package/lib/js/schema/methods_directory/mathematical/regression/linear/data_per_property.json +42 -0
  358. package/lib/js/schema/methods_directory/mathematical/regression/per_feature_item.json +23 -0
  359. package/lib/js/schema/methods_directory/mathematical/regression/precision.json +33 -0
  360. package/lib/js/schema/methods_directory/mathematical/regression/precision_per_property.json +23 -0
  361. package/lib/js/schema/methods_directory/mathematical/regression.json +354 -0
  362. package/lib/js/schema/methods_directory/physical/ao/dunning.json +230 -0
  363. package/lib/js/schema/methods_directory/physical/ao/enum_options.json +28 -0
  364. package/lib/js/schema/methods_directory/physical/ao/other.json +238 -0
  365. package/lib/js/schema/methods_directory/physical/ao/pople.json +230 -0
  366. package/lib/js/schema/methods_directory/physical/psp/file.json +140 -0
  367. package/lib/js/schema/methods_directory/physical/psp/file_data_item.json +116 -0
  368. package/lib/js/schema/methods_directory/physical/psp.json +352 -0
  369. package/lib/js/schema/methods_directory/physical/pw.json +204 -0
  370. package/lib/js/schema/methods_directory/physical/smearing.json +210 -0
  371. package/lib/js/schema/methods_directory/physical/tetrahedron.json +208 -0
  372. package/lib/js/schema/model/categorized_model.json +542 -0
  373. package/lib/js/schema/model/mixins/dft/double_hybrid_functional.json +13 -0
  374. package/lib/js/schema/model/mixins/dft/enum_options.json +30 -0
  375. package/lib/js/schema/model/mixins/dft/gga_functional.json +15 -0
  376. package/lib/js/schema/model/mixins/dft/hybrid_functional.json +14 -0
  377. package/lib/js/schema/model/mixins/dft/lda_functional.json +14 -0
  378. package/lib/js/schema/model/mixins/dft/mgga_functional.json +14 -0
  379. package/lib/js/schema/model/mixins/dispersion_correction.json +16 -0
  380. package/lib/js/schema/model/mixins/enum_options.json +22 -0
  381. package/lib/js/schema/model/mixins/hubbard.json +13 -0
  382. package/lib/js/schema/model/mixins/spin_orbit_coupling.json +12 -0
  383. package/lib/js/schema/model/mixins/spin_polarization.json +15 -0
  384. package/lib/js/schema/model/model_parameters.json +98 -0
  385. package/lib/js/schema/model/model_without_method.json +321 -0
  386. package/lib/js/schema/model.json +49 -0
  387. package/lib/js/schema/models_category/enum_options.json +13 -0
  388. package/lib/js/schema/models_category/pb/enum_options.json +8 -0
  389. package/lib/js/schema/models_category/pb/qm/abin/enum_options.json +15 -0
  390. package/lib/js/schema/models_category/pb/qm/abin/gw.json +176 -0
  391. package/lib/js/schema/models_category/pb/qm/abin.json +168 -0
  392. package/lib/js/schema/models_category/pb/qm/dft/enum_options.json +8 -0
  393. package/lib/js/schema/models_category/pb/qm/dft/ksdft/double_hybrid.json +174 -0
  394. package/lib/js/schema/models_category/pb/qm/dft/ksdft/enum_options.json +28 -0
  395. package/lib/js/schema/models_category/pb/qm/dft/ksdft/gga.json +174 -0
  396. package/lib/js/schema/models_category/pb/qm/dft/ksdft/hybrid.json +174 -0
  397. package/lib/js/schema/models_category/pb/qm/dft/ksdft/lda.json +174 -0
  398. package/lib/js/schema/models_category/pb/qm/dft/ksdft/mgga.json +174 -0
  399. package/lib/js/schema/models_category/pb/qm/dft/ksdft.json +171 -0
  400. package/lib/js/schema/models_category/pb/qm/dft.json +168 -0
  401. package/lib/js/schema/models_category/pb/qm/enum_options.json +18 -0
  402. package/lib/js/schema/models_category/pb/qm/semp.json +168 -0
  403. package/lib/js/schema/models_category/pb/qm.json +165 -0
  404. package/lib/js/schema/models_category/pb.json +162 -0
  405. package/lib/js/schema/models_category/st/det/enum_options.json +8 -0
  406. package/lib/js/schema/models_category/st/det/ml/enum_options.json +8 -0
  407. package/lib/js/schema/models_category/st/det/ml/re.json +171 -0
  408. package/lib/js/schema/models_category/st/det/ml.json +168 -0
  409. package/lib/js/schema/models_category/st/det.json +165 -0
  410. package/lib/js/schema/models_category/st/enum_options.json +8 -0
  411. package/lib/js/schema/models_category/st.json +162 -0
  412. package/lib/js/schema/models_directory/double_hybrid.json +387 -0
  413. package/lib/js/schema/models_directory/gga.json +401 -0
  414. package/lib/js/schema/models_directory/gw.json +415 -0
  415. package/lib/js/schema/models_directory/hybrid.json +400 -0
  416. package/lib/js/schema/models_directory/lda.json +400 -0
  417. package/lib/js/schema/models_directory/legacy/dft.json +154 -0
  418. package/lib/js/schema/models_directory/legacy/ml.json +55 -0
  419. package/lib/js/schema/models_directory/legacy/unknown.json +55 -0
  420. package/lib/js/schema/models_directory/mgga.json +400 -0
  421. package/lib/js/schema/models_directory/re.json +334 -0
  422. package/lib/js/schema/project.json +103 -0
  423. package/lib/js/schema/properties_directory/derived_properties.json +185 -0
  424. package/lib/js/schema/properties_directory/electronic_configuration.json +16 -0
  425. package/lib/js/schema/properties_directory/elemental/atomic_radius.json +35 -0
  426. package/lib/js/schema/properties_directory/elemental/electronegativity.json +20 -0
  427. package/lib/js/schema/properties_directory/elemental/ionization_potential.json +31 -0
  428. package/lib/js/schema/properties_directory/non_scalar/average_potential_profile.json +107 -0
  429. package/lib/js/schema/properties_directory/non_scalar/band_gaps.json +121 -0
  430. package/lib/js/schema/properties_directory/non_scalar/band_structure.json +118 -0
  431. package/lib/js/schema/properties_directory/non_scalar/charge_density_profile.json +88 -0
  432. package/lib/js/schema/properties_directory/non_scalar/density_of_states.json +123 -0
  433. package/lib/js/schema/properties_directory/non_scalar/dielectric_tensor.json +65 -0
  434. package/lib/js/schema/properties_directory/non_scalar/file_content.json +73 -0
  435. package/lib/js/schema/properties_directory/non_scalar/hubbard_u.json +56 -0
  436. package/lib/js/schema/properties_directory/non_scalar/hubbard_v.json +75 -0
  437. package/lib/js/schema/properties_directory/non_scalar/hubbard_v_nn.json +75 -0
  438. package/lib/js/schema/properties_directory/non_scalar/phonon_dispersions.json +103 -0
  439. package/lib/js/schema/properties_directory/non_scalar/phonon_dos.json +95 -0
  440. package/lib/js/schema/properties_directory/non_scalar/potential_profile.json +94 -0
  441. package/lib/js/schema/properties_directory/non_scalar/reaction_energy_profile.json +94 -0
  442. package/lib/js/schema/properties_directory/non_scalar/stress_tensor.json +36 -0
  443. package/lib/js/schema/properties_directory/non_scalar/total_energy_contributions.json +271 -0
  444. package/lib/js/schema/properties_directory/non_scalar/vibrational_spectrum.json +99 -0
  445. package/lib/js/schema/properties_directory/scalar/electron_affinity.json +42 -0
  446. package/lib/js/schema/properties_directory/scalar/fermi_energy.json +42 -0
  447. package/lib/js/schema/properties_directory/scalar/formation_energy.json +42 -0
  448. package/lib/js/schema/properties_directory/scalar/ionization_potential.json +42 -0
  449. package/lib/js/schema/properties_directory/scalar/pressure.json +26 -0
  450. package/lib/js/schema/properties_directory/scalar/reaction_energy_barrier.json +42 -0
  451. package/lib/js/schema/properties_directory/scalar/surface_energy.json +42 -0
  452. package/lib/js/schema/properties_directory/scalar/total_energy.json +42 -0
  453. package/lib/js/schema/properties_directory/scalar/total_force.json +29 -0
  454. package/lib/js/schema/properties_directory/scalar/valence_band_offset.json +42 -0
  455. package/lib/js/schema/properties_directory/scalar/zero_point_energy.json +42 -0
  456. package/lib/js/schema/properties_directory/structural/atomic_forces.json +65 -0
  457. package/lib/js/schema/properties_directory/structural/basis/atomic_constraints.json +55 -0
  458. package/lib/js/schema/properties_directory/structural/basis/atomic_coordinate.json +38 -0
  459. package/lib/js/schema/properties_directory/structural/basis/atomic_coordinates.json +68 -0
  460. package/lib/js/schema/properties_directory/structural/basis/atomic_element.json +26 -0
  461. package/lib/js/schema/properties_directory/structural/basis/bonds.json +42 -0
  462. package/lib/js/schema/properties_directory/structural/basis.json +127 -0
  463. package/lib/js/schema/properties_directory/structural/density.json +24 -0
  464. package/lib/js/schema/properties_directory/structural/elemental_ratio.json +26 -0
  465. package/lib/js/schema/properties_directory/structural/inchi.json +19 -0
  466. package/lib/js/schema/properties_directory/structural/inchi_key.json +19 -0
  467. package/lib/js/schema/properties_directory/structural/lattice/lattice_bravais.json +81 -0
  468. package/lib/js/schema/properties_directory/structural/lattice/lattice_vectors.json +63 -0
  469. package/lib/js/schema/properties_directory/structural/lattice/type_enum.json +22 -0
  470. package/lib/js/schema/properties_directory/structural/lattice/type_extended_enum.json +32 -0
  471. package/lib/js/schema/properties_directory/structural/lattice.json +148 -0
  472. package/lib/js/schema/properties_directory/structural/magnetic_moments.json +60 -0
  473. package/lib/js/schema/properties_directory/structural/molecular_pattern.json +111 -0
  474. package/lib/js/schema/properties_directory/structural/p_norm.json +24 -0
  475. package/lib/js/schema/properties_directory/structural/patterns/functional_group.json +36 -0
  476. package/lib/js/schema/properties_directory/structural/patterns/ring.json +35 -0
  477. package/lib/js/schema/properties_directory/structural/patterns/special_bond.json +33 -0
  478. package/lib/js/schema/properties_directory/structural/symmetry.json +40 -0
  479. package/lib/js/schema/properties_directory/structural/volume.json +24 -0
  480. package/lib/js/schema/properties_directory/workflow/convergence/electronic.json +32 -0
  481. package/lib/js/schema/properties_directory/workflow/convergence/ionic.json +62 -0
  482. package/lib/js/schema/properties_directory/workflow/convergence/kpoint.json +48 -0
  483. package/lib/js/schema/property/base.json +387 -0
  484. package/lib/js/schema/property/meta.json +387 -0
  485. package/lib/js/schema/property/raw.json +387 -0
  486. package/lib/js/schema/property/source.json +286 -0
  487. package/lib/js/schema/software/application.json +99 -0
  488. package/lib/js/schema/software/executable.json +208 -0
  489. package/lib/js/schema/software/flavor.json +228 -0
  490. package/lib/js/schema/software/template.json +103 -0
  491. package/lib/js/schema/software_directory/ml/exabyteml.json +23 -0
  492. package/lib/js/schema/software_directory/ml/unit/execution/evaluate/cross_validate.json +814 -0
  493. package/lib/js/schema/software_directory/ml/unit/execution/initialize.json +818 -0
  494. package/lib/js/schema/software_directory/ml/unit/execution/score.json +804 -0
  495. package/lib/js/schema/software_directory/ml/unit/execution/train.json +827 -0
  496. package/lib/js/schema/software_directory/ml/unit/execution.json +3264 -0
  497. package/lib/js/schema/software_directory/ml/unit/processing/data_transformation/manipulation.json +310 -0
  498. package/lib/js/schema/software_directory/ml/unit/processing/data_transformation/scale_and_reduce.json +330 -0
  499. package/lib/js/schema/software_directory/ml/unit/processing/data_transformation.json +334 -0
  500. package/lib/js/schema/software_directory/ml/unit/processing/feature_selection/filter_based.json +305 -0
  501. package/lib/js/schema/software_directory/ml/unit/processing/feature_selection.json +309 -0
  502. package/lib/js/schema/software_directory/ml/unit/processing.json +646 -0
  503. package/lib/js/schema/software_directory/modeling/deepmd.json +115 -0
  504. package/lib/js/schema/software_directory/modeling/espresso/arguments.json +44 -0
  505. package/lib/js/schema/software_directory/modeling/espresso.json +34 -0
  506. package/lib/js/schema/software_directory/modeling/nwchem.json +114 -0
  507. package/lib/js/schema/software_directory/modeling/unit/execution.json +847 -0
  508. package/lib/js/schema/software_directory/modeling/vasp.json +120 -0
  509. package/lib/js/schema/software_directory/scripting/jupyter_lab.json +118 -0
  510. package/lib/js/schema/software_directory/scripting/python.json +132 -0
  511. package/lib/js/schema/software_directory/scripting/shell.json +132 -0
  512. package/lib/js/schema/software_directory/scripting/unit/execution.json +847 -0
  513. package/lib/js/schema/system/_material.json +23 -0
  514. package/lib/js/schema/system/_parent_job.json +23 -0
  515. package/lib/js/schema/system/_project.json +23 -0
  516. package/lib/js/schema/system/bankable.json +16 -0
  517. package/lib/js/schema/system/consistency_check.json +39 -0
  518. package/lib/js/schema/system/creator.json +23 -0
  519. package/lib/js/schema/system/creator_account.json +27 -0
  520. package/lib/js/schema/system/database_source.json +38 -0
  521. package/lib/js/schema/system/defaultable.json +13 -0
  522. package/lib/js/schema/system/description.json +15 -0
  523. package/lib/js/schema/system/entity_reference.json +20 -0
  524. package/lib/js/schema/system/file_source.json +30 -0
  525. package/lib/js/schema/system/history.json +26 -0
  526. package/lib/js/schema/system/in_set.json +36 -0
  527. package/lib/js/schema/system/is_multi_material.json +11 -0
  528. package/lib/js/schema/system/is_outdated.json +11 -0
  529. package/lib/js/schema/system/job_extended.json +64 -0
  530. package/lib/js/schema/system/message.json +68 -0
  531. package/lib/js/schema/system/metadata.json +11 -0
  532. package/lib/js/schema/system/name.json +12 -0
  533. package/lib/js/schema/system/owner.json +23 -0
  534. package/lib/js/schema/system/path.json +14 -0
  535. package/lib/js/schema/system/path_entity.json +18 -0
  536. package/lib/js/schema/system/schema_version.json +13 -0
  537. package/lib/js/schema/system/scope.json +11 -0
  538. package/lib/js/schema/system/set.json +17 -0
  539. package/lib/js/schema/system/sharing.json +11 -0
  540. package/lib/js/schema/system/soft_removable.json +16 -0
  541. package/lib/js/schema/system/status.json +32 -0
  542. package/lib/js/schema/system/tags.json +15 -0
  543. package/lib/js/schema/system/timestampable.json +38 -0
  544. package/lib/js/schema/system/use_values.json +11 -0
  545. package/lib/js/schema/workflow/base.json +103 -0
  546. package/lib/js/schema/workflow/base_flow.json +218 -0
  547. package/lib/js/schema/workflow/scope.json +20 -0
  548. package/lib/js/schema/workflow/subworkflow/unit.json +2713 -0
  549. package/lib/js/schema/workflow/subworkflow.json +3087 -0
  550. package/lib/js/schema/workflow/unit/assertion.json +277 -0
  551. package/lib/js/schema/workflow/unit/assignment.json +314 -0
  552. package/lib/js/schema/workflow/unit/base.json +264 -0
  553. package/lib/js/schema/workflow/unit/condition.json +315 -0
  554. package/lib/js/schema/workflow/unit/execution.json +804 -0
  555. package/lib/js/schema/workflow/unit/input/_input.json +53 -0
  556. package/lib/js/schema/workflow/unit/input/_inputItem.json +20 -0
  557. package/lib/js/schema/workflow/unit/input/_inputItemId.json +19 -0
  558. package/lib/js/schema/workflow/unit/input/_inputItemScope.json +20 -0
  559. package/lib/js/schema/workflow/unit/input/_map_input/values.json +11 -0
  560. package/lib/js/schema/workflow/unit/input/_map_input.json +36 -0
  561. package/lib/js/schema/workflow/unit/io/api.json +24 -0
  562. package/lib/js/schema/workflow/unit/io/db.json +39 -0
  563. package/lib/js/schema/workflow/unit/io/object_storage.json +67 -0
  564. package/lib/js/schema/workflow/unit/io.json +418 -0
  565. package/lib/js/schema/workflow/unit/map.json +314 -0
  566. package/lib/js/schema/workflow/unit/processing.json +281 -0
  567. package/lib/js/schema/workflow/unit/reduce.json +297 -0
  568. package/lib/js/schema/workflow/unit/runtime/_runtime_item_full_object.json +15 -0
  569. package/lib/js/schema/workflow/unit/runtime/_runtime_item_name_object.json +15 -0
  570. package/lib/js/schema/workflow/unit/runtime/_runtime_item_string.json +7 -0
  571. package/lib/js/schema/workflow/unit/runtime/runtime_item.json +27 -0
  572. package/lib/js/schema/workflow/unit/runtime/runtime_items.json +128 -0
  573. package/lib/js/schema/workflow/unit/subworkflow.json +267 -0
  574. package/lib/js/schema/workflow/unit.json +3292 -0
  575. package/lib/js/schema/workflow.json +6492 -0
  576. package/lib/js/schemas.json +1 -0
  577. package/lib/js/scripts/compileTs.d.ts +1 -0
  578. package/lib/js/scripts/compileTs.js +79 -0
  579. package/lib/js/scripts/createEnumsFromYaml.d.ts +1 -0
  580. package/lib/js/scripts/createEnumsFromYaml.js +21 -67
  581. package/lib/js/scripts/setSchemaIds.d.ts +5 -0
  582. package/lib/js/scripts/setSchemaIds.js +26 -153
  583. package/lib/js/utils/ajv.d.ts +31 -0
  584. package/lib/js/utils/ajv.js +94 -0
  585. package/lib/js/utils/common.d.ts +6 -0
  586. package/lib/js/utils/common.js +15 -0
  587. package/lib/js/utils/filesystem.d.ts +2 -0
  588. package/lib/js/utils/filesystem.js +38 -0
  589. package/modules.d.ts +5 -0
  590. package/package.json +48 -23
  591. package/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_positions.json +1 -1
  592. package/schema/3pse/file/applications/espresso/7.2/pw.x/atomic_species.json +1 -1
  593. package/schema/3pse/file/applications/espresso/7.2/pw.x/cell.json +1 -1
  594. package/schema/3pse/file/applications/espresso/7.2/pw.x/cell_parameters.json +1 -1
  595. package/schema/3pse/file/applications/espresso/7.2/pw.x/control.json +1 -1
  596. package/schema/3pse/file/applications/espresso/7.2/pw.x/electrons.json +1 -1
  597. package/schema/3pse/file/applications/espresso/7.2/pw.x/hubbard.json +1 -1
  598. package/schema/3pse/file/applications/espresso/7.2/pw.x/ions.json +1 -1
  599. package/schema/3pse/file/applications/espresso/7.2/pw.x/k_points.json +1 -1
  600. package/schema/3pse/file/applications/espresso/7.2/pw.x/system.json +9 -6
  601. package/schema/3pse/file/applications/espresso/7.2/pw.x.json +2 -1
  602. package/schema/core/abstract/2d_data.json +1 -1
  603. package/schema/core/abstract/2d_plot.json +2 -1
  604. package/schema/core/abstract/3d_grid.json +2 -1
  605. package/schema/core/abstract/3d_tensor.json +1 -1
  606. package/schema/core/abstract/3d_vector_basis.json +1 -1
  607. package/schema/core/abstract/point.json +1 -1
  608. package/schema/core/abstract/vector.json +1 -1
  609. package/schema/core/primitive/1d_data_series.json +1 -1
  610. package/schema/core/primitive/3d_lattice.json +1 -1
  611. package/schema/core/primitive/array_of_3_booleans.json +1 -1
  612. package/schema/core/primitive/array_of_3_numbers.json +1 -1
  613. package/schema/core/primitive/array_of_ids.json +2 -3
  614. package/schema/core/primitive/array_of_strings.json +1 -1
  615. package/schema/core/primitive/axis.json +2 -1
  616. package/schema/core/primitive/group_info.json +1 -1
  617. package/schema/core/primitive/integer_one_or_zero.json +1 -1
  618. package/schema/core/primitive/linked_list/base_node.json +1 -1
  619. package/schema/core/primitive/linked_list/named_node.json +1 -1
  620. package/schema/core/primitive/linked_list/named_node_in_group.json +1 -1
  621. package/schema/core/primitive/linked_list/node_with_type.json +1 -1
  622. package/schema/core/primitive/linked_list.json +1 -1
  623. package/schema/core/primitive/scalar.json +1 -1
  624. package/schema/core/primitive/slugified_entry.json +1 -1
  625. package/schema/core/primitive/slugified_entry_or_slug.json +1 -1
  626. package/schema/core/primitive/string.json +1 -1
  627. package/schema/core/reference/exabyte.json +1 -1
  628. package/schema/core/reference/experiment/condition.json +3 -1
  629. package/schema/core/reference/experiment/location.json +2 -1
  630. package/schema/core/reference/experiment.json +2 -1
  631. package/schema/core/reference/literature/name.json +1 -1
  632. package/schema/core/reference/literature/pages.json +1 -1
  633. package/schema/core/reference/literature.json +2 -1
  634. package/schema/core/reference/modeling/exabyte.json +2 -1
  635. package/schema/core/reference/modeling.json +1 -1
  636. package/schema/core/reference.json +1 -1
  637. package/schema/core/reusable/atomic_data/per_orbital.json +1 -1
  638. package/schema/core/reusable/atomic_data/per_orbital_pair.json +1 -1
  639. package/schema/core/reusable/atomic_data/value_number.json +1 -1
  640. package/schema/core/reusable/atomic_data/value_string.json +2 -2
  641. package/schema/core/reusable/atomic_data_per_orbital_numeric.json +2 -2
  642. package/schema/core/reusable/atomic_data_per_orbital_pair_numeric.json +2 -2
  643. package/schema/core/reusable/atomic_orbital.json +1 -1
  644. package/schema/core/reusable/atomic_scalars.json +2 -1
  645. package/schema/core/reusable/atomic_strings.json +1 -1
  646. package/schema/core/reusable/atomic_vectors.json +3 -1
  647. package/schema/core/reusable/band_gap.json +2 -1
  648. package/schema/core/reusable/categories.json +2 -2
  649. package/schema/core/reusable/category_path.json +1 -1
  650. package/schema/core/reusable/dielectric_tensor_component.json +2 -1
  651. package/schema/core/reusable/energy.json +2 -1
  652. package/schema/core/reusable/file_metadata.json +2 -1
  653. package/schema/core/reusable/frequency_function_matrix.json +1 -1
  654. package/schema/core/reusable/object_storage_container_data.json +2 -1
  655. package/schema/element.json +2 -1
  656. package/schema/in_memory_entity/base.json +2 -1
  657. package/schema/in_memory_entity/defaultable.json +1 -1
  658. package/schema/in_memory_entity/named.json +1 -1
  659. package/schema/in_memory_entity/named_defaultable.json +1 -1
  660. package/schema/in_memory_entity/named_defaultable_has_metadata.json +1 -1
  661. package/schema/in_memory_entity/named_defaultable_runtime_items.json +1 -1
  662. package/schema/job/base.json +3 -2
  663. package/schema/job/compute.json +6 -14
  664. package/schema/job.json +2 -1
  665. package/schema/material/conventional.json +2 -1
  666. package/schema/material.json +2 -1
  667. package/schema/method/categorized_method.json +2 -1
  668. package/schema/method/method_parameters.json +1 -1
  669. package/schema/method/unit_method.json +2 -1
  670. package/schema/method.json +2 -1
  671. package/schema/methods_category/mathematical/diff/fd.json +3 -2
  672. package/schema/methods_category/mathematical/diff.json +3 -2
  673. package/schema/methods_category/mathematical/discr/mesh/hybrid.json +3 -2
  674. package/schema/methods_category/mathematical/discr/mesh/nstruct.json +3 -2
  675. package/schema/methods_category/mathematical/discr/mesh/struct/cartesian.json +2 -1
  676. package/schema/methods_category/mathematical/discr/mesh/struct.json +3 -2
  677. package/schema/methods_category/mathematical/discr/mesh.json +3 -2
  678. package/schema/methods_category/mathematical/discr.json +3 -2
  679. package/schema/methods_category/mathematical/fapprx/basisexp.json +3 -2
  680. package/schema/methods_category/mathematical/fapprx/ipol/lin.json +3 -2
  681. package/schema/methods_category/mathematical/fapprx/ipol/poly.json +3 -2
  682. package/schema/methods_category/mathematical/fapprx/ipol/spline.json +3 -2
  683. package/schema/methods_category/mathematical/fapprx/ipol.json +3 -2
  684. package/schema/methods_category/mathematical/fapprx.json +3 -2
  685. package/schema/methods_category/mathematical/intgr/analytic/volume.json +3 -2
  686. package/schema/methods_category/mathematical/intgr/analytic.json +3 -2
  687. package/schema/methods_category/mathematical/intgr/diffeq/order1.json +3 -1
  688. package/schema/methods_category/mathematical/intgr/diffeq/order2.json +3 -1
  689. package/schema/methods_category/mathematical/intgr/diffeq.json +3 -2
  690. package/schema/methods_category/mathematical/intgr/numquad/gauss.json +3 -2
  691. package/schema/methods_category/mathematical/intgr/numquad/newcot.json +3 -2
  692. package/schema/methods_category/mathematical/intgr/numquad.json +3 -2
  693. package/schema/methods_category/mathematical/intgr/transf/fourier.json +3 -1
  694. package/schema/methods_category/mathematical/intgr/transf.json +3 -1
  695. package/schema/methods_category/mathematical/intgr.json +3 -2
  696. package/schema/methods_category/mathematical/linalg/dcomp.json +3 -2
  697. package/schema/methods_category/mathematical/linalg/diag/davidson.json +3 -2
  698. package/schema/methods_category/mathematical/linalg/diag.json +3 -2
  699. package/schema/methods_category/mathematical/linalg/lintra.json +3 -2
  700. package/schema/methods_category/mathematical/linalg/matf.json +3 -2
  701. package/schema/methods_category/mathematical/linalg.json +3 -2
  702. package/schema/methods_category/mathematical/opt/diff/bracket.json +3 -2
  703. package/schema/methods_category/mathematical/opt/diff/local.json +3 -2
  704. package/schema/methods_category/mathematical/opt/diff/order1.json +3 -2
  705. package/schema/methods_category/mathematical/opt/diff/order2.json +3 -2
  706. package/schema/methods_category/mathematical/opt/diff/ordern/cg.json +3 -2
  707. package/schema/methods_category/mathematical/opt/diff/ordern.json +3 -2
  708. package/schema/methods_category/mathematical/opt/diff.json +3 -2
  709. package/schema/methods_category/mathematical/opt/ndiff/direct.json +3 -2
  710. package/schema/methods_category/mathematical/opt/ndiff/pop.json +3 -2
  711. package/schema/methods_category/mathematical/opt/ndiff/stoch.json +3 -2
  712. package/schema/methods_category/mathematical/opt/ndiff.json +3 -2
  713. package/schema/methods_category/mathematical/opt/root/bracket.json +3 -2
  714. package/schema/methods_category/mathematical/opt/root/iter.json +3 -2
  715. package/schema/methods_category/mathematical/opt/root.json +3 -2
  716. package/schema/methods_category/mathematical/opt.json +3 -2
  717. package/schema/methods_category/mathematical/regression.json +2 -1
  718. package/schema/methods_category/physical/qm/wf/ao/dunning.json +3 -2
  719. package/schema/methods_category/physical/qm/wf/ao/other.json +3 -2
  720. package/schema/methods_category/physical/qm/wf/ao/pople.json +3 -2
  721. package/schema/methods_category/physical/qm/wf/ao.json +3 -2
  722. package/schema/methods_category/physical/qm/wf/psp.json +3 -2
  723. package/schema/methods_category/physical/qm/wf/pw.json +3 -2
  724. package/schema/methods_category/physical/qm/wf/smearing.json +2 -1
  725. package/schema/methods_category/physical/qm/wf/tetrahedron.json +3 -2
  726. package/schema/methods_category/physical/qm/wf.json +3 -2
  727. package/schema/methods_category/physical/qm.json +3 -2
  728. package/schema/methods_directory/legacy/localorbital.json +2 -1
  729. package/schema/methods_directory/legacy/pseudopotential.json +2 -1
  730. package/schema/methods_directory/legacy/regression.json +2 -1
  731. package/schema/methods_directory/legacy/unknown.json +2 -1
  732. package/schema/methods_directory/mathematical/cg.json +6 -3
  733. package/schema/methods_directory/mathematical/davidson.json +6 -3
  734. package/schema/methods_directory/mathematical/regression/data.json +1 -1
  735. package/schema/methods_directory/mathematical/regression/dataset.json +1 -1
  736. package/schema/methods_directory/mathematical/regression/kernel_ridge/data_per_property.json +2 -1
  737. package/schema/methods_directory/mathematical/regression/linear/data_per_property.json +2 -1
  738. package/schema/methods_directory/mathematical/regression/per_feature_item.json +2 -1
  739. package/schema/methods_directory/mathematical/regression/precision.json +1 -1
  740. package/schema/methods_directory/mathematical/regression/precision_per_property.json +1 -1
  741. package/schema/methods_directory/mathematical/regression.json +2 -1
  742. package/schema/methods_directory/physical/ao/dunning.json +6 -2
  743. package/schema/methods_directory/physical/ao/other.json +6 -2
  744. package/schema/methods_directory/physical/ao/pople.json +6 -2
  745. package/schema/methods_directory/physical/psp/file.json +5 -2
  746. package/schema/methods_directory/physical/psp/file_data_item.json +5 -2
  747. package/schema/methods_directory/physical/psp.json +5 -2
  748. package/schema/methods_directory/physical/pw.json +5 -2
  749. package/schema/methods_directory/physical/smearing.json +5 -2
  750. package/schema/methods_directory/physical/tetrahedron.json +5 -2
  751. package/schema/model/categorized_model.json +2 -1
  752. package/schema/model/mixins/dft/double_hybrid_functional.json +1 -1
  753. package/schema/model/mixins/dft/gga_functional.json +3 -2
  754. package/schema/model/mixins/dft/hybrid_functional.json +1 -1
  755. package/schema/model/mixins/dft/lda_functional.json +3 -2
  756. package/schema/model/mixins/dft/mgga_functional.json +3 -2
  757. package/schema/model/mixins/dispersion_correction.json +1 -1
  758. package/schema/model/mixins/hubbard.json +1 -1
  759. package/schema/model/mixins/spin_orbit_coupling.json +3 -2
  760. package/schema/model/mixins/spin_polarization.json +3 -2
  761. package/schema/model/model_parameters.json +2 -1
  762. package/schema/model/model_without_method.json +2 -1
  763. package/schema/model.json +2 -1
  764. package/schema/models_category/pb/qm/abin/gw.json +2 -1
  765. package/schema/models_category/pb/qm/abin.json +2 -1
  766. package/schema/models_category/pb/qm/dft/ksdft/double_hybrid.json +2 -1
  767. package/schema/models_category/pb/qm/dft/ksdft/gga.json +2 -1
  768. package/schema/models_category/pb/qm/dft/ksdft/hybrid.json +2 -1
  769. package/schema/models_category/pb/qm/dft/ksdft/lda.json +2 -1
  770. package/schema/models_category/pb/qm/dft/ksdft/mgga.json +2 -1
  771. package/schema/models_category/pb/qm/dft/ksdft.json +2 -1
  772. package/schema/models_category/pb/qm/dft.json +2 -1
  773. package/schema/models_category/pb/qm/semp.json +2 -1
  774. package/schema/models_category/pb/qm.json +2 -1
  775. package/schema/models_category/pb.json +2 -1
  776. package/schema/models_category/st/det/ml/re.json +2 -1
  777. package/schema/models_category/st/det/ml.json +1 -1
  778. package/schema/models_category/st/det.json +1 -1
  779. package/schema/models_category/st.json +2 -1
  780. package/schema/models_directory/double_hybrid.json +2 -1
  781. package/schema/models_directory/gga.json +2 -1
  782. package/schema/models_directory/gw.json +3 -1
  783. package/schema/models_directory/hybrid.json +2 -1
  784. package/schema/models_directory/lda.json +2 -1
  785. package/schema/models_directory/legacy/dft.json +2 -1
  786. package/schema/models_directory/legacy/ml.json +2 -1
  787. package/schema/models_directory/legacy/unknown.json +2 -1
  788. package/schema/models_directory/mgga.json +2 -1
  789. package/schema/models_directory/re.json +2 -1
  790. package/schema/project.json +1 -1
  791. package/schema/properties_directory/derived_properties.json +8 -2
  792. package/schema/properties_directory/electronic_configuration.json +1 -1
  793. package/schema/properties_directory/elemental/atomic_radius.json +2 -1
  794. package/schema/properties_directory/elemental/electronegativity.json +2 -1
  795. package/schema/properties_directory/elemental/ionization_potential.json +2 -1
  796. package/schema/properties_directory/non-scalar/average_potential_profile.json +2 -1
  797. package/schema/properties_directory/non-scalar/band_gaps.json +4 -1
  798. package/schema/properties_directory/non-scalar/band_structure.json +4 -1
  799. package/schema/properties_directory/non-scalar/charge_density_profile.json +4 -1
  800. package/schema/properties_directory/non-scalar/density_of_states.json +4 -1
  801. package/schema/properties_directory/non-scalar/dielectric_tensor.json +2 -1
  802. package/schema/properties_directory/non-scalar/file_content.json +2 -1
  803. package/schema/properties_directory/non-scalar/hubbard_u.json +11 -4
  804. package/schema/properties_directory/non-scalar/hubbard_v.json +12 -4
  805. package/schema/properties_directory/non-scalar/hubbard_v_nn.json +2 -1
  806. package/schema/properties_directory/non-scalar/phonon_dispersions.json +4 -1
  807. package/schema/properties_directory/non-scalar/phonon_dos.json +3 -1
  808. package/schema/properties_directory/non-scalar/potential_profile.json +4 -1
  809. package/schema/properties_directory/non-scalar/reaction_energy_profile.json +4 -1
  810. package/schema/properties_directory/non-scalar/stress_tensor.json +2 -1
  811. package/schema/properties_directory/non-scalar/total_energy_contributions.json +14 -1
  812. package/schema/properties_directory/non-scalar/vibrational_spectrum.json +3 -1
  813. package/schema/properties_directory/scalar/electron_affinity.json +2 -1
  814. package/schema/properties_directory/scalar/fermi_energy.json +2 -1
  815. package/schema/properties_directory/scalar/formation_energy.json +2 -1
  816. package/schema/properties_directory/scalar/ionization_potential.json +2 -1
  817. package/schema/properties_directory/scalar/pressure.json +2 -1
  818. package/schema/properties_directory/scalar/reaction_energy_barrier.json +2 -1
  819. package/schema/properties_directory/scalar/surface_energy.json +2 -1
  820. package/schema/properties_directory/scalar/total_energy.json +2 -1
  821. package/schema/properties_directory/scalar/total_force.json +2 -1
  822. package/schema/properties_directory/scalar/valence_band_offset.json +2 -1
  823. package/schema/properties_directory/scalar/zero_point_energy.json +2 -1
  824. package/schema/properties_directory/structural/atomic_forces.json +2 -1
  825. package/schema/properties_directory/structural/basis/atomic_constraints.json +2 -1
  826. package/schema/properties_directory/structural/basis/atomic_coordinate.json +2 -1
  827. package/schema/properties_directory/structural/basis/atomic_coordinates.json +1 -0
  828. package/schema/properties_directory/structural/basis/atomic_element.json +2 -1
  829. package/schema/properties_directory/structural/basis/bonds.json +2 -1
  830. package/schema/properties_directory/structural/basis.json +1 -1
  831. package/schema/properties_directory/structural/density.json +2 -1
  832. package/schema/properties_directory/structural/elemental_ratio.json +4 -3
  833. package/schema/properties_directory/structural/inchi.json +2 -1
  834. package/schema/properties_directory/structural/inchi_key.json +2 -1
  835. package/schema/properties_directory/structural/lattice/lattice_bravais.json +2 -1
  836. package/schema/properties_directory/structural/lattice/lattice_vectors.json +2 -1
  837. package/schema/properties_directory/structural/lattice/type_enum.json +1 -2
  838. package/schema/properties_directory/structural/lattice/type_extended_enum.json +1 -1
  839. package/schema/properties_directory/structural/lattice.json +1 -1
  840. package/schema/properties_directory/structural/magnetic_moments.json +2 -1
  841. package/schema/properties_directory/structural/molecular_pattern.json +1 -1
  842. package/schema/properties_directory/structural/p-norm.json +2 -1
  843. package/schema/properties_directory/structural/patterns/functional_group.json +3 -1
  844. package/schema/properties_directory/structural/patterns/ring.json +3 -1
  845. package/schema/properties_directory/structural/patterns/special_bond.json +3 -1
  846. package/schema/properties_directory/structural/symmetry.json +3 -1
  847. package/schema/properties_directory/structural/volume.json +2 -1
  848. package/schema/properties_directory/workflow/convergence/electronic.json +2 -1
  849. package/schema/properties_directory/workflow/convergence/ionic.json +3 -1
  850. package/schema/properties_directory/workflow/convergence/kpoint.json +3 -1
  851. package/schema/property/base.json +2 -1
  852. package/schema/property/meta.json +2 -1
  853. package/schema/property/raw.json +2 -1
  854. package/schema/property/source.json +1 -1
  855. package/schema/software/application.json +7 -9
  856. package/schema/software/executable.json +3 -4
  857. package/schema/software/flavor.json +3 -11
  858. package/schema/software/template.json +4 -2
  859. package/schema/software_directory/ml/exabyteml.json +1 -1
  860. package/schema/software_directory/ml/unit/execution/evaluate/cross-validate.json +2 -1
  861. package/schema/software_directory/ml/unit/execution/initialize.json +2 -1
  862. package/schema/software_directory/ml/unit/execution/score.json +2 -1
  863. package/schema/software_directory/ml/unit/execution/train.json +2 -1
  864. package/schema/software_directory/ml/unit/processing/data_transformation/manipulation.json +1 -1
  865. package/schema/software_directory/ml/unit/processing/data_transformation/scale_and_reduce.json +2 -2
  866. package/schema/software_directory/ml/unit/processing/feature_selection/filter_based.json +1 -1
  867. package/schema/software_directory/modeling/deepmd.json +1 -1
  868. package/schema/software_directory/modeling/espresso/arguments.json +1 -1
  869. package/schema/software_directory/modeling/espresso.json +1 -1
  870. package/schema/software_directory/modeling/nwchem.json +1 -1
  871. package/schema/software_directory/modeling/unit/execution.json +1 -1
  872. package/schema/software_directory/modeling/vasp.json +1 -1
  873. package/schema/software_directory/scripting/jupyter-lab.json +1 -1
  874. package/schema/software_directory/scripting/python.json +1 -1
  875. package/schema/software_directory/scripting/shell.json +1 -1
  876. package/schema/software_directory/scripting/unit/execution.json +1 -1
  877. package/schema/system/_material.json +2 -1
  878. package/schema/system/_parent_job.json +2 -1
  879. package/schema/system/_project.json +2 -1
  880. package/schema/system/bankable.json +2 -1
  881. package/schema/system/consistency_check.json +1 -1
  882. package/schema/system/creator.json +2 -1
  883. package/schema/system/creator_account.json +2 -1
  884. package/schema/system/database_source.json +6 -8
  885. package/schema/system/defaultable.json +2 -1
  886. package/schema/system/description.json +2 -1
  887. package/schema/system/entity_reference.json +2 -1
  888. package/schema/system/file_source.json +1 -1
  889. package/schema/system/history.json +2 -1
  890. package/schema/system/in_set.json +2 -1
  891. package/schema/system/is_multi_material.json +2 -1
  892. package/schema/system/is_outdated.json +2 -1
  893. package/schema/system/job_extended.json +2 -1
  894. package/schema/system/message.json +2 -1
  895. package/schema/system/metadata.json +2 -1
  896. package/schema/system/name.json +2 -1
  897. package/schema/system/owner.json +2 -1
  898. package/schema/system/path.json +1 -1
  899. package/schema/system/path_entity.json +1 -1
  900. package/schema/system/schema_version.json +2 -1
  901. package/schema/system/scope.json +2 -1
  902. package/schema/system/set.json +2 -1
  903. package/schema/system/sharing.json +2 -1
  904. package/schema/system/soft_removable.json +2 -1
  905. package/schema/system/status.json +2 -1
  906. package/schema/system/tags.json +2 -1
  907. package/schema/system/timestampable.json +2 -1
  908. package/schema/system/use_values.json +2 -1
  909. package/schema/workflow/base.json +1 -1
  910. package/schema/workflow/base_flow.json +9 -2
  911. package/schema/workflow/scope.json +1 -1
  912. package/schema/workflow/subworkflow/unit.json +35 -0
  913. package/schema/workflow/subworkflow.json +2 -2
  914. package/schema/workflow/unit/assertion.json +2 -2
  915. package/schema/workflow/unit/assignment.json +16 -3
  916. package/schema/workflow/unit/base.json +68 -0
  917. package/schema/workflow/unit/condition.json +2 -2
  918. package/schema/workflow/unit/execution.json +2 -2
  919. package/schema/workflow/unit/input/_input.json +1 -1
  920. package/schema/workflow/unit/input/_inputItem.json +1 -1
  921. package/schema/workflow/unit/input/_inputItemId.json +2 -4
  922. package/schema/workflow/unit/input/_inputItemScope.json +1 -1
  923. package/schema/workflow/unit/input/_map_input/values.json +11 -0
  924. package/schema/workflow/unit/input/_map_input.json +36 -0
  925. package/schema/workflow/unit/io/api.json +1 -1
  926. package/schema/workflow/unit/io/db.json +1 -1
  927. package/schema/workflow/unit/io/object_storage.json +2 -2
  928. package/schema/workflow/unit/io.json +2 -2
  929. package/schema/workflow/unit/map.json +2 -2
  930. package/schema/workflow/unit/processing.json +2 -2
  931. package/schema/workflow/unit/reduce.json +2 -2
  932. package/schema/workflow/unit/runtime/_runtime_item_full_object.json +1 -1
  933. package/schema/workflow/unit/runtime/_runtime_item_name_object.json +1 -1
  934. package/schema/workflow/unit/runtime/_runtime_item_string.json +1 -1
  935. package/schema/workflow/unit/runtime/runtime_item.json +1 -1
  936. package/schema/workflow/unit/runtime/runtime_items.json +1 -1
  937. package/schema/workflow/unit/subworkflow.json +18 -0
  938. package/schema/workflow/unit.json +22 -46
  939. package/schema/workflow.json +2 -30
  940. package/set_schema_ids.ts +3 -0
  941. package/src/js/esse/JSONSchemasGenerator.ts +94 -0
  942. package/src/js/esse/JSONSchemasInterface.ts +56 -0
  943. package/src/js/esse/JSONSchemasInterfaceServer.ts +49 -0
  944. package/src/js/esse/schemaUtils.ts +28 -0
  945. package/src/js/esse/types.ts +3 -0
  946. package/src/js/esse/utils.ts +72 -0
  947. package/src/js/json_include/{index.js → index.ts} +22 -21
  948. package/src/js/scripts/compileTs.ts +84 -0
  949. package/src/js/scripts/{createEnumsFromYaml.mjs → createEnumsFromYaml.ts} +5 -19
  950. package/src/js/scripts/setSchemaIds.ts +28 -0
  951. package/src/js/utils/ajv.ts +119 -0
  952. package/src/js/utils/common.ts +15 -0
  953. package/src/js/utils/filesystem.ts +34 -0
  954. package/tsconfig.json +34 -0
  955. package/example/workflow/unit.json +0 -8
  956. package/lib/js/esse/index.js +0 -101
  957. package/lib/js/json_include/utils.js +0 -22
  958. package/src/js/esse/index.js +0 -57
  959. package/src/js/esse/schemaUtils.js +0 -45
  960. package/src/js/esse/utils.js +0 -52
  961. package/src/js/json_include/utils.js +0 -11
  962. package/src/js/scripts/setSchemaIds.mjs +0 -34
  963. /package/src/js/esse/{settings.js → settings.ts} +0 -0
  964. /package/src/js/json_include/{settings.js → settings.ts} +0 -0
package/.eslintrc.json CHANGED
@@ -1,3 +1,11 @@
1
1
  {
2
- "extends": ["@exabyte-io/eslint-config"]
2
+ "extends": ["@exabyte-io/eslint-config"],
3
+ "ignorePatterns": ["lib/js/**/*.js", "lib/js/**/*.ts"],
4
+ "settings": {
5
+ "import/resolver": {
6
+ "node": {
7
+ "extensions": [".js", ".jsx", ".ts", ".tsx"]
8
+ }
9
+ }
10
+ }
3
11
  }
package/.mocharc.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extension": ["ts"],
3
+ "spec": "tests/js/**/*.ts",
4
+ "require": "ts-node/register"
5
+ }
package/build_schemas.js CHANGED
@@ -4,23 +4,12 @@
4
4
  * downstream consumption to avoid FS calls in the browser.
5
5
  */
6
6
  const fs = require("fs");
7
- const path = require("path");
8
- const mergeAllOf = require("json-schema-merge-allof");
9
- const { ESSE } = require("./lib/js/esse");
7
+ const JSONSchemasGenerator = require("./lib/js/esse/JSONSchemasGenerator").default;
10
8
 
11
9
  // JS Modules
12
10
 
13
- const esse = new ESSE();
14
- const { schemas, wrappedExamples, propertiesManifest, results } = esse;
15
- const schema = esse.buildGlobalSchema();
16
-
17
- fs.writeFileSync(
18
- "./schemas.js",
19
- "module.exports = {schemas: " + JSON.stringify(schemas) + "}",
20
- "utf8",
21
- );
22
-
23
- fs.writeFileSync("./schema.js", "module.exports = " + JSON.stringify(schema), "utf8");
11
+ const generator = new JSONSchemasGenerator();
12
+ const { schemas, wrappedExamples, propertiesManifest, results } = generator;
24
13
 
25
14
  if (process.env.BUILD_PYTHON_MODULES === "true") {
26
15
  // PY Modules
@@ -52,21 +41,7 @@ if (process.env.BUILD_ASSETS !== "true") {
52
41
  }
53
42
 
54
43
  const subfolder = process.env.BUILD_PATH || "./docs/js/";
55
- schemas.forEach((s) => {
56
- let mergedSchema = s;
57
- if (process.env.SKIP_MERGE_ALLOF !== "true") {
58
- mergedSchema = mergeAllOf(s, {
59
- resolvers: { defaultResolver: mergeAllOf.options.resolvers.title },
60
- });
61
- }
62
- const id_as_path = mergedSchema.$id.replace("-", "_");
63
- const full_path = `${subfolder}/schema/${id_as_path}.json`;
64
- fs.mkdirSync(path.dirname(full_path), { recursive: true });
65
- fs.writeFileSync(full_path, JSON.stringify(mergedSchema, null, 4), "utf8");
66
- });
67
- wrappedExamples.forEach((e) => {
68
- const id_as_path = e.path.replace("-", "_");
69
- const full_path = `${subfolder}/example/${id_as_path}.json`;
70
- fs.mkdirSync(path.dirname(full_path), { recursive: true });
71
- fs.writeFileSync(full_path, JSON.stringify(e.data, null, 4), "utf8");
72
- });
44
+ const skipMergeAllOff = process.env.SKIP_MERGE_ALLOF === "true";
45
+
46
+ generator.writeResolvedSchemas(subfolder, skipMergeAllOff);
47
+ generator.writeResolvedExamples(subfolder);
package/compile_ts.ts ADDED
@@ -0,0 +1,3 @@
1
+ import compileTS from "./src/js/scripts/compileTs";
2
+
3
+ compileTS("./lib/js/schema", `./lib/js/types.ts`);
@@ -1,4 +1,5 @@
1
1
  {
2
+ "name": "regression",
2
3
  "categories": {
3
4
  "tier1": "st",
4
5
  "tier2": "det",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "units": [
14
14
  {
15
- "...": "include(unit.json)"
15
+ "...": "include(unit/execution.json)"
16
16
  }
17
17
  ]
18
18
  }
@@ -28,7 +28,8 @@
28
28
  {
29
29
  "_id": "LCthJ6E2QabYCZqf4",
30
30
  "flowchartId": "05c362dc27ff1bb98d16fd60",
31
- "type": "subworkflow"
31
+ "type": "subworkflow",
32
+ "name": "subworkflow unit"
32
33
  }
33
34
  ]
34
35
  }
@@ -0,0 +1,20 @@
1
+ import { JSONSchema, JSONSchemaWithPath } from "./utils";
2
+ interface JSONSchemasGeneratorConfig {
3
+ schemasDir: string;
4
+ examplesDir?: string;
5
+ propertiesManifestDir?: string;
6
+ }
7
+ export default class JSONSchemasGenerator implements JSONSchemasGeneratorConfig {
8
+ readonly schemas: JSONSchema[];
9
+ readonly examples?: JSONSchema[];
10
+ readonly wrappedExamples: JSONSchemaWithPath[];
11
+ readonly propertiesManifest: object;
12
+ readonly results: object;
13
+ readonly schemasDir: string;
14
+ readonly examplesDir?: string;
15
+ readonly propertiesManifestDir?: string;
16
+ constructor(config?: JSONSchemasGeneratorConfig);
17
+ writeResolvedSchemas(subfolder: string, skipMergeAllOff?: boolean): void;
18
+ writeResolvedExamples(subfolder: string): void;
19
+ }
20
+ export {};
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* eslint-disable class-methods-use-this */
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const js_yaml_1 = __importDefault(require("js-yaml"));
9
+ const json_schema_merge_allof_1 = __importDefault(require("json-schema-merge-allof"));
10
+ const path_1 = __importDefault(require("path"));
11
+ const settings_1 = require("./settings");
12
+ const utils_1 = require("./utils");
13
+ const DEFAULT_CONFIG = {
14
+ schemasDir: settings_1.SCHEMAS_DIR,
15
+ examplesDir: settings_1.EXAMPLES_DIR,
16
+ propertiesManifestDir: settings_1.PROPERTIES_MANIFEST_PATH,
17
+ };
18
+ class JSONSchemasGenerator {
19
+ constructor(config = DEFAULT_CONFIG) {
20
+ this.schemasDir = config.schemasDir;
21
+ this.examplesDir = config.examplesDir;
22
+ this.propertiesManifestDir = config.propertiesManifestDir;
23
+ this.schemas = (0, utils_1.parseIncludeReferenceStatementsByDir)(this.schemasDir);
24
+ this.wrappedExamples = this.examplesDir
25
+ ? (0, utils_1.parseIncludeReferenceStatementsByDir)(this.examplesDir, true)
26
+ : [];
27
+ this.examples = this.wrappedExamples.map((example) => example.data);
28
+ this.propertiesManifest = this.propertiesManifestDir
29
+ ? js_yaml_1.default.load(fs_1.default.readFileSync(this.propertiesManifestDir, "utf-8"))
30
+ : {};
31
+ this.results = Object.entries(this.propertiesManifest)
32
+ .map((k) => (k[1].isResult ? k[0] : null))
33
+ .filter((x) => x);
34
+ }
35
+ writeResolvedSchemas(subfolder, skipMergeAllOff = false) {
36
+ const schemasFolder = `${subfolder}/schema`;
37
+ fs_1.default.rmSync(schemasFolder, { recursive: true, force: true });
38
+ const mergeAllOfConfig = {
39
+ resolvers: { defaultResolver: json_schema_merge_allof_1.default.options.resolvers.title },
40
+ };
41
+ const schemas = this.schemas.map((schema) => {
42
+ var _a;
43
+ console.log(`Resolving schema: ${schema.$id}`);
44
+ const mergedSchema = skipMergeAllOff ? schema : (0, json_schema_merge_allof_1.default)(schema, mergeAllOfConfig);
45
+ const idAsPath = (_a = mergedSchema.$id) === null || _a === void 0 ? void 0 : _a.replace(/-/g, "_");
46
+ const fullPath = `${schemasFolder}/${idAsPath}.json`;
47
+ fs_1.default.mkdirSync(path_1.default.dirname(fullPath), { recursive: true });
48
+ fs_1.default.writeFileSync(fullPath, JSON.stringify(mergedSchema, null, 4), "utf8");
49
+ return mergedSchema;
50
+ });
51
+ fs_1.default.writeFileSync(`${subfolder}/schemas.json`, `${JSON.stringify(schemas)}`);
52
+ }
53
+ writeResolvedExamples(subfolder) {
54
+ const examplesFolder = `${subfolder}/example`;
55
+ fs_1.default.rmSync(`${examplesFolder}`, { recursive: true, force: true });
56
+ this.wrappedExamples.forEach((e) => {
57
+ const idAsPath = e.path.replace(/-/g, "_");
58
+ const fullPath = `${examplesFolder}/${idAsPath}.json`;
59
+ fs_1.default.mkdirSync(path_1.default.dirname(fullPath), { recursive: true });
60
+ fs_1.default.writeFileSync(fullPath, JSON.stringify(e.data, null, 4), "utf8");
61
+ });
62
+ }
63
+ }
64
+ exports.default = JSONSchemasGenerator;
@@ -0,0 +1,31 @@
1
+ import { JSONSchema } from "./utils";
2
+ export type JSONSchemasInterfaceQuery = {
3
+ [key in keyof JSONSchema]: {
4
+ $regex: string;
5
+ };
6
+ };
7
+ export default class JSONSchemasInterface {
8
+ static schemasCache: Map<string, import("json-schema").JSONSchema7>;
9
+ static setSchemas(schema: JSONSchema[]): void;
10
+ static addSchema(schema: JSONSchema): void;
11
+ static getSchemaById(schemaId: string): import("json-schema").JSONSchema7 | undefined;
12
+ /**
13
+ * @example <caption>Search by $id regex</caption>
14
+ * JSONSchemasInterface.matchSchema({
15
+ * $id: {
16
+ * $regex: 'software-application'
17
+ * }
18
+ * })
19
+ *
20
+ * @example <caption>Search by $id and title regex</caption>
21
+ * JSONSchemasInterface.matchSchema({
22
+ * $id: {
23
+ * $regex: 'software-application'
24
+ * },
25
+ * title: {
26
+ * $regex: 'application'
27
+ * }
28
+ * })
29
+ */
30
+ static matchSchema(query: JSONSchemasInterfaceQuery): import("json-schema").JSONSchema7 | undefined;
31
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class JSONSchemasInterface {
4
+ static setSchemas(schema) {
5
+ schema.forEach((schema) => this.addSchema(schema));
6
+ }
7
+ static addSchema(schema) {
8
+ if (schema.$id) {
9
+ this.schemasCache.set(schema.$id, schema);
10
+ }
11
+ }
12
+ static getSchemaById(schemaId) {
13
+ return this.schemasCache.get(schemaId);
14
+ }
15
+ /**
16
+ * @example <caption>Search by $id regex</caption>
17
+ * JSONSchemasInterface.matchSchema({
18
+ * $id: {
19
+ * $regex: 'software-application'
20
+ * }
21
+ * })
22
+ *
23
+ * @example <caption>Search by $id and title regex</caption>
24
+ * JSONSchemasInterface.matchSchema({
25
+ * $id: {
26
+ * $regex: 'software-application'
27
+ * },
28
+ * title: {
29
+ * $regex: 'application'
30
+ * }
31
+ * })
32
+ */
33
+ static matchSchema(query) {
34
+ const searchFields = Object.keys(query);
35
+ return Array.from(this.schemasCache.values()).find((schema) => {
36
+ return searchFields.every((field) => {
37
+ const queryField = query[field];
38
+ const schemaField = schema[field];
39
+ if (!queryField || typeof schemaField !== "string") {
40
+ return;
41
+ }
42
+ return new RegExp(queryField.$regex).test(schemaField);
43
+ });
44
+ });
45
+ }
46
+ }
47
+ exports.default = JSONSchemasInterface;
48
+ JSONSchemasInterface.schemasCache = new Map();
@@ -0,0 +1,9 @@
1
+ import { SchemaObject } from "ajv";
2
+ import JSONSchemasInterface from "./JSONSchemasInterface";
3
+ export declare function readSchemaFolderSync(folderPath: string): SchemaObject[];
4
+ export default class JSONSchemasInterfaceServer extends JSONSchemasInterface {
5
+ static schemaFolder: string;
6
+ static setSchemaFolder(schemaFolder: string): void;
7
+ static readSchemaFolder(): void;
8
+ static getSchemaById(schemaId: string): import("json-schema").JSONSchema7 | undefined;
9
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.readSchemaFolderSync = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const filesystem_1 = require("../utils/filesystem");
10
+ const JSONSchemasInterface_1 = __importDefault(require("./JSONSchemasInterface"));
11
+ function readSchemaFolderSync(folderPath) {
12
+ const schemas = [];
13
+ (0, filesystem_1.walkDirSync)(folderPath, (filePath) => {
14
+ if (path_1.default.extname(filePath) !== ".json") {
15
+ return;
16
+ }
17
+ const schema = JSON.parse(fs_1.default.readFileSync(filePath).toString());
18
+ schemas.push(schema);
19
+ });
20
+ return schemas;
21
+ }
22
+ exports.readSchemaFolderSync = readSchemaFolderSync;
23
+ class JSONSchemasInterfaceServer extends JSONSchemasInterface_1.default {
24
+ static setSchemaFolder(schemaFolder) {
25
+ if (this.schemaFolder !== schemaFolder) {
26
+ this.schemaFolder = schemaFolder;
27
+ this.readSchemaFolder();
28
+ }
29
+ }
30
+ static readSchemaFolder() {
31
+ const schemas = readSchemaFolderSync(this.schemaFolder);
32
+ schemas.forEach((schema) => {
33
+ if (schema.$id) {
34
+ this.schemasCache.set(schema.$id, schema);
35
+ }
36
+ });
37
+ }
38
+ static getSchemaById(schemaId) {
39
+ if (this.schemasCache.size === 0) {
40
+ this.readSchemaFolder();
41
+ }
42
+ return super.getSchemaById(schemaId);
43
+ }
44
+ }
45
+ exports.default = JSONSchemasInterfaceServer;
46
+ JSONSchemasInterfaceServer.schemaFolder = path_1.default.resolve(__dirname, "./../schema");
@@ -0,0 +1,4 @@
1
+ import { JSONSchema, JSONSchemaDefinition } from "./utils";
2
+ export type MapSchema = (prop: JSONSchemaDefinition) => JSONSchemaDefinition | undefined;
3
+ export declare function mapObjectDeep(object: JSONSchemaDefinition, mapValue: MapSchema): JSONSchema;
4
+ export declare function mapObjectDeep(object: JSONSchemaDefinition[], mapValue: MapSchema): JSONSchema[];
@@ -1,78 +1,17 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.buildSchemaDefinitions = buildSchemaDefinitions;
7
- exports.makeFlatSchemaKey = makeFlatSchemaKey;
8
- exports.makeFlatSchemaRef = makeFlatSchemaRef;
9
- exports.mapObjectDeep = mapObjectDeep;
10
-
11
- var _keyBy = _interopRequireDefault(require("lodash/keyBy"));
12
-
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
-
15
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
-
17
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18
-
19
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
20
-
21
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
22
-
23
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
24
-
25
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
-
27
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
28
-
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapObjectDeep = void 0;
29
4
  function mapObjectDeep(object, mapValue) {
30
- if (_typeof(object) !== "object") {
31
- return object;
32
- }
33
-
34
- if (Array.isArray(object)) {
35
- return object.map(function (innerValue) {
36
- return mapValue(innerValue) || mapObjectDeep(innerValue, mapValue);
5
+ if (typeof object !== "object" || object === null) {
6
+ return object;
7
+ }
8
+ if (Array.isArray(object)) {
9
+ return object.map((innerValue) => mapObjectDeep(innerValue, mapValue));
10
+ }
11
+ const mappedObject = mapValue(object) || object;
12
+ const entries = Object.entries(mappedObject).map(([key, value]) => {
13
+ return [key, mapObjectDeep(value, mapValue)];
37
14
  });
38
- }
39
-
40
- var entries = Object.entries(object).map(function (_ref) {
41
- var _ref2 = _slicedToArray(_ref, 2),
42
- key = _ref2[0],
43
- value = _ref2[1];
44
-
45
- var res = mapValue(value);
46
- return [key, res === undefined ? mapObjectDeep(value, mapValue) : res];
47
- });
48
- return Object.fromEntries(entries);
49
- }
50
-
51
- function makeFlatSchemaKey(schemaId) {
52
- return schemaId.replace(/[^a-zA-Z-]/g, ":");
53
- }
54
-
55
- function makeFlatSchemaRef(schemaId) {
56
- return {
57
- $ref: "#/definitions/".concat(makeFlatSchemaKey(schemaId))
58
- };
15
+ return Object.fromEntries(entries);
59
16
  }
60
-
61
- function buildSchemaDefinitions(originalSchemas) {
62
- var schemas = originalSchemas.map(function (schema) {
63
- return mapObjectDeep(schema, function (value) {
64
- if (_typeof(value) === "object" && value.$id) {
65
- return makeFlatSchemaRef(value.$id);
66
- }
67
-
68
- if (_typeof(value) === "object" && value.$ref) {
69
- // assume value.$ref is a $id
70
- return makeFlatSchemaRef(value.$ref);
71
- }
72
- });
73
- });
74
- return (0, _keyBy["default"])(schemas, function (_ref3) {
75
- var $id = _ref3.$id;
76
- return makeFlatSchemaKey($id);
77
- });
78
- }
17
+ exports.mapObjectDeep = mapObjectDeep;
@@ -0,0 +1,3 @@
1
+ export declare const SCHEMAS_DIR: string;
2
+ export declare const EXAMPLES_DIR: string;
3
+ export declare const PROPERTIES_MANIFEST_PATH: string;
@@ -1,22 +1,10 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SCHEMAS_DIR = exports.PROPERTIES_MANIFEST_PATH = exports.EXAMPLES_DIR = void 0;
7
-
8
- var _path = _interopRequireDefault(require("path"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- var SCHEMAS_DIR = _path["default"].resolve(__dirname, "../../../schema");
13
-
14
- exports.SCHEMAS_DIR = SCHEMAS_DIR;
15
-
16
- var EXAMPLES_DIR = _path["default"].resolve(__dirname, "../../../example");
17
-
18
- exports.EXAMPLES_DIR = EXAMPLES_DIR;
19
-
20
- var PROPERTIES_MANIFEST_PATH = _path["default"].resolve(__dirname, "../../../manifest/properties.yaml");
21
-
22
- exports.PROPERTIES_MANIFEST_PATH = PROPERTIES_MANIFEST_PATH;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PROPERTIES_MANIFEST_PATH = exports.EXAMPLES_DIR = exports.SCHEMAS_DIR = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ exports.SCHEMAS_DIR = path_1.default.resolve(__dirname, "../../../schema");
9
+ exports.EXAMPLES_DIR = path_1.default.resolve(__dirname, "../../../example");
10
+ exports.PROPERTIES_MANIFEST_PATH = path_1.default.resolve(__dirname, "../../../manifest/properties.yaml");
@@ -0,0 +1,3 @@
1
+ export interface AnyObject {
2
+ [key: string]: unknown;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { JSONSchema7, JSONSchema7Definition } from "json-schema";
2
+ export type JSONSchema = JSONSchema7;
3
+ export type JSONSchemaDefinition = JSONSchema7Definition;
4
+ /**
5
+ * Resolves `include` and `$ref` statements.
6
+ * @param filePath {String} file to parse.
7
+ */
8
+ export declare function parseIncludeReferenceStatements(filePath: string): JSONSchema;
9
+ export interface JSONSchemaWithPath {
10
+ data: JSONSchema;
11
+ path: string;
12
+ }
13
+ export declare function parseIncludeReferenceStatementsByDir(dirPath: string, wrapInDataAndPath: true): JSONSchemaWithPath[];
14
+ export declare function parseIncludeReferenceStatementsByDir(dirPath: string, wrapInDataAndPath?: false): JSONSchema[];
@@ -1,74 +1,54 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.parseIncludeReferenceStatements = parseIncludeReferenceStatements;
7
- exports.parseIncludeReferenceStatementsByDir = parseIncludeReferenceStatementsByDir;
8
-
9
- var _file = _interopRequireDefault(require("file"));
10
-
11
- var _jsonSchemaDerefSync = _interopRequireDefault(require("json-schema-deref-sync"));
12
-
13
- var _path2 = _interopRequireDefault(require("path"));
14
-
15
- var _json_include = require("../json_include");
16
-
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
-
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parseIncludeReferenceStatementsByDir = exports.parseIncludeReferenceStatements = void 0;
7
+ const json_schema_deref_sync_1 = __importDefault(require("json-schema-deref-sync"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const json_include_1 = require("../json_include");
10
+ const filesystem_1 = require("../utils/filesystem");
19
11
  /**
20
12
  * Resolves `include` and `$ref` statements.
21
13
  * @param filePath {String} file to parse.
22
14
  */
23
15
  function parseIncludeReferenceStatements(filePath) {
24
- var jsonResolver = new _json_include.JSONInclude();
25
- var parsed = jsonResolver.parseIncludeStatements(filePath);
26
-
27
- var dirPath = _path2["default"].dirname(filePath);
28
-
29
- var dereferenced = (0, _jsonSchemaDerefSync["default"])(parsed, {
30
- baseFolder: dirPath
31
- }); // handle circular references and use non-dereferenced source
32
-
33
- if (dereferenced instanceof Error && dereferenced.message === "Circular self reference") {
34
- dereferenced = parsed;
35
- }
36
-
37
- return dereferenced;
16
+ const jsonResolver = new json_include_1.JSONInclude();
17
+ const parsed = jsonResolver.parseIncludeStatements(filePath);
18
+ const dirPath = path_1.default.dirname(filePath);
19
+ let dereferenced = (0, json_schema_deref_sync_1.default)(parsed, { baseFolder: dirPath, removeIds: true });
20
+ // handle circular references and use non-dereferenced source
21
+ if (dereferenced instanceof Error && dereferenced.message === "Circular self reference") {
22
+ dereferenced = parsed;
23
+ }
24
+ return dereferenced;
38
25
  }
26
+ exports.parseIncludeReferenceStatements = parseIncludeReferenceStatements;
39
27
  /**
40
28
  * Resolves `include` and `$ref` statements for all the JSON files inside a given directory.
41
- * @param dirPath {String} directory to parse.
29
+ * @param dirPath directory to parse.
42
30
  */
43
-
44
-
45
- function parseIncludeReferenceStatementsByDir(dirPath) {
46
- var wrapInDataAndPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
47
- var data = [];
48
-
49
- var topDir = _path2["default"].resolve(__dirname, "../../../");
50
-
51
- _file["default"].walkSync(dirPath, function (dirPath_, dirs_, files_) {
52
- files_.forEach(function (file_) {
53
- var filePath = _path2["default"].join(dirPath_, file_);
54
-
55
- if (filePath.endsWith(".json")) {
56
- var config = parseIncludeReferenceStatements(filePath);
57
-
58
- if (wrapInDataAndPath) {
59
- var _path = _path2["default"].join( // remove leading slashes and "example" from path
60
- _path2["default"].dirname(filePath).replace(_path2["default"].join(topDir, "example"), "").replace(/^\/+/, ""), _path2["default"].basename(filePath).replace(".json", ""));
61
-
62
- data.push({
63
- data: config,
64
- path: _path
65
- });
66
- } else {
67
- data.push(config);
31
+ function parseIncludeReferenceStatementsByDir(dirPath, wrapInDataAndPath = false) {
32
+ const schemas = [];
33
+ const schemasWithPath = [];
34
+ const topDir = path_1.default.resolve(__dirname, "../../../");
35
+ (0, filesystem_1.walkDirSync)(dirPath, (filePath) => {
36
+ if (filePath.endsWith(".json")) {
37
+ const config = parseIncludeReferenceStatements(filePath);
38
+ if (wrapInDataAndPath) {
39
+ const _path = path_1.default.join(
40
+ // remove leading slashes and "example" from path
41
+ path_1.default
42
+ .dirname(filePath)
43
+ .replace(path_1.default.join(topDir, "example"), "")
44
+ .replace(/^\/+/, ""), path_1.default.basename(filePath).replace(".json", ""));
45
+ schemasWithPath.push({ data: config, path: _path });
46
+ }
47
+ else {
48
+ schemas.push(config);
49
+ }
68
50
  }
69
- }
70
51
  });
71
- });
72
-
73
- return data;
74
- }
52
+ return wrapInDataAndPath ? schemasWithPath : schemas;
53
+ }
54
+ exports.parseIncludeReferenceStatementsByDir = parseIncludeReferenceStatementsByDir;