@sayknow-cli/natives 0.3.10 → 0.3.12

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 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 __piNativesV0_3_10(): void
301
+ export declare function __piNativesV0_3_12(): void
302
302
 
303
303
  /**
304
304
  * Apply conservative pre-execution rewrites to a bash command.
@@ -1459,6 +1459,8 @@ export interface PtyStartOptions {
1459
1459
  shell?: string
1460
1460
  }
1461
1461
 
1462
+ export declare function ptyTimeoutCount(): bigint
1463
+
1462
1464
  /**
1463
1465
  * Read an image from the system clipboard.
1464
1466
  *
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 __piNativesV0_3_10 = nativeBindings.__piNativesV0_3_10;
30
+ export const __piNativesV0_3_12 = nativeBindings.__piNativesV0_3_12;
31
31
  export const applyBashFixups = nativeBindings.applyBashFixups;
32
32
  export const astEdit = nativeBindings.astEdit;
33
33
  export const astGrep = nativeBindings.astGrep;
@@ -65,6 +65,7 @@ export const matchesLegacySequence = nativeBindings.matchesLegacySequence;
65
65
  export const nativeBuildInfo = nativeBindings.nativeBuildInfo;
66
66
  export const parseKey = nativeBindings.parseKey;
67
67
  export const parseKittySequence = nativeBindings.parseKittySequence;
68
+ export const ptyTimeoutCount = nativeBindings.ptyTimeoutCount;
68
69
  export const readImageFromClipboard = nativeBindings.readImageFromClipboard;
69
70
  export const search = nativeBindings.search;
70
71
  export const sliceWithWidth = nativeBindings.sliceWithWidth;
@@ -39,6 +39,7 @@ export interface ResolveLoaderCandidatesInput {
39
39
  isCompiledBinary: boolean;
40
40
  stageFromNodeModules?: boolean;
41
41
  nativeDir: string;
42
+ platformNativeDir?: string | null;
42
43
  execDir: string;
43
44
  versionedDir: string;
44
45
  userDataDir: string;
@@ -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(nativeDir, filename),
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.10",
3
+ "version": "0.3.12",
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.10",
65
- "@sayknow-cli/natives-darwin-x64": "0.3.10",
66
- "@sayknow-cli/natives-linux-arm64": "0.3.10",
67
- "@sayknow-cli/natives-linux-x64": "0.3.10",
68
- "@sayknow-cli/natives-win32-x64": "0.3.10"
64
+ "@sayknow-cli/natives-darwin-arm64": "0.3.12",
65
+ "@sayknow-cli/natives-darwin-x64": "0.3.12",
66
+ "@sayknow-cli/natives-linux-arm64": "0.3.12",
67
+ "@sayknow-cli/natives-linux-x64": "0.3.12",
68
+ "@sayknow-cli/natives-win32-x64": "0.3.12"
69
69
  },
70
70
  "exports": {
71
71
  ".": {