You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@swagger-api/apidom-error

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swagger-api/apidom-error - npm Package Compare versions

Comparing version
1.5.0
to
1.5.1
+4
-0
CHANGELOG.md

@@ -6,2 +6,6 @@ # Change Log

## [1.5.1](https://github.com/swagger-api/apidom/compare/v1.5.0...v1.5.1) (2026-02-19)
**Note:** Version bump only for package @swagger-api/apidom-error
# [1.5.0](https://github.com/swagger-api/apidom/compare/v1.4.0...v1.5.0) (2026-02-16)

@@ -8,0 +12,0 @@

+79
-233

@@ -1,249 +0,95 @@

(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["apidomError"] = factory();
else
root["apidomError"] = factory();
})(self, () => {
return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
(function (global, factory) {
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 = {}));
})(this, (function (exports) { 'use strict';
/***/ 172:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
class ApiDOMAggregateError extends AggregateError {
constructor(errors, message, options) {
super(errors, message, options);
this.name = this.constructor.name;
if (typeof message === "string") {
this.message = message;
}
if (typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(message).stack;
}
if (options != null && typeof options === "object" && Object.hasOwn(options, "cause") && !("cause" in this)) {
const { cause } = options;
this.cause = cause;
if (cause instanceof Error && "stack" in cause) {
this.stack = `${this.stack}
CAUSE: ${cause.stack}`;
}
}
}
}
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**
* @public
*/
class ApiDOMAggregateError extends AggregateError {
constructor(errors, message, options) {
super(errors, message, options);
this.name = this.constructor.name;
if (typeof message === 'string') {
this.message = message;
class ApiDOMError extends Error {
static [Symbol.hasInstance](instance) {
return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(ApiDOMAggregateError, instance);
}
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(message).stack;
}
/**
* This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
* Node.js >= 16.9.0 supports error causes natively.
*/
if (options != null && typeof options === 'object' && Object.hasOwn(options, 'cause') && !('cause' in this)) {
const {
cause
} = options;
this.cause = cause;
if (cause instanceof Error && 'stack' in cause) {
this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
if (typeof message === "string") {
this.message = message;
}
if (typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(message).stack;
}
if (options != null && typeof options === "object" && Object.hasOwn(options, "cause") && !("cause" in this)) {
const { cause } = options;
this.cause = cause;
if (cause instanceof Error && "stack" in cause) {
this.stack = `${this.stack}
CAUSE: ${cause.stack}`;
}
}
}
}
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ApiDOMAggregateError);
/***/ }),
/***/ 428:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(537);
/**
* @public
*/
class NotImplementedError extends _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotImplementedError);
/***/ }),
/***/ 537:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
/**
* @public
*/
class UnsupportedOperationError extends _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UnsupportedOperationError);
/***/ }),
/***/ 672:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
/**
* @public
*/
class ApiDOMStructuredError extends _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"] {
constructor(message, structuredOptions) {
super(message, structuredOptions);
if (structuredOptions != null && typeof structuredOptions === 'object') {
const {
cause,
...causelessOptions
} = structuredOptions;
Object.assign(this, causelessOptions);
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
class ApiDOMStructuredError extends ApiDOMError {
constructor(message, structuredOptions) {
super(message, structuredOptions);
if (structuredOptions != null && typeof structuredOptions === "object") {
const _a = structuredOptions, { cause } = _a, causelessOptions = __objRest(_a, ["cause"]);
Object.assign(this, causelessOptions);
}
}
}
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ApiDOMStructuredError);
/***/ }),
/***/ 797:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
/**
* @public
*/
class ApiDOMError extends Error {
static [Symbol.hasInstance](instance) {
// we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass
return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(_ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_0__["default"], instance);
class UnsupportedOperationError extends ApiDOMError {
}
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
if (typeof message === 'string') {
this.message = message;
}
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(message).stack;
}
/**
* This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.
* Node.js is >= 16.9.0 supports error causes natively.
*/
if (options != null && typeof options === 'object' && Object.hasOwn(options, 'cause') && !('cause' in this)) {
const {
cause
} = options;
this.cause = cause;
if (cause instanceof Error && 'stack' in cause) {
this.stack = `${this.stack}\nCAUSE: ${cause.stack}`;
}
}
class NotImplementedError extends UnsupportedOperationError {
}
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ApiDOMError);
/***/ })
exports.ApiDOMAggregateError = ApiDOMAggregateError;
exports.ApiDOMError = ApiDOMError;
exports.ApiDOMStructuredError = ApiDOMStructuredError;
exports.NotImplementedError = NotImplementedError;
exports.UnsupportedOperationError = UnsupportedOperationError;
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ApiDOMAggregateError: () => (/* reexport safe */ _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_1__["default"]),
/* harmony export */ ApiDOMError: () => (/* reexport safe */ _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__["default"]),
/* harmony export */ ApiDOMStructuredError: () => (/* reexport safe */ _ApiDOMStructuredError_ts__WEBPACK_IMPORTED_MODULE_2__["default"]),
/* harmony export */ NotImplementedError: () => (/* reexport safe */ _NotImplementedError_ts__WEBPACK_IMPORTED_MODULE_4__["default"]),
/* harmony export */ UnsupportedOperationError: () => (/* reexport safe */ _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_3__["default"])
/* harmony export */ });
/* harmony import */ var _ApiDOMError_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(797);
/* harmony import */ var _ApiDOMAggregateError_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172);
/* harmony import */ var _ApiDOMStructuredError_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(672);
/* harmony import */ var _UnsupportedOperationError_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(537);
/* harmony import */ var _NotImplementedError_ts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(428);
// base error classes
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
// generic custom error classes
/******/ return __webpack_exports__;
/******/ })()
;
});
}));

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apidomError=e():t.apidomError=e()}(self,(()=>(()=>{"use strict";var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{ApiDOMAggregateError:()=>s,ApiDOMError:()=>c,ApiDOMStructuredError:()=>n,NotImplementedError:()=>i,UnsupportedOperationError:()=>a});class r extends AggregateError{constructor(t,e,r){if(super(t,e,r),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=r&&"object"==typeof r&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:t}=r;this.cause=t,t instanceof Error&&"stack"in t&&(this.stack=`${this.stack}\nCAUSE: ${t.stack}`)}}}const s=r;class o extends Error{static[Symbol.hasInstance](t){return super[Symbol.hasInstance](t)||Function.prototype[Symbol.hasInstance].call(s,t)}constructor(t,e){if(super(t,e),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!=e&&"object"==typeof e&&Object.hasOwn(e,"cause")&&!("cause"in this)){const{cause:t}=e;this.cause=t,t instanceof Error&&"stack"in t&&(this.stack=`${this.stack}\nCAUSE: ${t.stack}`)}}}const c=o;const n=class extends c{constructor(t,e){if(super(t,e),null!=e&&"object"==typeof e){const{cause:t,...r}=e;Object.assign(this,r)}}};const a=class extends c{};const i=class extends a{};return e})()));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).apidomError={})}(this,(function(t){"use strict";class e extends AggregateError{constructor(t,e,r){if(super(t,e,r),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=r&&"object"==typeof r&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:t}=r;this.cause=t,t instanceof Error&&"stack"in t&&(this.stack=`${this.stack}\nCAUSE: ${t.stack}`)}}}class r extends Error{static[Symbol.hasInstance](t){return super[Symbol.hasInstance](t)||Function.prototype[Symbol.hasInstance].call(e,t)}constructor(t,e){if(super(t,e),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!=e&&"object"==typeof e&&Object.hasOwn(e,"cause")&&!("cause"in this)){const{cause:t}=e;this.cause=t,t instanceof Error&&"stack"in t&&(this.stack=`${this.stack}\nCAUSE: ${t.stack}`)}}}var s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;class n extends r{}t.ApiDOMAggregateError=e,t.ApiDOMError=r,t.ApiDOMStructuredError=class extends r{constructor(t,e){if(super(t,e),null!=e&&"object"==typeof e){const t=e,{cause:r}=t,n=((t,e)=>{var r={};for(var n in t)o.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&s)for(var n of s(t))e.indexOf(n)<0&&c.call(t,n)&&(r[n]=t[n]);return r})(t,["cause"]);Object.assign(this,n)}}},t.NotImplementedError=class extends n{},t.UnsupportedOperationError=n,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
{
"name": "@swagger-api/apidom-error",
"version": "1.5.0",
"version": "1.5.1",
"description": "Backward compatible custom ApiDOM errors with causes.",

@@ -20,6 +20,6 @@ "publishConfig": {

"scripts": {
"build": "npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:es build:cjs build:umd:browser",
"build": "npm run clean && run-p --max-parallel ${CPU_CORES:-6} typescript:declaration build:es build:cjs build:umd:browser",
"build:es": "cross-env BABEL_ENV=es babel src --out-dir src --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'",
"build:cjs": "cross-env BABEL_ENV=cjs babel src --out-dir src --extensions '.ts' --out-file-extension '.cjs' --root-mode 'upward'",
"build:umd:browser": "cross-env BABEL_ENV=browser webpack --config config/webpack/browser.config.js --progress",
"build:umd:browser": "vite build",
"lint": "eslint ./",

@@ -53,3 +53,3 @@ "lint:fix": "eslint ./ --fix",

],
"gitHead": "4bfa97c2350c1c3daa6a8a5ed002786f066b7729"
"gitHead": "103cc50a692501bc3101c2935a939c22c535471f"
}