rclonefile-cli 1.0.0 → 1.1.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/README.md CHANGED
@@ -1,15 +1,20 @@
1
1
  # rclonefile-cli
2
2
 
3
- Clone files.
3
+ > The macOS API for creating copy on write clones of files and folders
4
4
 
5
5
  ## Description
6
6
 
7
- The macOS API for creating copy on write clones of files.
8
-
9
7
  This is a small wrapper around the
10
- [clonefile](https://www.manpagez.com/man/2/clonefile/) API on macOS for cloning
11
- files.
8
+ [clonefile(2)](https://www.manpagez.com/man/2/clonefile/) API on macOS for
9
+ cloning files and folders.
10
+
11
+ ## Why?
12
12
 
13
+ - Clones files and folders, without taking up disk space
14
+ - Uses [clonefile(2)](https://www.manpagez.com/man/2/clonefile/) introduced in macOS 10.12
15
+ - Takes advantage of the APFS file system
16
+ - All flags available.
17
+ - Fast!
13
18
 
14
19
  ## Install
15
20
 
@@ -38,3 +43,8 @@ $ rclonefile --help
38
43
  $ rclonefile super-mario.png super-clone.png
39
44
 
40
45
  ```
46
+
47
+ ## Related
48
+
49
+ - [rclonefile](https://github.com/sverrejoh/rclonefile) - API for this module
50
+ - [clonefile(2)](https://www.manpagez.com/man/2/clonefile/) - Man page for system API
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/lib/index.js CHANGED
@@ -20,17 +20,17 @@ const cli = meow(`
20
20
  flags: {
21
21
  noFollow: {
22
22
  type: "boolean",
23
- alias: "f",
23
+ shortFlag: "f",
24
24
  default: false,
25
25
  },
26
26
  noOwnerCopy: {
27
27
  type: "boolean",
28
- alias: "c",
28
+ shortFlag: "c",
29
29
  default: false,
30
30
  },
31
31
  cloneAcl: {
32
32
  type: "boolean",
33
- alias: "a",
33
+ shortFlag: "a",
34
34
  default: false,
35
35
  },
36
36
  },
package/package.json CHANGED
@@ -1,19 +1,32 @@
1
1
  {
2
2
  "name": "rclonefile-cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
+ "description": "CLI for creating copy-on-write clones of files on macOS",
4
5
  "type": "module",
5
6
  "bin": {
6
7
  "rclonefile": "./lib/index.js"
7
8
  },
8
9
  "scripts": {
9
10
  "build": "tsc",
10
- "watch": "tsc -w"
11
+ "watch": "tsc -w",
12
+ "test": "vitest"
11
13
  },
12
- "exports": "lib/index.js",
14
+ "exports": "./lib/index.js",
13
15
  "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/sverrejoh/rclonefile-cli.git"
19
+ },
20
+ "engines": {
21
+ "node": ">= 24"
22
+ },
14
23
  "dependencies": {
15
- "meow": "^11.0.0",
16
- "rclonefile": "^1.0.1",
17
- "typescript": "^4.9.5"
24
+ "meow": "^14.0.0",
25
+ "rclonefile": "^2.0.5"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^22.0.0",
29
+ "typescript": "^5.7.0",
30
+ "vitest": "^3.0.0"
18
31
  }
19
32
  }
package/tsconfig.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "nodenext",
3
+ "module": "NodeNext",
4
+ "moduleResolution": "NodeNext",
4
5
  "rootDir": "src",
5
6
  "outDir": "lib",
6
- "target": "es2020"
7
- }
7
+ "target": "ES2024",
8
+ "strict": true,
9
+ "declaration": true,
10
+ "skipLibCheck": true
11
+ },
12
+ "include": ["src"]
8
13
  }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from "vitest/config";
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ testTimeout: 10000,
6
+ },
7
+ });