@famgia/omnify-cli 2.0.10 → 2.0.12

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
@@ -423,4 +423,83 @@ declare class Logger {
423
423
  */
424
424
  declare const logger: Logger;
425
425
 
426
- export { type AdditionalSchemaPath, type DatabaseConfig, type DatabaseDriver, type LaravelOutputConfig, type OmnifyConfig, type OutputConfig, type PackageLaravelOutputConfig, type PackageOutputConfig, type ResolvedOmnifyConfig, type TypeScriptOutputConfig, defineConfig, loadConfig, logger, registerDiffCommand, registerGenerateCommand, registerInitCommand, registerValidateCommand, runInit };
426
+ /**
427
+ * @famgia/omnify-cli - Version Lock
428
+ *
429
+ * Manages version locking for omnify plugins to ensure compatibility.
430
+ * When running `omnify generate`, checks if installed plugin versions
431
+ * meet the minimum requirements from the lock file.
432
+ */
433
+
434
+ /**
435
+ * Version lock file name.
436
+ */
437
+ declare const VERSION_LOCK_FILE = ".omnify-versions.lock";
438
+ /**
439
+ * Plugin version entry in the lock file.
440
+ */
441
+ interface PluginVersionEntry {
442
+ /** Plugin name (e.g., '@famgia/omnify-laravel') */
443
+ name: string;
444
+ /** Locked version (minimum required) */
445
+ version: string;
446
+ /** Last updated timestamp */
447
+ updatedAt: string;
448
+ }
449
+ /**
450
+ * Version lock file structure.
451
+ */
452
+ interface VersionLockFile {
453
+ /** Lock file format version */
454
+ version: 1;
455
+ /** CLI version used to create/update this lock */
456
+ cliVersion: string;
457
+ /** Plugin versions */
458
+ plugins: PluginVersionEntry[];
459
+ /** When the lock was last updated */
460
+ updatedAt: string;
461
+ }
462
+ /**
463
+ * Result of version check.
464
+ */
465
+ interface VersionCheckResult {
466
+ /** Whether all versions pass */
467
+ valid: boolean;
468
+ /** List of plugins with version mismatches */
469
+ mismatches: VersionMismatch[];
470
+ /** List of plugins not in lock file (new plugins) */
471
+ newPlugins: string[];
472
+ }
473
+ /**
474
+ * Version mismatch information.
475
+ */
476
+ interface VersionMismatch {
477
+ /** Plugin name */
478
+ name: string;
479
+ /** Required version (from lock file) */
480
+ required: string;
481
+ /** Installed version */
482
+ installed: string;
483
+ }
484
+ /**
485
+ * Reads the version lock file.
486
+ */
487
+ declare function readVersionLock(rootDir: string): VersionLockFile | null;
488
+ /**
489
+ * Writes the version lock file.
490
+ */
491
+ declare function writeVersionLock(rootDir: string, lock: VersionLockFile): void;
492
+ /**
493
+ * Checks if installed plugin versions meet the lock file requirements.
494
+ */
495
+ declare function checkPluginVersions(plugins: readonly OmnifyPlugin[], lockFile: VersionLockFile): VersionCheckResult;
496
+ /**
497
+ * Creates or updates the version lock file with current plugin versions.
498
+ */
499
+ declare function updateVersionLock(rootDir: string, plugins: readonly OmnifyPlugin[], cliVersion: string): VersionLockFile;
500
+ /**
501
+ * Gets the CLI version from package.json.
502
+ */
503
+ declare function getCliVersion(): string;
504
+
505
+ export { type AdditionalSchemaPath, type DatabaseConfig, type DatabaseDriver, type LaravelOutputConfig, type OmnifyConfig, type OutputConfig, type PackageLaravelOutputConfig, type PackageOutputConfig, type PluginVersionEntry, type ResolvedOmnifyConfig, type TypeScriptOutputConfig, VERSION_LOCK_FILE, type VersionCheckResult, type VersionLockFile, type VersionMismatch, checkPluginVersions, defineConfig, getCliVersion, loadConfig, logger, readVersionLock, registerDiffCommand, registerGenerateCommand, registerInitCommand, registerValidateCommand, runInit, updateVersionLock, writeVersionLock };
package/dist/index.d.ts CHANGED
@@ -423,4 +423,83 @@ declare class Logger {
423
423
  */
424
424
  declare const logger: Logger;
425
425
 
426
- export { type AdditionalSchemaPath, type DatabaseConfig, type DatabaseDriver, type LaravelOutputConfig, type OmnifyConfig, type OutputConfig, type PackageLaravelOutputConfig, type PackageOutputConfig, type ResolvedOmnifyConfig, type TypeScriptOutputConfig, defineConfig, loadConfig, logger, registerDiffCommand, registerGenerateCommand, registerInitCommand, registerValidateCommand, runInit };
426
+ /**
427
+ * @famgia/omnify-cli - Version Lock
428
+ *
429
+ * Manages version locking for omnify plugins to ensure compatibility.
430
+ * When running `omnify generate`, checks if installed plugin versions
431
+ * meet the minimum requirements from the lock file.
432
+ */
433
+
434
+ /**
435
+ * Version lock file name.
436
+ */
437
+ declare const VERSION_LOCK_FILE = ".omnify-versions.lock";
438
+ /**
439
+ * Plugin version entry in the lock file.
440
+ */
441
+ interface PluginVersionEntry {
442
+ /** Plugin name (e.g., '@famgia/omnify-laravel') */
443
+ name: string;
444
+ /** Locked version (minimum required) */
445
+ version: string;
446
+ /** Last updated timestamp */
447
+ updatedAt: string;
448
+ }
449
+ /**
450
+ * Version lock file structure.
451
+ */
452
+ interface VersionLockFile {
453
+ /** Lock file format version */
454
+ version: 1;
455
+ /** CLI version used to create/update this lock */
456
+ cliVersion: string;
457
+ /** Plugin versions */
458
+ plugins: PluginVersionEntry[];
459
+ /** When the lock was last updated */
460
+ updatedAt: string;
461
+ }
462
+ /**
463
+ * Result of version check.
464
+ */
465
+ interface VersionCheckResult {
466
+ /** Whether all versions pass */
467
+ valid: boolean;
468
+ /** List of plugins with version mismatches */
469
+ mismatches: VersionMismatch[];
470
+ /** List of plugins not in lock file (new plugins) */
471
+ newPlugins: string[];
472
+ }
473
+ /**
474
+ * Version mismatch information.
475
+ */
476
+ interface VersionMismatch {
477
+ /** Plugin name */
478
+ name: string;
479
+ /** Required version (from lock file) */
480
+ required: string;
481
+ /** Installed version */
482
+ installed: string;
483
+ }
484
+ /**
485
+ * Reads the version lock file.
486
+ */
487
+ declare function readVersionLock(rootDir: string): VersionLockFile | null;
488
+ /**
489
+ * Writes the version lock file.
490
+ */
491
+ declare function writeVersionLock(rootDir: string, lock: VersionLockFile): void;
492
+ /**
493
+ * Checks if installed plugin versions meet the lock file requirements.
494
+ */
495
+ declare function checkPluginVersions(plugins: readonly OmnifyPlugin[], lockFile: VersionLockFile): VersionCheckResult;
496
+ /**
497
+ * Creates or updates the version lock file with current plugin versions.
498
+ */
499
+ declare function updateVersionLock(rootDir: string, plugins: readonly OmnifyPlugin[], cliVersion: string): VersionLockFile;
500
+ /**
501
+ * Gets the CLI version from package.json.
502
+ */
503
+ declare function getCliVersion(): string;
504
+
505
+ export { type AdditionalSchemaPath, type DatabaseConfig, type DatabaseDriver, type LaravelOutputConfig, type OmnifyConfig, type OutputConfig, type PackageLaravelOutputConfig, type PackageOutputConfig, type PluginVersionEntry, type ResolvedOmnifyConfig, type TypeScriptOutputConfig, VERSION_LOCK_FILE, type VersionCheckResult, type VersionLockFile, type VersionMismatch, checkPluginVersions, defineConfig, getCliVersion, loadConfig, logger, readVersionLock, registerDiffCommand, registerGenerateCommand, registerInitCommand, registerValidateCommand, runInit, updateVersionLock, writeVersionLock };