@tobilu/qmd 1.0.7 → 1.1.2

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/qmd DELETED
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env bash
2
- # qmd - Quick Markdown Search
3
- set -euo pipefail
4
-
5
- # Find node - prefer PATH, fallback to known locations
6
- find_node() {
7
- if command -v node &>/dev/null; then
8
- local ver=$(node --version 2>/dev/null | sed 's/^v//' || echo "0")
9
- local major="${ver%%.*}"
10
- if [[ "$major" -ge 22 ]]; then
11
- command -v node
12
- return 0
13
- fi
14
- fi
15
-
16
- # Fallback: derive paths (need HOME)
17
- : "${HOME:=$(eval echo ~)}"
18
-
19
- # Check known locations
20
- local candidates=(
21
- "$HOME/.local/share/mise/installs/node/latest/bin/node"
22
- "$HOME/.local/share/mise/shims/node"
23
- "$HOME/.asdf/shims/node"
24
- "/opt/homebrew/bin/node"
25
- "/usr/local/bin/node"
26
- "$HOME/.nvm/current/bin/node"
27
- )
28
- for c in "${candidates[@]}"; do
29
- [[ -x "$c" ]] && { echo "$c"; return 0; }
30
- done
31
-
32
- return 1
33
- }
34
-
35
- NODE=$(find_node) || { echo "Error: node (>=22) not found. Install from https://nodejs.org" >&2; exit 1; }
36
-
37
- # Resolve symlinks to find script location
38
- SOURCE="${BASH_SOURCE[0]}"
39
- while [[ -L "$SOURCE" ]]; do
40
- DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
41
- SOURCE="$(readlink "$SOURCE")"
42
- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
43
- done
44
- SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
45
-
46
- exec "$NODE" "$SCRIPT_DIR/dist/qmd.js" "$@"