rulesync 0.10.0 → 0.12.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 CHANGED
@@ -80,7 +80,7 @@ function formatRuleForClaude(rule) {
80
80
  return lines;
81
81
  }
82
82
  function generateMemoryFile(rule) {
83
- return rule.content;
83
+ return rule.content.trim();
84
84
  }
85
85
 
86
86
  // src/generators/cline.ts
@@ -99,7 +99,7 @@ async function generateClineConfig(rules, config) {
99
99
  return outputs;
100
100
  }
101
101
  function generateClineMarkdown(rule) {
102
- return rule.content;
102
+ return rule.content.trim();
103
103
  }
104
104
 
105
105
  // src/generators/copilot.ts
@@ -184,9 +184,7 @@ async function generateRooConfig(rules, config) {
184
184
  return outputs;
185
185
  }
186
186
  function generateRooMarkdown(rule) {
187
- const lines = [];
188
- lines.push(rule.content);
189
- return lines.join("\n");
187
+ return rule.content.trim();
190
188
  }
191
189
 
192
190
  // src/utils/config.ts
@@ -359,7 +357,7 @@ function validateFrontmatter(data, filepath) {
359
357
  if (!Array.isArray(obj.targets)) {
360
358
  throw new Error(`Invalid targets in ${filepath}: must be an array`);
361
359
  }
362
- const validTargets = ["copilot", "cursor", "cline", "*"];
360
+ const validTargets = ["copilot", "cursor", "cline", "claude", "roo", "*"];
363
361
  for (const target of obj.targets) {
364
362
  if (typeof target !== "string" || !validTargets.includes(target)) {
365
363
  throw new Error(
@@ -557,7 +555,7 @@ async function createSampleFiles(aiRulesDir) {
557
555
  {
558
556
  filename: "coding-rules.md",
559
557
  content: `---
560
- priority: high
558
+ root: true
561
559
  targets: ["*"]
562
560
  description: "General coding standards and best practices"
563
561
  globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
@@ -584,7 +582,7 @@ globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
584
582
  {
585
583
  filename: "naming-conventions.md",
586
584
  content: `---
587
- priority: high
585
+ root: false
588
586
  targets: ["*"]
589
587
  description: "Naming conventions for variables, functions, and files"
590
588
  globs: ["**/*.ts", "**/*.js"]
@@ -610,8 +608,8 @@ globs: ["**/*.ts", "**/*.js"]
610
608
  {
611
609
  filename: "architecture.md",
612
610
  content: `---
613
- priority: low
614
- targets: [copilot, cursor]
611
+ root: false
612
+ targets: ["copilot", "cursor"]
615
613
  description: "Architectural patterns and project structure guidelines"
616
614
  globs: ["src/**/*.ts"]
617
615
  ---
package/dist/index.mjs CHANGED
@@ -57,7 +57,7 @@ function formatRuleForClaude(rule) {
57
57
  return lines;
58
58
  }
59
59
  function generateMemoryFile(rule) {
60
- return rule.content;
60
+ return rule.content.trim();
61
61
  }
62
62
 
63
63
  // src/generators/cline.ts
@@ -76,7 +76,7 @@ async function generateClineConfig(rules, config) {
76
76
  return outputs;
77
77
  }
78
78
  function generateClineMarkdown(rule) {
79
- return rule.content;
79
+ return rule.content.trim();
80
80
  }
81
81
 
82
82
  // src/generators/copilot.ts
@@ -161,9 +161,7 @@ async function generateRooConfig(rules, config) {
161
161
  return outputs;
162
162
  }
163
163
  function generateRooMarkdown(rule) {
164
- const lines = [];
165
- lines.push(rule.content);
166
- return lines.join("\n");
164
+ return rule.content.trim();
167
165
  }
168
166
 
169
167
  // src/utils/config.ts
@@ -336,7 +334,7 @@ function validateFrontmatter(data, filepath) {
336
334
  if (!Array.isArray(obj.targets)) {
337
335
  throw new Error(`Invalid targets in ${filepath}: must be an array`);
338
336
  }
339
- const validTargets = ["copilot", "cursor", "cline", "*"];
337
+ const validTargets = ["copilot", "cursor", "cline", "claude", "roo", "*"];
340
338
  for (const target of obj.targets) {
341
339
  if (typeof target !== "string" || !validTargets.includes(target)) {
342
340
  throw new Error(
@@ -534,7 +532,7 @@ async function createSampleFiles(aiRulesDir) {
534
532
  {
535
533
  filename: "coding-rules.md",
536
534
  content: `---
537
- priority: high
535
+ root: true
538
536
  targets: ["*"]
539
537
  description: "General coding standards and best practices"
540
538
  globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
@@ -561,7 +559,7 @@ globs: ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"]
561
559
  {
562
560
  filename: "naming-conventions.md",
563
561
  content: `---
564
- priority: high
562
+ root: false
565
563
  targets: ["*"]
566
564
  description: "Naming conventions for variables, functions, and files"
567
565
  globs: ["**/*.ts", "**/*.js"]
@@ -587,8 +585,8 @@ globs: ["**/*.ts", "**/*.js"]
587
585
  {
588
586
  filename: "architecture.md",
589
587
  content: `---
590
- priority: low
591
- targets: [copilot, cursor]
588
+ root: false
589
+ targets: ["copilot", "cursor"]
592
590
  description: "Architectural patterns and project structure guidelines"
593
591
  globs: ["src/**/*.ts"]
594
592
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -60,9 +60,11 @@
60
60
  "dev": "tsx src/cli/index.ts",
61
61
  "build": "tsup src/cli/index.ts --format cjs,esm --dts --clean",
62
62
  "lint": "biome lint src/",
63
+ "lint:fix": "biome lint --write src/",
63
64
  "format": "biome format --write src/",
64
65
  "format:check": "biome format src/",
65
66
  "check": "biome check src/",
67
+ "check:fix": "biome check --write src/",
66
68
  "secretlint": "secretlint \"**/*\"",
67
69
  "test": "vitest",
68
70
  "test:watch": "vitest --watch",