@gajae-code/natives 0.15.6 → 0.16.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 CHANGED
@@ -544,7 +544,7 @@ export declare function __piNativesPublishOutcomeV1(): void
544
544
  * `packages/natives/native/index.js` (which derives the name from
545
545
  * `package.json#version`).
546
546
  */
547
- export declare function __piNativesV0_15_6(): void
547
+ export declare function __piNativesV0_16_0(): void
548
548
 
549
549
  /**
550
550
  * Apply conservative pre-execution rewrites to a bash command.
@@ -909,7 +909,7 @@ export declare function exactRemoveDirectoryTree(path: string, snapshot: NativeD
909
909
  export declare function exactReplacePath(sourcePath: string, destinationPath: string, expectedSource: NativeExactFileIdentity, expectedDestination: NativeExactFileIdentity): NativeExactUnlinkResult
910
910
 
911
911
  /**
912
- * Restore only the detached object that still has the supplied platform
912
+ * Restore only the detached object that still has the supplied exact
913
913
  * identity. The detached and original paths must retain the same validated
914
914
  * parent, and restoration never replaces an existing original path.
915
915
  */
@@ -935,6 +935,17 @@ export declare function exactUnlink(path: string, identity: NativeExactFileIdent
935
935
  */
936
936
  export declare function exactUnlinkDirect(path: string, identity: NativeExactFileIdentity): NativeExactUnlinkResult
937
937
 
938
+ /**
939
+ * Start direct exact unlink without retaining an N-API task or promise.
940
+ *
941
+ * Cleanup is best effort: the detached operation is intentionally abandoned
942
+ * when the process exits, while the exact identity checks still protect any
943
+ * pathname that remains alive long enough to be examined. A bounded queue
944
+ * keeps cleanup bursts from spawning an unbounded number of OS threads; work
945
+ * that cannot be queued is left for the owning reconciliation pass.
946
+ */
947
+ export declare function exactUnlinkDirectDetached(path: string, identity: NativeExactFileIdentity): boolean
948
+
938
949
  /**
939
950
  * Execute a brush shell command.
940
951
  *
@@ -2152,6 +2163,24 @@ export interface RecoveryFsRetainedCleanupResult {
2152
2163
  treeSnapshot?: NativeDirectoryTreeSnapshot
2153
2164
  }
2154
2165
 
2166
+ /**
2167
+ * Publish a staged directory under a destination name that must not already
2168
+ * exist.
2169
+ *
2170
+ * Uses descriptor-relative `mkdirat` ownership followed by `renameat`.
2171
+ * This is the directory stand-in for `renameat2(RENAME_NOREPLACE)` on mounts
2172
+ * that reject rename flags with `EINVAL`/`ENOSYS`. The native implementation
2173
+ * validates every path component without following symlinks and never
2174
+ * overwrites a non-empty destination directory.
2175
+ */
2176
+ export declare function renameDirectoryNoReplacePath(sourcePath: string, destinationPath: string): NativeNoReplaceResult
2177
+
2178
+ /**
2179
+ * Async variant of [`rename_directory_no_replace_path`] scheduled on the
2180
+ * libuv blocking pool.
2181
+ */
2182
+ export declare function renameDirectoryNoReplacePathAsync(sourcePath: string, destinationPath: string): Promise<NativeNoReplaceResult>
2183
+
2155
2184
  export declare function renameNoReplacePath(sourcePath: string, destinationPath: string): NativeNoReplaceResult
2156
2185
 
2157
2186
  /**
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 __piNativesV0_15_6 = nativeBindings.__piNativesV0_15_6;
33
+ export const __piNativesV0_16_0 = nativeBindings.__piNativesV0_16_0;
34
34
  export const applyBashFixups = nativeBindings.applyBashFixups;
35
35
  export const applyOwnerOnlyFdSecurity = nativeBindings.applyOwnerOnlyFdSecurity;
36
36
  export const applyOwnerOnlyPathSecurity = nativeBindings.applyOwnerOnlyPathSecurity;
@@ -48,6 +48,7 @@ export const exactReplacePath = nativeBindings.exactReplacePath;
48
48
  export const exactRestore = nativeBindings.exactRestore;
49
49
  export const exactUnlink = nativeBindings.exactUnlink;
50
50
  export const exactUnlinkDirect = nativeBindings.exactUnlinkDirect;
51
+ export const exactUnlinkDirectDetached = nativeBindings.exactUnlinkDirectDetached;
51
52
  export const executeShell = nativeBindings.executeShell;
52
53
  export const extractSegments = nativeBindings.extractSegments;
53
54
  export const fuzzyFind = nativeBindings.fuzzyFind;
@@ -83,6 +84,8 @@ export const parseKittySequence = nativeBindings.parseKittySequence;
83
84
  export const probeWindowsJobMemory = nativeBindings.probeWindowsJobMemory;
84
85
  export const ptyTimeoutCount = nativeBindings.ptyTimeoutCount;
85
86
  export const readImageFromClipboard = nativeBindings.readImageFromClipboard;
87
+ export const renameDirectoryNoReplacePath = nativeBindings.renameDirectoryNoReplacePath;
88
+ export const renameDirectoryNoReplacePathAsync = nativeBindings.renameDirectoryNoReplacePathAsync;
86
89
  export const renameNoReplacePath = nativeBindings.renameNoReplacePath;
87
90
  export const renameNoReplacePathAsync = nativeBindings.renameNoReplacePathAsync;
88
91
  export const repairOwnerOnlyPathSecurityExpected = nativeBindings.repairOwnerOnlyPathSecurityExpected;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gajae-code/natives",
3
- "version": "0.15.6",
3
+ "version": "0.16.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://gajae-code.com",
@@ -61,11 +61,11 @@
61
61
  "README.md"
62
62
  ],
63
63
  "optionalDependencies": {
64
- "@gajae-code/natives-darwin-arm64": "0.15.6",
65
- "@gajae-code/natives-darwin-x64": "0.15.6",
66
- "@gajae-code/natives-linux-arm64": "0.15.6",
67
- "@gajae-code/natives-linux-x64": "0.15.6",
68
- "@gajae-code/natives-win32-x64": "0.15.6"
64
+ "@gajae-code/natives-darwin-arm64": "0.16.0",
65
+ "@gajae-code/natives-darwin-x64": "0.16.0",
66
+ "@gajae-code/natives-linux-arm64": "0.16.0",
67
+ "@gajae-code/natives-linux-x64": "0.16.0",
68
+ "@gajae-code/natives-win32-x64": "0.16.0"
69
69
  },
70
70
  "exports": {
71
71
  ".": {