@schemashift/core 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -191,6 +191,7 @@ interface EcosystemIssue {
191
191
  suggestion: string;
192
192
  severity: 'info' | 'warning' | 'error';
193
193
  category: 'orm' | 'form' | 'api' | 'validation-util' | 'openapi' | 'ui';
194
+ upgradeCommand?: string;
194
195
  }
195
196
  interface EcosystemReport {
196
197
  dependencies: EcosystemIssue[];
@@ -226,6 +227,34 @@ declare class CompatibilityAnalyzer {
226
227
  checkCompatibility(projectPath: string, from?: string, to?: string): CompatibilityResult;
227
228
  }
228
229
 
230
+ type EffortLevel = 'trivial' | 'low' | 'moderate' | 'high' | 'extreme';
231
+ interface ComplexityWarning {
232
+ file: string;
233
+ line?: number;
234
+ message: string;
235
+ severity: 'info' | 'warning' | 'error';
236
+ }
237
+ interface FileComplexity {
238
+ filePath: string;
239
+ schemaCount: number;
240
+ advancedPatterns: string[];
241
+ chainDepth: number;
242
+ lineCount: number;
243
+ }
244
+ interface ComplexityEstimate {
245
+ effort: EffortLevel;
246
+ totalSchemas: number;
247
+ totalFiles: number;
248
+ advancedPatternCount: number;
249
+ files: FileComplexity[];
250
+ warnings: ComplexityWarning[];
251
+ riskAreas: string[];
252
+ }
253
+ declare class ComplexityEstimator {
254
+ estimate(files: SourceFile[]): ComplexityEstimate;
255
+ private calculateEffort;
256
+ }
257
+
229
258
  interface SchemaShiftConfig {
230
259
  include: string[];
231
260
  exclude: string[];
@@ -300,6 +329,23 @@ declare class SchemaDependencyResolver {
300
329
  private topologicalSort;
301
330
  private shortenPath;
302
331
  }
332
+ interface MonorepoPackage {
333
+ name: string;
334
+ path: string;
335
+ schemaLibrary?: string;
336
+ dependencies: string[];
337
+ }
338
+ interface MonorepoInfo {
339
+ isMonorepo: boolean;
340
+ packages: MonorepoPackage[];
341
+ suggestedOrder: string[];
342
+ }
343
+ declare class MonorepoResolver {
344
+ detect(projectPath: string): boolean;
345
+ analyze(projectPath: string): MonorepoInfo;
346
+ private suggestOrder;
347
+ private resolveWorkspaceDirs;
348
+ }
303
349
 
304
350
  interface SchemaComplexity {
305
351
  schemaName: string;
@@ -357,6 +403,16 @@ interface FormLibraryDetection {
357
403
  }
358
404
  declare function detectFormLibraries(sourceFile: SourceFile): FormLibraryDetection[];
359
405
 
406
+ interface FormResolverResult {
407
+ success: boolean;
408
+ transformedCode: string;
409
+ changes: string[];
410
+ warnings: string[];
411
+ }
412
+ declare class FormResolverMigrator {
413
+ migrate(sourceFile: SourceFile, from: string, to: string): FormResolverResult;
414
+ }
415
+
360
416
  interface GovernanceViolation {
361
417
  rule: string;
362
418
  message: string;
@@ -449,4 +505,4 @@ interface StandardSchemaInfo {
449
505
  }
450
506
  declare function detectStandardSchema(projectPath: string): StandardSchemaInfo;
451
507
 
452
- export { type AnalysisResult, type CallChainInfo, type ChainResult, type ChainStep, type ChainStepResult, type ChainValidation, CompatibilityAnalyzer, type CompatibilityResult, type CustomRule, type DependencyGraphResult, type DetailedAnalysisResult, DetailedAnalyzer, EcosystemAnalyzer, type EcosystemIssue, type EcosystemReport, type FormLibraryDetection, GovernanceEngine, type GovernanceResult, type GovernanceRuleConfig, type GovernanceViolation, type IncrementalState, IncrementalTracker, type LibraryVersionInfo, type MethodCallInfo, MigrationChain, type MigrationReadiness, type PackageUpdatePlan, PackageUpdater, type PluginLoadResult, PluginLoader, SchemaAnalyzer, type SchemaComplexity, SchemaDependencyResolver, type SchemaInfo, type SchemaLibrary, type SchemaShiftConfig, type SchemaShiftPlugin, type StandardSchemaInfo, TransformEngine, type TransformError, type TransformHandler, type TransformOptions, type TransformResult, type VersionIssue, type WarningSuppressionRule, buildCallChain, detectFormLibraries, detectSchemaLibrary, detectStandardSchema, isInsideComment, isInsideStringLiteral, loadConfig, parseCallChain, shouldSuppressWarning, startsWithBase, transformMethodChain, validateConfig };
508
+ export { type AnalysisResult, type CallChainInfo, type ChainResult, type ChainStep, type ChainStepResult, type ChainValidation, CompatibilityAnalyzer, type CompatibilityResult, type ComplexityEstimate, ComplexityEstimator, type ComplexityWarning, type CustomRule, type DependencyGraphResult, type DetailedAnalysisResult, DetailedAnalyzer, EcosystemAnalyzer, type EcosystemIssue, type EcosystemReport, type EffortLevel, type FileComplexity, type FormLibraryDetection, FormResolverMigrator, type FormResolverResult, GovernanceEngine, type GovernanceResult, type GovernanceRuleConfig, type GovernanceViolation, type IncrementalState, IncrementalTracker, type LibraryVersionInfo, type MethodCallInfo, MigrationChain, type MigrationReadiness, type MonorepoInfo, type MonorepoPackage, MonorepoResolver, type PackageUpdatePlan, PackageUpdater, type PluginLoadResult, PluginLoader, SchemaAnalyzer, type SchemaComplexity, SchemaDependencyResolver, type SchemaInfo, type SchemaLibrary, type SchemaShiftConfig, type SchemaShiftPlugin, type StandardSchemaInfo, TransformEngine, type TransformError, type TransformHandler, type TransformOptions, type TransformResult, type VersionIssue, type WarningSuppressionRule, buildCallChain, detectFormLibraries, detectSchemaLibrary, detectStandardSchema, isInsideComment, isInsideStringLiteral, loadConfig, parseCallChain, shouldSuppressWarning, startsWithBase, transformMethodChain, validateConfig };
package/dist/index.d.ts CHANGED
@@ -191,6 +191,7 @@ interface EcosystemIssue {
191
191
  suggestion: string;
192
192
  severity: 'info' | 'warning' | 'error';
193
193
  category: 'orm' | 'form' | 'api' | 'validation-util' | 'openapi' | 'ui';
194
+ upgradeCommand?: string;
194
195
  }
195
196
  interface EcosystemReport {
196
197
  dependencies: EcosystemIssue[];
@@ -226,6 +227,34 @@ declare class CompatibilityAnalyzer {
226
227
  checkCompatibility(projectPath: string, from?: string, to?: string): CompatibilityResult;
227
228
  }
228
229
 
230
+ type EffortLevel = 'trivial' | 'low' | 'moderate' | 'high' | 'extreme';
231
+ interface ComplexityWarning {
232
+ file: string;
233
+ line?: number;
234
+ message: string;
235
+ severity: 'info' | 'warning' | 'error';
236
+ }
237
+ interface FileComplexity {
238
+ filePath: string;
239
+ schemaCount: number;
240
+ advancedPatterns: string[];
241
+ chainDepth: number;
242
+ lineCount: number;
243
+ }
244
+ interface ComplexityEstimate {
245
+ effort: EffortLevel;
246
+ totalSchemas: number;
247
+ totalFiles: number;
248
+ advancedPatternCount: number;
249
+ files: FileComplexity[];
250
+ warnings: ComplexityWarning[];
251
+ riskAreas: string[];
252
+ }
253
+ declare class ComplexityEstimator {
254
+ estimate(files: SourceFile[]): ComplexityEstimate;
255
+ private calculateEffort;
256
+ }
257
+
229
258
  interface SchemaShiftConfig {
230
259
  include: string[];
231
260
  exclude: string[];
@@ -300,6 +329,23 @@ declare class SchemaDependencyResolver {
300
329
  private topologicalSort;
301
330
  private shortenPath;
302
331
  }
332
+ interface MonorepoPackage {
333
+ name: string;
334
+ path: string;
335
+ schemaLibrary?: string;
336
+ dependencies: string[];
337
+ }
338
+ interface MonorepoInfo {
339
+ isMonorepo: boolean;
340
+ packages: MonorepoPackage[];
341
+ suggestedOrder: string[];
342
+ }
343
+ declare class MonorepoResolver {
344
+ detect(projectPath: string): boolean;
345
+ analyze(projectPath: string): MonorepoInfo;
346
+ private suggestOrder;
347
+ private resolveWorkspaceDirs;
348
+ }
303
349
 
304
350
  interface SchemaComplexity {
305
351
  schemaName: string;
@@ -357,6 +403,16 @@ interface FormLibraryDetection {
357
403
  }
358
404
  declare function detectFormLibraries(sourceFile: SourceFile): FormLibraryDetection[];
359
405
 
406
+ interface FormResolverResult {
407
+ success: boolean;
408
+ transformedCode: string;
409
+ changes: string[];
410
+ warnings: string[];
411
+ }
412
+ declare class FormResolverMigrator {
413
+ migrate(sourceFile: SourceFile, from: string, to: string): FormResolverResult;
414
+ }
415
+
360
416
  interface GovernanceViolation {
361
417
  rule: string;
362
418
  message: string;
@@ -449,4 +505,4 @@ interface StandardSchemaInfo {
449
505
  }
450
506
  declare function detectStandardSchema(projectPath: string): StandardSchemaInfo;
451
507
 
452
- export { type AnalysisResult, type CallChainInfo, type ChainResult, type ChainStep, type ChainStepResult, type ChainValidation, CompatibilityAnalyzer, type CompatibilityResult, type CustomRule, type DependencyGraphResult, type DetailedAnalysisResult, DetailedAnalyzer, EcosystemAnalyzer, type EcosystemIssue, type EcosystemReport, type FormLibraryDetection, GovernanceEngine, type GovernanceResult, type GovernanceRuleConfig, type GovernanceViolation, type IncrementalState, IncrementalTracker, type LibraryVersionInfo, type MethodCallInfo, MigrationChain, type MigrationReadiness, type PackageUpdatePlan, PackageUpdater, type PluginLoadResult, PluginLoader, SchemaAnalyzer, type SchemaComplexity, SchemaDependencyResolver, type SchemaInfo, type SchemaLibrary, type SchemaShiftConfig, type SchemaShiftPlugin, type StandardSchemaInfo, TransformEngine, type TransformError, type TransformHandler, type TransformOptions, type TransformResult, type VersionIssue, type WarningSuppressionRule, buildCallChain, detectFormLibraries, detectSchemaLibrary, detectStandardSchema, isInsideComment, isInsideStringLiteral, loadConfig, parseCallChain, shouldSuppressWarning, startsWithBase, transformMethodChain, validateConfig };
508
+ export { type AnalysisResult, type CallChainInfo, type ChainResult, type ChainStep, type ChainStepResult, type ChainValidation, CompatibilityAnalyzer, type CompatibilityResult, type ComplexityEstimate, ComplexityEstimator, type ComplexityWarning, type CustomRule, type DependencyGraphResult, type DetailedAnalysisResult, DetailedAnalyzer, EcosystemAnalyzer, type EcosystemIssue, type EcosystemReport, type EffortLevel, type FileComplexity, type FormLibraryDetection, FormResolverMigrator, type FormResolverResult, GovernanceEngine, type GovernanceResult, type GovernanceRuleConfig, type GovernanceViolation, type IncrementalState, IncrementalTracker, type LibraryVersionInfo, type MethodCallInfo, MigrationChain, type MigrationReadiness, type MonorepoInfo, type MonorepoPackage, MonorepoResolver, type PackageUpdatePlan, PackageUpdater, type PluginLoadResult, PluginLoader, SchemaAnalyzer, type SchemaComplexity, SchemaDependencyResolver, type SchemaInfo, type SchemaLibrary, type SchemaShiftConfig, type SchemaShiftPlugin, type StandardSchemaInfo, TransformEngine, type TransformError, type TransformHandler, type TransformOptions, type TransformResult, type VersionIssue, type WarningSuppressionRule, buildCallChain, detectFormLibraries, detectSchemaLibrary, detectStandardSchema, isInsideComment, isInsideStringLiteral, loadConfig, parseCallChain, shouldSuppressWarning, startsWithBase, transformMethodChain, validateConfig };