@swagger-api/apidom-error 1.11.0 → 1.11.2
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/CHANGELOG.md +8 -0
- package/dist/apidom-error.browser.js +85 -95
- package/dist/apidom-error.browser.min.js +31 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.11.2](https://github.com/swagger-api/apidom/compare/v1.11.1...v1.11.2) (2026-06-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-error
|
|
9
|
+
|
|
10
|
+
## [1.11.1](https://github.com/swagger-api/apidom/compare/v1.11.0...v1.11.1) (2026-05-12)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @swagger-api/apidom-error
|
|
13
|
+
|
|
6
14
|
# [1.11.0](https://github.com/swagger-api/apidom/compare/v1.10.2...v1.11.0) (2026-04-27)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @swagger-api/apidom-error
|
|
@@ -1,95 +1,85 @@
|
|
|
1
|
-
(function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
exports.ApiDOMAggregateError = ApiDOMAggregateError;
|
|
88
|
-
exports.ApiDOMError = ApiDOMError;
|
|
89
|
-
exports.ApiDOMStructuredError = ApiDOMStructuredError;
|
|
90
|
-
exports.NotImplementedError = NotImplementedError;
|
|
91
|
-
exports.UnsupportedOperationError = UnsupportedOperationError;
|
|
92
|
-
|
|
93
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
94
|
-
|
|
95
|
-
}));
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.apidomError = {}));
|
|
3
|
+
})(this, function(exports) {
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5
|
+
//#region src/ApiDOMAggregateError.ts
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
var ApiDOMAggregateError = class extends AggregateError {
|
|
10
|
+
constructor(errors, message, options) {
|
|
11
|
+
super(errors, message, options);
|
|
12
|
+
this.name = this.constructor.name;
|
|
13
|
+
if (typeof message === "string") this.message = message;
|
|
14
|
+
if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, this.constructor);
|
|
15
|
+
else this.stack = new Error(message).stack;
|
|
16
|
+
/**
|
|
17
|
+
* This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
|
|
18
|
+
* Node.js >= 16.9.0 supports error causes natively.
|
|
19
|
+
*/
|
|
20
|
+
if (options != null && typeof options === "object" && Object.hasOwn(options, "cause") && !("cause" in this)) {
|
|
21
|
+
const { cause } = options;
|
|
22
|
+
this.cause = cause;
|
|
23
|
+
if (cause instanceof Error && "stack" in cause) this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/ApiDOMError.ts
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
var ApiDOMError = class extends Error {
|
|
33
|
+
static [Symbol.hasInstance](instance) {
|
|
34
|
+
return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(ApiDOMAggregateError, instance);
|
|
35
|
+
}
|
|
36
|
+
constructor(message, options) {
|
|
37
|
+
super(message, options);
|
|
38
|
+
this.name = this.constructor.name;
|
|
39
|
+
if (typeof message === "string") this.message = message;
|
|
40
|
+
if (typeof Error.captureStackTrace === "function") Error.captureStackTrace(this, this.constructor);
|
|
41
|
+
else this.stack = new Error(message).stack;
|
|
42
|
+
/**
|
|
43
|
+
* This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
|
|
44
|
+
* Node.js is >= 16.9.0 supports error causes natively.
|
|
45
|
+
*/
|
|
46
|
+
if (options != null && typeof options === "object" && Object.hasOwn(options, "cause") && !("cause" in this)) {
|
|
47
|
+
const { cause } = options;
|
|
48
|
+
this.cause = cause;
|
|
49
|
+
if (cause instanceof Error && "stack" in cause) this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/ApiDOMStructuredError.ts
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
var ApiDOMStructuredError = class extends ApiDOMError {
|
|
59
|
+
constructor(message, structuredOptions) {
|
|
60
|
+
super(message, structuredOptions);
|
|
61
|
+
if (structuredOptions != null && typeof structuredOptions === "object") {
|
|
62
|
+
const { cause, ...causelessOptions } = structuredOptions;
|
|
63
|
+
Object.assign(this, causelessOptions);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/UnsupportedOperationError.ts
|
|
69
|
+
/**
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
var UnsupportedOperationError = class extends ApiDOMError {};
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/NotImplementedError.ts
|
|
75
|
+
/**
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
var NotImplementedError = class extends UnsupportedOperationError {};
|
|
79
|
+
//#endregion
|
|
80
|
+
exports.ApiDOMAggregateError = ApiDOMAggregateError;
|
|
81
|
+
exports.ApiDOMError = ApiDOMError;
|
|
82
|
+
exports.ApiDOMStructuredError = ApiDOMStructuredError;
|
|
83
|
+
exports.NotImplementedError = NotImplementedError;
|
|
84
|
+
exports.UnsupportedOperationError = UnsupportedOperationError;
|
|
85
|
+
});
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
(function(t, s) {
|
|
2
|
+
"object" == typeof exports && "undefined" != typeof module ? s(exports) : "function" == typeof define && define.amd ? define(["exports"], s) : s((t = "undefined" != typeof globalThis ? globalThis : t || self).apidomError = {});
|
|
3
|
+
})(this, (function(t) {
|
|
4
|
+
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
|
5
|
+
var s = class extends AggregateError {
|
|
6
|
+
constructor(t, s, e) {
|
|
7
|
+
if (super(t, s, e), this.name = this.constructor.name, "string" == typeof s && (this.message = s), "function" == typeof Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error(s).stack, null != e && "object" == typeof e && Object.hasOwn(e, "cause") && !("cause" in this)) {
|
|
8
|
+
const { cause: t } = e;
|
|
9
|
+
this.cause = t, t instanceof Error && "stack" in t && (this.stack = `${this.stack}\nCAUSE: ${t.stack}`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}, e = class extends Error {
|
|
13
|
+
static [Symbol.hasInstance](t) {
|
|
14
|
+
return super[Symbol.hasInstance](t) || Function.prototype[Symbol.hasInstance].call(s, t);
|
|
15
|
+
}
|
|
16
|
+
constructor(t, s) {
|
|
17
|
+
if (super(t, s), this.name = this.constructor.name, "string" == typeof t && (this.message = t), "function" == typeof Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error(t).stack, null != s && "object" == typeof s && Object.hasOwn(s, "cause") && !("cause" in this)) {
|
|
18
|
+
const { cause: t } = s;
|
|
19
|
+
this.cause = t, t instanceof Error && "stack" in t && (this.stack = `${this.stack}\nCAUSE: ${t.stack}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}, r = class extends e {};
|
|
23
|
+
t.ApiDOMAggregateError = s, t.ApiDOMError = e, t.ApiDOMStructuredError = class extends e {
|
|
24
|
+
constructor(t, s) {
|
|
25
|
+
if (super(t, s), null != s && "object" == typeof s) {
|
|
26
|
+
const { cause: t, ...e } = s;
|
|
27
|
+
Object.assign(this, e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}, t.NotImplementedError = class extends r {}, t.UnsupportedOperationError = r;
|
|
31
|
+
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swagger-api/apidom-error",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"description": "Backward compatible custom ApiDOM errors with causes.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"README.md",
|
|
50
50
|
"CHANGELOG.md"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "0ace20a29a3ed690af50b47734114fe06219dc20"
|
|
53
53
|
}
|