fix: build errors

This commit is contained in:
trafficlunar 2025-04-09 13:49:09 +01:00
parent 4a65994d35
commit 516923905d
15 changed files with 65 additions and 57 deletions

View file

@ -6,7 +6,7 @@ const MIN_IMAGE_DIMENSIONS = 128;
const MAX_IMAGE_DIMENSIONS = 1024;
const MAX_IMAGE_SIZE = 1024 * 1024; // 1 MB
const THRESHOLD = 0.5;
// const THRESHOLD = 0.5;
// tf.enableProdMode();

View file

@ -15,7 +15,7 @@ export function convertQrCode(bytes: Uint8Array): { mii: Mii; tomodachiLifeMii:
let decrypted: Uint8Array<ArrayBufferLike> = new Uint8Array();
try {
decrypted = AES_CCM.decrypt(content, MII_DECRYPTION_KEY, nonceWithZeros, undefined, 16);
} catch (error) {
} catch {
throw new Error("Failed to decrypt QR code. It may be invalid or corrupted");
}
@ -40,7 +40,7 @@ export function convertQrCode(bytes: Uint8Array): { mii: Mii; tomodachiLifeMii:
}
return { mii, tomodachiLifeMii };
} catch (error) {
} catch {
throw new Error("Mii data is not valid");
}
}