@iflyrpa/actions 3.0.3 → 3.0.5-beta.1
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 +53 -22
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +53 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5489,9 +5489,7 @@ var __webpack_exports__ = {};
|
|
|
5489
5489
|
});
|
|
5490
5490
|
const package_json_namespaceObject = require("@iflyrpa/share/package.json");
|
|
5491
5491
|
var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
|
|
5492
|
-
var package_namespaceObject = {
|
|
5493
|
-
i8: "3.0.2"
|
|
5494
|
-
};
|
|
5492
|
+
var package_namespaceObject = JSON.parse('{"i8":"3.0.5-beta.1"}');
|
|
5495
5493
|
const share_namespaceObject = require("@iflyrpa/share");
|
|
5496
5494
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
5497
5495
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
@@ -5521,7 +5519,7 @@ var __webpack_exports__ = {};
|
|
|
5521
5519
|
};
|
|
5522
5520
|
const ProxyInfo = await http.api({
|
|
5523
5521
|
method: "POST",
|
|
5524
|
-
url: "
|
|
5522
|
+
url: "https://fetdev.iflysec.com/ip-pool/pool/eip/proxy",
|
|
5525
5523
|
data: params
|
|
5526
5524
|
}).catch((err)=>{
|
|
5527
5525
|
throw {
|
|
@@ -5596,6 +5594,13 @@ var __webpack_exports__ = {};
|
|
|
5596
5594
|
}
|
|
5597
5595
|
};
|
|
5598
5596
|
if (foundError) Object.assign(errorResponse, foundError);
|
|
5597
|
+
if (error.response?.status === 403) {
|
|
5598
|
+
this.logger?.warn(`[403 详细信息] URL: ${error.config?.url}`);
|
|
5599
|
+
this.logger?.warn(`[403 响应头] ${JSON.stringify(error.response?.headers || {})}`);
|
|
5600
|
+
this.logger?.warn(`[403 响应体] ${JSON.stringify(error.response?.data || null)}`);
|
|
5601
|
+
const verifyDecision = error.response?.headers?.["x-tt-verify-passport-decision"];
|
|
5602
|
+
if (verifyDecision) this.logger?.warn(`[403 验证决策] x-tt-verify-passport-decision: ${verifyDecision}`);
|
|
5603
|
+
}
|
|
5599
5604
|
if (error.response?.data) {
|
|
5600
5605
|
if ("object" == typeof error.response.data) {
|
|
5601
5606
|
const serverError = error.response.data;
|
|
@@ -14587,6 +14592,32 @@ var __webpack_exports__ = {};
|
|
|
14587
14592
|
retries: 3,
|
|
14588
14593
|
retryDelay: 2000
|
|
14589
14594
|
});
|
|
14595
|
+
task.logger.info("========== api调用完成 ==========");
|
|
14596
|
+
task.logger.info(`decision值: ${JSON.stringify(decision)}, needsVerification(decision): ${needsVerification(decision)}`);
|
|
14597
|
+
if (needsVerification(decision)) {
|
|
14598
|
+
const details = [
|
|
14599
|
+
publishResult.status_msg,
|
|
14600
|
+
decision?.verify_title,
|
|
14601
|
+
decision?.verify_desc
|
|
14602
|
+
].filter(Boolean).join(" ");
|
|
14603
|
+
const message = `图文发布失败,原因:${details}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
14604
|
+
task.logger.warn(`TaskId:${task.taskId},检测到需要验证,准备返回验证信息`);
|
|
14605
|
+
const mockData = {
|
|
14606
|
+
state: share_namespaceObject.TaskState.FAILED,
|
|
14607
|
+
error: message,
|
|
14608
|
+
result: {
|
|
14609
|
+
data: decision,
|
|
14610
|
+
uploadedImgList: JSON.stringify(publishData.item.common.images)
|
|
14611
|
+
}
|
|
14612
|
+
};
|
|
14613
|
+
await updateTaskState?.(mockData);
|
|
14614
|
+
return {
|
|
14615
|
+
code: 0,
|
|
14616
|
+
data: mockData,
|
|
14617
|
+
message: "操作成功"
|
|
14618
|
+
};
|
|
14619
|
+
}
|
|
14620
|
+
task.logger.info("不需要验证,继续正常流程");
|
|
14590
14621
|
reportLogger({
|
|
14591
14622
|
token: params.huiwenToken || "",
|
|
14592
14623
|
enverionment: task.enverionment || "development",
|
|
@@ -16105,26 +16136,26 @@ var __webpack_exports__ = {};
|
|
|
16105
16136
|
const http = new Http({
|
|
16106
16137
|
headers: {
|
|
16107
16138
|
cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
|
|
16108
|
-
referer: "https://mp.toutiao.com/profile_v4/graphic/publish"
|
|
16139
|
+
referer: "https://mp.toutiao.com/profile_v4/graphic/publish",
|
|
16140
|
+
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
|
|
16141
|
+
}
|
|
16142
|
+
});
|
|
16143
|
+
const totalData = await http.api({
|
|
16144
|
+
method: "get",
|
|
16145
|
+
url: "https://mp.toutiao.com/mp/fe_api/home/merge_v2",
|
|
16146
|
+
params: {
|
|
16147
|
+
app_id: 1231
|
|
16148
|
+
}
|
|
16149
|
+
});
|
|
16150
|
+
await new Promise((r)=>setTimeout(r, 1000));
|
|
16151
|
+
const contentDataYesterday = await http.api({
|
|
16152
|
+
method: "get",
|
|
16153
|
+
url: "https://mp.toutiao.com/mp/agw/statistic/v2/content_stat",
|
|
16154
|
+
params: {
|
|
16155
|
+
type: 0,
|
|
16156
|
+
app_id: 1231
|
|
16109
16157
|
}
|
|
16110
16158
|
});
|
|
16111
|
-
const [totalData, contentDataYesterday] = await Promise.all([
|
|
16112
|
-
http.api({
|
|
16113
|
-
method: "get",
|
|
16114
|
-
url: "https://mp.toutiao.com/mp/fe_api/home/merge_v2",
|
|
16115
|
-
params: {
|
|
16116
|
-
app_id: 1231
|
|
16117
|
-
}
|
|
16118
|
-
}),
|
|
16119
|
-
http.api({
|
|
16120
|
-
method: "get",
|
|
16121
|
-
url: "https://mp.toutiao.com/mp/agw/statistic/v2/content_stat",
|
|
16122
|
-
params: {
|
|
16123
|
-
type: 0,
|
|
16124
|
-
app_id: 1231
|
|
16125
|
-
}
|
|
16126
|
-
})
|
|
16127
|
-
]);
|
|
16128
16159
|
const isSuccess = !!(totalData?.data?.statistic && contentDataYesterday?.author_stat);
|
|
16129
16160
|
if (!isSuccess || !totalData?.data || !contentDataYesterday?.author_stat) return types_errorResponse(totalData?.message || contentDataYesterday?.message || "头条号数据获取失败,请检查Cookie是否有效", 414);
|
|
16130
16161
|
const ttData = {
|