1
1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
3
3
exports [` HttpInterfaceVisitor > should handle array return type 1` ] = `
4
- "import { HttpInterface , GetExchange } from '@r2don/nest-http-interface';
4
+ "\\ "use strict\\ ";
5
+ Object.defineProperty(exports, \\ "__esModule\\ ", { value : true } );
6
+ const eager_module_1 = require(\\ "@r2don/nest-http-interface\\ ");
7
+ const nest_http_interface_1 = require(\\ "@r2don/nest-http-interface\\ ");
5
8
class ResponseClass {
6
9
}
7
10
let UserService = class UserService {
@@ -16,25 +19,27 @@ let UserService = class UserService {
16
19
}
17
20
} ;
18
21
__decorate([
19
- GetExchange(),
20
- ResponseBody(ResponseClass)
22
+ (0, nest_http_interface_1. GetExchange) (),
23
+ eager_module_1. ResponseBody(ResponseClass)
21
24
], UserService.prototype, \\ "getUsers\\ ", null);
22
25
__decorate([
23
- GetExchange(),
24
- ResponseBody(ResponseClass)
26
+ (0, nest_http_interface_1. GetExchange) (),
27
+ eager_module_1. ResponseBody(ResponseClass)
25
28
], UserService.prototype, \\ "getUserList\\ ", null);
26
29
__decorate([
27
- GetExchange(),
28
- ResponseBody(ResponseClass)
30
+ (0, nest_http_interface_1. GetExchange) (),
31
+ eager_module_1. ResponseBody(ResponseClass)
29
32
], UserService.prototype, \\ "getUsersReadonly\\ ", null);
30
33
UserService = __decorate([
31
- HttpInterface()
34
+ (0, nest_http_interface_1. HttpInterface) ()
32
35
], UserService);
33
36
"
34
37
` ;
35
38
36
39
exports [` HttpInterfaceVisitor > should ignore if file name is not match 1` ] = `
37
- "import { HttpInterface , GraphQLExchange } from '@r2don/nest-http-interface';
40
+ "\\ "use strict\\ ";
41
+ Object.defineProperty(exports, \\ "__esModule\\ ", { value : true } );
42
+ const nest_http_interface_1 = require(\\ "@r2don/nest-http-interface\\ ");
38
43
class ResponseClass {
39
44
}
40
45
let UserService = class UserService {
@@ -43,67 +48,76 @@ let UserService = class UserService {
43
48
}
44
49
} ;
45
50
__decorate([
46
- GraphQLExchange()
51
+ (0, nest_http_interface_1. GraphQLExchange) ()
47
52
], UserService.prototype, \\ "getUser\\ ", null);
48
53
UserService = __decorate([
49
- HttpInterface()
54
+ (0, nest_http_interface_1. HttpInterface) ()
50
55
], UserService);
51
56
"
52
57
` ;
53
58
54
59
exports [` HttpInterfaceVisitor > should ignore if method has ResponseBody decorator 1` ] = `
55
- "import { HttpInterface , PostExchange , ResponseBody } from '@r2don/nest-http-interface';
56
- import { User } from './user.entity';
60
+ "\\ "use strict\\ ";
61
+ Object.defineProperty(exports, \\ "__esModule\\ ", { value : true } );
62
+ const nest_http_interface_1 = require(\\ "@r2don/nest-http-interface\\ ");
63
+ const user_entity_1 = require(\\ "./user.entity\\ ");
57
64
let UserService = class UserService {
58
65
async getUser () {
59
66
throw new Error('not implemented ');
60
67
}
61
68
} ;
62
69
__decorate([
63
- PostExchange(),
64
- ResponseBody( User)
70
+ (0, nest_http_interface_1. PostExchange) (),
71
+ (0, nest_http_interface_1. ResponseBody)(user_entity_1. User)
65
72
], UserService.prototype, \\ "getUser\\ ", null);
66
73
UserService = __decorate([
67
- HttpInterface()
74
+ (0, nest_http_interface_1. HttpInterface) ()
68
75
], UserService);
69
76
"
70
77
` ;
71
78
72
79
exports [` HttpInterfaceVisitor > should ignore if return type if not a promise 1` ] = `
73
- "import { HttpInterface , GetExchange } from '@r2don/nest-http-interface';
80
+ "\\ "use strict\\ ";
81
+ Object.defineProperty(exports, \\ "__esModule\\ ", { value : true } );
82
+ const nest_http_interface_1 = require(\\ "@r2don/nest-http-interface\\ ");
74
83
let UserService = class UserService {
75
84
getUser () {
76
85
throw new Error('not implemented ');
77
86
}
78
87
} ;
79
88
__decorate([
80
- GetExchange()
89
+ (0, nest_http_interface_1. GetExchange) ()
81
90
], UserService.prototype, \\ "getUser\\ ", null);
82
91
UserService = __decorate([
83
- HttpInterface()
92
+ (0, nest_http_interface_1. HttpInterface) ()
84
93
], UserService);
85
94
"
86
95
` ;
87
96
88
97
exports [` HttpInterfaceVisitor > should ignore if return type is not a class 1` ] = `
89
- "import { HttpInterface , GetExchange } from '@r2don/nest-http-interface';
98
+ "\\ "use strict\\ ";
99
+ Object.defineProperty(exports, \\ "__esModule\\ ", { value : true } );
100
+ const nest_http_interface_1 = require(\\ "@r2don/nest-http-interface\\ ");
90
101
let TextService = class TextService {
91
102
constructor () { }
92
103
async getText () {
93
104
return 'text';
94
105
}
95
106
} ;
96
107
__decorate([
97
- GetExchange()
108
+ (0, nest_http_interface_1. GetExchange) ()
98
109
], TextService.prototype, \\ "getText\\ ", null);
99
110
TextService = __decorate([
100
- HttpInterface()
111
+ (0, nest_http_interface_1. HttpInterface) ()
101
112
], TextService);
102
113
"
103
114
` ;
104
115
105
116
exports [` HttpInterfaceVisitor > should override plugin suffix option 1` ] = `
106
- "import { HttpInterface , GraphQLExchange } from '@r2don/nest-http-interface';
117
+ "\\ "use strict\\ ";
118
+ Object.defineProperty(exports, \\ "__esModule\\ ", { value : true } );
119
+ const eager_module_1 = require(\\ "@r2don/nest-http-interface\\ ");
120
+ const nest_http_interface_1 = require(\\ "@r2don/nest-http-interface\\ ");
107
121
class ResponseClass {
108
122
}
109
123
let UserService = class UserService {
@@ -112,11 +126,11 @@ let UserService = class UserService {
112
126
}
113
127
} ;
114
128
__decorate([
115
- GraphQLExchange(),
116
- ResponseBody(ResponseClass)
129
+ (0, nest_http_interface_1. GraphQLExchange) (),
130
+ eager_module_1. ResponseBody(ResponseClass)
117
131
], UserService.prototype, \\ "getUser\\ ", null);
118
132
UserService = __decorate([
119
- HttpInterface()
133
+ (0, nest_http_interface_1. HttpInterface) ()
120
134
], UserService);
121
135
"
122
136
` ;
0 commit comments