@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
PUBLISH_API_TOKEN
โข PUBLISH_API_TOKEN: BaseTokenInterface<fn>
Defined in
builder
โข builder: Object
Type declaration
| Name | Type |
|---|---|
fix | Object |
fix.default | boolean |
fix.desc | string |
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
| Name | Type |
|---|---|
bail | Object |
bail.alias | "b" |
bail.default | false |
bail.desc | "Exit publishing immediately upon the first unsuccessful package publishing." |
byDependentOrder | Object |
byDependentOrder.default | false |
byDependentOrder.desc | "Publish packages in concurrency mode according to each other" |
canary | Object |
canary.default | boolean |
canary.desc | string |
canary.type | "boolean" |
canary-base-version | Object |
canary-base-version.default | string |
canary-base-version.desc | string |
canary-base-version.type | "string" |
canary-unified | Object |
canary-unified.default | boolean |
canary-unified.desc | string |
canary-unified.type | "boolean" |
concurrency | Object |
concurrency.alias | "c" |
concurrency.default | number |
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" |
dryRun | Object |
dryRun.alias | "n" |
dryRun.default | false |
dryRun.desc | "Do all the work, except real publishing to registry" |
dryRun.type | "boolean" |
filter | Object |
filter.alias | "f" |
filter.default | string[] |
filter.desc | "Additional filter for returned by strategy packages list. Have a form of list of path glob patterns." |
filter.type | "array" |
forceVersioning | Object |
forceVersioning.choices | readonly ["tag", "file", "package"] |
forceVersioning.default | undefined | "package" | "tag" | "file" |
forceVersioning.type | "string" |
messageChannel | Object |
messageChannel.default | string |
messageChannel.desc | string |
notify | Object |
notify.alias | "Z" |
notify.default | boolean |
notify.desc | "Send notification if SLACK_WEBHOOK_URL or SLACK_TOKEN env variable present." |
notify.type | "boolean" |
notifyScript | Object |
notifyScript.alias | "i" |
notifyScript.default | string |
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 " |
outputStats | Object |
outputStats.alias | "o" |
outputStats.default | string |
outputStats.desc | "Output filename for JSON report of published packages." |
registry | Object |
registry.alias | "r" |
registry.default | string |
registry.desc | "npm registry, default is taken from publishConfig.registry package.json's value." |
strategy | Object |
strategy.alias | "s" |
strategy.default | string |
strategy.desc | "Which packages should be published. Refer to \"pvm pkgset\" docs for possible options." |
strategyOption | Object |
strategyOption.alias | "S" |
strategyOption.default | string[] |
strategyOption.desc | "Pass option through to the used strategy. Refer to \"pvm pkgset\" docs for possible options." |
strategyOption.type | "array" |
tag | Object |
tag.alias | "t" |
tag.default | string |
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
| Name | Type |
|---|---|
releaseProps | ReleasedProps |
opts | BuildMessageOpts |
Returns
Defined in
src/plugins/core/messages/message-builder.ts:40
createBufferedLogger
โธ createBufferedLogger(): Object
Returns
Object
| Name | Type |
|---|---|
bufferedLogger | typeof logger |
loggerStream | NodeJS.WriteStream |
Defined in
src/plugins/core/publish/logger.ts:10
createErrorStats
โธ createErrorStats(stats): PkgFailStats
Parameters
| Name | Type |
|---|---|
stats | Omit<PkgFailStats, "type"> |
Returns
Defined in
src/plugins/core/publish/publish-stats.ts:13
createSkippedStats
โธ createSkippedStats(stats): PkgSkippedStats
Parameters
| Name | Type |
|---|---|
stats | Omit<PkgSkippedStats, "type"> |
Returns
Defined in
src/plugins/core/publish/publish-stats.ts:20
createSuccessStats
โธ createSuccessStats(stats): PkgSuccessStats
Parameters
| Name | Type |
|---|---|
stats | Omit<PkgSuccessStats, "type"> |
Returns
Defined in
src/plugins/core/publish/publish-stats.ts:6
defaultMessageBodyWrapper
โธ defaultMessageBodyWrapper(__namedParameters): string
Parameters
| Name | Type |
|---|---|
__namedParameters | Object |
__namedParameters.body | string |
__namedParameters.packagesStats | PublishedStats |
__namedParameters.releaseLink | null | string |
__namedParameters.releaseName | string |
Returns
string
Defined in
src/plugins/core/messages/message-builder.ts:77
getPackages
โธ getPackages(type?, opts?): Promise<Pkg[]>
Parameters
| Name | Type | Default value |
|---|---|---|
type | PackagesType | 'all' |
opts | GetPackagesOptions | {} |
Returns
Promise<Pkg[]>
Defined in
src/plugins/core/packages.ts:22
getPassedRegistry
โธ getPassedRegistry(flags, config): string | undefined
Parameters
| Name | Type |
|---|---|
flags | Flags |
config | Config |
Returns
string | undefined
Defined in
src/plugins/core/publish/registry.ts:5
getPkgRegistry
โธ getPkgRegistry(pkg, flags): string | undefined
Parameters
| Name | Type |
|---|---|
pkg | Pkg |
flags | Flags |
Returns
string | undefined
Defined in
src/plugins/core/publish/registry.ts:9
handler
โธ Const handler(flags): Promise<void>
Parameters
| Name | Type |
|---|---|
flags | any |
Returns
Promise<void>
Defined in
src/plugins/core/commands/pvm-lint.ts:15
isProbablyBasicAuthToken
โธ isProbablyBasicAuthToken(token): boolean
Parameters
| Name | Type |
|---|---|
token | string |
Returns
boolean
Defined in
src/plugins/core/publish/prepare.ts:31
printBufferedLogger
โธ printBufferedLogger(loggerStream): void
Parameters
| Name | Type |
|---|---|
loggerStream | WriteStream |
Returns
void
Defined in
src/plugins/core/publish/logger.ts:22
printPublishedSummary
โธ printPublishedSummary(publishedPackages): void
Parameters
| Name | Type |
|---|---|
publishedPackages | PkgSuccessStats[] |
Returns
void
Defined in
src/plugins/core/publish/publish-stats.ts:70
printUnpublishedSummary
โธ printUnpublishedSummary(packages, style?): void
Parameters
| Name | Type | Default value |
|---|---|---|
packages | (PkgFailStats | PkgSkippedStats)[] | undefined |
style | Chalk | chalk.gray |
Returns
void
Defined in
src/plugins/core/publish/publish-stats.ts:55
publish
โธ publish(flags): Promise<PublishedStats>
Parameters
| Name | Type |
|---|---|
flags | Flags |
Returns
Promise<PublishedStats>
Defined in
src/plugins/core/publish/index.ts:62
pushPkgStats
โธ pushPkgStats(publishedStats, pkgStats): void
Parameters
| Name | Type |
|---|---|
publishedStats | PublishedStats |
pkgStats | PkgSuccessStats | PkgFailStats | PkgSkippedStats |
Returns
void
Defined in
src/plugins/core/publish/publish-stats.ts:27
readNpmRc
โธ readNpmRc(cwd): string
Parameters
| Name | Type |
|---|---|
cwd | string |
Returns
string
Defined in
src/plugins/core/publish/prepare.ts:36
releaseMessage
โธ releaseMessage(releaseProps, opts?): Message
Parameters
| Name | Type |
|---|---|
releaseProps | ReleasedProps |
opts | MessageBuilderOpts |
Returns
Defined in
src/plugins/core/messages/message-builder.ts:106
runCli
โธ runCli(commands, argv): void
Parameters
| Name | Type |
|---|---|
commands | MultiTokenInterface<Command | Command[]>[] |
argv | string[] |
Returns
void
Defined in
src/plugins/core/cli-runner.ts:22
setVersions
โธ setVersions(opts): Promise<void>
Parameters
| Name | Type |
|---|---|
opts | Object |
opts.bumpDependants | boolean |
opts.filterPath | string[] |
opts.strategy | string |
opts.strategyOption | string[] |
opts.updateDependants | boolean |
opts.versionOrReleaseType | string |
Returns
Promise<void>
Defined in
src/plugins/core/set-versions.ts:11
setupPublishNpmRCAndEnvVariables
โธ setupPublishNpmRCAndEnvVariables(cwd, opts?): Promise<PublishPrepareResult>
Parameters
| Name | Type |
|---|---|
cwd | string |
opts | PrepareOpts |
Returns
Promise<PublishPrepareResult>
Defined in
src/plugins/core/publish/prepare.ts:46
sortPublishedStats
โธ sortPublishedStats(publishedStats): PublishedStats
Parameters
| Name | Type |
|---|---|
publishedStats | PublishedStats |