Skip to content

Commit

Permalink
fix: Storefront
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Oct 7, 2024
1 parent a6f770e commit e8901ee
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 17 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* 首次发布
### 🛠️ Bug Fixes
* Storefront 数据库
208 changes: 196 additions & 12 deletions src/function/database.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,197 @@
export default {
"Testflight": {
"Settings": {
"Switch": "true",
"CountryCode": "US",
"MultiAccount": "false",
"Universal": "true"
},
"Configs": {
"Storefront": {"AE":"143481","AF":"143610","AG":"143540","AI":"143538","AL":"143575","AM":"143524","AO":"143564","AR":"143505","AT":"143445","AU":"143460","AZ":"143568","BA":"143612","BB":"143541","BD":"143490","BE":"143446","BF":"143578","BG":"143526","BH":"143559","BJ":"143576","BM":"143542","BN":"143560","BO":"143556","BR":"143503","BS":"143539","BT":"143577","BW":"143525","BY":"143565","BZ":"143555","CA":"143455","CD":"143613","CG":"143582","CH":"143459","CI":"143527","CL":"143483","CM":"143574","CN":"143465","CO":"143501","CR":"143495","CV":"143580","CY":"143557","CZ":"143489","DE":"143443","DK":"143458","DM":"143545","DO":"143508","DZ":"143563","EC":"143509","EE":"143518","EG":"143516","ES":"143454","FI":"143447","FJ":"143583","FM":"143591","FR":"143442","GA":"143614","GB":"143444","GD":"143546","GF":"143615","GH":"143573","GM":"143584","GR":"143448","GT":"143504","GW":"143585","GY":"143553","HK":"143463","HN":"143510","HR":"143494","HU":"143482","ID":"143476","IE":"143449","IL":"143491","IN":"143467","IQ":"143617","IS":"143558","IT":"143450","JM":"143511","JO":"143528","JP":"143462","KE":"143529","KG":"143586","KH":"143579","KN":"143548","KP":"143466","KR":"143466","KW":"143493","KY":"143544","KZ":"143517","TC":"143552","TD":"143581","TJ":"143603","TH":"143475","TM":"143604","TN":"143536","TO":"143608","TR":"143480","TT":"143551","TW":"143470","TZ":"143572","LA":"143587","LB":"143497","LC":"143549","LI":"143522","LK":"143486","LR":"143588","LT":"143520","LU":"143451","LV":"143519","LY":"143567","MA":"143620","MD":"143523","ME":"143619","MG":"143531","MK":"143530","ML":"143532","MM":"143570","MN":"143592","MO":"143515","MR":"143590","MS":"143547","MT":"143521","MU":"143533","MV":"143488","MW":"143589","MX":"143468","MY":"143473","MZ":"143593","NA":"143594","NE":"143534","NG":"143561","NI":"143512","NL":"143452","NO":"143457","NP":"143484","NR":"143606","NZ":"143461","OM":"143562","PA":"143485","PE":"143507","PG":"143597","PH":"143474","PK":"143477","PL":"143478","PT":"143453","PW":"143595","PY":"143513","QA":"143498","RO":"143487","RS":"143500","RU":"143469","RW":"143621","SA":"143479","SB":"143601","SC":"143599","SE":"143456","SG":"143464","SI":"143499","SK":"143496","SL":"143600","SN":"143535","SR":"143554","ST":"143598","SV":"143506","SZ":"143602","UA":"143492","UG":"143537","US":"143441","UY":"143514","UZ":"143566","VC":"143550","VE":"143502","VG":"143543","VN":"143471","VU":"143609","XK":"143624","YE":"143571","ZA":"143472","ZM":"143622","ZW":"143605"}
}
}
}
"Testflight": {
"Settings": {
"Switch": true,
"CountryCode": "US",
"MultiAccount": false,
"Universal": true,
},
},
"Default": {
"Settings": {
"Switch": true,
},
"Configs": {
"Storefront": {
"AE": "143481",
"AF": "143610",
"AG": "143540",
"AI": "143538",
"AL": "143575",
"AM": "143524",
"AO": "143564",
"AR": "143505",
"AT": "143445",
"AU": "143460",
"AZ": "143568",
"BA": "143612",
"BB": "143541",
"BD": "143490",
"BE": "143446",
"BF": "143578",
"BG": "143526",
"BH": "143559",
"BJ": "143576",
"BM": "143542",
"BN": "143560",
"BO": "143556",
"BR": "143503",
"BS": "143539",
"BT": "143577",
"BW": "143525",
"BY": "143565",
"BZ": "143555",
"CA": "143455",
"CD": "143613",
"CG": "143582",
"CH": "143459",
"CI": "143527",
"CL": "143483",
"CM": "143574",
"CN": "143465",
"CO": "143501",
"CR": "143495",
"CV": "143580",
"CY": "143557",
"CZ": "143489",
"DE": "143443",
"DK": "143458",
"DM": "143545",
"DO": "143508",
"DZ": "143563",
"EC": "143509",
"EE": "143518",
"EG": "143516",
"ES": "143454",
"FI": "143447",
"FJ": "143583",
"FM": "143591",
"FR": "143442",
"GA": "143614",
"GB": "143444",
"GD": "143546",
"GF": "143615",
"GH": "143573",
"GM": "143584",
"GR": "143448",
"GT": "143504",
"GW": "143585",
"GY": "143553",
"HK": "143463",
"HN": "143510",
"HR": "143494",
"HU": "143482",
"ID": "143476",
"IE": "143449",
"IL": "143491",
"IN": "143467",
"IQ": "143617",
"IS": "143558",
"IT": "143450",
"JM": "143511",
"JO": "143528",
"JP": "143462",
"KE": "143529",
"KG": "143586",
"KH": "143579",
"KN": "143548",
"KP": "143466",
"KR": "143466",
"KW": "143493",
"KY": "143544",
"KZ": "143517",
"TC": "143552",
"TD": "143581",
"TJ": "143603",
"TH": "143475",
"TM": "143604",
"TN": "143536",
"TO": "143608",
"TR": "143480",
"TT": "143551",
"TW": "143470",
"TZ": "143572",
"LA": "143587",
"LB": "143497",
"LC": "143549",
"LI": "143522",
"LK": "143486",
"LR": "143588",
"LT": "143520",
"LU": "143451",
"LV": "143519",
"LY": "143567",
"MA": "143620",
"MD": "143523",
"ME": "143619",
"MG": "143531",
"MK": "143530",
"ML": "143532",
"MM": "143570",
"MN": "143592",
"MO": "143515",
"MR": "143590",
"MS": "143547",
"MT": "143521",
"MU": "143533",
"MV": "143488",
"MW": "143589",
"MX": "143468",
"MY": "143473",
"MZ": "143593",
"NA": "143594",
"NE": "143534",
"NG": "143561",
"NI": "143512",
"NL": "143452",
"NO": "143457",
"NP": "143484",
"NR": "143606",
"NZ": "143461",
"OM": "143562",
"PA": "143485",
"PE": "143507",
"PG": "143597",
"PH": "143474",
"PK": "143477",
"PL": "143478",
"PT": "143453",
"PW": "143595",
"PY": "143513",
"QA": "143498",
"RO": "143487",
"RS": "143500",
"RU": "143469",
"RW": "143621",
"SA": "143479",
"SB": "143601",
"SC": "143599",
"SE": "143456",
"SG": "143464",
"SI": "143499",
"SK": "143496",
"SL": "143600",
"SN": "143535",
"SR": "143554",
"ST": "143598",
"SV": "143506",
"SZ": "143602",
"UA": "143492",
"UG": "143537",
"US": "143441",
"UY": "143514",
"UZ": "143566",
"VC": "143550",
"VE": "143502",
"VG": "143543",
"VN": "143471",
"VU": "143609",
"XK": "143624",
"YE": "143571",
"ZA": "143472",
"ZM": "143622",
"ZW": "143605",
},
},
},
};
4 changes: 2 additions & 2 deletions src/request.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
} else Storage.setItem("@iRingo.TestFlight.Caches", { ...Caches, ...body }); // Caches空
}
*/
if (Settings.CountryCode !== "AUTO") body.storeFrontIdentifier = body.storeFrontIdentifier.replace(/\d{6}/, Configs.Storefront.get(Settings.CountryCode));
if (Settings.CountryCode !== "AUTO") body.storeFrontIdentifier = body.storeFrontIdentifier.replace(/\d{6}/, Configs.Storefront[Settings.CountryCode]);
break;
case "/v1/properties/testflight":
break;
Expand Down Expand Up @@ -117,7 +117,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
break;
case "install":
log(`🚧 /${PATHs[0]}/accounts/${PATHs[2]}/apps/${PATHs[4]}/builds/${PATHs[6]}/install`, "");
if (Settings.CountryCode !== "AUTO") body.storefrontId = body.storefrontId.replace(/\d{6}/, Configs.Storefront.get(Settings.CountryCode));
if (Settings.CountryCode !== "AUTO") body.storefrontId = body.storefrontId.replace(/\d{6}/, Configs.Storefront[Settings.CountryCode]);
break;
default:
log(`🚧 /${PATHs[0]}/accounts/${PATHs[2]}/apps/${PATHs[4]}/builds/${PATHs[6]}/${PATHs[7]}`, "");
Expand Down
4 changes: 2 additions & 2 deletions src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case "testflight.apple.com":
switch (PATH) {
case "/v1/session/authenticate":
if (Settings.CountryCode !== "AUTO") body.storeFrontIdentifier = body.storeFrontIdentifier.replace(/\d{6}/, Configs.Storefront.get(Settings.CountryCode));
if (Settings.CountryCode !== "AUTO") body.storeFrontIdentifier = body.storeFrontIdentifier.replace(/\d{6}/, Configs.Storefront[Settings.CountryCode]);
break;
case "/v1/properties/testflight":
break;
Expand Down Expand Up @@ -88,7 +88,7 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
case undefined:
break;
case "install":
if (Settings.CountryCode !== "AUTO") body.storefrontId = body.storefrontId.replace(/\d{6}/, Configs.Storefront.get(Settings.CountryCode));
if (Settings.CountryCode !== "AUTO") body.storefrontId = body.storefrontId.replace(/\d{6}/, Configs.Storefront[Settings.CountryCode]);
break;
default:
break;
Expand Down

0 comments on commit e8901ee

Please sign in to comment.