mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-10-23 09:38:52 +08:00
update welcome message in App component and add overridePackageVersion option to ClientOptions
This commit is contained in:
@@ -148,6 +148,7 @@ export class Pushy {
|
||||
await this.loggerPromise.promise;
|
||||
const { logger = noop, appKey } = this.options;
|
||||
const info = await getCurrentVersionInfo();
|
||||
const overridePackageVersion = this.options.overridePackageVersion;
|
||||
logger({
|
||||
type,
|
||||
data: {
|
||||
@@ -155,6 +156,7 @@ export class Pushy {
|
||||
currentVersion,
|
||||
cInfo,
|
||||
packageVersion,
|
||||
overridePackageVersion,
|
||||
buildTime,
|
||||
message,
|
||||
...info,
|
||||
@@ -233,7 +235,7 @@ export class Pushy {
|
||||
}
|
||||
this.lastChecking = now;
|
||||
const fetchBody = {
|
||||
packageVersion,
|
||||
packageVersion: this.options.overridePackageVersion || packageVersion,
|
||||
hash: currentVersion,
|
||||
buildTime,
|
||||
cInfo,
|
||||
|
@@ -93,6 +93,7 @@ export interface ClientOptions {
|
||||
beforeDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
|
||||
afterDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
|
||||
onPackageExpired?: (info: CheckResult) => Promise<boolean>;
|
||||
overridePackageVersion?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTestPayload {
|
||||
|
Reference in New Issue
Block a user