@walletconnect/logger
Advanced tools
Comparing version 1.0.0 to 1.0.1-rc-ba731f71
export declare const PINO_LOGGER_DEFAULTS: { | ||
level: string; | ||
prettyPrint: { | ||
colorize: boolean; | ||
translateTime: string; | ||
ignore: string; | ||
}; | ||
}; | ||
export declare const PINO_CUSTOM_CONTEXT_KEY = "custom_context"; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -6,9 +6,4 @@ "use strict"; | ||
level: "info", | ||
prettyPrint: { | ||
colorize: true, | ||
translateTime: "SYS:standard", | ||
ignore: "pid,hostname", | ||
}, | ||
}; | ||
exports.PINO_CUSTOM_CONTEXT_KEY = "custom_context"; | ||
//# sourceMappingURL=constants.js.map |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./constants"), exports); | ||
__exportStar(require("./utils"), exports); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./constants"), exports); | ||
tslib_1.__exportStar(require("./utils"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
function getDefaultLoggerOptions(opts) { | ||
return Object.assign(Object.assign({}, opts), { level: (opts === null || opts === void 0 ? void 0 : opts.level) || constants_1.PINO_LOGGER_DEFAULTS.level, prettyPrint: (opts === null || opts === void 0 ? void 0 : opts.prettyPrint) || constants_1.PINO_LOGGER_DEFAULTS.prettyPrint }); | ||
return Object.assign(Object.assign({}, opts), { level: (opts === null || opts === void 0 ? void 0 : opts.level) || constants_1.PINO_LOGGER_DEFAULTS.level }); | ||
} | ||
@@ -9,0 +9,0 @@ exports.getDefaultLoggerOptions = getDefaultLoggerOptions; |
export declare const PINO_LOGGER_DEFAULTS: { | ||
level: string; | ||
prettyPrint: { | ||
colorize: boolean; | ||
translateTime: string; | ||
ignore: string; | ||
}; | ||
}; | ||
export declare const PINO_CUSTOM_CONTEXT_KEY = "custom_context"; | ||
//# sourceMappingURL=constants.d.ts.map |
export const PINO_LOGGER_DEFAULTS = { | ||
level: "info", | ||
prettyPrint: { | ||
colorize: true, | ||
translateTime: "SYS:standard", | ||
ignore: "pid,hostname", | ||
}, | ||
}; | ||
export const PINO_CUSTOM_CONTEXT_KEY = "custom_context"; | ||
//# sourceMappingURL=constants.js.map |
import { PINO_CUSTOM_CONTEXT_KEY, PINO_LOGGER_DEFAULTS } from "./constants"; | ||
export function getDefaultLoggerOptions(opts) { | ||
return Object.assign(Object.assign({}, opts), { level: (opts === null || opts === void 0 ? void 0 : opts.level) || PINO_LOGGER_DEFAULTS.level, prettyPrint: (opts === null || opts === void 0 ? void 0 : opts.prettyPrint) || PINO_LOGGER_DEFAULTS.prettyPrint }); | ||
return Object.assign(Object.assign({}, opts), { level: (opts === null || opts === void 0 ? void 0 : opts.level) || PINO_LOGGER_DEFAULTS.level }); | ||
} | ||
@@ -5,0 +5,0 @@ export function getBrowserLoggerContext(logger, customContextKey = PINO_CUSTOM_CONTEXT_KEY) { |
@@ -1,1 +0,16 @@ | ||
!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 n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"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",prettyPrint:{colorize:!0,translateTime:"SYS:standard",ignore:"pid,hostname"}},t.PINO_CUSTOM_CONTEXT_KEY="custom_context"},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(0),t),o(n(2),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateChildLogger=t.formatChildLoggerContext=t.getLoggerContext=t.setBrowserLoggerContext=t.getBrowserLoggerContext=t.getDefaultLoggerOptions=void 0;const r=n(0);function o(e,t=r.PINO_CUSTOM_CONTEXT_KEY){return e[t]||""}function i(e,t,n=r.PINO_CUSTOM_CONTEXT_KEY){return e[n]=t,e}function u(e,t=r.PINO_CUSTOM_CONTEXT_KEY){let n="";return n=void 0===e.bindings?o(e,t):e.bindings().context||"",n}function c(e,t,n=r.PINO_CUSTOM_CONTEXT_KEY){const o=u(e,n);return o.trim()?`${o}/${t}`:t}t.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null==e?void 0:e.level)||r.PINO_LOGGER_DEFAULTS.level,prettyPrint:(null==e?void 0:e.prettyPrint)||r.PINO_LOGGER_DEFAULTS.prettyPrint})},t.getBrowserLoggerContext=o,t.setBrowserLoggerContext=i,t.getLoggerContext=u,t.formatChildLoggerContext=c,t.generateChildLogger=function(e,t,n=r.PINO_CUSTOM_CONTEXT_KEY){const o=c(e,t,n);return i(e.child({context:o}),o,n)}}])})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Logger",[],e):"object"==typeof exports?exports.Logger=e():t.Logger=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PINO_CUSTOM_CONTEXT_KEY=e.PINO_LOGGER_DEFAULTS=void 0,e.PINO_LOGGER_DEFAULTS={level:"info"},e.PINO_CUSTOM_CONTEXT_KEY="custom_context"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(2);r.__exportStar(n(0),e),r.__exportStar(n(3),e)},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return o})),n.d(e,"__assign",(function(){return u})),n.d(e,"__rest",(function(){return i})),n.d(e,"__decorate",(function(){return c})),n.d(e,"__param",(function(){return f})),n.d(e,"__metadata",(function(){return a})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return s})),n.d(e,"__createBinding",(function(){return d})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return _})),n.d(e,"__read",(function(){return y})),n.d(e,"__spread",(function(){return b})),n.d(e,"__spreadArrays",(function(){return g})),n.d(e,"__await",(function(){return v})),n.d(e,"__asyncGenerator",(function(){return O})),n.d(e,"__asyncDelegator",(function(){return h})),n.d(e,"__asyncValues",(function(){return m})),n.d(e,"__makeTemplateObject",(function(){return w})),n.d(e,"__importStar",(function(){return x})),n.d(e,"__importDefault",(function(){return P})),n.d(e,"__classPrivateFieldGet",(function(){return S})),n.d(e,"__classPrivateFieldSet",(function(){return T})); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function i(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function c(t,e,n,r){var o,u=arguments.length,i=u<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(i=(u<3?o(i):u>3?o(e,n,i):o(e,n))||i);return u>3&&i&&Object.defineProperty(e,n,i),i}function f(t,e){return function(n,r){e(n,r,t)}}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(o,u){function i(t){try{f(r.next(t))}catch(t){u(t)}}function c(t){try{f(r.throw(t))}catch(t){u(t)}}function f(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}f((r=r.apply(t,e||[])).next())}))}function s(t,e){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function d(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}function p(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function _(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,u=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=u.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}return i}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}function g(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var u=arguments[e],i=0,c=u.length;i<c;i++,o++)r[o]=u[i];return r}function v(t){return this instanceof v?(this.v=t,this):new v(t)}function O(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),u=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){u.push([t,e,n,r])>1||c(t,e)}))})}function c(t,e){try{(n=o[t](e)).value instanceof v?Promise.resolve(n.value.v).then(f,a):l(u[0][2],n)}catch(t){l(u[0][3],t)}var n}function f(t){c("next",t)}function a(t){c("throw",t)}function l(t,e){t(e),u.shift(),u.length&&c(u[0][0],u[0][1])}}function h(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:v(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function m(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=_(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}function w(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function x(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function P(t){return t&&t.__esModule?t:{default:t}}function S(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function T(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateChildLogger=e.formatChildLoggerContext=e.getLoggerContext=e.setBrowserLoggerContext=e.getBrowserLoggerContext=e.getDefaultLoggerOptions=void 0;const r=n(0);function o(t,e=r.PINO_CUSTOM_CONTEXT_KEY){return t[e]||""}function u(t,e,n=r.PINO_CUSTOM_CONTEXT_KEY){return t[n]=e,t}function i(t,e=r.PINO_CUSTOM_CONTEXT_KEY){let n="";return n=void 0===t.bindings?o(t,e):t.bindings().context||"",n}function c(t,e,n=r.PINO_CUSTOM_CONTEXT_KEY){const o=i(t,n);return o.trim()?`${o}/${e}`:e}e.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null==t?void 0:t.level)||r.PINO_LOGGER_DEFAULTS.level})},e.getBrowserLoggerContext=o,e.setBrowserLoggerContext=u,e.getLoggerContext=i,e.formatChildLoggerContext=c,e.generateChildLogger=function(t,e,n=r.PINO_CUSTOM_CONTEXT_KEY){const o=c(t,e,n);return u(t.child({context:o}),o,n)}}])})); |
{ | ||
"name": "@walletconnect/logger", | ||
"description": "Logger Utils", | ||
"version": "1.0.0", | ||
"author": "WalletConnect <walletconnect.org>", | ||
"version": "1.0.1-rc-ba731f71", | ||
"author": "WalletConnect, Inc. <walletconnect.com>", | ||
"license": "MIT", | ||
@@ -35,3 +35,3 @@ "homepage": "https://github.com/WalletConnect/walletconnect-utils/", | ||
"build": "run-s clean build:cjs build:esm build:umd ", | ||
"test": "env TS_NODE_PROJECT=\"tsconfig.cjs.json\" mocha --exit -r ts-node/register ./test/**/*.test.ts", | ||
"test": "env TS_NODE_PROJECT=\"tsconfig.cjs.json\" mocha --timeout 5000 --exit -r ts-node/register ./test/**/*.test.ts", | ||
"lint": "eslint -c '../../.eslintrc' --fix './src/**/*.ts'" | ||
@@ -44,3 +44,3 @@ }, | ||
"husky": "^4.3.0", | ||
"pino-pretty": "^4.3.0", | ||
"pino-pretty": "^7.6.0", | ||
"tslib": "^1.10.0", | ||
@@ -63,4 +63,4 @@ "typescript": "^3.7.5", | ||
"dependencies": { | ||
"pino": "^6.7.0" | ||
"pino": "7.11.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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
155164
30
141
1
1
+ Addedon-exit-leak-free@0.2.0(transitive)
+ Addedpino@7.11.0(transitive)
+ Addedpino-std-serializers@4.0.0(transitive)
+ Addedreal-require@0.1.0(transitive)
+ Addedsafe-stable-stringify@2.5.0(transitive)
+ Addedsonic-boom@2.8.0(transitive)
+ Addedthread-stream@0.15.2(transitive)
- Removedfast-safe-stringify@2.1.1(transitive)
- Removedflatstr@1.0.12(transitive)
- Removedpino@6.14.0(transitive)
- Removedpino-std-serializers@3.2.0(transitive)
- Removedsonic-boom@1.4.1(transitive)
Updatedpino@7.11.0