@ainc/fs 0.1.12 → 0.1.13
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/basename.d.ts +6 -6
- package/dist/basename.js +16 -16
- package/dist/copy.d.ts +40 -40
- package/dist/copy.js +89 -89
- package/dist/cpdir.d.ts +19 -19
- package/dist/cpdir.js +28 -28
- package/dist/cwd.d.ts +6 -6
- package/dist/cwd.js +16 -16
- package/dist/dirname.d.ts +6 -6
- package/dist/dirname.js +30 -30
- package/dist/extname.d.ts +6 -6
- package/dist/extname.js +16 -16
- package/dist/filename.d.ts +6 -6
- package/dist/filename.js +24 -24
- package/dist/find.d.ts +26 -26
- package/dist/find.js +72 -72
- package/dist/findFile.d.ts +20 -20
- package/dist/findFile.js +39 -39
- package/dist/finddir.d.ts +20 -20
- package/dist/finddir.js +39 -39
- package/dist/helpers/FileResolver.d.ts +54 -0
- package/dist/helpers/FileResolver.d.ts.map +1 -0
- package/dist/helpers/FileResolver.js +184 -0
- package/dist/helpers/FileResolver.js.map +1 -0
- package/dist/helpers/compose.d.ts +14 -0
- package/dist/helpers/compose.d.ts.map +1 -0
- package/dist/helpers/compose.js +38 -0
- package/dist/helpers/compose.js.map +1 -0
- package/dist/helpers/each.d.ts +7 -0
- package/dist/helpers/each.d.ts.map +1 -0
- package/dist/helpers/each.js +21 -0
- package/dist/helpers/each.js.map +1 -0
- package/dist/helpers/match.d.ts +7 -0
- package/dist/helpers/match.d.ts.map +1 -0
- package/dist/helpers/match.js +30 -0
- package/dist/helpers/match.js.map +1 -0
- package/dist/helpers/normalizePath.d.ts +23 -0
- package/dist/helpers/normalizePath.d.ts.map +1 -0
- package/dist/helpers/normalizePath.js +37 -0
- package/dist/helpers/normalizePath.js.map +1 -0
- package/dist/helpers/safeCall.d.ts +7 -0
- package/dist/helpers/safeCall.d.ts.map +1 -0
- package/dist/helpers/safeCall.js +24 -0
- package/dist/helpers/safeCall.js.map +1 -0
- package/dist/helpers/split.d.ts +7 -0
- package/dist/helpers/split.d.ts.map +1 -0
- package/dist/helpers/split.js +25 -0
- package/dist/helpers/split.js.map +1 -0
- package/dist/homedir.d.ts +6 -6
- package/dist/homedir.js +31 -31
- package/dist/includePaths.d.ts +6 -6
- package/dist/includePaths.js +53 -53
- package/dist/index.d.ts +42 -44
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +88 -92
- package/dist/index.js.map +1 -1
- package/dist/indir.d.ts +13 -13
- package/dist/indir.js +26 -26
- package/dist/isAbsolutePath.d.ts +6 -6
- package/dist/isAbsolutePath.js +24 -24
- package/dist/isDirectory.d.ts +12 -12
- package/dist/isDirectory.js +26 -26
- package/dist/isRelativePath.d.ts +6 -6
- package/dist/isRelativePath.js +44 -44
- package/dist/json.d.ts +21 -21
- package/dist/json.js +33 -33
- package/dist/jsonc.d.ts +21 -21
- package/dist/jsonc.js +40 -40
- package/dist/lstat.d.ts +22 -22
- package/dist/lstat.js +30 -30
- package/dist/mapdir.d.ts +22 -22
- package/dist/mapdir.js +42 -42
- package/dist/mkdir.d.ts +6 -6
- package/dist/mkdir.js +37 -37
- package/dist/normalizeJSON.d.ts +6 -6
- package/dist/normalizeJSON.js +144 -144
- package/dist/readFile.d.ts +29 -29
- package/dist/readFile.js +26 -26
- package/dist/readStream.d.ts +36 -36
- package/dist/readStream.js +19 -19
- package/dist/readdir.d.ts +16 -16
- package/dist/readdir.js +34 -34
- package/dist/readline.d.ts +16 -16
- package/dist/readline.js +24 -24
- package/dist/realpath.d.ts +12 -12
- package/dist/realpath.js +32 -32
- package/dist/relative.d.ts +6 -6
- package/dist/relative.js +38 -38
- package/dist/resolve.d.ts +26 -26
- package/dist/resolve.js +53 -53
- package/dist/resolvePath.d.ts +27 -0
- package/dist/resolvePath.d.ts.map +1 -0
- package/dist/resolvePath.js +178 -0
- package/dist/resolvePath.js.map +1 -0
- package/dist/rmdir.d.ts +6 -6
- package/dist/rmdir.js +40 -40
- package/dist/stat.d.ts +21 -21
- package/dist/stat.js +30 -30
- package/dist/supdir.d.ts +21 -15
- package/dist/supdir.d.ts.map +1 -1
- package/dist/supdir.js +62 -35
- package/dist/supdir.js.map +1 -1
- package/dist/symlink.d.ts +22 -22
- package/dist/symlink.js +39 -39
- package/dist/unlink.d.ts +6 -6
- package/dist/unlink.js +28 -28
- package/dist/usedir.d.ts +6 -6
- package/dist/usedir.js +24 -24
- package/dist/writeFile.d.ts +33 -33
- package/dist/writeFile.js +49 -49
- package/dist/writeStream.d.ts +35 -35
- package/dist/writeStream.js +19 -19
- package/package.json +2 -2
- package/src/helpers/FileResolver.ts +282 -0
- package/src/helpers/compose.ts +49 -0
- package/src/helpers/each.ts +19 -0
- package/src/helpers/match.ts +31 -0
- package/src/helpers/normalizePath.ts +51 -0
- package/src/helpers/safeCall.ts +21 -0
- package/src/helpers/split.ts +25 -0
- package/src/index.ts +1 -3
- package/src/resolvePath.ts +234 -0
- package/src/supdir.ts +31 -0
- package/dist/resolveFile.d.ts +0 -22
- package/dist/resolveFile.d.ts.map +0 -1
- package/dist/resolveFile.js +0 -80
- package/dist/resolveFile.js.map +0 -1
- package/dist/resolveModule.d.ts +0 -41
- package/dist/resolveModule.d.ts.map +0 -1
- package/dist/resolveModule.js +0 -119
- package/dist/resolveModule.js.map +0 -1
- package/dist/resolvePaths.d.ts +0 -22
- package/dist/resolvePaths.d.ts.map +0 -1
- package/dist/resolvePaths.js +0 -233
- package/dist/resolvePaths.js.map +0 -1
- package/src/resolveFile.ts +0 -103
- package/src/resolveModule.ts +0 -157
- package/src/resolvePaths.ts +0 -320
package/dist/unlink.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*****************************************
|
|
3
|
-
* 移除文件
|
|
4
|
-
*****************************************
|
|
5
|
-
*/
|
|
6
|
-
export declare function unlink(path: string): boolean;
|
|
1
|
+
/**
|
|
2
|
+
*****************************************
|
|
3
|
+
* 移除文件
|
|
4
|
+
*****************************************
|
|
5
|
+
*/
|
|
6
|
+
export declare function unlink(path: string): boolean;
|
|
7
7
|
//# sourceMappingURL=unlink.d.ts.map
|
package/dist/unlink.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*****************************************
|
|
3
|
-
* Created by edonet@163.com
|
|
4
|
-
* Created on 2019-11-07 17:29:50
|
|
5
|
-
*****************************************
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.unlink = void 0;
|
|
10
|
-
/**
|
|
11
|
-
*****************************************
|
|
12
|
-
* 加载依赖
|
|
13
|
-
*****************************************
|
|
14
|
-
*/
|
|
15
|
-
const fs = require("fs");
|
|
16
|
-
const lstat_1 = require("./lstat");
|
|
17
|
-
/**
|
|
18
|
-
*****************************************
|
|
19
|
-
* 移除文件
|
|
20
|
-
*****************************************
|
|
21
|
-
*/
|
|
22
|
-
function unlink(path) {
|
|
23
|
-
// 移除文件
|
|
24
|
-
lstat_1.lstat(path) && fs.unlinkSync(path);
|
|
25
|
-
// 返回结果
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
exports.unlink = unlink;
|
|
1
|
+
/**
|
|
2
|
+
*****************************************
|
|
3
|
+
* Created by edonet@163.com
|
|
4
|
+
* Created on 2019-11-07 17:29:50
|
|
5
|
+
*****************************************
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.unlink = void 0;
|
|
10
|
+
/**
|
|
11
|
+
*****************************************
|
|
12
|
+
* 加载依赖
|
|
13
|
+
*****************************************
|
|
14
|
+
*/
|
|
15
|
+
const fs = require("fs");
|
|
16
|
+
const lstat_1 = require("./lstat");
|
|
17
|
+
/**
|
|
18
|
+
*****************************************
|
|
19
|
+
* 移除文件
|
|
20
|
+
*****************************************
|
|
21
|
+
*/
|
|
22
|
+
function unlink(path) {
|
|
23
|
+
// 移除文件
|
|
24
|
+
lstat_1.lstat(path) && fs.unlinkSync(path);
|
|
25
|
+
// 返回结果
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
exports.unlink = unlink;
|
|
29
29
|
//# sourceMappingURL=unlink.js.map
|
package/dist/usedir.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*****************************************
|
|
3
|
-
* 使用目录路径
|
|
4
|
-
*****************************************
|
|
5
|
-
*/
|
|
6
|
-
export declare function usedir(...basedir: string[]): (...args: string[]) => string;
|
|
1
|
+
/**
|
|
2
|
+
*****************************************
|
|
3
|
+
* 使用目录路径
|
|
4
|
+
*****************************************
|
|
5
|
+
*/
|
|
6
|
+
export declare function usedir(...basedir: string[]): (...args: string[]) => string;
|
|
7
7
|
//# sourceMappingURL=usedir.d.ts.map
|
package/dist/usedir.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*****************************************
|
|
3
|
-
* Created by edonet@163.com
|
|
4
|
-
* Created on 2019-11-14 10:19:06
|
|
5
|
-
*****************************************
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.usedir = void 0;
|
|
10
|
-
/**
|
|
11
|
-
*****************************************
|
|
12
|
-
* 加载依赖
|
|
13
|
-
*****************************************
|
|
14
|
-
*/
|
|
15
|
-
const path = require("path");
|
|
16
|
-
/**
|
|
17
|
-
*****************************************
|
|
18
|
-
* 使用目录路径
|
|
19
|
-
*****************************************
|
|
20
|
-
*/
|
|
21
|
-
function usedir(...basedir) {
|
|
22
|
-
return (...args) => path.resolve(...basedir, ...args);
|
|
23
|
-
}
|
|
24
|
-
exports.usedir = usedir;
|
|
1
|
+
/**
|
|
2
|
+
*****************************************
|
|
3
|
+
* Created by edonet@163.com
|
|
4
|
+
* Created on 2019-11-14 10:19:06
|
|
5
|
+
*****************************************
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.usedir = void 0;
|
|
10
|
+
/**
|
|
11
|
+
*****************************************
|
|
12
|
+
* 加载依赖
|
|
13
|
+
*****************************************
|
|
14
|
+
*/
|
|
15
|
+
const path = require("path");
|
|
16
|
+
/**
|
|
17
|
+
*****************************************
|
|
18
|
+
* 使用目录路径
|
|
19
|
+
*****************************************
|
|
20
|
+
*/
|
|
21
|
+
function usedir(...basedir) {
|
|
22
|
+
return (...args) => path.resolve(...basedir, ...args);
|
|
23
|
+
}
|
|
24
|
+
exports.usedir = usedir;
|
|
25
25
|
//# sourceMappingURL=usedir.js.map
|
package/dist/writeFile.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
*****************************************
|
|
4
|
-
* 加载依赖
|
|
5
|
-
*****************************************
|
|
6
|
-
*/
|
|
7
|
-
import * as fs from 'fs';
|
|
8
|
-
/**
|
|
9
|
-
*****************************************
|
|
10
|
-
* 写入文件配置
|
|
11
|
-
*****************************************
|
|
12
|
-
*/
|
|
13
|
-
interface Options {
|
|
14
|
-
encoding?: string;
|
|
15
|
-
append?: boolean;
|
|
16
|
-
mode?: fs.Mode;
|
|
17
|
-
flag?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
*****************************************
|
|
21
|
-
* 写入文件
|
|
22
|
-
*****************************************
|
|
23
|
-
*/
|
|
24
|
-
declare function writeFile(path: string, content?: string | Buffer): void;
|
|
25
|
-
declare function writeFile(path: string, content: string | Buffer, encoding: string): void;
|
|
26
|
-
declare function writeFile(path: string, content: string | Buffer, append: boolean): void;
|
|
27
|
-
declare function writeFile(path: string, content: string | Buffer, { append, encoding, mode, flag }: Options): void;
|
|
28
|
-
/**
|
|
29
|
-
*****************************************
|
|
30
|
-
* 抛出接口
|
|
31
|
-
*****************************************
|
|
32
|
-
*/
|
|
33
|
-
export { writeFile };
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
*****************************************
|
|
4
|
+
* 加载依赖
|
|
5
|
+
*****************************************
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
/**
|
|
9
|
+
*****************************************
|
|
10
|
+
* 写入文件配置
|
|
11
|
+
*****************************************
|
|
12
|
+
*/
|
|
13
|
+
interface Options {
|
|
14
|
+
encoding?: string;
|
|
15
|
+
append?: boolean;
|
|
16
|
+
mode?: fs.Mode;
|
|
17
|
+
flag?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
*****************************************
|
|
21
|
+
* 写入文件
|
|
22
|
+
*****************************************
|
|
23
|
+
*/
|
|
24
|
+
declare function writeFile(path: string, content?: string | Buffer): void;
|
|
25
|
+
declare function writeFile(path: string, content: string | Buffer, encoding: string): void;
|
|
26
|
+
declare function writeFile(path: string, content: string | Buffer, append: boolean): void;
|
|
27
|
+
declare function writeFile(path: string, content: string | Buffer, { append, encoding, mode, flag }: Options): void;
|
|
28
|
+
/**
|
|
29
|
+
*****************************************
|
|
30
|
+
* 抛出接口
|
|
31
|
+
*****************************************
|
|
32
|
+
*/
|
|
33
|
+
export { writeFile };
|
|
34
34
|
//# sourceMappingURL=writeFile.d.ts.map
|
package/dist/writeFile.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*****************************************
|
|
3
|
-
* Created by edonet@163.com
|
|
4
|
-
* Created on 2019-11-07 16:46:03
|
|
5
|
-
*****************************************
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.writeFile = void 0;
|
|
10
|
-
/**
|
|
11
|
-
*****************************************
|
|
12
|
-
* 加载依赖
|
|
13
|
-
*****************************************
|
|
14
|
-
*/
|
|
15
|
-
const fs = require("fs");
|
|
16
|
-
const mkdir_1 = require("./mkdir");
|
|
17
|
-
const dirname_1 = require("./dirname");
|
|
18
|
-
function writeFile(path, content, options) {
|
|
19
|
-
// 默认配置
|
|
20
|
-
if (!options) {
|
|
21
|
-
options = { encoding: 'utf8' };
|
|
22
|
-
}
|
|
23
|
-
// 默认值
|
|
24
|
-
if (typeof content === 'undefined') {
|
|
25
|
-
content = '';
|
|
26
|
-
}
|
|
27
|
-
// 创建目录
|
|
28
|
-
mkdir_1.mkdir(dirname_1.dirname(path));
|
|
29
|
-
// 校验配置
|
|
30
|
-
if (typeof options === 'object') {
|
|
31
|
-
if (options.append) {
|
|
32
|
-
return fs.appendFileSync(path, content, options);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return fs.writeFileSync(path, content, options);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// 重载编码配置
|
|
39
|
-
if (typeof options === 'string') {
|
|
40
|
-
return writeFile(path, content, { encoding: options || 'utf8' });
|
|
41
|
-
}
|
|
42
|
-
// 重载追加配置
|
|
43
|
-
if (typeof options === 'boolean') {
|
|
44
|
-
return writeFile(path, content, { encoding: 'utf8', append: options });
|
|
45
|
-
}
|
|
46
|
-
// 重载自定义配置
|
|
47
|
-
return writeFile(path, content, { encoding: 'utf8' });
|
|
48
|
-
}
|
|
49
|
-
exports.writeFile = writeFile;
|
|
1
|
+
/**
|
|
2
|
+
*****************************************
|
|
3
|
+
* Created by edonet@163.com
|
|
4
|
+
* Created on 2019-11-07 16:46:03
|
|
5
|
+
*****************************************
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.writeFile = void 0;
|
|
10
|
+
/**
|
|
11
|
+
*****************************************
|
|
12
|
+
* 加载依赖
|
|
13
|
+
*****************************************
|
|
14
|
+
*/
|
|
15
|
+
const fs = require("fs");
|
|
16
|
+
const mkdir_1 = require("./mkdir");
|
|
17
|
+
const dirname_1 = require("./dirname");
|
|
18
|
+
function writeFile(path, content, options) {
|
|
19
|
+
// 默认配置
|
|
20
|
+
if (!options) {
|
|
21
|
+
options = { encoding: 'utf8' };
|
|
22
|
+
}
|
|
23
|
+
// 默认值
|
|
24
|
+
if (typeof content === 'undefined') {
|
|
25
|
+
content = '';
|
|
26
|
+
}
|
|
27
|
+
// 创建目录
|
|
28
|
+
mkdir_1.mkdir(dirname_1.dirname(path));
|
|
29
|
+
// 校验配置
|
|
30
|
+
if (typeof options === 'object') {
|
|
31
|
+
if (options.append) {
|
|
32
|
+
return fs.appendFileSync(path, content, options);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return fs.writeFileSync(path, content, options);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// 重载编码配置
|
|
39
|
+
if (typeof options === 'string') {
|
|
40
|
+
return writeFile(path, content, { encoding: options || 'utf8' });
|
|
41
|
+
}
|
|
42
|
+
// 重载追加配置
|
|
43
|
+
if (typeof options === 'boolean') {
|
|
44
|
+
return writeFile(path, content, { encoding: 'utf8', append: options });
|
|
45
|
+
}
|
|
46
|
+
// 重载自定义配置
|
|
47
|
+
return writeFile(path, content, { encoding: 'utf8' });
|
|
48
|
+
}
|
|
49
|
+
exports.writeFile = writeFile;
|
|
50
50
|
//# sourceMappingURL=writeFile.js.map
|
package/dist/writeStream.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
*****************************************
|
|
4
|
-
* 加载依赖
|
|
5
|
-
*****************************************
|
|
6
|
-
*/
|
|
7
|
-
import * as fs from 'fs';
|
|
8
|
-
/**
|
|
9
|
-
*****************************************
|
|
10
|
-
* 配置
|
|
11
|
-
*****************************************
|
|
12
|
-
*/
|
|
13
|
-
interface Options {
|
|
14
|
-
flags?: string | undefined;
|
|
15
|
-
encoding?: BufferEncoding | undefined;
|
|
16
|
-
fd?: number | undefined;
|
|
17
|
-
mode?: number | undefined;
|
|
18
|
-
autoClose?: boolean | undefined;
|
|
19
|
-
emitClose?: boolean | undefined;
|
|
20
|
-
start?: number | undefined;
|
|
21
|
-
highWaterMark?: number | undefined;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
*****************************************
|
|
25
|
-
* 创建可写流
|
|
26
|
-
*****************************************
|
|
27
|
-
*/
|
|
28
|
-
declare function writeStream(path: string, encoding?: string): fs.WriteStream;
|
|
29
|
-
declare function writeStream(path: string, options?: Options): fs.WriteStream;
|
|
30
|
-
/**
|
|
31
|
-
*****************************************
|
|
32
|
-
* 抛出接口
|
|
33
|
-
*****************************************
|
|
34
|
-
*/
|
|
35
|
-
export { writeStream };
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
*****************************************
|
|
4
|
+
* 加载依赖
|
|
5
|
+
*****************************************
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
/**
|
|
9
|
+
*****************************************
|
|
10
|
+
* 配置
|
|
11
|
+
*****************************************
|
|
12
|
+
*/
|
|
13
|
+
interface Options {
|
|
14
|
+
flags?: string | undefined;
|
|
15
|
+
encoding?: BufferEncoding | undefined;
|
|
16
|
+
fd?: number | undefined;
|
|
17
|
+
mode?: number | undefined;
|
|
18
|
+
autoClose?: boolean | undefined;
|
|
19
|
+
emitClose?: boolean | undefined;
|
|
20
|
+
start?: number | undefined;
|
|
21
|
+
highWaterMark?: number | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*****************************************
|
|
25
|
+
* 创建可写流
|
|
26
|
+
*****************************************
|
|
27
|
+
*/
|
|
28
|
+
declare function writeStream(path: string, encoding?: string): fs.WriteStream;
|
|
29
|
+
declare function writeStream(path: string, options?: Options): fs.WriteStream;
|
|
30
|
+
/**
|
|
31
|
+
*****************************************
|
|
32
|
+
* 抛出接口
|
|
33
|
+
*****************************************
|
|
34
|
+
*/
|
|
35
|
+
export { writeStream };
|
|
36
36
|
//# sourceMappingURL=writeStream.d.ts.map
|
package/dist/writeStream.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*****************************************
|
|
3
|
-
* Created by edonet@163.com
|
|
4
|
-
* Created on 2021-05-22 11:32:52
|
|
5
|
-
*****************************************
|
|
6
|
-
*/
|
|
7
|
-
'use strict';
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.writeStream = void 0;
|
|
10
|
-
/**
|
|
11
|
-
*****************************************
|
|
12
|
-
* 加载依赖
|
|
13
|
-
*****************************************
|
|
14
|
-
*/
|
|
15
|
-
const fs = require("fs");
|
|
16
|
-
function writeStream(path, options) {
|
|
17
|
-
return fs.createWriteStream(path, options);
|
|
18
|
-
}
|
|
19
|
-
exports.writeStream = writeStream;
|
|
1
|
+
/**
|
|
2
|
+
*****************************************
|
|
3
|
+
* Created by edonet@163.com
|
|
4
|
+
* Created on 2021-05-22 11:32:52
|
|
5
|
+
*****************************************
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.writeStream = void 0;
|
|
10
|
+
/**
|
|
11
|
+
*****************************************
|
|
12
|
+
* 加载依赖
|
|
13
|
+
*****************************************
|
|
14
|
+
*/
|
|
15
|
+
const fs = require("fs");
|
|
16
|
+
function writeStream(path, options) {
|
|
17
|
+
return fs.createWriteStream(path, options);
|
|
18
|
+
}
|
|
19
|
+
exports.writeStream = writeStream;
|
|
20
20
|
//# sourceMappingURL=writeStream.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainc/fs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "file system",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "jest",
|
|
22
22
|
"clean": "rm -rf ./dist"
|
|
23
23
|
},
|
|
24
|
-
"repository": "git@
|
|
24
|
+
"repository": "git@absock.net:repo/ainc/fs.git",
|
|
25
25
|
"author": "edonet <edonet@163.com>",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|