@mallardbay/cursor-rules 1.0.3 → 1.0.5

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.
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Combines shared and environment-specific Cursor MDC rules
2
+ # setup-cursor.sh
3
+ # Robust Cursor rules installer using realpath
3
4
 
4
5
  set -e
5
6
 
@@ -11,7 +12,9 @@ if [ -z "$ENV_TYPE" ]; then
11
12
  exit 1
12
13
  fi
13
14
 
14
- SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
15
+ # Resolve the true path of the script, following symlinks
16
+ SCRIPT_PATH="$(realpath "$0")"
17
+ SRC_DIR="$(cd "$(dirname "$SCRIPT_PATH")/.." && pwd)"
15
18
  SHARED_DIR="$SRC_DIR/.cursor/shared/rules"
16
19
  ENV_DIR="$SRC_DIR/.cursor/$ENV_TYPE/rules"
17
20
 
@@ -27,13 +30,8 @@ fi
27
30
 
28
31
  mkdir -p .cursor/rules
29
32
 
30
- # Copy all .mdc files from shared and env-specific folders into target
31
- for f in "$SHARED_DIR"/*.mdc; do
32
- cp "$f" .cursor/rules/
33
- done
33
+ # Copy all shared and env-specific rules into the local project
34
+ cp "$SHARED_DIR"/*.mdc .cursor/rules/
35
+ cp "$ENV_DIR"/*.mdc .cursor/rules/
34
36
 
35
- for f in "$ENV_DIR"/*.mdc; do
36
- cp "$f" .cursor/rules/
37
- done
38
-
39
- echo ".cursor/rules populated with shared and '$ENV_TYPE' rules."
37
+ echo ".cursor/rules setup complete for '$ENV_TYPE'."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mallardbay/cursor-rules",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Mallard Bay shared cursor rules",
5
5
  "main": "bin/setup-cursor.sh",
6
6
  "repository": "git@github.com:mallardbay/cursor-rules.git",