@be-link/flow-cli-nodejs 0.0.23 → 0.0.25

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/flow/http.js CHANGED
@@ -32,10 +32,11 @@ const uuid_1 = require("uuid");
32
32
  const BizError_1 = __importDefault(require("../errors/BizError"));
33
33
  const SystemError_1 = __importDefault(require("../errors/SystemError"));
34
34
  const axios_retry_1 = __importDefault(require("axios-retry"));
35
- (0, axios_retry_1.default)(axios_1.default, {
35
+ const flowAxios = axios_1.default.create();
36
+ (0, axios_retry_1.default)(flowAxios, {
36
37
  retries: 1,
37
38
  retryCondition(error) {
38
- return error.response.status === 502;
39
+ return error.response?.status === 502;
39
40
  },
40
41
  retryDelay: (retryCount, error) => {
41
42
  console.info(`retryCount: ${retryCount}, retryDelay: ${retryCount * 500}`);
@@ -49,7 +50,7 @@ async function callApi(url, ...request) {
49
50
  const requestId = (0, uuid_1.v4)();
50
51
  try {
51
52
  console.info(`准备发起FLOW请求[${requestId}]: ${url}, 参数: ${JSON.stringify(request)}`);
52
- const response = await axios_1.default.post(url, request[0], {
53
+ const response = await flowAxios.post(url, request[0], {
53
54
  headers: {
54
55
  'X-Request-Id': requestId,
55
56
  'x-belink-accessType': 'authorizationTokenInside',
@@ -6,8 +6,8 @@ export default abstract class BaseService {
6
6
  protected readonly natDevHost = "http://qgostaxv.biz-flow.nmkh74o4.rlwzae9d.com:8090";
7
7
  protected readonly natProdHost = "http://bxbvjnca.biz-flow.cwl9ok0a.mk2u3r3l.com:8090";
8
8
  /** 公网域名 */
9
- protected readonly publicDevHost = "https://biz-flow-74680-5-1304510571.sh.run.tcloudbase.com";
10
- protected readonly publicProdHost = "https://biz-flow-60660-10-1304510571.sh.run.tcloudbase.com";
9
+ protected readonly publicDevHost = "https://biz-flow-dev.wejourney.top";
10
+ protected readonly publicProdHost = "https://biz-flow.wejourney.top";
11
11
  constructor();
12
12
  /** 获取API URL */
13
13
  protected getApiUrl(func: Function): string;
@@ -11,8 +11,8 @@ class BaseService {
11
11
  this.natDevHost = 'http://qgostaxv.biz-flow.nmkh74o4.rlwzae9d.com:8090';
12
12
  this.natProdHost = 'http://bxbvjnca.biz-flow.cwl9ok0a.mk2u3r3l.com:8090';
13
13
  /** 公网域名 */
14
- this.publicDevHost = 'https://biz-flow-74680-5-1304510571.sh.run.tcloudbase.com';
15
- this.publicProdHost = 'https://biz-flow-60660-10-1304510571.sh.run.tcloudbase.com';
14
+ this.publicDevHost = 'https://biz-flow-dev.wejourney.top';
15
+ this.publicProdHost = 'https://biz-flow.wejourney.top';
16
16
  /** 如果是云函数环境, 默认走公网访问 */
17
17
  this.isPublicEnv = (process.env.CONTAINER_ENV || 'SCF') === 'SCF';
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/flow-cli-nodejs",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "流服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "repository": {