@gajae-code/natives 0.12.1 → 0.12.2
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 +15 -1
- package/native/index.js +2 -1
- package/native/loader-state.js +3 -0
- 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_2(): void
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
497
|
* Apply conservative pre-execution rewrites to a bash command.
|
|
@@ -842,6 +842,16 @@ export declare function encodeSixel(bytes: Uint8Array, targetWidthPx: number, ta
|
|
|
842
842
|
*/
|
|
843
843
|
export declare function exactRemoveDirectoryTree(path: string, snapshot: NativeDirectoryTreeSnapshot): NativeExactUnlinkResult
|
|
844
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
|
|
854
|
+
|
|
845
855
|
/**
|
|
846
856
|
* Restore only the detached object that still has the supplied platform
|
|
847
857
|
* identity. The detached and original paths must retain the same validated
|
|
@@ -1726,6 +1736,10 @@ export interface NativeExactFileIdentity {
|
|
|
1726
1736
|
export interface NativeExactUnlinkResult {
|
|
1727
1737
|
ok: boolean
|
|
1728
1738
|
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
|
+
*/
|
|
1729
1743
|
detachedPath?: string
|
|
1730
1744
|
retainedSuccessorPath?: string
|
|
1731
1745
|
/**
|
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_2 = nativeBindings.__piNativesV0_12_2;
|
|
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/native/loader-state.js
CHANGED
|
@@ -421,6 +421,9 @@ 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
|
+
}
|
|
424
427
|
}
|
|
425
428
|
|
|
426
429
|
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.2",
|
|
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.2",
|
|
65
|
+
"@gajae-code/natives-darwin-x64": "0.12.2",
|
|
66
|
+
"@gajae-code/natives-linux-arm64": "0.12.2",
|
|
67
|
+
"@gajae-code/natives-linux-x64": "0.12.2",
|
|
68
|
+
"@gajae-code/natives-win32-x64": "0.12.2"
|
|
69
69
|
},
|
|
70
70
|
"exports": {
|
|
71
71
|
".": {
|