rulesync 0.9.0 → 0.11.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 +4 -36
- package/dist/index.mjs +4 -36
- package/package.json +70 -71
package/dist/index.js
CHANGED
|
@@ -73,34 +73,14 @@ function generateClaudeMarkdown(rootRules, detailRules) {
|
|
|
73
73
|
}
|
|
74
74
|
function formatRuleForClaude(rule) {
|
|
75
75
|
const lines = [];
|
|
76
|
-
lines.push(`### ${rule.
|
|
76
|
+
lines.push(`### ${rule.frontmatter.description}`);
|
|
77
77
|
lines.push("");
|
|
78
|
-
if (rule.frontmatter.description) {
|
|
79
|
-
lines.push(`**Description:** ${rule.frontmatter.description}`);
|
|
80
|
-
lines.push("");
|
|
81
|
-
}
|
|
82
|
-
if (rule.frontmatter.globs && rule.frontmatter.globs.length > 0) {
|
|
83
|
-
lines.push(`**File patterns:** ${rule.frontmatter.globs.join(", ")}`);
|
|
84
|
-
lines.push("");
|
|
85
|
-
}
|
|
86
78
|
lines.push(rule.content);
|
|
87
79
|
lines.push("");
|
|
88
80
|
return lines;
|
|
89
81
|
}
|
|
90
82
|
function generateMemoryFile(rule) {
|
|
91
|
-
|
|
92
|
-
lines.push(`# ${rule.filename}`);
|
|
93
|
-
lines.push("");
|
|
94
|
-
if (rule.frontmatter.description) {
|
|
95
|
-
lines.push(`**Description:** ${rule.frontmatter.description}`);
|
|
96
|
-
lines.push("");
|
|
97
|
-
}
|
|
98
|
-
if (rule.frontmatter.globs && rule.frontmatter.globs.length > 0) {
|
|
99
|
-
lines.push(`**File patterns:** ${rule.frontmatter.globs.join(", ")}`);
|
|
100
|
-
lines.push("");
|
|
101
|
-
}
|
|
102
|
-
lines.push(rule.content);
|
|
103
|
-
return lines.join("\n");
|
|
83
|
+
return rule.content.trim();
|
|
104
84
|
}
|
|
105
85
|
|
|
106
86
|
// src/generators/cline.ts
|
|
@@ -119,15 +99,7 @@ async function generateClineConfig(rules, config) {
|
|
|
119
99
|
return outputs;
|
|
120
100
|
}
|
|
121
101
|
function generateClineMarkdown(rule) {
|
|
122
|
-
|
|
123
|
-
lines.push(`# ${rule.frontmatter.description}`);
|
|
124
|
-
lines.push("");
|
|
125
|
-
if (rule.frontmatter.globs.length > 0) {
|
|
126
|
-
lines.push(`**Applies to files:** ${rule.frontmatter.globs.join(", ")}`);
|
|
127
|
-
lines.push("");
|
|
128
|
-
}
|
|
129
|
-
lines.push(rule.content);
|
|
130
|
-
return lines.join("\n");
|
|
102
|
+
return rule.content.trim();
|
|
131
103
|
}
|
|
132
104
|
|
|
133
105
|
// src/generators/copilot.ts
|
|
@@ -212,11 +184,7 @@ async function generateRooConfig(rules, config) {
|
|
|
212
184
|
return outputs;
|
|
213
185
|
}
|
|
214
186
|
function generateRooMarkdown(rule) {
|
|
215
|
-
|
|
216
|
-
lines.push(`# ${rule.frontmatter.description}`);
|
|
217
|
-
lines.push("");
|
|
218
|
-
lines.push(rule.content);
|
|
219
|
-
return lines.join("\n");
|
|
187
|
+
return rule.content.trim();
|
|
220
188
|
}
|
|
221
189
|
|
|
222
190
|
// src/utils/config.ts
|
package/dist/index.mjs
CHANGED
|
@@ -50,34 +50,14 @@ function generateClaudeMarkdown(rootRules, detailRules) {
|
|
|
50
50
|
}
|
|
51
51
|
function formatRuleForClaude(rule) {
|
|
52
52
|
const lines = [];
|
|
53
|
-
lines.push(`### ${rule.
|
|
53
|
+
lines.push(`### ${rule.frontmatter.description}`);
|
|
54
54
|
lines.push("");
|
|
55
|
-
if (rule.frontmatter.description) {
|
|
56
|
-
lines.push(`**Description:** ${rule.frontmatter.description}`);
|
|
57
|
-
lines.push("");
|
|
58
|
-
}
|
|
59
|
-
if (rule.frontmatter.globs && rule.frontmatter.globs.length > 0) {
|
|
60
|
-
lines.push(`**File patterns:** ${rule.frontmatter.globs.join(", ")}`);
|
|
61
|
-
lines.push("");
|
|
62
|
-
}
|
|
63
55
|
lines.push(rule.content);
|
|
64
56
|
lines.push("");
|
|
65
57
|
return lines;
|
|
66
58
|
}
|
|
67
59
|
function generateMemoryFile(rule) {
|
|
68
|
-
|
|
69
|
-
lines.push(`# ${rule.filename}`);
|
|
70
|
-
lines.push("");
|
|
71
|
-
if (rule.frontmatter.description) {
|
|
72
|
-
lines.push(`**Description:** ${rule.frontmatter.description}`);
|
|
73
|
-
lines.push("");
|
|
74
|
-
}
|
|
75
|
-
if (rule.frontmatter.globs && rule.frontmatter.globs.length > 0) {
|
|
76
|
-
lines.push(`**File patterns:** ${rule.frontmatter.globs.join(", ")}`);
|
|
77
|
-
lines.push("");
|
|
78
|
-
}
|
|
79
|
-
lines.push(rule.content);
|
|
80
|
-
return lines.join("\n");
|
|
60
|
+
return rule.content.trim();
|
|
81
61
|
}
|
|
82
62
|
|
|
83
63
|
// src/generators/cline.ts
|
|
@@ -96,15 +76,7 @@ async function generateClineConfig(rules, config) {
|
|
|
96
76
|
return outputs;
|
|
97
77
|
}
|
|
98
78
|
function generateClineMarkdown(rule) {
|
|
99
|
-
|
|
100
|
-
lines.push(`# ${rule.frontmatter.description}`);
|
|
101
|
-
lines.push("");
|
|
102
|
-
if (rule.frontmatter.globs.length > 0) {
|
|
103
|
-
lines.push(`**Applies to files:** ${rule.frontmatter.globs.join(", ")}`);
|
|
104
|
-
lines.push("");
|
|
105
|
-
}
|
|
106
|
-
lines.push(rule.content);
|
|
107
|
-
return lines.join("\n");
|
|
79
|
+
return rule.content.trim();
|
|
108
80
|
}
|
|
109
81
|
|
|
110
82
|
// src/generators/copilot.ts
|
|
@@ -189,11 +161,7 @@ async function generateRooConfig(rules, config) {
|
|
|
189
161
|
return outputs;
|
|
190
162
|
}
|
|
191
163
|
function generateRooMarkdown(rule) {
|
|
192
|
-
|
|
193
|
-
lines.push(`# ${rule.frontmatter.description}`);
|
|
194
|
-
lines.push("");
|
|
195
|
-
lines.push(rule.content);
|
|
196
|
-
return lines.join("\n");
|
|
164
|
+
return rule.content.trim();
|
|
197
165
|
}
|
|
198
166
|
|
|
199
167
|
// src/utils/config.ts
|
package/package.json
CHANGED
|
@@ -1,72 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
2
|
+
"name": "rulesync",
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"rulesync": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20.0.0"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"ai",
|
|
19
|
+
"rules",
|
|
20
|
+
"cli",
|
|
21
|
+
"copilot",
|
|
22
|
+
"cursor",
|
|
23
|
+
"cline",
|
|
24
|
+
"configuration",
|
|
25
|
+
"development"
|
|
26
|
+
],
|
|
27
|
+
"author": "dyoshikawa",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/dyoshikawa/rulesync.git"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/dyoshikawa/rulesync/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/dyoshikawa/rulesync#readme",
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"packageManager": "pnpm@7.33.7",
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@biomejs/biome": "2.0.0",
|
|
43
|
+
"@secretlint/secretlint-rule-preset-recommend": "10.1.0",
|
|
44
|
+
"@tsconfig/node24": "24.0.1",
|
|
45
|
+
"@types/node": "24.0.3",
|
|
46
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
47
|
+
"secretlint": "10.1.0",
|
|
48
|
+
"tsup": "8.5.0",
|
|
49
|
+
"tsx": "4.20.3",
|
|
50
|
+
"typescript": "5.8.3",
|
|
51
|
+
"vitest": "3.2.4"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"chokidar": "4.0.3",
|
|
55
|
+
"commander": "14.0.0",
|
|
56
|
+
"gray-matter": "4.0.3",
|
|
57
|
+
"marked": "15.0.12"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"dev": "tsx src/cli/index.ts",
|
|
61
|
+
"build": "tsup src/cli/index.ts --format cjs,esm --dts --clean",
|
|
62
|
+
"lint": "biome lint src/",
|
|
63
|
+
"format": "biome format --write src/",
|
|
64
|
+
"format:check": "biome format src/",
|
|
65
|
+
"check": "biome check src/",
|
|
66
|
+
"secretlint": "secretlint \"**/*\"",
|
|
67
|
+
"test": "vitest",
|
|
68
|
+
"test:watch": "vitest --watch",
|
|
69
|
+
"test:coverage": "vitest --coverage"
|
|
70
|
+
}
|
|
71
|
+
}
|