@aliyun-sls/runtime
Advanced tools
Comparing version
@@ -6,10 +6,12 @@ 'use strict'; | ||
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var ___default = /*#__PURE__*/_interopDefaultCompat(_); | ||
function getConfig(key) { | ||
window.ALIYUN_SLS_CONSOLE_CONFIG = window.ALIYUN_SLS_CONSOLE_CONFIG || {}; | ||
return window.ALIYUN_SLS_CONSOLE_CONFIG[key] !== undefined | ||
? window.ALIYUN_SLS_CONSOLE_CONFIG[key] | ||
: ''; | ||
window.ALIYUN_SLS_CONSOLE_CONFIG = window.ALIYUN_SLS_CONSOLE_CONFIG || {}; | ||
return window.ALIYUN_SLS_CONSOLE_CONFIG[key] !== void 0 ? window.ALIYUN_SLS_CONSOLE_CONFIG[key] : ""; | ||
} | ||
function getLinks(key) { | ||
return window.ALIYUN_SLS_CONSOLE_LINKS[key] || ''; | ||
return window.ALIYUN_SLS_CONSOLE_LINKS[key] || ""; | ||
} | ||
@@ -1531,7 +1533,7 @@ | ||
var newSwitch = _.isArray(getConfig('graySwitch')) ? getConfig('graySwitch') : []; | ||
var newSwitch = ___default["default"].isArray(getConfig('graySwitch')) ? getConfig('graySwitch') : []; | ||
var init$1 = function init() { | ||
newSwitch.forEach(function (item) { | ||
var index = _.findIndex(graySwitch, function (obj) { | ||
var index = ___default["default"].findIndex(graySwitch, function (obj) { | ||
return obj.id === item.id; | ||
@@ -1542,3 +1544,3 @@ }); | ||
graySwitch[index].status = item.status; | ||
graySwitch[index].attribute = _.assign(graySwitch[index].attribute, item.attribute); | ||
graySwitch[index].attribute = ___default["default"].assign(graySwitch[index].attribute, item.attribute); | ||
} else { | ||
@@ -1594,7 +1596,7 @@ graySwitch.push(item); | ||
if (isZHLang) { | ||
window.ALIYUN_SLS_MAGIC_MESSAGE = _.assign(message, window.ALIYUN_SLS_MAGIC_MESSAGE || {}); | ||
window.ALIYUN_SLS_MAGIC_MESSAGE = ___default["default"].assign(message, window.ALIYUN_SLS_MAGIC_MESSAGE || {}); | ||
} else if (isENLang) { | ||
window.ALIYUN_SLS_MAGIC_MESSAGE = _.assign(message$1, window.ALIYUN_SLS_MAGIC_MESSAGE || {}); | ||
window.ALIYUN_SLS_MAGIC_MESSAGE = ___default["default"].assign(message$1, window.ALIYUN_SLS_MAGIC_MESSAGE || {}); | ||
} else { | ||
window.ALIYUN_SLS_MAGIC_MESSAGE = _.assign(message, window.ALIYUN_SLS_MAGIC_MESSAGE || {}); | ||
window.ALIYUN_SLS_MAGIC_MESSAGE = ___default["default"].assign(message, window.ALIYUN_SLS_MAGIC_MESSAGE || {}); | ||
} | ||
@@ -1685,3 +1687,3 @@ }; | ||
var init = function init() { | ||
window.ALIYUN_SLS_CONSOLE_LINKS = _.assign(links$1, window.ALIYUN_SLS_CONSOLE_LINKS || {}); | ||
window.ALIYUN_SLS_CONSOLE_LINKS = ___default["default"].assign(links$1, window.ALIYUN_SLS_CONSOLE_LINKS || {}); | ||
}; | ||
@@ -1688,0 +1690,0 @@ |
@@ -1,2 +0,4 @@ | ||
export declare namespace links { | ||
declare function magicI18n(string: any): any; | ||
declare namespace links { | ||
const SLSOPENLINK: any; | ||
@@ -61,4 +63,2 @@ const SLSPRODUCTPAGE: any; | ||
export declare function magicI18n(string: any): any; | ||
export { } | ||
export { links, magicI18n }; |
{ | ||
"name": "@aliyun-sls/runtime", | ||
"version": "0.2.9-dev-1", | ||
"version": "0.2.9-dev-10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/runtime.cjs.js", |
38436
0.58%