com.cprot.ead 1.0.6788 → 1.0.7207
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.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/cproteadmodule/CProtEadModuleModule.kt +169 -104
- package/android/src/main/java/com/cproteadmodule/ConstHelper.kt +6 -6
- package/android/src/main/java/com/cproteadmodule/UninstallHandler.kt +42 -42
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +0 -2
- package/lib/module/index.js.map +1 -1
- package/package.json +191 -191
- package/lib/commonjs/package.json +0 -1
- package/lib/module/package.json +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/module/package.json +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -3
- package/lib/typescript/module/src/index.d.ts.map +0 -1
package/android/build.gradle
CHANGED
|
@@ -25,6 +25,9 @@ import java.util.ArrayList
|
|
|
25
25
|
import java.util.Date
|
|
26
26
|
import java.util.Locale
|
|
27
27
|
import java.lang.StringBuilder
|
|
28
|
+
import com.cprot.ead.models.CloneApp
|
|
29
|
+
import com.cprot.ead.models.CallType
|
|
30
|
+
import com.facebook.react.bridge.Promise
|
|
28
31
|
|
|
29
32
|
class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
30
33
|
ReactContextBaseJavaModule(reactContext), ICProtEvent {
|
|
@@ -65,7 +68,6 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
|
|
69
71
|
@ReactMethod
|
|
70
72
|
fun handleIncomingCallWithBaseApp(value : Boolean) {
|
|
71
73
|
val currentActivity = reactApplicationContext.currentActivity
|
|
@@ -175,11 +177,15 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
175
177
|
it.stopRealtime()
|
|
176
178
|
}
|
|
177
179
|
}
|
|
180
|
+
|
|
178
181
|
@ReactMethod
|
|
179
|
-
fun isDeviceProtectionEnabled(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
fun isDeviceProtectionEnabled(promise: Promise) {
|
|
183
|
+
try {
|
|
184
|
+
val result = module?.isDeviceProtectionEnabled() ?: false
|
|
185
|
+
promise.resolve(result)
|
|
186
|
+
} catch (e: Exception) {
|
|
187
|
+
promise.reject("IS_DEVICE_PROTECTION_ENABLED_ERROR", "Failed to check device protection", e)
|
|
188
|
+
}
|
|
183
189
|
}
|
|
184
190
|
|
|
185
191
|
@ReactMethod
|
|
@@ -189,118 +195,172 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
189
195
|
}
|
|
190
196
|
}
|
|
191
197
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
@ReactMethod
|
|
199
|
+
fun getSslCertHash(promise: Promise) {
|
|
200
|
+
try {
|
|
201
|
+
val result = module?.getSslCertHash() ?: ""
|
|
202
|
+
promise.resolve(result)
|
|
203
|
+
} catch (e: Exception) {
|
|
204
|
+
promise.reject("GET_SSL_CERT_HASH_ERROR", "Failed to get SSL cert hash", e)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
198
207
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
208
|
+
@ReactMethod
|
|
209
|
+
fun getDeviceFingerprint(promise: Promise) {
|
|
210
|
+
try {
|
|
211
|
+
val result = module?.getDeviceFingerprint() ?: ""
|
|
212
|
+
promise.resolve(result)
|
|
213
|
+
} catch (e: Exception) {
|
|
214
|
+
promise.reject("GET_DEVICE_FINGERPRINT_ERROR", "Failed to get device fingerprint", e)
|
|
215
|
+
}
|
|
216
|
+
}
|
|
205
217
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
218
|
+
@ReactMethod
|
|
219
|
+
fun isRunInEmulator(promise: Promise) {
|
|
220
|
+
try {
|
|
221
|
+
val result = module?.isRunInEmulator() ?: false
|
|
222
|
+
promise.resolve(result)
|
|
223
|
+
} catch (e: Exception) {
|
|
224
|
+
promise.reject("IS_RUN_IN_EMULATOR_ERROR", "Failed to detect emulator", e)
|
|
225
|
+
}
|
|
226
|
+
}
|
|
212
227
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
228
|
+
@ReactMethod
|
|
229
|
+
fun isRootedDevice(promise: Promise) {
|
|
230
|
+
try {
|
|
231
|
+
val result = module?.isRootedDevice() ?: false
|
|
232
|
+
promise.resolve(result)
|
|
233
|
+
} catch (e: Exception) {
|
|
234
|
+
promise.reject("IS_ROOTED_DEVICE_ERROR", "Failed to detect rooted device", e)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
219
237
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
238
|
+
@ReactMethod
|
|
239
|
+
fun isFingerprintChanged(promise: Promise) {
|
|
240
|
+
try {
|
|
241
|
+
val result = module?.isFingerprintChanged() ?: false
|
|
242
|
+
promise.resolve(result)
|
|
243
|
+
} catch (e: Exception) {
|
|
244
|
+
promise.reject("IS_FINGERPRINT_CHANGED_ERROR", "Failed to detect fingerprint change", e)
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@ReactMethod
|
|
249
|
+
fun getSignatures(promise: Promise) {
|
|
250
|
+
try {
|
|
251
|
+
val result = module?.let {
|
|
252
|
+
ArrayList(it.getSignatures(reactApplicationContext).toList())
|
|
253
|
+
} ?: ArrayList()
|
|
254
|
+
promise.resolve(result)
|
|
255
|
+
} catch (e: Exception) {
|
|
256
|
+
promise.reject("GET_SIGNATURES_ERROR", "Failed to get signatures", e)
|
|
257
|
+
}
|
|
258
|
+
}
|
|
226
259
|
|
|
227
260
|
@ReactMethod
|
|
228
|
-
fun
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
} ?: ArrayList()
|
|
237
|
-
}
|
|
261
|
+
fun getStringCurrentCallStatus(promise: Promise) {
|
|
262
|
+
try {
|
|
263
|
+
val value = module?.getCurrentCallStatus()?.getStringValue() ?: ""
|
|
264
|
+
promise.resolve(value)
|
|
265
|
+
} catch (e: Exception) {
|
|
266
|
+
promise.resolve("")
|
|
267
|
+
}
|
|
268
|
+
}
|
|
238
269
|
|
|
239
270
|
@ReactMethod
|
|
240
|
-
fun
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
it.
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
}
|
|
271
|
+
fun getIntCurrentCallStatus(promise: Promise) {
|
|
272
|
+
try {
|
|
273
|
+
val status = module?.let {
|
|
274
|
+
it.getCurrentCallStatus().getIntValue()
|
|
275
|
+
} ?: 0
|
|
276
|
+
promise.resolve(status)
|
|
277
|
+
} catch (e: Exception) {
|
|
278
|
+
promise.reject("GET_CALL_STATUS_ERROR", "Failed to get current call status", e)
|
|
279
|
+
}
|
|
280
|
+
}
|
|
250
281
|
|
|
251
282
|
@ReactMethod
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
sb.append("\"isEmulationDetected\":").append(securityCheck.isEmulationDetected()).append(",")
|
|
261
|
-
sb.append("\"emulationDetectionDescription\":").append("\"").append(securityCheck.getEmulationDetectionDescription()).append("\"").append(",")
|
|
262
|
-
sb.append("\"isRootDetected\":").append(securityCheck.isRootDetected()).append(",")
|
|
263
|
-
sb.append("\"rootDetectionDescription\":").append("\"").append(securityCheck.getRootDetectionDescription()).append("\"").append(",")
|
|
264
|
-
//sb.append("\"isIntegrityBroken\":").append(securityCheck.isIntegrityBroken()).append(",")
|
|
265
|
-
sb.append("\"isFingerprintChanged\":").append(securityCheck.isFingerprintChanged()).append(",")
|
|
266
|
-
sb.append("\"isScreenReaderAppsDetected\":").append(securityCheck.isScreenReaderAppsDetected()).append(",")
|
|
267
|
-
sb.append("\"isOverlayedAppsDetected\":").append(securityCheck.isOverlayedAppsDetected()).append(",")
|
|
268
|
-
sb.append("\"isDevModeEnabled\":").append(securityCheck.isDevModeEnabled()).append(",")
|
|
269
|
-
sb.append("\"factoryResetTime\":").append(securityCheck.getFactoryResetTime() ?: "null").append(",")
|
|
270
|
-
sb.append("\"isVpnActive\":").append(securityCheck.getIsVpnActive()).append(",")
|
|
271
|
-
sb.append("\"isDefaultSmsAppChanged\":").append(securityCheck.isDefaultSmsAppChanged()).append(",")
|
|
272
|
-
sb.append("\"isSimChanged\":").append(securityCheck.isSimChanged()).append(",")
|
|
273
|
-
sb.append("\"isProxyActive\":").append(securityCheck.isProxyActive()).append(",")
|
|
274
|
-
sb.append("\"isMockLocation\":").append(securityCheck.isMockLocation()).append(",")
|
|
275
|
-
//sb.append("\"isKeyloggerDetected\":").append(securityCheck.isKeyloggerDetected()).append(",")
|
|
276
|
-
sb.append("\"isVirtualTouch\":").append(securityCheck.isVirtualTouch()).append(",")
|
|
277
|
-
sb.append("\"isCallForwardActive\":").append(securityCheck.isCallForwardActive())
|
|
278
|
-
sb.append("}")
|
|
279
|
-
|
|
280
|
-
val jsonString = sb.toString()
|
|
281
|
-
sendLogEvent(jsonString)
|
|
282
|
-
jsonString
|
|
283
|
-
} ?: run {
|
|
284
|
-
sendLogEvent("Security check module is null")
|
|
285
|
-
null
|
|
283
|
+
fun getDexCRC(promise: Promise) {
|
|
284
|
+
try {
|
|
285
|
+
val result = module?.getDexCRC(reactApplicationContext) ?: -1L
|
|
286
|
+
promise.resolve(result)
|
|
287
|
+
} catch (e: Exception) {
|
|
288
|
+
e.printStackTrace()
|
|
289
|
+
promise.reject("GET_DEX_CRC_ERROR", "Failed to get Dex CRC", e)
|
|
290
|
+
}
|
|
286
291
|
}
|
|
287
|
-
}
|
|
288
292
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
293
|
+
@ReactMethod
|
|
294
|
+
fun getSecurityFeatureChecks(promise: Promise) {
|
|
295
|
+
try {
|
|
296
|
+
val securityCheck = module?.getSecurityFeatureChecks()
|
|
297
|
+
if (securityCheck != null) {
|
|
298
|
+
val sb = StringBuilder()
|
|
299
|
+
sb.append("{")
|
|
300
|
+
sb.append("\"isMalwareDetected\":").append(securityCheck.isMalwareDetected()).append(",")
|
|
301
|
+
sb.append("\"isDebuggerDetected\":").append(securityCheck.isDebuggerDetected()).append(",")
|
|
302
|
+
sb.append("\"isEmulationDetected\":").append(securityCheck.isEmulationDetected()).append(",")
|
|
303
|
+
sb.append("\"emulationDetectionDescription\":\"").append(securityCheck.getEmulationDetectionDescription()).append("\",")
|
|
304
|
+
sb.append("\"isRootDetected\":").append(securityCheck.isRootDetected()).append(",")
|
|
305
|
+
sb.append("\"rootDetectionDescription\":\"").append(securityCheck.getRootDetectionDescription()).append("\",")
|
|
306
|
+
sb.append("\"isIntegrityBroken\":").append(securityCheck.isIntegrityBroken()).append(",")
|
|
307
|
+
sb.append("\"isFingerprintChanged\":").append(securityCheck.isFingerprintChanged()).append(",")
|
|
308
|
+
sb.append("\"isScreenReaderAppsDetected\":").append(securityCheck.isScreenReaderAppsDetected()).append(",")
|
|
309
|
+
sb.append("\"isOverlayedAppsDetected\":").append(securityCheck.isOverlayedAppsDetected()).append(",")
|
|
310
|
+
sb.append("\"isDevModeEnabled\":").append(securityCheck.isDevModeEnabled()).append(",")
|
|
311
|
+
sb.append("\"factoryResetTime\":").append(securityCheck.getFactoryResetTime() ?: "null").append(",")
|
|
312
|
+
sb.append("\"isVpnActive\":").append(securityCheck.getIsVpnActive()).append(",")
|
|
313
|
+
sb.append("\"isDefaultSmsAppChanged\":").append(securityCheck.isDefaultSmsAppChanged()).append(",")
|
|
314
|
+
sb.append("\"isSimChanged\":").append(securityCheck.isSimChanged()).append(",")
|
|
315
|
+
sb.append("\"isProxyActive\":").append(securityCheck.isProxyActive()).append(",")
|
|
316
|
+
sb.append("\"isMockLocation\":").append(securityCheck.isMockLocation()).append(",")
|
|
317
|
+
sb.append("\"isKeyloggerDetected\":").append(securityCheck.isKeyloggerDetected()).append(",")
|
|
318
|
+
sb.append("\"isVirtualTouch\":").append(securityCheck.isVirtualTouch()).append(",")
|
|
319
|
+
sb.append("\"isCallForwardActive\":").append(securityCheck.isCallForwardActive()).append(",")
|
|
320
|
+
sb.append("\"isUsbConnected\":").append(securityCheck.isUsbConnected()).append(",")
|
|
321
|
+
sb.append("\"isSuspiciousWifi\":").append(securityCheck.isPotentialEvilTwin()).append(",")
|
|
322
|
+
sb.append("\"isKeyboardAppChanged\":").append(securityCheck.isKeyboardAppChanged())
|
|
323
|
+
sb.append("}")
|
|
324
|
+
|
|
325
|
+
val jsonString = sb.toString()
|
|
326
|
+
promise.resolve(jsonString)
|
|
327
|
+
} else {
|
|
328
|
+
sendLogEvent("Security check module is null")
|
|
329
|
+
promise.resolve(null)
|
|
330
|
+
}
|
|
331
|
+
} catch (e: Exception) {
|
|
332
|
+
e.printStackTrace()
|
|
333
|
+
promise.reject("GET_SECURITY_FEATURE_CHECKS_ERROR", "Failed to get security feature checks", e)
|
|
334
|
+
}
|
|
335
|
+
}
|
|
297
336
|
|
|
298
337
|
@ReactMethod
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
338
|
+
fun getLastScanTime(promise: Promise) {
|
|
339
|
+
try {
|
|
340
|
+
val lastScanTime = module?.getLastScanTime()
|
|
341
|
+
val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
|
|
342
|
+
val formattedDate = lastScanTime?.let { dateFormat.format(it) } ?: ""
|
|
343
|
+
promise.resolve(formattedDate)
|
|
344
|
+
} catch (e: Exception) {
|
|
345
|
+
e.printStackTrace()
|
|
346
|
+
promise.reject("GET_LAST_SCAN_TIME_ERROR", "Failed to get last scan time", e)
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
@ReactMethod
|
|
351
|
+
fun getUpdateStatus(promise: Promise) {
|
|
352
|
+
try {
|
|
353
|
+
val updateStatus = module?.getUpdateStatus()
|
|
354
|
+
if (updateStatus != null) {
|
|
355
|
+
promise.resolve(updateStatus.name) // Enum ise ismini string olarak gönder
|
|
356
|
+
} else {
|
|
357
|
+
promise.resolve(null)
|
|
358
|
+
}
|
|
359
|
+
} catch (e: Exception) {
|
|
360
|
+
e.printStackTrace()
|
|
361
|
+
promise.reject("GET_UPDATE_STATUS_ERROR", "Failed to get update status", e)
|
|
362
|
+
}
|
|
363
|
+
}
|
|
304
364
|
|
|
305
365
|
//Send log message when ovveride functions worked.
|
|
306
366
|
private fun sendLogEvent(message: String) {
|
|
@@ -408,7 +468,7 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
408
468
|
if (incomingNumber != null) {
|
|
409
469
|
isSpam = incomingNumber.isSpam
|
|
410
470
|
}
|
|
411
|
-
|
|
471
|
+
|
|
412
472
|
sendLogEvent("Incoming Call detected: $phoneNumber -> Is Spam: $isSpam")
|
|
413
473
|
}
|
|
414
474
|
|
|
@@ -455,4 +515,9 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
455
515
|
sendLogEvent("Application uninstall detected: $s")
|
|
456
516
|
}
|
|
457
517
|
|
|
518
|
+
override fun onCloneAppDetected(cloneApps: ArrayList<CloneApp>) {
|
|
519
|
+
for (item in cloneApps) {
|
|
520
|
+
sendLogEvent("Clone app detected: $item")
|
|
521
|
+
}
|
|
522
|
+
}
|
|
458
523
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
package com.cproteadmodule
|
|
2
|
-
|
|
3
|
-
import java.util.ArrayList
|
|
4
|
-
|
|
5
|
-
object ConstHelper {
|
|
6
|
-
var DetectedThreats: ArrayList<String> = ArrayList<String>()
|
|
1
|
+
package com.cproteadmodule
|
|
2
|
+
|
|
3
|
+
import java.util.ArrayList
|
|
4
|
+
|
|
5
|
+
object ConstHelper {
|
|
6
|
+
var DetectedThreats: ArrayList<String> = ArrayList<String>()
|
|
7
7
|
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
package com.cproteadmodule
|
|
2
|
-
|
|
3
|
-
import android.app.AlertDialog
|
|
4
|
-
import android.content.Context
|
|
5
|
-
import android.content.Intent
|
|
6
|
-
import com.cprot.ead.helpers.StringHelper
|
|
7
|
-
import java.io.File
|
|
8
|
-
|
|
9
|
-
class UninstallHandler(
|
|
10
|
-
private val context: Context,
|
|
11
|
-
private val installedAppName: String? = "",
|
|
12
|
-
private val installedAppPackageName: String? = "",
|
|
13
|
-
private val installedAppVersion: String? = "",
|
|
14
|
-
private val threatName: String? = ""
|
|
15
|
-
) {
|
|
16
|
-
|
|
17
|
-
fun showDialog() {
|
|
18
|
-
val packageName = installedAppPackageName ?: return
|
|
19
|
-
|
|
20
|
-
val dialog = AlertDialog.Builder(context)
|
|
21
|
-
.setTitle("Uninstall App")
|
|
22
|
-
.setMessage("App Name: $installedAppName\nThreat Name: $threatName")
|
|
23
|
-
.setPositiveButton("Uninstall") { dialog, _ ->
|
|
24
|
-
removeFromList()
|
|
25
|
-
val intent = Intent(Intent.ACTION_DELETE)
|
|
26
|
-
intent.data = android.net.Uri.parse("package:$packageName")
|
|
27
|
-
context.startActivity(intent)
|
|
28
|
-
dialog.dismiss()
|
|
29
|
-
}
|
|
30
|
-
.setNegativeButton("Cancel") { dialog, _ ->
|
|
31
|
-
dialog.dismiss()
|
|
32
|
-
}
|
|
33
|
-
.create()
|
|
34
|
-
dialog.show()
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
private fun removeFromList() {
|
|
38
|
-
val packageName = installedAppPackageName ?: return
|
|
39
|
-
ConstHelper.DetectedThreats?.let { threats ->
|
|
40
|
-
threats.removeAll { it.equals(packageName, ignoreCase = true) }
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
package com.cproteadmodule
|
|
2
|
+
|
|
3
|
+
import android.app.AlertDialog
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import android.content.Intent
|
|
6
|
+
import com.cprot.ead.helpers.StringHelper
|
|
7
|
+
import java.io.File
|
|
8
|
+
|
|
9
|
+
class UninstallHandler(
|
|
10
|
+
private val context: Context,
|
|
11
|
+
private val installedAppName: String? = "",
|
|
12
|
+
private val installedAppPackageName: String? = "",
|
|
13
|
+
private val installedAppVersion: String? = "",
|
|
14
|
+
private val threatName: String? = ""
|
|
15
|
+
) {
|
|
16
|
+
|
|
17
|
+
fun showDialog() {
|
|
18
|
+
val packageName = installedAppPackageName ?: return
|
|
19
|
+
|
|
20
|
+
val dialog = AlertDialog.Builder(context)
|
|
21
|
+
.setTitle("Uninstall App")
|
|
22
|
+
.setMessage("App Name: $installedAppName\nThreat Name: $threatName")
|
|
23
|
+
.setPositiveButton("Uninstall") { dialog, _ ->
|
|
24
|
+
removeFromList()
|
|
25
|
+
val intent = Intent(Intent.ACTION_DELETE)
|
|
26
|
+
intent.data = android.net.Uri.parse("package:$packageName")
|
|
27
|
+
context.startActivity(intent)
|
|
28
|
+
dialog.dismiss()
|
|
29
|
+
}
|
|
30
|
+
.setNegativeButton("Cancel") { dialog, _ ->
|
|
31
|
+
dialog.dismiss()
|
|
32
|
+
}
|
|
33
|
+
.create()
|
|
34
|
+
dialog.show()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private fun removeFromList() {
|
|
38
|
+
val packageName = installedAppPackageName ?: return
|
|
39
|
+
ConstHelper.DetectedThreats?.let { threats ->
|
|
40
|
+
threats.removeAll { it.equals(packageName, ignoreCase = true) }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","CProtEadModule","NativeModules","Proxy","get","Error","_default","exports"],"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","CProtEadModule","NativeModules","Proxy","get","Error","_default","exports"],"sources":["index.tsx"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'c-prot-ead-module' 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 Go\\n';\n\nconst CProtEadModule = NativeModules.CProtEadModule\n ? NativeModules.CProtEadModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n// Export the module directly\nexport default CProtEadModule;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,aAAa,GACjB,4EAA4E,GAC5EC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,cAAc,GAAGC,0BAAa,CAACD,cAAc,GAC/CC,0BAAa,CAACD,cAAc,GAC5B,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;;AAEL;AAAA,IAAAU,QAAA,GAAAC,OAAA,CAAAP,OAAA,GACeC,cAAc","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","CProtEadModule","Proxy","get","Error"],"
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","CProtEadModule","Proxy","get","Error"],"sources":["index.tsx"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'c-prot-ead-module' 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 Go\\n';\n\nconst CProtEadModule = NativeModules.CProtEadModule\n ? NativeModules.CProtEadModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n// Export the module directly\nexport default CProtEadModule;\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GACjB,4EAA4E,GAC5ED,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,cAAc,GAAGN,aAAa,CAACM,cAAc,GAC/CN,aAAa,CAACM,cAAc,GAC5B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;;AAEL;AACA,eAAeI,cAAc","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "com.cprot.ead",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "c-prot ead android module",
|
|
5
|
-
"source": "./src/index.tsx",
|
|
6
|
-
"main": "lib/commonjs/index.js",
|
|
7
|
-
"module": "lib/module/index.js",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": {
|
|
11
|
-
"types": "./lib/typescript/module/src/index.d.ts",
|
|
12
|
-
"default": "./lib/module/index.js"
|
|
13
|
-
},
|
|
14
|
-
"require": {
|
|
15
|
-
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
16
|
-
"default": "./lib/commonjs/index.js"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"src",
|
|
22
|
-
"lib",
|
|
23
|
-
"!**/__tests__",
|
|
24
|
-
"!**/__fixtures__",
|
|
25
|
-
"!**/__mocks__",
|
|
26
|
-
"android",
|
|
27
|
-
"!ios/build",
|
|
28
|
-
"!android/build",
|
|
29
|
-
"!android/gradle",
|
|
30
|
-
"!android/gradlew",
|
|
31
|
-
"!android/gradlew.bat",
|
|
32
|
-
"!android/local.properties",
|
|
33
|
-
"!**/.*"
|
|
34
|
-
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"example": "yarn workspace c-prot-ead-module-example",
|
|
37
|
-
"test": "jest",
|
|
38
|
-
"typecheck": "tsc",
|
|
39
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
41
|
-
"prepare": "bob build",
|
|
42
|
-
"release": "release-it"
|
|
43
|
-
},
|
|
44
|
-
"keywords": [
|
|
45
|
-
"react-native",
|
|
46
|
-
"android"
|
|
47
|
-
],
|
|
48
|
-
"author": "C-Prot",
|
|
49
|
-
"license": "MIT",
|
|
50
|
-
"bugs": {
|
|
51
|
-
"url": "https://www.npmjs.com/issues"
|
|
52
|
-
},
|
|
53
|
-
"homepage": "https://www.npmjs.com#readme",
|
|
54
|
-
"publishConfig": {
|
|
55
|
-
"registry": "https://registry.npmjs.org/"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@commitlint/config-conventional": "^17.0.2",
|
|
59
|
-
"@evilmartians/lefthook": "^1.5.0",
|
|
60
|
-
"@react-native-community/bob": "^0.17.1",
|
|
61
|
-
"@react-native/eslint-config": "0.74.0",
|
|
62
|
-
"@release-it/conventional-changelog": "^5.0.0",
|
|
63
|
-
"@types/jest": "^29.5.5",
|
|
64
|
-
"@types/react": "^18.2.6",
|
|
65
|
-
"commitlint": "^17.0.2",
|
|
66
|
-
"del-cli": "^5.1.0",
|
|
67
|
-
"eslint": "^8.51.0",
|
|
68
|
-
"eslint-config-prettier": "^9.0.0",
|
|
69
|
-
"eslint-plugin-prettier": "^5.0.1",
|
|
70
|
-
"jest": "^29.7.0",
|
|
71
|
-
"prettier": "^3.0.3",
|
|
72
|
-
"react": "18.2.0",
|
|
73
|
-
"react-native": "0.74.5",
|
|
74
|
-
"react-native-builder-bob": "^0.30.0",
|
|
75
|
-
"release-it": "^15.0.0",
|
|
76
|
-
"turbo": "^1.10.7",
|
|
77
|
-
"typescript": "^5.7.2"
|
|
78
|
-
},
|
|
79
|
-
"resolutions": {
|
|
80
|
-
"@types/react": "^18.2.44"
|
|
81
|
-
},
|
|
82
|
-
"peerDependencies": {
|
|
83
|
-
"react": "*",
|
|
84
|
-
"react-native": "*"
|
|
85
|
-
},
|
|
86
|
-
"workspaces": [
|
|
87
|
-
"example"
|
|
88
|
-
],
|
|
89
|
-
"packageManager": "yarn@3.6.1",
|
|
90
|
-
"jest": {
|
|
91
|
-
"preset": "react-native",
|
|
92
|
-
"modulePathIgnorePatterns": [
|
|
93
|
-
"<rootDir>/example/node_modules",
|
|
94
|
-
"<rootDir>/lib/"
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
"commitlint": {
|
|
98
|
-
"extends": [
|
|
99
|
-
"@commitlint/config-conventional"
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
"release-it": {
|
|
103
|
-
"git": {
|
|
104
|
-
"commitMessage": "chore: release ${version}",
|
|
105
|
-
"tagName": "v${version}"
|
|
106
|
-
},
|
|
107
|
-
"npm": {
|
|
108
|
-
"publish": true
|
|
109
|
-
},
|
|
110
|
-
"github": {
|
|
111
|
-
"release": true
|
|
112
|
-
},
|
|
113
|
-
"plugins": {
|
|
114
|
-
"@release-it/conventional-changelog": {
|
|
115
|
-
"preset": "angular"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"eslintConfig": {
|
|
120
|
-
"root": true,
|
|
121
|
-
"extends": [
|
|
122
|
-
"@react-native",
|
|
123
|
-
"prettier"
|
|
124
|
-
],
|
|
125
|
-
"rules": {
|
|
126
|
-
"react/react-in-jsx-scope": "off",
|
|
127
|
-
"prettier/prettier": [
|
|
128
|
-
"error",
|
|
129
|
-
{
|
|
130
|
-
"quoteProps": "consistent",
|
|
131
|
-
"singleQuote": true,
|
|
132
|
-
"tabWidth": 2,
|
|
133
|
-
"trailingComma": "es5",
|
|
134
|
-
"useTabs": false
|
|
135
|
-
}
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"eslintIgnore": [
|
|
140
|
-
"node_modules/",
|
|
141
|
-
"lib/"
|
|
142
|
-
],
|
|
143
|
-
"prettier": {
|
|
144
|
-
"quoteProps": "consistent",
|
|
145
|
-
"singleQuote": true,
|
|
146
|
-
"tabWidth": 2,
|
|
147
|
-
"trailingComma": "es5",
|
|
148
|
-
"useTabs": false
|
|
149
|
-
},
|
|
150
|
-
"react-native-builder-bob": {
|
|
151
|
-
"source": "src",
|
|
152
|
-
"output": "lib",
|
|
153
|
-
"targets": [
|
|
154
|
-
[
|
|
155
|
-
"commonjs",
|
|
156
|
-
{
|
|
157
|
-
"esm": true
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
[
|
|
161
|
-
"module",
|
|
162
|
-
{
|
|
163
|
-
"esm": true
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
[
|
|
167
|
-
"typescript",
|
|
168
|
-
{
|
|
169
|
-
"project": "tsconfig.build.json",
|
|
170
|
-
"esm": true
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
"create-react-native-library": {
|
|
176
|
-
"type": "module-legacy",
|
|
177
|
-
"languages": "kotlin-objc",
|
|
178
|
-
"version": "0.41.0"
|
|
179
|
-
},
|
|
180
|
-
"react-native": "src/index.tsx",
|
|
181
|
-
"types": "lib/typescript/commonjs/src/index.d.ts",
|
|
182
|
-
"@react-native-community/bob": {
|
|
183
|
-
"source": "src",
|
|
184
|
-
"output": "lib",
|
|
185
|
-
"targets": [
|
|
186
|
-
"commonjs",
|
|
187
|
-
"module",
|
|
188
|
-
"typescript"
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "com.cprot.ead",
|
|
3
|
+
"version": "1.0.7207",
|
|
4
|
+
"description": "c-prot ead android module",
|
|
5
|
+
"source": "./src/index.tsx",
|
|
6
|
+
"main": "lib/commonjs/index.js",
|
|
7
|
+
"module": "lib/module/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./lib/typescript/module/src/index.d.ts",
|
|
12
|
+
"default": "./lib/module/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
16
|
+
"default": "./lib/commonjs/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"src",
|
|
22
|
+
"lib",
|
|
23
|
+
"!**/__tests__",
|
|
24
|
+
"!**/__fixtures__",
|
|
25
|
+
"!**/__mocks__",
|
|
26
|
+
"android",
|
|
27
|
+
"!ios/build",
|
|
28
|
+
"!android/build",
|
|
29
|
+
"!android/gradle",
|
|
30
|
+
"!android/gradlew",
|
|
31
|
+
"!android/gradlew.bat",
|
|
32
|
+
"!android/local.properties",
|
|
33
|
+
"!**/.*"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"example": "yarn workspace c-prot-ead-module-example",
|
|
37
|
+
"test": "jest",
|
|
38
|
+
"typecheck": "tsc",
|
|
39
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
41
|
+
"prepare": "bob build",
|
|
42
|
+
"release": "release-it"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"react-native",
|
|
46
|
+
"android"
|
|
47
|
+
],
|
|
48
|
+
"author": "C-Prot",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://www.npmjs.com/issues"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://www.npmjs.com#readme",
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"registry": "https://registry.npmjs.org/"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@commitlint/config-conventional": "^17.0.2",
|
|
59
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
60
|
+
"@react-native-community/bob": "^0.17.1",
|
|
61
|
+
"@react-native/eslint-config": "0.74.0",
|
|
62
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
63
|
+
"@types/jest": "^29.5.5",
|
|
64
|
+
"@types/react": "^18.2.6",
|
|
65
|
+
"commitlint": "^17.0.2",
|
|
66
|
+
"del-cli": "^5.1.0",
|
|
67
|
+
"eslint": "^8.51.0",
|
|
68
|
+
"eslint-config-prettier": "^9.0.0",
|
|
69
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
70
|
+
"jest": "^29.7.0",
|
|
71
|
+
"prettier": "^3.0.3",
|
|
72
|
+
"react": "18.2.0",
|
|
73
|
+
"react-native": "0.74.5",
|
|
74
|
+
"react-native-builder-bob": "^0.30.0",
|
|
75
|
+
"release-it": "^15.0.0",
|
|
76
|
+
"turbo": "^1.10.7",
|
|
77
|
+
"typescript": "^5.7.2"
|
|
78
|
+
},
|
|
79
|
+
"resolutions": {
|
|
80
|
+
"@types/react": "^18.2.44"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"react": "*",
|
|
84
|
+
"react-native": "*"
|
|
85
|
+
},
|
|
86
|
+
"workspaces": [
|
|
87
|
+
"example"
|
|
88
|
+
],
|
|
89
|
+
"packageManager": "yarn@3.6.1",
|
|
90
|
+
"jest": {
|
|
91
|
+
"preset": "react-native",
|
|
92
|
+
"modulePathIgnorePatterns": [
|
|
93
|
+
"<rootDir>/example/node_modules",
|
|
94
|
+
"<rootDir>/lib/"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"commitlint": {
|
|
98
|
+
"extends": [
|
|
99
|
+
"@commitlint/config-conventional"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"release-it": {
|
|
103
|
+
"git": {
|
|
104
|
+
"commitMessage": "chore: release ${version}",
|
|
105
|
+
"tagName": "v${version}"
|
|
106
|
+
},
|
|
107
|
+
"npm": {
|
|
108
|
+
"publish": true
|
|
109
|
+
},
|
|
110
|
+
"github": {
|
|
111
|
+
"release": true
|
|
112
|
+
},
|
|
113
|
+
"plugins": {
|
|
114
|
+
"@release-it/conventional-changelog": {
|
|
115
|
+
"preset": "angular"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"eslintConfig": {
|
|
120
|
+
"root": true,
|
|
121
|
+
"extends": [
|
|
122
|
+
"@react-native",
|
|
123
|
+
"prettier"
|
|
124
|
+
],
|
|
125
|
+
"rules": {
|
|
126
|
+
"react/react-in-jsx-scope": "off",
|
|
127
|
+
"prettier/prettier": [
|
|
128
|
+
"error",
|
|
129
|
+
{
|
|
130
|
+
"quoteProps": "consistent",
|
|
131
|
+
"singleQuote": true,
|
|
132
|
+
"tabWidth": 2,
|
|
133
|
+
"trailingComma": "es5",
|
|
134
|
+
"useTabs": false
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"eslintIgnore": [
|
|
140
|
+
"node_modules/",
|
|
141
|
+
"lib/"
|
|
142
|
+
],
|
|
143
|
+
"prettier": {
|
|
144
|
+
"quoteProps": "consistent",
|
|
145
|
+
"singleQuote": true,
|
|
146
|
+
"tabWidth": 2,
|
|
147
|
+
"trailingComma": "es5",
|
|
148
|
+
"useTabs": false
|
|
149
|
+
},
|
|
150
|
+
"react-native-builder-bob": {
|
|
151
|
+
"source": "src",
|
|
152
|
+
"output": "lib",
|
|
153
|
+
"targets": [
|
|
154
|
+
[
|
|
155
|
+
"commonjs",
|
|
156
|
+
{
|
|
157
|
+
"esm": true
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
"module",
|
|
162
|
+
{
|
|
163
|
+
"esm": true
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
[
|
|
167
|
+
"typescript",
|
|
168
|
+
{
|
|
169
|
+
"project": "tsconfig.build.json",
|
|
170
|
+
"esm": true
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"create-react-native-library": {
|
|
176
|
+
"type": "module-legacy",
|
|
177
|
+
"languages": "kotlin-objc",
|
|
178
|
+
"version": "0.41.0"
|
|
179
|
+
},
|
|
180
|
+
"react-native": "src/index.tsx",
|
|
181
|
+
"types": "lib/typescript/commonjs/src/index.d.ts",
|
|
182
|
+
"@react-native-community/bob": {
|
|
183
|
+
"source": "src",
|
|
184
|
+
"output": "lib",
|
|
185
|
+
"targets": [
|
|
186
|
+
"commonjs",
|
|
187
|
+
"module",
|
|
188
|
+
"typescript"
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
package/lib/module/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,cAAc,KASf,CAAC;AAGN,eAAe,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,cAAc,KASf,CAAC;AAGN,eAAe,cAAc,CAAC"}
|