@alicloud/alfa-core 1.5.0-alpha.8 → 1.5.0

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.
@@ -90,7 +90,7 @@ export var getI18nMessagesV2 = /*#__PURE__*/function () {
90
90
  releaseConfig = _context2.sent;
91
91
  _ref3 = releaseConfig.metadata || {}, relatedMDSAppName = _ref3.relatedMDSAppName;
92
92
  locale = getLocale(config.locale);
93
- globalNamespace = "".concat(relatedMDSAppName, "_").concat(locale);
93
+ globalNamespace = "".concat(relatedMDSAppName, "_").concat(locale.toLowerCase().replace('_', '-'));
94
94
  if (!(relatedMDSAppName && window[globalNamespace])) {
95
95
  _context2.next = 8;
96
96
  break;
@@ -75,6 +75,11 @@ var Logger = /*#__PURE__*/function () {
75
75
  value: function track(method, topic, params) {
76
76
  var data = this.mergeData(params);
77
77
 
78
+ // just report in aliyun.com && alibabacloud.com
79
+ if (!['aliyun.com', 'alibabacloud.com', 'aliyun-inc.com', 'alibaba-inc.com'].find(function (domain) {
80
+ return location.hostname.endsWith(domain);
81
+ })) return false;
82
+
78
83
  // do not track during development
79
84
  if (this.context.ENV !== 'prod') {
80
85
  console[method](topic, data);
@@ -97,7 +97,7 @@ var getI18nMessagesV2 = exports.getI18nMessagesV2 = /*#__PURE__*/function () {
97
97
  releaseConfig = _context2.sent;
98
98
  _ref3 = releaseConfig.metadata || {}, relatedMDSAppName = _ref3.relatedMDSAppName;
99
99
  locale = (0, _locale.getLocale)(config.locale);
100
- globalNamespace = "".concat(relatedMDSAppName, "_").concat(locale);
100
+ globalNamespace = "".concat(relatedMDSAppName, "_").concat(locale.toLowerCase().replace('_', '-'));
101
101
  if (!(relatedMDSAppName && window[globalNamespace])) {
102
102
  _context2.next = 8;
103
103
  break;
@@ -82,6 +82,11 @@ var Logger = exports.default = /*#__PURE__*/function () {
82
82
  value: function track(method, topic, params) {
83
83
  var data = this.mergeData(params);
84
84
 
85
+ // just report in aliyun.com && alibabacloud.com
86
+ if (!['aliyun.com', 'alibabacloud.com', 'aliyun-inc.com', 'alibaba-inc.com'].find(function (domain) {
87
+ return location.hostname.endsWith(domain);
88
+ })) return false;
89
+
85
90
  // do not track during development
86
91
  if (this.context.ENV !== 'prod') {
87
92
  console[method](topic, data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/alfa-core",
3
- "version": "1.5.0-alpha.8",
3
+ "version": "1.5.0",
4
4
  "description": "MicroFront End SDK for alicloud",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",