@datadog/mobile-react-native-webview 2.4.3 → 2.5.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 (86) hide show
  1. package/DatadogSDKReactNativeWebView.podspec +46 -0
  2. package/android/build.gradle +249 -0
  3. package/android/detekt.yml +572 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +11 -0
  6. package/android/src/newarch/com/datadog/reactnative/webview/DdSdkReactNativeWebViewPackage.kt +35 -0
  7. package/android/src/oldarch/com/datadog/reactnative/webview/DdSdkReactNativeWebViewManager.kt +112 -0
  8. package/android/src/oldarch/com/datadog/reactnative/webview/DdSdkReactNativeWebViewPackage.kt +36 -0
  9. package/android/src/test/kotlin/com/datadog/reactnative/tools/unit/GenericAssert.kt +18 -0
  10. package/android/src/test/kotlin/com/datadog/reactnative/webview/DatadogWebViewTest.kt +126 -0
  11. package/android/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +1 -0
  12. package/ios/DatadogSDKReactNativeWebView.xcodeproj/project.pbxproj +272 -0
  13. package/ios/DatadogSDKReactNativeWebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  14. package/ios/Sources/DatadogSDKReactNativeWebView.h +12 -0
  15. package/ios/Sources/RCTDatadogWebView.h +21 -0
  16. package/ios/Sources/RCTDatadogWebView.mm +53 -0
  17. package/ios/Sources/RCTDatadogWebViewManager.h +10 -0
  18. package/ios/Sources/RCTDatadogWebViewManager.mm +84 -0
  19. package/ios/Sources/RCTDatadogWebViewTracking.swift +67 -0
  20. package/lib/commonjs/ext-specs/NativeDdLogs.js +19 -0
  21. package/lib/commonjs/ext-specs/NativeDdLogs.js.map +1 -0
  22. package/lib/commonjs/ext-specs/NativeDdSdk.js.map +1 -0
  23. package/lib/commonjs/index.js +40 -7
  24. package/lib/commonjs/index.js.map +1 -1
  25. package/lib/commonjs/specs/NativeDdWebView.js +16 -0
  26. package/lib/commonjs/specs/NativeDdWebView.js.map +1 -0
  27. package/lib/commonjs/utils/env-utils.js +17 -0
  28. package/lib/commonjs/utils/env-utils.js.map +1 -0
  29. package/lib/commonjs/utils/webview-js-utils.js +124 -0
  30. package/lib/commonjs/utils/webview-js-utils.js.map +1 -0
  31. package/lib/module/ext-specs/NativeDdLogs.js +17 -0
  32. package/lib/module/ext-specs/NativeDdLogs.js.map +1 -0
  33. package/lib/module/ext-specs/NativeDdSdk.js.map +1 -0
  34. package/lib/module/index.js +39 -7
  35. package/lib/module/index.js.map +1 -1
  36. package/lib/module/specs/NativeDdWebView.js +11 -0
  37. package/lib/module/specs/NativeDdWebView.js.map +1 -0
  38. package/lib/module/utils/env-utils.js +10 -0
  39. package/lib/module/utils/env-utils.js.map +1 -0
  40. package/lib/module/utils/webview-js-utils.js +115 -0
  41. package/lib/module/utils/webview-js-utils.js.map +1 -0
  42. package/lib/typescript/ext-specs/NativeDdLogs.d.ts +16 -0
  43. package/lib/typescript/ext-specs/NativeDdLogs.d.ts.map +1 -0
  44. package/lib/typescript/ext-specs/NativeDdSdk.d.ts.map +1 -0
  45. package/lib/typescript/index.d.ts +20 -0
  46. package/lib/typescript/index.d.ts.map +1 -1
  47. package/lib/typescript/specs/NativeDdWebView.d.ts +4 -0
  48. package/lib/typescript/specs/NativeDdWebView.d.ts.map +1 -0
  49. package/lib/typescript/utils/env-utils.d.ts +2 -0
  50. package/lib/typescript/utils/env-utils.d.ts.map +1 -0
  51. package/lib/typescript/utils/webview-js-utils.d.ts +34 -0
  52. package/lib/typescript/utils/webview-js-utils.d.ts.map +1 -0
  53. package/package.json +22 -4
  54. package/src/__tests__/WebviewDatadog.test.tsx +39 -43
  55. package/src/__tests__/WebviewDatadogInjectedJS.test.tsx +200 -1
  56. package/src/__tests__/WebviewDatadogPerformance.test.tsx +12 -0
  57. package/src/__tests__/__utils__/string-utils.ts +13 -0
  58. package/src/__tests__/webview-js-utils.test.ts +51 -0
  59. package/src/ext-specs/NativeDdLogs.ts +25 -0
  60. package/src/{NativeDdSdk.ts → ext-specs/NativeDdSdk.ts} +1 -0
  61. package/src/index.tsx +70 -13
  62. package/src/specs/NativeDdWebView.ts +16 -0
  63. package/src/utils/env-utils.ts +9 -0
  64. package/src/utils/webview-js-utils.ts +150 -0
  65. package/lib/commonjs/NativeDdSdk.js.map +0 -1
  66. package/lib/commonjs/__utils__/formatAllowedHosts.js +0 -65
  67. package/lib/commonjs/__utils__/formatAllowedHosts.js.map +0 -1
  68. package/lib/commonjs/__utils__/getInjectedJavaScriptBeforeContentLoaded.js +0 -32
  69. package/lib/commonjs/__utils__/getInjectedJavaScriptBeforeContentLoaded.js.map +0 -1
  70. package/lib/module/NativeDdSdk.js.map +0 -1
  71. package/lib/module/__utils__/formatAllowedHosts.js +0 -58
  72. package/lib/module/__utils__/formatAllowedHosts.js.map +0 -1
  73. package/lib/module/__utils__/getInjectedJavaScriptBeforeContentLoaded.js +0 -24
  74. package/lib/module/__utils__/getInjectedJavaScriptBeforeContentLoaded.js.map +0 -1
  75. package/lib/typescript/NativeDdSdk.d.ts.map +0 -1
  76. package/lib/typescript/__utils__/formatAllowedHosts.d.ts +0 -2
  77. package/lib/typescript/__utils__/formatAllowedHosts.d.ts.map +0 -1
  78. package/lib/typescript/__utils__/getInjectedJavaScriptBeforeContentLoaded.d.ts +0 -3
  79. package/lib/typescript/__utils__/getInjectedJavaScriptBeforeContentLoaded.d.ts.map +0 -1
  80. package/src/__tests__/formatAllowedHosts.test.ts +0 -40
  81. package/src/__tests__/getInjectedJavaScriptBeforeContentLoaded.test.ts +0 -86
  82. package/src/__utils__/formatAllowedHosts.ts +0 -70
  83. package/src/__utils__/getInjectedJavaScriptBeforeContentLoaded.ts +0 -29
  84. /package/lib/commonjs/{NativeDdSdk.js → ext-specs/NativeDdSdk.js} +0 -0
  85. /package/lib/module/{NativeDdSdk.js → ext-specs/NativeDdSdk.js} +0 -0
  86. /package/lib/typescript/{NativeDdSdk.d.ts → ext-specs/NativeDdSdk.d.ts} +0 -0
@@ -0,0 +1,572 @@
1
+ build:
2
+ maxIssues: 0
3
+ weights:
4
+ # complexity: 2
5
+ # LongParameterList: 1
6
+ # style: 1
7
+ # comments: 1
8
+
9
+ processors:
10
+ active: true
11
+ exclude:
12
+ # - 'DetektProgressListener'
13
+ # - 'FunctionCountProcessor'
14
+ # - 'PropertyCountProcessor'
15
+ # - 'ClassCountProcessor'
16
+ # - 'PackageCountProcessor'
17
+ # - 'KtFileCountProcessor'
18
+
19
+ console-reports:
20
+ active: true
21
+ exclude:
22
+ # - 'ProjectStatisticsReport'
23
+ # - 'ComplexityReport'
24
+ # - 'NotificationReport'
25
+ # - 'FindingsReport'
26
+ - 'FileBasedFindingsReport'
27
+ # - 'BuildFailureReport'
28
+
29
+ comments:
30
+ active: true
31
+ CommentOverPrivateFunction:
32
+ active: true
33
+ CommentOverPrivateProperty:
34
+ active: true
35
+ EndOfSentenceFormat:
36
+ active: true
37
+ endOfSentenceFormat: ([.?!][ \t\n\r\f<])|([.?!:]$)
38
+ UndocumentedPublicClass:
39
+ active: true
40
+ excludes: [ "**/test/**","**/androidTest/**","**/*.Test.kt","**/*.Spec.kt","**/*.Spek.kt" ]
41
+ searchInNestedClass: true
42
+ searchInInnerClass: true
43
+ searchInInnerObject: true
44
+ searchInInnerInterface: true
45
+ UndocumentedPublicFunction:
46
+ active: true
47
+ excludes: [ "**/test/**","**/androidTest/**","**/*.Test.kt","**/*.Spec.kt","**/*.Spek.kt" ]
48
+ UndocumentedPublicProperty:
49
+ active: true
50
+ excludes: [ "**/test/**","**/androidTest/**","**/*.Test.kt","**/*.Spec.kt","**/*.Spek.kt" ]
51
+
52
+ complexity:
53
+ active: true
54
+ ComplexCondition:
55
+ active: true
56
+ threshold: 4
57
+ ComplexInterface:
58
+ active: true
59
+ threshold: 10
60
+ includeStaticDeclarations: false
61
+ ComplexMethod:
62
+ active: true
63
+ threshold: 10
64
+ ignoreSingleWhenExpression: true
65
+ ignoreSimpleWhenEntries: true
66
+ LabeledExpression:
67
+ active: true
68
+ ignoredLabels: ""
69
+ LargeClass:
70
+ active: true
71
+ threshold: 600
72
+ LongMethod:
73
+ active: true
74
+ threshold: 60
75
+ LongParameterList:
76
+ active: true
77
+ threshold: 6
78
+ ignoreDefaultParameters: true
79
+ MethodOverloading:
80
+ active: true
81
+ threshold: 6
82
+ NestedBlockDepth:
83
+ active: true
84
+ threshold: 4
85
+ StringLiteralDuplication:
86
+ active: true
87
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
88
+ threshold: 3
89
+ ignoreAnnotation: true
90
+ excludeStringsWithLessThan5Characters: true
91
+ ignoreStringsRegex: '$^'
92
+ TooManyFunctions:
93
+ active: true
94
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
95
+ thresholdInFiles: 11
96
+ thresholdInClasses: 11
97
+ thresholdInInterfaces: 11
98
+ thresholdInObjects: 11
99
+ thresholdInEnums: 11
100
+ ignoreDeprecated: true
101
+ ignorePrivate: true
102
+ ignoreOverridden: true
103
+
104
+ empty-blocks:
105
+ active: true
106
+ EmptyCatchBlock:
107
+ active: true
108
+ allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
109
+ EmptyClassBlock:
110
+ active: true
111
+ EmptyDefaultConstructor:
112
+ active: true
113
+ EmptyDoWhileBlock:
114
+ active: true
115
+ EmptyElseBlock:
116
+ active: true
117
+ EmptyFinallyBlock:
118
+ active: true
119
+ EmptyForBlock:
120
+ active: true
121
+ EmptyFunctionBlock:
122
+ active: true
123
+ ignoreOverridden: true
124
+ EmptyIfBlock:
125
+ active: true
126
+ EmptyInitBlock:
127
+ active: true
128
+ EmptyKtFile:
129
+ active: true
130
+ EmptySecondaryConstructor:
131
+ active: true
132
+ EmptyWhenBlock:
133
+ active: true
134
+ EmptyWhileBlock:
135
+ active: true
136
+
137
+ exceptions:
138
+ active: true
139
+ ExceptionRaisedInUnexpectedLocation:
140
+ active: true
141
+ methodNames: 'toString,hashCode,equals,finalize'
142
+ InstanceOfCheckForException:
143
+ active: true
144
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
145
+ NotImplementedDeclaration:
146
+ active: true
147
+ PrintStackTrace:
148
+ active: true
149
+ RethrowCaughtException:
150
+ active: true
151
+ ReturnFromFinally:
152
+ active: true
153
+ ignoreLabeled: true
154
+ SwallowedException:
155
+ active: true
156
+ ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException'
157
+ allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
158
+ ThrowingExceptionFromFinally:
159
+ active: true
160
+ ThrowingExceptionInMain:
161
+ active: true
162
+ ThrowingExceptionsWithoutMessageOrCause:
163
+ active: true
164
+ exceptions: 'IllegalArgumentException,IllegalStateException,IOException'
165
+ ThrowingNewInstanceOfSameException:
166
+ active: true
167
+ TooGenericExceptionCaught:
168
+ active: true
169
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
170
+ exceptionNames:
171
+ - ArrayIndexOutOfBoundsException
172
+ - Error
173
+ - Exception
174
+ - IllegalMonitorStateException
175
+ - NullPointerException
176
+ - IndexOutOfBoundsException
177
+ - RuntimeException
178
+ - Throwable
179
+ allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
180
+ TooGenericExceptionThrown:
181
+ active: true
182
+ exceptionNames:
183
+ - Error
184
+ - Exception
185
+ - Throwable
186
+ - RuntimeException
187
+
188
+ formatting:
189
+ active: false
190
+ android: false
191
+ autoCorrect: true
192
+ AnnotationOnSeparateLine:
193
+ active: true
194
+ autoCorrect: true
195
+ ChainWrapping:
196
+ active: true
197
+ autoCorrect: true
198
+ CommentSpacing:
199
+ active: true
200
+ autoCorrect: true
201
+ Filename:
202
+ active: true
203
+ FinalNewline:
204
+ active: true
205
+ autoCorrect: true
206
+ ImportOrdering:
207
+ active: true
208
+ autoCorrect: true
209
+ Indentation:
210
+ active: true
211
+ autoCorrect: true
212
+ indentSize: 4
213
+ continuationIndentSize: 4
214
+ MaximumLineLength:
215
+ active: true
216
+ maxLineLength: 120
217
+ ModifierOrdering:
218
+ active: true
219
+ autoCorrect: true
220
+ MultiLineIfElse:
221
+ active: true
222
+ autoCorrect: true
223
+ NoBlankLineBeforeRbrace:
224
+ active: true
225
+ autoCorrect: true
226
+ NoConsecutiveBlankLines:
227
+ active: true
228
+ autoCorrect: true
229
+ NoEmptyClassBody:
230
+ active: true
231
+ autoCorrect: true
232
+ NoLineBreakAfterElse:
233
+ active: true
234
+ autoCorrect: true
235
+ NoLineBreakBeforeAssignment:
236
+ active: true
237
+ autoCorrect: true
238
+ NoMultipleSpaces:
239
+ active: true
240
+ autoCorrect: true
241
+ NoSemicolons:
242
+ active: true
243
+ autoCorrect: true
244
+ NoTrailingSpaces:
245
+ active: true
246
+ autoCorrect: true
247
+ NoUnitReturn:
248
+ active: true
249
+ autoCorrect: true
250
+ NoUnusedImports:
251
+ active: true
252
+ autoCorrect: true
253
+ NoWildcardImports:
254
+ active: true
255
+ autoCorrect: true
256
+ PackageName:
257
+ active: true
258
+ autoCorrect: true
259
+ ParameterListWrapping:
260
+ active: true
261
+ autoCorrect: true
262
+ indentSize: 4
263
+ SpacingAroundColon:
264
+ active: true
265
+ autoCorrect: true
266
+ SpacingAroundComma:
267
+ active: true
268
+ autoCorrect: true
269
+ SpacingAroundCurly:
270
+ active: true
271
+ autoCorrect: true
272
+ SpacingAroundDot:
273
+ active: true
274
+ autoCorrect: true
275
+ SpacingAroundKeyword:
276
+ active: true
277
+ autoCorrect: true
278
+ SpacingAroundOperators:
279
+ active: true
280
+ autoCorrect: true
281
+ SpacingAroundParens:
282
+ active: true
283
+ autoCorrect: true
284
+ SpacingAroundRangeOperator:
285
+ active: true
286
+ autoCorrect: true
287
+ StringTemplate:
288
+ active: true
289
+ autoCorrect: true
290
+
291
+ naming:
292
+ active: true
293
+ ClassNaming:
294
+ active: true
295
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
296
+ classPattern: '[A-Z$][a-zA-Z0-9$]*'
297
+ ConstructorParameterNaming:
298
+ active: true
299
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
300
+ parameterPattern: '[a-z][A-Za-z0-9]*'
301
+ privateParameterPattern: '[a-z][A-Za-z0-9]*'
302
+ excludeClassPattern: '$^'
303
+ EnumNaming:
304
+ active: true
305
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
306
+ enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
307
+ ForbiddenClassName:
308
+ active: true
309
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
310
+ forbiddenName: ''
311
+ FunctionMaxLength:
312
+ active: true
313
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
314
+ maximumFunctionNameLength: 30
315
+ FunctionMinLength:
316
+ active: true
317
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
318
+ minimumFunctionNameLength: 3
319
+ FunctionNaming:
320
+ active: true
321
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
322
+ functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
323
+ excludeClassPattern: '$^'
324
+ ignoreOverridden: true
325
+ FunctionParameterNaming:
326
+ active: true
327
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
328
+ parameterPattern: '[a-z][A-Za-z0-9]*'
329
+ excludeClassPattern: '$^'
330
+ ignoreOverridden: true
331
+ InvalidPackageDeclaration:
332
+ active: true
333
+ rootPackage: ''
334
+ MatchingDeclarationName:
335
+ active: true
336
+ MemberNameEqualsClassName:
337
+ active: true
338
+ ignoreOverridden: true
339
+ ObjectPropertyNaming:
340
+ active: true
341
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
342
+ constantPattern: '[A-Za-z][_A-Za-z0-9]*'
343
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
344
+ privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
345
+ PackageNaming:
346
+ active: true
347
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
348
+ packagePattern: '^[a-z]+(\.[a-z][A-Za-z0-9]*)*$'
349
+ TopLevelPropertyNaming:
350
+ active: true
351
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
352
+ constantPattern: '[A-Z][_A-Z0-9]*'
353
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
354
+ privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
355
+ VariableMaxLength:
356
+ active: true
357
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
358
+ maximumVariableNameLength: 64
359
+ VariableMinLength:
360
+ active: true
361
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
362
+ minimumVariableNameLength: 1
363
+ VariableNaming:
364
+ active: true
365
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
366
+ variablePattern: '[a-z][A-Za-z0-9]*'
367
+ privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
368
+ excludeClassPattern: '$^'
369
+ ignoreOverridden: true
370
+
371
+ performance:
372
+ active: true
373
+ ArrayPrimitive:
374
+ active: true
375
+ ForEachOnRange:
376
+ active: true
377
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
378
+ SpreadOperator:
379
+ active: true
380
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
381
+ UnnecessaryTemporaryInstantiation:
382
+ active: true
383
+
384
+ potential-bugs:
385
+ active: true
386
+ Deprecation:
387
+ active: true
388
+ DuplicateCaseInWhenExpression:
389
+ active: true
390
+ EqualsAlwaysReturnsTrueOrFalse:
391
+ active: true
392
+ EqualsWithHashCodeExist:
393
+ active: true
394
+ ExplicitGarbageCollectionCall:
395
+ active: true
396
+ HasPlatformType:
397
+ active: true
398
+ InvalidRange:
399
+ active: true
400
+ IteratorHasNextCallsNextMethod:
401
+ active: true
402
+ IteratorNotThrowingNoSuchElementException:
403
+ active: true
404
+ LateinitUsage:
405
+ active: false
406
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
407
+ excludeAnnotatedProperties: ""
408
+ ignoreOnClassesPattern: ""
409
+ MissingWhenCase:
410
+ active: true
411
+ RedundantElseInWhen:
412
+ active: true
413
+ UnconditionalJumpStatementInLoop:
414
+ active: true
415
+ UnreachableCode:
416
+ active: true
417
+ UnsafeCallOnNullableType:
418
+ active: true
419
+ UnsafeCast:
420
+ active: true
421
+ UselessPostfixExpression:
422
+ active: true
423
+ WrongEqualsTypeParameter:
424
+ active: true
425
+
426
+ style:
427
+ active: false
428
+ CollapsibleIfStatements:
429
+ active: true
430
+ DataClassContainsFunctions:
431
+ active: true
432
+ conversionFunctionPrefix: 'to'
433
+ DataClassShouldBeImmutable:
434
+ active: true
435
+ EqualsNullCall:
436
+ active: true
437
+ EqualsOnSignatureLine:
438
+ active: true
439
+ ExplicitItLambdaParameter:
440
+ active: true
441
+ ExpressionBodySyntax:
442
+ active: false
443
+ includeLineWrapping: false
444
+ ForbiddenComment:
445
+ active: true
446
+ values: 'TODO:,FIXME:,STOPSHIP:'
447
+ allowedPatterns: ""
448
+ ForbiddenImport:
449
+ active: true
450
+ imports: ''
451
+ forbiddenPatterns: ""
452
+ ForbiddenVoid:
453
+ active: true
454
+ ignoreOverridden: false
455
+ ignoreUsageInGenerics: true
456
+ FunctionOnlyReturningConstant:
457
+ active: true
458
+ ignoreOverridableFunction: true
459
+ excludedFunctions: 'describeContents'
460
+ excludeAnnotatedFunction: "dagger.Provides"
461
+ LibraryCodeMustSpecifyReturnType:
462
+ active: true
463
+ LoopWithTooManyJumpStatements:
464
+ active: true
465
+ maxJumpCount: 1
466
+ MagicNumber:
467
+ active: true
468
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
469
+ ignoreNumbers: '-1,0,1,2'
470
+ ignoreHashCodeFunction: true
471
+ ignorePropertyDeclaration: false
472
+ ignoreConstantDeclaration: true
473
+ ignoreCompanionObjectPropertyDeclaration: true
474
+ ignoreAnnotation: false
475
+ ignoreNamedArgument: true
476
+ ignoreEnums: false
477
+ ignoreRanges: false
478
+ MandatoryBracesIfStatements:
479
+ active: true
480
+ MaxLineLength:
481
+ active: true
482
+ maxLineLength: 120
483
+ excludePackageStatements: true
484
+ excludeImportStatements: true
485
+ excludeCommentStatements: false
486
+ MayBeConst:
487
+ active: true
488
+ ModifierOrder:
489
+ active: true
490
+ NestedClassesVisibility:
491
+ active: true
492
+ NewLineAtEndOfFile:
493
+ active: false
494
+ NoTabs:
495
+ active: true
496
+ OptionalAbstractKeyword:
497
+ active: true
498
+ OptionalUnit:
499
+ active: true
500
+ OptionalWhenBraces:
501
+ active: true
502
+ PreferToOverPairSyntax:
503
+ active: true
504
+ ProtectedMemberInFinalClass:
505
+ active: true
506
+ RedundantExplicitType:
507
+ active: true
508
+ RedundantVisibilityModifierRule:
509
+ active: true
510
+ ReturnCount:
511
+ active: true
512
+ max: 2
513
+ excludedFunctions: "equals"
514
+ excludeLabeled: false
515
+ excludeReturnFromLambda: true
516
+ excludeGuardClauses: true
517
+ SafeCast:
518
+ active: true
519
+ SerialVersionUIDInSerializableClass:
520
+ active: true
521
+ SpacingBetweenPackageAndImports:
522
+ active: true
523
+ ThrowsCount:
524
+ active: true
525
+ max: 2
526
+ TrailingWhitespace:
527
+ active: true
528
+ UnderscoresInNumericLiterals:
529
+ active: true
530
+ acceptableDecimalLength: 5
531
+ UnnecessaryAbstractClass:
532
+ active: true
533
+ excludeAnnotatedClasses: "dagger.Module"
534
+ UnnecessaryApply:
535
+ active: true
536
+ UnnecessaryInheritance:
537
+ active: true
538
+ UnnecessaryLet:
539
+ active: true
540
+ UnnecessaryParentheses:
541
+ active: true
542
+ UntilInsteadOfRangeTo:
543
+ active: true
544
+ UnusedImports:
545
+ active: true
546
+ UnusedPrivateClass:
547
+ active: true
548
+ UnusedPrivateMember:
549
+ active: true
550
+ allowedNames: "(_|ignored|expected|serialVersionUID)"
551
+ UseArrayLiteralsInAnnotations:
552
+ active: true
553
+ UseCheckOrError:
554
+ active: true
555
+ UseDataClass:
556
+ active: true
557
+ excludeAnnotatedClasses: ""
558
+ allowVars: true
559
+ UseIfInsteadOfWhen:
560
+ active: true
561
+ UseRequire:
562
+ active: true
563
+ UselessCallOnNotNull:
564
+ active: true
565
+ UtilityClassWithPublicConstructor:
566
+ active: true
567
+ VarCouldBeVal:
568
+ active: true
569
+ WildcardImport:
570
+ active: true
571
+ excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
572
+ excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
@@ -0,0 +1,5 @@
1
+ DatadogSDKReactNativeWebView_kotlinVersion=1.7.21
2
+ DatadogSDKReactNativeWebView_compileSdkVersion=33
3
+ DatadogSDKReactNativeWebView_buildToolsVersion=33.0.0
4
+ DatadogSDKReactNativeWebView_targetSdkVersion=33
5
+ android.useAndroidX=true
@@ -0,0 +1,11 @@
1
+ <!--
2
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
4
+ Copyright 2016-Present Datadog, Inc.
5
+ -->
6
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
7
+ package="com.datadog.reactnative.webview">
8
+
9
+ <uses-permission android:name="android.permission.INTERNET"/>
10
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
11
+ </manifest>
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
+ * Copyright 2016-Present Datadog, Inc.
5
+ */
6
+
7
+ package com.datadog.reactnative.webview
8
+
9
+ import com.facebook.react.TurboReactPackage
10
+ import com.facebook.react.bridge.NativeModule
11
+ import com.facebook.react.bridge.ReactApplicationContext
12
+ import com.facebook.react.module.model.ReactModuleInfo
13
+ import com.facebook.react.module.model.ReactModuleInfoProvider
14
+ import com.facebook.react.uimanager.ViewManager
15
+ import com.reactnativecommunity.webview.RNCWebViewManager
16
+
17
+ class DdSdkReactNativeWebViewPackage : TurboReactPackage() {
18
+ override fun createViewManagers(
19
+ reactContext: ReactApplicationContext
20
+ ): MutableList<ViewManager<*,*>> {
21
+ return mutableListOf(
22
+ RNCWebViewManager()
23
+ )
24
+ }
25
+
26
+ override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
27
+ return null
28
+ }
29
+
30
+ override fun getReactModuleInfoProvider(): ReactModuleInfoProvider {
31
+ return ReactModuleInfoProvider {
32
+ mapOf<String, ReactModuleInfo>()
33
+ }
34
+ }
35
+ }