Updates
This commit is contained in:
@@ -4,15 +4,19 @@ import path from "path";
|
||||
type Param = {
|
||||
user?: DATASQUIREL_LoggedInUser | UserType;
|
||||
userId?: string | number | null;
|
||||
appDir?: string;
|
||||
};
|
||||
export default function grabDirNames(param?: Param) {
|
||||
const appDir = process.env.DSQL_APP_DIR;
|
||||
const schemasDir = process.env.DSQL_DB_SCHEMA_DIR;
|
||||
const tempDirName = ".tmp";
|
||||
const appDir = param?.appDir || process.env.DSQL_APP_DIR;
|
||||
|
||||
if (!appDir)
|
||||
throw new Error("Please provide the `DSQL_APP_DIR` env variable.");
|
||||
|
||||
const schemasDir =
|
||||
process.env.DSQL_DB_SCHEMA_DIR ||
|
||||
path.join(appDir, "jsonData", "dbSchemas");
|
||||
const tempDirName = ".tmp";
|
||||
|
||||
if (!schemasDir)
|
||||
throw new Error(
|
||||
"Please provide the `DSQL_DB_SCHEMA_DIR` env variable."
|
||||
@@ -67,7 +71,14 @@ export default function grabDirNames(param?: Param) {
|
||||
"docker/mariadb/load-balancer/config/template/nginx.conf"
|
||||
);
|
||||
|
||||
const dockerComposeFile = path.join(appDir, "docker-compose.yml");
|
||||
const testDockerComposeFile = path.join(appDir, "test.docker-compose.yml");
|
||||
const siteSetupFile = path.join(appDir, "site-setup.json");
|
||||
const envFile = path.join(appDir, ".env");
|
||||
const testEnvFile = path.join(appDir, "test.env");
|
||||
|
||||
return {
|
||||
appDir,
|
||||
schemasDir,
|
||||
userDirPath,
|
||||
mainShemaJSONFilePath,
|
||||
@@ -86,5 +97,10 @@ export default function grabDirNames(param?: Param) {
|
||||
userPrivateDbImportZipFileName,
|
||||
userPrivateDbImportZipFilePath,
|
||||
dbNginxLoadBalancerConfigFile,
|
||||
dockerComposeFile,
|
||||
testDockerComposeFile,
|
||||
siteSetupFile,
|
||||
envFile,
|
||||
testEnvFile,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user