jwplayer-errors
Advanced tools
Comparing version 1.0.3 to 2.0.0
@@ -1,13 +0,10 @@ | ||
import build from './src/error'; | ||
import * as Category from './src/category'; | ||
import * as Code from './src/code'; | ||
import * as Severity from './src/severity'; | ||
import * as Data from './src/data'; | ||
export default { | ||
build, | ||
export { NetworkError } from './src/builders/network-error'; | ||
export { | ||
Category, | ||
Code, | ||
Severity, | ||
Data | ||
Severity | ||
}; |
{ | ||
"name": "jwplayer-errors", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "A standardized set of errors used by JWPlayer", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "eslint ./src" | ||
"lint": "eslint ./src", | ||
"docs": "node makedoc.js" | ||
}, | ||
@@ -12,4 +13,5 @@ "author": "Player Team", | ||
"devDependencies": { | ||
"eslint": "^3.19.0" | ||
"eslint": "^3.19.0", | ||
"jsdoc-to-markdown": "^3.0.0" | ||
} | ||
} |
@@ -7,2 +7,5 @@ # JWPlayer Errors | ||
## API Docs | ||
[Here!](./docs/api.md) | ||
## Usage | ||
@@ -56,2 +59,5 @@ ### Importing | ||
## API | ||
@@ -0,5 +1,35 @@ | ||
/** | ||
* Categories are numerical values which represent a class of errors | ||
* @module Category | ||
* */ | ||
/** | ||
* An error caused by a problem within the Player | ||
* @type {number} | ||
* @default 1 | ||
* */ | ||
export const PLAYER = 1; | ||
/** | ||
* An error caused by a problem within the Player's setup process | ||
* @type {number} | ||
* @default 2 | ||
* */ | ||
export const SETUP = 2; | ||
/** | ||
* An error caused by a problem with the media | ||
* @type {number} | ||
* @default 3 | ||
* */ | ||
export const MEDIA = 3; | ||
/** | ||
* An error caused by a network request | ||
* @type {number} | ||
* @default 4 | ||
* */ | ||
export const NETWORK = 4; | ||
/** | ||
* An error caused by an ad | ||
* @type {number} | ||
* @default 5 | ||
* */ | ||
export const AD = 5; |
@@ -1,6 +0,23 @@ | ||
// An HTTP request returned with a status indicating failure | ||
/** | ||
* Codes are numerical values which represent a specific error | ||
* @module Code | ||
* */ | ||
/** | ||
* A network request returned with an HTTP status indicating failure | ||
* @constant {number} | ||
* @default 4001 | ||
* */ | ||
export const BAD_HTTP_STATUS = 4001; | ||
// Crossdomain error | ||
/** | ||
* A network request was made without proper crossdomain credentials | ||
* @type {number} | ||
* @default 4002 | ||
* */ | ||
export const CROSSDOMAIN_ERROR = 4002; | ||
// Accessing HTTP over HTTPS | ||
/** | ||
* A network request was made to an HTTP resource from HTTPS | ||
* @type {number} | ||
* @default 4003 | ||
* */ | ||
export const BLOCKED_MIXED_CONTENT = 4003; |
@@ -1,2 +0,17 @@ | ||
export const RECOVERABLE = 1; | ||
/** | ||
* A numerical value indicating if the error is able to be recovered | ||
* @module Severity | ||
* */ | ||
/** | ||
* An error which can be recovered | ||
* @constant {number} | ||
* @default 1 | ||
* */ | ||
export const RECOVERABLE = 1; | ||
/** | ||
* An error which cannot be recovered | ||
* @constant {number} | ||
* @default 2 | ||
* */ | ||
export const FATAL = 2; |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
14117
13
227
62
2
2
1