@bugfender/rn-bugfender 1.1.5 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/README.md +159 -95
  2. package/RnBugfender.podspec +21 -0
  3. package/android/build.gradle +43 -85
  4. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  5. package/android/gradle/wrapper/gradle-wrapper.properties +1 -2
  6. package/android/gradlew +34 -21
  7. package/android/gradlew.bat +24 -19
  8. package/android/src/main/AndroidManifest.xml +4 -3
  9. package/android/src/main/java/com/bugfender/react/{RNBugfenderModule.java → RnBugfenderModule.java} +46 -17
  10. package/android/src/main/java/com/bugfender/react/RnBugfenderPackage.java +28 -0
  11. package/ios/RnBugfender.h +5 -0
  12. package/ios/{RNBugfender.m → RnBugfender.m} +30 -9
  13. package/ios/{RNBugfender.xcodeproj → RnBugfender.xcodeproj}/project.pbxproj +42 -37
  14. package/lib/commonjs/bugfender.js +346 -0
  15. package/lib/commonjs/bugfender.js.map +1 -0
  16. package/lib/commonjs/index.js +28 -0
  17. package/lib/commonjs/index.js.map +1 -0
  18. package/lib/commonjs/index.web.js +30 -0
  19. package/lib/commonjs/index.web.js.map +1 -0
  20. package/lib/commonjs/override-console-methods.js +91 -0
  21. package/lib/commonjs/override-console-methods.js.map +1 -0
  22. package/lib/commonjs/print-to-console.js +78 -0
  23. package/lib/commonjs/print-to-console.js.map +1 -0
  24. package/lib/commonjs/sdk-options.js +76 -0
  25. package/lib/commonjs/sdk-options.js.map +1 -0
  26. package/lib/commonjs/string-formatter.js +55 -0
  27. package/lib/commonjs/string-formatter.js.map +1 -0
  28. package/lib/commonjs/types/device.js +2 -0
  29. package/lib/commonjs/types/device.js.map +1 -0
  30. package/lib/commonjs/types/log.js +35 -0
  31. package/lib/commonjs/types/log.js.map +1 -0
  32. package/lib/commonjs/types/sdk-options.js +58 -0
  33. package/lib/commonjs/types/sdk-options.js.map +1 -0
  34. package/lib/commonjs/user-feedback.js +31 -0
  35. package/lib/commonjs/user-feedback.js.map +1 -0
  36. package/lib/commonjs/utilities.js +18 -0
  37. package/lib/commonjs/utilities.js.map +1 -0
  38. package/lib/module/bugfender.js +332 -0
  39. package/lib/module/bugfender.js.map +1 -0
  40. package/lib/module/index.js +6 -0
  41. package/lib/module/index.js.map +1 -0
  42. package/lib/module/index.web.js +5 -0
  43. package/lib/module/index.web.js.map +1 -0
  44. package/lib/module/override-console-methods.js +75 -0
  45. package/lib/module/override-console-methods.js.map +1 -0
  46. package/lib/module/print-to-console.js +67 -0
  47. package/lib/module/print-to-console.js.map +1 -0
  48. package/lib/module/sdk-options.js +66 -0
  49. package/lib/module/sdk-options.js.map +1 -0
  50. package/lib/module/string-formatter.js +45 -0
  51. package/lib/module/string-formatter.js.map +1 -0
  52. package/lib/module/types/device.js +2 -0
  53. package/lib/module/types/device.js.map +1 -0
  54. package/lib/module/types/log.js +24 -0
  55. package/lib/module/types/log.js.map +1 -0
  56. package/lib/module/types/sdk-options.js +48 -0
  57. package/lib/module/types/sdk-options.js.map +1 -0
  58. package/lib/module/user-feedback.js +22 -0
  59. package/lib/module/user-feedback.js.map +1 -0
  60. package/lib/module/utilities.js +11 -0
  61. package/lib/module/utilities.js.map +1 -0
  62. package/lib/typescript/bugfender.d.ts +164 -0
  63. package/lib/typescript/index.d.ts +5 -0
  64. package/lib/typescript/index.web.d.ts +4 -0
  65. package/lib/typescript/override-console-methods.d.ts +10 -0
  66. package/lib/typescript/print-to-console.d.ts +14 -0
  67. package/lib/typescript/sdk-options.d.ts +16 -0
  68. package/lib/typescript/string-formatter.d.ts +4 -0
  69. package/lib/typescript/types/device.d.ts +4 -0
  70. package/lib/typescript/types/log.d.ts +59 -0
  71. package/lib/typescript/types/sdk-options.d.ts +42 -0
  72. package/lib/typescript/user-feedback.d.ts +31 -0
  73. package/lib/typescript/utilities.d.ts +1 -0
  74. package/package.json +146 -12
  75. package/src/bugfender.ts +368 -0
  76. package/src/index.tsx +7 -0
  77. package/src/index.web.tsx +5 -0
  78. package/src/override-console-methods.ts +53 -0
  79. package/src/print-to-console.ts +67 -0
  80. package/src/sdk-options.ts +64 -0
  81. package/src/string-formatter.ts +44 -0
  82. package/src/types/device.ts +4 -0
  83. package/src/types/log.ts +75 -0
  84. package/src/types/sdk-options.ts +80 -0
  85. package/src/user-feedback.ts +33 -0
  86. package/src/utilities.ts +8 -0
  87. package/RNBugfender.podspec +0 -24
  88. package/android/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
  89. package/android/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
  90. package/android/.gradle/6.1.1/fileChanges/last-build.bin +0 -0
  91. package/android/.gradle/6.1.1/fileContent/fileContent.lock +0 -0
  92. package/android/.gradle/6.1.1/fileHashes/fileHashes.bin +0 -0
  93. package/android/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
  94. package/android/.gradle/6.1.1/fileHashes/resourceHashesCache.bin +0 -0
  95. package/android/.gradle/6.1.1/gc.properties +0 -0
  96. package/android/.gradle/6.1.1/javaCompile/classAnalysis.bin +0 -0
  97. package/android/.gradle/6.1.1/javaCompile/javaCompile.lock +0 -0
  98. package/android/.gradle/6.1.1/javaCompile/taskHistory.bin +0 -0
  99. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  100. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  101. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  102. package/android/.gradle/checksums/checksums.lock +0 -0
  103. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  104. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  105. package/android/.gradle/vcs-1/gc.properties +0 -0
  106. package/android/.idea/android.iml +0 -29
  107. package/android/.idea/caches/build_file_checksums.ser +0 -0
  108. package/android/.idea/codeStyles/Project.xml +0 -116
  109. package/android/.idea/gradle.xml +0 -20
  110. package/android/.idea/jarRepositories.xml +0 -45
  111. package/android/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml +0 -11
  112. package/android/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1_aar.xml +0 -12
  113. package/android/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml +0 -11
  114. package/android/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1_aar.xml +0 -12
  115. package/android/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1_aar.xml +0 -12
  116. package/android/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1_aar.xml +0 -12
  117. package/android/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1_aar.xml +0 -12
  118. package/android/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0_aar.xml +0 -10
  119. package/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0_aar.xml +0 -13
  120. package/android/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0_aar.xml +0 -10
  121. package/android/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml +0 -9
  122. package/android/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0_aar.xml +0 -13
  123. package/android/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0_aar.xml +0 -10
  124. package/android/.idea/libraries/Gradle__com_android_support_customview_28_0_0_aar.xml +0 -10
  125. package/android/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0_aar.xml +0 -10
  126. package/android/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0_aar.xml +0 -13
  127. package/android/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0_aar.xml +0 -10
  128. package/android/.idea/libraries/Gradle__com_android_support_loader_28_0_0_aar.xml +0 -10
  129. package/android/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0_aar.xml +0 -10
  130. package/android/.idea/libraries/Gradle__com_android_support_print_28_0_0_aar.xml +0 -13
  131. package/android/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0_aar.xml +0 -10
  132. package/android/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml +0 -9
  133. package/android/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0_aar.xml +0 -13
  134. package/android/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0_aar.xml +0 -10
  135. package/android/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0_aar.xml +0 -10
  136. package/android/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0_aar.xml +0 -13
  137. package/android/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0_aar.xml +0 -10
  138. package/android/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0_aar.xml +0 -13
  139. package/android/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0_aar.xml +0 -10
  140. package/android/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0_aar.xml +0 -10
  141. package/android/.idea/libraries/Gradle__com_bugfender_sdk_android_3_0_5_aar.xml +0 -12
  142. package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_1_10_0_aar.xml +0 -12
  143. package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_1_10_0_aar.xml +0 -15
  144. package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_1_10_0_aar.xml +0 -15
  145. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_1_10_0_aar.xml +0 -15
  146. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_1_10_0_aar.xml +0 -15
  147. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_1_10_0_aar.xml +0 -12
  148. package/android/.idea/libraries/Gradle__com_facebook_infer_annotation_infer_annotation_0_11_2_jar.xml +0 -11
  149. package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_59_9_aar.xml +0 -17
  150. package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_6_0_aar.xml +0 -12
  151. package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_2_jar.xml +0 -13
  152. package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_12_1_jar.xml +0 -11
  153. package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_3_12_1_jar.xml +0 -11
  154. package/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_15_0_jar.xml +0 -13
  155. package/android/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml +0 -13
  156. package/android/.idea/misc.xml +0 -5
  157. package/android/.idea/vcs.xml +0 -6
  158. package/android/build/.transforms/0e896c8cbe0b79b9d6120b7386a6ad6f/results.bin +0 -1
  159. package/android/build/.transforms/0e896c8cbe0b79b9d6120b7386a6ad6f/transformed/classes/classes.dex +0 -0
  160. package/android/build/.transforms/9dbdc8f4a0c95e455ccff88c281fd14d/results.bin +0 -1
  161. package/android/build/.transforms/9dbdc8f4a0c95e455ccff88c281fd14d/transformed/classes/classes.dex +0 -0
  162. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/android/support/v4/R.java +0 -12
  163. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/android/support/v7/appcompat/R.java +0 -1248
  164. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/android/support/v7/recyclerview/R.java +0 -40
  165. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/bugfender/android/R.java +0 -55
  166. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/bugfender/react/R.java +0 -1384
  167. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/drawee/R.java +0 -82
  168. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/drawee/backends/pipeline/R.java +0 -82
  169. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/fbcore/R.java +0 -12
  170. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/imagepipeline/R.java +0 -12
  171. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/imagepipeline/backends/okhttp/R.java +0 -12
  172. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/react/R.java +0 -1361
  173. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/org/webkit/android_jsc/R.java +0 -12
  174. package/android/build/generated/source/buildConfig/debug/com/bugfender/react/BuildConfig.java +0 -10
  175. package/android/build/generated/source/buildConfig/release/com/bugfender/react/BuildConfig.java +0 -10
  176. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -9
  177. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -16
  178. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -11
  179. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output.json +0 -1
  180. package/android/build/intermediates/aapt_friendly_merged_manifests/release/aapt/AndroidManifest.xml +0 -9
  181. package/android/build/intermediates/aapt_friendly_merged_manifests/release/aapt/output-metadata.json +0 -16
  182. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -2
  183. package/android/build/intermediates/aar_metadata/release/aar-metadata.properties +0 -2
  184. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
  185. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  186. package/android/build/intermediates/annotation_processor_list/release/annotationProcessors.json +0 -1
  187. package/android/build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt +0 -0
  188. package/android/build/intermediates/compile_library_classes/debug/classes.jar +0 -0
  189. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  190. package/android/build/intermediates/compile_library_classes_jar/release/classes.jar +0 -0
  191. package/android/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  192. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  193. package/android/build/intermediates/compile_r_class_jar/release/R.jar +0 -0
  194. package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -1813
  195. package/android/build/intermediates/compile_symbol_list/release/R.txt +0 -1813
  196. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  197. package/android/build/intermediates/incremental/debug-mergeJniLibs/merge-state +0 -0
  198. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  199. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  200. package/android/build/intermediates/incremental/mergeReleaseJniLibFolders/merger.xml +0 -2
  201. package/android/build/intermediates/incremental/mergeReleaseShaders/merger.xml +0 -2
  202. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  203. package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +0 -1
  204. package/android/build/intermediates/incremental/packageDebugResources/merger.xml +0 -2
  205. package/android/build/intermediates/incremental/packageReleaseAssets/merger.xml +0 -2
  206. package/android/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties +0 -1
  207. package/android/build/intermediates/incremental/packageReleaseResources/merger.xml +0 -2
  208. package/android/build/intermediates/javac/debug/classes/com/bugfender/react/BuildConfig.class +0 -0
  209. package/android/build/intermediates/javac/debug/classes/com/bugfender/react/RNBugfenderModule.class +0 -0
  210. package/android/build/intermediates/javac/debug/classes/com/bugfender/react/RNBugfenderPackage.class +0 -0
  211. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v4/R.class +0 -0
  212. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$anim.class +0 -0
  213. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$attr.class +0 -0
  214. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$bool.class +0 -0
  215. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$color.class +0 -0
  216. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$dimen.class +0 -0
  217. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$drawable.class +0 -0
  218. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$id.class +0 -0
  219. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$integer.class +0 -0
  220. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$layout.class +0 -0
  221. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$string.class +0 -0
  222. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$style.class +0 -0
  223. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$styleable.class +0 -0
  224. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R.class +0 -0
  225. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$attr.class +0 -0
  226. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$dimen.class +0 -0
  227. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$id.class +0 -0
  228. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$styleable.class +0 -0
  229. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R.class +0 -0
  230. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$color.class +0 -0
  231. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$drawable.class +0 -0
  232. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$id.class +0 -0
  233. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$layout.class +0 -0
  234. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$string.class +0 -0
  235. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R.class +0 -0
  236. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/BuildConfig.class +0 -0
  237. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$anim.class +0 -0
  238. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$attr.class +0 -0
  239. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$bool.class +0 -0
  240. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$color.class +0 -0
  241. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$dimen.class +0 -0
  242. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$drawable.class +0 -0
  243. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$id.class +0 -0
  244. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$integer.class +0 -0
  245. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$layout.class +0 -0
  246. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$string.class +0 -0
  247. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$style.class +0 -0
  248. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$styleable.class +0 -0
  249. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$xml.class +0 -0
  250. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R.class +0 -0
  251. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/RNBugfenderModule.class +0 -0
  252. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/RNBugfenderPackage.class +0 -0
  253. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R$attr.class +0 -0
  254. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R$id.class +0 -0
  255. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R$styleable.class +0 -0
  256. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R.class +0 -0
  257. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R$attr.class +0 -0
  258. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R$id.class +0 -0
  259. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R$styleable.class +0 -0
  260. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R.class +0 -0
  261. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/fbcore/R.class +0 -0
  262. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/imagepipeline/R.class +0 -0
  263. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/imagepipeline/backends/okhttp/R.class +0 -0
  264. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$anim.class +0 -0
  265. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$attr.class +0 -0
  266. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$bool.class +0 -0
  267. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$color.class +0 -0
  268. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$dimen.class +0 -0
  269. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$drawable.class +0 -0
  270. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$id.class +0 -0
  271. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$integer.class +0 -0
  272. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$layout.class +0 -0
  273. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$string.class +0 -0
  274. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$style.class +0 -0
  275. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$styleable.class +0 -0
  276. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$xml.class +0 -0
  277. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R.class +0 -0
  278. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/webkit/android_jsc/R.class +0 -0
  279. package/android/build/intermediates/javac/release/classes/com/bugfender/react/BuildConfig.class +0 -0
  280. package/android/build/intermediates/javac/release/classes/com/bugfender/react/RNBugfenderModule.class +0 -0
  281. package/android/build/intermediates/javac/release/classes/com/bugfender/react/RNBugfenderPackage.class +0 -0
  282. package/android/build/intermediates/library_manifest/debug/AndroidManifest.xml +0 -11
  283. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -2
  284. package/android/build/intermediates/local_only_symbol_list/release/R-def.txt +0 -2
  285. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -11
  286. package/android/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt +0 -11
  287. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -9
  288. package/android/build/intermediates/merged_manifest/release/AndroidManifest.xml +0 -9
  289. package/android/build/intermediates/merged_manifests/debug/output.json +0 -1
  290. package/android/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml +0 -11
  291. package/android/build/intermediates/merged_manifests/debug/processDebugManifest/merged/output.json +0 -1
  292. package/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
  293. package/android/build/intermediates/navigation_json/release/navigation.json +0 -1
  294. package/android/build/intermediates/packaged-classes/debug/classes.jar +0 -0
  295. package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +0 -16
  296. package/android/build/intermediates/packaged_manifests/release/output-metadata.json +0 -16
  297. package/android/build/intermediates/res/symbol-table-with-package/debug/package-aware-r.txt +0 -1309
  298. package/android/build/intermediates/runtime_library_classes/debug/classes.jar +0 -0
  299. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  300. package/android/build/intermediates/runtime_library_classes_jar/release/classes.jar +0 -0
  301. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -1339
  302. package/android/build/intermediates/symbol_list_with_package_name/release/package-aware-r.txt +0 -1339
  303. package/android/build/intermediates/symbols/debug/R.txt +0 -1783
  304. package/android/build/intermediates/transforms/mergeJavaRes/debug/0.jar +0 -0
  305. package/android/build/intermediates/transforms/mergeJavaRes/debug/__content__.json +0 -1
  306. package/android/build/intermediates/transforms/mergeJniLibs/debug/__content__.json +0 -1
  307. package/android/build/outputs/aar/android.aar +0 -0
  308. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -25
  309. package/android/build/outputs/logs/manifest-merger-release-report.txt +0 -25
  310. package/android/build/tmp/compileDebugJavaWithJavac/source-classes-mapping.txt +0 -6
  311. package/android/build/tmp/compileReleaseJavaWithJavac/source-classes-mapping.txt +0 -6
  312. package/android/local.properties +0 -1
  313. package/android/src/main/java/com/bugfender/react/RNBugfenderPackage.java +0 -29
  314. package/bugfender.js +0 -217
  315. package/example/.babelrc +0 -3
  316. package/example/.watchmanconfig +0 -1
  317. package/example/App.js +0 -163
  318. package/ios/RNBugfender.h +0 -7
  319. package/ios/RNBugfender.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  320. package/ios/RNBugfender.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  321. package/ios/RNBugfender.xcodeproj/project.xcworkspace/xcuserdata/fj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  322. package/ios/RNBugfender.xcodeproj/xcuserdata/fj.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  323. package/ios/RNBugfender.xcodeproj/xcuserdata/rubenvot.xcuserdatad/xcschemes/xcschememanagement.plist +0 -19
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SDKOptions = void 0;
7
+
8
+ var _utilities = require("./utilities");
9
+
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
12
+ class SDKOptions {
13
+ constructor() {
14
+ _defineProperty(this, "rules", {
15
+ appKey: ['required', 'string'],
16
+ apiURL: ['string', 'url'],
17
+ baseURL: ['string', 'url'],
18
+ overrideConsoleMethods: ['boolean'],
19
+ printToConsole: ['boolean'],
20
+ logBrowserEvents: ['boolean'],
21
+ logUIEvents: ['boolean'],
22
+ registerErrorHandler: ['boolean'],
23
+ version: ['string']
24
+ });
25
+ }
26
+
27
+ init(options) {
28
+ // Validate user provided options
29
+ this.validate(options);
30
+ options = { ...options
31
+ };
32
+ (0, _utilities.removeUndefinedAttributes)(options); // Set default values if needed
33
+
34
+ return {
35
+ overrideConsoleMethods: true,
36
+ printToConsole: true,
37
+ logUIEvents: true,
38
+ registerErrorHandler: true,
39
+ enableLogcatLogging: false,
40
+ maximumLocalStorageSize: 5 * 1024 * 1024,
41
+ ...options
42
+ };
43
+ }
44
+
45
+ validate(options) {
46
+ const urlValidator = new RegExp(/^http(s)?:\/\//i);
47
+ Object.entries(this.rules).forEach(_ref => {
48
+ let [key, rules] = _ref;
49
+ // @ts-ignore
50
+ const value = options[key];
51
+ rules.forEach(rule => {
52
+ if (rule === 'required') {
53
+ if (typeof value === 'undefined') {
54
+ throw new Error(`Bugfender requires '${key}' option to initialize.`);
55
+ }
56
+ } else if (rule === 'string') {
57
+ if (!['string', 'undefined'].includes(typeof value)) {
58
+ throw new Error(`'${key}' option must be a string.`);
59
+ }
60
+ } else if (rule === 'url') {
61
+ if (typeof value !== 'undefined' && !urlValidator.test(value)) {
62
+ throw new Error(`'${key}' option must be a valid URL.`);
63
+ }
64
+ } else if (rule === 'boolean') {
65
+ if (!['boolean', 'undefined'].includes(typeof value)) {
66
+ throw new Error(`'${key}' option must be a boolean.`);
67
+ }
68
+ }
69
+ });
70
+ });
71
+ }
72
+
73
+ }
74
+
75
+ exports.SDKOptions = SDKOptions;
76
+ //# sourceMappingURL=sdk-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["sdk-options.ts"],"names":["SDKOptions","appKey","apiURL","baseURL","overrideConsoleMethods","printToConsole","logBrowserEvents","logUIEvents","registerErrorHandler","version","init","options","validate","enableLogcatLogging","maximumLocalStorageSize","urlValidator","RegExp","Object","entries","rules","forEach","key","value","rule","Error","includes","test"],"mappings":";;;;;;;AACA;;;;AAEO,MAAMA,UAAN,CAAiB;AAAA;AAAA,mCACJ;AAChBC,MAAAA,MAAM,EAAE,CAAC,UAAD,EAAa,QAAb,CADQ;AAEhBC,MAAAA,MAAM,EAAE,CAAC,QAAD,EAAW,KAAX,CAFQ;AAGhBC,MAAAA,OAAO,EAAE,CAAC,QAAD,EAAW,KAAX,CAHO;AAIhBC,MAAAA,sBAAsB,EAAE,CAAC,SAAD,CAJR;AAKhBC,MAAAA,cAAc,EAAE,CAAC,SAAD,CALA;AAMhBC,MAAAA,gBAAgB,EAAE,CAAC,SAAD,CANF;AAOhBC,MAAAA,WAAW,EAAE,CAAC,SAAD,CAPG;AAQhBC,MAAAA,oBAAoB,EAAE,CAAC,SAAD,CARN;AAShBC,MAAAA,OAAO,EAAE,CAAC,QAAD;AATO,KADI;AAAA;;AAafC,EAAAA,IAAI,CAACC,OAAD,EAAoC;AAC7C;AACA,SAAKC,QAAL,CAAcD,OAAd;AAEAA,IAAAA,OAAO,GAAG,EAAE,GAAGA;AAAL,KAAV;AACA,8CAA0BA,OAA1B,EAL6C,CAO7C;;AACA,WAAO;AACLP,MAAAA,sBAAsB,EAAE,IADnB;AAELC,MAAAA,cAAc,EAAE,IAFX;AAGLE,MAAAA,WAAW,EAAE,IAHR;AAILC,MAAAA,oBAAoB,EAAE,IAJjB;AAKLK,MAAAA,mBAAmB,EAAE,KALhB;AAMLC,MAAAA,uBAAuB,EAAE,IAAI,IAAJ,GAAW,IAN/B;AAOL,SAAGH;AAPE,KAAP;AASD;;AAESC,EAAAA,QAAQ,CAACD,OAAD,EAA6B;AAC7C,UAAMI,YAAY,GAAG,IAAIC,MAAJ,CAAW,iBAAX,CAArB;AAEAC,IAAAA,MAAM,CAACC,OAAP,CAAe,KAAKC,KAApB,EAA2BC,OAA3B,CAAmC,QAAkB;AAAA,UAAjB,CAACC,GAAD,EAAMF,KAAN,CAAiB;AACnD;AACA,YAAMG,KAAK,GAAGX,OAAO,CAACU,GAAD,CAArB;AAEAF,MAAAA,KAAK,CAACC,OAAN,CAAcG,IAAI,IAAI;AACpB,YAAIA,IAAI,KAAK,UAAb,EAAyB;AACvB,cAAI,OAAOD,KAAP,KAAiB,WAArB,EAAkC;AAChC,kBAAM,IAAIE,KAAJ,CAAW,uBAAsBH,GAAI,yBAArC,CAAN;AACD;AACF,SAJD,MAIO,IAAIE,IAAI,KAAK,QAAb,EAAuB;AAC5B,cAAI,CAAC,CAAC,QAAD,EAAW,WAAX,EAAwBE,QAAxB,CAAiC,OAAOH,KAAxC,CAAL,EAAqD;AACnD,kBAAM,IAAIE,KAAJ,CAAW,IAAGH,GAAI,4BAAlB,CAAN;AACD;AACF,SAJM,MAIA,IAAIE,IAAI,KAAK,KAAb,EAAoB;AACzB,cAAI,OAAOD,KAAP,KAAiB,WAAjB,IAAgC,CAACP,YAAY,CAACW,IAAb,CAAkBJ,KAAlB,CAArC,EAA+D;AAC7D,kBAAM,IAAIE,KAAJ,CAAW,IAAGH,GAAI,+BAAlB,CAAN;AACD;AACF,SAJM,MAIA,IAAIE,IAAI,KAAK,SAAb,EAAwB;AAC7B,cAAI,CAAC,CAAC,SAAD,EAAY,WAAZ,EAAyBE,QAAzB,CAAkC,OAAOH,KAAzC,CAAL,EAAsD;AACpD,kBAAM,IAAIE,KAAJ,CAAW,IAAGH,GAAI,6BAAlB,CAAN;AACD;AACF;AACF,OAlBD;AAmBD,KAvBD;AAwBD;;AA3DqB","sourcesContent":["import type {ISDKOptions} from \"./types/sdk-options\";\nimport {removeUndefinedAttributes} from \"./utilities\";\n\nexport class SDKOptions {\n protected rules = {\n appKey: ['required', 'string'],\n apiURL: ['string', 'url'],\n baseURL: ['string', 'url'],\n overrideConsoleMethods: ['boolean'],\n printToConsole: ['boolean'],\n logBrowserEvents: ['boolean'],\n logUIEvents: ['boolean'],\n registerErrorHandler: ['boolean'],\n version: ['string'],\n };\n\n public init(options: ISDKOptions): ISDKOptions {\n // Validate user provided options\n this.validate(options);\n\n options = { ...options };\n removeUndefinedAttributes(options);\n\n // Set default values if needed\n return {\n overrideConsoleMethods: true,\n printToConsole: true,\n logUIEvents: true,\n registerErrorHandler: true,\n enableLogcatLogging: false,\n maximumLocalStorageSize: 5 * 1024 * 1024,\n ...options,\n };\n }\n\n protected validate(options: ISDKOptions): void {\n const urlValidator = new RegExp(/^http(s)?:\\/\\//i);\n\n Object.entries(this.rules).forEach(([key, rules]) => {\n // @ts-ignore\n const value = options[key];\n\n rules.forEach(rule => {\n if (rule === 'required') {\n if (typeof value === 'undefined') {\n throw new Error(`Bugfender requires '${key}' option to initialize.`)\n }\n } else if (rule === 'string') {\n if (!['string', 'undefined'].includes(typeof value)) {\n throw new Error(`'${key}' option must be a string.`);\n }\n } else if (rule === 'url') {\n if (typeof value !== 'undefined' && !urlValidator.test(value)) {\n throw new Error(`'${key}' option must be a valid URL.`);\n }\n } else if (rule === 'boolean') {\n if (!['boolean', 'undefined'].includes(typeof value)) {\n throw new Error(`'${key}' option must be a boolean.`);\n }\n }\n })\n });\n }\n}\n"]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StringFormatter = void 0;
7
+
8
+ var _util = require("util");
9
+
10
+ class StringFormatter {
11
+ format(parameters) {
12
+ const [, ...textParams] = parameters;
13
+ let [textFormat] = parameters;
14
+ let text;
15
+
16
+ try {
17
+ // Our sanitizer gives better results, try with it first
18
+ textFormat = this.toString(textFormat);
19
+ } catch {
20
+ // Fallback to `format`
21
+ textFormat = (0, _util.format)(textFormat);
22
+ }
23
+
24
+ if (textParams.length > 0) {
25
+ text = (0, _util.format)(textFormat, ...textParams);
26
+ } else {
27
+ text = textFormat;
28
+ }
29
+
30
+ return text;
31
+ }
32
+
33
+ toString(value) {
34
+ // Depending on the type we prefer to do `String` or `stringify`
35
+ const isToString = ['string', 'symbol', 'bigint', 'function'].includes(typeof value) || value instanceof Error;
36
+
37
+ if (isToString) {
38
+ try {
39
+ return String(value);
40
+ } catch {
41
+ return JSON.stringify(value);
42
+ }
43
+ } else {
44
+ try {
45
+ return JSON.stringify(value);
46
+ } catch {
47
+ return String(value);
48
+ }
49
+ }
50
+ }
51
+
52
+ }
53
+
54
+ exports.StringFormatter = StringFormatter;
55
+ //# sourceMappingURL=string-formatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["string-formatter.ts"],"names":["StringFormatter","format","parameters","textParams","textFormat","text","toString","length","value","isToString","includes","Error","String","JSON","stringify"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,eAAN,CAAsB;AACpBC,EAAAA,MAAM,CAACC,UAAD,EAAgC;AAC3C,UAAM,GAAG,GAAGC,UAAN,IAAoBD,UAA1B;AACA,QAAI,CAACE,UAAD,IAAeF,UAAnB;AACA,QAAIG,IAAJ;;AAEA,QAAI;AACF;AACAD,MAAAA,UAAU,GAAG,KAAKE,QAAL,CAAcF,UAAd,CAAb;AACD,KAHD,CAGE,MAAM;AACN;AACAA,MAAAA,UAAU,GAAG,kBAAOA,UAAP,CAAb;AACD;;AAED,QAAID,UAAU,CAACI,MAAX,GAAoB,CAAxB,EAA2B;AACzBF,MAAAA,IAAI,GAAG,kBAAOD,UAAP,EAAmB,GAAGD,UAAtB,CAAP;AACD,KAFD,MAEO;AACLE,MAAAA,IAAI,GAAGD,UAAP;AACD;;AAED,WAAOC,IAAP;AACD;;AAEOC,EAAAA,QAAQ,CAACE,KAAD,EAAyB;AACvC;AACA,UAAMC,UAAU,GAAG,CAAC,QAAD,EAAW,QAAX,EAAqB,QAArB,EAA+B,UAA/B,EAA2CC,QAA3C,CAAoD,OAAOF,KAA3D,KAAqEA,KAAK,YAAYG,KAAzG;;AAEA,QAAIF,UAAJ,EAAgB;AACd,UAAI;AACF,eAAOG,MAAM,CAACJ,KAAD,CAAb;AACD,OAFD,CAEE,MAAM;AACN,eAAOK,IAAI,CAACC,SAAL,CAAeN,KAAf,CAAP;AACD;AACF,KAND,MAMO;AACL,UAAI;AACF,eAAOK,IAAI,CAACC,SAAL,CAAeN,KAAf,CAAP;AACD,OAFD,CAEE,MAAM;AACN,eAAOI,MAAM,CAACJ,KAAD,CAAb;AACD;AACF;AACF;;AAxC0B","sourcesContent":["import {format} from \"util\";\n\nexport class StringFormatter {\n public format(parameters: unknown[]): string {\n const [, ...textParams] = parameters;\n let [textFormat] = parameters as string[];\n let text: string;\n\n try {\n // Our sanitizer gives better results, try with it first\n textFormat = this.toString(textFormat);\n } catch {\n // Fallback to `format`\n textFormat = format(textFormat);\n }\n\n if (textParams.length > 0) {\n text = format(textFormat, ...textParams);\n } else {\n text = textFormat;\n }\n\n return text;\n }\n\n private toString(value: unknown): string {\n // Depending on the type we prefer to do `String` or `stringify`\n const isToString = ['string', 'symbol', 'bigint', 'function'].includes(typeof value) || value instanceof Error;\n\n if (isToString) {\n try {\n return String(value);\n } catch {\n return JSON.stringify(value);\n }\n } else {\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n }\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LogLevel = exports.LOG_LEVELS = void 0;
7
+
8
+ /**
9
+ * Log Levels
10
+ *
11
+ * Check the main README to see how to access the `LogLevel` enum.
12
+ */
13
+ let LogLevel;
14
+ /**
15
+ * @hidden
16
+ */
17
+
18
+ exports.LogLevel = LogLevel;
19
+
20
+ (function (LogLevel) {
21
+ LogLevel[LogLevel["Debug"] = 0] = "Debug";
22
+ LogLevel[LogLevel["Warning"] = 1] = "Warning";
23
+ LogLevel[LogLevel["Error"] = 2] = "Error";
24
+ LogLevel[LogLevel["Trace"] = 3] = "Trace";
25
+ LogLevel[LogLevel["Info"] = 4] = "Info";
26
+ LogLevel[LogLevel["Fatal"] = 5] = "Fatal";
27
+ })(LogLevel || (exports.LogLevel = LogLevel = {}));
28
+
29
+ const LOG_LEVELS = [LogLevel.Debug, LogLevel.Warning, LogLevel.Error, LogLevel.Trace, LogLevel.Info, LogLevel.Fatal];
30
+ /**
31
+ * @hidden
32
+ */
33
+
34
+ exports.LOG_LEVELS = LOG_LEVELS;
35
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["log.ts"],"names":["LogLevel","LOG_LEVELS","Debug","Warning","Error","Trace","Info","Fatal"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;IACYA,Q;AASZ;AACA;AACA;;;;WAXYA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;GAAAA,Q,wBAAAA,Q;;AAYL,MAAMC,UAAsB,GAAG,CACpCD,QAAQ,CAACE,KAD2B,EAEpCF,QAAQ,CAACG,OAF2B,EAGpCH,QAAQ,CAACI,KAH2B,EAIpCJ,QAAQ,CAACK,KAJ2B,EAKpCL,QAAQ,CAACM,IAL2B,EAMpCN,QAAQ,CAACO,KAN2B,CAA/B;AASP;AACA;AACA","sourcesContent":["/**\n * Log Levels\n *\n * Check the main README to see how to access the `LogLevel` enum.\n */\nexport enum LogLevel {\n Debug = 0,\n Warning = 1,\n Error = 2,\n Trace = 3,\n Info = 4,\n Fatal = 5,\n}\n\n/**\n * @hidden\n */\nexport const LOG_LEVELS: LogLevel[] = [\n LogLevel.Debug,\n LogLevel.Warning,\n LogLevel.Error,\n LogLevel.Trace,\n LogLevel.Info,\n LogLevel.Fatal,\n];\n\n/**\n * @hidden\n */\nexport interface ILogEntryShort {\n /** Date ISO */\n x: string;\n /** Text */\n t: string;\n /** Method */\n m: string;\n /** Absolute Time */\n at: number;\n /** Tag */\n tg: string;\n /** File */\n f: string;\n /** Line */\n l: number;\n /** Level */\n ll: number;\n /** URL */\n u: string;\n}\n\n/**\n * Log Entry object interface\n */\nexport interface ILogEntry {\n /** The line number where the log was triggered from */\n line?: number;\n\n /** The log's level based on LogLevel constant */\n level?: LogLevel;\n\n /** The log's tag */\n tag?: string;\n\n /** The method name where the log was triggered from */\n method?: string;\n\n /** The file name where the log was triggered from */\n file?: string;\n\n /** The log's text content */\n text?: string;\n\n /** The log's origin URL. This attribute is ignored on Android & iOS */\n url?: string;\n}\n"]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SDKOptionsBuilder = void 0;
7
+
8
+ var _utilities = require("../utilities");
9
+
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
12
+ class SDKOptionsBuilder {
13
+ constructor(commonOptions) {
14
+ _defineProperty(this, "commonOptions", void 0);
15
+
16
+ _defineProperty(this, "nativeOptions", void 0);
17
+
18
+ _defineProperty(this, "webOptions", void 0);
19
+
20
+ this.commonOptions = commonOptions;
21
+ }
22
+
23
+ native(nativeOptions) {
24
+ this.nativeOptions = nativeOptions;
25
+ return this;
26
+ }
27
+
28
+ web(webOptions) {
29
+ this.webOptions = webOptions;
30
+ return this;
31
+ }
32
+
33
+ build() {
34
+ var _this$webOptions, _this$webOptions2, _this$webOptions3, _this$nativeOptions, _this$nativeOptions2;
35
+
36
+ const options = {
37
+ appKey: this.commonOptions.appKey,
38
+ apiURL: this.commonOptions.apiURL,
39
+ baseURL: this.commonOptions.baseURL,
40
+ overrideConsoleMethods: this.commonOptions.overrideConsoleMethods,
41
+ printToConsole: this.commonOptions.printToConsole,
42
+ logUIEvents: this.commonOptions.logUIEvents,
43
+ registerErrorHandler: this.commonOptions.registerErrorHandler,
44
+ deviceName: this.commonOptions.deviceName,
45
+ logBrowserEvents: (_this$webOptions = this.webOptions) === null || _this$webOptions === void 0 ? void 0 : _this$webOptions.logBrowserEvents,
46
+ build: (_this$webOptions2 = this.webOptions) === null || _this$webOptions2 === void 0 ? void 0 : _this$webOptions2.build,
47
+ version: (_this$webOptions3 = this.webOptions) === null || _this$webOptions3 === void 0 ? void 0 : _this$webOptions3.version,
48
+ enableLogcatLogging: (_this$nativeOptions = this.nativeOptions) === null || _this$nativeOptions === void 0 ? void 0 : _this$nativeOptions.enableLogcatLogging,
49
+ maximumLocalStorageSize: (_this$nativeOptions2 = this.nativeOptions) === null || _this$nativeOptions2 === void 0 ? void 0 : _this$nativeOptions2.maximumLocalStorageSize
50
+ };
51
+ (0, _utilities.removeUndefinedAttributes)(options);
52
+ return options;
53
+ }
54
+
55
+ }
56
+
57
+ exports.SDKOptionsBuilder = SDKOptionsBuilder;
58
+ //# sourceMappingURL=sdk-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["sdk-options.ts"],"names":["SDKOptionsBuilder","constructor","commonOptions","native","nativeOptions","web","webOptions","build","options","appKey","apiURL","baseURL","overrideConsoleMethods","printToConsole","logUIEvents","registerErrorHandler","deviceName","logBrowserEvents","version","enableLogcatLogging","maximumLocalStorageSize"],"mappings":";;;;;;;AAAA;;;;AAuCO,MAAMA,iBAAN,CAAwB;AAK7BC,EAAAA,WAAW,CAACC,aAAD,EAAmC;AAAA;;AAAA;;AAAA;;AAC5C,SAAKA,aAAL,GAAqBA,aAArB;AACD;;AAEMC,EAAAA,MAAM,CAACC,aAAD,EAAsD;AACjE,SAAKA,aAAL,GAAqBA,aAArB;AACA,WAAO,IAAP;AACD;;AAEMC,EAAAA,GAAG,CAACC,UAAD,EAAgD;AACxD,SAAKA,UAAL,GAAkBA,UAAlB;AACA,WAAO,IAAP;AACD;;AAEMC,EAAAA,KAAK,GAAgB;AAAA;;AAC1B,UAAMC,OAAoB,GAAG;AAC3BC,MAAAA,MAAM,EAAE,KAAKP,aAAL,CAAmBO,MADA;AAE3BC,MAAAA,MAAM,EAAE,KAAKR,aAAL,CAAmBQ,MAFA;AAG3BC,MAAAA,OAAO,EAAE,KAAKT,aAAL,CAAmBS,OAHD;AAI3BC,MAAAA,sBAAsB,EAAE,KAAKV,aAAL,CAAmBU,sBAJhB;AAK3BC,MAAAA,cAAc,EAAE,KAAKX,aAAL,CAAmBW,cALR;AAM3BC,MAAAA,WAAW,EAAE,KAAKZ,aAAL,CAAmBY,WANL;AAO3BC,MAAAA,oBAAoB,EAAE,KAAKb,aAAL,CAAmBa,oBAPd;AAQ3BC,MAAAA,UAAU,EAAE,KAAKd,aAAL,CAAmBc,UARJ;AAS3BC,MAAAA,gBAAgB,sBAAE,KAAKX,UAAP,qDAAE,iBAAiBW,gBATR;AAU3BV,MAAAA,KAAK,uBAAE,KAAKD,UAAP,sDAAE,kBAAiBC,KAVG;AAW3BW,MAAAA,OAAO,uBAAE,KAAKZ,UAAP,sDAAE,kBAAiBY,OAXC;AAY3BC,MAAAA,mBAAmB,yBAAE,KAAKf,aAAP,wDAAE,oBAAoBe,mBAZd;AAa3BC,MAAAA,uBAAuB,0BAAE,KAAKhB,aAAP,yDAAE,qBAAoBgB;AAblB,KAA7B;AAgBA,8CAA0BZ,OAA1B;AAEA,WAAOA,OAAP;AACD;;AAvC4B","sourcesContent":["import {removeUndefinedAttributes} from \"../utilities\";\n\nexport interface ISDKCommonOptions {\n /** The app key to log into */\n appKey: string;\n /** Base URL to Bugfender API */\n apiURL?: string;\n /** Base URL to Bugfender web dashboard */\n baseURL?: string;\n /** Override default `window.console` so it also logs to Bugfender. Defaults to `true`. */\n overrideConsoleMethods?: boolean;\n /** Print also with `window.console` when Bugfender logging methods are called. Defaults to `true`. */\n printToConsole?: boolean;\n /** Register a handler for most common UI events to report them to Bugfender. Defaults to `true`. */\n logUIEvents?: boolean;\n /** Register error handler for uncaught errors that reports a crash to Bugfender. Defaults to `true`. */\n registerErrorHandler?: boolean;\n /** Sets the name for the device. If the Device Name is not set, then the platform standard device name will be automatically sent */\n deviceName?: string;\n}\n\nexport interface ISDKWebOptions {\n /** Register a handler for most common browser events to report them to Bugfender (Web specific). Defaults to `true`. */\n logBrowserEvents?: boolean;\n /** App build identifier (Web specific) */\n build?: string;\n /** App version identifier (Web specific) */\n version?: string;\n}\n\nexport interface ISDKNativeOptions {\n /** Set the maximum size to store local log files in bytes (Native specific). Range accepted is from 1 MB to 50 MB. Defaults to 5 MB. **/\n maximumLocalStorageSize?: number;\n /** Logs all logs written via Logcat (Android specific). Defaults to `false`. */\n enableLogcatLogging?: boolean;\n}\n\nexport type ISDKOptions = ISDKCommonOptions & ISDKNativeOptions & ISDKWebOptions;\n\nexport class SDKOptionsBuilder {\n private commonOptions: ISDKCommonOptions;\n private nativeOptions?: ISDKNativeOptions;\n private webOptions?: ISDKWebOptions;\n\n constructor(commonOptions: ISDKCommonOptions) {\n this.commonOptions = commonOptions;\n }\n\n public native(nativeOptions: ISDKNativeOptions): SDKOptionsBuilder {\n this.nativeOptions = nativeOptions;\n return this;\n }\n\n public web(webOptions: ISDKWebOptions): SDKOptionsBuilder {\n this.webOptions = webOptions;\n return this;\n }\n\n public build(): ISDKOptions {\n const options: ISDKOptions = {\n appKey: this.commonOptions.appKey,\n apiURL: this.commonOptions.apiURL,\n baseURL: this.commonOptions.baseURL,\n overrideConsoleMethods: this.commonOptions.overrideConsoleMethods,\n printToConsole: this.commonOptions.printToConsole,\n logUIEvents: this.commonOptions.logUIEvents,\n registerErrorHandler: this.commonOptions.registerErrorHandler,\n deviceName: this.commonOptions.deviceName,\n logBrowserEvents: this.webOptions?.logBrowserEvents,\n build: this.webOptions?.build,\n version: this.webOptions?.version,\n enableLogcatLogging: this.nativeOptions?.enableLogcatLogging,\n maximumLocalStorageSize: this.nativeOptions?.maximumLocalStorageSize,\n };\n\n removeUndefinedAttributes(options);\n\n return options;\n }\n}\n"]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DefaultUserFeedbackOptions = void 0;
7
+
8
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+
10
+ /**
11
+ * Options object for `Bugfender.getUserFeedback` with customised modal strings.
12
+ */
13
+ class DefaultUserFeedbackOptions {
14
+ constructor() {
15
+ _defineProperty(this, "title", 'Feedback');
16
+
17
+ _defineProperty(this, "hint", 'Please insert your feedback here and click send');
18
+
19
+ _defineProperty(this, "subjectPlaceholder", 'Subject…');
20
+
21
+ _defineProperty(this, "feedbackPlaceholder", 'Your feedback…');
22
+
23
+ _defineProperty(this, "submitLabel", 'Send');
24
+
25
+ _defineProperty(this, "closeLabel", 'Close');
26
+ }
27
+
28
+ }
29
+
30
+ exports.DefaultUserFeedbackOptions = DefaultUserFeedbackOptions;
31
+ //# sourceMappingURL=user-feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["user-feedback.ts"],"names":["DefaultUserFeedbackOptions"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AAgBO,MAAMA,0BAAN,CAA0E;AAAA;AAAA,mCAChE,UADgE;;AAAA,kCAEjE,iDAFiE;;AAAA,gDAGnD,UAHmD;;AAAA,iDAIlD,gBAJkD;;AAAA,yCAK1D,MAL0D;;AAAA,wCAM3D,OAN2D;AAAA;;AAAA","sourcesContent":["/**\n * Options object for `Bugfender.getUserFeedback` with customised modal strings.\n */\nexport interface UserFeedbackOptions {\n /** Default: `Feedback`. */\n title?: string;\n /** Default `Please insert your feedback here and click send`. */\n hint?: string;\n /** Default: `Subject…`. */\n subjectPlaceholder?: string;\n /** Default: `Your feedback…`. */\n feedbackPlaceholder?: string;\n /** Default: `Send`. */\n submitLabel?: string;\n /** Default: `Close`. This attribute is only used on iOS */\n closeLabel?: string;\n}\n\nexport class DefaultUserFeedbackOptions implements Required<UserFeedbackOptions> {\n public title = 'Feedback';\n public hint = 'Please insert your feedback here and click send';\n public subjectPlaceholder = 'Subject…';\n public feedbackPlaceholder = 'Your feedback…';\n public submitLabel = 'Send';\n public closeLabel = 'Close';\n}\n\nexport interface UserFeedbackResult {\n /** `true` if the user has sent the feedback. `false` if she has closed the modal without sending it. */\n isSent: boolean;\n /** If the feedback was sent this will contain the Bugfender URL for the feedback. */\n feedbackURL?: string;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.removeUndefinedAttributes = removeUndefinedAttributes;
7
+
8
+ function removeUndefinedAttributes(object) {
9
+ Object.entries(object).forEach(_ref => {
10
+ let [key, value] = _ref;
11
+
12
+ if (value === undefined) {
13
+ // @ts-ignore
14
+ delete object[key];
15
+ }
16
+ });
17
+ }
18
+ //# sourceMappingURL=utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["utilities.ts"],"names":["removeUndefinedAttributes","object","Object","entries","forEach","key","value","undefined"],"mappings":";;;;;;;AAAO,SAASA,yBAAT,CAAmCC,MAAnC,EAAgD;AACrDC,EAAAA,MAAM,CAACC,OAAP,CAAeF,MAAf,EAAuBG,OAAvB,CAA+B,QAAkB;AAAA,QAAjB,CAACC,GAAD,EAAMC,KAAN,CAAiB;;AAC/C,QAAIA,KAAK,KAAKC,SAAd,EAAyB;AACvB;AACA,aAAON,MAAM,CAACI,GAAD,CAAb;AACD;AACF,GALD;AAMD","sourcesContent":["export function removeUndefinedAttributes(object: any) {\n Object.entries(object).forEach(([key, value]) => {\n if (value === undefined) {\n // @ts-ignore\n delete object[key];\n }\n });\n}\n"]}
@@ -0,0 +1,332 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ import { NativeModules, Platform } from 'react-native';
4
+ import { DefaultUserFeedbackOptions } from './user-feedback';
5
+ import { StringFormatter } from './string-formatter';
6
+ import { LogLevel } from './types/log';
7
+ import { PrintToConsole } from './print-to-console';
8
+ import { SDKOptions } from './sdk-options';
9
+ const LINKING_ERROR = `The package '@bugfender/rn-bugfender' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
10
+ ios: "- You have run 'pod install'\n",
11
+ default: ''
12
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
13
+ const RnBugfender = NativeModules.RnBugfender ? NativeModules.RnBugfender : new Proxy({}, {
14
+ get() {
15
+ throw new Error(LINKING_ERROR);
16
+ }
17
+
18
+ });
19
+
20
+ class BugfenderClass {
21
+ constructor() {
22
+ _defineProperty(this, "stringFormatter", new StringFormatter());
23
+
24
+ _defineProperty(this, "overrideConsoleMethods", new (require('./override-console-methods').OverrideConsoleMethods)(window));
25
+
26
+ _defineProperty(this, "printToConsole", new PrintToConsole(global.console));
27
+
28
+ _defineProperty(this, "sdkOptions", new SDKOptions());
29
+
30
+ _defineProperty(this, "initialized", false);
31
+ }
32
+
33
+ async init(options) {
34
+ if (!this.initialized) {
35
+ var _validatedOptions$pri, _validatedOptions$pri2;
36
+
37
+ const validatedOptions = this.sdkOptions.init(options); // region before init
38
+
39
+ if (typeof options.deviceName !== 'undefined') {
40
+ RnBugfender.overrideDeviceName(options.deviceName);
41
+ }
42
+
43
+ if (typeof validatedOptions.apiURL !== 'undefined') {
44
+ RnBugfender.setApiUrl(validatedOptions.apiURL);
45
+ }
46
+
47
+ if (typeof validatedOptions.baseURL !== 'undefined') {
48
+ RnBugfender.setBaseUrl(validatedOptions.baseURL);
49
+ } // endregion before init
50
+ // region init
51
+
52
+
53
+ Platform.OS === 'ios' ? RnBugfender.activateLogger(validatedOptions.appKey) : RnBugfender.init(validatedOptions.appKey, (_validatedOptions$pri = validatedOptions.printToConsole) !== null && _validatedOptions$pri !== void 0 ? _validatedOptions$pri : false);
54
+
55
+ if (validatedOptions.overrideConsoleMethods) {
56
+ this.overrideConsoleMethods.init(this.stringFormatter);
57
+ }
58
+
59
+ this.printToConsole.init((_validatedOptions$pri2 = validatedOptions.printToConsole) !== null && _validatedOptions$pri2 !== void 0 ? _validatedOptions$pri2 : true); // endregion init
60
+ // region after init
61
+
62
+ if (validatedOptions.enableLogcatLogging) {
63
+ RnBugfender.enableLogcatLogging();
64
+ }
65
+
66
+ if (validatedOptions.logUIEvents) {
67
+ RnBugfender.enableUIEventLogging();
68
+ }
69
+
70
+ if (validatedOptions.registerErrorHandler) {
71
+ RnBugfender.enableCrashReporting();
72
+ }
73
+
74
+ RnBugfender.setMaximumLocalStorageSize(validatedOptions.maximumLocalStorageSize); // endregion after init
75
+
76
+ this.initialized = true;
77
+ }
78
+ }
79
+ /**
80
+ * @returns Bugfender dashboard URL for the device
81
+ */
82
+
83
+
84
+ getDeviceURL() {
85
+ return RnBugfender.getDeviceUrl();
86
+ }
87
+ /**
88
+ * @returns Bugfender dashboard URL for the current session
89
+ */
90
+
91
+
92
+ getSessionURL() {
93
+ return RnBugfender.getSessionUrl();
94
+ }
95
+ /**
96
+ * Show a modal which asks for feedback. Once the user closes the modal or sends the feedback
97
+ * the returned promise resolves with the result.
98
+ *
99
+ * ```typescript
100
+ * Bugfender.getUserFeedback().then((result) => {
101
+ * if (result.isSent) {
102
+ * // User sent the feedback
103
+ * // `result.feedbackURL` contains the Bugfender feedback URL
104
+ * } else {
105
+ * // User closed the modal without sending the feedback
106
+ * }
107
+ * });
108
+ * ```
109
+ *
110
+ * @param options Options object to configure modal strings
111
+ * @returns Promise which resolves once the user closes the modal or sends the feedback
112
+ */
113
+
114
+
115
+ async getUserFeedback(options) {
116
+ return new Promise(resolve => {
117
+ var _options;
118
+
119
+ options = { ...new DefaultUserFeedbackOptions(),
120
+ ...((_options = options) !== null && _options !== void 0 ? _options : {})
121
+ };
122
+ return RnBugfender.showUserFeedback(options.title, options.hint, options.subjectPlaceholder, options.feedbackPlaceholder, options.submitLabel, options.closeLabel).then(value => {
123
+ resolve({
124
+ isSent: true,
125
+ feedbackURL: value
126
+ });
127
+ }, _ => {
128
+ resolve({
129
+ isSent: false
130
+ });
131
+ });
132
+ });
133
+ }
134
+ /**
135
+ * @param obj A JavaScript value to output
136
+ * @param objs List of optional JavaScript values to output
137
+ */
138
+
139
+
140
+ log() {
141
+ for (var _len = arguments.length, parameters = new Array(_len), _key = 0; _key < _len; _key++) {
142
+ parameters[_key] = arguments[_key];
143
+ }
144
+
145
+ this.printToConsole.log(...parameters);
146
+ let message = this.stringFormatter.format([...parameters]);
147
+ RnBugfender.debug('', message);
148
+ }
149
+ /**
150
+ * @param obj A JavaScript value to output
151
+ * @param objs List of optional JavaScript values to output
152
+ */
153
+
154
+
155
+ warn() {
156
+ for (var _len2 = arguments.length, parameters = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
157
+ parameters[_key2] = arguments[_key2];
158
+ }
159
+
160
+ this.printToConsole.warn(...parameters);
161
+ let message = this.stringFormatter.format([...parameters]);
162
+ RnBugfender.warning('', message);
163
+ }
164
+ /**
165
+ * @param obj A JavaScript value to output
166
+ * @param objs List of optional JavaScript values to output
167
+ */
168
+
169
+
170
+ error() {
171
+ for (var _len3 = arguments.length, parameters = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
172
+ parameters[_key3] = arguments[_key3];
173
+ }
174
+
175
+ this.printToConsole.error(...parameters);
176
+ let message = this.stringFormatter.format([...parameters]);
177
+ RnBugfender.error('', message);
178
+ }
179
+ /**
180
+ * @param obj A JavaScript value to output
181
+ * @param objs List of optional JavaScript values to output
182
+ */
183
+
184
+
185
+ trace() {
186
+ for (var _len4 = arguments.length, parameters = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
187
+ parameters[_key4] = arguments[_key4];
188
+ }
189
+
190
+ this.printToConsole.trace(...parameters);
191
+ let message = this.stringFormatter.format([...parameters]);
192
+ RnBugfender.trace('', message);
193
+ }
194
+ /**
195
+ * @param obj A JavaScript value to output
196
+ * @param objs List of optional JavaScript values to output
197
+ */
198
+
199
+
200
+ info() {
201
+ for (var _len5 = arguments.length, parameters = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
202
+ parameters[_key5] = arguments[_key5];
203
+ }
204
+
205
+ this.printToConsole.info(...parameters);
206
+ let message = this.stringFormatter.format([...parameters]);
207
+ RnBugfender.info('', message);
208
+ }
209
+ /**
210
+ * @param obj A JavaScript value to output
211
+ * @param objs List of optional JavaScript values to output
212
+ */
213
+
214
+
215
+ fatal() {
216
+ for (var _len6 = arguments.length, parameters = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
217
+ parameters[_key6] = arguments[_key6];
218
+ }
219
+
220
+ this.printToConsole.error(...parameters);
221
+ let message = this.stringFormatter.format([...parameters]);
222
+ RnBugfender.fatal('', message);
223
+ }
224
+ /**
225
+ * Remove a device associated key-value pair. [Learn more](https://bugfender.com/blog/associated-device-information/).
226
+ *
227
+ * @param key Key identifier
228
+ */
229
+
230
+
231
+ removeDeviceKey(key) {
232
+ RnBugfender.removeDeviceKey(key);
233
+ this.printToConsole.info(`Device key "${key}" removed`);
234
+ }
235
+ /**
236
+ * Use this method if you need more control over the data sent while logging. See `ILogEntry` interface reference to see all the accepted properties.
237
+ *
238
+ * @param log Log object that complies with `ILogEntry` interface.
239
+ */
240
+
241
+
242
+ sendLog(log) {
243
+ var _log$line, _log$method, _log$file, _log$level, _log$tag, _log$text;
244
+
245
+ this.printToConsole.printLog(log);
246
+ RnBugfender.log((_log$line = log.line) !== null && _log$line !== void 0 ? _log$line : 0, (_log$method = log.method) !== null && _log$method !== void 0 ? _log$method : '', (_log$file = log.file) !== null && _log$file !== void 0 ? _log$file : '', (_log$level = log.level) !== null && _log$level !== void 0 ? _log$level : LogLevel.Debug, (_log$tag = log.tag) !== null && _log$tag !== void 0 ? _log$tag : '', (_log$text = log.text) !== null && _log$text !== void 0 ? _log$text : '');
247
+ }
248
+ /**
249
+ * Send an issue.
250
+ *
251
+ * @param title - Title
252
+ * @param text - Text content
253
+ * @returns Bugfender dashboard URL for the issue.
254
+ */
255
+
256
+
257
+ sendIssue(title, text) {
258
+ this.printToConsole.warn(`Issue: ${title}.\n${text}`);
259
+ return RnBugfender.sendIssue(title, text);
260
+ }
261
+ /**
262
+ * Send a crash report.
263
+ *
264
+ * @param title - Title
265
+ * @param text - Text content
266
+ * @returns Bugfender dashboard URL for the crash.
267
+ */
268
+
269
+
270
+ sendCrash(title, text) {
271
+ this.printToConsole.error(`Crash: ${title}.\n${text}`);
272
+ return RnBugfender.sendCrash(title, text);
273
+ }
274
+ /**
275
+ * Send an user feedback.
276
+ *
277
+ * @param title - Title/Subject
278
+ * @param text - Feedback text
279
+ * @returns Bugfender dashboard URL for the feedback.
280
+ */
281
+
282
+
283
+ sendUserFeedback(title, text) {
284
+ this.printToConsole.info(`User Feedback: ${title}.\n${text}`);
285
+ return RnBugfender.sendUserFeedback(title, text);
286
+ }
287
+ /**
288
+ * Set a device associated key-value pair. [Learn more](https://bugfender.com/blog/associated-device-information/).
289
+ *
290
+ * @param key Key identifier.
291
+ * @param value Value.
292
+ */
293
+
294
+
295
+ setDeviceKey(key, value) {
296
+ this.printToConsole.info(`Device key "${key}" set to "${value}"`);
297
+
298
+ if (typeof value === 'boolean') {
299
+ RnBugfender.setDeviceBoolean(key, value);
300
+ } else if (typeof value === 'string') {
301
+ RnBugfender.setDeviceString(key, value);
302
+ } else {
303
+ // typeof value === 'number'
304
+ if (Number.isInteger(value)) {
305
+ RnBugfender.setDeviceInteger(key, value);
306
+ } else {
307
+ RnBugfender.setDeviceFloat(key, value);
308
+ }
309
+ }
310
+ }
311
+ /**
312
+ * Synchronizes all logs and issues with the server once, regardless if this device is enabled or not.
313
+ *
314
+ * Logs and issues are synchronized only once. After that, the logs are again sent according to the enabled flag
315
+ * in the Bugfender Console.
316
+ */
317
+
318
+
319
+ forceSendOnce() {
320
+ this.printToConsole.info(`Force send once`);
321
+ RnBugfender.forceSendOnce();
322
+ }
323
+
324
+ setForceEnabled(enabled) {
325
+ this.printToConsole.info(`Set force enabled set to ${enabled}`);
326
+ RnBugfender.setForceEnabled(enabled);
327
+ }
328
+
329
+ }
330
+
331
+ export { BugfenderClass, RnBugfender };
332
+ //# sourceMappingURL=bugfender.js.map