@revisium/schema-toolkit 0.21.4 → 0.22.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 (34) hide show
  1. package/README.md +63 -2
  2. package/dist/{chunk-MXEQ5CBK.js → chunk-2GZ3M3RV.js} +3 -0
  3. package/dist/chunk-5G3AVY57.js +1 -0
  4. package/dist/chunk-5M74TGFQ.cjs +2 -0
  5. package/dist/{chunk-3MXYXTNF.js → chunk-B3W5BASK.js} +22 -3
  6. package/dist/{chunk-JLXX3SGF.js → chunk-GAP5KNWN.js} +229 -2
  7. package/dist/{chunk-XKWWCXGB.js → chunk-HOMXBUQB.js} +143 -20
  8. package/dist/{chunk-URMXJ6FH.cjs → chunk-JHNATNUI.cjs} +90 -71
  9. package/dist/{chunk-T46TZYJL.cjs → chunk-PJ5OFCLO.cjs} +3 -0
  10. package/dist/{chunk-QKA7DJDN.cjs → chunk-WY3CL7KH.cjs} +143 -19
  11. package/dist/{chunk-7JWCZZPJ.cjs → chunk-YZEJKK4O.cjs} +236 -0
  12. package/dist/core/index.cjs +60 -60
  13. package/dist/core/index.js +1 -1
  14. package/dist/index.cjs +182 -157
  15. package/dist/index.d.cts +3 -3
  16. package/dist/index.d.ts +3 -3
  17. package/dist/index.js +5 -4
  18. package/dist/lib/index.cjs +54 -33
  19. package/dist/lib/index.d.cts +49 -1
  20. package/dist/lib/index.d.ts +49 -1
  21. package/dist/lib/index.js +2 -1
  22. package/dist/model/index.cjs +50 -50
  23. package/dist/model/index.d.cts +11 -3
  24. package/dist/model/index.d.ts +11 -3
  25. package/dist/model/index.js +2 -2
  26. package/dist/{typed-DjSH_5Vh.d.cts → typed-C0YM-ar9.d.cts} +6 -0
  27. package/dist/{typed-KUia-LYN.d.ts → typed-CkirI6bH.d.ts} +6 -0
  28. package/dist/types/index.d.cts +1 -1
  29. package/dist/types/index.d.ts +1 -1
  30. package/dist/validation-schemas/index.cjs +23 -18
  31. package/dist/validation-schemas/index.d.cts +3 -1
  32. package/dist/validation-schemas/index.d.ts +3 -1
  33. package/dist/validation-schemas/index.js +2 -1
  34. package/package.json +2 -2
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { b as JsonArray, J as JsonObject, a as JsonPrimitives, c as JsonValue } from './json.types-PrMmLhba.cjs';
2
2
  export { h as JsonPatch, g as JsonPatchAdd, c as JsonPatchAddOperation, d as JsonPatchMove, J as JsonPatchMoveOperation, f as JsonPatchRemove, b as JsonPatchRemoveOperation, e as JsonPatchReplace, a as JsonPatchReplaceOperation } from './json-patch.types-eM6pYC2P.cjs';
3
- export { v as ArrayNodeOptions, A as ArrayValueNodeInterface, a2 as CompositeTypeName, D as DirtyTrackable, $ as FieldSchemaSpec, C as FieldType, E as FieldTypeSpec, X as ForeignKeyResolver, F as FormulaDefinition, r as FormulaWarning, g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, w as NodeFactoryFn, x as NodeFactoryOptions, n as NodeFactoryRegistry, j as NodeFromValue, u as ObjectNodeOptions, O as ObjectValueNodeInterface, t as PrimitiveNodeOptions, a1 as PrimitiveTypeName, P as PrimitiveValueNode, R as RefSchemas, G as ReplaceResult, M as RowData, Q as RowModel, U as RowModelOptions, h as SchemaAtPath, i as SchemaFromValue, B as SchemaModel, H as SchemaModelOptions, S as SchemaPaths, a0 as SimpleFieldType, K as TableModel, W as TableModelLike, L as TableModelOptions, Z as TransformContext, _ as TransformResult, Y as TypeTransformer, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, q as ValueNode, y as ValueNodeFactory, s as ValueNodeOptions, k as ValuePaths, z as ValueTreeLike, l as ValueType, p as createDefaultRegistry, o as createNodeFactory, m as extractFormulaDefinition } from './typed-DjSH_5Vh.cjs';
3
+ export { v as ArrayNodeOptions, A as ArrayValueNodeInterface, a2 as CompositeTypeName, D as DirtyTrackable, $ as FieldSchemaSpec, C as FieldType, E as FieldTypeSpec, X as ForeignKeyResolver, F as FormulaDefinition, r as FormulaWarning, g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, w as NodeFactoryFn, x as NodeFactoryOptions, n as NodeFactoryRegistry, j as NodeFromValue, u as ObjectNodeOptions, O as ObjectValueNodeInterface, t as PrimitiveNodeOptions, a1 as PrimitiveTypeName, P as PrimitiveValueNode, R as RefSchemas, G as ReplaceResult, M as RowData, Q as RowModel, U as RowModelOptions, h as SchemaAtPath, i as SchemaFromValue, B as SchemaModel, H as SchemaModelOptions, S as SchemaPaths, a0 as SimpleFieldType, K as TableModel, W as TableModelLike, L as TableModelOptions, Z as TransformContext, _ as TransformResult, Y as TypeTransformer, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, q as ValueNode, y as ValueNodeFactory, s as ValueNodeOptions, k as ValuePaths, z as ValueTreeLike, l as ValueType, p as createDefaultRegistry, o as createNodeFactory, m as extractFormulaDefinition } from './typed-C0YM-ar9.cjs';
4
4
  export { InitMigration, Migration, RemoveMigration, RenameMigration, UpdateMigration } from './types/index.cjs';
5
5
  export { C as ContentMediaType, h as JsonArraySchema, e as JsonBooleanSchema, d as JsonNumberSchema, g as JsonObjectSchema, i as JsonRefSchema, j as JsonSchema, f as JsonSchemaPrimitives, b as JsonSchemaSharedFields, a as JsonSchemaType, J as JsonSchemaTypeName, k as JsonSchemaWithoutRef, c as JsonStringSchema, X as XFormula } from './schema.types-On_VGw2m.cjs';
6
6
  export { a as FieldChange, F as FieldChangeType } from './types-C_GxaUve.cjs';
@@ -11,10 +11,10 @@ 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 { GetForeignKeysFromValueType, RefsType, ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, 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 } from './lib/index.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';
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
- export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from './validation-schemas/index.cjs';
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';
18
18
  export { AddedChange, AnnotationType, AnnotationsMap, ChangeCoalescer, ChangeCollector, ChangeType, CoalescedChanges, ComparatorContext, CompositeRule, EMPTY_PATH, EnumValidator, FIELD_NAME_ERROR_MESSAGE, ForeignKeyValidator, ItemsSegment, MaxLengthValidator, MaximumValidator, MinLengthValidator, MinimumValidator, ModifiedChange, MovedChange, NULL_NODE, NodePathIndex, PatchBuilder, PatchEnricher, PatchGenerator, PatternValidator, PropertySegment, RawChange, ReactivityProvider, RemovedChange, RequiredValidator, SchemaDiff, SchemaPropertyRule, SchemaSerializer, SchemaTruthyRule, SerializeOptions, 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 './core/index.cjs';
19
19
  export { S as SystemSchemaIds } from './system-schema-ids-B-2xMN-1.cjs';
20
20
  export { formulaSpec } from '@revisium/formula/spec';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { b as JsonArray, J as JsonObject, a as JsonPrimitives, c as JsonValue } from './json.types-PrMmLhba.js';
2
2
  export { h as JsonPatch, g as JsonPatchAdd, c as JsonPatchAddOperation, d as JsonPatchMove, J as JsonPatchMoveOperation, f as JsonPatchRemove, b as JsonPatchRemoveOperation, e as JsonPatchReplace, a as JsonPatchReplaceOperation } from './json-patch.types-BpVnp08Z.js';
3
- export { v as ArrayNodeOptions, A as ArrayValueNodeInterface, a2 as CompositeTypeName, D as DirtyTrackable, $ as FieldSchemaSpec, C as FieldType, E as FieldTypeSpec, X as ForeignKeyResolver, F as FormulaDefinition, r as FormulaWarning, g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, w as NodeFactoryFn, x as NodeFactoryOptions, n as NodeFactoryRegistry, j as NodeFromValue, u as ObjectNodeOptions, O as ObjectValueNodeInterface, t as PrimitiveNodeOptions, a1 as PrimitiveTypeName, P as PrimitiveValueNode, R as RefSchemas, G as ReplaceResult, M as RowData, Q as RowModel, U as RowModelOptions, h as SchemaAtPath, i as SchemaFromValue, B as SchemaModel, H as SchemaModelOptions, S as SchemaPaths, a0 as SimpleFieldType, K as TableModel, W as TableModelLike, L as TableModelOptions, Z as TransformContext, _ as TransformResult, Y as TypeTransformer, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, q as ValueNode, y as ValueNodeFactory, s as ValueNodeOptions, k as ValuePaths, z as ValueTreeLike, l as ValueType, p as createDefaultRegistry, o as createNodeFactory, m as extractFormulaDefinition } from './typed-KUia-LYN.js';
3
+ export { v as ArrayNodeOptions, A as ArrayValueNodeInterface, a2 as CompositeTypeName, D as DirtyTrackable, $ as FieldSchemaSpec, C as FieldType, E as FieldTypeSpec, X as ForeignKeyResolver, F as FormulaDefinition, r as FormulaWarning, g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, w as NodeFactoryFn, x as NodeFactoryOptions, n as NodeFactoryRegistry, j as NodeFromValue, u as ObjectNodeOptions, O as ObjectValueNodeInterface, t as PrimitiveNodeOptions, a1 as PrimitiveTypeName, P as PrimitiveValueNode, R as RefSchemas, G as ReplaceResult, M as RowData, Q as RowModel, U as RowModelOptions, h as SchemaAtPath, i as SchemaFromValue, B as SchemaModel, H as SchemaModelOptions, S as SchemaPaths, a0 as SimpleFieldType, K as TableModel, W as TableModelLike, L as TableModelOptions, Z as TransformContext, _ as TransformResult, Y as TypeTransformer, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, q as ValueNode, y as ValueNodeFactory, s as ValueNodeOptions, k as ValuePaths, z as ValueTreeLike, l as ValueType, p as createDefaultRegistry, o as createNodeFactory, m as extractFormulaDefinition } from './typed-CkirI6bH.js';
4
4
  export { InitMigration, Migration, RemoveMigration, RenameMigration, UpdateMigration } from './types/index.js';
5
5
  export { C as ContentMediaType, h as JsonArraySchema, e as JsonBooleanSchema, d as JsonNumberSchema, g as JsonObjectSchema, i as JsonRefSchema, j as JsonSchema, f as JsonSchemaPrimitives, b as JsonSchemaSharedFields, a as JsonSchemaType, J as JsonSchemaTypeName, k as JsonSchemaWithoutRef, c as JsonStringSchema, X as XFormula } from './schema.types-On_VGw2m.js';
6
6
  export { a as FieldChange, F as FieldChangeType } from './types-C_GxaUve.js';
@@ -11,10 +11,10 @@ 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 { GetForeignKeysFromValueType, RefsType, ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, 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 } from './lib/index.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';
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
- export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from './validation-schemas/index.js';
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';
18
18
  export { AddedChange, AnnotationType, AnnotationsMap, ChangeCoalescer, ChangeCollector, ChangeType, CoalescedChanges, ComparatorContext, CompositeRule, EMPTY_PATH, EnumValidator, FIELD_NAME_ERROR_MESSAGE, ForeignKeyValidator, ItemsSegment, MaxLengthValidator, MaximumValidator, MinLengthValidator, MinimumValidator, ModifiedChange, MovedChange, NULL_NODE, NodePathIndex, PatchBuilder, PatchEnricher, PatchGenerator, PatternValidator, PropertySegment, RawChange, ReactivityProvider, RemovedChange, RequiredValidator, SchemaDiff, SchemaPropertyRule, SchemaSerializer, SchemaTruthyRule, SerializeOptions, 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 './core/index.js';
19
19
  export { S as SystemSchemaIds } from './system-schema-ids-B-2xMN-1.js';
20
20
  export { formulaSpec } from '@revisium/formula/spec';
package/dist/index.js CHANGED
@@ -2,14 +2,15 @@ import './chunk-OAUVP6CU.js';
2
2
  export { JsonSchemaTypeName } from './chunk-NO655UI5.js';
3
3
  import './chunk-3MJP73IJ.js';
4
4
  export { CustomSchemeKeywords } from './chunk-WE4OLW5U.js';
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-3MXYXTNF.js';
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-MXEQ5CBK.js';
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
+ 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 { SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, 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 } from './chunk-JLXX3SGF.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-GAP5KNWN.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';
12
12
  export { ajvFileSchema, ajvRowCreatedAtSchema, ajvRowCreatedIdSchema, ajvRowHashSchema, ajvRowIdSchema, ajvRowPublishedAtSchema, ajvRowSchemaHashSchema, ajvRowUpdatedAtSchema, ajvRowVersionIdSchema, fileSchema, rowCreatedAtSchema, rowCreatedIdSchema, rowHashSchema, rowIdSchema, rowPublishedAtSchema, rowSchemaHashSchema, rowUpdatedAtSchema, rowVersionIdSchema } from './chunk-4U2RZHMX.js';
13
13
  export { SystemSchemaIds } from './chunk-5DUMJHCA.js';
14
14
  export { JsonArrayStore, JsonArrayValueStore, JsonBooleanStore, JsonBooleanValueStore, JsonNumberStore, JsonNumberValueStore, JsonObjectStore, JsonObjectValueStore, JsonStringStore, JsonStringValueStore, addSharedFieldsFromState, createJsonArrayValueStore, createJsonObjectValueStore, createJsonValueStore, createPrimitiveValueStore, equal, fromArrayToObject, fromArrayTransformation, fromBooleanToNumber, fromBooleanToString, fromNumberToBoolean, fromNumberToString, fromObjectToArray, fromObjectToPrimitive, fromPrimitiveToObject, fromStringToBoolean, fromStringToNumber, getTransformation, toArrayTransformation } from './chunk-FTBRJODD.js';
15
- export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from './chunk-XKWWCXGB.js';
15
+ import './chunk-5G3AVY57.js';
16
+ export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, tableViewsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from './chunk-HOMXBUQB.js';
@@ -1,142 +1,163 @@
1
1
  'use strict';
2
2
 
3
- var chunk7JWCZZPJ_cjs = require('../chunk-7JWCZZPJ.cjs');
3
+ var chunkYZEJKK4O_cjs = require('../chunk-YZEJKK4O.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');
7
7
  require('../chunk-ITYABUR5.cjs');
8
8
  require('../chunk-EVD5ZI55.cjs');
9
9
  var chunkONW2OVNQ_cjs = require('../chunk-ONW2OVNQ.cjs');
10
+ require('../chunk-WY3CL7KH.cjs');
10
11
 
11
12
 
12
13
 
14
+ Object.defineProperty(exports, "RevisiumValidator", {
15
+ enumerable: true,
16
+ get: function () { return chunkYZEJKK4O_cjs.RevisiumValidator; }
17
+ });
13
18
  Object.defineProperty(exports, "SchemaTable", {
14
19
  enumerable: true,
15
- get: function () { return chunk7JWCZZPJ_cjs.SchemaTable; }
20
+ get: function () { return chunkYZEJKK4O_cjs.SchemaTable; }
16
21
  });
17
22
  Object.defineProperty(exports, "VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE", {
18
23
  enumerable: true,
19
- get: function () { return chunk7JWCZZPJ_cjs.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE; }
24
+ get: function () { return chunkYZEJKK4O_cjs.VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE; }
20
25
  });
21
26
  Object.defineProperty(exports, "applyAddPatch", {
22
27
  enumerable: true,
23
- get: function () { return chunk7JWCZZPJ_cjs.applyAddPatch; }
28
+ get: function () { return chunkYZEJKK4O_cjs.applyAddPatch; }
24
29
  });
25
30
  Object.defineProperty(exports, "applyMovePatch", {
26
31
  enumerable: true,
27
- get: function () { return chunk7JWCZZPJ_cjs.applyMovePatch; }
32
+ get: function () { return chunkYZEJKK4O_cjs.applyMovePatch; }
28
33
  });
29
34
  Object.defineProperty(exports, "applyRemovePatch", {
30
35
  enumerable: true,
31
- get: function () { return chunk7JWCZZPJ_cjs.applyRemovePatch; }
36
+ get: function () { return chunkYZEJKK4O_cjs.applyRemovePatch; }
32
37
  });
33
38
  Object.defineProperty(exports, "applyReplacePatch", {
34
39
  enumerable: true,
35
- get: function () { return chunk7JWCZZPJ_cjs.applyReplacePatch; }
40
+ get: function () { return chunkYZEJKK4O_cjs.applyReplacePatch; }
41
+ });
42
+ Object.defineProperty(exports, "calculateDataWeight", {
43
+ enumerable: true,
44
+ get: function () { return chunkYZEJKK4O_cjs.calculateDataWeight; }
45
+ });
46
+ Object.defineProperty(exports, "calculateDataWeightFromStore", {
47
+ enumerable: true,
48
+ get: function () { return chunkYZEJKK4O_cjs.calculateDataWeightFromStore; }
49
+ });
50
+ Object.defineProperty(exports, "calculateSchemaWeight", {
51
+ enumerable: true,
52
+ get: function () { return chunkYZEJKK4O_cjs.calculateSchemaWeight; }
36
53
  });
37
54
  Object.defineProperty(exports, "convertJsonPathToSchemaPath", {
38
55
  enumerable: true,
39
- get: function () { return chunk7JWCZZPJ_cjs.convertJsonPathToSchemaPath; }
56
+ get: function () { return chunkYZEJKK4O_cjs.convertJsonPathToSchemaPath; }
40
57
  });
41
58
  Object.defineProperty(exports, "convertSchemaPathToJsonPath", {
42
59
  enumerable: true,
43
- get: function () { return chunk7JWCZZPJ_cjs.convertSchemaPathToJsonPath; }
60
+ get: function () { return chunkYZEJKK4O_cjs.convertSchemaPathToJsonPath; }
44
61
  });
45
62
  Object.defineProperty(exports, "createJsonObjectSchemaStore", {
46
63
  enumerable: true,
47
- get: function () { return chunk7JWCZZPJ_cjs.createJsonObjectSchemaStore; }
64
+ get: function () { return chunkYZEJKK4O_cjs.createJsonObjectSchemaStore; }
48
65
  });
49
66
  Object.defineProperty(exports, "createJsonSchemaStore", {
50
67
  enumerable: true,
51
- get: function () { return chunk7JWCZZPJ_cjs.createJsonSchemaStore; }
68
+ get: function () { return chunkYZEJKK4O_cjs.createJsonSchemaStore; }
52
69
  });
53
70
  Object.defineProperty(exports, "createPrimitiveStoreBySchema", {
54
71
  enumerable: true,
55
- get: function () { return chunk7JWCZZPJ_cjs.createPrimitiveStoreBySchema; }
72
+ get: function () { return chunkYZEJKK4O_cjs.createPrimitiveStoreBySchema; }
56
73
  });
57
74
  Object.defineProperty(exports, "deepEqual", {
58
75
  enumerable: true,
59
- get: function () { return chunk7JWCZZPJ_cjs.deepEqual; }
76
+ get: function () { return chunkYZEJKK4O_cjs.deepEqual; }
60
77
  });
61
78
  Object.defineProperty(exports, "getDBJsonPathByJsonSchemaStore", {
62
79
  enumerable: true,
63
- get: function () { return chunk7JWCZZPJ_cjs.getDBJsonPathByJsonSchemaStore; }
80
+ get: function () { return chunkYZEJKK4O_cjs.getDBJsonPathByJsonSchemaStore; }
64
81
  });
65
82
  Object.defineProperty(exports, "getForeignKeyPatchesFromSchema", {
66
83
  enumerable: true,
67
- get: function () { return chunk7JWCZZPJ_cjs.getForeignKeyPatchesFromSchema; }
84
+ get: function () { return chunkYZEJKK4O_cjs.getForeignKeyPatchesFromSchema; }
68
85
  });
69
86
  Object.defineProperty(exports, "getForeignKeysFromSchema", {
70
87
  enumerable: true,
71
- get: function () { return chunk7JWCZZPJ_cjs.getForeignKeysFromSchema; }
88
+ get: function () { return chunkYZEJKK4O_cjs.getForeignKeysFromSchema; }
72
89
  });
73
90
  Object.defineProperty(exports, "getForeignKeysFromValue", {
74
91
  enumerable: true,
75
- get: function () { return chunk7JWCZZPJ_cjs.getForeignKeysFromValue; }
92
+ get: function () { return chunkYZEJKK4O_cjs.getForeignKeysFromValue; }
76
93
  });
77
94
  Object.defineProperty(exports, "getInvalidFieldNamesInSchema", {
78
95
  enumerable: true,
79
- get: function () { return chunk7JWCZZPJ_cjs.getInvalidFieldNamesInSchema; }
96
+ get: function () { return chunkYZEJKK4O_cjs.getInvalidFieldNamesInSchema; }
80
97
  });
81
98
  Object.defineProperty(exports, "getJsonSchemaStoreByPath", {
82
99
  enumerable: true,
83
- get: function () { return chunk7JWCZZPJ_cjs.getJsonSchemaStoreByPath; }
100
+ get: function () { return chunkYZEJKK4O_cjs.getJsonSchemaStoreByPath; }
84
101
  });
85
102
  Object.defineProperty(exports, "getJsonValueStoreByPath", {
86
103
  enumerable: true,
87
- get: function () { return chunk7JWCZZPJ_cjs.getJsonValueStoreByPath; }
104
+ get: function () { return chunkYZEJKK4O_cjs.getJsonValueStoreByPath; }
88
105
  });
89
106
  Object.defineProperty(exports, "getParentForPath", {
90
107
  enumerable: true,
91
- get: function () { return chunk7JWCZZPJ_cjs.getParentForPath; }
108
+ get: function () { return chunkYZEJKK4O_cjs.getParentForPath; }
92
109
  });
93
110
  Object.defineProperty(exports, "getPathByStore", {
94
111
  enumerable: true,
95
- get: function () { return chunk7JWCZZPJ_cjs.getPathByStore; }
112
+ get: function () { return chunkYZEJKK4O_cjs.getPathByStore; }
96
113
  });
97
114
  Object.defineProperty(exports, "getValueByPath", {
98
115
  enumerable: true,
99
- get: function () { return chunk7JWCZZPJ_cjs.getValueByPath; }
116
+ get: function () { return chunkYZEJKK4O_cjs.getValueByPath; }
100
117
  });
101
118
  Object.defineProperty(exports, "hasPath", {
102
119
  enumerable: true,
103
- get: function () { return chunk7JWCZZPJ_cjs.hasPath; }
120
+ get: function () { return chunkYZEJKK4O_cjs.hasPath; }
104
121
  });
105
122
  Object.defineProperty(exports, "parsePath", {
106
123
  enumerable: true,
107
- get: function () { return chunk7JWCZZPJ_cjs.parsePath; }
124
+ get: function () { return chunkYZEJKK4O_cjs.parsePath; }
108
125
  });
109
126
  Object.defineProperty(exports, "pluginRefs", {
110
127
  enumerable: true,
111
- get: function () { return chunk7JWCZZPJ_cjs.pluginRefs; }
128
+ get: function () { return chunkYZEJKK4O_cjs.pluginRefs; }
112
129
  });
113
130
  Object.defineProperty(exports, "replaceForeignKeyValue", {
114
131
  enumerable: true,
115
- get: function () { return chunk7JWCZZPJ_cjs.replaceForeignKeyValue; }
132
+ get: function () { return chunkYZEJKK4O_cjs.replaceForeignKeyValue; }
116
133
  });
117
134
  Object.defineProperty(exports, "resolveRefs", {
118
135
  enumerable: true,
119
- get: function () { return chunk7JWCZZPJ_cjs.resolveRefs; }
136
+ get: function () { return chunkYZEJKK4O_cjs.resolveRefs; }
120
137
  });
121
138
  Object.defineProperty(exports, "saveSharedFields", {
122
139
  enumerable: true,
123
- get: function () { return chunk7JWCZZPJ_cjs.saveSharedFields; }
140
+ get: function () { return chunkYZEJKK4O_cjs.saveSharedFields; }
124
141
  });
125
142
  Object.defineProperty(exports, "setValueByPath", {
126
143
  enumerable: true,
127
- get: function () { return chunk7JWCZZPJ_cjs.setValueByPath; }
144
+ get: function () { return chunkYZEJKK4O_cjs.setValueByPath; }
128
145
  });
129
146
  Object.defineProperty(exports, "traverseStore", {
130
147
  enumerable: true,
131
- get: function () { return chunk7JWCZZPJ_cjs.traverseStore; }
148
+ get: function () { return chunkYZEJKK4O_cjs.traverseStore; }
132
149
  });
133
150
  Object.defineProperty(exports, "traverseValue", {
134
151
  enumerable: true,
135
- get: function () { return chunk7JWCZZPJ_cjs.traverseValue; }
152
+ get: function () { return chunkYZEJKK4O_cjs.traverseValue; }
136
153
  });
137
154
  Object.defineProperty(exports, "validateJsonFieldName", {
138
155
  enumerable: true,
139
- get: function () { return chunk7JWCZZPJ_cjs.validateJsonFieldName; }
156
+ get: function () { return chunkYZEJKK4O_cjs.validateJsonFieldName; }
157
+ });
158
+ Object.defineProperty(exports, "validateRevisiumSchema", {
159
+ enumerable: true,
160
+ get: function () { return chunkYZEJKK4O_cjs.validateRevisiumSchema; }
140
161
  });
141
162
  Object.defineProperty(exports, "collectFormulaNodes", {
142
163
  enumerable: true,
@@ -100,4 +100,52 @@ declare const traverseValue: (store: JsonValueStore, callback: (node: JsonValueS
100
100
  declare const VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE = "It must contain between 1 and 64 characters, start with a letter or underscore (_), cannot start with two underscores (__), and can only include letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_).";
101
101
  declare const validateJsonFieldName: (id: string) => boolean;
102
102
 
103
- export { type GetForeignKeysFromValueType, type RefsType, type ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, 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 };
103
+ interface MetaSchemaValidationResult {
104
+ valid: boolean;
105
+ errors?: string[];
106
+ }
107
+ declare const validateRevisiumSchema: (schema: JsonObjectSchema) => MetaSchemaValidationResult;
108
+
109
+ interface ValidationError {
110
+ instancePath: string;
111
+ message?: string;
112
+ keyword: string;
113
+ params: Record<string, unknown>;
114
+ }
115
+ interface ValidateFn {
116
+ (data: unknown): boolean;
117
+ errors: ValidationError[] | null;
118
+ }
119
+ declare class RevisiumValidator {
120
+ readonly validateMetaSchema: ValidateFn;
121
+ readonly validateJsonPatch: ValidateFn;
122
+ readonly validateMigrations: ValidateFn;
123
+ readonly validateHistoryPatches: ValidateFn;
124
+ readonly validateTableViews: ValidateFn;
125
+ private readonly ajv;
126
+ private readonly cache;
127
+ constructor();
128
+ compile(schema: unknown): ValidateFn;
129
+ }
130
+
131
+ interface SchemaWeight {
132
+ totalFields: number;
133
+ maxDepth: number;
134
+ fieldNames: number;
135
+ totalArrays: number;
136
+ maxArrayDepth: number;
137
+ }
138
+ declare const calculateSchemaWeight: (schema: JsonObjectSchema) => SchemaWeight;
139
+
140
+ interface DataWeight {
141
+ totalBytes: number;
142
+ totalNodes: number;
143
+ maxDepth: number;
144
+ maxArrayLength: number;
145
+ maxStringLength: number;
146
+ totalStringsLength: number;
147
+ }
148
+ declare const calculateDataWeight: (data: unknown) => DataWeight;
149
+ declare const calculateDataWeightFromStore: (store: JsonValueStore) => DataWeight;
150
+
151
+ export { type DataWeight, type GetForeignKeysFromValueType, type MetaSchemaValidationResult, type RefsType, type ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, type SchemaWeight, 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, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema };
@@ -100,4 +100,52 @@ declare const traverseValue: (store: JsonValueStore, callback: (node: JsonValueS
100
100
  declare const VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE = "It must contain between 1 and 64 characters, start with a letter or underscore (_), cannot start with two underscores (__), and can only include letters (a-z, A-Z), numbers (0-9), hyphens (-), and underscores (_).";
101
101
  declare const validateJsonFieldName: (id: string) => boolean;
102
102
 
103
- export { type GetForeignKeysFromValueType, type RefsType, type ReplaceForeignKeyValueOptions, SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, addSharedFieldsFromState, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, 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 };
103
+ interface MetaSchemaValidationResult {
104
+ valid: boolean;
105
+ errors?: string[];
106
+ }
107
+ declare const validateRevisiumSchema: (schema: JsonObjectSchema) => MetaSchemaValidationResult;
108
+
109
+ interface ValidationError {
110
+ instancePath: string;
111
+ message?: string;
112
+ keyword: string;
113
+ params: Record<string, unknown>;
114
+ }
115
+ interface ValidateFn {
116
+ (data: unknown): boolean;
117
+ errors: ValidationError[] | null;
118
+ }
119
+ declare class RevisiumValidator {
120
+ readonly validateMetaSchema: ValidateFn;
121
+ readonly validateJsonPatch: ValidateFn;
122
+ readonly validateMigrations: ValidateFn;
123
+ readonly validateHistoryPatches: ValidateFn;
124
+ readonly validateTableViews: ValidateFn;
125
+ private readonly ajv;
126
+ private readonly cache;
127
+ constructor();
128
+ compile(schema: unknown): ValidateFn;
129
+ }
130
+
131
+ interface SchemaWeight {
132
+ totalFields: number;
133
+ maxDepth: number;
134
+ fieldNames: number;
135
+ totalArrays: number;
136
+ maxArrayDepth: number;
137
+ }
138
+ declare const calculateSchemaWeight: (schema: JsonObjectSchema) => SchemaWeight;
139
+
140
+ interface DataWeight {
141
+ totalBytes: number;
142
+ totalNodes: number;
143
+ maxDepth: number;
144
+ maxArrayLength: number;
145
+ maxStringLength: number;
146
+ totalStringsLength: number;
147
+ }
148
+ declare const calculateDataWeight: (data: unknown) => DataWeight;
149
+ declare const calculateDataWeightFromStore: (store: JsonValueStore) => DataWeight;
150
+
151
+ export { type DataWeight, type GetForeignKeysFromValueType, type MetaSchemaValidationResult, type RefsType, type ReplaceForeignKeyValueOptions, RevisiumValidator, SchemaTable, type SchemaWeight, 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, traverseStore, traverseValue, validateJsonFieldName, validateRevisiumSchema };
package/dist/lib/index.js CHANGED
@@ -1,7 +1,8 @@
1
- export { SchemaTable, VALIDATE_JSON_FIELD_NAME_ERROR_MESSAGE, applyAddPatch, applyMovePatch, applyRemovePatch, applyReplacePatch, 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 } from '../chunk-JLXX3SGF.js';
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-GAP5KNWN.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';
5
5
  import '../chunk-4U2RZHMX.js';
6
6
  import '../chunk-5DUMJHCA.js';
7
7
  export { addSharedFieldsFromState, createJsonArrayValueStore, createJsonObjectValueStore, createJsonValueStore, createPrimitiveValueStore } from '../chunk-FTBRJODD.js';
8
+ import '../chunk-HOMXBUQB.js';