PnpmInstallSettings Class

Summary

Contains settings used by PnpmInstaller.
Assembly
Cake.Pnpm.dll
Namespace
Cake.Pnpm.Install
Base Types
graph BT Type-->Base0["PnpmSettings"] click Base0 "/api/Cake.Pnpm/PnpmSettings" Base0-->Base1["ToolSettings"] Type["PnpmInstallSettings"] class Type type-node

Syntax

public class PnpmInstallSettings : PnpmSettings

Constructors

Name Summary
PnpmInstallSettings() Initializes a new instance of the PnpmInstallSettings class.

Properties

Name Value Summary
AggregateOutput bool
Aggregate output from child processes that are run in parallel, and only print output when child process is finished. It makes reading large logs after running `pnpm recursive` with `--parallel` or with `--workspace-concurrency` much easier (especially on CI). Only `--reporter=append-only` is supported.
CakeVerbosityLevel Nullable<Verbosity>
Gets or sets the Log level set by Cake.
Inherited from PnpmSettings
ChildConcurrency int
Controls the number of child processes run parallelly to build node modules
Color Nullable<bool>
Controls colors in the output. By default, output is always colored when it goes directly to a terminal
Dev bool
Only `devDependencies` are installed regardless of the `NODE_ENV`
Dir string
Change to directory (default: the running dir)
FixLockfile bool
Fix broken lockfile entries automatically
Force bool
Force reinstall dependencies: refetch packages modified in store, recreate a lockfile and/or modules directory created by a non-compatible version of pnpm
FrozenLockfile Nullable<bool>
Don't generate a lockfile and fail if an update is needed. This setting is on by default in CI environments, so use --no-frozen-lockfile if you need to disable it for some reason
GlobalDir string
Specify a custom directory to store global packages
HoistPattern string
Hoist all dependencies matching the pattern to `node_modules/.pnpm/node_modules`. The default pattern is * and matches everything. Hoisted packages can be required by any dependencies, so it is an emulation of a flat node_modules
IgnorePnpmfile bool
Disable pnpm hooks defined in .pnpmfile.cjs
IgnoreScripts bool
Don't run lifecycle scripts
LockfileDir string
The directory in which the pnpm-lock.yaml of the package will be created. Several projects may share a single lockfile.
LockfileOnly bool
Dependencies are not downloaded. Only `pnpm-lock.yaml` is updated
MergeGitBranchLockfiles bool
Merge lockfiles were generated on git branch
ModulesDir string
The directory in which dependencies will be installed (instead of node_modules)
NetworkConcurrency int
Maximum number of concurrent network requests
NoHoist bool
Dependencies inside the modules directory will have access only to their listed dependencies
NoLockfile bool
Don't read or generate a `pnpm-lock.yaml` file
NoOptional bool
`optionalDependencies` are not installed
Offline bool
Trigger an error if any required dependencies are not available in local store
OutputReportingType Nullable<OutputReportingType>
Define the output reporting type
PackageImportMethod Nullable<PackageImportMethodType>
Clones/hardlinks or copies packages. The selected method depends from the file system
PnpmLogLevel PnpmLogLevel
What level of logs to report. Any logs at or higher than the given level will be shown. Levels (lowest to highest): debug, info, warn, error.
Inherited from PnpmSettings
PreferFrozenLockfile bool
If the available `pnpm-lock.yaml` satisfies the `package.json` then perform a headless installation
PreferOffline bool
Skip staleness checks for cached data, but request missing data from the server
Prod bool
Packages in `devDependencies` won't be installed
PublicHoistPattern string
Hoist all dependencies matching the pattern to the root of the modules directory
Recursive bool
Run installation recursively in every package found in subdirectories. For options that may be used with `-r`, see "pnpm help recursive"
RedirectStandardError bool
Gets or sets the process option to redirect standard error output.
Inherited from PnpmSettings
RedirectStandardOutput bool
Gets or sets the process option to redirect standard output.
Inherited from PnpmSettings
ShamefullyHoist bool
All the subdeps will be hoisted into the root node_modules. Your code will have access to them
SideEffectsCache bool
Use or cache the results of (pre/post)install hooks
SideEffectsCacheReadonly bool
Only use the side effects cache if present, do not create it for new packages
StandardErrorAction Action<string>
Gets or sets an action to retrieve and process standard error output.
Inherited from PnpmSettings
StandardOutputAction Action<string>
Gets or sets an action to retrieve and process standard output.
Inherited from PnpmSettings
StoreDir string
The directory in which all the packages are saved on the disk
Stream bool
Stream output from child processes immediately, prefixed with the originating package directory. This allows output from different packages to be interleaved.
StrictPeerDependencies bool
Fail on missing or invalid peer dependencies
UseRunningStoreServer bool
Only allows installation with a store server. If no store server is running, installation will fail
UseStderr bool
Divert all output to stderr
UseStoreServer bool
Starts a store server in the background. The store server will keep running after installation is done. To stop the store server, run `pnpm server stop`
VerifyStoreIntegrity Nullable<bool>
If false, doesn't check whether packages in the store were mutated
VirtualStoreDir string
The directory with links to the store (default is node_modules/.pnpm). All direct and indirect dependencies of the project are linked into this directory
WorkspaceRoot bool
Run the command on the root workspace project

Methods

Name Value Summary
EvaluateCore(ProcessArgumentBuilder) void
Pnpm tool settings.

Extension Methods

Name Value Summary
Dump<PnpmInstallSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<PnpmInstallSettings>(PnpmInstallSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<PnpmInstallSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<PnpmInstallSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<PnpmInstallSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<PnpmInstallSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin