@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/cli.js +16 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +16 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1031,15 +1031,22 @@ function generateAIGuides(rootDir, _plugins) {
|
|
|
1031
1031
|
// src/commands/generate.ts
|
|
1032
1032
|
async function loadRegisteredSchemaPaths(rootDir) {
|
|
1033
1033
|
const schemaPathsFile = (0, import_node_path7.resolve)(rootDir, "storage/omnify/schema-paths.json");
|
|
1034
|
+
logger.debug(`Checking for registered schema paths at: ${schemaPathsFile}`);
|
|
1034
1035
|
if (!(0, import_node_fs5.existsSync)(schemaPathsFile)) {
|
|
1036
|
+
logger.debug("No registered schema paths file found");
|
|
1035
1037
|
return [];
|
|
1036
1038
|
}
|
|
1037
1039
|
try {
|
|
1038
1040
|
const content = (0, import_node_fs5.readFileSync)(schemaPathsFile, "utf-8");
|
|
1039
1041
|
const data = JSON.parse(content);
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1042
|
+
if (!data.paths || data.paths.length === 0) {
|
|
1043
|
+
logger.debug("No paths defined in schema-paths.json");
|
|
1044
|
+
return [];
|
|
1045
|
+
}
|
|
1046
|
+
logger.debug(`Found ${data.paths.length} registered schema path(s) in schema-paths.json`);
|
|
1047
|
+
return data.paths;
|
|
1048
|
+
} catch (error) {
|
|
1049
|
+
logger.warn(`Could not read schema-paths.json: ${error.message}`);
|
|
1043
1050
|
return [];
|
|
1044
1051
|
}
|
|
1045
1052
|
}
|
|
@@ -1481,13 +1488,16 @@ async function runGenerate(options) {
|
|
|
1481
1488
|
if (additionalPaths.length > 0) {
|
|
1482
1489
|
logger.step(`Loading schemas from ${additionalPaths.length} registered path(s)`);
|
|
1483
1490
|
for (const entry of additionalPaths) {
|
|
1484
|
-
|
|
1485
|
-
|
|
1491
|
+
const absolutePath = (0, import_node_path7.resolve)(rootDir, entry.path);
|
|
1492
|
+
logger.debug(` Checking: ${entry.path} \u2192 ${absolutePath}`);
|
|
1493
|
+
if ((0, import_node_fs5.existsSync)(absolutePath)) {
|
|
1494
|
+
const packageSchemas = await (0, import_omnify_core5.loadSchemas)(absolutePath);
|
|
1486
1495
|
const count = Object.keys(packageSchemas).length;
|
|
1487
|
-
logger.
|
|
1496
|
+
logger.info(` \u2022 ${entry.path}: ${count} schema(s)`);
|
|
1488
1497
|
schemas = { ...packageSchemas, ...schemas };
|
|
1489
1498
|
} else {
|
|
1490
1499
|
logger.warn(` \u2022 ${entry.path}: directory not found (skipped)`);
|
|
1500
|
+
logger.debug(` Resolved path: ${absolutePath}`);
|
|
1491
1501
|
}
|
|
1492
1502
|
}
|
|
1493
1503
|
}
|