@famgia/omnify-cli 0.0.132 → 0.0.133

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.js CHANGED
@@ -1023,15 +1023,22 @@ function generateAIGuides(rootDir, _plugins) {
1023
1023
  // src/commands/generate.ts
1024
1024
  async function loadRegisteredSchemaPaths(rootDir) {
1025
1025
  const schemaPathsFile = resolve7(rootDir, "storage/omnify/schema-paths.json");
1026
+ logger.debug(`Checking for registered schema paths at: ${schemaPathsFile}`);
1026
1027
  if (!existsSync5(schemaPathsFile)) {
1028
+ logger.debug("No registered schema paths file found");
1027
1029
  return [];
1028
1030
  }
1029
1031
  try {
1030
1032
  const content = readFileSync3(schemaPathsFile, "utf-8");
1031
1033
  const data = JSON.parse(content);
1032
- return data.paths ?? [];
1033
- } catch {
1034
- logger.debug("Could not read registered schema paths file");
1034
+ if (!data.paths || data.paths.length === 0) {
1035
+ logger.debug("No paths defined in schema-paths.json");
1036
+ return [];
1037
+ }
1038
+ logger.debug(`Found ${data.paths.length} registered schema path(s) in schema-paths.json`);
1039
+ return data.paths;
1040
+ } catch (error) {
1041
+ logger.warn(`Could not read schema-paths.json: ${error.message}`);
1035
1042
  return [];
1036
1043
  }
1037
1044
  }
@@ -1473,13 +1480,16 @@ async function runGenerate(options) {
1473
1480
  if (additionalPaths.length > 0) {
1474
1481
  logger.step(`Loading schemas from ${additionalPaths.length} registered path(s)`);
1475
1482
  for (const entry of additionalPaths) {
1476
- if (existsSync5(entry.path)) {
1477
- const packageSchemas = await loadSchemas3(entry.path);
1483
+ const absolutePath = resolve7(rootDir, entry.path);
1484
+ logger.debug(` Checking: ${entry.path} \u2192 ${absolutePath}`);
1485
+ if (existsSync5(absolutePath)) {
1486
+ const packageSchemas = await loadSchemas3(absolutePath);
1478
1487
  const count = Object.keys(packageSchemas).length;
1479
- logger.debug(` \u2022 ${entry.path}: ${count} schema(s)`);
1488
+ logger.info(` \u2022 ${entry.path}: ${count} schema(s)`);
1480
1489
  schemas = { ...packageSchemas, ...schemas };
1481
1490
  } else {
1482
1491
  logger.warn(` \u2022 ${entry.path}: directory not found (skipped)`);
1492
+ logger.debug(` Resolved path: ${absolutePath}`);
1483
1493
  }
1484
1494
  }
1485
1495
  }