@bravemobile/react-native-code-push 12.3.1 → 12.4.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.
Files changed (80) hide show
  1. package/CodePush.podspec +0 -2
  2. package/README.md +4 -2
  3. package/android/app/build.gradle +0 -1
  4. package/android/app/proguard-rules.pro +5 -0
  5. package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +0 -35
  6. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +0 -1
  7. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +33 -9
  8. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +1 -28
  9. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +1 -104
  10. package/cli/commands/bundleCommand/bundleCodePush.ts +29 -0
  11. package/cli/commands/bundleCommand/index.ts +3 -0
  12. package/cli/commands/releaseCommand/index.ts +3 -0
  13. package/cli/commands/releaseCommand/release.ts +2 -1
  14. package/cli/dist/commands/bundleCommand/bundleCodePush.js +14 -1
  15. package/cli/dist/commands/bundleCommand/index.js +2 -1
  16. package/cli/dist/commands/releaseCommand/index.js +2 -1
  17. package/cli/dist/commands/releaseCommand/release.js +2 -2
  18. package/cli/dist/utils/hash-utils.js +1 -4
  19. package/cli/utils/hash-utils.ts +1 -4
  20. package/expo/plugin/withCodePushAndroid.js +15 -16
  21. package/ios/CodePush/CodePush.h +0 -16
  22. package/ios/CodePush/CodePush.m +0 -12
  23. package/ios/CodePush/CodePushConfig.m +0 -10
  24. package/ios/CodePush/CodePushPackage.m +0 -39
  25. package/ios/CodePush/CodePushUpdateUtils.m +1 -91
  26. package/ios/CodePush.xcodeproj/project.pbxproj +0 -324
  27. package/package.json +11 -28
  28. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +0 -12
  29. package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
  30. package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
  31. package/ios/CodePush/Base64/README.md +0 -47
  32. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
  33. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
  34. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
  35. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
  36. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
  37. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
  38. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
  39. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
  40. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
  41. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
  42. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
  43. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
  44. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
  45. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
  46. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
  47. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
  48. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
  49. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
  50. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
  51. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
  52. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
  53. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
  54. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
  55. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
  56. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
  57. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
  58. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
  59. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
  60. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
  61. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
  62. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
  63. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
  64. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
  65. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
  66. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
  67. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
  68. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
  69. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
  70. package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
  71. package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
  72. package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
  73. package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
  74. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
  75. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
  76. package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
  77. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
  78. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
  79. package/ios/CodePush/JWT/LICENSE +0 -19
  80. package/ios/CodePush/JWT/README.md +0 -489
@@ -1,145 +0,0 @@
1
- //
2
- // JWTAlgorithmDataHolderChain.m
3
- // JWT
4
- //
5
- // Created by Lobanov Dmitry on 02.10.16.
6
- // Copyright © 2016 Karma. All rights reserved.
7
- //
8
-
9
- #import "JWTAlgorithmDataHolderChain.h"
10
-
11
- @interface JWTAlgorithmDataHolderChain()
12
-
13
- @property (strong, nonatomic, readwrite) NSArray *holders;
14
-
15
- @end
16
-
17
- @implementation JWTAlgorithmDataHolderChain
18
-
19
- - (NSArray *)holders {
20
- if (!_holders) {
21
- _holders = @[];
22
- }
23
- return _holders;
24
- }
25
-
26
- #pragma mark - Initialization
27
- - (instancetype)initWithHolders:(NSArray *)holders {
28
- self = [super init];
29
- if (holders) {
30
- // check that holders conform to protocol
31
- NSArray *checkedHolders = [holders filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id _Nullable evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
32
- return [evaluatedObject conformsToProtocol:@protocol(JWTAlgorithmDataHolderProtocol)];
33
- }]];
34
- self.holders = checkedHolders;
35
- }
36
- return self;
37
- }
38
-
39
- - (instancetype)initWithHolder:(id<JWTAlgorithmDataHolderProtocol>)holder {
40
- if (holder) {
41
- return [self initWithHolders:@[holder]];
42
- }
43
- return nil;
44
- }
45
-
46
- #pragma mark - Appending
47
- - (instancetype)chainByAppendingChain:(JWTAlgorithmDataHolderChain *)chain {
48
- NSArray *holders = self.holders;
49
- if (chain) {
50
- holders = [holders arrayByAddingObjectsFromArray:chain.holders];
51
- }
52
- return [[self.class alloc] initWithHolders:holders];
53
- }
54
-
55
- - (instancetype)chainByAppendingHolders:(NSArray *)holders {
56
- // create new chain with holders
57
- JWTAlgorithmDataHolderChain *chain = nil;
58
- if (holders) {
59
- chain = [[self.class alloc] initWithHolders:holders];
60
- }
61
- return [self chainByAppendingChain:chain];
62
- }
63
-
64
- - (instancetype)chainByAppendingHolder:(id<JWTAlgorithmDataHolderProtocol>)holder {
65
- return [self chainByAppendingHolders:holder ? @[holder] : nil];
66
- }
67
-
68
- #pragma mark - Create
69
- + (instancetype)chainWithHolders:(NSArray *)holders {
70
- return [[self new] chainByAppendingHolders:holders];
71
- }
72
-
73
- + (instancetype)chainWithHolder:(id<JWTAlgorithmDataHolderProtocol>)holder {
74
- return [[self new] chainByAppendingHolder:holder];
75
- }
76
-
77
- #pragma mark - Debug
78
- - (NSString *)debugDescription {
79
- return [NSString stringWithFormat:@"%@ holders: %@", self.class, [self.holders valueForKey:@"debugDescription"]];
80
- }
81
- @end
82
-
83
- @implementation JWTAlgorithmDataHolderChain (Convenient)
84
- - (id<JWTAlgorithmDataHolderProtocol>)firstHolderByAlgorithm:(id<JWTAlgorithm>)algorithm {
85
- NSInteger index = [self.holders indexOfObjectPassingTest:^BOOL(id <JWTAlgorithmDataHolderProtocol> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
86
- return [[[obj internalAlgorithm] name] isEqualToString:[algorithm name]];
87
- }];
88
- if (index != NSNotFound) {
89
- return self.holders[index];
90
- }
91
-
92
- return nil;
93
- }
94
- - (id<JWTAlgorithmDataHolderProtocol>)firstHolderBySecretData:(NSData *)secretData {
95
- NSInteger index = [self.holders indexOfObjectPassingTest:^BOOL(id <JWTAlgorithmDataHolderProtocol> _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
96
- return [[obj internalSecretData] isEqualToData:secretData];
97
- }];
98
- if (index != NSNotFound) {
99
- return self.holders[index];
100
- }
101
-
102
- return nil;
103
- }
104
- - (NSArray *)singleAlgorithm:(id<JWTAlgorithm>)algorithm withManySecretData:(NSArray *)secretsData {
105
- NSArray *holders = @[];
106
-
107
- id holder = [self firstHolderByAlgorithm:algorithm];
108
-
109
- if (!holder) {
110
- return holders;
111
- }
112
-
113
- for (NSData *secretData in secretsData) {
114
- id<JWTAlgorithmDataHolderProtocol> newHolder = [holder copy];
115
- [newHolder setInternalSecretData:secretData];
116
- holders = [holders arrayByAddingObject:newHolder];
117
- }
118
- return holders;
119
- }
120
-
121
- - (NSArray *)singleSecretData:(NSData *)secretData withManyAlgorithms:(NSArray *)algorithms {
122
- NSArray *holders = @[];
123
-
124
- id holder = [self firstHolderBySecretData:secretData];
125
-
126
- if (!holder) {
127
- return holders;
128
- }
129
-
130
- for (id<JWTAlgorithm>algorithm in algorithms) {
131
- id<JWTAlgorithmDataHolderProtocol> newHolder = [holder copy];
132
- [newHolder setInternalAlgorithm:algorithm];
133
- [holders arrayByAddingObject:newHolder];
134
- }
135
- return holders;
136
- }
137
-
138
- - (instancetype)chainByPopulatingAlgorithm:(id<JWTAlgorithm>)algorithm withManySecretData:(NSArray *)secretsData {
139
- return [[self.class alloc] initWithHolders:[self singleAlgorithm:algorithm withManySecretData:secretsData]];
140
- }
141
-
142
- - (instancetype)chainByPopulatingSecretData:(NSData *)secretData withManyAlgorithms:(NSArray *)algorithms {
143
- return [[self.class alloc] initWithHolders:[self singleSecretData:secretData withManyAlgorithms:algorithms]];
144
- }
145
- @end
@@ -1,35 +0,0 @@
1
- //
2
- // JWTAlgorithmRSBase.h
3
- // JWT
4
- //
5
- // Created by Lobanov Dmitry on 13.03.16.
6
- // Copyright © 2016 Karma. All rights reserved.
7
- //
8
-
9
- #import <Foundation/Foundation.h>
10
- #import "JWTRSAlgorithm.h"
11
- extern NSString *const JWTAlgorithmNameRS256;
12
- extern NSString *const JWTAlgorithmNameRS384;
13
- extern NSString *const JWTAlgorithmNameRS512;
14
-
15
- @interface JWTAlgorithmRSBase : NSObject <JWTRSAlgorithm>
16
-
17
- @property (assign, nonatomic, readonly) size_t ccSHANumberDigestLength;
18
- @property (assign, nonatomic, readonly) uint32_t secPaddingPKCS1SHANumber;
19
- - (unsigned char *)CC_SHANumberWithData:(const void *)data withLength:(uint32_t)len withHashBytes:(unsigned char *)hashBytes;
20
-
21
- @end
22
-
23
- @interface JWTAlgorithmRSBase (Create)
24
-
25
- + (instancetype)algorithm256;
26
- + (instancetype)algorithm384;
27
- + (instancetype)algorithm512;
28
- + (instancetype)mutableAlgorithm __deprecated;
29
-
30
- @end
31
-
32
- /*
33
- // when you can't live without mutability, uncomment.
34
- @class JWTAlgorithmRSFamilyMemberMutable;
35
- */