shellwise 0.1.8 → 0.1.9

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/bin/shellwise ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Resolve symlinks to find actual package location
4
+ SOURCE="$0"
5
+ while [ -L "$SOURCE" ]; do
6
+ DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
7
+ SOURCE="$(readlink "$SOURCE")"
8
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
9
+ done
10
+ SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE")" && pwd)"
11
+
12
+ if ! command -v bun &>/dev/null; then
13
+ echo "shellwise requires Bun runtime. Install it: https://bun.sh" >&2
14
+ exit 1
15
+ fi
16
+
17
+ exec bun "$SCRIPT_DIR/../src/index.ts" "$@"
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "shellwise",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
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.cjs",
8
- "sw": "./bin/sw.cjs"
7
+ "shellwise": "./bin/shellwise",
8
+ "sw": "./bin/shellwise"
9
9
  },
10
10
  "files": [
11
- "bin/sw.cjs",
11
+ "bin/shellwise",
12
12
  "src/**/*.ts",
13
13
  "scripts/*.sh"
14
14
  ],
package/bin/sw.cjs DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { execFileSync } = require("child_process");
4
- const { resolve } = require("path");
5
-
6
- const entry = resolve(__dirname, "..", "src", "index.ts");
7
-
8
- try {
9
- execFileSync("bun", [entry, ...process.argv.slice(2)], { stdio: "inherit" });
10
- } catch (err) {
11
- if (err.code === "ENOENT") {
12
- console.error("shellwise requires Bun runtime. Install it: https://bun.sh");
13
- process.exit(1);
14
- }
15
- process.exit(err.status ?? 1);
16
- }