fix(mobile): typo for version checking

This commit is contained in:
2026-04-26 19:51:12 -05:00
parent bddc9aca0d
commit 0b7318f856
3 changed files with 19 additions and 891 deletions

View File

@@ -2,7 +2,6 @@ import fs from "node:fs";
import { Router } from "express"; import { Router } from "express";
import path from "path"; import path from "path";
import { fileURLToPath } from "url"; import { fileURLToPath } from "url";
import { getConfig } from "@expo/config";
const router = Router(); const router = Router();
@@ -10,19 +9,22 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); const __dirname = path.dirname(__filename);
const downloadDir = path.resolve(__dirname, "../../downloads/mobile"); const downloadDir = path.resolve(__dirname, "../../downloads/mobile");
const projectRoot = path.resolve("./lstMobile"); // adjust if needed const projectRoot = path.resolve("./lstMobile"); // adjust as needed
const appJsonPath = path.join(projectRoot, "app.json");
const { exp } = getConfig(projectRoot); const raw = fs.readFileSync(appJsonPath, "utf-8");
const config = JSON.parse(raw);
const exp = config.expo;
const currentApk = { const currentApk = {
packageName: exp.android?.package, packageName: exp.android?.package,
versionName: exp.version, versionName: exp.version,
versionCode: exp.android?.versionCode, versionCode: exp.android?.versionCode,
minSupportedVersionCode: 1, // keep this custom if needed minSupportedVersionCode: 1, // keep this custom if needed
fileName: "lst-mobile.apk", fileName: "lst-mobile.apk",
}; };
router.get("/version", async (req, res) => { router.get("/version", async (req, res) => {
const baseUrl = `${req.protocol}://${req.get("host")}`; const baseUrl = `${req.protocol}://${req.get("host")}`;

889
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -65,7 +65,6 @@
}, },
"dependencies": { "dependencies": {
"@dotenvx/dotenvx": "^1.57.0", "@dotenvx/dotenvx": "^1.57.0",
"@expo/config": "^55.0.15",
"@scalar/express-api-reference": "^0.9.4", "@scalar/express-api-reference": "^0.9.4",
"@socket.io/admin-ui": "^0.5.1", "@socket.io/admin-ui": "^0.5.1",
"archiver": "^7.0.1", "archiver": "^7.0.1",