@testernest/react-native 0.1.1

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 (139) hide show
  1. package/README.md +108 -0
  2. package/android/build/.transforms/8ce4b91dc8d15c015a4e81859b96eec6/results.bin +1 -0
  3. package/android/build/.transforms/8ce4b91dc8d15c015a4e81859b96eec6/transformed/classes/classes.dex +0 -0
  4. package/android/build/generated/source/buildConfig/debug/com/testernest/reactnative/BuildConfig.java +10 -0
  5. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +7 -0
  6. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
  7. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +5 -0
  8. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
  9. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  10. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  11. package/android/build/intermediates/compile_symbol_list/debug/R.txt +1986 -0
  12. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  13. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  14. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  15. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  16. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  17. package/android/build/intermediates/javac/debug/classes/com/testernest/reactnative/BuildConfig.class +0 -0
  18. package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
  19. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +2 -0
  20. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +8 -0
  21. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +7 -0
  22. package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
  23. package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +18 -0
  24. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  25. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +1479 -0
  26. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  27. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  28. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  29. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  30. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  31. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  32. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  33. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  34. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  35. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  36. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  37. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  58. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  59. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  60. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  61. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
  62. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  120. package/android/build/outputs/logs/manifest-merger-debug-report.txt +25 -0
  121. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  122. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-testernest_debug.kotlin_module +0 -0
  123. package/android/build/tmp/kotlin-classes/debug/com/testernest/reactnative/TesternestModule$Companion.class +0 -0
  124. package/android/build/tmp/kotlin-classes/debug/com/testernest/reactnative/TesternestModule$logClaimResultAsync$poll$1.class +0 -0
  125. package/android/build/tmp/kotlin-classes/debug/com/testernest/reactnative/TesternestModule$redactTokens$1.class +0 -0
  126. package/android/build/tmp/kotlin-classes/debug/com/testernest/reactnative/TesternestModule$redactTokens$2.class +0 -0
  127. package/android/build/tmp/kotlin-classes/debug/com/testernest/reactnative/TesternestModule.class +0 -0
  128. package/android/build/tmp/kotlin-classes/debug/com/testernest/reactnative/TesternestPackage.class +0 -0
  129. package/android/build.gradle +34 -0
  130. package/android/consumer-rules.pro +1 -0
  131. package/android/gradle.properties +3 -0
  132. package/android/src/main/AndroidManifest.xml +2 -0
  133. package/android/src/main/java/com/testernest/reactnative/TesternestModule.kt +221 -0
  134. package/android/src/main/java/com/testernest/reactnative/TesternestPackage.kt +16 -0
  135. package/package.json +30 -0
  136. package/react-native.config.js +9 -0
  137. package/src/index.ts +2 -0
  138. package/src/native.ts +69 -0
  139. package/src/testernestConnectPrompt.tsx +173 -0
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # @testernest/react-native
2
+
3
+ React Native bridge for the Testernest Android SDK.
4
+
5
+ Only 6-digit connect is supported (no claim token).
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ yarn add @testernest/react-native
11
+ ```
12
+
13
+ ## Windows quick test
14
+
15
+ 1) From `react-native-testernest/`, run `RN_TEST_RUNBOOK.cmd`.
16
+ 2) When it prompts, enter the 6-digit code in the app and wait for log capture to finish.
17
+ 3) Run `RN_TEST_VERIFY.cmd` to check for BOOTSTRAP/BATCH/CLAIM 200 in `_evidence/rn_logcat_live.txt`.
18
+
19
+ ### Android setup (Maven Central)
20
+
21
+ 1) Ensure `google()` + `mavenCentral()` are in your Android repositories (project or settings).
22
+ 2) Install the package and rebuild the app.
23
+
24
+ Verify (Windows CMD):
25
+
26
+ ```bat
27
+ adb logcat -v time | findstr /i "TesternestRN Testernest BOOTSTRAP BATCH CLAIM HTTP AndroidRuntime ReactNativeJS"
28
+ ```
29
+
30
+ ## Android Quickstart (RN)
31
+
32
+ 1) Set your public key in `react-native-testernest/example/src/App.js` (`PUBLIC_KEY`).
33
+ 2) Run `RN_TEST_RUNBOOK.cmd` from the repo root.
34
+ 3) On the phone, tap "Init SDK", then tap "Show Connect Prompt" (if it does not auto-show).
35
+ 4) Enter the 6-digit code in the prompt and watch logcat for BOOTSTRAP/BATCH/CLAIM lines.
36
+
37
+ Windows CMD logcat filter:
38
+
39
+ ```bat
40
+ adb logcat -v time | findstr /i "TesternestRN Testernest BOOTSTRAP BATCH CLAIM HTTP AndroidRuntime ReactNativeJS"
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ```ts
46
+ import {
47
+ init,
48
+ track,
49
+ flush,
50
+ setCurrentScreen,
51
+ connectTester,
52
+ disconnectTester,
53
+ getDebugSnapshot,
54
+ TesternestConnectPrompt,
55
+ } from '@testernest/react-native';
56
+
57
+ await init({
58
+ publicKey: 'YOUR_PUBLIC_KEY',
59
+ baseUrl: 'https://myappcrew-tw.pages.dev',
60
+ enableLogs: true,
61
+ });
62
+
63
+ track('signup_start', { plan: 'pro' });
64
+ setCurrentScreen('Checkout');
65
+ await connectTester('123456');
66
+ await flush();
67
+ const snapshot = await getDebugSnapshot();
68
+ await disconnectTester();
69
+ ```
70
+
71
+ Auto connect prompt (1-line integration):
72
+
73
+ ```tsx
74
+ <TesternestConnectPrompt
75
+ publicKey="YOUR_PUBLIC_KEY"
76
+ baseUrl="https://myappcrew-tw.pages.dev"
77
+ />
78
+ ```
79
+
80
+ ## Troubleshooting
81
+
82
+ - White screen: run `RN_TEST_RUNBOOK.cmd`, ensure Metro is running, and check `AndroidRuntime`/`ReactNativeJS` in logcat.
83
+ - Unable to connect: verify `baseUrl`/`publicKey` match the dashboard app, regenerate the 6-digit code, and retry.
84
+
85
+ ## API
86
+
87
+ - `init({ publicKey, baseUrl?, enableLogs? }): Promise<void>`
88
+ - `track(name: string, properties?: Record<string, any>): void`
89
+ - `flush(): Promise<void>`
90
+ - `setCurrentScreen(screen: string | null): void`
91
+ - `connectTester(code6: string): Promise<void>`
92
+ - `disconnectTester(): Promise<void>`
93
+ - `getDebugSnapshot(): Promise<Record<string, any>>`
94
+ - `isConnected(): Promise<boolean>`
95
+ - `TesternestConnectPrompt`
96
+
97
+ ## Build
98
+
99
+ ```sh
100
+ cd android
101
+ ./gradlew assembleRelease
102
+ ```
103
+
104
+ ## Publish checklist
105
+
106
+ 1) `npm login`
107
+ 2) `npm publish --access public`
108
+ 3) `git tag vX.Y.Z`
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Automatically generated file. DO NOT MODIFY
3
+ */
4
+ package com.testernest.reactnative;
5
+
6
+ public final class BuildConfig {
7
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
8
+ public static final String LIBRARY_PACKAGE_NAME = "com.testernest.reactnative";
9
+ public static final String BUILD_TYPE = "debug";
10
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.testernest.reactnative" >
4
+
5
+ <uses-sdk android:minSdkVersion="21" />
6
+
7
+ </manifest>
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "com.testernest.reactnative",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "outputFile": "AndroidManifest.xml"
15
+ }
16
+ ],
17
+ "elementType": "File"
18
+ }
@@ -0,0 +1,5 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0