typespeed 2.0.20 → 2.0.22

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.
Files changed (222) hide show
  1. package/README.md +18 -13
  2. package/dist/core.decorator.js +1 -30
  3. package/dist/default/default-authentication.class.js +25 -0
  4. package/dist/default/express-server.class.js +11 -4
  5. package/dist/default/log-default.class.js +0 -6
  6. package/dist/factory/authentication-factory.class.js +11 -0
  7. package/dist/factory/log-factory.class.js +9 -0
  8. package/dist/route.decorator.js +92 -2
  9. package/dist/scaffold/command.js +1 -1
  10. package/dist/typespeed.d.ts +25 -3
  11. package/dist/typespeed.js +3 -1
  12. package/package.json +10 -1
  13. package/src/core.decorator.ts +1 -29
  14. package/src/default/default-authentication.class.ts +10 -0
  15. package/src/default/express-server.class.ts +12 -5
  16. package/src/default/log-default.class.ts +0 -10
  17. package/src/factory/authentication-factory.class.ts +9 -0
  18. package/src/factory/log-factory.class.ts +9 -2
  19. package/src/route.decorator.ts +91 -3
  20. package/src/scaffold/command.ts +1 -1
  21. package/src/typespeed.d.ts +25 -3
  22. package/src/typespeed.ts +1 -0
  23. package/test/node_modules/.package-lock.json +65 -101
  24. package/test/node_modules/@types/body-parser/LICENSE +21 -0
  25. package/test/node_modules/@types/body-parser/README.md +16 -0
  26. package/test/node_modules/@types/body-parser/index.d.ts +107 -0
  27. package/test/node_modules/@types/body-parser/package.json +58 -0
  28. package/test/node_modules/@types/connect/LICENSE +21 -0
  29. package/test/node_modules/@types/connect/README.md +16 -0
  30. package/test/node_modules/@types/connect/index.d.ts +93 -0
  31. package/test/node_modules/@types/connect/package.json +32 -0
  32. package/test/node_modules/@types/express/LICENSE +21 -0
  33. package/test/node_modules/@types/express/README.md +16 -0
  34. package/test/node_modules/@types/express/index.d.ts +136 -0
  35. package/test/node_modules/@types/express/package.json +45 -0
  36. package/test/node_modules/@types/express-serve-static-core/LICENSE +21 -0
  37. package/test/node_modules/@types/express-serve-static-core/README.md +16 -0
  38. package/test/node_modules/@types/express-serve-static-core/index.d.ts +1281 -0
  39. package/test/node_modules/@types/express-serve-static-core/package.json +55 -0
  40. package/test/node_modules/@types/mime/LICENSE +21 -0
  41. package/test/node_modules/@types/mime/Mime.d.ts +10 -0
  42. package/test/node_modules/@types/mime/README.md +16 -0
  43. package/test/node_modules/@types/mime/index.d.ts +35 -0
  44. package/test/node_modules/@types/mime/lite.d.ts +7 -0
  45. package/test/node_modules/@types/mime/package.json +29 -0
  46. package/test/node_modules/@types/qs/LICENSE +21 -0
  47. package/test/node_modules/@types/qs/README.md +16 -0
  48. package/test/node_modules/@types/qs/index.d.ts +62 -0
  49. package/test/node_modules/@types/qs/package.json +65 -0
  50. package/test/node_modules/@types/range-parser/LICENSE +21 -0
  51. package/test/node_modules/@types/range-parser/README.md +55 -0
  52. package/test/node_modules/@types/range-parser/index.d.ts +35 -0
  53. package/test/node_modules/@types/range-parser/package.json +25 -0
  54. package/test/node_modules/@types/send/LICENSE +21 -0
  55. package/test/node_modules/@types/send/README.md +16 -0
  56. package/test/node_modules/@types/send/index.d.ts +231 -0
  57. package/test/node_modules/@types/send/package.json +33 -0
  58. package/test/node_modules/@types/serve-static/LICENSE +21 -0
  59. package/test/node_modules/@types/serve-static/README.md +16 -0
  60. package/test/node_modules/@types/serve-static/index.d.ts +113 -0
  61. package/test/node_modules/@types/serve-static/package.json +38 -0
  62. package/test/src/config.json +5 -0
  63. package/test/src/custom-log.class.ts +6 -0
  64. package/test/src/jwt-authentication.class.ts +29 -0
  65. package/test/src/test-request.class.ts +36 -0
  66. package/test/node_modules/@acuminous/bitsyntax/.github/workflows/node-js-ci.yml +0 -17
  67. package/test/node_modules/@acuminous/bitsyntax/.github/workflows/node-js-publish.yml +0 -30
  68. package/test/node_modules/@acuminous/bitsyntax/LICENSE +0 -6
  69. package/test/node_modules/@acuminous/bitsyntax/LICENSE-MIT +0 -21
  70. package/test/node_modules/@acuminous/bitsyntax/Makefile +0 -15
  71. package/test/node_modules/@acuminous/bitsyntax/README.md +0 -308
  72. package/test/node_modules/@acuminous/bitsyntax/index.js +0 -10
  73. package/test/node_modules/@acuminous/bitsyntax/lib/compile.js +0 -303
  74. package/test/node_modules/@acuminous/bitsyntax/lib/constructor.js +0 -142
  75. package/test/node_modules/@acuminous/bitsyntax/lib/grammar.pegjs +0 -67
  76. package/test/node_modules/@acuminous/bitsyntax/lib/interp.js +0 -232
  77. package/test/node_modules/@acuminous/bitsyntax/lib/parse.js +0 -32
  78. package/test/node_modules/@acuminous/bitsyntax/lib/parser.js +0 -1173
  79. package/test/node_modules/@acuminous/bitsyntax/lib/pattern.js +0 -119
  80. package/test/node_modules/@acuminous/bitsyntax/package.json +0 -36
  81. package/test/node_modules/@acuminous/bitsyntax/test/consing.test.js +0 -50
  82. package/test/node_modules/@acuminous/bitsyntax/test/matching.test.js +0 -193
  83. package/test/node_modules/amqplib/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
  84. package/test/node_modules/amqplib/.github/workflows/test.yml +0 -38
  85. package/test/node_modules/amqplib/CHANGELOG.md +0 -430
  86. package/test/node_modules/amqplib/LICENSE +0 -6
  87. package/test/node_modules/amqplib/LICENSE-MIT +0 -21
  88. package/test/node_modules/amqplib/Makefile +0 -47
  89. package/test/node_modules/amqplib/README.md +0 -157
  90. package/test/node_modules/amqplib/bin/generate-defs.js +0 -722
  91. package/test/node_modules/amqplib/callback_api.js +0 -22
  92. package/test/node_modules/amqplib/channel_api.js +0 -16
  93. package/test/node_modules/amqplib/examples/headers.js +0 -42
  94. package/test/node_modules/amqplib/examples/receive_generator.js +0 -39
  95. package/test/node_modules/amqplib/examples/send_generators.js +0 -42
  96. package/test/node_modules/amqplib/examples/ssl.js +0 -64
  97. package/test/node_modules/amqplib/examples/tutorials/README.md +0 -93
  98. package/test/node_modules/amqplib/examples/tutorials/callback_api/emit_log.js +0 -28
  99. package/test/node_modules/amqplib/examples/tutorials/callback_api/emit_log_direct.js +0 -30
  100. package/test/node_modules/amqplib/examples/tutorials/callback_api/emit_log_topic.js +0 -27
  101. package/test/node_modules/amqplib/examples/tutorials/callback_api/new_task.js +0 -27
  102. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive.js +0 -30
  103. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive_logs.js +0 -36
  104. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive_logs_direct.js +0 -56
  105. package/test/node_modules/amqplib/examples/tutorials/callback_api/receive_logs_topic.js +0 -55
  106. package/test/node_modules/amqplib/examples/tutorials/callback_api/rpc_client.js +0 -49
  107. package/test/node_modules/amqplib/examples/tutorials/callback_api/rpc_server.js +0 -45
  108. package/test/node_modules/amqplib/examples/tutorials/callback_api/send.js +0 -29
  109. package/test/node_modules/amqplib/examples/tutorials/callback_api/worker.js +0 -35
  110. package/test/node_modules/amqplib/examples/tutorials/emit_log.js +0 -19
  111. package/test/node_modules/amqplib/examples/tutorials/emit_log_direct.js +0 -20
  112. package/test/node_modules/amqplib/examples/tutorials/emit_log_topic.js +0 -19
  113. package/test/node_modules/amqplib/examples/tutorials/new_task.js +0 -18
  114. package/test/node_modules/amqplib/examples/tutorials/package.json +0 -16
  115. package/test/node_modules/amqplib/examples/tutorials/receive.js +0 -21
  116. package/test/node_modules/amqplib/examples/tutorials/receive_logs.js +0 -28
  117. package/test/node_modules/amqplib/examples/tutorials/receive_logs_direct.js +0 -44
  118. package/test/node_modules/amqplib/examples/tutorials/receive_logs_topic.js +0 -43
  119. package/test/node_modules/amqplib/examples/tutorials/rpc_client.js +0 -52
  120. package/test/node_modules/amqplib/examples/tutorials/rpc_server.js +0 -39
  121. package/test/node_modules/amqplib/examples/tutorials/send.js +0 -23
  122. package/test/node_modules/amqplib/examples/tutorials/worker.js +0 -28
  123. package/test/node_modules/amqplib/examples/waitForConfirms.js +0 -22
  124. package/test/node_modules/amqplib/lib/api_args.js +0 -314
  125. package/test/node_modules/amqplib/lib/bitset.js +0 -130
  126. package/test/node_modules/amqplib/lib/callback_model.js +0 -327
  127. package/test/node_modules/amqplib/lib/channel.js +0 -499
  128. package/test/node_modules/amqplib/lib/channel_model.js +0 -302
  129. package/test/node_modules/amqplib/lib/codec.js +0 -321
  130. package/test/node_modules/amqplib/lib/connect.js +0 -189
  131. package/test/node_modules/amqplib/lib/connection.js +0 -663
  132. package/test/node_modules/amqplib/lib/credentials.js +0 -42
  133. package/test/node_modules/amqplib/lib/defs.js +0 -4966
  134. package/test/node_modules/amqplib/lib/error.js +0 -24
  135. package/test/node_modules/amqplib/lib/format.js +0 -40
  136. package/test/node_modules/amqplib/lib/frame.js +0 -113
  137. package/test/node_modules/amqplib/lib/heartbeat.js +0 -89
  138. package/test/node_modules/amqplib/lib/mux.js +0 -129
  139. package/test/node_modules/amqplib/package.json +0 -37
  140. package/test/node_modules/amqplib/test/bitset.js +0 -69
  141. package/test/node_modules/amqplib/test/callback_api.js +0 -312
  142. package/test/node_modules/amqplib/test/channel.js +0 -621
  143. package/test/node_modules/amqplib/test/channel_api.js +0 -596
  144. package/test/node_modules/amqplib/test/codec.js +0 -237
  145. package/test/node_modules/amqplib/test/connect.js +0 -197
  146. package/test/node_modules/amqplib/test/connection.js +0 -390
  147. package/test/node_modules/amqplib/test/data.js +0 -254
  148. package/test/node_modules/amqplib/test/frame.js +0 -198
  149. package/test/node_modules/amqplib/test/mux.js +0 -204
  150. package/test/node_modules/amqplib/test/util.js +0 -219
  151. package/test/node_modules/buffer-more-ints/.travis.yml +0 -6
  152. package/test/node_modules/buffer-more-ints/LICENSE +0 -19
  153. package/test/node_modules/buffer-more-ints/README.md +0 -69
  154. package/test/node_modules/buffer-more-ints/buffer-more-ints-tests.js +0 -183
  155. package/test/node_modules/buffer-more-ints/buffer-more-ints.js +0 -432
  156. package/test/node_modules/buffer-more-ints/package.json +0 -19
  157. package/test/node_modules/buffer-more-ints/polyfill.js +0 -71
  158. package/test/node_modules/core-util-is/LICENSE +0 -19
  159. package/test/node_modules/core-util-is/README.md +0 -3
  160. package/test/node_modules/core-util-is/lib/util.js +0 -107
  161. package/test/node_modules/core-util-is/package.json +0 -38
  162. package/test/node_modules/debug/LICENSE +0 -20
  163. package/test/node_modules/debug/README.md +0 -481
  164. package/test/node_modules/debug/package.json +0 -59
  165. package/test/node_modules/debug/src/browser.js +0 -269
  166. package/test/node_modules/debug/src/common.js +0 -274
  167. package/test/node_modules/debug/src/index.js +0 -10
  168. package/test/node_modules/debug/src/node.js +0 -263
  169. package/test/node_modules/inherits/LICENSE +0 -16
  170. package/test/node_modules/inherits/README.md +0 -42
  171. package/test/node_modules/inherits/inherits.js +0 -9
  172. package/test/node_modules/inherits/inherits_browser.js +0 -27
  173. package/test/node_modules/inherits/package.json +0 -29
  174. package/test/node_modules/isarray/README.md +0 -54
  175. package/test/node_modules/isarray/build/build.js +0 -209
  176. package/test/node_modules/isarray/component.json +0 -19
  177. package/test/node_modules/isarray/index.js +0 -3
  178. package/test/node_modules/isarray/package.json +0 -25
  179. package/test/node_modules/ms/index.js +0 -162
  180. package/test/node_modules/ms/license.md +0 -21
  181. package/test/node_modules/ms/package.json +0 -37
  182. package/test/node_modules/ms/readme.md +0 -60
  183. package/test/node_modules/querystringify/LICENSE +0 -22
  184. package/test/node_modules/querystringify/README.md +0 -61
  185. package/test/node_modules/querystringify/index.js +0 -118
  186. package/test/node_modules/querystringify/package.json +0 -38
  187. package/test/node_modules/readable-stream/LICENSE +0 -18
  188. package/test/node_modules/readable-stream/README.md +0 -15
  189. package/test/node_modules/readable-stream/duplex.js +0 -1
  190. package/test/node_modules/readable-stream/float.patch +0 -923
  191. package/test/node_modules/readable-stream/lib/_stream_duplex.js +0 -89
  192. package/test/node_modules/readable-stream/lib/_stream_passthrough.js +0 -46
  193. package/test/node_modules/readable-stream/lib/_stream_readable.js +0 -951
  194. package/test/node_modules/readable-stream/lib/_stream_transform.js +0 -209
  195. package/test/node_modules/readable-stream/lib/_stream_writable.js +0 -477
  196. package/test/node_modules/readable-stream/package.json +0 -32
  197. package/test/node_modules/readable-stream/passthrough.js +0 -1
  198. package/test/node_modules/readable-stream/readable.js +0 -10
  199. package/test/node_modules/readable-stream/transform.js +0 -1
  200. package/test/node_modules/readable-stream/writable.js +0 -1
  201. package/test/node_modules/requires-port/.travis.yml +0 -19
  202. package/test/node_modules/requires-port/LICENSE +0 -22
  203. package/test/node_modules/requires-port/README.md +0 -47
  204. package/test/node_modules/requires-port/index.js +0 -38
  205. package/test/node_modules/requires-port/package.json +0 -47
  206. package/test/node_modules/requires-port/test.js +0 -98
  207. package/test/node_modules/safe-buffer/LICENSE +0 -21
  208. package/test/node_modules/safe-buffer/README.md +0 -584
  209. package/test/node_modules/safe-buffer/index.d.ts +0 -187
  210. package/test/node_modules/safe-buffer/index.js +0 -62
  211. package/test/node_modules/safe-buffer/package.json +0 -37
  212. package/test/node_modules/string_decoder/LICENSE +0 -20
  213. package/test/node_modules/string_decoder/README.md +0 -7
  214. package/test/node_modules/string_decoder/index.js +0 -221
  215. package/test/node_modules/string_decoder/package.json +0 -25
  216. package/test/node_modules/url-parse/LICENSE +0 -22
  217. package/test/node_modules/url-parse/README.md +0 -153
  218. package/test/node_modules/url-parse/dist/url-parse.js +0 -755
  219. package/test/node_modules/url-parse/dist/url-parse.min.js +0 -1
  220. package/test/node_modules/url-parse/dist/url-parse.min.js.map +0 -1
  221. package/test/node_modules/url-parse/index.js +0 -589
  222. package/test/node_modules/url-parse/package.json +0 -49
@@ -0,0 +1,93 @@
1
+ // Type definitions for connect v3.4.0
2
+ // Project: https://github.com/senchalabs/connect
3
+ // Definitions by: Maxime LUCE <https://github.com/SomaticIT>
4
+ // Evan Hahn <https://github.com/EvanHahn>
5
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
+
7
+ /// <reference types="node" />
8
+
9
+
10
+ import * as http from "http";
11
+
12
+ /**
13
+ * Create a new connect server.
14
+ */
15
+ declare function createServer(): createServer.Server;
16
+
17
+ declare namespace createServer {
18
+ export type ServerHandle = HandleFunction | http.Server;
19
+
20
+ export class IncomingMessage extends http.IncomingMessage {
21
+ originalUrl?: http.IncomingMessage["url"] | undefined;
22
+ }
23
+
24
+ type NextFunction = (err?: any) => void;
25
+
26
+ export type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;
27
+ export type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
28
+ export type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
29
+ export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
30
+
31
+ export interface ServerStackItem {
32
+ route: string;
33
+ handle: ServerHandle;
34
+ }
35
+
36
+ export interface Server extends NodeJS.EventEmitter {
37
+ (req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
38
+
39
+ route: string;
40
+ stack: ServerStackItem[];
41
+
42
+ /**
43
+ * Utilize the given middleware `handle` to the given `route`,
44
+ * defaulting to _/_. This "route" is the mount-point for the
45
+ * middleware, when given a value other than _/_ the middleware
46
+ * is only effective when that segment is present in the request's
47
+ * pathname.
48
+ *
49
+ * For example if we were to mount a function at _/admin_, it would
50
+ * be invoked on _/admin_, and _/admin/settings_, however it would
51
+ * not be invoked for _/_, or _/posts_.
52
+ */
53
+ use(fn: NextHandleFunction): Server;
54
+ use(fn: HandleFunction): Server;
55
+ use(route: string, fn: NextHandleFunction): Server;
56
+ use(route: string, fn: HandleFunction): Server;
57
+
58
+ /**
59
+ * Handle server requests, punting them down
60
+ * the middleware stack.
61
+ */
62
+ handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void;
63
+
64
+ /**
65
+ * Listen for connections.
66
+ *
67
+ * This method takes the same arguments
68
+ * as node's `http.Server#listen()`.
69
+ *
70
+ * HTTP and HTTPS:
71
+ *
72
+ * If you run your application both as HTTP
73
+ * and HTTPS you may wrap them individually,
74
+ * since your Connect "server" is really just
75
+ * a JavaScript `Function`.
76
+ *
77
+ * var connect = require('connect')
78
+ * , http = require('http')
79
+ * , https = require('https');
80
+ *
81
+ * var app = connect();
82
+ *
83
+ * http.createServer(app).listen(80);
84
+ * https.createServer(options, app).listen(443);
85
+ */
86
+ listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
87
+ listen(port: number, hostname?: string, callback?: Function): http.Server;
88
+ listen(path: string, callback?: Function): http.Server;
89
+ listen(handle: any, listeningListener?: Function): http.Server;
90
+ }
91
+ }
92
+
93
+ export = createServer;
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@types/connect",
3
+ "version": "3.4.35",
4
+ "description": "TypeScript definitions for connect",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Maxime LUCE",
10
+ "url": "https://github.com/SomaticIT",
11
+ "githubUsername": "SomaticIT"
12
+ },
13
+ {
14
+ "name": "Evan Hahn",
15
+ "url": "https://github.com/EvanHahn",
16
+ "githubUsername": "EvanHahn"
17
+ }
18
+ ],
19
+ "main": "",
20
+ "types": "index.d.ts",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
24
+ "directory": "types/connect"
25
+ },
26
+ "scripts": {},
27
+ "dependencies": {
28
+ "@types/node": "*"
29
+ },
30
+ "typesPublisherContentHash": "09c0dcec5f675cb2bdd7487a85447955f769ef4ab174294478c4f055b528fecc",
31
+ "typeScriptVersion": "3.6"
32
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,16 @@
1
+ # Installation
2
+ > `npm install --save @types/express`
3
+
4
+ # Summary
5
+ This package contains type definitions for Express (http://expressjs.com).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express.
9
+
10
+ ### Additional Details
11
+ * Last updated: Fri, 03 Feb 2023 21:32:47 GMT
12
+ * Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/qs](https://npmjs.com/package/@types/qs), [@types/serve-static](https://npmjs.com/package/@types/serve-static)
13
+ * Global values: none
14
+
15
+ # Credits
16
+ These definitions were written by [Boris Yankov](https://github.com/borisyankov), [China Medical University Hospital](https://github.com/CMUH), [Puneet Arora](https://github.com/puneetar), and [Dylan Frankland](https://github.com/dfrankland).
@@ -0,0 +1,136 @@
1
+ // Type definitions for Express 4.17
2
+ // Project: http://expressjs.com
3
+ // Definitions by: Boris Yankov <https://github.com/borisyankov>
4
+ // China Medical University Hospital <https://github.com/CMUH>
5
+ // Puneet Arora <https://github.com/puneetar>
6
+ // Dylan Frankland <https://github.com/dfrankland>
7
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
8
+
9
+ /* =================== USAGE ===================
10
+
11
+ import express = require("express");
12
+ var app = express();
13
+
14
+ =============================================== */
15
+
16
+ /// <reference types="express-serve-static-core" />
17
+ /// <reference types="serve-static" />
18
+
19
+ import * as bodyParser from 'body-parser';
20
+ import * as serveStatic from 'serve-static';
21
+ import * as core from 'express-serve-static-core';
22
+ import * as qs from 'qs';
23
+
24
+ /**
25
+ * Creates an Express application. The express() function is a top-level function exported by the express module.
26
+ */
27
+ declare function e(): core.Express;
28
+
29
+ declare namespace e {
30
+ /**
31
+ * This is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser.
32
+ * @since 4.16.0
33
+ */
34
+ var json: typeof bodyParser.json;
35
+
36
+ /**
37
+ * This is a built-in middleware function in Express. It parses incoming requests with Buffer payloads and is based on body-parser.
38
+ * @since 4.17.0
39
+ */
40
+ var raw: typeof bodyParser.raw;
41
+
42
+ /**
43
+ * This is a built-in middleware function in Express. It parses incoming requests with text payloads and is based on body-parser.
44
+ * @since 4.17.0
45
+ */
46
+ var text: typeof bodyParser.text;
47
+
48
+ /**
49
+ * These are the exposed prototypes.
50
+ */
51
+ var application: Application;
52
+ var request: Request;
53
+ var response: Response;
54
+
55
+ /**
56
+ * This is a built-in middleware function in Express. It serves static files and is based on serve-static.
57
+ */
58
+ var static: serveStatic.RequestHandlerConstructor<Response>;
59
+
60
+ /**
61
+ * This is a built-in middleware function in Express. It parses incoming requests with urlencoded payloads and is based on body-parser.
62
+ * @since 4.16.0
63
+ */
64
+ var urlencoded: typeof bodyParser.urlencoded;
65
+
66
+ /**
67
+ * This is a built-in middleware function in Express. It parses incoming request query parameters.
68
+ */
69
+ export function query(options: qs.IParseOptions | typeof qs.parse): Handler;
70
+
71
+ export function Router(options?: RouterOptions): core.Router;
72
+
73
+ interface RouterOptions {
74
+ /**
75
+ * Enable case sensitivity.
76
+ */
77
+ caseSensitive?: boolean | undefined;
78
+
79
+ /**
80
+ * Preserve the req.params values from the parent router.
81
+ * If the parent and the child have conflicting param names, the child’s value take precedence.
82
+ *
83
+ * @default false
84
+ * @since 4.5.0
85
+ */
86
+ mergeParams?: boolean | undefined;
87
+
88
+ /**
89
+ * Enable strict routing.
90
+ */
91
+ strict?: boolean | undefined;
92
+ }
93
+
94
+ interface Application extends core.Application {}
95
+ interface CookieOptions extends core.CookieOptions {}
96
+ interface Errback extends core.Errback {}
97
+ interface ErrorRequestHandler<
98
+ P = core.ParamsDictionary,
99
+ ResBody = any,
100
+ ReqBody = any,
101
+ ReqQuery = core.Query,
102
+ Locals extends Record<string, any> = Record<string, any>
103
+ > extends core.ErrorRequestHandler<P, ResBody, ReqBody, ReqQuery, Locals> {}
104
+ interface Express extends core.Express {}
105
+ interface Handler extends core.Handler {}
106
+ interface IRoute extends core.IRoute {}
107
+ interface IRouter extends core.IRouter {}
108
+ interface IRouterHandler<T> extends core.IRouterHandler<T> {}
109
+ interface IRouterMatcher<T> extends core.IRouterMatcher<T> {}
110
+ interface MediaType extends core.MediaType {}
111
+ interface NextFunction extends core.NextFunction {}
112
+ interface Locals extends core.Locals {}
113
+ interface Request<
114
+ P = core.ParamsDictionary,
115
+ ResBody = any,
116
+ ReqBody = any,
117
+ ReqQuery = core.Query,
118
+ Locals extends Record<string, any> = Record<string, any>
119
+ > extends core.Request<P, ResBody, ReqBody, ReqQuery, Locals> {}
120
+ interface RequestHandler<
121
+ P = core.ParamsDictionary,
122
+ ResBody = any,
123
+ ReqBody = any,
124
+ ReqQuery = core.Query,
125
+ Locals extends Record<string, any> = Record<string, any>
126
+ > extends core.RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals> {}
127
+ interface RequestParamHandler extends core.RequestParamHandler {}
128
+ interface Response<
129
+ ResBody = any,
130
+ Locals extends Record<string, any> = Record<string, any>
131
+ > extends core.Response<ResBody, Locals> {}
132
+ interface Router extends core.Router {}
133
+ interface Send extends core.Send {}
134
+ }
135
+
136
+ export = e;
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@types/express",
3
+ "version": "4.17.17",
4
+ "description": "TypeScript definitions for Express",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Boris Yankov",
10
+ "url": "https://github.com/borisyankov",
11
+ "githubUsername": "borisyankov"
12
+ },
13
+ {
14
+ "name": "China Medical University Hospital",
15
+ "url": "https://github.com/CMUH",
16
+ "githubUsername": "CMUH"
17
+ },
18
+ {
19
+ "name": "Puneet Arora",
20
+ "url": "https://github.com/puneetar",
21
+ "githubUsername": "puneetar"
22
+ },
23
+ {
24
+ "name": "Dylan Frankland",
25
+ "url": "https://github.com/dfrankland",
26
+ "githubUsername": "dfrankland"
27
+ }
28
+ ],
29
+ "main": "",
30
+ "types": "index.d.ts",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
34
+ "directory": "types/express"
35
+ },
36
+ "scripts": {},
37
+ "dependencies": {
38
+ "@types/body-parser": "*",
39
+ "@types/express-serve-static-core": "^4.17.33",
40
+ "@types/qs": "*",
41
+ "@types/serve-static": "*"
42
+ },
43
+ "typesPublisherContentHash": "a4c3d98898199c22408b7c0662e85011cacce7899cd22a66275337ec40edac14",
44
+ "typeScriptVersion": "4.2"
45
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,16 @@
1
+ # Installation
2
+ > `npm install --save @types/express-serve-static-core`
3
+
4
+ # Summary
5
+ This package contains type definitions for Express (http://expressjs.com).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core.
9
+
10
+ ### Additional Details
11
+ * Last updated: Sat, 13 May 2023 03:32:51 GMT
12
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/send](https://npmjs.com/package/@types/send)
13
+ * Global values: none
14
+
15
+ # Credits
16
+ These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Satana Charuwichitratana](https://github.com/micksatana), [Sami Jaber](https://github.com/samijaber), [Jose Luis Leon](https://github.com/JoseLion), [David Stephens](https://github.com/dwrss), and [Shin Ando](https://github.com/andoshin11).