prjct-cli 0.25.0 → 0.25.1
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/CHANGELOG.md +15 -0
- package/bin/prjct +33 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.25.1] - 2026-01-01
|
|
4
|
+
|
|
5
|
+
### Bug Fix: npm install symlink resolution
|
|
6
|
+
|
|
7
|
+
**Fixed:** CLI fails when invoked via npm symlink (`node_modules/.bin/prjct`)
|
|
8
|
+
|
|
9
|
+
**Root Cause:**
|
|
10
|
+
The shell wrapper script `bin/prjct` used `dirname "$0"` to find `prjct.ts`, which returns the symlink's directory (`.bin/`) instead of the actual script location (`prjct-cli/bin/`).
|
|
11
|
+
|
|
12
|
+
**Solution:**
|
|
13
|
+
Added `resolve_symlink()` function that properly resolves symlinks before determining paths. Works on both Linux (`readlink -f`) and macOS (manual resolution fallback).
|
|
14
|
+
|
|
15
|
+
**Files Changed:**
|
|
16
|
+
- `bin/prjct` - Added symlink resolution (v1.0.0 → v1.1.0)
|
|
17
|
+
|
|
3
18
|
## [0.25.0] - 2025-12-30
|
|
4
19
|
|
|
5
20
|
### Maintenance Release
|
package/bin/prjct
CHANGED
|
@@ -5,10 +5,40 @@
|
|
|
5
5
|
# Detects available runtime (bun preferred, node fallback)
|
|
6
6
|
# and executes the appropriate entry point.
|
|
7
7
|
#
|
|
8
|
-
# @version 1.
|
|
8
|
+
# @version 1.1.0
|
|
9
9
|
|
|
10
|
-
#
|
|
11
|
-
|
|
10
|
+
# Resolve symlinks to get the actual script location
|
|
11
|
+
resolve_symlink() {
|
|
12
|
+
TARGET="$1"
|
|
13
|
+
|
|
14
|
+
# Try readlink -f (Linux, newer macOS)
|
|
15
|
+
if command -v readlink >/dev/null 2>&1; then
|
|
16
|
+
RESOLVED="$(readlink -f "$TARGET" 2>/dev/null)"
|
|
17
|
+
if [ -n "$RESOLVED" ]; then
|
|
18
|
+
echo "$RESOLVED"
|
|
19
|
+
return
|
|
20
|
+
fi
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Fallback: manual symlink resolution
|
|
24
|
+
while [ -L "$TARGET" ]; do
|
|
25
|
+
DIR="$(dirname "$TARGET")"
|
|
26
|
+
TARGET="$(readlink "$TARGET")"
|
|
27
|
+
# Handle relative symlinks
|
|
28
|
+
case "$TARGET" in
|
|
29
|
+
/*) ;;
|
|
30
|
+
*) TARGET="$DIR/$TARGET" ;;
|
|
31
|
+
esac
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
# Get absolute path
|
|
35
|
+
DIR="$(cd "$(dirname "$TARGET")" && pwd)"
|
|
36
|
+
echo "$DIR/$(basename "$TARGET")"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# Get the actual script location (resolving symlinks)
|
|
40
|
+
SCRIPT_PATH="$(resolve_symlink "$0")"
|
|
41
|
+
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
|
12
42
|
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
13
43
|
|
|
14
44
|
# Check if bun is available
|