@kexi/vibe-native 0.12.7 → 0.15.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/index.d.ts
CHANGED
|
@@ -32,3 +32,21 @@ export declare function supportsDirectory(): boolean
|
|
|
32
32
|
* Returns "darwin" or "linux"
|
|
33
33
|
*/
|
|
34
34
|
export declare function getPlatform(): string
|
|
35
|
+
/**
|
|
36
|
+
* Move a file or directory to the system trash
|
|
37
|
+
*
|
|
38
|
+
* Uses the `trash` crate for cross-platform trash support:
|
|
39
|
+
* - macOS: Uses Finder Trash
|
|
40
|
+
* - Linux: Uses XDG Trash (~/.local/share/Trash)
|
|
41
|
+
* - Windows: Uses Recycle Bin (not currently built on this platform)
|
|
42
|
+
*/
|
|
43
|
+
export declare function moveToTrash(path: string): void
|
|
44
|
+
/**
|
|
45
|
+
* Move a file or directory to the system trash asynchronously
|
|
46
|
+
*
|
|
47
|
+
* Uses the `trash` crate for cross-platform trash support:
|
|
48
|
+
* - macOS: Uses Finder Trash
|
|
49
|
+
* - Linux: Uses XDG Trash (~/.local/share/Trash)
|
|
50
|
+
* - Windows: Uses Recycle Bin (not currently built on this platform)
|
|
51
|
+
*/
|
|
52
|
+
export declare function moveToTrashAsync(path: string): Promise<void>
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { cloneSync, cloneAsync, clone, isAvailable, supportsDirectory, getPlatform } = nativeBinding
|
|
313
|
+
const { cloneSync, cloneAsync, clone, isAvailable, supportsDirectory, getPlatform, moveToTrash, moveToTrashAsync } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.cloneSync = cloneSync
|
|
316
316
|
module.exports.cloneAsync = cloneAsync
|
|
@@ -318,3 +318,5 @@ module.exports.clone = clone
|
|
|
318
318
|
module.exports.isAvailable = isAvailable
|
|
319
319
|
module.exports.supportsDirectory = supportsDirectory
|
|
320
320
|
module.exports.getPlatform = getPlatform
|
|
321
|
+
module.exports.moveToTrash = moveToTrash
|
|
322
|
+
module.exports.moveToTrashAsync = moveToTrashAsync
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kexi/vibe-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Native clone operations for vibe CLI (clonefile on macOS, FICLONE on Linux)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
41
|
"url": "git+https://github.com/kexi/vibe.git",
|
|
42
|
-
"directory": "packages
|
|
42
|
+
"directory": "packages/native"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
45
45
|
"clonefile",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|