@tsed/platform-response-filter 6.128.6 → 6.128.9
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/coverage.json +3 -3
- package/lib/cjs/services/ConverterService.js +1 -11
- package/lib/cjs/services/ConverterService.js.map +1 -1
- package/lib/esm/services/ConverterService.js +3 -13
- package/lib/esm/services/ConverterService.js.map +1 -1
- package/lib/types/services/ConverterService.d.ts +0 -4
- package/package.json +11 -11
package/coverage.json
CHANGED
|
@@ -8,12 +8,6 @@ const json_mapper_1 = require("@tsed/json-mapper");
|
|
|
8
8
|
* @deprecated Since 2021-10-03. Use serialize/deserialize functions from @tsed/json-mapper instead
|
|
9
9
|
*/
|
|
10
10
|
let ConverterService = class ConverterService {
|
|
11
|
-
injectorService;
|
|
12
|
-
_additionalProperties;
|
|
13
|
-
constructor(injectorService, configuration) {
|
|
14
|
-
this.injectorService = injectorService;
|
|
15
|
-
this._additionalProperties = configuration.get("converter.additionalProperties");
|
|
16
|
-
}
|
|
17
11
|
/**
|
|
18
12
|
* Convert instance to plainObject.
|
|
19
13
|
*
|
|
@@ -23,7 +17,6 @@ let ConverterService = class ConverterService {
|
|
|
23
17
|
serialize(obj, options = {}) {
|
|
24
18
|
return (0, json_mapper_1.serialize)(obj, {
|
|
25
19
|
useAlias: true,
|
|
26
|
-
additionalProperties: this._additionalProperties === "accept",
|
|
27
20
|
...options
|
|
28
21
|
});
|
|
29
22
|
}
|
|
@@ -42,15 +35,12 @@ let ConverterService = class ConverterService {
|
|
|
42
35
|
deserialize(obj, options = {}) {
|
|
43
36
|
return (0, json_mapper_1.deserialize)(obj, {
|
|
44
37
|
useAlias: true,
|
|
45
|
-
additionalProperties: this._additionalProperties === "accept",
|
|
46
38
|
...options
|
|
47
39
|
});
|
|
48
40
|
}
|
|
49
41
|
};
|
|
50
42
|
ConverterService = tslib_1.__decorate([
|
|
51
|
-
(0, di_1.Injectable)()
|
|
52
|
-
tslib_1.__param(1, (0, di_1.Configuration)()),
|
|
53
|
-
tslib_1.__metadata("design:paramtypes", [di_1.InjectorService, Object])
|
|
43
|
+
(0, di_1.Injectable)()
|
|
54
44
|
], ConverterService);
|
|
55
45
|
exports.ConverterService = ConverterService;
|
|
56
46
|
//# sourceMappingURL=ConverterService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConverterService.js","sourceRoot":"","sources":["../../../src/services/ConverterService.ts"],"names":[],"mappings":";;;;AAAA,iCAAoE;AACpE,mDAAyG;AAEzG;;GAEG;AAEH,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"ConverterService.js","sourceRoot":"","sources":["../../../src/services/ConverterService.ts"],"names":[],"mappings":";;;;AAAA,iCAAoE;AACpE,mDAAyG;AAEzG;;GAEG;AAEH,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAC3B;;;;;OAKG;IACH,SAAS,CAAC,GAAQ,EAAE,UAAiC,EAAE;QACrD,OAAO,IAAA,uBAAS,EAAC,GAAG,EAAE;YACpB,QAAQ,EAAE,IAAI;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,GAAQ,EAAE,UAAmC,EAAE;QACzD,OAAO,IAAA,yBAAW,EAAC,GAAG,EAAE;YACtB,QAAQ,EAAE,IAAI;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhCY,gBAAgB;IAD5B,IAAA,eAAU,GAAE;GACA,gBAAgB,CAgC5B;AAhCY,4CAAgB","sourcesContent":["import {Configuration, Injectable, InjectorService} from \"@tsed/di\";\nimport {deserialize, JsonDeserializerOptions, JsonSerializerOptions, serialize} from \"@tsed/json-mapper\";\n\n/**\n * @deprecated Since 2021-10-03. Use serialize/deserialize functions from @tsed/json-mapper instead\n */\n@Injectable()\nexport class ConverterService {\n /**\n * Convert instance to plainObject.\n *\n * @param obj\n * @param options\n */\n serialize(obj: any, options: JsonSerializerOptions = {}): any {\n return serialize(obj, {\n useAlias: true,\n ...options\n });\n }\n\n /**\n * Convert a plainObject to targetType.\n *\n * ### Options\n *\n * - `ignoreCallback`: callback called for each object which will be deserialized. The callback can return a boolean to avoid the default converter behavior.\n * - `checkRequiredValue`: Disable the required check condition.\n *\n * @param obj Object source that will be deserialized\n * @param options Mapping options\n * @returns {any}\n */\n deserialize(obj: any, options: JsonDeserializerOptions = {}): any {\n return deserialize(obj, {\n useAlias: true,\n ...options\n });\n }\n}\n"]}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Injectable } from "@tsed/di";
|
|
3
3
|
import { deserialize, serialize } from "@tsed/json-mapper";
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Since 2021-10-03. Use serialize/deserialize functions from @tsed/json-mapper instead
|
|
6
6
|
*/
|
|
7
7
|
let ConverterService = class ConverterService {
|
|
8
|
-
injectorService;
|
|
9
|
-
_additionalProperties;
|
|
10
|
-
constructor(injectorService, configuration) {
|
|
11
|
-
this.injectorService = injectorService;
|
|
12
|
-
this._additionalProperties = configuration.get("converter.additionalProperties");
|
|
13
|
-
}
|
|
14
8
|
/**
|
|
15
9
|
* Convert instance to plainObject.
|
|
16
10
|
*
|
|
@@ -20,7 +14,6 @@ let ConverterService = class ConverterService {
|
|
|
20
14
|
serialize(obj, options = {}) {
|
|
21
15
|
return serialize(obj, {
|
|
22
16
|
useAlias: true,
|
|
23
|
-
additionalProperties: this._additionalProperties === "accept",
|
|
24
17
|
...options
|
|
25
18
|
});
|
|
26
19
|
}
|
|
@@ -39,15 +32,12 @@ let ConverterService = class ConverterService {
|
|
|
39
32
|
deserialize(obj, options = {}) {
|
|
40
33
|
return deserialize(obj, {
|
|
41
34
|
useAlias: true,
|
|
42
|
-
additionalProperties: this._additionalProperties === "accept",
|
|
43
35
|
...options
|
|
44
36
|
});
|
|
45
37
|
}
|
|
46
38
|
};
|
|
47
39
|
ConverterService = __decorate([
|
|
48
|
-
Injectable()
|
|
49
|
-
__param(1, Configuration()),
|
|
50
|
-
__metadata("design:paramtypes", [InjectorService, Object])
|
|
40
|
+
Injectable()
|
|
51
41
|
], ConverterService);
|
|
52
42
|
export { ConverterService };
|
|
53
43
|
//# sourceMappingURL=ConverterService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConverterService.js","sourceRoot":"","sources":["../../../src/services/ConverterService.ts"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ConverterService.js","sourceRoot":"","sources":["../../../src/services/ConverterService.ts"],"names":[],"mappings":";AAAA,OAAO,EAAgB,UAAU,EAAkB,MAAM,UAAU,CAAC;AACpE,OAAO,EAAC,WAAW,EAAkD,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAEzG;;GAEG;AAEH,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAC3B;;;;;OAKG;IACH,SAAS,CAAC,GAAQ,EAAE,UAAiC,EAAE;QACrD,OAAO,SAAS,CAAC,GAAG,EAAE;YACpB,QAAQ,EAAE,IAAI;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,GAAQ,EAAE,UAAmC,EAAE;QACzD,OAAO,WAAW,CAAC,GAAG,EAAE;YACtB,QAAQ,EAAE,IAAI;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhCY,gBAAgB;IAD5B,UAAU,EAAE;GACA,gBAAgB,CAgC5B;SAhCY,gBAAgB","sourcesContent":["import {Configuration, Injectable, InjectorService} from \"@tsed/di\";\nimport {deserialize, JsonDeserializerOptions, JsonSerializerOptions, serialize} from \"@tsed/json-mapper\";\n\n/**\n * @deprecated Since 2021-10-03. Use serialize/deserialize functions from @tsed/json-mapper instead\n */\n@Injectable()\nexport class ConverterService {\n /**\n * Convert instance to plainObject.\n *\n * @param obj\n * @param options\n */\n serialize(obj: any, options: JsonSerializerOptions = {}): any {\n return serialize(obj, {\n useAlias: true,\n ...options\n });\n }\n\n /**\n * Convert a plainObject to targetType.\n *\n * ### Options\n *\n * - `ignoreCallback`: callback called for each object which will be deserialized. The callback can return a boolean to avoid the default converter behavior.\n * - `checkRequiredValue`: Disable the required check condition.\n *\n * @param obj Object source that will be deserialized\n * @param options Mapping options\n * @returns {any}\n */\n deserialize(obj: any, options: JsonDeserializerOptions = {}): any {\n return deserialize(obj, {\n useAlias: true,\n ...options\n });\n }\n}\n"]}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { Configuration, InjectorService } from "@tsed/di";
|
|
2
1
|
import { JsonDeserializerOptions, JsonSerializerOptions } from "@tsed/json-mapper";
|
|
3
2
|
/**
|
|
4
3
|
* @deprecated Since 2021-10-03. Use serialize/deserialize functions from @tsed/json-mapper instead
|
|
5
4
|
*/
|
|
6
5
|
export declare class ConverterService {
|
|
7
|
-
private injectorService;
|
|
8
|
-
private readonly _additionalProperties;
|
|
9
|
-
constructor(injectorService: InjectorService, configuration: Configuration);
|
|
10
6
|
/**
|
|
11
7
|
* Convert instance to plainObject.
|
|
12
8
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-response-filter",
|
|
3
|
-
"version": "6.128.
|
|
3
|
+
"version": "6.128.9",
|
|
4
4
|
"description": "Platform response filter module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"tslib": "2.4.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@tsed/core": "6.128.
|
|
28
|
-
"@tsed/di": "6.128.
|
|
29
|
-
"@tsed/exceptions": "6.128.
|
|
30
|
-
"@tsed/json-mapper": "6.128.
|
|
31
|
-
"@tsed/schema": "6.128.
|
|
27
|
+
"@tsed/core": "6.128.9",
|
|
28
|
+
"@tsed/di": "6.128.9",
|
|
29
|
+
"@tsed/exceptions": "6.128.9",
|
|
30
|
+
"@tsed/json-mapper": "6.128.9",
|
|
31
|
+
"@tsed/schema": "6.128.9"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@tsed/core": "^6.128.
|
|
35
|
-
"@tsed/di": "^6.128.
|
|
36
|
-
"@tsed/exceptions": "^6.128.
|
|
37
|
-
"@tsed/json-mapper": "^6.128.
|
|
38
|
-
"@tsed/schema": "^6.128.
|
|
34
|
+
"@tsed/core": "^6.128.9",
|
|
35
|
+
"@tsed/di": "^6.128.9",
|
|
36
|
+
"@tsed/exceptions": "^6.128.9",
|
|
37
|
+
"@tsed/json-mapper": "^6.128.9",
|
|
38
|
+
"@tsed/schema": "^6.128.9"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@tsed/core": {
|