@iflyrpa/actions 1.2.16-beta.6 → 1.2.16-beta.7
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/bundle.js +13 -2
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -14255,7 +14255,18 @@ var __webpack_exports__ = {};
|
|
|
14255
14255
|
await ensureFile(savePath);
|
|
14256
14256
|
return new Promise((resolve, reject)=>{
|
|
14257
14257
|
external_node_https_namespaceObject.get(url, (response)=>{
|
|
14258
|
-
if (
|
|
14258
|
+
if (301 === response.statusCode || 302 === response.statusCode) {
|
|
14259
|
+
const redirectUrl = response.headers.location;
|
|
14260
|
+
if (redirectUrl) external_node_https_namespaceObject.get(redirectUrl, (res)=>{
|
|
14261
|
+
const fileStream = external_node_fs_namespaceObject.createWriteStream(savePath);
|
|
14262
|
+
res.pipe(fileStream);
|
|
14263
|
+
fileStream.on('finish', ()=>{
|
|
14264
|
+
fileStream.close();
|
|
14265
|
+
console.log(`${response.statusCode} 下载完成,文件已保存至:`, savePath);
|
|
14266
|
+
resolve(savePath);
|
|
14267
|
+
});
|
|
14268
|
+
});
|
|
14269
|
+
} else if (200 === response.statusCode) {
|
|
14259
14270
|
const fileStream = external_node_fs_namespaceObject.createWriteStream(savePath);
|
|
14260
14271
|
response.pipe(fileStream);
|
|
14261
14272
|
fileStream.on("finish", ()=>{
|
|
@@ -18235,7 +18246,7 @@ var __webpack_exports__ = {};
|
|
|
18235
18246
|
if ("mockApi" === params.actionType) return xiaohongshuPublish_mock_mockAction(task, params);
|
|
18236
18247
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
18237
18248
|
};
|
|
18238
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.16-beta.
|
|
18249
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.16-beta.6"}');
|
|
18239
18250
|
class Action {
|
|
18240
18251
|
constructor(task){
|
|
18241
18252
|
this.task = task;
|