FIx random build error

This commit is contained in:
TPN 2024-08-04 20:10:43 +00:00
parent b1a68ce6ca
commit 276620b8b4
3 changed files with 419 additions and 421 deletions

View File

@ -50,17 +50,17 @@
"prepublishOnly": "pnpm test && pnpm run lint" "prepublishOnly": "pnpm test && pnpm run lint"
}, },
"devDependencies": { "devDependencies": {
"@nabla/vite-plugin-eslint": "^2.0.2", "@nabla/vite-plugin-eslint": "^2.0.4",
"@types/cookie": "^0.6.0", "@types/cookie": "^0.6.0",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/node-fetch": "^2.6.11", "@types/node-fetch": "^2.6.11",
"@types/randombytes": "^2.0.3", "@types/randombytes": "^2.0.3",
"@types/set-cookie-parser": "^2.4.7", "@types/set-cookie-parser": "^2.4.10",
"@types/spinnies": "^0.5.3", "@types/spinnies": "^0.5.3",
"@typescript-eslint/eslint-plugin": "^7.4.0", "@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.4.0", "@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-v8": "^1.4.0", "@vitest/coverage-v8": "^1.6.0",
"commander": "^12.0.0", "commander": "^12.1.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"enquirer": "^2.4.1", "enquirer": "^2.4.1",
@ -69,29 +69,29 @@
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1", "eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.2.1",
"node-fetch": "^3.3.2", "node-fetch": "^3.3.2",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"puppeteer": "^22.6.1", "puppeteer": "^22.15.0",
"spinnies": "^0.5.1", "spinnies": "^0.5.1",
"tsc-alias": "^1.8.8", "tsc-alias": "^1.8.10",
"tsconfig-paths": "^4.2.0", "tsconfig-paths": "^4.2.0",
"typescript": "^5.4.3", "typescript": "^5.5.4",
"vite": "^5.2.7", "vite": "^5.3.5",
"vite-node": "^1.4.0", "vite-node": "^1.6.0",
"vite-plugin-dts": "^3.8.1", "vite-plugin-dts": "^3.9.1",
"vitest": "^1.4.0" "vitest": "^1.6.0"
}, },
"dependencies": { "dependencies": {
"cheerio": "^1.0.0-rc.12", "cheerio": "1.0.0-rc.12",
"cookie": "^0.6.0", "cookie": "^0.6.0",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"hls-parser": "^0.13.2", "hls-parser": "^0.13.3",
"iso-639-1": "^3.1.2", "iso-639-1": "^3.1.2",
"nanoid": "^3.3.7", "nanoid": "^3.3.7",
"node-fetch": "^3.3.2", "node-fetch": "^3.3.2",
"set-cookie-parser": "^2.6.0", "set-cookie-parser": "^2.7.0",
"unpacker": "^1.0.1" "unpacker": "^1.0.1"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ export async function login(
const cookie = parseSetCookie( const cookie = parseSetCookie(
// It retruns a cookie even when the login failed // It retruns a cookie even when the login failed
// I have the backup cookie here just in case // I have the backup cookie here just in case
res.status === 1 ? req.headers.get('Set-Cookie') ?? '' : 'PHPSESSID=mk2p73c77qc28o5i5120843ruu;', res.status === 1 ? (req.headers.get('Set-Cookie') ?? '') : 'PHPSESSID=mk2p73c77qc28o5i5120843ruu;',
); );
return cookie.PHPSESSID.value; return cookie.PHPSESSID.value;