Skip to content

Commit 29f420b

Browse files
ahmedAlaaInstabugAyaMahmoud148kholood-eamzelzoghbiandrewdanieldev
authored
Release: v16.0.0 (#630)
* bump: android SDK to 15.0.2 (#594) * bump: android SDK to 15.0.2 * bump: android SDK to 15.0.2 * Merge pull request #597 from Instabug/release/androidv15.0.2 Release: v15.0.2 * feat: support app variant (#585) * feat: app variant * feat: app variant * feat: app variant * feat: app variant * feat: support advanced UI customization (#599) * feat: support advanced UI customization * chore: add change log * fix: delete setFullScreen * fix: linting * fix: unit test * fix: linting * fix: resolve comments * fix: add full screen function * fix: ios tests * fix: ios tests * chore: remove deprecated apis (#614) * feat: support advanced UI customization * chore: add change log * fix: delete setFullScreen * fix: linting * fix: unit test * fix: linting * fix: resolve comments * chore: remove deprecated apis * chore: add changelog * fix: setTheme calling * fix: formatte * fix: formate * fix: formatting * fix: ios tests * fix: ios tests * fix: e2e tests * fix: formate analyze * fix: e2e ios testing * fix: format --------- Co-authored-by: ahmed alaa <154802748+ahmedAlaaInstabug@users.noreply.github.com> --------- Co-authored-by: ahmed alaa <154802748+ahmedAlaaInstabug@users.noreply.github.com> * Refactor/monorepo2 (#623) * feat: add private view * feat: add private view * feat: add private view * feat: add private view * feat: add private view * feat: add private view * feat: add private view * feat: add private view android integration * feat: add private view android integration * feat: add private view android integration * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: make mono-repo * refactor: add http-package to mono-repo * refactor: add http-package to mono-repo * refactor: add http-package to mono-repo * refactor: add http-package to mono-repo * refactor: add http-package to mono-repo * refactor: add http-package to mono-repo * refactor: add dio interceptor to mono-repo * refactor: add dio interceptor to mono-repo * refactor: add modular plugin to mono-repo * refactor: add modular plugin to mono-repo * refactor: add modular plugin to mono-repo * refactor: add modular plugin to mono-repo * fix PR comments * fix: android test cases * fix: android test cases * fix PR comments * fix git ignore * rename: instabug_flutter * rename: instabug_flutter * doc:comment why not use const constructor * fix * feat(ios): handle private views (#524) * refactor: rename http client package * refactor: rename dio interceptor package * feat: add private view example page (#525) * feat: add private view page * fix private view screen * init * init * init * init * init * init * fix PR comment * fix PR comment * fix PR comment * add hybrid app * add hybrid app * add hybrid app * add more example in private view oage * add more example in private view oage * add more example in private view oage * chore: add build files * chore: add animation * fix: private view time * fix: private view time * feat: add w3c header * Refactor: monorepo v14.0.0 changes (#537) * refactor: monoRepo dev changes * refactor: monoRepo dev changes * feat : add w3c feature * feat : add w3c feature * chore: update to latest version * chore: update to latest version * chore: update to latest version * chore: update to latest version * chore: update to latest version * chore: update to latest version * chore: update to latest version * chore: update to latest version * fix same example name * monorepo * monorepo * monorepo * monorepo * monorepo * fix: android canvas crash * chore: rename enable private views * feat: user steps (#540) * feat: gestures & UI elements detection * testing * testing * testing * chore: update ios snapshot * format * format * format * chore(android): integrate with android snapshot * chore(ios): integrate with ios custom build * fix(android): passed required params to log user steps * fix(ios): add double tap event * feat(ios): add native user steps switch * fix(ios): pass flutter view name * feat(example): add private view test * fix: user steps parameters * chore(android): integrate private views snapshot * chore: cleanup unused params * fix(example): clean up imports * fix: update test cases * chore: update deps * fix(ios): update log user steps test case * fix: linters issues * fix(android): update test case * chore(android): activate commented code * chore(android): activate android test case * fix(ios): add double tap to test case * chore(ios): restore cocoapods version * chore(example): revert old app token * test * test * test * test * test * test * chore(android): add descriptive comment * chore(android): update snapshot * fix: PR comments * fix: PR comments * fix: ios CI * fix: ios CI * fix: ios CI * fix: ios CI * fix: ios CI * fix: android CI * fix: android CI * Update config.yml * fix: android CI * fix: android CI * fix: fix private view app * fix: extra space in message * chore(android): upgrade to latest snapshot * fix: trim message * feat: auto mask in Flutter (#555) * feat: enhance private view mechanism * fix: e2e test * fix test 2.10.0 * fix test 2.10.0 * fix test 2.10.0 * fix test 2.10.0 * fix test 2.10.0 * fix test 2.10.0 * fix test 2.10.0 * feat: enhance private view * fix test * fix test * fix test * fix test * fix test * fix: PR comments * chore: update example app * fix: masking sliver view * fix: masking sliver view * fix: masking sliver view * fix: masking sliver view * fix: flutter format * fix: format --------- Co-authored-by: kholood <keassa@instabug.com> * fix: format * fix: format * fix: format * fix: format * Sanity/v16.0.0 (#621) * fix: add support for newer gradle versions (#512) * feat: attach w3c header (#481) * feat: add android feature flag * fix: test cases * fix: test cases * fix: test cases * fix: test cases * fix: add more test cases * fix: add more test cases * fix: add more test cases * fix: add more test cases * Release: v14.0.0 (#532) * chore(android): bump sdk to v14.0.0 * chore(ios): bump sdk to v14.0.0 * Release: v14.0.0 * Release: v14.0.0 * Release: v14.0.0 * chore: change release date (#535) * Release: v14.0.0 (#533) * fix: add support for newer gradle versions (#512) * feat: attach w3c header (#481) * feat: add android feature flag * fix: test cases * fix: test cases * fix: test cases * fix: test cases * fix: add more test cases * fix: add more test cases * fix: add more test cases * fix: add more test cases * Release: v14.0.0 (#532) * chore(android): bump sdk to v14.0.0 * chore(ios): bump sdk to v14.0.0 * Release: v14.0.0 * Release: v14.0.0 * Release: v14.0.0 * chore: change release date (#535) --------- Co-authored-by: kholood <keassa@instabug.com> * Release: 14.1.0 (#539) * release: 14.1.0 * release: 14.1.0 * release: v14.1.0 * release: v14.1.0 * Release: v14.1.0 (#542) * fix: add support for newer gradle versions (#512) * feat: attach w3c header (#481) * feat: add android feature flag * fix: test cases * fix: test cases * fix: test cases * fix: test cases * fix: add more test cases * fix: add more test cases * fix: add more test cases * fix: add more test cases * Release: v14.0.0 (#532) * chore(android): bump sdk to v14.0.0 * chore(ios): bump sdk to v14.0.0 * Release: v14.0.0 * Release: v14.0.0 * Release: v14.0.0 * chore: change release date (#535) * Release: 14.1.0 (#539) * release: 14.1.0 * release: 14.1.0 * release: v14.1.0 * release: v14.1.0 --------- Co-authored-by: kholood <keassa@instabug.com> * fix: set ReproStepsConfig on android * release: v14.1.0 * fix: set ReproStepsConfig * fix(android): report current view change * chore(android): update report current view test * chore(android): add report current view to mocked class * chore: Enhance inline code documentation * fix(android): fix test case * chore: Enhance inline code documentation * chore: increase the test coverage of APM related classes. * chore: apply dart format * chore: apply lint comments * chore: Integrate the absent APM APIs into the APM screen of the sample application. * chore: apply dart format * fix: e2e test * feat: support 3.29 * feat: enable/disable stop capturing network body * fix: add change log * Update CHANGELOG.md * feat: support 3.29 * feat: support 3.29 * feat: support 3.29 * feat: support 3.29 * ci: fix ci issue * chore: flutter sanity branch * fix: revert pod version * fix: use released versions * fix: changelog * fix: change log formate * fix: native fatal crash * chore: bump android version to 14.3.0 * Update CHANGELOG.md * Rlease: 14.3.0 * refactor: Replace APM API that uses reflection by a package private API * fix: network log unit test * feat: support BR adding user consents (#573) * feat: support BR adding user consents * feat: add change log * fix: android test * fix: use named parameters * fix: ios tests * Release: v14.3.1 (#577) * release: v14.3.1 * feat: support xcode 16 (#574) * feat: xcode 16 support * feat: xcode 16 support * feat: xcode 16 support * feat: xcode 16 support * feat: xcode 16 support * chore: update changelog --------- Co-authored-by: kholood <keassa@instabug.com> * Revert "refactor: Replace APM API that uses reflection by a package private API" (#580) * Release/v15.0.1 (#581) * Revert "refactor: Replace APM API that uses reflection by a package private API" This reverts commit 55fba6d. * chore(ios): bump sdk to v.15.1.1 * chore(android): bump SDK to v15.0.1 * chore: bump sdk to v15.0.1 * chore:add change log item * Release: v14.3.1 (#577) (#588) * release: v14.3.1 Co-authored-by: Mohamed Zakaria El-Zoghbi <5540492+mzelzoghbi@users.noreply.github.com> Co-authored-by: ahmed alaa <154802748+ahmedAlaaInstabug@users.noreply.github.com> * Release: v14.3.1 (#577) (#589) * release: v14.3.1 Co-authored-by: Mohamed Zakaria El-Zoghbi <5540492+mzelzoghbi@users.noreply.github.com> Co-authored-by: ahmed alaa <154802748+ahmedAlaaInstabug@users.noreply.github.com> Co-authored-by: Ahmed alaa <aalaa@instabug.com> * Release: v14.3.1 (#577) (#591) * release: v14.3.1 Co-authored-by: Mohamed Zakaria El-Zoghbi <5540492+mzelzoghbi@users.noreply.github.com> * bump: android SDK to 15.0.2 (#594) * bump: android SDK to 15.0.2 * bump: android SDK to 15.0.2 * Merge pull request #597 from Instabug/release/androidv15.0.2 Release: v15.0.2 * feat: support app variant (#585) * feat: app variant * feat: app variant * feat: app variant * feat: app variant * feat: support advanced UI customization (#599) * feat: support advanced UI customization * chore: add change log * fix: delete setFullScreen * fix: linting * fix: unit test * fix: linting * fix: resolve comments * fix: add full screen function * fix: ios tests * fix: ios tests * chore: remove deprecated apis (#614) * feat: support advanced UI customization * chore: add change log * fix: delete setFullScreen * fix: linting * fix: unit test * fix: linting * fix: resolve comments * chore: remove deprecated apis * chore: add changelog * fix: setTheme calling * fix: formatte * fix: formate * fix: formatting * fix: ios tests * fix: ios tests * fix: e2e tests * fix: formate analyze * fix: e2e ios testing * fix: format --------- Co-authored-by: ahmed alaa <154802748+ahmedAlaaInstabug@users.noreply.github.com> --------- Co-authored-by: ahmed alaa <154802748+ahmedAlaaInstabug@users.noreply.github.com> * bump native SDKs to 16.0.0 * bump native SDKs to 16.0.0 * fix: merge issues * fix: merge issues * fix: analyze * fix: analyze * fix: analyze --------- Co-authored-by: Mohamed Zakaria El-Zoghbi <5540492+mzelzoghbi@users.noreply.github.com> Co-authored-by: kholood <keassa@instabug.com> Co-authored-by: Andrew Amin <adaniel@instabug.com> Co-authored-by: Andrew Amin <160974398+AndrewAminInstabug@users.noreply.github.com> Co-authored-by: AyaMahmoud148 <ayaabdelbaseet@instabug.com> * fix: analyze * fix: analyze --------- Co-authored-by: kholood <keassa@instabug.com> Co-authored-by: Mohamed Zakaria El-Zoghbi <5540492+mzelzoghbi@users.noreply.github.com> Co-authored-by: Andrew Amin <adaniel@instabug.com> Co-authored-by: Andrew Amin <160974398+AndrewAminInstabug@users.noreply.github.com> Co-authored-by: AyaMahmoud148 <ayaabdelbaseet@instabug.com> * bump iOS SDK to v16.0.2 * feat: respect BE network body limit (#593) * feat: add network body max size APIs in Android - Added `onNetworkLogBodyMaxSizeChange` method to `FeatureFlagsFlutterApi` in Dart. - Implemented `getNetworkBodyMaxSize` method in `InstabugApi` to retrieve network log character limit. - Updated `InstabugApiTest` with a new test for `getNetworkBodyMaxSize`. * feat: add network body max size APIs in iOS - Updated Instabug podspec to version 15.0.1. - Added `getNetworkBodyMaxSize` method in `InstabugApi` for retrieving network log body size. - Introduced a new test case for `getNetworkBodyMaxSize` in `InstabugApiTests`. - Updated .gitignore files to include project-specific and Android-related paths. * feat: add body size checks inside network manager and cache retrieved in feature flags manager - Added `_networkBodyMaxSize` to `FeatureFlagsManager` for managing network body size limits. - Introduced `didRequestBodyExceedSizeLimit` and `didResponseBodyExceedSizeLimit` methods in `NetworkManager` to validate request and response body sizes against the limit. - Created `InstabugConstants` for standardized logging messages related to network body size limits. - Implemented caching for network body size retrieval to optimize performance. * feat: utilize network manager size checker APIs inside `network_logger.dart` - Added early checks for request and response body size limits in `networkLogInternal`. - Implemented truncation of request/response bodies with warning messages if size limits are exceeded. - Logged truncation events using `InstabugLogger` for better visibility into network logging behavior. * chore: add default value of 10KB as a fallback, add network body size specific tests - Introduced a default network body max size of 10KB to improve logging consistency. - Updated error handling to set the cached size to the default when native API retrieval fails. - Added unit tests for `didRequestBodyExceedSizeLimit` and `didResponseBodyExceedSizeLimit` to ensure proper size limit checks for request and response bodies. * chore: run `dart format .`, and add new `example/pubspec.lock` * fix: reference the correct iOS SDK and the correct podfile setup * fix: update network body max size handling and caching - Changed the return type of `getNetworkBodyMaxSize` from `int?` to `double?` in the API and updated related method calls accordingly. - Renamed `registerW3CFlagsListener` to `registerFeatureFlagsListener` for consistency across the codebase. - Introduced a callback mechanism in `FeatureFlagsManager` to handle changes in network body max size, ensuring proper cache management in `NetworkManager`. - Updated tests to reflect the new method names and ensure functionality remains intact. * chore: update CHANGELOG to include backend network body size limit support * fix: flutter and android tests * fix: fix ios and flutter failing tests * chore: run dart format * fix: improve formatting to align with linter * fix * fix * fix --------- Co-authored-by: ahmed alaa <154802748+ahmedAlaaInstabug@users.noreply.github.com> * merge: master branch * fix CHANGELOG.md * fix: e2e * fix: e2e --------- Co-authored-by: AyaMahmoud148 <ayaabdelbaseet@instabug.com> Co-authored-by: kholood <keassa@instabug.com> Co-authored-by: Mohamed Zakaria El-Zoghbi <5540492+mzelzoghbi@users.noreply.github.com> Co-authored-by: Andrew Amin <adaniel@instabug.com> Co-authored-by: Andrew Amin <160974398+AndrewAminInstabug@users.noreply.github.com> Co-authored-by: MoKamall <61141183+MoKamall@users.noreply.github.com>
1 parent ed99868 commit 29f420b

File tree

553 files changed

+17901
-1803
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

553 files changed

+17901
-1803
lines changed

.circleci/config.yml

Lines changed: 199 additions & 63 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Generated files
22
*.mocks.dart
33
*.g.dart
4-
android/**/generated/
5-
ios/**/Generated/
4+
packages/**/android/**/generated/
5+
packages/**/ios/**/Generated/
66

77
# Miscellaneous
88
*.class
@@ -63,6 +63,8 @@ android/gradlew.bat
6363
**/ios/**/DerivedData/
6464
**/ios/**/Icon?
6565
**/ios/**/Pods/
66+
**/ios/**/Pods/
67+
6668
**/ios/**/.symlinks/
6769
**/ios/**/profile
6870
**/ios/**/xcuserdata
@@ -78,9 +80,13 @@ android/gradlew.bat
7880
**/ios/ServiceDefinitions.json
7981
**/ios/Runner/GeneratedPluginRegistrant.*
8082

83+
# Project specific
84+
/PRDs/
85+
8186
# Exceptions to above rules.
8287
!**/ios/**/default.mode1v3
8388
!**/ios/**/default.mode2v3
8489
!**/ios/**/default.pbxuser
8590
!**/ios/**/default.perspectivev3
8691
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
92+
/packages/**/lib/src/generated/

README.md

Lines changed: 25 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,39 @@
1-
# Instabug for Flutter
1+
<!--
2+
This README describes the package. If you publish this package to pub.dev,
3+
this README's contents appear on the landing page for your package.
24
3-
[![pub package](https://img.shields.io/pub/v/instabug_flutter.svg)](https://pub.dev/packages/instabug_flutter)
5+
For information about how to write a good package README, see the guide for
6+
[writing package pages](https://dart.dev/tools/pub/writing-package-pages).
47
5-
A Flutter plugin for [Instabug](https://instabug.com/).
8+
For general information about developing packages, see the Dart guide for
9+
[creating packages](https://dart.dev/guides/libraries/create-packages)
10+
and the Flutter guide for
11+
[developing packages and plugins](https://flutter.dev/to/develop-packages).
12+
-->
613

7-
## Available Features
14+
TODO: Put a short description of the package here that helps potential users
15+
know whether this package might be useful for them.
816

9-
| Feature | Status |
10-
|:---------------------------------------------------------:|:-------:|
11-
| [Bug Reporting](https://docs.instabug.com/docs/flutter-bug-reporting) ||
12-
| [Crash Reporting](https://docs.instabug.com/docs/flutter-crash-reporting) ||
13-
| [App Performance Monitoring](https://docs.instabug.com/docs/flutter-apm) ||
14-
| [In-App Replies](https://docs.instabug.com/docs/flutter-in-app-replies) ||
15-
| [In-App Surveys](https://docs.instabug.com/docs/flutter-in-app-surveys) ||
16-
| [Feature Requests](https://docs.instabug.com/docs/flutter-in-app-feature-requests) ||
17+
## Features
1718

18-
* ✅ Stable
19-
* ⚙️ Under active development
19+
TODO: List what your package can do. Maybe include images, gifs, or videos.
2020

21-
## Integration
21+
## Getting started
2222

23-
### Installation
23+
TODO: List prerequisites and provide or point to information on how to
24+
start using the package.
2425

25-
1. Add Instabug to your `pubspec.yaml` file.
26+
## Usage
2627

27-
```yaml
28-
dependencies:
29-
instabug_flutter:
30-
```
31-
32-
2. Install the package by running the following command.
33-
34-
```bash
35-
flutter packages get
36-
```
37-
38-
### Initializing Instabug
39-
40-
Initialize the SDK in your `main` function. This starts the SDK with the default behavior and sets it to be shown when the device is shaken.
28+
TODO: Include short and useful examples for package users. Add longer examples
29+
to `/example` folder.
4130

4231
```dart
43-
import 'package:instabug_flutter/instabug_flutter.dart';
44-
45-
void main() {
46-
WidgetsFlutterBinding.ensureInitialized();
47-
48-
Instabug.init(
49-
token: 'APP_TOKEN',
50-
invocationEvents: [InvocationEvent.shake],
51-
);
52-
53-
runApp(MyApp());
54-
}
32+
const like = 'sample';
5533
```
5634

57-
> :warning: If you're updating the SDK from versions prior to v11, please check our [migration guide](https://docs.instabug.com/docs/flutter-migration-guide).
58-
59-
## Crash reporting
60-
61-
Instabug automatically captures every crash of your app and sends relevant details to the crashes page of your dashboard.
62-
63-
⚠️ **Crashes will only be reported in release mode and not in debug mode.**
64-
65-
```dart
66-
void main() {
67-
runZonedGuarded(
68-
() {
69-
WidgetsFlutterBinding.ensureInitialized();
70-
71-
Instabug.init(
72-
token: 'APP_TOKEN',
73-
invocationEvents: [InvocationEvent.shake],
74-
);
75-
76-
FlutterError.onError = (FlutterErrorDetails details) {
77-
Zone.current.handleUncaughtError(details.exception, details.stack!);
78-
};
79-
80-
runApp(MyApp());
81-
},
82-
CrashReporting.reportCrash,
83-
);
84-
}
85-
```
86-
87-
## Repro Steps
88-
Repro Steps list all of the actions an app user took before reporting a bug or crash, grouped by the screens they visited in your app.
89-
90-
To enable this feature, you need to add `InstabugNavigatorObserver` to the `navigatorObservers` :
91-
```
92-
runApp(MaterialApp(
93-
navigatorObservers: [InstabugNavigatorObserver()],
94-
));
95-
```
96-
97-
## Network Logging
98-
You can choose to attach all your network requests to the reports being sent to the dashboard. To enable the feature when using the `dart:io` package `HttpClient`, please refer to the [Instabug Dart IO Http Client](https://github.com/Instabug/instabug-dart-io-http-client) repository.
99-
100-
We also support the packages `http` and `dio`. For details on how to enable network logging for these external packages, refer to the [Instabug Dart Http Adapter](https://github.com/Instabug/Instabug-Dart-http-Adapter) and the [Instabug Dio Interceptor](https://github.com/Instabug/Instabug-Dio-Interceptor) repositories.
101-
102-
## Microphone and Photo Library Usage Description (iOS Only)
103-
104-
Instabug needs access to the microphone and photo library to be able to let users add audio and video attachments. Starting from iOS 10, apps that don’t provide a usage description for those 2 permissions would be rejected when submitted to the App Store.
105-
106-
For your app not to be rejected, you’ll need to add the following 2 keys to your app’s info.plist file with text explaining to the user why those permissions are needed:
107-
108-
* `NSMicrophoneUsageDescription`
109-
* `NSPhotoLibraryUsageDescription`
110-
111-
If your app doesn’t already access the microphone or photo library, we recommend using a usage description like:
112-
113-
* "`<app name>` needs access to the microphone to be able to attach voice notes."
114-
* "`<app name>` needs access to your photo library for you to be able to attach images."
35+
## Additional information
11536

116-
**The permission alert for accessing the microphone/photo library will NOT appear unless users attempt to attach a voice note/photo while using Instabug.**
37+
TODO: Tell users more about the package: where to find more information, how to
38+
contribute to the package, how to file issues, what response they can expect
39+
from the package authors, and more.

analysis_options.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ include: package:lint/analysis_options_package.yaml
22

33
analyzer:
44
exclude:
5-
- "example/**"
6-
- "**/*.g.dart"
5+
- "packages/**/*.g.dart"
6+
- "packages/**/example/**"
7+
78

89
linter:
910
rules:

dangerfile.ts

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { danger, fail, schedule, warn } from 'danger';
2-
import collectCoverage, { ReportType } from '@instabug/danger-plugin-coverage';
2+
import collectCoverage, {ReportOptions, ReportType} from '@instabug/danger-plugin-coverage';
3+
import * as fs from 'fs';
34

45
const hasSourceChanges = danger.git.modified_files.some((file) =>
56
file.startsWith('lib/')
@@ -20,7 +21,7 @@ async function hasDescription() {
2021
);
2122
}
2223

23-
if (!danger.git.modified_files.includes('CHANGELOG.md') && !declaredTrivial) {
24+
if (!danger.git.modified_files.includes('packages/instabug-Flutter/CHANGELOG.md') && !declaredTrivial) {
2425
warn(
2526
'You have not included a CHANGELOG entry! \nYou can find it at [CHANGELOG.md](https://github.com/Instabug/Instabug-Flutter/blob/master/CHANGELOG.md).'
2627
);
@@ -29,9 +30,22 @@ async function hasDescription() {
2930

3031
schedule(hasDescription());
3132

32-
collectCoverage({
33-
label: 'Dart',
34-
type: ReportType.LCOV,
35-
filePath: 'coverage/lcov.info',
36-
threshold: 80,
37-
});
33+
// Function to extract the second part of the filename using '-' as a separator
34+
const getLabelFromFilename = (filename: string): string | null => {
35+
const parts = filename.split('-');
36+
return parts[1] ? parts[1].replace(/\.[^/.]+$/, '') : null; // Removes extension
37+
};
38+
39+
console.log(JSON.stringify(getLabelFromFilename));
40+
const files = fs.readdirSync('coverage');
41+
let reportOptions: ReportOptions[] = [];
42+
for (let file of files) {
43+
reportOptions.push({
44+
label: getLabelFromFilename(file),
45+
type: ReportType.LCOV,
46+
filePath: "coverage/"+file,
47+
threshold: 80,
48+
});
49+
}
50+
collectCoverage(reportOptions);
51+

0 commit comments

Comments
 (0)