diff --git a/dist/index.js b/dist/index.js index 55f49bc..f9d394d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -33032,7 +33032,7 @@ var createTokenAuth = function createTokenAuth2(token) { ;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js -const version_VERSION = "6.1.5"; +const version_VERSION = "6.1.6"; ;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js @@ -33046,6 +33046,21 @@ const noop = () => { }; const consoleWarn = console.warn.bind(console); const consoleError = console.error.bind(console); +function createLogger(logger = {}) { + if (typeof logger.debug !== "function") { + logger.debug = noop; + } + if (typeof logger.info !== "function") { + logger.info = noop; + } + if (typeof logger.warn !== "function") { + logger.warn = consoleWarn; + } + if (typeof logger.error !== "function") { + logger.error = consoleError; + } + return logger; +} const userAgentTrail = `octokit-core.js/${version_VERSION} ${getUserAgent()}`; class Octokit { static VERSION = version_VERSION; @@ -33113,15 +33128,7 @@ class Octokit { } this.request = request.defaults(requestDefaults); this.graphql = withCustomRequest(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); + this.log = createLogger(options.log); this.hook = hook; if (!options.authStrategy) { if (!options.auth) {