@be-link/pos-cli-nodejs 0.0.18 → 0.0.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/pos-cli-nodejs",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "正向订单服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,14 +24,14 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/jest": "29.5.6",
27
- "@types/node": "^20.8.9",
27
+ "@types/node": "20.8.9",
28
28
  "jest": "29.7.0",
29
29
  "ts-jest": "29.1.1",
30
- "typedoc": "^0.25.2",
31
- "typedoc-plugin-missing-exports": "^2.1.0",
30
+ "typedoc": "0.25.2",
31
+ "typedoc-plugin-missing-exports": "2.1.0",
32
32
  "typescript": "5.2.2"
33
33
  },
34
34
  "dependencies": {
35
- "axios": "1.5.1"
35
+ "axios": "0.27.2"
36
36
  }
37
37
  }
@@ -14,17 +14,17 @@ class BaseService {
14
14
  this.publicDevHost = 'https://pos-app-74680-5-1304510571.sh.run.tcloudbase.com';
15
15
  this.publicProdHost = '';
16
16
  /** 如果是云函数环境, 默认走公网访问 */
17
- this.isPublicEnv = process.env.CONTAINER_ENV === 'SFC';
17
+ this.isPublicEnv = (process.env.CONTAINER_ENV || 'SCF') === 'SFC';
18
18
  }
19
19
  /** 获取API URL */
20
20
  getApiUrl(func) {
21
21
  const host = this.isPublicEnv
22
22
  ? env_1.default.isProduction()
23
- ? this.publicDevHost
24
- : this.publicProdHost
23
+ ? this.publicProdHost
24
+ : this.publicDevHost
25
25
  : env_1.default.isProduction()
26
- ? this.natDevHost
27
- : this.natProdHost;
26
+ ? this.natProdHost
27
+ : this.natDevHost;
28
28
  return `${host}${this.prefixUrl}/${(0, string_1.camelToKebabCase)(func.name)}`;
29
29
  }
30
30
  }