@iflyrpa/actions 4.0.0-beta.0 → 4.0.0-beta.2

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/index.mjs CHANGED
@@ -5434,9 +5434,7 @@ function __webpack_require__(moduleId) {
5434
5434
  return module;
5435
5435
  };
5436
5436
  })();
5437
- var package_namespaceObject = {
5438
- i8: "3.0.4"
5439
- };
5437
+ var package_namespaceObject = JSON.parse('{"i8":"4.0.0-beta.1"}');
5440
5438
  var dist = __webpack_require__("../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js");
5441
5439
  async function ProxyAgent(task, ip, adr, accountId, refresh) {
5442
5440
  const http = new Http({
@@ -14404,13 +14402,21 @@ const mock_mockAction = async (task, params)=>{
14404
14402
  console.log("拦截器收到响应:", JSON.stringify(response.data));
14405
14403
  task.logger.info(`拦截器收到响应response.headers: ${JSON.stringify(response.headers)} `);
14406
14404
  task.logger.info(`拦截器收到响应response.data: ${JSON.stringify(response.data)} `);
14405
+ task.logger.info(`拦截器收到响应response.data类型: ${typeof response.data}, 值: ${JSON.stringify(response.data)}`);
14407
14406
  decision = parseVerifyPassportDecision(response.headers["x-tt-verify-passport-decision"]);
14407
+ task.logger.info(`解析后的decision: ${JSON.stringify(decision)}`);
14408
14408
  if (needsVerification(decision)) {
14409
- task.logger.info(`需要验证: ${JSON.stringify(decision)}`);
14409
+ task.logger.info(`检测到需要验证,decision.account_flow: ${decision?.account_flow}`);
14410
+ task.logger.info("拦截器即将return,不抛错");
14411
+ return;
14412
+ }
14413
+ task.logger.info("不需要验证,继续检查response.data");
14414
+ if (!response || !response.data) {
14415
+ task.logger.info("response或response.data为空,拦截器return");
14410
14416
  return;
14411
14417
  }
14412
- if (!response || !response.data) return;
14413
14418
  const responseData = response.data;
14419
+ task.logger.info(`responseData.status_code: ${responseData?.status_code}`);
14414
14420
  if (response && responseData?.status_code && 0 !== responseData.status_code) {
14415
14421
  const errorCode = 4 === responseData.status_code ? 500 : responseData.status_code;
14416
14422
  if (4 === responseData.status_code) task.logger.warn(`抖音服务器错误 status_code: 4,映射为 500 触发重试。原始响应: ${JSON.stringify(responseData)}`);
@@ -14506,6 +14512,11 @@ const mock_mockAction = async (task, params)=>{
14506
14512
  retries: 3,
14507
14513
  retryDelay: 2000
14508
14514
  });
14515
+ task.logger.info("========== api调用完成 ==========");
14516
+ task.logger.info(`publishResult类型: ${typeof publishResult}, 值: ${JSON.stringify(publishResult)}`);
14517
+ task.logger.info(`decision值: ${JSON.stringify(decision)}`);
14518
+ task.logger.info(`needsVerification(decision): ${needsVerification(decision)}`);
14519
+ task.logger.info("不需要验证,继续正常流程");
14509
14520
  reportLogger({
14510
14521
  token: params.huiwenToken || "",
14511
14522
  enverionment: task.enverionment || "development",