monday-sdk-js 0.4.6 → 0.4.7
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/package.json +1 -1
- package/src/constants.js +3 -3
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -2,12 +2,12 @@ function isNodeEnv() {
|
|
|
2
2
|
return typeof process !== "undefined";
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
function
|
|
6
|
-
return isNodeEnv() && process.env.NODE_ENV === "development";
|
|
5
|
+
function isNodeDevStageEnv() {
|
|
6
|
+
return isNodeEnv() && (process.env.NODE_ENV === "development" || process.env.NODE_ENV === "staging");
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const getEnvOrDefault = (key, defaultVal) => {
|
|
10
|
-
return
|
|
10
|
+
return isNodeDevStageEnv() && process.env[key] !== "undefined" ? process.env[key] : defaultVal;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const MONDAY_PROTOCOL = () => getEnvOrDefault("MONDAY_COM_PROTOCOL", "https");
|