@mallardbay/cursor-rules 1.0.4 → 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,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # setup-cursor.sh
3
- # Combine shared and env-specific MDC rules into .cursor/rules/
3
+ # Robust Cursor rules installer using realpath
4
4
 
5
5
  set -e
6
6
 
@@ -12,8 +12,9 @@ if [ -z "$ENV_TYPE" ]; then
12
12
  exit 1
13
13
  fi
14
14
 
15
- # Ensure we resolve relative to the package location (even when used via npx)
16
- SRC_DIR="$(cd "$(dirname "$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)"
17
18
  SHARED_DIR="$SRC_DIR/.cursor/shared/rules"
18
19
  ENV_DIR="$SRC_DIR/.cursor/$ENV_TYPE/rules"
19
20
 
@@ -29,7 +30,7 @@ fi
29
30
 
30
31
  mkdir -p .cursor/rules
31
32
 
32
- # Copy shared and env-specific rules into local project
33
+ # Copy all shared and env-specific rules into the local project
33
34
  cp "$SHARED_DIR"/*.mdc .cursor/rules/
34
35
  cp "$ENV_DIR"/*.mdc .cursor/rules/
35
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mallardbay/cursor-rules",
3
- "version": "1.0.4",
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",