errorreporter 1.0.246 → 1.0.249

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/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { ErrorHandler, Issue } from './type';
2
+ export declare const determineGlobalContext: (() => typeof globalThis);
3
+ export declare const globalContext: typeof globalThis;
4
+ export declare const errorHandler: ErrorHandler;
5
+ export declare const BASE_ISSUE: Issue;
6
+ export declare let BROWSER_ISSUE: Issue;
7
+ export default errorHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "errorreporter",
3
- "version": "1.0.246",
3
+ "version": "1.0.249",
4
4
  "description": "Error reporter for client.",
5
5
  "keywords": [
6
6
  "client",
@@ -29,14 +29,14 @@
29
29
  },
30
30
  "scripts": {
31
31
  "build": "yarn build:types; yarn build:plain",
32
- "build:export": "weboptimizer build '{__reference__: \"target:export\"}'",
33
- "build:export:compatible": "weboptimizer build '{__reference__: [\"target:export\", \"target:compatible\"]}'",
32
+ "build:export": "yarn build:types; weboptimizer build '{__reference__: \"target:export\"}'",
33
+ "build:export:compatible": "yarn build:types; weboptimizer build '{__reference__: [\"target:export\", \"target:compatible\"]}'",
34
34
  "build:plain": "weboptimizer build",
35
35
  "build:types": "weboptimizer build:types",
36
36
  "check": "yarn check:types; yarn lint",
37
37
  "check:types": "weboptimizer check:types",
38
38
  "clear": "weboptimizer clear",
39
- "document": "weboptimizer document",
39
+ "document TODO": "weboptimizer document",
40
40
  "lint": "weboptimizer lint",
41
41
  "prepare": "yarn build:export:compatible",
42
42
  "serve": "weboptimizer serve",
@@ -46,7 +46,7 @@
46
46
  "test:coverage": "weboptimizer test:coverage",
47
47
  "test:coverage:report": "weboptimizer test:coverage:report",
48
48
  "update": "yarn version --patch && yarn publish",
49
- "update:documentation": "documentationWebsite --log-level info",
49
+ "update:documentation": "documentation-website",
50
50
  "watch": "weboptimizer build --watch"
51
51
  },
52
52
  "devDependencies": {
package/readme.md CHANGED
@@ -42,7 +42,7 @@ expected.
42
42
 
43
43
  #!HTML
44
44
 
45
- <script src="https://goo.gl/a4b9oS"></script>
45
+ <script src="https://torben.website/errorreporter/data/distributionBundle/index.compiled.js"></script>
46
46
 
47
47
  <!-- region vim modline
48
48
  vim: set tabstop=4 shiftwidth=4 expandtab:
package/type.d.ts ADDED
@@ -0,0 +1,46 @@
1
+ import { Mapping, RecursivePartial } from 'clientnode/type';
2
+ export interface Issue<Type = string> {
3
+ errorMessage: Type;
4
+ technologyDescription: Type;
5
+ ua: Type;
6
+ browser?: {
7
+ name: Type;
8
+ version: Type;
9
+ major: Type;
10
+ };
11
+ cpu?: {
12
+ architecture: Type;
13
+ };
14
+ device?: {
15
+ model?: Type;
16
+ type?: Type;
17
+ vendor?: Type;
18
+ };
19
+ engine: {
20
+ name: Type;
21
+ version: Type;
22
+ };
23
+ os: {
24
+ name: Type;
25
+ version: Type;
26
+ };
27
+ }
28
+ export interface BaseLocation {
29
+ hostname: string;
30
+ href: string;
31
+ port?: string;
32
+ protocol: string;
33
+ }
34
+ export declare type IssueSpecification<Type = null | RegExp | string> = RecursivePartial<Issue<Type>>;
35
+ export declare type NativeErrorHandler = (errorMessage: Event | string, url?: string, lineNumber?: number, columnNumber?: number, error?: Error, ...additionalParameter: Array<unknown>) => (false | void);
36
+ export declare type ErrorHandler = NativeErrorHandler & {
37
+ additionalIssuesToIgnore: Array<IssueSpecification>;
38
+ callbackBackup: NativeErrorHandler;
39
+ failedHandler: (error: Error) => void;
40
+ issuesToIgnore: Array<IssueSpecification>;
41
+ issueToIgnoreHandler: (issue: Issue, issueToIgnore: IssueSpecification) => void;
42
+ location: BaseLocation;
43
+ reported: Mapping<true>;
44
+ reportedHandler: (response: Response) => Promise<void> | void;
45
+ reportPath: string;
46
+ };