1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-02 22:33:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
sunnylqm
2025-02-18 22:38:09 +08:00
parent bbda7217ac
commit 66c2504718

View File

@@ -16,6 +16,7 @@ import {
} from './core'; } from './core';
const SERVER_PRESETS = { const SERVER_PRESETS = {
// cn
pushy: { pushy: {
main: 'https://update.react-native.cn/api', main: 'https://update.react-native.cn/api',
backups: ['https://update.reactnative.cn/api'], backups: ['https://update.reactnative.cn/api'],
@@ -24,6 +25,7 @@ const SERVER_PRESETS = {
'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-update@master/endpoints.json', 'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-update@master/endpoints.json',
], ],
}, },
// i18n
cresc: { cresc: {
main: 'https://api.cresc.dev', main: 'https://api.cresc.dev',
backups: ['https://api.cresc.app'], backups: ['https://api.cresc.app'],
@@ -48,6 +50,7 @@ const defaultClientOptions: ClientOptions = {
throwError: false, throwError: false,
}; };
// for China users
export class Pushy { export class Pushy {
options: ClientOptions = { options: ClientOptions = {
...defaultClientOptions, ...defaultClientOptions,
@@ -504,6 +507,7 @@ export class Pushy {
}; };
} }
// for international users
export class Cresc extends Pushy { export class Cresc extends Pushy {
clientType: 'cresc' | 'pushy' = 'cresc'; clientType: 'cresc' | 'pushy' = 'cresc';
options: ClientOptions = { options: ClientOptions = {