rollbar 2.26.2 → 2.26.4
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/.github/workflows/ci.yml +32 -10
- package/.lgtm.yml +7 -7
- package/.prettierignore +18 -0
- package/.vscode/settings.json +39 -0
- package/CHANGELOG.md +121 -35
- package/Gruntfile.js +51 -71
- package/README.md +2 -4
- package/bower.json +1 -3
- package/defaults.js +17 -5
- package/dist/plugins/jquery.min.js +1 -1
- package/dist/rollbar.js +5699 -5052
- package/dist/rollbar.js.map +1 -1
- package/dist/rollbar.min.js +1 -1
- package/dist/rollbar.min.js.map +1 -1
- package/dist/rollbar.named-amd.js +5704 -5062
- package/dist/rollbar.named-amd.js.map +1 -1
- package/dist/rollbar.named-amd.min.js +1 -1
- package/dist/rollbar.named-amd.min.js.map +1 -1
- package/dist/rollbar.noconflict.umd.js +5693 -5052
- package/dist/rollbar.noconflict.umd.js.map +1 -1
- package/dist/rollbar.noconflict.umd.min.js +1 -1
- package/dist/rollbar.noconflict.umd.min.js.map +1 -1
- package/dist/rollbar.snippet.js +1 -1
- package/dist/rollbar.umd.js +5704 -5063
- package/dist/rollbar.umd.js.map +1 -1
- package/dist/rollbar.umd.min.js +1 -1
- package/dist/rollbar.umd.min.js.map +1 -1
- package/docs/extension-exceptions.md +35 -30
- package/docs/migration_v0_to_v1.md +41 -38
- package/index.d.ts +270 -231
- package/karma.conf.js +16 -34
- package/package.json +21 -17
- package/prettier.config.js +7 -0
- package/src/api.js +21 -10
- package/src/apiUtility.js +12 -8
- package/src/browser/core.js +103 -65
- package/src/browser/defaults/scrubFields.js +3 -3
- package/src/browser/detection.js +7 -8
- package/src/browser/domUtility.js +18 -8
- package/src/browser/globalSetup.js +12 -6
- package/src/browser/logger.js +1 -1
- package/src/browser/plugins/jquery.js +35 -35
- package/src/browser/predicates.js +1 -1
- package/src/browser/rollbar.js +1 -1
- package/src/browser/rollbarWrapper.js +8 -5
- package/src/browser/shim.js +43 -19
- package/src/browser/snippet_callback.js +6 -4
- package/src/browser/telemetry.js +573 -354
- package/src/browser/transforms.js +46 -27
- package/src/browser/transport/fetch.js +16 -14
- package/src/browser/transport/xhr.js +29 -13
- package/src/browser/transport.js +82 -25
- package/src/browser/url.js +16 -8
- package/src/browser/wrapGlobals.js +27 -8
- package/src/defaults.js +3 -3
- package/src/errorParser.js +14 -11
- package/src/merge.js +32 -23
- package/src/notifier.js +16 -13
- package/src/predicates.js +43 -23
- package/src/queue.js +71 -39
- package/src/rateLimiter.js +59 -18
- package/src/react-native/logger.js +1 -1
- package/src/react-native/rollbar.js +59 -55
- package/src/react-native/transforms.js +13 -9
- package/src/react-native/transport.js +44 -34
- package/src/rollbar.js +22 -13
- package/src/scrub.js +0 -1
- package/src/server/locals.js +69 -39
- package/src/server/logger.js +4 -4
- package/src/server/parser.js +72 -47
- package/src/server/rollbar.js +133 -55
- package/src/server/sourceMap/stackTrace.js +33 -18
- package/src/server/telemetry/urlHelpers.js +9 -11
- package/src/server/telemetry.js +68 -45
- package/src/server/transforms.js +37 -21
- package/src/server/transport.js +62 -32
- package/src/telemetry.js +92 -28
- package/src/transforms.js +33 -21
- package/src/truncation.js +8 -5
- package/src/utility/headers.js +43 -43
- package/src/utility/replace.js +9 -0
- package/src/utility/traverse.js +1 -1
- package/src/utility.js +89 -52
- package/test/api.test.js +31 -29
- package/test/apiUtility.test.js +43 -44
- package/test/browser.core.test.js +141 -131
- package/test/browser.domUtility.test.js +52 -35
- package/test/browser.predicates.test.js +13 -13
- package/test/browser.rollbar.test.js +597 -503
- package/test/browser.telemetry.test.js +76 -0
- package/test/browser.transforms.test.js +146 -128
- package/test/browser.transport.test.js +54 -46
- package/test/browser.url.test.js +12 -11
- package/test/fixtures/locals.fixtures.js +245 -126
- package/test/notifier.test.js +90 -78
- package/test/predicates.test.js +260 -214
- package/test/queue.test.js +230 -214
- package/test/rateLimiter.test.js +50 -42
- package/test/react-native.rollbar.test.js +149 -115
- package/test/react-native.transforms.test.js +21 -23
- package/test/react-native.transport.test.js +23 -11
- package/test/server.lambda.test.js +70 -53
- package/test/server.locals.test.js +437 -210
- package/test/server.parser.test.js +32 -26
- package/test/server.predicates.test.js +45 -43
- package/test/server.rollbar.test.js +311 -259
- package/test/server.telemetry.test.js +208 -83
- package/test/server.transforms.test.js +455 -361
- package/test/server.transport.test.js +144 -76
- package/test/telemetry.test.js +46 -37
- package/test/transforms.test.js +68 -66
- package/test/truncation.test.js +55 -53
- package/test/utility.test.js +266 -222
- package/webpack.config.js +46 -43
- package/.gitmodules +0 -3
- package/browserstack.browsers.js +0 -153
- package/browserstack.browsers.json +0 -4384
package/index.d.ts
CHANGED
|
@@ -4,255 +4,294 @@
|
|
|
4
4
|
export = Rollbar;
|
|
5
5
|
|
|
6
6
|
declare class Rollbar {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
constructor(options?: Rollbar.Configuration);
|
|
8
|
+
static init(options: Rollbar.Configuration): Rollbar;
|
|
9
|
+
static setComponents(components: Rollbar.Components): void;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
public global(options: Rollbar.Configuration): Rollbar;
|
|
12
|
+
public configure(options: Rollbar.Configuration): Rollbar;
|
|
13
|
+
public lastError(): Rollbar.MaybeError;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
public log(...args: Rollbar.LogArgument[]): Rollbar.LogResult;
|
|
16
|
+
public debug(...args: Rollbar.LogArgument[]): Rollbar.LogResult;
|
|
17
|
+
public info(...args: Rollbar.LogArgument[]): Rollbar.LogResult;
|
|
18
|
+
public warn(...args: Rollbar.LogArgument[]): Rollbar.LogResult;
|
|
19
|
+
public warning(...args: Rollbar.LogArgument[]): Rollbar.LogResult;
|
|
20
|
+
public error(...args: Rollbar.LogArgument[]): Rollbar.LogResult;
|
|
21
|
+
public critical(...args: Rollbar.LogArgument[]): Rollbar.LogResult;
|
|
22
|
+
public wait(callback: () => void): void;
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
public captureEvent(
|
|
25
|
+
metadata: object,
|
|
26
|
+
level: Rollbar.Level,
|
|
27
|
+
): Rollbar.TelemetryEvent;
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
public lambdaHandler<T = object>(
|
|
30
|
+
handler: Rollbar.LambdaHandler<T>,
|
|
31
|
+
): Rollbar.LambdaHandler<T>;
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
public errorHandler(): Rollbar.ExpressErrorHandler;
|
|
29
34
|
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
// Used with rollbar-react for rollbar-react-native compatibility.
|
|
36
|
+
public rollbar: Rollbar;
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
// Exposed only for testing, should be changed via the configure method
|
|
39
|
+
// DO NOT MODIFY DIRECTLY
|
|
40
|
+
public options: Rollbar.Configuration;
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
declare namespace Rollbar {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
export type LambdaHandler<TEvent = any, TResult = any, TContext = any> = (
|
|
45
|
+
event: TEvent,
|
|
46
|
+
context: TContext,
|
|
47
|
+
callback: Callback<TResult>,
|
|
48
|
+
) => void | Promise<TResult>;
|
|
49
|
+
export type MaybeError = Error | undefined | null;
|
|
50
|
+
export type Level = 'debug' | 'info' | 'warning' | 'error' | 'critical';
|
|
51
|
+
export type Dictionary = { [key: string]: unknown };
|
|
52
|
+
/**
|
|
53
|
+
* {@link https://docs.rollbar.com/docs/rollbarjs-configuration-reference#reference}
|
|
54
|
+
*/
|
|
55
|
+
export interface Configuration {
|
|
56
|
+
accessToken?: string;
|
|
57
|
+
addErrorContext?: boolean;
|
|
58
|
+
addRequestData?: (data: Dictionary, req: Dictionary) => void;
|
|
59
|
+
autoInstrument?: AutoInstrumentOptions;
|
|
60
|
+
captureDeviceInfo?: boolean;
|
|
61
|
+
captureEmail?: boolean;
|
|
62
|
+
captureIp?: boolean | 'anonymize';
|
|
63
|
+
captureLambdaTimeouts?: boolean;
|
|
64
|
+
captureUncaught?: boolean;
|
|
65
|
+
captureUnhandledRejections?: boolean;
|
|
66
|
+
captureUsername?: boolean;
|
|
67
|
+
checkIgnore?: (
|
|
68
|
+
isUncaught: boolean,
|
|
69
|
+
args: LogArgument[],
|
|
70
|
+
item: Dictionary,
|
|
71
|
+
) => boolean;
|
|
47
72
|
/**
|
|
48
|
-
*
|
|
73
|
+
* `codeVersion` takes precedence over `code_version`, if provided.
|
|
74
|
+
* `client.javascript.code_version` takes precedence over both top level properties.
|
|
49
75
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
76
|
+
codeVersion?: string;
|
|
77
|
+
/**
|
|
78
|
+
* `codeVersion` takes precedence over `code_version`, if provided.
|
|
79
|
+
* `client.javascript.code_version` takes precedence over both top level properties.
|
|
80
|
+
*/
|
|
81
|
+
code_version?: string;
|
|
82
|
+
enabled?: boolean;
|
|
83
|
+
endpoint?: string;
|
|
84
|
+
exitOnUncaughtException?: boolean;
|
|
85
|
+
environment?: string;
|
|
86
|
+
filterTelemetry?: (e: TelemetryEvent) => boolean;
|
|
87
|
+
host?: string; // used in node only
|
|
88
|
+
hostBlackList?: string[]; // deprecated
|
|
89
|
+
hostBlockList?: string[];
|
|
90
|
+
hostWhiteList?: string[]; // deprecated
|
|
91
|
+
hostSafeList?: string[];
|
|
92
|
+
ignoredMessages?: (string | RegExp)[];
|
|
93
|
+
ignoreDuplicateErrors?: boolean;
|
|
94
|
+
includeItemsInTelemetry?: boolean;
|
|
95
|
+
inspectAnonymousErrors?: boolean;
|
|
96
|
+
itemsPerMinute?: number;
|
|
97
|
+
locals?: LocalsOptions;
|
|
98
|
+
logLevel?: Level;
|
|
99
|
+
maxItems?: number;
|
|
100
|
+
maxRetries?: number;
|
|
101
|
+
maxTelemetryEvents?: number;
|
|
102
|
+
nodeSourceMaps?: boolean;
|
|
103
|
+
onSendCallback?: (
|
|
104
|
+
isUncaught: boolean,
|
|
105
|
+
args: LogArgument[],
|
|
106
|
+
item: Dictionary,
|
|
107
|
+
) => void;
|
|
108
|
+
overwriteScrubFields?: boolean;
|
|
109
|
+
payload?: Payload;
|
|
110
|
+
reportLevel?: Level;
|
|
111
|
+
retryInterval?: number | null;
|
|
112
|
+
rewriteFilenamePatterns?: string[];
|
|
113
|
+
scrubFields?: string[];
|
|
114
|
+
scrubHeaders?: string[];
|
|
115
|
+
scrubPaths?: string[];
|
|
116
|
+
scrubRequestBody?: boolean;
|
|
117
|
+
scrubTelemetryInputs?: boolean;
|
|
118
|
+
sendConfig?: boolean;
|
|
119
|
+
stackTraceLimit?: number;
|
|
120
|
+
telemetryScrubber?: TelemetryScrubber;
|
|
121
|
+
timeout?: number;
|
|
122
|
+
transform?: (data: Dictionary, item: Dictionary) => void | Promise<void>;
|
|
123
|
+
transmit?: boolean;
|
|
124
|
+
uncaughtErrorLevel?: Level;
|
|
125
|
+
verbose?: boolean;
|
|
126
|
+
version?: string;
|
|
127
|
+
wrapGlobalEventHandlers?: boolean;
|
|
128
|
+
}
|
|
129
|
+
export type Callback<TResponse = any> = (
|
|
130
|
+
err: MaybeError,
|
|
131
|
+
response: TResponse,
|
|
132
|
+
) => void;
|
|
133
|
+
export type LogArgument =
|
|
134
|
+
| string
|
|
135
|
+
| Error
|
|
136
|
+
| object
|
|
137
|
+
| Dictionary
|
|
138
|
+
| Callback
|
|
139
|
+
| Date
|
|
140
|
+
| any[]
|
|
141
|
+
| undefined;
|
|
142
|
+
export interface LogResult {
|
|
143
|
+
uuid: string;
|
|
144
|
+
}
|
|
145
|
+
export interface TelemetryEvent {
|
|
146
|
+
level: Level;
|
|
147
|
+
type: string;
|
|
148
|
+
timestamp_ms: number;
|
|
149
|
+
body: Dictionary;
|
|
150
|
+
source: string;
|
|
151
|
+
uuid?: string;
|
|
152
|
+
}
|
|
153
|
+
export type AutoInstrumentOptions = boolean | AutoInstrumentSettings;
|
|
154
|
+
export interface AutoInstrumentSettings {
|
|
155
|
+
network?: boolean;
|
|
156
|
+
networkResponseHeaders?: boolean | string[];
|
|
157
|
+
networkResponseBody?: boolean;
|
|
158
|
+
networkRequestBody?: boolean;
|
|
159
|
+
log?: boolean;
|
|
160
|
+
dom?: boolean;
|
|
161
|
+
navigation?: boolean;
|
|
162
|
+
connectivity?: boolean;
|
|
163
|
+
contentSecurityPolicy?: boolean;
|
|
164
|
+
errorOnContentSecurityPolicy?: boolean;
|
|
165
|
+
}
|
|
166
|
+
export type TelemetryScrubber = (
|
|
167
|
+
description: TelemetryScrubberInput,
|
|
168
|
+
) => boolean;
|
|
169
|
+
export type TelemetryScrubberInput = DomDescription | null;
|
|
170
|
+
export interface DomDescription {
|
|
171
|
+
tagName: string;
|
|
172
|
+
id: string | undefined;
|
|
173
|
+
classes: string[] | undefined;
|
|
174
|
+
attributes: DomAttribute[];
|
|
175
|
+
}
|
|
176
|
+
export type DomAttributeKey = 'type' | 'name' | 'title' | 'alt';
|
|
177
|
+
export interface DomAttribute {
|
|
178
|
+
key: DomAttributeKey;
|
|
179
|
+
value: string;
|
|
180
|
+
}
|
|
181
|
+
export type ExpressErrorHandler = (
|
|
182
|
+
err: any,
|
|
183
|
+
request: any,
|
|
184
|
+
response: any,
|
|
185
|
+
next: ExpressNextFunction,
|
|
186
|
+
) => any;
|
|
187
|
+
export interface ExpressNextFunction {
|
|
188
|
+
(err?: any): void;
|
|
189
|
+
}
|
|
190
|
+
class Locals {}
|
|
191
|
+
export type LocalsType = typeof Locals;
|
|
192
|
+
export type LocalsOptions = LocalsType | LocalsSettings;
|
|
193
|
+
export interface LocalsSettings {
|
|
194
|
+
module: LocalsType;
|
|
195
|
+
enabled?: boolean;
|
|
196
|
+
uncaughtOnly?: boolean;
|
|
197
|
+
depth?: number;
|
|
198
|
+
maxProperties?: number;
|
|
199
|
+
maxArray?: number;
|
|
200
|
+
}
|
|
170
201
|
|
|
171
|
-
|
|
172
|
-
|
|
202
|
+
class Telemeter {}
|
|
203
|
+
class Instrumenter {}
|
|
173
204
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
205
|
+
export type TelemeterType = typeof Telemeter;
|
|
206
|
+
export type InstrumenterType = typeof Instrumenter;
|
|
207
|
+
export type TruncationType = object;
|
|
208
|
+
export type ScrubType = (
|
|
209
|
+
data: object,
|
|
210
|
+
scrubFields?: string[],
|
|
211
|
+
scrubPaths?: string[],
|
|
212
|
+
) => object;
|
|
213
|
+
export type WrapGlobalsType = (
|
|
214
|
+
window?: any,
|
|
215
|
+
handler?: any,
|
|
216
|
+
shim?: any,
|
|
217
|
+
) => void;
|
|
218
|
+
export type PolyfillJSONType = (JSON: any) => any;
|
|
180
219
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
220
|
+
export interface Components {
|
|
221
|
+
telemeter?: TelemeterType;
|
|
222
|
+
instrumenter?: InstrumenterType;
|
|
223
|
+
polyfillJSON?: PolyfillJSONType;
|
|
224
|
+
wrapGlobals?: WrapGlobalsType;
|
|
225
|
+
scrub?: ScrubType;
|
|
226
|
+
truncation?: TruncationType;
|
|
227
|
+
}
|
|
189
228
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
229
|
+
/**
|
|
230
|
+
* @deprecated number is deprecated for this field
|
|
231
|
+
*/
|
|
232
|
+
export type DeprecatedNumber = number;
|
|
194
233
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* When true, the Rollbar service will attempt to find and apply source maps to all frames in the stack trace.
|
|
219
|
-
* @default false
|
|
220
|
-
*/
|
|
221
|
-
source_map_enabled?: boolean;
|
|
222
|
-
/**
|
|
223
|
-
* When true, the Rollbar service will attempt to apply source maps to frames even if they are missing column numbers.
|
|
224
|
-
* Works best when the minified javascript file is generated using newlines instead of semicolons.
|
|
225
|
-
* @default false
|
|
226
|
-
*/
|
|
227
|
-
guess_uncaught_frames?: boolean;
|
|
228
|
-
[property: string]: any;
|
|
229
|
-
}
|
|
230
|
-
[property: string]: any;
|
|
231
|
-
},
|
|
234
|
+
/**
|
|
235
|
+
* {@link https://docs.rollbar.com/docs/rollbarjs-configuration-reference#payload-1}
|
|
236
|
+
*/
|
|
237
|
+
export interface Payload {
|
|
238
|
+
person?: {
|
|
239
|
+
id: string | DeprecatedNumber | null;
|
|
240
|
+
username?: string;
|
|
241
|
+
email?: string;
|
|
242
|
+
[property: string]: any;
|
|
243
|
+
};
|
|
244
|
+
context?: any;
|
|
245
|
+
client?: {
|
|
246
|
+
javascript?: {
|
|
247
|
+
/**
|
|
248
|
+
* Version control number (i.e. git SHA) of the current revision. Used for linking filenames in stacktraces to GitHub.
|
|
249
|
+
* Note: for the purposes of nesting under the payload key, only code_version will correctly set the value in the final item.
|
|
250
|
+
* However, if you wish to set this code version at the top level of the configuration object rather than nested under
|
|
251
|
+
* the payload key, we will accept both codeVersion and code_version with codeVersion given preference if both happened
|
|
252
|
+
* to be defined. Furthermore, if code_version is nested under the payload key this will have the final preference over
|
|
253
|
+
* any value set at the top level.
|
|
254
|
+
*/
|
|
255
|
+
code_version?: string | DeprecatedNumber;
|
|
232
256
|
/**
|
|
233
|
-
*
|
|
234
|
-
* @default
|
|
257
|
+
* When true, the Rollbar service will attempt to find and apply source maps to all frames in the stack trace.
|
|
258
|
+
* @default false
|
|
235
259
|
*/
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
* The hostname of the machine that rendered the page.
|
|
244
|
-
*/
|
|
245
|
-
host?: string;
|
|
246
|
-
/**
|
|
247
|
-
* It is used in two different ways: `source maps`, and `source control`.
|
|
248
|
-
*
|
|
249
|
-
* If you are looking for more information on it please go to:
|
|
250
|
-
* {@link https://docs.rollbar.com/docs/source-maps}
|
|
251
|
-
* {@link https://docs.rollbar.com/docs/source-control}
|
|
252
|
-
*/
|
|
253
|
-
root?: string;
|
|
254
|
-
[property: string]: any;
|
|
255
|
-
},
|
|
260
|
+
source_map_enabled?: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* When true, the Rollbar service will attempt to apply source maps to frames even if they are missing column numbers.
|
|
263
|
+
* Works best when the minified javascript file is generated using newlines instead of semicolons.
|
|
264
|
+
* @default false
|
|
265
|
+
*/
|
|
266
|
+
guess_uncaught_frames?: boolean;
|
|
256
267
|
[property: string]: any;
|
|
257
|
-
|
|
268
|
+
};
|
|
269
|
+
[property: string]: any;
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* The environment that your code is running in.
|
|
273
|
+
* @default undefined
|
|
274
|
+
*/
|
|
275
|
+
environment?: string;
|
|
276
|
+
server?: {
|
|
277
|
+
/**
|
|
278
|
+
* @default master
|
|
279
|
+
*/
|
|
280
|
+
branch?: string;
|
|
281
|
+
/**
|
|
282
|
+
* The hostname of the machine that rendered the page.
|
|
283
|
+
*/
|
|
284
|
+
host?: string;
|
|
285
|
+
/**
|
|
286
|
+
* It is used in two different ways: `source maps`, and `source control`.
|
|
287
|
+
*
|
|
288
|
+
* If you are looking for more information on it please go to:
|
|
289
|
+
* {@link https://docs.rollbar.com/docs/source-maps}
|
|
290
|
+
* {@link https://docs.rollbar.com/docs/source-control}
|
|
291
|
+
*/
|
|
292
|
+
root?: string;
|
|
293
|
+
[property: string]: any;
|
|
294
|
+
};
|
|
295
|
+
[property: string]: any;
|
|
296
|
+
}
|
|
258
297
|
}
|
package/karma.conf.js
CHANGED
|
@@ -1,43 +1,25 @@
|
|
|
1
1
|
var path = require('path');
|
|
2
2
|
var webpack = require('webpack');
|
|
3
3
|
var defaults = require('./defaults');
|
|
4
|
-
var browserStackBrowsers = require('./browserstack.browsers');
|
|
5
4
|
|
|
6
5
|
var defaultsPlugin = new webpack.DefinePlugin(defaults);
|
|
7
6
|
|
|
8
|
-
var allBrowsers = browserStackBrowsers.filter('bs_all');
|
|
9
|
-
var allBrowsersByBrowser = {
|
|
10
|
-
// Travis needs the --no-sandbox option,
|
|
11
|
-
// so add as a custom launcher to be used as the default browser.
|
|
12
|
-
ChromeNoSandbox: {
|
|
13
|
-
base: 'ChromeHeadless',
|
|
14
|
-
flags: ['--no-sandbox']
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
allBrowsers.forEach(function(browser) {
|
|
18
|
-
allBrowsersByBrowser[browser._alias] = browser;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
|
|
22
7
|
module.exports = function (config) {
|
|
23
8
|
config.set({
|
|
24
|
-
browsers: ['
|
|
9
|
+
browsers: ['ChromeHeadless'],
|
|
25
10
|
|
|
26
11
|
// The Travis environment has these specified.
|
|
27
12
|
// To run BrowserStack tests locally, specify the environment variables:
|
|
28
13
|
// BROWSER_STACK_USERNAME, BROWSER_STACK_ACCESS_KEY
|
|
29
14
|
browserStack: {
|
|
30
15
|
username: null,
|
|
31
|
-
accessKey: null
|
|
16
|
+
accessKey: null,
|
|
32
17
|
},
|
|
33
18
|
|
|
34
19
|
client: {
|
|
35
|
-
captureConsole: true
|
|
20
|
+
captureConsole: true,
|
|
36
21
|
},
|
|
37
22
|
|
|
38
|
-
// Used for testing on BrowserStack
|
|
39
|
-
customLaunchers: allBrowsersByBrowser,
|
|
40
|
-
|
|
41
23
|
// Files are specified in the grunt-karma configuration in Gruntfile.js
|
|
42
24
|
//files: []
|
|
43
25
|
|
|
@@ -51,12 +33,12 @@ module.exports = function (config) {
|
|
|
51
33
|
// run the bundle through the webpack and sourcemap plugins
|
|
52
34
|
preprocessors: {
|
|
53
35
|
'test/**/!(requirejs).test.js': ['webpack', 'sourcemap'],
|
|
54
|
-
'**/*.html': ['html2js']
|
|
36
|
+
'**/*.html': ['html2js'],
|
|
55
37
|
},
|
|
56
38
|
|
|
57
39
|
proxies: {
|
|
58
40
|
'/dist/': '/base/dist/',
|
|
59
|
-
'/examples/': '/base/examples/'
|
|
41
|
+
'/examples/': '/base/examples/',
|
|
60
42
|
},
|
|
61
43
|
|
|
62
44
|
customHeaders: [
|
|
@@ -65,8 +47,8 @@ module.exports = function (config) {
|
|
|
65
47
|
{
|
|
66
48
|
match: '\\.html',
|
|
67
49
|
name: 'Content-Security-Policy',
|
|
68
|
-
value: "default-src 'self' 'unsafe-inline' 'unsafe-eval';"
|
|
69
|
-
}
|
|
50
|
+
value: "default-src 'self' 'unsafe-inline' 'unsafe-eval';",
|
|
51
|
+
},
|
|
70
52
|
],
|
|
71
53
|
|
|
72
54
|
reporters: ['progress'],
|
|
@@ -89,30 +71,30 @@ module.exports = function (config) {
|
|
|
89
71
|
loader: 'eslint-loader',
|
|
90
72
|
exclude: [/node_modules/, /vendor/, /lib/, /dist/],
|
|
91
73
|
options: {
|
|
92
|
-
configFile: path.resolve(__dirname, '.eslintrc')
|
|
93
|
-
}
|
|
74
|
+
configFile: path.resolve(__dirname, '.eslintrc'),
|
|
75
|
+
},
|
|
94
76
|
},
|
|
95
77
|
{
|
|
96
78
|
test: /\.js$/,
|
|
97
79
|
loader: 'strict-loader',
|
|
98
|
-
exclude: [/node_modules/, /vendor/, /lib/, /dist/, /test/]
|
|
80
|
+
exclude: [/node_modules/, /vendor/, /lib/, /dist/, /test/],
|
|
99
81
|
},
|
|
100
82
|
{
|
|
101
83
|
test: /(mootootls|requirejs)\.js$/,
|
|
102
|
-
loader: 'script'
|
|
84
|
+
loader: 'script',
|
|
103
85
|
},
|
|
104
86
|
{
|
|
105
87
|
enforce: 'post',
|
|
106
88
|
test: /\.js$/,
|
|
107
89
|
exclude: [/node_modules/, /vendor/, /lib/, /dist/, /test/],
|
|
108
|
-
loader: 'istanbul-
|
|
109
|
-
}
|
|
90
|
+
loader: 'coverage-istanbul-loader',
|
|
91
|
+
},
|
|
110
92
|
],
|
|
111
|
-
}
|
|
93
|
+
},
|
|
112
94
|
},
|
|
113
95
|
|
|
114
96
|
webpackMiddleware: {
|
|
115
|
-
noInfo: true
|
|
116
|
-
}
|
|
97
|
+
noInfo: true,
|
|
98
|
+
},
|
|
117
99
|
});
|
|
118
100
|
};
|