extra-filesystem 0.3.8 → 0.3.12
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/CHANGELOG.md +217 -0
- package/README.md +18 -0
- package/lib/es2015/checksum-file.d.ts +1 -0
- package/lib/es2015/checksum-file.js +16 -0
- package/lib/es2015/checksum-file.js.map +1 -0
- package/lib/es2015/copy-sync.d.ts +1 -0
- package/lib/es2015/copy-sync.js +11 -0
- package/lib/es2015/copy-sync.js.map +1 -0
- package/lib/es2015/copy.d.ts +1 -0
- package/lib/es2015/copy.js +22 -0
- package/lib/es2015/copy.js.map +1 -0
- package/lib/es2015/index.d.ts +3 -0
- package/lib/es2015/index.js +3 -0
- package/lib/es2015/index.js.map +1 -1
- package/lib/es2015/is-sub-path-of.js.map +1 -1
- package/lib/es2018/checksum-file.d.ts +1 -0
- package/lib/es2018/checksum-file.js +16 -0
- package/lib/es2018/checksum-file.js.map +1 -0
- package/lib/es2018/copy-sync.d.ts +1 -0
- package/lib/es2018/copy-sync.js +11 -0
- package/lib/es2018/copy-sync.js.map +1 -0
- package/lib/es2018/copy.d.ts +1 -0
- package/lib/es2018/copy.js +11 -0
- package/lib/es2018/copy.js.map +1 -0
- package/lib/es2018/index.d.ts +3 -0
- package/lib/es2018/index.js +3 -0
- package/lib/es2018/index.js.map +1 -1
- package/lib/es2018/is-sub-path-of.js.map +1 -1
- package/package.json +18 -17
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
### [0.3.12](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.11...v0.3.12) (2021-10-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add checksumFile ([644eff7](https://github.com/BlackGlory/extra-filesystem/commit/644eff70e9156eff5959c86ac48f05db2ee68414))
|
|
11
|
+
|
|
12
|
+
### [0.3.11](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.10...v0.3.11) (2021-10-14)
|
|
13
|
+
|
|
14
|
+
### [0.3.10](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.9...v0.3.10) (2021-10-12)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add copy, copySync ([75f19cf](https://github.com/BlackGlory/extra-filesystem/commit/75f19cfef4129a9e06facb208ac8e1e1696c3c99))
|
|
20
|
+
|
|
21
|
+
### [0.3.9](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.8...v0.3.9) (2021-09-25)
|
|
22
|
+
|
|
23
|
+
### [0.3.8](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.7...v0.3.8) (2021-09-10)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* add isSubPathOf ([635f19e](https://github.com/BlackGlory/extra-filesystem/commit/635f19e24d39c687c44fac1dd5210c2fe68340d2))
|
|
29
|
+
|
|
30
|
+
### [0.3.7](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.6...v0.3.7) (2021-08-02)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* `move`, `moveSync` now overwrite existing files ([5a9dbc0](https://github.com/BlackGlory/extra-filesystem/commit/5a9dbc047df27ac2e1ffef5e86fe3bb75bb2a606))
|
|
36
|
+
|
|
37
|
+
### [0.3.6](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.5...v0.3.6) (2021-08-02)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* use `fs-extra` to handle cross-device renaming ([ad59f70](https://github.com/BlackGlory/extra-filesystem/commit/ad59f701fc300ea0ada62b8d75de2eb61099cb09))
|
|
43
|
+
|
|
44
|
+
### [0.3.5](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.4...v0.3.5) (2021-07-25)
|
|
45
|
+
|
|
46
|
+
### [0.3.4](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.3...v0.3.4) (2021-07-12)
|
|
47
|
+
|
|
48
|
+
### [0.3.3](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.2...v0.3.3) (2021-07-10)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
* add writeIterableToFile ([f7aa9de](https://github.com/BlackGlory/extra-filesystem/commit/f7aa9ded5db6092c25efafe9a2711aaf9159cb7d))
|
|
54
|
+
|
|
55
|
+
### [0.3.2](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.1...v0.3.2) (2021-05-17)
|
|
56
|
+
|
|
57
|
+
### [0.3.1](https://github.com/BlackGlory/extra-filesystem/compare/v0.3.0...v0.3.1) (2021-05-16)
|
|
58
|
+
|
|
59
|
+
## [0.3.0](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.20...v0.3.0) (2021-05-14)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### ⚠ BREAKING CHANGES
|
|
63
|
+
|
|
64
|
+
* createTempFilename => createTempName
|
|
65
|
+
createTempFilenameSync => createTempNameSync
|
|
66
|
+
|
|
67
|
+
### Features
|
|
68
|
+
|
|
69
|
+
* add emptyDir, emptyDirSync ([f5b7280](https://github.com/BlackGlory/extra-filesystem/commit/f5b72807a0dd6822a00772f6ad9d5716713c43d0))
|
|
70
|
+
* isFileSync, isDirectorySync ([5ea1fee](https://github.com/BlackGlory/extra-filesystem/commit/5ea1feebdb8dd49229d1df832c12b3453fbad59e))
|
|
71
|
+
* moveSync, removeSync ([a6428d0](https://github.com/BlackGlory/extra-filesystem/commit/a6428d0686cc3b7b22b98df5deefd657b19cd989))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
* rename ([14950ff](https://github.com/BlackGlory/extra-filesystem/commit/14950ff33b425087252df71e2e7f2a90272926b2))
|
|
75
|
+
|
|
76
|
+
### [0.2.20](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.19...v0.2.20) (2021-05-08)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Features
|
|
80
|
+
|
|
81
|
+
* enable force for remove ([f8cc119](https://github.com/BlackGlory/extra-filesystem/commit/f8cc119734d515aed9b4e2da49faa2395b198f5f))
|
|
82
|
+
|
|
83
|
+
### [0.2.19](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.18...v0.2.19) (2021-05-08)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Features
|
|
87
|
+
|
|
88
|
+
* add remove ([cfcaf6e](https://github.com/BlackGlory/extra-filesystem/commit/cfcaf6e99b9fe29f49afa9a4a86822096d07c7b3))
|
|
89
|
+
|
|
90
|
+
### [0.2.18](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.17...v0.2.18) (2021-05-08)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Features
|
|
94
|
+
|
|
95
|
+
* add createTempDir, createTempDirSync ([8e27fa5](https://github.com/BlackGlory/extra-filesystem/commit/8e27fa583723a80056038bbfd6fbdcbb1b228b7c))
|
|
96
|
+
|
|
97
|
+
### [0.2.17](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.16...v0.2.17) (2021-05-08)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
* add createTempFilename, createTempFilenameSync ([91607b4](https://github.com/BlackGlory/extra-filesystem/commit/91607b45073b040ec48e4dea03d1a74aea8d57f3))
|
|
103
|
+
|
|
104
|
+
### [0.2.16](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.15...v0.2.16) (2021-05-08)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Bug Fixes
|
|
108
|
+
|
|
109
|
+
* build ([90770a3](https://github.com/BlackGlory/extra-filesystem/commit/90770a36dbaf56037b7177f8b24e7010c501c7fa))
|
|
110
|
+
|
|
111
|
+
### [0.2.15](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.14...v0.2.15) (2021-05-08)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Features
|
|
115
|
+
|
|
116
|
+
* add createTempFile, createTempFileSync ([40362bd](https://github.com/BlackGlory/extra-filesystem/commit/40362bd0c42351ffc0a6d39171fae8c4d638df4f))
|
|
117
|
+
|
|
118
|
+
### [0.2.14](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.13...v0.2.14) (2021-05-08)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### Bug Fixes
|
|
122
|
+
|
|
123
|
+
* ensureFile, ensureFileSync ([da7e95e](https://github.com/BlackGlory/extra-filesystem/commit/da7e95eaa3f5824596b4901ec0414ab984587dbb))
|
|
124
|
+
|
|
125
|
+
### [0.2.13](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.12...v0.2.13) (2021-05-08)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### Features
|
|
129
|
+
|
|
130
|
+
* add ensureFile, ensureFileSync ([5492a14](https://github.com/BlackGlory/extra-filesystem/commit/5492a14a53076c6a6e8dff979c5f28810ed7470f))
|
|
131
|
+
|
|
132
|
+
### [0.2.12](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.11...v0.2.12) (2021-05-08)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Features
|
|
136
|
+
|
|
137
|
+
* add move ([e3871eb](https://github.com/BlackGlory/extra-filesystem/commit/e3871ebeb2e495b0ac0b0919edc9a2e5657a4b51))
|
|
138
|
+
|
|
139
|
+
### [0.2.11](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.10...v0.2.11) (2021-05-08)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Features
|
|
143
|
+
|
|
144
|
+
* add ensureDirSync ([606dfc2](https://github.com/BlackGlory/extra-filesystem/commit/606dfc2291bacd33f33e76e6d4043bfd21355678))
|
|
145
|
+
|
|
146
|
+
### [0.2.10](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.9...v0.2.10) (2021-05-08)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Features
|
|
150
|
+
|
|
151
|
+
* add pathExistsSync, writeJSONFile, writeJSONFileSync ([7644e50](https://github.com/BlackGlory/extra-filesystem/commit/7644e50a7b35b38d62d59ed88a7376b935dc7539))
|
|
152
|
+
|
|
153
|
+
### [0.2.9](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.8...v0.2.9) (2021-05-08)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Features
|
|
157
|
+
|
|
158
|
+
* add readJSONFile ([76fadf1](https://github.com/BlackGlory/extra-filesystem/commit/76fadf118a93087e4eebfc7899cc2ebbe36adb17))
|
|
159
|
+
|
|
160
|
+
### [0.2.8](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.7...v0.2.8) (2021-05-08)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Features
|
|
164
|
+
|
|
165
|
+
* add ensureDir, pathExists ([a614df9](https://github.com/BlackGlory/extra-filesystem/commit/a614df9630a289550cc37e783dc23b677b857386))
|
|
166
|
+
|
|
167
|
+
### [0.2.7](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.6...v0.2.7) (2021-03-29)
|
|
168
|
+
|
|
169
|
+
### [0.2.6](https://github.com/BlackGlory/extra-filesystem/compare/v0.2.5...v0.2.6) (2021-03-29)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Features
|
|
173
|
+
|
|
174
|
+
* add readFileLineByLine ([0782f74](https://github.com/BlackGlory/extra-filesystem/commit/0782f748641e7014464eb83f4ecc5152a238ba1e))
|
|
175
|
+
|
|
176
|
+
### [0.2.5](https://github.com/BlackGlory/bundle/compare/v0.2.4...v0.2.5) (2021-02-03)
|
|
177
|
+
|
|
178
|
+
### [0.2.4](https://github.com/BlackGlory/bundle/compare/v0.2.3...v0.2.4) (2021-01-30)
|
|
179
|
+
|
|
180
|
+
### [0.2.3](https://github.com/BlackGlory/bundle/compare/v0.2.2...v0.2.3) (2021-01-29)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
### Bug Fixes
|
|
184
|
+
|
|
185
|
+
* predicate ([1433967](https://github.com/BlackGlory/bundle/commit/143396779dad8ac0d1767a6468c4ea2d96d1c682))
|
|
186
|
+
|
|
187
|
+
### [0.2.2](https://github.com/BlackGlory/bundle/compare/v0.2.1...v0.2.2) (2021-01-29)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Features
|
|
191
|
+
|
|
192
|
+
* add predicate support ([002f952](https://github.com/BlackGlory/bundle/commit/002f9522b60b52cd777eb60a665a8bc629f7eb04))
|
|
193
|
+
|
|
194
|
+
### [0.2.1](https://github.com/BlackGlory/bundle/compare/v0.2.0...v0.2.1) (2021-01-29)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Features
|
|
198
|
+
|
|
199
|
+
* add predicate support ([619bf20](https://github.com/BlackGlory/bundle/commit/619bf20366c0347c7c74422a6e758d4a9b0392d7))
|
|
200
|
+
|
|
201
|
+
## [0.2.0](https://github.com/BlackGlory/bundle/compare/v0.1.0...v0.2.0) (2021-01-29)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### ⚠ BREAKING CHANGES
|
|
205
|
+
|
|
206
|
+
* findAllDirectoryNames => findAllDirnames
|
|
207
|
+
|
|
208
|
+
### Features
|
|
209
|
+
|
|
210
|
+
* rename findAllDirectoryNames to findAllDirnames ([d9d4807](https://github.com/BlackGlory/bundle/commit/d9d48079ad52d23f8dde3cbdecb57e91490f60a2))
|
|
211
|
+
|
|
212
|
+
## 0.1.0 (2021-01-29)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
### Features
|
|
216
|
+
|
|
217
|
+
* init ([f113770](https://github.com/BlackGlory/bundle/commit/f113770139af49f4653d2849d26b9e2e3a72afcf))
|
package/README.md
CHANGED
|
@@ -138,6 +138,18 @@ function move(oldPath: string, newPath: string): Promise<void>
|
|
|
138
138
|
function moveSync(oldPath: string, newPath: string): void
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
+
### copy
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
function copy(sourcePath: string, destinationPath: string): Promise<void>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### copySync
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
function copySync(sourcePath: string, destinationPath: string): void
|
|
151
|
+
```
|
|
152
|
+
|
|
141
153
|
### remove
|
|
142
154
|
|
|
143
155
|
```ts
|
|
@@ -236,3 +248,9 @@ function writeIterableToFile(
|
|
|
236
248
|
```ts
|
|
237
249
|
function isSubPathOf(subject: string, object: string): boolean
|
|
238
250
|
```
|
|
251
|
+
|
|
252
|
+
### checksumFile
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
function checksumFile(algorithm: string, filename: string): Promise<string>
|
|
256
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checksumFile(algorithm: string, filename: string): Promise<string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checksumFile = void 0;
|
|
4
|
+
const crypto = require("crypto");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
function checksumFile(algorithm, filename) {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const hash = crypto.createHash(algorithm);
|
|
9
|
+
const stream = fs.createReadStream(filename);
|
|
10
|
+
stream.on('error', err => reject(err));
|
|
11
|
+
stream.on('data', chunk => hash.update(chunk));
|
|
12
|
+
stream.on('end', () => resolve(hash.digest('hex')));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.checksumFile = checksumFile;
|
|
16
|
+
//# sourceMappingURL=checksum-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum-file.js","sourceRoot":"","sources":["../../src/checksum-file.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,yBAAwB;AAExB,SAAgB,YAAY,CAAC,SAAiB,EAAE,QAAgB;IAC9D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QACzC,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;QAC5C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;QACtC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QAC9C,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACrD,CAAC,CAAC,CAAA;AACJ,CAAC;AARD,oCAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copySync(sourcePath: string, destinationPath: string): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.copySync = void 0;
|
|
4
|
+
const fs = require("fs-extra");
|
|
5
|
+
function copySync(sourcePath, destinationPath) {
|
|
6
|
+
fs.copySync(sourcePath, destinationPath, {
|
|
7
|
+
overwrite: true
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
exports.copySync = copySync;
|
|
11
|
+
//# sourceMappingURL=copy-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-sync.js","sourceRoot":"","sources":["../../src/copy-sync.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAE9B,SAAgB,QAAQ,CAAC,UAAkB,EAAE,eAAuB;IAClE,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,EAAE;QACvC,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;AACJ,CAAC;AAJD,4BAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copy(sourcePath: string, destinationPath: string): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.copy = void 0;
|
|
13
|
+
const fs = require("fs-extra");
|
|
14
|
+
function copy(sourcePath, destinationPath) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
yield fs.copy(sourcePath, destinationPath, {
|
|
17
|
+
overwrite: true
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.copy = copy;
|
|
22
|
+
//# sourceMappingURL=copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../src/copy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAA8B;AAE9B,SAAsB,IAAI,CAAC,UAAkB,EAAE,eAAuB;;QACpE,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,EAAE;YACzC,SAAS,EAAE,IAAI;SAChB,CAAC,CAAA;IACJ,CAAC;CAAA;AAJD,oBAIC"}
|
package/lib/es2015/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export * from './write-iterable-to-file';
|
|
|
20
20
|
export * from './read-file-line-by-line';
|
|
21
21
|
export * from './move';
|
|
22
22
|
export * from './move-sync';
|
|
23
|
+
export * from './copy';
|
|
24
|
+
export * from './copy-sync';
|
|
23
25
|
export * from './remove';
|
|
24
26
|
export * from './remove-sync';
|
|
25
27
|
export * from './find-all-filenames';
|
|
@@ -33,3 +35,4 @@ export * from './is-file-sync';
|
|
|
33
35
|
export * from './is-readable';
|
|
34
36
|
export * from './is-writable';
|
|
35
37
|
export * from './is-sub-path-of';
|
|
38
|
+
export * from './checksum-file';
|
package/lib/es2015/index.js
CHANGED
|
@@ -32,6 +32,8 @@ __exportStar(require("./write-iterable-to-file"), exports);
|
|
|
32
32
|
__exportStar(require("./read-file-line-by-line"), exports);
|
|
33
33
|
__exportStar(require("./move"), exports);
|
|
34
34
|
__exportStar(require("./move-sync"), exports);
|
|
35
|
+
__exportStar(require("./copy"), exports);
|
|
36
|
+
__exportStar(require("./copy-sync"), exports);
|
|
35
37
|
__exportStar(require("./remove"), exports);
|
|
36
38
|
__exportStar(require("./remove-sync"), exports);
|
|
37
39
|
__exportStar(require("./find-all-filenames"), exports);
|
|
@@ -45,4 +47,5 @@ __exportStar(require("./is-file-sync"), exports);
|
|
|
45
47
|
__exportStar(require("./is-readable"), exports);
|
|
46
48
|
__exportStar(require("./is-writable"), exports);
|
|
47
49
|
__exportStar(require("./is-sub-path-of"), exports);
|
|
50
|
+
__exportStar(require("./checksum-file"), exports);
|
|
48
51
|
//# sourceMappingURL=index.js.map
|
package/lib/es2015/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiC;AACjC,yDAAsC;AACtC,qDAAkC;AAClC,0DAAuC;AACvC,qDAAkC;AAClC,0DAAuC;AACvC,8CAA2B;AAC3B,mDAAgC;AAChC,+CAA4B;AAC5B,oDAAiC;AACjC,gDAA6B;AAC7B,qDAAkC;AAClC,gDAA6B;AAC7B,qDAAkC;AAClC,mDAAgC;AAChC,wDAAqC;AACrC,oDAAiC;AACjC,yDAAsC;AACtC,2DAAwC;AACxC,2DAAwC;AACxC,yCAAsB;AACtB,8CAA2B;AAC3B,2CAAwB;AACxB,gDAA6B;AAC7B,uDAAoC;AACpC,sDAAmC;AACnC,uDAAoC;AACpC,uDAAoC;AACpC,iDAA8B;AAC9B,sDAAmC;AACnC,4CAAyB;AACzB,iDAA8B;AAC9B,gDAA6B;AAC7B,gDAA6B;AAC7B,mDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiC;AACjC,yDAAsC;AACtC,qDAAkC;AAClC,0DAAuC;AACvC,qDAAkC;AAClC,0DAAuC;AACvC,8CAA2B;AAC3B,mDAAgC;AAChC,+CAA4B;AAC5B,oDAAiC;AACjC,gDAA6B;AAC7B,qDAAkC;AAClC,gDAA6B;AAC7B,qDAAkC;AAClC,mDAAgC;AAChC,wDAAqC;AACrC,oDAAiC;AACjC,yDAAsC;AACtC,2DAAwC;AACxC,2DAAwC;AACxC,yCAAsB;AACtB,8CAA2B;AAC3B,yCAAsB;AACtB,8CAA2B;AAC3B,2CAAwB;AACxB,gDAA6B;AAC7B,uDAAoC;AACpC,sDAAmC;AACnC,uDAAoC;AACpC,uDAAoC;AACpC,iDAA8B;AAC9B,sDAAmC;AACnC,4CAAyB;AACzB,iDAA8B;AAC9B,gDAA6B;AAC7B,gDAA6B;AAC7B,mDAAgC;AAChC,kDAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-sub-path-of.js","sourceRoot":"","sources":["../../src/is-sub-path-of.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;
|
|
1
|
+
{"version":3,"file":"is-sub-path-of.js","sourceRoot":"","sources":["../../src/is-sub-path-of.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAG5B,SAAgB,WAAW,CAAC,OAAe,EAAE,MAAc;IACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/C,OAAO,QAAQ,KAAK,EAAE;WACf,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;WAC1B,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC;AALD,kCAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checksumFile(algorithm: string, filename: string): Promise<string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checksumFile = void 0;
|
|
4
|
+
const crypto = require("crypto");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
function checksumFile(algorithm, filename) {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const hash = crypto.createHash(algorithm);
|
|
9
|
+
const stream = fs.createReadStream(filename);
|
|
10
|
+
stream.on('error', err => reject(err));
|
|
11
|
+
stream.on('data', chunk => hash.update(chunk));
|
|
12
|
+
stream.on('end', () => resolve(hash.digest('hex')));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.checksumFile = checksumFile;
|
|
16
|
+
//# sourceMappingURL=checksum-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum-file.js","sourceRoot":"","sources":["../../src/checksum-file.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,yBAAwB;AAExB,SAAgB,YAAY,CAAC,SAAiB,EAAE,QAAgB;IAC9D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QACzC,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;QAC5C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;QACtC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QAC9C,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACrD,CAAC,CAAC,CAAA;AACJ,CAAC;AARD,oCAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copySync(sourcePath: string, destinationPath: string): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.copySync = void 0;
|
|
4
|
+
const fs = require("fs-extra");
|
|
5
|
+
function copySync(sourcePath, destinationPath) {
|
|
6
|
+
fs.copySync(sourcePath, destinationPath, {
|
|
7
|
+
overwrite: true
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
exports.copySync = copySync;
|
|
11
|
+
//# sourceMappingURL=copy-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-sync.js","sourceRoot":"","sources":["../../src/copy-sync.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAE9B,SAAgB,QAAQ,CAAC,UAAkB,EAAE,eAAuB;IAClE,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,EAAE;QACvC,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;AACJ,CAAC;AAJD,4BAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copy(sourcePath: string, destinationPath: string): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.copy = void 0;
|
|
4
|
+
const fs = require("fs-extra");
|
|
5
|
+
async function copy(sourcePath, destinationPath) {
|
|
6
|
+
await fs.copy(sourcePath, destinationPath, {
|
|
7
|
+
overwrite: true
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
exports.copy = copy;
|
|
11
|
+
//# sourceMappingURL=copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../src/copy.ts"],"names":[],"mappings":";;;AAAA,+BAA8B;AAEvB,KAAK,UAAU,IAAI,CAAC,UAAkB,EAAE,eAAuB;IACpE,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,EAAE;QACzC,SAAS,EAAE,IAAI;KAChB,CAAC,CAAA;AACJ,CAAC;AAJD,oBAIC"}
|
package/lib/es2018/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export * from './write-iterable-to-file';
|
|
|
20
20
|
export * from './read-file-line-by-line';
|
|
21
21
|
export * from './move';
|
|
22
22
|
export * from './move-sync';
|
|
23
|
+
export * from './copy';
|
|
24
|
+
export * from './copy-sync';
|
|
23
25
|
export * from './remove';
|
|
24
26
|
export * from './remove-sync';
|
|
25
27
|
export * from './find-all-filenames';
|
|
@@ -33,3 +35,4 @@ export * from './is-file-sync';
|
|
|
33
35
|
export * from './is-readable';
|
|
34
36
|
export * from './is-writable';
|
|
35
37
|
export * from './is-sub-path-of';
|
|
38
|
+
export * from './checksum-file';
|
package/lib/es2018/index.js
CHANGED
|
@@ -32,6 +32,8 @@ __exportStar(require("./write-iterable-to-file"), exports);
|
|
|
32
32
|
__exportStar(require("./read-file-line-by-line"), exports);
|
|
33
33
|
__exportStar(require("./move"), exports);
|
|
34
34
|
__exportStar(require("./move-sync"), exports);
|
|
35
|
+
__exportStar(require("./copy"), exports);
|
|
36
|
+
__exportStar(require("./copy-sync"), exports);
|
|
35
37
|
__exportStar(require("./remove"), exports);
|
|
36
38
|
__exportStar(require("./remove-sync"), exports);
|
|
37
39
|
__exportStar(require("./find-all-filenames"), exports);
|
|
@@ -45,4 +47,5 @@ __exportStar(require("./is-file-sync"), exports);
|
|
|
45
47
|
__exportStar(require("./is-readable"), exports);
|
|
46
48
|
__exportStar(require("./is-writable"), exports);
|
|
47
49
|
__exportStar(require("./is-sub-path-of"), exports);
|
|
50
|
+
__exportStar(require("./checksum-file"), exports);
|
|
48
51
|
//# sourceMappingURL=index.js.map
|
package/lib/es2018/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiC;AACjC,yDAAsC;AACtC,qDAAkC;AAClC,0DAAuC;AACvC,qDAAkC;AAClC,0DAAuC;AACvC,8CAA2B;AAC3B,mDAAgC;AAChC,+CAA4B;AAC5B,oDAAiC;AACjC,gDAA6B;AAC7B,qDAAkC;AAClC,gDAA6B;AAC7B,qDAAkC;AAClC,mDAAgC;AAChC,wDAAqC;AACrC,oDAAiC;AACjC,yDAAsC;AACtC,2DAAwC;AACxC,2DAAwC;AACxC,yCAAsB;AACtB,8CAA2B;AAC3B,2CAAwB;AACxB,gDAA6B;AAC7B,uDAAoC;AACpC,sDAAmC;AACnC,uDAAoC;AACpC,uDAAoC;AACpC,iDAA8B;AAC9B,sDAAmC;AACnC,4CAAyB;AACzB,iDAA8B;AAC9B,gDAA6B;AAC7B,gDAA6B;AAC7B,mDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiC;AACjC,yDAAsC;AACtC,qDAAkC;AAClC,0DAAuC;AACvC,qDAAkC;AAClC,0DAAuC;AACvC,8CAA2B;AAC3B,mDAAgC;AAChC,+CAA4B;AAC5B,oDAAiC;AACjC,gDAA6B;AAC7B,qDAAkC;AAClC,gDAA6B;AAC7B,qDAAkC;AAClC,mDAAgC;AAChC,wDAAqC;AACrC,oDAAiC;AACjC,yDAAsC;AACtC,2DAAwC;AACxC,2DAAwC;AACxC,yCAAsB;AACtB,8CAA2B;AAC3B,yCAAsB;AACtB,8CAA2B;AAC3B,2CAAwB;AACxB,gDAA6B;AAC7B,uDAAoC;AACpC,sDAAmC;AACnC,uDAAoC;AACpC,uDAAoC;AACpC,iDAA8B;AAC9B,sDAAmC;AACnC,4CAAyB;AACzB,iDAA8B;AAC9B,gDAA6B;AAC7B,gDAA6B;AAC7B,mDAAgC;AAChC,kDAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-sub-path-of.js","sourceRoot":"","sources":["../../src/is-sub-path-of.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;
|
|
1
|
+
{"version":3,"file":"is-sub-path-of.js","sourceRoot":"","sources":["../../src/is-sub-path-of.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAG5B,SAAgB,WAAW,CAAC,OAAe,EAAE,MAAc;IACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/C,OAAO,QAAQ,KAAK,EAAE;WACf,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;WAC1B,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;AACnC,CAAC;AALD,kCAKC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extra-filesystem",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"files": [
|
|
@@ -37,29 +37,30 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@blackglory/jest-matchers": "^0.1.
|
|
41
|
-
"@commitlint/cli": "^13.1
|
|
42
|
-
"@commitlint/config-conventional": "^13.
|
|
43
|
-
"@types/fs-extra": "^9.0.
|
|
44
|
-
"@types/jest": "^27.0.
|
|
40
|
+
"@blackglory/jest-matchers": "^0.1.21",
|
|
41
|
+
"@commitlint/cli": "^13.2.1",
|
|
42
|
+
"@commitlint/config-conventional": "^13.2.0",
|
|
43
|
+
"@types/fs-extra": "^9.0.13",
|
|
44
|
+
"@types/jest": "^27.0.2",
|
|
45
45
|
"@types/node": "14",
|
|
46
|
-
"@types/tmp": "^0.2.
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
48
|
-
"@typescript-eslint/parser": "^
|
|
49
|
-
"eslint": "^
|
|
46
|
+
"@types/tmp": "^0.2.2",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^5.1.0",
|
|
48
|
+
"@typescript-eslint/parser": "^5.1.0",
|
|
49
|
+
"eslint": "^8.1.0",
|
|
50
50
|
"husky": "^4.3.0",
|
|
51
|
-
"iterable-operator": "^0.14.
|
|
52
|
-
"jest": "^27.
|
|
53
|
-
"jest-extended": "^
|
|
51
|
+
"iterable-operator": "^0.14.4",
|
|
52
|
+
"jest": "^27.3.1",
|
|
53
|
+
"jest-extended": "^1.1.0",
|
|
54
54
|
"npm-run-all": "^4.1.5",
|
|
55
|
+
"return-style": "^0.12.4",
|
|
55
56
|
"rimraf": "^3.0.2",
|
|
56
|
-
"standard-version": "^9.3.
|
|
57
|
-
"ts-jest": "^27.0.
|
|
57
|
+
"standard-version": "^9.3.2",
|
|
58
|
+
"ts-jest": "^27.0.7",
|
|
58
59
|
"tscpaths": "^0.0.9",
|
|
59
|
-
"typescript": "^4.4.
|
|
60
|
+
"typescript": "^4.4.4"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
|
-
"extra-promise": "^0.
|
|
63
|
+
"extra-promise": "^0.19.1",
|
|
63
64
|
"fs-extra": "^10.0.0",
|
|
64
65
|
"tmp-promise": "^3.0.2"
|
|
65
66
|
}
|