@bearei/server-common 0.0.167 → 0.0.169
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/access/access.interceptor.d.ts +3 -0
- package/dist/access/access.interceptor.js +27 -3
- package/dist/access/access.interceptor.js.map +1 -1
- package/dist/decorators/index.d.ts +1 -0
- package/dist/decorators/index.js +1 -0
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/omit-key.decorator.d.ts +2 -0
- package/dist/decorators/omit-key.decorator.js +8 -0
- package/dist/decorators/omit-key.decorator.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/response.utils.js +6 -12
- package/dist/utils/response.utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handleResponseEntity = void 0;
|
|
4
|
-
const handleResponseEntity = (omitKeys) => {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...accumulator,
|
|
11
|
-
[key]: typeof value === 'number' ? `${value}` : value
|
|
12
|
-
}), {});
|
|
13
|
-
omitObjectKeys.forEach(key => delete newObject[key]);
|
|
14
|
-
return newObject;
|
|
15
|
-
};
|
|
4
|
+
const handleResponseEntity = (omitKeys = []) => {
|
|
5
|
+
const omitKeysSet = new Set(omitKeys);
|
|
6
|
+
return (object) => Object.entries(object).reduce((accumulator, [key, value]) => omitKeysSet.has(key) ? accumulator : ({
|
|
7
|
+
...accumulator,
|
|
8
|
+
[key]: typeof value === 'number' ? `${value}` : value
|
|
9
|
+
}), {});
|
|
16
10
|
};
|
|
17
11
|
exports.handleResponseEntity = handleResponseEntity;
|
|
18
12
|
//# sourceMappingURL=response.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.utils.js","sourceRoot":"","sources":["../../src/utils/response.utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,oBAAoB,GAAG,CAAI,
|
|
1
|
+
{"version":3,"file":"response.utils.js","sourceRoot":"","sources":["../../src/utils/response.utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,oBAAoB,GAAG,CAAI,WAAW,EAAiB,EAAE,EAAE;IAChE,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;IAErC,OAAO,CAAC,MAAS,EAAE,EAAE,CACb,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CACrB,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CACtB,WAAW,CAAC,GAAG,CAAC,GAAc,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CACxC;QACQ,GAAG,WAAW;QACd,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK;KAC5D,CACR,EACT,EAAE,CACJ,CAAA;AACtB,CAAC,CAAA;AAdY,QAAA,oBAAoB,wBAchC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bearei/server-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.169",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "bearei <bear_ei@outlook.com>",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"class-transformer": "^0.5.1",
|
|
37
37
|
"class-validator": "^0.14.1",
|
|
38
38
|
"crypto": "^1.0.1",
|
|
39
|
-
"dayjs": "^1.11.
|
|
39
|
+
"dayjs": "^1.11.13",
|
|
40
40
|
"ioredis": "^5.4.1",
|
|
41
41
|
"nanoid": "^3.3.7",
|
|
42
42
|
"reflect-metadata": "^0.2.0",
|