@thisisagile/easy-express 8.37.0 → 8.37.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.
@@ -1,4 +1,3 @@
1
- export * from './AcceptLanguageHandler';
2
1
  export * from './AuthError';
3
2
  export * from './CorrelationHandler';
4
3
  export * from './ErrorHandler';
@@ -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,0DAAuC;AACvC,8CAA4B;AAC5B,uDAAqC;AACrC,iDAA+B;AAC/B,oDAAkC;AAClC,oDAAkC;AAClC,0DAAwC;AACxC,oDAAkC"}
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.37.0",
3
+ "version": "8.37.5",
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.37.0",
34
+ "@thisisagile/easy-test": "8.37.5",
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.37.0",
44
+ "@thisisagile/easy": "8.37.5",
45
45
  "@types/express": "^4.17.13",
46
46
  "cls-hooked": "^4.2.2",
47
47
  "express": "^4.17.1",
@@ -1,4 +1,3 @@
1
- export * from './AcceptLanguageHandler'
2
1
  export * from './AuthError';
3
2
  export * from './CorrelationHandler';
4
3
  export * from './ErrorHandler';
@@ -1,2 +0,0 @@
1
- import express from 'express';
2
- export declare const languageSelector: express.RequestHandler;
@@ -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
- };