@bravemobile/react-native-code-push 12.3.2 → 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 (78) 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/src/main/java/com/microsoft/codepush/react/CodePush.java +0 -35
  5. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +0 -1
  6. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +1 -1
  7. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +1 -28
  8. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +1 -99
  9. package/cli/commands/bundleCommand/bundleCodePush.ts +29 -0
  10. package/cli/commands/bundleCommand/index.ts +3 -0
  11. package/cli/commands/releaseCommand/index.ts +3 -0
  12. package/cli/commands/releaseCommand/release.ts +2 -1
  13. package/cli/dist/commands/bundleCommand/bundleCodePush.js +14 -1
  14. package/cli/dist/commands/bundleCommand/index.js +2 -1
  15. package/cli/dist/commands/releaseCommand/index.js +2 -1
  16. package/cli/dist/commands/releaseCommand/release.js +2 -2
  17. package/cli/dist/utils/hash-utils.js +1 -4
  18. package/cli/utils/hash-utils.ts +1 -4
  19. package/ios/CodePush/CodePush.h +0 -16
  20. package/ios/CodePush/CodePush.m +0 -12
  21. package/ios/CodePush/CodePushConfig.m +0 -10
  22. package/ios/CodePush/CodePushPackage.m +0 -39
  23. package/ios/CodePush/CodePushUpdateUtils.m +1 -91
  24. package/ios/CodePush.xcodeproj/project.pbxproj +0 -324
  25. package/package.json +1 -1
  26. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +0 -12
  27. package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
  28. package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
  29. package/ios/CodePush/Base64/README.md +0 -47
  30. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
  31. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
  32. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
  33. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
  34. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
  35. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
  36. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
  37. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
  38. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
  39. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
  40. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
  41. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
  42. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
  43. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
  44. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
  45. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
  46. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
  47. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
  48. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
  49. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
  50. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
  51. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
  52. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
  53. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
  54. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
  55. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
  56. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
  57. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
  58. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
  59. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
  60. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
  61. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
  62. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
  63. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
  64. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
  65. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
  66. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
  67. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
  68. package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
  69. package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
  70. package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
  71. package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
  72. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
  73. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
  74. package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
  75. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
  76. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
  77. package/ios/CodePush/JWT/LICENSE +0 -19
  78. 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
- */