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

@walletconnect/logger

Package Overview
Dependencies
Maintainers
7
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/logger - npm Package Compare versions

Comparing version 2.0.0-rc-57af4ea9 to 2.0.0-rc-aa30f361

3

dist/cjs/index.d.ts
export * from "./constants";
export * from "./utils";
export type { Logger } from "pino";
import { default as pino } from "pino";
export { pino };
//# sourceMappingURL=index.d.ts.map

3

dist/cjs/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pino = void 0;
const tslib_1 = require("tslib");

@@ -7,3 +8,3 @@ tslib_1.__exportStar(require("./constants"), exports);

const pino_1 = tslib_1.__importDefault(require("pino"));
module.exports = { pino: pino_1.default };
Object.defineProperty(exports, "pino", { enumerable: true, get: function () { return pino_1.default; } });
//# sourceMappingURL=index.js.map
export * from "./constants";
export * from "./utils";
export type { Logger } from "pino";
import { default as pino } from "pino";
export { pino };
//# sourceMappingURL=index.d.ts.map
export * from "./constants";
export * from "./utils";
import pino from "pino";
module.exports = { pino };
import { default as pino } from "pino";
export { pino };
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Logger",[],t):"object"==typeof exports?exports.Logger=t():e.Logger=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PINO_CUSTOM_CONTEXT_KEY=t.PINO_LOGGER_DEFAULTS=void 0,t.PINO_LOGGER_DEFAULTS={level:"info"},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2);n.__exportStar(r(0),t),n.__exportStar(r(3),t);const o=n.__importDefault(r(4));e.exports={pino:o.default}},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return s})),r.d(t,"__decorate",(function(){return a})),r.d(t,"__param",(function(){return l})),r.d(t,"__metadata",(function(){return u})),r.d(t,"__awaiter",(function(){return c})),r.d(t,"__generator",(function(){return f})),r.d(t,"__createBinding",(function(){return d})),r.d(t,"__exportStar",(function(){return p})),r.d(t,"__values",(function(){return v})),r.d(t,"__read",(function(){return b})),r.d(t,"__spread",(function(){return y})),r.d(t,"__spreadArrays",(function(){return g})),r.d(t,"__await",(function(){return h})),r.d(t,"__asyncGenerator",(function(){return _})),r.d(t,"__asyncDelegator",(function(){return m})),r.d(t,"__asyncValues",(function(){return O})),r.d(t,"__makeTemplateObject",(function(){return w})),r.d(t,"__importStar",(function(){return j})),r.d(t,"__importDefault",(function(){return S})),r.d(t,"__classPrivateFieldGet",(function(){return E})),r.d(t,"__classPrivateFieldSet",(function(){return x}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Logger",[],t):"object"==typeof exports?exports.Logger=t():e.Logger=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PINO_CUSTOM_CONTEXT_KEY=t.PINO_LOGGER_DEFAULTS=void 0,t.PINO_LOGGER_DEFAULTS={level:"info"},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const n=r(2);n.__exportStar(r(0),t),n.__exportStar(r(3),t);const o=n.__importDefault(r(4));Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return o.default}})},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return l})),r.d(t,"__param",(function(){return s})),r.d(t,"__metadata",(function(){return u})),r.d(t,"__awaiter",(function(){return c})),r.d(t,"__generator",(function(){return f})),r.d(t,"__createBinding",(function(){return d})),r.d(t,"__exportStar",(function(){return p})),r.d(t,"__values",(function(){return v})),r.d(t,"__read",(function(){return b})),r.d(t,"__spread",(function(){return y})),r.d(t,"__spreadArrays",(function(){return g})),r.d(t,"__await",(function(){return h})),r.d(t,"__asyncGenerator",(function(){return _})),r.d(t,"__asyncDelegator",(function(){return m})),r.d(t,"__asyncValues",(function(){return O})),r.d(t,"__makeTemplateObject",(function(){return w})),r.d(t,"__importStar",(function(){return j})),r.d(t,"__importDefault",(function(){return S})),r.d(t,"__classPrivateFieldGet",(function(){return E})),r.d(t,"__classPrivateFieldSet",(function(){return x}));
/*! *****************************************************************************

@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation.

***************************************************************************** */
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function a(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function l(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function _(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof h?Promise.resolve(r.value.v).then(l,u):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function l(e){a("next",e)}function u(e){a("throw",e)}function c(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function m(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:h(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=v(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function j(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const n=r(0);function o(e,t=n.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}function i(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){return e[r]=t,e}function s(e,t=n.PINO_CUSTOM_CONTEXT_KEY){let r="";return r=void 0===e.bindings?o(e,t):e.bindings().context||"",r}function a(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const o=s(e,r);return o.trim()?`${o}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null==e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=o,t.setBrowserLoggerContext=i,t.getLoggerContext=s,t.formatChildLoggerContext=a,t.generateChildLogger=function(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const o=a(e,t,r);return i(e.child({context:o}),o,r)}},function(e,t,r){"use strict";const n=r(5);e.exports=s;const o=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},i={mapHttpRequest:v,mapHttpResponse:v,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:v,res:v,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function s(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||o;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=function(e,t){if(Array.isArray(e)){return e.filter((function(e){return"!stdSerializers.err"!==e}))}return!0===e&&Object.keys(t)}(e.browser.serialize,n);let l=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(l=!1);"function"==typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");const f=e.level||"info",v=Object.create(r);v.log||(v.log=y),Object.defineProperty(v,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(v,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,a(b,v,"error","log"),a(b,v,"fatal","error"),a(b,v,"warn","error"),a(b,v,"info","log"),a(b,v,"debug","log"),a(b,v,"trace","log")}});const b={transmit:t,serialize:i,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:p(e)};return v.levels=s.levels,v.level=f,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=y,v.serializers=n,v._serialize=i,v._stdErrSerialize=l,v.child=function(r,o){if(!r)throw new Error("missing bindings for child Pino");o=o||{},i&&r.serializers&&(o.serializers=r.serializers);const s=o.serializers;if(i&&s){var a=Object.assign({},n,s),l=!0===e.browser.serialize?Object.keys(a):i;delete r.serializers,u([r],l,a,this._stdErrSerialize)}function f(e){this._childLevel=1+(0|e._childLevel),this.error=c(e,r,"error"),this.fatal=c(e,r,"fatal"),this.warn=c(e,r,"warn"),this.info=c(e,r,"info"),this.debug=c(e,r,"debug"),this.trace=c(e,r,"trace"),a&&(this.serializers=a,this._serialize=l),t&&(this._logEvent=d([].concat(e._logEvent.bindings,r)))}return f.prototype=this,new f(this)},t&&(v._logEvent=d()),v}function a(e,t,r,n){const i=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?y:i[r]?i[r]:o[r]||o[n]||y,function(e,t,r){if(!e.transmit&&t[r]===y)return;t[r]=(n=t[r],function(){const i=e.timestamp(),a=new Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===o?o:this;for(var d=0;d<a.length;d++)a[d]=arguments[d];if(e.serialize&&!e.asObject&&u(a,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(c,l(this,r,a,i)):n.apply(c,a),e.transmit){const n=e.transmit.level||t.level,o=s.levels.values[n],l=s.levels.values[r];if(l<o)return;f(this,{ts:i,methodLevel:r,methodValue:l,transmitLevel:n,transmitValue:s.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},a)}});var n}(e,t,r)}function l(e,t,r,o){e._serialize&&u(r,e._serialize,e.serializers,e._stdErrSerialize);const i=r.slice();let a=i[0];const l={};o&&(l.time=o),l.level=s.levels.values[t];let c=1+(0|e._childLevel);if(c<1&&(c=1),null!==a&&"object"==typeof a){for(;c--&&"object"==typeof i[0];)Object.assign(l,i.shift());a=i.length?n(i.shift(),i):void 0}else"string"==typeof a&&(a=n(i.shift(),i));return void 0!==a&&(l.msg=a),l}function u(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=s.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o]))for(const n in e[o])t&&t.indexOf(n)>-1&&n in r&&(e[o][n]=r[n](e[o][n]))}function c(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var o=1;o<n.length;o++)n[o]=arguments[o-1];return e[r].apply(this,n)}}function f(e,t,r){const n=t.send,o=t.ts,i=t.methodLevel,s=t.methodValue,a=t.val,l=e._logEvent.bindings;u(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter((function(e){return-1===l.indexOf(e)})),e._logEvent.level.label=i,e._logEvent.level.value=s,n(i,e._logEvent,a),e._logEvent=d(l)}function d(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function p(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?g:h}function v(){return{}}function b(e){return e}function y(){}function g(){return!1}function h(){return Date.now()}s.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},s.stdSerializers=i,s.stdTimeFunctions=Object.assign({},{nullTime:g,epochTime:h,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},function(e,t,r){"use strict";function n(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,t,r){var o=r&&r.stringify||n;if("object"==typeof e&&null!==e){var i=t.length+1;if(1===i)return e;var s=new Array(i);s[0]=o(e);for(var a=1;a<i;a++)s[a]=o(t[a]);return s.join(" ")}if("string"!=typeof e)return e;var l=t.length;if(0===l)return e;for(var u="",c=0,f=-1,d=e&&e.length||0,p=0;p<d;){if(37===e.charCodeAt(p)&&p+1<d){switch(f=f>-1?f:0,e.charCodeAt(p+1)){case 100:case 102:if(c>=l)break;if(null==t[c])break;f<p&&(u+=e.slice(f,p)),u+=Number(t[c]),f=p+2,p++;break;case 105:if(c>=l)break;if(null==t[c])break;f<p&&(u+=e.slice(f,p)),u+=Math.floor(Number(t[c])),f=p+2,p++;break;case 79:case 111:case 106:if(c>=l)break;if(void 0===t[c])break;f<p&&(u+=e.slice(f,p));var v=typeof t[c];if("string"===v){u+="'"+t[c]+"'",f=p+2,p++;break}if("function"===v){u+=t[c].name||"<anonymous>",f=p+2,p++;break}u+=o(t[c]),f=p+2,p++;break;case 115:if(c>=l)break;f<p&&(u+=e.slice(f,p)),u+=String(t[c]),f=p+2,p++;break;case 37:f<p&&(u+=e.slice(f,p)),u+="%",f=p+2,p++,c--}++c}++p}if(-1===f)return e;f<d&&(u+=e.slice(f));return u}}])}));
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function l(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function s(e,t){return function(r,n){t(r,n,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function l(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,l)}s((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)n[o]=i[a];return n}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function _(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{(r=o[e](t)).value instanceof h?Promise.resolve(r.value.v).then(s,u):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function s(e){l("next",e)}function u(e){l("throw",e)}function c(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function m(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:h(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=v(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function j(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const n=r(0);function o(e,t=n.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}function i(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){return e[r]=t,e}function a(e,t=n.PINO_CUSTOM_CONTEXT_KEY){let r="";return r=void 0===e.bindings?o(e,t):e.bindings().context||"",r}function l(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const o=a(e,r);return o.trim()?`${o}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null==e?void 0:e.level)||n.PINO_LOGGER_DEFAULTS.level})},t.getBrowserLoggerContext=o,t.setBrowserLoggerContext=i,t.getLoggerContext=a,t.formatChildLoggerContext=l,t.generateChildLogger=function(e,t,r=n.PINO_CUSTOM_CONTEXT_KEY){const o=l(e,t,r);return i(e.child({context:o}),o,r)}},function(e,t,r){"use strict";const n=r(5);e.exports=a;const o=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},i={mapHttpRequest:v,mapHttpResponse:v,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:v,res:v,err:function(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}};function a(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||o;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=function(e,t){if(Array.isArray(e)){return e.filter((function(e){return"!stdSerializers.err"!==e}))}return!0===e&&Object.keys(t)}(e.browser.serialize,n);let s=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);"function"==typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===e.enabled&&(e.level="silent");const f=e.level||"info",v=Object.create(r);v.log||(v.log=y),Object.defineProperty(v,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(v,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,l(b,v,"error","log"),l(b,v,"fatal","error"),l(b,v,"warn","error"),l(b,v,"info","log"),l(b,v,"debug","log"),l(b,v,"trace","log")}});const b={transmit:t,serialize:i,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:p(e)};return v.levels=a.levels,v.level=f,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=y,v.serializers=n,v._serialize=i,v._stdErrSerialize=s,v.child=function(r,o){if(!r)throw new Error("missing bindings for child Pino");o=o||{},i&&r.serializers&&(o.serializers=r.serializers);const a=o.serializers;if(i&&a){var l=Object.assign({},n,a),s=!0===e.browser.serialize?Object.keys(l):i;delete r.serializers,u([r],s,l,this._stdErrSerialize)}function f(e){this._childLevel=1+(0|e._childLevel),this.error=c(e,r,"error"),this.fatal=c(e,r,"fatal"),this.warn=c(e,r,"warn"),this.info=c(e,r,"info"),this.debug=c(e,r,"debug"),this.trace=c(e,r,"trace"),l&&(this.serializers=l,this._serialize=s),t&&(this._logEvent=d([].concat(e._logEvent.bindings,r)))}return f.prototype=this,new f(this)},t&&(v._logEvent=d()),v}function l(e,t,r,n){const i=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?y:i[r]?i[r]:o[r]||o[n]||y,function(e,t,r){if(!e.transmit&&t[r]===y)return;t[r]=(n=t[r],function(){const i=e.timestamp(),l=new Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===o?o:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];if(e.serialize&&!e.asObject&&u(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(c,s(this,r,l,i)):n.apply(c,l),e.transmit){const n=e.transmit.level||t.level,o=a.levels.values[n],s=a.levels.values[r];if(s<o)return;f(this,{ts:i,methodLevel:r,methodValue:s,transmitLevel:n,transmitValue:a.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},l)}});var n}(e,t,r)}function s(e,t,r,o){e._serialize&&u(r,e._serialize,e.serializers,e._stdErrSerialize);const i=r.slice();let l=i[0];const s={};o&&(s.time=o),s.level=a.levels.values[t];let c=1+(0|e._childLevel);if(c<1&&(c=1),null!==l&&"object"==typeof l){for(;c--&&"object"==typeof i[0];)Object.assign(s,i.shift());l=i.length?n(i.shift(),i):void 0}else"string"==typeof l&&(l=n(i.shift(),i));return void 0!==l&&(s.msg=l),s}function u(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=a.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o]))for(const n in e[o])t&&t.indexOf(n)>-1&&n in r&&(e[o][n]=r[n](e[o][n]))}function c(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var o=1;o<n.length;o++)n[o]=arguments[o-1];return e[r].apply(this,n)}}function f(e,t,r){const n=t.send,o=t.ts,i=t.methodLevel,a=t.methodValue,l=t.val,s=e._logEvent.bindings;u(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter((function(e){return-1===s.indexOf(e)})),e._logEvent.level.label=i,e._logEvent.level.value=a,n(i,e._logEvent,l),e._logEvent=d(s)}function d(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function p(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?g:h}function v(){return{}}function b(e){return e}function y(){}function g(){return!1}function h(){return Date.now()}a.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},a.stdSerializers=i,a.stdTimeFunctions=Object.assign({},{nullTime:g,epochTime:h,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},function(e,t,r){"use strict";function n(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,t,r){var o=r&&r.stringify||n;if("object"==typeof e&&null!==e){var i=t.length+1;if(1===i)return e;var a=new Array(i);a[0]=o(e);for(var l=1;l<i;l++)a[l]=o(t[l]);return a.join(" ")}if("string"!=typeof e)return e;var s=t.length;if(0===s)return e;for(var u="",c=0,f=-1,d=e&&e.length||0,p=0;p<d;){if(37===e.charCodeAt(p)&&p+1<d){switch(f=f>-1?f:0,e.charCodeAt(p+1)){case 100:case 102:if(c>=s)break;if(null==t[c])break;f<p&&(u+=e.slice(f,p)),u+=Number(t[c]),f=p+2,p++;break;case 105:if(c>=s)break;if(null==t[c])break;f<p&&(u+=e.slice(f,p)),u+=Math.floor(Number(t[c])),f=p+2,p++;break;case 79:case 111:case 106:if(c>=s)break;if(void 0===t[c])break;f<p&&(u+=e.slice(f,p));var v=typeof t[c];if("string"===v){u+="'"+t[c]+"'",f=p+2,p++;break}if("function"===v){u+=t[c].name||"<anonymous>",f=p+2,p++;break}u+=o(t[c]),f=p+2,p++;break;case 115:if(c>=s)break;f<p&&(u+=e.slice(f,p)),u+=String(t[c]),f=p+2,p++;break;case 37:f<p&&(u+=e.slice(f,p)),u+="%",f=p+2,p++,c--}++c}++p}if(-1===f)return e;f<d&&(u+=e.slice(f));return u}}])}));
{
"name": "@walletconnect/logger",
"description": "Logger Utils",
"version": "2.0.0-rc-57af4ea9",
"version": "2.0.0-rc-aa30f361",
"author": "WalletConnect, Inc. <walletconnect.com>",

@@ -44,3 +44,2 @@ "license": "MIT",

"pino-pretty": "^7.6.0",
"tslib": "^1.10.0",
"typescript": "^3.7.5",

@@ -50,7 +49,2 @@ "webpack": "^4.41.6",

},
"husky": {
"hooks": {
"pre-commit": "run-s lint"
}
},
"prettier": {

@@ -63,4 +57,5 @@ "printWidth": 80,

"dependencies": {
"pino": "7.11.0"
"pino": "7.11.0",
"tslib": "^1.10.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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