feat(app update): finished the app build / deploy functions and a scripts migration

This commit is contained in:
2025-03-14 13:36:26 -05:00
parent 51b81b97bc
commit 81eb10e021
3 changed files with 362 additions and 20 deletions

View File

@@ -3,6 +3,7 @@ import path from "path";
import fs from "fs";
import {execSync} from "child_process";
import {createLog} from "../services/logger/logger.js";
import {getAppInfo} from "../globalUtils/appInfo.js";
// create the ignore list
const ignoreList = [
@@ -34,18 +35,6 @@ const ignoreList = [
"frontend/vite.config.ts",
];
const getAdmInfo = 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;
}
};
const shouldIgnore = (itemPath: any) => {
const normalizedItemPath = itemPath.replace(/\\/g, "/");
@@ -109,7 +98,7 @@ const updateBuildNumber = (appLock: string) => {
};
export const createZip = async (appLock: string) => {
const app = await getAdmInfo(appLock);
const app = await getAppInfo(appLock);
const zip = new AdmZip();
//dest path for this app... hard coded for meow will be in db later