@arcadialdev/arcality 2.6.7 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,8 +18,7 @@ export const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
18
18
  * @returns {string}
19
19
  */
20
20
  export function getApiUrl() {
21
- // return 'https://arcalityqadev.arcadial.lat';
22
- return 'https://arcalityqadev.arcadial.lat';
21
+ return 'https://arcalityqadev.arcadial.lat';
23
22
  }
24
23
 
25
24
  /**
@@ -66,6 +65,11 @@ export function loadConfig() {
66
65
  return config;
67
66
  }
68
67
 
68
+ export function loadProjectId() {
69
+ const localConfig = loadLocalArcalityConfig();
70
+ return localConfig?.projectId || process.env.ARCALITY_PROJECT_ID;
71
+ }
72
+
69
73
 
70
74
  /**
71
75
  * Reads the user's global config (~/.arcality/config.json)
@@ -127,7 +127,7 @@ export function injectConfigToEnv(config) {
127
127
 
128
128
  if (config.apiKey) process.env.ARCALITY_API_KEY = config.apiKey;
129
129
  if (config.projectId) process.env.ARCALITY_PROJECT_ID = config.projectId;
130
- if (config.project?.baseUrl) {
130
+ if (config.project?.baseUrl && !process.env.BASE_URL) {
131
131
  process.env.BASE_URL = config.project.baseUrl;
132
132
  }
133
133
  if (config.auth?.username) process.env.LOGIN_USER = config.auth.username;