abler-api 0.1.69 → 0.1.71

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.
@@ -1774,7 +1774,7 @@ async function checkExEnvSetting(loadjs) {
1774
1774
 
1775
1775
  ppUtil$3.importExEnvSetting(conf$2._envSetting, fileName, loadjs);
1776
1776
  } catch (e) {
1777
- return `导入本机环境配置失败\n${err$1.ERROR(e).message}`;
1777
+ return `导入本机环境配置失败\n${e.stack}`;
1778
1778
  }
1779
1779
  } // async function checkDatabase() {
1780
1780
  // return dbCheck.check().then(info => info.updateMessage);
@@ -1854,8 +1854,8 @@ class commonMessenger$2 {
1854
1854
 
1855
1855
  static initMessenger(appConfig, appErrCfg, msgChannel) {
1856
1856
  conf$1 = appConfig;
1857
- this.redisMessenger = conf$1.redis.enabled ? new RedisMessenger(appConfig, appErrCfg, msgChannel).subscribe(msgChannel) : null;
1858
- this.myMsgAddr = commonMessenger$2.getMyMsgAddr();
1857
+ commonMessenger$2.redisMessenger = conf$1.redis.enabled ? new RedisMessenger(appConfig, appErrCfg, msgChannel).subscribe(msgChannel) : null;
1858
+ commonMessenger$2.myMsgAddr = commonMessenger$2.getMyMsgAddr();
1859
1859
  }
1860
1860
 
1861
1861
  static getMyMsgAddr() {
@@ -1863,7 +1863,7 @@ class commonMessenger$2 {
1863
1863
  conf$1.pm_id = process.env.pm_id || "0";
1864
1864
  let myIp = ppUtil$2.getMyIp();
1865
1865
 
1866
- if (this.redisMessenger) {
1866
+ if (commonMessenger$2.redisMessenger) {
1867
1867
  myIp = `${conf$1.pm_id}@${myIp}`;
1868
1868
  }
1869
1869
 
@@ -1875,8 +1875,8 @@ class commonMessenger$2 {
1875
1875
  }
1876
1876
 
1877
1877
  static setMessageHandle(messageHandle) {
1878
- if (this.redisMessenger) {
1879
- return this.redisMessenger.setMessageHandle(messageHandle, msgChannel);
1878
+ if (commonMessenger$2.redisMessenger) {
1879
+ return commonMessenger$2.redisMessenger.setMessageHandle(messageHandle, msgChannel);
1880
1880
  }
1881
1881
 
1882
1882
  if (commonMessenger$2.onMessage.indexOf(messageHandle) < 0) {
@@ -1887,8 +1887,8 @@ class commonMessenger$2 {
1887
1887
  }
1888
1888
 
1889
1889
  static async publishMessage(message) {
1890
- if (this.redisMessenger) {
1891
- return this.redisMessenger.publish(message, msgChannel);
1890
+ if (commonMessenger$2.redisMessenger) {
1891
+ return commonMessenger$2.redisMessenger.publish(message, msgChannel);
1892
1892
  } else {
1893
1893
  //没有消息处理器,则将消息转发到目标地址(不支持pm2多进程)
1894
1894
  if (message.destAddr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abler-api",
3
- "version": "0.1.69",
3
+ "version": "0.1.71",
4
4
  "description": "API服务相关工具",
5
5
  "main": "./dist/cjs/pp-util.js",
6
6
  "-module": "./dist/es/pp-util.js",