@iflyrpa/actions 4.1.0-beta.1 → 4.1.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/bundle.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*! For license information please see bundle.js.LICENSE.txt */
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="51f3980f-4908-5c61-864e-675122bae629")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e5c917b4-4ca0-5538-9e4e-f99d97e05dd9")}catch(e){}}();
4
4
  var __webpack_modules__ = {
5
5
  "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js": function(__unused_webpack_module, exports1, __webpack_require__) {
6
6
  "use strict";
@@ -12490,10 +12490,8 @@ var __webpack_exports__ = {};
12490
12490
  navigator: ()=>_navigator,
12491
12491
  origin: ()=>utils_origin
12492
12492
  });
12493
- var package_namespaceObject = {
12494
- i8: "0.1.2"
12495
- };
12496
- var package_namespaceObject_0 = JSON.parse('{"i8":"4.1.0-beta.1"}');
12493
+ var package_namespaceObject = JSON.parse('{"i8":"0.1.3-beta.0"}');
12494
+ var package_namespaceObject_0 = JSON.parse('{"i8":"4.1.0-beta.2"}');
12497
12495
  const external_node_fs_namespaceObject = require("node:fs");
12498
12496
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
12499
12497
  const external_node_http_namespaceObject = require("node:http");
@@ -12584,7 +12582,7 @@ var __webpack_exports__ = {};
12584
12582
  fileStream.on("error", (err)=>{
12585
12583
  reject({
12586
12584
  code: 500,
12587
- message: `图片Buffer写入失败: ${err.message}`
12585
+ message: "图片写入失败,请检查磁盘空间"
12588
12586
  });
12589
12587
  });
12590
12588
  } else {
@@ -27342,7 +27340,14 @@ var __webpack_exports__ = {};
27342
27340
  };
27343
27341
  class Http {
27344
27342
  static handleApiError(error) {
27345
- if (error && "object" == typeof error && "code" in error && "message" in error) return error;
27343
+ if (error && "object" == typeof error && "code" in error && "message" in error) {
27344
+ const resp = error;
27345
+ if ("string" != typeof resp.message || !resp.message.trim()) return {
27346
+ ...resp,
27347
+ message: USER_MESSAGE.SYSTEM_ERROR
27348
+ };
27349
+ return resp;
27350
+ }
27346
27351
  return {
27347
27352
  code: 500,
27348
27353
  message: USER_MESSAGE.SYSTEM_ERROR,
@@ -27492,17 +27497,20 @@ var __webpack_exports__ = {};
27492
27497
  const status = error.extra?.alarmStatus;
27493
27498
  const axiosCode = error.extra?.alarmErrorCode;
27494
27499
  const method = (config.method || "get").toUpperCase();
27495
- const url = config.url || "-";
27500
+ const baseURL = config.baseURL || this.apiClient.defaults.baseURL || "";
27501
+ const fullUrl = config.url ? /^https?:\/\//.test(config.url) ? config.url : `${baseURL.replace(/\/$/, "")}${config.url}` : baseURL || "-";
27502
+ const rawMsg = "string" == typeof error.message && error.message.trim() ? error.message : "";
27503
+ const baseMsg = rawMsg || `请求失败(无错误文案,code=${error.code ?? "unknown"})`;
27496
27504
  const retriedSuffix = attempts > 0 ? `(已重试${attempts}次仍失败)` : "";
27497
27505
  reportFeishuAlarm({
27498
27506
  level: status && ALARM_STATUS.has(status) ? "alarm" : "warning",
27499
- platform: this.platform || "unknown",
27507
+ platform: "@iflyrpa/playwright",
27500
27508
  source: "http",
27501
- stage: `${method} ${url}`,
27509
+ stage: `${method} ${fullUrl}`,
27502
27510
  errorType: status ? `HTTP_${status}` : axiosCode || "NETWORK_ERROR",
27503
27511
  code: error.code,
27504
- msg: `${error.message}${retriedSuffix}`,
27505
- url: config.url,
27512
+ msg: `${baseMsg}${retriedSuffix}`,
27513
+ url: "-" !== fullUrl ? fullUrl : void 0,
27506
27514
  title: "RPA接口异常"
27507
27515
  });
27508
27516
  }
@@ -45898,8 +45906,8 @@ var __webpack_exports__ = {};
45898
45906
  const resultCode = publishResult.data?.baseResp?.errcode ?? publishResult.errCode;
45899
45907
  const resultMsg = publishResult.data?.baseResp?.errmsg ?? (0 === resultCode ? "发布成功" : `发布失败(errCode=${resultCode})`);
45900
45908
  if (0 === resultCode) {
45901
- const publishId = extractEncFileKey(coverUpload.downloadUrl);
45902
- if (!publishId) task.logger.error(`[shipinhaoPublishVideo] 封面 DownloadURL 中未解析到 encfilekey,关联 id 为空: ${coverUpload.downloadUrl}`);
45909
+ const publishId = extractEncFileKey(verticalCoverUpload.downloadUrl);
45910
+ if (!publishId) task.logger.error(`[shipinhaoPublishVideo] 封面 DownloadURL 中未解析到 encfilekey,关联 id 为空: ${verticalCoverUpload.downloadUrl}`);
45903
45911
  await updateTaskState?.({
45904
45912
  state: types_TaskState.SUCCESS,
45905
45913
  result: {
@@ -52522,4 +52530,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
52522
52530
  });
52523
52531
 
52524
52532
  //# sourceMappingURL=bundle.js.map
52525
- //# debugId=51f3980f-4908-5c61-864e-675122bae629
52533
+ //# debugId=e5c917b4-4ca0-5538-9e4e-f99d97e05dd9