Skip to content

Commit c0c0a89

Browse files
feat: support code push
1 parent d7c88ed commit c0c0a89

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

src/models/InstabugConfig.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ export interface InstabugConfig {
1313
* An optional LogLevel to indicate the verbosity of SDK logs. Default is Error.
1414
*/
1515
debugLogsLevel?: LogLevel;
16+
17+
/**
18+
* An optional code push version to be used for all reports.
19+
*/
20+
codePushVersion?: string;
1621
}

src/modules/Instabug.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const init = (config: InstabugConfig) => {
5050
config.token,
5151
config.invocationEvents,
5252
config.debugLogsLevel ?? LogLevel.error,
53+
config.codePushVersion,
5354
);
5455

5556
_isFirstScreen = true;

src/native/NativeInstabug.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ export interface InstabugNativeModule extends NativeModule {
1919

2020
// Essential APIs //
2121
setEnabled(isEnabled: boolean): void;
22-
init(token: string, invocationEvents: InvocationEvent[], debugLogsLevel: LogLevel): void;
22+
init(
23+
token: string,
24+
invocationEvents: InvocationEvent[],
25+
debugLogsLevel: LogLevel,
26+
codePushVersion?: string,
27+
): void;
2328
show(): void;
2429

2530
// Misc APIs //

test/modules/Instabug.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ describe('Instabug Module', () => {
172172
token: 'some-token',
173173
invocationEvents: [InvocationEvent.floatingButton, InvocationEvent.shake],
174174
debugLogsLevel: LogLevel.debug,
175+
codePushVersion: '1.1.0',
175176
};
176177
Instabug.init(instabugConfig);
177178

@@ -180,6 +181,7 @@ describe('Instabug Module', () => {
180181
instabugConfig.token,
181182
instabugConfig.invocationEvents,
182183
instabugConfig.debugLogsLevel,
184+
instabugConfig.codePushVersion,
183185
);
184186
});
185187

0 commit comments

Comments
 (0)