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3B,YAAa,QAAQ,SACrB,IAAK,QACL,OAAQ,QAAQ,OAChB,UAAW,QAAQ,UACnB,OAAQ,QAAQ,OAChB,8BACA,OAAQ,QAAQ,OAChB,KAAM,QAAQ,KAEd,UAAW,QAAQ,WAAa,IAqClC,SAAS,UAAU,GACb,IACF,QAAQ,MAAM,GAAG,EAAE,aAAa,EAAI,WACpC,QAAQ,KAAK,IAEf,IAAI,EAAiB,GAAG,EAAE,eAAe,4DACrC,QAAQ,YACV,EAAiB,GAAG,EAAE,+BAA+B,4CAEvD,QAAQ,IAAI,GACZ,QAAQ,KAAK,EACf,EAxCI,EAAI,SAAS,YAAc,iBAAmB,EAAE,OAAS,QAAQ,QAEnE,EAAI,UAAU,SAAS,6FAA6F,MAAK,IAEnH,IACF,eAAiB,EAAE,OAGrB,EAAI,iBAAiB,SAAS,cAAc,cAAc,CAAC,EAAG,SAAU,CAAC,EAAG,CAC1E,gCACE,UAAU,IACb,OAAM,IACH,IACF,QAAQ,MAAM,GAAG,EAAE,aAAa,EAAI,WACpC,QAAQ,KAAK,GACf,KAKF,EAAI,iBAAiB,SAAS,QAAS,WAsBzC,IAAI,SAAW,QAAQ,QAAU","file":"/npm/install-peerdeps@3.0.7/lib/cli.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/install-peerdeps@3.0.7/lib/cli.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\nrequire(\"@babel/polyfill\");\nvar _commander = require(\"commander\");\nvar _picocolors = _interopRequireDefault(require(\"picocolors\"));\nvar _promptly = require(\"promptly\");\nvar _package = _interopRequireDefault(require(\"../package.json\"));\nvar C = _interopRequireWildcard(require(\"./constants\"));\nvar _hasYarn = _interopRequireDefault(require(\"./has-yarn\"));\nvar _helpers = require(\"./helpers\");\nvar _installPeerdeps = _interopRequireDefault(require(\"./install-peerdeps\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n// Create program object\nconst program = new _commander.Command(\"install-peerdeps\");\n\n// Get relevant package information\nconst {\n  name,\n  version\n} = _package.default;\n\n/**\n * Error message that is printed when the program can't\n * parse the package string.\n */\nfunction printPackageFormatError() {\n  console.error(`${C.errorText} Please specify the package to install with peerDeps in the form of \\`package\\` or \\`package@n.n.n\\``);\n  console.error(`${C.errorText} At this time you must provide the full semver version of the package.`);\n  console.error(`${C.errorText} Alternatively, omit it to automatically install the latest version of the package.`);\n}\n\n// Create program\nprogram.version(version).description(\"Installs the specified package along with correct peerDeps.\").option(\"-D\", \"Install the package as a devDependency (alias for `-d`)\").option(\"-d, --dev\", \"Install the package as a devDependency\").option(\"-g, --global\", \"Install the package globally\").option(\"-o, --only-peers\", \"Install only peerDependencies of the package\").option(\"-S, --silent\", \"If using npm, don't save in package.json\").option(\"-Y, --yarn\", \"Install with Yarn\").option(\"-P, --pnpm\", \"Install with pnpm\").option(\"-n, --no-registry\", \"Use local node_modules instead of a remote registry to get the list of peerDependencies\").option(\"--dry-run\", \"Do not install packages, but show the install command that will be run\").option('-x, --extra-args \"<extra_args>\"', \"Extra arguments to pass through to the underlying package manager\").usage(\"<package>[@<version>], default version is 'latest'\").parse(process.argv);\n\n// Print program name and version (like what Yarn does)\nconsole.log(_picocolors.default.bold(`${name} v${version}`));\n\n// Make sure we're installing at least one package\nif (program.args.length === 0) {\n  console.error(`${C.errorText} Please specify a package to install with peerDeps.`);\n  // An exit code of \"9\" indicates an invalid argument\n  // See https://nodejs.org/api/process.html#process_exit_codes\n  process.exitCode = 9;\n  program.help();\n}\n\n// Make sure we're installing no more than one package\nif (program.args.length > 1) {\n  console.error(`${C.errorText} Too many arguments. Please specify ONE package at a time to install with peerDeps. Alternatively, pass extra arguments with --extra-args \"<extra_args>\".`);\n  // An exit code of \"9\" indicates an invalid argument\n  // See https://nodejs.org/api/process.html#process_exit_codes\n  process.exit(9);\n}\n\n// The first argument after the options is the name of the package\nconst packageString = program.args[0];\nconst {\n  packageName,\n  packageVersion\n} = (0, _helpers.parsePackageString)(packageString);\n\n// If we can't get a package name out,\n// print the format error\nif (!packageName) {\n  printPackageFormatError();\n  process.exit(9);\n}\n\n/** @type {C.npm | C.yarn | C.pnpm} */\nlet packageManager = C.npm; // Default package manager is npm\n\nif (program.yarn && program.pnpm) {\n  console.error(`${C.errorText} Option --yarn and --pnpm cannot be used concurrently.`);\n  process.exit(9);\n}\nif (program.yarn) {\n  packageManager = C.yarn;\n}\nif (program.pnpm) {\n  packageManager = C.pnpm;\n}\n\n// Yarn does not allow silent install of dependencies\nif (program.yarn && program.silent) {\n  console.error(`${C.errorText} Option --silent cannot be used with --yarn.`);\n  process.exit(9);\n}\nconst devMode = program.dev || program.D;\n// Dev option can't be used with silent,\n// since --dev means it should be saved\n// as a devDependency\nif (devMode && program.silent) {\n  console.error(`${C.errorText} Option --silent cannot be used with --dev.`);\n  process.exit(9);\n}\n\n// Dev option can't be used with global,\n// since --dev means it should be saved\n// as a devDependency (locally)\nif (devMode && program.silent) {\n  console.error(`${C.errorText} Option --dev cannot be used with --global.`);\n  process.exit(9);\n}\n\n// Define options object to pass to\n// the installPeerDeps function\nconst options = {\n  packageName,\n  // If packageVersion is undefined, default to \"latest\"\n  version: packageVersion || \"latest\",\n  noRegistry: !program.registry,\n  dev: devMode,\n  global: program.global,\n  onlyPeers: program.onlyPeers,\n  silent: program.silent,\n  packageManager,\n  dryRun: program.dryRun,\n  auth: program.auth,\n  // Args after -- will be passed through\n  extraArgs: program.extraArgs || \"\"\n};\n\n// Disabled this rule so we can hoist the callback\n/* eslint-disable no-use-before-define */\n\n// Check if the user has Yarn but didn't specify the Yarn option\n// However, don't show prompt if user wants to install silently\nif ((0, _hasYarn.default)() && packageManager !== C.yarn && !program.silent) {\n  // If they do, ask if they want to use Yarn\n  (0, _promptly.confirm)(\"It seems as if you are using Yarn. Would you like to use Yarn for the installation? (y/n)\").then(value => {\n    // Value is true or false; if true, they want to use Yarn\n    if (value) {\n      packageManager = C.yarn;\n    }\n    // Now install, but with the new packageManager\n    (0, _installPeerdeps.default)(_objectSpread(_objectSpread({}, options), {}, {\n      packageManager\n    }), installCb);\n  }).catch(err => {\n    if (err) {\n      console.error(`${C.errorText} ${err.message}`);\n      process.exit(1);\n    }\n  });\n} else {\n  // If they don't have Yarn or they've already\n  // opted to use Yarn, go ahead and install\n  (0, _installPeerdeps.default)(options, installCb);\n}\n\n/**\n * Callback which is called after the installation\n * process finishes\n * @callback\n * @param {Error} [err] - the error, if any, that occurred during installation\n */\nfunction installCb(err) {\n  if (err) {\n    console.error(`${C.errorText} ${err.message}`);\n    process.exit(1);\n  }\n  let successMessage = `${C.successText} ${packageName} and its peerDeps were installed successfully.`;\n  if (program.onlyPeers) {\n    successMessage = `${C.successText} The peerDeps of ${packageName} were installed successfully.`;\n  }\n  console.log(successMessage);\n  process.exit(0);\n}\n/* eslint-enable */\nvar _default = exports.default = program;"]}