@mat3ra/esse 2026.5.28-0 → 2026.5.30-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.
@@ -66,5 +66,5 @@ class JSONSchemasInterface {
66
66
  return patchedSchema;
67
67
  }
68
68
  }
69
- exports.default = JSONSchemasInterface;
70
69
  JSONSchemasInterface.schemasCache = new Map();
70
+ exports.default = JSONSchemasInterface;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.readSchemaFolderSync = void 0;
6
+ exports.readSchemaFolderSync = readSchemaFolderSync;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const filesystem_1 = require("../utils/filesystem");
@@ -19,7 +19,6 @@ function readSchemaFolderSync(folderPath) {
19
19
  });
20
20
  return schemas;
21
21
  }
22
- exports.readSchemaFolderSync = readSchemaFolderSync;
23
22
  class JSONSchemasInterfaceServer extends JSONSchemasInterface_1.default {
24
23
  static setSchemaFolder(schemaFolder) {
25
24
  if (this.schemaFolder !== schemaFolder) {
@@ -42,5 +41,5 @@ class JSONSchemasInterfaceServer extends JSONSchemasInterface_1.default {
42
41
  return super.getSchemaById(schemaId);
43
42
  }
44
43
  }
45
- exports.default = JSONSchemasInterfaceServer;
46
44
  JSONSchemasInterfaceServer.schemaFolder = path_1.default.resolve(__dirname, "./../schema");
45
+ exports.default = JSONSchemasInterfaceServer;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapObjectDeep = void 0;
3
+ exports.mapObjectDeep = mapObjectDeep;
4
4
  function mapObjectDeep(object, mapValue) {
5
5
  if (typeof object !== "object" || object === null) {
6
6
  return object;
@@ -14,4 +14,3 @@ function mapObjectDeep(object, mapValue) {
14
14
  });
15
15
  return Object.fromEntries(entries);
16
16
  }
17
- exports.mapObjectDeep = mapObjectDeep;
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseIncludeReferenceStatementsByDir = exports.parseIncludeReferenceStatements = void 0;
6
+ exports.parseIncludeReferenceStatements = parseIncludeReferenceStatements;
7
+ exports.parseIncludeReferenceStatementsByDir = parseIncludeReferenceStatementsByDir;
7
8
  /**
8
9
  * Server-side schema parsing utilities.
9
10
  *
@@ -37,7 +38,6 @@ function parseIncludeReferenceStatements(filePath) {
37
38
  }
38
39
  return dereferenced;
39
40
  }
40
- exports.parseIncludeReferenceStatements = parseIncludeReferenceStatements;
41
41
  /**
42
42
  * Resolves `include` and `$ref` statements for all the JSON files inside a given directory.
43
43
  * @param dirPath directory to parse.
@@ -65,4 +65,3 @@ function parseIncludeReferenceStatementsByDir(dirPath, wrapInDataAndPath = false
65
65
  });
66
66
  return wrapInDataAndPath ? schemasWithPath : schemas;
67
67
  }
68
- exports.parseIncludeReferenceStatementsByDir = parseIncludeReferenceStatementsByDir;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyPatchTree = exports.applyPatchWithDotNotation = void 0;
3
+ exports.applyPatchWithDotNotation = applyPatchWithDotNotation;
4
+ exports.applyPatchTree = applyPatchTree;
4
5
  function isPlainObject(value) {
5
6
  return value !== null && typeof value === "object" && !Array.isArray(value);
6
7
  }
@@ -28,7 +29,6 @@ function applyPatchWithDotNotation(target, path, patchValue) {
28
29
  }
29
30
  // If existingValue is undefined, we skip;
30
31
  }
31
- exports.applyPatchWithDotNotation = applyPatchWithDotNotation;
32
32
  function applyPatchTree(schema, patchNode, pathPrefix) {
33
33
  Object.entries(patchNode).forEach(([key, value]) => {
34
34
  if (key.includes(".")) {
@@ -49,4 +49,3 @@ function applyPatchTree(schema, patchNode, pathPrefix) {
49
49
  }
50
50
  });
51
51
  }
52
- exports.applyPatchTree = applyPatchTree;
@@ -22,6 +22,7 @@
22
22
  "type": "string",
23
23
  "enum": [
24
24
  "fermi_energy",
25
+ "formation_energy",
25
26
  "homo_energy",
26
27
  "ionization_potential",
27
28
  "lumo_energy",
@@ -411,6 +411,48 @@
411
411
  }
412
412
  }
413
413
  },
414
+ {
415
+ "$schema": "http://json-schema.org/draft-07/schema#",
416
+ "title": "Formation energy property schema",
417
+ "type": "object",
418
+ "required": [
419
+ "name",
420
+ "units",
421
+ "value"
422
+ ],
423
+ "properties": {
424
+ "name": {
425
+ "enum": [
426
+ "formation_energy"
427
+ ],
428
+ "type": "string"
429
+ },
430
+ "units": {
431
+ "oneOf": [
432
+ {
433
+ "enum": [
434
+ "kcal/mol",
435
+ "kJ/mol",
436
+ "eV",
437
+ "J/mol",
438
+ "hartree",
439
+ "cm-1",
440
+ "Ry",
441
+ "eV/atom"
442
+ ]
443
+ },
444
+ {
445
+ "enum": [
446
+ "eV/A^2"
447
+ ]
448
+ }
449
+ ]
450
+ },
451
+ "value": {
452
+ "type": "number"
453
+ }
454
+ }
455
+ },
414
456
  {
415
457
  "$schema": "http://json-schema.org/draft-07/schema#",
416
458
  "title": "HOMO energy property schema",