Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: move package into a monorepo #519

Open
wants to merge 104 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
e0c0fd2
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
c38dead
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
23d3912
Merge remote-tracking branch 'refs/remotes/origin/dev' into feat/priv…
ahmedAlaaInstabug Oct 2, 2024
1af3598
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
0476bcd
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
9b8ec64
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
cedc297
feat: add private view
ahmedAlaaInstabug Oct 7, 2024
59c1ffa
feat: add private view
ahmedAlaaInstabug Oct 9, 2024
f7f8f08
feat: add private view android integration
ahmedAlaaInstabug Oct 10, 2024
c9bb481
feat: add private view android integration
ahmedAlaaInstabug Oct 10, 2024
52bced3
feat: add private view android integration
ahmedAlaaInstabug Oct 10, 2024
322ea6e
refactor: make mono-repo
ahmedAlaaInstabug Oct 17, 2024
f3e04e9
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
b4e4ea7
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
9501091
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
e3f9ca5
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
1808746
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
8bfb3b7
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
d8023a5
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
9a097b7
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
907daf3
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
7fc99ca
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
609c99f
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
b5dad7b
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
7d2cc4d
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
b163d10
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
0659b38
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
723f254
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
5447fbd
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
8c13ff0
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
6aba7da
refactor: add dio interceptor to mono-repo
ahmedAlaaInstabug Oct 21, 2024
5bfe807
refactor: add dio interceptor to mono-repo
ahmedAlaaInstabug Oct 21, 2024
3e0653f
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
3649514
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
c4fb69e
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
12e4fd1
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
d0f334f
fix PR comments
ahmedAlaaInstabug Oct 27, 2024
ae524a2
fix: android test cases
ahmedAlaaInstabug Oct 27, 2024
ddead7f
fix: android test cases
ahmedAlaaInstabug Oct 27, 2024
7414132
fix PR comments
ahmedAlaaInstabug Oct 27, 2024
1f3d95e
fix git ignore
ahmedAlaaInstabug Oct 31, 2024
b1a88ae
rename: instabug_flutter
ahmedAlaaInstabug Oct 31, 2024
d6ad128
rename: instabug_flutter
ahmedAlaaInstabug Oct 31, 2024
476c29e
doc:comment why not use const constructor
ahmedAlaaInstabug Oct 31, 2024
15e001b
fix
ahmedAlaaInstabug Oct 31, 2024
5b94581
feat(ios): handle private views (#524)
ahmedAlaaInstabug Oct 31, 2024
ae70469
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-ad…
ahmedAlaaInstabug Oct 31, 2024
606e4c1
refactor: rename http client package
ahmedAlaaInstabug Oct 31, 2024
a249c77
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-di…
ahmedAlaaInstabug Oct 31, 2024
0063010
refactor: rename dio interceptor package
ahmedAlaaInstabug Oct 31, 2024
6dcdffb
feat: add private view example page (#525)
ahmedAlaaInstabug Oct 31, 2024
a142b7b
init
ahmedAlaaInstabug Nov 2, 2024
92201a1
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-pr…
ahmedAlaaInstabug Nov 2, 2024
422e21f
init
ahmedAlaaInstabug Nov 2, 2024
53abf96
init
ahmedAlaaInstabug Nov 2, 2024
c8b944d
init
ahmedAlaaInstabug Nov 2, 2024
96e128a
init
ahmedAlaaInstabug Nov 2, 2024
38971ab
init
ahmedAlaaInstabug Nov 3, 2024
ad192ba
fix PR comment
ahmedAlaaInstabug Nov 3, 2024
c76508f
fix PR comment
ahmedAlaaInstabug Nov 3, 2024
2d716fa
fix PR comment
ahmedAlaaInstabug Nov 3, 2024
837e133
add hybrid app
ahmedAlaaInstabug Nov 10, 2024
d157d4e
add hybrid app
ahmedAlaaInstabug Nov 10, 2024
e9d124a
add hybrid app
ahmedAlaaInstabug Nov 10, 2024
a6789c2
add more example in private view oage
ahmedAlaaInstabug Nov 12, 2024
0370666
add more example in private view oage
ahmedAlaaInstabug Nov 12, 2024
5f0af4c
add more example in private view oage
ahmedAlaaInstabug Nov 12, 2024
4dcf75f
chore: add build files
ahmedAlaaInstabug Nov 13, 2024
e4b6c3a
chore: add animation
ahmedAlaaInstabug Nov 14, 2024
89d0de1
fix: private view time
ahmedAlaaInstabug Nov 21, 2024
7763743
fix: private view time
ahmedAlaaInstabug Nov 22, 2024
ea35739
feat: add w3c header
ahmedAlaaInstabug Nov 22, 2024
4bbafb0
Refactor: monorepo v14.0.0 changes (#537)
ahmedAlaaInstabug Dec 2, 2024
20356c0
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
9d60292
feat : add w3c feature
ahmedAlaaInstabug Dec 2, 2024
6d6b022
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
9f704b5
feat : add w3c feature
ahmedAlaaInstabug Dec 2, 2024
eb41d25
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
290e187
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
0f1c65a
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
dc50a5c
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
838a434
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
86ba310
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
48b1132
chore: update to latest version
ahmedAlaaInstabug Dec 12, 2024
c50bc61
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo-p…
ahmedAlaaInstabug Dec 12, 2024
cdb8017
chore: update to latest version
ahmedAlaaInstabug Dec 12, 2024
2215874
chore: update to latest version
ahmedAlaaInstabug Dec 12, 2024
be76a07
chore: update to latest version
ahmedAlaaInstabug Dec 15, 2024
63a2bc1
Merge pull request #520 from Instabug/refactor/monorepo-add-http-package
ahmedAlaaInstabug Jan 8, 2025
05b2ea4
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-di…
ahmedAlaaInstabug Jan 8, 2025
b357fae
fix same example name
ahmedAlaaInstabug Jan 8, 2025
64f42aa
Merge pull request #521 from Instabug/refactor/monorepo-dio-package
ahmedAlaaInstabug Jan 8, 2025
3201240
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-mo…
ahmedAlaaInstabug Jan 8, 2025
daae1ac
Merge pull request #522 from Instabug/refactor/monorepo-modular-package
ahmedAlaaInstabug Jan 8, 2025
4ac9541
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-pr…
ahmedAlaaInstabug Jan 8, 2025
05fac1f
monorepo
ahmedAlaaInstabug Jan 8, 2025
49ea245
Merge pull request #527 from Instabug/refactor/monorepo-private-view-…
ahmedAlaaInstabug Jan 8, 2025
85d1408
monorepo
ahmedAlaaInstabug Jan 9, 2025
dda1f56
monorepo
ahmedAlaaInstabug Jan 9, 2025
8f785f4
monorepo
ahmedAlaaInstabug Jan 9, 2025
b9984ba
monorepo
ahmedAlaaInstabug Jan 9, 2025
fb97ea4
Merge pull request #545 from Instabug/refactor/monorepo-14.1.0-changes
ahmedAlaaInstabug Jan 13, 2025
ba998f6
fix: android canvas crash
ahmedAlaaInstabug Feb 19, 2025
9b95071
chore: rename enable private views
ahmedAlaaInstabug Feb 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
280 changes: 219 additions & 61 deletions .circleci/config.yml

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated files
*.mocks.dart
*.g.dart
android/**/generated/
ios/**/Generated/
packages/**/android/**/generated/
packages/**/ios/**/Generated/

# Miscellaneous
*.class
Expand Down Expand Up @@ -63,6 +63,8 @@ android/gradlew.bat
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/Pods/

**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
Expand All @@ -84,3 +86,4 @@ android/gradlew.bat
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
/packages/**/lib/src/generated/
127 changes: 25 additions & 102 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,116 +1,39 @@
# Instabug for Flutter
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.

[![pub package](https://img.shields.io/pub/v/instabug_flutter.svg)](https://pub.dev/packages/instabug_flutter)
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/tools/pub/writing-package-pages).

A Flutter plugin for [Instabug](https://instabug.com/).
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/to/develop-packages).
-->

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

| Feature | Status |
|:---------------------------------------------------------:|:-------:|
| [Bug Reporting](https://docs.instabug.com/docs/flutter-bug-reporting) | ✅ |
| [Crash Reporting](https://docs.instabug.com/docs/flutter-crash-reporting) | ✅ |
| [App Performance Monitoring](https://docs.instabug.com/docs/flutter-apm) | ✅ |
| [In-App Replies](https://docs.instabug.com/docs/flutter-in-app-replies) | ✅ |
| [In-App Surveys](https://docs.instabug.com/docs/flutter-in-app-surveys) | ✅ |
| [Feature Requests](https://docs.instabug.com/docs/flutter-in-app-feature-requests) | ✅ |
## Features

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

## Integration
## Getting started

### Installation
TODO: List prerequisites and provide or point to information on how to
start using the package.

1. Add Instabug to your `pubspec.yaml` file.
## Usage

```yaml
dependencies:
instabug_flutter:
```

2. Install the package by running the following command.

```bash
flutter packages get
```

### Initializing Instabug

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.
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.

```dart
import 'package:instabug_flutter/instabug_flutter.dart';

void main() {
WidgetsFlutterBinding.ensureInitialized();

Instabug.init(
token: 'APP_TOKEN',
invocationEvents: [InvocationEvent.shake],
);

runApp(MyApp());
}
const like = 'sample';
```

> :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).

## Crash reporting

Instabug automatically captures every crash of your app and sends relevant details to the crashes page of your dashboard.

⚠️ **Crashes will only be reported in release mode and not in debug mode.**

```dart
void main() {
runZonedGuarded(
() {
WidgetsFlutterBinding.ensureInitialized();

Instabug.init(
token: 'APP_TOKEN',
invocationEvents: [InvocationEvent.shake],
);

FlutterError.onError = (FlutterErrorDetails details) {
Zone.current.handleUncaughtError(details.exception, details.stack!);
};

runApp(MyApp());
},
CrashReporting.reportCrash,
);
}
```

## Repro Steps
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.

To enable this feature, you need to add `InstabugNavigatorObserver` to the `navigatorObservers` :
```
runApp(MaterialApp(
navigatorObservers: [InstabugNavigatorObserver()],
));
```

## Network Logging
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.

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.

## Microphone and Photo Library Usage Description (iOS Only)

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.

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:

* `NSMicrophoneUsageDescription`
* `NSPhotoLibraryUsageDescription`

If your app doesn’t already access the microphone or photo library, we recommend using a usage description like:

* "`<app name>` needs access to the microphone to be able to attach voice notes."
* "`<app name>` needs access to your photo library for you to be able to attach images."
## Additional information

**The permission alert for accessing the microphone/photo library will NOT appear unless users attempt to attach a voice note/photo while using Instabug.**
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
6 changes: 4 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ include: package:lint/analysis_options_package.yaml

analyzer:
exclude:
- "example/**"
- "**/*.g.dart"
- "packages/**/*.g.dart"
- "packages/**/example/**"
- "packages/instabug_private_views/example-hybrid-ios-app/**/**"


linter:
rules:
Expand Down
30 changes: 22 additions & 8 deletions dangerfile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { danger, fail, schedule, warn } from 'danger';
import collectCoverage, { ReportType } from '@instabug/danger-plugin-coverage';
import collectCoverage, {ReportOptions, ReportType} from '@instabug/danger-plugin-coverage';
import * as fs from 'fs';

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

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

schedule(hasDescription());

collectCoverage({
label: 'Dart',
type: ReportType.LCOV,
filePath: 'coverage/lcov.info',
threshold: 80,
});
// Function to extract the second part of the filename using '-' as a separator
const getLabelFromFilename = (filename: string): string | null => {
const parts = filename.split('-');
return parts[1] ? parts[1].replace(/\.[^/.]+$/, '') : null; // Removes extension
};

console.log(JSON.stringify(getLabelFromFilename));
const files = fs.readdirSync('coverage');
let reportOptions: ReportOptions[] = [];
for (let file of files) {
reportOptions.push({
label: getLabelFromFilename(file),
type: ReportType.LCOV,
filePath: "coverage/"+file,
threshold: 80,
});
}
collectCoverage(reportOptions);

Loading