react-native-insider 4.4.1 → 5.0.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.
- package/.github/CODEOWNERS +8 -0
- package/.github/dependabot.yml +29 -0
- package/.github/workflows/dependabot_workflow.yml +18 -0
- package/.github/workflows/master_release_with_tag.yml +59 -0
- package/.github/workflows/new_release.yml +58 -0
- package/RNInsider.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +2 -2
- package/changelog/5.0.1.md +3 -0
- package/index.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This is a comment.
|
|
2
|
+
# Each line is a file pattern followed by one or more owners.
|
|
3
|
+
|
|
4
|
+
# These owners will be the default owners for everything in
|
|
5
|
+
# the repo. Unless a later match takes precedence,
|
|
6
|
+
# @global-owner1 and @global-owner2 will be requested for
|
|
7
|
+
# review when someone opens a pull request.
|
|
8
|
+
* @MahammadMD @tugcearar
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
|
|
4
|
+
- package-ecosystem: "gradle"
|
|
5
|
+
directory: "/android"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "monthly"
|
|
8
|
+
labels:
|
|
9
|
+
- "dependabot"
|
|
10
|
+
- "dependencies"
|
|
11
|
+
open-pull-requests-limit: 10
|
|
12
|
+
|
|
13
|
+
- package-ecosystem: "npm"
|
|
14
|
+
directory: "/"
|
|
15
|
+
schedule:
|
|
16
|
+
interval: "monthly"
|
|
17
|
+
labels:
|
|
18
|
+
- "dependabot"
|
|
19
|
+
- "dependencies"
|
|
20
|
+
open-pull-requests-limit: 10
|
|
21
|
+
|
|
22
|
+
- package-ecosystem: "github-actions"
|
|
23
|
+
directory: "/"
|
|
24
|
+
schedule:
|
|
25
|
+
interval: "monthly"
|
|
26
|
+
labels:
|
|
27
|
+
- "dependabot"
|
|
28
|
+
- "dependencies"
|
|
29
|
+
open-pull-requests-limit: 10
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Dependabot workflow
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: "0 13 1 * *"
|
|
7
|
+
jobs:
|
|
8
|
+
dependabot_monthly:
|
|
9
|
+
name: Trigger mobile-devops workflow
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Repository Dispatch
|
|
13
|
+
uses: peter-evans/repository-dispatch@v1
|
|
14
|
+
with:
|
|
15
|
+
token: ${{ secrets.GIT_TOKEN }}
|
|
16
|
+
repository: useinsider/mobile-devops
|
|
17
|
+
event-type: repo-name
|
|
18
|
+
client-payload: '{"repo-name": "react-native-insider"}'
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: NPM Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: Create Release
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout code
|
|
15
|
+
uses: actions/checkout@v2
|
|
16
|
+
with:
|
|
17
|
+
ref: develop
|
|
18
|
+
|
|
19
|
+
- name: Set release name
|
|
20
|
+
run: echo "RELEASE_NAME=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
|
|
21
|
+
|
|
22
|
+
- name: Create release
|
|
23
|
+
id: create_release
|
|
24
|
+
uses: actions/create-release@v1
|
|
25
|
+
env:
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
+
with:
|
|
28
|
+
tag_name: ${{ github.ref }}
|
|
29
|
+
release_name: ${{ env.RELEASE_NAME }}
|
|
30
|
+
body_path: changelog/${{ env.RELEASE_NAME }}.md
|
|
31
|
+
draft: false
|
|
32
|
+
prerelease: false
|
|
33
|
+
build:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v2
|
|
37
|
+
- uses: actions/setup-node@v1
|
|
38
|
+
with:
|
|
39
|
+
node-version: 12
|
|
40
|
+
- run: npm ci
|
|
41
|
+
- run: npm test
|
|
42
|
+
|
|
43
|
+
publish-npm:
|
|
44
|
+
needs: build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v2
|
|
48
|
+
- uses: actions/setup-node@v1
|
|
49
|
+
with:
|
|
50
|
+
node-version: 12
|
|
51
|
+
registry-url: https://registry.npmjs.org/
|
|
52
|
+
- run: npm ci
|
|
53
|
+
- run: npm publish
|
|
54
|
+
env:
|
|
55
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
56
|
+
- run: |
|
|
57
|
+
text=":atom_symbol: A new version of React Native SDK is published."
|
|
58
|
+
object='{"text": "'"$text"'"}'
|
|
59
|
+
curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: NPM Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
repository_dispatch:
|
|
5
|
+
types: sdk-deploy
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
name: Create Release
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v2
|
|
15
|
+
with:
|
|
16
|
+
ref: develop
|
|
17
|
+
|
|
18
|
+
- name: Set release name
|
|
19
|
+
run: echo "RELEASE_NAME=${{ github.event.client_payload.sdk_version }}" >> $GITHUB_ENV
|
|
20
|
+
|
|
21
|
+
- name: Create release
|
|
22
|
+
id: create_release
|
|
23
|
+
uses: actions/create-release@v1
|
|
24
|
+
env:
|
|
25
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
with:
|
|
27
|
+
tag_name: ${{ github.event.client_payload.sdk_version }}
|
|
28
|
+
release_name: ${{ env.RELEASE_NAME }}
|
|
29
|
+
body: ${{ github.event.client_payload.description }}
|
|
30
|
+
draft: false
|
|
31
|
+
prerelease: false
|
|
32
|
+
build:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v2
|
|
36
|
+
- uses: actions/setup-node@v1
|
|
37
|
+
with:
|
|
38
|
+
node-version: 12
|
|
39
|
+
- run: npm ci
|
|
40
|
+
- run: npm test
|
|
41
|
+
|
|
42
|
+
publish-npm:
|
|
43
|
+
needs: build
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v2
|
|
47
|
+
- uses: actions/setup-node@v1
|
|
48
|
+
with:
|
|
49
|
+
node-version: 12
|
|
50
|
+
registry-url: https://registry.npmjs.org/
|
|
51
|
+
- run: npm ci
|
|
52
|
+
- run: npm publish
|
|
53
|
+
env:
|
|
54
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
55
|
+
- run: |
|
|
56
|
+
text=":atom_symbol: A new version of React Native SDK is published."
|
|
57
|
+
object='{"text": "'"$text"'"}'
|
|
58
|
+
curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
|
package/RNInsider.podspec
CHANGED
|
@@ -9,11 +9,11 @@ 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/
|
|
12
|
+
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.0.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', '
|
|
17
|
+
s.dependency 'InsiderMobile', '12.0.0'
|
|
18
18
|
s.dependency 'InsiderHybrid', '1.1.2'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -36,10 +36,10 @@ android {
|
|
|
36
36
|
|
|
37
37
|
dependencies {
|
|
38
38
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
39
|
-
implementation ('com.useinsider:insider:
|
|
39
|
+
implementation ('com.useinsider:insider:13.0.2')
|
|
40
40
|
implementation ('com.useinsider:insiderhybrid:1.1.3')
|
|
41
41
|
|
|
42
|
-
implementation 'com.google.android.play:core:1.10.
|
|
42
|
+
implementation 'com.google.android.play:core:1.10.3'
|
|
43
43
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
44
44
|
implementation 'com.google.android.gms:play-services-location:17.0.0'
|
|
45
45
|
implementation 'com.google.firebase:firebase-messaging:20.0.0'
|
|
@@ -68,9 +68,9 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
68
68
|
Insider.Instance.setSDKType("react-native");
|
|
69
69
|
Insider.Instance.setHybridSDKVersion(sdkVersion);
|
|
70
70
|
|
|
71
|
-
Insider.Instance.
|
|
71
|
+
Insider.Instance.resumeSessionHybridConfig(reactContext.getCurrentActivity());
|
|
72
72
|
if (isCoreInited) {
|
|
73
|
-
Insider.Instance.
|
|
73
|
+
Insider.Instance.resumeSessionHybridRequestConfig();
|
|
74
74
|
}
|
|
75
75
|
isCoreInited = true;
|
|
76
76
|
|
package/index.js
CHANGED
|
@@ -141,7 +141,8 @@ export default class RNInsider {
|
|
|
141
141
|
|
|
142
142
|
// Message Center & Smart Recommendation
|
|
143
143
|
static getMessageCenterData(limit: number, startDate: Date, endDate: Date, callback: Function) {
|
|
144
|
-
if (shouldNotProceed() || limit == null || startDate == null || endDate == null || callback == null)
|
|
144
|
+
if (shouldNotProceed() || limit == null || startDate == null || endDate == null || callback == null || startDate.getTime() === endDate.getTime() ||
|
|
145
|
+
startDate.getTime() > endDate.getTime()) return;
|
|
145
146
|
try {
|
|
146
147
|
Insider.getMessageCenterData(limit, startDate.toISOString(), endDate.toISOString(), (messageCenterData) => {
|
|
147
148
|
if (Platform.OS !== 'ios') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-insider",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "React Native Insider SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
],
|
|
16
16
|
"author": "insidermobile",
|
|
17
17
|
"homepage": "https://github.com/useinsider/react-native-insider"
|
|
18
|
-
}
|
|
18
|
+
}
|