@famgia/omnify-cli 2.0.46 → 2.0.47

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/cli.js CHANGED
@@ -1647,7 +1647,7 @@ function writeGeneratorOutputs(outputs, rootDir) {
1647
1647
  }
1648
1648
  return { ...counts, migrationRecords };
1649
1649
  }
1650
- async function runPluginGeneration(plugins, schemas, rootDir, verbose, changes, localeConfig) {
1650
+ async function runPluginGeneration(plugins, schemas, rootDir, verbose, changes, localeConfig, force) {
1651
1651
  const pluginManager = new PluginManager({
1652
1652
  cwd: rootDir,
1653
1653
  verbose,
@@ -1662,7 +1662,7 @@ async function runPluginGeneration(plugins, schemas, rootDir, verbose, changes,
1662
1662
  for (const plugin of plugins) {
1663
1663
  await pluginManager.register(plugin);
1664
1664
  }
1665
- const result = await pluginManager.runGenerators(schemas, changes);
1665
+ const result = await pluginManager.runGenerators(schemas, changes, { force });
1666
1666
  if (!result.success) {
1667
1667
  for (const error of result.errors) {
1668
1668
  logger.error(`Generator ${error.generatorName} failed: ${error.message}`);
@@ -2270,7 +2270,8 @@ async function runGenerate(options) {
2270
2270
  rootDir,
2271
2271
  options.verbose ?? false,
2272
2272
  comparison.changes,
2273
- config.locale
2273
+ config.locale,
2274
+ options.force
2274
2275
  );
2275
2276
  migrationsGenerated = counts.migrations;
2276
2277
  typesGenerated = counts.types;
@@ -2501,7 +2502,7 @@ async function runGenerate(options) {
2501
2502
  }
2502
2503
  }
2503
2504
  function registerGenerateCommand(program2) {
2504
- program2.command("generate").description("Generate Laravel migrations and TypeScript types").option("-v, --verbose", "Show detailed output").option("--migrations-only", "Only generate migrations").option("--types-only", "Only generate TypeScript types").option("-f, --force", "Generate even if no changes detected").option("--check", "CI mode: check if migrations are in sync without generating (exits with code 1 if out of sync)").option("--no-warn-stale", "Disable stale migration warnings").action(async (options) => {
2505
+ program2.command("generate").description("Generate Laravel migrations and TypeScript types").option("-v, --verbose", "Show detailed output").option("--migrations-only", "Only generate migrations").option("--types-only", "Only generate TypeScript types").option("-f, --force", "Force regenerate all migrations (overwrites existing files)").option("--check", "CI mode: check if migrations are in sync without generating (exits with code 1 if out of sync)").option("--no-warn-stale", "Disable stale migration warnings").action(async (options) => {
2505
2506
  try {
2506
2507
  await runGenerate(options);
2507
2508
  } catch (error) {