efront 4.2.4 → 4.2.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.
@@ -10,7 +10,7 @@
10
10
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
11
11
  <link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />
12
12
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,width=device-width" />
13
- <title>Efront 服务器管控平台</title>
13
+ <title>efront 服务器管理工具</title>
14
14
  <script deleteoncompile efrontloader>
15
15
  // 若要在开发环境使用内置组件,请保留此script标签中的代码,在编译发布时,这里的代码会自动删除
16
16
  </script>
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  var languageMap = {};
3
3
  var languageIndex = 0;
4
- function i18n() {
5
- return arguments[isFinite(this) ? this : languageIndex];
4
+ function i18n(arg) {
5
+ if (typeof arg === 'string') arg = arguments;
6
+ return arg[isFinite(this) ? this : languageIndex];
6
7
  };
7
8
  i18n.lang = function (type) {
8
9
  var id = getLanguageIndexFromName(type) || 0;
@@ -16,6 +16,7 @@ const [
16
16
  var number_reg = /^(?:(?:0x[0-9a-f]+|0b\d+|0o\d+)(?:_[0-9a-f]+)*|(?:(?:(?:\d+_)*\d+|\d*)\.\d+(?:_\d+)*|(?:\d+_)*\d+\.?))(?:e[\+\-]?\d+(?:_\d+)*|[mniul]|ll)?$/i;
17
17
  var equal_reg = /^(?:[\+\-\*\/~\^&\|%]|\*\*|>>>?|<<)?\=$|^(?:\+\+|\-\-)$/;
18
18
  var skipAssignment = function (o, cx) {
19
+ if (!o) return;
19
20
  var next = arguments.length === 1 ? function () {
20
21
  o = o.next;
21
22
  } : function () {
@@ -1049,6 +1050,14 @@ var createString = function (parsed) {
1049
1050
  var keepspace = parsed.keepspace !== false;
1050
1051
  var patchspace = autospace && keepspace;
1051
1052
  var helpcode = parsed.helpcode;
1053
+ var express_reg = parsed.program?.express_reg;
1054
+ if (typeof helpcode === 'string') {
1055
+ if (express_reg && !express_reg.test(helpcode.replace(/[\/\||,]/g, ''))) throw new Error("辅助级别异常:" + debug);
1056
+ if (/[\/\|,]/i.test(helpcode)) var debug = `(?:${helpcode.replace(/[\/\|,]/g, '|')})`;
1057
+ else debug = helpcode;
1058
+ }
1059
+ else debug = '';
1060
+ var helpreg = debug ? new RegExp(/^\/[\/\*]\s*/.source + debug + /\:?\s*\<\!--/.source, "i") : /^\/[\/\*]\s*\<\!--/;
1052
1061
  var lasttype = SPACE;
1053
1062
  var uncomment = parsed.comment === false;
1054
1063
  var result = [], cacheresult, finalresult = result;
@@ -1071,10 +1080,10 @@ var createString = function (parsed) {
1071
1080
  if (uncomment) break;
1072
1081
  var tmp = o.text, opentmp = false;
1073
1082
  if (helpcode) {
1074
- if (/^\/[\/\*]\s*\<\!--/.test(tmp)) {
1083
+ if (helpreg.test(tmp)) {
1075
1084
  opentmp = true;
1076
1085
  if (/^\/\*/.test(tmp)) opentmp = 2;
1077
- tmp = tmp.replace(/^\/[\/\*]\s*\<\!--\s*/, '');
1086
+ tmp = tmp.replace(helpreg, '');
1078
1087
  cacheresult = [];
1079
1088
  result = cacheresult;
1080
1089
  result.push("/* [[ 开发辅助代码: */");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.2.4",
3
+ "version": "4.2.6",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {