Skip to content

Commit 7e41f2c

Browse files
ahmedAlaaInstabugkholood-eamzelzoghbiAndrewAminInstabugAyaMahmoud148
authored
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>
1 parent f9d6d61 commit 7e41f2c

File tree

546 files changed

+16411
-912
lines changed

Some content is hidden

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

546 files changed

+16411
-912
lines changed

.circleci/config.yml

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

.gitignore

Lines changed: 5 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
@@ -84,3 +86,4 @@ android/gradlew.bat
8486
!**/ios/**/default.pbxuser
8587
!**/ios/**/default.perspectivev3
8688
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
89+
/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)