ultimate-express 2.0.6 → 2.0.8
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/package.json +1 -1
- package/src/index.js +11 -0
- package/src/types.d.ts +4 -4
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -52,3 +52,14 @@ Application.text = middlewares.text;
|
|
|
52
52
|
Application.raw = middlewares.raw;
|
|
53
53
|
|
|
54
54
|
module.exports = Application;
|
|
55
|
+
|
|
56
|
+
// re-export some named exports for compatibility
|
|
57
|
+
exports.application = Application;
|
|
58
|
+
exports.request = Request.prototype;
|
|
59
|
+
exports.response = Response.prototype;
|
|
60
|
+
exports.Router = Router;
|
|
61
|
+
exports.json = middlewares.json;
|
|
62
|
+
exports.raw = middlewares.raw;
|
|
63
|
+
exports.static = middlewares.static;
|
|
64
|
+
exports.text = middlewares.text;
|
|
65
|
+
exports.urlencoded = middlewares.urlencoded;
|
package/src/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare module "ultimate-express" {
|
|
2
2
|
import e from "@types/express";
|
|
3
|
-
import
|
|
3
|
+
import uWS from "uWebSockets.js";
|
|
4
4
|
|
|
5
5
|
type Settings = {
|
|
6
|
-
uwsOptions?: AppOptions;
|
|
6
|
+
uwsOptions?: uWS.AppOptions;
|
|
7
7
|
threads?: number;
|
|
8
8
|
http3?: boolean;
|
|
9
|
-
uwsApp?:
|
|
9
|
+
uwsApp?: uWS.TemplatedApp;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
namespace express {
|
|
@@ -45,7 +45,7 @@ declare module "ultimate-express" {
|
|
|
45
45
|
export import Send = e.Send;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
function express(settings?: Settings): e.Express;
|
|
48
|
+
function express(settings?: Settings): e.Express & {readonly uwsApp: uWS.TemplatedApp};
|
|
49
49
|
|
|
50
50
|
export = express;
|
|
51
51
|
}
|