@powfix/core-js 0.13.1 → 0.13.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.
@@ -22,7 +22,7 @@ class TransactionManager {
22
22
  this.transactionTimeoutMap = new Map();
23
23
  // Emitter
24
24
  this.emitter = new eventemitter3_1.default();
25
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.VERBOSE) {
25
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
26
26
  console.log(LOG_TAG, 'TransactionManager instance initialized');
27
27
  }
28
28
  }
@@ -35,7 +35,7 @@ class TransactionManager {
35
35
  }
36
36
  setLogLevel(logLevel) {
37
37
  this.logLevel = logLevel;
38
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.VERBOSE) {
38
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
39
39
  console.log(LOG_TAG, 'log level changed to', logLevel);
40
40
  }
41
41
  }
@@ -48,7 +48,7 @@ class TransactionManager {
48
48
  add(transaction, option) {
49
49
  var _a, _b;
50
50
  if (this.transactionTimeoutMap.has(transaction)) {
51
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.ERROR) {
51
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
52
52
  console.error(LOG_TAG, 'transaction already exists');
53
53
  }
54
54
  return;
@@ -68,7 +68,7 @@ class TransactionManager {
68
68
  if (transactionTimeout != null) {
69
69
  clearTimeout(transactionTimeout.handler);
70
70
  this.transactionTimeoutMap.delete(transaction);
71
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.VERBOSE) {
71
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
72
72
  console.log(LOG_TAG, this.getTransactionLogArg(transaction), 'removed');
73
73
  }
74
74
  }
@@ -88,7 +88,7 @@ class TransactionManager {
88
88
  let handled = false;
89
89
  const finished = transaction === null || transaction === void 0 ? void 0 : transaction.finished;
90
90
  if (finished != null) {
91
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.VERBOSE) {
91
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
92
92
  console.log(LOG_TAG, this.getTransactionLogArg(transaction), `is already handled(${finished}) after`, reason);
93
93
  }
94
94
  this.remove(transaction);
@@ -108,7 +108,7 @@ class TransactionManager {
108
108
  break;
109
109
  }
110
110
  default: {
111
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.ERROR) {
111
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
112
112
  console.error(LOG_TAG, `unknown action`, action);
113
113
  }
114
114
  break;
@@ -116,12 +116,12 @@ class TransactionManager {
116
116
  }
117
117
  handled = finished != null;
118
118
  if (finished != null) {
119
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.ERROR) {
119
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
120
120
  console.error(LOG_TAG, this.getTransactionLogArg(transaction), `handled(${finished}) after`, reason);
121
121
  }
122
122
  }
123
123
  else {
124
- if (this.logLevel >= constants_1.TransactionManagerLogLevel.ERROR) {
124
+ if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
125
125
  console.error(LOG_TAG, this.getTransactionLogArg(transaction), `not handled 🚫`);
126
126
  }
127
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powfix/core-js",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "core package",
5
5
  "author": "Kwon Kyung-Min <powfix@gmail.com>",
6
6
  "private": false,