tibber-express-utils 4.0.8 → 4.0.9
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/src/HttpResult.js +3 -0
- package/dist/src/HttpResult.js.map +1 -1
- package/dist/src/errors/HttpError.js +1 -0
- package/dist/src/errors/HttpError.js.map +1 -1
- package/dist/src/errors/ProblemDetailsError.js +7 -2
- package/dist/src/errors/ProblemDetailsError.js.map +1 -1
- package/dist/src/index.js +17 -7
- package/dist/src/index.js.map +1 -1
- package/dist/src/jsonMiddleware.js +1 -1
- package/dist/src/jsonMiddleware.js.map +1 -1
- package/package.json +11 -5
package/dist/src/HttpResult.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpResult.js","sourceRoot":"","sources":["../../src/HttpResult.ts"],"names":[],"mappings":";;;AAMA,MAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"HttpResult.js","sourceRoot":"","sources":["../../src/HttpResult.ts"],"names":[],"mappings":";;;AAMA,MAAa,UAAU;IAEZ;IACA;IACA;IAHT,YACS,UAAkB,EAClB,OAAiB,EACjB,OAAqB;QAFrB,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAAU;QACjB,YAAO,GAAP,OAAO,CAAc;IAC3B,CAAC;CACL;AAND,gCAMC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.HttpError = void 0;
|
|
7
7
|
const es6_error_1 = __importDefault(require("es6-error"));
|
|
8
8
|
class HttpError extends es6_error_1.default {
|
|
9
|
+
httpStatus;
|
|
9
10
|
constructor(message, httpStatus) {
|
|
10
11
|
super(message);
|
|
11
12
|
this.httpStatus = httpStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../../src/errors/HttpError.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAwC;AAExC,MAAa,SAAU,SAAQ,mBAAe;
|
|
1
|
+
{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../../src/errors/HttpError.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAwC;AAExC,MAAa,SAAU,SAAQ,mBAAe;IACR;IAApC,YAAY,OAAe,EAAS,UAAkB;QACpD,KAAK,CAAC,OAAO,CAAC,CAAC;QADmB,eAAU,GAAV,UAAU,CAAQ;IAEtD,CAAC;CACF;AAJD,8BAIC"}
|
|
@@ -3,14 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProblemDetailsError = void 0;
|
|
4
4
|
const HttpError_1 = require("./HttpError");
|
|
5
5
|
class ProblemDetailsError extends HttpError_1.HttpError {
|
|
6
|
+
type;
|
|
7
|
+
title;
|
|
8
|
+
detail;
|
|
9
|
+
instance;
|
|
10
|
+
extensions;
|
|
6
11
|
constructor(args) {
|
|
7
12
|
const { detail, instance, statusCode, title, type, extensions } = args;
|
|
8
|
-
super(detail
|
|
13
|
+
super(detail ?? title, statusCode);
|
|
9
14
|
this.detail = detail;
|
|
10
15
|
this.type = type;
|
|
11
16
|
this.instance = instance;
|
|
12
17
|
this.title = title;
|
|
13
|
-
this.extensions = extensions
|
|
18
|
+
this.extensions = extensions ?? {};
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
exports.ProblemDetailsError = ProblemDetailsError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProblemDetailsError.js","sourceRoot":"","sources":["../../../src/errors/ProblemDetailsError.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAatC,MAAa,mBAAoB,SAAQ,qBAAS;
|
|
1
|
+
{"version":3,"file":"ProblemDetailsError.js","sourceRoot":"","sources":["../../../src/errors/ProblemDetailsError.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAatC,MAAa,mBAAoB,SAAQ,qBAAS;IACzC,IAAI,CAAS;IACb,KAAK,CAAS;IACd,MAAM,CAAU;IAChB,QAAQ,CAAU;IAClB,UAAU,CAEf;IAEF,YAAY,IAAwB;QAClC,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC;QAErE,KAAK,CAAC,MAAM,IAAI,KAAK,EAAE,UAAU,CAAC,CAAC;QAEnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;IACrC,CAAC;CACF;AApBD,kDAoBC"}
|
package/dist/src/index.js
CHANGED
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Errors = void 0;
|
|
30
40
|
__exportStar(require("./HttpResult"), exports);
|
package/dist/src/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,+CAA6B;AAC7B,mDAAmC;AACnC,mDAAiC;AACjC,gDAA8B;AAC9B,0CAAwB"}
|
|
@@ -62,7 +62,7 @@ const jsonMiddleware = (httpStatusCodeSelector, contextSelector, handler, logger
|
|
|
62
62
|
.status(status)
|
|
63
63
|
.contentType('application/problem+json')
|
|
64
64
|
.send({
|
|
65
|
-
...(extensions
|
|
65
|
+
...(extensions ?? {}),
|
|
66
66
|
detail,
|
|
67
67
|
instance,
|
|
68
68
|
status,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonMiddleware.js","sourceRoot":"","sources":["../../src/jsonMiddleware.ts"],"names":[],"mappings":";;;AACA,qCAAwD;AAExD,uDAAkD;AAE3C,MAAM,cAAc,GAAmB,CAC5C,sBAAsB,EACtB,eAAe,EACf,OAAO,EACP,MAAM,EACN,EAAE;IACF,OAAO,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;QAC/D,IAAI;
|
|
1
|
+
{"version":3,"file":"jsonMiddleware.js","sourceRoot":"","sources":["../../src/jsonMiddleware.ts"],"names":[],"mappings":";;;AACA,qCAAwD;AAExD,uDAAkD;AAE3C,MAAM,cAAc,GAAmB,CAC5C,sBAAsB,EACtB,eAAe,EACf,OAAO,EACP,MAAM,EAC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.0.
|
|
3
|
+
"version": "4.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -34,18 +34,24 @@
|
|
|
34
34
|
"eslint-plugin-jest": "^26.8.2",
|
|
35
35
|
"eslint-plugin-node": "^11.1.0",
|
|
36
36
|
"express": "^5.1.0",
|
|
37
|
-
"gts": "^
|
|
37
|
+
"gts": "^7.0.0",
|
|
38
38
|
"husky": "^8.0.1",
|
|
39
|
-
"jest": "^
|
|
39
|
+
"jest": "^30.3.0",
|
|
40
40
|
"lint-staged": "^15.5.1",
|
|
41
41
|
"postcss": "^8.4.38",
|
|
42
|
-
"semantic-release": "^25.0.
|
|
42
|
+
"semantic-release": "^25.0.3",
|
|
43
43
|
"sortier": "^2.0.2",
|
|
44
44
|
"supertest": "^7.0.0",
|
|
45
45
|
"ts-jest": "^28.0.7",
|
|
46
|
-
"typescript": "^
|
|
46
|
+
"typescript": "^5.9.3",
|
|
47
47
|
"yarn-upgrade-all": "^0.7.1"
|
|
48
48
|
},
|
|
49
|
+
"resolutions": {
|
|
50
|
+
"undici": "^7.24.4",
|
|
51
|
+
"flatted": "^3.4.0",
|
|
52
|
+
"glob": "^10.5.0",
|
|
53
|
+
"minimatch": "10.2.4"
|
|
54
|
+
},
|
|
49
55
|
"dependencies": {
|
|
50
56
|
"es6-error": "^4.1.1"
|
|
51
57
|
},
|