@bugfender/rn-bugfender 1.1.4 → 2.0.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 (285) hide show
  1. package/README.md +147 -96
  2. package/RnBugfender.podspec +21 -0
  3. package/android/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/android/.gradle/{6.1.1 → 7.1/dependencies-accessors}/gc.properties +0 -0
  5. package/android/.gradle/{6.1.1/javaCompile/taskHistory.bin → 7.1/executionHistory/executionHistory.bin} +0 -0
  6. package/android/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
  7. package/android/.gradle/{6.1.1 → 7.1}/fileChanges/last-build.bin +0 -0
  8. package/android/.gradle/{6.1.1/fileHashes/resourceHashesCache.bin → 7.1/fileHashes/fileHashes.bin} +0 -0
  9. package/android/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
  10. package/android/{build/intermediates/annotations_typedef_file/debug/extractDebugAnnotations/typedefs.txt → .gradle/7.1/gc.properties} +0 -0
  11. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  12. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  13. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  14. package/android/.gradle/checksums/checksums.lock +0 -0
  15. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  16. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  17. package/android/.idea/compiler.xml +6 -0
  18. package/android/.idea/gradle.xml +1 -3
  19. package/android/.idea/jarRepositories.xml +12 -17
  20. package/android/.idea/misc.xml +4 -1
  21. package/android/.idea/runConfigurations.xml +10 -0
  22. package/android/.idea/uiDesigner.xml +124 -0
  23. package/android/build.gradle +43 -85
  24. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  25. package/android/gradle/wrapper/gradle-wrapper.properties +1 -2
  26. package/android/gradlew +34 -21
  27. package/android/gradlew.bat +24 -19
  28. package/android/src/main/AndroidManifest.xml +4 -3
  29. package/android/src/main/java/com/bugfender/react/{RNBugfenderModule.java → RnBugfenderModule.java} +44 -15
  30. package/android/src/main/java/com/bugfender/react/RnBugfenderPackage.java +28 -0
  31. package/ios/RnBugfender.h +5 -0
  32. package/ios/{RNBugfender.m → RnBugfender.m} +30 -9
  33. package/ios/{RNBugfender.xcodeproj → RnBugfender.xcodeproj}/project.pbxproj +42 -37
  34. package/ios/RnBugfender.xcodeproj/project.xcworkspace/xcuserdata/fj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  35. package/ios/{RNBugfender.xcodeproj → RnBugfender.xcodeproj}/xcuserdata/fj.xcuserdatad/xcschemes/xcschememanagement.plist +1 -1
  36. package/lib/commonjs/bugfender.js +338 -0
  37. package/lib/commonjs/bugfender.js.map +1 -0
  38. package/lib/commonjs/index.js +28 -0
  39. package/lib/commonjs/index.js.map +1 -0
  40. package/lib/commonjs/index.web.js +30 -0
  41. package/lib/commonjs/index.web.js.map +1 -0
  42. package/lib/commonjs/override-console-methods.js +91 -0
  43. package/lib/commonjs/override-console-methods.js.map +1 -0
  44. package/lib/commonjs/print-to-console.js +78 -0
  45. package/lib/commonjs/print-to-console.js.map +1 -0
  46. package/lib/commonjs/sdk-options.js +75 -0
  47. package/lib/commonjs/sdk-options.js.map +1 -0
  48. package/lib/commonjs/string-formatter.js +55 -0
  49. package/lib/commonjs/string-formatter.js.map +1 -0
  50. package/lib/commonjs/types/device.js +2 -0
  51. package/lib/commonjs/types/device.js.map +1 -0
  52. package/lib/commonjs/types/log.js +35 -0
  53. package/lib/commonjs/types/log.js.map +1 -0
  54. package/lib/commonjs/types/sdk-options.js +57 -0
  55. package/lib/commonjs/types/sdk-options.js.map +1 -0
  56. package/lib/commonjs/user-feedback.js +31 -0
  57. package/lib/commonjs/user-feedback.js.map +1 -0
  58. package/lib/commonjs/utilities.js +18 -0
  59. package/lib/commonjs/utilities.js.map +1 -0
  60. package/lib/module/bugfender.js +323 -0
  61. package/lib/module/bugfender.js.map +1 -0
  62. package/lib/module/index.js +6 -0
  63. package/lib/module/index.js.map +1 -0
  64. package/lib/module/index.web.js +5 -0
  65. package/lib/module/index.web.js.map +1 -0
  66. package/lib/module/override-console-methods.js +75 -0
  67. package/lib/module/override-console-methods.js.map +1 -0
  68. package/lib/module/print-to-console.js +67 -0
  69. package/lib/module/print-to-console.js.map +1 -0
  70. package/lib/module/sdk-options.js +65 -0
  71. package/lib/module/sdk-options.js.map +1 -0
  72. package/lib/module/string-formatter.js +45 -0
  73. package/lib/module/string-formatter.js.map +1 -0
  74. package/lib/module/types/device.js +2 -0
  75. package/lib/module/types/device.js.map +1 -0
  76. package/lib/module/types/log.js +24 -0
  77. package/lib/module/types/log.js.map +1 -0
  78. package/lib/module/types/sdk-options.js +47 -0
  79. package/lib/module/types/sdk-options.js.map +1 -0
  80. package/lib/module/user-feedback.js +22 -0
  81. package/lib/module/user-feedback.js.map +1 -0
  82. package/lib/module/utilities.js +11 -0
  83. package/lib/module/utilities.js.map +1 -0
  84. package/lib/typescript/bugfender.d.ts +163 -0
  85. package/lib/typescript/index.d.ts +5 -0
  86. package/lib/typescript/index.web.d.ts +4 -0
  87. package/lib/typescript/override-console-methods.d.ts +10 -0
  88. package/lib/typescript/print-to-console.d.ts +14 -0
  89. package/lib/typescript/sdk-options.d.ts +16 -0
  90. package/lib/typescript/string-formatter.d.ts +4 -0
  91. package/lib/typescript/types/device.d.ts +4 -0
  92. package/lib/typescript/types/log.d.ts +59 -0
  93. package/lib/typescript/types/sdk-options.d.ts +40 -0
  94. package/lib/typescript/user-feedback.d.ts +31 -0
  95. package/lib/typescript/utilities.d.ts +1 -0
  96. package/package.json +146 -12
  97. package/src/bugfender.ts +360 -0
  98. package/src/index.tsx +7 -0
  99. package/src/index.web.tsx +5 -0
  100. package/src/override-console-methods.ts +53 -0
  101. package/src/print-to-console.ts +67 -0
  102. package/src/sdk-options.ts +63 -0
  103. package/src/string-formatter.ts +44 -0
  104. package/src/types/device.ts +4 -0
  105. package/src/types/log.ts +75 -0
  106. package/src/types/sdk-options.ts +77 -0
  107. package/src/user-feedback.ts +33 -0
  108. package/src/utilities.ts +8 -0
  109. package/RNBugfender.podspec +0 -24
  110. package/android/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
  111. package/android/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
  112. package/android/.gradle/6.1.1/fileContent/fileContent.lock +0 -0
  113. package/android/.gradle/6.1.1/fileHashes/fileHashes.bin +0 -0
  114. package/android/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
  115. package/android/.gradle/6.1.1/javaCompile/classAnalysis.bin +0 -0
  116. package/android/.gradle/6.1.1/javaCompile/javaCompile.lock +0 -0
  117. package/android/.idea/android.iml +0 -29
  118. package/android/.idea/caches/build_file_checksums.ser +0 -0
  119. package/android/.idea/codeStyles/Project.xml +0 -116
  120. package/android/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml +0 -11
  121. package/android/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1_aar.xml +0 -12
  122. package/android/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml +0 -11
  123. package/android/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1_aar.xml +0 -12
  124. package/android/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1_aar.xml +0 -12
  125. package/android/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1_aar.xml +0 -12
  126. package/android/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1_aar.xml +0 -12
  127. package/android/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0_aar.xml +0 -10
  128. package/android/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0_aar.xml +0 -13
  129. package/android/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0_aar.xml +0 -10
  130. package/android/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml +0 -9
  131. package/android/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0_aar.xml +0 -13
  132. package/android/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0_aar.xml +0 -10
  133. package/android/.idea/libraries/Gradle__com_android_support_customview_28_0_0_aar.xml +0 -10
  134. package/android/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0_aar.xml +0 -10
  135. package/android/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0_aar.xml +0 -13
  136. package/android/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0_aar.xml +0 -10
  137. package/android/.idea/libraries/Gradle__com_android_support_loader_28_0_0_aar.xml +0 -10
  138. package/android/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0_aar.xml +0 -10
  139. package/android/.idea/libraries/Gradle__com_android_support_print_28_0_0_aar.xml +0 -13
  140. package/android/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0_aar.xml +0 -10
  141. package/android/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml +0 -9
  142. package/android/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0_aar.xml +0 -13
  143. package/android/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0_aar.xml +0 -10
  144. package/android/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0_aar.xml +0 -10
  145. package/android/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0_aar.xml +0 -13
  146. package/android/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0_aar.xml +0 -10
  147. package/android/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0_aar.xml +0 -13
  148. package/android/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0_aar.xml +0 -10
  149. package/android/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0_aar.xml +0 -10
  150. package/android/.idea/libraries/Gradle__com_bugfender_sdk_android_3_0_5_aar.xml +0 -12
  151. package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_1_10_0_aar.xml +0 -12
  152. package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_1_10_0_aar.xml +0 -15
  153. package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_1_10_0_aar.xml +0 -15
  154. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_1_10_0_aar.xml +0 -15
  155. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_1_10_0_aar.xml +0 -15
  156. package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_1_10_0_aar.xml +0 -12
  157. package/android/.idea/libraries/Gradle__com_facebook_infer_annotation_infer_annotation_0_11_2_jar.xml +0 -11
  158. package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_59_9_aar.xml +0 -17
  159. package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_6_0_aar.xml +0 -12
  160. package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_2_jar.xml +0 -13
  161. package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_12_1_jar.xml +0 -11
  162. package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_3_12_1_jar.xml +0 -11
  163. package/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_15_0_jar.xml +0 -13
  164. package/android/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml +0 -13
  165. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/android/support/v4/R.java +0 -12
  166. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/android/support/v7/appcompat/R.java +0 -1248
  167. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/android/support/v7/recyclerview/R.java +0 -40
  168. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/bugfender/android/R.java +0 -55
  169. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/bugfender/react/R.java +0 -1384
  170. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/drawee/R.java +0 -82
  171. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/drawee/backends/pipeline/R.java +0 -82
  172. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/fbcore/R.java +0 -12
  173. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/imagepipeline/R.java +0 -12
  174. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/imagepipeline/backends/okhttp/R.java +0 -12
  175. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/com/facebook/react/R.java +0 -1361
  176. package/android/build/generated/not_namespaced_r_class_sources/debug/generateDebugRFile/out/org/webkit/android_jsc/R.java +0 -12
  177. package/android/build/generated/source/buildConfig/debug/com/bugfender/react/BuildConfig.java +0 -13
  178. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -11
  179. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output.json +0 -1
  180. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -11
  181. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output.json +0 -1
  182. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
  183. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  184. package/android/build/intermediates/compile_library_classes/debug/classes.jar +0 -0
  185. package/android/build/intermediates/compile_only_not_namespaced_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  186. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  187. package/android/build/intermediates/incremental/debug-mergeJniLibs/merge-state +0 -0
  188. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  189. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  190. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  191. package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +0 -1
  192. package/android/build/intermediates/incremental/packageDebugResources/merger.xml +0 -2
  193. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v4/R.class +0 -0
  194. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$anim.class +0 -0
  195. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$attr.class +0 -0
  196. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$bool.class +0 -0
  197. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$color.class +0 -0
  198. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$dimen.class +0 -0
  199. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$drawable.class +0 -0
  200. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$id.class +0 -0
  201. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$integer.class +0 -0
  202. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$layout.class +0 -0
  203. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$string.class +0 -0
  204. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$style.class +0 -0
  205. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R$styleable.class +0 -0
  206. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/appcompat/R.class +0 -0
  207. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$attr.class +0 -0
  208. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$dimen.class +0 -0
  209. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$id.class +0 -0
  210. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R$styleable.class +0 -0
  211. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android/support/v7/recyclerview/R.class +0 -0
  212. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$color.class +0 -0
  213. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$drawable.class +0 -0
  214. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$id.class +0 -0
  215. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$layout.class +0 -0
  216. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R$string.class +0 -0
  217. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/android/R.class +0 -0
  218. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/BuildConfig.class +0 -0
  219. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$anim.class +0 -0
  220. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$attr.class +0 -0
  221. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$bool.class +0 -0
  222. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$color.class +0 -0
  223. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$dimen.class +0 -0
  224. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$drawable.class +0 -0
  225. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$id.class +0 -0
  226. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$integer.class +0 -0
  227. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$layout.class +0 -0
  228. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$string.class +0 -0
  229. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$style.class +0 -0
  230. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$styleable.class +0 -0
  231. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R$xml.class +0 -0
  232. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/R.class +0 -0
  233. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/RNBugfenderModule.class +0 -0
  234. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/bugfender/react/RNBugfenderPackage.class +0 -0
  235. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R$attr.class +0 -0
  236. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R$id.class +0 -0
  237. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R$styleable.class +0 -0
  238. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/R.class +0 -0
  239. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R$attr.class +0 -0
  240. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R$id.class +0 -0
  241. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R$styleable.class +0 -0
  242. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/drawee/backends/pipeline/R.class +0 -0
  243. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/fbcore/R.class +0 -0
  244. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/imagepipeline/R.class +0 -0
  245. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/imagepipeline/backends/okhttp/R.class +0 -0
  246. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$anim.class +0 -0
  247. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$attr.class +0 -0
  248. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$bool.class +0 -0
  249. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$color.class +0 -0
  250. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$dimen.class +0 -0
  251. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$drawable.class +0 -0
  252. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$id.class +0 -0
  253. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$integer.class +0 -0
  254. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$layout.class +0 -0
  255. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$string.class +0 -0
  256. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$style.class +0 -0
  257. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$styleable.class +0 -0
  258. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R$xml.class +0 -0
  259. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/R.class +0 -0
  260. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/webkit/android_jsc/R.class +0 -0
  261. package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
  262. package/android/build/intermediates/library_manifest/debug/AndroidManifest.xml +0 -11
  263. package/android/build/intermediates/merged_manifests/debug/output.json +0 -1
  264. package/android/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml +0 -11
  265. package/android/build/intermediates/merged_manifests/debug/processDebugManifest/merged/output.json +0 -1
  266. package/android/build/intermediates/packaged-classes/debug/classes.jar +0 -0
  267. package/android/build/intermediates/res/symbol-table-with-package/debug/package-aware-r.txt +0 -1309
  268. package/android/build/intermediates/runtime_library_classes/debug/classes.jar +0 -0
  269. package/android/build/intermediates/symbols/debug/R.txt +0 -1783
  270. package/android/build/intermediates/transforms/mergeJavaRes/debug/0.jar +0 -0
  271. package/android/build/intermediates/transforms/mergeJavaRes/debug/__content__.json +0 -1
  272. package/android/build/intermediates/transforms/mergeJniLibs/debug/__content__.json +0 -1
  273. package/android/build/outputs/aar/android.aar +0 -0
  274. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -37
  275. package/android/local.properties +0 -1
  276. package/android/src/main/java/com/bugfender/react/RNBugfenderPackage.java +0 -29
  277. package/bugfender.js +0 -217
  278. package/example/.babelrc +0 -3
  279. package/example/.watchmanconfig +0 -1
  280. package/example/App.js +0 -121
  281. package/ios/RNBugfender.h +0 -7
  282. package/ios/RNBugfender.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  283. package/ios/RNBugfender.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  284. package/ios/RNBugfender.xcodeproj/project.xcworkspace/xcuserdata/fj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  285. package/ios/RNBugfender.xcodeproj/xcuserdata/rubenvot.xcuserdatad/xcschemes/xcschememanagement.plist +0 -19
@@ -7,7 +7,9 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- B3E7B58A1CC2AC0600A0062D /* RNBugfender.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNBugfender.m */; };
10
+
11
+ 5E555C0D2413F4C50049A1A2 /* RnBugfender.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RnBugfender.m */; };
12
+
11
13
  /* End PBXBuildFile section */
12
14
 
13
15
  /* Begin PBXCopyFilesBuildPhase section */
@@ -23,10 +25,11 @@
23
25
  /* End PBXCopyFilesBuildPhase section */
24
26
 
25
27
  /* Begin PBXFileReference section */
26
- 134814201AA4EA6300B7C361 /* libRNBugfender.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNBugfender.a; sourceTree = BUILT_PRODUCTS_DIR; };
27
- 745467E1224CB3860092A602 /* BugfenderSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BugfenderSDK.framework; path = ../../ios/rn_bugfender_dev/BugfenderSDK.framework; sourceTree = "<group>"; };
28
- B3E7B5881CC2AC0600A0062D /* RNBugfender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNBugfender.h; sourceTree = "<group>"; };
29
- B3E7B5891CC2AC0600A0062D /* RNBugfender.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNBugfender.m; sourceTree = "<group>"; };
28
+ 134814201AA4EA6300B7C361 /* libRnBugfender.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRnBugfender.a; sourceTree = BUILT_PRODUCTS_DIR; };
29
+
30
+ B3E7B5881CC2AC0600A0062D /* RnBugfender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RnBugfender.h; sourceTree = "<group>"; };
31
+ B3E7B5891CC2AC0600A0062D /* RnBugfender.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RnBugfender.m; sourceTree = "<group>"; };
32
+
30
33
  /* End PBXFileReference section */
31
34
 
32
35
  /* Begin PBXFrameworksBuildPhase section */
@@ -43,7 +46,7 @@
43
46
  134814211AA4EA7D00B7C361 /* Products */ = {
44
47
  isa = PBXGroup;
45
48
  children = (
46
- 134814201AA4EA6300B7C361 /* libRNBugfender.a */,
49
+ 134814201AA4EA6300B7C361 /* libRnBugfender.a */,
47
50
  );
48
51
  name = Products;
49
52
  sourceTree = "<group>";
@@ -51,27 +54,20 @@
51
54
  58B511D21A9E6C8500147676 = {
52
55
  isa = PBXGroup;
53
56
  children = (
54
- B3E7B5881CC2AC0600A0062D /* RNBugfender.h */,
55
- B3E7B5891CC2AC0600A0062D /* RNBugfender.m */,
57
+
58
+ B3E7B5881CC2AC0600A0062D /* RnBugfender.h */,
59
+ B3E7B5891CC2AC0600A0062D /* RnBugfender.m */,
60
+
56
61
  134814211AA4EA7D00B7C361 /* Products */,
57
- 745467E0224CB3860092A602 /* Frameworks */,
58
62
  );
59
63
  sourceTree = "<group>";
60
64
  };
61
- 745467E0224CB3860092A602 /* Frameworks */ = {
62
- isa = PBXGroup;
63
- children = (
64
- 745467E1224CB3860092A602 /* BugfenderSDK.framework */,
65
- );
66
- name = Frameworks;
67
- sourceTree = "<group>";
68
- };
69
65
  /* End PBXGroup section */
70
66
 
71
67
  /* Begin PBXNativeTarget section */
72
- 58B511DA1A9E6C8500147676 /* RNBugfender */ = {
68
+ 58B511DA1A9E6C8500147676 /* RnBugfender */ = {
73
69
  isa = PBXNativeTarget;
74
- buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBugfender" */;
70
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RnBugfender" */;
75
71
  buildPhases = (
76
72
  58B511D71A9E6C8500147676 /* Sources */,
77
73
  58B511D81A9E6C8500147676 /* Frameworks */,
@@ -81,9 +77,9 @@
81
77
  );
82
78
  dependencies = (
83
79
  );
84
- name = RNBugfender;
80
+ name = RnBugfender;
85
81
  productName = RCTDataManager;
86
- productReference = 134814201AA4EA6300B7C361 /* libRNBugfender.a */;
82
+ productReference = 134814201AA4EA6300B7C361 /* libRnBugfender.a */;
87
83
  productType = "com.apple.product-type.library.static";
88
84
  };
89
85
  /* End PBXNativeTarget section */
@@ -92,7 +88,7 @@
92
88
  58B511D31A9E6C8500147676 /* Project object */ = {
93
89
  isa = PBXProject;
94
90
  attributes = {
95
- LastUpgradeCheck = 0830;
91
+ LastUpgradeCheck = 0920;
96
92
  ORGANIZATIONNAME = Facebook;
97
93
  TargetAttributes = {
98
94
  58B511DA1A9E6C8500147676 = {
@@ -100,11 +96,12 @@
100
96
  };
101
97
  };
102
98
  };
103
- buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBugfender" */;
99
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RnBugfender" */;
104
100
  compatibilityVersion = "Xcode 3.2";
105
101
  developmentRegion = English;
106
102
  hasScannedForEncodings = 0;
107
103
  knownRegions = (
104
+ English,
108
105
  en,
109
106
  );
110
107
  mainGroup = 58B511D21A9E6C8500147676;
@@ -112,7 +109,7 @@
112
109
  projectDirPath = "";
113
110
  projectRoot = "";
114
111
  targets = (
115
- 58B511DA1A9E6C8500147676 /* RNBugfender */,
112
+ 58B511DA1A9E6C8500147676 /* RnBugfender */,
116
113
  );
117
114
  };
118
115
  /* End PBXProject section */
@@ -122,7 +119,9 @@
122
119
  isa = PBXSourcesBuildPhase;
123
120
  buildActionMask = 2147483647;
124
121
  files = (
125
- B3E7B58A1CC2AC0600A0062D /* RNBugfender.m in Sources */,
122
+
123
+ B3E7B58A1CC2AC0600A0062D /* RnBugfender.m in Sources */,
124
+
126
125
  );
127
126
  runOnlyForDeploymentPostprocessing = 0;
128
127
  };
@@ -137,14 +136,20 @@
137
136
  CLANG_CXX_LIBRARY = "libc++";
138
137
  CLANG_ENABLE_MODULES = YES;
139
138
  CLANG_ENABLE_OBJC_ARC = YES;
139
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
140
140
  CLANG_WARN_BOOL_CONVERSION = YES;
141
+ CLANG_WARN_COMMA = YES;
141
142
  CLANG_WARN_CONSTANT_CONVERSION = YES;
142
143
  CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
143
144
  CLANG_WARN_EMPTY_BODY = YES;
144
145
  CLANG_WARN_ENUM_CONVERSION = YES;
145
146
  CLANG_WARN_INFINITE_RECURSION = YES;
146
147
  CLANG_WARN_INT_CONVERSION = YES;
148
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
149
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
147
150
  CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
151
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
152
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
148
153
  CLANG_WARN_SUSPICIOUS_MOVE = YES;
149
154
  CLANG_WARN_UNREACHABLE_CODE = YES;
150
155
  CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -181,14 +186,20 @@
181
186
  CLANG_CXX_LIBRARY = "libc++";
182
187
  CLANG_ENABLE_MODULES = YES;
183
188
  CLANG_ENABLE_OBJC_ARC = YES;
189
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
184
190
  CLANG_WARN_BOOL_CONVERSION = YES;
191
+ CLANG_WARN_COMMA = YES;
185
192
  CLANG_WARN_CONSTANT_CONVERSION = YES;
186
193
  CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
187
194
  CLANG_WARN_EMPTY_BODY = YES;
188
195
  CLANG_WARN_ENUM_CONVERSION = YES;
189
196
  CLANG_WARN_INFINITE_RECURSION = YES;
190
197
  CLANG_WARN_INT_CONVERSION = YES;
198
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
199
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
191
200
  CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
201
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
202
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
192
203
  CLANG_WARN_SUSPICIOUS_MOVE = YES;
193
204
  CLANG_WARN_UNREACHABLE_CODE = YES;
194
205
  CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -213,10 +224,6 @@
213
224
  58B511F01A9E6C8500147676 /* Debug */ = {
214
225
  isa = XCBuildConfiguration;
215
226
  buildSettings = {
216
- FRAMEWORK_SEARCH_PATHS = (
217
- "\"$(SRCROOT)/../../../../ios\"",
218
- "/Users/rubenvot/Developer/bugfender/rn-bugfender-bitbucket/ios/rn_bugfender_dev/**",
219
- );
220
227
  HEADER_SEARCH_PATHS = (
221
228
  "$(inherited)",
222
229
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
@@ -225,18 +232,15 @@
225
232
  );
226
233
  LIBRARY_SEARCH_PATHS = "$(inherited)";
227
234
  OTHER_LDFLAGS = "-ObjC";
228
- PRODUCT_NAME = RNBugfender;
235
+ PRODUCT_NAME = RnBugfender;
229
236
  SKIP_INSTALL = YES;
237
+
230
238
  };
231
239
  name = Debug;
232
240
  };
233
241
  58B511F11A9E6C8500147676 /* Release */ = {
234
242
  isa = XCBuildConfiguration;
235
243
  buildSettings = {
236
- FRAMEWORK_SEARCH_PATHS = (
237
- "\"$(SRCROOT)/../../../../ios\"",
238
- "/Users/rubenvot/Developer/bugfender/rn-bugfender-bitbucket/ios/rn_bugfender_dev/**",
239
- );
240
244
  HEADER_SEARCH_PATHS = (
241
245
  "$(inherited)",
242
246
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
@@ -245,15 +249,16 @@
245
249
  );
246
250
  LIBRARY_SEARCH_PATHS = "$(inherited)";
247
251
  OTHER_LDFLAGS = "-ObjC";
248
- PRODUCT_NAME = RNBugfender;
252
+ PRODUCT_NAME = RnBugfender;
249
253
  SKIP_INSTALL = YES;
254
+
250
255
  };
251
256
  name = Release;
252
257
  };
253
258
  /* End XCBuildConfiguration section */
254
259
 
255
260
  /* Begin XCConfigurationList section */
256
- 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNBugfender" */ = {
261
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RnBugfender" */ = {
257
262
  isa = XCConfigurationList;
258
263
  buildConfigurations = (
259
264
  58B511ED1A9E6C8500147676 /* Debug */,
@@ -262,7 +267,7 @@
262
267
  defaultConfigurationIsVisible = 0;
263
268
  defaultConfigurationName = Release;
264
269
  };
265
- 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNBugfender" */ = {
270
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RnBugfender" */ = {
266
271
  isa = XCConfigurationList;
267
272
  buildConfigurations = (
268
273
  58B511F01A9E6C8500147676 /* Debug */,
@@ -4,7 +4,7 @@
4
4
  <dict>
5
5
  <key>SchemeUserState</key>
6
6
  <dict>
7
- <key>RNBugfender.xcscheme_^#shared#^_</key>
7
+ <key>RnBugfender.xcscheme_^#shared#^_</key>
8
8
  <dict>
9
9
  <key>orderHint</key>
10
10
  <integer>0</integer>
@@ -0,0 +1,338 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RnBugfender = exports.BugfenderClass = void 0;
7
+
8
+ var _reactNative = require("react-native");
9
+
10
+ var _userFeedback = require("./user-feedback");
11
+
12
+ var _stringFormatter = require("./string-formatter");
13
+
14
+ var _log = require("./types/log");
15
+
16
+ var _overrideConsoleMethods = require("./override-console-methods");
17
+
18
+ var _printToConsole = require("./print-to-console");
19
+
20
+ var _sdkOptions = require("./sdk-options");
21
+
22
+ 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; }
23
+
24
+ const LINKING_ERROR = `The package '@bugfender/rn-bugfender' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
25
+ ios: "- You have run 'pod install'\n",
26
+ default: ''
27
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n';
28
+ const RnBugfender = _reactNative.NativeModules.RnBugfender ? _reactNative.NativeModules.RnBugfender : new Proxy({}, {
29
+ get() {
30
+ throw new Error(LINKING_ERROR);
31
+ }
32
+
33
+ });
34
+ exports.RnBugfender = RnBugfender;
35
+
36
+ class BugfenderClass {
37
+ constructor() {
38
+ _defineProperty(this, "stringFormatter", new _stringFormatter.StringFormatter());
39
+
40
+ _defineProperty(this, "overrideConsoleMethods", new _overrideConsoleMethods.OverrideConsoleMethods(window));
41
+
42
+ _defineProperty(this, "printToConsole", new _printToConsole.PrintToConsole(global.console));
43
+
44
+ _defineProperty(this, "sdkOptions", new _sdkOptions.SDKOptions());
45
+
46
+ _defineProperty(this, "initialized", false);
47
+ }
48
+
49
+ async init(options) {
50
+ if (!this.initialized) {
51
+ var _validatedOptions$pri;
52
+
53
+ const validatedOptions = this.sdkOptions.init(options); // Needs to be executed prior initialization
54
+
55
+ if (typeof options.deviceName !== 'undefined') {
56
+ RnBugfender.overrideDeviceName(options.deviceName);
57
+ } // Library initialization
58
+
59
+
60
+ _reactNative.Platform.OS === 'ios' ? RnBugfender.activateLogger(validatedOptions.appKey) : RnBugfender.init(validatedOptions.appKey, false);
61
+
62
+ if (typeof validatedOptions.apiURL !== 'undefined') {
63
+ RnBugfender.setApiUrl(validatedOptions.apiURL);
64
+ }
65
+
66
+ if (typeof validatedOptions.baseURL !== 'undefined') {
67
+ RnBugfender.setBaseUrl(validatedOptions.baseURL);
68
+ }
69
+
70
+ if (validatedOptions.enableLogcatLogging) {
71
+ RnBugfender.enableLogcatLogging();
72
+ }
73
+
74
+ if (validatedOptions.logUIEvents) {
75
+ RnBugfender.enableUIEventLogging();
76
+ }
77
+
78
+ if (validatedOptions.registerErrorHandler) {
79
+ RnBugfender.enableCrashReporting();
80
+ }
81
+
82
+ if (validatedOptions.overrideConsoleMethods) {
83
+ this.overrideConsoleMethods.init(this.stringFormatter);
84
+ }
85
+
86
+ this.printToConsole.init((_validatedOptions$pri = validatedOptions.printToConsole) !== null && _validatedOptions$pri !== void 0 ? _validatedOptions$pri : true);
87
+ this.initialized = true;
88
+ }
89
+ }
90
+ /**
91
+ * @returns Bugfender dashboard URL for the device
92
+ */
93
+
94
+
95
+ getDeviceURL() {
96
+ return RnBugfender.getDeviceUrl();
97
+ }
98
+ /**
99
+ * @returns Bugfender dashboard URL for the current session
100
+ */
101
+
102
+
103
+ getSessionURL() {
104
+ return RnBugfender.getSessionUrl();
105
+ }
106
+ /**
107
+ * Show a modal which asks for feedback. Once the user closes the modal or sends the feedback
108
+ * the returned promise resolves with the result.
109
+ *
110
+ * ```typescript
111
+ * Bugfender.getUserFeedback().then((result) => {
112
+ * if (result.isSent) {
113
+ * // User sent the feedback
114
+ * // `result.feedbackURL` contains the Bugfender feedback URL
115
+ * } else {
116
+ * // User closed the modal without sending the feedback
117
+ * }
118
+ * });
119
+ * ```
120
+ *
121
+ * @param options Options object to configure modal strings
122
+ * @returns Promise which resolves once the user closes the modal or sends the feedback
123
+ */
124
+
125
+
126
+ async getUserFeedback(options) {
127
+ return new Promise(resolve => {
128
+ var _options;
129
+
130
+ options = { ...new _userFeedback.DefaultUserFeedbackOptions(),
131
+ ...((_options = options) !== null && _options !== void 0 ? _options : {})
132
+ };
133
+ return RnBugfender.showUserFeedback(options.title, options.hint, options.subjectPlaceholder, options.feedbackPlaceholder, options.submitLabel, options.closeLabel).then(value => {
134
+ resolve({
135
+ isSent: true,
136
+ feedbackURL: value
137
+ });
138
+ }, _ => {
139
+ resolve({
140
+ isSent: false
141
+ });
142
+ });
143
+ });
144
+ }
145
+ /**
146
+ * @param obj A JavaScript value to output
147
+ * @param objs List of optional JavaScript values to output
148
+ */
149
+
150
+
151
+ log() {
152
+ for (var _len = arguments.length, parameters = new Array(_len), _key = 0; _key < _len; _key++) {
153
+ parameters[_key] = arguments[_key];
154
+ }
155
+
156
+ this.printToConsole.log(...parameters);
157
+ let message = this.stringFormatter.format([...parameters]);
158
+ RnBugfender.debug('', message);
159
+ }
160
+ /**
161
+ * @param obj A JavaScript value to output
162
+ * @param objs List of optional JavaScript values to output
163
+ */
164
+
165
+
166
+ warn() {
167
+ for (var _len2 = arguments.length, parameters = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
168
+ parameters[_key2] = arguments[_key2];
169
+ }
170
+
171
+ this.printToConsole.warn(...parameters);
172
+ let message = this.stringFormatter.format([...parameters]);
173
+ RnBugfender.warning('', message);
174
+ }
175
+ /**
176
+ * @param obj A JavaScript value to output
177
+ * @param objs List of optional JavaScript values to output
178
+ */
179
+
180
+
181
+ error() {
182
+ for (var _len3 = arguments.length, parameters = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
183
+ parameters[_key3] = arguments[_key3];
184
+ }
185
+
186
+ this.printToConsole.error(...parameters);
187
+ let message = this.stringFormatter.format([...parameters]);
188
+ RnBugfender.error('', message);
189
+ }
190
+ /**
191
+ * @param obj A JavaScript value to output
192
+ * @param objs List of optional JavaScript values to output
193
+ */
194
+
195
+
196
+ trace() {
197
+ for (var _len4 = arguments.length, parameters = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
198
+ parameters[_key4] = arguments[_key4];
199
+ }
200
+
201
+ this.printToConsole.trace(...parameters);
202
+ let message = this.stringFormatter.format([...parameters]);
203
+ RnBugfender.trace('', message);
204
+ }
205
+ /**
206
+ * @param obj A JavaScript value to output
207
+ * @param objs List of optional JavaScript values to output
208
+ */
209
+
210
+
211
+ info() {
212
+ for (var _len5 = arguments.length, parameters = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
213
+ parameters[_key5] = arguments[_key5];
214
+ }
215
+
216
+ this.printToConsole.info(...parameters);
217
+ let message = this.stringFormatter.format([...parameters]);
218
+ RnBugfender.info('', message);
219
+ }
220
+ /**
221
+ * @param obj A JavaScript value to output
222
+ * @param objs List of optional JavaScript values to output
223
+ */
224
+
225
+
226
+ fatal() {
227
+ for (var _len6 = arguments.length, parameters = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
228
+ parameters[_key6] = arguments[_key6];
229
+ }
230
+
231
+ this.printToConsole.error(...parameters);
232
+ let message = this.stringFormatter.format([...parameters]);
233
+ RnBugfender.fatal('', message);
234
+ }
235
+ /**
236
+ * Remove a device associated key-value pair. [Learn more](https://bugfender.com/blog/associated-device-information/).
237
+ *
238
+ * @param key Key identifier
239
+ */
240
+
241
+
242
+ removeDeviceKey(key) {
243
+ RnBugfender.removeDeviceKey(key);
244
+ this.printToConsole.info(`Device key "${key}" removed`);
245
+ }
246
+ /**
247
+ * Use this method if you need more control over the data sent while logging. See `ILogEntry` interface reference to see all the accepted properties.
248
+ *
249
+ * @param log Log object that complies with `ILogEntry` interface.
250
+ */
251
+
252
+
253
+ sendLog(log) {
254
+ var _log$line, _log$method, _log$file, _log$level, _log$tag, _log$text;
255
+
256
+ this.printToConsole.printLog(log);
257
+ 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 : _log.LogLevel.Debug, (_log$tag = log.tag) !== null && _log$tag !== void 0 ? _log$tag : '', (_log$text = log.text) !== null && _log$text !== void 0 ? _log$text : '');
258
+ }
259
+ /**
260
+ * Send an issue.
261
+ *
262
+ * @param title - Title
263
+ * @param text - Text content
264
+ * @returns Bugfender dashboard URL for the issue.
265
+ */
266
+
267
+
268
+ sendIssue(title, text) {
269
+ this.printToConsole.warn(`Issue: ${title}.\n${text}`);
270
+ return RnBugfender.sendIssue(title, text);
271
+ }
272
+ /**
273
+ * Send a crash report.
274
+ *
275
+ * @param title - Title
276
+ * @param text - Text content
277
+ * @returns Bugfender dashboard URL for the crash.
278
+ */
279
+
280
+
281
+ sendCrash(title, text) {
282
+ this.printToConsole.error(`Crash: ${title}.\n${text}`);
283
+ return RnBugfender.sendCrash(title, text);
284
+ }
285
+ /**
286
+ * Send an user feedback.
287
+ *
288
+ * @param title - Title/Subject
289
+ * @param text - Feedback text
290
+ * @returns Bugfender dashboard URL for the feedback.
291
+ */
292
+
293
+
294
+ sendUserFeedback(title, text) {
295
+ this.printToConsole.info(`User Feedback: ${title}.\n${text}`);
296
+ return RnBugfender.sendUserFeedback(title, text);
297
+ }
298
+ /**
299
+ * Set a device associated key-value pair. [Learn more](https://bugfender.com/blog/associated-device-information/).
300
+ *
301
+ * @param key Key identifier.
302
+ * @param value Value.
303
+ */
304
+
305
+
306
+ setDeviceKey(key, value) {
307
+ this.printToConsole.info(`Device key "${key}" set to "${value}"`);
308
+
309
+ if (typeof value === 'boolean') {
310
+ RnBugfender.setDeviceBoolean(key, value);
311
+ } else if (typeof value === 'string') {
312
+ RnBugfender.setDeviceString(key, value);
313
+ } else {
314
+ // typeof value === 'number'
315
+ if (Number.isInteger(value)) {
316
+ RnBugfender.setDeviceInteger(key, value);
317
+ } else {
318
+ RnBugfender.setDeviceFloat(key, value);
319
+ }
320
+ }
321
+ }
322
+ /**
323
+ * Synchronizes all logs and issues with the server once, regardless if this device is enabled or not.
324
+ *
325
+ * Logs and issues are synchronized only once. After that, the logs are again sent according to the enabled flag
326
+ * in the Bugfender Console.
327
+ */
328
+
329
+
330
+ forceSendOnce() {
331
+ this.printToConsole.info(`Force send once`);
332
+ RnBugfender.forceSendOnce();
333
+ }
334
+
335
+ }
336
+
337
+ exports.BugfenderClass = BugfenderClass;
338
+ //# sourceMappingURL=bugfender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["bugfender.ts"],"names":["LINKING_ERROR","Platform","select","ios","default","RnBugfender","NativeModules","Proxy","get","Error","BugfenderClass","StringFormatter","OverrideConsoleMethods","window","PrintToConsole","global","console","SDKOptions","init","options","initialized","validatedOptions","sdkOptions","deviceName","overrideDeviceName","OS","activateLogger","appKey","apiURL","setApiUrl","baseURL","setBaseUrl","enableLogcatLogging","logUIEvents","enableUIEventLogging","registerErrorHandler","enableCrashReporting","overrideConsoleMethods","stringFormatter","printToConsole","getDeviceURL","getDeviceUrl","getSessionURL","getSessionUrl","getUserFeedback","Promise","resolve","DefaultUserFeedbackOptions","showUserFeedback","title","hint","subjectPlaceholder","feedbackPlaceholder","submitLabel","closeLabel","then","value","isSent","feedbackURL","_","log","parameters","message","format","debug","warn","warning","error","trace","info","fatal","removeDeviceKey","key","sendLog","printLog","line","method","file","level","LogLevel","Debug","tag","text","sendIssue","sendCrash","sendUserFeedback","setDeviceKey","setDeviceBoolean","setDeviceString","Number","isInteger","setDeviceInteger","setDeviceFloat","forceSendOnce"],"mappings":";;;;;;;AAAA;;AAGA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,aAAa,GAChB,kFAAD,GACAC,sBAASC,MAAT,CAAgB;AAAEC,EAAAA,GAAG,EAAE,gCAAP;AAAyCC,EAAAA,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,WAAW,GAAGC,2BAAcD,WAAd,GAChBC,2BAAcD,WADE,GAEhB,IAAIE,KAAJ,CACA,EADA,EAEA;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUT,aAAV,CAAN;AACD;;AAHH,CAFA,CAFJ;;;AAWA,MAAMU,cAAN,CAAqB;AAAA;AAAA,6CACO,IAAIC,gCAAJ,EADP;;AAAA,oDAEc,IAAIC,8CAAJ,CAA2BC,MAA3B,CAFd;;AAAA,4CAGM,IAAIC,8BAAJ,CAAmBC,MAAM,CAACC,OAA1B,CAHN;;AAAA,wCAIc,IAAIC,sBAAJ,EAJd;;AAAA,yCAKG,KALH;AAAA;;AAOF,QAAJC,IAAI,CAACC,OAAD,EAAsC;AACrD,QAAI,CAAC,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ACSqC,EAAAA,aAAa,GAAS;AAC3B,SAAKtD,cAAL,CAAoB8B,IAApB,CAA0B,iBAA1B;AACAhE,IAAAA,WAAW,CAACwF,aAAZ;AACD;;AArUkB","sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport type { ISDKOptions } from './types/sdk-options';\nimport type { UserFeedbackOptions, UserFeedbackResult } from './user-feedback';\nimport { DefaultUserFeedbackOptions } from './user-feedback';\nimport type { DeviceKeyValue } from './types/device';\nimport type { ILogEntry } from './types/log';\nimport { StringFormatter } from './string-formatter';\nimport { LogLevel } from \"./types/log\";\nimport { OverrideConsoleMethods } from \"./override-console-methods\";\nimport { PrintToConsole } from \"./print-to-console\";\nimport { SDKOptions } from \"./sdk-options\";\n\nconst LINKING_ERROR =\n `The package '@bugfender/rn-bugfender' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst RnBugfender = NativeModules.RnBugfender\n ? NativeModules.RnBugfender\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nclass BugfenderClass {\n private stringFormatter = new StringFormatter();\n private overrideConsoleMethods = new OverrideConsoleMethods(window);\n private printToConsole = new PrintToConsole(global.console);\n private sdkOptions: SDKOptions = new SDKOptions();\n private initialized = false;\n\n public async init(options: ISDKOptions): Promise<void> {\n if (!this.initialized) {\n const validatedOptions = this.sdkOptions.init(options);\n\n // Needs to be executed prior initialization\n if (typeof options.deviceName !== 'undefined') {\n RnBugfender.overrideDeviceName(options.deviceName);\n }\n\n // Library initialization\n Platform.OS === 'ios'\n ? RnBugfender.activateLogger(validatedOptions.appKey)\n : RnBugfender.init(validatedOptions.appKey, false);\n\n if (typeof validatedOptions.apiURL !== 'undefined') {\n RnBugfender.setApiUrl(validatedOptions.apiURL);\n }\n\n if (typeof validatedOptions.baseURL !== 'undefined') {\n RnBugfender.setBaseUrl(validatedOptions.baseURL);\n }\n\n if (validatedOptions.enableLogcatLogging) {\n RnBugfender.enableLogcatLogging();\n }\n\n if (validatedOptions.logUIEvents) {\n RnBugfender.enableUIEventLogging();\n }\n\n if (validatedOptions.registerErrorHandler) {\n RnBugfender.enableCrashReporting();\n }\n\n if (validatedOptions.overrideConsoleMethods) {\n this.overrideConsoleMethods.init(this.stringFormatter);\n }\n\n this.printToConsole.init(validatedOptions.printToConsole ?? true);\n\n this.initialized = true;\n }\n }\n\n /**\n * @returns Bugfender dashboard URL for the device\n */\n public getDeviceURL(): Promise<string> {\n return RnBugfender.getDeviceUrl();\n }\n\n /**\n * @returns Bugfender dashboard URL for the current session\n */\n public getSessionURL(): Promise<string> {\n return RnBugfender.getSessionUrl();\n }\n\n /**\n * Show a modal which asks for feedback. Once the user closes the modal or sends the feedback\n * the returned promise resolves with the result.\n *\n * ```typescript\n * Bugfender.getUserFeedback().then((result) => {\n * if (result.isSent) {\n * // User sent the feedback\n * // `result.feedbackURL` contains the Bugfender feedback URL\n * } else {\n * // User closed the modal without sending the feedback\n * }\n * });\n * ```\n *\n * @param options Options object to configure modal strings\n * @returns Promise which resolves once the user closes the modal or sends the feedback\n */\n public async getUserFeedback(\n options?: UserFeedbackOptions\n ): Promise<UserFeedbackResult> {\n return new Promise<UserFeedbackResult>((resolve) => {\n options = {\n ...new DefaultUserFeedbackOptions(),\n ...(options ?? {}),\n };\n\n return RnBugfender.showUserFeedback(\n options.title,\n options.hint,\n options.subjectPlaceholder,\n options.feedbackPlaceholder,\n options.submitLabel,\n options.closeLabel\n ).then(\n (value: string) => {\n resolve({\n isSent: true,\n feedbackURL: value,\n });\n },\n (_: any) => {\n resolve({\n isSent: false,\n });\n }\n );\n });\n }\n\n /**\n * @param obj A JavaScript value to output\n * @param objs List of optional JavaScript values to output\n */\n public log(obj: unknown, ...objs: unknown[]): void;\n /**\n * String message with optional substitutions. This mimicks que the `window.console` template messages. [Learn more in MDN](https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions).\n *\n * @param msg Message with optional `%` placeholders\n * @param subst Optional substitutions list\n */\n public log(msg: string, ...subst: unknown[]): void;\n public log(...parameters: unknown[]): void {\n this.printToConsole.log(...parameters);\n\n let message = this.stringFormatter.format([...parameters]);\n RnBugfender.debug('', message);\n }\n\n /**\n * @param obj A JavaScript value to output\n * @param objs List of optional JavaScript values to output\n */\n public warn(obj: unknown, ...objs: unknown[]): void;\n /**\n * String message with optional substitutions. This mimicks que the `window.console` template messages. [Learn more in MDN](https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions).\n *\n * @param msg Message with optional `%` placeholders\n * @param subst Optional substitutions list\n */\n public warn(msg: string, ...subst: unknown[]): void;\n public warn(...parameters: unknown[]): void {\n this.printToConsole.warn(...parameters);\n\n let message = this.stringFormatter.format([...parameters]);\n RnBugfender.warning('', message);\n }\n\n /**\n * @param obj A JavaScript value to output\n * @param objs List of optional JavaScript values to output\n */\n public error(obj: unknown, ...objs: unknown[]): void;\n /**\n * String message with optional substitutions. This mimicks que the `window.console` template messages. [Learn more in MDN](https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions).\n *\n * @param msg Message with optional `%` placeholders\n * @param subst Optional substitutions list\n */\n public error(msg: string, ...subst: unknown[]): void;\n public error(...parameters: unknown[]): void {\n this.printToConsole.error(...parameters);\n\n let message = this.stringFormatter.format([...parameters]);\n RnBugfender.error('', message);\n }\n\n /**\n * @param obj A JavaScript value to output\n * @param objs List of optional JavaScript values to output\n */\n public trace(obj: unknown, ...objs: unknown[]): void;\n /**\n * String message with optional substitutions. This mimicks que the `window.console` template messages. [Learn more in MDN](https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions).\n *\n * @param msg Message with optional `%` placeholders\n * @param subst Optional substitutions list\n */\n public trace(msg: string, ...subst: unknown[]): void;\n public trace(...parameters: unknown[]): void {\n this.printToConsole.trace(...parameters);\n\n let message = this.stringFormatter.format([...parameters]);\n RnBugfender.trace('', message);\n }\n\n /**\n * @param obj A JavaScript value to output\n * @param objs List of optional JavaScript values to output\n */\n public info(obj: unknown, ...objs: unknown[]): void;\n /**\n * String message with optional substitutions. This mimicks que the `window.console` template messages. [Learn more in MDN](https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions).\n *\n * @param msg Message with optional `%` placeholders\n * @param subst Optional substitutions list\n */\n public info(msg: string, ...subst: unknown[]): void;\n public info(...parameters: unknown[]): void {\n this.printToConsole.info(...parameters);\n\n let message = this.stringFormatter.format([...parameters]);\n RnBugfender.info('', message);\n }\n\n /**\n * @param obj A JavaScript value to output\n * @param objs List of optional JavaScript values to output\n */\n public fatal(obj: unknown, ...objs: unknown[]): void;\n /**\n * String message with optional substitutions. This mimicks que the `window.console` template messages. [Learn more in MDN](https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions).\n *\n * @param msg Message with optional `%` placeholders\n * @param subst Optional substitutions list\n */\n public fatal(msg: string, ...subst: unknown[]): void;\n public fatal(...parameters: unknown[]): void {\n this.printToConsole.error(...parameters);\n\n let message = this.stringFormatter.format([...parameters]);\n RnBugfender.fatal('', message);\n }\n\n /**\n * Remove a device associated key-value pair. [Learn more](https://bugfender.com/blog/associated-device-information/).\n *\n * @param key Key identifier\n */\n public removeDeviceKey(key: string): void {\n RnBugfender.removeDeviceKey(key);\n this.printToConsole.info(`Device key \"${key}\" removed`);\n }\n\n /**\n * Use this method if you need more control over the data sent while logging. See `ILogEntry` interface reference to see all the accepted properties.\n *\n * @param log Log object that complies with `ILogEntry` interface.\n */\n public sendLog(log: ILogEntry): void {\n this.printToConsole.printLog(log);\n\n RnBugfender.log(\n log.line ?? 0,\n log.method ?? '',\n log.file ?? '',\n log.level ?? LogLevel.Debug,\n log.tag ?? '',\n log.text ?? ''\n );\n }\n\n /**\n * Send an issue.\n *\n * @param title - Title\n * @param text - Text content\n * @returns Bugfender dashboard URL for the issue.\n */\n public sendIssue(title: string, text: string): Promise<string> {\n this.printToConsole.warn(`Issue: ${title}.\\n${text}`);\n return RnBugfender.sendIssue(title, text);\n }\n\n /**\n * Send a crash report.\n *\n * @param title - Title\n * @param text - Text content\n * @returns Bugfender dashboard URL for the crash.\n */\n public sendCrash(title: string, text: string): Promise<string> {\n this.printToConsole.error(`Crash: ${title}.\\n${text}`);\n return RnBugfender.sendCrash(title, text);\n }\n\n /**\n * Send an user feedback.\n *\n * @param title - Title/Subject\n * @param text - Feedback text\n * @returns Bugfender dashboard URL for the feedback.\n */\n public sendUserFeedback(title: string, text: string): Promise<string> {\n this.printToConsole.info(`User Feedback: ${title}.\\n${text}`);\n return RnBugfender.sendUserFeedback(title, text);\n }\n\n /**\n * Set a device associated key-value pair. [Learn more](https://bugfender.com/blog/associated-device-information/).\n *\n * @param key Key identifier.\n * @param value Value.\n */\n public setDeviceKey(key: string, value: DeviceKeyValue): void {\n this.printToConsole.info(`Device key \"${key}\" set to \"${value}\"`);\n\n if (typeof value === 'boolean') {\n RnBugfender.setDeviceBoolean(key, value);\n } else if (typeof value === 'string') {\n RnBugfender.setDeviceString(key, value);\n } else {\n // typeof value === 'number'\n if (Number.isInteger(value)) {\n RnBugfender.setDeviceInteger(key, value);\n } else {\n RnBugfender.setDeviceFloat(key, value);\n }\n }\n }\n\n /**\n * Synchronizes all logs and issues with the server once, regardless if this device is enabled or not.\n *\n * Logs and issues are synchronized only once. After that, the logs are again sent according to the enabled flag\n * in the Bugfender Console.\n */\n public forceSendOnce(): void {\n this.printToConsole.info(`Force send once`);\n RnBugfender.forceSendOnce();\n }\n}\n\nexport {\n BugfenderClass, RnBugfender\n}\n"]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Bugfender = void 0;
7
+ Object.defineProperty(exports, "LogLevel", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _log.LogLevel;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, "SDKOptionsBuilder", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _sdkOptions.SDKOptionsBuilder;
17
+ }
18
+ });
19
+
20
+ var _log = require("./types/log");
21
+
22
+ var _sdkOptions = require("./types/sdk-options");
23
+
24
+ var _bugfender = require("./bugfender");
25
+
26
+ const Bugfender = new _bugfender.BugfenderClass();
27
+ exports.Bugfender = Bugfender;
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.tsx"],"names":["Bugfender","BugfenderClass"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA,MAAMA,SAAS,GAAG,IAAIC,yBAAJ,EAAlB","sourcesContent":["import { LogLevel } from './types/log';\nimport { SDKOptionsBuilder } from './types/sdk-options';\nimport { BugfenderClass } from './bugfender';\n\nconst Bugfender = new BugfenderClass();\n\nexport { Bugfender, LogLevel, SDKOptionsBuilder };\n"]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Bugfender", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _sdk.Bugfender;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "LogLevel", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _log.LogLevel;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "SDKOptionsBuilder", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _sdkOptions.SDKOptionsBuilder;
22
+ }
23
+ });
24
+
25
+ var _log = require("./types/log");
26
+
27
+ var _sdkOptions = require("./types/sdk-options");
28
+
29
+ var _sdk = require("@bugfender/sdk");
30
+ //# sourceMappingURL=index.web.js.map