jsir 2.4.4 → 2.4.5

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/deps/setting.js CHANGED
@@ -38,5 +38,6 @@ module.exports = {
38
38
  },
39
39
  roomTimer: 1000,
40
40
  serverSignExpire: 6000,
41
- roomHeartbeatExpire: 9000
41
+ roomHeartbeatExpire: 9000,
42
+ consoleMap: {}
42
43
  }
package/deps/util.js CHANGED
@@ -272,6 +272,9 @@ function createConsole(uniqueName) {
272
272
  }
273
273
  }
274
274
  }
275
+ if (uniqueName) {
276
+ setting.consoleMap[uniqueName] = result;
277
+ }
275
278
  return result;
276
279
  }
277
280
 
@@ -1014,8 +1017,8 @@ function _getConfig(key, defaultVal, uniqueName) {
1014
1017
  if (key === undefined) {
1015
1018
  return config
1016
1019
  }
1017
- if (uniqueName) {
1018
- console.msg(`require ${uniqueName} config "${key}"`)
1020
+ if (uniqueName && setting.consoleMap[uniqueName]) {
1021
+ setting.consoleMap[uniqueName].msg(`require ${uniqueName} config "${key}"`)
1019
1022
  }
1020
1023
  let writeFlag = false
1021
1024
  if (!(key in config)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsir",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "description": "JavaScript Script Management Tool",
5
5
  "main": "index.js",
6
6
  "scripts": {