@mono-labs/cli 0.0.63 → 0.0.64
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.
package/lib/app.js
CHANGED
|
@@ -30,9 +30,9 @@ program
|
|
|
30
30
|
.name(programName)
|
|
31
31
|
.description(pkg.description || '')
|
|
32
32
|
.version(version);
|
|
33
|
-
const
|
|
34
|
-
(process.env.
|
|
35
|
-
process.env.
|
|
33
|
+
const NEXT_PUBLIC_API_URL =
|
|
34
|
+
(process.env.NEXT_PUBLIC_API_URL &&
|
|
35
|
+
process.env.NEXT_PUBLIC_API_URL.length > 0) ||
|
|
36
36
|
STAGING_URL;
|
|
37
37
|
|
|
38
38
|
export const generateEnvValues = (
|
|
@@ -42,7 +42,7 @@ export const generateEnvValues = (
|
|
|
42
42
|
) => {
|
|
43
43
|
return {
|
|
44
44
|
...process.env,
|
|
45
|
-
|
|
45
|
+
NEXT_PUBLIC_API_URL,
|
|
46
46
|
NEXT_FORCE_PROD: forceProd,
|
|
47
47
|
EXPO_PRIVATE_API_URL: ngrokUrl,
|
|
48
48
|
EXPO_UNSTABLE_ATLAS: useAtlas,
|
|
@@ -47,11 +47,11 @@ program
|
|
|
47
47
|
|
|
48
48
|
let envObj = generateEnvValues(NEXT_FORCE_PROD, '', false);
|
|
49
49
|
if (!isDev) {
|
|
50
|
-
envObj.
|
|
50
|
+
envObj.NEXT_PUBLIC_API_URL = `${STAGING_URL}`;
|
|
51
51
|
envObj.NEXT_FORCE_PROD = 'true';
|
|
52
52
|
} else {
|
|
53
|
-
const publicUrl = process.env.
|
|
54
|
-
envObj.
|
|
53
|
+
const publicUrl = process.env.NEXT_PUBLIC_API_URL || `${STAGING_URL}`;
|
|
54
|
+
envObj.NEXT_PUBLIC_API_URL = publicUrl;
|
|
55
55
|
}
|
|
56
56
|
console.log('envObj', envObj);
|
|
57
57
|
envObj.EAS_BUILD_PROFILE = profile; // your custom variable
|
|
@@ -203,12 +203,12 @@ export async function dev(_forceProd, useAtlas, argServices, stage) {
|
|
|
203
203
|
|
|
204
204
|
let envObj = generateEnvValues(forceProd, ngrokUrl, useAtlas);
|
|
205
205
|
if (stage) {
|
|
206
|
-
envObj.
|
|
206
|
+
envObj.NEXT_PUBLIC_API_URL = `${STAGING_URL}`;
|
|
207
207
|
envObj.ApiUrl = `${STAGING_URL}`;
|
|
208
208
|
envObj.NEXT_FORCE_PROD = 'true';
|
|
209
209
|
} else {
|
|
210
|
-
const publicUrl = process.env.
|
|
211
|
-
envObj.
|
|
210
|
+
const publicUrl = process.env.NEXT_PUBLIC_API_URL || `${STAGING_URL}`;
|
|
211
|
+
envObj.NEXT_PUBLIC_API_URL = publicUrl;
|
|
212
212
|
envObj.ApiUrl = `${STAGING_URL}`;
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -5,7 +5,7 @@ import { program } from '../../app.js';
|
|
|
5
5
|
import { STAGING_URL } from '../../config.js';
|
|
6
6
|
import { getEASBranches } from './eas.js';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const NEXT_PUBLIC_API_URL = STAGING_URL;
|
|
9
9
|
const NEXT_FORCE_PROD = true;
|
|
10
10
|
const EXPO_BUILD_PROFILE = 'production';
|
|
11
11
|
|
|
@@ -25,7 +25,7 @@ program
|
|
|
25
25
|
env: {
|
|
26
26
|
...process.env,
|
|
27
27
|
NEXT_FORCE_PROD,
|
|
28
|
-
|
|
28
|
+
NEXT_PUBLIC_API_URL,
|
|
29
29
|
EXPO_BUILD_PROFILE,
|
|
30
30
|
},
|
|
31
31
|
});
|
|
@@ -74,7 +74,7 @@ program
|
|
|
74
74
|
env: {
|
|
75
75
|
...process.env,
|
|
76
76
|
NEXT_FORCE_PROD,
|
|
77
|
-
|
|
77
|
+
NEXT_PUBLIC_API_URL,
|
|
78
78
|
EXPO_BUILD_PROFILE,
|
|
79
79
|
},
|
|
80
80
|
});
|