rulesync 0.18.0 → 0.19.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.js +5 -0
- package/dist/index.mjs +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -382,6 +382,11 @@ async function parseRulesFromDirectory(aiRulesDir) {
|
|
|
382
382
|
throw new Error(`Validation errors found:
|
|
383
383
|
${errors.join("\n")}`);
|
|
384
384
|
}
|
|
385
|
+
const rootRules = rules.filter((rule) => rule.frontmatter.root);
|
|
386
|
+
if (rootRules.length > 1) {
|
|
387
|
+
const rootRuleFiles = rootRules.map((rule) => rule.filepath).join(", ");
|
|
388
|
+
throw new Error(`Multiple root rules found: ${rootRuleFiles}. Only one rule can have root: true.`);
|
|
389
|
+
}
|
|
385
390
|
return rules;
|
|
386
391
|
}
|
|
387
392
|
async function parseRuleFile(filepath) {
|
package/dist/index.mjs
CHANGED
|
@@ -359,6 +359,11 @@ async function parseRulesFromDirectory(aiRulesDir) {
|
|
|
359
359
|
throw new Error(`Validation errors found:
|
|
360
360
|
${errors.join("\n")}`);
|
|
361
361
|
}
|
|
362
|
+
const rootRules = rules.filter((rule) => rule.frontmatter.root);
|
|
363
|
+
if (rootRules.length > 1) {
|
|
364
|
+
const rootRuleFiles = rootRules.map((rule) => rule.filepath).join(", ");
|
|
365
|
+
throw new Error(`Multiple root rules found: ${rootRuleFiles}. Only one rule can have root: true.`);
|
|
366
|
+
}
|
|
362
367
|
return rules;
|
|
363
368
|
}
|
|
364
369
|
async function parseRuleFile(filepath) {
|
package/package.json
CHANGED