rulesync 8.21.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 +37 -29
- package/dist/{chunk-QA7BRQFA.js → chunk-G2YWSXTU.js} +2607 -926
- package/dist/cli/index.cjs +3007 -1280
- package/dist/cli/index.js +54 -8
- package/dist/index.cjs +2629 -948
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- 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";
|
|
@@ -1273,6 +1273,36 @@ var GITIGNORE_ENTRY_REGISTRY = [
|
|
|
1273
1273
|
// AGENTS.md
|
|
1274
1274
|
{ target: ["agentsmd", "pi"], feature: "rules", entry: "**/AGENTS.md" },
|
|
1275
1275
|
{ target: "agentsmd", feature: "rules", entry: "**/.agents/" },
|
|
1276
|
+
// Antigravity (IDE + CLI, Antigravity 2.0)
|
|
1277
|
+
// Both targets share the `.agents/` project tree; the CLI additionally
|
|
1278
|
+
// writes a root `GEMINI.md`. Global-scope paths (under the home directory)
|
|
1279
|
+
// are intentionally not gitignored.
|
|
1280
|
+
{
|
|
1281
|
+
target: ["antigravity-ide", "antigravity-cli"],
|
|
1282
|
+
feature: "rules",
|
|
1283
|
+
entry: "**/.agents/rules/"
|
|
1284
|
+
},
|
|
1285
|
+
{ target: "antigravity-cli", feature: "rules", entry: "**/GEMINI.md" },
|
|
1286
|
+
{
|
|
1287
|
+
target: "antigravity-ide",
|
|
1288
|
+
feature: "commands",
|
|
1289
|
+
entry: "**/.agents/workflows/"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
target: ["antigravity-ide", "antigravity-cli"],
|
|
1293
|
+
feature: "skills",
|
|
1294
|
+
entry: "**/.agents/skills/"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
target: ["antigravity-ide", "antigravity-cli"],
|
|
1298
|
+
feature: "mcp",
|
|
1299
|
+
entry: "**/.agents/mcp_config.json"
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
target: ["antigravity-ide", "antigravity-cli"],
|
|
1303
|
+
feature: "hooks",
|
|
1304
|
+
entry: "**/.agents/hooks.json"
|
|
1305
|
+
},
|
|
1276
1306
|
// Augment Code
|
|
1277
1307
|
{ target: "augmentcode", feature: "rules", entry: "**/.augment/rules/" },
|
|
1278
1308
|
{ target: "augmentcode", feature: "rules", entry: "**/.augment-guidelines" },
|
|
@@ -1477,7 +1507,15 @@ var GITIGNORE_ENTRY_REGISTRY = [
|
|
|
1477
1507
|
{ target: "windsurf", feature: "skills", entry: "**/.codeium/windsurf/skills/" },
|
|
1478
1508
|
// Warp
|
|
1479
1509
|
{ target: "warp", feature: "rules", entry: "**/.warp/" },
|
|
1480
|
-
{ 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/" }
|
|
1481
1519
|
];
|
|
1482
1520
|
var ALL_GITIGNORE_ENTRIES = (() => {
|
|
1483
1521
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -3254,7 +3292,7 @@ import { Semaphore as Semaphore4 } from "es-toolkit/promise";
|
|
|
3254
3292
|
|
|
3255
3293
|
// src/lib/git-client.ts
|
|
3256
3294
|
import { execFile } from "child_process";
|
|
3257
|
-
import { isAbsolute, join as join10, relative } from "path";
|
|
3295
|
+
import { isAbsolute, join as join10, posix as posix4, relative } from "path";
|
|
3258
3296
|
import { promisify } from "util";
|
|
3259
3297
|
var execFileAsync = promisify(execFile);
|
|
3260
3298
|
var GIT_TIMEOUT_MS = 6e4;
|
|
@@ -3355,6 +3393,8 @@ async function fetchSkillFiles(params) {
|
|
|
3355
3393
|
}
|
|
3356
3394
|
await checkGitAvailable();
|
|
3357
3395
|
const tmpDir = await createTempDirectory("rulesync-git-");
|
|
3396
|
+
const normalizedSkillsPath = posix4.normalize(skillsPath.replace(/\\/g, "/")).replace(/\/+$/, "");
|
|
3397
|
+
const isRootPath = normalizedSkillsPath === "" || normalizedSkillsPath === ".";
|
|
3358
3398
|
try {
|
|
3359
3399
|
await execFileAsync(
|
|
3360
3400
|
"git",
|
|
@@ -3372,11 +3412,17 @@ async function fetchSkillFiles(params) {
|
|
|
3372
3412
|
],
|
|
3373
3413
|
{ timeout: GIT_TIMEOUT_MS }
|
|
3374
3414
|
);
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
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
|
+
}
|
|
3378
3424
|
await execFileAsync("git", ["-C", tmpDir, "checkout"], { timeout: GIT_TIMEOUT_MS });
|
|
3379
|
-
const skillsDir = join10(tmpDir, skillsPath);
|
|
3425
|
+
const skillsDir = isRootPath ? tmpDir : join10(tmpDir, skillsPath);
|
|
3380
3426
|
if (!await directoryExists(skillsDir)) return [];
|
|
3381
3427
|
return await walkDirectory(skillsDir, skillsDir, 0, { totalFiles: 0, totalSize: 0 }, logger5);
|
|
3382
3428
|
} catch (error) {
|
|
@@ -6485,7 +6531,7 @@ function wrapCommand({
|
|
|
6485
6531
|
}
|
|
6486
6532
|
|
|
6487
6533
|
// src/cli/index.ts
|
|
6488
|
-
var getVersion = () => "8.
|
|
6534
|
+
var getVersion = () => "8.23.0";
|
|
6489
6535
|
function wrapCommand2(name, errorCode, handler) {
|
|
6490
6536
|
return wrapCommand({ name, errorCode, handler, getVersion });
|
|
6491
6537
|
}
|