File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Example/testHotUpdate/src Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ function App() {
52
52
53
53
return (
54
54
< View style = { styles . container } >
55
- < Text style = { styles . welcome } > 欢迎使用Pushy热更新服务 </ Text >
55
+ < Text style = { styles . welcome } > 欢迎xxx使用Pushy热更新服务 </ Text >
56
56
< View style = { { flexDirection : 'row' } } >
57
57
< Text >
58
58
{ useDefaultAlert ? '当前使用' : '当前不使用' } 默认的alert更新提示
Original file line number Diff line number Diff line change @@ -148,13 +148,15 @@ 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 : {
154
155
appKey,
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,
Original file line number Diff line number Diff line change @@ -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 {
You can’t perform that action at this time.
0 commit comments