@rulebricks/sdk 2.5.3 → 2.5.4

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.
@@ -310,7 +310,7 @@ class Rule {
310
310
  throw new Error("Alias cannot contain special characters");
311
311
  }
312
312
  const rules = yield this.workspace.assets.rules.list();
313
- if (rules.some((r) => r.slug === alias)) {
313
+ if (rules.some((r) => r.slug === alias && r.id !== this.id)) {
314
314
  throw new Error("Alias conflicts with an existing rule");
315
315
  }
316
316
  this.slug = alias;
package/forge/rule.js CHANGED
@@ -310,7 +310,7 @@ class Rule {
310
310
  throw new Error("Alias cannot contain special characters");
311
311
  }
312
312
  const rules = yield this.workspace.assets.rules.list();
313
- if (rules.some((r) => r.slug === alias)) {
313
+ if (rules.some((r) => r.slug === alias && r.id !== this.id)) {
314
314
  throw new Error("Alias conflicts with an existing rule");
315
315
  }
316
316
  this.slug = alias;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulebricks/sdk",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "private": false,
5
5
  "repository": "https://github.com/rulebricks/node-sdk",
6
6
  "main": "./index.js",