rulesync 7.25.0 → 7.27.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/cli/index.js CHANGED
@@ -71,7 +71,7 @@ import {
71
71
  stringifyFrontmatter,
72
72
  toPosixPath,
73
73
  writeFileContent
74
- } from "../chunk-XGT6BGPR.js";
74
+ } from "../chunk-AZJJUHWM.js";
75
75
 
76
76
  // src/cli/index.ts
77
77
  import { Command } from "commander";
@@ -1149,6 +1149,9 @@ async function generateCommand(logger5, options) {
1149
1149
  import { join as join2 } from "path";
1150
1150
 
1151
1151
  // src/cli/commands/gitignore-entries.ts
1152
+ var normalizeGitignoreEntryTargets = (target) => {
1153
+ return typeof target === "string" ? [target] : target;
1154
+ };
1152
1155
  var GITIGNORE_ENTRY_REGISTRY = [
1153
1156
  // Common / general
1154
1157
  {
@@ -1241,7 +1244,7 @@ var GITIGNORE_ENTRY_REGISTRY = [
1241
1244
  // Gemini CLI
1242
1245
  { target: "geminicli", feature: "rules", entry: "**/GEMINI.md" },
1243
1246
  { target: "geminicli", feature: "commands", entry: "**/.gemini/commands/" },
1244
- { target: "geminicli", feature: "subagents", entry: "**/.gemini/subagents/" },
1247
+ { target: "geminicli", feature: "subagents", entry: "**/.gemini/agents/" },
1245
1248
  { target: "geminicli", feature: "skills", entry: "**/.gemini/skills/" },
1246
1249
  { target: "geminicli", feature: "ignore", entry: "**/.geminiignore" },
1247
1250
  { target: "geminicli", feature: "general", entry: "**/.gemini/memories/" },
@@ -1251,11 +1254,15 @@ var GITIGNORE_ENTRY_REGISTRY = [
1251
1254
  { target: "goose", feature: "ignore", entry: "**/.gooseignore" },
1252
1255
  // GitHub Copilot
1253
1256
  {
1254
- target: "copilot",
1257
+ target: ["copilot", "copilotcli"],
1255
1258
  feature: "rules",
1256
1259
  entry: "**/.github/copilot-instructions.md"
1257
1260
  },
1258
- { target: "copilot", feature: "rules", entry: "**/.github/instructions/" },
1261
+ {
1262
+ target: ["copilot", "copilotcli"],
1263
+ feature: "rules",
1264
+ entry: "**/.github/instructions/"
1265
+ },
1259
1266
  { target: "copilot", feature: "commands", entry: "**/.github/prompts/" },
1260
1267
  { target: "copilot", feature: "subagents", entry: "**/.github/agents/" },
1261
1268
  { target: "copilot", feature: "skills", entry: "**/.github/skills/" },
@@ -1273,11 +1280,11 @@ var GITIGNORE_ENTRY_REGISTRY = [
1273
1280
  { target: "junie", feature: "skills", entry: "**/.junie/skills/" },
1274
1281
  { target: "junie", feature: "subagents", entry: "**/.junie/agents/" },
1275
1282
  // Kilo Code
1276
- { target: "kilo", feature: "rules", entry: "**/.kilocode/rules/" },
1277
- { target: "kilo", feature: "skills", entry: "**/.kilocode/skills/" },
1278
- { target: "kilo", feature: "commands", entry: "**/.kilocode/workflows/" },
1279
- { target: "kilo", feature: "mcp", entry: "**/.kilocode/mcp.json" },
1280
- { target: "kilo", feature: "ignore", entry: "**/.kilocodeignore" },
1283
+ { target: "kilo", feature: "rules", entry: "**/.kilo/rules/" },
1284
+ { target: "kilo", feature: "skills", entry: "**/.kilo/skills/" },
1285
+ { target: "kilo", feature: "commands", entry: "**/.kilo/workflows/" },
1286
+ { target: "kilo", feature: "mcp", entry: "**/.kilo/mcp.json" },
1287
+ { target: "kilo", feature: "ignore", entry: "**/.kiloignore" },
1281
1288
  // Kiro
1282
1289
  { target: "kiro", feature: "rules", entry: "**/.kiro/steering/" },
1283
1290
  { target: "kiro", feature: "commands", entry: "**/.kiro/prompts/" },
@@ -1324,12 +1331,21 @@ var ALL_GITIGNORE_ENTRIES = GITIGNORE_ENTRY_REGISTRY.map(
1324
1331
  (tag) => tag.entry
1325
1332
  );
1326
1333
  var isTargetSelected = (target, selectedTargets) => {
1327
- if (target === "common") return true;
1334
+ const targets = normalizeGitignoreEntryTargets(target);
1335
+ if (targets.includes("common")) return true;
1328
1336
  if (!selectedTargets || selectedTargets.length === 0) return true;
1329
1337
  if (selectedTargets.includes("*")) return true;
1330
- return selectedTargets.includes(target);
1338
+ return targets.some((candidate) => selectedTargets.includes(candidate));
1331
1339
  };
1332
- var isFeatureSelected = (feature, target, features) => {
1340
+ var getSelectedGitignoreEntryTargets = (target, selectedTargets) => {
1341
+ const targets = normalizeGitignoreEntryTargets(target);
1342
+ if (targets.includes("common")) return ["common"];
1343
+ if (!selectedTargets || selectedTargets.length === 0 || selectedTargets.includes("*")) {
1344
+ return targets;
1345
+ }
1346
+ return targets.filter((candidate) => selectedTargets.includes(candidate));
1347
+ };
1348
+ var isFeatureSelectedForTarget = (feature, target, features) => {
1333
1349
  if (feature === "general") return true;
1334
1350
  if (!features) return true;
1335
1351
  if (Array.isArray(features)) {
@@ -1343,6 +1359,11 @@ var isFeatureSelected = (feature, target, features) => {
1343
1359
  if (targetFeatures.includes("*")) return true;
1344
1360
  return targetFeatures.includes(feature);
1345
1361
  };
1362
+ var isFeatureSelected = (feature, target, features) => {
1363
+ return normalizeGitignoreEntryTargets(target).some(
1364
+ (candidate) => isFeatureSelectedForTarget(feature, candidate, features)
1365
+ );
1366
+ };
1346
1367
  var warnInvalidTargets = (targets, logger5) => {
1347
1368
  const validTargets = new Set(ALL_TOOL_TARGETS_WITH_WILDCARD);
1348
1369
  for (const target of targets) {
@@ -1389,7 +1410,8 @@ var filterGitignoreEntries = (params) => {
1389
1410
  const result = [];
1390
1411
  for (const tag of GITIGNORE_ENTRY_REGISTRY) {
1391
1412
  if (!isTargetSelected(tag.target, targets)) continue;
1392
- if (!isFeatureSelected(tag.feature, tag.target, features)) continue;
1413
+ const selectedTagTargets = getSelectedGitignoreEntryTargets(tag.target, targets);
1414
+ if (!isFeatureSelected(tag.feature, selectedTagTargets, features)) continue;
1393
1415
  if (seen.has(tag.entry)) continue;
1394
1416
  seen.add(tag.entry);
1395
1417
  result.push(tag.entry);
@@ -4438,7 +4460,7 @@ function wrapCommand({
4438
4460
  }
4439
4461
 
4440
4462
  // src/cli/index.ts
4441
- var getVersion = () => "7.25.0";
4463
+ var getVersion = () => "7.27.0";
4442
4464
  function wrapCommand2(name, errorCode, handler) {
4443
4465
  return wrapCommand({ name, errorCode, handler, getVersion });
4444
4466
  }