Initial consolidatio of rome and imex versions.

This commit is contained in:
Patrick Fic
2025-10-24 11:29:14 -07:00
parent 75ee01e896
commit bc22c823f9
15 changed files with 295 additions and 23 deletions

47
env.js
View File

@@ -5,11 +5,6 @@ const ENV = {
API_URL: "https://api.test.imex.online",
uri: "https://db.test.bodyshop.app/v1/graphql",
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
REACT_APP_CLOUDINARY_ENDPOINT_API:
"https://api.cloudinary.com/v1_1/bodyshop",
REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop",
REACT_APP_CLOUDINARY_API_KEY: "473322739956866",
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250",
SPLIT_API: "ts615lqgnmk84thn72uk18uu5pgce6e0l4rc",
firebase: {
apiKey: "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c",
@@ -26,12 +21,6 @@ const ENV = {
API_URL: "https://api.imex.online",
uri: "https://db.imex.online/v1/graphql",
wsuri: "wss://db.imex.online/v1/graphql",
REACT_APP_CLOUDINARY_ENDPOINT_API:
"https://api.cloudinary.com/v1_1/bodyshop",
REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop",
REACT_APP_CLOUDINARY_API_KEY: "473322739956866",
SPLIT_API: "et9pjkik6bn67he5evpmpr1agoo7gactphgk",
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250",
firebase: {
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
authDomain: "imex-prod.firebaseapp.com",
@@ -43,11 +32,41 @@ const ENV = {
measurementId: "G-NTWBKG2L0M",
},
},
"rometest": {
API_URL: "https://api.test.romeonline.io",
uri: "https://db.test.romeonline.io/v1/graphql",
wsuri: "wss://db.test.romeonline.io/v1/graphql",
firebase: {
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
authDomain: "rome-prod-1.firebaseapp.com",
projectId: "rome-prod-1",
storageBucket: "rome-prod-1.appspot.com",
messagingSenderId: "147786367145",
appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
measurementId: "G-G8Z9DRHTZS",
},
},
"romeprod": {
API_URL: "https://api.romeonline.io",
uri: "https://db.romeonline.io/v1/graphql",
wsuri: "wss://db.romeonline.io/v1/graphql",
firebase: {
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
authDomain: "rome-prod-1.firebaseapp.com",
projectId: "rome-prod-1",
storageBucket: "rome-prod-1.appspot.com",
messagingSenderId: "147786367145",
appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
measurementId: "G-G8Z9DRHTZS",
},
}
};
const IS_ROME = process.env.APP_VARIANT === 'ROME';
function getEnvVars() {
if (Updates.channel !== "production") return ENV.test;
else return ENV.prod;
if (Updates.channel !== "production") return IS_ROME ? ENV.rometest : ENV.test;
else return IS_ROME ? ENV.romeprod : ENV.prod;
}
console.log(IS_ROME, process.env, "ENV: ", getEnvVars());
export default getEnvVars();