1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | class ApplicationConfig {
|
4 | constructor(ioAdapter = null) {
|
5 | this.ioAdapter = ioAdapter;
|
6 | this.globalPrefix = '';
|
7 | this.globalPipes = [];
|
8 | this.globalFilters = [];
|
9 | this.globalInterceptors = [];
|
10 | this.globalGuards = [];
|
11 | this.globalRequestPipes = [];
|
12 | this.globalRequestFilters = [];
|
13 | this.globalRequestInterceptors = [];
|
14 | this.globalRequestGuards = [];
|
15 | }
|
16 | setGlobalPrefix(prefix) {
|
17 | this.globalPrefix = prefix;
|
18 | }
|
19 | getGlobalPrefix() {
|
20 | return this.globalPrefix;
|
21 | }
|
22 | setIoAdapter(ioAdapter) {
|
23 | this.ioAdapter = ioAdapter;
|
24 | }
|
25 | getIoAdapter() {
|
26 | return this.ioAdapter;
|
27 | }
|
28 | addGlobalPipe(pipe) {
|
29 | this.globalPipes.push(pipe);
|
30 | }
|
31 | useGlobalPipes(...pipes) {
|
32 | this.globalPipes = this.globalPipes.concat(pipes);
|
33 | }
|
34 | getGlobalFilters() {
|
35 | return this.globalFilters;
|
36 | }
|
37 | addGlobalFilter(filter) {
|
38 | this.globalFilters.push(filter);
|
39 | }
|
40 | useGlobalFilters(...filters) {
|
41 | this.globalFilters = this.globalFilters.concat(filters);
|
42 | }
|
43 | getGlobalPipes() {
|
44 | return this.globalPipes;
|
45 | }
|
46 | getGlobalInterceptors() {
|
47 | return this.globalInterceptors;
|
48 | }
|
49 | addGlobalInterceptor(interceptor) {
|
50 | this.globalInterceptors.push(interceptor);
|
51 | }
|
52 | useGlobalInterceptors(...interceptors) {
|
53 | this.globalInterceptors = this.globalInterceptors.concat(interceptors);
|
54 | }
|
55 | getGlobalGuards() {
|
56 | return this.globalGuards;
|
57 | }
|
58 | addGlobalGuard(guard) {
|
59 | this.globalGuards.push(guard);
|
60 | }
|
61 | useGlobalGuards(...guards) {
|
62 | this.globalGuards = this.globalGuards.concat(guards);
|
63 | }
|
64 | addGlobalRequestInterceptor(wrapper) {
|
65 | this.globalRequestInterceptors.push(wrapper);
|
66 | }
|
67 | getGlobalRequestInterceptors() {
|
68 | return this.globalRequestInterceptors;
|
69 | }
|
70 | addGlobalRequestPipe(wrapper) {
|
71 | this.globalRequestPipes.push(wrapper);
|
72 | }
|
73 | getGlobalRequestPipes() {
|
74 | return this.globalRequestPipes;
|
75 | }
|
76 | addGlobalRequestFilter(wrapper) {
|
77 | this.globalRequestFilters.push(wrapper);
|
78 | }
|
79 | getGlobalRequestFilters() {
|
80 | return this.globalRequestFilters;
|
81 | }
|
82 | addGlobalRequestGuard(wrapper) {
|
83 | this.globalRequestGuards.push(wrapper);
|
84 | }
|
85 | getGlobalRequestGuards() {
|
86 | return this.globalRequestGuards;
|
87 | }
|
88 | }
|
89 | exports.ApplicationConfig = ApplicationConfig;
|