import npmTypes from '@pnpm/npm-conf/lib/types'

export const types = Object.assign({
  'auto-install-peers': Boolean,
  bail: Boolean,
  'cache-dir': String,
  'child-concurrency': Number,
  'merge-git-branch-lockfiles': Boolean,
  'merge-git-branch-lockfiles-branch-pattern': Array,
  color: ['always', 'auto', 'never'],
  'config-dir': String,
  'deploy-all-files': Boolean,
  'dedupe-peer-dependents': Boolean,
  'dedupe-direct-deps': Boolean,
  'dedupe-injected-deps': Boolean,
  dev: [null, true],
  dir: String,
  'disallow-workspace-cycles': Boolean,
  'enable-modules-dir': Boolean,
  'enable-pre-post-scripts': Boolean,
  'exclude-links-from-lockfile': Boolean,
  'extend-node-path': Boolean,
  'fetch-timeout': Number,
  'fetching-concurrency': Number,
  filter: [String, Array],
  'filter-prod': [String, Array],
  'frozen-lockfile': Boolean,
  'git-checks': Boolean,
  'git-shallow-hosts': Array,
  'global-bin-dir': String,
  'global-dir': String,
  'global-path': String,
  'global-pnpmfile': String,
  'git-branch-lockfile': Boolean,
  hoist: Boolean,
  'hoist-pattern': Array,
  'hoist-workspace-packages': Boolean,
  'ignore-compatibility-db': Boolean,
  'ignore-dep-scripts': Boolean,
  'ignore-pnpmfile': Boolean,
  'ignore-workspace': Boolean,
  'ignore-workspace-cycles': Boolean,
  'ignore-workspace-root-check': Boolean,
  'include-workspace-root': Boolean,
  'legacy-dir-filtering': Boolean,
  'link-workspace-packages': [Boolean, 'deep'],
  lockfile: Boolean,
  'lockfile-dir': String,
  'lockfile-directory': String, // TODO: deprecate
  'lockfile-include-tarball-url': Boolean,
  'lockfile-only': Boolean,
  loglevel: ['silent', 'error', 'warn', 'info', 'debug'],
  'manage-package-manager-versions': Boolean,
  maxsockets: Number,
  'modules-cache-max-age': Number,
  'dlx-cache-max-age': Number,
  'modules-dir': String,
  'network-concurrency': Number,
  'node-linker': ['pnp', 'isolated', 'hoisted'],
  noproxy: String,
  'npm-path': String,
  offline: Boolean,
  'only-built-dependencies': [String],
  'pack-gzip-level': Number,
  'package-import-method': ['auto', 'hardlink', 'clone', 'copy'],
  'patches-dir': String,
  pnpmfile: String,
  'package-manager-strict': Boolean,
  'package-manager-strict-version': Boolean,
  'prefer-frozen-lockfile': Boolean,
  'prefer-offline': Boolean,
  'prefer-symlinked-executables': Boolean,
  'prefer-workspace-packages': Boolean,
  production: [null, true],
  'public-hoist-pattern': Array,
  'publish-branch': String,
  'recursive-install': Boolean,
  reporter: String,
  'resolution-mode': ['highest', 'time-based', 'lowest-direct'],
  'resolve-peers-from-workspace-root': Boolean,
  'aggregate-output': Boolean,
  'reporter-hide-prefix': Boolean,
  'save-peer': Boolean,
  'save-workspace-protocol': Boolean,
  'script-shell': String,
  'shamefully-flatten': Boolean,
  'shamefully-hoist': Boolean,
  'shared-workspace-lockfile': Boolean,
  'shell-emulator': Boolean,
  'side-effects-cache': Boolean,
  'side-effects-cache-readonly': Boolean,
  symlink: Boolean,
  sort: Boolean,
  'state-dir': String,
  'store-dir': String,
  stream: Boolean,
  'strict-store-pkg-content-check': Boolean,
  'strict-peer-dependencies': Boolean,
  'use-beta-cli': Boolean,
  'use-node-version': String,
  'use-running-store-server': Boolean,
  'use-store-server': Boolean,
  'use-stderr': Boolean,
  'verify-store-integrity': Boolean,
  'virtual-store-dir': String,
  'virtual-store-dir-max-length': Number,
  'peers-suffix-max-length': Number,
  'workspace-concurrency': Number,
  'workspace-packages': [String, Array],
  'workspace-root': Boolean,
  'test-pattern': [String, Array],
  'changed-files-ignore-pattern': [String, Array],
  'embed-readme': Boolean,
  'update-notifier': Boolean,
  'registry-supports-time-field': Boolean,
  'fail-if-no-match': Boolean,
}, npmTypes.types)
