@swagger-api/apidom-error 1.0.0-beta.2 → 1.0.0-beta.23

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 CHANGED
@@ -3,6 +3,90 @@
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.0.0-beta.23](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2025-03-12)
7
+
8
+ **Note:** Version bump only for package @swagger-api/apidom-error
9
+
10
+ # [1.0.0-beta.22](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2025-03-12)
11
+
12
+ **Note:** Version bump only for package @swagger-api/apidom-error
13
+
14
+ # [1.0.0-beta.21](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2025-03-12)
15
+
16
+ **Note:** Version bump only for package @swagger-api/apidom-error
17
+
18
+ # [1.0.0-beta.20](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2025-03-12)
19
+
20
+ **Note:** Version bump only for package @swagger-api/apidom-error
21
+
22
+ # [1.0.0-beta.19](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2025-03-12)
23
+
24
+ **Note:** Version bump only for package @swagger-api/apidom-error
25
+
26
+ # [1.0.0-beta.18](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2025-03-12)
27
+
28
+ **Note:** Version bump only for package @swagger-api/apidom-error
29
+
30
+ # [1.0.0-beta.17](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2025-03-12)
31
+
32
+ **Note:** Version bump only for package @swagger-api/apidom-error
33
+
34
+ # [1.0.0-beta.16](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2025-03-12)
35
+
36
+ **Note:** Version bump only for package @swagger-api/apidom-error
37
+
38
+ # [1.0.0-beta.15](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2025-03-11)
39
+
40
+ **Note:** Version bump only for package @swagger-api/apidom-error
41
+
42
+ # [1.0.0-beta.14](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2025-03-11)
43
+
44
+ **Note:** Version bump only for package @swagger-api/apidom-error
45
+
46
+ # [1.0.0-beta.13](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2025-03-10)
47
+
48
+ **Note:** Version bump only for package @swagger-api/apidom-error
49
+
50
+ # [1.0.0-beta.12](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2025-02-11)
51
+
52
+ **Note:** Version bump only for package @swagger-api/apidom-error
53
+
54
+ # [1.0.0-beta.11](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2025-01-27)
55
+
56
+ **Note:** Version bump only for package @swagger-api/apidom-error
57
+
58
+ # [1.0.0-beta.10](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2025-01-25)
59
+
60
+ **Note:** Version bump only for package @swagger-api/apidom-error
61
+
62
+ # [1.0.0-beta.9](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2025-01-23)
63
+
64
+ **Note:** Version bump only for package @swagger-api/apidom-error
65
+
66
+ # [1.0.0-beta.8](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2025-01-23)
67
+
68
+ **Note:** Version bump only for package @swagger-api/apidom-error
69
+
70
+ # [1.0.0-beta.7](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2025-01-21)
71
+
72
+ **Note:** Version bump only for package @swagger-api/apidom-error
73
+
74
+ # [1.0.0-beta.6](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2024-12-30)
75
+
76
+ **Note:** Version bump only for package @swagger-api/apidom-error
77
+
78
+ # [1.0.0-beta.5](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2024-12-16)
79
+
80
+ **Note:** Version bump only for package @swagger-api/apidom-error
81
+
82
+ # [1.0.0-beta.4](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2024-12-13)
83
+
84
+ **Note:** Version bump only for package @swagger-api/apidom-error
85
+
86
+ # [1.0.0-beta.3](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2024-11-25)
87
+
88
+ **Note:** Version bump only for package @swagger-api/apidom-error
89
+
6
90
  # [1.0.0-beta.2](https://github.com/swagger-api/apidom/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2024-11-22)
7
91
 
8
92
  **Note:** Version bump only for package @swagger-api/apidom-error
@@ -0,0 +1,182 @@
1
+ This Academic Free License (the "License") applies to any original work
2
+ of authorship (the "Original Work") whose owner (the "Licensor") has
3
+ placed the following licensing notice adjacent to the copyright notice
4
+ for the Original Work:
5
+
6
+ Licensed under the Academic Free License version 3.0
7
+
8
+ 1) Grant of Copyright License. Licensor grants You a worldwide,
9
+ royalty-free, non-exclusive, sublicensable license, for the duration of
10
+ the copyright, to do the following:
11
+
12
+ a) to reproduce the Original Work in copies, either alone or as part of
13
+ a collective work;
14
+
15
+ b) to translate, adapt, alter, transform, modify, or arrange the
16
+ Original Work, thereby creating derivative works ("Derivative Works")
17
+ based upon the Original Work;
18
+
19
+ c) to distribute or communicate copies of the Original Work and
20
+ Derivative Works to the public, under any license of your choice that
21
+ does not contradict the terms and conditions, including Licensor's
22
+ reserved rights and remedies, in this Academic Free License;
23
+
24
+ d) to perform the Original Work publicly; and
25
+
26
+ e) to display the Original Work publicly.
27
+
28
+ 2) Grant of Patent License. Licensor grants You a worldwide,
29
+ royalty-free, non-exclusive, sublicensable license, under patent claims
30
+ owned or controlled by the Licensor that are embodied in the Original
31
+ Work as furnished by the Licensor, for the duration of the patents, to
32
+ make, use, sell, offer for sale, have made, and import the Original Work
33
+ and Derivative Works.
34
+
35
+ 3) Grant of Source Code License. The term "Source Code" means the
36
+ preferred form of the Original Work for making modifications to it
37
+ and all available documentation describing how to modify the Original
38
+ Work. Licensor agrees to provide a machine-readable copy of the Source
39
+ Code of the Original Work along with each copy of the Original Work
40
+ that Licensor distributes. Licensor reserves the right to satisfy this
41
+ obligation by placing a machine-readable copy of the Source Code in an
42
+ information repository reasonably calculated to permit inexpensive and
43
+ convenient access by You for as long as Licensor continues to distribute
44
+ the Original Work.
45
+
46
+ 4) Exclusions From License Grant. Neither the names of Licensor, nor
47
+ the names of any contributors to the Original Work, nor any of their
48
+ trademarks or service marks, may be used to endorse or promote products
49
+ derived from this Original Work without express prior permission of the
50
+ Licensor. Except as expressly stated herein, nothing in this License
51
+ grants any license to Licensor's trademarks, copyrights, patents, trade
52
+ secrets or any other intellectual property. No patent license is granted
53
+ to make, use, sell, offer for sale, have made, or import embodiments
54
+ of any patent claims other than the licensed claims defined in Section
55
+ 2. No license is granted to the trademarks of Licensor even if such
56
+ marks are included in the Original Work. Nothing in this License shall
57
+ be interpreted to prohibit Licensor from licensing under terms different
58
+ from this License any Original Work that Licensor otherwise would have a
59
+ right to license.
60
+
61
+ 5) External Deployment. The term "External Deployment" means the use,
62
+ distribution, or communication of the Original Work or Derivative
63
+ Works in any way such that the Original Work or Derivative Works may
64
+ be used by anyone other than You, whether those works are distributed
65
+ or communicated to those persons or made available as an application
66
+ intended for use over a network. As an express condition for the grants
67
+ of license hereunder, You must treat any External Deployment by You of
68
+ the Original Work or a Derivative Work as a distribution under section
69
+ 1(c).
70
+
71
+ 6) Attribution Rights. You must retain, in the Source Code of any
72
+ Derivative Works that You create, all copyright, patent, or trademark
73
+ notices from the Source Code of the Original Work, as well as any
74
+ notices of licensing and any descriptive text identified therein as an
75
+ "Attribution Notice." You must cause the Source Code for any Derivative
76
+ Works that You create to carry a prominent Attribution Notice reasonably
77
+ calculated to inform recipients that You have modified the Original
78
+ Work.
79
+
80
+ 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants
81
+ that the copyright in and to the Original Work and the patent rights
82
+ granted herein by Licensor are owned by the Licensor or are sublicensed
83
+ to You under the terms of this License with the permission of the
84
+ contributor(s) of those copyrights and patent rights. Except as
85
+ expressly stated in the immediately preceding sentence, the Original
86
+ Work is provided under this License on an "AS IS" BASIS and WITHOUT
87
+ WARRANTY, either express or implied, including, without limitation,
88
+ the warranties of non-infringement, merchantability or fitness for a
89
+ particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
90
+ WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
91
+ part of this License. No license to the Original Work is granted by this
92
+ License except under this disclaimer.
93
+
94
+ 8) Limitation of Liability. Under no circumstances and under no legal
95
+ theory, whether in tort (including negligence), contract, or otherwise,
96
+ shall the Licensor be liable to anyone for any indirect, special,
97
+ incidental, or consequential damages of any character arising as a
98
+ result of this License or the use of the Original Work including,
99
+ without limitation, damages for loss of goodwill, work stoppage,
100
+ computer failure or malfunction, or any and all other commercial damages
101
+ or losses. This limitation of liability shall not apply to the extent
102
+ applicable law prohibits such limitation.
103
+
104
+ 9) Acceptance and Termination. If, at any time, You expressly
105
+ assented to this License, that assent indicates your clear and
106
+ irrevocable acceptance of this License and all of its terms and
107
+ conditions. If You distribute or communicate copies of the Original
108
+ Work or a Derivative Work, You must make a reasonable effort under the
109
+ circumstances to obtain the express assent of recipients to the terms
110
+ of this License. This License conditions your rights to undertake
111
+ the activities listed in Section 1, including your right to create
112
+ Derivative Works based upon the Original Work, and doing so without
113
+ honoring these terms and conditions is prohibited by copyright law and
114
+ international treaty. Nothing in this License is intended to affect
115
+ copyright exceptions and limitations (including "fair use" or "fair
116
+ dealing"). This License shall terminate immediately and You may no
117
+ longer exercise any of the rights granted to You by this License upon
118
+ your failure to honor the conditions in Section 1(c).
119
+
120
+ 10) Termination for Patent Action. This License shall terminate
121
+ automatically and You may no longer exercise any of the rights granted
122
+ to You by this License as of the date You commence an action, including
123
+ a cross-claim or counterclaim, against Licensor or any licensee
124
+ alleging that the Original Work infringes a patent. This termination
125
+ provision shall not apply for an action alleging patent infringement by
126
+ combinations of the Original Work with other software or hardware.
127
+
128
+ 11) Jurisdiction, Venue and Governing Law. Any action or suit relating
129
+ to this License may be brought only in the courts of a jurisdiction
130
+ wherein the Licensor resides or in which Licensor conducts its primary
131
+ business, and under the laws of that jurisdiction excluding its
132
+ conflict-of-law provisions. The application of the United Nations
133
+ Convention on Contracts for the International Sale of Goods is
134
+ expressly excluded. Any use of the Original Work outside the scope
135
+ of this License or after its termination shall be subject to the
136
+ requirements and penalties of copyright or patent law in the appropriate
137
+ jurisdiction. This section shall survive the termination of this
138
+ License.
139
+
140
+ 12) Attorneys' Fees. In any action to enforce the terms of this License
141
+ or seeking damages relating thereto, the prevailing party shall
142
+ be entitled to recover its costs and expenses, including, without
143
+ limitation, reasonable attorneys' fees and costs incurred in connection
144
+ with such action, including any appeal of such action. This section
145
+ shall survive the termination of this License.
146
+
147
+ 13) Miscellaneous. If any provision of this License is held to be
148
+ unenforceable, such provision shall be reformed only to the extent
149
+ necessary to make it enforceable.
150
+
151
+ 14) Definition of "You" in This License. "You" throughout this License,
152
+ whether in upper or lower case, means an individual or a legal entity
153
+ exercising rights under, and complying with all of the terms of, this
154
+ License. For legal entities, "You" includes any entity that controls,
155
+ is controlled by, or is under common control with you. For purposes of
156
+ this definition, "control" means (i) the power, direct or indirect, to
157
+ cause the direction or management of such entity, whether by contract
158
+ or otherwise, or (ii) ownership of fifty percent (50%) or more of the
159
+ outstanding shares, or (iii) beneficial ownership of such entity.
160
+
161
+ 15) Right to Use. You may use the Original Work in all ways not
162
+ otherwise restricted or conditioned by this License or by law, and
163
+ Licensor promises not to interfere with or be responsible for such uses
164
+ by You.
165
+
166
+ 16) Modification of This License. This License is Copyright ©
167
+ 2005 Lawrence Rosen. Permission is granted to copy, distribute, or
168
+ communicate this License without modification. Nothing in this License
169
+ permits You to modify this License as applied to the Original Work or
170
+ to Derivative Works. However, You may modify the text of this License
171
+ and copy, distribute or communicate your modified version (the "Modified
172
+ License") and apply it to other original works of authorship subject
173
+ to the following conditions: (i) You may not indicate in any way that
174
+ your Modified License is the "Academic Free License" or "AFL" and you
175
+ may not use those names in the name of your Modified License; (ii) You
176
+ must replace the notice specified in the first paragraph above with
177
+ the notice "Licensed under <insert your license name here>" or with a
178
+ notice of your own that is not confusingly similar to the notice in
179
+ this License; and (iii) You may not claim that your original works are
180
+ open source software unless your Modified License has been approved by
181
+ Open Source Initiative (OSI) and You comply with its license review and
182
+ certification process.
@@ -0,0 +1,26 @@
1
+ Redistribution and use in source and binary forms, with or without
2
+ modification, are permitted provided that the following conditions are
3
+ met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright
6
+ notice, this list of conditions and the following disclaimer.
7
+
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ 3. Neither the name of the copyright holder nor the names of its
13
+ contributors may be used to endorse or promote products derived from
14
+ this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
22
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/NOTICE CHANGED
@@ -47,6 +47,32 @@ Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
47
47
  Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
48
48
  All modifications are licensed under Apache 2.0 License.
49
49
 
50
+ OpenAPI Specification 2.0
51
+ Copyright The Linux Foundation
52
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/openapi.
53
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
54
+
55
+ OpenAPI Specification 3.0.x
56
+ Copyright The Linux Foundation
57
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/openapi.
58
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
59
+
60
+ OpenAPI Specification 3.1.x
61
+ Copyright The Linux Foundation
62
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/openapi.
63
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
64
+
65
+ AsyncAPI Specification 2.x / AsyncAPI Initiative
66
+ Copyright The Linux Foundation
67
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/asyncapi.
68
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
69
+
70
+ JSON Schema Specification (Draft 4/5 -> 2020-12)
71
+ Copyright (c) 2022 JSON Schema Specification Authors
72
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/common.
73
+ Copy of the BSD 3-Clause "New" or "Revised" License can be found in `LICENSES/BSD-3-Clause.txt` file.
74
+ Copy of the Academic Free License v3.0 can be found in `LICENSES/AFL-3.0.txt` file.
75
+
50
76
  ---
51
77
 
52
78
  If the SPDX-FileCopyrightText and SPDX-License-Identifier tags are not present in the file,
@@ -54,51 +54,39 @@ class ApiDOMAggregateError extends AggregateError {
54
54
 
55
55
  /***/ }),
56
56
 
57
- /***/ 797:
57
+ /***/ 428:
58
58
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59
59
 
60
60
  __webpack_require__.r(__webpack_exports__);
61
61
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
62
62
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
63
63
  /* harmony export */ });
64
- /* harmony import */ var _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
64
+ /* harmony import */ var _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);
65
+
65
66
 
66
67
  /**
67
68
  * @public
68
69
  */
69
- class ApiDOMError extends Error {
70
- static [Symbol.hasInstance](instance) {
71
- // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
72
- return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(_ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__["default"], instance);
73
- }
74
- constructor(message, options) {
75
- super(message, options);
76
- this.name = this.constructor.name;
77
- if (typeof message === 'string') {
78
- this.message = message;
79
- }
80
- if (typeof Error.captureStackTrace === 'function') {
81
- Error.captureStackTrace(this, this.constructor);
82
- } else {
83
- this.stack = new Error(message).stack;
84
- }
70
+ class NotImplementedError extends _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
71
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotImplementedError);
85
72
 
86
- /**
87
- * This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
88
- * Node.js is >= 16.9.0 supports error causes natively.
89
- */
90
- if (options != null && typeof options === 'object' && Object.hasOwn(options, 'cause') && !('cause' in this)) {
91
- const {
92
- cause
93
- } = options;
94
- this.cause = cause;
95
- if (cause instanceof Error && 'stack' in cause) {
96
- this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
97
- }
98
- }
99
- }
100
- }
101
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ApiDOMError);
73
+ /***/ }),
74
+
75
+ /***/ 537:
76
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
77
+
78
+ __webpack_require__.r(__webpack_exports__);
79
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
80
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
81
+ /* harmony export */ });
82
+ /* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
83
+
84
+
85
+ /**
86
+ * @public
87
+ */
88
+ class UnsupportedOperationError extends _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
89
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UnsupportedOperationError);
102
90
 
103
91
  /***/ }),
104
92
 
@@ -130,39 +118,51 @@ class ApiDOMStructuredError extends _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__
130
118
 
131
119
  /***/ }),
132
120
 
133
- /***/ 428:
121
+ /***/ 797:
134
122
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
135
123
 
136
124
  __webpack_require__.r(__webpack_exports__);
137
125
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
138
126
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
139
127
  /* harmony export */ });
140
- /* harmony import */ var _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);
141
-
128
+ /* harmony import */ var _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
142
129
 
143
130
  /**
144
131
  * @public
145
132
  */
146
- class NotImplementedError extends _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
147
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotImplementedError);
148
-
149
- /***/ }),
150
-
151
- /***/ 537:
152
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
153
-
154
- __webpack_require__.r(__webpack_exports__);
155
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
156
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
157
- /* harmony export */ });
158
- /* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
159
-
133
+ class ApiDOMError extends Error {
134
+ static [Symbol.hasInstance](instance) {
135
+ // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
136
+ return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(_ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__["default"], instance);
137
+ }
138
+ constructor(message, options) {
139
+ super(message, options);
140
+ this.name = this.constructor.name;
141
+ if (typeof message === 'string') {
142
+ this.message = message;
143
+ }
144
+ if (typeof Error.captureStackTrace === 'function') {
145
+ Error.captureStackTrace(this, this.constructor);
146
+ } else {
147
+ this.stack = new Error(message).stack;
148
+ }
160
149
 
161
- /**
162
- * @public
163
- */
164
- class UnsupportedOperationError extends _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
165
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UnsupportedOperationError);
150
+ /**
151
+ * This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
152
+ * Node.js is >= 16.9.0 supports error causes natively.
153
+ */
154
+ if (options != null && typeof options === 'object' && Object.hasOwn(options, 'cause') && !('cause' in this)) {
155
+ const {
156
+ cause
157
+ } = options;
158
+ this.cause = cause;
159
+ if (cause instanceof Error && 'stack' in cause) {
160
+ this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
161
+ }
162
+ }
163
+ }
164
+ }
165
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ApiDOMError);
166
166
 
167
167
  /***/ })
168
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swagger-api/apidom-error",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.23",
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": "aa9027fa0a6de3d5a4bf840f120b874d6cdf5ada"
52
+ "gitHead": "e73dc6728c161af2fafd47784d02a89d1ab43557"
53
53
  }