@memberjunction/metadata-sync 2.50.0 → 2.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +423 -2
- package/dist/commands/pull/index.d.ts +1 -0
- package/dist/commands/pull/index.js +82 -10
- package/dist/commands/pull/index.js.map +1 -1
- package/dist/commands/push/index.d.ts +4 -0
- package/dist/commands/push/index.js +196 -22
- package/dist/commands/push/index.js.map +1 -1
- package/dist/commands/validate/index.d.ts +15 -0
- package/dist/commands/validate/index.js +149 -0
- package/dist/commands/validate/index.js.map +1 -0
- package/dist/lib/provider-utils.d.ts +2 -2
- package/dist/lib/provider-utils.js +3 -4
- package/dist/lib/provider-utils.js.map +1 -1
- package/dist/lib/sync-engine.js +27 -2
- package/dist/lib/sync-engine.js.map +1 -1
- package/dist/services/FormattingService.d.ts +44 -0
- package/dist/services/FormattingService.js +561 -0
- package/dist/services/FormattingService.js.map +1 -0
- package/dist/services/ValidationService.d.ts +110 -0
- package/dist/services/ValidationService.js +737 -0
- package/dist/services/ValidationService.js.map +1 -0
- package/dist/types/validation.d.ts +98 -0
- package/dist/types/validation.js +97 -0
- package/dist/types/validation.js.map +1 -0
- package/oclif.manifest.json +98 -1
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationService.js","sourceRoot":"","sources":["../../src/services/ValidationService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgD;AAChD,uCAAyB;AACzB,2CAA6B;AAkB7B,MAAa,iBAAiB;IAClB,QAAQ,CAAW;IACnB,MAAM,GAAsB,EAAE,CAAC;IAC/B,QAAQ,GAAwB,EAAE,CAAC;IACnC,kBAAkB,GAAkC,IAAI,GAAG,EAAE,CAAC;IAC9D,iBAAiB,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC3C,OAAO,CAAoB;IAEnC,YAAY,UAAsC,EAAE;QAChD,IAAI,CAAC,QAAQ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SAAS;QACb,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;YACjC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,OAAO,EAAE;gBACL,UAAU,EAAE,CAAC;gBACb,aAAa,EAAE,CAAC;gBAChB,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC/B,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM;gBACnC,WAAW,EAAE,IAAI,GAAG,EAAE;aACzB;SACJ,CAAC;IACN,CAAC;CACJ;AA51BD,8CA41BC","sourcesContent":["import { Metadata } from '@memberjunction/core';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { \n ValidationResult, \n ValidationError, \n ValidationWarning, \n ValidationOptions, \n FileValidationResult,\n EntityDependency,\n ParsedReference,\n ReferenceType\n} from '../types/validation';\nimport { RecordData } from '../lib/sync-engine';\n\n// Type aliases for clarity\ntype EntityData = RecordData;\ntype EntitySyncConfig = any;\ntype EntityFieldData = any;\n\nexport class ValidationService {\n private metadata: Metadata;\n private errors: ValidationError[] = [];\n private warnings: ValidationWarning[] = [];\n private entityDependencies: Map<string, EntityDependency> = new Map();\n private processedEntities: Set<string> = new Set();\n private options: ValidationOptions;\n\n constructor(options: Partial<ValidationOptions> = {}) {\n this.metadata = new Metadata();\n this.options = {\n verbose: false,\n outputFormat: 'human',\n maxNestingDepth: 10,\n checkBestPractices: true,\n ...options\n };\n }\n\n /**\n * Validates all metadata files in the specified directory\n */\n public async validateDirectory(dir: string): Promise<ValidationResult> {\n this.reset();\n \n const configPath = path.join(dir, '.mj-sync.json');\n if (!fs.existsSync(configPath)) {\n this.addError({\n type: 'entity',\n severity: 'error',\n file: dir,\n message: 'No .mj-sync.json configuration file found in directory'\n });\n return this.getResult();\n }\n\n const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));\n const directories = await this.getDirectoriesInOrder(dir, config);\n \n let totalFiles = 0;\n let totalEntities = 0;\n const fileResults = new Map<string, FileValidationResult>();\n\n for (const subDir of directories) {\n const subDirPath = path.join(dir, subDir);\n const result = await this.validateEntityDirectory(subDirPath);\n if (result) {\n totalFiles += result.files;\n totalEntities += result.entities;\n for (const [file, fileResult] of result.fileResults) {\n fileResults.set(file, fileResult);\n }\n }\n }\n\n // Validate dependency order\n await this.validateDependencyOrder(directories);\n\n return {\n isValid: this.errors.length === 0,\n errors: this.errors,\n warnings: this.warnings,\n summary: {\n totalFiles,\n totalEntities,\n totalErrors: this.errors.length,\n totalWarnings: this.warnings.length,\n fileResults\n }\n };\n }\n\n /**\n * Validates a single entity directory\n */\n private async validateEntityDirectory(dir: string): Promise<{ files: number, entities: number, fileResults: Map<string, FileValidationResult> } | null> {\n const configPath = path.join(dir, '.mj-sync.json');\n if (!fs.existsSync(configPath)) {\n return null;\n }\n\n const config: EntitySyncConfig = JSON.parse(fs.readFileSync(configPath, 'utf8'));\n const entityInfo = this.metadata.EntityByName(config.entity);\n \n if (!entityInfo) {\n this.addError({\n type: 'entity',\n severity: 'error',\n file: configPath,\n message: `Entity \"${config.entity}\" not found in metadata`\n });\n return null;\n }\n\n const files = await this.getMatchingFiles(dir, config.filePattern);\n let totalEntities = 0;\n const fileResults = new Map<string, FileValidationResult>();\n\n for (const file of files) {\n const filePath = path.join(dir, file);\n const result = await this.validateFile(filePath, entityInfo, config);\n totalEntities += result.entityCount;\n fileResults.set(filePath, result);\n }\n\n return { files: files.length, entities: totalEntities, fileResults };\n }\n\n /**\n * Validates a single metadata file\n */\n private async validateFile(filePath: string, entityInfo: any, config: EntitySyncConfig): Promise<FileValidationResult> {\n const fileErrors: ValidationError[] = [];\n const fileWarnings: ValidationWarning[] = [];\n let entityCount = 0;\n\n try {\n const content = fs.readFileSync(filePath, 'utf8');\n const data = JSON.parse(content);\n const entities = Array.isArray(data) ? data : [data];\n entityCount = entities.length;\n\n for (const entityData of entities) {\n await this.validateEntityData(entityData, entityInfo, filePath, config);\n }\n } catch (error) {\n fileErrors.push({\n type: 'entity',\n severity: 'error',\n file: filePath,\n message: `Failed to parse JSON: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n\n // Collect errors and warnings for this file\n const currentFileErrors = this.errors.filter(e => e.file === filePath);\n const currentFileWarnings = this.warnings.filter(w => w.file === filePath);\n\n return {\n file: filePath,\n entityCount,\n errors: currentFileErrors,\n warnings: currentFileWarnings\n };\n }\n\n /**\n * Validates a single entity data object\n */\n private async validateEntityData(\n entityData: EntityData, \n entityInfo: any, \n filePath: string, \n config: EntitySyncConfig,\n parentContext?: { entity: string, field: string },\n depth: number = 0\n ): Promise<void> {\n // Check nesting depth\n if (depth > this.options.maxNestingDepth) {\n this.addWarning({\n type: 'nesting',\n severity: 'warning',\n entity: entityInfo.Name,\n file: filePath,\n message: `Nesting depth ${depth} exceeds recommended maximum of ${this.options.maxNestingDepth}`,\n suggestion: 'Consider flattening the data structure or increasing maxNestingDepth'\n });\n }\n\n // Validate fields\n if (entityData.fields) {\n await this.validateFields(entityData.fields, entityInfo, filePath, parentContext);\n }\n\n // Track dependencies\n this.trackEntityDependencies(entityData, entityInfo.Name, filePath);\n\n // Validate related entities\n if (entityData.relatedEntities) {\n for (const [relatedEntityName, relatedData] of Object.entries(entityData.relatedEntities)) {\n const relatedEntityInfo = this.metadata.EntityByName(relatedEntityName);\n if (!relatedEntityInfo) {\n this.addError({\n type: 'entity',\n severity: 'error',\n entity: entityInfo.Name,\n file: filePath,\n message: `Related entity \"${relatedEntityName}\" not found in metadata`\n });\n continue;\n }\n\n const relatedEntities = Array.isArray(relatedData) ? relatedData : [relatedData];\n for (const relatedEntity of relatedEntities) {\n await this.validateEntityData(\n relatedEntity, \n relatedEntityInfo, \n filePath, \n config,\n { entity: entityInfo.Name, field: relatedEntityName },\n depth + 1\n );\n }\n }\n }\n }\n\n /**\n * Validates entity fields\n */\n private async validateFields(\n fields: Record<string, any>, \n entityInfo: any, \n filePath: string,\n parentContext?: { entity: string, field: string }\n ): Promise<void> {\n const entityFields = entityInfo.Fields;\n const fieldMap = new Map(entityFields.map((f: any) => [f.Name, f]));\n\n for (const [fieldName, fieldValue] of Object.entries(fields)) {\n const fieldInfo = fieldMap.get(fieldName);\n \n if (!fieldInfo) {\n // Check if this might be a virtual property (getter/setter)\n try {\n const entityInstance = await this.metadata.GetEntityObject(entityInfo.Name);\n const hasProperty = fieldName in entityInstance;\n \n if (!hasProperty) {\n this.addError({\n type: 'field',\n severity: 'error',\n entity: entityInfo.Name,\n field: fieldName,\n file: filePath,\n message: `Field \"${fieldName}\" does not exist on entity \"${entityInfo.Name}\"`\n });\n continue;\n }\n \n // It's a virtual property, validate the value\n await this.validateFieldValue(fieldValue, { Name: fieldName }, entityInfo, filePath, parentContext);\n continue;\n } catch (error) {\n // If we can't create an entity instance, fall back to error\n this.addError({\n type: 'field',\n severity: 'error',\n entity: entityInfo.Name,\n field: fieldName,\n file: filePath,\n message: `Field \"${fieldName}\" does not exist on entity \"${entityInfo.Name}\"`\n });\n continue;\n }\n }\n\n // Check if field is settable (not system field)\n if ((fieldInfo as any).IsSystemField || fieldName.startsWith('__mj_')) {\n this.addError({\n type: 'field',\n severity: 'error',\n entity: entityInfo.Name,\n field: fieldName,\n file: filePath,\n message: `Field \"${fieldName}\" is a system field and cannot be set`,\n suggestion: 'Remove this field from your metadata file'\n });\n continue;\n }\n\n // Validate field value and references\n await this.validateFieldValue(fieldValue, fieldInfo, entityInfo, filePath, parentContext);\n }\n\n // Check for required fields\n if (this.options.checkBestPractices) {\n for (const field of entityFields) {\n // Skip if field allows null or has a value already\n if (field.AllowsNull || fields[field.Name]) {\n continue;\n }\n \n // Skip if field has a default value\n if (field.DefaultValue !== null && field.DefaultValue !== undefined) {\n continue;\n }\n \n // Skip virtual/computed fields (foreign key reference fields)\n // These are typically named without 'ID' suffix but have a corresponding FK field\n const relatedEntityField = field.RelatedEntity;\n const correspondingFKField = entityFields.find((f: any) => \n f.Name === field.Name + 'ID' && f.IsForeignKey\n );\n if (relatedEntityField && correspondingFKField) {\n continue;\n }\n \n // Skip fields that are marked as AutoUpdateOnly or ReadOnly\n if ((field as any).AutoUpdateOnly || (field as any).ReadOnly) {\n continue;\n }\n \n // Skip if this is a parent context and the field can be inherited\n if (parentContext && (field.Name === parentContext.field || field.Name === parentContext.field + 'ID')) {\n continue;\n }\n \n // Special case: Skip TemplateID if TemplateText is provided (virtual property)\n if (field.Name === 'TemplateID' && fields['TemplateText']) {\n continue;\n }\n \n // Skip Template field if TemplateText is provided\n if (field.Name === 'Template' && fields['TemplateText']) {\n continue;\n }\n \n this.addWarning({\n type: 'bestpractice',\n severity: 'warning',\n entity: entityInfo.Name,\n field: field.Name,\n file: filePath,\n message: `Required field \"${field.Name}\" is missing`,\n suggestion: `Add \"${field.Name}\" to the fields object`\n });\n }\n }\n }\n\n /**\n * Validates field values and references\n */\n private async validateFieldValue(\n value: any, \n fieldInfo: any, \n entityInfo: any, \n filePath: string,\n parentContext?: { entity: string, field: string }\n ): Promise<void> {\n if (typeof value === 'string' && value.startsWith('@')) {\n await this.validateReference(value, fieldInfo, entityInfo, filePath, parentContext);\n }\n // Add type validation here if needed\n }\n\n /**\n * Validates special references (@file:, @lookup:, etc.)\n */\n private async validateReference(\n reference: string, \n fieldInfo: any, \n entityInfo: any, \n filePath: string,\n parentContext?: { entity: string, field: string }\n ): Promise<void> {\n const parsed = this.parseReference(reference);\n if (!parsed) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityInfo.Name,\n field: fieldInfo.Name,\n file: filePath,\n message: `Invalid reference format: \"${reference}\"`\n });\n return;\n }\n\n switch (parsed.type) {\n case '@file:':\n await this.validateFileReference(parsed.value, filePath, entityInfo.Name, fieldInfo.Name);\n break;\n case '@lookup:':\n await this.validateLookupReference(parsed, filePath, entityInfo.Name, fieldInfo.Name);\n break;\n case '@template:':\n await this.validateTemplateReference(parsed.value, filePath, entityInfo.Name, fieldInfo.Name);\n break;\n case '@parent:':\n this.validateParentReference(parsed.value, parentContext, filePath, entityInfo.Name, fieldInfo.Name);\n break;\n case '@root:':\n this.validateRootReference(parsed.value, parentContext, filePath, entityInfo.Name, fieldInfo.Name);\n break;\n }\n }\n\n /**\n * Parses a reference string\n */\n private parseReference(reference: string): ParsedReference | null {\n const patterns: [ReferenceType, RegExp][] = [\n ['@file:', /^@file:(.+)$/],\n ['@lookup:', /^@lookup:([^.]+)\\.([^=]+)=(.+)$/],\n ['@template:', /^@template:(.+)$/],\n ['@parent:', /^@parent:(.+)$/],\n ['@root:', /^@root:(.+)$/],\n ['@env:', /^@env:(.+)$/]\n ];\n\n for (const [type, pattern] of patterns) {\n const match = reference.match(pattern);\n if (match) {\n if (type === '@lookup:') {\n const [, entity, field, valueAndOptions] = match;\n const [value, ...options] = valueAndOptions.split('?');\n const createIfMissing = options.includes('create');\n const additionalFields: Record<string, any> = {};\n \n for (const option of options) {\n if (option.includes('&')) {\n const pairs = option.split('&');\n for (const pair of pairs) {\n const [key, val] = pair.split('=');\n if (key && val && key !== 'create') {\n additionalFields[key] = val;\n }\n }\n }\n }\n\n return { type, value, entity, field, createIfMissing, additionalFields };\n }\n return { type, value: match[1] };\n }\n }\n\n return null;\n }\n\n /**\n * Validates @file: references\n */\n private async validateFileReference(\n filePath: string, \n sourceFile: string, \n entityName: string, \n fieldName: string\n ): Promise<void> {\n const dir = path.dirname(sourceFile);\n const resolvedPath = path.resolve(dir, filePath);\n \n if (!fs.existsSync(resolvedPath)) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityName,\n field: fieldName,\n file: sourceFile,\n message: `File reference not found: \"${filePath}\"`,\n suggestion: `Create file at: ${resolvedPath}`\n });\n }\n }\n\n /**\n * Validates @lookup: references\n */\n private async validateLookupReference(\n parsed: ParsedReference, \n sourceFile: string, \n entityName: string, \n fieldName: string\n ): Promise<void> {\n const lookupEntity = this.metadata.EntityByName(parsed.entity!);\n \n if (!lookupEntity) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityName,\n field: fieldName,\n file: sourceFile,\n message: `Lookup entity \"${parsed.entity}\" not found`,\n suggestion: 'Check entity name spelling and case'\n });\n return;\n }\n\n const lookupField = lookupEntity.Fields.find((f: any) => f.Name === parsed.field);\n if (!lookupField) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityName,\n field: fieldName,\n file: sourceFile,\n message: `Lookup field \"${parsed.field}\" not found on entity \"${parsed.entity}\"`,\n suggestion: `Available fields: ${lookupEntity.Fields.map((f: any) => f.Name).join(', ')}`\n });\n }\n\n // Track dependency\n this.addEntityDependency(entityName, parsed.entity!);\n }\n\n /**\n * Validates @template: references\n */\n private async validateTemplateReference(\n templatePath: string, \n sourceFile: string, \n entityName: string, \n fieldName: string\n ): Promise<void> {\n const dir = path.dirname(sourceFile);\n const resolvedPath = path.resolve(dir, templatePath);\n \n if (!fs.existsSync(resolvedPath)) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityName,\n field: fieldName,\n file: sourceFile,\n message: `Template file not found: \"${templatePath}\"`,\n suggestion: `Create template at: ${resolvedPath}`\n });\n return;\n }\n\n // Validate template is valid JSON\n try {\n JSON.parse(fs.readFileSync(resolvedPath, 'utf8'));\n } catch (error) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityName,\n field: fieldName,\n file: sourceFile,\n message: `Template file is not valid JSON: \"${templatePath}\"`,\n details: error instanceof Error ? error.message : String(error)\n });\n }\n }\n\n /**\n * Validates @parent: references\n */\n private validateParentReference(\n fieldName: string, \n parentContext: { entity: string, field: string } | undefined,\n sourceFile: string,\n entityName: string,\n currentFieldName: string\n ): void {\n if (!parentContext) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityName,\n field: currentFieldName,\n file: sourceFile,\n message: `@parent: reference used but no parent context exists`,\n suggestion: '@parent: can only be used in nested/related entities'\n });\n }\n }\n\n /**\n * Validates @root: references\n */\n private validateRootReference(\n fieldName: string, \n parentContext: { entity: string, field: string } | undefined,\n sourceFile: string,\n entityName: string,\n currentFieldName: string\n ): void {\n if (!parentContext) {\n this.addError({\n type: 'reference',\n severity: 'error',\n entity: entityName,\n field: currentFieldName,\n file: sourceFile,\n message: `@root: reference used but no root context exists`,\n suggestion: '@root: can only be used in nested/related entities'\n });\n }\n }\n\n /**\n * Track entity dependencies\n */\n private trackEntityDependencies(entityData: EntityData, entityName: string, filePath: string): void {\n if (!this.entityDependencies.has(entityName)) {\n this.entityDependencies.set(entityName, {\n entityName,\n dependsOn: new Set(),\n file: filePath\n });\n }\n\n // Track dependencies from lookups in fields\n if (entityData.fields) {\n for (const value of Object.values(entityData.fields)) {\n if (typeof value === 'string' && value.startsWith('@lookup:')) {\n const parsed = this.parseReference(value);\n if (parsed?.entity) {\n this.addEntityDependency(entityName, parsed.entity);\n }\n }\n }\n }\n }\n\n /**\n * Add an entity dependency\n */\n private addEntityDependency(from: string, to: string): void {\n if (!this.entityDependencies.has(from)) {\n this.entityDependencies.set(from, {\n entityName: from,\n dependsOn: new Set(),\n file: ''\n });\n }\n this.entityDependencies.get(from)!.dependsOn.add(to);\n }\n\n /**\n * Validates dependency order\n */\n private async validateDependencyOrder(directoryOrder: string[]): Promise<void> {\n // Build a map of entity to directory\n const entityToDirectory = new Map<string, string>();\n \n for (const dir of directoryOrder) {\n // This is simplified - in reality we'd need to read the .mj-sync.json\n // to get the actual entity name\n entityToDirectory.set(dir, dir);\n }\n\n // Check for circular dependencies\n const visited = new Set<string>();\n const recursionStack = new Set<string>();\n \n for (const [entity, deps] of this.entityDependencies) {\n if (!visited.has(entity)) {\n this.checkCircularDependency(entity, visited, recursionStack);\n }\n }\n\n // Check if current order satisfies dependencies\n const orderViolations = this.checkDependencyOrder(directoryOrder);\n if (orderViolations.length > 0) {\n // Suggest a corrected order\n const suggestedOrder = this.topologicalSort();\n \n for (const violation of orderViolations) {\n this.addError({\n type: 'dependency',\n severity: 'error',\n entity: violation.entity,\n file: violation.file,\n message: `Entity '${violation.entity}' depends on '${violation.dependency}' but is processed before it`,\n suggestion: `Reorder directories to: [${suggestedOrder.join(', ')}]`\n });\n }\n }\n }\n\n /**\n * Check for circular dependencies\n */\n private checkCircularDependency(\n entity: string, \n visited: Set<string>, \n recursionStack: Set<string>,\n path: string[] = []\n ): boolean {\n visited.add(entity);\n recursionStack.add(entity);\n path.push(entity);\n\n const deps = this.entityDependencies.get(entity);\n if (deps) {\n for (const dep of deps.dependsOn) {\n if (!visited.has(dep)) {\n if (this.checkCircularDependency(dep, visited, recursionStack, [...path])) {\n return true;\n }\n } else if (recursionStack.has(dep)) {\n // Found circular dependency\n const cycle = [...path, dep];\n const cycleStart = cycle.indexOf(dep);\n const cyclePath = cycle.slice(cycleStart).join(' → ');\n \n this.addError({\n type: 'circular',\n severity: 'error',\n entity: entity,\n file: deps.file,\n message: `Circular dependency detected: ${cyclePath}`,\n suggestion: 'Restructure your entities to avoid circular references'\n });\n return true;\n }\n }\n }\n\n recursionStack.delete(entity);\n return false;\n }\n\n /**\n * Get directories in order based on config\n */\n private async getDirectoriesInOrder(rootDir: string, config: any): Promise<string[]> {\n const allDirs = fs.readdirSync(rootDir)\n .filter(f => fs.statSync(path.join(rootDir, f)).isDirectory())\n .filter(d => !d.startsWith('.'));\n\n if (config.directoryOrder && Array.isArray(config.directoryOrder)) {\n const ordered = config.directoryOrder.filter((d: string) => allDirs.includes(d));\n const remaining = allDirs.filter(d => !ordered.includes(d)).sort();\n return [...ordered, ...remaining];\n }\n\n return allDirs.sort();\n }\n\n /**\n * Get files matching pattern\n */\n private async getMatchingFiles(dir: string, pattern: string): Promise<string[]> {\n const files = fs.readdirSync(dir)\n .filter(f => fs.statSync(path.join(dir, f)).isFile());\n \n // Simple glob pattern matching\n if (pattern === '*.json') {\n return files.filter(f => f.endsWith('.json') && !f.startsWith('.mj-'));\n } else if (pattern === '.*.json') {\n return files.filter(f => f.startsWith('.') && f.endsWith('.json') && !f.startsWith('.mj-'));\n }\n \n return files;\n }\n\n /**\n * Add an error\n */\n private addError(error: ValidationError): void {\n this.errors.push(error);\n }\n\n /**\n * Add a warning\n */\n private addWarning(warning: ValidationWarning): void {\n this.warnings.push(warning);\n }\n\n /**\n * Check if current directory order satisfies dependencies\n */\n private checkDependencyOrder(directoryOrder: string[]): Array<{entity: string, dependency: string, file: string}> {\n const violations: Array<{entity: string, dependency: string, file: string}> = [];\n const processedEntities = new Set<string>();\n \n for (const dir of directoryOrder) {\n // In real implementation, we'd read .mj-sync.json to get entity name\n const entityName = dir; // Simplified for now\n \n const deps = this.entityDependencies.get(entityName);\n if (deps) {\n for (const dep of deps.dependsOn) {\n if (!processedEntities.has(dep) && directoryOrder.includes(dep)) {\n violations.push({\n entity: entityName,\n dependency: dep,\n file: deps.file\n });\n }\n }\n }\n \n processedEntities.add(entityName);\n }\n \n return violations;\n }\n\n /**\n * Perform topological sort on entity dependencies\n */\n private topologicalSort(): string[] {\n const result: string[] = [];\n const visited = new Set<string>();\n const tempStack = new Set<string>();\n \n const visit = (entity: string): boolean => {\n if (tempStack.has(entity)) {\n // Circular dependency, already handled by checkCircularDependency\n return false;\n }\n \n if (visited.has(entity)) {\n return true;\n }\n \n tempStack.add(entity);\n \n const deps = this.entityDependencies.get(entity);\n if (deps) {\n for (const dep of deps.dependsOn) {\n if (!visit(dep)) {\n return false;\n }\n }\n }\n \n tempStack.delete(entity);\n visited.add(entity);\n result.push(entity);\n \n return true;\n };\n \n // Visit all entities\n for (const entity of this.entityDependencies.keys()) {\n if (!visited.has(entity)) {\n visit(entity);\n }\n }\n \n return result;\n }\n\n /**\n * Reset validation state\n */\n private reset(): void {\n this.errors = [];\n this.warnings = [];\n this.entityDependencies.clear();\n this.processedEntities.clear();\n }\n\n /**\n * Get validation result\n */\n private getResult(): ValidationResult {\n return {\n isValid: this.errors.length === 0,\n errors: this.errors,\n warnings: this.warnings,\n summary: {\n totalFiles: 0,\n totalEntities: 0,\n totalErrors: this.errors.length,\n totalWarnings: this.warnings.length,\n fileResults: new Map()\n }\n };\n }\n}"]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation types and interfaces for MetadataSync
|
|
3
|
+
*/
|
|
4
|
+
export interface ValidationResult {
|
|
5
|
+
isValid: boolean;
|
|
6
|
+
errors: ValidationError[];
|
|
7
|
+
warnings: ValidationWarning[];
|
|
8
|
+
summary: ValidationSummary;
|
|
9
|
+
}
|
|
10
|
+
export interface ValidationError {
|
|
11
|
+
type: 'entity' | 'field' | 'value' | 'reference' | 'dependency' | 'circular';
|
|
12
|
+
severity: 'error';
|
|
13
|
+
entity?: string;
|
|
14
|
+
field?: string;
|
|
15
|
+
file: string;
|
|
16
|
+
message: string;
|
|
17
|
+
suggestion?: string;
|
|
18
|
+
details?: any;
|
|
19
|
+
}
|
|
20
|
+
export interface ValidationWarning {
|
|
21
|
+
type: 'nesting' | 'naming' | 'bestpractice' | 'performance';
|
|
22
|
+
severity: 'warning';
|
|
23
|
+
entity?: string;
|
|
24
|
+
field?: string;
|
|
25
|
+
file: string;
|
|
26
|
+
message: string;
|
|
27
|
+
suggestion?: string;
|
|
28
|
+
details?: any;
|
|
29
|
+
}
|
|
30
|
+
export interface ValidationSummary {
|
|
31
|
+
totalFiles: number;
|
|
32
|
+
totalEntities: number;
|
|
33
|
+
totalErrors: number;
|
|
34
|
+
totalWarnings: number;
|
|
35
|
+
fileResults: Map<string, FileValidationResult>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Custom error class for validation errors
|
|
39
|
+
*/
|
|
40
|
+
export declare class ValidationErrorClass extends Error {
|
|
41
|
+
readonly type: ValidationError['type'];
|
|
42
|
+
readonly severity: ValidationError['severity'];
|
|
43
|
+
readonly file: string;
|
|
44
|
+
readonly entity?: string;
|
|
45
|
+
readonly field?: string;
|
|
46
|
+
readonly suggestion?: string;
|
|
47
|
+
readonly line?: number;
|
|
48
|
+
readonly column?: number;
|
|
49
|
+
constructor(error: ValidationError);
|
|
50
|
+
/**
|
|
51
|
+
* Get formatted error message with location info
|
|
52
|
+
*/
|
|
53
|
+
getFormattedMessage(): string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Custom warning class for validation warnings
|
|
57
|
+
*/
|
|
58
|
+
export declare class ValidationWarningClass extends Error {
|
|
59
|
+
readonly type: ValidationWarning['type'];
|
|
60
|
+
readonly severity: ValidationWarning['severity'];
|
|
61
|
+
readonly file: string;
|
|
62
|
+
readonly entity?: string;
|
|
63
|
+
readonly field?: string;
|
|
64
|
+
readonly suggestion?: string;
|
|
65
|
+
readonly line?: number;
|
|
66
|
+
readonly column?: number;
|
|
67
|
+
constructor(warning: ValidationWarning);
|
|
68
|
+
/**
|
|
69
|
+
* Get formatted warning message with location info
|
|
70
|
+
*/
|
|
71
|
+
getFormattedMessage(): string;
|
|
72
|
+
}
|
|
73
|
+
export interface FileValidationResult {
|
|
74
|
+
file: string;
|
|
75
|
+
entityCount: number;
|
|
76
|
+
errors: ValidationError[];
|
|
77
|
+
warnings: ValidationWarning[];
|
|
78
|
+
}
|
|
79
|
+
export interface EntityDependency {
|
|
80
|
+
entityName: string;
|
|
81
|
+
dependsOn: Set<string>;
|
|
82
|
+
file: string;
|
|
83
|
+
}
|
|
84
|
+
export interface ValidationOptions {
|
|
85
|
+
verbose: boolean;
|
|
86
|
+
outputFormat: 'human' | 'json';
|
|
87
|
+
maxNestingDepth: number;
|
|
88
|
+
checkBestPractices: boolean;
|
|
89
|
+
}
|
|
90
|
+
export type ReferenceType = '@file:' | '@lookup:' | '@template:' | '@parent:' | '@root:' | '@env:';
|
|
91
|
+
export interface ParsedReference {
|
|
92
|
+
type: ReferenceType;
|
|
93
|
+
value: string;
|
|
94
|
+
entity?: string;
|
|
95
|
+
field?: string;
|
|
96
|
+
createIfMissing?: boolean;
|
|
97
|
+
additionalFields?: Record<string, any>;
|
|
98
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Validation types and interfaces for MetadataSync
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ValidationWarningClass = exports.ValidationErrorClass = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Custom error class for validation errors
|
|
9
|
+
*/
|
|
10
|
+
class ValidationErrorClass extends Error {
|
|
11
|
+
type;
|
|
12
|
+
severity;
|
|
13
|
+
file;
|
|
14
|
+
entity;
|
|
15
|
+
field;
|
|
16
|
+
suggestion;
|
|
17
|
+
line;
|
|
18
|
+
column;
|
|
19
|
+
constructor(error) {
|
|
20
|
+
super(error.message);
|
|
21
|
+
this.name = 'ValidationError';
|
|
22
|
+
this.type = error.type;
|
|
23
|
+
this.severity = error.severity;
|
|
24
|
+
this.file = error.file;
|
|
25
|
+
this.entity = error.entity;
|
|
26
|
+
this.field = error.field;
|
|
27
|
+
this.suggestion = error.suggestion;
|
|
28
|
+
// Try to extract line/column from error message if present
|
|
29
|
+
const lineMatch = error.message.match(/line (\d+)/i);
|
|
30
|
+
const colMatch = error.message.match(/column (\d+)/i);
|
|
31
|
+
this.line = lineMatch ? parseInt(lineMatch[1]) : undefined;
|
|
32
|
+
this.column = colMatch ? parseInt(colMatch[1]) : undefined;
|
|
33
|
+
// Ensure proper prototype chain
|
|
34
|
+
Object.setPrototypeOf(this, ValidationErrorClass.prototype);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get formatted error message with location info
|
|
38
|
+
*/
|
|
39
|
+
getFormattedMessage() {
|
|
40
|
+
let msg = this.message;
|
|
41
|
+
if (this.line) {
|
|
42
|
+
msg += ` (line ${this.line}`;
|
|
43
|
+
if (this.column) {
|
|
44
|
+
msg += `, column ${this.column}`;
|
|
45
|
+
}
|
|
46
|
+
msg += ')';
|
|
47
|
+
}
|
|
48
|
+
return msg;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ValidationErrorClass = ValidationErrorClass;
|
|
52
|
+
/**
|
|
53
|
+
* Custom warning class for validation warnings
|
|
54
|
+
*/
|
|
55
|
+
class ValidationWarningClass extends Error {
|
|
56
|
+
type;
|
|
57
|
+
severity;
|
|
58
|
+
file;
|
|
59
|
+
entity;
|
|
60
|
+
field;
|
|
61
|
+
suggestion;
|
|
62
|
+
line;
|
|
63
|
+
column;
|
|
64
|
+
constructor(warning) {
|
|
65
|
+
super(warning.message);
|
|
66
|
+
this.name = 'ValidationWarning';
|
|
67
|
+
this.type = warning.type;
|
|
68
|
+
this.severity = warning.severity;
|
|
69
|
+
this.file = warning.file;
|
|
70
|
+
this.entity = warning.entity;
|
|
71
|
+
this.field = warning.field;
|
|
72
|
+
this.suggestion = warning.suggestion;
|
|
73
|
+
// Try to extract line/column from warning message if present
|
|
74
|
+
const lineMatch = warning.message.match(/line (\d+)/i);
|
|
75
|
+
const colMatch = warning.message.match(/column (\d+)/i);
|
|
76
|
+
this.line = lineMatch ? parseInt(lineMatch[1]) : undefined;
|
|
77
|
+
this.column = colMatch ? parseInt(colMatch[1]) : undefined;
|
|
78
|
+
// Ensure proper prototype chain
|
|
79
|
+
Object.setPrototypeOf(this, ValidationWarningClass.prototype);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get formatted warning message with location info
|
|
83
|
+
*/
|
|
84
|
+
getFormattedMessage() {
|
|
85
|
+
let msg = this.message;
|
|
86
|
+
if (this.line) {
|
|
87
|
+
msg += ` (line ${this.line}`;
|
|
88
|
+
if (this.column) {
|
|
89
|
+
msg += `, column ${this.column}`;
|
|
90
|
+
}
|
|
91
|
+
msg += ')';
|
|
92
|
+
}
|
|
93
|
+
return msg;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.ValidationWarningClass = ValidationWarningClass;
|
|
97
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/types/validation.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAuCH;;GAEG;AACH,MAAa,oBAAqB,SAAQ,KAAK;IAC3B,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,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAE3D,gCAAgC;QAChC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,mBAAmB;QACf,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;QACvB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,GAAG,IAAI,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC;YAC7B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBACd,GAAG,IAAI,YAAY,IAAI,CAAC,MAAM,EAAE,CAAC;YACrC,CAAC;YACD,GAAG,IAAI,GAAG,CAAC;QACf,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ;AA5CD,wDA4CC","sourcesContent":["/**\n * Validation types and interfaces for MetadataSync\n */\n\nexport interface ValidationResult {\n isValid: boolean;\n errors: ValidationError[];\n warnings: ValidationWarning[];\n summary: ValidationSummary;\n}\n\nexport interface ValidationError {\n type: 'entity' | 'field' | 'value' | 'reference' | 'dependency' | 'circular';\n severity: 'error';\n entity?: string;\n field?: string;\n file: string;\n message: string;\n suggestion?: string;\n details?: any;\n}\n\nexport interface ValidationWarning {\n type: 'nesting' | 'naming' | 'bestpractice' | 'performance';\n severity: 'warning';\n entity?: string;\n field?: string;\n file: string;\n message: string;\n suggestion?: string;\n details?: any;\n}\n\nexport interface ValidationSummary {\n totalFiles: number;\n totalEntities: number;\n totalErrors: number;\n totalWarnings: number;\n fileResults: Map<string, FileValidationResult>;\n}\n\n/**\n * Custom error class for validation errors\n */\nexport class ValidationErrorClass extends Error {\n public readonly type: ValidationError['type'];\n public readonly severity: ValidationError['severity'];\n public readonly file: string;\n public readonly entity?: string;\n public readonly field?: string;\n public readonly suggestion?: string;\n public readonly line?: number;\n public readonly column?: number;\n \n constructor(error: ValidationError) {\n super(error.message);\n this.name = 'ValidationError';\n this.type = error.type;\n this.severity = error.severity;\n this.file = error.file;\n this.entity = error.entity;\n this.field = error.field;\n this.suggestion = error.suggestion;\n \n // Try to extract line/column from error message if present\n const lineMatch = error.message.match(/line (\\d+)/i);\n const colMatch = error.message.match(/column (\\d+)/i);\n this.line = lineMatch ? parseInt(lineMatch[1]) : undefined;\n this.column = colMatch ? parseInt(colMatch[1]) : undefined;\n \n // Ensure proper prototype chain\n Object.setPrototypeOf(this, ValidationErrorClass.prototype);\n }\n \n /**\n * Get formatted error message with location info\n */\n getFormattedMessage(): string {\n let msg = this.message;\n if (this.line) {\n msg += ` (line ${this.line}`;\n if (this.column) {\n msg += `, column ${this.column}`;\n }\n msg += ')';\n }\n return msg;\n }\n}\n\n/**\n * Custom warning class for validation warnings\n */\nexport class ValidationWarningClass extends Error {\n public readonly type: ValidationWarning['type'];\n public readonly severity: ValidationWarning['severity'];\n public readonly file: string;\n public readonly entity?: string;\n public readonly field?: string;\n public readonly suggestion?: string;\n public readonly line?: number;\n public readonly column?: number;\n \n constructor(warning: ValidationWarning) {\n super(warning.message);\n this.name = 'ValidationWarning';\n this.type = warning.type;\n this.severity = warning.severity;\n this.file = warning.file;\n this.entity = warning.entity;\n this.field = warning.field;\n this.suggestion = warning.suggestion;\n \n // Try to extract line/column from warning message if present\n const lineMatch = warning.message.match(/line (\\d+)/i);\n const colMatch = warning.message.match(/column (\\d+)/i);\n this.line = lineMatch ? parseInt(lineMatch[1]) : undefined;\n this.column = colMatch ? parseInt(colMatch[1]) : undefined;\n \n // Ensure proper prototype chain\n Object.setPrototypeOf(this, ValidationWarningClass.prototype);\n }\n \n /**\n * Get formatted warning message with location info\n */\n getFormattedMessage(): string {\n let msg = this.message;\n if (this.line) {\n msg += ` (line ${this.line}`;\n if (this.column) {\n msg += `, column ${this.column}`;\n }\n msg += ')';\n }\n return msg;\n }\n}\n\nexport interface FileValidationResult {\n file: string;\n entityCount: number;\n errors: ValidationError[];\n warnings: ValidationWarning[];\n}\n\nexport interface EntityDependency {\n entityName: string;\n dependsOn: Set<string>;\n file: string;\n}\n\nexport interface ValidationOptions {\n verbose: boolean;\n outputFormat: 'human' | 'json';\n maxNestingDepth: number;\n checkBestPractices: boolean;\n}\n\nexport type ReferenceType = '@file:' | '@lookup:' | '@template:' | '@parent:' | '@root:' | '@env:';\n\nexport interface ParsedReference {\n type: ReferenceType;\n value: string;\n entity?: string;\n field?: string;\n createIfMissing?: boolean;\n additionalFields?: Record<string, any>;\n}"]}
|
package/oclif.manifest.json
CHANGED
|
@@ -60,6 +60,12 @@
|
|
|
60
60
|
"name": "verbose",
|
|
61
61
|
"allowNo": false,
|
|
62
62
|
"type": "boolean"
|
|
63
|
+
},
|
|
64
|
+
"no-validate": {
|
|
65
|
+
"description": "Skip validation before push",
|
|
66
|
+
"name": "no-validate",
|
|
67
|
+
"allowNo": false,
|
|
68
|
+
"type": "boolean"
|
|
63
69
|
}
|
|
64
70
|
},
|
|
65
71
|
"hasDynamicHelp": false,
|
|
@@ -121,6 +127,12 @@
|
|
|
121
127
|
"name": "verbose",
|
|
122
128
|
"allowNo": false,
|
|
123
129
|
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"no-validate": {
|
|
132
|
+
"description": "Skip validation before pull",
|
|
133
|
+
"name": "no-validate",
|
|
134
|
+
"allowNo": false,
|
|
135
|
+
"type": "boolean"
|
|
124
136
|
}
|
|
125
137
|
},
|
|
126
138
|
"hasDynamicHelp": false,
|
|
@@ -172,6 +184,91 @@
|
|
|
172
184
|
"index.js"
|
|
173
185
|
]
|
|
174
186
|
},
|
|
187
|
+
"validate": {
|
|
188
|
+
"aliases": [],
|
|
189
|
+
"args": {},
|
|
190
|
+
"description": "Validate metadata files for correctness and dependencies",
|
|
191
|
+
"examples": [
|
|
192
|
+
"<%= config.bin %> <%= command.id %>",
|
|
193
|
+
"<%= config.bin %> <%= command.id %> --verbose",
|
|
194
|
+
"<%= config.bin %> <%= command.id %> --format=json",
|
|
195
|
+
"<%= config.bin %> <%= command.id %> --dir=./metadata",
|
|
196
|
+
"<%= config.bin %> <%= command.id %> --no-report",
|
|
197
|
+
"<%= config.bin %> <%= command.id %> -o validation-results.md"
|
|
198
|
+
],
|
|
199
|
+
"flags": {
|
|
200
|
+
"dir": {
|
|
201
|
+
"description": "Directory to validate (defaults to current directory)",
|
|
202
|
+
"name": "dir",
|
|
203
|
+
"default": "/home/runner/work/MJ/MJ/packages/MetadataSync",
|
|
204
|
+
"hasDynamicHelp": false,
|
|
205
|
+
"multiple": false,
|
|
206
|
+
"type": "option"
|
|
207
|
+
},
|
|
208
|
+
"verbose": {
|
|
209
|
+
"char": "v",
|
|
210
|
+
"description": "Show detailed validation output",
|
|
211
|
+
"name": "verbose",
|
|
212
|
+
"allowNo": false,
|
|
213
|
+
"type": "boolean"
|
|
214
|
+
},
|
|
215
|
+
"format": {
|
|
216
|
+
"description": "Output format",
|
|
217
|
+
"name": "format",
|
|
218
|
+
"default": "human",
|
|
219
|
+
"hasDynamicHelp": false,
|
|
220
|
+
"multiple": false,
|
|
221
|
+
"options": [
|
|
222
|
+
"human",
|
|
223
|
+
"json"
|
|
224
|
+
],
|
|
225
|
+
"type": "option"
|
|
226
|
+
},
|
|
227
|
+
"max-depth": {
|
|
228
|
+
"description": "Maximum nesting depth before warning",
|
|
229
|
+
"name": "max-depth",
|
|
230
|
+
"default": 10,
|
|
231
|
+
"hasDynamicHelp": false,
|
|
232
|
+
"multiple": false,
|
|
233
|
+
"type": "option"
|
|
234
|
+
},
|
|
235
|
+
"no-best-practices": {
|
|
236
|
+
"description": "Skip best practice checks",
|
|
237
|
+
"name": "no-best-practices",
|
|
238
|
+
"allowNo": false,
|
|
239
|
+
"type": "boolean"
|
|
240
|
+
},
|
|
241
|
+
"no-report": {
|
|
242
|
+
"description": "Skip saving validation report to markdown file",
|
|
243
|
+
"name": "no-report",
|
|
244
|
+
"allowNo": false,
|
|
245
|
+
"type": "boolean"
|
|
246
|
+
},
|
|
247
|
+
"output-file": {
|
|
248
|
+
"char": "o",
|
|
249
|
+
"description": "Custom output filename for report",
|
|
250
|
+
"name": "output-file",
|
|
251
|
+
"hasDynamicHelp": false,
|
|
252
|
+
"multiple": false,
|
|
253
|
+
"type": "option"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"hasDynamicHelp": false,
|
|
257
|
+
"hiddenAliases": [],
|
|
258
|
+
"id": "validate",
|
|
259
|
+
"pluginAlias": "@memberjunction/metadata-sync",
|
|
260
|
+
"pluginName": "@memberjunction/metadata-sync",
|
|
261
|
+
"pluginType": "core",
|
|
262
|
+
"strict": true,
|
|
263
|
+
"enableJsonFlag": false,
|
|
264
|
+
"isESM": false,
|
|
265
|
+
"relativePath": [
|
|
266
|
+
"dist",
|
|
267
|
+
"commands",
|
|
268
|
+
"validate",
|
|
269
|
+
"index.js"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
175
272
|
"watch": {
|
|
176
273
|
"aliases": [],
|
|
177
274
|
"args": {},
|
|
@@ -206,5 +303,5 @@
|
|
|
206
303
|
]
|
|
207
304
|
}
|
|
208
305
|
},
|
|
209
|
-
"version": "2.
|
|
306
|
+
"version": "2.51.0"
|
|
210
307
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/metadata-sync",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.51.0",
|
|
4
4
|
"description": "MemberJunction metadata synchronization CLI tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oclif",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@inquirer/prompts": "^5.0.1",
|
|
54
|
-
"@memberjunction/core": "2.
|
|
55
|
-
"@memberjunction/core-entities": "2.
|
|
56
|
-
"@memberjunction/core-entities-server": "2.
|
|
57
|
-
"@memberjunction/global": "2.
|
|
58
|
-
"@memberjunction/sqlserver-dataprovider": "2.
|
|
59
|
-
"@memberjunction/graphql-dataprovider": "2.
|
|
54
|
+
"@memberjunction/core": "2.51.0",
|
|
55
|
+
"@memberjunction/core-entities": "2.51.0",
|
|
56
|
+
"@memberjunction/core-entities-server": "2.51.0",
|
|
57
|
+
"@memberjunction/global": "2.51.0",
|
|
58
|
+
"@memberjunction/sqlserver-dataprovider": "2.51.0",
|
|
59
|
+
"@memberjunction/graphql-dataprovider": "2.51.0",
|
|
60
60
|
"@oclif/core": "^3",
|
|
61
61
|
"@oclif/plugin-help": "^6",
|
|
62
62
|
"@oclif/plugin-version": "^2.0.17",
|