@lingxiteam/assets 0.8.30-alpha.4 → 0.8.30-alpha.6
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/security/const.d.ts
CHANGED
package/es/security/const.js
CHANGED
package/es/security/fetch.js
CHANGED
|
@@ -134,7 +134,8 @@ function encrypted(url, opts, type) {
|
|
|
134
134
|
// // sessionStorage.setItem(id, JSON.stringify(value));
|
|
135
135
|
// Object.defineProperty(LXREQ, id, {
|
|
136
136
|
// get() {
|
|
137
|
-
//
|
|
137
|
+
// // debugData.show(id)
|
|
138
|
+
// return '';
|
|
138
139
|
// },
|
|
139
140
|
// });
|
|
140
141
|
// }
|
|
@@ -150,7 +151,7 @@ var fetch = function fetch(url) {
|
|
|
150
151
|
var isDebug = (config === null || config === void 0 ? void 0 : config.debug) || window.lxDebug || !!window.localStorage.getItem('lxDebug') || true; // ------ 参数签名(默认) ------
|
|
151
152
|
|
|
152
153
|
if ( // 配置开启加密
|
|
153
|
-
(
|
|
154
|
+
(config.mode === MODE.SIGN_KEY || config.mode === MODE.SIGN) && (fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.disabledSignKey) !== true || // 请求头开启加密
|
|
154
155
|
optSecurityHeaderKey === '1.0') {
|
|
155
156
|
var _config$signKeyOption;
|
|
156
157
|
|
|
@@ -17,7 +17,7 @@ var originFetch = window.fetch;
|
|
|
17
17
|
|
|
18
18
|
function start(_ref) {
|
|
19
19
|
var _ref$mode = _ref.mode,
|
|
20
|
-
mode = _ref$mode === void 0 ? '' : _ref$mode,
|
|
20
|
+
mode = _ref$mode === void 0 ? '1.0' : _ref$mode,
|
|
21
21
|
_ref$signKeyOptions = _ref.signKeyOptions,
|
|
22
22
|
signKeyOptions = _ref$signKeyOptions === void 0 ? {} : _ref$signKeyOptions,
|
|
23
23
|
_ref$aesOptions = _ref.aesOptions,
|
|
@@ -35,7 +35,8 @@ function start(_ref) {
|
|
|
35
35
|
if (isHttpEncryption) return true;
|
|
36
36
|
|
|
37
37
|
switch (mode) {
|
|
38
|
-
case 'signKey':
|
|
38
|
+
case 'signKey': // 兼容旧数据
|
|
39
|
+
|
|
39
40
|
case '1.0':
|
|
40
41
|
case '2.0':
|
|
41
42
|
case '3.0':
|
package/es/security/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingxiteam/assets",
|
|
3
|
-
"version": "0.8.30-alpha.
|
|
3
|
+
"version": "0.8.30-alpha.6",
|
|
4
4
|
"description": "灵犀低代码平台移动端 - 工具类",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"gitHead": "bcd338198e2c14459538542d10600ab03abc92f2",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"crypto-js": "^4.
|
|
38
|
+
"crypto-js": "^4.0.0",
|
|
39
39
|
"js-sha256": "^0.9.0",
|
|
40
40
|
"jsencrypt": "^3.1.0"
|
|
41
41
|
}
|