cancanneed 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/cancanneed.sh +10 -2
  2. package/package.json +2 -2
package/cancanneed.sh CHANGED
@@ -1,5 +1,13 @@
1
1
  #!/bin/sh
2
- # cancanneed npx wrapper — delegates to python3 cancanneed.py
2
+ # cancanneed npx wrapper — finds cancanneed.py next to this script
3
3
  DIR=$(cd "$(dirname "$0")" && pwd)
4
4
  PY=${PYTHON:-python3}
5
- exec "$PY" "$DIR/cancanneed.py" "$@"
5
+ if [ -f "$DIR/cancanneed.py" ]; then
6
+ exec "$PY" "$DIR/cancanneed.py" "$@"
7
+ elif [ -f "$DIR/../cancanneed.py" ]; then
8
+ # npx places bin scripts in node_modules/.bin/, files in node_modules/cancanneed/
9
+ exec "$PY" "$DIR/../cancanneed.py" "$@"
10
+ else
11
+ echo "cancanneed: cannot find cancanneed.py" >&2
12
+ exit 1
13
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cancanneed",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "代码仓库压缩骨架提取器 — ~2K tokens 看清项目全貌",
5
5
  "bin": {
6
6
  "cancanneed": "./cancanneed.sh"
@@ -13,4 +13,4 @@
13
13
  ],
14
14
  "keywords": ["codebase", "skeleton", "architecture", "agent", "cbm"],
15
15
  "license": "MIT"
16
- }
16
+ }