修复虎牙手机号登录并统一部署项目名
This commit is contained in:
@@ -6,12 +6,18 @@ const path = require('path');
|
||||
const https = require('https');
|
||||
|
||||
globalThis.window = globalThis;
|
||||
const stateDir = process.argv[2] || '.';
|
||||
let _deviceOverrides = null;
|
||||
try { _deviceOverrides = JSON.parse(fs.readFileSync(process.argv[3] || '', 'utf8')); } catch (e) {}
|
||||
// Prefer an explicitly supplied JSON path; otherwise use the device hint that
|
||||
// get_huya_sdid writes into the per-account state directory.
|
||||
try {
|
||||
const hintPath = process.argv[3] && process.argv[3].endsWith('.json')
|
||||
? process.argv[3] : path.join(stateDir, 'device.json');
|
||||
_deviceOverrides = JSON.parse(fs.readFileSync(hintPath, 'utf8'));
|
||||
} catch (e) {}
|
||||
require(path.join(__dirname, 'env.js')).makeEnv(_deviceOverrides);
|
||||
|
||||
// ---- localStorage 持久化(设备稳定性) ----
|
||||
const stateDir = process.argv[2] || '.';
|
||||
try { fs.mkdirSync(stateDir, {recursive: true}); } catch (e) {}
|
||||
const lsFile = path.join(stateDir, 'localstorage.json');
|
||||
let _ls = {};
|
||||
|
||||
Reference in New Issue
Block a user