@spinajs/intl-http 2.0.46 → 2.0.49

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 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
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.IntHttpMiddleware = void 0;
13
- const configuration_1 = require("@spinajs/configuration");
14
- const di_1 = require("@spinajs/di");
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
- (0, configuration_1.Config)('intl.queryParameter'),
33
+ Config('intl.queryParameter'),
37
34
  __metadata("design:type", String)
38
35
  ], IntHttpMiddleware.prototype, "LangQueryParameter", void 0);
39
36
  IntHttpMiddleware = __decorate([
40
- (0, di_1.Injectable)(http_1.ServerMiddleware)
37
+ Injectable(ServerMiddleware)
41
38
  ], IntHttpMiddleware);
42
- exports.IntHttpMiddleware = IntHttpMiddleware;
39
+ export { IntHttpMiddleware };
43
40
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","s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B,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.46",
4
- "description": "Internationalization support for http module",
5
- "main": "lib/index.js",
6
- "private": false,
7
- "scripts": {
8
- "build": "npm run clean && npm run compile",
9
- "compile": "tsc -p tsconfig.build.json",
10
- "clean": "",
11
- "test": "ts-mocha -p tsconfig.json test/**/*.test.ts",
12
- "coverage": "nyc npm run test",
13
- "build-docs": "rimraf docs && typedoc --options typedoc.json src/",
14
- "prepare": "npm run build",
15
- "format": "prettier --write \"src/**/*.ts\"",
16
- "lint": "eslint -c .eslintrc.js --ext .ts src --fix",
17
- "prepublishOnly": "npm test && npm run lint",
18
- "preversion": "npm run lint",
19
- "version": "npm run format && git add -A src",
20
- "postversion": "git push && git push --tags"
21
- },
22
- "files": [
23
- "lib/**/*"
24
- ],
25
- "types": "lib",
26
- "repository": {
27
- "type": "git",
28
- "url": "git+https://github.com/spinajs/main.git"
29
- },
30
- "keywords": [
31
- "spinajs",
32
- "int orm"
33
- ],
34
- "author": "SpinaJS <spinajs@coderush.pl> (https://github.com/spinajs/main)",
35
- "license": "MIT",
36
- "bugs": {
37
- "url": "https://github.com/spinajs/main/issues"
38
- },
39
- "homepage": "https://github.com/spinajs/main#readme",
40
- "dependencies": {
41
- "@spinajs/configuration": "^2.0.46",
42
- "@spinajs/di": "^2.0.46",
43
- "@spinajs/exceptions": "^2.0.39",
44
- "@spinajs/http": "^2.0.46",
45
- "@spinajs/intl": "^2.0.46",
46
- "@spinajs/log": "^2.0.46",
47
- "@spinajs/reflection": "^2.0.46"
48
- },
49
- "devDependencies": {
50
- "@spinajs/orm-sqlite": "^2.0.46"
51
- },
52
- "gitHead": "bd560afd6c9a156071102cc6b4f36115b5498e9d"
53
- }
1
+ {
2
+ "name": "@spinajs/intl-http",
3
+ "version": "2.0.49",
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
+ }