shellwise 0.1.4 → 0.1.7

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/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "shellwise",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "description": "Smart command history with inline auto-suggest and fuzzy search for your terminal",
5
5
  "type": "module",
6
6
  "bin": {
7
- "shellwise": "./bin/sw.js",
8
- "sw": "./bin/sw.js"
7
+ "shellwise": "./bin/sw.cjs",
8
+ "sw": "./bin/sw.cjs"
9
9
  },
10
10
  "files": [
11
- "bin/sw.js",
11
+ "bin/sw.cjs",
12
12
  "src/**/*.ts",
13
13
  "scripts/*.sh"
14
14
  ],
package/scripts/setup.sh CHANGED
@@ -11,11 +11,12 @@ BOLD='\033[1m'
11
11
  RESET='\033[0m'
12
12
 
13
13
  # Detect if this is a local (not global) install
14
- # Only check for 'shellwise' binary (not 'sw' which may conflict with other tools)
15
- if [[ -z "$(command -v shellwise 2>/dev/null)" ]]; then
16
- echo -e "${YELLOW}${BOLD}[shellwise]${RESET} This is a CLI tool install it globally:"
17
- echo -e " ${BOLD}bun install -g shellwise${RESET}"
18
- echo -e " ${DIM}or: npm install -g shellwise${RESET}"
14
+ # npm adds node_modules/.bin to PATH during postinstall, so check the resolved path
15
+ SHELLWISE_PATH="$(command -v shellwise 2>/dev/null || true)"
16
+ if [[ -z "$SHELLWISE_PATH" ]] || [[ "$SHELLWISE_PATH" == *"/node_modules/.bin/"* ]]; then
17
+ echo -e "${YELLOW}${BOLD}[shellwise]${RESET} This is a CLI tool — install it globally:" >&2
18
+ echo -e " ${BOLD}bun install -g shellwise${RESET}" >&2
19
+ echo -e " ${DIM}or: npm install -g shellwise${RESET}" >&2
19
20
  exit 0
20
21
  fi
21
22
 
File without changes