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iB,OAAO,MAAM,EAAK,SAAS,WAAY,CAC1D,gBAAiB,EAAa,gBAC9B,cAAe,EAAa,cAC5B,WAAY,EAAa,WACzB,UAAW,EACX,SAAU,EACV,gBAAiB,EAAa,kBAE9B,GACA,qBAAqB,GAEzB,EAAS,QAAQ,GACjB,GACJ,IACA,SAAqB,GACjB,IAAK,EACD,OAAO,IAEX,MAAM,EAAmB,OAAO,OAAO,EAAU,EAAU,GAErD,EAAW,IAAI,MAAM,CACvB,KAAM,EAAU,KAChB,SAAU,OAAO,KAAK,GACtB,IAAK,EAAU,IACf,KAAM,KAAK,KAAK,EAAU,KAAM,KAIpC,EAAS,MAAQ,EACjB,EAAG,KAAM,EACb,GAER,EAEA,MAAM,SAAW,QAAQ,kBACzB,OAAO,QAAQ,SAAW","file":"/npm/gulp-todo@7.1.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gulp-todo@7.1.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nconst colors = require('ansi-colors');\nconst fancyLog = require('fancy-log');\nconst leasot = require('leasot');\nconst path = require('path');\nconst PluginError = require('plugin-error');\nconst through = require('through2');\nconst Vinyl = require('vinyl');\n\nconst pluginName = 'gulp-todo';\n\nfunction logCommentsToConsole(comments) {\n    comments.forEach(function(comment) {\n        const isTodo = /todo/i.test(comment.tag);\n        const commentType = isTodo ? colors.cyan(comment.tag) : colors.magenta(comment.tag);\n        const commentLocation = '@' + colors.gray(comment.file + ':' + comment.line);\n        fancyLog(commentType, comment.text, commentLocation);\n    });\n}\n\n/**\n *\n * @param {boolean} [absolute=false] Output absolute paths of files (as available via `file.path`)\n * @param {string} [fileName=TODO.md] Specify the output filename\n * @param {Object} [parseOptions={}] Passed directly to `leasot.parse` - See [ParseConfig](https://pgilad.github.io/leasot/interfaces/parseconfig.html)\n * @param {string|function} [reporter=markdown] The reporter to use. See https://pgilad.github.io/leasot/enums/builtinreporters.html\n * @param {Object} [reportOptions={}] Passed directly to `leasot.report` - See https://pgilad.github.io/leasot/index.html#report\n * @param {boolean} [skipUnsupported=false] Whether to skip unsupported files or not\n * @param {boolean} [verbose=false] Output comments to console as well\n * @returns {*}\n */\nmodule.exports = function({\n    absolute = false,\n    fileName = 'TODO.md',\n    parseOptions = {},\n    reporter = 'markdown',\n    reportOptions = {},\n    skipUnsupported = false,\n    verbose = false,\n} = {}) {\n    let firstFile;\n    const comments = [];\n\n    return through.obj(\n        function collectTodos(file, enc, cb) {\n            if (file.isNull()) {\n                cb(null, file);\n                return;\n            }\n\n            if (file.isStream()) {\n                cb(new PluginError(pluginName, 'Streaming not supported'));\n                return;\n            }\n            firstFile = firstFile || file;\n\n            //get extension - assume .js as default\n            const ext = path.extname(file.path) || '.js';\n\n            //check if parser for filetype exists\n            if (!leasot.isExtensionSupported(ext)) {\n                if (!skipUnsupported) {\n                    const msg = `File: ${file.path} with extension ${colors.red(ext)} is not supported`;\n                    return cb(new PluginError(pluginName, msg));\n                }\n                if (verbose) {\n                    const msg = `Skipping file ${file.path} with extension ${colors.red(ext)} as it is unsupported`;\n                    fancyLog(msg);\n                }\n                return cb();\n            }\n            const filePath = absolute ? file.path : (file.path && file.relative) || file.path;\n\n            const parsedComments = leasot.parse(file.contents.toString(), {\n                associateParser: parseOptions.associateParser,\n                customParsers: parseOptions.customParsers,\n                customTags: parseOptions.customTags,\n                extension: ext,\n                filename: filePath,\n                withInlineFiles: parseOptions.withInlineFiles,\n            });\n            if (verbose) {\n                logCommentsToConsole(parsedComments);\n            }\n            comments.push(...parsedComments);\n            cb();\n        },\n        function reportTodos(cb) {\n            if (!firstFile) {\n                return cb();\n            }\n            const reporterContents = leasot.report(comments, reporter, reportOptions);\n\n            const todoFile = new Vinyl({\n                base: firstFile.base,\n                contents: Buffer.from(reporterContents),\n                cwd: firstFile.cwd,\n                path: path.join(firstFile.base, fileName),\n            });\n\n            // also pass along comments object for future reporters\n            todoFile.todos = comments;\n            cb(null, todoFile);\n        }\n    );\n};\n\nconst reporter = require('./lib/reporter');\nmodule.exports.reporter = reporter;\n"]}