@sayknow-cli/natives 0.3.10 → 0.3.11
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 +1 -1
- package/native/index.js +1 -1
- package/native/loader-state.d.ts +1 -0
- package/native/loader-state.js +6 -1
- package/package.json +6 -6
package/native/index.d.ts
CHANGED
|
@@ -298,7 +298,7 @@ export declare class Shell {
|
|
|
298
298
|
* `packages/natives/native/index.js` (which derives the name from
|
|
299
299
|
* `package.json#version`).
|
|
300
300
|
*/
|
|
301
|
-
export declare function
|
|
301
|
+
export declare function __piNativesV0_3_11(): void
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
304
|
* Apply conservative pre-execution rewrites to a bash command.
|
package/native/index.js
CHANGED
|
@@ -27,7 +27,7 @@ export const PtySession = nativeBindings.PtySession;
|
|
|
27
27
|
export const Shell = nativeBindings.Shell;
|
|
28
28
|
|
|
29
29
|
// functions
|
|
30
|
-
export const
|
|
30
|
+
export const __piNativesV0_3_11 = nativeBindings.__piNativesV0_3_11;
|
|
31
31
|
export const applyBashFixups = nativeBindings.applyBashFixups;
|
|
32
32
|
export const astEdit = nativeBindings.astEdit;
|
|
33
33
|
export const astGrep = nativeBindings.astGrep;
|
package/native/loader-state.d.ts
CHANGED
package/native/loader-state.js
CHANGED
|
@@ -113,6 +113,7 @@ export function shouldStageNodeModulesAddon({ platform, isCompiledBinary, native
|
|
|
113
113
|
* isCompiledBinary: boolean;
|
|
114
114
|
* stageFromNodeModules?: boolean;
|
|
115
115
|
* nativeDir: string;
|
|
116
|
+
* platformNativeDir?: string | null;
|
|
116
117
|
* execDir: string;
|
|
117
118
|
* versionedDir: string;
|
|
118
119
|
* userDataDir: string;
|
|
@@ -124,12 +125,14 @@ export function resolveLoaderCandidates({
|
|
|
124
125
|
isCompiledBinary,
|
|
125
126
|
stageFromNodeModules = false,
|
|
126
127
|
nativeDir,
|
|
128
|
+
platformNativeDir,
|
|
127
129
|
execDir,
|
|
128
130
|
versionedDir,
|
|
129
131
|
userDataDir,
|
|
130
132
|
}) {
|
|
133
|
+
const sourceNativeDirs = [nativeDir, platformNativeDir].filter(dir => typeof dir === "string" && dir.length > 0);
|
|
131
134
|
const baseReleaseCandidates = addonFilenames.flatMap(filename => [
|
|
132
|
-
path.join(
|
|
135
|
+
...sourceNativeDirs.map(dir => path.join(dir, filename)),
|
|
133
136
|
path.join(execDir, filename),
|
|
134
137
|
]);
|
|
135
138
|
const compiledCandidates = addonFilenames.flatMap(filename => [
|
|
@@ -347,6 +350,7 @@ function initLoaderContext() {
|
|
|
347
350
|
const platformTag = `${process.platform}-${process.arch}`;
|
|
348
351
|
const packageVersion = packageJson.version;
|
|
349
352
|
const nativeDir = path.join(import.meta.dir, "..", "native");
|
|
353
|
+
const platformNativeDir = path.join(nativeDir, "..", "..", `natives-${platformTag}`, "native");
|
|
350
354
|
const execDir = path.dirname(process.execPath);
|
|
351
355
|
const versionedDir = path.join(getNativesDir(), packageVersion);
|
|
352
356
|
const userDataDir =
|
|
@@ -374,6 +378,7 @@ function initLoaderContext() {
|
|
|
374
378
|
isCompiledBinary,
|
|
375
379
|
stageFromNodeModules,
|
|
376
380
|
nativeDir,
|
|
381
|
+
platformNativeDir,
|
|
377
382
|
execDir,
|
|
378
383
|
versionedDir,
|
|
379
384
|
userDataDir,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sayknow-cli/natives",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "Native Rust bindings for grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://sayknow-cli.com",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"README.md"
|
|
62
62
|
],
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@sayknow-cli/natives-darwin-arm64": "0.3.
|
|
65
|
-
"@sayknow-cli/natives-darwin-x64": "0.3.
|
|
66
|
-
"@sayknow-cli/natives-linux-arm64": "0.3.
|
|
67
|
-
"@sayknow-cli/natives-linux-x64": "0.3.
|
|
68
|
-
"@sayknow-cli/natives-win32-x64": "0.3.
|
|
64
|
+
"@sayknow-cli/natives-darwin-arm64": "0.3.11",
|
|
65
|
+
"@sayknow-cli/natives-darwin-x64": "0.3.11",
|
|
66
|
+
"@sayknow-cli/natives-linux-arm64": "0.3.11",
|
|
67
|
+
"@sayknow-cli/natives-linux-x64": "0.3.11",
|
|
68
|
+
"@sayknow-cli/natives-win32-x64": "0.3.11"
|
|
69
69
|
},
|
|
70
70
|
"exports": {
|
|
71
71
|
".": {
|