rulesync 5.5.0 → 5.6.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/README.md +21 -18
- package/dist/index.cjs +9 -16
- package/dist/index.js +9 -16
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -42,44 +42,47 @@ Download pre-built binaries from the [latest release](https://github.com/dyoshik
|
|
|
42
42
|
#### Linux (x64)
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-x64 -o rulesync
|
|
46
|
-
chmod +x rulesync
|
|
47
|
-
|
|
48
|
-
sudo mv rulesync /usr/local/bin/
|
|
45
|
+
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-x64 -o rulesync && \
|
|
46
|
+
chmod +x rulesync && \
|
|
47
|
+
sudo mv rulesync /usr/local/bin/
|
|
49
48
|
```
|
|
50
49
|
|
|
51
50
|
#### Linux (ARM64)
|
|
52
51
|
|
|
53
52
|
```bash
|
|
54
|
-
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-arm64 -o rulesync
|
|
55
|
-
chmod +x rulesync
|
|
56
|
-
|
|
57
|
-
sudo mv rulesync /usr/local/bin/
|
|
53
|
+
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-linux-arm64 -o rulesync && \
|
|
54
|
+
chmod +x rulesync && \
|
|
55
|
+
sudo mv rulesync /usr/local/bin/
|
|
58
56
|
```
|
|
59
57
|
|
|
60
58
|
#### macOS (Apple Silicon)
|
|
61
59
|
|
|
62
60
|
```bash
|
|
63
|
-
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-darwin-arm64 -o rulesync
|
|
64
|
-
chmod +x rulesync
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-darwin-arm64 -o rulesync && \
|
|
62
|
+
chmod +x rulesync && \
|
|
63
|
+
sudo mv rulesync /usr/local/bin/
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### macOS (Intel)
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-darwin-x64 -o rulesync && \
|
|
70
|
+
chmod +x rulesync && \
|
|
71
|
+
sudo mv rulesync /usr/local/bin/
|
|
67
72
|
```
|
|
68
73
|
|
|
69
74
|
#### Windows (x64)
|
|
70
75
|
|
|
71
76
|
```powershell
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
# Add to PATH or place in a directory already in PATH
|
|
75
|
-
Move-Item rulesync.exe C:\Windows\System32\
|
|
77
|
+
Invoke-WebRequest -Uri "https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-windows-x64.exe" -OutFile "rulesync.exe"; `
|
|
78
|
+
Move-Item rulesync.exe C:\Windows\System32\
|
|
76
79
|
```
|
|
77
80
|
|
|
78
81
|
Or using curl (if available):
|
|
79
82
|
|
|
80
83
|
```bash
|
|
81
|
-
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-windows-x64.exe -o rulesync.exe
|
|
82
|
-
|
|
84
|
+
curl -L https://github.com/dyoshikawa/rulesync/releases/latest/download/rulesync-windows-x64.exe -o rulesync.exe && \
|
|
85
|
+
mv rulesync.exe /path/to/your/bin/
|
|
83
86
|
```
|
|
84
87
|
|
|
85
88
|
#### Verify checksums
|
package/dist/index.cjs
CHANGED
|
@@ -110,7 +110,7 @@ var import_node_path2 = require("path");
|
|
|
110
110
|
|
|
111
111
|
// src/utils/file.ts
|
|
112
112
|
var import_es_toolkit = require("es-toolkit");
|
|
113
|
-
var
|
|
113
|
+
var import_globby = require("globby");
|
|
114
114
|
var import_promises = require("fs/promises");
|
|
115
115
|
var import_node_os = __toESM(require("os"), 1);
|
|
116
116
|
var import_node_path = require("path");
|
|
@@ -193,17 +193,10 @@ async function listDirectoryFiles(dir) {
|
|
|
193
193
|
}
|
|
194
194
|
async function findFilesByGlobs(globs, options = {}) {
|
|
195
195
|
const { type = "all" } = options;
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
case "dir":
|
|
201
|
-
return items.filter((item) => item.isDirectory()).map((item) => (0, import_node_path.join)(item.parentPath, item.name));
|
|
202
|
-
case "all":
|
|
203
|
-
return items.map((item) => (0, import_node_path.join)(item.parentPath, item.name));
|
|
204
|
-
default:
|
|
205
|
-
throw new Error(`Invalid type: ${type}`);
|
|
206
|
-
}
|
|
196
|
+
const globbyOptions = type === "file" ? { onlyFiles: true, onlyDirectories: false } : type === "dir" ? { onlyFiles: false, onlyDirectories: true } : { onlyFiles: false, onlyDirectories: false };
|
|
197
|
+
const normalizedGlobs = Array.isArray(globs) ? globs.map((g) => g.replaceAll("\\", "/")) : globs.replaceAll("\\", "/");
|
|
198
|
+
const results = (0, import_globby.globbySync)(normalizedGlobs, { absolute: true, ...globbyOptions });
|
|
199
|
+
return results.toSorted();
|
|
207
200
|
}
|
|
208
201
|
async function removeDirectory(dirPath) {
|
|
209
202
|
const dangerousPaths = [".", "/", "~", "src", "node_modules"];
|
|
@@ -7902,7 +7895,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
7902
7895
|
...restFields
|
|
7903
7896
|
};
|
|
7904
7897
|
const rulesyncFrontmatter = {
|
|
7905
|
-
targets: ["
|
|
7898
|
+
targets: ["*"],
|
|
7906
7899
|
name,
|
|
7907
7900
|
description,
|
|
7908
7901
|
// Only include claudecode section if there are fields
|
|
@@ -8063,7 +8056,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
8063
8056
|
toRulesyncSubagent() {
|
|
8064
8057
|
const { name, description, tools, ...rest } = this.frontmatter;
|
|
8065
8058
|
const rulesyncFrontmatter = {
|
|
8066
|
-
targets: ["
|
|
8059
|
+
targets: ["*"],
|
|
8067
8060
|
name,
|
|
8068
8061
|
description,
|
|
8069
8062
|
copilot: {
|
|
@@ -8220,7 +8213,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
|
8220
8213
|
toRulesyncSubagent() {
|
|
8221
8214
|
const { description, mode, name, ...opencodeSection } = this.frontmatter;
|
|
8222
8215
|
const rulesyncFrontmatter = {
|
|
8223
|
-
targets: ["
|
|
8216
|
+
targets: ["*"],
|
|
8224
8217
|
name: name ?? (0, import_node_path71.basename)(this.getRelativeFilePath(), ".md"),
|
|
8225
8218
|
description,
|
|
8226
8219
|
opencode: { mode, ...opencodeSection }
|
|
@@ -13717,7 +13710,7 @@ async function mcpCommand({ version }) {
|
|
|
13717
13710
|
}
|
|
13718
13711
|
|
|
13719
13712
|
// src/cli/index.ts
|
|
13720
|
-
var getVersion = () => "5.
|
|
13713
|
+
var getVersion = () => "5.6.0";
|
|
13721
13714
|
var main = async () => {
|
|
13722
13715
|
const program = new import_commander.Command();
|
|
13723
13716
|
const version = getVersion();
|
package/dist/index.js
CHANGED
|
@@ -87,7 +87,7 @@ import { resolve as resolve2 } from "path";
|
|
|
87
87
|
|
|
88
88
|
// src/utils/file.ts
|
|
89
89
|
import { kebabCase } from "es-toolkit";
|
|
90
|
-
import {
|
|
90
|
+
import { globbySync } from "globby";
|
|
91
91
|
import { mkdir, readdir, readFile, rm, stat, writeFile } from "fs/promises";
|
|
92
92
|
import os from "os";
|
|
93
93
|
import { dirname, join, relative, resolve } from "path";
|
|
@@ -170,17 +170,10 @@ async function listDirectoryFiles(dir) {
|
|
|
170
170
|
}
|
|
171
171
|
async function findFilesByGlobs(globs, options = {}) {
|
|
172
172
|
const { type = "all" } = options;
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
case "dir":
|
|
178
|
-
return items.filter((item) => item.isDirectory()).map((item) => join(item.parentPath, item.name));
|
|
179
|
-
case "all":
|
|
180
|
-
return items.map((item) => join(item.parentPath, item.name));
|
|
181
|
-
default:
|
|
182
|
-
throw new Error(`Invalid type: ${type}`);
|
|
183
|
-
}
|
|
173
|
+
const globbyOptions = type === "file" ? { onlyFiles: true, onlyDirectories: false } : type === "dir" ? { onlyFiles: false, onlyDirectories: true } : { onlyFiles: false, onlyDirectories: false };
|
|
174
|
+
const normalizedGlobs = Array.isArray(globs) ? globs.map((g) => g.replaceAll("\\", "/")) : globs.replaceAll("\\", "/");
|
|
175
|
+
const results = globbySync(normalizedGlobs, { absolute: true, ...globbyOptions });
|
|
176
|
+
return results.toSorted();
|
|
184
177
|
}
|
|
185
178
|
async function removeDirectory(dirPath) {
|
|
186
179
|
const dangerousPaths = [".", "/", "~", "src", "node_modules"];
|
|
@@ -7879,7 +7872,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
|
|
|
7879
7872
|
...restFields
|
|
7880
7873
|
};
|
|
7881
7874
|
const rulesyncFrontmatter = {
|
|
7882
|
-
targets: ["
|
|
7875
|
+
targets: ["*"],
|
|
7883
7876
|
name,
|
|
7884
7877
|
description,
|
|
7885
7878
|
// Only include claudecode section if there are fields
|
|
@@ -8040,7 +8033,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
|
|
|
8040
8033
|
toRulesyncSubagent() {
|
|
8041
8034
|
const { name, description, tools, ...rest } = this.frontmatter;
|
|
8042
8035
|
const rulesyncFrontmatter = {
|
|
8043
|
-
targets: ["
|
|
8036
|
+
targets: ["*"],
|
|
8044
8037
|
name,
|
|
8045
8038
|
description,
|
|
8046
8039
|
copilot: {
|
|
@@ -8197,7 +8190,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends ToolSubagent {
|
|
|
8197
8190
|
toRulesyncSubagent() {
|
|
8198
8191
|
const { description, mode, name, ...opencodeSection } = this.frontmatter;
|
|
8199
8192
|
const rulesyncFrontmatter = {
|
|
8200
|
-
targets: ["
|
|
8193
|
+
targets: ["*"],
|
|
8201
8194
|
name: name ?? basename20(this.getRelativeFilePath(), ".md"),
|
|
8202
8195
|
description,
|
|
8203
8196
|
opencode: { mode, ...opencodeSection }
|
|
@@ -13694,7 +13687,7 @@ async function mcpCommand({ version }) {
|
|
|
13694
13687
|
}
|
|
13695
13688
|
|
|
13696
13689
|
// src/cli/index.ts
|
|
13697
|
-
var getVersion = () => "5.
|
|
13690
|
+
var getVersion = () => "5.6.0";
|
|
13698
13691
|
var main = async () => {
|
|
13699
13692
|
const program = new Command();
|
|
13700
13693
|
const version = getVersion();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rulesync",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"effect": "3.19.14",
|
|
45
45
|
"es-toolkit": "1.44.0",
|
|
46
46
|
"fastmcp": "3.27.0",
|
|
47
|
+
"globby": "16.1.0",
|
|
47
48
|
"gray-matter": "4.0.3",
|
|
48
49
|
"js-yaml": "4.1.1",
|
|
49
50
|
"jsonc-parser": "3.3.1",
|