rulesync 1.1.0 → 1.2.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 CHANGED
@@ -61,7 +61,7 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
61
61
  | Codex CLI | ✅ | ✅ | | 🎮 | 🎮 |
62
62
  | Gemini CLI | ✅ | ✅ | | ✅ | 🎮 |
63
63
  | GitHub Copilot | ✅ | | ✅ | 🎮 | 🎮 |
64
- | Cursor | ✅ | ✅ | ✅ | 🎮 | 🎮 |
64
+ | Cursor | ✅ | ✅ | ✅ | | 🎮 |
65
65
  | OpenCode | ✅ | | | | |
66
66
  | Cline | ✅ | ✅ | ✅ | | |
67
67
  | Roo Code | ✅ | ✅ | ✅ | ✅ | 🎮 |
package/dist/index.cjs CHANGED
@@ -818,20 +818,51 @@ var CopilotCommand = class _CopilotCommand extends SimulatedCommand {
818
818
 
819
819
  // src/commands/cursor-command.ts
820
820
  var import_node_path8 = require("path");
821
- var CursorCommand = class _CursorCommand extends SimulatedCommand {
821
+ var CursorCommand = class _CursorCommand extends ToolCommand {
822
822
  static getSettablePaths() {
823
823
  return {
824
824
  relativeDirPath: ".cursor/commands"
825
825
  };
826
826
  }
827
+ toRulesyncCommand() {
828
+ const rulesyncFrontmatter = {
829
+ targets: ["*"],
830
+ description: ""
831
+ };
832
+ return new RulesyncCommand({
833
+ baseDir: this.baseDir,
834
+ frontmatter: rulesyncFrontmatter,
835
+ body: this.getFileContent(),
836
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
837
+ relativeFilePath: this.relativeFilePath,
838
+ fileContent: this.getFileContent(),
839
+ validate: true
840
+ });
841
+ }
827
842
  static fromRulesyncCommand({
828
843
  baseDir = ".",
829
844
  rulesyncCommand,
830
845
  validate = true
831
846
  }) {
832
- return new _CursorCommand(
833
- this.fromRulesyncCommandDefault({ baseDir, rulesyncCommand, validate })
834
- );
847
+ return new _CursorCommand({
848
+ baseDir,
849
+ fileContent: rulesyncCommand.getBody(),
850
+ relativeDirPath: _CursorCommand.getSettablePaths().relativeDirPath,
851
+ relativeFilePath: rulesyncCommand.getRelativeFilePath(),
852
+ validate
853
+ });
854
+ }
855
+ validate() {
856
+ return { success: true, error: null };
857
+ }
858
+ getBody() {
859
+ return this.getFileContent();
860
+ }
861
+ static isTargetedByRulesyncCommand(rulesyncCommand) {
862
+ return this.isTargetedByRulesyncCommandDefault({
863
+ rulesyncCommand,
864
+ toolTarget: "cursor"
865
+ });
835
866
  }
836
867
  static async fromFile({
837
868
  baseDir = ".",
@@ -844,26 +875,15 @@ var CursorCommand = class _CursorCommand extends SimulatedCommand {
844
875
  relativeFilePath
845
876
  );
846
877
  const fileContent = await readFileContent(filePath);
847
- const { frontmatter, body: content } = parseFrontmatter(fileContent);
848
- const result = SimulatedCommandFrontmatterSchema.safeParse(frontmatter);
849
- if (!result.success) {
850
- throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
851
- }
878
+ const { body: content } = parseFrontmatter(fileContent);
852
879
  return new _CursorCommand({
853
880
  baseDir,
854
881
  relativeDirPath: _CursorCommand.getSettablePaths().relativeDirPath,
855
882
  relativeFilePath: (0, import_node_path8.basename)(relativeFilePath),
856
- frontmatter: result.data,
857
- body: content.trim(),
883
+ fileContent: content.trim(),
858
884
  validate
859
885
  });
860
886
  }
861
- static isTargetedByRulesyncCommand(rulesyncCommand) {
862
- return this.isTargetedByRulesyncCommandDefault({
863
- rulesyncCommand,
864
- toolTarget: "cursor"
865
- });
866
- }
867
887
  };
868
888
 
869
889
  // src/commands/geminicli-command.ts
@@ -897,7 +917,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
897
917
  prompt: validated.prompt
898
918
  };
899
919
  } catch (error) {
900
- throw new Error(`Failed to parse TOML command file: ${error}`);
920
+ throw new Error(`Failed to parse TOML command file: ${error}`, { cause: error });
901
921
  }
902
922
  }
903
923
  getBody() {
@@ -1105,7 +1125,7 @@ var commandsProcessorToolTargets = [
1105
1125
  "codexcli"
1106
1126
  ];
1107
1127
  var CommandsProcessorToolTargetSchema = import_mini8.z.enum(commandsProcessorToolTargets);
1108
- var commandsProcessorToolTargetsSimulated = ["copilot", "cursor", "codexcli"];
1128
+ var commandsProcessorToolTargetsSimulated = ["copilot", "codexcli"];
1109
1129
  var CommandsProcessor = class extends FeatureProcessor {
1110
1130
  toolTarget;
1111
1131
  constructor({
@@ -1871,7 +1891,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1871
1891
  static getSettablePaths() {
1872
1892
  return {
1873
1893
  relativeDirPath: ".",
1874
- relativeFilePath: ".aiexclude"
1894
+ relativeFilePath: ".geminiignore"
1875
1895
  };
1876
1896
  }
1877
1897
  toRulesyncIgnore() {
@@ -6325,7 +6345,7 @@ var getVersion = async () => {
6325
6345
  const packageJson = await readJsonFile(packageJsonPath);
6326
6346
  return packageJson.version;
6327
6347
  } catch {
6328
- return "1.1.0";
6348
+ return "1.2.0";
6329
6349
  }
6330
6350
  };
6331
6351
  var main = async () => {
package/dist/index.js CHANGED
@@ -795,20 +795,51 @@ var CopilotCommand = class _CopilotCommand extends SimulatedCommand {
795
795
 
796
796
  // src/commands/cursor-command.ts
797
797
  import { basename as basename7, join as join7 } from "path";
798
- var CursorCommand = class _CursorCommand extends SimulatedCommand {
798
+ var CursorCommand = class _CursorCommand extends ToolCommand {
799
799
  static getSettablePaths() {
800
800
  return {
801
801
  relativeDirPath: ".cursor/commands"
802
802
  };
803
803
  }
804
+ toRulesyncCommand() {
805
+ const rulesyncFrontmatter = {
806
+ targets: ["*"],
807
+ description: ""
808
+ };
809
+ return new RulesyncCommand({
810
+ baseDir: this.baseDir,
811
+ frontmatter: rulesyncFrontmatter,
812
+ body: this.getFileContent(),
813
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
814
+ relativeFilePath: this.relativeFilePath,
815
+ fileContent: this.getFileContent(),
816
+ validate: true
817
+ });
818
+ }
804
819
  static fromRulesyncCommand({
805
820
  baseDir = ".",
806
821
  rulesyncCommand,
807
822
  validate = true
808
823
  }) {
809
- return new _CursorCommand(
810
- this.fromRulesyncCommandDefault({ baseDir, rulesyncCommand, validate })
811
- );
824
+ return new _CursorCommand({
825
+ baseDir,
826
+ fileContent: rulesyncCommand.getBody(),
827
+ relativeDirPath: _CursorCommand.getSettablePaths().relativeDirPath,
828
+ relativeFilePath: rulesyncCommand.getRelativeFilePath(),
829
+ validate
830
+ });
831
+ }
832
+ validate() {
833
+ return { success: true, error: null };
834
+ }
835
+ getBody() {
836
+ return this.getFileContent();
837
+ }
838
+ static isTargetedByRulesyncCommand(rulesyncCommand) {
839
+ return this.isTargetedByRulesyncCommandDefault({
840
+ rulesyncCommand,
841
+ toolTarget: "cursor"
842
+ });
812
843
  }
813
844
  static async fromFile({
814
845
  baseDir = ".",
@@ -821,26 +852,15 @@ var CursorCommand = class _CursorCommand extends SimulatedCommand {
821
852
  relativeFilePath
822
853
  );
823
854
  const fileContent = await readFileContent(filePath);
824
- const { frontmatter, body: content } = parseFrontmatter(fileContent);
825
- const result = SimulatedCommandFrontmatterSchema.safeParse(frontmatter);
826
- if (!result.success) {
827
- throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
828
- }
855
+ const { body: content } = parseFrontmatter(fileContent);
829
856
  return new _CursorCommand({
830
857
  baseDir,
831
858
  relativeDirPath: _CursorCommand.getSettablePaths().relativeDirPath,
832
859
  relativeFilePath: basename7(relativeFilePath),
833
- frontmatter: result.data,
834
- body: content.trim(),
860
+ fileContent: content.trim(),
835
861
  validate
836
862
  });
837
863
  }
838
- static isTargetedByRulesyncCommand(rulesyncCommand) {
839
- return this.isTargetedByRulesyncCommandDefault({
840
- rulesyncCommand,
841
- toolTarget: "cursor"
842
- });
843
- }
844
864
  };
845
865
 
846
866
  // src/commands/geminicli-command.ts
@@ -874,7 +894,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
874
894
  prompt: validated.prompt
875
895
  };
876
896
  } catch (error) {
877
- throw new Error(`Failed to parse TOML command file: ${error}`);
897
+ throw new Error(`Failed to parse TOML command file: ${error}`, { cause: error });
878
898
  }
879
899
  }
880
900
  getBody() {
@@ -1082,7 +1102,7 @@ var commandsProcessorToolTargets = [
1082
1102
  "codexcli"
1083
1103
  ];
1084
1104
  var CommandsProcessorToolTargetSchema = z8.enum(commandsProcessorToolTargets);
1085
- var commandsProcessorToolTargetsSimulated = ["copilot", "cursor", "codexcli"];
1105
+ var commandsProcessorToolTargetsSimulated = ["copilot", "codexcli"];
1086
1106
  var CommandsProcessor = class extends FeatureProcessor {
1087
1107
  toolTarget;
1088
1108
  constructor({
@@ -1848,7 +1868,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1848
1868
  static getSettablePaths() {
1849
1869
  return {
1850
1870
  relativeDirPath: ".",
1851
- relativeFilePath: ".aiexclude"
1871
+ relativeFilePath: ".geminiignore"
1852
1872
  };
1853
1873
  }
1854
1874
  toRulesyncIgnore() {
@@ -6301,7 +6321,7 @@ var getVersion = async () => {
6301
6321
  const packageJson = await readJsonFile(packageJsonPath);
6302
6322
  return packageJson.version;
6303
6323
  } catch {
6304
- return "1.1.0";
6324
+ return "1.2.0";
6305
6325
  }
6306
6326
  };
6307
6327
  var main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "1.1.0",
3
+ "version": "1.2.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",
@@ -36,9 +36,9 @@
36
36
  "pre-commit": "pnpm exec lint-staged"
37
37
  },
38
38
  "dependencies": {
39
- "c12": "3.2.0",
39
+ "c12": "3.3.0",
40
40
  "chokidar": "4.0.3",
41
- "commander": "14.0.0",
41
+ "commander": "14.0.1",
42
42
  "consola": "3.4.2",
43
43
  "es-toolkit": "1.39.10",
44
44
  "fast-xml-parser": "5.2.5",
@@ -46,37 +46,37 @@
46
46
  "js-yaml": "4.1.0",
47
47
  "micromatch": "4.0.8",
48
48
  "smol-toml": "1.4.2",
49
- "zod": "4.1.5"
49
+ "zod": "4.1.9"
50
50
  },
51
51
  "devDependencies": {
52
- "@anthropic-ai/claude-code": "1.0.110",
53
- "@biomejs/biome": "2.2.3",
52
+ "@anthropic-ai/claude-code": "1.0.118",
53
+ "@biomejs/biome": "2.2.4",
54
54
  "@eslint/js": "9.35.0",
55
55
  "@secretlint/secretlint-rule-preset-recommend": "11.2.4",
56
56
  "@tsconfig/node24": "24.0.1",
57
57
  "@types/js-yaml": "4.0.9",
58
58
  "@types/micromatch": "4.0.9",
59
- "@types/node": "24.3.1",
60
- "@typescript/native-preview": "7.0.0-dev.20250909.1",
59
+ "@types/node": "24.5.2",
60
+ "@typescript/native-preview": "7.0.0-dev.20250918.1",
61
61
  "@vitest/coverage-v8": "3.2.4",
62
62
  "cspell": "9.2.1",
63
63
  "eslint": "9.35.0",
64
64
  "eslint-plugin-import": "2.32.0",
65
65
  "eslint-plugin-no-type-assertion": "1.3.0",
66
- "eslint-plugin-oxlint": "1.14.0",
67
- "eslint-plugin-strict-dependencies": "1.3.22",
66
+ "eslint-plugin-oxlint": "1.16.0",
67
+ "eslint-plugin-strict-dependencies": "1.3.24",
68
68
  "eslint-plugin-zod-import": "0.3.0",
69
69
  "knip": "5.63.1",
70
70
  "lint-staged": "16.1.6",
71
71
  "o3-search-mcp": "0.0.9",
72
- "oxlint": "1.14.0",
72
+ "oxlint": "1.16.0",
73
73
  "secretlint": "11.2.4",
74
74
  "simple-git-hooks": "2.13.1",
75
75
  "sort-package-json": "3.4.0",
76
76
  "tsup": "8.5.0",
77
77
  "tsx": "4.20.5",
78
78
  "typescript": "5.9.2",
79
- "typescript-eslint": "8.43.0",
79
+ "typescript-eslint": "8.44.0",
80
80
  "vitest": "3.2.4"
81
81
  },
82
82
  "engines": {