@domain.js/main 0.7.13 → 0.7.15
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.
|
@@ -9,6 +9,7 @@ export declare function Main(cnf: {}, deps: Deps): {
|
|
|
9
9
|
runnerAsync: <F_1 extends (...args: any[]) => Promise<any>>(fn: F_1) => (...args: Parameters<F_1>) => Promise<any>;
|
|
10
10
|
enabled: () => boolean;
|
|
11
11
|
exit: (listenner: Function) => void;
|
|
12
|
+
exitHandle: () => Promise<void>;
|
|
12
13
|
};
|
|
13
14
|
export declare const Deps: string[];
|
|
14
15
|
export {};
|
package/dist/http/utils.js
CHANGED
|
@@ -76,6 +76,7 @@ function Utils(cnf) {
|
|
|
76
76
|
* 构造profile参数
|
|
77
77
|
*/
|
|
78
78
|
makeProfile(req, method, customFn) {
|
|
79
|
+
var _a;
|
|
79
80
|
const obj = {
|
|
80
81
|
verb: req.method,
|
|
81
82
|
clientIp: utils.clientIp(req),
|
|
@@ -86,7 +87,8 @@ function Utils(cnf) {
|
|
|
86
87
|
requestId: req.id(),
|
|
87
88
|
method,
|
|
88
89
|
type: "user",
|
|
89
|
-
needStream: req.headers["response-event-stream"] === "yes"
|
|
90
|
+
needStream: req.headers["response-event-stream"] === "yes" ||
|
|
91
|
+
((_a = req.headers["accept"]) === null || _a === void 0 ? void 0 : _a.includes("text/event-stream")),
|
|
90
92
|
extra: {},
|
|
91
93
|
};
|
|
92
94
|
if (req.headers["x-auth-user-type"]) {
|