@oh-my-pi/pi-natives 18.7.0 → 18.8.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.
@@ -57,6 +57,14 @@ function startupMarker(text) {
57
57
  }
58
58
 
59
59
  function getNativesDir() {
60
+ // Match pi-utils directory overrides without depending on pi-utils.
61
+ const override = process.env.PI_NATIVES_DIR?.trim();
62
+ if (override) {
63
+ let dir = override;
64
+ if (dir === "~") dir = os.homedir();
65
+ else if (dir.startsWith("~/") || dir.startsWith("~\\")) dir = os.homedir() + dir.slice(1);
66
+ if (path.isAbsolute(dir)) return path.normalize(dir);
67
+ }
60
68
  const xdgDataHome = process.env.XDG_DATA_HOME;
61
69
  if (xdgDataHome && fs.existsSync(path.join(xdgDataHome, "omp"))) {
62
70
  return path.join(xdgDataHome, "omp", "natives");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-natives",
3
- "version": "18.7.0",
3
+ "version": "18.8.1",
4
4
  "description": "Native Rust bindings for PDF conversion, audio, WebRTC, grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
5
5
  "type": "module",
6
6
  "homepage": "https://omp.sh",
@@ -112,11 +112,11 @@
112
112
  }
113
113
  },
114
114
  "optionalDependencies": {
115
- "@oh-my-pi/pi-natives-linux-x64": "18.7.0",
116
- "@oh-my-pi/pi-natives-linux-arm64": "18.7.0",
117
- "@oh-my-pi/pi-natives-darwin-x64": "18.7.0",
118
- "@oh-my-pi/pi-natives-darwin-arm64": "18.7.0",
119
- "@oh-my-pi/pi-natives-win32-x64": "18.7.0",
120
- "@oh-my-pi/pi-natives-win32-arm64": "18.7.0"
115
+ "@oh-my-pi/pi-natives-linux-x64": "18.8.1",
116
+ "@oh-my-pi/pi-natives-linux-arm64": "18.8.1",
117
+ "@oh-my-pi/pi-natives-darwin-x64": "18.8.1",
118
+ "@oh-my-pi/pi-natives-darwin-arm64": "18.8.1",
119
+ "@oh-my-pi/pi-natives-win32-x64": "18.8.1",
120
+ "@oh-my-pi/pi-natives-win32-arm64": "18.8.1"
121
121
  }
122
122
  }