mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-10-24 18:18:53 +08:00
support multiple versions
This commit is contained in:
36
src/type.ts
36
src/type.ts
@@ -1,14 +1,10 @@
|
||||
export interface CheckResult {
|
||||
upToDate?: true;
|
||||
expired?: true;
|
||||
downloadUrl?: string;
|
||||
update?: true;
|
||||
name?: string; // version name
|
||||
hash?: string;
|
||||
description?: string;
|
||||
metaInfo?: string;
|
||||
config?: {
|
||||
rollout?: {
|
||||
export interface VersionInfo {
|
||||
name: string;
|
||||
hash: string;
|
||||
description: string;
|
||||
metaInfo: string;
|
||||
config: {
|
||||
rollout: {
|
||||
[packageVersion: string]: number;
|
||||
};
|
||||
[key: string]: any;
|
||||
@@ -16,11 +12,27 @@ export interface CheckResult {
|
||||
pdiff?: string;
|
||||
diff?: string;
|
||||
full?: string;
|
||||
paths?: string[];
|
||||
}
|
||||
|
||||
interface RootResult {
|
||||
upToDate?: true;
|
||||
expired?: true;
|
||||
downloadUrl?: string;
|
||||
update?: true;
|
||||
paused?: 'app' | 'package';
|
||||
message?: string;
|
||||
paths?: string[];
|
||||
}
|
||||
|
||||
export type CheckResult = RootResult & VersionInfo;
|
||||
|
||||
export type CheckResultV2 = RootResult & {
|
||||
versions?: VersionInfo[];
|
||||
};
|
||||
|
||||
export type MixedCheckResult = CheckResult | CheckResultV2;
|
||||
|
||||
|
||||
export interface ProgressData {
|
||||
hash: string;
|
||||
received: number;
|
||||
|
||||
Reference in New Issue
Block a user