@alicloud/alfa-core 1.5.6 → 1.5.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/es/utils/env.js +6 -3
- package/lib/utils/env.js +6 -3
- package/package.json +2 -2
package/es/utils/env.js
CHANGED
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
* @returns
|
|
4
4
|
*/
|
|
5
5
|
export var getEnv = function getEnv(value) {
|
|
6
|
-
var
|
|
6
|
+
var _window, _window$ALIYUN_CONSOL;
|
|
7
7
|
if (value) return value;
|
|
8
|
-
if (
|
|
9
|
-
|
|
8
|
+
if (typeof process !== 'undefined') {
|
|
9
|
+
var _process;
|
|
10
|
+
if (((_process = process) === null || _process === void 0 ? void 0 : _process.env.NODE_ENV) === 'development') {
|
|
11
|
+
return 'local';
|
|
12
|
+
}
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
// default return prod
|
package/lib/utils/env.js
CHANGED
|
@@ -9,10 +9,13 @@ exports.getEnv = void 0;
|
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
var getEnv = exports.getEnv = function getEnv(value) {
|
|
12
|
-
var
|
|
12
|
+
var _window, _window$ALIYUN_CONSOL;
|
|
13
13
|
if (value) return value;
|
|
14
|
-
if (
|
|
15
|
-
|
|
14
|
+
if (typeof process !== 'undefined') {
|
|
15
|
+
var _process;
|
|
16
|
+
if (((_process = process) === null || _process === void 0 ? void 0 : _process.env.NODE_ENV) === 'development') {
|
|
17
|
+
return 'local';
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
// default return prod
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alicloud/alfa-core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"description": "MicroFront End SDK for alicloud",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"crypto-js": "^4.1.1",
|
|
33
33
|
"qs": "^6.14.0",
|
|
34
34
|
"tslib": "^2.4.0",
|
|
35
|
-
"@alicloud/console-os-kernal": "^1.4.38
|
|
35
|
+
"@alicloud/console-os-kernal": "^1.4.38"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "breezr build --engine webpack",
|