@iflyrpa/actions 3.0.4 → 4.0.0-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 +44 -44
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +44 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -8736,9 +8736,7 @@ var __webpack_exports__ = {};
|
|
|
8736
8736
|
var package_namespaceObject = {
|
|
8737
8737
|
i8: "0.1.0"
|
|
8738
8738
|
};
|
|
8739
|
-
var package_namespaceObject_0 = {
|
|
8740
|
-
i8: "3.0.3"
|
|
8741
|
-
};
|
|
8739
|
+
var package_namespaceObject_0 = JSON.parse('{"i8":"3.0.5-beta.0"}');
|
|
8742
8740
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
8743
8741
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
8744
8742
|
const external_node_http_namespaceObject = require("node:http");
|
|
@@ -23355,6 +23353,13 @@ var __webpack_exports__ = {};
|
|
|
23355
23353
|
}
|
|
23356
23354
|
};
|
|
23357
23355
|
if (foundError) Object.assign(errorResponse, foundError);
|
|
23356
|
+
if (error.response?.status === 403) {
|
|
23357
|
+
this.logger?.warn(`[403 详细信息] URL: ${error.config?.url}`);
|
|
23358
|
+
this.logger?.warn(`[403 响应头] ${JSON.stringify(error.response?.headers || {})}`);
|
|
23359
|
+
this.logger?.warn(`[403 响应体] ${JSON.stringify(error.response?.data || null)}`);
|
|
23360
|
+
const verifyDecision = error.response?.headers?.["x-tt-verify-passport-decision"];
|
|
23361
|
+
if (verifyDecision) this.logger?.warn(`[403 验证决策] x-tt-verify-passport-decision: ${verifyDecision}`);
|
|
23362
|
+
}
|
|
23358
23363
|
if (error.response?.data) {
|
|
23359
23364
|
if ("object" == typeof error.response.data) {
|
|
23360
23365
|
const serverError = error.response.data;
|
|
@@ -34773,54 +34778,49 @@ var __webpack_exports__ = {};
|
|
|
34773
34778
|
})}`);
|
|
34774
34779
|
task.logger.info(`publishData: ${JSON.stringify(publishData)}`);
|
|
34775
34780
|
task.logger.info(`url: https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`);
|
|
34776
|
-
|
|
34777
|
-
|
|
34778
|
-
|
|
34779
|
-
|
|
34780
|
-
|
|
34781
|
-
|
|
34782
|
-
|
|
34783
|
-
|
|
34784
|
-
|
|
34785
|
-
|
|
34786
|
-
|
|
34787
|
-
|
|
34788
|
-
|
|
34789
|
-
|
|
34790
|
-
|
|
34791
|
-
|
|
34792
|
-
|
|
34793
|
-
|
|
34794
|
-
|
|
34795
|
-
|
|
34796
|
-
|
|
34797
|
-
|
|
34798
|
-
|
|
34799
|
-
|
|
34800
|
-
|
|
34801
|
-
|
|
34802
|
-
|
|
34803
|
-
const upstreamCode = error?.code;
|
|
34804
|
-
task.logger.error(`TaskId:${task.taskId},create_v2 请求异常,上游错误已屏蔽。上游 code=${upstreamCode},message=${upstreamMessage}`, {
|
|
34805
|
-
error,
|
|
34806
|
-
upstreamData: error?.data,
|
|
34807
|
-
extra: error?.extra
|
|
34808
|
-
});
|
|
34809
|
-
const message = "发布失败,请重试";
|
|
34781
|
+
const publishResult = await proxyHttp.api({
|
|
34782
|
+
method: "post",
|
|
34783
|
+
url: `https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`,
|
|
34784
|
+
data: publishData,
|
|
34785
|
+
defaultErrorMsg: "发布异常,请稍后重试。",
|
|
34786
|
+
headers: {
|
|
34787
|
+
...headers,
|
|
34788
|
+
Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
|
|
34789
|
+
"Content-Type": "application/json",
|
|
34790
|
+
Accept: "application/json, text/plain, */*",
|
|
34791
|
+
"bd-ticket-guard-client-data": bdTicketGuardClientData["headers_bd_ticket_guard_client_data"],
|
|
34792
|
+
"bd-ticket-guard-ree-public-key": bdTicketGuardClientData["headers_bd_ticket_guard_ree_public_key"],
|
|
34793
|
+
"bd-ticket-guard-version": "2",
|
|
34794
|
+
"bd-ticket-guard-web-sign-type": "1",
|
|
34795
|
+
"bd-ticket-guard-web-version": "2",
|
|
34796
|
+
"x-secsdk-csrf-token": csrfToken,
|
|
34797
|
+
"x-tt-session-dtrait": sessionDtrait || ""
|
|
34798
|
+
}
|
|
34799
|
+
}, {
|
|
34800
|
+
timeout: 60000,
|
|
34801
|
+
retries: 3,
|
|
34802
|
+
retryDelay: 2000
|
|
34803
|
+
});
|
|
34804
|
+
task.logger.info("========== api调用完成 ==========");
|
|
34805
|
+
task.logger.info(`decision值: ${JSON.stringify(decision)}, needsVerification(decision): ${needsVerification(decision)}`);
|
|
34806
|
+
if (needsVerification(decision)) {
|
|
34807
|
+
task.logger.warn(`TaskId:${task.taskId},检测到需要验证,准备返回验证信息`);
|
|
34810
34808
|
await updateTaskState?.({
|
|
34811
|
-
state: types_TaskState.
|
|
34812
|
-
error: message,
|
|
34809
|
+
state: types_TaskState.SUCCESS,
|
|
34813
34810
|
result: {
|
|
34814
|
-
|
|
34815
|
-
uploadedImgList: JSON.stringify(publishData.item.common.images)
|
|
34811
|
+
response: decision
|
|
34816
34812
|
}
|
|
34817
34813
|
});
|
|
34814
|
+
task.logger.info("返回验证响应: code=0, message=操作成功");
|
|
34818
34815
|
return {
|
|
34819
|
-
code:
|
|
34820
|
-
data:
|
|
34821
|
-
|
|
34816
|
+
code: 0,
|
|
34817
|
+
data: {
|
|
34818
|
+
result: decision
|
|
34819
|
+
},
|
|
34820
|
+
message: "操作成功"
|
|
34822
34821
|
};
|
|
34823
34822
|
}
|
|
34823
|
+
task.logger.info("不需要验证,继续正常流程");
|
|
34824
34824
|
reportLogger({
|
|
34825
34825
|
token: params.huiwenToken || "",
|
|
34826
34826
|
enverionment: task.enverionment || "development",
|