@webiny/error
Advanced tools
Comparing version 0.0.0-unstable.1e66d121db to 0.0.0-unstable.2696f9d9e8
15
Error.js
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,12 +7,8 @@ value: true | ||
exports.default = void 0; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
class WError extends Error { | ||
code = null; | ||
data = null; | ||
constructor(messageOrOptions, code, data) { | ||
// TODO in TS 4.6 we can move that into if statements | ||
super(typeof messageOrOptions === "string" ? messageOrOptions : messageOrOptions.message); | ||
(0, _defineProperty2.default)(this, "code", null); | ||
(0, _defineProperty2.default)(this, "data", null); | ||
if (typeof messageOrOptions === "string") { | ||
@@ -30,3 +24,2 @@ // super(messageOrOptions); - use after TS 4.6 | ||
} | ||
static from(err, options = {}) { | ||
@@ -39,5 +32,5 @@ return new WError({ | ||
} | ||
} | ||
exports.default = WError; | ||
exports.default = WError; | ||
//# sourceMappingURL=Error.js.map |
"use strict"; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -15,6 +14,6 @@ value: true | ||
exports.default = void 0; | ||
var _Error = _interopRequireWildcard(require("./Error")); | ||
var _default = _Error.default; | ||
exports.default = _default; | ||
var _default = _Error.default; | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@webiny/error", | ||
"version": "0.0.0-unstable.1e66d121db", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/webiny/webiny-js.git" | ||
}, | ||
"description": "A simple multi-database client.", | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public", | ||
"directory": "dist" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.19.3", | ||
"@babel/core": "^7.19.3", | ||
"@webiny/cli": "^0.0.0-unstable.1e66d121db", | ||
"@webiny/project-utils": "^0.0.0-unstable.1e66d121db", | ||
"rimraf": "^3.0.2", | ||
"typescript": "4.7.4" | ||
}, | ||
"scripts": { | ||
"build": "yarn webiny run build", | ||
"watch": "yarn webiny run watch" | ||
}, | ||
"gitHead": "b670bf27c5039de1a2b0be764a09ba4cb94ad5e2" | ||
"name": "@webiny/error", | ||
"version": "0.0.0-unstable.2696f9d9e8", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/webiny/webiny-js.git" | ||
}, | ||
"description": "A simple multi-database client.", | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public", | ||
"directory": "dist" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "7.22.6", | ||
"@babel/core": "7.22.8", | ||
"@webiny/cli": "0.0.0-unstable.2696f9d9e8", | ||
"@webiny/project-utils": "0.0.0-unstable.2696f9d9e8", | ||
"rimraf": "3.0.2", | ||
"ttypescript": "1.5.15", | ||
"typescript": "4.7.4" | ||
}, | ||
"scripts": { | ||
"build": "yarn webiny run build", | ||
"watch": "yarn webiny run watch" | ||
}, | ||
"gitHead": "2696f9d9e84ad621e1412a05e1252b5ca9c245fb" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7338
7