react-native-update 10.29.6 → 10.29.8
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/ios/RCTPushy/RCTPushy.mm +9 -1
- package/package.json +1 -1
- package/src/client.ts +9 -2
- package/src/type.ts +1 -0
package/ios/RCTPushy/RCTPushy.mm
CHANGED
|
@@ -542,7 +542,15 @@ RCT_EXPORT_METHOD(markSuccess:(RCTPromiseResolveBlock)resolve
|
|
|
542
542
|
callback([self errorWithMessage:ERROR_HDIFFPATCH]);
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
|
-
|
|
545
|
+
|
|
546
|
+
@try {
|
|
547
|
+
[_fileManager hdiffFileAtPath:bundlePatch fromOrigin:bundleOrigin toDestination:destination completionHandler:completionHandler];
|
|
548
|
+
}
|
|
549
|
+
@catch (NSException *exception) {
|
|
550
|
+
NSLog(@"Pushy _dopatch error: exception occurred during hdiffFileAtPath: %@, reason: %@",
|
|
551
|
+
exception.name, exception.reason);
|
|
552
|
+
callback([self errorWithMessage:ERROR_HDIFFPATCH]);
|
|
553
|
+
}
|
|
546
554
|
}
|
|
547
555
|
|
|
548
556
|
- (void)patch:(NSString *)hash fromBundle:(NSString *)bundleOrigin source:(NSString *)sourceOrigin callback:(void (^)(NSError *error))callback
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -148,6 +148,7 @@ export class Pushy {
|
|
|
148
148
|
await this.loggerPromise.promise;
|
|
149
149
|
const { logger = noop, appKey } = this.options;
|
|
150
150
|
const info = await getCurrentVersionInfo();
|
|
151
|
+
const overridePackageVersion = this.options.overridePackageVersion;
|
|
151
152
|
logger({
|
|
152
153
|
type,
|
|
153
154
|
data: {
|
|
@@ -155,6 +156,7 @@ export class Pushy {
|
|
|
155
156
|
currentVersion,
|
|
156
157
|
cInfo,
|
|
157
158
|
packageVersion,
|
|
159
|
+
overridePackageVersion,
|
|
158
160
|
buildTime,
|
|
159
161
|
message,
|
|
160
162
|
...info,
|
|
@@ -233,7 +235,7 @@ export class Pushy {
|
|
|
233
235
|
}
|
|
234
236
|
this.lastChecking = now;
|
|
235
237
|
const fetchBody = {
|
|
236
|
-
packageVersion,
|
|
238
|
+
packageVersion: this.options.overridePackageVersion || packageVersion,
|
|
237
239
|
hash: currentVersion,
|
|
238
240
|
buildTime,
|
|
239
241
|
cInfo,
|
|
@@ -391,7 +393,12 @@ export class Pushy {
|
|
|
391
393
|
}
|
|
392
394
|
}
|
|
393
395
|
let succeeded = '';
|
|
394
|
-
this.report({
|
|
396
|
+
this.report({
|
|
397
|
+
type: 'downloading',
|
|
398
|
+
data: {
|
|
399
|
+
newVersion: hash,
|
|
400
|
+
},
|
|
401
|
+
});
|
|
395
402
|
let lastError: any;
|
|
396
403
|
let errorMessages: string[] = [];
|
|
397
404
|
const diffUrl = await testUrls(joinUrls(paths, diff));
|
package/src/type.ts
CHANGED
|
@@ -93,6 +93,7 @@ export interface ClientOptions {
|
|
|
93
93
|
beforeDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
|
|
94
94
|
afterDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
|
|
95
95
|
onPackageExpired?: (info: CheckResult) => Promise<boolean>;
|
|
96
|
+
overridePackageVersion?: string;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
export interface UpdateTestPayload {
|