@xfe-repo/bff-endpoint 1.2.8 → 1.2.10
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/{chunk-GNZKBCLT.mjs → chunk-AH6HKQNT.mjs} +3 -2
- package/dist/{chunk-P7SLUYKA.mjs → chunk-FLYBXJYN.mjs} +1 -1
- package/dist/{chunk-XRKKQESL.mjs → chunk-ZIZ27E2R.mjs} +2 -1
- package/dist/endpoint.module.js +3 -1
- package/dist/endpoint.module.mjs +2 -2
- package/dist/endpoints.decorator.js +3 -2
- package/dist/endpoints.decorator.mjs +2 -2
- package/dist/index.js +5 -3
- package/dist/index.mjs +3 -3
- package/package.json +7 -6
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
API_RAW_RESPONSE,
|
|
3
3
|
API_SUCCESS_METHOD_RESPONSE,
|
|
4
4
|
API_SUCCESS_RESPONSE
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZIZ27E2R.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name,
|
|
8
8
|
__publicField
|
|
@@ -101,10 +101,11 @@ ApiResponseExceptionFilter = _ts_decorate([
|
|
|
101
101
|
], ApiResponseExceptionFilter);
|
|
102
102
|
|
|
103
103
|
// src/apiResponse/ApiResponse.interceptor.ts
|
|
104
|
-
import { CtxService as CtxService2
|
|
104
|
+
import { CtxService as CtxService2 } from "@xfe-repo/bff-core";
|
|
105
105
|
import { createValidationPipe } from "@xfe-repo/bff-validation";
|
|
106
106
|
import { Injectable } from "@nestjs/common";
|
|
107
107
|
import { Reflector } from "@nestjs/core";
|
|
108
|
+
import { DECORATORS } from "@nestjs/swagger/dist/constants";
|
|
108
109
|
import { mergeMap } from "rxjs/operators";
|
|
109
110
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
110
111
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -9,8 +9,9 @@ var API_RAW_RESPONSE = "API_RAW_RESPONSE";
|
|
|
9
9
|
var ApiRawResponse = /* @__PURE__ */ __name(() => SetMetadata(API_RAW_RESPONSE, true), "ApiRawResponse");
|
|
10
10
|
|
|
11
11
|
// src/apiResponse/ApiSuccessResponse.decorator.ts
|
|
12
|
-
import { ApiProperty, ApiPropertyOptional
|
|
12
|
+
import { ApiProperty, ApiPropertyOptional } from "@xfe-repo/bff-core";
|
|
13
13
|
import { HttpStatus } from "@nestjs/common";
|
|
14
|
+
import { DECORATORS } from "@nestjs/swagger/dist/constants";
|
|
14
15
|
import { Type } from "class-transformer";
|
|
15
16
|
import { IsArray, IsInt, IsNotEmpty, IsObject, IsOptional, IsString, ValidateNested } from "class-validator";
|
|
16
17
|
function _ts_decorate(decorators, target, key, desc) {
|
package/dist/endpoint.module.js
CHANGED
|
@@ -122,6 +122,7 @@ var import_bff_core3 = require("@xfe-repo/bff-core");
|
|
|
122
122
|
var import_bff_validation2 = require("@xfe-repo/bff-validation");
|
|
123
123
|
var import_common5 = require("@nestjs/common");
|
|
124
124
|
var import_core = require("@nestjs/core");
|
|
125
|
+
var import_constants2 = require("@nestjs/swagger/dist/constants");
|
|
125
126
|
var import_operators = require("rxjs/operators");
|
|
126
127
|
|
|
127
128
|
// src/apiResponse/ApiRawResponse.decorator.ts
|
|
@@ -131,6 +132,7 @@ var API_RAW_RESPONSE = "API_RAW_RESPONSE";
|
|
|
131
132
|
// src/apiResponse/ApiSuccessResponse.decorator.ts
|
|
132
133
|
var import_bff_core2 = require("@xfe-repo/bff-core");
|
|
133
134
|
var import_common4 = require("@nestjs/common");
|
|
135
|
+
var import_constants = require("@nestjs/swagger/dist/constants");
|
|
134
136
|
var import_class_transformer = require("class-transformer");
|
|
135
137
|
var import_class_validator = require("class-validator");
|
|
136
138
|
var API_SUCCESS_RESPONSE = "API_SUCCESS_RESPONSE";
|
|
@@ -184,7 +186,7 @@ var _ApiResponseInterceptor = class _ApiResponseInterceptor {
|
|
|
184
186
|
...apiResponseDto,
|
|
185
187
|
data
|
|
186
188
|
} : data;
|
|
187
|
-
const apiResponse = this.reflector.get(
|
|
189
|
+
const apiResponse = this.reflector.get(import_constants2.DECORATORS.API_RESPONSE, this.contextHandler);
|
|
188
190
|
const metatype = (apiResponse?.["200"] || apiResponse?.["201"])?.type;
|
|
189
191
|
const res = await this.validationPipe.transform(transformData, {
|
|
190
192
|
metatype,
|
package/dist/endpoint.module.mjs
CHANGED
|
@@ -30,6 +30,7 @@ module.exports = __toCommonJS(endpoints_decorator_exports);
|
|
|
30
30
|
// src/apiResponse/ApiSuccessResponse.decorator.ts
|
|
31
31
|
var import_bff_core = require("@xfe-repo/bff-core");
|
|
32
32
|
var import_common2 = require("@nestjs/common");
|
|
33
|
+
var import_constants = require("@nestjs/swagger/dist/constants");
|
|
33
34
|
var import_class_transformer = require("class-transformer");
|
|
34
35
|
var import_class_validator = require("class-validator");
|
|
35
36
|
|
|
@@ -73,7 +74,7 @@ function ApiSuccessMethodResponse() {
|
|
|
73
74
|
if (apiRawResponse) {
|
|
74
75
|
return descriptor;
|
|
75
76
|
}
|
|
76
|
-
const responses = Reflect.getMetadata(
|
|
77
|
+
const responses = Reflect.getMetadata(import_constants.DECORATORS.API_RESPONSE, descriptor.value) || {};
|
|
77
78
|
let okStatus;
|
|
78
79
|
let okResponses;
|
|
79
80
|
if (Reflect.has(responses, "200")) {
|
|
@@ -96,7 +97,7 @@ function ApiSuccessMethodResponse() {
|
|
|
96
97
|
type: withApiSuccessResponse(modelType, isArray)
|
|
97
98
|
}
|
|
98
99
|
};
|
|
99
|
-
Reflect.defineMetadata(
|
|
100
|
+
Reflect.defineMetadata(import_constants.DECORATORS.API_RESPONSE, {
|
|
100
101
|
...responses,
|
|
101
102
|
...finalResponses
|
|
102
103
|
}, descriptor.value);
|
package/dist/index.js
CHANGED
|
@@ -46,11 +46,13 @@ var import_bff_core2 = require("@xfe-repo/bff-core");
|
|
|
46
46
|
var import_bff_validation = require("@xfe-repo/bff-validation");
|
|
47
47
|
var import_common3 = require("@nestjs/common");
|
|
48
48
|
var import_core = require("@nestjs/core");
|
|
49
|
+
var import_constants2 = require("@nestjs/swagger/dist/constants");
|
|
49
50
|
var import_operators = require("rxjs/operators");
|
|
50
51
|
|
|
51
52
|
// src/apiResponse/ApiSuccessResponse.decorator.ts
|
|
52
53
|
var import_bff_core = require("@xfe-repo/bff-core");
|
|
53
54
|
var import_common2 = require("@nestjs/common");
|
|
55
|
+
var import_constants = require("@nestjs/swagger/dist/constants");
|
|
54
56
|
var import_class_transformer = require("class-transformer");
|
|
55
57
|
var import_class_validator = require("class-validator");
|
|
56
58
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -88,7 +90,7 @@ function ApiSuccessMethodResponse() {
|
|
|
88
90
|
if (apiRawResponse) {
|
|
89
91
|
return descriptor;
|
|
90
92
|
}
|
|
91
|
-
const responses = Reflect.getMetadata(
|
|
93
|
+
const responses = Reflect.getMetadata(import_constants.DECORATORS.API_RESPONSE, descriptor.value) || {};
|
|
92
94
|
let okStatus;
|
|
93
95
|
let okResponses;
|
|
94
96
|
if (Reflect.has(responses, "200")) {
|
|
@@ -111,7 +113,7 @@ function ApiSuccessMethodResponse() {
|
|
|
111
113
|
type: withApiSuccessResponse(modelType, isArray)
|
|
112
114
|
}
|
|
113
115
|
};
|
|
114
|
-
Reflect.defineMetadata(
|
|
116
|
+
Reflect.defineMetadata(import_constants.DECORATORS.API_RESPONSE, {
|
|
115
117
|
...responses,
|
|
116
118
|
...finalResponses
|
|
117
119
|
}, descriptor.value);
|
|
@@ -232,7 +234,7 @@ var _ApiResponseInterceptor = class _ApiResponseInterceptor {
|
|
|
232
234
|
...apiResponseDto,
|
|
233
235
|
data
|
|
234
236
|
} : data;
|
|
235
|
-
const apiResponse = this.reflector.get(
|
|
237
|
+
const apiResponse = this.reflector.get(import_constants2.DECORATORS.API_RESPONSE, this.contextHandler);
|
|
236
238
|
const metatype = (apiResponse?.["200"] || apiResponse?.["201"])?.type;
|
|
237
239
|
const res = await this.validationPipe.transform(transformData, {
|
|
238
240
|
metatype,
|
package/dist/index.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
ApiResponseInterceptor,
|
|
6
6
|
EndpointModule
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AH6HKQNT.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Endpoints
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FLYBXJYN.mjs";
|
|
11
11
|
import {
|
|
12
12
|
API_RAW_RESPONSE,
|
|
13
13
|
API_SUCCESS_METHOD_RESPONSE,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
ApiRawResponse,
|
|
16
16
|
ApiSuccessMethodResponse,
|
|
17
17
|
ApiSuccessResponse
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZIZ27E2R.mjs";
|
|
19
19
|
import "./chunk-Q7G5RLD4.mjs";
|
|
20
20
|
export {
|
|
21
21
|
API_RAW_RESPONSE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfe-repo/bff-endpoint",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,21 +22,22 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@nestjs/common": "11.1.13",
|
|
24
24
|
"@nestjs/core": "11.1.13",
|
|
25
|
+
"@nestjs/swagger": "11.2.6",
|
|
25
26
|
"class-transformer": "^0.5.1",
|
|
26
27
|
"class-validator": "^0.14.3",
|
|
27
28
|
"reflect-metadata": "^0.2.2",
|
|
28
29
|
"rxjs": "^7.8.2",
|
|
29
|
-
"@xfe-repo/bff-core": "1.2.
|
|
30
|
-
"@xfe-repo/bff-validation": "1.2.
|
|
30
|
+
"@xfe-repo/bff-core": "1.2.10",
|
|
31
|
+
"@xfe-repo/bff-validation": "1.2.10"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@nestjs/testing": "11.1.13",
|
|
34
35
|
"@types/jest": "^30.0.0",
|
|
35
36
|
"@types/node": "^25.0.10",
|
|
36
37
|
"jest": "^30.2.0",
|
|
37
|
-
"@xfe-repo/
|
|
38
|
-
"@xfe-repo/
|
|
39
|
-
"@xfe-repo/
|
|
38
|
+
"@xfe-repo/jest-config": "1.0.2",
|
|
39
|
+
"@xfe-repo/typescript-config": "0.0.7",
|
|
40
|
+
"@xfe-repo/eslint-config": "0.0.5"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {},
|
|
42
43
|
"publishConfig": {
|