xjs-common 9.1.0-alpha.2 → 9.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/dist/func/u-file.js
CHANGED
|
@@ -127,7 +127,7 @@ var UFile;
|
|
|
127
127
|
throw new xjs_err_1.XjsErr(s_errCode, "The destination directory is not found.");
|
|
128
128
|
let cmd = "unzip", options = null, availableCmd = true;
|
|
129
129
|
if (destDir)
|
|
130
|
-
options = `-d
|
|
130
|
+
options = `-d ${destDir}`;
|
|
131
131
|
const check = () => { try {
|
|
132
132
|
(0, child_process_1.execSync)(`${cmd} --help`, { stdio: "ignore" });
|
|
133
133
|
}
|
|
@@ -215,9 +215,8 @@ class HttpResolverContext {
|
|
|
215
215
|
const dest = this.resolveDownloadPath(rc.downloadPath, res.headers["content-disposition"]);
|
|
216
216
|
const stream = fs.createWriteStream(dest);
|
|
217
217
|
res.pipe(stream);
|
|
218
|
-
stream.on("finish", () =>
|
|
219
|
-
|
|
220
|
-
return;
|
|
218
|
+
stream.on("finish", () => stream.close());
|
|
219
|
+
resolve({ headers: res.headers });
|
|
221
220
|
}
|
|
222
221
|
catch (e) {
|
|
223
222
|
if (e instanceof xjs_err_1.XjsErr)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xjs-common",
|
|
3
|
-
"version": "9.1.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "library modules for nodejs + typescript that bundled general-purpose implementations.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
"ts-node": "^10.9.1",
|
|
29
29
|
"typescript": "^4.9.5"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|