@bbn/bbn 1.0.211 → 1.0.212

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.
@@ -83,7 +83,8 @@ export default function callback(url, res, fn, fn2, ele) {
83
83
  tmp = (function (data, ele) {
84
84
  var r = null;
85
85
  try {
86
- r = eval(res.script);
86
+ var fnScript = new Function(res.script);
87
+ r = fnScript();
87
88
  if (isFunction(r)) {
88
89
  r = r(data, ele);
89
90
  }
@@ -104,7 +105,8 @@ export default function callback(url, res, fn, fn2, ele) {
104
105
  bbn.fn.defaultPostLinkFunction(res, ele);
105
106
  }
106
107
  if (tmp && isObj && res.postscript) {
107
- eval(res.postscript);
108
+ var fnPost = new Function(res.postscript);
109
+ fnPost(res.postscript);
108
110
  }
109
111
  if (isObj && res.error) {
110
112
  errTitle = res.errorTitle || bbn.lng.server_response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.211",
3
+ "version": "1.0.212",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -42,11 +42,11 @@
42
42
  "@rollup/plugin-json": "^6.1.0",
43
43
  "@rollup/plugin-node-resolve": "^15.2.3",
44
44
  "@rollup/plugin-replace": "^5.0.5",
45
+ "@rollup/plugin-terser": "^0.4.4",
45
46
  "@rollup/plugin-typescript": "^11.1.6",
46
47
  "axios": "^1.5.1",
47
48
  "dayjs": "^1.11.10",
48
49
  "rollup": "^4.16.2",
49
- "rollup-plugin-terser": "^7.0.2",
50
50
  "tslib": "^2.6.2"
51
51
  },
52
52
  "directories": {