aicoding-rules 0.3.1 → 0.3.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/download.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aicoding-rules",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Download and install AI coding rules for Cursor, Claude, Antigravity, and Copilot",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/download.js CHANGED
@@ -5,6 +5,9 @@ import { getAuthenticatedClient } from "./auth.js";
5
5
 
6
6
  const OVERWRITE_FILES = true;
7
7
 
8
+ // Folders that should never be replaced by --replace option
9
+ const PROTECTED_FOLDERS = ["personal"];
10
+
8
11
  function getZipTopLevelNames(zip) {
9
12
  const entries = zip.getEntries();
10
13
  const topLevel = new Set();
@@ -13,7 +16,7 @@ function getZipTopLevelNames(zip) {
13
16
  if (!name) continue;
14
17
 
15
18
  const firstSegment = name.split("/")[0];
16
- if (firstSegment && firstSegment !== ".") {
19
+ if (firstSegment && firstSegment !== "." && !PROTECTED_FOLDERS.includes(firstSegment)) {
17
20
  topLevel.add(firstSegment);
18
21
  }
19
22
  }