MCPcopy Create free account
hub / github.com/NobyDa/Script / runs

Function runs

TestFlight/TestFlightAccount.js:72–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70 .finally(() => $.done($.env.isQX ? rsp : { response: rsp }));
71
72async function runs() {
73 // Object.keys(list).map(a => delete list[a].only)
74 req.headers = formatHeaders(req.headers); //compatible with HTTP/2
75 const appID = req.url.split(/\/apps\/(\d+)/)[1];
76 const other = /\/(accept|withdraw|devices|session|notifications|status)/.test(req.url);
77 if (/accounts\/[a-z0-9-]{36}\/apps$/.test(req.url)) {
78 const acc = SaveAccount(req.url.split(/\/([a-z0-9-]{36})\//)[1]);
79 return await Promise.all(Object.keys(acc).map(QueryRequest));
80 } else if (/\/install$/.test(req.url) && req.body) {
81 req.body = JSON.parse(req.body);
82 req.body.storefrontId = '143441-19,29'; //prevent regional restrictions
83 req.body = JSON.stringify(req.body);
84 } else if (/\/[A-Z]{200,}\/redeem$/.test(req.url)) {
85 return { body: ExternalAccount(req.url.split(/\/([A-Z]+)\/redeem$/)[1]) };
86 }
87 return await QueryRequest(!other && appList[appID] || null);
88}
89
90function SaveAccount(id, part, o) {
91 if (!list[id]) {

Callers 1

Calls 5

SaveAccountFunction · 0.85
ExternalAccountFunction · 0.85
QueryRequestFunction · 0.85
formatHeadersFunction · 0.70
stringifyMethod · 0.45

Tested by

no test coverage detected