efront 3.36.1 → 3.36.2

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.
@@ -419,6 +419,7 @@ var createScoped = function (parsed, wash) {
419
419
  if (o.next.type === STAMP) {
420
420
  isAster = true;
421
421
  o = o.next;
422
+ o.isExpress = o.prev.isExpress;
422
423
  }
423
424
  case "catch":
424
425
  if (s === 'catch') isCatch = true;
@@ -560,6 +561,7 @@ var createScoped = function (parsed, wash) {
560
561
  scoped.body = o;
561
562
  o.isExpress = isExpress;
562
563
  run(o.first);
564
+ if (isArrow && id >= 0 && o) o = o.next;
563
565
  if (wash && isFunction) {
564
566
  var e = o.next;
565
567
  if (e && e.type === EXPRESS && /^[\.\[]/.test(e.text) || e && e.type === SCOPED && e.entry === "[") {
@@ -76,6 +76,13 @@ function testAssign() {
76
76
  a()`);
77
77
  console.log(m.press().toString());
78
78
  }
79
+ function testArrow() {
80
+ var m = scanner(`(a)=>(b)=>{c,b};`);
81
+ console.log("1", m.envs);
82
+ var m = scanner(`(a,b)=>{c,b};`);
83
+ console.log("2", m.envs);
84
+ }
85
+
79
86
  function testFormat() {
80
87
  var t = fs.readFileSync(path.join(__dirname, "../efront/memery.js")).toString();
81
88
  assert(scanner(t).toString(), t);
@@ -111,6 +118,7 @@ Program.debug = true;
111
118
  // testJsx2();
112
119
  // testJsx3();
113
120
  // testJsxOnlyHtml();
114
- testSpaceLess();
121
+ // testSpaceLess();
122
+ testArrow();
115
123
  // var typescript = require("../typescript/index");
116
124
  // typescript.transpile(data.toString(), { noEmitHelpers: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * typescript:asyncDelegator
3
+ * 这个文件由工具生成,请不要手动修改
4
+ *
5
+ * Efront Authors
6
+ * 2023-03-31T13:49:30.678Z
7
+ */
8
+ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
9
+ var i, p;
10
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
11
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
12
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * typescript:asyncValues
3
+ * 这个文件由工具生成,请不要手动修改
4
+ *
5
+ * Efront Authors
6
+ * 2023-03-31T13:49:30.678Z
7
+ */
8
+ var __asyncValues = (this && this.__asyncValues) || function (o) {
9
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
10
+ var m = o[Symbol.asyncIterator], i;
11
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
12
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
13
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
14
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * typescript:esDecorate
3
+ * 这个文件由工具生成,请不要手动修改
4
+ *
5
+ * Efront Authors
6
+ * 2023-03-31T13:49:30.678Z
7
+ */
8
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
9
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
10
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
11
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
12
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
13
+ var _, done = false;
14
+ for (var i = decorators.length - 1; i >= 0; i--) {
15
+ var context = {};
16
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
17
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
18
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
19
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
20
+ if (kind === "accessor") {
21
+ if (result === void 0) continue;
22
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
23
+ if (_ = accept(result.get)) descriptor.get = _;
24
+ if (_ = accept(result.set)) descriptor.set = _;
25
+ if (_ = accept(result.init)) initializers.push(_);
26
+ }
27
+ else if (_ = accept(result)) {
28
+ if (kind === "field") initializers.push(_);
29
+ else descriptor[key] = _;
30
+ }
31
+ }
32
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
33
+ done = true;
34
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * typescript:propKey
3
+ * 这个文件由工具生成,请不要手动修改
4
+ *
5
+ * Efront Authors
6
+ * 2023-03-31T13:49:30.678Z
7
+ */
8
+ var __propKey = (this && this.__propKey) || function (x) {
9
+ return typeof x === "symbol" ? x : "".concat(x);
10
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * typescript:runInitializers
3
+ * 这个文件由工具生成,请不要手动修改
4
+ *
5
+ * Efront Authors
6
+ * 2023-03-31T13:49:30.678Z
7
+ */
8
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
9
+ var useValue = arguments.length > 2;
10
+ for (var i = 0; i < initializers.length; i++) {
11
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
12
+ }
13
+ return useValue ? value : void 0;
14
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * typescript:setFunctionName
3
+ * 这个文件由工具生成,请不要手动修改
4
+ *
5
+ * Efront Authors
6
+ * 2023-03-31T13:49:30.678Z
7
+ */
8
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
9
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
10
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
11
+ };
@@ -325,22 +325,23 @@
325
325
  { name: "斯洛文尼亚语", id: "slo", lang: 'sl' },
326
326
  ];
327
327
  supports.forEach(s => s.key = s.id);
328
- var getAllText = function (data, e) {
328
+ var getAllText = function (data, f) {
329
329
  try {
330
- if (/^\s*<!doctype\s/i.test(data)) return [];
331
- if (/\.(xht|vue)$/i.test(e.name)) {
330
+ if (/^\s*(\<\!--[\s\S]*?--\>\s*)*<!doctype\s/i.test(data)) return [];
331
+ if (/\.(xht|vue)$/i.test(f.name)) {
332
332
  var { scripts, outerHTML: htmltext, attributes = '', tagName, styles } = compile$scanner2(data, 'html').scoped;
333
333
  data = compile$wraphtml(htmltext) + ";\r\n" + scripts.join("\r\n");
334
334
  }
335
- else if (/\.html?$/i.test(e.name)) {
335
+ else if (/\.html?$/i.test(f.name)) {
336
336
  data = compile$wraphtml(data);
337
337
  }
338
338
  var code = compile$scanner2(String(data));
339
339
  return compile$translate.getI18nPrefixed(code);
340
340
  }
341
341
  catch (e) {
342
- alert("提取出错了", "error");
343
- throw e;
342
+ alert("提取文本时存在异常", "error");
343
+ console.error(e, f.path);
344
+ return [];
344
345
  }
345
346
  };
346
347
  var 已找到的字符串 = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.36.1",
3
+ "version": "3.36.2",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {