@onekeyfe/hd-core 1.0.7-alpha.3 → 1.0.7

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/dist/index.js CHANGED
@@ -23855,16 +23855,25 @@ class Log$a {
23855
23855
  log(...args) {
23856
23856
  this.addMessage('log', this.prefix, ...args);
23857
23857
  sendLogMessage(this.prefix, ...args);
23858
+ if (!this.enabled) {
23859
+ return;
23860
+ }
23858
23861
  console.log(this.prefix, ...args);
23859
23862
  }
23860
23863
  error(...args) {
23861
23864
  this.addMessage('error', this.prefix, ...args);
23862
23865
  sendLogMessage(this.prefix, ...args);
23866
+ if (!this.enabled) {
23867
+ return;
23868
+ }
23863
23869
  console.error(this.prefix, ...args);
23864
23870
  }
23865
23871
  warn(...args) {
23866
23872
  this.addMessage('warn', this.prefix, ...args);
23867
23873
  sendLogMessage(this.prefix, ...args);
23874
+ if (!this.enabled) {
23875
+ return;
23876
+ }
23868
23877
  console.warn(this.prefix, ...args);
23869
23878
  }
23870
23879
  debug(...args) {
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAMF,cAAM,GAAG;IACP,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,OAAO,CAAC;IAEjB,QAAQ,EAAE,UAAU,EAAE,CAAC;gBAEX,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAM5C,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAYxD,GAAG,CAAC,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/hd-core",
3
- "version": "1.0.7-alpha.3",
3
+ "version": "1.0.7",
4
4
  "description": "> TODO: description",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@onekeyfe/hd-shared": "^1.0.7-alpha.3",
29
- "@onekeyfe/hd-transport": "^1.0.7-alpha.3",
28
+ "@onekeyfe/hd-shared": "^1.0.7",
29
+ "@onekeyfe/hd-transport": "^1.0.7",
30
30
  "axios": "^0.27.2",
31
31
  "bignumber.js": "^9.0.2",
32
32
  "bytebuffer": "^5.0.1",
@@ -44,5 +44,5 @@
44
44
  "@types/semver": "^7.3.9",
45
45
  "ripple-keypairs": "^1.1.4"
46
46
  },
47
- "gitHead": "2450f88fb75e9aeb6c5ebfc6a4ffb488bf5a60eb"
47
+ "gitHead": "8b08f905e7426fac23b5cf9ec55eb336278f0e3b"
48
48
  }
@@ -40,18 +40,27 @@ class Log {
40
40
  log(...args: any[]) {
41
41
  this.addMessage('log', this.prefix, ...args);
42
42
  sendLogMessage(this.prefix, ...args);
43
+ if (!this.enabled) {
44
+ return;
45
+ }
43
46
  console.log(this.prefix, ...args);
44
47
  }
45
48
 
46
49
  error(...args: any[]) {
47
50
  this.addMessage('error', this.prefix, ...args);
48
51
  sendLogMessage(this.prefix, ...args);
52
+ if (!this.enabled) {
53
+ return;
54
+ }
49
55
  console.error(this.prefix, ...args);
50
56
  }
51
57
 
52
58
  warn(...args: any[]) {
53
59
  this.addMessage('warn', this.prefix, ...args);
54
60
  sendLogMessage(this.prefix, ...args);
61
+ if (!this.enabled) {
62
+ return;
63
+ }
55
64
  console.warn(this.prefix, ...args);
56
65
  }
57
66