@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.
- package/dist/js/esse/JSONSchemasInterface.js +1 -1
- package/dist/js/esse/JSONSchemasInterfaceServer.js +2 -3
- package/dist/js/esse/schemaUtils.js +1 -2
- package/dist/js/esse/server/utils.js +2 -3
- package/dist/js/esse/utils.js +2 -3
- package/dist/js/schema/properties_directory/enum_options.json +1 -0
- package/dist/js/schema/property/holder.json +42 -0
- package/dist/js/schemas.json +1 -1
- package/dist/js/scripts/compileTs.js +1 -1
- package/dist/js/scripts/setSchemaIds.js +1 -1
- package/dist/js/types.d.ts +5 -1
- package/dist/js/types.js +5 -5
- package/dist/js/utils/ajv.js +4 -5
- package/dist/js/utils/common.js +2 -3
- package/dist/js/utils/filesystem.js +2 -3
- package/manifest/properties.yaml +6 -0
- package/package.json +1 -1
- package/schema/properties_directory/enum_options.json +2 -0
- package/schema/properties_directory/scalar/formation_energy.json +2 -1
- package/schema/property/holder.json +4 -0
|
@@ -3,6 +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.default = compileTS;
|
|
6
7
|
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const json_schema_to_typescript_1 = require("json-schema-to-typescript");
|
|
8
9
|
const schemaUtils_1 = require("../esse/schemaUtils");
|
|
@@ -77,4 +78,3 @@ async function compileTS(schemaPath, savePath) {
|
|
|
77
78
|
await fs_1.default.promises.appendFile(savePath, `${compiledSchema} \n`, { flag: "a+" });
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
exports.default = compileTS;
|
|
@@ -3,6 +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.default = setSchemaIds;
|
|
6
7
|
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const filesystem_1 = require("../utils/filesystem");
|
|
@@ -27,4 +28,3 @@ function setSchemaIds(schemaDir) {
|
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
exports.default = setSchemaIds;
|
package/dist/js/types.d.ts
CHANGED
|
@@ -52195,7 +52195,7 @@ export type PropertyType = "scalar" | "non-scalar" | "tensor" | "object";
|
|
|
52195
52195
|
* This interface was referenced by `PropertiesDirectoryEnumOptions`'s JSON-Schema
|
|
52196
52196
|
* via the `definition` "ScalarPropertyEnum".
|
|
52197
52197
|
*/
|
|
52198
|
-
export type ScalarPropertyEnum = "fermi_energy" | "homo_energy" | "ionization_potential" | "lumo_energy" | "pressure" | "reaction_energy_barrier" | "surface_energy" | "thermal_correction_to_energy" | "thermal_correction_to_enthalpy" | "total_energy" | "total_force" | "valence_band_offset" | "zero_point_energy";
|
|
52198
|
+
export type ScalarPropertyEnum = "fermi_energy" | "formation_energy" | "homo_energy" | "ionization_potential" | "lumo_energy" | "pressure" | "reaction_energy_barrier" | "surface_energy" | "thermal_correction_to_energy" | "thermal_correction_to_enthalpy" | "total_energy" | "total_force" | "valence_band_offset" | "zero_point_energy";
|
|
52199
52199
|
/**
|
|
52200
52200
|
* This interface was referenced by `PropertiesDirectoryEnumOptions`'s JSON-Schema
|
|
52201
52201
|
* via the `definition` "NonScalarPropertyEnum".
|
|
@@ -55908,6 +55908,10 @@ export interface PropertyHolderSchema {
|
|
|
55908
55908
|
name: "fermi_energy";
|
|
55909
55909
|
units: ("kcal/mol" | "kJ/mol" | "eV" | "J/mol" | "hartree" | "cm-1" | "Ry" | "eV/atom") | "eV/A^2";
|
|
55910
55910
|
value: number;
|
|
55911
|
+
} | {
|
|
55912
|
+
name: "formation_energy";
|
|
55913
|
+
units: ("kcal/mol" | "kJ/mol" | "eV" | "J/mol" | "hartree" | "cm-1" | "Ry" | "eV/atom") | "eV/A^2";
|
|
55914
|
+
value: number;
|
|
55911
55915
|
} | {
|
|
55912
55916
|
name: "homo_energy";
|
|
55913
55917
|
units: ("kcal/mol" | "kJ/mol" | "eV" | "J/mol" | "hartree" | "cm-1" | "Ry" | "eV/atom") | "eV/A^2";
|
package/dist/js/types.js
CHANGED
|
@@ -29,7 +29,7 @@ var Name;
|
|
|
29
29
|
Name["VASPInputDataManager"] = "VASPInputDataManager";
|
|
30
30
|
Name["VASPNEBInputDataManager"] = "VASPNEBInputDataManager";
|
|
31
31
|
Name["NWChemInputDataManager"] = "NWChemInputDataManager";
|
|
32
|
-
})(Name
|
|
32
|
+
})(Name || (exports.Name = Name = {}));
|
|
33
33
|
/**
|
|
34
34
|
* This interface was referenced by `ContextProvidersDirectoryEnum`'s JSON-Schema
|
|
35
35
|
* via the `definition` "ContextProviderNameEnum".
|
|
@@ -61,7 +61,7 @@ var ContextProviderNameEnum;
|
|
|
61
61
|
ContextProviderNameEnum["VASPInputDataManager"] = "VASPInputDataManager";
|
|
62
62
|
ContextProviderNameEnum["VASPNEBInputDataManager"] = "VASPNEBInputDataManager";
|
|
63
63
|
ContextProviderNameEnum["NWChemInputDataManager"] = "NWChemInputDataManager";
|
|
64
|
-
})(ContextProviderNameEnum
|
|
64
|
+
})(ContextProviderNameEnum || (exports.ContextProviderNameEnum = ContextProviderNameEnum = {}));
|
|
65
65
|
/**
|
|
66
66
|
* The type of the message to distinguish the direction of the message.
|
|
67
67
|
*/
|
|
@@ -69,7 +69,7 @@ var Type;
|
|
|
69
69
|
(function (Type) {
|
|
70
70
|
Type["fromIframeToHost"] = "from-iframe-to-host";
|
|
71
71
|
Type["fromHostToIframe"] = "from-host-to-iframe";
|
|
72
|
-
})(Type
|
|
72
|
+
})(Type || (exports.Type = Type = {}));
|
|
73
73
|
/**
|
|
74
74
|
* The action to be performed upon receiving the message.
|
|
75
75
|
*/
|
|
@@ -78,7 +78,7 @@ var Action;
|
|
|
78
78
|
Action["setData"] = "set-data";
|
|
79
79
|
Action["getData"] = "get-data";
|
|
80
80
|
Action["info"] = "info";
|
|
81
|
-
})(Action
|
|
81
|
+
})(Action || (exports.Action = Action = {}));
|
|
82
82
|
/**
|
|
83
83
|
* This interface was referenced by `WorkflowSubworkflowConvergenceEnumOptions`'s JSON-Schema
|
|
84
84
|
* via the `definition` "ConvergenceParameterNameEnum".
|
|
@@ -88,4 +88,4 @@ var ConvergenceParameterNameEnum;
|
|
|
88
88
|
ConvergenceParameterNameEnum["N_k"] = "N_k";
|
|
89
89
|
ConvergenceParameterNameEnum["N_k_nonuniform"] = "N_k_nonuniform";
|
|
90
90
|
ConvergenceParameterNameEnum["N_k_nonuniform_2D"] = "N_k_nonuniform_2D";
|
|
91
|
-
})(ConvergenceParameterNameEnum
|
|
91
|
+
})(ConvergenceParameterNameEnum || (exports.ConvergenceParameterNameEnum = ConvergenceParameterNameEnum = {}));
|
package/dist/js/utils/ajv.js
CHANGED
|
@@ -3,7 +3,9 @@ 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.
|
|
6
|
+
exports.getValidator = getValidator;
|
|
7
|
+
exports.validate = validate;
|
|
8
|
+
exports.validateAndClean = validateAndClean;
|
|
7
9
|
const ajv_1 = __importDefault(require("ajv"));
|
|
8
10
|
const ajv_formats_1 = __importDefault(require("ajv-formats"));
|
|
9
11
|
const schemaUtils_1 = require("../esse/schemaUtils");
|
|
@@ -23,7 +25,7 @@ function addAdditionalPropertiesToSchema(schema, additionalProperties = false) {
|
|
|
23
25
|
});
|
|
24
26
|
}
|
|
25
27
|
const ajvConfig = {
|
|
26
|
-
strict: false,
|
|
28
|
+
strict: false, // TODO: adjust schemas and enable strict mode
|
|
27
29
|
useDefaults: true,
|
|
28
30
|
/**
|
|
29
31
|
* discriminator fixes default values in oneOf
|
|
@@ -80,7 +82,6 @@ function getValidator(jsonSchema, { clean, coerceTypes, useDefaults = true, }) {
|
|
|
80
82
|
}
|
|
81
83
|
return validate;
|
|
82
84
|
}
|
|
83
|
-
exports.getValidator = getValidator;
|
|
84
85
|
/**
|
|
85
86
|
* Validates a given example against the schema.
|
|
86
87
|
* @param example example to validate.
|
|
@@ -95,7 +96,6 @@ function validate(data, jsonSchema) {
|
|
|
95
96
|
errors: validator.errors,
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
|
-
exports.validate = validate;
|
|
99
99
|
/**
|
|
100
100
|
* Validates and clean a given example against the schema
|
|
101
101
|
* @param example example to validate.
|
|
@@ -110,4 +110,3 @@ function validateAndClean(data, jsonSchema, { coerceTypes = false, useDefaults =
|
|
|
110
110
|
errors: validator.errors,
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
exports.validateAndClean = validateAndClean;
|
package/dist/js/utils/common.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isInstanceOf = isInstanceOf;
|
|
4
|
+
exports.safeParseJSON = safeParseJSON;
|
|
4
5
|
function isInstanceOf(object, type) {
|
|
5
6
|
return Object.prototype.toString.call(object).slice(8, -1) === type;
|
|
6
7
|
}
|
|
7
|
-
exports.isInstanceOf = isInstanceOf;
|
|
8
8
|
/**
|
|
9
9
|
* Makes sure that text representing arrays is parsed into Arrays.
|
|
10
10
|
*/
|
|
@@ -12,4 +12,3 @@ function safeParseJSON(string) {
|
|
|
12
12
|
const obj = JSON.parse(string);
|
|
13
13
|
return string[0] === "[" ? Object.keys(obj).map((key) => obj[key]) : obj;
|
|
14
14
|
}
|
|
15
|
-
exports.safeParseJSON = safeParseJSON;
|
|
@@ -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.
|
|
6
|
+
exports.walkDir = walkDir;
|
|
7
|
+
exports.walkDirSync = walkDirSync;
|
|
7
8
|
/* eslint-disable no-await-in-loop */
|
|
8
9
|
/* eslint-disable no-restricted-syntax */
|
|
9
10
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -21,7 +22,6 @@ async function walkDir(dir, callback) {
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
exports.walkDir = walkDir;
|
|
25
25
|
function walkDirSync(dir, callback) {
|
|
26
26
|
const subDirs = fs_1.default.readdirSync(dir);
|
|
27
27
|
for (const subDir of subDirs) {
|
|
@@ -35,4 +35,3 @@ function walkDirSync(dir, callback) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
exports.walkDirSync = walkDirSync;
|
package/manifest/properties.yaml
CHANGED
|
@@ -47,6 +47,12 @@ lumo_energy:
|
|
|
47
47
|
schemaId: properties-directory/scalar/lumo-energy
|
|
48
48
|
isResult: true
|
|
49
49
|
|
|
50
|
+
formation_energy:
|
|
51
|
+
defaults:
|
|
52
|
+
units: eV/atom
|
|
53
|
+
schemaId: properties-directory/scalar/formation-energy
|
|
54
|
+
isResult: true
|
|
55
|
+
|
|
50
56
|
total_force:
|
|
51
57
|
defaults:
|
|
52
58
|
units: eV/angstrom
|
package/package.json
CHANGED
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
{
|
|
49
49
|
"$ref": "../properties_directory/scalar/fermi_energy.json"
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
"$ref": "../properties_directory/scalar/formation_energy.json"
|
|
53
|
+
},
|
|
51
54
|
{
|
|
52
55
|
"$ref": "../properties_directory/scalar/homo_energy.json"
|
|
53
56
|
},
|
|
@@ -193,3 +196,4 @@
|
|
|
193
196
|
"exabyteId"
|
|
194
197
|
]
|
|
195
198
|
}
|
|
199
|
+
|