Socket
Socket
Sign inDemoInstall

@alicloud/console-one-config

Package Overview
Dependencies
Maintainers
5
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alicloud/console-one-config - npm Package Compare versions

Comparing version 1.4.0 to 1.4.2

4

build/cjs/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,7 +8,4 @@ value: true

exports.default = void 0;
var _parseOneConf = _interopRequireDefault(require("./util/parse-one-conf"));
var _default = (0, _parseOneConf.default)();
exports.default = _default;

@@ -7,3 +7,2 @@ "use strict";

exports.default = fixApiResult;
function fixApiResult() {

@@ -13,9 +12,7 @@ var shitty = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

var o = shitty[v];
if (o && o.code === '200' && o.data !== undefined) {
result[v] = o.data;
}
return result;
}, {});
}

@@ -7,3 +7,2 @@ "use strict";

exports.default = fixOpenStatus;
/**

@@ -16,3 +15,2 @@ * 修复布尔值、数值,其他仍旧为字符串

var value = shity[v];
if (value === 'true') {

@@ -30,3 +28,2 @@ o[v] = true;

}
function fixOpenStatus() {

@@ -33,0 +30,0 @@ var o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

11

build/cjs/util/fix-regions.js

@@ -7,3 +7,2 @@ "use strict";

exports.default = fixRegions;
function fixRegions() {

@@ -13,7 +12,7 @@ var shittyRegions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];

var regionId = _ref.regionId,
name = _ref.name,
_ref$physicalList = _ref.physicalList,
physicalList = _ref$physicalList === void 0 ? [] : _ref$physicalList,
_ref$zoneList = _ref.zoneList,
zoneList = _ref$zoneList === void 0 ? [] : _ref$zoneList;
name = _ref.name,
_ref$physicalList = _ref.physicalList,
physicalList = _ref$physicalList === void 0 ? [] : _ref$physicalList,
_ref$zoneList = _ref.zoneList,
zoneList = _ref$zoneList === void 0 ? [] : _ref$zoneList;
return {

@@ -20,0 +19,0 @@ id: regionId,

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,9 +8,5 @@ value: true

exports.default = parseOneConf;
var _fixRegions = _interopRequireDefault(require("./fix-regions"));
var _fixOpenStatus = _interopRequireDefault(require("./fix-open-status"));
var _fixApiResult = _interopRequireDefault(require("./fix-api-result"));
function fillByShitty(ONE_CONF, shittyConf) {

@@ -42,7 +37,6 @@ ONE_CONF.ONE = shittyConf.portalType === 'one';

}
/**
* OneConsole 通用的 CONF 解析逻辑
*/
function parseOneConf() {

@@ -75,7 +69,5 @@ var ONE_CONF = {

var shittyConf = typeof window !== 'undefined' ? window.ALIYUN_CONSOLE_CONFIG : undefined;
if (shittyConf) {
fillByShitty(ONE_CONF, shittyConf);
}
if (ONE_CONF.LOCALE === 'zh-TW') {

@@ -82,0 +74,0 @@ ONE_CONF.LANG = 'zh-TW'; // OneConsole 在这种情况下写的是 zh,这是不对的

@@ -5,9 +5,7 @@ export default function fixApiResult() {

var o = shitty[v];
if (o && o.code === '200' && o.data !== undefined) {
result[v] = o.data;
}
return result;
}, {});
}

@@ -8,3 +8,2 @@ /**

var value = shity[v];
if (value === 'true') {

@@ -22,3 +21,2 @@ o[v] = true;

}
export default function fixOpenStatus() {

@@ -25,0 +23,0 @@ var o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

@@ -5,7 +5,7 @@ export default function fixRegions() {

var regionId = _ref.regionId,
name = _ref.name,
_ref$physicalList = _ref.physicalList,
physicalList = _ref$physicalList === void 0 ? [] : _ref$physicalList,
_ref$zoneList = _ref.zoneList,
zoneList = _ref$zoneList === void 0 ? [] : _ref$zoneList;
name = _ref.name,
_ref$physicalList = _ref.physicalList,
physicalList = _ref$physicalList === void 0 ? [] : _ref$physicalList,
_ref$zoneList = _ref.zoneList,
zoneList = _ref$zoneList === void 0 ? [] : _ref$zoneList;
return {

@@ -12,0 +12,0 @@ id: regionId,

import fixRegions from './fix-regions';
import fixOpenStatus from './fix-open-status';
import fixApiResult from './fix-api-result';
function fillByShitty(ONE_CONF, shittyConf) {

@@ -30,7 +29,6 @@ ONE_CONF.ONE = shittyConf.portalType === 'one';

}
/**
* OneConsole 通用的 CONF 解析逻辑
*/
export default function parseOneConf() {

@@ -63,7 +61,5 @@ var ONE_CONF = {

var shittyConf = typeof window !== 'undefined' ? window.ALIYUN_CONSOLE_CONFIG : undefined;
if (shittyConf) {
fillByShitty(ONE_CONF, shittyConf);
}
if (ONE_CONF.LOCALE === 'zh-TW') {

@@ -70,0 +66,0 @@ ONE_CONF.LANG = 'zh-TW'; // OneConsole 在这种情况下写的是 zh,这是不对的

{
"name": "@alicloud/console-one-config",
"version": "1.4.0",
"version": "1.4.2",
"description": "OneConsole Config 对象解析与封装",

@@ -29,6 +29,6 @@ "license": "MIT",

"@alicloud/console-toolkit-preset-component": "^1.2.61",
"@alicloud/demo-rc-elements": "^1.10.0",
"@alicloud/demo-rc-elements": "^1.10.8",
"@types/react": "^17.0.48",
"react": "^17.0.2",
"typescript": "^4.7.4"
"typescript": "^4.8.4"
},

@@ -46,3 +46,3 @@ "scripts": {

},
"gitHead": "3a50c1eaa823efebfa79bb16a5e042c6dfbb8bb5"
"gitHead": "4b5eefd0215b1f8028fce664d64484ceeb703ef1"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc