rulesync 0.68.1 → 0.69.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/index.cjs CHANGED
@@ -52,6 +52,7 @@ var ALL_TOOL_TARGETS = [
52
52
  "geminicli",
53
53
  "kiro",
54
54
  "junie",
55
+ "warp",
55
56
  "windsurf"
56
57
  ];
57
58
  var ALL_TOOL_TARGETS_WITH_WILDCARD = [...ALL_TOOL_TARGETS, "*"];
@@ -3060,6 +3061,55 @@ var RooRule = class _RooRule extends ToolRule {
3060
3061
  }
3061
3062
  };
3062
3063
 
3064
+ // src/rules/warp-rule.ts
3065
+ var WarpRule = class _WarpRule extends ToolRule {
3066
+ constructor({ fileContent, root, ...rest }) {
3067
+ super({
3068
+ ...rest,
3069
+ fileContent,
3070
+ root: root ?? false
3071
+ });
3072
+ }
3073
+ static async fromFilePath({
3074
+ baseDir = ".",
3075
+ relativeFilePath,
3076
+ filePath,
3077
+ validate = true
3078
+ }) {
3079
+ const fileContent = await readFileContent(filePath);
3080
+ const isRoot = relativeFilePath === "WARP.md";
3081
+ return new _WarpRule({
3082
+ baseDir,
3083
+ relativeDirPath: isRoot ? "." : ".warp",
3084
+ relativeFilePath: isRoot ? "WARP.md" : relativeFilePath,
3085
+ fileContent,
3086
+ validate,
3087
+ root: isRoot
3088
+ });
3089
+ }
3090
+ static fromRulesyncRule({
3091
+ baseDir = ".",
3092
+ rulesyncRule,
3093
+ validate = true
3094
+ }) {
3095
+ return new _WarpRule(
3096
+ this.buildToolRuleParamsDefault({
3097
+ baseDir,
3098
+ rulesyncRule,
3099
+ validate,
3100
+ rootPath: { relativeDirPath: ".", relativeFilePath: "WARP.md" },
3101
+ nonRootPath: { relativeDirPath: ".warp/memories" }
3102
+ })
3103
+ );
3104
+ }
3105
+ toRulesyncRule() {
3106
+ return this.toRulesyncRuleDefault();
3107
+ }
3108
+ validate() {
3109
+ return { success: true, error: null };
3110
+ }
3111
+ };
3112
+
3063
3113
  // src/rules/windsurf-rule.ts
3064
3114
  var WindsurfRule = class _WindsurfRule extends ToolRule {
3065
3115
  static async fromFilePath(params) {
@@ -3110,6 +3160,7 @@ var rulesProcessorToolTargets = [
3110
3160
  "opencode",
3111
3161
  "qwencode",
3112
3162
  "roo",
3163
+ "warp",
3113
3164
  "windsurf"
3114
3165
  ];
3115
3166
  var RulesProcessorToolTargetSchema = import_mini16.z.enum(rulesProcessorToolTargets);
@@ -3218,6 +3269,12 @@ var RulesProcessor = class extends FeatureProcessor {
3218
3269
  rulesyncRule,
3219
3270
  validate: true
3220
3271
  });
3272
+ case "warp":
3273
+ return WarpRule.fromRulesyncRule({
3274
+ baseDir: this.baseDir,
3275
+ rulesyncRule,
3276
+ validate: true
3277
+ });
3221
3278
  case "windsurf":
3222
3279
  return WindsurfRule.fromRulesyncRule({
3223
3280
  baseDir: this.baseDir,
@@ -3296,6 +3353,13 @@ var RulesProcessor = class extends FeatureProcessor {
3296
3353
  );
3297
3354
  return toolRules;
3298
3355
  }
3356
+ case "warp": {
3357
+ const rootRule = toolRules[rootRuleIndex];
3358
+ rootRule?.setFileContent(
3359
+ this.generateXmlReferencesSection(toolRules) + rootRule.getFileContent()
3360
+ );
3361
+ return toolRules;
3362
+ }
3299
3363
  default:
3300
3364
  return toolRules;
3301
3365
  }
@@ -3401,6 +3465,8 @@ var RulesProcessor = class extends FeatureProcessor {
3401
3465
  return await this.loadQwencodeRules();
3402
3466
  case "roo":
3403
3467
  return await this.loadRooRules();
3468
+ case "warp":
3469
+ return await this.loadWarpRules();
3404
3470
  case "windsurf":
3405
3471
  return await this.loadWindsurfRules();
3406
3472
  default:
@@ -3435,6 +3501,31 @@ var RulesProcessor = class extends FeatureProcessor {
3435
3501
  return [];
3436
3502
  }
3437
3503
  }
3504
+ async loadWarpRules() {
3505
+ const rootFilePaths = await findFilesByGlobs((0, import_node_path12.join)(this.baseDir, "WARP.md"));
3506
+ const nonRootFilePaths = await findFilesByGlobs((0, import_node_path12.join)(this.baseDir, ".warp/memories/*.md"));
3507
+ const rootFiles = await Promise.all(
3508
+ rootFilePaths.map(
3509
+ (filePath) => WarpRule.fromFilePath({
3510
+ filePath,
3511
+ validate: true,
3512
+ relativeDirPath: ".",
3513
+ relativeFilePath: "WARP.md"
3514
+ })
3515
+ )
3516
+ );
3517
+ const nonRootFiles = await Promise.all(
3518
+ nonRootFilePaths.map(
3519
+ (filePath) => WarpRule.fromFilePath({
3520
+ filePath,
3521
+ validate: true,
3522
+ relativeDirPath: ".warp/memories",
3523
+ relativeFilePath: (0, import_node_path12.basename)(filePath)
3524
+ })
3525
+ )
3526
+ );
3527
+ return [...rootFiles, ...nonRootFiles];
3528
+ }
3438
3529
  /**
3439
3530
  * Load Amazon Q Developer CLI rule configurations from .amazonq/rules/ directory
3440
3531
  */
@@ -4755,7 +4846,7 @@ var getVersion = async () => {
4755
4846
  const packageJson = await readJsonFile(packageJsonPath);
4756
4847
  return packageJson.version;
4757
4848
  } catch {
4758
- return "0.68.1";
4849
+ return "0.69.0";
4759
4850
  }
4760
4851
  };
4761
4852
  var main = async () => {
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ var ALL_TOOL_TARGETS = [
29
29
  "geminicli",
30
30
  "kiro",
31
31
  "junie",
32
+ "warp",
32
33
  "windsurf"
33
34
  ];
34
35
  var ALL_TOOL_TARGETS_WITH_WILDCARD = [...ALL_TOOL_TARGETS, "*"];
@@ -3037,6 +3038,55 @@ var RooRule = class _RooRule extends ToolRule {
3037
3038
  }
3038
3039
  };
3039
3040
 
3041
+ // src/rules/warp-rule.ts
3042
+ var WarpRule = class _WarpRule extends ToolRule {
3043
+ constructor({ fileContent, root, ...rest }) {
3044
+ super({
3045
+ ...rest,
3046
+ fileContent,
3047
+ root: root ?? false
3048
+ });
3049
+ }
3050
+ static async fromFilePath({
3051
+ baseDir = ".",
3052
+ relativeFilePath,
3053
+ filePath,
3054
+ validate = true
3055
+ }) {
3056
+ const fileContent = await readFileContent(filePath);
3057
+ const isRoot = relativeFilePath === "WARP.md";
3058
+ return new _WarpRule({
3059
+ baseDir,
3060
+ relativeDirPath: isRoot ? "." : ".warp",
3061
+ relativeFilePath: isRoot ? "WARP.md" : relativeFilePath,
3062
+ fileContent,
3063
+ validate,
3064
+ root: isRoot
3065
+ });
3066
+ }
3067
+ static fromRulesyncRule({
3068
+ baseDir = ".",
3069
+ rulesyncRule,
3070
+ validate = true
3071
+ }) {
3072
+ return new _WarpRule(
3073
+ this.buildToolRuleParamsDefault({
3074
+ baseDir,
3075
+ rulesyncRule,
3076
+ validate,
3077
+ rootPath: { relativeDirPath: ".", relativeFilePath: "WARP.md" },
3078
+ nonRootPath: { relativeDirPath: ".warp/memories" }
3079
+ })
3080
+ );
3081
+ }
3082
+ toRulesyncRule() {
3083
+ return this.toRulesyncRuleDefault();
3084
+ }
3085
+ validate() {
3086
+ return { success: true, error: null };
3087
+ }
3088
+ };
3089
+
3040
3090
  // src/rules/windsurf-rule.ts
3041
3091
  var WindsurfRule = class _WindsurfRule extends ToolRule {
3042
3092
  static async fromFilePath(params) {
@@ -3087,6 +3137,7 @@ var rulesProcessorToolTargets = [
3087
3137
  "opencode",
3088
3138
  "qwencode",
3089
3139
  "roo",
3140
+ "warp",
3090
3141
  "windsurf"
3091
3142
  ];
3092
3143
  var RulesProcessorToolTargetSchema = z16.enum(rulesProcessorToolTargets);
@@ -3195,6 +3246,12 @@ var RulesProcessor = class extends FeatureProcessor {
3195
3246
  rulesyncRule,
3196
3247
  validate: true
3197
3248
  });
3249
+ case "warp":
3250
+ return WarpRule.fromRulesyncRule({
3251
+ baseDir: this.baseDir,
3252
+ rulesyncRule,
3253
+ validate: true
3254
+ });
3198
3255
  case "windsurf":
3199
3256
  return WindsurfRule.fromRulesyncRule({
3200
3257
  baseDir: this.baseDir,
@@ -3273,6 +3330,13 @@ var RulesProcessor = class extends FeatureProcessor {
3273
3330
  );
3274
3331
  return toolRules;
3275
3332
  }
3333
+ case "warp": {
3334
+ const rootRule = toolRules[rootRuleIndex];
3335
+ rootRule?.setFileContent(
3336
+ this.generateXmlReferencesSection(toolRules) + rootRule.getFileContent()
3337
+ );
3338
+ return toolRules;
3339
+ }
3276
3340
  default:
3277
3341
  return toolRules;
3278
3342
  }
@@ -3378,6 +3442,8 @@ var RulesProcessor = class extends FeatureProcessor {
3378
3442
  return await this.loadQwencodeRules();
3379
3443
  case "roo":
3380
3444
  return await this.loadRooRules();
3445
+ case "warp":
3446
+ return await this.loadWarpRules();
3381
3447
  case "windsurf":
3382
3448
  return await this.loadWindsurfRules();
3383
3449
  default:
@@ -3412,6 +3478,31 @@ var RulesProcessor = class extends FeatureProcessor {
3412
3478
  return [];
3413
3479
  }
3414
3480
  }
3481
+ async loadWarpRules() {
3482
+ const rootFilePaths = await findFilesByGlobs(join7(this.baseDir, "WARP.md"));
3483
+ const nonRootFilePaths = await findFilesByGlobs(join7(this.baseDir, ".warp/memories/*.md"));
3484
+ const rootFiles = await Promise.all(
3485
+ rootFilePaths.map(
3486
+ (filePath) => WarpRule.fromFilePath({
3487
+ filePath,
3488
+ validate: true,
3489
+ relativeDirPath: ".",
3490
+ relativeFilePath: "WARP.md"
3491
+ })
3492
+ )
3493
+ );
3494
+ const nonRootFiles = await Promise.all(
3495
+ nonRootFilePaths.map(
3496
+ (filePath) => WarpRule.fromFilePath({
3497
+ filePath,
3498
+ validate: true,
3499
+ relativeDirPath: ".warp/memories",
3500
+ relativeFilePath: basename9(filePath)
3501
+ })
3502
+ )
3503
+ );
3504
+ return [...rootFiles, ...nonRootFiles];
3505
+ }
3415
3506
  /**
3416
3507
  * Load Amazon Q Developer CLI rule configurations from .amazonq/rules/ directory
3417
3508
  */
@@ -4731,7 +4822,7 @@ var getVersion = async () => {
4731
4822
  const packageJson = await readJsonFile(packageJsonPath);
4732
4823
  return packageJson.version;
4733
4824
  } catch {
4734
- return "0.68.1";
4825
+ return "0.69.0";
4735
4826
  }
4736
4827
  };
4737
4828
  var main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "0.68.1",
3
+ "version": "0.69.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",