rulesync 8.22.0 → 8.23.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 +1 -1
- package/dist/{chunk-5UYENRC6.js → chunk-G2YWSXTU.js} +995 -608
- package/dist/cli/index.cjs +1409 -1006
- package/dist/cli/index.js +24 -8
- package/dist/index.cjs +1023 -636
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
stringifyFrontmatter,
|
|
80
80
|
toPosixPath,
|
|
81
81
|
writeFileContent
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-G2YWSXTU.js";
|
|
83
83
|
|
|
84
84
|
// src/cli/index.ts
|
|
85
85
|
import { Command } from "commander";
|
|
@@ -1507,7 +1507,15 @@ var GITIGNORE_ENTRY_REGISTRY = [
|
|
|
1507
1507
|
{ target: "windsurf", feature: "skills", entry: "**/.codeium/windsurf/skills/" },
|
|
1508
1508
|
// Warp
|
|
1509
1509
|
{ target: "warp", feature: "rules", entry: "**/.warp/" },
|
|
1510
|
-
{ target: "warp", feature: "rules", entry: "**/WARP.md" }
|
|
1510
|
+
{ target: "warp", feature: "rules", entry: "**/WARP.md" },
|
|
1511
|
+
// Zed
|
|
1512
|
+
// `.rules` is the project rules file. `.agents/skills/` is shared with the
|
|
1513
|
+
// antigravity targets (already registered above); re-tagging it for `zed`
|
|
1514
|
+
// ensures target-filtered gitignore runs still include it.
|
|
1515
|
+
// No entry for `.zed/settings.json` (MCP / ignore): it is a user-managed
|
|
1516
|
+
// file, like other tools' settings.json, so it is intentionally not ignored.
|
|
1517
|
+
{ target: "zed", feature: "rules", entry: "**/.rules" },
|
|
1518
|
+
{ target: "zed", feature: "skills", entry: "**/.agents/skills/" }
|
|
1511
1519
|
];
|
|
1512
1520
|
var ALL_GITIGNORE_ENTRIES = (() => {
|
|
1513
1521
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -3284,7 +3292,7 @@ import { Semaphore as Semaphore4 } from "es-toolkit/promise";
|
|
|
3284
3292
|
|
|
3285
3293
|
// src/lib/git-client.ts
|
|
3286
3294
|
import { execFile } from "child_process";
|
|
3287
|
-
import { isAbsolute, join as join10, relative } from "path";
|
|
3295
|
+
import { isAbsolute, join as join10, posix as posix4, relative } from "path";
|
|
3288
3296
|
import { promisify } from "util";
|
|
3289
3297
|
var execFileAsync = promisify(execFile);
|
|
3290
3298
|
var GIT_TIMEOUT_MS = 6e4;
|
|
@@ -3385,6 +3393,8 @@ async function fetchSkillFiles(params) {
|
|
|
3385
3393
|
}
|
|
3386
3394
|
await checkGitAvailable();
|
|
3387
3395
|
const tmpDir = await createTempDirectory("rulesync-git-");
|
|
3396
|
+
const normalizedSkillsPath = posix4.normalize(skillsPath.replace(/\\/g, "/")).replace(/\/+$/, "");
|
|
3397
|
+
const isRootPath = normalizedSkillsPath === "" || normalizedSkillsPath === ".";
|
|
3388
3398
|
try {
|
|
3389
3399
|
await execFileAsync(
|
|
3390
3400
|
"git",
|
|
@@ -3402,11 +3412,17 @@ async function fetchSkillFiles(params) {
|
|
|
3402
3412
|
],
|
|
3403
3413
|
{ timeout: GIT_TIMEOUT_MS }
|
|
3404
3414
|
);
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3415
|
+
if (isRootPath) {
|
|
3416
|
+
await execFileAsync("git", ["-C", tmpDir, "sparse-checkout", "disable"], {
|
|
3417
|
+
timeout: GIT_TIMEOUT_MS
|
|
3418
|
+
});
|
|
3419
|
+
} else {
|
|
3420
|
+
await execFileAsync("git", ["-C", tmpDir, "sparse-checkout", "set", "--", skillsPath], {
|
|
3421
|
+
timeout: GIT_TIMEOUT_MS
|
|
3422
|
+
});
|
|
3423
|
+
}
|
|
3408
3424
|
await execFileAsync("git", ["-C", tmpDir, "checkout"], { timeout: GIT_TIMEOUT_MS });
|
|
3409
|
-
const skillsDir = join10(tmpDir, skillsPath);
|
|
3425
|
+
const skillsDir = isRootPath ? tmpDir : join10(tmpDir, skillsPath);
|
|
3410
3426
|
if (!await directoryExists(skillsDir)) return [];
|
|
3411
3427
|
return await walkDirectory(skillsDir, skillsDir, 0, { totalFiles: 0, totalSize: 0 }, logger5);
|
|
3412
3428
|
} catch (error) {
|
|
@@ -6515,7 +6531,7 @@ function wrapCommand({
|
|
|
6515
6531
|
}
|
|
6516
6532
|
|
|
6517
6533
|
// src/cli/index.ts
|
|
6518
|
-
var getVersion = () => "8.
|
|
6534
|
+
var getVersion = () => "8.23.0";
|
|
6519
6535
|
function wrapCommand2(name, errorCode, handler) {
|
|
6520
6536
|
return wrapCommand({ name, errorCode, handler, getVersion });
|
|
6521
6537
|
}
|