@kaluarunsi/obi 0.1.5 → 0.2.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/bin/obi ADDED
@@ -0,0 +1,46 @@
1
+ #!/bin/sh
2
+ # Fast POSIX launcher — replaces the Node.js wrapper to eliminate ~450ms startup overhead.
3
+ # Uses exec to replace this shell process with the binary (no extra process).
4
+ set -e
5
+
6
+ # Resolve the real location of this script, following any symlinks npm may create.
7
+ SCRIPT="$0"
8
+ while [ -L "$SCRIPT" ]; do
9
+ SCRIPT_DIR=$(cd "$(dirname "$SCRIPT")" && pwd)
10
+ SCRIPT=$(readlink "$SCRIPT")
11
+ case "$SCRIPT" in
12
+ /*) ;;
13
+ *) SCRIPT="$SCRIPT_DIR/$SCRIPT" ;;
14
+ esac
15
+ done
16
+ PACKAGE_DIR=$(cd "$(dirname "$SCRIPT")/.." && pwd)
17
+
18
+ # Detect platform tuple used by the optional npm sub-packages.
19
+ OS=$(uname -s)
20
+ ARCH=$(uname -m)
21
+ case "$OS" in
22
+ Darwin)
23
+ case "$ARCH" in
24
+ arm64) PLATFORM="darwin-arm64" ;;
25
+ x86_64) PLATFORM="darwin-x64" ;;
26
+ *) printf 'obi: unsupported arch: %s\n' "$ARCH" >&2; exit 1 ;;
27
+ esac ;;
28
+ Linux)
29
+ case "$ARCH" in
30
+ x86_64|amd64) PLATFORM="linux-x64" ;;
31
+ aarch64) PLATFORM="linux-arm64" ;;
32
+ *) printf 'obi: unsupported arch: %s\n' "$ARCH" >&2; exit 1 ;;
33
+ esac ;;
34
+ *)
35
+ printf 'obi: unsupported OS: %s\n' "$OS" >&2; exit 1 ;;
36
+ esac
37
+
38
+ BINARY="$PACKAGE_DIR/node_modules/@kaluarunsi/obi-$PLATFORM/vendor/obi/obi"
39
+
40
+ if [ ! -x "$BINARY" ]; then
41
+ printf 'obi: binary not found for platform %s\n' "$PLATFORM" >&2
42
+ printf 'obi: expected at %s\n' "$BINARY" >&2
43
+ exit 1
44
+ fi
45
+
46
+ exec "$BINARY" "$@"
package/bin/obi.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ :: Windows launcher — delegates to the Node.js script on platforms without a POSIX shell.
3
+ node "%~dp0obi.js" %*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaluarunsi/obi",
3
- "version": "0.1.5",
3
+ "version": "0.2.2",
4
4
  "description": "Terminal-first repo-aware coding operator",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -15,9 +15,9 @@
15
15
  "release-manifest.json"
16
16
  ],
17
17
  "optionalDependencies": {
18
- "@kaluarunsi/obi-darwin-arm64": "0.1.5",
19
- "@kaluarunsi/obi-linux-x64": "0.1.5",
20
- "@kaluarunsi/obi-windows-x64": "0.1.5"
18
+ "@kaluarunsi/obi-darwin-arm64": "0.2.2",
19
+ "@kaluarunsi/obi-linux-x64": "0.2.2",
20
+ "@kaluarunsi/obi-windows-x64": "0.2.2"
21
21
  },
22
22
  "scripts": {
23
23
  "test": "node --test"
@@ -1,25 +1,25 @@
1
1
  {
2
- "version": "0.1.5",
2
+ "version": "0.2.2",
3
3
  "assets": {
4
4
  "darwin-arm64": {
5
5
  "os": "darwin",
6
6
  "arch": "arm64",
7
7
  "archive": "obi-darwin-arm64.tar.gz",
8
- "sha256": "60c53ccdfc156bc42529e1d4c89c71720d09dc66584484a6cc39e07a2d3d091b",
8
+ "sha256": "3e4423ac572a495bb57597042d40b1c283f9175270557848c0f24ec2d07ffc45",
9
9
  "binary": "obi/obi"
10
10
  },
11
11
  "linux-x64": {
12
12
  "os": "linux",
13
13
  "arch": "x64",
14
14
  "archive": "obi-linux-x64.tar.gz",
15
- "sha256": "b14cbc898b0f70e8ab9ecdfa3cab019f03ce1a86d408cac3be37bc25e77a0bc9",
15
+ "sha256": "f798b4534d403a5da45ef7431ad718ea44cb7457434f3e8d4fc49a774159610a",
16
16
  "binary": "obi/obi"
17
17
  },
18
18
  "windows-x64": {
19
19
  "os": "windows",
20
20
  "arch": "x64",
21
21
  "archive": "obi-windows-x64.zip",
22
- "sha256": "f6e459f8a70957dfcb4768191e40bade102aa17818f56e4674a5d560c5a06f75",
22
+ "sha256": "7ca682256ef648a218a520f541b2e42de0f446fdac7988631adae590917880ae",
23
23
  "binary": "obi/obi.exe"
24
24
  }
25
25
  }