<commit_before>import { docsUrl, readProjectManifest } from '@pnpm/cli-utils'
import { Config, types as allTypes } from '@pnpm/config'
import PnpmError from '@pnpm/error'
import { tryReadProjectManifest } from '@pnpm/read-project-manifest'
import runNpm from '@pnpm/run-npm'
import { Dependencies, ProjectManifest } from '@pnpm/types'
import rimraf = require('@zkochan/rimraf')
import cpFile = require('cp-file')
import { prompt } from 'enquirer'
import fg = require('fast-glob')
import fs = require('mz/fs')
import path = require('path')
import R = require('ramda')
import renderHelp = require('render-help')
import writeJsonFile = require('write-json-file')
import { getCurrentBranch, isGitRepo, isRemoteHistoryClean, isWorkingTreeClean } from './gitChecks'
import recursivePublish, { PublishRecursiveOpts } from './recursivePublish'

export function rcOptionsTypes () {
  return {
    ...cliOptionsTypes(),
    ...R.pick([
      'npm-path',
    ], allTypes),
  }
}

export function cliOptionsTypes () {
  return R.pick([
    'access',
    'git-checks',
    'otp',
    'publish-branch',
    'registry',
    'tag',
    'unsafe-perm',
  ], allTypes)
}

export const commandNames = ['publish']

export function help () {
  return renderHelp({
    description: 'Publishes a package to the npm registry.',
    descriptionLists: [
      {
        title: 'Options',

        list: [
          {
            description: 'Checks if current branch is your publish branch, clean, and up-to-date',
            name: '--git-checks',
          },
          {
            description: 'Sets branch name to publish. Default is master',
            name: '--publish-branch',
          },
        ],
      },
    ],
    url: docsUrl('publish'),<commit_msg>fix: publish should work with -r option<commit_after>import { docsUrl, readProjectManifest } from '@pnpm/cli-utils'
import { Config, types as allTypes } from '@pnpm/config'
import PnpmError from '@pnpm/error'
import { tryReadProjectManifest } from '@pnpm/read-project-manifest'
import runNpm from '@pnpm/run-npm'
import { Dependencies, ProjectManifest } from '@pnpm/types'
import rimraf = require('@zkochan/rimraf')
import cpFile = require('cp-file')
import { prompt } from 'enquirer'
import fg = require('fast-glob')
import fs = require('mz/fs')
import path = require('path')
import R = require('ramda')
import renderHelp = require('render-help')
import writeJsonFile = require('write-json-file')
import { getCurrentBranch, isGitRepo, isRemoteHistoryClean, isWorkingTreeClean } from './gitChecks'
import recursivePublish, { PublishRecursiveOpts } from './recursivePublish'

export function rcOptionsTypes () {
  return R.pick([
    'access',
    'git-checks',
    'npm-path',
    'otp',
    'publish-branch',
    'registry',
    'tag',
    'unsafe-perm',
  ], allTypes)
}

export function cliOptionsTypes () {
  return {
    ...rcOptionsTypes(),
    recursive: Boolean,
  }
}

export const commandNames = ['publish']

export function help () {
  return renderHelp({
    description: 'Publishes a package to the npm registry.',
    descriptionLists: [
      {
        title: 'Options',

        list: [
          {
            description: 'Checks if current branch is your publish branch, clean, and up-to-date',
            name: '--git-checks',
          },
          {
            description: 'Sets branch name to publish. Default is master',
            name: '--publish-branch',
          },
        ],
      },
    ],
    url: docsUrl('publish'),
{'fraction_non_alphanumeric': 0.13505007153075824, 'fraction_numerical': 0.0, 'mean_word_length': 3.1177856301531213, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4933565', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1040, 'n_words': 281}