flex-plugins-utils-exception
Advanced tools
Comparing version 0.19.0 to 4.5.1-dev.202103291654
export { default as TwilioError } from './lib/TwilioError'; | ||
export { default as TwilioApiError } from './lib/TwilioApiError'; | ||
export { default as NotImplementedError } from './lib/NotImplementedError'; | ||
export { default as TwilioCliError } from './lib/TwilioCliError'; |
"use strict"; | ||
/* eslint-disable import/no-unused-modules */ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TwilioCliError = exports.NotImplementedError = exports.TwilioApiError = exports.TwilioError = void 0; | ||
var TwilioError_1 = require("./lib/TwilioError"); | ||
Object.defineProperty(exports, "TwilioError", { enumerable: true, get: function () { return TwilioError_1.default; } }); | ||
Object.defineProperty(exports, "TwilioError", { enumerable: true, get: function () { return __importDefault(TwilioError_1).default; } }); | ||
var TwilioApiError_1 = require("./lib/TwilioApiError"); | ||
Object.defineProperty(exports, "TwilioApiError", { enumerable: true, get: function () { return TwilioApiError_1.default; } }); | ||
Object.defineProperty(exports, "TwilioApiError", { enumerable: true, get: function () { return __importDefault(TwilioApiError_1).default; } }); | ||
var NotImplementedError_1 = require("./lib/NotImplementedError"); | ||
Object.defineProperty(exports, "NotImplementedError", { enumerable: true, get: function () { return __importDefault(NotImplementedError_1).default; } }); | ||
var TwilioCliError_1 = require("./lib/TwilioCliError"); | ||
Object.defineProperty(exports, "TwilioCliError", { enumerable: true, get: function () { return __importDefault(TwilioCliError_1).default; } }); | ||
//# sourceMappingURL=index.js.map |
import TwilioError from './TwilioError'; | ||
/** | ||
*w | ||
* A Twilio REST API Error response | ||
* @link https://www.twilio.com/docs/usage/twilios-response#response-formats-exceptions | ||
*/ | ||
export default class TwilioApiError extends TwilioError { | ||
@@ -3,0 +8,0 @@ readonly code: number; |
@@ -6,6 +6,8 @@ "use strict"; | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -21,3 +23,8 @@ function __() { this.constructor = d; } | ||
var TwilioError_1 = __importDefault(require("./TwilioError")); | ||
var TwilioApiError = (function (_super) { | ||
/** | ||
*w | ||
* A Twilio REST API Error response | ||
* @link https://www.twilio.com/docs/usage/twilios-response#response-formats-exceptions | ||
*/ | ||
var TwilioApiError = /** @class */ (function (_super) { | ||
__extends(TwilioApiError, _super); | ||
@@ -24,0 +31,0 @@ function TwilioApiError(code, message, status, moreInfo) { |
export declare type Constructable<T> = new (...args: any[]) => T; | ||
/** | ||
* Base class for all errors generated by the script | ||
*/ | ||
export default class TwilioError extends Error { | ||
constructor(msg?: string); | ||
/** | ||
* Returns whether this is the instance of the passed class | ||
* @param klass the error class to test for | ||
*/ | ||
instanceOf: <T extends Error>(klass: Constructable<T>) => boolean; | ||
} |
@@ -6,6 +6,8 @@ "use strict"; | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -17,7 +19,15 @@ function __() { this.constructor = d; } | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var TwilioError = (function (_super) { | ||
/** | ||
* Base class for all errors generated by the script | ||
*/ | ||
var TwilioError = /** @class */ (function (_super) { | ||
__extends(TwilioError, _super); | ||
function TwilioError(msg) { | ||
var _this = _super.call(this, msg) || this; | ||
/** | ||
* Returns whether this is the instance of the passed class | ||
* @param klass the error class to test for | ||
*/ | ||
_this.instanceOf = function (klass) { | ||
// eslint-disable-next-line consistent-this, @typescript-eslint/no-this-alias | ||
var instance = _this; | ||
@@ -24,0 +34,0 @@ while (instance && instance !== Object.prototype) { |
{ | ||
"name": "flex-plugins-utils-exception", | ||
"version": "0.19.0", | ||
"version": "4.5.1-dev.202103291654", | ||
"description": "Flex Plugins Exceptions", | ||
@@ -10,9 +10,9 @@ "keywords": [ | ||
], | ||
"homepage": "https://github.com/twilio/flex-plugins-utils-exception#readme", | ||
"homepage": "https://github.com/twilio/flex-plugin-builder", | ||
"bugs": { | ||
"url": "https://github.com/twilio/flex-plugins-utils-exception/issues" | ||
"url": "https://github.com/twilio/flex-plugin-builder/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/twilio/flex-plugins-utils-exception.git" | ||
"url": "git+https://github.com/twilio/flex-plugin-builder.git" | ||
}, | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
"prebuild": "npm run clean", | ||
"build": "tsc", | ||
"build": "../../node_modules/.bin/tsc", | ||
"clean": "rm -rf dist", | ||
@@ -41,6 +41,6 @@ "lint": "eslint --ext ts src/", | ||
"prepublish": "npm run build", | ||
"test": "cd ../.. && jest packages/flex-plugins-utils-exception", | ||
"test:watch": "cd ../.. && jest packages/flex-plugins-utils-exception --watch" | ||
"test": "cd ../.. && jest packages/flex-dev-utils --color", | ||
"test:watch": "cd ../.. && jest packages/flex-dev-utils --watch --color" | ||
}, | ||
"gitHead": "c30bba85fc858f3833333201ea50a74a4b584702" | ||
"gitHead": "43ac792b54fcf24aba4a5c4dddfb47760ee5a5ce" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
14147
18
202
0
1