@hawk.so/types 0.1.32-rc.7 → 0.1.32-rc.9
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/build/src/base/event/addons/index.d.ts +3 -2
- package/build/src/base/event/addons/javascript.d.ts +5 -0
- package/build/src/base/event/addons/sentry.d.ts +42 -0
- package/build/src/base/event/addons/sentry.js +2 -0
- package/package.json +1 -1
- package/src/base/event/addons/default.ts +8 -1
- package/src/base/event/addons/index.ts +4 -1
- package/src/base/event/addons/javascript.ts +6 -0
- package/src/base/event/addons/sentry.ts +43 -0
- package/src/catchers/catcher-message.ts +7 -2
|
@@ -4,8 +4,9 @@ import { NodeJSAddons } from './nodejs';
|
|
|
4
4
|
import { GoAddons } from './go';
|
|
5
5
|
import { PythonAddons } from './python';
|
|
6
6
|
import { DefaultAddons } from './default';
|
|
7
|
+
import { SentryAddons } from './sentry';
|
|
7
8
|
/**
|
|
8
9
|
* Union Type describing all catcher-specific additional data
|
|
9
10
|
*/
|
|
10
|
-
declare type EventAddons = DefaultAddons | JavaScriptAddons | PhpAddons | NodeJSAddons | GoAddons | PythonAddons | DefaultAddons;
|
|
11
|
-
export { WindowData, VueIntegrationAddons, BeautifiedUserAgent, ConsoleLogEvent, EventAddons, DefaultAddons, JavaScriptAddons, PhpAddons, NodeJSAddons, GoAddons, PythonAddons, };
|
|
11
|
+
declare type EventAddons = DefaultAddons | JavaScriptAddons | PhpAddons | NodeJSAddons | GoAddons | PythonAddons | DefaultAddons | SentryAddons;
|
|
12
|
+
export { WindowData, VueIntegrationAddons, BeautifiedUserAgent, ConsoleLogEvent, EventAddons, DefaultAddons, JavaScriptAddons, PhpAddons, NodeJSAddons, GoAddons, PythonAddons, SentryAddons, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Json } from '../../../utils';
|
|
2
|
+
import { SentryAddons } from './sentry';
|
|
2
3
|
/**
|
|
3
4
|
* Parsed user agent
|
|
4
5
|
*/
|
|
@@ -85,6 +86,10 @@ export interface JavaScriptAddons {
|
|
|
85
86
|
* Vue integration data
|
|
86
87
|
*/
|
|
87
88
|
vue?: VueIntegrationAddons;
|
|
89
|
+
/**
|
|
90
|
+
* Additional data extracted from the Sentry event addons
|
|
91
|
+
*/
|
|
92
|
+
sentry?: SentryAddons;
|
|
88
93
|
/**
|
|
89
94
|
* Console log events collected from the browser
|
|
90
95
|
*/
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Additional data extracted from the Sentry event payload
|
|
3
|
+
*/
|
|
4
|
+
export interface SentryAddons {
|
|
5
|
+
message?: string;
|
|
6
|
+
logentry?: {
|
|
7
|
+
message?: string;
|
|
8
|
+
params?: string[];
|
|
9
|
+
};
|
|
10
|
+
level?: 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';
|
|
11
|
+
platform?: string;
|
|
12
|
+
logger?: string;
|
|
13
|
+
server_name?: string;
|
|
14
|
+
dist?: string;
|
|
15
|
+
environment?: string;
|
|
16
|
+
request?: {
|
|
17
|
+
url?: string;
|
|
18
|
+
method?: string;
|
|
19
|
+
data?: any;
|
|
20
|
+
query_string?: string | {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
} | Array<[string, string]>;
|
|
23
|
+
cookies?: {
|
|
24
|
+
[key: string]: string;
|
|
25
|
+
};
|
|
26
|
+
env?: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
};
|
|
29
|
+
headers?: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
transaction?: string;
|
|
34
|
+
modules?: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
fingerprint?: string[];
|
|
38
|
+
tags?: {
|
|
39
|
+
[key: string]: number | string | boolean | bigint | symbol | null | undefined;
|
|
40
|
+
};
|
|
41
|
+
extra?: Record<string, unknown>;
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { SentryAddons } from "./sentry";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* This interface represents data that can be additionally collected by Default Catcher
|
|
3
5
|
*/
|
|
4
|
-
export interface DefaultAddons {
|
|
6
|
+
export interface DefaultAddons {
|
|
7
|
+
/**
|
|
8
|
+
* Additional data extracted from the Sentry event addons
|
|
9
|
+
*/
|
|
10
|
+
sentry?: SentryAddons;
|
|
11
|
+
}
|
|
@@ -4,6 +4,7 @@ import { NodeJSAddons } from './nodejs';
|
|
|
4
4
|
import { GoAddons } from './go';
|
|
5
5
|
import { PythonAddons } from './python';
|
|
6
6
|
import { DefaultAddons } from './default';
|
|
7
|
+
import { SentryAddons } from './sentry';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Union Type describing all catcher-specific additional data
|
|
@@ -16,7 +17,8 @@ type EventAddons =
|
|
|
16
17
|
| GoAddons
|
|
17
18
|
| PythonAddons
|
|
18
19
|
| DefaultAddons
|
|
19
|
-
;
|
|
20
|
+
| SentryAddons;
|
|
21
|
+
|
|
20
22
|
|
|
21
23
|
export {
|
|
22
24
|
WindowData,
|
|
@@ -30,4 +32,5 @@ export {
|
|
|
30
32
|
NodeJSAddons,
|
|
31
33
|
GoAddons,
|
|
32
34
|
PythonAddons,
|
|
35
|
+
SentryAddons,
|
|
33
36
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Json } from '../../../utils';
|
|
2
|
+
import { SentryAddons } from './sentry';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Parsed user agent
|
|
@@ -104,6 +105,11 @@ export interface JavaScriptAddons {
|
|
|
104
105
|
*/
|
|
105
106
|
vue?: VueIntegrationAddons;
|
|
106
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Additional data extracted from the Sentry event addons
|
|
110
|
+
*/
|
|
111
|
+
sentry?: SentryAddons;
|
|
112
|
+
|
|
107
113
|
/**
|
|
108
114
|
* Console log events collected from the browser
|
|
109
115
|
*/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* Additional data extracted from the Sentry event payload
|
|
4
|
+
*/
|
|
5
|
+
export interface SentryAddons {
|
|
6
|
+
message?: string;
|
|
7
|
+
logentry?: {
|
|
8
|
+
message?: string;
|
|
9
|
+
params?: string[];
|
|
10
|
+
};
|
|
11
|
+
level?: 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';
|
|
12
|
+
platform?: string;
|
|
13
|
+
logger?: string;
|
|
14
|
+
server_name?: string;
|
|
15
|
+
dist?: string;
|
|
16
|
+
environment?: string;
|
|
17
|
+
request?: {
|
|
18
|
+
url?: string;
|
|
19
|
+
method?: string;
|
|
20
|
+
data?: any;
|
|
21
|
+
query_string?: string | {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
} | Array<[string, string]>;
|
|
24
|
+
cookies?: {
|
|
25
|
+
[key: string]: string;
|
|
26
|
+
};
|
|
27
|
+
env?: {
|
|
28
|
+
[key: string]: string;
|
|
29
|
+
};
|
|
30
|
+
headers?: {
|
|
31
|
+
[key: string]: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
transaction?: string;
|
|
35
|
+
modules?: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
};
|
|
38
|
+
fingerprint?: string[];
|
|
39
|
+
tags?: {
|
|
40
|
+
[key: string]: number | string | boolean | bigint | symbol | null | undefined;
|
|
41
|
+
};
|
|
42
|
+
extra?: Record<string, unknown>;
|
|
43
|
+
}
|
|
@@ -7,13 +7,18 @@ import type {
|
|
|
7
7
|
NodeJSAddons,
|
|
8
8
|
GoAddons,
|
|
9
9
|
PythonAddons,
|
|
10
|
-
DefaultAddons
|
|
10
|
+
DefaultAddons,
|
|
11
11
|
} from '../base/event/addons';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Type that represents all supported Catcher message types for events
|
|
15
15
|
*/
|
|
16
|
-
export type ErrorsCatcherType = 'errors/javascript'
|
|
16
|
+
export type ErrorsCatcherType = 'errors/javascript'
|
|
17
|
+
| 'errors/php'
|
|
18
|
+
| 'errors/nodejs'
|
|
19
|
+
| 'errors/go'
|
|
20
|
+
| 'errors/python'
|
|
21
|
+
| 'errors/default'
|
|
17
22
|
|
|
18
23
|
/**
|
|
19
24
|
* Type that represents all supported Catcher message types for performance
|