UNPKG

@qc2168/mib

Version:
4 lines 1.01 MB
{ "version": 3, "sources": ["../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/format.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/styles.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/system/has-flag.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/system/supports-colors.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/custom/trap.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/custom/zalgo.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/maps/america.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/maps/zebra.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/maps/rainbow.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/maps/random.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/colors.js", "../../node_modules/.pnpm/colors@1.4.0/node_modules/colors/safe.js", "../../node_modules/.pnpm/triple-beam@1.3.0/node_modules/triple-beam/config/cli.js", "../../node_modules/.pnpm/triple-beam@1.3.0/node_modules/triple-beam/config/npm.js", "../../node_modules/.pnpm/triple-beam@1.3.0/node_modules/triple-beam/config/syslog.js", "../../node_modules/.pnpm/triple-beam@1.3.0/node_modules/triple-beam/config/index.js", "../../node_modules/.pnpm/triple-beam@1.3.0/node_modules/triple-beam/index.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/colorize.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/levels.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/align.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/errors.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/pad-levels.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/cli.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/combine.js", "../../node_modules/.pnpm/safe-stable-stringify@1.1.1/node_modules/safe-stable-stringify/stable.js", "../../node_modules/.pnpm/safe-stable-stringify@1.1.1/node_modules/safe-stable-stringify/index.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/json.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/label.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/logstash.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/metadata.js", "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/ms.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/pretty-print.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/printf.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/simple.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/splat.js", "../../node_modules/.pnpm/fecha@4.2.1/node_modules/fecha/src/fecha.ts", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/timestamp.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/uncolorize.js", "../../node_modules/.pnpm/logform@2.3.2/node_modules/logform/index.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/common.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/package.json", "../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/stream.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/destroy.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/errors.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/state.js", "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js", "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/buffer_list.js", "../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js", "../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/end-of-stream.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/async_iterator.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/from.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_readable.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_duplex.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_writable.js", "../../node_modules/.pnpm/winston-transport@4.4.2/node_modules/winston-transport/legacy.js", "../../node_modules/.pnpm/winston-transport@4.4.2/node_modules/winston-transport/index.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/transports/console.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/isArrayLike.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/initialParams.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/setImmediate.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/asyncify.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/wrapAsync.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/awaitify.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/parallel.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/once.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/getIterator.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/iterator.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/onlyOnce.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/breakLoop.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/asyncEachOfLimit.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/eachOfLimit.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/eachOfLimit.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/eachOfSeries.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/series.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_transform.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/_stream_passthrough.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/pipeline.js", "../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/readable.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/diagnostics.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/node/production.js", "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js", "../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js", "../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js", "../../node_modules/.pnpm/color-string@1.9.0/node_modules/color-string/index.js", "../../node_modules/.pnpm/registry.nlark.com+color-name@1.1.3/node_modules/color-name/index.js", "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js", "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js", "../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js", "../../node_modules/.pnpm/color@3.2.1/node_modules/color/index.js", "../../node_modules/.pnpm/text-hex@1.0.0/node_modules/text-hex/index.js", "../../node_modules/.pnpm/colorspace@1.1.4/node_modules/colorspace/index.js", "../../node_modules/.pnpm/kuler@2.0.0/node_modules/kuler/index.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js", "../../node_modules/.pnpm/enabled@2.0.0/node_modules/enabled/index.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/adapters/index.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/adapters/process.env.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/logger/console.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/node/development.js", "../../node_modules/.pnpm/@dabh+diagnostics@2.0.2/node_modules/@dabh/diagnostics/node/index.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/tail-file.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/transports/file.js", "../../node_modules/.pnpm/safe-stable-stringify@2.3.1/node_modules/safe-stable-stringify/index.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/transports/http.js", "../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/transports/stream.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/transports/index.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/config/index.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/eachOf.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/internal/withoutIndex.js", "../../node_modules/.pnpm/async@3.2.3/node_modules/async/forEach.js", "../../node_modules/.pnpm/fn.name@1.1.0/node_modules/fn.name/index.js", "../../node_modules/.pnpm/one-time@1.0.0/node_modules/one-time/index.js", "../../node_modules/.pnpm/stack-trace@0.0.10/node_modules/stack-trace/lib/stack-trace.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/exception-stream.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/exception-handler.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/rejection-handler.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/profiler.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/logger.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/create-logger.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston/container.js", "../../node_modules/.pnpm/winston@3.5.1/node_modules/winston/lib/winston.js", "../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/action.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/strip.js", "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/figures.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/style.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/lines.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/wrap.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/entriesToDisplay.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/prompt.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/text.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/select.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/toggle.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/datepart.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/meridiem.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/day.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/hours.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/milliseconds.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/minutes.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/month.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/seconds.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/year.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/number.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/multiselect.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocomplete.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocompleteMultiselect.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/confirm.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.js", "../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.js", "../../src/index.ts", "../../src/mib.ts", "../../src/utils/adb.ts", "../../src/utils/logger.ts", "../../src/config.ts", "../../src/utils/getCParams.ts", "../../src/adbCmd.ts", "../../src/utils/pathRepair.ts", "../../src/node.ts", "../../src/utils/hash.ts", "../../src/utils/error.ts", "../../src/devices.ts", "../../src/utils/isPath.ts"], "sourcesContent": ["'use strict';\n\n/*\n * Displays a helpful message and the source of\n * the format when it is invalid.\n */\nclass InvalidFormatError extends Error {\n constructor(formatFn) {\n super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${formatFn.toString().split('\\n')[0]}\\n`);\n\n Error.captureStackTrace(this, InvalidFormatError);\n }\n}\n\n/*\n * function format (formatFn)\n * Returns a create function for the `formatFn`.\n */\nmodule.exports = formatFn => {\n if (formatFn.length > 2) {\n throw new InvalidFormatError(formatFn);\n }\n\n /*\n * function Format (options)\n * Base prototype which calls a `_format`\n * function and pushes the result.\n */\n function Format(options = {}) {\n this.options = options;\n }\n\n Format.prototype.transform = formatFn;\n\n //\n // Create a function which returns new instances of\n // FormatWrap for simple syntax like:\n //\n // require('winston').formats.json();\n //\n function createFormatWrap(opts) {\n return new Format(opts);\n }\n\n //\n // Expose the FormatWrap through the create function\n // for testability.\n //\n createFormatWrap.Format = Format;\n return createFormatWrap;\n};\n", "/*\nThe MIT License (MIT)\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\nvar styles = {};\nmodule['exports'] = styles;\n\nvar codes = {\n reset: [0, 0],\n\n bold: [1, 22],\n dim: [2, 22],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n grey: [90, 39],\n\n brightRed: [91, 39],\n brightGreen: [92, 39],\n brightYellow: [93, 39],\n brightBlue: [94, 39],\n brightMagenta: [95, 39],\n brightCyan: [96, 39],\n brightWhite: [97, 39],\n\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n bgGray: [100, 49],\n bgGrey: [100, 49],\n\n bgBrightRed: [101, 49],\n bgBrightGreen: [102, 49],\n bgBrightYellow: [103, 49],\n bgBrightBlue: [104, 49],\n bgBrightMagenta: [105, 49],\n bgBrightCyan: [106, 49],\n bgBrightWhite: [107, 49],\n\n // legacy styles for colors pre v1.0.0\n blackBG: [40, 49],\n redBG: [41, 49],\n greenBG: [42, 49],\n yellowBG: [43, 49],\n blueBG: [44, 49],\n magentaBG: [45, 49],\n cyanBG: [46, 49],\n whiteBG: [47, 49],\n\n};\n\nObject.keys(codes).forEach(function(key) {\n var val = codes[key];\n var style = styles[key] = [];\n style.open = '\\u001b[' + val[0] + 'm';\n style.close = '\\u001b[' + val[1] + 'm';\n});\n", "/*\nMIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n'use strict';\n\nmodule.exports = function(flag, argv) {\n argv = argv || process.argv;\n\n var terminatorPos = argv.indexOf('--');\n var prefix = /^-{1,2}/.test(flag) ? '' : '--';\n var pos = argv.indexOf(prefix + flag);\n\n return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n", "/*\nThe MIT License (MIT)\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\n'use strict';\n\nvar os = require('os');\nvar hasFlag = require('./has-flag.js');\n\nvar env = process.env;\n\nvar forceColor = void 0;\nif (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {\n forceColor = false;\n} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true')\n || hasFlag('color=always')) {\n forceColor = true;\n}\nif ('FORCE_COLOR' in env) {\n forceColor = env.FORCE_COLOR.length === 0\n || parseInt(env.FORCE_COLOR, 10) !== 0;\n}\n\nfunction translateLevel(level) {\n if (level === 0) {\n return false;\n }\n\n return {\n level: level,\n hasBasic: true,\n has256: level >= 2,\n has16m: level >= 3,\n };\n}\n\nfunction supportsColor(stream) {\n if (forceColor === false) {\n return 0;\n }\n\n if (hasFlag('color=16m') || hasFlag('color=full')\n || hasFlag('color=truecolor')) {\n return 3;\n }\n\n if (hasFlag('color=256')) {\n return 2;\n }\n\n if (stream && !stream.isTTY && forceColor !== true) {\n return 0;\n }\n\n var min = forceColor ? 1 : 0;\n\n if (process.platform === 'win32') {\n // Node.js 7.5.0 is the first version of Node.js to include a patch to\n // libuv that enables 256 color output on Windows. Anything earlier and it\n // won't work. However, here we target Node.js 8 at minimum as it is an LTS\n // release, and Node.js 7 is not. Windows 10 build 10586 is the first\n // Windows release that supports 256 colors. Windows 10 build 14931 is the\n // first release that supports 16m/TrueColor.\n var osRelease = os.release().split('.');\n if (Number(process.versions.node.split('.')[0]) >= 8\n && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {\n return Number(osRelease[2]) >= 14931 ? 3 : 2;\n }\n\n return 1;\n }\n\n if ('CI' in env) {\n if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) {\n return sign in env;\n }) || env.CI_NAME === 'codeship') {\n return 1;\n }\n\n return min;\n }\n\n if ('TEAMCITY_VERSION' in env) {\n return (/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0\n );\n }\n\n if ('TERM_PROGRAM' in env) {\n var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n switch (env.TERM_PROGRAM) {\n case 'iTerm.app':\n return version >= 3 ? 3 : 2;\n case 'Hyper':\n return 3;\n case 'Apple_Terminal':\n return 2;\n // No default\n }\n }\n\n if (/-256(color)?$/i.test(env.TERM)) {\n return 2;\n }\n\n if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n return 1;\n }\n\n if ('COLORTERM' in env) {\n return 1;\n }\n\n if (env.TERM === 'dumb') {\n return min;\n }\n\n return min;\n}\n\nfunction getSupportLevel(stream) {\n var level = supportsColor(stream);\n return translateLevel(level);\n}\n\nmodule.exports = {\n supportsColor: getSupportLevel,\n stdout: getSupportLevel(process.stdout),\n stderr: getSupportLevel(process.stderr),\n};\n", "module['exports'] = function runTheTrap(text, options) {\n var result = '';\n text = text || 'Run the trap, drop the bass';\n text = text.split('');\n var trap = {\n a: ['\\u0040', '\\u0104', '\\u023a', '\\u0245', '\\u0394', '\\u039b', '\\u0414'],\n b: ['\\u00df', '\\u0181', '\\u0243', '\\u026e', '\\u03b2', '\\u0e3f'],\n c: ['\\u00a9', '\\u023b', '\\u03fe'],\n d: ['\\u00d0', '\\u018a', '\\u0500', '\\u0501', '\\u0502', '\\u0503'],\n e: ['\\u00cb', '\\u0115', '\\u018e', '\\u0258', '\\u03a3', '\\u03be', '\\u04bc',\n '\\u0a6c'],\n f: ['\\u04fa'],\n g: ['\\u0262'],\n h: ['\\u0126', '\\u0195', '\\u04a2', '\\u04ba', '\\u04c7', '\\u050a'],\n i: ['\\u0f0f'],\n j: ['\\u0134'],\n k: ['\\u0138', '\\u04a0', '\\u04c3', '\\u051e'],\n l: ['\\u0139'],\n m: ['\\u028d', '\\u04cd', '\\u04ce', '\\u0520', '\\u0521', '\\u0d69'],\n n: ['\\u00d1', '\\u014b', '\\u019d', '\\u0376', '\\u03a0', '\\u048a'],\n o: ['\\u00d8', '\\u00f5', '\\u00f8', '\\u01fe', '\\u0298', '\\u047a', '\\u05dd',\n '\\u06dd', '\\u0e4f'],\n p: ['\\u01f7', '\\u048e'],\n q: ['\\u09cd'],\n r: ['\\u00ae', '\\u01a6', '\\u0210', '\\u024c', '\\u0280', '\\u042f'],\n s: ['\\u00a7', '\\u03de', '\\u03df', '\\u03e8'],\n t: ['\\u0141', '\\u0166', '\\u0373'],\n u: ['\\u01b1', '\\u054d'],\n v: ['\\u05d8'],\n w: ['\\u0428', '\\u0460', '\\u047c', '\\u0d70'],\n x: ['\\u04b2', '\\u04fe', '\\u04fc', '\\u04fd'],\n y: ['\\u00a5', '\\u04b0', '\\u04cb'],\n z: ['\\u01b5', '\\u0240'],\n };\n text.forEach(function(c) {\n c = c.toLowerCase();\n var chars = trap[c] || [' '];\n var rand = Math.floor(Math.random() * chars.length);\n if (typeof trap[c] !== 'undefined') {\n result += trap[c][rand];\n } else {\n result += c;\n }\n });\n return result;\n};\n", "// please no\nmodule['exports'] = function zalgo(text, options) {\n text = text || ' he is here ';\n var soul = {\n 'up': [\n '\u030D', '\u030E', '\u0304', '\u0305',\n '\u033F', '\u0311', '\u0306', '\u0310',\n '\u0352', '\u0357', '\u0351', '\u0307',\n '\u0308', '\u030A', '\u0342', '\u0313',\n '\u0308', '\u034A', '\u034B', '\u034C',\n '\u0303', '\u0302', '\u030C', '\u0350',\n '\u0300', '\u0301', '\u030B', '\u030F',\n '\u0312', '\u0313', '\u0314', '\u033D',\n '\u0309', '\u0363', '\u0364', '\u0365',\n '\u0366', '\u0367', '\u0368', '\u0369',\n '\u036A', '\u036B', '\u036C', '\u036D',\n '\u036E', '\u036F', '\u033E', '\u035B',\n '\u0346', '\u031A',\n ],\n 'down': [\n '\u0316', '\u0317', '\u0318', '\u0319',\n '\u031C', '\u031D', '\u031E', '\u031F',\n '\u0320', '\u0324', '\u0325', '\u0326',\n '\u0329', '\u032A', '\u032B', '\u032C',\n '\u032D', '\u032E', '\u032F', '\u0330',\n '\u0331', '\u0332', '\u0333', '\u0339',\n '\u033A', '\u033B', '\u033C', '\u0345',\n '\u0347', '\u0348', '\u0349', '\u034D',\n '\u034E', '\u0353', '\u0354', '\u0355',\n '\u0356', '\u0359', '\u035A', '\u0323',\n ],\n 'mid': [\n '\u0315', '\u031B', '\u0300', '\u0301',\n '\u0358', '\u0321', '\u0322', '\u0327',\n '\u0328', '\u0334', '\u0335', '\u0336',\n '\u035C', '\u035D', '\u035E',\n '\u035F', '\u0360', '\u0362', '\u0338',\n '\u0337', '\u0361', ' \u0489',\n ],\n };\n var all = [].concat(soul.up, soul.down, soul.mid);\n\n function randomNumber(range) {\n var r = Math.floor(Math.random() * range);\n return r;\n }\n\n function isChar(character) {\n var bool = false;\n all.filter(function(i) {\n bool = (i === character);\n });\n return bool;\n }\n\n\n function heComes(text, options) {\n var result = '';\n var counts;\n var l;\n options = options || {};\n options['up'] =\n typeof options['up'] !== 'undefined' ? options['up'] : true;\n options['mid'] =\n typeof options['mid'] !== 'undefined' ? options['mid'] : true;\n options['down'] =\n typeof options['down'] !== 'undefined' ? options['down'] : true;\n options['size'] =\n typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';\n text = text.split('');\n for (l in text) {\n if (isChar(l)) {\n continue;\n }\n result = result + text[l];\n counts = {'up': 0, 'down': 0, 'mid': 0};\n switch (options.size) {\n case 'mini':\n counts.up = randomNumber(8);\n counts.mid = randomNumber(2);\n counts.down = randomNumber(8);\n break;\n case 'maxi':\n counts.up = randomNumber(16) + 3;\n counts.mid = randomNumber(4) + 1;\n counts.down = randomNumber(64) + 3;\n break;\n default:\n counts.up = randomNumber(8) + 1;\n counts.mid = randomNumber(6) / 2;\n counts.down = randomNumber(8) + 1;\n break;\n }\n\n var arr = ['up', 'mid', 'down'];\n for (var d in arr) {\n var index = arr[d];\n for (var i = 0; i <= counts[index]; i++) {\n if (options[index]) {\n result = result + soul[index][randomNumber(soul[index].length)];\n }\n }\n }\n }\n return result;\n }\n // don't summon him\n return heComes(text, options);\n};\n\n", "module['exports'] = function(colors) {\n return function(letter, i, exploded) {\n if (letter === ' ') return letter;\n switch (i%3) {\n case 0: return colors.red(letter);\n case 1: return colors.white(letter);\n case 2: return colors.blue(letter);\n }\n };\n};\n", "module['exports'] = function(colors) {\n return function(letter, i, exploded) {\n return i % 2 === 0 ? letter : colors.inverse(letter);\n };\n};\n", "module['exports'] = function(colors) {\n // RoY G BiV\n var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta'];\n return function(letter, i, exploded) {\n if (letter === ' ') {\n return letter;\n } else {\n return colors[rainbowColors[i++ % rainbowColors.length]](letter);\n }\n };\n};\n\n", "module['exports'] = function(colors) {\n var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',\n 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed',\n 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta'];\n return function(letter, i, exploded) {\n return letter === ' ' ? letter :\n colors[\n available[Math.round(Math.random() * (available.length - 2))]\n ](letter);\n };\n};\n", "/*\n\nThe MIT License (MIT)\n\nOriginal Library\n - Copyright (c) Marak Squires\n\nAdditional functionality\n - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\nvar colors = {};\nmodule['exports'] = colors;\n\ncolors.themes = {};\n\nvar util = require('util');\nvar ansiStyles = colors.styles = require('./styles');\nvar defineProps = Object.defineProperties;\nvar newLineRegex = new RegExp(/[\\r\\n]+/g);\n\ncolors.supportsColor = require('./system/supports-colors').supportsColor;\n\nif (typeof colors.enabled === 'undefined') {\n colors.enabled = colors.supportsColor() !== false;\n}\n\ncolors.enable = function() {\n colors.enabled = true;\n};\n\ncolors.disable = function() {\n colors.enabled = false;\n};\n\ncolors.stripColors = colors.strip = function(str) {\n return ('' + str).replace(/\\x1B\\[\\d+m/g, '');\n};\n\n// eslint-disable-next-line no-unused-vars\nvar stylize = colors.stylize = function stylize(str, style) {\n if (!colors.enabled) {\n return str+'';\n }\n\n var styleMap = ansiStyles[style];\n\n // Stylize should work for non-ANSI styles, too\n if(!styleMap && style in colors){\n // Style maps like trap operate as functions on strings;\n // they don't have properties like open or close.\n return colors[style](str);\n }\n\n return styleMap.open + str + styleMap.close;\n};\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\nvar escapeStringRegexp = function(str) {\n if (typeof str !== 'string') {\n throw new TypeError('Expected a string');\n }\n return str.replace(matchOperatorsRe, '\\\\$&');\n};\n\nfunction build(_styles) {\n var builder = function builder() {\n return applyStyle.apply(builder, arguments);\n };\n builder._styles = _styles;\n // __proto__ is used because we must return a function, but there is\n // no way to create a function with a different prototype.\n builder.__proto__ = proto;\n return builder;\n}\n\nvar styles = (function() {\n var ret = {};\n ansiStyles.grey = ansiStyles.gray;\n Object.keys(ansiStyles).forEach(function(key) {\n ansiStyles[key].closeRe =\n new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n ret[key] = {\n get: function() {\n return build(this._styles.concat(key));\n },\n };\n });\n return ret;\n})();\n\nvar proto = defineProps(function colors() {}, styles);\n\nfunction applyStyle() {\n var args = Array.prototype.slice.call(arguments);\n\n var str = args.map(function(arg) {\n // Use weak equality check so we can colorize null/undefined in safe mode\n if (arg != null && arg.constructor === String) {\n return arg;\n } else {\n return util.inspect(arg);\n }\n }).join(' ');\n\n if (!colors.enabled || !str) {\n return str;\n }\n\n var newLinesPresent = str.indexOf('\\n') != -1;\n\n var nestedStyles = this._styles;\n\n var i = nestedStyles.length;\n while (i--) {\n var code = ansiStyles[nestedStyles[i]];\n str = code.open + str.replace(code.closeRe, code.open) + code.close;\n if (newLinesPresent) {\n str = str.replace(newLineRegex, function(match) {\n return code.close + match + code.open;\n });\n }\n }\n\n return str;\n}\n\ncolors.setTheme = function(theme) {\n if (typeof theme === 'string') {\n console.log('colors.setTheme now only accepts an object, not a string. ' +\n 'If you are trying to set a theme from a file, it is now your (the ' +\n 'caller\\'s) responsibility to require the file. The old syntax ' +\n 'looked like colors.setTheme(__dirname + ' +\n '\\'/../themes/generic-logging.js\\'); The new syntax looks like '+\n 'colors.setTheme(require(__dirname + ' +\n '\\'/../themes/generic-logging.js\\'));');\n return;\n }\n for (var style in theme) {\n (function(style) {\n colors[style] = function(str) {\n if (typeof theme[style] === 'object') {\n var out = str;\n for (var i in theme[style]) {\n out = colors[theme[style][i]](out);\n }\n return out;\n }\n return colors[theme[style]](str);\n };\n })(style);\n }\n};\n\nfunction init() {\n var ret = {};\n Object.keys(styles).forEach(function(name) {\n ret[name] = {\n get: function() {\n return build([name]);\n },\n };\n });\n return ret;\n}\n\nvar sequencer = function sequencer(map, str) {\n var exploded = str.split('');\n exploded = exploded.map(map);\n return exploded.join('');\n};\n\n// custom formatter methods\ncolors.trap = require('./custom/trap');\ncolors.zalgo = require('./custom/zalgo');\n\n// maps\ncolors.maps = {};\ncolors.maps.america = require('./maps/america')(colors);\ncolors.maps.zebra = require('./maps/zebra')(colors);\ncolors.maps.rainbow = require('./maps/rainbow')(colors);\ncolors.maps.random = require('./maps/random')(colors);\n\nfor (var map in colors.maps) {\n (function(map) {\n colors[map] = function(str) {\n return sequencer(colors.maps[map], str);\n };\n })(map);\n}\n\ndefineProps(colors, init());\n", "//\n// Remark: Requiring this file will use the \"safe\" colors API,\n// which will not touch String.prototype.\n//\n// var colors = require('colors/safe');\n// colors.red(\"foo\")\n//\n//\nvar colors = require('./lib/colors');\nmodule['exports'] = colors;\n", "/**\n * cli.js: Config that conform to commonly used CLI logging levels.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n'use strict';\n\n/**\n * Default levels for the CLI configuration.\n * @type {Object}\n */\nexports.levels = {\n error: 0,\n warn: 1,\n help: 2,\n data: 3,\n info: 4,\n debug: 5,\n prompt: 6,\n verbose: 7,\n input: 8,\n silly: 9\n};\n\n/**\n * Default colors for the CLI configuration.\n * @type {Object}\n */\nexports.colors = {\n error: 'red',\n warn: 'yellow',\n help: 'cyan',\n data: 'grey',\n info: 'green',\n debug: 'blue',\n prompt: 'grey',\n verbose: 'cyan',\n input: 'grey',\n silly: 'magenta'\n};\n", "/**\n * npm.js: Config that conform to npm logging levels.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n'use strict';\n\n/**\n * Default levels for the npm configuration.\n * @type {Object}\n */\nexports.levels = {\n error: 0,\n warn: 1,\n info: 2,\n http: 3,\n verbose: 4,\n debug: 5,\n silly: 6\n};\n\n/**\n * Default levels for the npm configuration.\n * @type {Object}\n */\nexports.colors = {\n error: 'red',\n warn: 'yellow',\n info: 'green',\n http: 'green',\n verbose: 'cyan',\n debug: 'blue',\n silly: 'magenta'\n};\n", "/**\n * syslog.js: Config that conform to syslog logging levels.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n'use strict';\n\n/**\n * Default levels for the syslog configuration.\n * @type {Object}\n */\nexports.levels = {\n emerg: 0,\n alert: 1,\n crit: 2,\n error: 3,\n warning: 4,\n notice: 5,\n info: 6,\n debug: 7\n};\n\n/**\n * Default levels for the syslog configuration.\n * @type {Object}\n */\nexports.colors = {\n emerg: 'red',\n alert: 'yellow',\n crit: 'red',\n error: 'red',\n warning: 'red',\n notice: 'yellow',\n info: 'green',\n debug: 'blue'\n};\n", "/**\n * index.js: Default settings for all levels that winston knows about.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n'use strict';\n\n/**\n * Export config set for the CLI.\n * @type {Object}\n */\nObject.defineProperty(exports, 'cli', {\n value: require('./cli')\n});\n\n/**\n * Export config set for npm.\n * @type {Object}\n */\nObject.defineProperty(exports, 'npm', {\n value: require('./npm')\n});\n\n/**\n * Export config set for the syslog.\n * @type {Object}\n */\nObject.defineProperty(exports, 'syslog', {\n value: require('./syslog')\n});\n", "'use strict';\n\n/**\n * A shareable symbol constant that can be used\n * as a non-enumerable / semi-hidden level identifier\n * to allow the readable level property to be mutable for\n * operations like colorization\n *\n * @type {Symbol}\n */\nObject.defineProperty(exports, 'LEVEL', {\n value: Symbol.for('level')\n});\n\n/**\n * A shareable symbol constant that can be used\n * as a non-enumerable / semi-hidden message identifier\n * to allow the final message property to not have\n * side effects on another.\n *\n * @type {Symbol}\n */\nObject.defineProperty(exports, 'MESSAGE', {\n value: Symbol.for('message')\n});\n\n/**\n * A shareable symbol constant that can be used\n * as a non-enumerable / semi-hidden message identifier\n * to allow the extracted splat property be hidden\n *\n * @type {Symbol}\n */\nObject.defineProperty(exports, 'SPLAT', {\n value: Symbol.for('splat')\n});\n\n/**\n * A shareable object constant that can be used\n * as a standard configuration for winston@3.\n *\n * @type {Object}\n */\nObject.defineProperty(exports, 'configs', {\n value: require('./config')\n});\n", "'use strict';\n\nconst colors = require('colors/safe');\nconst { LEVEL, MESSAGE } = require('triple-beam');\n\n//\n// Fix colors not appearing in non-tty environments\n//\ncolors.enabled = true;\n\n/**\n * @property {RegExp} hasSpace\n * Simple regex to check for presence of spaces.\n */\nconst hasSpace = /\\s+/;\n\n/*\n * Colorizer format. Wraps the `level` and/or `message` properties\n * of the `info` objects with ANSI color codes based on a few options.\n */\nclass Colorizer {\n constructor(opts = {}) {\n if (opts.colors) {\n this.addColors(opts.colors);\n }\n\n this.options = opts;\n }\n\n /*\n * Adds the colors Object to the set of allColors\n * known by the Colorizer\n *\n * @param {Object} colors Set of color mappings to add.\n */\n static addColors(clrs) {\n const nextColors = Object.keys(clrs).reduce((acc, level) => {\n acc[level] = hasSpace.test(clrs[level])\n ? clrs[level].split(hasSpace)\n : clrs[level];\n\n return acc;\n }, {});\n\n Colorizer.allColors = Object.assign({}, Colorizer.allColors || {}, nextColors);\n return Colorizer.allColors;\n }\n\n /*\n * Adds the colors Object to the set of allColors\n * known by the Colorizer\n *\n * @param {Object} colors Set of color mappings to add.\n */\n addColors(clrs) {\n return Colorizer.addColors(clrs);\n }\n\n /*\n * function colorize (lookup, level, message)\n * Performs multi-step colorization using colors/safe\n */\n colorize(lookup, level, message) {\n if (typeof message === 'undefined') {\n message = level;\n }\n\n //\n // If the color for the level is just a string\n // then attempt to colorize the message with it.\n //\n if (!Array.isArray(Colorizer.allColors[lookup])) {\n return colors[Colorizer.allColors[lookup]](message);\n }\n\n //\n // If it is an Array then iterate over that Array, applying\n // the colors function for each item.\n //\n for (let i = 0, len = Colorizer.allColors[lookup].length; i < len; i++) {\n message = colors[Colorizer.allColors[lookup][i]](message);\n }\n\n return message;\n }\n\n /*\n * function transform (info, opts)\n * Attempts to colorize the { level, message } of the given\n * `logform` info object.\n */\n transform(info, opts) {\n if (opts.all && typeof info[MESSAGE] === 'string') {\n info[MESSAGE] = this.colorize(info[LEVEL], info.level, info[MESSAGE]);\n }\n\n if (opts.level || opts.all || !opts.message) {\n info.level = this.colorize(info[LEVEL], info.level);\n }\n\n if (opts.all || opts.message) {\n info.message = this.colorize(info[LEVEL], info.level, info.message);\n }\n\n return info;\n }\n}\n\n/*\n * function colorize (info)\n * Returns a new instance of the colorize Format that applies\n * level colors to `info` objects. This was previously exposed\n * as { colorize: true } to transports in `winston < 3.0.0`.\n */\nmodule.exports = opts => new Colorizer(opts);\n\n//\n// Attach the Colorizer for registration purposes\n//\nmodule.exports.Colorizer\n = module.exports.Format\n = Colorizer;\n", "'use strict';\n\nconst { Colorizer } = require('./colorize');\n\n/*\n * Simple method to register colors with a simpler require\n * path within the module.\n */\nmodule.exports = config => {\n Colorizer.addColors(config.colors || config);\n return config;\n};\n", "'use strict';\n\nconst format = require('./format');\n\n/*\n * function align (info)\n * Returns a new instance of the align Format which adds a `\\t`\n * delimiter before the message to properly align it in the same place.\n * It was previously { align: true } in winston < 3.0.0\n */\nmodule.exports = format(info => {\n info.message = `\\t${info.message}`;\n return info;\n});\n", "/* eslint no-undefined: 0 */\n'use strict';\n\nconst format = require('./format');\nconst { LEVEL, MESSAGE } = require('triple-beam');\n\n/*\n * function errors (info)\n * If the `message` property of the `info` object is an instance of `Error`,\n * replace the `Error` object its own `message` property.\n *\n * Optionally, the Error's `stack` property can also be appended to the `info` object.\n */\nmodule.exports = format((einfo, { stack }) => {\n if (einfo instanceof Error) {\n const info = Object.assign({}, einfo, {\n level: einfo.level,\n [LEVEL]: einfo[LEVEL] || einfo.level,\n message: einfo.message,\n [MESSAGE]: einfo[MESSAGE] || einfo.message\n });\n\n if (stack) info.stack = einfo.stack;\n return info;\n }\n\n if (!(einfo.message instanceof Error)) return einfo;\n\n // Assign all enumerable properties and the\n // message property from the error provided.\n const err = einfo.message;\n Object.assign(einfo, err);\n einfo.message = err.message;\n einfo[MESSAGE] = err.message;\n\n // Assign the stack if requested.\n if (stack) einfo.stack = err.stack;\n return einfo;\n});\n", "/* eslint no-unused-vars: 0 */\n'use strict';\n\nconst { configs, LEVEL, MESSAGE } = require('triple-beam');\n\nclass Padder {\n constructor(opts = { levels: configs.npm.levels }) {\n this.paddings = Padder.paddingForLevels(opts.levels, opts.filler);\n this.options = opts;\n }\n\n /**\n * Returns the maximum length of keys in the specified `levels` Object.\n * @param {Object} levels Set of all levels to calculate longest level against.\n * @returns {Number} Maximum length of the longest level string.\n */\n static getLongestLevel(levels) {\n const lvls = Object.keys(levels).map(level => level.length);\n return Math.max(...lvls);\n }\n\n /**\n * Returns the padding for the specified `level` assuming that the\n * maximum length of all levels it's associated with is `maxLength`.\n * @param {String} level Level to calculate padding for.\n * @param {String} filler Repeatable text to use for padding.\n * @param {Number} maxLength Length of the longest level\n * @returns {String} Padding string for the `level`\n */\n static paddingForLevel(level, filler, maxLength) {\n const targetLen = maxLength + 1 - level.length;\n const rep = Math.floor(targetLen / filler.length);\n const padding = `${filler}${filler.repeat(rep)}`;\n return padding.slice(0, targetLen);\n }\n\n /**\n * Returns an object with the string paddings for the given `levels`\n * using the specified `filler`.\n * @param {Object} levels Set of all levels to calculate padding for.\n * @param {String} filler Repeatable text to use for padding.\n * @returns {Object} Mapping of level to desired padding.\n */\n static paddingForLevels(levels, filler = ' ') {\n const maxLength = Padder.getLongestLevel(levels);\n return Object.keys(levels).reduce((acc, level) => {\n acc[level] = Padder.paddingForLevel(level, filler, maxLength);\n return acc;\n }, {});\n }\n\n /**\n * Prepends the padding onto the `message` based on the `LEVEL` of\n * the `info`. This is based on the behavior of `winston@2` which also\n * prepended the level onto the message.\n *\n * See: https://github.com/winstonjs/winston/blob/2.x/lib/winston/logger.js#L198-L201\n *\n * @param {Info} info Logform info object\n * @param {Object} opts Options passed along to