@oh-my-pi/pi-natives 16.5.1 → 17.0.0
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 +27 -2
- package/native/index.js +1 -1
- package/package.json +6 -6
package/native/index.d.ts
CHANGED
|
@@ -84,8 +84,13 @@ export declare class Process {
|
|
|
84
84
|
/** Stateful PTY session for interactive stdin/stdout passthrough. */
|
|
85
85
|
export declare class PtySession {
|
|
86
86
|
constructor()
|
|
87
|
-
/** Start a
|
|
87
|
+
/** Start a shell command and stream output chunks via callback. */
|
|
88
88
|
start(options: PtyStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise<PtyRunResult>
|
|
89
|
+
/**
|
|
90
|
+
* Start an executable with separate arguments and stream output chunks via
|
|
91
|
+
* callback.
|
|
92
|
+
*/
|
|
93
|
+
startArgv(options: PtyArgvStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise<PtyRunResult>
|
|
89
94
|
/** Write raw input bytes to PTY stdin. */
|
|
90
95
|
write(data: string): void
|
|
91
96
|
/** Resize the active PTY. */
|
|
@@ -170,7 +175,7 @@ export declare function __ompInstallTokioRuntime(): void
|
|
|
170
175
|
* `packages/natives/native/index.js` (which derives the name from
|
|
171
176
|
* `package.json#version`).
|
|
172
177
|
*/
|
|
173
|
-
export declare function
|
|
178
|
+
export declare function __piNativesV17_0_0(): void
|
|
174
179
|
|
|
175
180
|
/**
|
|
176
181
|
* Apply ast-grep rewrite rules to matching files; honors `dryRun` and returns
|
|
@@ -1250,6 +1255,26 @@ export interface ProcessWaitOptions {
|
|
|
1250
1255
|
signal?: unknown
|
|
1251
1256
|
}
|
|
1252
1257
|
|
|
1258
|
+
/** Options for running an executable and argument vector in a PTY session. */
|
|
1259
|
+
export interface PtyArgvStartOptions {
|
|
1260
|
+
/** Executable name or path. */
|
|
1261
|
+
application: string
|
|
1262
|
+
/** Arguments passed directly to the executable. */
|
|
1263
|
+
args: Array<string>
|
|
1264
|
+
/** Working directory for command execution. */
|
|
1265
|
+
cwd?: string
|
|
1266
|
+
/** Environment variables for this command. */
|
|
1267
|
+
env?: Record<string, string>
|
|
1268
|
+
/** Timeout in milliseconds before cancelling. */
|
|
1269
|
+
timeoutMs?: number
|
|
1270
|
+
/** Abort signal for cancelling the operation. */
|
|
1271
|
+
signal?: unknown
|
|
1272
|
+
/** PTY column count. */
|
|
1273
|
+
cols?: number
|
|
1274
|
+
/** PTY row count. */
|
|
1275
|
+
rows?: number
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1253
1278
|
/** Result of a PTY command run. */
|
|
1254
1279
|
export interface PtyRunResult {
|
|
1255
1280
|
/** Exit code when the command completes. */
|
package/native/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export const Shell = nativeBindings.Shell;
|
|
|
24
24
|
|
|
25
25
|
// functions
|
|
26
26
|
export const __ompInstallTokioRuntime = nativeBindings.__ompInstallTokioRuntime;
|
|
27
|
-
export const
|
|
27
|
+
export const __piNativesV17_0_0 = nativeBindings.__piNativesV17_0_0;
|
|
28
28
|
export const astEdit = nativeBindings.astEdit;
|
|
29
29
|
export const astGrep = nativeBindings.astGrep;
|
|
30
30
|
export const astMatch = nativeBindings.astMatch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-natives",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
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://omp.sh",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
|
-
"@oh-my-pi/pi-natives-linux-x64": "
|
|
71
|
-
"@oh-my-pi/pi-natives-linux-arm64": "
|
|
72
|
-
"@oh-my-pi/pi-natives-darwin-x64": "
|
|
73
|
-
"@oh-my-pi/pi-natives-darwin-arm64": "
|
|
74
|
-
"@oh-my-pi/pi-natives-win32-x64": "
|
|
70
|
+
"@oh-my-pi/pi-natives-linux-x64": "17.0.0",
|
|
71
|
+
"@oh-my-pi/pi-natives-linux-arm64": "17.0.0",
|
|
72
|
+
"@oh-my-pi/pi-natives-darwin-x64": "17.0.0",
|
|
73
|
+
"@oh-my-pi/pi-natives-darwin-arm64": "17.0.0",
|
|
74
|
+
"@oh-my-pi/pi-natives-win32-x64": "17.0.0"
|
|
75
75
|
}
|
|
76
76
|
}
|