rulesync 7.30.0 → 8.1.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
@@ -24,6 +24,7 @@ import {
24
24
  RULESYNC_HOOKS_FILE_NAME,
25
25
  RULESYNC_HOOKS_RELATIVE_FILE_PATH,
26
26
  RULESYNC_IGNORE_RELATIVE_FILE_PATH,
27
+ RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH,
27
28
  RULESYNC_MCP_FILE_NAME,
28
29
  RULESYNC_MCP_RELATIVE_FILE_PATH,
29
30
  RULESYNC_MCP_SCHEMA_URL,
@@ -72,7 +73,7 @@ import {
72
73
  stringifyFrontmatter,
73
74
  toPosixPath,
74
75
  writeFileContent
75
- } from "../chunk-IGW5DFPU.js";
76
+ } from "../chunk-FLZZ3LEK.js";
76
77
 
77
78
  // src/cli/index.ts
78
79
  import { Command } from "commander";
@@ -1196,6 +1197,7 @@ var GITIGNORE_ENTRY_REGISTRY = [
1196
1197
  feature: "general",
1197
1198
  entry: "**/.claude/settings.local.json"
1198
1199
  },
1200
+ { target: "claudecode", feature: "general", entry: "**/.claude/*.lock" },
1199
1201
  // Cline
1200
1202
  { target: "cline", feature: "rules", entry: "**/.clinerules/" },
1201
1203
  { target: "cline", feature: "commands", entry: "**/.clinerules/workflows/" },
@@ -1304,6 +1306,11 @@ var GITIGNORE_ENTRY_REGISTRY = [
1304
1306
  { target: "opencode", feature: "skills", entry: "**/.opencode/skill/" },
1305
1307
  { target: "opencode", feature: "mcp", entry: "**/.opencode/plugins/" },
1306
1308
  { target: "opencode", feature: "general", entry: "**/.opencode/memories/" },
1309
+ {
1310
+ target: "opencode",
1311
+ feature: "general",
1312
+ entry: "**/.opencode/package-lock.json"
1313
+ },
1307
1314
  // Qwen Code
1308
1315
  { target: "qwencode", feature: "rules", entry: "**/QWEN.md" },
1309
1316
  { target: "qwencode", feature: "general", entry: "**/.qwen/memories/" },
@@ -1613,7 +1620,8 @@ async function createConfigFile() {
1613
1620
  global: false,
1614
1621
  simulateCommands: false,
1615
1622
  simulateSubagents: false,
1616
- simulateSkills: false
1623
+ simulateSkills: false,
1624
+ gitignoreTargetsOnly: true
1617
1625
  },
1618
1626
  null,
1619
1627
  2
@@ -4078,6 +4086,31 @@ async function mcpCommand(logger5, { version }) {
4078
4086
  });
4079
4087
  }
4080
4088
 
4089
+ // src/cli/commands/resolve-gitignore-targets.ts
4090
+ import { join as join13 } from "path";
4091
+ var resolveGitignoreTargets = async ({
4092
+ cliTargets,
4093
+ cwd = process.cwd()
4094
+ }) => {
4095
+ if (cliTargets !== void 0) {
4096
+ return cliTargets;
4097
+ }
4098
+ const baseConfigPath = join13(cwd, RULESYNC_CONFIG_RELATIVE_FILE_PATH);
4099
+ const localConfigPath = join13(cwd, RULESYNC_LOCAL_CONFIG_RELATIVE_FILE_PATH);
4100
+ const [hasBase, hasLocal] = await Promise.all([
4101
+ fileExists(baseConfigPath),
4102
+ fileExists(localConfigPath)
4103
+ ]);
4104
+ if (!hasBase && !hasLocal) {
4105
+ return void 0;
4106
+ }
4107
+ const config = await ConfigResolver.resolve({});
4108
+ if (config.getGitignoreTargetsOnly()) {
4109
+ return config.getTargets();
4110
+ }
4111
+ return void 0;
4112
+ };
4113
+
4081
4114
  // src/lib/update.ts
4082
4115
  import * as crypto from "crypto";
4083
4116
  import * as fs from "fs";
@@ -4480,7 +4513,7 @@ function wrapCommand({
4480
4513
  }
4481
4514
 
4482
4515
  // src/cli/index.ts
4483
- var getVersion = () => "7.30.0";
4516
+ var getVersion = () => "8.1.0";
4484
4517
  function wrapCommand2(name, errorCode, handler) {
4485
4518
  return wrapCommand({ name, errorCode, handler, getVersion });
4486
4519
  }
@@ -4503,11 +4536,12 @@ var main = async () => {
4503
4536
  parseCommaSeparatedList
4504
4537
  ).option("-V, --verbose", "Verbose output").option("-s, --silent", "Suppress all output").action(
4505
4538
  wrapCommand2("gitignore", "GITIGNORE_FAILED", async (logger5, options) => {
4539
+ const cliTargets = options.targets;
4540
+ const cliFeatures = options.features;
4541
+ const resolvedTargets = await resolveGitignoreTargets({ cliTargets });
4506
4542
  await gitignoreCommand(logger5, {
4507
- // eslint-disable-next-line no-type-assertion/no-type-assertion
4508
- targets: options.targets,
4509
- // eslint-disable-next-line no-type-assertion/no-type-assertion
4510
- features: options.features
4543
+ targets: resolvedTargets ? [...resolvedTargets] : void 0,
4544
+ features: cliFeatures
4511
4545
  });
4512
4546
  })
4513
4547
  );