equipped 4.0.0-alpha.4 → 4.0.0-alpha.5
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [4.0.0-alpha.5](https://github.com/kevinand11/equipped/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2023-02-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* controllers undefined ([f5b77aa](https://github.com/kevinand11/equipped/commit/f5b77aa7ca0d93eed57b474c2e9dd729b3faa7aa))
|
|
11
|
+
|
|
5
12
|
## [4.0.0-alpha.4](https://github.com/kevinand11/equipped/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2023-02-14)
|
|
6
13
|
|
|
7
14
|
## [4.0.0-alpha.3](https://github.com/kevinand11/equipped/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2023-02-14)
|
package/lib/express/app.js
CHANGED
|
@@ -16,9 +16,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
var _Server_expressApp, _Server_httpServer, _Server_listener;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.Server = void 0;
|
|
19
|
+
const cookie_parser_1 = __importDefault(require("cookie-parser"));
|
|
19
20
|
const cors_1 = __importDefault(require("cors"));
|
|
20
21
|
const express_1 = __importDefault(require("express"));
|
|
21
|
-
const cookie_parser_1 = __importDefault(require("cookie-parser"));
|
|
22
22
|
const express_fileupload_1 = __importDefault(require("express-fileupload"));
|
|
23
23
|
const express_rate_limit_1 = __importDefault(require("express-rate-limit"));
|
|
24
24
|
const express_slow_down_1 = __importDefault(require("express-slow-down"));
|
|
@@ -33,8 +33,7 @@ const controllers_1 = require("./controllers");
|
|
|
33
33
|
const middlewares_1 = require("./middlewares");
|
|
34
34
|
const parseAuthUser_1 = require("./middlewares/parseAuthUser");
|
|
35
35
|
const statusCodes_1 = require("./statusCodes");
|
|
36
|
-
const
|
|
37
|
-
const postRoutes = [
|
|
36
|
+
const postRoutes = () => [
|
|
38
37
|
{
|
|
39
38
|
path: '__health',
|
|
40
39
|
method: 'get',
|
|
@@ -100,7 +99,7 @@ class Server {
|
|
|
100
99
|
return __classPrivateFieldGet(this, _Server_listener, "f");
|
|
101
100
|
}
|
|
102
101
|
set routes(routes) {
|
|
103
|
-
const allRoutes = [...
|
|
102
|
+
const allRoutes = [...routes, ...postRoutes()];
|
|
104
103
|
allRoutes.forEach(({ method, path, controllers }) => {
|
|
105
104
|
controllers = [parseAuthUser_1.parseAuthUser, ...controllers];
|
|
106
105
|
if (path)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AuthUser, RefreshUser } from '../../utils/authUser';
|
|
2
|
-
import { StorageFile } from '../../storage';
|
|
3
1
|
import { CustomError } from '../../errors';
|
|
2
|
+
import { StorageFile } from '../../storage';
|
|
3
|
+
import { AuthUser, RefreshUser } from '../../utils/authUser';
|
|
4
4
|
type HeaderKeys = 'AccessToken' | 'RefreshToken' | 'Referer' | 'ContentType' | 'UserAgent';
|
|
5
5
|
export declare class Request {
|
|
6
6
|
#private;
|