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,GAAI,EAAQ,QAAS,CACjB,MAAM,GAAY,EAAI,WAAW,SAAS,EAAQ,SAAW,OAAO,SAAS,EAAQ,QAAS,IAAM,EAAQ,QAC5G,EAAiB,IAAI,SAAQ,CAAC,EAAS,KACnC,EAAU,YAAW,KAEjB,MAAM,EAAQ,8BAA8B,MAC5C,EAAO,GACP,KACI,EAAI,eAAe,SAAS,EAAS,QAAQ,QAAQ,IAAI,GAC7D,CACA,MAAO,GAEP,IACD,EAAU,GAErB,CAEA,OAAI,EAAQ,OAEJ,EAAQ,QAED,QAAQ,KAAK,CAAC,GAAgB,EAAI,SAAS,SAAS,IAAK,UAIhE,EAAI,UAAU,OAAO,EAAS,0BAA0B,cAAc,cAAc,OAAO,SAAU,QAKlG,QAAQ,KAAK,CAAC,EAAgB,YAAY,EAAS,IAElE,CACA,QAAQ,IAAM,IACd,QAAQ,QAAU","file":"/npm/npm-check-updates@16.7.13/build/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/npm-check-updates@16.7.13/build/src/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\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.run = void 0;\nconst isString_1 = __importDefault(require(\"lodash/isString\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst prompts_ncu_1 = __importDefault(require(\"prompts-ncu\"));\nconst spawn_please_1 = __importDefault(require(\"spawn-please\"));\nconst cli_options_1 = require(\"./cli-options\");\nconst cache_1 = require(\"./lib/cache\");\nconst chalk_1 = __importStar(require(\"./lib/chalk\"));\nconst doctor_1 = __importDefault(require(\"./lib/doctor\"));\nconst exists_1 = __importDefault(require(\"./lib/exists\"));\nconst findPackage_1 = __importDefault(require(\"./lib/findPackage\"));\nconst getAllPackages_1 = __importDefault(require(\"./lib/getAllPackages\"));\nconst getNcuRc_1 = __importDefault(require(\"./lib/getNcuRc\"));\nconst initOptions_1 = __importDefault(require(\"./lib/initOptions\"));\nconst logging_1 = require(\"./lib/logging\");\nconst mergeOptions_1 = __importDefault(require(\"./lib/mergeOptions\"));\nconst programError_1 = __importDefault(require(\"./lib/programError\"));\nconst runGlobal_1 = __importDefault(require(\"./lib/runGlobal\"));\nconst runLocal_1 = __importDefault(require(\"./lib/runLocal\"));\nconst package_managers_1 = __importDefault(require(\"./package-managers\"));\n// allow prompt injection from environment variable for testing purposes\nif (process.env.INJECT_PROMPTS) {\n    prompts_ncu_1.default.inject(JSON.parse(process.env.INJECT_PROMPTS));\n}\n// Exit with non-zero error code when there is an unhandled promise rejection.\n// Use `node --trace-uncaught ...` to show where the exception was thrown.\n// See: https://nodejs.org/api/process.html#event-unhandledrejection\nprocess.on('unhandledRejection', (reason) => {\n    // do not rethrow, as there may be other errors to print out\n    console.error(reason);\n});\n/**\n * Volta is a tool for managing JavaScript tooling like Node and npm. Volta has\n * its own system for installing global packages which circumvents npm, so\n * commands like `npm ls -g` do not accurately reflect what is installed.\n *\n * The ability to use `npm ls -g` is tracked in this Volta issue: https://github.com/volta-cli/volta/issues/1012\n */\nfunction checkIfVolta(options) {\n    var _a;\n    // The first check is for macOS/Linux and the second check is for Windows\n    if (options.global && (!!process.env.VOLTA_HOME || ((_a = process.env.PATH) === null || _a === void 0 ? void 0 : _a.includes('\\\\Volta')))) {\n        const message = 'It appears you are using Volta. `npm-check-updates --global` ' +\n            'cannot be used with Volta because Volta has its own system for ' +\n            'managing global packages which circumvents npm.\\n\\n' +\n            'If you are still receiving this message after uninstalling Volta, ' +\n            'ensure your PATH does not contain an entry for Volta and your ' +\n            'shell profile does not define VOLTA_HOME. You may need to reboot ' +\n            'for changes to your shell profile to take effect.';\n        (0, logging_1.print)(options, message, 'error');\n        process.exit(1);\n    }\n}\n/** Returns the package manager that should be used to install packages after running \"ncu -u\". Detects pnpm via pnpm-lock.yarn. This is the one place that pnpm needs to be detected, since otherwise it is backwards compatible with npm. */\nconst getPackageManagerForInstall = async (options, pkgFile) => {\n    var _a;\n    if (options.packageManager !== 'npm')\n        return options.packageManager;\n    const cwd = ((_a = options.cwd) !== null && _a !== void 0 ? _a : pkgFile) ? `${pkgFile}/..` : process.cwd();\n    const pnpmDetected = await (0, exists_1.default)(path_1.default.join(cwd, 'pnpm-lock.yaml'));\n    return pnpmDetected ? 'pnpm' : 'npm';\n};\n/** Either suggest an install command based on the package manager, or in interactive mode, prompt to auto-install. */\nconst npmInstall = async (pkgs, analysis, options) => {\n    // if no packages were upgraded (i.e. all dependencies deselected in interactive mode), then bail without suggesting an install.\n    // normalize the analysis for one or many packages\n    const analysisNormalized = pkgs.length === 1 ? { [pkgs[0]]: analysis } : analysis;\n    const someUpgraded = Object.values(analysisNormalized).some(upgrades => Object.keys(upgrades).length > 0);\n    if (!someUpgraded)\n        return;\n    // for the purpose of the install hint, just use the package manager used in the first sub-project\n    // if auto-installing, the actual package manager in each sub-project will be used\n    const packageManager = await getPackageManagerForInstall(options, pkgs[0]);\n    // by default, show an install hint after upgrading\n    // this will be disabled in interactive mode if the user chooses to have npm-check-updates execute the install command\n    const installHint = `Run ${chalk_1.default.cyan(packageManager + ' install')}${pkgs.length > 1 && !options.workspace && !options.workspaces ? ' in each project directory' : ''} to install new versions`;\n    // prompt the user if they want ncu to run \"npm install\"\n    if (options.interactive && !process.env.NCU_DOCTOR) {\n        (0, logging_1.print)(options, '');\n        const response = await (0, prompts_ncu_1.default)({\n            type: 'confirm',\n            name: 'value',\n            message: `${installHint}?`,\n            initial: true,\n            // allow Ctrl+C to kill the process\n            onState: (state) => {\n                if (state.aborted) {\n                    process.nextTick(() => process.exit(1));\n                }\n            },\n        });\n        // auto-install\n        if (response.value) {\n            pkgs.forEach(async (pkgFile) => {\n                const packageManager = await getPackageManagerForInstall(options, pkgFile);\n                const cmd = packageManager + (process.platform === 'win32' ? '.cmd' : '');\n                const cwd = options.cwd || path_1.default.resolve(pkgFile, '..');\n                let stdout = '';\n                try {\n                    await (0, spawn_please_1.default)(cmd, ['install'], {\n                        cwd,\n                        ...(packageManager === 'pnpm'\n                            ? {\n                                env: {\n                                    ...process.env,\n                                    // With spawn, pnpm install will fail with ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies.\n                                    // When pnpm install is run directly from the terminal, this error does not occur.\n                                    // When pnpm install is run from a simple spawn script, this error does not occur.\n                                    // The issue only seems to be when pnpm install is executed from npm-check-updates, but it's not clear what configuration or environmental factors are causing this.\n                                    // For now, turn off strict-peer-dependencies on pnpm auto-install.\n                                    // See: https://github.com/raineorshine/npm-check-updates/issues/1191\n                                    npm_config_strict_peer_dependencies: false,\n                                },\n                            }\n                            : null),\n                        stdout: (data) => {\n                            stdout += data;\n                        },\n                    });\n                    (0, logging_1.print)(options, stdout, 'verbose');\n                }\n                catch (err) {\n                    // sometimes packages print errors to stdout instead of stderr\n                    // if there is nothing on stderr, reject with stdout\n                    throw new Error((err === null || err === void 0 ? void 0 : err.message) || err || stdout);\n                }\n            });\n        }\n    }\n    // show the install hint unless auto-install occurred\n    else {\n        (0, logging_1.print)(options, `\\n${installHint}.`);\n    }\n};\n/** Runs the dependency upgrades. Loads the ncurc, finds the package file, and handles --deep. */\nasync function runUpgrades(options, timeout) {\n    var _a;\n    const [packageInfos, workspacePackages] = await (0, getAllPackages_1.default)(options);\n    const packageFilepaths = packageInfos.map((packageInfo) => packageInfo.filepath);\n    // enable deep mode if --deep, --workspace, --workspaces, or if multiple package files are found\n    const isWorkspace = options.workspaces || !!((_a = options.workspace) === null || _a === void 0 ? void 0 : _a.length);\n    options.deep = options.deep || isWorkspace || packageInfos.length > 1;\n    let analysis;\n    if (options.global) {\n        const analysis = await (0, runGlobal_1.default)(options);\n        clearTimeout(timeout);\n        return analysis;\n    }\n    else if (options.deep) {\n        analysis = await packageInfos.reduce(async (previousPromise, packageInfo) => {\n            const packages = await previousPromise;\n            // copy object to prevent share .ncurc options between different packageFile, to prevent unpredictable behavior\n            const rcResult = await (0, getNcuRc_1.default)({ packageFile: packageInfo.filepath, color: options.color });\n            let rcConfig = rcResult && rcResult.config ? rcResult.config : {};\n            if (options.mergeConfig && Object.keys(rcConfig).length) {\n                // Merge config options.\n                rcConfig = (0, mergeOptions_1.default)(options, rcConfig);\n            }\n            const pkgOptions = {\n                ...options,\n                ...rcConfig,\n                packageFile: packageInfo.filepath,\n                workspacePackages,\n            };\n            const [pkgData, pkgFile] = await (0, findPackage_1.default)(pkgOptions);\n            return {\n                ...packages,\n                // index by relative path if cwd was specified\n                [pkgOptions.cwd\n                    ? path_1.default\n                        .relative(path_1.default.resolve(pkgOptions.cwd), pkgFile)\n                        // convert Windows path to *nix path for consistency\n                        .replace(/\\\\/g, '/')\n                    : pkgFile]: await (0, runLocal_1.default)(pkgOptions, pkgData, pkgFile),\n            };\n        }, Promise.resolve({}));\n        if (options.json) {\n            (0, logging_1.printJson)(options, analysis);\n        }\n    }\n    else {\n        // mutate packageFile when glob pattern finds only single package\n        if (packageInfos.length === 1 && packageInfos[0].filepath !== (options.packageFile || 'package.json')) {\n            options.packageFile = packageInfos[0].filepath;\n        }\n        const [pkgData, pkgFile] = await (0, findPackage_1.default)(options);\n        analysis = await (0, runLocal_1.default)(options, pkgData, pkgFile);\n    }\n    clearTimeout(timeout);\n    // suggest install command or auto-install\n    if (options.upgrade) {\n        // deno does not have an install command\n        // The closest equivalent is deno cache, but it is optional.\n        // See: https://deno.land/manual@v1.30.3/references/cheatsheet#nodejs---deno-cheatsheet\n        if (options.packageManager === 'deno') {\n            (0, logging_1.print)(options, '');\n        }\n        else {\n            // if workspaces, install from root project folder\n            await npmInstall(isWorkspace ? ['package.json'] : packageFilepaths, analysis, options);\n        }\n    }\n    return analysis;\n}\n/** Main entry point.\n *\n * @returns Promise<\n * PackageFile                    Default returns upgraded package file.\n * | Index<VersionSpec>    --jsonUpgraded returns only upgraded dependencies.\n * | void                         --global upgrade returns void.\n * >\n */\nasync function run(runOptions = {}, { cli } = {}) {\n    const options = await (0, initOptions_1.default)(runOptions, { cli });\n    // chalk may already have been initialized in cli.ts, but when imported as a module\n    // chalkInit is idempotent\n    await (0, chalk_1.chalkInit)(options.color);\n    checkIfVolta(options);\n    (0, logging_1.print)(options, 'Initializing', 'verbose');\n    if (options.cacheClear) {\n        await (0, cache_1.cacheClear)(options);\n    }\n    if (!options.prefix) {\n        options.prefix = await package_managers_1.default[options.packageManager === 'yarn' ? 'yarn' : 'npm'].defaultPrefix(options);\n    }\n    let timeout;\n    let timeoutPromise = new Promise(() => null);\n    if (options.timeout) {\n        const timeoutMs = (0, isString_1.default)(options.timeout) ? Number.parseInt(options.timeout, 10) : options.timeout;\n        timeoutPromise = new Promise((resolve, reject) => {\n            timeout = setTimeout(() => {\n                // must catch the error and reject explicitly since we are in a setTimeout\n                const error = `Exceeded global timeout of ${timeoutMs}ms`;\n                reject(error);\n                try {\n                    (0, programError_1.default)(options, chalk_1.default.red(error));\n                }\n                catch (e) {\n                    /* noop */\n                }\n            }, timeoutMs);\n        });\n    }\n    // doctor mode\n    if (options.doctor) {\n        // execute with -u\n        if (options.upgrade) {\n            // we have to pass run directly since it would be a circular require if doctor included this file\n            return Promise.race([timeoutPromise, (0, doctor_1.default)(run, options)]);\n        }\n        // print help otherwise\n        else {\n            (0, logging_1.print)(options, `Usage: ncu --doctor\\n\\n${cli_options_1.cliOptionsMap.doctor.help()}`, 'warn');\n        }\n    }\n    // normal mode\n    else {\n        return Promise.race([timeoutPromise, runUpgrades(options, timeout)]);\n    }\n}\nexports.run = run;\nexports.default = run;\n"]}