Interface ClientOption

Client option

interface ClientOption {
    assetCacheFolderPath: string;
    audioBaseURLByRegex: {
        [url: string]: RegExp[];
    };
    autoCacheAudio: boolean;
    autoCacheImage: boolean;
    autoFetchLatestAssetsByCron: undefined | string;
    autoFixExcelBin: boolean;
    autoFixTextMap: boolean;
    defaultAudioBaseURL: string;
    defaultImageBaseURL: string;
    defaultLanguage:
        | "EN"
        | "RU"
        | "VI"
        | "TH"
        | "PT"
        | "KR"
        | "JP"
        | "ID"
        | "FR"
        | "ES"
        | "DE"
        | "CHT"
        | "CHS";
    downloadLanguages: (
        | "EN"
        | "RU"
        | "VI"
        | "TH"
        | "PT"
        | "KR"
        | "JP"
        | "ID"
        | "FR"
        | "ES"
        | "DE"
        | "CHT"
        | "CHS")[];
    fetchOption: RequestInit;
    imageBaseURLByRegex: {
        [url: string]: RegExp[];
    };
    showFetchCacheLog: boolean;
}

Properties

assetCacheFolderPath: string

asset cache folder path

node_modules/genshin-manager/cache
audioBaseURLByRegex: {
    [url: string]: RegExp[];
}

audio base url by regex

{}
autoCacheAudio: boolean

auto cache audio

true
autoCacheImage: boolean

auto cache image

true
autoFetchLatestAssetsByCron: undefined | string

auto fetch latest assets by cron

If this option is undefined, asset updates and initial setup are not executed

'0 0 0 * * 3' // minute hour day-of-month month day-of-week

https://crontab.guru/

autoFixExcelBin: boolean

Automatically fix the ExcelBin if it has not been downloaded or if there is an error in the json format

If autoFetchLatestAssetsByCron is undefined, this option will be ignored

true
autoFixTextMap: boolean

Automatically re-download the textMap if it has not been downloaded or if there is an error in the json format

If autoFetchLatestAssetsByCron is undefined, this option will be ignored

true
defaultAudioBaseURL: string

default audio base URL

'https://gi.yatta.top/assets/Audio'
defaultImageBaseURL: string

default image base URL

'https://gi.yatta.top/assets/UI'
defaultLanguage:
    | "EN"
    | "RU"
    | "VI"
    | "TH"
    | "PT"
    | "KR"
    | "JP"
    | "ID"
    | "FR"
    | "ES"
    | "DE"
    | "CHT"
    | "CHS"

default language

'EN'
downloadLanguages: (
    | "EN"
    | "RU"
    | "VI"
    | "TH"
    | "PT"
    | "KR"
    | "JP"
    | "ID"
    | "FR"
    | "ES"
    | "DE"
    | "CHT"
    | "CHS")[]

List of TextMaps to download when new assets are found.

['EN','RU','VI','TH','PT','KR','JP','ID','FR','ES','DE','CHT','CHS']
fetchOption: RequestInit

Fetch option

{
'user-agent': 'genshin-manager@x.x.x',
}
imageBaseURLByRegex: {
    [url: string]: RegExp[];
}

image base URL by regex

{
'https://enka.network/ui': [
/^UI_(AvatarIcon_Side|Costume)_/,
/^UI_AvatarIcon_(.+)_Card$/,
/^UI_AvatarIcon_(.+)_Circle/,
/^UI_NameCardPic_(.+)_Alpha/,
/^UI_EquipIcon_(.+)_Awaken/,
],
'https://res.cloudinary.com/genshin/image/upload/sprites': [
/^Eff_UI_Talent_/,
/^UI_(TowerPic|TowerBlessing|GcgIcon|Gcg_Cardtable|Gcg_CardBack)_/,
],
'https://gi.yatta.top/assets/UI/monster': [
/^UI_(MonsterIcon|AnimalIcon)_/,
],
'https://gi.yatta.top/assets/UI/gcg': [/^UI_Gcg_CardFace_/],
'https://gi.yatta.top/assets/UI/reliquary': [/^UI_RelicIcon_/],
'https://gi.yatta.top/assets/UI/namecard': [/^UI_NameCard/],
},
showFetchCacheLog: boolean

show fetch cache log

true