@gajae-code/natives 0.12.4 → 0.12.6
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 +22 -16
- package/native/index.js +1 -2
- package/native/loader-state.js +0 -3
- 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_6(): void
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
497
|
* Apply conservative pre-execution rewrites to a bash command.
|
|
@@ -840,17 +840,7 @@ export declare function encodeSixel(bytes: Uint8Array, targetWidthPx: number, ta
|
|
|
840
840
|
* caller-planned root remains in place while its opened descriptor is
|
|
841
841
|
* authoritative throughout recursive removal.
|
|
842
842
|
*/
|
|
843
|
-
export declare function exactRemoveDirectoryTree(path: string, snapshot: NativeDirectoryTreeSnapshot): NativeExactUnlinkResult
|
|
844
|
-
|
|
845
|
-
/**
|
|
846
|
-
* Replace a staged regular file only after deleting the exact expected
|
|
847
|
-
*
|
|
848
|
-
* The expected destination identity must describe a regular file, not a
|
|
849
|
-
* directory or detach-only request.
|
|
850
|
-
* Publication uses a retained source handle and a no-replace rename, so a
|
|
851
|
-
* successor installed after deletion is preserved.
|
|
852
|
-
*/
|
|
853
|
-
export declare function exactReplacePath(sourcePath: string, destinationPath: string, expectedDestination: NativeExactFileIdentity): NativeExactUnlinkResult
|
|
843
|
+
export declare function exactRemoveDirectoryTree(path: string, snapshot: NativeDirectoryTreeSnapshot, parentIdentity?: NativeDirectoryParentIdentity | undefined | null): NativeExactUnlinkResult
|
|
854
844
|
|
|
855
845
|
/**
|
|
856
846
|
* Restore only the detached object that still has the supplied platform
|
|
@@ -1669,6 +1659,11 @@ export type NativeCanonicalDirectoryIdentity =
|
|
|
1669
1659
|
code: "not_found" | "not_directory" | "not_utf8" | "network_unsupported" | "identity_unavailable" | "io_error";
|
|
1670
1660
|
}
|
|
1671
1661
|
|
|
1662
|
+
export interface NativeDirectoryParentIdentity {
|
|
1663
|
+
dev: bigint
|
|
1664
|
+
ino: bigint
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1672
1667
|
/**
|
|
1673
1668
|
* A deterministic, no-follow description of a directory tree. `relative_path`
|
|
1674
1669
|
* is UTF-8, uses `/` separators, and is empty only for the root entry.
|
|
@@ -1678,6 +1673,7 @@ export interface NativeDirectoryTreeEntry {
|
|
|
1678
1673
|
kind: string
|
|
1679
1674
|
dev: string
|
|
1680
1675
|
ino: string
|
|
1676
|
+
nlink: string
|
|
1681
1677
|
size: string
|
|
1682
1678
|
mtimeNs: string
|
|
1683
1679
|
ctimeNs: string
|
|
@@ -1707,6 +1703,9 @@ export interface NativeDirectoryTreeSnapshot {
|
|
|
1707
1703
|
export interface NativeExactFileIdentity {
|
|
1708
1704
|
dev: bigint
|
|
1709
1705
|
ino: bigint
|
|
1706
|
+
nlink?: bigint
|
|
1707
|
+
parentDev?: bigint
|
|
1708
|
+
parentIno?: bigint
|
|
1710
1709
|
size: bigint
|
|
1711
1710
|
mtimeNs: bigint
|
|
1712
1711
|
/**
|
|
@@ -1736,10 +1735,6 @@ export interface NativeExactFileIdentity {
|
|
|
1736
1735
|
export interface NativeExactUnlinkResult {
|
|
1737
1736
|
ok: boolean
|
|
1738
1737
|
code?: string
|
|
1739
|
-
/**
|
|
1740
|
-
* On Windows this is returned in the caller's namespace; retained handle
|
|
1741
|
-
* operations continue to use the volume-GUID canonical path internally.
|
|
1742
|
-
*/
|
|
1743
1738
|
detachedPath?: string
|
|
1744
1739
|
retainedSuccessorPath?: string
|
|
1745
1740
|
/**
|
|
@@ -2194,6 +2189,17 @@ export interface ShellRunResult {
|
|
|
2194
2189
|
cancelled: boolean
|
|
2195
2190
|
/** Whether the command timed out before completion. */
|
|
2196
2191
|
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
|
|
2197
2203
|
/**
|
|
2198
2204
|
* When the minimizer rewrote the captured output, this carries the
|
|
2199
2205
|
* 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_6 = nativeBindings.__piNativesV0_12_6;
|
|
34
34
|
export const applyBashFixups = nativeBindings.applyBashFixups;
|
|
35
35
|
export const applyOwnerOnlyFdSecurity = nativeBindings.applyOwnerOnlyFdSecurity;
|
|
36
36
|
export const applyOwnerOnlyPathSecurity = nativeBindings.applyOwnerOnlyPathSecurity;
|
|
@@ -43,7 +43,6 @@ 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;
|
|
47
46
|
export const exactRestore = nativeBindings.exactRestore;
|
|
48
47
|
export const exactUnlink = nativeBindings.exactUnlink;
|
|
49
48
|
export const executeShell = nativeBindings.executeShell;
|
package/native/loader-state.js
CHANGED
|
@@ -421,9 +421,6 @@ export function validateLoadedBindings(ctx, bindings, candidate) {
|
|
|
421
421
|
if (typeof bindings.probeWindowsJobMemory !== "function") {
|
|
422
422
|
throw new Error(`Loaded ${candidate} but it lacks required memory probe capability \`probeWindowsJobMemory\`.`);
|
|
423
423
|
}
|
|
424
|
-
if (typeof bindings.exactReplacePath !== "function") {
|
|
425
|
-
throw new Error(`Loaded ${candidate} but it lacks required exact replacement capability \`exactReplacePath\`.`);
|
|
426
|
-
}
|
|
427
424
|
}
|
|
428
425
|
|
|
429
426
|
function buildHelpMessage(ctx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gajae-code/natives",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
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.6",
|
|
65
|
+
"@gajae-code/natives-darwin-x64": "0.12.6",
|
|
66
|
+
"@gajae-code/natives-linux-arm64": "0.12.6",
|
|
67
|
+
"@gajae-code/natives-linux-x64": "0.12.6",
|
|
68
|
+
"@gajae-code/natives-win32-x64": "0.12.6"
|
|
69
69
|
},
|
|
70
70
|
"exports": {
|
|
71
71
|
".": {
|