@byted-apaas/server-sdk-node 1.1.28-beta.1 → 1.1.28-beta.3
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 +2 -2
- package/request/common.js +6 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byted-apaas/server-sdk-node",
|
|
3
|
-
"version": "1.1.28-beta.
|
|
3
|
+
"version": "1.1.28-beta.3",
|
|
4
4
|
"description": "aPaaS Server SDK",
|
|
5
5
|
"author": "zhouwexin <zhouwexin@bytedance.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "tsc --build --clean && rm -rf **/*.js.map"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@byted-apaas/server-common-node": "^2.0.28-beta.
|
|
16
|
+
"@byted-apaas/server-common-node": "^2.0.28-beta.5",
|
|
17
17
|
"@jorgeferrero/stream-to-buffer": "^2.0.6",
|
|
18
18
|
"dayjs": "^1.9.6",
|
|
19
19
|
"form-data": "^3.0.0",
|
package/request/common.js
CHANGED
|
@@ -8,18 +8,15 @@ const credential_1 = require("@byted-apaas/server-common-node/credential/credent
|
|
|
8
8
|
const exceptions_1 = require("@byted-apaas/server-common-node/utils/exceptions");
|
|
9
9
|
const common_1 = require("../application/impl/common");
|
|
10
10
|
const request_1 = require("@byted-apaas/server-common-node/http/request");
|
|
11
|
-
|
|
12
|
-
// import {SDKInfo} from '@byted-apaas/server-common-node/http/request';
|
|
13
|
-
// import {SDKName, SDKVersion} from '../version/version';
|
|
11
|
+
const version_1 = require("../version/version");
|
|
14
12
|
const utils = common.utils;
|
|
15
13
|
const checkUtils = common.checkUtils;
|
|
16
14
|
const exceptions = common.exceptions;
|
|
17
|
-
// TODO: 待 server-common 发布新版本后启用
|
|
18
15
|
// server-sdk 的 SDK 信息
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const serverSdkInfo = {
|
|
17
|
+
name: version_1.SDKName,
|
|
18
|
+
version: version_1.SDKVersion,
|
|
19
|
+
};
|
|
23
20
|
/**
|
|
24
21
|
* 获取带有 server-sdk 信息的 HttpOptions
|
|
25
22
|
* @param ctx 上下文
|
|
@@ -27,8 +24,7 @@ const exceptions = common.exceptions;
|
|
|
27
24
|
* @returns HttpOptions
|
|
28
25
|
*/
|
|
29
26
|
function getOptionsWithSDKInfo(ctx, httpConfig) {
|
|
30
|
-
|
|
31
|
-
return (0, request_1.getOptions)(ctx, httpConfig);
|
|
27
|
+
return (0, request_1.getOptions)(ctx, httpConfig).setSDKInfo(serverSdkInfo);
|
|
32
28
|
}
|
|
33
29
|
exports.getOptionsWithSDKInfo = getOptionsWithSDKInfo;
|
|
34
30
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|