update TestFlight

This commit is contained in:
king
2025-09-21 09:31:51 +08:00
parent 8404eb29e7
commit 67b473bc13

View File

@ -12,7 +12,7 @@ const isNode = $.isNode();
const notify = isNode ? require('./sendNotify') : ''; const notify = isNode ? require('./sendNotify') : '';
$.nodeNotifyMsg = []; // nodeJS合并通知 $.nodeNotifyMsg = []; // nodeJS合并通知
let TF_APP_ID = isNode ? process.env["fmz200_TF_APP_ID"] : $.getdata("fmz200_TF_APP_ID"); const TF_APP_ID = isNode ? process.env["fmz200_TF_APP_ID"] : $.getdata("fmz200_TF_APP_ID");
const userAgents = [ const userAgents = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 11_6_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_6_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
@ -73,37 +73,37 @@ function autoPost(appId, appName, appIdInfo) {
return new Promise(function (resolve) { return new Promise(function (resolve) {
$.get({url: url, headers: header}, async function (error, resp, data) { $.get({url: url, headers: header}, async function (error, resp, data) {
console.log("❤️ 查询appId情况响应"); console.log("❤️ 查询appId情况响应");
console.log("1、打印error"); // console.log("1、打印error");
console.log(error); // console.log(error);
// console.log("2、打印resp包括headersstatusbody"); // console.log("2、打印resp包括headersstatusbody");
// console.log(resp); // console.log(resp);
// console.log("3、打印data这是响应体"); // console.log("3、打印data这是响应体");
// console.log(data); // console.log(data);
if (resp.status === 404) { if (resp.status === 404) {
console.log(`[D] ${url} → 不存在 ⚠️`); console.log(`[D] ${appIdInfo} → 不存在 ⚠️`);
resolve(); resolve();
} }
if (resp.status !== 200) { if (resp.status !== 200) {
console.log(`[?] ${url} → 返回状态码: ${resp.status}`); console.log(`[?] ${appIdInfo} → 返回状态码: ${resp.status}`);
resolve(); resolve();
} }
if (error == null) { if (error == null) {
// 检查状态 F // 检查状态 F
if (/版本的测试员已满|This beta is full/.test(data)) { if (/版本的测试员已满|This beta is full/.test(data)) {
console.log(`[F] ${url} → 已满`); console.log(`[F] ${appIdInfo} → 已满`);
resolve(); resolve();
} }
// 检查状态 N // 检查状态 N
else if (/版本目前不接受任何新测试员|This beta isn't accepting any new testers/.test(data)) { else if (/版本目前不接受任何新测试员|This beta isn't accepting any new testers/.test(data)) {
console.log(`[N] ${url} → 暂不接受新成员`); console.log(`[N] ${appIdInfo} → 暂不接受新成员`);
resolve(); resolve();
} }
// 检查状态 Y这里的“To join the”有两个地方其实不太准确但是确实是可以加入的上面的匹配不到默认是可以加入的 // 检查状态 Y这里的“To join the”有两个地方其实不太准确但是确实是可以加入的上面的匹配不到默认是可以加入的
else if (/要加入 Beta 版|To join the/.test(data)) { else if (/要加入 Beta 版|To join the/.test(data)) {
console.log(`[Y] ${url} → 可加入`); console.log(`[Y] ${appIdInfo} → 可加入`);
if (isNode) { if (isNode) {
$.nodeNotifyMsg.push(`[${appIdInfo}]可加入URL: ${url}`); $.nodeNotifyMsg.push(`[${appIdInfo}]可加入URL: ${url}`);
} else { } else {
@ -115,8 +115,10 @@ function autoPost(appId, appName, appIdInfo) {
} }
resolve(); resolve();
} }
} else {
console.log("something went wrong!");
resolve();
} }
resolve();
}) })
}) })
} }