@revisium/schema-toolkit 0.23.0 → 0.24.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/{chunk-YHRQOWWO.js → chunk-ISCEWIDC.js} +147 -1
- package/dist/{chunk-PLT4CHNF.cjs → chunk-OIPLFFMB.cjs} +147 -0
- package/dist/index.cjs +42 -38
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/index.cjs +42 -38
- package/dist/lib/index.d.cts +8 -1
- package/dist/lib/index.d.ts +8 -1
- package/dist/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -957,4 +957,150 @@ var walkStore = (store, depth, result) => {
|
|
|
957
957
|
}
|
|
958
958
|
};
|
|
959
959
|
|
|
960
|
-
|
|
960
|
+
// src/lib/sortTablesByDependencies.ts
|
|
961
|
+
function sortTablesByDependencies(tableSchemas) {
|
|
962
|
+
const dependencies = extractDependencies(tableSchemas);
|
|
963
|
+
const circularDependencies = detectCircularDependencies(dependencies);
|
|
964
|
+
const sortedTables = topologicalSort(dependencies, circularDependencies);
|
|
965
|
+
const warnings = generateWarnings(circularDependencies);
|
|
966
|
+
return { sortedTables, circularDependencies, warnings };
|
|
967
|
+
}
|
|
968
|
+
function extractDependencies(tableSchemas) {
|
|
969
|
+
const tableIds = new Set(Object.keys(tableSchemas));
|
|
970
|
+
const dependencies = [];
|
|
971
|
+
for (const [tableId, schema] of Object.entries(tableSchemas)) {
|
|
972
|
+
const foreignKeys = findForeignKeyReferences(schema);
|
|
973
|
+
const dependsOn = foreignKeys.filter(
|
|
974
|
+
(fk) => fk !== tableId && tableIds.has(fk)
|
|
975
|
+
);
|
|
976
|
+
dependencies.push({ tableId, dependsOn });
|
|
977
|
+
}
|
|
978
|
+
return dependencies;
|
|
979
|
+
}
|
|
980
|
+
function findForeignKeyReferences(schema) {
|
|
981
|
+
const foreignKeys = /* @__PURE__ */ new Set();
|
|
982
|
+
if (schema === null || typeof schema !== "object") {
|
|
983
|
+
return [];
|
|
984
|
+
}
|
|
985
|
+
const record = schema;
|
|
986
|
+
if (typeof record.foreignKey === "string") {
|
|
987
|
+
foreignKeys.add(record.foreignKey);
|
|
988
|
+
}
|
|
989
|
+
if (record.properties && typeof record.properties === "object") {
|
|
990
|
+
for (const property of Object.values(
|
|
991
|
+
record.properties
|
|
992
|
+
)) {
|
|
993
|
+
for (const fk of findForeignKeyReferences(property)) {
|
|
994
|
+
foreignKeys.add(fk);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
if (record.items && typeof record.items === "object") {
|
|
999
|
+
for (const fk of findForeignKeyReferences(record.items)) {
|
|
1000
|
+
foreignKeys.add(fk);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
return [...foreignKeys];
|
|
1004
|
+
}
|
|
1005
|
+
function detectCircularDependencies(dependencies) {
|
|
1006
|
+
const circularDependencies = [];
|
|
1007
|
+
const visited = /* @__PURE__ */ new Set();
|
|
1008
|
+
const recursionStack = /* @__PURE__ */ new Set();
|
|
1009
|
+
const dependencyMap = /* @__PURE__ */ new Map();
|
|
1010
|
+
for (const dep of dependencies) {
|
|
1011
|
+
dependencyMap.set(dep.tableId, dep.dependsOn);
|
|
1012
|
+
}
|
|
1013
|
+
const dfs = (tableId, path) => {
|
|
1014
|
+
if (recursionStack.has(tableId)) {
|
|
1015
|
+
const cycleStart = path.indexOf(tableId);
|
|
1016
|
+
const cycle = path.slice(cycleStart);
|
|
1017
|
+
cycle.push(tableId);
|
|
1018
|
+
circularDependencies.push(cycle);
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
if (visited.has(tableId)) {
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
visited.add(tableId);
|
|
1025
|
+
recursionStack.add(tableId);
|
|
1026
|
+
path.push(tableId);
|
|
1027
|
+
const deps = dependencyMap.get(tableId) || [];
|
|
1028
|
+
for (const dep of deps) {
|
|
1029
|
+
if (dependencyMap.has(dep)) {
|
|
1030
|
+
dfs(dep, [...path]);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
recursionStack.delete(tableId);
|
|
1034
|
+
};
|
|
1035
|
+
for (const dep of dependencies) {
|
|
1036
|
+
if (!visited.has(dep.tableId)) {
|
|
1037
|
+
dfs(dep.tableId, []);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
return circularDependencies;
|
|
1041
|
+
}
|
|
1042
|
+
function topologicalSort(dependencies, circularDependencies) {
|
|
1043
|
+
const circularTables = /* @__PURE__ */ new Set();
|
|
1044
|
+
for (const cycle of circularDependencies) {
|
|
1045
|
+
for (const table of cycle) {
|
|
1046
|
+
circularTables.add(table);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
const dependencyMap = /* @__PURE__ */ new Map();
|
|
1050
|
+
const inDegree = /* @__PURE__ */ new Map();
|
|
1051
|
+
for (const dep of dependencies) {
|
|
1052
|
+
dependencyMap.set(dep.tableId, dep.dependsOn);
|
|
1053
|
+
inDegree.set(dep.tableId, 0);
|
|
1054
|
+
}
|
|
1055
|
+
for (const dep of dependencies) {
|
|
1056
|
+
for (const target of dep.dependsOn) {
|
|
1057
|
+
if (!inDegree.has(target)) continue;
|
|
1058
|
+
if (circularTables.has(dep.tableId) && circularTables.has(target))
|
|
1059
|
+
continue;
|
|
1060
|
+
inDegree.set(dep.tableId, (inDegree.get(dep.tableId) ?? 0) + 1);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
const result = [];
|
|
1064
|
+
const queue = [];
|
|
1065
|
+
for (const [tableId, degree] of inDegree.entries()) {
|
|
1066
|
+
if (degree === 0) {
|
|
1067
|
+
queue.push(tableId);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
while (queue.length > 0) {
|
|
1071
|
+
const current = queue.shift();
|
|
1072
|
+
result.push(current);
|
|
1073
|
+
for (const [tableId, deps] of dependencyMap.entries()) {
|
|
1074
|
+
if (!deps.includes(current)) continue;
|
|
1075
|
+
if (!inDegree.has(tableId)) continue;
|
|
1076
|
+
if (circularTables.has(current) && circularTables.has(tableId)) continue;
|
|
1077
|
+
const newDegree = (inDegree.get(tableId) ?? 0) - 1;
|
|
1078
|
+
inDegree.set(tableId, newDegree);
|
|
1079
|
+
if (newDegree === 0) {
|
|
1080
|
+
queue.push(tableId);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
for (const tableId of circularTables) {
|
|
1085
|
+
if (!result.includes(tableId)) {
|
|
1086
|
+
result.push(tableId);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
return result;
|
|
1090
|
+
}
|
|
1091
|
+
function generateWarnings(circularDependencies) {
|
|
1092
|
+
const warnings = [];
|
|
1093
|
+
for (const cycle of circularDependencies) {
|
|
1094
|
+
warnings.push(
|
|
1095
|
+
`Circular dependency detected: ${cycle.join(" -> ")}. Creation order may cause foreign key constraint errors.`
|
|
1096
|
+
);
|
|
1097
|
+
}
|
|
1098
|
+
if (circularDependencies.length > 0) {
|
|
1099
|
+
warnings.push(
|
|
1100
|
+
"Consider breaking circular dependencies or creating data in multiple passes."
|
|
1101
|
+
);
|
|
1102
|
+
}
|
|
1103
|
+
return warnings;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export { RevisiumValidator, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonObjectSchemaStore, createJsonSchemaStore, createPrimitiveStoreBySchema, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, sortTablesByDependencies, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema };
|
|
@@ -963,6 +963,152 @@ var walkStore = (store, depth, result) => {
|
|
|
963
963
|
}
|
|
964
964
|
};
|
|
965
965
|
|
|
966
|
+
// src/lib/sortTablesByDependencies.ts
|
|
967
|
+
function sortTablesByDependencies(tableSchemas) {
|
|
968
|
+
const dependencies = extractDependencies(tableSchemas);
|
|
969
|
+
const circularDependencies = detectCircularDependencies(dependencies);
|
|
970
|
+
const sortedTables = topologicalSort(dependencies, circularDependencies);
|
|
971
|
+
const warnings = generateWarnings(circularDependencies);
|
|
972
|
+
return { sortedTables, circularDependencies, warnings };
|
|
973
|
+
}
|
|
974
|
+
function extractDependencies(tableSchemas) {
|
|
975
|
+
const tableIds = new Set(Object.keys(tableSchemas));
|
|
976
|
+
const dependencies = [];
|
|
977
|
+
for (const [tableId, schema] of Object.entries(tableSchemas)) {
|
|
978
|
+
const foreignKeys = findForeignKeyReferences(schema);
|
|
979
|
+
const dependsOn = foreignKeys.filter(
|
|
980
|
+
(fk) => fk !== tableId && tableIds.has(fk)
|
|
981
|
+
);
|
|
982
|
+
dependencies.push({ tableId, dependsOn });
|
|
983
|
+
}
|
|
984
|
+
return dependencies;
|
|
985
|
+
}
|
|
986
|
+
function findForeignKeyReferences(schema) {
|
|
987
|
+
const foreignKeys = /* @__PURE__ */ new Set();
|
|
988
|
+
if (schema === null || typeof schema !== "object") {
|
|
989
|
+
return [];
|
|
990
|
+
}
|
|
991
|
+
const record = schema;
|
|
992
|
+
if (typeof record.foreignKey === "string") {
|
|
993
|
+
foreignKeys.add(record.foreignKey);
|
|
994
|
+
}
|
|
995
|
+
if (record.properties && typeof record.properties === "object") {
|
|
996
|
+
for (const property of Object.values(
|
|
997
|
+
record.properties
|
|
998
|
+
)) {
|
|
999
|
+
for (const fk of findForeignKeyReferences(property)) {
|
|
1000
|
+
foreignKeys.add(fk);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
if (record.items && typeof record.items === "object") {
|
|
1005
|
+
for (const fk of findForeignKeyReferences(record.items)) {
|
|
1006
|
+
foreignKeys.add(fk);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
return [...foreignKeys];
|
|
1010
|
+
}
|
|
1011
|
+
function detectCircularDependencies(dependencies) {
|
|
1012
|
+
const circularDependencies = [];
|
|
1013
|
+
const visited = /* @__PURE__ */ new Set();
|
|
1014
|
+
const recursionStack = /* @__PURE__ */ new Set();
|
|
1015
|
+
const dependencyMap = /* @__PURE__ */ new Map();
|
|
1016
|
+
for (const dep of dependencies) {
|
|
1017
|
+
dependencyMap.set(dep.tableId, dep.dependsOn);
|
|
1018
|
+
}
|
|
1019
|
+
const dfs = (tableId, path) => {
|
|
1020
|
+
if (recursionStack.has(tableId)) {
|
|
1021
|
+
const cycleStart = path.indexOf(tableId);
|
|
1022
|
+
const cycle = path.slice(cycleStart);
|
|
1023
|
+
cycle.push(tableId);
|
|
1024
|
+
circularDependencies.push(cycle);
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
if (visited.has(tableId)) {
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
visited.add(tableId);
|
|
1031
|
+
recursionStack.add(tableId);
|
|
1032
|
+
path.push(tableId);
|
|
1033
|
+
const deps = dependencyMap.get(tableId) || [];
|
|
1034
|
+
for (const dep of deps) {
|
|
1035
|
+
if (dependencyMap.has(dep)) {
|
|
1036
|
+
dfs(dep, [...path]);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
recursionStack.delete(tableId);
|
|
1040
|
+
};
|
|
1041
|
+
for (const dep of dependencies) {
|
|
1042
|
+
if (!visited.has(dep.tableId)) {
|
|
1043
|
+
dfs(dep.tableId, []);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
return circularDependencies;
|
|
1047
|
+
}
|
|
1048
|
+
function topologicalSort(dependencies, circularDependencies) {
|
|
1049
|
+
const circularTables = /* @__PURE__ */ new Set();
|
|
1050
|
+
for (const cycle of circularDependencies) {
|
|
1051
|
+
for (const table of cycle) {
|
|
1052
|
+
circularTables.add(table);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
const dependencyMap = /* @__PURE__ */ new Map();
|
|
1056
|
+
const inDegree = /* @__PURE__ */ new Map();
|
|
1057
|
+
for (const dep of dependencies) {
|
|
1058
|
+
dependencyMap.set(dep.tableId, dep.dependsOn);
|
|
1059
|
+
inDegree.set(dep.tableId, 0);
|
|
1060
|
+
}
|
|
1061
|
+
for (const dep of dependencies) {
|
|
1062
|
+
for (const target of dep.dependsOn) {
|
|
1063
|
+
if (!inDegree.has(target)) continue;
|
|
1064
|
+
if (circularTables.has(dep.tableId) && circularTables.has(target))
|
|
1065
|
+
continue;
|
|
1066
|
+
inDegree.set(dep.tableId, (inDegree.get(dep.tableId) ?? 0) + 1);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
const result = [];
|
|
1070
|
+
const queue = [];
|
|
1071
|
+
for (const [tableId, degree] of inDegree.entries()) {
|
|
1072
|
+
if (degree === 0) {
|
|
1073
|
+
queue.push(tableId);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
while (queue.length > 0) {
|
|
1077
|
+
const current = queue.shift();
|
|
1078
|
+
result.push(current);
|
|
1079
|
+
for (const [tableId, deps] of dependencyMap.entries()) {
|
|
1080
|
+
if (!deps.includes(current)) continue;
|
|
1081
|
+
if (!inDegree.has(tableId)) continue;
|
|
1082
|
+
if (circularTables.has(current) && circularTables.has(tableId)) continue;
|
|
1083
|
+
const newDegree = (inDegree.get(tableId) ?? 0) - 1;
|
|
1084
|
+
inDegree.set(tableId, newDegree);
|
|
1085
|
+
if (newDegree === 0) {
|
|
1086
|
+
queue.push(tableId);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
for (const tableId of circularTables) {
|
|
1091
|
+
if (!result.includes(tableId)) {
|
|
1092
|
+
result.push(tableId);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
return result;
|
|
1096
|
+
}
|
|
1097
|
+
function generateWarnings(circularDependencies) {
|
|
1098
|
+
const warnings = [];
|
|
1099
|
+
for (const cycle of circularDependencies) {
|
|
1100
|
+
warnings.push(
|
|
1101
|
+
`Circular dependency detected: ${cycle.join(" -> ")}. Creation order may cause foreign key constraint errors.`
|
|
1102
|
+
);
|
|
1103
|
+
}
|
|
1104
|
+
if (circularDependencies.length > 0) {
|
|
1105
|
+
warnings.push(
|
|
1106
|
+
"Consider breaking circular dependencies or creating data in multiple passes."
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
return warnings;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
966
1112
|
exports.RevisiumValidator = RevisiumValidator;
|
|
967
1113
|
exports.SchemaTable = SchemaTable;
|
|
968
1114
|
exports.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE = VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE;
|
|
@@ -996,6 +1142,7 @@ exports.replaceForeignKeyValue = replaceForeignKeyValue;
|
|
|
996
1142
|
exports.resolveRefs = resolveRefs;
|
|
997
1143
|
exports.saveSharedFields = saveSharedFields;
|
|
998
1144
|
exports.setValueByPath = setValueByPath;
|
|
1145
|
+
exports.sortTablesByDependencies = sortTablesByDependencies;
|
|
999
1146
|
exports.traverseStore = traverseStore;
|
|
1000
1147
|
exports.traverseValue = traverseValue;
|
|
1001
1148
|
exports.validateJsonFieldName = validateJsonFieldName;
|
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var chunkRQBW7ATZ_cjs = require('./chunk-RQBW7ATZ.cjs');
|
|
|
7
7
|
var chunkJHNATNUI_cjs = require('./chunk-JHNATNUI.cjs');
|
|
8
8
|
var chunkPJ5OFCLO_cjs = require('./chunk-PJ5OFCLO.cjs');
|
|
9
9
|
var chunk2PIMJSWJ_cjs = require('./chunk-2PIMJSWJ.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkOIPLFFMB_cjs = require('./chunk-OIPLFFMB.cjs');
|
|
11
11
|
var chunkERW5XVED_cjs = require('./chunk-ERW5XVED.cjs');
|
|
12
12
|
var chunkT3QQSHAC_cjs = require('./chunk-T3QQSHAC.cjs');
|
|
13
13
|
var chunkFL6PWPVJ_cjs = require('./chunk-FL6PWPVJ.cjs');
|
|
@@ -521,151 +521,155 @@ Object.defineProperty(exports, "strFormula", {
|
|
|
521
521
|
});
|
|
522
522
|
Object.defineProperty(exports, "RevisiumValidator", {
|
|
523
523
|
enumerable: true,
|
|
524
|
-
get: function () { return
|
|
524
|
+
get: function () { return chunkOIPLFFMB_cjs.RevisiumValidator; }
|
|
525
525
|
});
|
|
526
526
|
Object.defineProperty(exports, "SchemaTable", {
|
|
527
527
|
enumerable: true,
|
|
528
|
-
get: function () { return
|
|
528
|
+
get: function () { return chunkOIPLFFMB_cjs.SchemaTable; }
|
|
529
529
|
});
|
|
530
530
|
Object.defineProperty(exports, "VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE", {
|
|
531
531
|
enumerable: true,
|
|
532
|
-
get: function () { return
|
|
532
|
+
get: function () { return chunkOIPLFFMB_cjs.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE; }
|
|
533
533
|
});
|
|
534
534
|
Object.defineProperty(exports, "applyAddPatch", {
|
|
535
535
|
enumerable: true,
|
|
536
|
-
get: function () { return
|
|
536
|
+
get: function () { return chunkOIPLFFMB_cjs.applyAddPatch; }
|
|
537
537
|
});
|
|
538
538
|
Object.defineProperty(exports, "applyMovePatch", {
|
|
539
539
|
enumerable: true,
|
|
540
|
-
get: function () { return
|
|
540
|
+
get: function () { return chunkOIPLFFMB_cjs.applyMovePatch; }
|
|
541
541
|
});
|
|
542
542
|
Object.defineProperty(exports, "applyRemovePatch", {
|
|
543
543
|
enumerable: true,
|
|
544
|
-
get: function () { return
|
|
544
|
+
get: function () { return chunkOIPLFFMB_cjs.applyRemovePatch; }
|
|
545
545
|
});
|
|
546
546
|
Object.defineProperty(exports, "applyReplacePatch", {
|
|
547
547
|
enumerable: true,
|
|
548
|
-
get: function () { return
|
|
548
|
+
get: function () { return chunkOIPLFFMB_cjs.applyReplacePatch; }
|
|
549
549
|
});
|
|
550
550
|
Object.defineProperty(exports, "calculateDataWeight", {
|
|
551
551
|
enumerable: true,
|
|
552
|
-
get: function () { return
|
|
552
|
+
get: function () { return chunkOIPLFFMB_cjs.calculateDataWeight; }
|
|
553
553
|
});
|
|
554
554
|
Object.defineProperty(exports, "calculateDataWeightFromStore", {
|
|
555
555
|
enumerable: true,
|
|
556
|
-
get: function () { return
|
|
556
|
+
get: function () { return chunkOIPLFFMB_cjs.calculateDataWeightFromStore; }
|
|
557
557
|
});
|
|
558
558
|
Object.defineProperty(exports, "calculateSchemaWeight", {
|
|
559
559
|
enumerable: true,
|
|
560
|
-
get: function () { return
|
|
560
|
+
get: function () { return chunkOIPLFFMB_cjs.calculateSchemaWeight; }
|
|
561
561
|
});
|
|
562
562
|
Object.defineProperty(exports, "convertJsonPathToSchemaPath", {
|
|
563
563
|
enumerable: true,
|
|
564
|
-
get: function () { return
|
|
564
|
+
get: function () { return chunkOIPLFFMB_cjs.convertJsonPathToSchemaPath; }
|
|
565
565
|
});
|
|
566
566
|
Object.defineProperty(exports, "convertSchemaPathToJsonPath", {
|
|
567
567
|
enumerable: true,
|
|
568
|
-
get: function () { return
|
|
568
|
+
get: function () { return chunkOIPLFFMB_cjs.convertSchemaPathToJsonPath; }
|
|
569
569
|
});
|
|
570
570
|
Object.defineProperty(exports, "createJsonObjectSchemaStore", {
|
|
571
571
|
enumerable: true,
|
|
572
|
-
get: function () { return
|
|
572
|
+
get: function () { return chunkOIPLFFMB_cjs.createJsonObjectSchemaStore; }
|
|
573
573
|
});
|
|
574
574
|
Object.defineProperty(exports, "createJsonSchemaStore", {
|
|
575
575
|
enumerable: true,
|
|
576
|
-
get: function () { return
|
|
576
|
+
get: function () { return chunkOIPLFFMB_cjs.createJsonSchemaStore; }
|
|
577
577
|
});
|
|
578
578
|
Object.defineProperty(exports, "createPrimitiveStoreBySchema", {
|
|
579
579
|
enumerable: true,
|
|
580
|
-
get: function () { return
|
|
580
|
+
get: function () { return chunkOIPLFFMB_cjs.createPrimitiveStoreBySchema; }
|
|
581
581
|
});
|
|
582
582
|
Object.defineProperty(exports, "deepEqual", {
|
|
583
583
|
enumerable: true,
|
|
584
|
-
get: function () { return
|
|
584
|
+
get: function () { return chunkOIPLFFMB_cjs.deepEqual; }
|
|
585
585
|
});
|
|
586
586
|
Object.defineProperty(exports, "getDBJsonPathByJsonSchemaStore", {
|
|
587
587
|
enumerable: true,
|
|
588
|
-
get: function () { return
|
|
588
|
+
get: function () { return chunkOIPLFFMB_cjs.getDBJsonPathByJsonSchemaStore; }
|
|
589
589
|
});
|
|
590
590
|
Object.defineProperty(exports, "getForeignKeyPatchesFromSchema", {
|
|
591
591
|
enumerable: true,
|
|
592
|
-
get: function () { return
|
|
592
|
+
get: function () { return chunkOIPLFFMB_cjs.getForeignKeyPatchesFromSchema; }
|
|
593
593
|
});
|
|
594
594
|
Object.defineProperty(exports, "getForeignKeysFromSchema", {
|
|
595
595
|
enumerable: true,
|
|
596
|
-
get: function () { return
|
|
596
|
+
get: function () { return chunkOIPLFFMB_cjs.getForeignKeysFromSchema; }
|
|
597
597
|
});
|
|
598
598
|
Object.defineProperty(exports, "getForeignKeysFromValue", {
|
|
599
599
|
enumerable: true,
|
|
600
|
-
get: function () { return
|
|
600
|
+
get: function () { return chunkOIPLFFMB_cjs.getForeignKeysFromValue; }
|
|
601
601
|
});
|
|
602
602
|
Object.defineProperty(exports, "getInvalidFieldNamesInSchema", {
|
|
603
603
|
enumerable: true,
|
|
604
|
-
get: function () { return
|
|
604
|
+
get: function () { return chunkOIPLFFMB_cjs.getInvalidFieldNamesInSchema; }
|
|
605
605
|
});
|
|
606
606
|
Object.defineProperty(exports, "getJsonSchemaStoreByPath", {
|
|
607
607
|
enumerable: true,
|
|
608
|
-
get: function () { return
|
|
608
|
+
get: function () { return chunkOIPLFFMB_cjs.getJsonSchemaStoreByPath; }
|
|
609
609
|
});
|
|
610
610
|
Object.defineProperty(exports, "getJsonValueStoreByPath", {
|
|
611
611
|
enumerable: true,
|
|
612
|
-
get: function () { return
|
|
612
|
+
get: function () { return chunkOIPLFFMB_cjs.getJsonValueStoreByPath; }
|
|
613
613
|
});
|
|
614
614
|
Object.defineProperty(exports, "getParentForPath", {
|
|
615
615
|
enumerable: true,
|
|
616
|
-
get: function () { return
|
|
616
|
+
get: function () { return chunkOIPLFFMB_cjs.getParentForPath; }
|
|
617
617
|
});
|
|
618
618
|
Object.defineProperty(exports, "getPathByStore", {
|
|
619
619
|
enumerable: true,
|
|
620
|
-
get: function () { return
|
|
620
|
+
get: function () { return chunkOIPLFFMB_cjs.getPathByStore; }
|
|
621
621
|
});
|
|
622
622
|
Object.defineProperty(exports, "getValueByPath", {
|
|
623
623
|
enumerable: true,
|
|
624
|
-
get: function () { return
|
|
624
|
+
get: function () { return chunkOIPLFFMB_cjs.getValueByPath; }
|
|
625
625
|
});
|
|
626
626
|
Object.defineProperty(exports, "hasPath", {
|
|
627
627
|
enumerable: true,
|
|
628
|
-
get: function () { return
|
|
628
|
+
get: function () { return chunkOIPLFFMB_cjs.hasPath; }
|
|
629
629
|
});
|
|
630
630
|
Object.defineProperty(exports, "parsePath", {
|
|
631
631
|
enumerable: true,
|
|
632
|
-
get: function () { return
|
|
632
|
+
get: function () { return chunkOIPLFFMB_cjs.parsePath; }
|
|
633
633
|
});
|
|
634
634
|
Object.defineProperty(exports, "pluginRefs", {
|
|
635
635
|
enumerable: true,
|
|
636
|
-
get: function () { return
|
|
636
|
+
get: function () { return chunkOIPLFFMB_cjs.pluginRefs; }
|
|
637
637
|
});
|
|
638
638
|
Object.defineProperty(exports, "replaceForeignKeyValue", {
|
|
639
639
|
enumerable: true,
|
|
640
|
-
get: function () { return
|
|
640
|
+
get: function () { return chunkOIPLFFMB_cjs.replaceForeignKeyValue; }
|
|
641
641
|
});
|
|
642
642
|
Object.defineProperty(exports, "resolveRefs", {
|
|
643
643
|
enumerable: true,
|
|
644
|
-
get: function () { return
|
|
644
|
+
get: function () { return chunkOIPLFFMB_cjs.resolveRefs; }
|
|
645
645
|
});
|
|
646
646
|
Object.defineProperty(exports, "saveSharedFields", {
|
|
647
647
|
enumerable: true,
|
|
648
|
-
get: function () { return
|
|
648
|
+
get: function () { return chunkOIPLFFMB_cjs.saveSharedFields; }
|
|
649
649
|
});
|
|
650
650
|
Object.defineProperty(exports, "setValueByPath", {
|
|
651
651
|
enumerable: true,
|
|
652
|
-
get: function () { return
|
|
652
|
+
get: function () { return chunkOIPLFFMB_cjs.setValueByPath; }
|
|
653
|
+
});
|
|
654
|
+
Object.defineProperty(exports, "sortTablesByDependencies", {
|
|
655
|
+
enumerable: true,
|
|
656
|
+
get: function () { return chunkOIPLFFMB_cjs.sortTablesByDependencies; }
|
|
653
657
|
});
|
|
654
658
|
Object.defineProperty(exports, "traverseStore", {
|
|
655
659
|
enumerable: true,
|
|
656
|
-
get: function () { return
|
|
660
|
+
get: function () { return chunkOIPLFFMB_cjs.traverseStore; }
|
|
657
661
|
});
|
|
658
662
|
Object.defineProperty(exports, "traverseValue", {
|
|
659
663
|
enumerable: true,
|
|
660
|
-
get: function () { return
|
|
664
|
+
get: function () { return chunkOIPLFFMB_cjs.traverseValue; }
|
|
661
665
|
});
|
|
662
666
|
Object.defineProperty(exports, "validateJsonFieldName", {
|
|
663
667
|
enumerable: true,
|
|
664
|
-
get: function () { return
|
|
668
|
+
get: function () { return chunkOIPLFFMB_cjs.validateJsonFieldName; }
|
|
665
669
|
});
|
|
666
670
|
Object.defineProperty(exports, "validateRevisiumSchema", {
|
|
667
671
|
enumerable: true,
|
|
668
|
-
get: function () { return
|
|
672
|
+
get: function () { return chunkOIPLFFMB_cjs.validateRevisiumSchema; }
|
|
669
673
|
});
|
|
670
674
|
Object.defineProperty(exports, "collectFormulaNodes", {
|
|
671
675
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -11,7 +11,7 @@ export { A as AddedPropertyEvent, C as ChangeNameEvent, f as JsonArrayStore, m a
|
|
|
11
11
|
export { ArrayToItemsTypeTransformer, ArrayValueNode, BasePrimitiveValueNode, BaseValueNode, BooleanValueNode, DataModel, DataModelImpl, DataModelOptions, DefaultTransformer, ForeignKeyLoader, ForeignKeyNotFoundError, ForeignKeyResolverImpl, ForeignKeyResolverNotConfiguredError, ForeignKeyResolverOptions, ForeignKeyRowLoaderResult, ForeignKeyValueNode, ForeignKeyValueNodeImpl, FormulaChangeDetector, FormulaDependencyIndex, FormulaPath, GenerateDefaultValueOptions, IndirectFormulaChange, NodeFactory, NumberValueNode, ObjectToArrayTransformer, ObjectValueNode, ParsedFormula, PrimitiveToArrayTransformer, RefTransformer, RowModelImpl, SchemaParser, StringValueNode, TableModelImpl, TypeTransformChain, TypeTransformChainOptions, TypedRowData, TypedRowModel, TypedRowModelOptions, TypedTableModel, TypedTableModelOptions, TypedValueTree, ValueTree, createDataModel, createForeignKeyResolver, createRowModel, createSchemaModel, createTableModel, createTypeTransformChain, createTypedTree, equal, fromArrayToObject, fromArrayTransformation, fromBooleanToNumber, fromBooleanToString, fromNumberToBoolean, fromNumberToString, fromObjectToArray, fromObjectToPrimitive, fromPrimitiveToObject, fromStringToBoolean, fromStringToNumber, generateDefaultValue, generateNodeId, getTransformation, isForeignKeyValueNode, resetNodeIdCounter, toArrayTransformation, typedNode } from './model/index.cjs';
|
|
12
12
|
export { l as DefaultValueType, D as Diagnostic, b as DiagnosticSeverity, E as EMPTY_METADATA, i as Formula, F as FormulaDependency, h as NodeMetadata, N as NodeType, P as Path, a as PathSegment, m as PropertyChange, n as PropertyName, R as ResolvedDependency, S as SchemaLike, j as SchemaNode, k as SchemaPatch, f as SchemaValidationError, g as SchemaValidationErrorType, T as TreeFormulaValidationError, V as ValidationContext, c as Validator, e as ValidatorFactoryFn, d as ValidatorRule } from './types-BIvIURgy.cjs';
|
|
13
13
|
export { a as FormulaPathBuilder, F as FormulaSerializer, S as SchemaTree } from './FormulaPathBuilder-BUJRR0Am.cjs';
|
|
14
|
-
export { DataWeight, GetForeignKeysFromValueType, MetaSchemaValidationResult, RefsType, ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, SchemaWeight, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, ValidateFn, ValidationError, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from './lib/index.cjs';
|
|
14
|
+
export { DataWeight, GetForeignKeysFromValueType, MetaSchemaValidationResult, RefsType, ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, SchemaWeight, SortTablesByDependenciesResult, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, ValidateFn, ValidationError, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, sortTablesByDependencies, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from './lib/index.cjs';
|
|
15
15
|
export { c as computeValueDiff } from './computeValueDiff-CNT84rwK.cjs';
|
|
16
16
|
export { EvaluateFormulasOptions, EvaluateFormulasResult, ExtractedFormula, FormulaError, FormulaNode, FormulaValidationError, SchemaValidationResult, collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, validateFormulaAgainstSchema, validateSchemaFormulas } from './formula/index.cjs';
|
|
17
17
|
export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, tableViewsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from './validation-schemas/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { A as AddedPropertyEvent, C as ChangeNameEvent, f as JsonArrayStore, m a
|
|
|
11
11
|
export { ArrayToItemsTypeTransformer, ArrayValueNode, BasePrimitiveValueNode, BaseValueNode, BooleanValueNode, DataModel, DataModelImpl, DataModelOptions, DefaultTransformer, ForeignKeyLoader, ForeignKeyNotFoundError, ForeignKeyResolverImpl, ForeignKeyResolverNotConfiguredError, ForeignKeyResolverOptions, ForeignKeyRowLoaderResult, ForeignKeyValueNode, ForeignKeyValueNodeImpl, FormulaChangeDetector, FormulaDependencyIndex, FormulaPath, GenerateDefaultValueOptions, IndirectFormulaChange, NodeFactory, NumberValueNode, ObjectToArrayTransformer, ObjectValueNode, ParsedFormula, PrimitiveToArrayTransformer, RefTransformer, RowModelImpl, SchemaParser, StringValueNode, TableModelImpl, TypeTransformChain, TypeTransformChainOptions, TypedRowData, TypedRowModel, TypedRowModelOptions, TypedTableModel, TypedTableModelOptions, TypedValueTree, ValueTree, createDataModel, createForeignKeyResolver, createRowModel, createSchemaModel, createTableModel, createTypeTransformChain, createTypedTree, equal, fromArrayToObject, fromArrayTransformation, fromBooleanToNumber, fromBooleanToString, fromNumberToBoolean, fromNumberToString, fromObjectToArray, fromObjectToPrimitive, fromPrimitiveToObject, fromStringToBoolean, fromStringToNumber, generateDefaultValue, generateNodeId, getTransformation, isForeignKeyValueNode, resetNodeIdCounter, toArrayTransformation, typedNode } from './model/index.js';
|
|
12
12
|
export { l as DefaultValueType, D as Diagnostic, b as DiagnosticSeverity, E as EMPTY_METADATA, i as Formula, F as FormulaDependency, h as NodeMetadata, N as NodeType, P as Path, a as PathSegment, m as PropertyChange, n as PropertyName, R as ResolvedDependency, S as SchemaLike, j as SchemaNode, k as SchemaPatch, f as SchemaValidationError, g as SchemaValidationErrorType, T as TreeFormulaValidationError, V as ValidationContext, c as Validator, e as ValidatorFactoryFn, d as ValidatorRule } from './types-C_pTFtSY.js';
|
|
13
13
|
export { a as FormulaPathBuilder, F as FormulaSerializer, S as SchemaTree } from './FormulaPathBuilder-QR0htn-e.js';
|
|
14
|
-
export { DataWeight, GetForeignKeysFromValueType, MetaSchemaValidationResult, RefsType, ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, SchemaWeight, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, ValidateFn, ValidationError, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from './lib/index.js';
|
|
14
|
+
export { DataWeight, GetForeignKeysFromValueType, MetaSchemaValidationResult, RefsType, ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, SchemaWeight, SortTablesByDependenciesResult, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, ValidateFn, ValidationError, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, sortTablesByDependencies, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from './lib/index.js';
|
|
15
15
|
export { c as computeValueDiff } from './computeValueDiff-CDwbNw8F.js';
|
|
16
16
|
export { EvaluateFormulasOptions, EvaluateFormulasResult, ExtractedFormula, FormulaError, FormulaNode, FormulaValidationError, SchemaValidationResult, collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, validateFormulaAgainstSchema, validateSchemaFormulas } from './formula/index.js';
|
|
17
17
|
export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, tableViewsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from './validation-schemas/index.js';
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { CustomSchemeKeywords } from './chunk-WE4OLW5U.js';
|
|
|
5
5
|
export { ArrayToItemsTypeTransformer, ArrayValueNode, BasePrimitiveValueNode, BaseValueNode, BooleanValueNode, DataModelImpl, DefaultTransformer, ForeignKeyNotFoundError, ForeignKeyResolverImpl, ForeignKeyResolverNotConfiguredError, ForeignKeyValueNodeImpl, FormulaChangeDetector, FormulaDependencyIndex, FormulaPath, NodeFactory, NodeFactoryRegistry, NumberValueNode, ObjectToArrayTransformer, ObjectValueNode, ParsedFormula, PrimitiveToArrayTransformer, RefTransformer, RowModelImpl, SchemaParser, StringValueNode, TableModelImpl, TypeTransformChain, NodeFactory2 as ValueNodeFactory, ValueTree, ValueType, createDataModel, createDefaultRegistry, createForeignKeyResolver, createNodeFactory, createRowModel, createSchemaModel, createTableModel, createTypeTransformChain, createTypedTree, extractFormulaDefinition, generateDefaultValue, generateNodeId, isForeignKeyValueNode, resetNodeIdCounter, typedNode } from './chunk-B3W5BASK.js';
|
|
6
6
|
export { ChangeCoalescer, ChangeCollector, CompositeRule, EMPTY_METADATA, EMPTY_PATH, EnumValidator, FIELD_NAME_ERROR_MESSAGE, ForeignKeyValidator, FormulaPathBuilder, FormulaSerializer, ItemsSegment, MaxLengthValidator, MaximumValidator, MinLengthValidator, MinimumValidator, NULL_NODE, NodePathIndex, PatchBuilder, PatchEnricher, PatchGenerator, PatternValidator, PropertySegment, RequiredValidator, ResolvedDependency, SchemaDiff, SchemaPropertyRule, SchemaSerializer, SchemaTruthyRule, ValidationEngine, ValidatorRegistry, ValidatorResolver, areNodesContentEqual, areNodesEqual, coalesceChanges, collectChanges, createArrayNode, createBooleanNode, createDefaultValidatorRegistry, createMobxProvider, createNumberNode, createObjectNode, createPath, createRefNode, createSchemaTree, createStringNode, createValidationEngine, isValidFieldName, jsonPointerToPath, jsonPointerToSegments, jsonPointerToSimplePath, makeAutoObservable, makeObservable, observable, reaction, resetReactivityProvider, runInAction, setReactivityProvider, validateFormulas, validateSchema } from './chunk-2GZ3M3RV.js';
|
|
7
7
|
export { arr, bool, boolFormula, getAddPatch, getArraySchema, getBooleanSchema, getMovePatch, getNumberSchema, getObjectSchema, getRefSchema, getRemovePatch, getReplacePatch, getStringSchema, num, numFormula, obj, ref, str, strFormula } from './chunk-IZMBM36H.js';
|
|
8
|
-
export { RevisiumValidator, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonObjectSchemaStore, createJsonSchemaStore, createPrimitiveStoreBySchema, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from './chunk-
|
|
8
|
+
export { RevisiumValidator, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonObjectSchemaStore, createJsonSchemaStore, createPrimitiveStoreBySchema, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, sortTablesByDependencies, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from './chunk-ISCEWIDC.js';
|
|
9
9
|
export { collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, formulaSpec, validateFormulaAgainstSchema, validateSchemaFormulas } from './chunk-GJM63Q4K.js';
|
|
10
10
|
export { computeValueDiff } from './chunk-7PEC6ZYY.js';
|
|
11
11
|
export { FieldChangeType } from './chunk-ZPRBA4AQ.js';
|
package/dist/lib/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOIPLFFMB_cjs = require('../chunk-OIPLFFMB.cjs');
|
|
4
4
|
var chunkERW5XVED_cjs = require('../chunk-ERW5XVED.cjs');
|
|
5
5
|
var chunkT3QQSHAC_cjs = require('../chunk-T3QQSHAC.cjs');
|
|
6
6
|
require('../chunk-FL6PWPVJ.cjs');
|
|
@@ -13,151 +13,155 @@ require('../chunk-C3HDJOTY.cjs');
|
|
|
13
13
|
|
|
14
14
|
Object.defineProperty(exports, "RevisiumValidator", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkOIPLFFMB_cjs.RevisiumValidator; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "SchemaTable", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkOIPLFFMB_cjs.SchemaTable; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkOIPLFFMB_cjs.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "applyAddPatch", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkOIPLFFMB_cjs.applyAddPatch; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "applyMovePatch", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkOIPLFFMB_cjs.applyMovePatch; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "applyRemovePatch", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkOIPLFFMB_cjs.applyRemovePatch; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "applyReplacePatch", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkOIPLFFMB_cjs.applyReplacePatch; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "calculateDataWeight", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkOIPLFFMB_cjs.calculateDataWeight; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "calculateDataWeightFromStore", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkOIPLFFMB_cjs.calculateDataWeightFromStore; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "calculateSchemaWeight", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkOIPLFFMB_cjs.calculateSchemaWeight; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "convertJsonPathToSchemaPath", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkOIPLFFMB_cjs.convertJsonPathToSchemaPath; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "convertSchemaPathToJsonPath", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkOIPLFFMB_cjs.convertSchemaPathToJsonPath; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "createJsonObjectSchemaStore", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkOIPLFFMB_cjs.createJsonObjectSchemaStore; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "createJsonSchemaStore", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkOIPLFFMB_cjs.createJsonSchemaStore; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "createPrimitiveStoreBySchema", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkOIPLFFMB_cjs.createPrimitiveStoreBySchema; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "deepEqual", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkOIPLFFMB_cjs.deepEqual; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "getDBJsonPathByJsonSchemaStore", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkOIPLFFMB_cjs.getDBJsonPathByJsonSchemaStore; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "getForeignKeyPatchesFromSchema", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkOIPLFFMB_cjs.getForeignKeyPatchesFromSchema; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "getForeignKeysFromSchema", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkOIPLFFMB_cjs.getForeignKeysFromSchema; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "getForeignKeysFromValue", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkOIPLFFMB_cjs.getForeignKeysFromValue; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "getInvalidFieldNamesInSchema", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkOIPLFFMB_cjs.getInvalidFieldNamesInSchema; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "getJsonSchemaStoreByPath", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkOIPLFFMB_cjs.getJsonSchemaStoreByPath; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "getJsonValueStoreByPath", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkOIPLFFMB_cjs.getJsonValueStoreByPath; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "getParentForPath", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkOIPLFFMB_cjs.getParentForPath; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "getPathByStore", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkOIPLFFMB_cjs.getPathByStore; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "getValueByPath", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkOIPLFFMB_cjs.getValueByPath; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "hasPath", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkOIPLFFMB_cjs.hasPath; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "parsePath", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkOIPLFFMB_cjs.parsePath; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "pluginRefs", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkOIPLFFMB_cjs.pluginRefs; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "replaceForeignKeyValue", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkOIPLFFMB_cjs.replaceForeignKeyValue; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "resolveRefs", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkOIPLFFMB_cjs.resolveRefs; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "saveSharedFields", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkOIPLFFMB_cjs.saveSharedFields; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "setValueByPath", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkOIPLFFMB_cjs.setValueByPath; }
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(exports, "sortTablesByDependencies", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function () { return chunkOIPLFFMB_cjs.sortTablesByDependencies; }
|
|
145
149
|
});
|
|
146
150
|
Object.defineProperty(exports, "traverseStore", {
|
|
147
151
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkOIPLFFMB_cjs.traverseStore; }
|
|
149
153
|
});
|
|
150
154
|
Object.defineProperty(exports, "traverseValue", {
|
|
151
155
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkOIPLFFMB_cjs.traverseValue; }
|
|
153
157
|
});
|
|
154
158
|
Object.defineProperty(exports, "validateJsonFieldName", {
|
|
155
159
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkOIPLFFMB_cjs.validateJsonFieldName; }
|
|
157
161
|
});
|
|
158
162
|
Object.defineProperty(exports, "validateRevisiumSchema", {
|
|
159
163
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkOIPLFFMB_cjs.validateRevisiumSchema; }
|
|
161
165
|
});
|
|
162
166
|
Object.defineProperty(exports, "collectFormulaNodes", {
|
|
163
167
|
enumerable: true,
|
package/dist/lib/index.d.cts
CHANGED
|
@@ -148,4 +148,11 @@ interface DataWeight {
|
|
|
148
148
|
declare const calculateDataWeight: (data: unknown) => DataWeight;
|
|
149
149
|
declare const calculateDataWeightFromStore: (store: JsonValueStore) => DataWeight;
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
interface SortTablesByDependenciesResult {
|
|
152
|
+
sortedTables: string[];
|
|
153
|
+
circularDependencies: string[][];
|
|
154
|
+
warnings: string[];
|
|
155
|
+
}
|
|
156
|
+
declare function sortTablesByDependencies(tableSchemas: Record<string, object>): SortTablesByDependenciesResult;
|
|
157
|
+
|
|
158
|
+
export { type DataWeight, type GetForeignKeysFromValueType, type MetaSchemaValidationResult, type RefsType, type ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, type SchemaWeight, type SortTablesByDependenciesResult, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, type ValidateFn, type ValidationError, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, sortTablesByDependencies, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema };
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -148,4 +148,11 @@ interface DataWeight {
|
|
|
148
148
|
declare const calculateDataWeight: (data: unknown) => DataWeight;
|
|
149
149
|
declare const calculateDataWeightFromStore: (store: JsonValueStore) => DataWeight;
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
interface SortTablesByDependenciesResult {
|
|
152
|
+
sortedTables: string[];
|
|
153
|
+
circularDependencies: string[][];
|
|
154
|
+
warnings: string[];
|
|
155
|
+
}
|
|
156
|
+
declare function sortTablesByDependencies(tableSchemas: Record<string, object>): SortTablesByDependenciesResult;
|
|
157
|
+
|
|
158
|
+
export { type DataWeight, type GetForeignKeysFromValueType, type MetaSchemaValidationResult, type RefsType, type ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, type SchemaWeight, type SortTablesByDependenciesResult, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, type ValidateFn, type ValidationError, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonArrayValueStore, createJsonObjectSchemaStore, createJsonObjectValueStore, createJsonSchemaStore, createJsonValueStore, createPrimitiveStoreBySchema, createPrimitiveValueStore, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, sortTablesByDependencies, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema };
|
package/dist/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { RevisiumValidator, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonObjectSchemaStore, createJsonSchemaStore, createPrimitiveStoreBySchema, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from '../chunk-
|
|
1
|
+
export { RevisiumValidator, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, calculateDataWeight, calculateDataWeightFromStore, calculateSchemaWeight, convertJsonPathToSchemaPath, convertSchemaPathToJsonPath, createJsonObjectSchemaStore, createJsonSchemaStore, createPrimitiveStoreBySchema, deepEqual, getDBJsonPathByJsonSchemaStore, getForeignKeyPatchesFromSchema, getForeignKeysFromSchema, getForeignKeysFromValue, getInvalidFieldNamesInSchema, getJsonSchemaStoreByPath, getJsonValueStoreByPath, getParentForPath, getPathByStore, getValueByPath, hasPath, parsePath, pluginRefs, replaceForeignKeyValue, resolveRefs, saveSharedFields, setValueByPath, sortTablesByDependencies, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema } from '../chunk-ISCEWIDC.js';
|
|
2
2
|
export { collectFormulaNodes, evaluateFormulas, extractSchemaFormulas, formulaSpec, validateFormulaAgainstSchema, validateSchemaFormulas } from '../chunk-GJM63Q4K.js';
|
|
3
3
|
export { computeValueDiff } from '../chunk-7PEC6ZYY.js';
|
|
4
4
|
import '../chunk-ZPRBA4AQ.js';
|