@hg-ts/http-controller 0.1.117 → 0.2.1
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/decorators/decorators.d.ts +0 -29
- package/dist/decorators/decorators.d.ts.map +1 -1
- package/dist/decorators/decorators.js +0 -173
- package/dist/decorators/decorators.js.map +1 -1
- package/dist/http-controller.module.d.ts.map +1 -1
- package/dist/http-controller.module.js +20 -4
- package/dist/http-controller.module.js.map +1 -1
- package/dist/middlewares/database.interceptor.d.ts.map +1 -1
- package/dist/middlewares/database.interceptor.js +5 -5
- package/dist/middlewares/database.interceptor.js.map +1 -1
- package/dist/middlewares/exception-mapper.interceptor.d.ts.map +1 -1
- package/dist/middlewares/exception-mapper.interceptor.js +1 -2
- package/dist/middlewares/exception-mapper.interceptor.js.map +1 -1
- package/dist/services/swagger.service.d.ts +2 -3
- package/dist/services/swagger.service.d.ts.map +1 -1
- package/dist/services/swagger.service.js +1 -9
- package/dist/services/swagger.service.js.map +1 -1
- package/dist/tests/abstracts/base-controller-suite.d.ts +4 -2
- package/dist/tests/abstracts/base-controller-suite.d.ts.map +1 -1
- package/dist/tests/abstracts/base-controller-suite.js +11 -5
- package/dist/tests/abstracts/base-controller-suite.js.map +1 -1
- package/dist/tests/echo/controllers/dto/index.d.ts +0 -1
- package/dist/tests/echo/controllers/dto/index.d.ts.map +1 -1
- package/dist/tests/echo/controllers/dto/index.js +0 -1
- package/dist/tests/echo/controllers/dto/index.js.map +1 -1
- package/dist/tests/echo/controllers/echo.controller.d.ts +0 -2
- package/dist/tests/echo/controllers/echo.controller.d.ts.map +1 -1
- package/dist/tests/echo/controllers/echo.controller.js +12 -33
- package/dist/tests/echo/controllers/echo.controller.js.map +1 -1
- package/dist/tests/echo/echo.test.d.ts +0 -2
- package/dist/tests/echo/echo.test.d.ts.map +1 -1
- package/dist/tests/echo/echo.test.js +0 -23
- package/dist/tests/echo/echo.test.js.map +1 -1
- package/dist/tests/echo/echo.test.module.d.ts.map +1 -1
- package/dist/tests/echo/echo.test.module.js +2 -6
- package/dist/tests/echo/echo.test.module.js.map +1 -1
- package/dist/tests/exception/controllers/dtos/common-exception.dto.d.ts +1 -1
- package/dist/tests/exception/controllers/exception.controller.d.ts.map +1 -1
- package/dist/tests/exception/controllers/exception.controller.js +5 -5
- package/dist/tests/exception/controllers/exception.controller.js.map +1 -1
- package/dist/tests/exception/exception.test.module.d.ts.map +1 -1
- package/dist/tests/exception/exception.test.module.js +2 -6
- package/dist/tests/exception/exception.test.module.js.map +1 -1
- package/dist/tests/http-methods/controllers/empty-response.controller.d.ts.map +1 -1
- package/dist/tests/http-methods/controllers/empty-response.controller.js +13 -16
- package/dist/tests/http-methods/controllers/empty-response.controller.js.map +1 -1
- package/dist/tests/http-methods/http-methods.test.module.d.ts.map +1 -1
- package/dist/tests/http-methods/http-methods.test.module.js +2 -6
- package/dist/tests/http-methods/http-methods.test.module.js.map +1 -1
- package/package.json +22 -18
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +0 -1
- package/dist/tests/echo/controllers/dto/echo-get-field.query.d.ts +0 -3
- package/dist/tests/echo/controllers/dto/echo-get-field.query.d.ts.map +0 -1
- package/dist/tests/echo/controllers/dto/echo-get-field.query.js +0 -6
- package/dist/tests/echo/controllers/dto/echo-get-field.query.js.map +0 -1
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
import { BaseException } from '@hg-ts/exception';
|
|
2
|
-
import { ZodDto, ZodType } from '@hg-ts/validation';
|
|
3
|
-
export type ControllerDecoratorOptions = {
|
|
4
|
-
path?: string | string[];
|
|
5
|
-
tags?: string | string[];
|
|
6
|
-
};
|
|
7
|
-
export type MethodDecoratorOptions = {
|
|
8
|
-
path?: string | string[];
|
|
9
|
-
tags?: string | string[];
|
|
10
|
-
};
|
|
11
2
|
export type ExceptionMap = Map<Class<BaseException, any[]>, number>;
|
|
12
3
|
export declare const EXCEPTION_METADATA_KEY: unique symbol;
|
|
13
4
|
export declare class Http {
|
|
14
5
|
private constructor();
|
|
15
|
-
static Controller<T extends Function>(options?: string | string[] | ControllerDecoratorOptions): TypedClassDecorator<T>;
|
|
16
|
-
static Response(dto: Nullable<ZodDto>, statusCode?: number): MethodDecorator;
|
|
17
6
|
static ExceptionStatus(exception: Class<BaseException, any[]>, statusCode: number): MethodDecorator;
|
|
18
|
-
static Get(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
19
|
-
static Post(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
20
|
-
static Put(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
21
|
-
static Patch(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
22
|
-
static Delete(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
23
|
-
static Options(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
24
|
-
static Search(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
25
|
-
static All(pathOrOptions?: string | string[] | MethodDecoratorOptions): MethodDecorator;
|
|
26
|
-
static Query(field?: string, schema?: ZodType): ParameterDecorator;
|
|
27
|
-
static Body(field?: string, schema?: ZodType): ParameterDecorator;
|
|
28
|
-
static Param(field?: string, schema?: ZodType): ParameterDecorator;
|
|
29
|
-
private static getControllerOptions;
|
|
30
|
-
private static getMethodOptions;
|
|
31
|
-
private static getPathFromOptions;
|
|
32
|
-
private static getTagsFromOptions;
|
|
33
|
-
private static decorateMethod;
|
|
34
|
-
private static getInputDecoratorArgs;
|
|
35
|
-
private static getArgumentSchema;
|
|
36
7
|
}
|
|
37
8
|
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,qBAAa,IAAI;IAChB,OAAO;WAEO,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe;CA2B1G"}
|
|
@@ -1,42 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Http = exports.EXCEPTION_METADATA_KEY = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const exception_1 = require("@hg-ts/exception");
|
|
6
4
|
const validation_1 = require("@hg-ts/validation");
|
|
7
|
-
const common_1 = require("@nestjs/common");
|
|
8
5
|
const swagger_1 = require("@nestjs/swagger");
|
|
9
|
-
const strict_1 = tslib_1.__importDefault(require("node:assert/strict"));
|
|
10
6
|
const exceptions_1 = require("../exceptions");
|
|
11
|
-
const middlewares_1 = require("../middlewares");
|
|
12
7
|
const services_1 = require("../services");
|
|
13
|
-
const PARAM_TYPES_METADATA = 'design:paramtypes';
|
|
14
8
|
exports.EXCEPTION_METADATA_KEY = Symbol('EXCEPTION_METADATA_KEY');
|
|
15
9
|
class Http {
|
|
16
10
|
constructor() { }
|
|
17
|
-
static Controller(options = {}) {
|
|
18
|
-
const { path, tags } = this.getControllerOptions(options);
|
|
19
|
-
return target => {
|
|
20
|
-
(0, common_1.UseInterceptors)(middlewares_1.ExceptionMapperInterceptor)(target);
|
|
21
|
-
(0, common_1.UseInterceptors)(middlewares_1.DatabaseInterceptor)(target);
|
|
22
|
-
(0, common_1.Controller)({ path })(target);
|
|
23
|
-
(0, swagger_1.ApiTags)(...tags)(target);
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
static Response(dto, statusCode = 200) {
|
|
27
|
-
return (target, propertyKey, descriptor) => {
|
|
28
|
-
if (dto) {
|
|
29
|
-
(0, swagger_1.ApiResponse)({
|
|
30
|
-
type: dto,
|
|
31
|
-
status: statusCode,
|
|
32
|
-
})(target, propertyKey, descriptor);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
(0, swagger_1.ApiResponse)({ status: statusCode })(target, propertyKey, descriptor);
|
|
36
|
-
}
|
|
37
|
-
(0, common_1.HttpCode)(statusCode)(target, propertyKey, descriptor);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
11
|
static ExceptionStatus(exception, statusCode) {
|
|
41
12
|
return (target, propertyKey, descriptor) => {
|
|
42
13
|
const statusMap = Reflect.getMetadata(exports.EXCEPTION_METADATA_KEY, target, propertyKey) ?? new Map();
|
|
@@ -58,150 +29,6 @@ class Http {
|
|
|
58
29
|
})(target, propertyKey, descriptor);
|
|
59
30
|
};
|
|
60
31
|
}
|
|
61
|
-
static Get(pathOrOptions = {}) {
|
|
62
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
63
|
-
return this.decorateMethod(common_1.Get, options);
|
|
64
|
-
}
|
|
65
|
-
static Post(pathOrOptions = {}) {
|
|
66
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
67
|
-
return this.decorateMethod(common_1.Post, options);
|
|
68
|
-
}
|
|
69
|
-
static Put(pathOrOptions = {}) {
|
|
70
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
71
|
-
return this.decorateMethod(common_1.Put, options);
|
|
72
|
-
}
|
|
73
|
-
static Patch(pathOrOptions = {}) {
|
|
74
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
75
|
-
return this.decorateMethod(common_1.Patch, options);
|
|
76
|
-
}
|
|
77
|
-
static Delete(pathOrOptions = {}) {
|
|
78
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
79
|
-
return this.decorateMethod(common_1.Delete, options);
|
|
80
|
-
}
|
|
81
|
-
static Options(pathOrOptions = {}) {
|
|
82
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
83
|
-
return this.decorateMethod(common_1.Options, options);
|
|
84
|
-
}
|
|
85
|
-
static Search(pathOrOptions = {}) {
|
|
86
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
87
|
-
return this.decorateMethod(common_1.Search, options);
|
|
88
|
-
}
|
|
89
|
-
static All(pathOrOptions = {}) {
|
|
90
|
-
const options = this.getMethodOptions(pathOrOptions);
|
|
91
|
-
return this.decorateMethod(common_1.All, options);
|
|
92
|
-
}
|
|
93
|
-
static Query(field, schema) {
|
|
94
|
-
return (target, propertyKey, parameterIndex) => {
|
|
95
|
-
const args = this.getInputDecoratorArgs({
|
|
96
|
-
target,
|
|
97
|
-
propertyKey,
|
|
98
|
-
parameterIndex,
|
|
99
|
-
primitiveSchema: schema ?? null,
|
|
100
|
-
field,
|
|
101
|
-
});
|
|
102
|
-
(0, common_1.Query)(...args)(target, propertyKey, parameterIndex);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
static Body(field, schema) {
|
|
106
|
-
return (target, propertyKey, parameterIndex) => {
|
|
107
|
-
const args = this.getInputDecoratorArgs({
|
|
108
|
-
target,
|
|
109
|
-
propertyKey,
|
|
110
|
-
parameterIndex,
|
|
111
|
-
primitiveSchema: schema ?? null,
|
|
112
|
-
field,
|
|
113
|
-
});
|
|
114
|
-
(0, common_1.Body)(...args)(target, propertyKey, parameterIndex);
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
static Param(field, schema) {
|
|
118
|
-
return (target, propertyKey, parameterIndex) => {
|
|
119
|
-
const args = this.getInputDecoratorArgs({
|
|
120
|
-
target,
|
|
121
|
-
propertyKey,
|
|
122
|
-
parameterIndex,
|
|
123
|
-
primitiveSchema: schema ?? null,
|
|
124
|
-
field,
|
|
125
|
-
});
|
|
126
|
-
(0, common_1.Param)(...args)(target, propertyKey, parameterIndex);
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
static getControllerOptions(options) {
|
|
130
|
-
const path = this.getPathFromOptions(options);
|
|
131
|
-
const tags = this.getTagsFromOptions(options);
|
|
132
|
-
return {
|
|
133
|
-
path,
|
|
134
|
-
tags,
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
static getMethodOptions(options) {
|
|
138
|
-
const path = this.getPathFromOptions(options);
|
|
139
|
-
const tags = this.getTagsFromOptions(options);
|
|
140
|
-
return {
|
|
141
|
-
path,
|
|
142
|
-
tags,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
static getPathFromOptions(optionsOrPath) {
|
|
146
|
-
if (typeof optionsOrPath === 'string') {
|
|
147
|
-
return [optionsOrPath];
|
|
148
|
-
}
|
|
149
|
-
if (Array.isArray(optionsOrPath)) {
|
|
150
|
-
return optionsOrPath;
|
|
151
|
-
}
|
|
152
|
-
return Array.isArray(optionsOrPath.path) ? optionsOrPath.path : [optionsOrPath.path ?? '/'];
|
|
153
|
-
}
|
|
154
|
-
static getTagsFromOptions(options) {
|
|
155
|
-
if (typeof options === 'string' || Array.isArray(options)) {
|
|
156
|
-
return [];
|
|
157
|
-
}
|
|
158
|
-
const { tags = [] } = options;
|
|
159
|
-
return Array.isArray(tags) ? tags : [tags];
|
|
160
|
-
}
|
|
161
|
-
static decorateMethod(decorator, options) {
|
|
162
|
-
const { path, tags } = options;
|
|
163
|
-
return (target, propertyKey, descriptor) => {
|
|
164
|
-
decorator(path)(target, propertyKey, descriptor);
|
|
165
|
-
(0, swagger_1.ApiTags)(...tags)(target, propertyKey, descriptor);
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
static getInputDecoratorArgs(params) {
|
|
169
|
-
const { target, propertyKey, parameterIndex, primitiveSchema, field } = params;
|
|
170
|
-
const { dto, autoResolved } = this.getArgumentSchema({
|
|
171
|
-
target,
|
|
172
|
-
propertyKey,
|
|
173
|
-
parameterIndex,
|
|
174
|
-
primitiveSchema,
|
|
175
|
-
});
|
|
176
|
-
const args = typeof field === 'string' ? [field] : [];
|
|
177
|
-
if (autoResolved) {
|
|
178
|
-
args.push(middlewares_1.ValidationPipe.getInstance());
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
args.push(new middlewares_1.ValidationPipe(dto));
|
|
182
|
-
}
|
|
183
|
-
return args;
|
|
184
|
-
}
|
|
185
|
-
static getArgumentSchema(params) {
|
|
186
|
-
const { target, propertyKey, parameterIndex, primitiveSchema } = params;
|
|
187
|
-
const metatype = Reflect.getMetadata(PARAM_TYPES_METADATA, target, propertyKey);
|
|
188
|
-
strict_1.default.ok(Array.isArray(metatype));
|
|
189
|
-
const argMetaType = metatype[parameterIndex];
|
|
190
|
-
if (!argMetaType) {
|
|
191
|
-
throw new exception_1.WillNeverHappenedException('Argument metadata not found');
|
|
192
|
-
}
|
|
193
|
-
const isPrimitive = [String, Number, BigInt, Boolean].includes(argMetaType);
|
|
194
|
-
if (isPrimitive || primitiveSchema) {
|
|
195
|
-
if (!primitiveSchema) {
|
|
196
|
-
throw new exception_1.InvalidInputException('Schema not passed for primitive argument with decorator');
|
|
197
|
-
}
|
|
198
|
-
return { dto: primitiveSchema, autoResolved: false };
|
|
199
|
-
}
|
|
200
|
-
if (!(0, validation_1.isZodDto)(argMetaType)) {
|
|
201
|
-
throw new exception_1.InvalidInputException('Object argument for decorated method is not validation schema class');
|
|
202
|
-
}
|
|
203
|
-
return { dto: argMetaType.schema, autoResolved: true };
|
|
204
|
-
}
|
|
205
32
|
}
|
|
206
33
|
exports.Http = Http;
|
|
207
34
|
//# sourceMappingURL=decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/decorators/decorators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot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C,CAAC;YAElC,IAAA,qBAAW,EAAC;gBACX,MAAM,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE;gBAC9D,MAAM,EAAE,UAAU;aAClB,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;QACrC,CAAC,CAAC;IACH,CAAC;CACD;AA9BD,oBA8BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-controller.module.d.ts","sourceRoot":"","sources":["../src/http-controller.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-controller.module.d.ts","sourceRoot":"","sources":["../src/http-controller.module.ts"],"names":[],"mappings":"AAaA,qBAiBa,oBAAoB;CAAG"}
|
|
@@ -2,14 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HttpControllerModule = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const core_1 = require("@nestjs/core");
|
|
7
|
+
const middlewares_1 = require("./middlewares");
|
|
6
8
|
const services_1 = require("./services");
|
|
7
|
-
const services = [services_1.SwaggerService];
|
|
8
9
|
let HttpControllerModule = class HttpControllerModule {
|
|
9
10
|
};
|
|
10
11
|
exports.HttpControllerModule = HttpControllerModule;
|
|
11
12
|
exports.HttpControllerModule = HttpControllerModule = tslib_1.__decorate([
|
|
12
|
-
(0,
|
|
13
|
-
|
|
13
|
+
(0, common_1.Module)({
|
|
14
|
+
providers: [
|
|
15
|
+
services_1.SwaggerService,
|
|
16
|
+
{
|
|
17
|
+
provide: core_1.APP_INTERCEPTOR,
|
|
18
|
+
useClass: middlewares_1.ExceptionMapperInterceptor,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
provide: core_1.APP_INTERCEPTOR,
|
|
22
|
+
useClass: middlewares_1.DatabaseInterceptor,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
provide: core_1.APP_PIPE,
|
|
26
|
+
useClass: middlewares_1.ValidationPipe,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
})
|
|
14
30
|
], HttpControllerModule);
|
|
15
31
|
//# sourceMappingURL=http-controller.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-controller.module.js","sourceRoot":"","sources":["../src/http-controller.module.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"http-controller.module.js","sourceRoot":"","sources":["../src/http-controller.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AACxC,uCAGsB;AACtB,+CAIuB;AAEvB,yCAA4C;AAmBrC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oDAAoB;+BAApB,oBAAoB;IAjBhC,IAAA,eAAM,EAAC;QACP,SAAS,EAAE;YACV,yBAAc;YACd;gBACC,OAAO,EAAE,sBAAe;gBACxB,QAAQ,EAAE,wCAA0B;aACpC;YACD;gBACC,OAAO,EAAE,sBAAe;gBACxB,QAAQ,EAAE,iCAAmB;aAC7B;YACD;gBACC,OAAO,EAAE,eAAQ;gBACjB,QAAQ,EAAE,4BAAc;aACxB;SACD;KACD,CAAC;GACW,oBAAoB,CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.interceptor.d.ts","sourceRoot":"","sources":["../../src/middlewares/database.interceptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"database.interceptor.d.ts","sourceRoot":"","sources":["../../src/middlewares/database.interceptor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EACN,WAAW,EAEX,gBAAgB,EAEhB,eAAe,EAEf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAGN,UAAU,EACV,MAAM,MAAM,CAAC;AAEd,qBACa,mBAAoB,YAAW,eAAe;IAE1D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAIlC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAc;IAExC,SAAS,CACf,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,WAAW,GACf,UAAU,CAAC,GAAG,CAAC;CASlB"}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DatabaseInterceptor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const knex_1 = require("@hg-ts/knex");
|
|
6
6
|
const logger_1 = require("@hg-ts/logger");
|
|
7
|
-
const postgres_1 = require("@hg-ts/postgres");
|
|
8
7
|
const common_1 = require("@nestjs/common");
|
|
9
8
|
const rxjs_1 = require("rxjs");
|
|
10
9
|
let DatabaseInterceptor = class DatabaseInterceptor {
|
|
@@ -21,12 +20,13 @@ let DatabaseInterceptor = class DatabaseInterceptor {
|
|
|
21
20
|
};
|
|
22
21
|
exports.DatabaseInterceptor = DatabaseInterceptor;
|
|
23
22
|
tslib_1.__decorate([
|
|
24
|
-
(0,
|
|
23
|
+
(0, common_1.Inject)(),
|
|
25
24
|
tslib_1.__metadata("design:type", logger_1.Logger)
|
|
26
25
|
], DatabaseInterceptor.prototype, "logger", void 0);
|
|
27
26
|
tslib_1.__decorate([
|
|
28
|
-
(0,
|
|
29
|
-
|
|
27
|
+
(0, common_1.Optional)(),
|
|
28
|
+
(0, common_1.Inject)(),
|
|
29
|
+
tslib_1.__metadata("design:type", knex_1.KnexService)
|
|
30
30
|
], DatabaseInterceptor.prototype, "postgresService", void 0);
|
|
31
31
|
exports.DatabaseInterceptor = DatabaseInterceptor = tslib_1.__decorate([
|
|
32
32
|
(0, common_1.Catch)()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.interceptor.js","sourceRoot":"","sources":["../../src/middlewares/database.interceptor.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"database.interceptor.js","sourceRoot":"","sources":["../../src/middlewares/database.interceptor.ts"],"names":[],"mappings":";;;;AAAA,sCAA0C;AAC1C,0CAAuC;AAEvC,2CAOwB;AAExB,+BAIc;AAGP,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAEZ,MAAM,CAAS;IAIjB,eAAe,CAAe;IAExC,SAAS,CACf,QAA0B,EAC1B,IAAiB;QAEjB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;YACpD,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;QACtB,CAAC;QACD,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,KAAK,IAAG,EAAE,CAAC,IAAA,oBAAa,EAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAE5G,OAAO,IAAA,WAAI,EAAC,oBAAoB,CAAC,CAAC;IACnC,CAAC;CACD,CAAA;AApBY,kDAAmB;AAEZ;IADlB,IAAA,eAAM,GAAE;sCACkB,eAAM;mDAAC;AAIjB;IAFhB,IAAA,iBAAQ,GAAE;IACV,IAAA,eAAM,GAAE;sCAC0B,kBAAW;4DAAC;8BANnC,mBAAmB;IAD/B,IAAA,cAAK,GAAE;GACK,mBAAmB,CAoB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-mapper.interceptor.d.ts","sourceRoot":"","sources":["../../src/middlewares/exception-mapper.interceptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exception-mapper.interceptor.d.ts","sourceRoot":"","sources":["../../src/middlewares/exception-mapper.interceptor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC,OAAO,EACN,WAAW,EAEX,gBAAgB,EAEhB,eAAe,EACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACN,UAAU,EAEV,MAAM,MAAM,CAAC;AAMd,qBACa,0BAA2B,YAAW,eAAe;IAEjE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAE3B,SAAS,CACf,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,GACf,UAAU,CAAC,GAAG,CAAC;IAelB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,YAAY;CAWpB"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExceptionMapperInterceptor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const exception_1 = require("@hg-ts/exception");
|
|
6
|
-
const ioc_1 = require("@hg-ts/ioc");
|
|
7
6
|
const logger_1 = require("@hg-ts/logger");
|
|
8
7
|
const validation_1 = require("@hg-ts/validation");
|
|
9
8
|
const common_1 = require("@nestjs/common");
|
|
@@ -45,7 +44,7 @@ let ExceptionMapperInterceptor = class ExceptionMapperInterceptor {
|
|
|
45
44
|
};
|
|
46
45
|
exports.ExceptionMapperInterceptor = ExceptionMapperInterceptor;
|
|
47
46
|
tslib_1.__decorate([
|
|
48
|
-
(0,
|
|
47
|
+
(0, common_1.Inject)(),
|
|
49
48
|
tslib_1.__metadata("design:type", logger_1.Logger)
|
|
50
49
|
], ExceptionMapperInterceptor.prototype, "logger", void 0);
|
|
51
50
|
exports.ExceptionMapperInterceptor = ExceptionMapperInterceptor = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-mapper.interceptor.js","sourceRoot":"","sources":["../../src/middlewares/exception-mapper.interceptor.ts"],"names":[],"mappings":";;;;AAAA,gDAG0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"exception-mapper.interceptor.js","sourceR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AC;IACrB,CAAC;IAEO,gBAAgB,CAA0B,SAAY;QAC7D,OAAO,MAAM,CAAC,cAAc,CAAC,SAAS,CAAE,CAAC,WAA8B,CAAC;IACzE,CAAC;IAGO,YAAY,CAAC,SAAkB;QACtC,IAAI,SAAS,YAAY,yBAAa,EAAE,CAAC;YACxC,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,IAAI,SAAS,YAAY,KAAK,EAAE,CAAC;YAChC,OAAO,IAAI,0BAAc,CAAC,SAAS,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,IAAI,0BAAc,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC;CACD,CAAA;AAnDY,gEAA0B;AAEnB;IADlB,IAAA,eAAM,GAAE;sCACkB,eAAM;0DAAC;qCAFtB,0BAA0B;IADtC,IAAA,cAAK,GAAE;GACK,0BAA0B,CAmDtC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { INestApplication } from '@nestjs/common';
|
|
2
2
|
export declare class SwaggerService {
|
|
3
|
-
|
|
4
|
-
[INIT_HOOK](): Promise<void>;
|
|
3
|
+
setup(app: INestApplication): void;
|
|
5
4
|
private patchSwaggerModule;
|
|
6
5
|
}
|
|
7
6
|
//# sourceMappingURL=swagger.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swagger.service.d.ts","sourceRoot":"","sources":["../../src/services/swagger.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"swagger.service.d.ts","sourceRoot":"","sources":["../../src/services/swagger.service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAQlD,qBAAa,cAAc;IACnB,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI;IAYzC,OAAO,CAAC,kBAAkB;CAc1B"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SwaggerService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const exception_1 = require("@hg-ts/exception");
|
|
6
|
-
const ioc_1 = require("@hg-ts/ioc");
|
|
7
5
|
const validation_1 = require("@hg-ts/validation");
|
|
8
6
|
const swagger_1 = require("@nestjs/swagger");
|
|
9
7
|
const schema_object_factory_1 = require("@nestjs/swagger/dist/services/schema-object-factory");
|
|
10
8
|
class SwaggerService {
|
|
11
|
-
|
|
12
|
-
async [ioc_1.INIT_HOOK]() {
|
|
13
|
-
const { app } = this.appProxy;
|
|
9
|
+
setup(app) {
|
|
14
10
|
this.patchSwaggerModule();
|
|
15
11
|
const config = new swagger_1.DocumentBuilder()
|
|
16
12
|
.setOpenAPIVersion('3.0.0')
|
|
@@ -29,8 +25,4 @@ class SwaggerService {
|
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
27
|
exports.SwaggerService = SwaggerService;
|
|
32
|
-
tslib_1.__decorate([
|
|
33
|
-
(0, ioc_1.Dependency)(),
|
|
34
|
-
tslib_1.__metadata("design:type", ioc_1.AppProxy)
|
|
35
|
-
], SwaggerService.prototype, "appProxy", void 0);
|
|
36
28
|
//# sourceMappingURL=swagger.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swagger.service.js","sourceRoot":"","sources":["../../src/services/swagger.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"swagger.service.js","sourceRoot":"","sources":["../../src/services/swagger.service.ts"],"names":[],"mappings":";;;AAAA,gDAA8D;AAC9D,kDAG2B;AAG3B,6CAGyB;AAEzB,+FAA0F;AAE1F,MAAa,cAAc;IACnB,KAAK,CAAC,GAAqB;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAE1B,MAAM,MAAM,GAAG,IAAI,yBAAe,EAAE;aAClC,iBAAiB,CAAC,OAAO,CAAC;aAC1B,KAAK,EAAE,CAAC;QAEV,MAAM,QAAQ,GAAG,uBAAa,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAE3D,uBAAa,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9E,CAAC;IAEO,kBAAkB;QACzB,2CAAmB,CAAC,SAAS,CAAC,kBAAkB,GAAG,UAClD,IAA4B,EAC5B,OAA2C;YAE3C,IAAI,CAAC,IAAA,qBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC;gBACrB,MAAM,IAAI,sCAA0B,CAAC,yBAAyB,CAAC,CAAC;YACjE,CAAC;YAED,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAA,yBAAY,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC;YAEtD,OAAO,IAAI,CAAC,IAAI,CAAC;QAClB,CAAC,CAAC;IACH,CAAC;CACD;AA3BD,wCA2BC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { TestContainer } from '@hg-ts/ioc';
|
|
2
1
|
import { Suite } from '@hg-ts/tests';
|
|
2
|
+
import { INestApplication } from '@nestjs/common';
|
|
3
|
+
import { TestingModule } from '@nestjs/testing';
|
|
3
4
|
import { AxiosInstance } from 'axios';
|
|
4
5
|
export declare abstract class BaseControllerSuite extends Suite {
|
|
5
|
-
protected
|
|
6
|
+
protected module: TestingModule;
|
|
7
|
+
protected container: INestApplication;
|
|
6
8
|
protected client: AxiosInstance;
|
|
7
9
|
private readonly moduleCtor;
|
|
8
10
|
constructor(moduleCtor: Class<any, any[]>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-controller-suite.d.ts","sourceRoot":"","sources":["../../../src/tests/abstracts/base-controller-suite.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-controller-suite.d.ts","sourceRoot":"","sources":["../../../src/tests/abstracts/base-controller-suite.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAEN,aAAa,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG7C,8BAAsB,mBAAoB,SAAQ,KAAK;IACtD,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC;IAChC,SAAS,CAAC,SAAS,EAAE,gBAAgB,CAAC;IACtC,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;gBAE5B,UAAU,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAM1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/C,SAAS,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;CACpC"}
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseControllerSuite = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const logger_1 = require("@hg-ts/logger");
|
|
6
6
|
const tests_1 = require("@hg-ts/tests");
|
|
7
|
+
const platform_fastify_1 = require("@nestjs/platform-fastify");
|
|
8
|
+
const testing_1 = require("@nestjs/testing");
|
|
7
9
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
10
|
+
const http_controller_module_1 = require("../../http-controller.module");
|
|
8
11
|
class BaseControllerSuite extends tests_1.Suite {
|
|
12
|
+
module;
|
|
9
13
|
container;
|
|
10
14
|
client;
|
|
11
15
|
moduleCtor;
|
|
@@ -14,15 +18,17 @@ class BaseControllerSuite extends tests_1.Suite {
|
|
|
14
18
|
this.moduleCtor = moduleCtor;
|
|
15
19
|
}
|
|
16
20
|
async setUp() {
|
|
17
|
-
this.
|
|
21
|
+
this.module = await testing_1.Test
|
|
22
|
+
.createTestingModule({ imports: [this.moduleCtor, logger_1.LoggerModule, http_controller_module_1.HttpControllerModule] })
|
|
23
|
+
.compile();
|
|
18
24
|
const port = this.getPort();
|
|
25
|
+
this.container = this.module.createNestApplication(new platform_fastify_1.FastifyAdapter());
|
|
19
26
|
await this.container.init();
|
|
20
|
-
await this.container.
|
|
27
|
+
await this.container.listen(port, 'localhost');
|
|
21
28
|
this.client = axios_1.default.create({ baseURL: `http://localhost:${port}` });
|
|
22
29
|
}
|
|
23
30
|
async tearDown() {
|
|
24
|
-
await this.container.
|
|
25
|
-
await this.container.shutdown();
|
|
31
|
+
await this.container.close();
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
exports.BaseControllerSuite = BaseControllerSuite;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-controller-suite.js","sourceRoot":"","sources":["../../../src/tests/abstracts/base-controller-suite.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"base-controller-suite.js","sourceRoot":"","sources":["../../../src/tests/abstracts/base-controller-suite.ts"],"names":[],"mappings":";;;;AAAA,0CAA6C;AAC7C,wCAAqC;AAGrC,+DAA0D;AAC1D,6CAGyB;AAEzB,0DAA6C;AAC7C,yEAAoE;AAEpE,MAAsB,mBAAoB,SAAQ,aAAK;IAC5C,MAAM,CAAgB;IACtB,SAAS,CAAmB;IAC5B,MAAM,CAAgB;IACf,UAAU,CAAoB;IAE/C,YAAmB,UAA6B;QAC/C,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,CAAC;IAEe,KAAK,CAAC,KAAK;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,cAAW;aAC7B,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,qBAAY,EAAE,6CAAoB,CAAC,EAAE,CAAC;aACvF,OAAO,EAAE,CAAC;QAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAG5B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,iCAAc,EAAE,CAAC,CAAC;QAEzE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAE/C,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,oBAAoB,IAAI,EAAE,EAAE,CAAC,CAAC;IACrE,CAAC;IAEe,KAAK,CAAC,QAAQ;QAC7B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CAGD;AAjCD,kDAiCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tests/echo/controllers/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tests/echo/controllers/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
|
@@ -3,5 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./echo-get.query"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./echo-post.body"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./echo-get-field.query"), exports);
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tests/echo/controllers/dto/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,2DAAiC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tests/echo/controllers/dto/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,2DAAiC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { EchoGetQuery, EchoPostBody } from './dto';
|
|
2
2
|
export declare class EchoController {
|
|
3
3
|
getEchoQuery(query: EchoGetQuery): Promise<EchoGetQuery>;
|
|
4
|
-
getEchoQueryField(query: number): Promise<number>;
|
|
5
4
|
getEchoParam(params: EchoGetQuery): Promise<EchoGetQuery>;
|
|
6
|
-
getEchoParamField(param: number): Promise<number>;
|
|
7
5
|
postEchoQuery(query: EchoGetQuery): Promise<EchoGetQuery>;
|
|
8
6
|
postEchoBody(body: EchoPostBody): Promise<EchoPostBody>;
|
|
9
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo.controller.d.ts","sourceRoot":"","sources":["../../../../src/tests/echo/controllers/echo.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"echo.controller.d.ts","sourceRoot":"","sources":["../../../../src/tests/echo/controllers/echo.controller.ts"],"names":[],"mappings":"AASA,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,MAAM,OAAO,CAAC;AAEf,qBAEa,cAAc;IAEb,YAAY,CACf,KAAK,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,CAAC;IAKX,YAAY,CACf,MAAM,EAAE,YAAY,GAC3B,OAAO,CAAC,YAAY,CAAC;IAKX,aAAa,CAChB,KAAK,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,CAAC;IAKX,YAAY,CAChB,IAAI,EAAE,YAAY,GACxB,OAAO,CAAC,YAAY,CAAC;CAGxB"}
|
|
@@ -2,21 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EchoController = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
6
7
|
const dto_1 = require("./dto");
|
|
7
8
|
let EchoController = class EchoController {
|
|
8
9
|
async getEchoQuery(query) {
|
|
9
10
|
return query;
|
|
10
11
|
}
|
|
11
|
-
async getEchoQueryField(query) {
|
|
12
|
-
return query;
|
|
13
|
-
}
|
|
14
12
|
async getEchoParam(params) {
|
|
15
13
|
return params;
|
|
16
14
|
}
|
|
17
|
-
async getEchoParamField(param) {
|
|
18
|
-
return param;
|
|
19
|
-
}
|
|
20
15
|
async postEchoQuery(query) {
|
|
21
16
|
return query;
|
|
22
17
|
}
|
|
@@ -26,51 +21,35 @@ let EchoController = class EchoController {
|
|
|
26
21
|
};
|
|
27
22
|
exports.EchoController = EchoController;
|
|
28
23
|
tslib_1.__decorate([
|
|
29
|
-
|
|
30
|
-
tslib_1.__param(0,
|
|
24
|
+
(0, common_1.Get)('/query'),
|
|
25
|
+
tslib_1.__param(0, (0, common_1.Query)()),
|
|
31
26
|
tslib_1.__metadata("design:type", Function),
|
|
32
27
|
tslib_1.__metadata("design:paramtypes", [dto_1.EchoGetQuery]),
|
|
33
28
|
tslib_1.__metadata("design:returntype", Promise)
|
|
34
29
|
], EchoController.prototype, "getEchoQuery", null);
|
|
35
30
|
tslib_1.__decorate([
|
|
36
|
-
|
|
37
|
-
tslib_1.__param(0,
|
|
38
|
-
tslib_1.__metadata("design:type", Function),
|
|
39
|
-
tslib_1.__metadata("design:paramtypes", [Number]),
|
|
40
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
41
|
-
], EchoController.prototype, "getEchoQueryField", null);
|
|
42
|
-
tslib_1.__decorate([
|
|
43
|
-
decorators_1.Http.Get('/param/:test'),
|
|
44
|
-
tslib_1.__param(0, decorators_1.Http.Param()),
|
|
31
|
+
(0, common_1.Get)('/param/:test'),
|
|
32
|
+
tslib_1.__param(0, (0, common_1.Param)()),
|
|
45
33
|
tslib_1.__metadata("design:type", Function),
|
|
46
34
|
tslib_1.__metadata("design:paramtypes", [dto_1.EchoGetQuery]),
|
|
47
35
|
tslib_1.__metadata("design:returntype", Promise)
|
|
48
36
|
], EchoController.prototype, "getEchoParam", null);
|
|
49
37
|
tslib_1.__decorate([
|
|
50
|
-
|
|
51
|
-
tslib_1.__param(0,
|
|
52
|
-
tslib_1.__metadata("design:type", Function),
|
|
53
|
-
tslib_1.__metadata("design:paramtypes", [Number]),
|
|
54
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
55
|
-
], EchoController.prototype, "getEchoParamField", null);
|
|
56
|
-
tslib_1.__decorate([
|
|
57
|
-
decorators_1.Http.Post('/query'),
|
|
58
|
-
tslib_1.__param(0, decorators_1.Http.Query()),
|
|
38
|
+
(0, common_1.Post)('/query'),
|
|
39
|
+
tslib_1.__param(0, (0, common_1.Query)()),
|
|
59
40
|
tslib_1.__metadata("design:type", Function),
|
|
60
41
|
tslib_1.__metadata("design:paramtypes", [dto_1.EchoGetQuery]),
|
|
61
42
|
tslib_1.__metadata("design:returntype", Promise)
|
|
62
43
|
], EchoController.prototype, "postEchoQuery", null);
|
|
63
44
|
tslib_1.__decorate([
|
|
64
|
-
|
|
65
|
-
tslib_1.__param(0,
|
|
45
|
+
(0, common_1.Post)('/body'),
|
|
46
|
+
tslib_1.__param(0, (0, common_1.Body)()),
|
|
66
47
|
tslib_1.__metadata("design:type", Function),
|
|
67
48
|
tslib_1.__metadata("design:paramtypes", [dto_1.EchoPostBody]),
|
|
68
49
|
tslib_1.__metadata("design:returntype", Promise)
|
|
69
50
|
], EchoController.prototype, "postEchoBody", null);
|
|
70
51
|
exports.EchoController = EchoController = tslib_1.__decorate([
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
tags: 'Echo',
|
|
74
|
-
})
|
|
52
|
+
(0, swagger_1.ApiTags)('Echo'),
|
|
53
|
+
(0, common_1.Controller)('/echo')
|
|
75
54
|
], EchoController);
|
|
76
55
|
//# sourceMappingURL=echo.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo.controller.js","sourceRoot":"","sources":["../../../../src/tests/echo/controllers/echo.controller.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"echo.controller.js","sourceRoot":"","sources":["../../../../src/tests/echo/controllers/echo.controller.ts"],"names":[],"mappings":";;;;AAAA,2CAOwB;AACxB,6CAA0C;AAC1C,+BAGe;AAIR,IAAM,cAAc,GAApB,MAAM,cAAc;IAEb,AAAN,KAAK,CAAC,YAAY,CACf,KAAmB;QAE5B,OAAO,KAAK,CAAC;IACd,CAAC;IAGY,AAAN,KAAK,CAAC,YAAY,CACf,MAAoB;QAE7B,OAAO,MAAM,CAAC;IACf,CAAC;IAGY,AAAN,KAAK,CAAC,aAAa,CAChB,KAAmB;QAE5B,OAAO,KAAK,CAAC;IACd,CAAC;IAGY,AAAN,KAAK,CAAC,YAAY,CAChB,IAAkB;QAE1B,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AA5BY,wCAAc;AAEb;IADZ,IAAA,YAAG,EAAC,QAAQ,CAAC;IAEZ,mBAAA,IAAA,cAAK,GAAE,CAAA;;6CAAQ,kBAAY;;kDAG5B;AAGY;IADZ,IAAA,YAAG,EAAC,cAAc,CAAC;IAElB,mBAAA,IAAA,cAAK,GAAE,CAAA;;6CAAS,kBAAY;;kDAG7B;AAGY;IADZ,IAAA,aAAI,EAAC,QAAQ,CAAC;IAEb,mBAAA,IAAA,cAAK,GAAE,CAAA;;6CAAQ,kBAAY;;mDAG5B;AAGY;IADZ,IAAA,aAAI,EAAC,OAAO,CAAC;IAEZ,mBAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,kBAAY;;kDAG1B;yBA3BW,cAAc;IAF1B,IAAA,iBAAO,EAAC,MAAM,CAAC;IACf,IAAA,mBAAU,EAAC,OAAO,CAAC;GACP,cAAc,CA4B1B"}
|
|
@@ -5,8 +5,6 @@ export declare class EchoTest extends BaseControllerSuite {
|
|
|
5
5
|
echoPostQuery(): Promise<void>;
|
|
6
6
|
echoPostBody(): Promise<void>;
|
|
7
7
|
echoGetParam(): Promise<void>;
|
|
8
|
-
echoGetParamField(): Promise<void>;
|
|
9
|
-
echoGetField(): Promise<void>;
|
|
10
8
|
echoGetInvalidQuery(): Promise<void>;
|
|
11
9
|
echoGetFieldInvalidQuery(): Promise<void>;
|
|
12
10
|
protected getPort(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo.test.d.ts","sourceRoot":"","sources":["../../../src/tests/echo/echo.test.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,qBACa,QAAS,SAAQ,mBAAmB;;IAMnC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IASxB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAS9B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAS7B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"echo.test.d.ts","sourceRoot":"","sources":["../../../src/tests/echo/echo.test.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,qBACa,QAAS,SAAQ,mBAAmB;;IAMnC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IASxB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAS9B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAS7B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAU7B,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQpC,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC;cAOnC,OAAO,IAAI,MAAM;CAGpC"}
|
|
@@ -33,17 +33,6 @@ let EchoTest = class EchoTest extends abstracts_1.BaseControllerSuite {
|
|
|
33
33
|
const response = await this.client.get(`/echo/param/${value}`);
|
|
34
34
|
(0, tests_1.expect)(response.data).toMatchObject(params);
|
|
35
35
|
}
|
|
36
|
-
async echoGetParamField() {
|
|
37
|
-
const value = 3.12;
|
|
38
|
-
const response = await this.client.get(`/echo/param-field/${value}`);
|
|
39
|
-
(0, tests_1.expect)(response.data).toBe(value);
|
|
40
|
-
}
|
|
41
|
-
async echoGetField() {
|
|
42
|
-
const value = '4.15';
|
|
43
|
-
const params = { test: value };
|
|
44
|
-
const response = await this.client.get('/echo/query/field', { params });
|
|
45
|
-
(0, tests_1.expect)(response.data).toBe(Number(value));
|
|
46
|
-
}
|
|
47
36
|
async echoGetInvalidQuery() {
|
|
48
37
|
const value = '5.16';
|
|
49
38
|
const params = { unknownKey: value };
|
|
@@ -83,18 +72,6 @@ tslib_1.__decorate([
|
|
|
83
72
|
tslib_1.__metadata("design:paramtypes", []),
|
|
84
73
|
tslib_1.__metadata("design:returntype", Promise)
|
|
85
74
|
], EchoTest.prototype, "echoGetParam", null);
|
|
86
|
-
tslib_1.__decorate([
|
|
87
|
-
(0, tests_1.Test)(),
|
|
88
|
-
tslib_1.__metadata("design:type", Function),
|
|
89
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
90
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
91
|
-
], EchoTest.prototype, "echoGetParamField", null);
|
|
92
|
-
tslib_1.__decorate([
|
|
93
|
-
(0, tests_1.Test)(),
|
|
94
|
-
tslib_1.__metadata("design:type", Function),
|
|
95
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
96
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
97
|
-
], EchoTest.prototype, "echoGetField", null);
|
|
98
75
|
tslib_1.__decorate([
|
|
99
76
|
(0, tests_1.Test)(),
|
|
100
77
|
(0, tests_1.ExpectException)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo.test.js","sourceRoot":"","sources":["../../../src/tests/echo/echo.test.ts"],"names":[],"m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AON;AAGY;IADZ,IAAA,YAAI,GAAE;;;;4CAON;AAGY;IADZ,IAAA,YAAI,GAAE;;;;4CAON;AAIY;IAFZ,IAAA,YAAI,GAAE;IACN,IAAA,uBAAe,GAAE;;;;mDAKjB;AAIY;IAFZ,IAAA,YAAI,GAAE;IACN,IAAA,uBAAe,GAAE;;;;wDAMjB;mBAxDW,QAAQ;IADpB,IAAA,gBAAQ,GAAE;;GACE,QAAQ,CA6DpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo.test.module.d.ts","sourceRoot":"","sources":["../../../src/tests/echo/echo.test.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"echo.test.module.d.ts","sourceRoot":"","sources":["../../../src/tests/echo/echo.test.module.ts"],"names":[],"mappings":"AAIA,qBACa,cAAc;CAAG"}
|
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EchoTestModule = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const http_controller_module_1 = require("../../http-controller.module");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
7
6
|
const controllers_1 = require("./controllers");
|
|
8
7
|
let EchoTestModule = class EchoTestModule {
|
|
9
8
|
};
|
|
10
9
|
exports.EchoTestModule = EchoTestModule;
|
|
11
10
|
exports.EchoTestModule = EchoTestModule = tslib_1.__decorate([
|
|
12
|
-
(0,
|
|
13
|
-
imports: [http_controller_module_1.HttpControllerModule],
|
|
14
|
-
controllers: [controllers_1.EchoController],
|
|
15
|
-
})
|
|
11
|
+
(0, common_1.Module)({ controllers: [controllers_1.EchoController] })
|
|
16
12
|
], EchoTestModule);
|
|
17
13
|
//# sourceMappingURL=echo.test.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo.test.module.js","sourceRoot":"","sources":["../../../src/tests/echo/echo.test.module.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"echo.test.module.js","sourceRoot":"","sources":["../../../src/tests/echo/echo.test.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AAExC,+CAA+C;AAGxC,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAD1B,IAAA,eAAM,EAAC,EAAE,WAAW,EAAE,CAAC,4BAAc,CAAC,EAAE,CAAC;GAC7B,cAAc,CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception.controller.d.ts","sourceRoot":"","sources":["../../../../src/tests/exception/controllers/exception.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exception.controller.d.ts","sourceRoot":"","sources":["../../../../src/tests/exception/controllers/exception.controller.ts"],"names":[],"mappings":"AAeA,qBAEa,mBAAmB;IAGlB,WAAW,IACrB,OAAO,CAAC,KAAK,CAAC;CAGjB"}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExceptionController = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const validation_1 = require("@hg-ts/validation");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
6
8
|
const decorators_1 = require("../../../decorators");
|
|
7
9
|
const services_1 = require("../../../services");
|
|
8
10
|
const exceptions_1 = require("../exceptions");
|
|
@@ -15,15 +17,13 @@ let ExceptionController = class ExceptionController {
|
|
|
15
17
|
exports.ExceptionController = ExceptionController;
|
|
16
18
|
tslib_1.__decorate([
|
|
17
19
|
decorators_1.Http.ExceptionStatus(exceptions_1.MockNotFoundException, 404),
|
|
18
|
-
|
|
20
|
+
(0, common_1.Get)('/404'),
|
|
19
21
|
tslib_1.__metadata("design:type", Function),
|
|
20
22
|
tslib_1.__metadata("design:paramtypes", []),
|
|
21
23
|
tslib_1.__metadata("design:returntype", Promise)
|
|
22
24
|
], ExceptionController.prototype, "getNotFound", null);
|
|
23
25
|
exports.ExceptionController = ExceptionController = tslib_1.__decorate([
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
tags: 'Exception',
|
|
27
|
-
})
|
|
26
|
+
(0, swagger_1.ApiTags)('Exception'),
|
|
27
|
+
(0, common_1.Controller)('/exception')
|
|
28
28
|
], ExceptionController);
|
|
29
29
|
//# sourceMappingURL=exception.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception.controller.js","sourceRoot":"","sources":["../../../../src/tests/exception/controllers/exception.controller.ts"],"names":[],"mappings":";;;;AAAA,kDAAwD;
|
|
1
|
+
{"version":3,"file":"exception.controller.js","sourceRoot":"","sources":["../../../../src/tests/exception/controllers/exception.controller.ts"],"names":[],"mappings":";;;;AAAA,kDAAwD;AAExD,2CAGwB;AACxB,6CAA0C;AAE1C,oDAA2C;AAC3C,gDAAqD;AACrD,8CAAsD;AAEtD,2BAAgB,CAAC,cAAc,CAAC,kCAAqB,EAAE,gCAAmB,CAAC,OAAO,EAAE,CAAC,CAAC;AAK/E,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGlB,AAAN,KAAK,CAAC,WAAW;QAEvB,MAAM,IAAI,kCAAqB,EAAE,CAAC;IACnC,CAAC;CACD,CAAA;AAPY,kDAAmB;AAGlB;IAFZ,iBAAI,CAAC,eAAe,CAAC,kCAAqB,EAAE,GAAG,CAAC;IAChD,IAAA,YAAG,EAAC,MAAM,CAAC;;;;sDAIX;8BANW,mBAAmB;IAF/B,IAAA,iBAAO,EAAC,WAAW,CAAC;IACpB,IAAA,mBAAU,EAAC,YAAY,CAAC;GACZ,mBAAmB,CAO/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception.test.module.d.ts","sourceRoot":"","sources":["../../../src/tests/exception/exception.test.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exception.test.module.d.ts","sourceRoot":"","sources":["../../../src/tests/exception/exception.test.module.ts"],"names":[],"mappings":"AAIA,qBACa,mBAAmB;CAAG"}
|
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExceptionTestModule = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const http_controller_module_1 = require("../../http-controller.module");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
7
6
|
const controllers_1 = require("./controllers");
|
|
8
7
|
let ExceptionTestModule = class ExceptionTestModule {
|
|
9
8
|
};
|
|
10
9
|
exports.ExceptionTestModule = ExceptionTestModule;
|
|
11
10
|
exports.ExceptionTestModule = ExceptionTestModule = tslib_1.__decorate([
|
|
12
|
-
(0,
|
|
13
|
-
imports: [http_controller_module_1.HttpControllerModule],
|
|
14
|
-
controllers: [controllers_1.ExceptionController],
|
|
15
|
-
})
|
|
11
|
+
(0, common_1.Module)({ controllers: [controllers_1.ExceptionController] })
|
|
16
12
|
], ExceptionTestModule);
|
|
17
13
|
//# sourceMappingURL=exception.test.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception.test.module.js","sourceRoot":"","sources":["../../../src/tests/exception/exception.test.module.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"exception.test.module.js","sourceRoot":"","sources":["../../../src/tests/exception/exception.test.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AAExC,+CAAoD;AAG7C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,eAAM,EAAC,EAAE,WAAW,EAAE,CAAC,iCAAmB,CAAC,EAAE,CAAC;GAClC,mBAAmB,CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-response.controller.d.ts","sourceRoot":"","sources":["../../../../src/tests/http-methods/controllers/empty-response.controller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty-response.controller.d.ts","sourceRoot":"","sources":["../../../../src/tests/http-methods/controllers/empty-response.controller.ts"],"names":[],"mappings":"AAeA,qBAEa,uBAAuB;IAEtB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAK/B,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAKhC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAK/B,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKjC,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKnC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5C"}
|
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EmptyResponseController = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const tests_1 = require("@hg-ts/tests");
|
|
6
|
-
const
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
8
|
let EmptyResponseController = class EmptyResponseController {
|
|
8
9
|
async getEmptyReturn() {
|
|
9
10
|
(0, tests_1.expect)(true).toBe(true);
|
|
@@ -32,60 +33,56 @@ let EmptyResponseController = class EmptyResponseController {
|
|
|
32
33
|
};
|
|
33
34
|
exports.EmptyResponseController = EmptyResponseController;
|
|
34
35
|
tslib_1.__decorate([
|
|
35
|
-
|
|
36
|
+
(0, common_1.Get)(),
|
|
36
37
|
tslib_1.__metadata("design:type", Function),
|
|
37
38
|
tslib_1.__metadata("design:paramtypes", []),
|
|
38
39
|
tslib_1.__metadata("design:returntype", Promise)
|
|
39
40
|
], EmptyResponseController.prototype, "getEmptyReturn", null);
|
|
40
41
|
tslib_1.__decorate([
|
|
41
|
-
|
|
42
|
+
(0, common_1.Post)(),
|
|
42
43
|
tslib_1.__metadata("design:type", Function),
|
|
43
44
|
tslib_1.__metadata("design:paramtypes", []),
|
|
44
45
|
tslib_1.__metadata("design:returntype", Promise)
|
|
45
46
|
], EmptyResponseController.prototype, "postEmptyReturn", null);
|
|
46
47
|
tslib_1.__decorate([
|
|
47
|
-
|
|
48
|
+
(0, common_1.Put)(),
|
|
48
49
|
tslib_1.__metadata("design:type", Function),
|
|
49
50
|
tslib_1.__metadata("design:paramtypes", []),
|
|
50
51
|
tslib_1.__metadata("design:returntype", Promise)
|
|
51
52
|
], EmptyResponseController.prototype, "putEmptyReturn", null);
|
|
52
53
|
tslib_1.__decorate([
|
|
53
|
-
|
|
54
|
+
(0, common_1.Patch)(),
|
|
54
55
|
tslib_1.__metadata("design:type", Function),
|
|
55
56
|
tslib_1.__metadata("design:paramtypes", []),
|
|
56
57
|
tslib_1.__metadata("design:returntype", Promise)
|
|
57
58
|
], EmptyResponseController.prototype, "patchEmptyReturn", null);
|
|
58
59
|
tslib_1.__decorate([
|
|
59
|
-
|
|
60
|
+
(0, common_1.Options)(),
|
|
60
61
|
tslib_1.__metadata("design:type", Function),
|
|
61
62
|
tslib_1.__metadata("design:paramtypes", []),
|
|
62
63
|
tslib_1.__metadata("design:returntype", Promise)
|
|
63
64
|
], EmptyResponseController.prototype, "optionsEmptyReturn", null);
|
|
64
65
|
tslib_1.__decorate([
|
|
65
|
-
|
|
66
|
+
(0, common_1.Delete)(),
|
|
66
67
|
tslib_1.__metadata("design:type", Function),
|
|
67
68
|
tslib_1.__metadata("design:paramtypes", []),
|
|
68
69
|
tslib_1.__metadata("design:returntype", Promise)
|
|
69
70
|
], EmptyResponseController.prototype, "deleteEmptyReturn", null);
|
|
70
71
|
tslib_1.__decorate([
|
|
71
|
-
|
|
72
|
+
(0, common_1.Search)(),
|
|
72
73
|
tslib_1.__metadata("design:type", Function),
|
|
73
74
|
tslib_1.__metadata("design:paramtypes", []),
|
|
74
75
|
tslib_1.__metadata("design:returntype", Promise)
|
|
75
76
|
], EmptyResponseController.prototype, "searchEmptyReturn", null);
|
|
76
77
|
tslib_1.__decorate([
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
tags: 'Empty Response All',
|
|
80
|
-
}),
|
|
78
|
+
(0, swagger_1.ApiTags)('Empty Response All'),
|
|
79
|
+
(0, common_1.All)('/all'),
|
|
81
80
|
tslib_1.__metadata("design:type", Function),
|
|
82
81
|
tslib_1.__metadata("design:paramtypes", []),
|
|
83
82
|
tslib_1.__metadata("design:returntype", Promise)
|
|
84
83
|
], EmptyResponseController.prototype, "allEmptyReturn", null);
|
|
85
84
|
exports.EmptyResponseController = EmptyResponseController = tslib_1.__decorate([
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
tags: 'Empty Response',
|
|
89
|
-
})
|
|
85
|
+
(0, swagger_1.ApiTags)('Empty Response'),
|
|
86
|
+
(0, common_1.Controller)('/empty-response')
|
|
90
87
|
], EmptyResponseController);
|
|
91
88
|
//# sourceMappingURL=empty-response.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-response.controller.js","sourceRoot":"","sources":["../../../../src/tests/http-methods/controllers/empty-response.controller.ts"],"names":[],"mappings":";;;;AAAA,wCAAsC;AAEtC,
|
|
1
|
+
{"version":3,"file":"empty-response.controller.js","sourceRoot":"","sources":["../../../../src/tests/http-methods/controllers/empty-response.controller.ts"],"names":[],"mappings":";;;;AAAA,wCAAsC;AAEtC,2CAUwB;AACxB,6CAA0C;AAInC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAEtB,AAAN,KAAK,CAAC,cAAc;QAC1B,IAAA,cAAM,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAGY,AAAN,KAAK,CAAC,eAAe;QAC3B,IAAA,cAAM,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAGY,AAAN,KAAK,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 @@
|
|
|
1
|
-
{"version":3,"file":"http-methods.test.module.d.ts","sourceRoot":"","sources":["../../../src/tests/http-methods/http-methods.test.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-methods.test.module.d.ts","sourceRoot":"","sources":["../../../src/tests/http-methods/http-methods.test.module.ts"],"names":[],"mappings":"AAIA,qBACa,qBAAqB;CAAG"}
|
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HttpMethodsTestModule = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const http_controller_module_1 = require("../../http-controller.module");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
7
6
|
const controllers_1 = require("./controllers");
|
|
8
7
|
let HttpMethodsTestModule = class HttpMethodsTestModule {
|
|
9
8
|
};
|
|
10
9
|
exports.HttpMethodsTestModule = HttpMethodsTestModule;
|
|
11
10
|
exports.HttpMethodsTestModule = HttpMethodsTestModule = tslib_1.__decorate([
|
|
12
|
-
(0,
|
|
13
|
-
imports: [http_controller_module_1.HttpControllerModule],
|
|
14
|
-
controllers: [controllers_1.EmptyResponseController],
|
|
15
|
-
})
|
|
11
|
+
(0, common_1.Module)({ controllers: [controllers_1.EmptyResponseController] })
|
|
16
12
|
], HttpMethodsTestModule);
|
|
17
13
|
//# sourceMappingURL=http-methods.test.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-methods.test.module.js","sourceRoot":"","sources":["../../../src/tests/http-methods/http-methods.test.module.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"http-methods.test.module.js","sourceRoot":"","sources":["../../../src/tests/http-methods/http-methods.test.module.ts"],"names":[],"mappings":";;;;AAAA,2CAAwC;AAExC,+CAAwD;AAGjD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAAG,CAAA;AAAxB,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,eAAM,EAAC,EAAE,WAAW,EAAE,CAAC,qCAAuB,CAAC,EAAE,CAAC;GACtC,qBAAqB,CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hg-ts/http-controller",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js"
|
|
@@ -17,16 +17,20 @@
|
|
|
17
17
|
"test:dev": "yarn build:dev --onSuccess \"yarn test\""
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@hg-ts-config/typescript": "0.1
|
|
21
|
-
"@hg-ts/exception": "0.1
|
|
22
|
-
"@hg-ts/
|
|
23
|
-
"@hg-ts/
|
|
24
|
-
"@hg-ts/
|
|
25
|
-
"@hg-ts/
|
|
26
|
-
"@hg-ts/tests": "0.1
|
|
27
|
-
"@hg-ts/types": "0.1
|
|
28
|
-
"@hg-ts/validation": "0.1
|
|
20
|
+
"@hg-ts-config/typescript": "0.2.1",
|
|
21
|
+
"@hg-ts/exception": "0.2.1",
|
|
22
|
+
"@hg-ts/execution-mode": "0.2.1",
|
|
23
|
+
"@hg-ts/knex": "0.2.1",
|
|
24
|
+
"@hg-ts/linter": "0.2.1",
|
|
25
|
+
"@hg-ts/logger": "0.2.1",
|
|
26
|
+
"@hg-ts/tests": "0.2.1",
|
|
27
|
+
"@hg-ts/types": "0.2.1",
|
|
28
|
+
"@hg-ts/validation": "0.2.1",
|
|
29
|
+
"@nestjs/common": "11.1.0",
|
|
30
|
+
"@nestjs/core": "11.1.0",
|
|
29
31
|
"@nestjs/platform-fastify": "11.1.0",
|
|
32
|
+
"@nestjs/swagger": "11.1.0",
|
|
33
|
+
"@nestjs/testing": "11.1.0",
|
|
30
34
|
"@types/node": "22.10.6",
|
|
31
35
|
"axios": "1.9.0",
|
|
32
36
|
"eslint": "9.18.0",
|
|
@@ -40,19 +44,19 @@
|
|
|
40
44
|
"typescript": "5.7.3"
|
|
41
45
|
},
|
|
42
46
|
"peerDependencies": {
|
|
43
|
-
"@hg-ts/exception": "0.1
|
|
44
|
-
"@hg-ts/
|
|
45
|
-
"@hg-ts/
|
|
46
|
-
"@hg-ts/
|
|
47
|
-
"@hg-ts/validation": "0.1
|
|
47
|
+
"@hg-ts/exception": "0.2.1",
|
|
48
|
+
"@hg-ts/execution-mode": "0.2.1",
|
|
49
|
+
"@hg-ts/knex": "0.2.1",
|
|
50
|
+
"@hg-ts/logger": "0.2.1",
|
|
51
|
+
"@hg-ts/validation": "0.2.1",
|
|
52
|
+
"@nestjs/common": "11.1.0",
|
|
53
|
+
"@nestjs/core": "11.1.0",
|
|
54
|
+
"@nestjs/swagger": "11.1.0",
|
|
48
55
|
"reflect-metadata": "*",
|
|
49
56
|
"rxjs": "*",
|
|
50
57
|
"tslib": "*"
|
|
51
58
|
},
|
|
52
59
|
"dependencies": {
|
|
53
|
-
"@nestjs/common": "11.1.0",
|
|
54
|
-
"@nestjs/core": "11.1.0",
|
|
55
|
-
"@nestjs/swagger": "11.1.0",
|
|
56
60
|
"fastify-swagger": "5.2.0"
|
|
57
61
|
}
|
|
58
62
|
}
|
package/dist/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":""}
|
package/dist/constants.js
DELETED
package/dist/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"echo-get-field.query.d.ts","sourceRoot":"","sources":["../../../../../src/tests/echo/controllers/dto/echo-get-field.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,eAAO,MAAM,kBAAkB,aAAoB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.echoGetQuerySchema = void 0;
|
|
4
|
-
const validation_1 = require("@hg-ts/validation");
|
|
5
|
-
exports.echoGetQuerySchema = validation_1.z.coerce.number();
|
|
6
|
-
//# sourceMappingURL=echo-get-field.query.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"echo-get-field.query.js","sourceRoot":"","sources":["../../../../../src/tests/echo/controllers/dto/echo-get-field.query.ts"],"names":[],"mappings":";;;AAAA,kDAAsC;AAEzB,QAAA,kBAAkB,GAAG,cAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC"}
|