@alicloud/alfa-core 1.5.6 → 1.5.8-beta.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.
@@ -9,16 +9,16 @@ export default function responseErrorInterceptor(_x) {
9
9
  function _responseErrorInterceptor() {
10
10
  _responseErrorInterceptor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(error) {
11
11
  var _error$response;
12
- var config, response;
13
- return _regeneratorRuntime.wrap(function _callee$(_context) {
12
+ var config, response, _t;
13
+ return _regeneratorRuntime.wrap(function (_context) {
14
14
  while (1) switch (_context.prev = _context.next) {
15
15
  case 0:
16
16
  if (axios.isAxiosError(error)) {
17
- _context.next = 2;
17
+ _context.next = 1;
18
18
  break;
19
19
  }
20
20
  throw error;
21
- case 2:
21
+ case 1:
22
22
  config = error.config;
23
23
  response = {
24
24
  status: 404,
@@ -27,23 +27,23 @@ function _responseErrorInterceptor() {
27
27
  config: config,
28
28
  data: null
29
29
  };
30
- _context.prev = 4;
31
- _context.next = 7;
30
+ _context.prev = 2;
31
+ _context.next = 3;
32
32
  return axios(config);
33
- case 7:
33
+ case 3:
34
34
  response = _context.sent;
35
- _context.next = 12;
35
+ _context.next = 5;
36
36
  break;
37
- case 10:
38
- _context.prev = 10;
39
- _context.t0 = _context["catch"](4);
40
- case 12:
37
+ case 4:
38
+ _context.prev = 4;
39
+ _t = _context["catch"](2);
40
+ case 5:
41
41
  return _context.abrupt("return", response);
42
- case 13:
42
+ case 6:
43
43
  case "end":
44
44
  return _context.stop();
45
45
  }
46
- }, _callee, null, [[4, 10]]);
46
+ }, _callee, null, [[2, 4]]);
47
47
  }));
48
48
  return _responseErrorInterceptor.apply(this, arguments);
49
49
  }
@@ -44,7 +44,7 @@ export default function requestInterceptor(_x) {
44
44
  }
45
45
  function _requestInterceptor() {
46
46
  _requestInterceptor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(config) {
47
- return _regeneratorRuntime.wrap(function _callee$(_context) {
47
+ return _regeneratorRuntime.wrap(function (_context) {
48
48
  while (1) switch (_context.prev = _context.next) {
49
49
  case 0:
50
50
  if (currentCdnHost && currentCdnHost !== 'alicdn.com' && (whiteList.includes(currentCdnHost) || gCdnHost.includes(currentCdnHost))) {
@@ -55,7 +55,7 @@ function _requestInterceptor() {
55
55
  }
56
56
  }
57
57
  return _context.abrupt("return", config);
58
- case 2:
58
+ case 1:
59
59
  case "end":
60
60
  return _context.stop();
61
61
  }
@@ -74,37 +74,37 @@ export default function responseInterceptor(_x) {
74
74
  function _responseInterceptor() {
75
75
  _responseInterceptor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
76
76
  var data, config, url, newResponse, error;
77
- return _regeneratorRuntime.wrap(function _callee$(_context) {
77
+ return _regeneratorRuntime.wrap(function (_context) {
78
78
  while (1) switch (_context.prev = _context.next) {
79
79
  case 0:
80
80
  data = response.data, config = response.config;
81
81
  url = config.url; // check data is legal object JSON
82
82
  if (!isLegal(url, data)) {
83
- _context.next = 6;
83
+ _context.next = 1;
84
84
  break;
85
85
  }
86
86
  return _context.abrupt("return", response);
87
- case 6:
87
+ case 1:
88
88
  config.url = url === null || url === void 0 ? void 0 : url.replace(/:\/\/cws\.([a-z0-9-]+)\.com\//, function (match, p1) {
89
89
  return "://cws2.".concat(p1, ".com/");
90
90
  });
91
- _context.next = 9;
91
+ _context.next = 2;
92
92
  return axios(config);
93
- case 9:
93
+ case 2:
94
94
  newResponse = _context.sent;
95
95
  if (!isLegal(url, newResponse.data)) {
96
- _context.next = 12;
96
+ _context.next = 3;
97
97
  break;
98
98
  }
99
99
  return _context.abrupt("return", newResponse);
100
- case 12:
100
+ case 3:
101
101
  error = new Error();
102
102
  error.message = 'responseDataIllegal';
103
103
  error.code = '0';
104
104
  error.config = config;
105
105
  error.response = response;
106
106
  throw error;
107
- case 18:
107
+ case 4:
108
108
  case "end":
109
109
  return _context.stop();
110
110
  }
package/es/utils/oss.js CHANGED
@@ -12,7 +12,7 @@ var _parseEnv = parseEnv(),
12
12
  var callCustomApi = /*#__PURE__*/function () {
13
13
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(action, params, env) {
14
14
  var key, res;
15
- return _regeneratorRuntime.wrap(function _callee$(_context) {
15
+ return _regeneratorRuntime.wrap(function (_context) {
16
16
  while (1) switch (_context.prev = _context.next) {
17
17
  case 0:
18
18
  key = JSON.stringify({
@@ -21,12 +21,12 @@ var callCustomApi = /*#__PURE__*/function () {
21
21
  env: env
22
22
  });
23
23
  if (!cache.get(key)) {
24
- _context.next = 3;
24
+ _context.next = 1;
25
25
  break;
26
26
  }
27
27
  return _context.abrupt("return", cache.get(key));
28
- case 3:
29
- _context.next = 5;
28
+ case 1:
29
+ _context.next = 2;
30
30
  return axios.request({
31
31
  method: 'post',
32
32
  url: "//".concat(FECS_HOST, "/data/publicCustom.json"),
@@ -41,17 +41,17 @@ var callCustomApi = /*#__PURE__*/function () {
41
41
  }))
42
42
  })
43
43
  });
44
- case 5:
44
+ case 2:
45
45
  res = _context.sent;
46
46
  if (!(+res.data.code !== 200)) {
47
- _context.next = 8;
47
+ _context.next = 3;
48
48
  break;
49
49
  }
50
50
  throw new Error(res.data.message);
51
- case 8:
51
+ case 3:
52
52
  cache.set(key, res.data.data);
53
53
  return _context.abrupt("return", res.data.data);
54
- case 10:
54
+ case 4:
55
55
  case "end":
56
56
  return _context.stop();
57
57
  }
@@ -63,7 +63,7 @@ var callCustomApi = /*#__PURE__*/function () {
63
63
  }();
64
64
  export var getMicroAppRelease = /*#__PURE__*/function () {
65
65
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(name, env) {
66
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
66
+ return _regeneratorRuntime.wrap(function (_context2) {
67
67
  while (1) switch (_context2.prev = _context2.next) {
68
68
  case 0:
69
69
  return _context2.abrupt("return", callCustomApi('GetMicroAppRelease', {
@@ -81,7 +81,7 @@ export var getMicroAppRelease = /*#__PURE__*/function () {
81
81
  }();
82
82
  export var getMicroAppConfig = /*#__PURE__*/function () {
83
83
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(CategoryName, ProductCode, env) {
84
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
84
+ return _regeneratorRuntime.wrap(function (_context3) {
85
85
  while (1) switch (_context3.prev = _context3.next) {
86
86
  case 0:
87
87
  return _context3.abrupt("return", callCustomApi('GetMicroAppConfig', {
@@ -100,7 +100,7 @@ export var getMicroAppConfig = /*#__PURE__*/function () {
100
100
  }();
101
101
  export var getMicroAppLocale = /*#__PURE__*/function () {
102
102
  var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(name, version, locale, env) {
103
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
103
+ return _regeneratorRuntime.wrap(function (_context4) {
104
104
  while (1) switch (_context4.prev = _context4.next) {
105
105
  case 0:
106
106
  return _context4.abrupt("return", callCustomApi('GetMicroAppLocale', {
@@ -114,7 +114,7 @@ export var getMicroAppLocale = /*#__PURE__*/function () {
114
114
  }
115
115
  }, _callee4);
116
116
  }));
117
- return function getMicroAppLocale(_x9, _x10, _x11, _x12) {
117
+ return function getMicroAppLocale(_x9, _x0, _x1, _x10) {
118
118
  return _ref4.apply(this, arguments);
119
119
  };
120
120
  }();
package/lib/base.js CHANGED
@@ -37,12 +37,12 @@ var BaseLoader = exports.default = /*#__PURE__*/function () {
37
37
  value: function () {
38
38
  var _register = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(passInConfig) {
39
39
  var logger, _this$config, name, version, env, chains, flattenHookHandlers, promise;
40
- return _regenerator.default.wrap(function _callee$(_context) {
40
+ return _regenerator.default.wrap(function (_context) {
41
41
  while (1) switch (_context.prev = _context.next) {
42
42
  case 0:
43
43
  logger = new _logger.default();
44
44
  if (passInConfig) {
45
- _context.next = 4;
45
+ _context.next = 1;
46
46
  break;
47
47
  }
48
48
  logger.error({
@@ -50,7 +50,7 @@ var BaseLoader = exports.default = /*#__PURE__*/function () {
50
50
  E_MSG: 'cannot find config before start.'
51
51
  });
52
52
  return _context.abrupt("return", Promise.reject(new Error('[alfa-core] cannot find config before start.')));
53
- case 4:
53
+ case 1:
54
54
  this.config = mergeConfig(passInConfig, logger);
55
55
  _this$config = this.config, name = _this$config.name, version = _this$config.version, env = _this$config.env;
56
56
  logger.setContext({
@@ -88,7 +88,7 @@ var BaseLoader = exports.default = /*#__PURE__*/function () {
88
88
  return _context.abrupt("return", promise.catch(function (e) {
89
89
  throw e;
90
90
  }));
91
- case 19:
91
+ case 2:
92
92
  case "end":
93
93
  return _context.stop();
94
94
  }
@@ -109,22 +109,22 @@ var BaseLoader = exports.default = /*#__PURE__*/function () {
109
109
  value: (function () {
110
110
  var _resolve = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(config) {
111
111
  var manifest, url;
112
- return _regenerator.default.wrap(function _callee2$(_context2) {
112
+ return _regenerator.default.wrap(function (_context2) {
113
113
  while (1) switch (_context2.prev = _context2.next) {
114
114
  case 0:
115
115
  manifest = (0, _utils.getManifestFromConfig)(config);
116
116
  url = (0, _utils.getURL)(config);
117
117
  if (!(!manifest && !url)) {
118
- _context2.next = 4;
118
+ _context2.next = 1;
119
119
  break;
120
120
  }
121
121
  throw new Error("No entry or manifest in ".concat(config.name));
122
- case 4:
122
+ case 1:
123
123
  return _context2.abrupt("return", _objectSpread(_objectSpread({}, config), {}, {
124
124
  manifest: manifest,
125
125
  url: url
126
126
  }));
127
- case 5:
127
+ case 2:
128
128
  case "end":
129
129
  return _context2.stop();
130
130
  }
@@ -146,11 +146,11 @@ var BaseLoader = exports.default = /*#__PURE__*/function () {
146
146
  value: (function () {
147
147
  var _init = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(config) {
148
148
  var name, container, manifest, props, deps, url, beforeMount, afterMount, beforeUnmount, afterUnmount, beforeUpdate, sandbox, noCache, extendedConfig, app;
149
- return _regenerator.default.wrap(function _callee3$(_context3) {
149
+ return _regenerator.default.wrap(function (_context3) {
150
150
  while (1) switch (_context3.prev = _context3.next) {
151
151
  case 0:
152
152
  name = config.name, container = config.container, manifest = config.manifest, props = config.props, deps = config.deps, url = config.url, beforeMount = config.beforeMount, afterMount = config.afterMount, beforeUnmount = config.beforeUnmount, afterUnmount = config.afterUnmount, beforeUpdate = config.beforeUpdate, sandbox = config.sandbox, noCache = config.noCache, extendedConfig = (0, _objectWithoutProperties2.default)(config, _excluded);
153
- _context3.next = 3;
153
+ _context3.next = 1;
154
154
  return (0, _consoleOsKernal.createMicroApp)({
155
155
  name: name,
156
156
  dom: container,
@@ -169,12 +169,12 @@ var BaseLoader = exports.default = /*#__PURE__*/function () {
169
169
  sandbox: sandbox
170
170
  // parcel
171
171
  });
172
- case 3:
172
+ case 1:
173
173
  app = _context3.sent;
174
174
  return _context3.abrupt("return", _objectSpread(_objectSpread(_objectSpread({}, config), extendedConfig), {}, {
175
175
  app: app
176
176
  }));
177
- case 5:
177
+ case 2:
178
178
  case "end":
179
179
  return _context3.stop();
180
180
  }
@@ -196,14 +196,14 @@ var BaseLoader = exports.default = /*#__PURE__*/function () {
196
196
  value: (function () {
197
197
  var _load = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(config) {
198
198
  var _config$app;
199
- return _regenerator.default.wrap(function _callee4$(_context4) {
199
+ return _regenerator.default.wrap(function (_context4) {
200
200
  while (1) switch (_context4.prev = _context4.next) {
201
201
  case 0:
202
- _context4.next = 2;
202
+ _context4.next = 1;
203
203
  return config === null || config === void 0 ? void 0 : (_config$app = config.app) === null || _config$app === void 0 ? void 0 : _config$app.load();
204
- case 2:
204
+ case 1:
205
205
  return _context4.abrupt("return", config);
206
- case 3:
206
+ case 2:
207
207
  case "end":
208
208
  return _context4.stop();
209
209
  }
package/lib/index.js CHANGED
@@ -19,7 +19,8 @@ var _exportNames = {
19
19
  Logger: true,
20
20
  request: true,
21
21
  createEventBus: true,
22
- prefetch: true
22
+ prefetch: true,
23
+ loadExposedModule: true
23
24
  };
24
25
  Object.defineProperty(exports, "BaseLoader", {
25
26
  enumerable: true,
@@ -99,6 +100,12 @@ Object.defineProperty(exports, "getRelease", {
99
100
  return _getRelease.getRelease;
100
101
  }
101
102
  });
103
+ Object.defineProperty(exports, "loadExposedModule", {
104
+ enumerable: true,
105
+ get: function get() {
106
+ return _consoleOsKernal.loadExposedModule;
107
+ }
108
+ });
102
109
  Object.defineProperty(exports, "prefetch", {
103
110
  enumerable: true,
104
111
  get: function get() {
@@ -29,40 +29,40 @@ var Cache = /*#__PURE__*/function () {
29
29
  value: (function () {
30
30
  var _getRemote = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(url) {
31
31
  var value, _result, result;
32
- return _regenerator.default.wrap(function _callee$(_context) {
32
+ return _regenerator.default.wrap(function (_context) {
33
33
  while (1) switch (_context.prev = _context.next) {
34
34
  case 0:
35
35
  if (url) {
36
- _context.next = 2;
36
+ _context.next = 1;
37
37
  break;
38
38
  }
39
39
  throw new Error('url is empty');
40
- case 2:
40
+ case 1:
41
41
  value = this.store[url];
42
42
  if (!value) {
43
- _context.next = 10;
43
+ _context.next = 4;
44
44
  break;
45
45
  }
46
46
  if (!isPromiseLike(value)) {
47
- _context.next = 9;
47
+ _context.next = 3;
48
48
  break;
49
49
  }
50
- _context.next = 7;
50
+ _context.next = 2;
51
51
  return value;
52
- case 7:
52
+ case 2:
53
53
  _result = _context.sent;
54
54
  return _context.abrupt("return", _result);
55
- case 9:
55
+ case 3:
56
56
  return _context.abrupt("return", value);
57
- case 10:
57
+ case 4:
58
58
  this.store[url] = _request.default.get(url);
59
- _context.next = 13;
59
+ _context.next = 5;
60
60
  return this.store[url];
61
- case 13:
61
+ case 5:
62
62
  result = _context.sent;
63
63
  if (result !== null && result !== void 0 && result.data) this.store[url] = result;
64
64
  return _context.abrupt("return", result);
65
- case 16:
65
+ case 6:
66
66
  case "end":
67
67
  return _context.stop();
68
68
  }
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 _process, _window, _window$ALIYUN_CONSOL;
12
+ var _window, _window$ALIYUN_CONSOL;
13
13
  if (value) return value;
14
- if (((_process = process) === null || _process === void 0 ? void 0 : _process.env.NODE_ENV) === 'development') {
15
- return 'local';
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
@@ -32,63 +32,63 @@ var defaultConfig = {
32
32
  var getConfig = exports.getConfig = /*#__PURE__*/function () {
33
33
  var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(config) {
34
34
  var _releaseConfig$distT, _releaseConfig$config, _releaseConfig$config2;
35
- var releaseConfig, logger, configVersion, configEntry, configData, _ref2, _ref3, category, product;
36
- return _regenerator.default.wrap(function _callee$(_context) {
35
+ var releaseConfig, logger, configVersion, configEntry, configData, _ref2, _ref3, category, product, _t, _t2;
36
+ return _regenerator.default.wrap(function (_context) {
37
37
  while (1) switch (_context.prev = _context.next) {
38
38
  case 0:
39
- _context.next = 2;
39
+ _context.next = 1;
40
40
  return (0, _getRelease.getRelease)(config);
41
- case 2:
41
+ case 1:
42
42
  releaseConfig = _context.sent;
43
43
  logger = config.logger;
44
44
  configVersion = ((_releaseConfig$distT = releaseConfig['dist-tags']) === null || _releaseConfig$distT === void 0 ? void 0 : _releaseConfig$distT['config-latest']) || '';
45
45
  configEntry = (_releaseConfig$config = releaseConfig['config-versions']) === null || _releaseConfig$config === void 0 ? void 0 : (_releaseConfig$config2 = _releaseConfig$config[configVersion]) === null || _releaseConfig$config2 === void 0 ? void 0 : _releaseConfig$config2.entry;
46
46
  configData = defaultConfig; // when config is not valid, return empty
47
47
  if (!(!configVersion || !configEntry)) {
48
- _context.next = 9;
48
+ _context.next = 2;
49
49
  break;
50
50
  }
51
51
  return _context.abrupt("return", configData);
52
- case 9:
53
- _context.prev = 9;
54
- _context.next = 12;
52
+ case 2:
53
+ _context.prev = 2;
54
+ _context.next = 3;
55
55
  return _cacheManager.default.getRemote(configEntry);
56
- case 12:
56
+ case 3:
57
57
  configData = _context.sent.data;
58
58
  if (configData) {
59
- _context.next = 15;
59
+ _context.next = 4;
60
60
  break;
61
61
  }
62
62
  throw new Error('configData is null');
63
- case 15:
64
- _context.next = 29;
63
+ case 4:
64
+ _context.next = 10;
65
65
  break;
66
- case 17:
67
- _context.prev = 17;
68
- _context.t0 = _context["catch"](9);
69
- _context.prev = 19;
66
+ case 5:
67
+ _context.prev = 5;
68
+ _t = _context["catch"](2);
69
+ _context.prev = 6;
70
70
  _ref2 = configEntry.match(/\/(\w+)\/(\w+)\/config.json/) || [], _ref3 = (0, _slicedToArray2.default)(_ref2, 3), category = _ref3[1], product = _ref3[2];
71
- _context.next = 23;
71
+ _context.next = 7;
72
72
  return (0, _oss.getMicroAppConfig)(category, product, (0, _env.getEnv)(config.env));
73
- case 23:
73
+ case 7:
74
74
  configData = _context.sent;
75
- _context.next = 28;
75
+ _context.next = 9;
76
76
  break;
77
- case 26:
78
- _context.prev = 26;
79
- _context.t1 = _context["catch"](19);
80
- case 28:
77
+ case 8:
78
+ _context.prev = 8;
79
+ _t2 = _context["catch"](6);
80
+ case 9:
81
81
  (logger === null || logger === void 0 ? void 0 : logger.error) && logger.error({
82
82
  E_CODE: 'GetConfigError',
83
- E_MSG: _context.t0.message
83
+ E_MSG: _t.message
84
84
  });
85
- case 29:
85
+ case 10:
86
86
  return _context.abrupt("return", configData);
87
- case 30:
87
+ case 11:
88
88
  case "end":
89
89
  return _context.stop();
90
90
  }
91
- }, _callee, null, [[9, 17], [19, 26]]);
91
+ }, _callee, null, [[2, 5], [6, 8]]);
92
92
  }));
93
93
  return function getConfig(_x) {
94
94
  return _ref.apply(this, arguments);
@@ -100,13 +100,13 @@ var getConfig = exports.getConfig = /*#__PURE__*/function () {
100
100
  */
101
101
  var getConfigV2 = exports.getConfigV2 = /*#__PURE__*/function () {
102
102
  var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(config) {
103
- var releaseConfig, _ref5, relatedConsoleAppId, currentConfig, _ALIYUN_CONSOLE_CONFI, res;
104
- return _regenerator.default.wrap(function _callee2$(_context2) {
103
+ var releaseConfig, _ref5, relatedConsoleAppId, currentConfig, _ALIYUN_CONSOLE_CONFI, res, _t3;
104
+ return _regenerator.default.wrap(function (_context2) {
105
105
  while (1) switch (_context2.prev = _context2.next) {
106
106
  case 0:
107
- _context2.next = 2;
107
+ _context2.next = 1;
108
108
  return (0, _getRelease.getRelease)(config);
109
- case 2:
109
+ case 1:
110
110
  releaseConfig = _context2.sent;
111
111
  _ref5 = releaseConfig.metadata || {}, relatedConsoleAppId = _ref5.relatedConsoleAppId;
112
112
  currentConfig = {
@@ -114,36 +114,36 @@ var getConfigV2 = exports.getConfigV2 = /*#__PURE__*/function () {
114
114
  ALIYUN_CONSOLE_GLOBAL: window.ALIYUN_CONSOLE_GLOBAL || {}
115
115
  };
116
116
  if (!relatedConsoleAppId) {
117
- _context2.next = 17;
117
+ _context2.next = 5;
118
118
  break;
119
119
  }
120
120
  if (!(relatedConsoleAppId === ((_ALIYUN_CONSOLE_CONFI = window.ALIYUN_CONSOLE_CONFIG) === null || _ALIYUN_CONSOLE_CONFI === void 0 ? void 0 : _ALIYUN_CONSOLE_CONFI.APP_ID))) {
121
- _context2.next = 8;
121
+ _context2.next = 2;
122
122
  break;
123
123
  }
124
124
  return _context2.abrupt("return", currentConfig);
125
- case 8:
126
- _context2.prev = 8;
127
- _context2.next = 11;
125
+ case 2:
126
+ _context2.prev = 2;
127
+ _context2.next = 3;
128
128
  return _request.default.get("https://".concat(config.env !== 'prod' ? 'pre-' : '', "fecs.console.").concat((0, _consoleBaseConfParseEnv.default)().MAIN_DOMAIN, "/api/alfa/console/config?appId=").concat(relatedConsoleAppId), {
129
129
  withCredentials: true
130
130
  });
131
- case 11:
131
+ case 3:
132
132
  res = _context2.sent;
133
133
  return _context2.abrupt("return", {
134
134
  ALIYUN_CONSOLE_CONFIG: _objectSpread(_objectSpread({}, window.ALIYUN_CONSOLE_CONFIG), res.data.data.ALIYUN_CONSOLE_CONFIG),
135
135
  ALIYUN_CONSOLE_GLOBAL: res.data.data.ALIYUN_CONSOLE_GLOBAL
136
136
  });
137
- case 15:
138
- _context2.prev = 15;
139
- _context2.t0 = _context2["catch"](8);
140
- case 17:
137
+ case 4:
138
+ _context2.prev = 4;
139
+ _t3 = _context2["catch"](2);
140
+ case 5:
141
141
  return _context2.abrupt("return", undefined);
142
- case 18:
142
+ case 6:
143
143
  case "end":
144
144
  return _context2.stop();
145
145
  }
146
- }, _callee2, null, [[8, 15]]);
146
+ }, _callee2, null, [[2, 4]]);
147
147
  }));
148
148
  return function getConfigV2(_x2) {
149
149
  return _ref4.apply(this, arguments);