Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onekeyfe/cross-inpage-provider-core

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onekeyfe/cross-inpage-provider-core - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

23

dist/cjs/loggers.js

@@ -7,6 +7,9 @@ "use strict";

exports.fakeLogger = exports.appDebugLogger = exports.fakeDebugLogger = void 0;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const debug_1 = __importDefault(require("./debug"));
// enable debugLogger:
// localStorage.setItem('$$ONEKEY_DEBUG_LOGGER', '*');
const fakeLogger = {
// @ts-ignore
_isFakeLogger: true,
log: (...args) => undefined,

@@ -52,14 +55,24 @@ warn: (...args) => undefined,

super();
this._debugInstanceCreatedMap = {};
void (0, debug_1.default)().then((debug) => (this._debug = debug));
}
_createDebugInstance(name) {
if (this._debugInstanceCreatedMap[name]) {
return;
}
this._debugInstanceCreatedMap[name] = true;
if (name && this._debug && typeof this._debug === 'function') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
const _instance = this._debug(name);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
const _debugLog = this._debug(name);
// @ts-ignore
const _originLog = this[name];
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
this[name] = (...args) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
_instance(...args);
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
_debugLog(...args);
if (_originLog && typeof _originLog === 'function') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
_originLog(...args);
}
};

@@ -66,0 +79,0 @@ }

@@ -1,5 +0,8 @@

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import createDebugAsync from './debug';
// enable debugLogger:
// localStorage.setItem('$$ONEKEY_DEBUG_LOGGER', '*');
const fakeLogger = {
// @ts-ignore
_isFakeLogger: true,
log: (...args) => undefined,

@@ -44,14 +47,24 @@ warn: (...args) => undefined,

super();
this._debugInstanceCreatedMap = {};
void createDebugAsync().then((debug) => (this._debug = debug));
}
_createDebugInstance(name) {
if (this._debugInstanceCreatedMap[name]) {
return;
}
this._debugInstanceCreatedMap[name] = true;
if (name && this._debug && typeof this._debug === 'function') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
const _instance = this._debug(name);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
const _debugLog = this._debug(name);
// @ts-ignore
const _originLog = this[name];
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
this[name] = (...args) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
_instance(...args);
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
_debugLog(...args);
if (_originLog && typeof _originLog === 'function') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
_originLog(...args);
}
};

@@ -58,0 +71,0 @@ }

{
"name": "@onekeyfe/cross-inpage-provider-core",
"version": "0.0.4",
"version": "0.0.5",
"keywords": [

@@ -31,4 +31,4 @@ "cross-inpage-provider"

"dependencies": {
"@onekeyfe/cross-inpage-provider-errors": "^0.0.4",
"@onekeyfe/cross-inpage-provider-types": "^0.0.4",
"@onekeyfe/cross-inpage-provider-errors": "^0.0.5",
"@onekeyfe/cross-inpage-provider-types": "^0.0.5",
"eventemitter3": "^4.0.7",

@@ -38,3 +38,3 @@ "lodash": "^4.17.21",

},
"gitHead": "d47447804157874b2607aea82f92ff3a132c5e67"
"gitHead": "fc053fe3c2920fca734addae381339a29a09b716"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc