File tree Expand file tree Collapse file tree 3 files changed +24
-23
lines changed Expand file tree Collapse file tree 3 files changed +24
-23
lines changed Original file line number Diff line number Diff line change
1
+ import { DSNComponents , DSNLike , DSNProtocol } from '@sentry/types' ;
1
2
import { SentryError } from './error' ;
2
3
3
4
/** Regular expression used to parse a DSN. */
4
5
const DSN_REGEX = / ^ (?: ( \w + ) : ) \/ \/ (?: ( \w + ) (?: : ( \w + ) ) ? @ ) ( [ \w \. - ] + ) (?: : ( \d + ) ) ? \/ ( .+ ) / ;
5
6
6
- /** Supported Sentry transport protocols in a DSN. */
7
- export type DSNProtocol = 'http' | 'https' ;
8
-
9
- /** Primitive components of a DSN. */
10
- export interface DSNComponents {
11
- /** Protocol used to connect to Sentry. */
12
- protocol : DSNProtocol ;
13
- /** Public authorization key. */
14
- user : string ;
15
- /** Private authorization key (deprecated, optional). */
16
- pass ?: string ;
17
- /** Hostname of the Sentry instance. */
18
- host : string ;
19
- /** Port of the Sentry instance. */
20
- port ?: string ;
21
- /** Project path */
22
- path : string ;
23
- }
24
-
25
- /** Anything that can be parsed into a DSN. */
26
- export type DSNLike = string | DSNComponents ;
27
-
28
7
/** The Sentry DSN, identifying a Sentry instance and project. */
29
8
export class DSN implements DSNComponents {
30
9
/** Protocol used to connect to Sentry. */
Original file line number Diff line number Diff line change 5
5
} from '@sentry/minimal' ;
6
6
export { Hub , Scope } from '@sentry/hub' ;
7
7
export { BackendClass , BaseClient } from './base' ;
8
- export { DSN , DSNComponents , DSNLike , DSNProtocol } from './dsn' ;
8
+ export { DSN } from './dsn' ;
9
9
export { SentryError } from './error' ;
10
10
export { Backend , Client , LogLevel , Options } from './interfaces' ;
11
11
export { initAndBind , ClientClass } from './sdk' ;
Original file line number Diff line number Diff line change
1
+ /** Supported Sentry transport protocols in a DSN. */
2
+ export type DSNProtocol = 'http' | 'https' ;
3
+
4
+ /** Primitive components of a DSN. */
5
+ export interface DSNComponents {
6
+ /** Protocol used to connect to Sentry. */
7
+ protocol : DSNProtocol ;
8
+ /** Public authorization key. */
9
+ user : string ;
10
+ /** Private authorization key (deprecated, optional). */
11
+ pass ?: string ;
12
+ /** Hostname of the Sentry instance. */
13
+ host : string ;
14
+ /** Port of the Sentry instance. */
15
+ port ?: string ;
16
+ /** Project path */
17
+ path : string ;
18
+ }
19
+
20
+ /** Anything that can be parsed into a DSN. */
21
+ export type DSNLike = string | DSNComponents ;
22
+
1
23
/** TODO */
2
24
export enum Severity {
3
25
/** TODO */
You can’t perform that action at this time.
0 commit comments