Implementation
final List<FigSubcommand> SUBCOMMANDS_MISC = [
Subcommand(
name: 'publish',
// TS_UNCONVERTED_START (description)
// 'Publishes a package to the registry.
// When publishing a package inside a workspace, the LICENSE file from the root of the workspace is packed with the package (unless the package has a license of its own).
// You may override some fields before publish, using the publishConfig field in package.json. You also can use the publishConfig.directory to customize the published subdirectory (usually using third party build tools).
// When running this command recursively (pnpm -r publish), pnpm will publish all the packages that have versions not yet published to the registry'
// TS_UNCONVERTED_END
description: null,
args: [
Arg(name: 'Branch', generators: searchBranches)
],
options: [
Option(
name: '--tag',
// TS_UNCONVERTED_START (description)
// 'Publishes the package with the given tag. By default, pnpm publish updates the latest tag'
// TS_UNCONVERTED_END
description: null,
args: [Arg(name: '<tag>')]),
Option(
name: '--dry-run',
description:
'Does everything a publish would do except actually publishing to the registry'),
Option(
name: '--ignore-scripts',
description:
'Ignores any publish related lifecycle scripts (prepublishOnly, postpublish, and the like)',
),
Option(
name: '--no-git-checks',
description:
'Don\'t check if current branch is your publish branch, clean, and up-to-date',
),
Option(
name: '--access',
description:
'Tells the registry whether the published package should be public or restricted',
args: [
Arg(name: 'Type', suggestions: [
FigSuggestion(name: 'public'),
FigSuggestion(name: 'private')
])
]),
Option(
name: '--force',
description:
'Try to publish packages even if their current version is already found in the registry'),
Option(
name: '--report-summary',
description:
'Save the list of published packages to pnpm-publish-summary.json. Useful when some other tooling is used to report the list of published packages'),
FILTER_OPTION
]),
Subcommand(
name: ['recursive', 'm', 'multi', '-r'],
description:
'Runs a pnpm command recursively on all subdirectories in the package or every available workspace',
subcommands: recursiveSubcommands,
options: [
Option(
name: '--link-workspace-packages',
// TS_UNCONVERTED_START (description)
// 'Link locally available packages in workspaces of a monorepo into node_modules instead of re-downloading them from the registry. This emulates functionality similar to yarn workspaces.
// When this is set to deep, local packages can also be linked to subdependencies.
// Be advised that it is encouraged instead to use npmrc for this setting, to enforce the same behaviour in all environments. This option exists solely so you may override that if necessary'
// TS_UNCONVERTED_END
description: null,
args: [Arg(name: 'bool or \'deep\'', suggestions: [])]),
Option(
name: '--workspace-concurrency',
description:
'Set the maximum number of tasks to run simultaneously. For unlimited concurrency use Infinity',
args: [Arg(name: '<number')]),
Option(
name: '--bail', description: 'Stops when a task throws an error'),
Option(
name: '--no-bail',
description: 'Don\'t stop when a task throws an error'),
Option(
name: '--sort',
// TS_UNCONVERTED_START (description)
// 'Packages are sorted topologically (dependencies before dependents)'
// TS_UNCONVERTED_END
description: null),
Option(name: '--no-sort', description: 'Disable packages sorting'),
Option(
name: '--reverse',
description: 'The order of packages is reversed'),
FILTER_OPTION,
]),
Subcommand(
name: 'server',
description: 'Manage a store server',
subcommands: [
Subcommand(
name: 'start',
description:
'Starts a server that performs all interactions with the store. Other commands will delegate any store-related tasks to this server',
options: [
Option(
name: '--background',
// TS_UNCONVERTED_START (description)
// 'Runs the server in the background, similar to daemonizing on UNIX systems'
// TS_UNCONVERTED_END
description: null),
Option(
name: '--network-concurrency',
description:
'The maximum number of network requests to process simultaneously',
args: [Arg(name: 'numbe')]),
Option(
name: '--protocol',
// TS_UNCONVERTED_START (description)
// 'The communication protocol used by the server. When this is set to auto, IPC is used on all systems except for Windows, which uses TCP'
// TS_UNCONVERTED_END
description: null,
args: [
Arg(name: 'Type', suggestions: [
FigSuggestion(name: 'auto'),
FigSuggestion(name: 'tcp'),
FigSuggestion(name: 'ipc')
])
]),
Option(
name: '--port',
// TS_UNCONVERTED_START (description)
// 'The port number to use when TCP is used for communication. If a port is specified and the protocol is set to auto, regardless of system type, the protocol is automatically set to use TCP'
// TS_UNCONVERTED_END
description: null,
args: [Arg(name: 'port numbe')]),
Option(
name: '--store-dir',
description:
'The directory to use for the content addressable store',
args: [Arg(name: 'Path', template: 'filepath')]),
Option(
name: '--lock',
description:
'Set to make the package store immutable to external processes while the server is running or not'),
Option(
name: '--no-lock',
description:
'Set to make the package store mutable to external processes while the server is running or not'),
Option(
name: '--ignore-stop-requests',
description:
'Prevents you from stopping the server using pnpm server stop'),
Option(
name: '--ignore-upload-requests',
description:
'Prevents creating a new side effect cache during install')
]),
Subcommand(name: 'stop', description: 'Stops the store server'),
Subcommand(
name: 'status',
description: 'Prints information about the running server')
]),
Subcommand(
name: 'store',
description: 'Managing the package store',
subcommands: [
Subcommand(
name: 'status',
// TS_UNCONVERTED_START (description)
// 'Checks for modified packages in the store.
// Returns exit code 0 if the content of the package is the same as it was at the time of unpacking'
// TS_UNCONVERTED_END
description: null),
Subcommand(
name: 'add',
// TS_UNCONVERTED_START (description)
// 'Functionally equivalent to pnpm add,
// except this adds new packages to the store directly without modifying any projects or files outside of the store'
// TS_UNCONVERTED_END
description: null),
Subcommand(
name: 'prune',
// TS_UNCONVERTED_START (description)
// 'Removes orphan packages from the store.
// Pruning the store will save disk space, however may slow down future installations involving pruned packages.
// Ultimately, it is a safe operation, however not recommended if you have orphaned packages from a package you intend to reinstall.
// Please read the FAQ for more information on unreferenced packages and best practices.
// Please note that this is prohibited when a store server is running'
// TS_UNCONVERTED_END
description: null),
Subcommand(
name: 'path',
description: 'Returns the path to the active store directory')
]),
Subcommand(
name: 'init',
description:
'Creates a basic package.json file in the current directory, if it doesn\'t exist already'),
Subcommand(
name: 'doctor',
description: 'Checks for known common issues with pnpm configuration')
];