@gajae-code/natives 0.12.6 → 0.12.8
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 -16
- package/native/index.js +2 -1
- package/package.json +6 -6
package/native/index.d.ts
CHANGED
|
@@ -491,7 +491,7 @@ export declare function __piNativesPublishOutcomeV1(): void
|
|
|
491
491
|
* `packages/natives/native/index.js` (which derives the name from
|
|
492
492
|
* `package.json#version`).
|
|
493
493
|
*/
|
|
494
|
-
export declare function
|
|
494
|
+
export declare function __piNativesV0_12_8(): void
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
497
|
* Apply conservative pre-execution rewrites to a bash command.
|
|
@@ -835,13 +835,25 @@ export declare enum Ellipsis {
|
|
|
835
835
|
export declare function encodeSixel(bytes: Uint8Array, targetWidthPx: number, targetHeightPx: number): string
|
|
836
836
|
|
|
837
837
|
/**
|
|
838
|
-
* Remove
|
|
839
|
-
*
|
|
840
|
-
*
|
|
841
|
-
* authoritative throughout
|
|
838
|
+
* Remove a directory tree only when a fresh descriptor-relative snapshot
|
|
839
|
+
* exactly equals the persisted snapshot. POSIX first no-replace detaches the
|
|
840
|
+
* verified root to its deterministic `.removing` sibling; the reopened
|
|
841
|
+
* detached descriptor remains authoritative throughout payload scrubbing and
|
|
842
|
+
* replay.
|
|
842
843
|
*/
|
|
843
844
|
export declare function exactRemoveDirectoryTree(path: string, snapshot: NativeDirectoryTreeSnapshot, parentIdentity?: NativeDirectoryParentIdentity | undefined | null): NativeExactUnlinkResult
|
|
844
845
|
|
|
846
|
+
/**
|
|
847
|
+
* Replace a staged regular file only after validating the exact staged source
|
|
848
|
+
* and deleting the exact expected destination.
|
|
849
|
+
*
|
|
850
|
+
* Both identities must describe regular files, not directories or detach-only
|
|
851
|
+
* requests. Publication uses the retained verified source handle and a
|
|
852
|
+
* no-replace rename, so source substitution is rejected and a destination
|
|
853
|
+
* successor is preserved.
|
|
854
|
+
*/
|
|
855
|
+
export declare function exactReplacePath(sourcePath: string, destinationPath: string, expectedSource: NativeExactFileIdentity, expectedDestination: NativeExactFileIdentity): NativeExactUnlinkResult
|
|
856
|
+
|
|
845
857
|
/**
|
|
846
858
|
* Restore only the detached object that still has the supplied platform
|
|
847
859
|
* identity. The detached and original paths must retain the same validated
|
|
@@ -1735,6 +1747,15 @@ export interface NativeExactFileIdentity {
|
|
|
1735
1747
|
export interface NativeExactUnlinkResult {
|
|
1736
1748
|
ok: boolean
|
|
1737
1749
|
code?: string
|
|
1750
|
+
/**
|
|
1751
|
+
* True only when retained directory payloads were descriptor-scrubbed and
|
|
1752
|
+
* every file plus containing directory namespace was fsynced before return.
|
|
1753
|
+
*/
|
|
1754
|
+
payloadDurable?: boolean
|
|
1755
|
+
/**
|
|
1756
|
+
* On Windows this is returned in the caller's namespace; retained handle
|
|
1757
|
+
* operations continue to use the volume-GUID canonical path internally.
|
|
1758
|
+
*/
|
|
1738
1759
|
detachedPath?: string
|
|
1739
1760
|
retainedSuccessorPath?: string
|
|
1740
1761
|
/**
|
|
@@ -1988,6 +2009,7 @@ export declare function readImageFromClipboard(): Promise<ClipboardImage | undef
|
|
|
1988
2009
|
export interface RecoveryFsIdentity {
|
|
1989
2010
|
dev: string
|
|
1990
2011
|
ino: string
|
|
2012
|
+
nlink: string
|
|
1991
2013
|
size: string
|
|
1992
2014
|
mtimeNs: string
|
|
1993
2015
|
ctimeNs: string
|
|
@@ -2189,17 +2211,6 @@ export interface ShellRunResult {
|
|
|
2189
2211
|
cancelled: boolean
|
|
2190
2212
|
/** Whether the command timed out before completion. */
|
|
2191
2213
|
timedOut: boolean
|
|
2192
|
-
/**
|
|
2193
|
-
* Whether the core output reader failed to settle before execution
|
|
2194
|
-
* returned.
|
|
2195
|
-
*/
|
|
2196
|
-
outputCaptureIncomplete?: boolean
|
|
2197
|
-
/** Chunks dropped before the JavaScript output callback could receive them. */
|
|
2198
|
-
droppedOutputChunks?: number
|
|
2199
|
-
/** Bytes dropped before the JavaScript output callback could receive them. */
|
|
2200
|
-
droppedOutputBytes?: number
|
|
2201
|
-
/** Whether a loss counter exceeded JavaScript's exact integer range. */
|
|
2202
|
-
outputLossCountSaturated?: boolean
|
|
2203
2214
|
/**
|
|
2204
2215
|
* When the minimizer rewrote the captured output, this carries the
|
|
2205
2216
|
* original buffer + telemetry so the session layer can persist it as
|
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_8 = nativeBindings.__piNativesV0_12_8;
|
|
34
34
|
export const applyBashFixups = nativeBindings.applyBashFixups;
|
|
35
35
|
export const applyOwnerOnlyFdSecurity = nativeBindings.applyOwnerOnlyFdSecurity;
|
|
36
36
|
export const applyOwnerOnlyPathSecurity = nativeBindings.applyOwnerOnlyPathSecurity;
|
|
@@ -43,6 +43,7 @@ export const detectMacOSAppearance = nativeBindings.detectMacOSAppearance;
|
|
|
43
43
|
export const diffLines = nativeBindings.diffLines;
|
|
44
44
|
export const encodeSixel = nativeBindings.encodeSixel;
|
|
45
45
|
export const exactRemoveDirectoryTree = nativeBindings.exactRemoveDirectoryTree;
|
|
46
|
+
export const exactReplacePath = nativeBindings.exactReplacePath;
|
|
46
47
|
export const exactRestore = nativeBindings.exactRestore;
|
|
47
48
|
export const exactUnlink = nativeBindings.exactUnlink;
|
|
48
49
|
export const executeShell = nativeBindings.executeShell;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gajae-code/natives",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.8",
|
|
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.8",
|
|
65
|
+
"@gajae-code/natives-darwin-x64": "0.12.8",
|
|
66
|
+
"@gajae-code/natives-linux-arm64": "0.12.8",
|
|
67
|
+
"@gajae-code/natives-linux-x64": "0.12.8",
|
|
68
|
+
"@gajae-code/natives-win32-x64": "0.12.8"
|
|
69
69
|
},
|
|
70
70
|
"exports": {
|
|
71
71
|
".": {
|