@gajae-code/natives 0.12.10 → 0.12.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 +38 -7
- package/native/index.js +1 -1
- package/package.json +6 -6
package/native/index.d.ts
CHANGED
|
@@ -7,8 +7,40 @@
|
|
|
7
7
|
* consumers can import them portably; the native controller itself is built
|
|
8
8
|
* only on macOS.
|
|
9
9
|
*/
|
|
10
|
+
export interface ComputerInputAction {
|
|
11
|
+
action: "screenshot" | "click" | "double_click" | "move" | "drag" | "scroll" | "type" | "keypress" | "wait"
|
|
12
|
+
x?: number
|
|
13
|
+
y?: number
|
|
14
|
+
toX?: number
|
|
15
|
+
toY?: number
|
|
16
|
+
scrollX?: number
|
|
17
|
+
scrollY?: number
|
|
18
|
+
button?: string
|
|
19
|
+
text?: string
|
|
20
|
+
keys?: Array<string>
|
|
21
|
+
ms?: number
|
|
22
|
+
timeoutMs?: number
|
|
23
|
+
timeoutGroup?: number
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ComputerBatchStepResult {
|
|
27
|
+
index: number
|
|
28
|
+
action: string
|
|
29
|
+
screenshot?: ComputerScreenshot
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ComputerBatchResult {
|
|
33
|
+
results: Array<ComputerBatchStepResult>
|
|
34
|
+
failureCode?: string
|
|
35
|
+
failureIndex?: number
|
|
36
|
+
failureMessage?: string
|
|
37
|
+
primaryFailureCode?: string
|
|
38
|
+
primaryFailureMessage?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
10
41
|
export declare class ComputerController {
|
|
11
42
|
constructor()
|
|
43
|
+
executeBatch(expectedEpoch: number | undefined | null, actions: Array<ComputerInputAction>, timeoutMs?: number | undefined | null, signal?: unknown): Promise<ComputerBatchResult>
|
|
12
44
|
screenshot(): ComputerScreenshot
|
|
13
45
|
click(expectedEpoch: number | undefined | null, x: number, y: number, button?: string | undefined | null): void
|
|
14
46
|
doubleClick(expectedEpoch: number | undefined | null, x: number, y: number, button?: string | undefined | null): void
|
|
@@ -491,7 +523,7 @@ export declare function __piNativesPublishOutcomeV1(): void
|
|
|
491
523
|
* `packages/natives/native/index.js` (which derives the name from
|
|
492
524
|
* `package.json#version`).
|
|
493
525
|
*/
|
|
494
|
-
export declare function
|
|
526
|
+
export declare function __piNativesV0_12_12(): void
|
|
495
527
|
|
|
496
528
|
/**
|
|
497
529
|
* Apply conservative pre-execution rewrites to a bash command.
|
|
@@ -844,13 +876,12 @@ export declare function encodeSixel(bytes: Uint8Array, targetWidthPx: number, ta
|
|
|
844
876
|
export declare function exactRemoveDirectoryTree(path: string, snapshot: NativeDirectoryTreeSnapshot, parentIdentity?: NativeDirectoryParentIdentity | undefined | null): NativeExactUnlinkResult
|
|
845
877
|
|
|
846
878
|
/**
|
|
847
|
-
*
|
|
848
|
-
*
|
|
879
|
+
* Atomically replace a staged regular file only after validating the exact
|
|
880
|
+
* staged source and expected destination.
|
|
849
881
|
*
|
|
850
|
-
* Both identities must describe regular files
|
|
851
|
-
* requests. Publication uses
|
|
852
|
-
*
|
|
853
|
-
* successor is preserved.
|
|
882
|
+
* Both identities must describe regular files in the same retained parent, not
|
|
883
|
+
* directories or detach-only requests. Publication uses an atomic namespace
|
|
884
|
+
* exchange so a substituted source or destination is never overwritten.
|
|
854
885
|
*/
|
|
855
886
|
export declare function exactReplacePath(sourcePath: string, destinationPath: string, expectedSource: NativeExactFileIdentity, expectedDestination: NativeExactFileIdentity): NativeExactUnlinkResult
|
|
856
887
|
|
package/native/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export const Shell = nativeBindings.Shell;
|
|
|
30
30
|
|
|
31
31
|
// functions
|
|
32
32
|
export const __piNativesPublishOutcomeV1 = nativeBindings.__piNativesPublishOutcomeV1;
|
|
33
|
-
export const
|
|
33
|
+
export const __piNativesV0_12_12 = nativeBindings.__piNativesV0_12_12;
|
|
34
34
|
export const applyBashFixups = nativeBindings.applyBashFixups;
|
|
35
35
|
export const applyOwnerOnlyFdSecurity = nativeBindings.applyOwnerOnlyFdSecurity;
|
|
36
36
|
export const applyOwnerOnlyPathSecurity = nativeBindings.applyOwnerOnlyPathSecurity;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gajae-code/natives",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.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://gajae-code.com",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"README.md"
|
|
62
62
|
],
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@gajae-code/natives-darwin-arm64": "0.12.
|
|
65
|
-
"@gajae-code/natives-darwin-x64": "0.12.
|
|
66
|
-
"@gajae-code/natives-linux-arm64": "0.12.
|
|
67
|
-
"@gajae-code/natives-linux-x64": "0.12.
|
|
68
|
-
"@gajae-code/natives-win32-x64": "0.12.
|
|
64
|
+
"@gajae-code/natives-darwin-arm64": "0.12.12",
|
|
65
|
+
"@gajae-code/natives-darwin-x64": "0.12.12",
|
|
66
|
+
"@gajae-code/natives-linux-arm64": "0.12.12",
|
|
67
|
+
"@gajae-code/natives-linux-x64": "0.12.12",
|
|
68
|
+
"@gajae-code/natives-win32-x64": "0.12.12"
|
|
69
69
|
},
|
|
70
70
|
"exports": {
|
|
71
71
|
".": {
|