@spinajs/intl-http 2.0.46 → 2.0.48
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 +11 -11
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -10
- package/lib/index.js.map +1 -1
- package/package.json +55 -53
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# `intl-http`
|
|
2
|
-
|
|
3
|
-
> TODO: description
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
const intlHttp = require('intl-http');
|
|
9
|
-
|
|
10
|
-
// TODO: DEMONSTRATE API
|
|
11
|
-
```
|
|
1
|
+
# `intl-http`
|
|
2
|
+
|
|
3
|
+
> TODO: description
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
const intlHttp = require('intl-http');
|
|
9
|
+
|
|
10
|
+
// TODO: DEMONSTRATE API
|
|
11
|
+
```
|
package/lib/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export declare class IntHttpMiddleware extends ServerMiddleware {
|
|
|
10
10
|
before(): (req: express.Request, res: express.Response, next: express.NextFunction) => void;
|
|
11
11
|
after(): (req: express.Request, res: express.Response, next: express.NextFunction) => void;
|
|
12
12
|
}
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAuB,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,0BAA0B;QAClC,QAAQ,EAAE,MAAM,CAAC;KAClB;CACF;AAED,qBACa,iBAAkB,SAAQ,gBAAgB;IAErD,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAE9B,MAAM,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,YAAY,KAAK,IAAI;IAa3F,KAAK,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,YAAY,KAAK,IAAI;CAGlG"}
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,12 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const http_1 = require("@spinajs/http");
|
|
16
|
-
let IntHttpMiddleware = class IntHttpMiddleware extends http_1.ServerMiddleware {
|
|
10
|
+
import { Config } from '@spinajs/configuration';
|
|
11
|
+
import { Injectable } from '@spinajs/di';
|
|
12
|
+
import { ServerMiddleware } from '@spinajs/http';
|
|
13
|
+
let IntHttpMiddleware = class IntHttpMiddleware extends ServerMiddleware {
|
|
17
14
|
before() {
|
|
18
15
|
return (req, _res, next) => {
|
|
19
16
|
if (req.query[this.LangQueryParameter]) {
|
|
@@ -33,11 +30,11 @@ let IntHttpMiddleware = class IntHttpMiddleware extends http_1.ServerMiddleware
|
|
|
33
30
|
}
|
|
34
31
|
};
|
|
35
32
|
__decorate([
|
|
36
|
-
|
|
33
|
+
Config('intl.queryParameter'),
|
|
37
34
|
__metadata("design:type", String)
|
|
38
35
|
], IntHttpMiddleware.prototype, "LangQueryParameter", void 0);
|
|
39
36
|
IntHttpMiddleware = __decorate([
|
|
40
|
-
|
|
37
|
+
Injectable(ServerMiddleware)
|
|
41
38
|
], IntHttpMiddleware);
|
|
42
|
-
|
|
39
|
+
export { IntHttpMiddleware };
|
|
43
40
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAuB,MAAM,eAAe,CAAC;AAU/D,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,gBAAgB;IAI9C,MAAM;QACX,OAAO,CAAC,GAAa,EAAE,IAAsB,EAAE,IAA0B,EAAE,EAAE;YAC3E,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE;gBACtC,GAAG,CAAC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAW,CAAC;aACrE;iBAAM,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE;gBAC/C,GAAG,CAAC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;aAC7D;iBAAM,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,kBAAkB,EAAE,CAAC,EAAE;gBACtD,GAAG,CAAC,OAAO,CAAC,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,kBAAkB,EAAE,CAAW,CAAC;aAC9E;YAED,IAAI,EAAE,CAAC;QACT,CAAC,CAAC;IACJ,CAAC;IACM,KAAK;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AAnBC;IAAC,MAAM,CAAC,qBAAqB,CAAC;;6DACO;AAF1B,iBAAiB;IAD7B,UAAU,CAAC,gBAAgB,CAAC;GAChB,iBAAiB,CAoB7B;SApBY,iBAAiB"}
|
package/package.json
CHANGED
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@spinajs/intl-http",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Internationalization support for http module",
|
|
5
|
-
"
|
|
6
|
-
"private": false,
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"@spinajs/
|
|
44
|
-
"@spinajs/
|
|
45
|
-
"@spinajs/
|
|
46
|
-
"@spinajs/
|
|
47
|
-
"@spinajs/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@spinajs/intl-http",
|
|
3
|
+
"version": "2.0.48",
|
|
4
|
+
"description": "Internationalization support for http module",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=16.11"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "npm run clean && npm run compile",
|
|
12
|
+
"compile": "tsc -b tsconfig.json",
|
|
13
|
+
"rimraf": "./node_modules/rimraf/bin.js",
|
|
14
|
+
"clean": "rimraf lib/ && rimraf tsconfig.tsbuildinfo",
|
|
15
|
+
"test": "ts-mocha -p tsconfig.json test/**/*.test.ts",
|
|
16
|
+
"coverage": "nyc npm run test",
|
|
17
|
+
"build-docs": "rimraf docs && typedoc --options typedoc.json src/",
|
|
18
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
19
|
+
"lint": "eslint -c .eslintrc.cjs --ext .ts src --fix",
|
|
20
|
+
"preversion": "npm run lint",
|
|
21
|
+
"version": "npm run format && git add -A src",
|
|
22
|
+
"postinstall": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"lib/**/*"
|
|
26
|
+
],
|
|
27
|
+
"types": "lib",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/spinajs/main.git"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"spinajs",
|
|
34
|
+
"int orm"
|
|
35
|
+
],
|
|
36
|
+
"author": "SpinaJS <spinajs@coderush.pl> (https://github.com/spinajs/main)",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/spinajs/main/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/spinajs/main#readme",
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@spinajs/configuration": "^2.0.46",
|
|
44
|
+
"@spinajs/di": "^2.0.46",
|
|
45
|
+
"@spinajs/exceptions": "^2.0.39",
|
|
46
|
+
"@spinajs/http": "^2.0.46",
|
|
47
|
+
"@spinajs/intl": "^2.0.46",
|
|
48
|
+
"@spinajs/log": "^2.0.46",
|
|
49
|
+
"@spinajs/reflection": "^2.0.46"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@spinajs/orm-sqlite": "^2.0.46"
|
|
53
|
+
},
|
|
54
|
+
"gitHead": "002dc553b0ffffd72193d0121ac425a4083bc9ee"
|
|
55
|
+
}
|