@iflyrpa/actions 1.2.24-beta.6 → 1.2.24-beta.8
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 +12 -19
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +12 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2874,7 +2874,7 @@ const ProxyAgent = async (adr, huiwenToken)=>{
|
|
|
2874
2874
|
const http = new Http({});
|
|
2875
2875
|
let ProxyInfo = await http.api({
|
|
2876
2876
|
method: "GET",
|
|
2877
|
-
url: "https://
|
|
2877
|
+
url: "https://preview.huiwen.top/api/publish/zdy/ip",
|
|
2878
2878
|
params: {
|
|
2879
2879
|
addr: adr
|
|
2880
2880
|
},
|
|
@@ -2884,8 +2884,10 @@ const ProxyAgent = async (adr, huiwenToken)=>{
|
|
|
2884
2884
|
}
|
|
2885
2885
|
} : null
|
|
2886
2886
|
});
|
|
2887
|
-
|
|
2888
|
-
|
|
2887
|
+
return 0 === ProxyInfo.code && ProxyInfo.data.length > 0 ? new dist.HttpsProxyAgent(`http://${ProxyData.api}:${ProxyData.akey}@${ProxyInfo.data[0].proxyAddress}`) : ProxyInfo.msg ? Promise.reject({
|
|
2888
|
+
code: ProxyInfo.code,
|
|
2889
|
+
message: "获取代理IP失败," + ProxyInfo.msg
|
|
2890
|
+
}) : null;
|
|
2889
2891
|
};
|
|
2890
2892
|
class Http {
|
|
2891
2893
|
static handleApiError(error) {
|
|
@@ -2947,15 +2949,6 @@ class Http {
|
|
|
2947
2949
|
httpsAgent: agent
|
|
2948
2950
|
} : {}
|
|
2949
2951
|
});
|
|
2950
|
-
let proxyInfo;
|
|
2951
|
-
if (agent && agent.proxy) {
|
|
2952
|
-
const proxy = agent.proxy;
|
|
2953
|
-
proxyInfo = {
|
|
2954
|
-
host: proxy.host,
|
|
2955
|
-
port: proxy.port
|
|
2956
|
-
};
|
|
2957
|
-
}
|
|
2958
|
-
if (this.adr && agent) response.data.proxyInfo = proxyInfo;
|
|
2959
2952
|
return response.data;
|
|
2960
2953
|
} catch (error) {
|
|
2961
2954
|
return Promise.reject(Http.handleApiError(error));
|
|
@@ -3319,7 +3312,7 @@ const mockAction = async (task, params)=>{
|
|
|
3319
3312
|
},
|
|
3320
3313
|
defaultErrorMsg: isDraft ? "文章同步出现异常,请稍后重试。" : "文章发布出现异常,请稍后重试。"
|
|
3321
3314
|
});
|
|
3322
|
-
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(0 == res.errno ? res?.ret?.article_id || '' : "", 0 == res.errno ?
|
|
3315
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(0 == res.errno ? res?.ret?.article_id || '' : "", 0 == res.errno ? `文章发布成功!` : res.errmsg ?? '文章发布失败,请稍后重试。');
|
|
3323
3316
|
};
|
|
3324
3317
|
const rpaAction = async (task, params)=>{
|
|
3325
3318
|
const tmpCachePath = task.getTmpPath();
|
|
@@ -4356,7 +4349,7 @@ const mock_mockAction = async (task, params)=>{
|
|
|
4356
4349
|
headers
|
|
4357
4350
|
}, params.proxyLoc, params.huiwenToken) : http;
|
|
4358
4351
|
const publishResult = await proxyHttp.api(publishOption);
|
|
4359
|
-
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(publishResult.data.pgc_id,
|
|
4352
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(publishResult.data.pgc_id, `文章发布成功!`);
|
|
4360
4353
|
};
|
|
4361
4354
|
const rpa_GenAB = __webpack_require__("./src/utils/ttABEncrypt.js");
|
|
4362
4355
|
const rpa_rpaAction = async (task, params)=>{
|
|
@@ -6291,7 +6284,7 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
|
|
|
6291
6284
|
const proxyHttp = task?.isBeta ?? false ? new Http({
|
|
6292
6285
|
headers
|
|
6293
6286
|
}, params.proxyLoc, params.huiwenToken) : http;
|
|
6294
|
-
|
|
6287
|
+
await proxyHttp.api({
|
|
6295
6288
|
method: "post",
|
|
6296
6289
|
url: "https://mp.weixin.qq.com/cgi-bin/masssend",
|
|
6297
6290
|
params: {
|
|
@@ -6340,7 +6333,7 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
|
|
|
6340
6333
|
}),
|
|
6341
6334
|
defaultErrorMsg: params.masssend ? "文章群发异常,请尝试关闭群发或稍后重试。" : "文章发布异常,请稍后重试。"
|
|
6342
6335
|
});
|
|
6343
|
-
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(appMsgId,
|
|
6336
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(appMsgId, `微信公众号发布完成!`);
|
|
6344
6337
|
};
|
|
6345
6338
|
const waitQrcodeResultMaxTime = 2000 * scanRetryMaxCount;
|
|
6346
6339
|
const weixinPublish_rpa_rpaAction = async (task, params)=>{
|
|
@@ -7243,7 +7236,7 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
|
|
|
7243
7236
|
},
|
|
7244
7237
|
defaultErrorMsg: "文章发布异常,请稍后重试。"
|
|
7245
7238
|
});
|
|
7246
|
-
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(publishResult.data?.id,
|
|
7239
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(publishResult.data?.id, `文章发布成功!`);
|
|
7247
7240
|
};
|
|
7248
7241
|
const rpa_GenXSCommon = __webpack_require__("./src/utils/XhsXsCommonEnc.js");
|
|
7249
7242
|
const rpa_xsEncrypt = new Xhshow();
|
|
@@ -7464,7 +7457,7 @@ const xiaohongshuPublish = async (task, params)=>{
|
|
|
7464
7457
|
if ("mockApi" === params.actionType) return xiaohongshuPublish_mock_mockAction(task, params);
|
|
7465
7458
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
7466
7459
|
};
|
|
7467
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.24-beta.
|
|
7460
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.24-beta.7"}');
|
|
7468
7461
|
const BetaFlag = "HuiwenCanary";
|
|
7469
7462
|
class Action {
|
|
7470
7463
|
constructor(task){
|
|
@@ -7472,7 +7465,7 @@ class Action {
|
|
|
7472
7465
|
}
|
|
7473
7466
|
async bindTask(func, params) {
|
|
7474
7467
|
let responseData;
|
|
7475
|
-
this.task.isBeta = this.task?.isFeatOn(BetaFlag)
|
|
7468
|
+
this.task.isBeta = this.task?.isFeatOn ? this.task?.isFeatOn(BetaFlag) : false;
|
|
7476
7469
|
this.task._timerRecord = {
|
|
7477
7470
|
ActionStart: Date.now()
|
|
7478
7471
|
};
|