From 3ac2e0f668a90b5361240b10852624b1ea7bbf49 Mon Sep 17 00:00:00 2001 From: Leo Conforti Date: Fri, 10 May 2024 09:50:49 +0000 Subject: [PATCH] add assert for playstore download url --- packages/fount/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fount/src/index.ts b/packages/fount/src/index.ts index 5aad15e..2fbfead 100644 --- a/packages/fount/src/index.ts +++ b/packages/fount/src/index.ts @@ -1,3 +1,4 @@ +import * as assert from "node:assert"; import * as path from "node:path"; import * as url from "node:url"; @@ -94,6 +95,7 @@ export const loadApk = , An // Not found in cache directory, need to download it const results: readonly [string, IPuppeteerDetails] = yield* getApksupportDetails(game, versionInfo); yield* Effect.logInfo(`Puppeteer scraping results: ${results[0]}`); + assert.ok(results[0].startsWith("https://play.googleapis.com/download/")); // Stream the download directly to the downloads folder const downloadedFile: string = `${cacheDirectory}/${desiredApkFilename}`;