mm_expand 2.0.7 → 2.0.9

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/lib/base.js CHANGED
@@ -333,6 +333,8 @@ Base.prototype._hasEventListeners = function (method) {
333
333
  return this.listenerCount(method + ':before') > 0 ||
334
334
  this.listenerCount(method + ':check') > 0 ||
335
335
  this.listenerCount(method + ':render') > 0 ||
336
+ this.listenerCount(method + ':success') > 0 ||
337
+ this.listenerCount(method + ':error') > 0 ||
336
338
  this.listenerCount(method + ':after') > 0;
337
339
  };
338
340
 
@@ -361,11 +363,11 @@ Base.prototype.run = async function (...params) {
361
363
  * @returns
362
364
  */
363
365
  Base.prototype.exec = async function (method, ...params) {
364
- const result = await this._do(method, ...params);
365
- if (result.error) {
366
- throw result.error;
366
+ const ret = await this._do(method, ...params);
367
+ if (ret.error) {
368
+ throw ret.error;
367
369
  }
368
- return result;
370
+ return ret.result;
369
371
  };
370
372
 
371
373
  /**
package/lib/file.js CHANGED
@@ -584,7 +584,7 @@ String.prototype.saveText = function (text) {
584
584
  writeFileSync(this.fullname(), text);
585
585
  return true;
586
586
  } catch (e) {
587
- this._logger.error('保存文件失败:', e);
587
+ $.log.error('保存文件失败:', e);
588
588
  return false;
589
589
  }
590
590
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_expand",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Super Meimei Prototype Function Extension Module - Enhanced operations for string, array, object, date manipulation with error prevention and simplified business logic.",
5
5
  "main": "index.js",
6
6
  "scripts": {