@thisisagile/easy-express 8.36.2 → 8.37.3
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/dist/express/index.d.ts +0 -1
- package/dist/express/index.js +0 -1
- package/dist/express/index.js.map +1 -1
- package/package.json +3 -3
- package/src/express/index.ts +0 -1
- package/dist/express/AcceptLanguageHandler.d.ts +0 -2
- package/dist/express/AcceptLanguageHandler.js +0 -11
- package/dist/express/AcceptLanguageHandler.js.map +0 -1
- package/src/express/AcceptLanguageHandler.ts +0 -8
package/dist/express/index.d.ts
CHANGED
package/dist/express/index.js
CHANGED
|
@@ -10,7 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./AcceptLanguageHandler"), exports);
|
|
14
13
|
__exportStar(require("./AuthError"), exports);
|
|
15
14
|
__exportStar(require("./CorrelationHandler"), exports);
|
|
16
15
|
__exportStar(require("./ErrorHandler"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/express/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/express/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,uDAAqC;AACrC,iDAA+B;AAC/B,oDAAkC;AAClC,oDAAkC;AAClC,0DAAwC;AACxC,oDAAkC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy-express",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.37.3",
|
|
4
4
|
"description": "Straightforward library for building domain-driven microservice architectures",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@thisisagile/easy-test": "8.
|
|
34
|
+
"@thisisagile/easy-test": "8.37.3",
|
|
35
35
|
"@types/cls-hooked": "^4.3.3",
|
|
36
36
|
"@types/form-urlencoded": "^4.4.0",
|
|
37
37
|
"@types/jsonwebtoken": "^8.5.8",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/validator": "^13.7.1"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@thisisagile/easy": "8.
|
|
44
|
+
"@thisisagile/easy": "8.37.3",
|
|
45
45
|
"@types/express": "^4.17.13",
|
|
46
46
|
"cls-hooked": "^4.2.2",
|
|
47
47
|
"express": "^4.17.1",
|
package/src/express/index.ts
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.languageSelector = void 0;
|
|
4
|
-
const easy_1 = require("@thisisagile/easy");
|
|
5
|
-
const languageSelector = (req, res, next) => {
|
|
6
|
-
const al = req.acceptsLanguages('nl', 'en', 'pl', 'de');
|
|
7
|
-
easy_1.ctx.request.set('language', al === false ? 'nl' : al);
|
|
8
|
-
next();
|
|
9
|
-
};
|
|
10
|
-
exports.languageSelector = languageSelector;
|
|
11
|
-
//# sourceMappingURL=AcceptLanguageHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AcceptLanguageHandler.js","sourceRoot":"","sources":["../../src/express/AcceptLanguageHandler.ts"],"names":[],"mappings":";;;AACA,4CAAwC;AAEjC,MAAM,gBAAgB,GAA2B,CAAC,GAAoB,EAAE,GAAqB,EAAE,IAA0B,EAAE,EAAE;IAClI,MAAM,EAAE,GAAG,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACxD,UAAG,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACtD,IAAI,EAAE,CAAC;AACT,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import { ctx } from '@thisisagile/easy';
|
|
3
|
-
|
|
4
|
-
export const languageSelector: express.RequestHandler = (req: express.Request, res: express.Response, next: express.NextFunction) => {
|
|
5
|
-
const al = req.acceptsLanguages('nl', 'en', 'pl', 'de');
|
|
6
|
-
ctx.request.set('language', al === false ? 'nl' : al);
|
|
7
|
-
next();
|
|
8
|
-
};
|