Skip to content

Commit 75d49d4

Browse files
feat: support code push
1 parent d3b26a4 commit 75d49d4

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
@@ -67,6 +67,7 @@ export const init = (config: InstabugConfig) => {
6767
config.token,
6868
config.invocationEvents,
6969
config.debugLogsLevel ?? LogLevel.error,
70+
config.codePushVersion,
7071
);
7172

7273
_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
@@ -237,6 +237,7 @@ describe('Instabug Module', () => {
237237
token: 'some-token',
238238
invocationEvents: [InvocationEvent.floatingButton, InvocationEvent.shake],
239239
debugLogsLevel: LogLevel.debug,
240+
codePushVersion: '1.1.0',
240241
};
241242
Instabug.init(instabugConfig);
242243

@@ -245,6 +246,7 @@ describe('Instabug Module', () => {
245246
instabugConfig.token,
246247
instabugConfig.invocationEvents,
247248
instabugConfig.debugLogsLevel,
249+
instabugConfig.codePushVersion,
248250
);
249251
});
250252

0 commit comments

Comments
 (0)