@bravemobile/react-native-code-push 8.2.3 → 8.2.4

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.
@@ -63,4 +63,42 @@ extends:
63
63
  archiveFile: '$(Build.ArtifactStagingDirectory)/npm/$(Build.BuildId).tgz'
64
64
  replaceExistingArchive: true
65
65
  verbose: true
66
- displayName: 'Prepare npm artifact'
66
+ displayName: 'Prepare npm artifact'
67
+
68
+ - stage: APIScan
69
+ dependsOn: Stage
70
+ pool:
71
+ name: 1ES-PT-Windows-2022
72
+ os: windows
73
+ variables:
74
+ "agent.source.skip": true
75
+ jobs:
76
+ - job: APIScan
77
+ steps:
78
+ - task: DownloadPipelineArtifact@2
79
+ displayName: Download Build Artifacts for APIScan
80
+ inputs:
81
+ artifactName: npm
82
+ targetPath: '$(Agent.BuildDirectory)/npm'
83
+ - task: ExtractFiles@1
84
+ inputs:
85
+ archiveFilePatterns: '$(Agent.BuildDirectory)/npm/*.tgz'
86
+ destinationFolder: '$(Agent.BuildDirectory)/npm_extracted'
87
+ - task: AzureKeyVault@2
88
+ inputs:
89
+ azureSubscription: 'AC - Dev Infra & Build Pool'
90
+ KeyVaultName: 'mobile-center-sdk'
91
+ SecretsFilter: 'appcenter-sdk-managed-identity-clientid'
92
+ RunAsPreJob: false
93
+ - task: APIScan@2
94
+ displayName: 'Run APIScan'
95
+ inputs:
96
+ softwareFolder: '$(Agent.BuildDirectory)\npm_extracted'
97
+ softwareName: 'react-native-code-push'
98
+ softwareVersionNum: '$(Build.BuildId)'
99
+ isLargeApp: false
100
+ toolVersion: 'Latest'
101
+ verbosityLevel: verbose
102
+ condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
103
+ env:
104
+ AzureServicesAuthConnectionString: 'runAs=App;AppId=$(appcenter-sdk-managed-identity-clientid)'
package/README.md CHANGED
@@ -315,7 +315,7 @@ Once your app is configured and distributed to your users, and you have made som
315
315
 
316
316
  *NOTE: Before you can start releasing updates, please log into App Center by running the `appcenter login` command.*
317
317
 
318
- In it's the most basic form, this command only requires one parameter: your owner name + "/" + app name.
318
+ In its most basic form, this command only requires one parameter: your owner name + "/" + app name.
319
319
 
320
320
  ```shell
321
321
  appcenter codepush release-react -a <ownerName>/<appName>
@@ -27,5 +27,5 @@ android {
27
27
 
28
28
  dependencies {
29
29
  implementation "com.facebook.react:react-native:+"
30
- implementation 'com.nimbusds:nimbus-jose-jwt:5.1'
30
+ implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'
31
31
  }
@@ -295,7 +295,16 @@ public class CodePush implements ReactPackage {
295
295
 
296
296
  JSONObject pendingUpdate = mSettingsManager.getPendingUpdate();
297
297
  if (pendingUpdate != null) {
298
- JSONObject packageMetadata = this.mUpdateManager.getCurrentPackage();
298
+ JSONObject packageMetadata = null;
299
+
300
+ try {
301
+ packageMetadata = this.mUpdateManager.getCurrentPackage();
302
+ } catch (CodePushMalformedDataException e) {
303
+ // We need to recover the app in case 'codepush.json' is corrupted
304
+ CodePushUtils.log(e);
305
+ clearUpdates();
306
+ return;
307
+ }
299
308
  if (packageMetadata == null || !isPackageBundleLatest(packageMetadata) && hasBinaryVersionChanged(packageMetadata)) {
300
309
  CodePushUtils.log("Skipping initializeUpdateAfterRestart(), binary version is newer");
301
310
  return;
@@ -3,11 +3,12 @@ package com.microsoft.codepush.react;
3
3
  import android.content.Context;
4
4
  import android.util.Base64;
5
5
 
6
+ import com.nimbusds.jose.JWSVerifier;
7
+ import com.nimbusds.jose.crypto.RSASSAVerifier;
8
+ import com.nimbusds.jwt.SignedJWT;
9
+
6
10
  import java.security.interfaces.*;
7
11
 
8
- import com.nimbusds.jose.*;
9
- import com.nimbusds.jose.crypto.*;
10
- import com.nimbusds.jwt.*;
11
12
 
12
13
  import org.json.JSONArray;
13
14
  import org.json.JSONException;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bravemobile/react-native-code-push",
3
- "version": "8.2.3",
3
+ "version": "8.2.4",
4
4
  "description": "React Native plugin for the CodePush service",
5
5
  "main": "CodePush.js",
6
6
  "typings": "typings/react-native-code-push.d.ts",
@@ -36,7 +36,7 @@
36
36
  "url": "https://github.com/Soomgo-Mobile/react-native-code-push"
37
37
  },
38
38
  "dependencies": {
39
- "code-push": "^4.2.0",
39
+ "code-push": "^4.2.1",
40
40
  "glob": "^7.1.7",
41
41
  "hoist-non-react-statics": "^3.3.2",
42
42
  "inquirer": "^8.1.5",
@@ -176,7 +176,7 @@ export interface SyncOptions {
176
176
  * value will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as
177
177
  * overriding one or more of the default strings.
178
178
  */
179
- updateDialog?: UpdateDialog;
179
+ updateDialog?: UpdateDialog | true;
180
180
 
181
181
  /**
182
182
  * The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions