react-native-insider 6.3.0 → 6.4.0-nh
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/.github/workflows/git-leak.yml +7 -36
- package/RNInsider.podspec +2 -2
- package/android/build.gradle +1 -5
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +17 -4
- package/index.js +10 -0
- package/ios/RNInsider/RNNotificationHandler.h +2 -0
- package/ios/RNInsider/RNNotificationHandler.m +2 -1
- package/package.json +1 -1
|
@@ -1,44 +1,15 @@
|
|
|
1
|
-
name:
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
types: [ready_for_review]
|
|
5
|
-
env:
|
|
6
|
-
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
|
|
1
|
+
name: Gitleaks-Action
|
|
2
|
+
on: [push]
|
|
7
3
|
jobs:
|
|
8
|
-
|
|
4
|
+
build:
|
|
9
5
|
runs-on: self-runner-node
|
|
10
6
|
steps:
|
|
11
|
-
- name:
|
|
12
|
-
uses: actions/checkout@v2
|
|
13
|
-
with:
|
|
14
|
-
fetch-depth: '2'
|
|
15
|
-
- name: Detecting new added lines
|
|
16
|
-
run: |
|
|
17
|
-
git fetch origin ${{ github.event.repository.default_branch }}
|
|
18
|
-
git diff origin/${{ github.event.repository.default_branch }}..HEAD --name-only | xargs git diff origin/${{ github.event.repository.default_branch }}..HEAD -- | grep '+' | sed 's/+//' | sed 's/^[ \t]*//' > new-added-lines.txt
|
|
19
|
-
working-directory: ${{ github.workspace }}
|
|
20
|
-
- name: Install Go
|
|
21
|
-
uses: actions/setup-go@v2
|
|
22
|
-
with:
|
|
23
|
-
go-version: 1.16
|
|
24
|
-
- name: Install gitleaks
|
|
25
|
-
run: |
|
|
26
|
-
go get github.com/zricethezav/gitleaks/v7
|
|
27
|
-
- name: Run gitleaks
|
|
28
|
-
run: |
|
|
29
|
-
gitleaks --no-git --path ${{ github.workspace }}/new-added-lines.txt --verbose --report=${{ github.workspace }}/gitleaks-report.json
|
|
30
|
-
- name: Send to Lambda
|
|
31
|
-
if: ${{ always() }}
|
|
7
|
+
- name: Trigger to Gitleak
|
|
32
8
|
run: |
|
|
33
9
|
python -c '
|
|
34
10
|
import json,sys,requests;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
sys.exit(0);
|
|
39
|
-
json_result=json.loads(output.read());
|
|
40
|
-
github_result = {"repository": "'${{ github.repository }}'", "server_url": "'${{ github.server_url }}'", "run_id": "'${{ github.run_id }}'", "pr_number": "'${{ github.event.number }}'"};
|
|
41
|
-
request_json = {"gitleaks_result": json_result,"github": github_result};
|
|
42
|
-
requests.post("'$LambdaWebHook'", json=request_json)'
|
|
11
|
+
github = {"repository": "'${{ github.event.repository.name }}'", "ref": "'${{ github.ref_name }}'"};
|
|
12
|
+
github_request = {"insider_gitleak": github};
|
|
13
|
+
requests.post("'$LambdaWebHook'", json=github_request);'
|
|
43
14
|
env:
|
|
44
15
|
LambdaWebHook: ${{ secrets.CHECKMARX_LAMBDA_WEBHOOK }}
|
package/RNInsider.podspec
CHANGED
|
@@ -9,12 +9,12 @@ Pod::Spec.new do |s|
|
|
|
9
9
|
s.authors = package_json['author']
|
|
10
10
|
s.license = 'MIT'
|
|
11
11
|
s.platform = :ios, '10.0'
|
|
12
|
-
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/13.
|
|
12
|
+
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/13.4.0/InsiderMobileIOSFramework.zip'}
|
|
13
13
|
s.source_files = 'ios/RNInsider/*.{h,m}'
|
|
14
14
|
s.requires_arc = true
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
s.dependency 'React'
|
|
17
|
-
s.dependency 'InsiderMobile', '13.
|
|
17
|
+
s.dependency 'InsiderMobile', '13.4.0'
|
|
18
18
|
s.dependency 'InsiderGeofence', '1.1.0'
|
|
19
19
|
s.dependency 'InsiderHybrid', '1.4.0'
|
|
20
20
|
end
|
package/android/build.gradle
CHANGED
|
@@ -35,7 +35,7 @@ repositories {
|
|
|
35
35
|
|
|
36
36
|
dependencies {
|
|
37
37
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
38
|
-
implementation ('com.useinsider:insider:14.
|
|
38
|
+
implementation ('com.useinsider:insider:14.2.2-nh')
|
|
39
39
|
implementation ('com.useinsider:insiderhybrid:1.1.5')
|
|
40
40
|
|
|
41
41
|
implementation "androidx.security:security-crypto:1.0.0"
|
|
@@ -45,8 +45,4 @@ dependencies {
|
|
|
45
45
|
implementation 'com.google.android.gms:play-services-location:21.0.1'
|
|
46
46
|
implementation 'com.google.android.play:core-ktx:1.8.1'
|
|
47
47
|
implementation 'com.google.firebase:firebase-messaging:23.0.5'
|
|
48
|
-
|
|
49
|
-
implementation 'com.huawei.hms:push:6.5.0.300'
|
|
50
|
-
implementation 'com.huawei.hms:ads-identifier:3.4.39.302'
|
|
51
|
-
implementation 'com.huawei.hms:location:6.4.0.300'
|
|
52
48
|
}
|
|
@@ -4,6 +4,9 @@ import android.app.Application;
|
|
|
4
4
|
|
|
5
5
|
import android.os.Handler;
|
|
6
6
|
import android.os.Looper;
|
|
7
|
+
import android.content.Intent;
|
|
8
|
+
import android.net.Uri;
|
|
9
|
+
|
|
7
10
|
import com.facebook.react.bridge.Callback;
|
|
8
11
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
9
12
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
@@ -630,10 +633,6 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
630
633
|
}
|
|
631
634
|
String provider = Insider.Instance.getCurrentProvider(reactContext);
|
|
632
635
|
switch (provider) {
|
|
633
|
-
case "huawei":
|
|
634
|
-
com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
635
|
-
Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
|
|
636
|
-
break;
|
|
637
636
|
case "other":
|
|
638
637
|
case "google":
|
|
639
638
|
RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
@@ -731,6 +730,20 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
731
730
|
}
|
|
732
731
|
}
|
|
733
732
|
|
|
733
|
+
@ReactMethod
|
|
734
|
+
public void handleUniversalLink(String url) {
|
|
735
|
+
try {
|
|
736
|
+
Intent universalLinkIntent = new Intent();
|
|
737
|
+
Uri data = Uri.parse(url);
|
|
738
|
+
|
|
739
|
+
universalLinkIntent.setData(data);
|
|
740
|
+
|
|
741
|
+
Insider.Instance.handleUniversalLink(universalLinkIntent);
|
|
742
|
+
} catch (Exception e) {
|
|
743
|
+
Insider.Instance.putException(e);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
|
|
734
747
|
@ReactMethod
|
|
735
748
|
public void setActiveForegroundPushView() {}
|
|
736
749
|
|
package/index.js
CHANGED
|
@@ -453,4 +453,14 @@ export default class RNInsider {
|
|
|
453
453
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
+
|
|
457
|
+
static handleUniversalLink(url: string) {
|
|
458
|
+
try {
|
|
459
|
+
if (Platform.OS !== 'android' || url == null || shouldNotProceed()) return;
|
|
460
|
+
|
|
461
|
+
Insider.handleUniversalLink(url);
|
|
462
|
+
} catch (error) {
|
|
463
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
464
|
+
}
|
|
465
|
+
}
|
|
456
466
|
}
|
|
@@ -21,5 +21,7 @@ extern NSString * const TEMP_STORE_PURCHASE;
|
|
|
21
21
|
extern NSString * const TEMP_STORE_ADDED_TO_CART;
|
|
22
22
|
extern NSString * const TEMP_STORE_CUSTOM_ACTION;
|
|
23
23
|
extern NSString * const INAPP_SEEN;
|
|
24
|
+
extern NSString * const FOREGROUND_PUSH;
|
|
25
|
+
|
|
24
26
|
-(void)sendDataToJS:(NSString *)eventName data:(NSDictionary *)data;
|
|
25
27
|
@end
|
|
@@ -21,6 +21,7 @@ NSString * const TEMP_STORE_PURCHASE = @"TEMP_STORE_PURCHASE";
|
|
|
21
21
|
NSString * const TEMP_STORE_ADDED_TO_CART = @"TEMP_STORE_ADDED_TO_CART";
|
|
22
22
|
NSString * const TEMP_STORE_CUSTOM_ACTION = @"TEMP_STORE_CUSTOM_ACTION";
|
|
23
23
|
NSString * const INAPP_SEEN = @"INAPP_SEEN";
|
|
24
|
+
NSString * const FOREGROUND_PUSH = @"FOREGROUND_PUSH";
|
|
24
25
|
|
|
25
26
|
static RNNotificationHandler *notificationHandler;
|
|
26
27
|
|
|
@@ -39,7 +40,7 @@ static RNNotificationHandler *notificationHandler;
|
|
|
39
40
|
RCT_EXPORT_MODULE();
|
|
40
41
|
|
|
41
42
|
-(NSArray<NSString *> *)supportedEvents{
|
|
42
|
-
return @[NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN];
|
|
43
|
+
return @[NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN, FOREGROUND_PUSH];
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
-(void)sendDataToJS:(NSString *)eventName data:(NSDictionary *)data {
|