Skip to main content

@pvm/plugin-base-commands

Classes

Interfaces

Type aliases

Flags

ฦฌ Flags: { [P in keyof FlagsBuilder]: FlagsBuilder[P]["default"] }

Defined in

src/plugins/core/publish/flags.ts:143

Properties

default

โ€ข default: { configExt: RecursivePartial<Config> ; factory: PluginFactory ; name: string = __filename } | { factory: PluginFactory ; name: string = __filename } | { configExt: RecursivePartial<Config> ; name: string = __filename }

Variables

GET_PACKAGE_API_TOKEN

โ€ข GET_PACKAGE_API_TOKEN: BaseTokenInterface<fn>

Defined in

src/plugins/core/index.ts:19


PUBLISH_API_TOKEN

โ€ข PUBLISH_API_TOKEN: BaseTokenInterface<fn>

Defined in

src/plugins/core/index.ts:18


builder

โ€ข builder: Object

Type declaration

NameType
fixObject
fix.defaultboolean
fix.descstring

Defined in

src/plugins/core/commands/pvm-lint.ts:8


command

โ€ข command: "lint"

Defined in

src/plugins/core/commands/pvm-lint.ts:6


description

โ€ข description: "Checks that package versions correspond to the selected settings and policies in the project."

Defined in

src/plugins/core/commands/pvm-lint.ts:7


flagsBuilder

โ€ข flagsBuilder: Object

Type declaration

NameType
bailObject
bail.alias"b"
bail.defaultfalse
bail.desc"Exit publishing immediately upon the first unsuccessful package publishing."
byDependentOrderObject
byDependentOrder.defaultfalse
byDependentOrder.desc"Publish packages in concurrency mode according to each other"
canaryObject
canary.defaultboolean
canary.descstring
canary.type"boolean"
canary-base-versionObject
canary-base-version.defaultstring
canary-base-version.descstring
canary-base-version.type"string"
canary-unifiedObject
canary-unified.defaultboolean
canary-unified.descstring
canary-unified.type"boolean"
concurrencyObject
concurrency.alias"c"
concurrency.defaultnumber
concurrency.desc`Number of simultaneously executed publishing processes. If argument not specified, makes ${string}, if argument specified without value, makes a thread to each CPU core`
concurrency.type"number"
dryRunObject
dryRun.alias"n"
dryRun.defaultfalse
dryRun.desc"Do all the work, except real publishing to registry"
dryRun.type"boolean"
filterObject
filter.alias"f"
filter.defaultstring[]
filter.desc"Additional filter for returned by strategy packages list. Have a form of list of path glob patterns."
filter.type"array"
forceVersioningObject
forceVersioning.choicesreadonly ["tag", "file", "package"]
forceVersioning.defaultundefined | "package" | "tag" | "file"
forceVersioning.type"string"
messageChannelObject
messageChannel.defaultstring
messageChannel.descstring
notifyObject
notify.alias"Z"
notify.defaultboolean
notify.desc"Send notification if SLACK_WEBHOOK_URL or SLACK_TOKEN env variable present."
notify.type"boolean"
notifyScriptObject
notifyScript.alias"i"
notifyScript.defaultstring
notifyScript.desc"\n The script that will be executed to create the notification text after successfull packages publishing.\n By default, the internal script \"@pvm/lib-core/messages/notify-scripts/release.js\" is used.\n\n Could be absolute file path, or file path relative to config, or http/https URL to script in the network.\n\n The script is obliged to send the message through function process.send.\n The message should have the following format: { type: 'message', message: <message payload>. }.\n\n Also script will receive the object describing the publication in the form:\n {\n tag: 'release-tag',\n commits: <undefined or array of structures described here: https://github.com/bendrucker/git-log-parser#logparseconfig-options---streamcommits>,\n packagesStats: {\n success: [{pkg: string, registryVersion: string, publishedVersion: string}, ...]\n skipped: [{pkg: string, publishVersion: string, reason: string}, ...]\n error: [{pkg: string, publishVersion: string, reason: string}, ...]\n },\n }\n\n Information about the published status of the packages. For more information about this field, see the documentation site.\n "
outputStatsObject
outputStats.alias"o"
outputStats.defaultstring
outputStats.desc"Output filename for JSON report of published packages."
registryObject
registry.alias"r"
registry.defaultstring
registry.desc"npm registry, default is taken from publishConfig.registry package.json's value."
strategyObject
strategy.alias"s"
strategy.defaultstring
strategy.desc"Which packages should be published. Refer to \"pvm pkgset\" docs for possible options."
strategyOptionObject
strategyOption.alias"S"
strategyOption.defaultstring[]
strategyOption.desc"Pass option through to the used strategy. Refer to \"pvm pkgset\" docs for possible options."
strategyOption.type"array"
tagObject
tag.alias"t"
tag.defaultstring
tag.desc"Same as --tag option for npm publish command: associates published package with given tag.\n By default equals to latest or canary (if canary mode enabled) unless registry package version is greater than published."
tag.type"string"

Defined in

src/plugins/core/publish/flags.ts:34


logger

โ€ข logger: SignaleType<"debug" | "silly" | "deprecate", never>

Defined in

src/plugins/core/publish/logger.ts:4

Functions

buildMessage

โ–ธ buildMessage(releaseProps, opts?): Message

Parameters

NameType
releasePropsReleasedProps
optsBuildMessageOpts

Returns

Message

Defined in

src/plugins/core/messages/message-builder.ts:40


createBufferedLogger

โ–ธ createBufferedLogger(): Object

Returns

Object

NameType
bufferedLoggertypeof logger
loggerStreamNodeJS.WriteStream

Defined in

src/plugins/core/publish/logger.ts:10


createErrorStats

โ–ธ createErrorStats(stats): PkgFailStats

Parameters

NameType
statsOmit<PkgFailStats, "type">

Returns

PkgFailStats

Defined in

src/plugins/core/publish/publish-stats.ts:13


createSkippedStats

โ–ธ createSkippedStats(stats): PkgSkippedStats

Parameters

NameType
statsOmit<PkgSkippedStats, "type">

Returns

PkgSkippedStats

Defined in

src/plugins/core/publish/publish-stats.ts:20


createSuccessStats

โ–ธ createSuccessStats(stats): PkgSuccessStats

Parameters

NameType
statsOmit<PkgSuccessStats, "type">

Returns

PkgSuccessStats

Defined in

src/plugins/core/publish/publish-stats.ts:6


defaultMessageBodyWrapper

โ–ธ defaultMessageBodyWrapper(__namedParameters): string

Parameters

NameType
__namedParametersObject
__namedParameters.bodystring
__namedParameters.packagesStatsPublishedStats
__namedParameters.releaseLinknull | string
__namedParameters.releaseNamestring

Returns

string

Defined in

src/plugins/core/messages/message-builder.ts:77


getPackages

โ–ธ getPackages(type?, opts?): Promise<Pkg[]>

Parameters

NameTypeDefault value
typePackagesType'all'
optsGetPackagesOptions{}

Returns

Promise<Pkg[]>

Defined in

src/plugins/core/packages.ts:22


getPassedRegistry

โ–ธ getPassedRegistry(flags, config): string | undefined

Parameters

NameType
flagsFlags
configConfig

Returns

string | undefined

Defined in

src/plugins/core/publish/registry.ts:5


getPkgRegistry

โ–ธ getPkgRegistry(pkg, flags): string | undefined

Parameters

NameType
pkgPkg
flagsFlags

Returns

string | undefined

Defined in

src/plugins/core/publish/registry.ts:9


handler

โ–ธ Const handler(flags): Promise<void>

Parameters

NameType
flagsany

Returns

Promise<void>

Defined in

src/plugins/core/commands/pvm-lint.ts:15


isProbablyBasicAuthToken

โ–ธ isProbablyBasicAuthToken(token): boolean

Parameters

NameType
tokenstring

Returns

boolean

Defined in

src/plugins/core/publish/prepare.ts:31


printBufferedLogger

โ–ธ printBufferedLogger(loggerStream): void

Parameters

NameType
loggerStreamWriteStream

Returns

void

Defined in

src/plugins/core/publish/logger.ts:22


printPublishedSummary

โ–ธ printPublishedSummary(publishedPackages): void

Parameters

NameType
publishedPackagesPkgSuccessStats[]

Returns

void

Defined in

src/plugins/core/publish/publish-stats.ts:70


printUnpublishedSummary

โ–ธ printUnpublishedSummary(packages, style?): void

Parameters

NameTypeDefault value
packages(PkgFailStats | PkgSkippedStats)[]undefined
styleChalkchalk.gray

Returns

void

Defined in

src/plugins/core/publish/publish-stats.ts:55


publish

โ–ธ publish(flags): Promise<PublishedStats>

Parameters

NameType
flagsFlags

Returns

Promise<PublishedStats>

Defined in

src/plugins/core/publish/index.ts:62


pushPkgStats

โ–ธ pushPkgStats(publishedStats, pkgStats): void

Parameters

NameType
publishedStatsPublishedStats
pkgStatsPkgSuccessStats | PkgFailStats | PkgSkippedStats

Returns

void

Defined in

src/plugins/core/publish/publish-stats.ts:27


readNpmRc

โ–ธ readNpmRc(cwd): string

Parameters

NameType
cwdstring

Returns

string

Defined in

src/plugins/core/publish/prepare.ts:36


releaseMessage

โ–ธ releaseMessage(releaseProps, opts?): Message

Parameters

NameType
releasePropsReleasedProps
optsMessageBuilderOpts

Returns

Message

Defined in

src/plugins/core/messages/message-builder.ts:106


runCli

โ–ธ runCli(commands, argv): void

Parameters

NameType
commandsMultiTokenInterface<Command | Command[]>[]
argvstring[]

Returns

void

Defined in

src/plugins/core/cli-runner.ts:22


setVersions

โ–ธ setVersions(opts): Promise<void>

Parameters

NameType
optsObject
opts.bumpDependantsboolean
opts.filterPathstring[]
opts.strategystring
opts.strategyOptionstring[]
opts.updateDependantsboolean
opts.versionOrReleaseTypestring

Returns

Promise<void>

Defined in

src/plugins/core/set-versions.ts:11


setupPublishNpmRCAndEnvVariables

โ–ธ setupPublishNpmRCAndEnvVariables(cwd, opts?): Promise<PublishPrepareResult>

Parameters

NameType
cwdstring
optsPrepareOpts

Returns

Promise<PublishPrepareResult>

Defined in

src/plugins/core/publish/prepare.ts:46


sortPublishedStats

โ–ธ sortPublishedStats(publishedStats): PublishedStats

Parameters

NameType
publishedStatsPublishedStats

Returns

PublishedStats

Defined in

src/plugins/core/publish/publish-stats.ts:41