import path from "path";
import {createLog} from "../services/logger/logger.js";
import fs from "fs";

export const getAppInfo = async (appLock: string) => {
    try {
        const packagePath = path.join(appLock, "package.json");
        const packageJson = JSON.parse(fs.readFileSync(packagePath, "utf-8"));
        //const version = packageJson.version;
        return packageJson;
    } catch (error) {
        createLog("error", "lst", "zipUpBuild", `Error in getting the version: ${error}`);
        return error;
    }
};
