@novice1/app 0.2.1 → 0.3.1
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/README.md +1 -1
- package/lib/app.d.ts +100 -100
- package/lib/app.js +97 -97
- package/lib/baseApp.d.ts +101 -97
- package/lib/baseApp.js +310 -291
- package/lib/baseApp.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +5 -5
- package/lib/middlewares/reply.d.ts +3 -3
- package/lib/middlewares/reply.js +13 -13
- package/package.json +18 -17
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './app';
|
|
2
|
-
export * from './baseApp';
|
|
1
|
+
export * from './app';
|
|
2
|
+
export * from './baseApp';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./app"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./baseApp"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./app"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./baseApp"), exports);
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import core from 'express-serve-static-core';
|
|
2
|
-
import { IApp } from '../baseApp';
|
|
3
|
-
export declare function addReplyMiddleware(app: IApp): core.RequestHandler;
|
|
1
|
+
import core from 'express-serve-static-core';
|
|
2
|
+
import { IApp } from '../baseApp';
|
|
3
|
+
export declare function addReplyMiddleware(app: IApp): core.RequestHandler;
|
package/lib/middlewares/reply.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addReplyMiddleware = void 0;
|
|
4
|
-
function addReplyMiddleware(app) {
|
|
5
|
-
return function replyMiddleware(_, res, next) {
|
|
6
|
-
// set headers
|
|
7
|
-
if (app.enabled('x-powered-by')) {
|
|
8
|
-
res.setHeader('X-Powered-By', 'Novice1');
|
|
9
|
-
}
|
|
10
|
-
next();
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
exports.addReplyMiddleware = addReplyMiddleware;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addReplyMiddleware = void 0;
|
|
4
|
+
function addReplyMiddleware(app) {
|
|
5
|
+
return function replyMiddleware(_, res, next) {
|
|
6
|
+
// set headers
|
|
7
|
+
if (app.enabled('x-powered-by')) {
|
|
8
|
+
res.setHeader('X-Powered-By', 'Novice1');
|
|
9
|
+
}
|
|
10
|
+
next();
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
exports.addReplyMiddleware = addReplyMiddleware;
|
|
14
14
|
//# sourceMappingURL=reply.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novice1/app",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "Create Express applications.",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
|
-
"homepage": "https://
|
|
7
|
+
"homepage": "https://kisiwu.github.io/novice-app/latest/",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/kisiwu/novice-app.git"
|
|
@@ -19,22 +19,23 @@
|
|
|
19
19
|
"author": "demingongo",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@novice1/logger": "^1.3.
|
|
23
|
-
"@novice1/routing": "^1.1.
|
|
24
|
-
"express": "^4.
|
|
25
|
-
"tslib": "^2.
|
|
22
|
+
"@novice1/logger": "^1.3.3",
|
|
23
|
+
"@novice1/routing": "^1.1.4",
|
|
24
|
+
"express": "^4.18.2",
|
|
25
|
+
"tslib": "^2.6.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/chai": "^4.
|
|
29
|
-
"@types/express": "^4.17.
|
|
30
|
-
"@types/mocha": "^
|
|
31
|
-
"@types/node": "^
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
33
|
-
"@typescript-eslint/parser": "^4.
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
28
|
+
"@types/chai": "^4.3.5",
|
|
29
|
+
"@types/express": "^4.17.17",
|
|
30
|
+
"@types/mocha": "^10.0.1",
|
|
31
|
+
"@types/node": "^20.5.0",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
33
|
+
"@typescript-eslint/parser": "^6.4.0",
|
|
34
|
+
"chai": "^4.3.7",
|
|
35
|
+
"eslint": "^8.47.0",
|
|
36
|
+
"kaukau": "^3.0.0",
|
|
37
|
+
"ts-node": "^10.9.1",
|
|
38
|
+
"typedoc": "^0.24.8",
|
|
39
|
+
"typescript": "^5.1.6"
|
|
39
40
|
}
|
|
40
41
|
}
|