@stryke/fs 0.29.0 → 0.30.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/dist/copy-file.cjs +10 -5
- package/dist/copy-file.d.ts +22 -5
- package/dist/copy-file.mjs +1 -1
- package/package.json +4 -4
package/dist/copy-file.cjs
CHANGED
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.copyFiles = exports.copyFile = void 0;
|
|
6
|
+
exports.copyFilesSync = exports.copyFiles = exports.copyFileSync = exports.copyFile = void 0;
|
|
7
7
|
var _nodeFs = require("node:fs");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var _promises = require("node:fs/promises");
|
|
9
|
+
const copyFile = async (n, o) => (0, _promises.copyFile)(n, o, _nodeFs.constants.COPYFILE_FICLONE),
|
|
10
|
+
copyFileSync = (n, o) => (0, _nodeFs.copyFileSync)(n, o, _nodeFs.constants.COPYFILE_FICLONE),
|
|
11
|
+
copyFiles = async (n, o, t) => (0, _promises.cp)(n, o, t),
|
|
12
|
+
copyFilesSync = (n, o, t) => (0, _nodeFs.cpSync)(n, o, t);
|
|
13
|
+
exports.copyFilesSync = copyFilesSync;
|
|
14
|
+
exports.copyFiles = copyFiles;
|
|
15
|
+
exports.copyFileSync = copyFileSync;
|
|
16
|
+
exports.copyFile = copyFile;
|
package/dist/copy-file.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import type { CopySyncOptions } from "node:fs";
|
|
1
|
+
import type { CopyOptions, CopySyncOptions } from "node:fs";
|
|
2
|
+
/**
|
|
3
|
+
* Copy a file from one location to another
|
|
4
|
+
*
|
|
5
|
+
* @param file - The file to copy
|
|
6
|
+
* @param to - The destination location
|
|
7
|
+
* @returns An indicator specifying if the copy was successful
|
|
8
|
+
*/
|
|
9
|
+
export declare const copyFile: (file: string, to: string) => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Synchronously copy a file from one location to another
|
|
12
|
+
*
|
|
13
|
+
* @param file - The file to copy
|
|
14
|
+
* @param to - The destination location
|
|
15
|
+
* @returns An indicator specifying if the copy was successful
|
|
16
|
+
*/
|
|
17
|
+
export declare const copyFileSync: (file: string, to: string) => void;
|
|
2
18
|
/**
|
|
3
19
|
* Copy files from one location to another
|
|
4
20
|
*
|
|
@@ -7,12 +23,13 @@ import type { CopySyncOptions } from "node:fs";
|
|
|
7
23
|
* @param options - The copy options
|
|
8
24
|
* @returns An indicator specifying if the copy was successful
|
|
9
25
|
*/
|
|
10
|
-
export declare const copyFiles: (from: string, to: string, options?:
|
|
26
|
+
export declare const copyFiles: (from: string, to: string, options?: CopyOptions) => Promise<void>;
|
|
11
27
|
/**
|
|
12
|
-
*
|
|
28
|
+
* Synchronously copy files from one location to another
|
|
13
29
|
*
|
|
14
|
-
* @param
|
|
30
|
+
* @param from - The source location
|
|
15
31
|
* @param to - The destination location
|
|
32
|
+
* @param options - The copy options
|
|
16
33
|
* @returns An indicator specifying if the copy was successful
|
|
17
34
|
*/
|
|
18
|
-
export declare const
|
|
35
|
+
export declare const copyFilesSync: (from: string, to: string, options?: CopySyncOptions) => void;
|
package/dist/copy-file.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{constants as
|
|
1
|
+
import{constants as p,copyFileSync as r,cpSync as s}from"node:fs";import{cp as c,copyFile as i}from"node:fs/promises";export const copyFile=async(n,o)=>i(n,o,p.COPYFILE_FICLONE),copyFileSync=(n,o)=>r(n,o,p.COPYFILE_FICLONE),copyFiles=async(n,o,t)=>c(n,o,t),copyFilesSync=(n,o,t)=>s(n,o,t);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/fs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@ltd/j-toml": "^1.38.0",
|
|
17
17
|
"@storm-software/config-tools": "latest",
|
|
18
18
|
"@stryke/convert": "^0.6.0",
|
|
19
|
-
"@stryke/path": "^0.15.
|
|
19
|
+
"@stryke/path": "^0.15.4",
|
|
20
20
|
"@stryke/string-format": "^0.12.0",
|
|
21
21
|
"chalk": "^5.4.1",
|
|
22
22
|
"defu": "^6.1.4",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"yaml": "^2.8.1",
|
|
28
28
|
"@stryke/json": "^0.9.3",
|
|
29
29
|
"@stryke/type-checks": "^0.3.10",
|
|
30
|
-
"@stryke/types": "^0.9.
|
|
30
|
+
"@stryke/types": "^0.9.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^22.14.0",
|
|
@@ -395,5 +395,5 @@
|
|
|
395
395
|
"main": "./dist/index.cjs",
|
|
396
396
|
"module": "./dist/index.mjs",
|
|
397
397
|
"types": "./dist/index.d.ts",
|
|
398
|
-
"gitHead": "
|
|
398
|
+
"gitHead": "897c39f136bf41e3ad49b8e8c5a6431968e0b07e"
|
|
399
399
|
}
|