@emoyly/problem 8.0.0 → 8.0.1
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/cjs/problem.d.ts +1 -1
- package/cjs/tsconfig.tsbuildinfo +1 -1
- package/cjs/util/getProblems.d.ts +1 -1
- package/cjs/util/getProblems.js +3 -2
- package/cjs/util/version.d.ts +1 -1
- package/cjs/util/version.js +1 -1
- package/esm/problem.d.ts +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/util/getProblems.d.ts +1 -1
- package/esm/util/getProblems.js +3 -2
- package/esm/util/version.d.ts +1 -1
- package/esm/util/version.js +1 -1
- package/package.json +1 -1
package/esm/util/getProblems.js
CHANGED
|
@@ -4,7 +4,7 @@ import { validateBasicInput } from './validation.js';
|
|
|
4
4
|
export function isJsonProblem(input) {
|
|
5
5
|
return validateBasicInput(input) === true;
|
|
6
6
|
}
|
|
7
|
-
export function createFromJson({ title, type, instance, detail, status, data: _data, ...extras }) {
|
|
7
|
+
export function createFromJson({ title, type, instance, detail, status, data: _data, __problemVersion, source, errorObject, stack, ...extras }) {
|
|
8
8
|
let data;
|
|
9
9
|
const extraKeys = Object.keys(extras);
|
|
10
10
|
if /* No extras, just use data */ (extraKeys.length < 1) {
|
|
@@ -19,7 +19,8 @@ export function createFromJson({ title, type, instance, detail, status, data: _d
|
|
|
19
19
|
else {
|
|
20
20
|
data = { ...extras, ..._data };
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
// TODO: Validate that source, errorObject and stack should actually be passed through
|
|
23
|
+
return new Problem({ title, type, instance, detail, status, data, source, errorObject, stack });
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Get an array of Problems from any given input.
|
package/esm/util/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "8.0.
|
|
1
|
+
export declare const version = "8.0.1";
|
|
2
2
|
export declare const major: number;
|
package/esm/util/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '8.0.
|
|
1
|
+
export const version = '8.0.1';
|
|
2
2
|
export const major = Number(version.split('.')[0]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emoyly/problem",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "A simple error library based around the RFC-7807 standard with optional support for different parsers and middleware.",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"repository": "https://github.com/emoyly/problem",
|