Skip to content

Commit aef3f98

Browse files
authored
feat: add dumpfileSize to crash API (#139)
1 parent dbe908e commit aef3f98

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

package-lock.json

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fakes/crash/crash-api-response.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const createFakeCrashApiResponse = () => ({
1616
defectUrl: 'http://newayz.net',
1717
description: 'haa!',
1818
dumpfile: '💩',
19+
dumpfileSize: 42,
1920
2021
events: createFakeEvents([EventType.Comment]),
2122
exceptionCode: '0010',

src/crash/crash-details/crash-details.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ describe('createCrashDetails', () => {
2929
stackId: 11372,
3030
stackKeyId: 1364,
3131
dumpfile: '/fred/myconsolecrasher-2019.2.3.0/2019/02/03/myconsolecrasher_2019.2.3.0_orgjilct-1706618358.zip',
32+
dumpfileSize: 42,
3233
appName: 'myConsoleCrasher',
3334
appVersion: '2019.2.3.0',
3435
appKey: '',

src/crash/crash-details/crash-details.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export interface CrashDetails {
4545
defectUrl: string;
4646
description: string;
4747
dumpfile: string;
48+
dumpfileSize: number;
4849
email: string;
4950
events: Array<Event>;
5051
exceptionCode: string;
@@ -74,6 +75,7 @@ export function createCrashDetails(options: CrashDetailsRawResponse): CrashDetai
7475
ac.assertNumber(<number>options.id, 'options.id');
7576
ac.assertNumber(<number>options.stackKeyId, 'options.stackKeyId');
7677
ac.assertBoolean(<boolean>options.missingSymbols, 'options.missingSymbols');
78+
ac.assertNumber(<number>options.dumpfileSize, 'options.dumpfileSize');
7779

7880
const appName = defaultToEmptyString(options.appName, 'options.appName');
7981
const appVersion = defaultToEmptyString(options.appVersion, 'options.appVersion');
@@ -153,4 +155,4 @@ function defaultToEmptyString(value, name) {
153155
} else {
154156
return '';
155157
}
156-
}
158+
}

0 commit comments

Comments
 (0)