@linxiraos/pi-natives 1.0.0 → 1.0.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.
- package/native/index.d.ts +2 -2
- package/native/index.js +2 -2
- package/native/loader-state.js +7 -7
- package/package.json +6 -6
package/native/index.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ export declare class Shell {
|
|
|
259
259
|
* current-thread-only global pool that cannot steal work from later native
|
|
260
260
|
* calls. Idempotent.
|
|
261
261
|
*/
|
|
262
|
-
export declare function
|
|
262
|
+
export declare function __zetaInstallTokioRuntime(): void
|
|
263
263
|
|
|
264
264
|
/**
|
|
265
265
|
* Version sentinel — exists solely so the JS loader can prove at load time
|
|
@@ -279,7 +279,7 @@ export declare function __ompInstallTokioRuntime(): void
|
|
|
279
279
|
* `packages/natives/native/index.js` (which derives the name from
|
|
280
280
|
* `package.json#version`).
|
|
281
281
|
*/
|
|
282
|
-
export declare function
|
|
282
|
+
export declare function __piNativesV1_0_1(): void
|
|
283
283
|
|
|
284
284
|
/**
|
|
285
285
|
* Apply ast-grep rewrite rules to matching files; honors `dryRun` and returns
|
package/native/index.js
CHANGED
|
@@ -28,8 +28,8 @@ export const PtySession = nativeBindings.PtySession;
|
|
|
28
28
|
export const Shell = nativeBindings.Shell;
|
|
29
29
|
|
|
30
30
|
// functions
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
31
|
+
export const __zetaInstallTokioRuntime = nativeBindings.__zetaInstallTokioRuntime;
|
|
32
|
+
export const __piNativesV1_0_1 = nativeBindings.__piNativesV1_0_1;
|
|
33
33
|
export const astEdit = nativeBindings.astEdit;
|
|
34
34
|
export const astGrep = nativeBindings.astGrep;
|
|
35
35
|
export const astMatch = nativeBindings.astMatch;
|
package/native/loader-state.js
CHANGED
|
@@ -50,10 +50,10 @@ function startupMarker(text) {
|
|
|
50
50
|
|
|
51
51
|
function getNativesDir() {
|
|
52
52
|
const xdgDataHome = process.env.XDG_DATA_HOME;
|
|
53
|
-
if (xdgDataHome && fs.existsSync(path.join(xdgDataHome, "
|
|
54
|
-
return path.join(xdgDataHome, "
|
|
53
|
+
if (xdgDataHome && fs.existsSync(path.join(xdgDataHome, "zeta"))) {
|
|
54
|
+
return path.join(xdgDataHome, "zeta", "natives");
|
|
55
55
|
}
|
|
56
|
-
return path.join(os.homedir(), ".
|
|
56
|
+
return path.join(os.homedir(), ".zeta", "natives");
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
function resolveLeafPackageDir(platformTag) {
|
|
@@ -105,7 +105,7 @@ export function getAddonFilenames({ tag, arch, variant }) {
|
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* Decide whether the loader should mirror the package's `native/<filename>.node`
|
|
108
|
-
* into the per-version cache directory (`~/.
|
|
108
|
+
* into the per-version cache directory (`~/.zeta/natives/<version>/`) before loading.
|
|
109
109
|
*
|
|
110
110
|
* Windows-only safety net for `bun install -g` updates: when a previous `omp`
|
|
111
111
|
* process is running, bun cannot overwrite the locked `.node` inside
|
|
@@ -703,12 +703,12 @@ export function validateLoadedBindings(ctx, bindings, candidate) {
|
|
|
703
703
|
* Install the addon's bounded Tokio runtime now that `dlopen` has returned and
|
|
704
704
|
* the dynamic-loader lock is released. The Rust `#[module_init]` deliberately
|
|
705
705
|
* does NOT build the runtime — spawning worker threads under the loader lock
|
|
706
|
-
* deadlocks on some hosts — so it exposes `
|
|
706
|
+
* deadlocks on some hosts — so it exposes `__zetaInstallTokioRuntime` for the
|
|
707
707
|
* loader to call once, before any async native runs. Best-effort: older addons
|
|
708
708
|
* predating this export simply fall back to napi-rs's default runtime.
|
|
709
709
|
*/
|
|
710
710
|
function installNativeTokioRuntime(bindings) {
|
|
711
|
-
const install = bindings.
|
|
711
|
+
const install = bindings.__zetaInstallTokioRuntime;
|
|
712
712
|
if (typeof install !== "function") return;
|
|
713
713
|
try {
|
|
714
714
|
install();
|
|
@@ -760,7 +760,7 @@ export function initLoaderContext(overrides = {}) {
|
|
|
760
760
|
const versionedDir = path.join(nativesDir, packageVersion);
|
|
761
761
|
const userDataDir =
|
|
762
762
|
platform === "win32"
|
|
763
|
-
? path.join(process.env.LOCALAPPDATA || path.join(os.homedir(), "AppData", "Local"), "
|
|
763
|
+
? path.join(process.env.LOCALAPPDATA || path.join(os.homedir(), "AppData", "Local"), "zeta")
|
|
764
764
|
: path.join(os.homedir(), ".local", "bin");
|
|
765
765
|
|
|
766
766
|
const isCompiledBinary =
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linxiraos/pi-natives",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Native Rust bindings for audio, WebRTC, grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://linxira-os.github.io",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"@linxiraos/pi-natives-linux-x64": "1.0.
|
|
84
|
-
"@linxiraos/pi-natives-linux-arm64": "1.0.
|
|
85
|
-
"@linxiraos/pi-natives-darwin-x64": "1.0.
|
|
86
|
-
"@linxiraos/pi-natives-darwin-arm64": "1.0.
|
|
87
|
-
"@linxiraos/pi-natives-win32-x64": "1.0.
|
|
83
|
+
"@linxiraos/pi-natives-linux-x64": "1.0.1",
|
|
84
|
+
"@linxiraos/pi-natives-linux-arm64": "1.0.1",
|
|
85
|
+
"@linxiraos/pi-natives-darwin-x64": "1.0.1",
|
|
86
|
+
"@linxiraos/pi-natives-darwin-arm64": "1.0.1",
|
|
87
|
+
"@linxiraos/pi-natives-win32-x64": "1.0.1"
|
|
88
88
|
}
|
|
89
89
|
}
|