namirasoft-node 1.4.74 → 1.4.76
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/BaseController.d.ts +2 -8
- package/dist/BaseController.js +24 -25
- package/dist/BaseController.js.map +1 -1
- package/package.json +1 -1
- package/src/BaseController.ts +35 -34
package/dist/BaseController.d.ts
CHANGED
|
@@ -10,14 +10,8 @@ export declare abstract class BaseController<D extends {
|
|
|
10
10
|
}, State, Props, Output> {
|
|
11
11
|
protected log: {
|
|
12
12
|
show: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onBefore: (() => Promise<void>)[];
|
|
16
|
-
};
|
|
17
|
-
end: {
|
|
18
|
-
show: boolean;
|
|
19
|
-
onBefore: (() => Promise<void>)[];
|
|
20
|
-
};
|
|
13
|
+
can: (() => Promise<boolean>)[];
|
|
14
|
+
onBefore: (() => Promise<void>)[];
|
|
21
15
|
};
|
|
22
16
|
app: BaseApplication<D>;
|
|
23
17
|
req: express.Request;
|
package/dist/BaseController.js
CHANGED
|
@@ -17,14 +17,8 @@ class BaseController {
|
|
|
17
17
|
constructor(app, req, res) {
|
|
18
18
|
this.log = {
|
|
19
19
|
show: true,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
onBefore: []
|
|
23
|
-
},
|
|
24
|
-
end: {
|
|
25
|
-
show: false,
|
|
26
|
-
onBefore: []
|
|
27
|
-
}
|
|
20
|
+
can: [],
|
|
21
|
+
onBefore: []
|
|
28
22
|
};
|
|
29
23
|
this.validate_query = true;
|
|
30
24
|
this.bodyAs = {
|
|
@@ -58,15 +52,17 @@ class BaseController {
|
|
|
58
52
|
this.meta = new Meta_1.Meta(info, this.req);
|
|
59
53
|
this.output = null;
|
|
60
54
|
this.result = null;
|
|
55
|
+
let showLog = (log) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
if (this.log.show)
|
|
57
|
+
if (!this.log.can.some((x) => !x())) {
|
|
58
|
+
for (let i = 0; i < this.log.onBefore.length; i++)
|
|
59
|
+
yield this.log.onBefore[i]();
|
|
60
|
+
log();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
let failed = false;
|
|
61
64
|
try {
|
|
62
65
|
this.meta.onStart();
|
|
63
|
-
if (this.log.show)
|
|
64
|
-
if (this.log.beginning.show)
|
|
65
|
-
if (!this.meta.url.endsWith("/healthz")) {
|
|
66
|
-
for (let i = 0; i < this.log.beginning.onBefore.length; i++)
|
|
67
|
-
yield this.log.beginning.onBefore[i]();
|
|
68
|
-
this.app.logger.info(this.meta);
|
|
69
|
-
}
|
|
70
66
|
let accpet = new namirasoft_core_1.ObjectService(this.req.headers.accept).getString("");
|
|
71
67
|
let isJson = accpet.includes("application/json") || accpet.includes("*/*");
|
|
72
68
|
let isSchema = accpet.includes("application/schema");
|
|
@@ -102,6 +98,7 @@ class BaseController {
|
|
|
102
98
|
namirasoft_core_1.ErrorOperation.throwHTTP(400, "Invalid accept: " + accpet);
|
|
103
99
|
}
|
|
104
100
|
catch (error) {
|
|
101
|
+
failed = true;
|
|
105
102
|
let message;
|
|
106
103
|
if (error instanceof Error) {
|
|
107
104
|
this.meta.error = error;
|
|
@@ -111,12 +108,17 @@ class BaseController {
|
|
|
111
108
|
message = error + "";
|
|
112
109
|
if (error instanceof namirasoft_core_1.HTTPError) {
|
|
113
110
|
this.meta.code = error.code;
|
|
114
|
-
|
|
111
|
+
yield showLog(() => {
|
|
112
|
+
this.app.logger.error(error.message, error.stack, JSON.stringify(this.meta, undefined, 4));
|
|
113
|
+
});
|
|
115
114
|
}
|
|
116
115
|
else {
|
|
117
116
|
this.meta.code = 500;
|
|
118
|
-
if (error instanceof Error)
|
|
119
|
-
|
|
117
|
+
if (error instanceof Error) {
|
|
118
|
+
yield showLog(() => {
|
|
119
|
+
this.app.logger.critical(error.message, error.stack, JSON.stringify(this.meta, undefined, 4));
|
|
120
|
+
});
|
|
121
|
+
}
|
|
120
122
|
}
|
|
121
123
|
this.meta.message = message;
|
|
122
124
|
if (error instanceof namirasoft_core_1.HTTPError)
|
|
@@ -131,13 +133,10 @@ class BaseController {
|
|
|
131
133
|
this.result = this.output;
|
|
132
134
|
}
|
|
133
135
|
this.meta.onFinish();
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
yield this.log.end.onBefore[i]();
|
|
139
|
-
this.app.logger.info(this.meta);
|
|
140
|
-
}
|
|
136
|
+
if (!failed)
|
|
137
|
+
yield showLog(() => {
|
|
138
|
+
this.app.logger.info(JSON.stringify(this.meta, undefined, 4));
|
|
139
|
+
});
|
|
141
140
|
if (this.meta.redirect_location)
|
|
142
141
|
return this.res.redirect(this.meta.code, this.meta.redirect_location);
|
|
143
142
|
return this.res.status(this.meta.code).send(this.result);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseController.js","sourceRoot":"","sources":["../src/BaseController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,iCAA8B;AAC9B,qDAAmG;AAEnG,yDAAuG;AAEvG,MAAsB,cAAc;
|
|
1
|
+
{"version":3,"file":"BaseController.js","sourceRoot":"","sources":["../src/BaseController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,iCAA8B;AAC9B,qDAAmG;AAEnG,yDAAuG;AAEvG,MAAsB,cAAc;IAoChC,YAAY,GAAuB,EAAE,GAAoB,EAAE,GAAqB;QAlCtE,QAAG,GAIT;YACI,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,EAAE;SACf,CAAC;QASI,mBAAc,GAAY,IAAI,CAAC;QAC/B,WAAM,GAGZ;YACI,IAAI,EAAE;gBACF,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,OAAO;aACjB;YACD,GAAG,EAAE;gBACD,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,kBAAkB;aAC3B;SACJ,CAAC;QACI,cAAS,GAAY,KAAK,CAAC;QAC9B,iBAAY,GAAY,IAA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abstract class BaseController<D extends { [name: string]: BaseDatabase },
|
|
|
10
10
|
{
|
|
11
11
|
protected log: {
|
|
12
12
|
show: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onBefore: (() => Promise<void>)[];
|
|
16
|
-
}
|
|
17
|
-
end: {
|
|
18
|
-
show: boolean;
|
|
19
|
-
onBefore: (() => Promise<void>)[];
|
|
20
|
-
}
|
|
13
|
+
can: (() => Promise<boolean>)[];
|
|
14
|
+
onBefore: (() => Promise<void>)[];
|
|
21
15
|
} = {
|
|
22
16
|
show: true,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onBefore: []
|
|
26
|
-
},
|
|
27
|
-
end: {
|
|
28
|
-
show: false,
|
|
29
|
-
onBefore: []
|
|
30
|
-
}
|
|
17
|
+
can: [],
|
|
18
|
+
onBefore: []
|
|
31
19
|
};
|
|
32
20
|
public app: BaseApplication<D>;
|
|
33
21
|
public req: express.Request;
|
|
@@ -87,18 +75,24 @@ export abstract class BaseController<D extends { [name: string]: BaseDatabase },
|
|
|
87
75
|
// output
|
|
88
76
|
this.output = null;
|
|
89
77
|
this.result = null;
|
|
78
|
+
|
|
79
|
+
let showLog = async (log: () => void) =>
|
|
80
|
+
{
|
|
81
|
+
if (this.log.show)
|
|
82
|
+
if (!this.log.can.some((x) => !x()))
|
|
83
|
+
{
|
|
84
|
+
for (let i = 0; i < this.log.onBefore.length; i++)
|
|
85
|
+
await this.log.onBefore[i]();
|
|
86
|
+
log();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let failed = false;
|
|
91
|
+
|
|
90
92
|
try
|
|
91
93
|
{
|
|
92
94
|
// meta
|
|
93
95
|
this.meta.onStart();
|
|
94
|
-
if (this.log.show)
|
|
95
|
-
if (this.log.beginning.show)
|
|
96
|
-
if (!this.meta.url.endsWith("/healthz"))
|
|
97
|
-
{
|
|
98
|
-
for (let i = 0; i < this.log.beginning.onBefore.length; i++)
|
|
99
|
-
await this.log.beginning.onBefore[i]();
|
|
100
|
-
this.app.logger.info(this.meta);
|
|
101
|
-
}
|
|
102
96
|
|
|
103
97
|
let accpet: string = new ObjectService(this.req.headers.accept).getString("");
|
|
104
98
|
let isJson = accpet.includes("application/json") || accpet.includes("*/*");
|
|
@@ -149,6 +143,7 @@ export abstract class BaseController<D extends { [name: string]: BaseDatabase },
|
|
|
149
143
|
ErrorOperation.throwHTTP(400, "Invalid accept: " + accpet);
|
|
150
144
|
} catch (error)
|
|
151
145
|
{
|
|
146
|
+
failed = true;
|
|
152
147
|
let message: string;
|
|
153
148
|
if (error instanceof Error)
|
|
154
149
|
{
|
|
@@ -161,13 +156,21 @@ export abstract class BaseController<D extends { [name: string]: BaseDatabase },
|
|
|
161
156
|
if (error instanceof HTTPError)
|
|
162
157
|
{
|
|
163
158
|
this.meta.code = error.code;
|
|
164
|
-
|
|
159
|
+
await showLog(() =>
|
|
160
|
+
{
|
|
161
|
+
this.app.logger.error(error.message, error.stack, JSON.stringify(this.meta, undefined, 4));
|
|
162
|
+
});
|
|
165
163
|
}
|
|
166
164
|
else
|
|
167
165
|
{
|
|
168
166
|
this.meta.code = 500;
|
|
169
167
|
if (error instanceof Error)
|
|
170
|
-
|
|
168
|
+
{
|
|
169
|
+
await showLog(() =>
|
|
170
|
+
{
|
|
171
|
+
this.app.logger.critical(error.message, error.stack, JSON.stringify(this.meta, undefined, 4));
|
|
172
|
+
});
|
|
173
|
+
}
|
|
171
174
|
}
|
|
172
175
|
this.meta.message = message;
|
|
173
176
|
if (error instanceof HTTPError)
|
|
@@ -186,14 +189,12 @@ export abstract class BaseController<D extends { [name: string]: BaseDatabase },
|
|
|
186
189
|
|
|
187
190
|
// finish
|
|
188
191
|
this.meta.onFinish();
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
this.app.logger.info(this.meta);
|
|
196
|
-
}
|
|
192
|
+
|
|
193
|
+
if (!failed)
|
|
194
|
+
await showLog(() =>
|
|
195
|
+
{
|
|
196
|
+
this.app.logger.info(JSON.stringify(this.meta, undefined, 4));
|
|
197
|
+
});
|
|
197
198
|
|
|
198
199
|
if (this.meta.redirect_location)
|
|
199
200
|
return this.res.redirect(this.meta.code, this.meta.redirect_location);
|