cobrowse-sdk-react-native 3.7.0 → 3.8.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.
@@ -8,9 +8,9 @@ jobs:
8
8
  build:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
- - uses: actions/checkout@v3
11
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
12
12
 
13
- - uses: actions/setup-node@v4
13
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
14
14
  name: Install NodeJS
15
15
  with:
16
16
  node-version: '24'
@@ -14,9 +14,9 @@ jobs:
14
14
  id-token: write
15
15
 
16
16
  steps:
17
- - uses: actions/checkout@v3
17
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
18
18
 
19
- - uses: actions/setup-node@v4
19
+ - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
20
20
  with:
21
21
  node-version: '24'
22
22
  registry-url: 'https://registry.npmjs.org'
@@ -14,19 +14,22 @@ on:
14
14
  type: string
15
15
  required: false
16
16
 
17
- permissions:
18
- contents: write
19
- pull-requests: write
20
-
21
17
  jobs:
22
18
  android:
23
19
  runs-on: ubuntu-latest
24
20
  if: ${{ github.event.inputs.platform == 'Android' }}
25
21
  steps:
22
+ - uses: cobrowseio/actions/.github/actions/git-auth@master
23
+ id: app-token
24
+ with:
25
+ client-id: ${{ vars.COBROWSE_BOT_CLIENT_ID }}
26
+ private-key: ${{ secrets.COBROWSE_BOT_KEY }}
27
+ permission-contents: write
28
+
26
29
  - name: Checkout repository
27
- uses: actions/checkout@v3
30
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28
31
  with:
29
- token: ${{ secrets.GH_REPO_TOKEN }}
32
+ token: ${{ steps.app-token.outputs.token }}
30
33
 
31
34
  - name: Get the new Android version from the input parameter
32
35
  if: "${{ github.event.inputs.cobrowse_sdk_version != '' }}"
@@ -41,21 +44,19 @@ jobs:
41
44
  - name: Update build.gradle file
42
45
  run: sed -i "s/\(io\.cobrowse\:cobrowse-sdk-android\:\).*/\\1${COBROWSE_VERSION}'/" android/build.gradle
43
46
 
44
- # If the SDK was updated, commit the changes and open a new pull request
45
- - name: Create a new pull request
47
+ # If the SDK was updated, commit the changes back to the repo
48
+ - name: Commit the changes
46
49
  env:
47
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48
50
  FILES_TO_COMMIT: android/build.gradle
49
- NEW_BRANCH_NAME: feature/update_packages_${{ github.run_id }}
50
51
  run: |
51
52
  if [[ `git status --porcelain $FILES_TO_COMMIT` ]]; then
52
- git config --local user.name "Cobrowse.io Bot"
53
- git config --local user.email "github@cobrowse.io"
54
- git checkout -b $NEW_BRANCH_NAME
55
53
  git add $FILES_TO_COMMIT
56
- git commit -m "feat: update Cobrowse.io SDK"
57
- git push origin $NEW_BRANCH_NAME
58
- gh pr create -B master -H $NEW_BRANCH_NAME --title 'Update native Android SDK' --body ''
54
+ git commit -m "feat: update Cobrowse Android SDK to ${COBROWSE_VERSION}"
55
+ # Pull the changes that might have been commited during this run
56
+ git config pull.rebase true
57
+ git config rebase.autoStash true
58
+ git pull origin
59
+ git push
59
60
  else
60
61
  echo "No changes to commit"
61
62
  fi
@@ -64,10 +65,17 @@ jobs:
64
65
  runs-on: macos-14
65
66
  if: ${{ github.event.inputs.platform == 'iOS' }}
66
67
  steps:
68
+ - uses: cobrowseio/actions/.github/actions/git-auth@master
69
+ id: app-token
70
+ with:
71
+ client-id: ${{ vars.COBROWSE_BOT_CLIENT_ID }}
72
+ private-key: ${{ secrets.COBROWSE_BOT_KEY }}
73
+ permission-contents: write
74
+
67
75
  - name: Checkout repository
68
- uses: actions/checkout@v3
76
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
69
77
  with:
70
- token: ${{ secrets.GH_REPO_TOKEN }}
78
+ token: ${{ steps.app-token.outputs.token }}
71
79
 
72
80
  - name: Get the new iOS version from the input parameter
73
81
  if: "${{ github.event.inputs.cobrowse_sdk_version != '' }}"
@@ -82,21 +90,19 @@ jobs:
82
90
  - name: Update Podspec file
83
91
  run: sed -i '.bak' "s/\(s\.dependency\ *'CobrowseIO\/XCFramework'\,\ *'\).*/\\1${COBROWSE_VERSION}'/" cobrowse-sdk-react-native.podspec
84
92
 
85
- # If the SDK was updated, commit the changes and open a new pull request
86
- - name: Create a new pull request
93
+ # If the SDK was updated, commit the changes back to the repo
94
+ - name: Commit the changes
87
95
  env:
88
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89
96
  FILES_TO_COMMIT: cobrowse-sdk-react-native.podspec
90
- NEW_BRANCH_NAME: feature/update_packages_${{ github.run_id }}
91
97
  run: |
92
98
  if [[ `git status --porcelain $FILES_TO_COMMIT` ]]; then
93
- git config --local user.name "Cobrowse.io Bot"
94
- git config --local user.email "github@cobrowse.io"
95
- git checkout -b $NEW_BRANCH_NAME
96
99
  git add $FILES_TO_COMMIT
97
- git commit -m "feat: update Cobrowse.io SDK"
98
- git push origin $NEW_BRANCH_NAME
99
- gh pr create -B master -H $NEW_BRANCH_NAME --title 'Update native iOS SDKs' --body ''
100
+ git commit -m "feat: update Cobrowse iOS SDK to ${COBROWSE_VERSION}"
101
+ # Pull the changes that might have been commited during this run
102
+ git config pull.rebase true
103
+ git config rebase.autoStash true
104
+ git pull origin
105
+ git push
100
106
  else
101
107
  echo "No changes to commit"
102
108
  fi
@@ -0,0 +1,6 @@
1
+ {
2
+ "recommendations": [
3
+ "standard.vscode-standard",
4
+ "msjsdiag.vscode-react-native"
5
+ ]
6
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Attach to Hermes application",
6
+ "cwd": "${workspaceFolder}/Example",
7
+ "type": "reactnativedirect",
8
+ "request": "attach"
9
+ }
10
+ ]
11
+ }
@@ -3,5 +3,5 @@
3
3
  "prettier.enable": false,
4
4
  "standard.enable": true,
5
5
  "standard.autoFixOnSave": true,
6
- "standard.engine": "standard"
6
+ "standard.engine": "ts-standard"
7
7
  }
@@ -35,7 +35,7 @@ android {
35
35
 
36
36
  dependencies {
37
37
  implementation 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+
38
- implementation 'io.cobrowse:cobrowse-sdk-android:3.14.3'
38
+ implementation 'io.cobrowse:cobrowse-sdk-android:3.15.0'
39
39
  implementation 'androidx.webkit:webkit:1.4.0'
40
40
  implementation 'androidx.activity:activity:1.6.0'
41
41
  }
@@ -10,8 +10,8 @@ Pod::Spec.new do |s|
10
10
  s.license = package["license"]
11
11
  s.homepage = package["homepage"]
12
12
  s.source = { :git => 'https://github.com/cobrowseio/cobrowse-sdk-react-native.git' }
13
- s.platform = :ios, '12.0'
14
- s.dependency 'CobrowseIO/XCFramework', '3.15.1'
13
+ s.platform = :ios, '15.0'
14
+ s.dependency 'CobrowseIO/XCFramework', '3.16.4'
15
15
  s.source_files = 'ios/**/*.{h,m,mm}'
16
16
 
17
17
  if defined?(install_modules_dependencies)
@@ -128,13 +128,8 @@ RCT_EXPORT_METHOD(start) {
128
128
  [CobrowseIO.instance start];
129
129
  }
130
130
 
131
- RCT_REMAP_METHOD(stop,
132
- stopWithResolver:(RCTPromiseResolveBlock)resolve
133
- rejecter:(RCTPromiseRejectBlock)reject) {
134
- [CobrowseIO.instance stop:^(NSError *err) {
135
- if (err) return reject(@"cbio_stop_failed", err.localizedDescription, err);
136
- else resolve(NSNull.null);
137
- }];
131
+ RCT_EXPORT_METHOD(stop) {
132
+ [CobrowseIO.instance stop];
138
133
  }
139
134
 
140
135
  RCT_EXPORT_METHOD(license: (NSString*) license) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cobrowse-sdk-react-native",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "description": "Cobrowse SDK for React Native",
5
5
  "main": "lib/module/index",
6
6
  "module": "lib/module/index",