WIP: stable version

This commit is contained in:
Andrii Dokhniak 2025-09-29 17:18:59 +02:00
parent ccd9ccecbd
commit 7a2af14a33
3 changed files with 6 additions and 16 deletions

View File

@ -83,15 +83,11 @@ io.on("connection", (socket) => {
screenshots_in_flight++; screenshots_in_flight++;
let screen; let screen;
try { try {
screen = await fetch( screen = await get_screenshot();
"http://localhost:9987/v2/uiDevice/screenshot" socket.emit("screenshot_data", screen);
);
let body = await screen.bytes();
screen = (await get_screenshot()).buffer;
socket.emit("screenshot_data", body);
} catch (err) { } catch (err) {
console.error( console.error(
"Failed to get the screenshot from culebra, the emulator probably died", "Failed to get the screenshot. The emulator probably died",
err err
); );
return; return;

View File

@ -1010,7 +1010,7 @@
"node_modules/har-analyzer": { "node_modules/har-analyzer": {
"name": "module-starter", "name": "module-starter",
"version": "0.0.1", "version": "0.0.1",
"resolved": "git+ssh://git@hub.sealcode.org/diffusion/171/har-parser.git#a5b43f08ac2209ac959cfef9538449167fae4e8d", "resolved": "git+ssh://git@hub.sealcode.org/diffusion/171/har-parser.git#ac4ead15060f0554407ac921f62a7bacd08cfb97",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@smithy/util-hex-encoding": "^4.0.0", "@smithy/util-hex-encoding": "^4.0.0",

View File

@ -5,14 +5,8 @@ async function sleep(time) {
} }
async function checkCertExistance() { async function checkCertExistance() {
try { await fs.access("./certificates/mitmproxy-ca-cert.pem");
return await Promise.all([ await fs.access("./certificates/mitmproxy-ca.pem", fs.constants.R_OK);
fs.access("./certificates/mitmproxy-ca-cert.pem"),
fs.access("./certificates/mitmproxy-ca.pem", fs.constants.R_OK),
]);
} catch (_) {
return false;
}
} }
async function generateCert() { async function generateCert() {