@seedprotocol/sdk 0.4.13 → 0.4.14
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/{ArweaveClient-Bot35vMf.js → ArweaveClient-D6E8xe3J.js} +3 -3
- package/dist/{ArweaveClient-Bot35vMf.js.map → ArweaveClient-D6E8xe3J.js.map} +1 -1
- package/dist/{ArweaveClient-C6mBPWwy.js → ArweaveClient-DElJwN08.js} +3 -3
- package/dist/{ArweaveClient-C6mBPWwy.js.map → ArweaveClient-DElJwN08.js.map} +1 -1
- package/dist/{Db-rlxROH4S.js → Db-DW1Un2jz.js} +3 -3
- package/dist/{Db-rlxROH4S.js.map → Db-DW1Un2jz.js.map} +1 -1
- package/dist/{Db-DP7ELP9S.js → Db-De4o7jww.js} +3 -3
- package/dist/{Db-DP7ELP9S.js.map → Db-De4o7jww.js.map} +1 -1
- package/dist/{EasClient-CHI9lBP8.js → EasClient-BpGDIkmb.js} +2 -2
- package/dist/{EasClient-CHI9lBP8.js.map → EasClient-BpGDIkmb.js.map} +1 -1
- package/dist/{EasClient-CszJzwqw.js → EasClient-DGY_mkrd.js} +2 -2
- package/dist/{EasClient-CszJzwqw.js.map → EasClient-DGY_mkrd.js.map} +1 -1
- package/dist/{FileManager-Dy3BbIxq.js → FileManager-Cw8mOIqZ.js} +2 -2
- package/dist/{FileManager-Dy3BbIxq.js.map → FileManager-Cw8mOIqZ.js.map} +1 -1
- package/dist/{FileManager-C7yOhPvS.js → FileManager-DrHQbmYj.js} +2 -2
- package/dist/{FileManager-C7yOhPvS.js.map → FileManager-DrHQbmYj.js.map} +1 -1
- package/dist/{ModelProperty--OQb3Dy0.js → ModelProperty-D8d25NtC.js} +17 -17
- package/dist/{ModelProperty--OQb3Dy0.js.map → ModelProperty-D8d25NtC.js.map} +1 -1
- package/dist/{PathResolver-D--w4fFE.js → PathResolver-BHj0UZTj.js} +2 -2
- package/dist/{PathResolver-D--w4fFE.js.map → PathResolver-BHj0UZTj.js.map} +1 -1
- package/dist/{PathResolver-BtnV9pXS.js → PathResolver-D1k3dZg5.js} +2 -2
- package/dist/{PathResolver-BtnV9pXS.js.map → PathResolver-D1k3dZg5.js.map} +1 -1
- package/dist/{QueryClient-Bia5wKCO.js → QueryClient-BCVom0BA.js} +2 -2
- package/dist/{QueryClient-Bia5wKCO.js.map → QueryClient-BCVom0BA.js.map} +1 -1
- package/dist/{QueryClient-BdNnK6Es.js → QueryClient-D4974vvo.js} +2 -2
- package/dist/{QueryClient-BdNnK6Es.js.map → QueryClient-D4974vvo.js.map} +1 -1
- package/dist/{Schema-DF4mLt86.js → Schema-CLlE7onI.js} +21 -21
- package/dist/{Schema-DF4mLt86.js.map → Schema-CLlE7onI.js.map} +1 -1
- package/dist/{SchemaValidationService-D4LwnnIB.js → SchemaValidationService-CwKY3QlY.js} +2 -2
- package/dist/{SchemaValidationService-D4LwnnIB.js.map → SchemaValidationService-CwKY3QlY.js.map} +1 -1
- package/dist/cjs/{ModelProperty-C5BRfISV.js → ModelProperty-CgQ3zR-u.js} +17 -17
- package/dist/cjs/{ModelProperty-C5BRfISV.js.map → ModelProperty-CgQ3zR-u.js.map} +1 -1
- package/dist/cjs/{Schema-DVJG8ISB.js → Schema-B0D7LgYb.js} +20 -20
- package/dist/cjs/{Schema-DVJG8ISB.js.map → Schema-B0D7LgYb.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-_wef0VX6.js → SchemaValidationService-DUIOUvC_.js} +2 -2
- package/dist/cjs/{SchemaValidationService-_wef0VX6.js.map → SchemaValidationService-DUIOUvC_.js.map} +1 -1
- package/dist/cjs/{getItem-CUGoglni.js → getItem-BP4BYB4Z.js} +2 -2
- package/dist/cjs/{getItem-CUGoglni.js.map → getItem-BP4BYB4Z.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-CGl97AXX.js → getPublishPayload-B90BFd8m.js} +5 -5
- package/dist/cjs/{getPublishPayload-CGl97AXX.js.map → getPublishPayload-B90BFd8m.js.map} +1 -1
- package/dist/cjs/{getPublishUploads-BA5PdoJ3.js → getPublishUploads-D4DMfuOm.js} +3 -3
- package/dist/cjs/{getPublishUploads-BA5PdoJ3.js.map → getPublishUploads-D4DMfuOm.js.map} +1 -1
- package/dist/cjs/{getSegmentedItemProperties-D3iBFPeo.js → getSegmentedItemProperties-KdudlzXm.js} +2 -2
- package/dist/cjs/{getSegmentedItemProperties-D3iBFPeo.js.map → getSegmentedItemProperties-KdudlzXm.js.map} +1 -1
- package/dist/cjs/{index-CpBFvNId.js → index-BM8CSlnN.js} +2 -2
- package/dist/cjs/index-BM8CSlnN.js.map +1 -0
- package/dist/cjs/{index-B3K0jG2t.js → index-CUd7xS2i.js} +33 -30
- package/dist/cjs/index-CUd7xS2i.js.map +1 -0
- package/dist/cjs/{ownership-CkgGUliG.js → ownership-D3npAPnx.js} +2 -2
- package/dist/cjs/{ownership-CkgGUliG.js.map → ownership-D3npAPnx.js.map} +1 -1
- package/dist/{getItem-CbGS6wbp.js → getItem-B_IP-uNX.js} +2 -2
- package/dist/{getItem-CbGS6wbp.js.map → getItem-B_IP-uNX.js.map} +1 -1
- package/dist/{getPublishPayload-jUcwhhs1.js → getPublishPayload-BekDN5Ti.js} +5 -5
- package/dist/{getPublishPayload-jUcwhhs1.js.map → getPublishPayload-BekDN5Ti.js.map} +1 -1
- package/dist/{getPublishUploads-BAsUuLSM.js → getPublishUploads-DPk5RcAG.js} +3 -3
- package/dist/{getPublishUploads-BAsUuLSM.js.map → getPublishUploads-DPk5RcAG.js.map} +1 -1
- package/dist/{getSegmentedItemProperties-1QklOMkN.js → getSegmentedItemProperties-DfQNbOpb.js} +2 -2
- package/dist/{getSegmentedItemProperties-1QklOMkN.js.map → getSegmentedItemProperties-DfQNbOpb.js.map} +1 -1
- package/dist/{index-CjAALVQh.js → index-DbmqfO-Q.js} +2 -2
- package/dist/index-DbmqfO-Q.js.map +1 -0
- package/dist/{index-BUFvepcD.js → index-Dh_gxItx.js} +47 -44
- package/dist/index-Dh_gxItx.js.map +1 -0
- package/dist/{index-BnBV-CWp.js → index-XBnjc_SF.js} +3 -3
- package/dist/index-XBnjc_SF.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +11 -11
- package/dist/node.js +10 -10
- package/dist/{ownership-CeuRaVwP.js → ownership-CEv7BhIh.js} +2 -2
- package/dist/{ownership-CeuRaVwP.js.map → ownership-CEv7BhIh.js.map} +1 -1
- package/dist/{property-BiZvboSH.js → property-CppuVi-i.js} +4 -4
- package/dist/{property-BiZvboSH.js.map → property-CppuVi-i.js.map} +1 -1
- package/dist/{queries-B2xdenwS.js → queries-B1vaglQW.js} +2 -2
- package/dist/{queries-B2xdenwS.js.map → queries-B1vaglQW.js.map} +1 -1
- package/dist/src/browser/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts.map +1 -1
- package/dist/src/vite/index.d.ts.map +1 -1
- package/dist/vite.cjs +129 -1
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.js +128 -1
- package/dist/vite.js.map +1 -1
- package/package.json +5 -3
- package/dist/cjs/index-B3K0jG2t.js.map +0 -1
- package/dist/cjs/index-CpBFvNId.js.map +0 -1
- package/dist/index-BUFvepcD.js.map +0 -1
- package/dist/index-BnBV-CWp.js.map +0 -1
- package/dist/index-CjAALVQh.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Value } from '@sinclair/typebox/value';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
import { a as ModelPropertyDataTypes, T as TPropertyDataType, c as TProperty } from './index-
|
|
3
|
+
import { a as ModelPropertyDataTypes, T as TPropertyDataType, c as TProperty } from './index-Dh_gxItx.js';
|
|
4
4
|
import 'pluralize';
|
|
5
5
|
import 'drizzle-orm';
|
|
6
6
|
import { Type } from '@sinclair/typebox';
|
|
@@ -651,4 +651,4 @@ class SchemaValidationService {
|
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
export { SchemaValidationService };
|
|
654
|
-
//# sourceMappingURL=SchemaValidationService-
|
|
654
|
+
//# sourceMappingURL=SchemaValidationService-CwKY3QlY.js.map
|
package/dist/{SchemaValidationService-D4LwnnIB.js.map → SchemaValidationService-CwKY3QlY.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaValidationService-D4LwnnIB.js","sources":["../../src/Schema/service/validation/SchemaValidationService.ts"],"sourcesContent":["import { Value } from '@sinclair/typebox/value'\nimport { TProperty } from '@/Schema'\nimport { ModelPropertyDataTypes, TPropertyDataType } from '@/helpers/property'\nimport { ValidationResult, ValidationError, ValidationRules } from '@/Schema/validation'\nimport { SchemaMachineContext } from '../schemaMachine'\nimport { ModelPropertyMachineContext } from '@/ModelProperty/service/modelPropertyMachine'\nimport { ModelMachineContext } from '@/Model/service/modelMachine'\nimport { Type, TSchema, TUnion, TLiteral } from '@sinclair/typebox'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:schema:validation')\n\n/**\n * Service for validating schemas, models, and properties using TypeBox\n */\nexport class SchemaValidationService {\n /**\n * Enhance TypeBox error message with expected values for union/literal types\n */\n private enhanceErrorMessage(\n error: any,\n schema: TSchema,\n fieldPath: string\n ): string {\n const originalMessage = error.message || 'Validation failed'\n \n // Handle Union type errors (like TPropertyDataType)\n if (error.type === 'Union' || originalMessage.includes('union')) {\n const expectedValues = this.extractExpectedValues(schema, fieldPath)\n if (expectedValues.length > 0) {\n return `Expected one of: ${expectedValues.join(', ')}. Received: ${JSON.stringify(error.value)}`\n }\n }\n \n // Handle Literal type errors\n if (error.type === 'Literal') {\n const expectedValue = this.extractLiteralValue(schema, fieldPath)\n if (expectedValue !== undefined) {\n return `Expected: ${JSON.stringify(expectedValue)}. Received: ${JSON.stringify(error.value)}`\n }\n }\n \n // Return enhanced message with value info if available\n if (error.value !== undefined) {\n return `${originalMessage}. Received: ${JSON.stringify(error.value)}`\n }\n \n return originalMessage\n }\n\n /**\n * Extract expected values from a schema for a given field path\n */\n private extractExpectedValues(schema: TSchema | null, fieldPath: string): string[] {\n try {\n // Handle TProperty schema - check if this is the dataType field\n if (fieldPath === '/dataType' || fieldPath.endsWith('/dataType')) {\n // Return all ModelPropertyDataTypes enum values\n return Object.values(ModelPropertyDataTypes) as string[]\n }\n \n // Handle TStorageType\n if (fieldPath === '/storageType' || fieldPath.endsWith('/storageType')) {\n return ['ItemStorage', 'PropertyStorage']\n }\n \n // If we have a schema, try to extract from it\n if (!schema) {\n return []\n }\n \n // Try to extract from TypeBox Union type using the schema directly\n const schemaObj = schema as any\n const kind = schemaObj[Symbol.for('TypeBox.Kind')]\n \n if (kind === 'Union') {\n const union = schemaObj as TUnion<any>\n const anyOf = union.anyOf || []\n const values: string[] = []\n \n for (const item of anyOf) {\n const itemKind = item?.[Symbol.for('TypeBox.Kind')]\n if (itemKind === 'Literal') {\n const literal = item as TLiteral<any>\n if (literal.const !== undefined) {\n values.push(String(literal.const))\n }\n }\n }\n \n if (values.length > 0) {\n return values\n }\n }\n \n // Fallback: try to extract from JSON schema format\n if (typeof schema === 'object' && 'anyOf' in schema) {\n const union = schema as any\n if (Array.isArray(union.anyOf)) {\n return union.anyOf\n .map((item: any) => {\n if (item.const !== undefined) return String(item.const)\n if (item.enum && Array.isArray(item.enum)) return item.enum.map(String)\n return null\n })\n .filter((val: any) => val !== null)\n .flat()\n .map(String)\n }\n }\n } catch (error) {\n logger('Error extracting expected values:', error)\n }\n \n return []\n }\n\n /**\n * Extract literal value from a schema\n */\n private extractLiteralValue(schema: TSchema, fieldPath: string): any {\n try {\n if (schema && typeof schema === 'object') {\n const schemaObj = schema as any\n if (schemaObj[Symbol.for('TypeBox.Kind')] === 'Literal') {\n return (schemaObj as TLiteral<any>).const\n }\n if (schemaObj.const !== undefined) {\n return schemaObj.const\n }\n }\n } catch (error) {\n logger('Error extracting literal value:', error)\n }\n \n return undefined\n }\n\n /**\n * Get the schema for a specific field path\n */\n private getSchemaForField(schema: TSchema, fieldPath: string): TSchema | null {\n try {\n if (!schema || typeof schema !== 'object') return null\n \n // Remove leading slash\n const path = fieldPath.replace(/^\\//, '')\n if (!path) return schema\n \n const schemaObj = schema as any\n const kind = schemaObj[Symbol.for('TypeBox.Kind')]\n \n // For TProperty (Object type), check properties\n if (kind === 'Object') {\n const properties = schemaObj.properties\n if (properties && properties[path]) {\n return properties[path]\n }\n }\n \n // Special handling for known fields - return the actual schema\n if (path === 'dataType') {\n return TPropertyDataType as TSchema\n }\n \n // Fallback: check if schema has the property\n if (path in schemaObj) {\n return schemaObj[path]\n }\n } catch (error) {\n logger('Error getting schema for field:', error)\n }\n \n return null\n }\n\n /**\n * Validate a property structure against TProperty schema\n */\n validatePropertyStructure(\n property: ModelPropertyMachineContext\n ): ValidationResult {\n try {\n const isValid = Value.Check(TProperty, property)\n \n const errors: ValidationError[] = []\n \n if (!isValid) {\n const typeBoxErrors = [...Value.Errors(TProperty, property)]\n errors.push(...typeBoxErrors.map(err => {\n const fieldPath = err.path || 'unknown'\n const fieldSchema = this.getSchemaForField(TProperty, fieldPath)\n const enhancedMessage = this.enhanceErrorMessage(err, fieldSchema || TProperty, fieldPath)\n \n return {\n field: fieldPath,\n message: enhancedMessage,\n code: String(err.type || 'validation_error'),\n severity: 'error' as const,\n }\n }))\n }\n \n // Non-List types: refValueType is only valid for Relation+Image (related entity type). Reject otherwise.\n const nonListTypes = [\n ModelPropertyDataTypes.Text,\n ModelPropertyDataTypes.Number,\n ModelPropertyDataTypes.Boolean,\n ModelPropertyDataTypes.Date,\n ModelPropertyDataTypes.Json,\n ModelPropertyDataTypes.Image,\n ModelPropertyDataTypes.File,\n ModelPropertyDataTypes.Html,\n ModelPropertyDataTypes.Relation,\n ]\n if (nonListTypes.includes(property.dataType as ModelPropertyDataTypes)) {\n const hasRefValueType = property.refValueType != null && String(property.refValueType).trim() !== ''\n if (hasRefValueType) {\n // Relation may keep refValueType only for Image (relation to Image entity)\n if (property.dataType === ModelPropertyDataTypes.Relation && property.refValueType === ModelPropertyDataTypes.Image) {\n // Allowed: Relation to Image\n } else {\n errors.push({\n field: 'refValueType',\n message: `refValueType is only valid for List properties. Use dataType 'List' with refValueType '${property.refValueType}' for lists of ${property.refValueType}.`,\n code: 'invalid_ref_value_type',\n severity: 'error' as const,\n })\n }\n }\n }\n\n // List: refValueType is required\n if (property.dataType === ModelPropertyDataTypes.List) {\n const hasRefValueType = property.refValueType != null && String(property.refValueType).trim() !== ''\n if (!hasRefValueType) {\n errors.push({\n field: 'refValueType',\n message: `List properties require refValueType (e.g. 'Text', 'Number', 'Relation') to specify the element type.`,\n code: 'missing_ref_value_type',\n severity: 'error' as const,\n })\n }\n // List of relations: ref is required\n if (hasRefValueType && property.refValueType === ModelPropertyDataTypes.Relation) {\n const hasRef = property.ref && property.ref.trim() !== ''\n const hasRefModelName = property.refModelName && property.refModelName.trim() !== ''\n const hasRefModelId = property.refModelId !== undefined && property.refModelId !== null\n if (!hasRef && !hasRefModelName && !hasRefModelId) {\n errors.push({\n field: 'ref',\n message: `List properties with refValueType 'Relation' require either a \"ref\", \"refModelName\", or \"refModelId\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n }\n }\n }\n\n // Relation (single): ref is required\n if (property.dataType === ModelPropertyDataTypes.Relation) {\n const hasRef = property.ref && property.ref.trim() !== ''\n const hasRefModelName = property.refModelName && property.refModelName.trim() !== ''\n const hasRefModelId = property.refModelId !== undefined && property.refModelId !== null\n if (!hasRef && !hasRefModelName && !hasRefModelId) {\n errors.push({\n field: 'ref',\n message: `Property with dataType \"Relation\" requires either a \"ref\", \"refModelName\", or \"refModelId\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n }\n if ((hasRef || hasRefModelName) && !hasRefModelId) {\n logger(`Property \"${property.name}\" has ref/refModelName but no refModelId - will be resolved asynchronously`)\n }\n }\n \n return {\n isValid: errors.length === 0,\n errors,\n }\n } catch (error) {\n logger('Error validating property structure:', error)\n return {\n isValid: false,\n errors: [{\n field: 'property',\n message: error instanceof Error ? error.message : 'Unknown validation error',\n code: 'validation_exception',\n severity: 'error' as const,\n }],\n }\n }\n }\n\n /**\n * Validate a property value against its validation rules\n */\n validatePropertyValue(\n value: any,\n dataType: ModelPropertyDataTypes,\n validationRules?: ValidationRules\n ): ValidationResult {\n const errors: ValidationError[] = []\n const warnings: ValidationError[] = []\n\n try {\n // Array values are only allowed for List properties\n if (dataType !== ModelPropertyDataTypes.List && Array.isArray(value)) {\n errors.push({\n field: 'value',\n message: 'Array values are only allowed for List properties. Use dataType \"List\" with refValueType to store multiple values.',\n code: 'array_not_allowed',\n severity: 'error' as const,\n })\n }\n\n // Build base TypeBox schema from dataType\n let schema: TSchema = this.getBaseSchemaForDataType(dataType)\n\n // Apply validation rules\n if (validationRules) {\n schema = this.applyValidationRules(schema, dataType, validationRules)\n }\n\n // Validate using TypeBox\n const isValid = Value.Check(schema, value)\n \n if (!isValid) {\n const typeBoxErrors = [...Value.Errors(schema, value)]\n errors.push(...typeBoxErrors.map(err => {\n const fieldPath = err.path || 'value'\n const enhancedMessage = this.enhanceErrorMessage(err, schema, fieldPath)\n \n return {\n field: fieldPath,\n message: enhancedMessage,\n code: String(err.type || 'value_validation_error'),\n severity: 'error' as const,\n }\n }))\n }\n\n // Additional custom validations\n if (validationRules) {\n const customErrors = this.validateCustomRules(value, validationRules)\n errors.push(...customErrors)\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n }\n } catch (error) {\n logger('Error validating property value:', error)\n return {\n isValid: false,\n errors: [{\n field: 'value',\n message: error instanceof Error ? error.message : 'Unknown validation error',\n code: 'validation_exception',\n severity: 'error' as const,\n }],\n }\n }\n }\n\n /**\n * Validate a specific property within a schema\n */\n validateProperty(\n schema: SchemaMachineContext,\n modelName: string,\n propertyName: string,\n propertyData?: ModelPropertyMachineContext\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Check if model exists\n if (!schema.models || !schema.models[modelName]) {\n errors.push({\n field: 'model',\n message: `Model \"${modelName}\" not found in schema`,\n code: 'model_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n const model = schema.models[modelName]\n\n // Check if property exists in model\n // If the property name has changed (renamed), check if the original name exists\n let propertyDefinition = model.properties?.[propertyName]\n let actualPropertyName = propertyName\n \n if (!propertyDefinition && propertyData?._originalValues?.name) {\n const originalName = propertyData._originalValues.name\n // If the current name differs from the original, check if original exists\n if (originalName !== propertyName && model.properties?.[originalName]) {\n propertyDefinition = model.properties[originalName]\n actualPropertyName = originalName\n // Property is being renamed, which is allowed - continue validation\n }\n }\n \n if (!propertyDefinition) {\n errors.push({\n field: 'property',\n message: `Property \"${propertyName}\" not found in model \"${modelName}\"`,\n code: 'property_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n // If propertyData is provided, validate its structure\n if (propertyData) {\n const structureResult = this.validatePropertyStructure(propertyData)\n errors.push(...structureResult.errors)\n }\n\n // Validate property definition structure\n if (!propertyDefinition.type) {\n errors.push({\n field: 'property.type',\n message: 'Property type is required',\n code: 'missing_type',\n severity: 'error' as const,\n })\n }\n\n // Validate Relation: requires model\n if (propertyDefinition.type === 'Relation') {\n if (!propertyDefinition.model || propertyDefinition.model.trim() === '') {\n errors.push({\n field: 'property.model',\n message: `Property with type \"Relation\" requires a \"model\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n } else if (!schema.models[propertyDefinition.model]) {\n errors.push({\n field: 'property.model',\n message: `Referenced model \"${propertyDefinition.model}\" not found in schema`,\n code: 'invalid_reference',\n severity: 'error' as const,\n })\n }\n }\n\n // Validate List: requires items with type; model required only when items.type === 'Relation'\n if (propertyDefinition.type === 'List') {\n const items = (propertyDefinition as any).items\n if (!items || !items.type) {\n errors.push({\n field: 'property.items',\n message: 'List properties require \"items\" with \"type\" (e.g. items: { type: \"Text\" } or items: { type: \"Relation\", model: \"Tag\" })',\n code: 'missing_items',\n severity: 'error' as const,\n })\n } else if (items.type === 'Relation' || items.type === 'RelationProperty') {\n const model = items.model || propertyDefinition.model\n if (!model || String(model).trim() === '') {\n errors.push({\n field: 'property.items.model',\n message: 'List of relations requires \"items.model\" to specify the related model',\n code: 'missing_ref',\n severity: 'error' as const,\n })\n } else if (schema.models && !schema.models[model]) {\n errors.push({\n field: 'property.items.model',\n message: `Referenced model \"${model}\" not found in schema`,\n code: 'invalid_reference',\n severity: 'error' as const,\n })\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate model structure (basic structure checks)\n */\n validateModelStructure(\n model: ModelMachineContext & { properties?: { [key: string]: any } }\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Validate model name\n if (!model.modelName || model.modelName.trim() === '') {\n errors.push({\n field: 'modelName',\n message: 'Model name is required',\n code: 'missing_model_name',\n severity: 'error' as const,\n })\n }\n\n // Validate schema name\n if (!model.schemaName || model.schemaName.trim() === '') {\n errors.push({\n field: 'schemaName',\n message: 'Schema name is required',\n code: 'missing_schema_name',\n severity: 'error' as const,\n })\n }\n\n // Validate properties is an object\n if (model.properties && typeof model.properties !== 'object') {\n errors.push({\n field: 'properties',\n message: 'Properties must be an object',\n code: 'invalid_properties',\n severity: 'error' as const,\n })\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate a model against a schema WITHOUT requiring it to be in the schema's context\n * This allows validation before registration, preventing update loops\n */\n validateModelAgainstSchema(\n schema: SchemaMachineContext,\n modelName: string,\n modelData: ModelMachineContext & { properties?: { [key: string]: any } }\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Create a temporary schema context that includes this model for validation purposes\n // This allows validateProperty to work without actually adding the model to the real schema\n const tempSchemaContext: SchemaMachineContext = {\n ...schema,\n models: {\n ...schema.models,\n [modelName]: {\n properties: modelData.properties || {},\n },\n },\n }\n\n // Use validateModel which now works because the model is in the temp context\n return this.validateModel(tempSchemaContext, modelName, modelData)\n }\n\n /**\n * Validate a model within a schema (requires model to already be in schema context)\n */\n validateModel(\n schema: SchemaMachineContext,\n modelName: string,\n modelData?: ModelMachineContext\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n if (!schema.models || !schema.models[modelName]) {\n errors.push({\n field: 'model',\n message: `Model \"${modelName}\" not found in schema`,\n code: 'model_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n const model = schema.models[modelName]\n\n // Validate all properties in the model\n if (model.properties) {\n for (const [propertyName, propertyDef] of Object.entries(model.properties)) {\n const propertyResult = this.validateProperty(schema, modelName, propertyName)\n if (!propertyResult.isValid) {\n errors.push(...propertyResult.errors.map(err => ({\n ...err,\n field: `${modelName}.${propertyName}.${err.field}`,\n })))\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate entire schema\n */\n validateSchema(schema: SchemaMachineContext): ValidationResult {\n const errors: ValidationError[] = []\n\n // Validate schema name\n if (!schema.schemaName || schema.schemaName.trim() === '') {\n errors.push({\n field: 'schemaName',\n message: 'Schema name is required',\n code: 'missing_schema_name',\n severity: 'error' as const,\n })\n }\n\n // Validate metadata\n if (!schema.metadata) {\n errors.push({\n field: 'metadata',\n message: 'Schema metadata is required',\n code: 'missing_metadata',\n severity: 'error' as const,\n })\n } else {\n if (!schema.metadata.name || schema.metadata.name.trim() === '') {\n errors.push({\n field: 'metadata.name',\n message: 'Schema metadata name is required',\n code: 'missing_metadata_name',\n severity: 'error' as const,\n })\n }\n }\n\n // Validate models if they exist\n if (schema.models && Object.keys(schema.models).length > 0) {\n // Validate each model\n for (const modelName of Object.keys(schema.models)) {\n const modelResult = this.validateModel(schema, modelName)\n if (!modelResult.isValid) {\n errors.push(...modelResult.errors)\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Get base TypeBox schema for a data type\n */\n private getBaseSchemaForDataType(dataType: ModelPropertyDataTypes): TSchema {\n switch (dataType) {\n case ModelPropertyDataTypes.Text:\n case ModelPropertyDataTypes.Html:\n return Type.String()\n case ModelPropertyDataTypes.Number:\n return Type.Number()\n case ModelPropertyDataTypes.Boolean:\n return Type.Boolean()\n case ModelPropertyDataTypes.Date:\n return Type.String({ format: 'date-time' })\n case ModelPropertyDataTypes.Json:\n return Type.Any()\n case ModelPropertyDataTypes.List:\n return Type.Array(Type.Any())\n case ModelPropertyDataTypes.Relation:\n case ModelPropertyDataTypes.Image:\n case ModelPropertyDataTypes.File:\n return Type.Union([Type.String(), Type.Null()])\n default:\n return Type.Any()\n }\n }\n\n /**\n * Apply validation rules to a TypeBox schema\n */\n private applyValidationRules(\n schema: TSchema,\n dataType: ModelPropertyDataTypes,\n rules: ValidationRules\n ): TSchema {\n let result = schema\n\n // Apply pattern (regex) for strings\n if (rules.pattern && (dataType === ModelPropertyDataTypes.Text || dataType === ModelPropertyDataTypes.Html)) {\n try {\n const regex = new RegExp(rules.pattern)\n result = Type.RegExp(regex)\n } catch (error) {\n logger('Invalid regex pattern:', rules.pattern, error)\n }\n }\n\n // Apply minLength/maxLength for strings\n if (dataType === ModelPropertyDataTypes.Text || dataType === ModelPropertyDataTypes.Html) {\n const stringSchema = Type.String()\n if (rules.minLength !== undefined) {\n result = Type.String({ minLength: rules.minLength })\n }\n if (rules.maxLength !== undefined) {\n if (rules.minLength !== undefined) {\n result = Type.String({ minLength: rules.minLength, maxLength: rules.maxLength })\n } else {\n result = Type.String({ maxLength: rules.maxLength })\n }\n }\n }\n\n // Apply enum\n if (rules.enum && Array.isArray(rules.enum) && rules.enum.length > 0) {\n result = Type.Union(rules.enum.map(val => Type.Literal(val)))\n }\n\n return result\n }\n\n /**\n * Validate custom validation rules\n */\n private validateCustomRules(\n value: any,\n rules: ValidationRules\n ): ValidationError[] {\n const errors: ValidationError[] = []\n\n // Custom validator reference (would need to be implemented based on your needs)\n if (rules.custom) {\n // TODO: Implement custom validator lookup and execution\n logger('Custom validator not yet implemented:', rules.custom)\n }\n\n return errors\n }\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA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ent":["import { Value } from '@sinclair/typebox/value'\nimport { TProperty } from '@/Schema'\nimport { ModelPropertyDataTypes, TPropertyDataType } from '@/helpers/property'\nimport { ValidationResult, ValidationError, ValidationRules } from '@/Schema/validation'\nimport { SchemaMachineContext } from '../schemaMachine'\nimport { ModelPropertyMachineContext } from '@/ModelProperty/service/modelPropertyMachine'\nimport { ModelMachineContext } from '@/Model/service/modelMachine'\nimport { Type, TSchema, TUnion, TLiteral } from '@sinclair/typebox'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:schema:validation')\n\n/**\n * Service for validating schemas, models, and properties using TypeBox\n */\nexport class SchemaValidationService {\n /**\n * Enhance TypeBox error message with expected values for union/literal types\n */\n private enhanceErrorMessage(\n error: any,\n schema: TSchema,\n fieldPath: string\n ): string {\n const originalMessage = error.message || 'Validation failed'\n \n // Handle Union type errors (like TPropertyDataType)\n if (error.type === 'Union' || originalMessage.includes('union')) {\n const expectedValues = this.extractExpectedValues(schema, fieldPath)\n if (expectedValues.length > 0) {\n return `Expected one of: ${expectedValues.join(', ')}. Received: ${JSON.stringify(error.value)}`\n }\n }\n \n // Handle Literal type errors\n if (error.type === 'Literal') {\n const expectedValue = this.extractLiteralValue(schema, fieldPath)\n if (expectedValue !== undefined) {\n return `Expected: ${JSON.stringify(expectedValue)}. Received: ${JSON.stringify(error.value)}`\n }\n }\n \n // Return enhanced message with value info if available\n if (error.value !== undefined) {\n return `${originalMessage}. Received: ${JSON.stringify(error.value)}`\n }\n \n return originalMessage\n }\n\n /**\n * Extract expected values from a schema for a given field path\n */\n private extractExpectedValues(schema: TSchema | null, fieldPath: string): string[] {\n try {\n // Handle TProperty schema - check if this is the dataType field\n if (fieldPath === '/dataType' || fieldPath.endsWith('/dataType')) {\n // Return all ModelPropertyDataTypes enum values\n return Object.values(ModelPropertyDataTypes) as string[]\n }\n \n // Handle TStorageType\n if (fieldPath === '/storageType' || fieldPath.endsWith('/storageType')) {\n return ['ItemStorage', 'PropertyStorage']\n }\n \n // If we have a schema, try to extract from it\n if (!schema) {\n return []\n }\n \n // Try to extract from TypeBox Union type using the schema directly\n const schemaObj = schema as any\n const kind = schemaObj[Symbol.for('TypeBox.Kind')]\n \n if (kind === 'Union') {\n const union = schemaObj as TUnion<any>\n const anyOf = union.anyOf || []\n const values: string[] = []\n \n for (const item of anyOf) {\n const itemKind = item?.[Symbol.for('TypeBox.Kind')]\n if (itemKind === 'Literal') {\n const literal = item as TLiteral<any>\n if (literal.const !== undefined) {\n values.push(String(literal.const))\n }\n }\n }\n \n if (values.length > 0) {\n return values\n }\n }\n \n // Fallback: try to extract from JSON schema format\n if (typeof schema === 'object' && 'anyOf' in schema) {\n const union = schema as any\n if (Array.isArray(union.anyOf)) {\n return union.anyOf\n .map((item: any) => {\n if (item.const !== undefined) return String(item.const)\n if (item.enum && Array.isArray(item.enum)) return item.enum.map(String)\n return null\n })\n .filter((val: any) => val !== null)\n .flat()\n .map(String)\n }\n }\n } catch (error) {\n logger('Error extracting expected values:', error)\n }\n \n return []\n }\n\n /**\n * Extract literal value from a schema\n */\n private extractLiteralValue(schema: TSchema, fieldPath: string): any {\n try {\n if (schema && typeof schema === 'object') {\n const schemaObj = schema as any\n if (schemaObj[Symbol.for('TypeBox.Kind')] === 'Literal') {\n return (schemaObj as TLiteral<any>).const\n }\n if (schemaObj.const !== undefined) {\n return schemaObj.const\n }\n }\n } catch (error) {\n logger('Error extracting literal value:', error)\n }\n \n return undefined\n }\n\n /**\n * Get the schema for a specific field path\n */\n private getSchemaForField(schema: TSchema, fieldPath: string): TSchema | null {\n try {\n if (!schema || typeof schema !== 'object') return null\n \n // Remove leading slash\n const path = fieldPath.replace(/^\\//, '')\n if (!path) return schema\n \n const schemaObj = schema as any\n const kind = schemaObj[Symbol.for('TypeBox.Kind')]\n \n // For TProperty (Object type), check properties\n if (kind === 'Object') {\n const properties = schemaObj.properties\n if (properties && properties[path]) {\n return properties[path]\n }\n }\n \n // Special handling for known fields - return the actual schema\n if (path === 'dataType') {\n return TPropertyDataType as TSchema\n }\n \n // Fallback: check if schema has the property\n if (path in schemaObj) {\n return schemaObj[path]\n }\n } catch (error) {\n logger('Error getting schema for field:', error)\n }\n \n return null\n }\n\n /**\n * Validate a property structure against TProperty schema\n */\n validatePropertyStructure(\n property: ModelPropertyMachineContext\n ): ValidationResult {\n try {\n const isValid = Value.Check(TProperty, property)\n \n const errors: ValidationError[] = []\n \n if (!isValid) {\n const typeBoxErrors = [...Value.Errors(TProperty, property)]\n errors.push(...typeBoxErrors.map(err => {\n const fieldPath = err.path || 'unknown'\n const fieldSchema = this.getSchemaForField(TProperty, fieldPath)\n const enhancedMessage = this.enhanceErrorMessage(err, fieldSchema || TProperty, fieldPath)\n \n return {\n field: fieldPath,\n message: enhancedMessage,\n code: String(err.type || 'validation_error'),\n severity: 'error' as const,\n }\n }))\n }\n \n // Non-List types: refValueType is only valid for Relation+Image (related entity type). Reject otherwise.\n const nonListTypes = [\n ModelPropertyDataTypes.Text,\n ModelPropertyDataTypes.Number,\n ModelPropertyDataTypes.Boolean,\n ModelPropertyDataTypes.Date,\n ModelPropertyDataTypes.Json,\n ModelPropertyDataTypes.Image,\n ModelPropertyDataTypes.File,\n ModelPropertyDataTypes.Html,\n ModelPropertyDataTypes.Relation,\n ]\n if (nonListTypes.includes(property.dataType as ModelPropertyDataTypes)) {\n const hasRefValueType = property.refValueType != null && String(property.refValueType).trim() !== ''\n if (hasRefValueType) {\n // Relation may keep refValueType only for Image (relation to Image entity)\n if (property.dataType === ModelPropertyDataTypes.Relation && property.refValueType === ModelPropertyDataTypes.Image) {\n // Allowed: Relation to Image\n } else {\n errors.push({\n field: 'refValueType',\n message: `refValueType is only valid for List properties. Use dataType 'List' with refValueType '${property.refValueType}' for lists of ${property.refValueType}.`,\n code: 'invalid_ref_value_type',\n severity: 'error' as const,\n })\n }\n }\n }\n\n // List: refValueType is required\n if (property.dataType === ModelPropertyDataTypes.List) {\n const hasRefValueType = property.refValueType != null && String(property.refValueType).trim() !== ''\n if (!hasRefValueType) {\n errors.push({\n field: 'refValueType',\n message: `List properties require refValueType (e.g. 'Text', 'Number', 'Relation') to specify the element type.`,\n code: 'missing_ref_value_type',\n severity: 'error' as const,\n })\n }\n // List of relations: ref is required\n if (hasRefValueType && property.refValueType === ModelPropertyDataTypes.Relation) {\n const hasRef = property.ref && property.ref.trim() !== ''\n const hasRefModelName = property.refModelName && property.refModelName.trim() !== ''\n const hasRefModelId = property.refModelId !== undefined && property.refModelId !== null\n if (!hasRef && !hasRefModelName && !hasRefModelId) {\n errors.push({\n field: 'ref',\n message: `List properties with refValueType 'Relation' require either a \"ref\", \"refModelName\", or \"refModelId\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n }\n }\n }\n\n // Relation (single): ref is required\n if (property.dataType === ModelPropertyDataTypes.Relation) {\n const hasRef = property.ref && property.ref.trim() !== ''\n const hasRefModelName = property.refModelName && property.refModelName.trim() !== ''\n const hasRefModelId = property.refModelId !== undefined && property.refModelId !== null\n if (!hasRef && !hasRefModelName && !hasRefModelId) {\n errors.push({\n field: 'ref',\n message: `Property with dataType \"Relation\" requires either a \"ref\", \"refModelName\", or \"refModelId\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n }\n if ((hasRef || hasRefModelName) && !hasRefModelId) {\n logger(`Property \"${property.name}\" has ref/refModelName but no refModelId - will be resolved asynchronously`)\n }\n }\n \n return {\n isValid: errors.length === 0,\n errors,\n }\n } catch (error) {\n logger('Error validating property structure:', error)\n return {\n isValid: false,\n errors: [{\n field: 'property',\n message: error instanceof Error ? error.message : 'Unknown validation error',\n code: 'validation_exception',\n severity: 'error' as const,\n }],\n }\n }\n }\n\n /**\n * Validate a property value against its validation rules\n */\n validatePropertyValue(\n value: any,\n dataType: ModelPropertyDataTypes,\n validationRules?: ValidationRules\n ): ValidationResult {\n const errors: ValidationError[] = []\n const warnings: ValidationError[] = []\n\n try {\n // Array values are only allowed for List properties\n if (dataType !== ModelPropertyDataTypes.List && Array.isArray(value)) {\n errors.push({\n field: 'value',\n message: 'Array values are only allowed for List properties. Use dataType \"List\" with refValueType to store multiple values.',\n code: 'array_not_allowed',\n severity: 'error' as const,\n })\n }\n\n // Build base TypeBox schema from dataType\n let schema: TSchema = this.getBaseSchemaForDataType(dataType)\n\n // Apply validation rules\n if (validationRules) {\n schema = this.applyValidationRules(schema, dataType, validationRules)\n }\n\n // Validate using TypeBox\n const isValid = Value.Check(schema, value)\n \n if (!isValid) {\n const typeBoxErrors = [...Value.Errors(schema, value)]\n errors.push(...typeBoxErrors.map(err => {\n const fieldPath = err.path || 'value'\n const enhancedMessage = this.enhanceErrorMessage(err, schema, fieldPath)\n \n return {\n field: fieldPath,\n message: enhancedMessage,\n code: String(err.type || 'value_validation_error'),\n severity: 'error' as const,\n }\n }))\n }\n\n // Additional custom validations\n if (validationRules) {\n const customErrors = this.validateCustomRules(value, validationRules)\n errors.push(...customErrors)\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n }\n } catch (error) {\n logger('Error validating property value:', error)\n return {\n isValid: false,\n errors: [{\n field: 'value',\n message: error instanceof Error ? error.message : 'Unknown validation error',\n code: 'validation_exception',\n severity: 'error' as const,\n }],\n }\n }\n }\n\n /**\n * Validate a specific property within a schema\n */\n validateProperty(\n schema: SchemaMachineContext,\n modelName: string,\n propertyName: string,\n propertyData?: ModelPropertyMachineContext\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Check if model exists\n if (!schema.models || !schema.models[modelName]) {\n errors.push({\n field: 'model',\n message: `Model \"${modelName}\" not found in schema`,\n code: 'model_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n const model = schema.models[modelName]\n\n // Check if property exists in model\n // If the property name has changed (renamed), check if the original name exists\n let propertyDefinition = model.properties?.[propertyName]\n let actualPropertyName = propertyName\n \n if (!propertyDefinition && propertyData?._originalValues?.name) {\n const originalName = propertyData._originalValues.name\n // If the current name differs from the original, check if original exists\n if (originalName !== propertyName && model.properties?.[originalName]) {\n propertyDefinition = model.properties[originalName]\n actualPropertyName = originalName\n // Property is being renamed, which is allowed - continue validation\n }\n }\n \n if (!propertyDefinition) {\n errors.push({\n field: 'property',\n message: `Property \"${propertyName}\" not found in model \"${modelName}\"`,\n code: 'property_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n // If propertyData is provided, validate its structure\n if (propertyData) {\n const structureResult = this.validatePropertyStructure(propertyData)\n errors.push(...structureResult.errors)\n }\n\n // Validate property definition structure\n if (!propertyDefinition.type) {\n errors.push({\n field: 'property.type',\n message: 'Property type is required',\n code: 'missing_type',\n severity: 'error' as const,\n })\n }\n\n // Validate Relation: requires model\n if (propertyDefinition.type === 'Relation') {\n if (!propertyDefinition.model || propertyDefinition.model.trim() === '') {\n errors.push({\n field: 'property.model',\n message: `Property with type \"Relation\" requires a \"model\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n } else if (!schema.models[propertyDefinition.model]) {\n errors.push({\n field: 'property.model',\n message: `Referenced model \"${propertyDefinition.model}\" not found in schema`,\n code: 'invalid_reference',\n severity: 'error' as const,\n })\n }\n }\n\n // Validate List: requires items with type; model required only when items.type === 'Relation'\n if (propertyDefinition.type === 'List') {\n const items = (propertyDefinition as any).items\n if (!items || !items.type) {\n errors.push({\n field: 'property.items',\n message: 'List properties require \"items\" with \"type\" (e.g. items: { type: \"Text\" } or items: { type: \"Relation\", model: \"Tag\" })',\n code: 'missing_items',\n severity: 'error' as const,\n })\n } else if (items.type === 'Relation' || items.type === 'RelationProperty') {\n const model = items.model || propertyDefinition.model\n if (!model || String(model).trim() === '') {\n errors.push({\n field: 'property.items.model',\n message: 'List of relations requires \"items.model\" to specify the related model',\n code: 'missing_ref',\n severity: 'error' as const,\n })\n } else if (schema.models && !schema.models[model]) {\n errors.push({\n field: 'property.items.model',\n message: `Referenced model \"${model}\" not found in schema`,\n code: 'invalid_reference',\n severity: 'error' as const,\n })\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate model structure (basic structure checks)\n */\n validateModelStructure(\n model: ModelMachineContext & { properties?: { [key: string]: any } }\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Validate model name\n if (!model.modelName || model.modelName.trim() === '') {\n errors.push({\n field: 'modelName',\n message: 'Model name is required',\n code: 'missing_model_name',\n severity: 'error' as const,\n })\n }\n\n // Validate schema name\n if (!model.schemaName || model.schemaName.trim() === '') {\n errors.push({\n field: 'schemaName',\n message: 'Schema name is required',\n code: 'missing_schema_name',\n severity: 'error' as const,\n })\n }\n\n // Validate properties is an object\n if (model.properties && typeof model.properties !== 'object') {\n errors.push({\n field: 'properties',\n message: 'Properties must be an object',\n code: 'invalid_properties',\n severity: 'error' as const,\n })\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate a model against a schema WITHOUT requiring it to be in the schema's context\n * This allows validation before registration, preventing update loops\n */\n validateModelAgainstSchema(\n schema: SchemaMachineContext,\n modelName: string,\n modelData: ModelMachineContext & { properties?: { [key: string]: any } }\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Create a temporary schema context that includes this model for validation purposes\n // This allows validateProperty to work without actually adding the model to the real schema\n const tempSchemaContext: SchemaMachineContext = {\n ...schema,\n models: {\n ...schema.models,\n [modelName]: {\n properties: modelData.properties || {},\n },\n },\n }\n\n // Use validateModel which now works because the model is in the temp context\n return this.validateModel(tempSchemaContext, modelName, modelData)\n }\n\n /**\n * Validate a model within a schema (requires model to already be in schema context)\n */\n validateModel(\n schema: SchemaMachineContext,\n modelName: string,\n modelData?: ModelMachineContext\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n if (!schema.models || !schema.models[modelName]) {\n errors.push({\n field: 'model',\n message: `Model \"${modelName}\" not found in schema`,\n code: 'model_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n const model = schema.models[modelName]\n\n // Validate all properties in the model\n if (model.properties) {\n for (const [propertyName, propertyDef] of Object.entries(model.properties)) {\n const propertyResult = this.validateProperty(schema, modelName, propertyName)\n if (!propertyResult.isValid) {\n errors.push(...propertyResult.errors.map(err => ({\n ...err,\n field: `${modelName}.${propertyName}.${err.field}`,\n })))\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate entire schema\n */\n validateSchema(schema: SchemaMachineContext): ValidationResult {\n const errors: ValidationError[] = []\n\n // Validate schema name\n if (!schema.schemaName || schema.schemaName.trim() === '') {\n errors.push({\n field: 'schemaName',\n message: 'Schema name is required',\n code: 'missing_schema_name',\n severity: 'error' as const,\n })\n }\n\n // Validate metadata\n if (!schema.metadata) {\n errors.push({\n field: 'metadata',\n message: 'Schema metadata is required',\n code: 'missing_metadata',\n severity: 'error' as const,\n })\n } else {\n if (!schema.metadata.name || schema.metadata.name.trim() === '') {\n errors.push({\n field: 'metadata.name',\n message: 'Schema metadata name is required',\n code: 'missing_metadata_name',\n severity: 'error' as const,\n })\n }\n }\n\n // Validate models if they exist\n if (schema.models && Object.keys(schema.models).length > 0) {\n // Validate each model\n for (const modelName of Object.keys(schema.models)) {\n const modelResult = this.validateModel(schema, modelName)\n if (!modelResult.isValid) {\n errors.push(...modelResult.errors)\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Get base TypeBox schema for a data type\n */\n private getBaseSchemaForDataType(dataType: ModelPropertyDataTypes): TSchema {\n switch (dataType) {\n case ModelPropertyDataTypes.Text:\n case ModelPropertyDataTypes.Html:\n return Type.String()\n case ModelPropertyDataTypes.Number:\n return Type.Number()\n case ModelPropertyDataTypes.Boolean:\n return Type.Boolean()\n case ModelPropertyDataTypes.Date:\n return Type.String({ format: 'date-time' })\n case ModelPropertyDataTypes.Json:\n return Type.Any()\n case ModelPropertyDataTypes.List:\n return Type.Array(Type.Any())\n case ModelPropertyDataTypes.Relation:\n case ModelPropertyDataTypes.Image:\n case ModelPropertyDataTypes.File:\n return Type.Union([Type.String(), Type.Null()])\n default:\n return Type.Any()\n }\n }\n\n /**\n * Apply validation rules to a TypeBox schema\n */\n private applyValidationRules(\n schema: TSchema,\n dataType: ModelPropertyDataTypes,\n rules: ValidationRules\n ): TSchema {\n let result = schema\n\n // Apply pattern (regex) for strings\n if (rules.pattern && (dataType === ModelPropertyDataTypes.Text || dataType === ModelPropertyDataTypes.Html)) {\n try {\n const regex = new RegExp(rules.pattern)\n result = Type.RegExp(regex)\n } catch (error) {\n logger('Invalid regex pattern:', rules.pattern, error)\n }\n }\n\n // Apply minLength/maxLength for strings\n if (dataType === ModelPropertyDataTypes.Text || dataType === ModelPropertyDataTypes.Html) {\n const stringSchema = Type.String()\n if (rules.minLength !== undefined) {\n result = Type.String({ minLength: rules.minLength })\n }\n if (rules.maxLength !== undefined) {\n if (rules.minLength !== undefined) {\n result = Type.String({ minLength: rules.minLength, maxLength: rules.maxLength })\n } else {\n result = Type.String({ maxLength: rules.maxLength })\n }\n }\n }\n\n // Apply enum\n if (rules.enum && Array.isArray(rules.enum) && rules.enum.length > 0) {\n result = Type.Union(rules.enum.map(val => Type.Literal(val)))\n }\n\n return result\n }\n\n /**\n * Validate custom validation rules\n */\n private validateCustomRules(\n value: any,\n rules: ValidationRules\n ): ValidationError[] {\n const errors: ValidationError[] = []\n\n // Custom validator reference (would need to be implemented based on your needs)\n if (rules.custom) {\n // TODO: Implement custom validator lookup and execution\n logger('Custom validator not yet implemented:', rules.custom)\n }\n\n return errors\n }\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUA,MAAM,MAAM,GAAG,KAAK,CAAC,2BAA2B,CAAC;AAEjD;;AAEG;MACU,uBAAuB,CAAA;AAClC;;AAEG;AACK,IAAA,mBAAmB,CACzB,KAAU,EACV,MAAe,EACf,SAAiB,EAAA;AAEjB,QAAA,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,IAAI,mBAAmB;;AAG5D,QAAA,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,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gBAAA,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE;AACjC,oBAAA,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;gBAClF;qBAAO;AACL,oBAAA,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;gBACtD;YACF;QACF;;QAGA,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACpE,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/D;AAEA,QAAA,OAAO,MAAM;IACf;AAEA;;AAEG;IACK,mBAAmB,CACzB,KAAU,EACV,KAAsB,EAAA;QAEtB,MAAM,MAAM,GAAsB,EAAE;;AAGpC,QAAA,IAAI,KAAK,CAAC,MAAM,EAAE;;AAEhB,YAAA,MAAM,CAAC,uCAAuC,EAAE,KAAK,CAAC,MAAM,CAAC;QAC/D;AAEA,QAAA,OAAO,MAAM;IACf;AACD;;;;"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var xstate = require('xstate');
|
|
4
4
|
require('reflect-metadata');
|
|
5
|
-
var main_cjs = require('./index-
|
|
5
|
+
var main_cjs = require('./index-CUd7xS2i.js');
|
|
6
6
|
require('pluralize');
|
|
7
7
|
var drizzleOrm = require('drizzle-orm');
|
|
8
8
|
var debug = require('debug');
|
|
9
|
-
var Schema = require('./Schema-
|
|
9
|
+
var Schema = require('./Schema-B0D7LgYb.js');
|
|
10
10
|
require('immer');
|
|
11
11
|
require('drizzle-orm/sqlite-core');
|
|
12
12
|
require('nanoid');
|
|
@@ -31,7 +31,7 @@ require('rimraf');
|
|
|
31
31
|
require('child_process');
|
|
32
32
|
require('url');
|
|
33
33
|
require('graphql-request');
|
|
34
|
-
require('./SchemaValidationService-
|
|
34
|
+
require('./SchemaValidationService-DUIOUvC_.js');
|
|
35
35
|
require('@sinclair/typebox/value');
|
|
36
36
|
|
|
37
37
|
const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
@@ -42,12 +42,12 @@ const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
|
42
42
|
*/
|
|
43
43
|
async function getSchemaNameFromModel(modelName) {
|
|
44
44
|
// Get the latest schema files and find which one contains this model
|
|
45
|
-
const schemaHelpersMod = await Promise.resolve().then(function () { return require('./index-
|
|
45
|
+
const schemaHelpersMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.schema$1; });
|
|
46
46
|
const { listLatestSchemaFiles } = schemaHelpersMod;
|
|
47
47
|
const latestSchemas = await listLatestSchemaFiles();
|
|
48
48
|
for (const schema of latestSchemas) {
|
|
49
49
|
try {
|
|
50
|
-
const fileManagerMod = await Promise.resolve().then(function () { return require('./index-
|
|
50
|
+
const fileManagerMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.BaseFileManager$1; });
|
|
51
51
|
const { BaseFileManager } = fileManagerMod;
|
|
52
52
|
const content = await BaseFileManager.readFileAsString(schema.filePath);
|
|
53
53
|
const schemaFile = JSON.parse(content);
|
|
@@ -65,7 +65,7 @@ async function getSchemaNameFromModel(modelName) {
|
|
|
65
65
|
const saveToSchema = xstate.fromCallback(({ sendBack, input: { context } }) => {
|
|
66
66
|
const _saveToSchema = async () => {
|
|
67
67
|
// Use dynamic import to break circular dependency
|
|
68
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
68
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-DUIOUvC_.js'); });
|
|
69
69
|
const { SchemaValidationService } = validationServiceMod;
|
|
70
70
|
const validationService = new SchemaValidationService();
|
|
71
71
|
// Validate property structure before saving
|
|
@@ -84,13 +84,13 @@ const saveToSchema = xstate.fromCallback(({ sendBack, input: { context } }) => {
|
|
|
84
84
|
throw new Error(`Model not found for modelId: ${context.modelId}`);
|
|
85
85
|
}
|
|
86
86
|
// Persist to database only - schema file is updated only when user calls Schema.saveNewVersion()
|
|
87
|
-
const dbMod = await Promise.resolve().then(function () { return require('./index-
|
|
87
|
+
const dbMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.db; });
|
|
88
88
|
const { savePropertyToDb } = dbMod;
|
|
89
89
|
await savePropertyToDb(context);
|
|
90
90
|
// Mark schema as draft so user knows to save
|
|
91
91
|
const schemaName = context._schemaName ?? (await getSchemaNameFromModel(context.modelName));
|
|
92
92
|
if (schemaName) {
|
|
93
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
93
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
94
94
|
const { Schema } = schemaMod;
|
|
95
95
|
const schema = Schema.create(schemaName, { waitForReady: false });
|
|
96
96
|
schema.getService().send({
|
|
@@ -123,7 +123,7 @@ const compareAndMarkDraft = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
123
123
|
const schemaFileIdForResolve = fullContext._propertyFileId || (typeof fullContext.id === 'string' ? fullContext.id : undefined);
|
|
124
124
|
if (schemaFileIdForResolve && (fullContext.modelName === undefined || fullContext.dataType === undefined)) {
|
|
125
125
|
try {
|
|
126
|
-
const dbMod = await Promise.resolve().then(function () { return require('./index-
|
|
126
|
+
const dbMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.db; });
|
|
127
127
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
128
128
|
let fromDb;
|
|
129
129
|
for (let attempt = 0; attempt < 6; attempt++) {
|
|
@@ -168,7 +168,7 @@ const compareAndMarkDraft = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
168
168
|
if (fullContext.modelName && fullContext.name && schemaFileId) {
|
|
169
169
|
logger$2(`[compareAndMarkDraft] _originalValues not set, but saving to database anyway for property ${context.modelName}:${context.name} (schemaFileId: ${schemaFileId})`);
|
|
170
170
|
try {
|
|
171
|
-
const dbMod = await Promise.resolve().then(function () { return require('./index-
|
|
171
|
+
const dbMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.db; });
|
|
172
172
|
const { savePropertyToDb } = dbMod;
|
|
173
173
|
// Ensure _propertyFileId is set for savePropertyToDb to find the property
|
|
174
174
|
const contextWithFileId = {
|
|
@@ -228,7 +228,7 @@ const compareAndMarkDraft = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
228
228
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has changes, marking as edited`);
|
|
229
229
|
logger$2(`[compareAndMarkDraft] Context when saving: id=${fullContext.id}, _propertyFileId=${fullContext._propertyFileId}, name=${fullContext.name}, _originalValues.name=${fullContext._originalValues?.name}`);
|
|
230
230
|
// Use dynamic import to break circular dependency
|
|
231
|
-
const dbMod = await Promise.resolve().then(function () { return require('./index-
|
|
231
|
+
const dbMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.db; });
|
|
232
232
|
const { savePropertyToDb } = dbMod;
|
|
233
233
|
// Save to database (but not JSON file) - always save to DB when there are changes
|
|
234
234
|
try {
|
|
@@ -242,7 +242,7 @@ const compareAndMarkDraft = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
242
242
|
// Mark schema as draft if schema name is available
|
|
243
243
|
if (fullContext._schemaName) {
|
|
244
244
|
// Get the Schema instance and mark it as draft
|
|
245
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
245
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
246
246
|
const { Schema } = schemaMod;
|
|
247
247
|
const schema = Schema.create(fullContext._schemaName, {
|
|
248
248
|
waitForReady: false,
|
|
@@ -259,7 +259,7 @@ const compareAndMarkDraft = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
259
259
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has no changes`);
|
|
260
260
|
// Clear isEdited flag in database
|
|
261
261
|
try {
|
|
262
|
-
const seedSchemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
262
|
+
const seedSchemaMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.schema; });
|
|
263
263
|
const { properties: propertiesTable, models: modelsTable } = seedSchemaMod;
|
|
264
264
|
const drizzleMod = await import('drizzle-orm');
|
|
265
265
|
const { eq, and } = drizzleMod;
|
|
@@ -323,7 +323,7 @@ const validateProperty = xstate.fromCallback(({ sendBack, input: { context } })
|
|
|
323
323
|
// Brief wait so trackPendingWrite from ModelProperty.create() has time to run (it's in setTimeout(0))
|
|
324
324
|
await new Promise((r) => setTimeout(r, 60));
|
|
325
325
|
try {
|
|
326
|
-
const dbMod = await Promise.resolve().then(function () { return require('./index-
|
|
326
|
+
const dbMod = await Promise.resolve().then(function () { return require('./index-CUd7xS2i.js'); }).then(function (n) { return n.db; });
|
|
327
327
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
328
328
|
// Try pending write first (property row may not exist yet)
|
|
329
329
|
if (fullContext.modelName === undefined && schemaFileId) {
|
|
@@ -375,10 +375,10 @@ const validateProperty = xstate.fromCallback(({ sendBack, input: { context } })
|
|
|
375
375
|
fullContext = { ...fullContext, dataType: (fullContext.dataType ?? context._originalValues?.dataType) || 'Text' };
|
|
376
376
|
}
|
|
377
377
|
// Use dynamic imports to break circular dependencies
|
|
378
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
378
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-DUIOUvC_.js'); });
|
|
379
379
|
const { SchemaValidationService } = validationServiceMod;
|
|
380
380
|
const validationService = new SchemaValidationService();
|
|
381
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
381
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
382
382
|
const { Schema } = schemaMod;
|
|
383
383
|
// Validate property structure
|
|
384
384
|
const structureResult = validationService.validatePropertyStructure(fullContext);
|
|
@@ -1761,4 +1761,4 @@ var ModelProperty$1 = /*#__PURE__*/Object.freeze({
|
|
|
1761
1761
|
});
|
|
1762
1762
|
|
|
1763
1763
|
exports.ModelProperty = ModelProperty;
|
|
1764
|
-
//# sourceMappingURL=ModelProperty-
|
|
1764
|
+
//# sourceMappingURL=ModelProperty-CgQ3zR-u.js.map
|