diff --git a/.circleci/config.yml b/.circleci/config.yml index 67e56d8fa..5e2d0c338 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,18 +2,36 @@ version: 2.1 orbs: android: circleci/android@2.5.0 - flutter: circleci/flutter@2.0.2 + flutter: circleci/flutter@2.0.4 node: circleci/node@5.2.0 advanced-checkout: vsco/advanced-checkout@1.1.0 +executors: + flutter-executor: + docker: + - image: cimg/base:stable + + commands: setup_flutter: + parameters: + version: + type: string + default: 3.24.3 + use_melos: + type: boolean + default: true + working_dir: + type: string + default: "~/project" steps: - flutter/install_sdk_and_pub: - version: 3.10.5 - - run: - name: Generate Pigeons - command: sh ./scripts/pigeon.sh + version: <> + app-dir: <> + - install_flutter_and_dart_packages: + generate_pigeons: true + use_melos: <> + working_dir: <> setup_ios: steps: # Flutter doesn't support Apple Silicon yet, so we need to install Rosetta use Flutter on M1 machines. @@ -26,7 +44,7 @@ commands: command: sudo gem install cocoapods - run: name: Install Pods - working_directory: example/ios + working_directory: packages/instabug_flutter/example/ios command: pod install --repo-update setup_captain: parameters: @@ -77,32 +95,71 @@ commands: name: Configure Captain Platform command: echo 'export CAPTAIN_PLATFORM=<>' >> $BASH_ENV # This runs `flutter pub get` and `dart pub get` if we pass parameter `generate_pigeons` to the job it also runs the following: - # - `sh ./scripts/pigeon.sh` - # - `dart run build_runner build --delete-conflicting-outputs` + # - `melos pigeon` + # - `melos generate` install_flutter_and_dart_packages: parameters: generate_pigeons: type: boolean + use_melos: + type: boolean + default: true + working_dir: + type: string steps: - - run: - name: Install Flutter Packages - command: flutter pub get - - run: - name: Install Dart Packages - command: dart pub get - description: Install Dart Packages (for dart explicit packages) - when: condition: equal: - - <> + - <> - true steps: - run: - name: Generate Pigeons - command: sh ./scripts/pigeon.sh + name: Install melos + command: dart pub global activate melos && echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> $BASH_ENV + - run: + name: Install Flutter Packages + command: melos bootstrap - run: - name: Build Pigeons - command: dart run build_runner build --delete-conflicting-outputs + name: Install Dart Packages + command: melos dart_bootstrap + description: Install Dart Packages (for dart explicit packages) + - when: + condition: + equal: + - <> + - true + steps: + - run: + name: Generate Pigeons + command: melos pigeon + - run: + name: Build Pigeons + command: melos generate + - when: + condition: + equal: + - <> + - false + steps: + - run: + name: Install Flutter Packages + command: flutter pub get + - run: + name: Install Dart Packages + command: dart pub get + description: Install Dart Packages (for dart explicit packages) + - when: + condition: + equal: + - <> + - true + steps: + - run: + name: Generate Pigeons + command: sh scripts/pigeon.sh + - run: + name: Build Pigeons + command: dart run build_runner build --delete-conflicting-outputs jobs: danger: @@ -114,7 +171,7 @@ jobs: pkg-manager: yarn override-ci-command: yarn install --frozen-lockfile --network-concurrency 1 - attach_workspace: - at: coverage + at: ~/project - run: name: Run Danger command: yarn danger ci @@ -123,20 +180,38 @@ jobs: parameters: version: type: string - docker: - - image: cirrusci/flutter:<> + default: "3.24.3" + executor: flutter-executor steps: - advanced-checkout/shallow-checkout - - install_flutter_and_dart_packages: - generate_pigeons: true - - run: flutter test --coverage - - run: - working_directory: coverage - command: lcov --remove lcov.info '*.g.dart' '*.mocks.dart' -o lcov.info + - run: sudo apt-get update&& sudo apt-get -y install lcov + - setup_flutter: + version: <> + use_melos: true + - run: melos test-coverage - persist_to_workspace: - root: coverage + root: ~/project paths: - - lcov.info + - coverage + + + test_flutter_without_melos: + parameters: + version: + type: string + default: "2.10.0" + app-dir: + type: string + executor: flutter-executor + working_directory: <> + steps: + - advanced-checkout/shallow-checkout: + path: ~/project + - setup_flutter: + version: <> + use_melos: false + working_dir: <> + - run: flutter test test_android: executor: @@ -147,7 +222,7 @@ jobs: - advanced-checkout/shallow-checkout - setup_flutter - android/run-tests: - working-directory: example/android + working-directory: packages/instabug_flutter/example/android test-command: ./gradlew test e2e_android_captain: @@ -164,7 +239,7 @@ jobs: run-tests-working-directory: e2e additional-avd-args: --device 3 system-image: system-images;android-33;default;x86_64 - post-emulator-launch-assemble-command: cd example && flutter build apk --debug + post-emulator-launch-assemble-command: cd packages/instabug_flutter/example && flutter build apk --debug test-command: dotnet test test_ios: @@ -178,7 +253,7 @@ jobs: - setup_ios - run: name: Build and run tests - working_directory: ~/project/example/ios + working_directory: ~/project/packages/instabug_flutter/example/ios command: | xcodebuild -allowProvisioningUpdates \ -workspace Runner.xcworkspace \ @@ -199,7 +274,7 @@ jobs: - setup_ios - run: name: Build Example App - working_directory: example + working_directory: packages/instabug_flutter/example command: flutter build ios --simulator - run: name: Run E2E Tests @@ -208,44 +283,38 @@ jobs: command: dotnet test format_flutter: - docker: - - image: cirrusci/flutter + executor: flutter-executor steps: - advanced-checkout/shallow-checkout - - install_flutter_and_dart_packages: - generate_pigeons: false + - setup_flutter - run: name: Check Format - command: dart format . --set-exit-if-changed + command: melos format lint_flutter: - docker: - - image: cirrusci/flutter + executor: flutter-executor steps: - advanced-checkout/shallow-checkout - - install_flutter_and_dart_packages: - generate_pigeons: true + - setup_flutter - run: name: Perform Static Analysis - command: flutter analyze + command: melos analyze verify_pub: - docker: - - image: cirrusci/flutter + executor: flutter-executor steps: - advanced-checkout/shallow-checkout - - install_flutter_and_dart_packages: - generate_pigeons: true + - setup_flutter - run: name: Check Package Score - command: dart run pana --no-warning --exit-code-threshold 0 - - run: flutter pub publish --dry-run + command: melos score + - run: melos dryPublish - release: + release_instabug_flutter: macos: xcode: 15.2.0 resource_class: macos.m1.medium.gen1 - working_directory: "~" + working_directory: "~/project" steps: - advanced-checkout/shallow-checkout: path: ~/project @@ -254,7 +323,7 @@ jobs: name: Install Rosetta command: softwareupdate --install-rosetta --agree-to-license - flutter/install_sdk_and_pub: - version: 3.3.6 + version: 3.10.5 app-dir: project - run: name: Install pub packages @@ -263,7 +332,7 @@ jobs: - run: name: Generate Pigeons working_directory: project - command: sh ./scripts/pigeon.sh + command: melos pigeon - run: name: Clone Escape command: git clone git@github.com:Instabug/Escape.git @@ -288,10 +357,10 @@ workflows: - test_flutter-stable - test_flutter: name: test_flutter-stable - version: stable - - test_flutter: + - test_flutter_without_melos: name: test_flutter-2.10.5 version: 2.10.5 + app-dir: "~/project/packages/instabug_flutter/" - e2e_android_captain - test_ios - e2e_ios_captain @@ -302,7 +371,7 @@ workflows: - verify_pub: requires: - lint_flutter - - hold_release: + - hold_release_instabug_flutter: type: approval requires: - danger @@ -319,9 +388,9 @@ workflows: filters: branches: only: master - - release: + - release_instabug_flutter: requires: - - hold_release + - hold_release_instabug_flutter filters: branches: - only: master \ No newline at end of file + only: master diff --git a/.gitignore b/.gitignore index 071964ca9..15f18ed8b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ # Generated files *.mocks.dart *.g.dart -android/**/generated/ -ios/**/Generated/ +packages/**/android/**/generated/ +packages/**/ios/**/Generated/ # Miscellaneous *.class @@ -84,3 +84,4 @@ android/gradlew.bat !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +/packages/**/lib/src/generated/ diff --git a/README.md b/README.md index 88080febd..4a260d8d2 100644 --- a/README.md +++ b/README.md @@ -1,116 +1,39 @@ -# Instabug for Flutter + -## 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: - -* "`` needs access to the microphone to be able to attach voice notes." -* "`` 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. diff --git a/analysis_options.yaml b/analysis_options.yaml index 9e956095e..4f1f095e4 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -2,8 +2,9 @@ include: package:lint/analysis_options_package.yaml analyzer: exclude: - - "example/**" - - "**/*.g.dart" + - "packages/**/*.g.dart" + - "packages/**/example/**" + linter: rules: diff --git a/dangerfile.ts b/dangerfile.ts index 670ae0b05..ee0fb4944 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -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/') @@ -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).' ); @@ -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); + diff --git a/e2e/.gitignore b/e2e/.gitignore index a72f3ddc5..2afa2e272 100644 --- a/e2e/.gitignore +++ b/e2e/.gitignore @@ -1,454 +1,454 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# JetBrains Rider -.idea/ -*.sln.iml - -## -## Visual Studio Code -## -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json diff --git a/e2e/E2E.csproj b/e2e/E2E.csproj index 7e6759754..f54272903 100644 --- a/e2e/E2E.csproj +++ b/e2e/E2E.csproj @@ -1,23 +1,23 @@ - - - - net6.0 - enable - enable - - false - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - + + + + net6.0 + enable + enable + + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + diff --git a/e2e/E2E.sln b/e2e/E2E.sln index 23c0ba9eb..c2e05e1e2 100644 --- a/e2e/E2E.sln +++ b/e2e/E2E.sln @@ -1,31 +1,31 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 25.0.1703.5 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E2E", "E2E.csproj", "{99118060-0344-4CAD-AE3A-CC74A5E0F3C7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Instabug.Captain", "..\..\Instabug.Captain\Instabug.Captain\Instabug.Captain.csproj", "{597F3BAD-11D3-43B7-A95C-6C41CD2096A8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Release|Any CPU.Build.0 = Release|Any CPU - {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3E37F932-775C-4756-A8FF-28DFC6CAC624} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 25.0.1703.5 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E2E", "E2E.csproj", "{99118060-0344-4CAD-AE3A-CC74A5E0F3C7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Instabug.Captain", "..\..\Instabug.Captain\Instabug.Captain\Instabug.Captain.csproj", "{597F3BAD-11D3-43B7-A95C-6C41CD2096A8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99118060-0344-4CAD-AE3A-CC74A5E0F3C7}.Release|Any CPU.Build.0 = Release|Any CPU + {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {597F3BAD-11D3-43B7-A95C-6C41CD2096A8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3E37F932-775C-4756-A8FF-28DFC6CAC624} + EndGlobalSection +EndGlobal diff --git a/e2e/Utils/CaptainTest.cs b/e2e/Utils/CaptainTest.cs index 35749d727..3b42f13cb 100644 --- a/e2e/Utils/CaptainTest.cs +++ b/e2e/Utils/CaptainTest.cs @@ -7,10 +7,10 @@ public class CaptainTest : IDisposable { private static readonly CaptainConfig _config = new() { - AndroidApp = Path.GetFullPath("../../../../example/build/app/outputs/flutter-apk/app-debug.apk"), + AndroidApp = Path.GetFullPath("../../../../packages/instabug_flutter/example/build/app/outputs/flutter-apk/app-debug.apk"), AndroidAppId = "com.instabug.flutter.example", AndroidVersion = "13", - IosApp = Path.GetFullPath("../../../../example/build/ios/iphonesimulator/Runner.app"), + IosApp = Path.GetFullPath("../../../../packages/instabug_flutter/example/build/ios/iphonesimulator/Runner.app"), IosAppId = "com.instabug.InstabugSample", IosVersion = "17.2", IosDevice = "iPhone 15 Pro Max" diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml deleted file mode 100644 index 0d2902135..000000000 --- a/example/analysis_options.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/example/android/gradle.properties b/example/android/gradle.properties deleted file mode 100644 index 94adc3a3f..000000000 --- a/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/melos.yaml b/melos.yaml new file mode 100644 index 000000000..a114d44b5 --- /dev/null +++ b/melos.yaml @@ -0,0 +1,70 @@ +name: instabug_flutter_mono + +packages: + - packages/* + - packages/*/** +scripts: + dart_bootstrap: + run: dart pub get + analyze: + run: dart analyze . + format: + run: dart format . --set-exit-if-changed + pigeon: + run: sh scripts/pigeon.sh + exec: + concurrency: 1 + failFast: true + orderDependents: true + packageFilters: + fileExists: 'scripts/pigeon.sh' + generate: + run: dart run build_runner build -d + description: Build all generated files for Dart & Flutter packages in this project.t + exec: + concurrency: 1 + failFast: true + orderDependents: true + packageFilters: + dependsOn: build_runner + test: + run: flutter test + description: Tests all packages. + exec: + concurrency: 1 + failFast: true + orderDependents: true + packageFilters: + dependsOn: flutter_test + test-coverage: + run: flutter test --coverage && cd coverage && lcov --ignore-errors unused --remove lcov.info '*.g.dart' '*.mocks.dart' -o lcov.info && sh ../../../scripts/move_coverage_files.sh + description: Tests all packages. + exec: + concurrency: 1 + failFast: true + orderDependents: true + select-package: + dir-exists: + - test + packageFilters: + dependsOn: flutter_test + dirExists: test + dryPublish: + run: flutter pub publish --dry-run + description: Tests publishing (dry run). + exec: + concurrency: 1 + orderDependents: true + packageFilters: + flutter: true + dependsOn: pana + private: false + score: + run: dart run pana --no-warning --exit-code-threshold 0 + exec: + concurrency: 1 + orderDependents: true + packageFilters: + dependsOn: pana + private: false + diff --git a/.metadata b/packages/instabug_flutter/.metadata similarity index 100% rename from .metadata rename to packages/instabug_flutter/.metadata diff --git a/.pubignore b/packages/instabug_flutter/.pubignore similarity index 100% rename from .pubignore rename to packages/instabug_flutter/.pubignore diff --git a/CHANGELOG.md b/packages/instabug_flutter/CHANGELOG.md similarity index 97% rename from CHANGELOG.md rename to packages/instabug_flutter/CHANGELOG.md index 418e317c8..119f6e213 100644 --- a/CHANGELOG.md +++ b/packages/instabug_flutter/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [14.0.0](https://github.com/Instabug/Instabug-Flutter/compare/v13.4.0...v14.0.0) (November 11, 2024) + +### Added + +- Add support for tracing network requests from Instabug to services like Datadog and New Relic ([#481](https://github.com/Instabug/Instabug-Flutter/pull/481)). + +### Changed + +- Bump Instabug Android SDK to v14.0.0 ([#532](https://github.com/Instabug/Instabug-Flutter/pull/532)). [See release notes](https://github.com/Instabug/Instabug-Android/releases/tag/v14.0.0). +- Bump Instabug iOS SDK to v14.0.0 ([#532](https://github.com/Instabug/Instabug-Flutter/pull/532)). [See release notes](https://github.com/Instabug/Instabug-iOS/releases/tag/14.0.0), + ## [13.4.0](https://github.com/Instabug/Instabug-Flutter/compare/v13.3.0...v13.4.0) (September 29, 2024) ### Added diff --git a/LICENSE b/packages/instabug_flutter/LICENSE similarity index 100% rename from LICENSE rename to packages/instabug_flutter/LICENSE diff --git a/packages/instabug_flutter/README.md b/packages/instabug_flutter/README.md new file mode 100644 index 000000000..88080febd --- /dev/null +++ b/packages/instabug_flutter/README.md @@ -0,0 +1,116 @@ +# Instabug for Flutter + +[![pub package](https://img.shields.io/pub/v/instabug_flutter.svg)](https://pub.dev/packages/instabug_flutter) + +A Flutter plugin for [Instabug](https://instabug.com/). + +## Available Features + +| 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) | ✅ | + +* ✅ Stable +* ⚙️ Under active development + +## Integration + +### Installation + +1. Add Instabug to your `pubspec.yaml` file. + +```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. + +```dart +import 'package:instabug_flutter/instabug_flutter.dart'; + +void main() { + WidgetsFlutterBinding.ensureInitialized(); + + Instabug.init( + token: 'APP_TOKEN', + invocationEvents: [InvocationEvent.shake], + ); + + runApp(MyApp()); +} +``` + +> :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: + +* "`` needs access to the microphone to be able to attach voice notes." +* "`` needs access to your photo library for you to be able to attach images." + +**The permission alert for accessing the microphone/photo library will NOT appear unless users attempt to attach a voice note/photo while using Instabug.** diff --git a/android/.gitignore b/packages/instabug_flutter/android/.gitignore similarity index 100% rename from android/.gitignore rename to packages/instabug_flutter/android/.gitignore diff --git a/android/build.gradle b/packages/instabug_flutter/android/build.gradle similarity index 81% rename from android/build.gradle rename to packages/instabug_flutter/android/build.gradle index 92654b91b..ebaccfa51 100644 --- a/android/build.gradle +++ b/packages/instabug_flutter/android/build.gradle @@ -1,5 +1,5 @@ group 'com.instabug.flutter' -version '13.4.0' +version '14.0.0' buildscript { repositories { @@ -22,7 +22,10 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 28 + if (project.android.hasProperty("namespace")) { + namespace "com.instabug.flutter" + } + compileSdkVersion 33 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -41,10 +44,11 @@ android { } dependencies { - api 'com.instabug.library:instabug:13.4.1' - + api 'com.instabug.library:instabug:14.0.0' testImplementation 'junit:junit:4.13.2' testImplementation "org.mockito:mockito-inline:3.12.1" + testImplementation "io.mockk:mockk:1.13.13" + } // add upload_symbols task diff --git a/android/gradle.properties b/packages/instabug_flutter/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to packages/instabug_flutter/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/packages/instabug_flutter/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to packages/instabug_flutter/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/proguard-rules.txt b/packages/instabug_flutter/android/proguard-rules.txt similarity index 100% rename from android/proguard-rules.txt rename to packages/instabug_flutter/android/proguard-rules.txt diff --git a/android/settings.gradle b/packages/instabug_flutter/android/settings.gradle similarity index 100% rename from android/settings.gradle rename to packages/instabug_flutter/android/settings.gradle diff --git a/android/src/main/AndroidManifest.xml b/packages/instabug_flutter/android/src/main/AndroidManifest.xml similarity index 84% rename from android/src/main/AndroidManifest.xml rename to packages/instabug_flutter/android/src/main/AndroidManifest.xml index 8c678b4e2..c6dec7d9d 100644 --- a/android/src/main/AndroidManifest.xml +++ b/packages/instabug_flutter/android/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + data) { if (data.containsKey("serverErrorMessage")) { serverErrorMessage = (String) data.get("serverErrorMessage"); } + Boolean isW3cHeaderFound = null; + Number partialId = null; + Number networkStartTimeInSeconds = null; + String w3CGeneratedHeader = null; + String w3CCaughtHeader = null; + + if (data.containsKey("isW3cHeaderFound")) { + isW3cHeaderFound = (Boolean) data.get("isW3cHeaderFound"); + } + + if (data.containsKey("partialId")) { + + + partialId = ((Number) data.get("partialId")); - Method method = Reflection.getMethod(Class.forName("com.instabug.apm.networking.APMNetworkLogger"), "log", long.class, long.class, String.class, String.class, long.class, String.class, String.class, String.class, String.class, String.class, long.class, int.class, String.class, String.class, String.class, String.class, APMCPNetworkLog.W3CExternalTraceAttributes.class); - if (method != null) { - method.invoke(apmNetworkLogger, requestStartTime, requestDuration, requestHeaders, requestBody, requestBodySize, requestMethod, requestUrl, requestContentType, responseHeaders, responseBody, responseBodySize, statusCode, responseContentType, errorMessage, gqlQueryName, serverErrorMessage, null); - } else { - Log.e(TAG, "APMNetworkLogger.log was not found by reflection"); + } + if (data.containsKey("networkStartTimeInSeconds")) { + networkStartTimeInSeconds = ((Number) data.get("networkStartTimeInSeconds")); } - } catch (Exception e) { - e.printStackTrace(); + if (data.containsKey("w3CGeneratedHeader")) { + + w3CGeneratedHeader = (String) data.get("w3CGeneratedHeader"); + + + } + if (data.containsKey("w3CCaughtHeader")) { + w3CCaughtHeader = (String) data.get("w3CCaughtHeader"); + + } + + + APMCPNetworkLog.W3CExternalTraceAttributes w3cExternalTraceAttributes = + null; + if (isW3cHeaderFound != null) { + w3cExternalTraceAttributes = new APMCPNetworkLog.W3CExternalTraceAttributes( + isW3cHeaderFound, partialId == null ? null : partialId.longValue(), + networkStartTimeInSeconds == null ? null : networkStartTimeInSeconds.longValue(), + w3CGeneratedHeader, w3CCaughtHeader + + ); + } + + Method method = Reflection.getMethod(Class.forName("com.instabug.apm.networking.APMNetworkLogger"), "log", long.class, long.class, String.class, String.class, long.class, String.class, String.class, String.class, String.class, String.class, long.class, int.class, String.class, String.class, String.class, String.class, APMCPNetworkLog.W3CExternalTraceAttributes.class); + if (method != null) { + method.invoke(apmNetworkLogger, requestStartTime, requestDuration, requestHeaders, requestBody, requestBodySize, requestMethod, requestUrl, requestContentType, responseHeaders, responseBody, responseBodySize, statusCode, responseContentType, errorMessage, gqlQueryName, serverErrorMessage, w3cExternalTraceAttributes); + } else { + Log.e(TAG, "APMNetworkLogger.log was not found by reflection"); + } + + } catch(Exception e){ + e.printStackTrace(); + } } - } + + @Override diff --git a/android/src/main/java/com/instabug/flutter/modules/BugReportingApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/BugReportingApi.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/modules/BugReportingApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/BugReportingApi.java diff --git a/android/src/main/java/com/instabug/flutter/modules/CrashReportingApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/CrashReportingApi.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/modules/CrashReportingApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/CrashReportingApi.java diff --git a/android/src/main/java/com/instabug/flutter/modules/FeatureRequestsApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/FeatureRequestsApi.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/modules/FeatureRequestsApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/FeatureRequestsApi.java diff --git a/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java similarity index 86% rename from android/src/main/java/com/instabug/flutter/modules/InstabugApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java index 74c4e4ba4..7a8549718 100644 --- a/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java +++ b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java @@ -13,6 +13,10 @@ import com.instabug.flutter.util.ArgsRegistry; import com.instabug.flutter.util.Reflection; import com.instabug.flutter.util.ThreadManager; +import com.instabug.library.internal.crossplatform.CoreFeature; +import com.instabug.library.internal.crossplatform.CoreFeaturesState; +import com.instabug.library.internal.crossplatform.FeaturesStateListener; +import com.instabug.library.internal.crossplatform.InternalCore; import com.instabug.library.Feature; import com.instabug.library.Instabug; import com.instabug.library.InstabugColorTheme; @@ -48,14 +52,19 @@ public class InstabugApi implements InstabugPigeon.InstabugHostApi { private final Callable screenshotProvider; private final InstabugCustomTextPlaceHolder placeHolder = new InstabugCustomTextPlaceHolder(); + private final InstabugPigeon.FeatureFlagsFlutterApi featureFlagsFlutterApi; + public static void init(BinaryMessenger messenger, Context context, Callable screenshotProvider) { - final InstabugApi api = new InstabugApi(context, screenshotProvider); + final InstabugPigeon.FeatureFlagsFlutterApi flutterApi = new InstabugPigeon.FeatureFlagsFlutterApi(messenger); + + final InstabugApi api = new InstabugApi(context, screenshotProvider, flutterApi); InstabugPigeon.InstabugHostApi.setup(messenger, api); } - public InstabugApi(Context context, Callable screenshotProvider) { + public InstabugApi(Context context, Callable screenshotProvider, InstabugPigeon.FeatureFlagsFlutterApi featureFlagsFlutterApi) { this.context = context; this.screenshotProvider = screenshotProvider; + this.featureFlagsFlutterApi = featureFlagsFlutterApi; } @VisibleForTesting @@ -437,6 +446,48 @@ public void networkLog(@NonNull Map data) { } } + @Override + public void registerFeatureFlagChangeListener() { + + try { + InternalCore.INSTANCE._setFeaturesStateListener(new FeaturesStateListener() { + @Override + public void invoke(@NonNull CoreFeaturesState featuresState) { + ThreadManager.runOnMainThread(new Runnable() { + @Override + public void run() { + featureFlagsFlutterApi.onW3CFeatureFlagChange(featuresState.isW3CExternalTraceIdEnabled(), + featuresState.isAttachingGeneratedHeaderEnabled(), + featuresState.isAttachingCapturedHeaderEnabled(), + new InstabugPigeon.FeatureFlagsFlutterApi.Reply() { + @Override + public void reply(Void reply) { + + } + }); + } + }); + } + + }); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + @NonNull + @Override + public Map isW3CFeatureFlagsEnabled() { + Map params = new HashMap(); + params.put("isW3cExternalTraceIDEnabled", InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_EXTERNAL_TRACE_ID)); + params.put("isW3cExternalGeneratedHeaderEnabled", InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_ATTACHING_GENERATED_HEADER)); + params.put("isW3cCaughtHeaderEnabled", InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_ATTACHING_CAPTURED_HEADER)); + + + return params; + } + @Override public void willRedirectToStore() { Instabug.willRedirectToStore(); diff --git a/android/src/main/java/com/instabug/flutter/modules/InstabugLogApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/InstabugLogApi.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/modules/InstabugLogApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/InstabugLogApi.java diff --git a/android/src/main/java/com/instabug/flutter/modules/RepliesApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/RepliesApi.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/modules/RepliesApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/RepliesApi.java diff --git a/android/src/main/java/com/instabug/flutter/modules/SessionReplayApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/SessionReplayApi.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/modules/SessionReplayApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/SessionReplayApi.java diff --git a/android/src/main/java/com/instabug/flutter/modules/SurveysApi.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/SurveysApi.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/modules/SurveysApi.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/modules/SurveysApi.java diff --git a/android/src/main/java/com/instabug/flutter/util/ArgsRegistry.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/util/ArgsRegistry.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/util/ArgsRegistry.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/util/ArgsRegistry.java diff --git a/android/src/main/java/com/instabug/flutter/util/Reflection.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/util/Reflection.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/util/Reflection.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/util/Reflection.java diff --git a/android/src/main/java/com/instabug/flutter/util/ThreadManager.java b/packages/instabug_flutter/android/src/main/java/com/instabug/flutter/util/ThreadManager.java similarity index 100% rename from android/src/main/java/com/instabug/flutter/util/ThreadManager.java rename to packages/instabug_flutter/android/src/main/java/com/instabug/flutter/util/ThreadManager.java diff --git a/android/src/test/java/com/instabug/flutter/ApmApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/ApmApiTest.java similarity index 95% rename from android/src/test/java/com/instabug/flutter/ApmApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/ApmApiTest.java index 935521466..725d3bd98 100644 --- a/android/src/test/java/com/instabug/flutter/ApmApiTest.java +++ b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/ApmApiTest.java @@ -1,5 +1,18 @@ package com.instabug.flutter; +import static com.instabug.flutter.util.GlobalMocks.reflected; +import static com.instabug.flutter.util.MockResult.makeResult; +import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.mockConstruction; +import static org.mockito.Mockito.mockStatic; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + import com.instabug.apm.APM; import com.instabug.apm.InternalAPM; import com.instabug.apm.configuration.cp.APMFeature; diff --git a/android/src/test/java/com/instabug/flutter/ArgsRegistryTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/ArgsRegistryTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/ArgsRegistryTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/ArgsRegistryTest.java diff --git a/android/src/test/java/com/instabug/flutter/BugReportingApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/BugReportingApiTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/BugReportingApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/BugReportingApiTest.java diff --git a/android/src/test/java/com/instabug/flutter/CrashReportingApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/CrashReportingApiTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/CrashReportingApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/CrashReportingApiTest.java diff --git a/android/src/test/java/com/instabug/flutter/FeatureRequestsApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/FeatureRequestsApiTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/FeatureRequestsApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/FeatureRequestsApiTest.java diff --git a/android/src/test/java/com/instabug/flutter/InstabugApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/InstabugApiTest.java similarity index 87% rename from android/src/test/java/com/instabug/flutter/InstabugApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/InstabugApiTest.java index 2abb8987e..3d0b15ed4 100644 --- a/android/src/test/java/com/instabug/flutter/InstabugApiTest.java +++ b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/InstabugApiTest.java @@ -17,10 +17,16 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import static io.mockk.MockKKt.every; +import static io.mockk.MockKKt.mockkObject; + +import io.mockk.*; + import android.app.Application; import android.graphics.Bitmap; import android.net.Uri; +import com.instabug.apm.InternalAPM; import com.instabug.bug.BugReporting; import com.instabug.flutter.generated.InstabugPigeon; import com.instabug.flutter.modules.InstabugApi; @@ -36,9 +42,15 @@ import com.instabug.library.ReproConfigurations; import com.instabug.library.ReproMode; import com.instabug.library.featuresflags.model.IBGFeatureFlag; +import com.instabug.library.internal.crossplatform.CoreFeature; +import com.instabug.library.internal.crossplatform.FeaturesStateListener; +import com.instabug.library.internal.crossplatform.InternalCore; +import com.instabug.library.featuresflags.model.IBGFeatureFlag; import com.instabug.library.invocation.InstabugInvocationEvent; import com.instabug.library.model.NetworkLog; import com.instabug.library.ui.onboarding.WelcomeMessage; +import com.instabug.survey.Surveys; +import com.instabug.survey.callbacks.OnShowCallback; import org.json.JSONObject; import org.junit.After; @@ -56,9 +68,16 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Random; import java.util.concurrent.Callable; import io.flutter.plugin.common.BinaryMessenger; +import kotlin.jvm.functions.Function1; + +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.mockito.verification.VerificationMode; import org.mockito.verification.VerificationMode; public class InstabugApiTest { @@ -69,11 +88,15 @@ public class InstabugApiTest { private MockedStatic mBugReporting; private MockedConstruction mCustomTextPlaceHolder; private MockedStatic mHostApi; - + private InternalCore internalCore; @Before public void setUp() throws NoSuchMethodException { mCustomTextPlaceHolder = mockConstruction(InstabugCustomTextPlaceHolder.class); - api = spy(new InstabugApi(mContext, screenshotProvider)); + internalCore=spy(InternalCore.INSTANCE); + + BinaryMessenger mMessenger = mock(BinaryMessenger.class); + final InstabugPigeon.FeatureFlagsFlutterApi flutterApi = new InstabugPigeon.FeatureFlagsFlutterApi(mMessenger); + api = spy(new InstabugApi(mContext, screenshotProvider, flutterApi)); mInstabug = mockStatic(Instabug.class); mBugReporting = mockStatic(BugReporting.class); mHostApi = mockStatic(InstabugPigeon.InstabugHostApi.class); @@ -87,6 +110,7 @@ public void cleanUp() { mBugReporting.close(); mHostApi.close(); GlobalMocks.close(); + } @Test @@ -349,11 +373,11 @@ public void testClearAllExperiments() { @Test public void testAddFeatureFlags() { - Map featureFlags = new HashMap<>(); - featureFlags.put("key1","variant1"); + Map featureFlags = new HashMap<>(); + featureFlags.put("key1", "variant1"); api.addFeatureFlags(featureFlags); - List flags=new ArrayList(); - flags.add(new IBGFeatureFlag("key1","variant1")); + List flags = new ArrayList(); + flags.add(new IBGFeatureFlag("key1", "variant1")); mInstabug.verify(() -> Instabug.addFeatureFlags(flags)); } @@ -598,4 +622,25 @@ public void testWillRedirectToStore() { api.willRedirectToStore(); mInstabug.verify(Instabug::willRedirectToStore); } + + + @Test + public void isW3CFeatureFlagsEnabled() { + mockkObject(new InternalCore[]{InternalCore.INSTANCE},false); + Random random=new Random(); + Boolean isW3cExternalGeneratedHeaderEnabled = random.nextBoolean(); + Boolean isW3cExternalTraceIDEnabled = random.nextBoolean(); + Boolean isW3cCaughtHeaderEnabled = random.nextBoolean(); + + every((Function1) mockKMatcherScope -> InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_ATTACHING_GENERATED_HEADER)).returns(isW3cExternalGeneratedHeaderEnabled); + every((Function1) mockKMatcherScope -> InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_EXTERNAL_TRACE_ID)).returns(isW3cExternalTraceIDEnabled); + every((Function1) mockKMatcherScope -> InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_ATTACHING_CAPTURED_HEADER)).returns(isW3cCaughtHeaderEnabled); + + + Map flags = api.isW3CFeatureFlagsEnabled(); + assertEquals(isW3cExternalGeneratedHeaderEnabled, flags.get("isW3cExternalGeneratedHeaderEnabled")); + assertEquals(isW3cExternalTraceIDEnabled, flags.get("isW3cExternalTraceIDEnabled")); + assertEquals(isW3cCaughtHeaderEnabled, flags.get("isW3cCaughtHeaderEnabled")); + + } } diff --git a/android/src/test/java/com/instabug/flutter/InstabugLogApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/InstabugLogApiTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/InstabugLogApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/InstabugLogApiTest.java diff --git a/android/src/test/java/com/instabug/flutter/RepliesApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/RepliesApiTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/RepliesApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/RepliesApiTest.java diff --git a/android/src/test/java/com/instabug/flutter/SessionReplayApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/SessionReplayApiTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/SessionReplayApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/SessionReplayApiTest.java diff --git a/android/src/test/java/com/instabug/flutter/SurveysApiTest.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/SurveysApiTest.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/SurveysApiTest.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/SurveysApiTest.java diff --git a/android/src/test/java/com/instabug/flutter/util/Callback.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/Callback.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/util/Callback.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/Callback.java diff --git a/android/src/test/java/com/instabug/flutter/util/GlobalMocks.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/GlobalMocks.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/util/GlobalMocks.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/GlobalMocks.java diff --git a/android/src/test/java/com/instabug/flutter/util/MockReflected.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/MockReflected.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/util/MockReflected.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/MockReflected.java diff --git a/android/src/test/java/com/instabug/flutter/util/MockResult.java b/packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/MockResult.java similarity index 100% rename from android/src/test/java/com/instabug/flutter/util/MockResult.java rename to packages/instabug_flutter/android/src/test/java/com/instabug/flutter/util/MockResult.java diff --git a/android/upload_symbols.gradle b/packages/instabug_flutter/android/upload_symbols.gradle similarity index 100% rename from android/upload_symbols.gradle rename to packages/instabug_flutter/android/upload_symbols.gradle diff --git a/example/.gitignore b/packages/instabug_flutter/example/.gitignore similarity index 100% rename from example/.gitignore rename to packages/instabug_flutter/example/.gitignore diff --git a/example/.metadata b/packages/instabug_flutter/example/.metadata similarity index 100% rename from example/.metadata rename to packages/instabug_flutter/example/.metadata diff --git a/example/README.md b/packages/instabug_flutter/example/README.md similarity index 100% rename from example/README.md rename to packages/instabug_flutter/example/README.md diff --git a/example/android/.gitignore b/packages/instabug_flutter/example/android/.gitignore similarity index 100% rename from example/android/.gitignore rename to packages/instabug_flutter/example/android/.gitignore diff --git a/example/android/app/build.gradle b/packages/instabug_flutter/example/android/app/build.gradle similarity index 94% rename from example/android/app/build.gradle rename to packages/instabug_flutter/example/android/app/build.gradle index 13ed775e2..698a32c86 100644 --- a/example/android/app/build.gradle +++ b/packages/instabug_flutter/example/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { @@ -44,8 +44,8 @@ android { defaultConfig { applicationId "com.instabug.flutter.example" - minSdkVersion flutter.minSdkVersion - targetSdkVersion 30 + minSdkVersion 21 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -59,6 +59,7 @@ android { signingConfig signingConfigs.debug } } + namespace 'com.instabug.flutter.example' configurations.all { resolutionStrategy.force 'org.hamcrest:hamcrest-core:1.3' diff --git a/example/android/app/src/debug/AndroidManifest.xml b/packages/instabug_flutter/example/android/app/src/debug/AndroidManifest.xml similarity index 85% rename from example/android/app/src/debug/AndroidManifest.xml rename to packages/instabug_flutter/example/android/app/src/debug/AndroidManifest.xml index ed546497f..f880684a6 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/packages/instabug_flutter/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/example/android/app/src/main/AndroidManifest.xml b/packages/instabug_flutter/example/android/app/src/main/AndroidManifest.xml similarity index 98% rename from example/android/app/src/main/AndroidManifest.xml rename to packages/instabug_flutter/example/android/app/src/main/AndroidManifest.xml index 2416f09d0..483f4dd2e 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/packages/instabug_flutter/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/example/android/build.gradle b/packages/instabug_flutter/example/android/build.gradle similarity index 90% rename from example/android/build.gradle rename to packages/instabug_flutter/example/android/build.gradle index 713d7f6e6..5d4b56b3b 100644 --- a/example/android/build.gradle +++ b/packages/instabug_flutter/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:8.0.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/packages/instabug_flutter/example/android/gradle.properties b/packages/instabug_flutter/example/android/gradle.properties new file mode 100644 index 000000000..b9a9a2464 --- /dev/null +++ b/packages/instabug_flutter/example/android/gradle.properties @@ -0,0 +1,6 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/packages/instabug_flutter/example/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from example/android/gradle/wrapper/gradle-wrapper.jar rename to packages/instabug_flutter/example/android/gradle/wrapper/gradle-wrapper.jar diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/instabug_flutter/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 93% rename from example/android/gradle/wrapper/gradle-wrapper.properties rename to packages/instabug_flutter/example/android/gradle/wrapper/gradle-wrapper.properties index 6b665338b..89e56bdb6 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/instabug_flutter/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip diff --git a/example/android/gradlew b/packages/instabug_flutter/example/android/gradlew similarity index 100% rename from example/android/gradlew rename to packages/instabug_flutter/example/android/gradlew diff --git a/example/android/gradlew.bat b/packages/instabug_flutter/example/android/gradlew.bat similarity index 96% rename from example/android/gradlew.bat rename to packages/instabug_flutter/example/android/gradlew.bat index aec99730b..8a0b282aa 100644 --- a/example/android/gradlew.bat +++ b/packages/instabug_flutter/example/android/gradlew.bat @@ -1,90 +1,90 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/example/android/settings.gradle b/packages/instabug_flutter/example/android/settings.gradle similarity index 100% rename from example/android/settings.gradle rename to packages/instabug_flutter/example/android/settings.gradle diff --git a/example/android/settings_aar.gradle b/packages/instabug_flutter/example/android/settings_aar.gradle similarity index 100% rename from example/android/settings_aar.gradle rename to packages/instabug_flutter/example/android/settings_aar.gradle diff --git a/example/ios/.gitignore b/packages/instabug_flutter/example/ios/.gitignore similarity index 100% rename from example/ios/.gitignore rename to packages/instabug_flutter/example/ios/.gitignore diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/packages/instabug_flutter/example/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from example/ios/Flutter/AppFrameworkInfo.plist rename to packages/instabug_flutter/example/ios/Flutter/AppFrameworkInfo.plist diff --git a/example/ios/Flutter/Debug.xcconfig b/packages/instabug_flutter/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from example/ios/Flutter/Debug.xcconfig rename to packages/instabug_flutter/example/ios/Flutter/Debug.xcconfig diff --git a/example/ios/Flutter/Release.xcconfig b/packages/instabug_flutter/example/ios/Flutter/Release.xcconfig similarity index 100% rename from example/ios/Flutter/Release.xcconfig rename to packages/instabug_flutter/example/ios/Flutter/Release.xcconfig diff --git a/example/ios/InstabugTests/ApmApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/ApmApiTests.m similarity index 100% rename from example/ios/InstabugTests/ApmApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/ApmApiTests.m diff --git a/example/ios/InstabugTests/ArgsRegistryTests.m b/packages/instabug_flutter/example/ios/InstabugTests/ArgsRegistryTests.m similarity index 100% rename from example/ios/InstabugTests/ArgsRegistryTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/ArgsRegistryTests.m diff --git a/example/ios/InstabugTests/BugReportingApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/BugReportingApiTests.m similarity index 100% rename from example/ios/InstabugTests/BugReportingApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/BugReportingApiTests.m diff --git a/example/ios/InstabugTests/CrashReportingApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/CrashReportingApiTests.m similarity index 100% rename from example/ios/InstabugTests/CrashReportingApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/CrashReportingApiTests.m diff --git a/example/ios/InstabugTests/FeatureRequestsApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/FeatureRequestsApiTests.m similarity index 100% rename from example/ios/InstabugTests/FeatureRequestsApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/FeatureRequestsApiTests.m diff --git a/example/ios/InstabugTests/Info.plist b/packages/instabug_flutter/example/ios/InstabugTests/Info.plist similarity index 100% rename from example/ios/InstabugTests/Info.plist rename to packages/instabug_flutter/example/ios/InstabugTests/Info.plist diff --git a/example/ios/InstabugTests/InstabugApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/InstabugApiTests.m similarity index 67% rename from example/ios/InstabugTests/InstabugApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/InstabugApiTests.m index 3e83aec1c..6c9544d71 100644 --- a/example/ios/InstabugTests/InstabugApiTests.m +++ b/packages/instabug_flutter/example/ios/InstabugTests/InstabugApiTests.m @@ -6,6 +6,8 @@ #import "Util/Instabug+Test.h" #import "IBGNetworkLogger+CP.h" #import "Flutter/Flutter.h" +#import "instabug_flutter/IBGAPM+PrivateAPIs.h" +#import "instabug_flutter/IBGNetworkLogger+CP.h" @interface InstabugTests : XCTestCase @@ -449,4 +451,155 @@ - (void)testWillRedirectToAppStore { OCMVerify([self.mInstabug willRedirectToAppStore]); } +- (void)testNetworkLogWithW3Caught { + NSString *url = @"https://example.com"; + NSString *requestBody = @"hi"; + NSNumber *requestBodySize = @17; + NSString *responseBody = @"{\"hello\":\"world\"}"; + NSNumber *responseBodySize = @153; + NSString *method = @"POST"; + NSNumber *responseCode = @201; + NSString *responseContentType = @"application/json"; + NSNumber *duration = @23000; + NSNumber *startTime = @1670156107523; + NSString *w3CCaughtHeader = @"1234"; + NSDictionary *requestHeaders = @{ @"Accepts": @"application/json",@"traceparent":w3CCaughtHeader}; + NSDictionary *responseHeaders = @{ @"Content-Type": @"text/plain" }; + NSDictionary *data = @{ + @"url": url, + @"requestBody": requestBody, + @"requestBodySize": requestBodySize, + @"responseBody": responseBody, + @"responseBodySize": responseBodySize, + @"method": method, + @"responseCode": responseCode, + @"requestHeaders": requestHeaders, + @"responseHeaders": responseHeaders, + @"responseContentType": responseContentType, + @"duration": duration, + @"startTime": startTime, + @"isW3cHeaderFound":@1, + @"w3CCaughtHeader":w3CCaughtHeader + }; + + FlutterError* error; + + [self.api networkLogData:data error:&error]; + + OCMVerify([self.mNetworkLogger addNetworkLogWithUrl:url + method:method + requestBody:requestBody + requestBodySize:requestBodySize.integerValue + responseBody:responseBody + responseBodySize:responseBodySize.integerValue + responseCode:(int32_t) responseCode.integerValue + requestHeaders:requestHeaders + responseHeaders:responseHeaders + contentType:responseContentType + errorDomain:nil + errorCode:0 + startTime:startTime.integerValue * 1000 + duration:duration.integerValue + gqlQueryName:nil + serverErrorMessage:nil + isW3cCaughted:@1 + partialID:nil + timestamp:nil + generatedW3CTraceparent:nil + caughtedW3CTraceparent:@"1234" + ]); +} + +- (void)testNetworkLogWithW3GeneratedHeader { + NSString *url = @"https://example.com"; + NSString *requestBody = @"hi"; + NSNumber *requestBodySize = @17; + NSString *responseBody = @"{\"hello\":\"world\"}"; + NSNumber *responseBodySize = @153; + NSString *method = @"POST"; + NSNumber *responseCode = @201; + NSString *responseContentType = @"application/json"; + NSNumber *duration = @23000; + NSNumber *startTime = @1670156107523; + NSDictionary *requestHeaders = @{ @"Accepts": @"application/json" }; + NSDictionary *responseHeaders = @{ @"Content-Type": @"text/plain" }; + NSNumber *partialID = @12; + + NSNumber *timestamp = @34; + + NSString *generatedW3CTraceparent = @"12-34"; + + NSString *caughtedW3CTraceparent = nil; + NSDictionary *data = @{ + @"url": url, + @"requestBody": requestBody, + @"requestBodySize": requestBodySize, + @"responseBody": responseBody, + @"responseBodySize": responseBodySize, + @"method": method, + @"responseCode": responseCode, + @"requestHeaders": requestHeaders, + @"responseHeaders": responseHeaders, + @"responseContentType": responseContentType, + @"duration": duration, + @"startTime": startTime, + @"isW3cHeaderFound": @0, + @"partialId": partialID, + @"networkStartTimeInSeconds": timestamp, + @"w3CGeneratedHeader": generatedW3CTraceparent, + + }; + NSNumber *isW3cCaughted = @0; + + FlutterError* error; + + [self.api networkLogData:data error:&error]; + + OCMVerify([self.mNetworkLogger addNetworkLogWithUrl:url + method:method + requestBody:requestBody + requestBodySize:requestBodySize.integerValue + responseBody:responseBody + responseBodySize:responseBodySize.integerValue + responseCode:(int32_t) responseCode.integerValue + requestHeaders:requestHeaders + responseHeaders:responseHeaders + contentType:responseContentType + errorDomain:nil + errorCode:0 + startTime:startTime.integerValue * 1000 + duration:duration.integerValue + gqlQueryName:nil + serverErrorMessage:nil + isW3cCaughted:isW3cCaughted + partialID:partialID + timestamp:timestamp + generatedW3CTraceparent:generatedW3CTraceparent + caughtedW3CTraceparent:caughtedW3CTraceparent + + + + ]); +} + +- (void)testisW3CFeatureFlagsEnabled { + FlutterError *error; + + id mock = OCMClassMock([IBGNetworkLogger class]); + NSNumber *isW3cExternalTraceIDEnabled = @(YES); + + OCMStub([mock w3ExternalTraceIDEnabled]).andReturn([isW3cExternalTraceIDEnabled boolValue]); + OCMStub([mock w3ExternalGeneratedHeaderEnabled]).andReturn([isW3cExternalTraceIDEnabled boolValue]); + OCMStub([mock w3CaughtHeaderEnabled]).andReturn([isW3cExternalTraceIDEnabled boolValue]); + + + + NSDictionary * result= [self.api isW3CFeatureFlagsEnabledWithError:&error]; + + XCTAssertEqual(result[@"isW3cExternalTraceIDEnabled"],isW3cExternalTraceIDEnabled); + XCTAssertEqual(result[@"isW3cExternalGeneratedHeaderEnabled"],isW3cExternalTraceIDEnabled); + XCTAssertEqual(result[@"isW3cCaughtHeaderEnabled"],isW3cExternalTraceIDEnabled); + +} + @end diff --git a/example/ios/InstabugTests/InstabugLogApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/InstabugLogApiTests.m similarity index 100% rename from example/ios/InstabugTests/InstabugLogApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/InstabugLogApiTests.m diff --git a/example/ios/InstabugTests/RepliesApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/RepliesApiTests.m similarity index 100% rename from example/ios/InstabugTests/RepliesApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/RepliesApiTests.m diff --git a/example/ios/InstabugTests/SessionReplayApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/SessionReplayApiTests.m similarity index 100% rename from example/ios/InstabugTests/SessionReplayApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/SessionReplayApiTests.m diff --git a/example/ios/InstabugTests/SurveysApiTests.m b/packages/instabug_flutter/example/ios/InstabugTests/SurveysApiTests.m similarity index 100% rename from example/ios/InstabugTests/SurveysApiTests.m rename to packages/instabug_flutter/example/ios/InstabugTests/SurveysApiTests.m diff --git a/example/ios/InstabugTests/Util/Apm+Test.h b/packages/instabug_flutter/example/ios/InstabugTests/Util/Apm+Test.h similarity index 100% rename from example/ios/InstabugTests/Util/Apm+Test.h rename to packages/instabug_flutter/example/ios/InstabugTests/Util/Apm+Test.h diff --git a/example/ios/InstabugTests/Util/IBGCrashReporting+CP.h b/packages/instabug_flutter/example/ios/InstabugTests/Util/IBGCrashReporting+CP.h similarity index 100% rename from example/ios/InstabugTests/Util/IBGCrashReporting+CP.h rename to packages/instabug_flutter/example/ios/InstabugTests/Util/IBGCrashReporting+CP.h diff --git a/example/ios/InstabugTests/Util/IBGNetworkLogger+Test.h b/packages/instabug_flutter/example/ios/InstabugTests/Util/IBGNetworkLogger+Test.h similarity index 75% rename from example/ios/InstabugTests/Util/IBGNetworkLogger+Test.h rename to packages/instabug_flutter/example/ios/InstabugTests/Util/IBGNetworkLogger+Test.h index 55475a81f..09f10eb8d 100644 --- a/example/ios/InstabugTests/Util/IBGNetworkLogger+Test.h +++ b/packages/instabug_flutter/example/ios/InstabugTests/Util/IBGNetworkLogger+Test.h @@ -18,5 +18,10 @@ startTime:(int64_t)startTime duration:(int64_t) duration gqlQueryName:(NSString *_Nullable)gqlQueryName - serverErrorMessage:(NSString *_Nullable)gqlServerError; + serverErrorMessage:(NSString *_Nullable)gqlServerError + isW3cCaughted:(NSNumber *_Nullable)isW3cCaughted + partialID:(NSNumber *_Nullable)partialId + timestamp:(NSNumber *_Nullable)timestamp + generatedW3CTraceparent:(NSString *_Nullable)generatedW3CTraceparent + caughtedW3CTraceparent:(NSString *_Nullable)caughtedW3CTraceparent; @end diff --git a/example/ios/InstabugTests/Util/IBGSurvey+Test.h b/packages/instabug_flutter/example/ios/InstabugTests/Util/IBGSurvey+Test.h similarity index 100% rename from example/ios/InstabugTests/Util/IBGSurvey+Test.h rename to packages/instabug_flutter/example/ios/InstabugTests/Util/IBGSurvey+Test.h diff --git a/example/ios/InstabugTests/Util/Instabug+Test.h b/packages/instabug_flutter/example/ios/InstabugTests/Util/Instabug+Test.h similarity index 100% rename from example/ios/InstabugTests/Util/Instabug+Test.h rename to packages/instabug_flutter/example/ios/InstabugTests/Util/Instabug+Test.h diff --git a/example/ios/Podfile b/packages/instabug_flutter/example/ios/Podfile similarity index 100% rename from example/ios/Podfile rename to packages/instabug_flutter/example/ios/Podfile diff --git a/example/ios/Podfile.lock b/packages/instabug_flutter/example/ios/Podfile.lock similarity index 74% rename from example/ios/Podfile.lock rename to packages/instabug_flutter/example/ios/Podfile.lock index b0ee46890..41499d6a0 100644 --- a/example/ios/Podfile.lock +++ b/packages/instabug_flutter/example/ios/Podfile.lock @@ -1,9 +1,9 @@ PODS: - Flutter (1.0.0) - - Instabug (13.4.2) - - instabug_flutter (13.4.0): + - Instabug (14.0.0) + - instabug_flutter (14.0.0): - Flutter - - Instabug (= 13.4.2) + - Instabug (= 14.0.0) - OCMock (3.6) DEPENDENCIES: @@ -24,8 +24,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - Instabug: 7a71890217b97b1e32dbca96661845396b66da2f - instabug_flutter: a2df87e3d4d9e410785e0b1ffef4bc64d1f4b787 + Instabug: a0beffc01658773e2fac549845782f8937707dc4 + instabug_flutter: ff8ab5ff34a476b1d2d887478ec190cda962b973 OCMock: 5ea90566be239f179ba766fd9fbae5885040b992 PODFILE CHECKSUM: 8f7552fd115ace1988c3db54a69e4a123c448f84 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/packages/instabug_flutter/example/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from example/ios/Runner.xcodeproj/project.pbxproj rename to packages/instabug_flutter/example/ios/Runner.xcodeproj/project.pbxproj diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/instabug_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to packages/instabug_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/instabug_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/instabug_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/instabug_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to packages/instabug_flutter/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/instabug_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to packages/instabug_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/instabug_flutter/example/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/ios/Runner.xcworkspace/contents.xcworkspacedata rename to packages/instabug_flutter/example/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/instabug_flutter/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/instabug_flutter/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/instabug_flutter/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to packages/instabug_flutter/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/example/ios/Runner/AppDelegate.swift b/packages/instabug_flutter/example/ios/Runner/AppDelegate.swift similarity index 97% rename from example/ios/Runner/AppDelegate.swift rename to packages/instabug_flutter/example/ios/Runner/AppDelegate.swift index 11f416a26..b8991863b 100644 --- a/example/ios/Runner/AppDelegate.swift +++ b/packages/instabug_flutter/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to packages/instabug_flutter/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/instabug_flutter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from example/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to packages/instabug_flutter/example/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/packages/instabug_flutter/example/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from example/ios/Runner/Base.lproj/Main.storyboard rename to packages/instabug_flutter/example/ios/Runner/Base.lproj/Main.storyboard diff --git a/example/ios/Runner/Info.plist b/packages/instabug_flutter/example/ios/Runner/Info.plist similarity index 100% rename from example/ios/Runner/Info.plist rename to packages/instabug_flutter/example/ios/Runner/Info.plist diff --git a/example/ios/Runner/InstabugExampleMethodCallHandler.h b/packages/instabug_flutter/example/ios/Runner/InstabugExampleMethodCallHandler.h similarity index 100% rename from example/ios/Runner/InstabugExampleMethodCallHandler.h rename to packages/instabug_flutter/example/ios/Runner/InstabugExampleMethodCallHandler.h diff --git a/example/ios/Runner/InstabugExampleMethodCallHandler.m b/packages/instabug_flutter/example/ios/Runner/InstabugExampleMethodCallHandler.m similarity index 100% rename from example/ios/Runner/InstabugExampleMethodCallHandler.m rename to packages/instabug_flutter/example/ios/Runner/InstabugExampleMethodCallHandler.m diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/packages/instabug_flutter/example/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from example/ios/Runner/Runner-Bridging-Header.h rename to packages/instabug_flutter/example/ios/Runner/Runner-Bridging-Header.h diff --git a/example/lib/main.dart b/packages/instabug_flutter/example/lib/main.dart similarity index 100% rename from example/lib/main.dart rename to packages/instabug_flutter/example/lib/main.dart diff --git a/example/lib/src/app_routes.dart b/packages/instabug_flutter/example/lib/src/app_routes.dart similarity index 100% rename from example/lib/src/app_routes.dart rename to packages/instabug_flutter/example/lib/src/app_routes.dart diff --git a/example/lib/src/components/fatal_crashes_content.dart b/packages/instabug_flutter/example/lib/src/components/fatal_crashes_content.dart similarity index 100% rename from example/lib/src/components/fatal_crashes_content.dart rename to packages/instabug_flutter/example/lib/src/components/fatal_crashes_content.dart diff --git a/example/lib/src/components/flows_content.dart b/packages/instabug_flutter/example/lib/src/components/flows_content.dart similarity index 100% rename from example/lib/src/components/flows_content.dart rename to packages/instabug_flutter/example/lib/src/components/flows_content.dart diff --git a/example/lib/src/components/network_content.dart b/packages/instabug_flutter/example/lib/src/components/network_content.dart similarity index 67% rename from example/lib/src/components/network_content.dart rename to packages/instabug_flutter/example/lib/src/components/network_content.dart index f55af5c95..77ac744b2 100644 --- a/example/lib/src/components/network_content.dart +++ b/packages/instabug_flutter/example/lib/src/components/network_content.dart @@ -26,14 +26,24 @@ class _NetworkContentState extends State { text: 'Send Request To Url', onPressed: () => _sendRequestToUrl(endpointUrlController.text), ), + Text("W3C Header Section"), + InstabugButton( + text: 'Send Request With Custom traceparent header', + onPressed: () => _sendRequestToUrl(endpointUrlController.text, + headers: {"traceparent": "Custom traceparent header"}), + ), + InstabugButton( + text: 'Send Request Without Custom traceparent header', + onPressed: () => _sendRequestToUrl(endpointUrlController.text), + ), ], ); } - void _sendRequestToUrl(String text) async { + void _sendRequestToUrl(String text, {Map? headers}) async { try { String url = text.trim().isEmpty ? widget.defaultRequestUrl : text; - final response = await http.get(Uri.parse(url)); + final response = await http.get(Uri.parse(url), headers: headers); // Handle the response here if (response.statusCode == 200) { diff --git a/example/lib/src/components/non_fatal_crashes_content.dart b/packages/instabug_flutter/example/lib/src/components/non_fatal_crashes_content.dart similarity index 100% rename from example/lib/src/components/non_fatal_crashes_content.dart rename to packages/instabug_flutter/example/lib/src/components/non_fatal_crashes_content.dart diff --git a/example/lib/src/components/page.dart b/packages/instabug_flutter/example/lib/src/components/page.dart similarity index 100% rename from example/lib/src/components/page.dart rename to packages/instabug_flutter/example/lib/src/components/page.dart diff --git a/example/lib/src/components/traces_content.dart b/packages/instabug_flutter/example/lib/src/components/traces_content.dart similarity index 100% rename from example/lib/src/components/traces_content.dart rename to packages/instabug_flutter/example/lib/src/components/traces_content.dart diff --git a/example/lib/src/native/instabug_flutter_example_method_channel.dart b/packages/instabug_flutter/example/lib/src/native/instabug_flutter_example_method_channel.dart similarity index 100% rename from example/lib/src/native/instabug_flutter_example_method_channel.dart rename to packages/instabug_flutter/example/lib/src/native/instabug_flutter_example_method_channel.dart diff --git a/example/lib/src/screens/apm_page.dart b/packages/instabug_flutter/example/lib/src/screens/apm_page.dart similarity index 100% rename from example/lib/src/screens/apm_page.dart rename to packages/instabug_flutter/example/lib/src/screens/apm_page.dart diff --git a/example/lib/src/screens/complex_page.dart b/packages/instabug_flutter/example/lib/src/screens/complex_page.dart similarity index 100% rename from example/lib/src/screens/complex_page.dart rename to packages/instabug_flutter/example/lib/src/screens/complex_page.dart diff --git a/example/lib/src/screens/crashes_page.dart b/packages/instabug_flutter/example/lib/src/screens/crashes_page.dart similarity index 100% rename from example/lib/src/screens/crashes_page.dart rename to packages/instabug_flutter/example/lib/src/screens/crashes_page.dart diff --git a/example/lib/src/screens/my_home_page.dart b/packages/instabug_flutter/example/lib/src/screens/my_home_page.dart similarity index 100% rename from example/lib/src/screens/my_home_page.dart rename to packages/instabug_flutter/example/lib/src/screens/my_home_page.dart diff --git a/example/lib/src/screens/screen_capture_premature_extension_page.dart b/packages/instabug_flutter/example/lib/src/screens/screen_capture_premature_extension_page.dart similarity index 100% rename from example/lib/src/screens/screen_capture_premature_extension_page.dart rename to packages/instabug_flutter/example/lib/src/screens/screen_capture_premature_extension_page.dart diff --git a/example/lib/src/screens/screen_loading_page.dart b/packages/instabug_flutter/example/lib/src/screens/screen_loading_page.dart similarity index 100% rename from example/lib/src/screens/screen_loading_page.dart rename to packages/instabug_flutter/example/lib/src/screens/screen_loading_page.dart diff --git a/example/lib/src/widget/instabug_button.dart b/packages/instabug_flutter/example/lib/src/widget/instabug_button.dart similarity index 100% rename from example/lib/src/widget/instabug_button.dart rename to packages/instabug_flutter/example/lib/src/widget/instabug_button.dart diff --git a/example/lib/src/widget/instabug_clipboard_icon_button.dart b/packages/instabug_flutter/example/lib/src/widget/instabug_clipboard_icon_button.dart similarity index 100% rename from example/lib/src/widget/instabug_clipboard_icon_button.dart rename to packages/instabug_flutter/example/lib/src/widget/instabug_clipboard_icon_button.dart diff --git a/example/lib/src/widget/instabug_clipboard_input.dart b/packages/instabug_flutter/example/lib/src/widget/instabug_clipboard_input.dart similarity index 100% rename from example/lib/src/widget/instabug_clipboard_input.dart rename to packages/instabug_flutter/example/lib/src/widget/instabug_clipboard_input.dart diff --git a/example/lib/src/widget/instabug_text_field.dart b/packages/instabug_flutter/example/lib/src/widget/instabug_text_field.dart similarity index 100% rename from example/lib/src/widget/instabug_text_field.dart rename to packages/instabug_flutter/example/lib/src/widget/instabug_text_field.dart diff --git a/example/lib/src/widget/nested_view.dart b/packages/instabug_flutter/example/lib/src/widget/nested_view.dart similarity index 100% rename from example/lib/src/widget/nested_view.dart rename to packages/instabug_flutter/example/lib/src/widget/nested_view.dart diff --git a/example/lib/src/widget/section_title.dart b/packages/instabug_flutter/example/lib/src/widget/section_title.dart similarity index 100% rename from example/lib/src/widget/section_title.dart rename to packages/instabug_flutter/example/lib/src/widget/section_title.dart diff --git a/example/pubspec.lock b/packages/instabug_flutter/example/pubspec.lock similarity index 87% rename from example/pubspec.lock rename to packages/instabug_flutter/example/pubspec.lock index 31cb6f5dd..ebdc6b68c 100644 --- a/example/pubspec.lock +++ b/packages/instabug_flutter/example/pubspec.lock @@ -41,14 +41,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" - espresso: - dependency: "direct dev" - description: - name: espresso - sha256: "641bdfcaec98b2fe2f5c90d61a16cdf6879ddac4d7333a6467ef03d60933596b" - url: "https://pub.dev" - source: hosted - version: "0.2.0+5" fake_async: dependency: transitive description: @@ -115,7 +107,7 @@ packages: path: ".." relative: true source: path - version: "13.4.0" + version: "14.0.0" instabug_http_client: dependency: "direct main" description: @@ -128,18 +120,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -168,18 +160,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" path: dependency: transitive description: @@ -192,10 +184,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" process: dependency: transitive description: @@ -261,18 +253,18 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vector_math: dependency: transitive description: @@ -285,10 +277,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" webdriver: dependency: transitive description: @@ -298,5 +290,5 @@ packages: source: hosted version: "3.0.3" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.5.0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/example/pubspec.yaml b/packages/instabug_flutter/example/pubspec.yaml similarity index 97% rename from example/pubspec.yaml rename to packages/instabug_flutter/example/pubspec.yaml index 7f3e9e622..6bb0e3e71 100644 --- a/example/pubspec.yaml +++ b/packages/instabug_flutter/example/pubspec.yaml @@ -25,11 +25,10 @@ dependencies: sdk: flutter http: ^0.13.0 instabug_flutter: - path: ../ + path: '../../packages/Instabug-Flutter' instabug_http_client: ^2.4.0 dev_dependencies: - espresso: 0.2.0+5 flutter_driver: sdk: flutter flutter_test: @@ -38,7 +37,7 @@ dev_dependencies: dependency_overrides: instabug_flutter: - path: ../ + path: '../' # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/example/test_driver/example.dart b/packages/instabug_flutter/example/test_driver/example.dart similarity index 100% rename from example/test_driver/example.dart rename to packages/instabug_flutter/example/test_driver/example.dart diff --git a/ios/.gitignore b/packages/instabug_flutter/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to packages/instabug_flutter/ios/.gitignore diff --git a/ios/Assets/.gitkeep b/packages/instabug_flutter/ios/Assets/.gitkeep similarity index 100% rename from ios/Assets/.gitkeep rename to packages/instabug_flutter/ios/Assets/.gitkeep diff --git a/ios/Classes/InstabugFlutterPlugin.h b/packages/instabug_flutter/ios/Classes/InstabugFlutterPlugin.h similarity index 100% rename from ios/Classes/InstabugFlutterPlugin.h rename to packages/instabug_flutter/ios/Classes/InstabugFlutterPlugin.h diff --git a/ios/Classes/InstabugFlutterPlugin.m b/packages/instabug_flutter/ios/Classes/InstabugFlutterPlugin.m similarity index 100% rename from ios/Classes/InstabugFlutterPlugin.m rename to packages/instabug_flutter/ios/Classes/InstabugFlutterPlugin.m diff --git a/ios/Classes/Modules/ApmApi.h b/packages/instabug_flutter/ios/Classes/Modules/ApmApi.h similarity index 100% rename from ios/Classes/Modules/ApmApi.h rename to packages/instabug_flutter/ios/Classes/Modules/ApmApi.h diff --git a/ios/Classes/Modules/ApmApi.m b/packages/instabug_flutter/ios/Classes/Modules/ApmApi.m similarity index 100% rename from ios/Classes/Modules/ApmApi.m rename to packages/instabug_flutter/ios/Classes/Modules/ApmApi.m diff --git a/ios/Classes/Modules/BugReportingApi.h b/packages/instabug_flutter/ios/Classes/Modules/BugReportingApi.h similarity index 100% rename from ios/Classes/Modules/BugReportingApi.h rename to packages/instabug_flutter/ios/Classes/Modules/BugReportingApi.h diff --git a/ios/Classes/Modules/BugReportingApi.m b/packages/instabug_flutter/ios/Classes/Modules/BugReportingApi.m similarity index 100% rename from ios/Classes/Modules/BugReportingApi.m rename to packages/instabug_flutter/ios/Classes/Modules/BugReportingApi.m diff --git a/ios/Classes/Modules/CrashReportingApi.h b/packages/instabug_flutter/ios/Classes/Modules/CrashReportingApi.h similarity index 100% rename from ios/Classes/Modules/CrashReportingApi.h rename to packages/instabug_flutter/ios/Classes/Modules/CrashReportingApi.h diff --git a/ios/Classes/Modules/CrashReportingApi.m b/packages/instabug_flutter/ios/Classes/Modules/CrashReportingApi.m similarity index 100% rename from ios/Classes/Modules/CrashReportingApi.m rename to packages/instabug_flutter/ios/Classes/Modules/CrashReportingApi.m diff --git a/ios/Classes/Modules/FeatureRequestsApi.h b/packages/instabug_flutter/ios/Classes/Modules/FeatureRequestsApi.h similarity index 100% rename from ios/Classes/Modules/FeatureRequestsApi.h rename to packages/instabug_flutter/ios/Classes/Modules/FeatureRequestsApi.h diff --git a/ios/Classes/Modules/FeatureRequestsApi.m b/packages/instabug_flutter/ios/Classes/Modules/FeatureRequestsApi.m similarity index 100% rename from ios/Classes/Modules/FeatureRequestsApi.m rename to packages/instabug_flutter/ios/Classes/Modules/FeatureRequestsApi.m diff --git a/ios/Classes/Modules/InstabugApi.h b/packages/instabug_flutter/ios/Classes/Modules/InstabugApi.h similarity index 100% rename from ios/Classes/Modules/InstabugApi.h rename to packages/instabug_flutter/ios/Classes/Modules/InstabugApi.h diff --git a/ios/Classes/Modules/InstabugApi.m b/packages/instabug_flutter/ios/Classes/Modules/InstabugApi.m similarity index 88% rename from ios/Classes/Modules/InstabugApi.m rename to packages/instabug_flutter/ios/Classes/Modules/InstabugApi.m index 11ea09354..8cdd336d1 100644 --- a/ios/Classes/Modules/InstabugApi.m +++ b/packages/instabug_flutter/ios/Classes/Modules/InstabugApi.m @@ -5,6 +5,7 @@ #import "IBGNetworkLogger+CP.h" #import "InstabugApi.h" #import "ArgsRegistry.h" +#import "../Util/IBGAPM+PrivateAPIs.h" #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 blue:((float)(rgbValue & 0xFF)) / 255.0 alpha:((float)((rgbValue & 0xFF000000) >> 24)) / 255.0]; @@ -279,12 +280,39 @@ - (void)networkLogData:(NSDictionary *)data error:(FlutterError NSString *gqlQueryName = nil; NSString *serverErrorMessage = nil; + NSNumber *isW3cHeaderFound = nil; + NSNumber *partialId = nil; + NSNumber *networkStartTimeInSeconds = nil; + NSString *w3CGeneratedHeader = nil; + NSString *w3CCaughtHeader = nil; + if (data[@"gqlQueryName"] != [NSNull null]) { gqlQueryName = data[@"gqlQueryName"]; } if (data[@"serverErrorMessage"] != [NSNull null]) { serverErrorMessage = data[@"serverErrorMessage"]; } + if (data[@"partialId"] != [NSNull null]) { + partialId = data[@"partialId"]; + } + + if (data[@"isW3cHeaderFound"] != [NSNull null]) { + isW3cHeaderFound = data[@"isW3cHeaderFound"]; + } + + if (data[@"networkStartTimeInSeconds"] != [NSNull null]) { + networkStartTimeInSeconds = data[@"networkStartTimeInSeconds"]; + } + + if (data[@"w3CGeneratedHeader"] != [NSNull null]) { + w3CGeneratedHeader = data[@"w3CGeneratedHeader"]; + } + + if (data[@"w3CCaughtHeader"] != [NSNull null]) { + w3CCaughtHeader = data[@"w3CCaughtHeader"]; + } + + [IBGNetworkLogger addNetworkLogWithUrl:url method:method @@ -302,11 +330,11 @@ - (void)networkLogData:(NSDictionary *)data error:(FlutterError duration:duration gqlQueryName:gqlQueryName serverErrorMessage:serverErrorMessage - isW3cCaughted:nil - partialID:nil - timestamp:nil - generatedW3CTraceparent:nil - caughtedW3CTraceparent:nil]; + isW3cCaughted:isW3cHeaderFound + partialID:partialId + timestamp:networkStartTimeInSeconds + generatedW3CTraceparent:w3CGeneratedHeader + caughtedW3CTraceparent:w3CCaughtHeader]; } - (void)willRedirectToStoreWithError:(FlutterError * _Nullable __autoreleasing *)error { @@ -348,5 +376,21 @@ - (void)removeFeatureFlagsFeatureFlags:(nonnull NSArray *)featureFla } } +- (void)registerFeatureFlagChangeListenerWithError:(FlutterError * _Nullable __autoreleasing * _Nonnull)error { + // Android only. We still need this method to exist to match the Pigeon-generated protocol. + +} + + +- (nullable NSDictionary *)isW3CFeatureFlagsEnabledWithError:(FlutterError * _Nullable __autoreleasing * _Nonnull)error { + NSDictionary *result= @{ + @"isW3cExternalTraceIDEnabled":[NSNumber numberWithBool:IBGNetworkLogger.w3ExternalTraceIDEnabled] , + @"isW3cExternalGeneratedHeaderEnabled":[NSNumber numberWithBool:IBGNetworkLogger.w3ExternalGeneratedHeaderEnabled] , + @"isW3cCaughtHeaderEnabled":[NSNumber numberWithBool:IBGNetworkLogger.w3CaughtHeaderEnabled] , + + }; + return result; +} + @end diff --git a/ios/Classes/Modules/InstabugLogApi.h b/packages/instabug_flutter/ios/Classes/Modules/InstabugLogApi.h similarity index 100% rename from ios/Classes/Modules/InstabugLogApi.h rename to packages/instabug_flutter/ios/Classes/Modules/InstabugLogApi.h diff --git a/ios/Classes/Modules/InstabugLogApi.m b/packages/instabug_flutter/ios/Classes/Modules/InstabugLogApi.m similarity index 100% rename from ios/Classes/Modules/InstabugLogApi.m rename to packages/instabug_flutter/ios/Classes/Modules/InstabugLogApi.m diff --git a/ios/Classes/Modules/RepliesApi.h b/packages/instabug_flutter/ios/Classes/Modules/RepliesApi.h similarity index 100% rename from ios/Classes/Modules/RepliesApi.h rename to packages/instabug_flutter/ios/Classes/Modules/RepliesApi.h diff --git a/ios/Classes/Modules/RepliesApi.m b/packages/instabug_flutter/ios/Classes/Modules/RepliesApi.m similarity index 100% rename from ios/Classes/Modules/RepliesApi.m rename to packages/instabug_flutter/ios/Classes/Modules/RepliesApi.m diff --git a/ios/Classes/Modules/SessionReplayApi.h b/packages/instabug_flutter/ios/Classes/Modules/SessionReplayApi.h similarity index 100% rename from ios/Classes/Modules/SessionReplayApi.h rename to packages/instabug_flutter/ios/Classes/Modules/SessionReplayApi.h diff --git a/ios/Classes/Modules/SessionReplayApi.m b/packages/instabug_flutter/ios/Classes/Modules/SessionReplayApi.m similarity index 100% rename from ios/Classes/Modules/SessionReplayApi.m rename to packages/instabug_flutter/ios/Classes/Modules/SessionReplayApi.m diff --git a/ios/Classes/Modules/SurveysApi.h b/packages/instabug_flutter/ios/Classes/Modules/SurveysApi.h similarity index 100% rename from ios/Classes/Modules/SurveysApi.h rename to packages/instabug_flutter/ios/Classes/Modules/SurveysApi.h diff --git a/ios/Classes/Modules/SurveysApi.m b/packages/instabug_flutter/ios/Classes/Modules/SurveysApi.m similarity index 100% rename from ios/Classes/Modules/SurveysApi.m rename to packages/instabug_flutter/ios/Classes/Modules/SurveysApi.m diff --git a/ios/Classes/Util/ArgsRegistry.h b/packages/instabug_flutter/ios/Classes/Util/ArgsRegistry.h similarity index 100% rename from ios/Classes/Util/ArgsRegistry.h rename to packages/instabug_flutter/ios/Classes/Util/ArgsRegistry.h diff --git a/ios/Classes/Util/ArgsRegistry.m b/packages/instabug_flutter/ios/Classes/Util/ArgsRegistry.m similarity index 100% rename from ios/Classes/Util/ArgsRegistry.m rename to packages/instabug_flutter/ios/Classes/Util/ArgsRegistry.m diff --git a/ios/Classes/Util/NativeUtils/IBGAPM+PrivateAPIs.h b/packages/instabug_flutter/ios/Classes/Util/IBGAPM+PrivateAPIs.h similarity index 93% rename from ios/Classes/Util/NativeUtils/IBGAPM+PrivateAPIs.h rename to packages/instabug_flutter/ios/Classes/Util/IBGAPM+PrivateAPIs.h index 2c2158479..e61bda308 100644 --- a/ios/Classes/Util/NativeUtils/IBGAPM+PrivateAPIs.h +++ b/packages/instabug_flutter/ios/Classes/Util/IBGAPM+PrivateAPIs.h @@ -11,7 +11,6 @@ @interface IBGAPM (PrivateAPIs) -@property (class, atomic, assign) BOOL networkEnabled; /// `endScreenLoadingEnabled` will be only true if APM, screenLoadingFeature.enabled and autoUITracesUserPreference are true @property (class, atomic, assign) BOOL endScreenLoadingEnabled; diff --git a/ios/Classes/Util/IBGCrashReporting+CP.h b/packages/instabug_flutter/ios/Classes/Util/IBGCrashReporting+CP.h similarity index 100% rename from ios/Classes/Util/IBGCrashReporting+CP.h rename to packages/instabug_flutter/ios/Classes/Util/IBGCrashReporting+CP.h diff --git a/ios/Classes/Util/IBGNetworkLogger+CP.h b/packages/instabug_flutter/ios/Classes/Util/IBGNetworkLogger+CP.h similarity index 55% rename from ios/Classes/Util/IBGNetworkLogger+CP.h rename to packages/instabug_flutter/ios/Classes/Util/IBGNetworkLogger+CP.h index 764524fb2..244e3d195 100644 --- a/ios/Classes/Util/IBGNetworkLogger+CP.h +++ b/packages/instabug_flutter/ios/Classes/Util/IBGNetworkLogger+CP.h @@ -2,7 +2,12 @@ NS_ASSUME_NONNULL_BEGIN -@interface IBGNetworkLogger (CP) + +@interface IBGNetworkLogger (PrivateAPIs) + +@property (class, atomic, assign) BOOL w3ExternalTraceIDEnabled; +@property (class, atomic, assign) BOOL w3ExternalGeneratedHeaderEnabled; +@property (class, atomic, assign) BOOL w3CaughtHeaderEnabled; + (void)disableAutomaticCapturingOfNetworkLogs; @@ -28,6 +33,22 @@ NS_ASSUME_NONNULL_BEGIN generatedW3CTraceparent:(NSString * _Nullable)generatedW3CTraceparent caughtedW3CTraceparent:(NSString * _Nullable)caughtedW3CTraceparent; ++ (void)addNetworkLogWithUrl:(NSString *_Nonnull)url + method:(NSString *_Nonnull)method + requestBody:(NSString *_Nonnull)request + requestBodySize:(int64_t)requestBodySize + responseBody:(NSString *_Nonnull)response + responseBodySize:(int64_t)responseBodySize + responseCode:(int32_t)code + requestHeaders:(NSDictionary *_Nonnull)requestHeaders + responseHeaders:(NSDictionary *_Nonnull)responseHeaders + contentType:(NSString *_Nonnull)contentType + errorDomain:(NSString *_Nullable)errorDomain + errorCode:(int32_t)errorCode + startTime:(int64_t)startTime + duration:(int64_t) duration + gqlQueryName:(NSString * _Nullable)gqlQueryName; + @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Util/NativeUtils/IBGTimeIntervalUnits.h b/packages/instabug_flutter/ios/Classes/Util/NativeUtils/IBGTimeIntervalUnits.h similarity index 100% rename from ios/Classes/Util/NativeUtils/IBGTimeIntervalUnits.h rename to packages/instabug_flutter/ios/Classes/Util/NativeUtils/IBGTimeIntervalUnits.h diff --git a/ios/instabug_flutter.podspec b/packages/instabug_flutter/ios/instabug_flutter.podspec similarity index 92% rename from ios/instabug_flutter.podspec rename to packages/instabug_flutter/ios/instabug_flutter.podspec index 1d362767f..4d610ddbf 100644 --- a/ios/instabug_flutter.podspec +++ b/packages/instabug_flutter/ios/instabug_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'instabug_flutter' - s.version = '13.4.0' + s.version = '14.0.0' s.summary = 'Flutter plugin for integrating the Instabug SDK.' s.author = 'Instabug' s.homepage = 'https://www.instabug.com/platforms/flutter' @@ -17,6 +17,6 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-framework "Flutter" -framework "Instabug"'} s.dependency 'Flutter' - s.dependency 'Instabug', '13.4.2' + s.dependency 'Instabug', '14.0.0' end diff --git a/lib/instabug_flutter.dart b/packages/instabug_flutter/lib/instabug_flutter.dart similarity index 95% rename from lib/instabug_flutter.dart rename to packages/instabug_flutter/lib/instabug_flutter.dart index 6dc949d1b..e38545897 100644 --- a/lib/instabug_flutter.dart +++ b/packages/instabug_flutter/lib/instabug_flutter.dart @@ -4,6 +4,8 @@ export 'src/models/exception_data.dart'; export 'src/models/feature_flag.dart'; export 'src/models/network_data.dart'; export 'src/models/trace.dart'; +export 'src/models/w3c_header.dart'; + // Modules export 'src/modules/apm.dart'; export 'src/modules/bug_reporting.dart'; diff --git a/lib/src/models/crash_data.dart b/packages/instabug_flutter/lib/src/models/crash_data.dart similarity index 100% rename from lib/src/models/crash_data.dart rename to packages/instabug_flutter/lib/src/models/crash_data.dart diff --git a/lib/src/models/exception_data.dart b/packages/instabug_flutter/lib/src/models/exception_data.dart similarity index 100% rename from lib/src/models/exception_data.dart rename to packages/instabug_flutter/lib/src/models/exception_data.dart diff --git a/lib/src/models/feature_flag.dart b/packages/instabug_flutter/lib/src/models/feature_flag.dart similarity index 100% rename from lib/src/models/feature_flag.dart rename to packages/instabug_flutter/lib/src/models/feature_flag.dart diff --git a/packages/instabug_flutter/lib/src/models/generated_w3c_header.dart b/packages/instabug_flutter/lib/src/models/generated_w3c_header.dart new file mode 100644 index 000000000..dc1e4c51f --- /dev/null +++ b/packages/instabug_flutter/lib/src/models/generated_w3c_header.dart @@ -0,0 +1,24 @@ +class GeneratedW3CHeader { + num timestampInSeconds; + int partialId; + String w3cHeader; + + GeneratedW3CHeader({ + required this.timestampInSeconds, + required this.partialId, + required this.w3cHeader, + }); + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GeneratedW3CHeader && + runtimeType == other.runtimeType && + timestampInSeconds == other.timestampInSeconds && + partialId == other.partialId && + w3cHeader == other.w3cHeader; + + @override + int get hashCode => + timestampInSeconds.hashCode ^ partialId.hashCode ^ w3cHeader.hashCode; +} diff --git a/lib/src/models/instabug_route.dart b/packages/instabug_flutter/lib/src/models/instabug_route.dart similarity index 100% rename from lib/src/models/instabug_route.dart rename to packages/instabug_flutter/lib/src/models/instabug_route.dart diff --git a/lib/src/models/network_data.dart b/packages/instabug_flutter/lib/src/models/network_data.dart similarity index 60% rename from lib/src/models/network_data.dart rename to packages/instabug_flutter/lib/src/models/network_data.dart index 03a26abd2..6589bb109 100644 --- a/lib/src/models/network_data.dart +++ b/packages/instabug_flutter/lib/src/models/network_data.dart @@ -1,5 +1,7 @@ +import 'package:instabug_flutter/src/models/w3c_header.dart'; + class NetworkData { - const NetworkData({ + NetworkData({ required this.url, required this.method, this.requestBody = '', @@ -16,7 +18,10 @@ class NetworkData { required this.startTime, this.errorCode = 0, this.errorDomain = '', - }); + W3CHeader? w3cHeader, + }) { + _w3cHeader = w3cHeader; + } final String url; final String method; @@ -34,6 +39,50 @@ class NetworkData { final DateTime startTime; final int errorCode; final String errorDomain; + W3CHeader? _w3cHeader; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is NetworkData && + runtimeType == other.runtimeType && + url == other.url && + method == other.method && + requestBody == other.requestBody && + responseBody == other.responseBody && + requestBodySize == other.requestBodySize && + responseBodySize == other.responseBodySize && + status == other.status && + requestHeaders == other.requestHeaders && + responseHeaders == other.responseHeaders && + duration == other.duration && + requestContentType == other.requestContentType && + responseContentType == other.responseContentType && + endTime == other.endTime && + startTime == other.startTime && + errorCode == other.errorCode && + errorDomain == other.errorDomain && + _w3cHeader == other._w3cHeader; + + @override + int get hashCode => + url.hashCode ^ + method.hashCode ^ + requestBody.hashCode ^ + responseBody.hashCode ^ + requestBodySize.hashCode ^ + responseBodySize.hashCode ^ + status.hashCode ^ + requestHeaders.hashCode ^ + responseHeaders.hashCode ^ + duration.hashCode ^ + requestContentType.hashCode ^ + responseContentType.hashCode ^ + endTime.hashCode ^ + startTime.hashCode ^ + errorCode.hashCode ^ + errorDomain.hashCode ^ + _w3cHeader.hashCode; NetworkData copyWith({ String? url, @@ -52,6 +101,7 @@ class NetworkData { DateTime? startTime, int? errorCode, String? errorDomain, + W3CHeader? w3cHeader, }) { return NetworkData( url: url ?? this.url, @@ -70,6 +120,7 @@ class NetworkData { startTime: startTime ?? this.startTime, errorCode: errorCode ?? this.errorCode, errorDomain: errorDomain ?? this.errorDomain, + w3cHeader: w3cHeader ?? _w3cHeader, ); } @@ -92,6 +143,11 @@ class NetworkData { 'responseBodySize': responseBodySize, 'errorDomain': errorDomain, 'errorCode': errorCode, + "isW3cHeaderFound": _w3cHeader?.isW3cHeaderFound, + "partialId": _w3cHeader?.partialId, + "networkStartTimeInSeconds": _w3cHeader?.networkStartTimeInSeconds, + "w3CGeneratedHeader": _w3cHeader?.w3CGeneratedHeader, + "w3CCaughtHeader": _w3cHeader?.w3CCaughtHeader, }; } } diff --git a/lib/src/models/trace.dart b/packages/instabug_flutter/lib/src/models/trace.dart similarity index 100% rename from lib/src/models/trace.dart rename to packages/instabug_flutter/lib/src/models/trace.dart diff --git a/packages/instabug_flutter/lib/src/models/trace_partial_id.dart b/packages/instabug_flutter/lib/src/models/trace_partial_id.dart new file mode 100644 index 000000000..ac5e59b87 --- /dev/null +++ b/packages/instabug_flutter/lib/src/models/trace_partial_id.dart @@ -0,0 +1,20 @@ +class TracePartialId { + int numberPartialId; + String hexPartialId; + + TracePartialId({ + required this.numberPartialId, + required this.hexPartialId, + }); + + @override + bool operator ==(Object other) => + identical(this, other) || + (other is TracePartialId && + runtimeType == other.runtimeType && + numberPartialId == other.numberPartialId && + hexPartialId == other.hexPartialId); + + @override + int get hashCode => numberPartialId.hashCode ^ hexPartialId.hashCode; +} diff --git a/packages/instabug_flutter/lib/src/models/w3c_feature_flags.dart b/packages/instabug_flutter/lib/src/models/w3c_feature_flags.dart new file mode 100644 index 000000000..4a298e57b --- /dev/null +++ b/packages/instabug_flutter/lib/src/models/w3c_feature_flags.dart @@ -0,0 +1,11 @@ +class W3cFeatureFlags { + bool isW3cExternalTraceIDEnabled; + bool isW3cExternalGeneratedHeaderEnabled; + bool isW3cCaughtHeaderEnabled; + + W3cFeatureFlags({ + required this.isW3cExternalTraceIDEnabled, + required this.isW3cExternalGeneratedHeaderEnabled, + required this.isW3cCaughtHeaderEnabled, + }); +} diff --git a/packages/instabug_flutter/lib/src/models/w3c_header.dart b/packages/instabug_flutter/lib/src/models/w3c_header.dart new file mode 100644 index 000000000..dfc7b67a2 --- /dev/null +++ b/packages/instabug_flutter/lib/src/models/w3c_header.dart @@ -0,0 +1,34 @@ +class W3CHeader { + final bool? isW3cHeaderFound; + final num? partialId; + final num? networkStartTimeInSeconds; + final String? w3CGeneratedHeader; + final String? w3CCaughtHeader; + + W3CHeader({ + this.isW3cHeaderFound, + this.partialId, + this.networkStartTimeInSeconds, + this.w3CGeneratedHeader, + this.w3CCaughtHeader, + }); + + @override + bool operator ==(Object other) => + identical(this, other) || + other is W3CHeader && + runtimeType == other.runtimeType && + isW3cHeaderFound == other.isW3cHeaderFound && + partialId == other.partialId && + networkStartTimeInSeconds == other.networkStartTimeInSeconds && + w3CGeneratedHeader == other.w3CGeneratedHeader && + w3CCaughtHeader == other.w3CCaughtHeader; + + @override + int get hashCode => + isW3cHeaderFound.hashCode ^ + partialId.hashCode ^ + networkStartTimeInSeconds.hashCode ^ + w3CGeneratedHeader.hashCode ^ + w3CCaughtHeader.hashCode; +} diff --git a/lib/src/modules/apm.dart b/packages/instabug_flutter/lib/src/modules/apm.dart similarity index 100% rename from lib/src/modules/apm.dart rename to packages/instabug_flutter/lib/src/modules/apm.dart diff --git a/lib/src/modules/bug_reporting.dart b/packages/instabug_flutter/lib/src/modules/bug_reporting.dart similarity index 99% rename from lib/src/modules/bug_reporting.dart rename to packages/instabug_flutter/lib/src/modules/bug_reporting.dart index bf2bca82c..bec8fd53d 100644 --- a/lib/src/modules/bug_reporting.dart +++ b/packages/instabug_flutter/lib/src/modules/bug_reporting.dart @@ -252,7 +252,7 @@ class BugReporting implements BugReportingFlutterApi { ]) async { return _host.setCommentMinimumCharacterCount( limit, - reportTypes?.mapToString(), + reportTypes.mapToString(), ); } } diff --git a/lib/src/modules/crash_reporting.dart b/packages/instabug_flutter/lib/src/modules/crash_reporting.dart similarity index 100% rename from lib/src/modules/crash_reporting.dart rename to packages/instabug_flutter/lib/src/modules/crash_reporting.dart diff --git a/lib/src/modules/feature_requests.dart b/packages/instabug_flutter/lib/src/modules/feature_requests.dart similarity index 100% rename from lib/src/modules/feature_requests.dart rename to packages/instabug_flutter/lib/src/modules/feature_requests.dart diff --git a/lib/src/modules/instabug.dart b/packages/instabug_flutter/lib/src/modules/instabug.dart similarity index 98% rename from lib/src/modules/instabug.dart rename to packages/instabug_flutter/lib/src/modules/instabug.dart index bf457a4fb..766067df6 100644 --- a/lib/src/modules/instabug.dart +++ b/packages/instabug_flutter/lib/src/modules/instabug.dart @@ -17,6 +17,7 @@ import 'package:flutter/services.dart'; import 'package:instabug_flutter/instabug_flutter.dart'; import 'package:instabug_flutter/src/generated/instabug.api.g.dart'; import 'package:instabug_flutter/src/utils/enum_converter.dart'; +import 'package:instabug_flutter/src/utils/feature_flags_manager.dart'; import 'package:instabug_flutter/src/utils/ibg_build_info.dart'; import 'package:instabug_flutter/src/utils/instabug_logger.dart'; import 'package:instabug_flutter/src/utils/screen_name_masker.dart'; @@ -185,11 +186,12 @@ class Instabug { }) async { $setup(); InstabugLogger.I.logLevel = debugLogsLevel; - return _host.init( + await _host.init( token, invocationEvents.mapToString(), debugLogsLevel.toString(), ); + return FeatureFlagsManager().registerW3CFlagsListener(); } /// Sets a [callback] to be called wehenever a screen name is captured to mask diff --git a/lib/src/modules/instabug_log.dart b/packages/instabug_flutter/lib/src/modules/instabug_log.dart similarity index 100% rename from lib/src/modules/instabug_log.dart rename to packages/instabug_flutter/lib/src/modules/instabug_log.dart diff --git a/lib/src/modules/network_logger.dart b/packages/instabug_flutter/lib/src/modules/network_logger.dart similarity index 55% rename from lib/src/modules/network_logger.dart rename to packages/instabug_flutter/lib/src/modules/network_logger.dart index 83a88538c..14e524f87 100644 --- a/lib/src/modules/network_logger.dart +++ b/packages/instabug_flutter/lib/src/modules/network_logger.dart @@ -1,12 +1,15 @@ // ignore_for_file: avoid_classes_with_only_static_members import 'dart:async'; - -import 'package:flutter/foundation.dart'; import 'package:instabug_flutter/src/generated/instabug.api.g.dart'; import 'package:instabug_flutter/src/models/network_data.dart'; +import 'package:instabug_flutter/src/models/w3c_header.dart'; import 'package:instabug_flutter/src/modules/apm.dart'; +import 'package:instabug_flutter/src/utils/feature_flags_manager.dart'; +import 'package:instabug_flutter/src/utils/iterable_ext.dart'; import 'package:instabug_flutter/src/utils/network_manager.dart'; +import 'package:instabug_flutter/src/utils/w3c_header_utils.dart'; +import 'package:meta/meta.dart'; class NetworkLogger { static var _host = InstabugHostApi(); @@ -17,6 +20,8 @@ class NetworkLogger { // ignore: use_setters_to_change_properties static void $setHostApi(InstabugHostApi host) { _host = host; + // ignore: invalid_use_of_visible_for_testing_member + FeatureFlagsManager().$setHostApi(host); } /// @nodoc @@ -66,13 +71,59 @@ class NetworkLogger { } Future networkLog(NetworkData data) async { - final omit = await _manager.omitLog(data); + final w3Header = await getW3CHeader( + data.requestHeaders, + data.startTime.millisecondsSinceEpoch, + ); + if (w3Header?.isW3cHeaderFound == false && + w3Header?.w3CGeneratedHeader != null) { + data.requestHeaders['traceparent'] = w3Header?.w3CGeneratedHeader; + } + networkLogInternal(data); + } + @internal + Future networkLogInternal(NetworkData data) async { + final omit = await _manager.omitLog(data); if (omit) return; - final obfuscated = await _manager.obfuscateLog(data); - await _host.networkLog(obfuscated.toJson()); await APM.networkLogAndroid(obfuscated); } + + @internal + Future getW3CHeader( + Map header, + int startTime, + ) async { + final w3cFlags = await FeatureFlagsManager().getW3CFeatureFlagsHeader(); + + if (w3cFlags.isW3cExternalTraceIDEnabled == false) { + return null; + } + + final w3cHeaderFound = header.entries + .firstWhereOrNull( + (element) => element.key.toLowerCase() == 'traceparent', + ) + ?.value as String?; + final isW3cHeaderFound = w3cHeaderFound != null; + + if (isW3cHeaderFound && w3cFlags.isW3cCaughtHeaderEnabled) { + return W3CHeader(isW3cHeaderFound: true, w3CCaughtHeader: w3cHeaderFound); + } else if (w3cFlags.isW3cExternalGeneratedHeaderEnabled && + !isW3cHeaderFound) { + final w3cHeaderData = W3CHeaderUtils().generateW3CHeader( + startTime, + ); + + return W3CHeader( + isW3cHeaderFound: false, + partialId: w3cHeaderData.partialId, + networkStartTimeInSeconds: w3cHeaderData.timestampInSeconds, + w3CGeneratedHeader: w3cHeaderData.w3cHeader, + ); + } + return null; + } } diff --git a/lib/src/modules/replies.dart b/packages/instabug_flutter/lib/src/modules/replies.dart similarity index 100% rename from lib/src/modules/replies.dart rename to packages/instabug_flutter/lib/src/modules/replies.dart diff --git a/lib/src/modules/session_replay.dart b/packages/instabug_flutter/lib/src/modules/session_replay.dart similarity index 100% rename from lib/src/modules/session_replay.dart rename to packages/instabug_flutter/lib/src/modules/session_replay.dart diff --git a/lib/src/modules/surveys.dart b/packages/instabug_flutter/lib/src/modules/surveys.dart similarity index 100% rename from lib/src/modules/surveys.dart rename to packages/instabug_flutter/lib/src/modules/surveys.dart diff --git a/lib/src/utils/enum_converter.dart b/packages/instabug_flutter/lib/src/utils/enum_converter.dart similarity index 100% rename from lib/src/utils/enum_converter.dart rename to packages/instabug_flutter/lib/src/utils/enum_converter.dart diff --git a/packages/instabug_flutter/lib/src/utils/feature_flags_manager.dart b/packages/instabug_flutter/lib/src/utils/feature_flags_manager.dart new file mode 100644 index 000000000..b81dc9777 --- /dev/null +++ b/packages/instabug_flutter/lib/src/utils/feature_flags_manager.dart @@ -0,0 +1,92 @@ +import 'package:instabug_flutter/src/generated/instabug.api.g.dart'; +import 'package:instabug_flutter/src/models/w3c_feature_flags.dart'; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart'; +import 'package:meta/meta.dart'; + +typedef OnW3CFeatureFlagChange = void Function( + bool isW3cExternalTraceIDEnabled, + bool isW3cExternalGeneratedHeaderEnabled, + bool isW3cCaughtHeaderEnabled, +); + +class FeatureFlagsManager implements FeatureFlagsFlutterApi { + // Access the singleton instance + factory FeatureFlagsManager() { + return _instance; + } + // Private constructor to prevent instantiation from outside the class + FeatureFlagsManager._(); + + // Singleton instance + static final FeatureFlagsManager _instance = FeatureFlagsManager._(); + + // Host API instance + static InstabugHostApi _host = InstabugHostApi(); + + /// @nodoc + @visibleForTesting + // Setter for the host API + // ignore: use_setters_to_change_properties + void $setHostApi(InstabugHostApi host) { + _host = host; + } + + @visibleForTesting + // Setter for the FeatureFlagsManager + void setFeatureFlagsManager(FeatureFlagsManager featureFlagsManager) { + // This can be used for testing, but should be avoided in production + // since it breaks the singleton pattern + } + + // Internal state flags + bool _isAndroidW3CExternalTraceID = false; + bool _isAndroidW3CExternalGeneratedHeader = false; + bool _isAndroidW3CCaughtHeader = false; + + Future getW3CFeatureFlagsHeader() async { + if (IBGBuildInfo.instance.isAndroid) { + return Future.value( + W3cFeatureFlags( + isW3cCaughtHeaderEnabled: _isAndroidW3CCaughtHeader, + isW3cExternalGeneratedHeaderEnabled: + _isAndroidW3CExternalGeneratedHeader, + isW3cExternalTraceIDEnabled: _isAndroidW3CExternalTraceID, + ), + ); + } + final flags = await _host.isW3CFeatureFlagsEnabled(); + return W3cFeatureFlags( + isW3cCaughtHeaderEnabled: flags['isW3cCaughtHeaderEnabled'] ?? false, + isW3cExternalGeneratedHeaderEnabled: + flags['isW3cExternalGeneratedHeaderEnabled'] ?? false, + isW3cExternalTraceIDEnabled: + flags['isW3cExternalTraceIDEnabled'] ?? false, + ); + } + + Future registerW3CFlagsListener() async { + FeatureFlagsFlutterApi.setup(this); // Use 'this' instead of _instance + + final featureFlags = await _host.isW3CFeatureFlagsEnabled(); + _isAndroidW3CCaughtHeader = + featureFlags['isW3cCaughtHeaderEnabled'] ?? false; + _isAndroidW3CExternalTraceID = + featureFlags['isW3cExternalTraceIDEnabled'] ?? false; + _isAndroidW3CExternalGeneratedHeader = + featureFlags['isW3cExternalGeneratedHeaderEnabled'] ?? false; + + return _host.registerFeatureFlagChangeListener(); + } + + @override + @internal + void onW3CFeatureFlagChange( + bool isW3cExternalTraceIDEnabled, + bool isW3cExternalGeneratedHeaderEnabled, + bool isW3cCaughtHeaderEnabled, + ) { + _isAndroidW3CCaughtHeader = isW3cCaughtHeaderEnabled; + _isAndroidW3CExternalTraceID = isW3cExternalTraceIDEnabled; + _isAndroidW3CExternalGeneratedHeader = isW3cExternalGeneratedHeaderEnabled; + } +} diff --git a/lib/src/utils/ibg_build_info.dart b/packages/instabug_flutter/lib/src/utils/ibg_build_info.dart similarity index 100% rename from lib/src/utils/ibg_build_info.dart rename to packages/instabug_flutter/lib/src/utils/ibg_build_info.dart diff --git a/lib/src/utils/ibg_date_time.dart b/packages/instabug_flutter/lib/src/utils/ibg_date_time.dart similarity index 100% rename from lib/src/utils/ibg_date_time.dart rename to packages/instabug_flutter/lib/src/utils/ibg_date_time.dart diff --git a/lib/src/utils/instabug_logger.dart b/packages/instabug_flutter/lib/src/utils/instabug_logger.dart similarity index 100% rename from lib/src/utils/instabug_logger.dart rename to packages/instabug_flutter/lib/src/utils/instabug_logger.dart diff --git a/lib/src/utils/instabug_montonic_clock.dart b/packages/instabug_flutter/lib/src/utils/instabug_montonic_clock.dart similarity index 100% rename from lib/src/utils/instabug_montonic_clock.dart rename to packages/instabug_flutter/lib/src/utils/instabug_montonic_clock.dart diff --git a/lib/src/utils/instabug_navigator_observer.dart b/packages/instabug_flutter/lib/src/utils/instabug_navigator_observer.dart similarity index 100% rename from lib/src/utils/instabug_navigator_observer.dart rename to packages/instabug_flutter/lib/src/utils/instabug_navigator_observer.dart diff --git a/packages/instabug_flutter/lib/src/utils/iterable_ext.dart b/packages/instabug_flutter/lib/src/utils/iterable_ext.dart new file mode 100644 index 000000000..e5c0099f5 --- /dev/null +++ b/packages/instabug_flutter/lib/src/utils/iterable_ext.dart @@ -0,0 +1,8 @@ +extension IterableExtenstions on Iterable { + T? firstWhereOrNull(bool Function(T element) where) { + for (final element in this) { + if (where(element)) return element; + } + return null; + } +} diff --git a/lib/src/utils/network_manager.dart b/packages/instabug_flutter/lib/src/utils/network_manager.dart similarity index 100% rename from lib/src/utils/network_manager.dart rename to packages/instabug_flutter/lib/src/utils/network_manager.dart diff --git a/lib/src/utils/repro_steps_constants.dart b/packages/instabug_flutter/lib/src/utils/repro_steps_constants.dart similarity index 100% rename from lib/src/utils/repro_steps_constants.dart rename to packages/instabug_flutter/lib/src/utils/repro_steps_constants.dart diff --git a/lib/src/utils/screen_loading/flags_config.dart b/packages/instabug_flutter/lib/src/utils/screen_loading/flags_config.dart similarity index 100% rename from lib/src/utils/screen_loading/flags_config.dart rename to packages/instabug_flutter/lib/src/utils/screen_loading/flags_config.dart diff --git a/lib/src/utils/screen_loading/instabug_capture_screen_loading.dart b/packages/instabug_flutter/lib/src/utils/screen_loading/instabug_capture_screen_loading.dart similarity index 100% rename from lib/src/utils/screen_loading/instabug_capture_screen_loading.dart rename to packages/instabug_flutter/lib/src/utils/screen_loading/instabug_capture_screen_loading.dart diff --git a/lib/src/utils/screen_loading/route_matcher.dart b/packages/instabug_flutter/lib/src/utils/screen_loading/route_matcher.dart similarity index 100% rename from lib/src/utils/screen_loading/route_matcher.dart rename to packages/instabug_flutter/lib/src/utils/screen_loading/route_matcher.dart diff --git a/lib/src/utils/screen_loading/screen_loading_manager.dart b/packages/instabug_flutter/lib/src/utils/screen_loading/screen_loading_manager.dart similarity index 99% rename from lib/src/utils/screen_loading/screen_loading_manager.dart rename to packages/instabug_flutter/lib/src/utils/screen_loading/screen_loading_manager.dart index 816ffebef..ff0cb1e69 100644 --- a/lib/src/utils/screen_loading/screen_loading_manager.dart +++ b/packages/instabug_flutter/lib/src/utils/screen_loading/screen_loading_manager.dart @@ -1,4 +1,4 @@ -import 'package:flutter/widgets.dart' show WidgetBuilder, BuildContext; +import 'package:flutter/widgets.dart' show BuildContext, WidgetBuilder; import 'package:instabug_flutter/instabug_flutter.dart'; import 'package:instabug_flutter/src/utils/ibg_build_info.dart'; import 'package:instabug_flutter/src/utils/ibg_date_time.dart'; diff --git a/lib/src/utils/screen_loading/screen_loading_trace.dart b/packages/instabug_flutter/lib/src/utils/screen_loading/screen_loading_trace.dart similarity index 100% rename from lib/src/utils/screen_loading/screen_loading_trace.dart rename to packages/instabug_flutter/lib/src/utils/screen_loading/screen_loading_trace.dart diff --git a/lib/src/utils/screen_loading/ui_trace.dart b/packages/instabug_flutter/lib/src/utils/screen_loading/ui_trace.dart similarity index 100% rename from lib/src/utils/screen_loading/ui_trace.dart rename to packages/instabug_flutter/lib/src/utils/screen_loading/ui_trace.dart diff --git a/lib/src/utils/screen_name_masker.dart b/packages/instabug_flutter/lib/src/utils/screen_name_masker.dart similarity index 100% rename from lib/src/utils/screen_name_masker.dart rename to packages/instabug_flutter/lib/src/utils/screen_name_masker.dart diff --git a/packages/instabug_flutter/lib/src/utils/w3c_header_utils.dart b/packages/instabug_flutter/lib/src/utils/w3c_header_utils.dart new file mode 100644 index 000000000..26c3a8896 --- /dev/null +++ b/packages/instabug_flutter/lib/src/utils/w3c_header_utils.dart @@ -0,0 +1,66 @@ +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:instabug_flutter/src/models/generated_w3c_header.dart'; +import 'package:instabug_flutter/src/models/trace_partial_id.dart'; + +class W3CHeaderUtils { + // Access the singleton instance + factory W3CHeaderUtils() { + return _instance; + } + // Private constructor to prevent instantiation + W3CHeaderUtils._(); + + // Singleton instance + static final W3CHeaderUtils _instance = W3CHeaderUtils._(); + + // Random instance + static Random _random = Random(); + + @visibleForTesting + // Setter for the Random instance + // ignore: use_setters_to_change_properties + void $setRandom(Random random) { + _random = random; + } + + /// Generate random 32-bit unsigned integer Hexadecimal (8 chars) lower case letters + /// Should not return all zeros + TracePartialId generateTracePartialId() { + int randomNumber; + String hexString; + + do { + randomNumber = _random.nextInt(0xffffffff); + hexString = randomNumber.toRadixString(16).padLeft(8, '0'); + } while (hexString == '00000000'); + + return TracePartialId( + numberPartialId: randomNumber, + hexPartialId: hexString.toLowerCase(), + ); + } + + /// Generate W3C header in the format of {version}-{trace-id}-{parent-id}-{trace-flag} + /// @param networkStartTime + /// @returns W3C header + GeneratedW3CHeader generateW3CHeader(int networkStartTime) { + final partialIdData = generateTracePartialId(); + final hexStringPartialId = partialIdData.hexPartialId; + final numberPartialId = partialIdData.numberPartialId; + + final timestampInSeconds = (networkStartTime / 1000).floor(); + final hexaDigitsTimestamp = + timestampInSeconds.toRadixString(16).toLowerCase(); + final traceId = + '$hexaDigitsTimestamp$hexStringPartialId$hexaDigitsTimestamp$hexStringPartialId'; + final parentId = '4942472d$hexStringPartialId'; + + return GeneratedW3CHeader( + timestampInSeconds: timestampInSeconds, + partialId: numberPartialId, + w3cHeader: '00-$traceId-$parentId-01', + ); + } +} diff --git a/pigeons/apm.api.dart b/packages/instabug_flutter/pigeons/apm.api.dart similarity index 100% rename from pigeons/apm.api.dart rename to packages/instabug_flutter/pigeons/apm.api.dart diff --git a/pigeons/bug_reporting.api.dart b/packages/instabug_flutter/pigeons/bug_reporting.api.dart similarity index 100% rename from pigeons/bug_reporting.api.dart rename to packages/instabug_flutter/pigeons/bug_reporting.api.dart diff --git a/pigeons/crash_reporting.api.dart b/packages/instabug_flutter/pigeons/crash_reporting.api.dart similarity index 100% rename from pigeons/crash_reporting.api.dart rename to packages/instabug_flutter/pigeons/crash_reporting.api.dart diff --git a/pigeons/feature_requests.api.dart b/packages/instabug_flutter/pigeons/feature_requests.api.dart similarity index 100% rename from pigeons/feature_requests.api.dart rename to packages/instabug_flutter/pigeons/feature_requests.api.dart diff --git a/pigeons/instabug.api.dart b/packages/instabug_flutter/pigeons/instabug.api.dart similarity index 85% rename from pigeons/instabug.api.dart rename to packages/instabug_flutter/pigeons/instabug.api.dart index b839f8d1e..c0187acb9 100644 --- a/pigeons/instabug.api.dart +++ b/packages/instabug_flutter/pigeons/instabug.api.dart @@ -1,5 +1,14 @@ import 'package:pigeon/pigeon.dart'; +@FlutterApi() +abstract class FeatureFlagsFlutterApi { + void onW3CFeatureFlagChange( + bool isW3cExternalTraceIDEnabled, + bool isW3cExternalGeneratedHeaderEnabled, + bool isW3cCaughtHeaderEnabled, + ); +} + @HostApi() abstract class InstabugHostApi { void setEnabled(bool isEnabled); @@ -60,5 +69,9 @@ abstract class InstabugHostApi { void networkLog(Map data); + void registerFeatureFlagChangeListener(); + + Map isW3CFeatureFlagsEnabled(); + void willRedirectToStore(); } diff --git a/pigeons/instabug_log.api.dart b/packages/instabug_flutter/pigeons/instabug_log.api.dart similarity index 100% rename from pigeons/instabug_log.api.dart rename to packages/instabug_flutter/pigeons/instabug_log.api.dart diff --git a/pigeons/replies.api.dart b/packages/instabug_flutter/pigeons/replies.api.dart similarity index 100% rename from pigeons/replies.api.dart rename to packages/instabug_flutter/pigeons/replies.api.dart diff --git a/pigeons/session_replay.api.dart b/packages/instabug_flutter/pigeons/session_replay.api.dart similarity index 100% rename from pigeons/session_replay.api.dart rename to packages/instabug_flutter/pigeons/session_replay.api.dart diff --git a/pigeons/surveys.api.dart b/packages/instabug_flutter/pigeons/surveys.api.dart similarity index 100% rename from pigeons/surveys.api.dart rename to packages/instabug_flutter/pigeons/surveys.api.dart diff --git a/packages/instabug_flutter/pubspec.lock b/packages/instabug_flutter/pubspec.lock new file mode 100644 index 000000000..427305640 --- /dev/null +++ b/packages/instabug_flutter/pubspec.lock @@ -0,0 +1,709 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + url: "https://pub.dev" + source: hosted + version: "2.4.13" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 + url: "https://pub.dev" + source: hosted + version: "7.3.2" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: "88b0fddbe4c92910fefc09cc0248f5e7f0cd23e450ded4c28f16ab8ee8f83268" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + fake_async: + dependency: "direct dev" + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "4a539aa34ec5721a2c7574ae2ca0336738ea4adc2a34887d54b7596310b33c85" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + markdown: + dependency: transitive + description: + name: markdown + sha256: ef2a1298144e3f985cc736b22e0ccdaf188b5b3970648f2d9dc13efd1d9df051 + url: "https://pub.dev" + source: hosted + version: "7.2.2" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: "direct main" + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + mockito: + dependency: "direct dev" + description: + name: mockito + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + url: "https://pub.dev" + source: hosted + version: "5.4.4" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + pana: + dependency: "direct dev" + description: + name: pana + sha256: "3fc3fe8e7a9fd4827fa4d625a423eec95d305b2bc3538a3adf7fd6c49217af97" + url: "https://pub.dev" + source: hosted + version: "0.21.45" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + pigeon: + dependency: "direct dev" + description: + name: pigeon + sha256: "6eb9702acc25d5ec340bd1b751e511e2982189dfc40c12e2d69db6e05bab03be" + url: "https://pub.dev" + source: hosted + version: "10.1.5" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + safe_url_check: + dependency: transitive + description: + name: safe_url_check + sha256: "49a3e060a7869cbafc8f4845ca1ecbbaaa53179980a32f4fdfeab1607e90f41d" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: "direct main" + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + tar: + dependency: transitive + description: + name: tar + sha256: "22f67e2d77b51050436620b2a5de521c58ca6f0b75af1d9ab3c8cae2eae58fcd" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: transitive + description: + name: test + sha256: "7ee44229615f8f642b68120165ae4c2a75fe77ae2065b1e55ae4711f6cf0899e" + url: "https://pub.dev" + source: hosted + version: "1.25.7" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + test_core: + dependency: transitive + description: + name: test_core + sha256: "55ea5a652e38a1dfb32943a7973f3681a60f872f8c3a05a14664ad54ef9c6696" + url: "https://pub.dev" + source: hosted + version: "0.6.4" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/packages/instabug_flutter/pubspec.yaml b/packages/instabug_flutter/pubspec.yaml new file mode 100644 index 000000000..3ccf4d854 --- /dev/null +++ b/packages/instabug_flutter/pubspec.yaml @@ -0,0 +1,39 @@ +name: instabug_flutter +version: 14.0.0 +description: >- + Instabug empowers mobile teams to monitor, prioritize, and debug + performance and stability issues throughout the app development lifecycle. +homepage: https://www.instabug.com/platforms/flutter +repository: https://github.com/Instabug/Instabug-Flutter +documentation: https://docs.instabug.com/docs/flutter-overview + +dependencies: + flutter: + sdk: flutter + meta: ^1.3.0 + stack_trace: ^1.10.0 + +dev_dependencies: + build_runner: ^2.0.3 + fake_async: '>=1.2.0 <1.4.0' + flutter_test: + sdk: flutter + lint: ^1.0.0 + # mockito v5.2.0 is needed for running Flutter 2 tests on CI + mockito: '>=5.2.0 <5.5.0' + pana: ^0.21.0 + # pigeon v3.0.0 is needed for running Flutter 2 tests on CI + pigeon: '>=3.0.0 <=10.1.5' + +flutter: + plugin: + platforms: + android: + package: com.instabug.flutter + pluginClass: InstabugFlutterPlugin + ios: + pluginClass: InstabugFlutterPlugin + +environment: + sdk: ">=2.14.0 <4.0.0" + flutter: ">=2.10.0" \ No newline at end of file diff --git a/scripts/pigeon.sh b/packages/instabug_flutter/scripts/pigeon.sh old mode 100644 new mode 100755 similarity index 100% rename from scripts/pigeon.sh rename to packages/instabug_flutter/scripts/pigeon.sh diff --git a/test/apm_test.dart b/packages/instabug_flutter/test/apm_test.dart similarity index 100% rename from test/apm_test.dart rename to packages/instabug_flutter/test/apm_test.dart diff --git a/test/bug_reporting_test.dart b/packages/instabug_flutter/test/bug_reporting_test.dart similarity index 100% rename from test/bug_reporting_test.dart rename to packages/instabug_flutter/test/bug_reporting_test.dart diff --git a/test/crash_reporting_test.dart b/packages/instabug_flutter/test/crash_reporting_test.dart similarity index 100% rename from test/crash_reporting_test.dart rename to packages/instabug_flutter/test/crash_reporting_test.dart diff --git a/packages/instabug_flutter/test/feature_flags_manager_test.dart b/packages/instabug_flutter/test/feature_flags_manager_test.dart new file mode 100644 index 000000000..1a78f666c --- /dev/null +++ b/packages/instabug_flutter/test/feature_flags_manager_test.dart @@ -0,0 +1,84 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:instabug_flutter/src/generated/instabug.api.g.dart'; +import 'package:instabug_flutter/src/utils/feature_flags_manager.dart'; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; + +import 'feature_flags_manager_test.mocks.dart'; + +@GenerateMocks([InstabugHostApi, IBGBuildInfo]) +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + WidgetsFlutterBinding.ensureInitialized(); + + final mInstabugHost = MockInstabugHostApi(); + final mBuildInfo = MockIBGBuildInfo(); + + setUpAll(() { + FeatureFlagsManager().$setHostApi(mInstabugHost); + IBGBuildInfo.setInstance(mBuildInfo); + }); + + tearDown(() { + reset(mInstabugHost); + }); + + test('[getW3CFeatureFlagsHeader] should call host method on IOS', () async { + when(mBuildInfo.isAndroid).thenReturn(false); + when(mInstabugHost.isW3CFeatureFlagsEnabled()).thenAnswer( + (_) => Future.value({ + "isW3cExternalTraceIDEnabled": true, + "isW3cExternalGeneratedHeaderEnabled": true, + "isW3cCaughtHeaderEnabled": true, + }), + ); + final isW3CExternalTraceID = + await FeatureFlagsManager().getW3CFeatureFlagsHeader(); + expect(isW3CExternalTraceID.isW3cExternalTraceIDEnabled, true); + expect(isW3CExternalTraceID.isW3cExternalGeneratedHeaderEnabled, true); + expect(isW3CExternalTraceID.isW3cCaughtHeaderEnabled, true); + + verify( + mInstabugHost.isW3CFeatureFlagsEnabled(), + ).called(1); + }); + + test('[isW3CExternalTraceID] should call host method on Android', () async { + when(mBuildInfo.isAndroid).thenReturn(true); + when(mInstabugHost.isW3CFeatureFlagsEnabled()).thenAnswer( + (_) => Future.value({ + "isW3cExternalTraceIDEnabled": true, + "isW3cExternalGeneratedHeaderEnabled": true, + "isW3cCaughtHeaderEnabled": true, + }), + ); + await FeatureFlagsManager().registerW3CFlagsListener(); + + final isW3CExternalTraceID = + await FeatureFlagsManager().getW3CFeatureFlagsHeader(); + expect(isW3CExternalTraceID.isW3cExternalTraceIDEnabled, true); + expect(isW3CExternalTraceID.isW3cExternalGeneratedHeaderEnabled, true); + expect(isW3CExternalTraceID.isW3cCaughtHeaderEnabled, true); + verify( + mInstabugHost.isW3CFeatureFlagsEnabled(), + ).called(1); + }); + + test('[registerW3CFlagsListener] should call host method', () async { + when(mInstabugHost.isW3CFeatureFlagsEnabled()).thenAnswer( + (_) => Future.value({ + "isW3cExternalTraceIDEnabled": true, + "isW3cExternalGeneratedHeaderEnabled": true, + "isW3cCaughtHeaderEnabled": true, + }), + ); + + await FeatureFlagsManager().registerW3CFlagsListener(); + + verify( + mInstabugHost.registerFeatureFlagChangeListener(), + ).called(1); + }); +} diff --git a/test/feature_requests_test.dart b/packages/instabug_flutter/test/feature_requests_test.dart similarity index 100% rename from test/feature_requests_test.dart rename to packages/instabug_flutter/test/feature_requests_test.dart diff --git a/test/instabug_log_test.dart b/packages/instabug_flutter/test/instabug_log_test.dart similarity index 100% rename from test/instabug_log_test.dart rename to packages/instabug_flutter/test/instabug_log_test.dart diff --git a/test/instabug_test.dart b/packages/instabug_flutter/test/instabug_test.dart similarity index 96% rename from test/instabug_test.dart rename to packages/instabug_flutter/test/instabug_test.dart index 0e6f0f421..e2fd7d298 100644 --- a/test/instabug_test.dart +++ b/packages/instabug_flutter/test/instabug_test.dart @@ -5,6 +5,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:instabug_flutter/instabug_flutter.dart'; import 'package:instabug_flutter/src/generated/instabug.api.g.dart'; import 'package:instabug_flutter/src/utils/enum_converter.dart'; +import 'package:instabug_flutter/src/utils/feature_flags_manager.dart'; import 'package:instabug_flutter/src/utils/ibg_build_info.dart'; import 'package:instabug_flutter/src/utils/screen_name_masker.dart'; import 'package:mockito/annotations.dart'; @@ -27,6 +28,7 @@ void main() { setUpAll(() { Instabug.$setHostApi(mHost); + FeatureFlagsManager().$setHostApi(mHost); IBGBuildInfo.setInstance(mBuildInfo); ScreenNameMasker.setInstance(mScreenNameMasker); }); @@ -69,7 +71,13 @@ void main() { test('[start] should call host method', () async { const token = "068ba9a8c3615035e163dc5f829c73be"; const events = [InvocationEvent.shake, InvocationEvent.screenshot]; - + when(mHost.isW3CFeatureFlagsEnabled()).thenAnswer( + (_) => Future.value({ + "isW3cExternalTraceIDEnabled": true, + "isW3cExternalGeneratedHeaderEnabled": true, + "isW3cCaughtHeaderEnabled": true, + }), + ); await Instabug.init( token: token, invocationEvents: events, diff --git a/test/network_data_test.dart b/packages/instabug_flutter/test/network_data_test.dart similarity index 100% rename from test/network_data_test.dart rename to packages/instabug_flutter/test/network_data_test.dart diff --git a/test/network_logger_test.dart b/packages/instabug_flutter/test/network_logger_test.dart similarity index 51% rename from test/network_logger_test.dart rename to packages/instabug_flutter/test/network_logger_test.dart index e5a04e236..77f5de51d 100644 --- a/test/network_logger_test.dart +++ b/packages/instabug_flutter/test/network_logger_test.dart @@ -1,12 +1,15 @@ import 'dart:async'; +import 'dart:math'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:instabug_flutter/instabug_flutter.dart'; import 'package:instabug_flutter/src/generated/apm.api.g.dart'; import 'package:instabug_flutter/src/generated/instabug.api.g.dart'; +import 'package:instabug_flutter/src/utils/feature_flags_manager.dart'; import 'package:instabug_flutter/src/utils/ibg_build_info.dart'; import 'package:instabug_flutter/src/utils/network_manager.dart'; +import 'package:instabug_flutter/src/utils/w3c_header_utils.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; @@ -17,6 +20,9 @@ import 'network_logger_test.mocks.dart'; InstabugHostApi, IBGBuildInfo, NetworkManager, + W3CHeaderUtils, + FeatureFlagsManager, + Random, ]) void main() { TestWidgetsFlutterBinding.ensureInitialized(); @@ -26,7 +32,7 @@ void main() { final mInstabugHost = MockInstabugHostApi(); final mBuildInfo = MockIBGBuildInfo(); final mManager = MockNetworkManager(); - + final mRandom = MockRandom(); final logger = NetworkLogger(); final data = NetworkData( url: "https://httpbin.org/get", @@ -36,6 +42,7 @@ void main() { setUpAll(() { APM.$setHostApi(mApmHost); + FeatureFlagsManager().$setHostApi(mInstabugHost); NetworkLogger.$setHostApi(mInstabugHost); NetworkLogger.$setManager(mManager); IBGBuildInfo.setInstance(mBuildInfo); @@ -46,6 +53,13 @@ void main() { reset(mInstabugHost); reset(mBuildInfo); reset(mManager); + when(mInstabugHost.isW3CFeatureFlagsEnabled()).thenAnswer( + (_) => Future.value({ + "isW3cExternalTraceIDEnabled": true, + "isW3cExternalGeneratedHeaderEnabled": true, + "isW3cCaughtHeaderEnabled": true, + }), + ); }); test('[networkLog] should call 1 host method on iOS', () async { @@ -53,7 +67,7 @@ void main() { when(mManager.obfuscateLog(data)).thenReturn(data); when(mManager.omitLog(data)).thenReturn(false); - await logger.networkLog(data); + await logger.networkLogInternal(data); verify( mInstabugHost.networkLog(data.toJson()), @@ -69,7 +83,7 @@ void main() { when(mManager.obfuscateLog(data)).thenReturn(data); when(mManager.omitLog(data)).thenReturn(false); - await logger.networkLog(data); + await logger.networkLogInternal(data); verify( mInstabugHost.networkLog(data.toJson()), @@ -87,7 +101,7 @@ void main() { when(mManager.obfuscateLog(data)).thenReturn(obfuscated); when(mManager.omitLog(data)).thenReturn(false); - await logger.networkLog(data); + await logger.networkLogInternal(data); verify( mManager.obfuscateLog(data), @@ -109,7 +123,7 @@ void main() { when(mManager.obfuscateLog(data)).thenReturn(data); when(mManager.omitLog(data)).thenReturn(omit); - await logger.networkLog(data); + await logger.networkLogInternal(data); verify( mManager.omitLog(data), @@ -143,4 +157,76 @@ void main() { mManager.setOmitLogCallback(callback), ).called(1); }); + + test( + '[getW3CHeader] should return null when isW3cExternalTraceIDEnabled disabled', + () async { + when(mBuildInfo.isAndroid).thenReturn(true); + + when(mInstabugHost.isW3CFeatureFlagsEnabled()).thenAnswer( + (_) => Future.value({ + "isW3cExternalTraceIDEnabled": false, + "isW3cExternalGeneratedHeaderEnabled": false, + "isW3cCaughtHeaderEnabled": false, + }), + ); + final time = DateTime.now().millisecondsSinceEpoch; + final w3cHeader = await logger.getW3CHeader({}, time); + expect(w3cHeader, null); + }); + + test( + '[getW3CHeader] should return transparent header when isW3cCaughtHeaderEnabled enabled', + () async { + when(mBuildInfo.isAndroid).thenReturn(false); + + final time = DateTime.now().millisecondsSinceEpoch; + final w3cHeader = + await logger.getW3CHeader({"traceparent": "Header test"}, time); + expect(w3cHeader!.isW3cHeaderFound, true); + expect(w3cHeader.w3CCaughtHeader, "Header test"); + }); + + test( + '[getW3CHeader] should return generated header when isW3cExternalGeneratedHeaderEnabled and no traceparent header', + () async { + W3CHeaderUtils().$setRandom(mRandom); + when(mBuildInfo.isAndroid).thenReturn(false); + + when(mRandom.nextInt(any)).thenReturn(217222); + + final time = DateTime.now().millisecondsSinceEpoch; + final w3cHeader = await logger.getW3CHeader({}, time); + final generatedW3CHeader = W3CHeaderUtils().generateW3CHeader(time); + + expect(w3cHeader!.isW3cHeaderFound, false); + expect(w3cHeader.w3CGeneratedHeader, generatedW3CHeader.w3cHeader); + expect(w3cHeader.partialId, generatedW3CHeader.partialId); + expect( + w3cHeader.networkStartTimeInSeconds, + generatedW3CHeader.timestampInSeconds, + ); + }); + + test( + '[networkLog] should add transparent header when isW3cCaughtHeaderEnabled disabled to every request', + () async { + final networkData = data.copyWith(requestHeaders: {}); + when(mBuildInfo.isAndroid).thenReturn(false); + when(mManager.obfuscateLog(networkData)).thenReturn(networkData); + when(mManager.omitLog(networkData)).thenReturn(false); + await logger.networkLog(networkData); + expect(networkData.requestHeaders.containsKey('traceparent'), isTrue); + }); + + test( + '[networkLog] should not add transparent header when there is traceparent', + () async { + final networkData = data.copyWith(requestHeaders: {'traceparent': 'test'}); + when(mBuildInfo.isAndroid).thenReturn(false); + when(mManager.obfuscateLog(networkData)).thenReturn(networkData); + when(mManager.omitLog(networkData)).thenReturn(false); + await logger.networkLog(networkData); + expect(networkData.requestHeaders['traceparent'], 'test'); + }); } diff --git a/test/network_manager_test.dart b/packages/instabug_flutter/test/network_manager_test.dart similarity index 100% rename from test/network_manager_test.dart rename to packages/instabug_flutter/test/network_manager_test.dart diff --git a/test/replies_test.dart b/packages/instabug_flutter/test/replies_test.dart similarity index 100% rename from test/replies_test.dart rename to packages/instabug_flutter/test/replies_test.dart diff --git a/test/route_matcher_test.dart b/packages/instabug_flutter/test/route_matcher_test.dart similarity index 100% rename from test/route_matcher_test.dart rename to packages/instabug_flutter/test/route_matcher_test.dart diff --git a/test/session_replay_test.dart b/packages/instabug_flutter/test/session_replay_test.dart similarity index 100% rename from test/session_replay_test.dart rename to packages/instabug_flutter/test/session_replay_test.dart diff --git a/test/surveys_test.dart b/packages/instabug_flutter/test/surveys_test.dart similarity index 100% rename from test/surveys_test.dart rename to packages/instabug_flutter/test/surveys_test.dart diff --git a/test/trace_test.dart b/packages/instabug_flutter/test/trace_test.dart similarity index 100% rename from test/trace_test.dart rename to packages/instabug_flutter/test/trace_test.dart diff --git a/test/utils/instabug_navigator_observer_test.dart b/packages/instabug_flutter/test/utils/instabug_navigator_observer_test.dart similarity index 100% rename from test/utils/instabug_navigator_observer_test.dart rename to packages/instabug_flutter/test/utils/instabug_navigator_observer_test.dart diff --git a/test/utils/screen_loading/screen_loading_manager_test.dart b/packages/instabug_flutter/test/utils/screen_loading/screen_loading_manager_test.dart similarity index 100% rename from test/utils/screen_loading/screen_loading_manager_test.dart rename to packages/instabug_flutter/test/utils/screen_loading/screen_loading_manager_test.dart diff --git a/test/utils/screen_name_masker_test.dart b/packages/instabug_flutter/test/utils/screen_name_masker_test.dart similarity index 100% rename from test/utils/screen_name_masker_test.dart rename to packages/instabug_flutter/test/utils/screen_name_masker_test.dart diff --git a/packages/instabug_flutter/test/w3_header_utils_test.dart b/packages/instabug_flutter/test/w3_header_utils_test.dart new file mode 100644 index 000000000..1c10c45cf --- /dev/null +++ b/packages/instabug_flutter/test/w3_header_utils_test.dart @@ -0,0 +1,68 @@ +import 'dart:math'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:instabug_flutter/src/models/generated_w3c_header.dart'; +import 'package:instabug_flutter/src/utils/w3c_header_utils.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; +import 'w3_header_utils_test.mocks.dart'; + +@GenerateMocks([Random]) +void main() { + final mRandom = MockRandom(); + + setUpAll(() { + W3CHeaderUtils().$setRandom(mRandom); + }); + setUp(() { + when(mRandom.nextInt(any)).thenReturn(217222); + }); + + tearDown(() { + reset(mRandom); + }); + + test('generateTracePartialId should generate a non-zero hex string', () { + var callCount = 0; + + when(mRandom.nextInt(any)).thenAnswer((_) => [0, 217222][callCount++]); + + final hexString = W3CHeaderUtils().generateTracePartialId().hexPartialId; + + expect(hexString, isNot('00000000')); + }); + + test('generateTracePartialId should return 8 chars long generated hex string', + () { + final hexString = W3CHeaderUtils().generateTracePartialId().hexPartialId; + expect(hexString.length, 8); + }); + + test( + 'generateW3CHeader should return {version}-{trace-id}-{parent-id}-{trace-flag} format header', + () { + const date = 1716210104248; + const partialId = 217222; + final hexString0 = partialId.toRadixString(16).padLeft(8, '0'); + + final expectedHeader = GeneratedW3CHeader( + timestampInSeconds: (date / 1000).floor(), + partialId: partialId, + w3cHeader: + '00-664b49b8${hexString0}664b49b8$hexString0-4942472d$hexString0-01', + ); + final generatedHeader = W3CHeaderUtils().generateW3CHeader(date); + expect(generatedHeader, expectedHeader); + }); + + test('generateW3CHeader should correctly floor the timestamp', () { + const date = 1716222912145; + final expectedHeader = GeneratedW3CHeader( + timestampInSeconds: (date / 1000).floor(), + partialId: 217222, + w3cHeader: "00-664b7bc000035086664b7bc000035086-4942472d00035086-01", + ); + final generatedHeader = W3CHeaderUtils().generateW3CHeader(date); + expect(generatedHeader, expectedHeader); + }); +} diff --git a/packages/instabug_flutter/yarn.lock b/packages/instabug_flutter/yarn.lock new file mode 100644 index 000000000..d86ee57b3 --- /dev/null +++ b/packages/instabug_flutter/yarn.lock @@ -0,0 +1,960 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@gitbeaker/core@^21.7.0": + version "21.7.0" + resolved "https://registry.yarnpkg.com/@gitbeaker/core/-/core-21.7.0.tgz#fcf7a12915d39f416e3f316d0a447a814179b8e5" + integrity sha512-cw72rE7tA27wc6JJe1WqeAj9v/6w0S7XJcEji+bRNjTlUfE1zgfW0Gf1mbGUi7F37SOABGCosQLfg9Qe63aIqA== + dependencies: + "@gitbeaker/requester-utils" "^21.7.0" + form-data "^3.0.0" + li "^1.3.0" + xcase "^2.0.1" + +"@gitbeaker/node@^21.3.0": + version "21.7.0" + resolved "https://registry.yarnpkg.com/@gitbeaker/node/-/node-21.7.0.tgz#2c19613f44ee497a8808c555abec614ebd2dfcad" + integrity sha512-OdM3VcTKYYqboOsnbiPcO0XimXXpYK4gTjARBZ6BWc+1LQXKmqo+OH6oUbyxOoaFu9hHECafIt3WZU3NM4sZTg== + dependencies: + "@gitbeaker/core" "^21.7.0" + "@gitbeaker/requester-utils" "^21.7.0" + form-data "^3.0.0" + got "^11.1.4" + xcase "^2.0.1" + +"@gitbeaker/requester-utils@^21.7.0": + version "21.7.0" + resolved "https://registry.yarnpkg.com/@gitbeaker/requester-utils/-/requester-utils-21.7.0.tgz#e9a9cfaf268d2a99eb7bbdc930943240a5f88878" + integrity sha512-eLTaVXlBnh8Qimj6QuMMA06mu/mLcJm3dy8nqhhn/Vm/D25sPrvpGwmbfFyvzj6QujPqtHvFfsCHtyZddL01qA== + dependencies: + form-data "^3.0.0" + query-string "^6.12.1" + xcase "^2.0.1" + +"@instabug/danger-plugin-coverage@Instabug/danger-plugin-coverage": + version "0.0.0-development" + resolved "git+ssh://git@github.com/Instabug/danger-plugin-coverage.git#a3941bd25421b0978ec636648a557b2280d0c9e6" + dependencies: + fast-xml-parser "^4.2.0" + +"@octokit/auth-token@^2.4.4": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" + integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.5.1": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085" + integrity sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q== + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.6.3" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.0.3" + before-after-hook "^2.2.0" + universal-user-agent "^6.0.0" + +"@octokit/endpoint@^6.0.1": + version "6.0.12" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" + integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== + dependencies: + "@octokit/types" "^6.0.3" + is-plain-object "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^4.5.8": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" + integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== + dependencies: + "@octokit/request" "^5.6.0" + "@octokit/types" "^6.0.3" + universal-user-agent "^6.0.0" + +"@octokit/openapi-types@^12.11.0": + version "12.11.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" + integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== + +"@octokit/plugin-paginate-rest@^2.16.8": + version "2.21.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz#7f12532797775640dbb8224da577da7dc210c87e" + integrity sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw== + dependencies: + "@octokit/types" "^6.40.0" + +"@octokit/plugin-request-log@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" + integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== + +"@octokit/plugin-rest-endpoint-methods@^5.12.0": + version "5.16.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz#7ee8bf586df97dd6868cf68f641354e908c25342" + integrity sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw== + dependencies: + "@octokit/types" "^6.39.0" + deprecation "^2.3.1" + +"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" + integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== + dependencies: + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.6.0", "@octokit/request@^5.6.3": + version "5.6.3" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0" + integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.16.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.7" + universal-user-agent "^6.0.0" + +"@octokit/rest@^16.43.0 || ^17.11.0 || ^18.12.0", "@octokit/rest@^18.12.0": + version "18.12.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881" + integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== + dependencies: + "@octokit/core" "^3.5.1" + "@octokit/plugin-paginate-rest" "^2.16.8" + "@octokit/plugin-request-log" "^1.0.4" + "@octokit/plugin-rest-endpoint-methods" "^5.12.0" + +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0": + version "6.41.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04" + integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg== + dependencies: + "@octokit/openapi-types" "^12.11.0" + +"@sindresorhus/is@^4.0.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== + +"@szmarczak/http-timer@^4.0.5": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== + dependencies: + defer-to-connect "^2.0.0" + +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + +"@types/cacheable-request@^6.0.1": + version "6.0.3" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" + integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "^3.1.4" + "@types/node" "*" + "@types/responselike" "^1.0.0" + +"@types/http-cache-semantics@*": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" + integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== + +"@types/keyv@^3.1.4": + version "3.1.4" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" + integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== + dependencies: + "@types/node" "*" + +"@types/node@*": + version "18.15.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" + integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== + +"@types/responselike@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + dependencies: + "@types/node" "*" + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +async-retry@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.2.3.tgz#a6521f338358d322b1a0012b79030c6f411d1ce0" + integrity sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q== + dependencies: + retry "0.12.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +before-after-hook@^2.2.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" + integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== + +cacheable-lookup@^5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== + +cacheable-request@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^6.0.1" + responselike "^2.0.0" + +chalk@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +clone-response@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" + integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== + dependencies: + mimic-response "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.18.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +core-js@^3.8.2: + version "3.30.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.30.0.tgz#64ac6f83bc7a49fd42807327051701d4b1478dea" + integrity sha512-hQotSSARoNh1mYPi9O2YaWeiq/cEB95kOrFb4NCrO4RIFt1qqNpKsaE+vy/L3oiqvND5cThqXzUU3r9F7Efztg== + +danger@^11.2.5: + version "11.2.5" + resolved "https://registry.yarnpkg.com/danger/-/danger-11.2.5.tgz#e0f20fbbc35dedff83a67595a684425c5711606a" + integrity sha512-t3M20P0TsslkEkakha1PJHLyD+KxbHHdlhsauC/a53GQgQFO3aKz3Zg5YCHJ+javp0gVkPcUgFrgc7voW1Qp6g== + dependencies: + "@gitbeaker/node" "^21.3.0" + "@octokit/rest" "^18.12.0" + async-retry "1.2.3" + chalk "^2.3.0" + commander "^2.18.0" + core-js "^3.8.2" + debug "^4.1.1" + fast-json-patch "^3.0.0-1" + get-stdin "^6.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.1" + hyperlinker "^1.0.0" + json5 "^2.1.0" + jsonpointer "^5.0.0" + jsonwebtoken "^9.0.0" + lodash.find "^4.6.0" + lodash.includes "^4.3.0" + lodash.isobject "^3.0.2" + lodash.keys "^4.0.8" + lodash.mapvalues "^4.6.0" + lodash.memoize "^4.1.2" + memfs-or-file-map-to-github-branch "^1.2.1" + micromatch "^4.0.4" + node-cleanup "^2.1.2" + node-fetch "^2.6.7" + override-require "^1.1.1" + p-limit "^2.1.0" + parse-diff "^0.7.0" + parse-git-config "^2.0.3" + parse-github-url "^1.0.2" + parse-link-header "^2.0.0" + pinpoint "^1.1.0" + prettyjson "^1.2.1" + readline-sync "^1.4.9" + regenerator-runtime "^0.13.9" + require-from-string "^2.0.2" + supports-hyperlinks "^1.0.1" + +debug@4, debug@^4.1.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decode-uri-component@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +defer-to-connect@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== + dependencies: + homedir-polyfill "^1.0.1" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== + dependencies: + is-extendable "^0.1.0" + +fast-json-patch@^3.0.0-1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" + integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== + +fast-xml-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.2.0.tgz#6db2ba33b95b8b4af93f94fe024d4b4d02a50855" + integrity sha512-+zVQv4aVTO+o8oRUyRL7PjgeVo1J6oP8Cw2+a8UTZQcj5V0yUK5T63gTN0ldgiHDPghUjKc4OpT6SwMTwnOQug== + dependencies: + strnum "^1.0.5" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== + +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +git-config-path@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/git-config-path/-/git-config-path-1.0.1.tgz#6d33f7ed63db0d0e118131503bab3aca47d54664" + integrity sha512-KcJ2dlrrP5DbBnYIZ2nlikALfRhKzNSX0stvv3ImJ+fvC4hXKoV+U+74SV0upg+jlQZbrtQzc0bu6/Zh+7aQbg== + dependencies: + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + homedir-polyfill "^1.0.0" + +got@^11.1.4: + version "11.8.6" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" + integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + integrity sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +http-cache-semantics@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== + +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + +https-proxy-agent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +hyperlinker@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" + integrity sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ== + +ini@^1.3.5: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +is-extendable@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json5@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonpointer@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" + integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== + +jsonwebtoken@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#d0faf9ba1cc3a56255fe49c0961a67e520c1926d" + integrity sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw== + dependencies: + jws "^3.2.2" + lodash "^4.17.21" + ms "^2.1.1" + semver "^7.3.8" + +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + +keyv@^4.0.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" + integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== + dependencies: + json-buffer "3.0.1" + +li@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/li/-/li-1.3.0.tgz#22c59bcaefaa9a8ef359cf759784e4bf106aea1b" + integrity sha512-z34TU6GlMram52Tss5mt1m//ifRIpKH5Dqm7yUVOdHI+BQCs9qGPHFaCUTIzsWX7edN30aa2WrPwR7IO10FHaw== + +lodash.find@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" + integrity sha512-yaRZoAV3Xq28F1iafWN1+a0rflOej93l1DQUejs3SZ41h2O9UJBoS9aueGjPDgAl4B6tPC0NuuchLKaDQQ3Isg== + +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== + +lodash.isobject@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" + integrity sha512-3/Qptq2vr7WeJbB4KHUSKlq8Pl7ASXi3UG6CMbBm8WRtXi8+GHm7mKaU3urfpSEzWe2wCIChs6/sdocUsTKJiA== + +lodash.keys@^4.0.8: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205" + integrity sha512-J79MkJcp7Df5mizHiVNpjoHXLi4HLjh9VLS/M7lQSGoQ+0oQ+lWEigREkqKyizPB1IawvQLLKY8mzEcm1tkyxQ== + +lodash.mapvalues@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== + +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +memfs-or-file-map-to-github-branch@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/memfs-or-file-map-to-github-branch/-/memfs-or-file-map-to-github-branch-1.2.1.tgz#fdb9a85408262316a9bd5567409bf89be7d72f96" + integrity sha512-I/hQzJ2a/pCGR8fkSQ9l5Yx+FQ4e7X6blNHyWBm2ojeFLT3GVzGkTj7xnyWpdclrr7Nq4dmx3xrvu70m3ypzAQ== + dependencies: + "@octokit/rest" "^16.43.0 || ^17.11.0 || ^18.12.0" + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-response@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + +minimist@^1.2.0: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +node-cleanup@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" + integrity sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw== + +node-fetch@^2.6.7: + version "2.6.9" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" + integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== + dependencies: + whatwg-url "^5.0.0" + +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +override-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/override-require/-/override-require-1.1.1.tgz#6ae22fadeb1f850ffb0cf4c20ff7b87e5eb650df" + integrity sha512-eoJ9YWxFcXbrn2U8FKT6RV+/Kj7fiGAB1VvHzbYKt8xM5ZuKZgCGvnHzDxmreEjcBH28ejg5MiOH4iyY1mQnkg== + +p-cancelable@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" + integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== + +p-limit@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-diff@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/parse-diff/-/parse-diff-0.7.1.tgz#9b7a2451c3725baf2c87c831ba192d40ee2237d4" + integrity sha512-1j3l8IKcy4yRK2W4o9EYvJLSzpAVwz4DXqCewYyx2vEwk2gcf3DBPqc8Fj4XV3K33OYJ08A8fWwyu/ykD/HUSg== + +parse-git-config@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-2.0.3.tgz#6fb840d4a956e28b971c97b33a5deb73a6d5b6bb" + integrity sha512-Js7ueMZOVSZ3tP8C7E3KZiHv6QQl7lnJ+OkbxoaFazzSa2KyEHqApfGbU3XboUgUnq4ZuUmskUpYKTNx01fm5A== + dependencies: + expand-tilde "^2.0.2" + git-config-path "^1.0.1" + ini "^1.3.5" + +parse-github-url@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" + integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== + +parse-link-header@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parse-link-header/-/parse-link-header-2.0.0.tgz#949353e284f8aa01f2ac857a98f692b57733f6b7" + integrity sha512-xjU87V0VyHZybn2RrCX5TIFGxTVZE6zqqZWMPlIKiSKuWh/X5WZdt+w1Ki1nXB+8L/KtL+nZ4iq+sfI6MrhhMw== + dependencies: + xtend "~4.0.1" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pinpoint@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pinpoint/-/pinpoint-1.1.0.tgz#0cf7757a6977f1bf7f6a32207b709e377388e874" + integrity sha512-+04FTD9x7Cls2rihLlo57QDCcHoLBGn5Dk51SwtFBWkUWLxZaBXyNVpCw1S+atvE7GmnFjeaRZ0WLq3UYuqAdg== + +prettyjson@^1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.5.tgz#ef3cfffcc70505c032abc59785884b4027031835" + integrity sha512-rksPWtoZb2ZpT5OVgtmy0KHVM+Dca3iVwWY9ifwhcexfjebtgjg3wmrUt9PvJ59XIYBcknQeYHD8IAnVlh9lAw== + dependencies: + colors "1.4.0" + minimist "^1.2.0" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +query-string@^6.12.1: + version "6.14.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" + integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + +readline-sync@^1.4.9: + version "1.4.10" + resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.10.tgz#41df7fbb4b6312d673011594145705bf56d8873b" + integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw== + +regenerator-runtime@^0.13.9: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +resolve-alpn@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== + +responselike@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" + integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== + dependencies: + lowercase-keys "^2.0.0" + +retry@0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + +safe-buffer@^5.0.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +semver@^7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== + +strnum@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" + integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== + +supports-color@^5.0.0, supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-hyperlinks@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz#71daedf36cc1060ac5100c351bb3da48c29c0ef7" + integrity sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw== + dependencies: + has-flag "^2.0.0" + supports-color "^5.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +typescript@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +xcase@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xcase/-/xcase-2.0.1.tgz#c7fa72caa0f440db78fd5673432038ac984450b9" + integrity sha512-UmFXIPU+9Eg3E9m/728Bii0lAIuoc+6nbrNUKaRPJOFp91ih44qqGlWtxMB6kXFrRD6po+86ksHM5XHCfk6iPw== + +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/pubspec.yaml b/pubspec.yaml index ba6dd0be2..e31787f54 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,39 +1,11 @@ -name: instabug_flutter -version: 13.4.0 -description: >- - Instabug empowers mobile teams to monitor, prioritize, and debug - performance and stability issues throughout the app development lifecycle. -homepage: https://www.instabug.com/platforms/flutter -repository: https://github.com/Instabug/Instabug-Flutter -documentation: https://docs.instabug.com/docs/flutter-overview - -dependencies: - flutter: - sdk: flutter - meta: ^1.3.0 - stack_trace: ^1.10.0 +name: instabug_flutter_mono +publish_to: none +environment: + sdk: '>=2.19.4 <4.0.0' + flutter: ">=2.10.0" dev_dependencies: - build_runner: ^2.0.3 - fake_async: '>=1.2.0 <1.4.0' - flutter_test: - sdk: flutter - lint: ^1.0.0 - # mockito v5.2.0 is needed for running Flutter 2 tests on CI - mockito: '>=5.2.0 <5.5.0' - pana: ^0.21.0 - # pigeon v3.0.0 is needed for running Flutter 2 tests on CI - pigeon: '>=3.0.0 <=10.1.5' + lint: 2.0.0 + melos: ^6.2.0 -flutter: - plugin: - platforms: - android: - package: com.instabug.flutter - pluginClass: InstabugFlutterPlugin - ios: - pluginClass: InstabugFlutterPlugin -environment: - sdk: ">=2.14.0 <4.0.0" - flutter: ">=1.17.0" diff --git a/scripts/init.sh b/scripts/init.sh new file mode 100644 index 000000000..6b07896fe --- /dev/null +++ b/scripts/init.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +if [ -d "android" ]; then + rm -rf "android" + echo "Folder android and its contents removed" +fi + +if [ -d "ios" ]; then + rm -rf "ios" + echo "Folder ios and its contents removed" +fi + + +if [ -d "build" ]; then + rm -rf "build" + echo "Folder build and its contents removed" +fi + +if [ -d "lib" ]; then + rm -rf "lib" + echo "Folder lib and its contents removed" +fi + +if [ -d "test" ]; then + rm -rf "test" + echo "Folder test and its contents removed" +fi + + +if command -v melos &> /dev/null +then + echo "Melos found" +else + echo "Melos not found" + dart pub global activate melos && echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> $BASH_ENV +fi + + +melos bootstrap +melos dart_bootstrap +melos pigeon --no-select +melos generate +melos pods diff --git a/scripts/move_coverage_files.sh b/scripts/move_coverage_files.sh new file mode 100644 index 000000000..5deea44e2 --- /dev/null +++ b/scripts/move_coverage_files.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Set source and target directories +TARGET_DIR="../../../coverage" + + + # Create the target directory if it doesn't exist + mkdir -p "$TARGET_DIR" + + mv "lcov.info" "$TARGET_DIR/lcov-${MELOS_PACKAGE_NAME}.info" + + echo "All files moved successfully." +