From 17a69038ce2e353575afb677a7bfa98cce829a75 Mon Sep 17 00:00:00 2001 From: Christian Wengel Date: Fri, 11 Sep 2026 11:37:50 +0200 Subject: [PATCH] Add pnpm tool wrapper and settings tests --- .../Tools/Pnpm/Pnpm.Generated.cs | 1831 +++++++++++++++++ src/Fallout.Common/Tools/Pnpm/Pnpm.json | 721 +++++++ src/Fallout.Common/Tools/Pnpm/PnpmTasks.cs | 8 + tests/Fallout.Common.Specs/SettingsSpecs.cs | 27 + 4 files changed, 2587 insertions(+) create mode 100644 src/Fallout.Common/Tools/Pnpm/Pnpm.Generated.cs create mode 100644 src/Fallout.Common/Tools/Pnpm/Pnpm.json create mode 100644 src/Fallout.Common/Tools/Pnpm/PnpmTasks.cs diff --git a/src/Fallout.Common/Tools/Pnpm/Pnpm.Generated.cs b/src/Fallout.Common/Tools/Pnpm/Pnpm.Generated.cs new file mode 100644 index 000000000..0504e3950 --- /dev/null +++ b/src/Fallout.Common/Tools/Pnpm/Pnpm.Generated.cs @@ -0,0 +1,1831 @@ +// Generated from https://github.com/Fallout-build/Fallout/blob/develop/src/Fallout.Common/Tools/Pnpm/Pnpm.json + +using Fallout.Common; +using Fallout.Common.Tooling; +using Fallout.Common.Tools; +using Fallout.Common.Utilities.Collections; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json.Serialization; + +namespace Fallout.Common.Tools.Pnpm; + +///

pnpm is a fast, disk space efficient package manager for the Node JavaScript platform.Files inside node_modules are hard linked or cloned from a single content-addressable storage on disk, saving disk space and speeding up installations.

For more details, visit the official website.

+[ExcludeFromCodeCoverage] +[PathTool(Executable = PathExecutable)] +public partial class PnpmTasks : ToolTasks, IRequirePathTool +{ + public static string PnpmPath { get => new PnpmTasks().GetToolPathInternal(); set => new PnpmTasks().SetToolPath(value); } + public const string PathExecutable = "pnpm"; + ///

pnpm is a fast, disk space efficient package manager for the Node JavaScript platform.Files inside node_modules are hard linked or cloned from a single content-addressable storage on disk, saving disk space and speeding up installations.

For more details, visit the official website.

+ public static IReadOnlyCollection Pnpm(ArgumentStringHandler arguments, string workingDirectory = null, IReadOnlyDictionary environmentVariables = null, int? timeout = null, bool? logOutput = null, bool? logInvocation = null, Action logger = null, Func exitHandler = null) => new PnpmTasks().Run(arguments, workingDirectory, environmentVariables, timeout, logOutput, logInvocation, logger, exitHandler); + ///

Runs pnpm clean followed by pnpm install --frozen-lockfile. Designed for CI/CD environments.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • --dir via
  • --loglevel via
  • --reporter via
  • --silent via
+ public static IReadOnlyCollection PnpmCi(PnpmCiSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmCi(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmCiSettings())); + /// + public static IEnumerable<(PnpmCiSettings Settings, IReadOnlyCollection Output)> PnpmCi(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmCi, degreeOfParallelism, completeOnFailure); + ///

Installs all dependencies of the project in the current working directory. When executed inside a workspace, installs all dependencies of all projects.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <packages> via
  • --aggregate-output via
  • --child-concurrency via
  • --dev via
  • --dir via
  • --filter via
  • --fix-lockfile via
  • --force via
  • --frozen-lockfile via
  • --global via
  • --ignore-scripts via
  • --lockfile-dir via
  • --lockfile-only via
  • --loglevel via
  • --modules-dir via
  • --network-concurrency via
  • --no-frozen-lockfile via
  • --no-lockfile via
  • --no-optional via
  • --offline via
  • --package-import-method via
  • --prefer-frozen-lockfile via
  • --prefer-offline via
  • --prod via
  • --recursive via
  • --reporter via
  • --shamefully-hoist via
  • --silent via
  • --store-dir via
  • --strict-peer-dependencies via
  • --virtual-store-dir via
  • --workspace-root via
+ public static IReadOnlyCollection PnpmInstall(PnpmInstallSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmInstall(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmInstallSettings())); + /// + public static IEnumerable<(PnpmInstallSettings Settings, IReadOnlyCollection Output)> PnpmInstall(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmInstall, degreeOfParallelism, completeOnFailure); + ///

Runs an arbitrary command from a package's "scripts" object.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <command> via
  • -- via
  • --dir via
  • --filter via
  • --if-present via
  • --loglevel via
  • --no-bail via
  • --parallel via
  • --recursive via
  • --reporter via
  • --sequential via
  • --silent via
  • --stream via
  • --workspace-root via
+ public static IReadOnlyCollection PnpmRun(PnpmRunSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmRun(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmRunSettings())); + /// + public static IEnumerable<(PnpmRunSettings Settings, IReadOnlyCollection Output)> PnpmRun(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmRun, degreeOfParallelism, completeOnFailure); + ///

Executes a shell command in scope of a project.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <arguments> via
  • <command> via
  • --dir via
  • --filter via
  • --loglevel via
  • --parallel via
  • --recursive via
  • --shell-mode via
  • --silent via
  • --stream via
  • --workspace-root via
+ public static IReadOnlyCollection PnpmExec(PnpmExecSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmExec(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmExecSettings())); + /// + public static IEnumerable<(PnpmExecSettings Settings, IReadOnlyCollection Output)> PnpmExec(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmExec, degreeOfParallelism, completeOnFailure); + ///

Fetches a package from the registry without installing it as a dependency, hot loads it, and runs whatever default command binary it exposes.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <arguments> via
  • <package> via
  • --dir via
  • --silent via
+ public static IReadOnlyCollection PnpmDlx(PnpmDlxSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmDlx(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmDlxSettings())); + /// + public static IEnumerable<(PnpmDlxSettings Settings, IReadOnlyCollection Output)> PnpmDlx(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmDlx, degreeOfParallelism, completeOnFailure); + ///

Publishes a package to the npm registry.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • <target> via
  • --access via
  • --dir via
  • --dry-run via
  • --force via
  • --ignore-scripts via
  • --json via
  • --no-git-checks via
  • --otp via
  • --publish-branch via
  • --recursive via
  • --report-summary via
  • --tag via
+ public static IReadOnlyCollection PnpmPublish(PnpmPublishSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmPublish(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmPublishSettings())); + /// + public static IEnumerable<(PnpmPublishSettings Settings, IReadOnlyCollection Output)> PnpmPublish(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmPublish, degreeOfParallelism, completeOnFailure); + ///

Creates a tarball from a package.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • --dir via
  • --dry-run via
  • --filter via
  • --json via
  • --out via
  • --pack-destination via
  • --recursive via
+ public static IReadOnlyCollection PnpmPack(PnpmPackSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmPack(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmPackSettings())); + /// + public static IEnumerable<(PnpmPackSettings Settings, IReadOnlyCollection Output)> PnpmPack(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmPack, degreeOfParallelism, completeOnFailure); + ///

Checks for known security issues with the installed packages.

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • --audit-level via
  • --dev via
  • --dir via
  • --fix via
  • --ignore-registry-errors via
  • --ignore-unfixable via
  • --json via
  • --no-optional via
  • --prod via
+ public static IReadOnlyCollection PnpmAudit(PnpmAuditSettings options = null) => new PnpmTasks().Run(options); + /// + public static IReadOnlyCollection PnpmAudit(Configure configurator) => new PnpmTasks().Run(configurator.Invoke(new PnpmAuditSettings())); + /// + public static IEnumerable<(PnpmAuditSettings Settings, IReadOnlyCollection Output)> PnpmAudit(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(PnpmAudit, degreeOfParallelism, completeOnFailure); +} +#region PnpmCiSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmCi), Arguments = "ci")] +public partial class PnpmCiSettings : ToolOptions +{ + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); + /// Controls how output is reported. + [Argument(Format = "--reporter {value}")] public PnpmReporter Reporter => Get(() => Reporter); + /// What level of logs to report. + [Argument(Format = "--loglevel {value}")] public PnpmLogLevel LogLevel => Get(() => LogLevel); + /// No output is logged to the console, not even fatal errors. + [Argument(Format = "--silent")] public bool? Silent => Get(() => Silent); +} +#endregion +#region PnpmInstallSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmInstall), Arguments = "install")] +public partial class PnpmInstallSettings : ToolOptions +{ + /// List of packages to be installed. + [Argument(Format = "{value}", Position = 1)] public IReadOnlyList Packages => Get>(() => Packages); + /// Packages in devDependencies will not be installed. + [Argument(Format = "--prod")] public bool? Production => Get(() => Production); + /// Only devDependencies will be installed. + [Argument(Format = "--dev")] public bool? Dev => Get(() => Dev); + /// Prevents optionalDependencies from being installed. + [Argument(Format = "--no-optional")] public bool? NoOptional => Get(() => NoOptional); + /// Don't generate a lockfile and fail if an update is needed. This setting is on by default in CI environments. + [Argument(Format = "--frozen-lockfile")] public bool? FrozenLockfile => Get(() => FrozenLockfile); + /// Forces generating or updating a lockfile even in CI environments. + [Argument(Format = "--no-frozen-lockfile")] public bool? NoFrozenLockfile => Get(() => NoFrozenLockfile); + /// If the available pnpm-lock.yaml satisfies the package.json then perform a headless installation. + [Argument(Format = "--prefer-frozen-lockfile")] public bool? PreferFrozenLockfile => Get(() => PreferFrozenLockfile); + /// Dependencies are not downloaded. Only pnpm-lock.yaml is updated. + [Argument(Format = "--lockfile-only")] public bool? LockfileOnly => Get(() => LockfileOnly); + /// Don't read or generate a pnpm-lock.yaml file. + [Argument(Format = "--no-lockfile")] public bool? NoLockfile => Get(() => NoLockfile); + /// Fix broken lockfile entries automatically. + [Argument(Format = "--fix-lockfile")] public bool? FixLockfile => Get(() => FixLockfile); + /// Forces reinstalling dependencies: refetch packages modified in store, recreate a lockfile and/or modules directory created by a non-compatible version of pnpm. + [Argument(Format = "--force")] public bool? Force => Get(() => Force); + /// Install package globally. + [Argument(Format = "--global")] public bool? Global => Get(() => Global); + /// Causes pnpm to not execute any scripts defined in the package.json. + [Argument(Format = "--ignore-scripts")] public bool? IgnoreScripts => Get(() => IgnoreScripts); + /// Trigger an error if any required dependencies are not available in local store. + [Argument(Format = "--offline")] public bool? Offline => Get(() => Offline); + /// Skip staleness checks for cached data, but request missing data from the server. + [Argument(Format = "--prefer-offline")] public bool? PreferOffline => Get(() => PreferOffline); + /// The directory in which all the packages are saved on disk. + [Argument(Format = "--store-dir {value}")] public string StoreDir => Get(() => StoreDir); + /// The directory with links to the store (default is node_modules/.pnpm). + [Argument(Format = "--virtual-store-dir {value}")] public string VirtualStoreDir => Get(() => VirtualStoreDir); + /// The directory in which dependencies will be installed (instead of node_modules). + [Argument(Format = "--modules-dir {value}")] public string ModulesDir => Get(() => ModulesDir); + /// The directory in which the pnpm-lock.yaml will be created. + [Argument(Format = "--lockfile-dir {value}")] public string LockfileDir => Get(() => LockfileDir); + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); + /// Run installation recursively in every package found in subdirectories. + [Argument(Format = "--recursive")] public bool? Recursive => Get(() => Recursive); + /// Restricts the scope to package names matching the given pattern. + [Argument(Format = "--filter {value}")] public IReadOnlyList Filters => Get>(() => Filters); + /// Run the command on the root workspace project. + [Argument(Format = "--workspace-root")] public bool? WorkspaceRoot => Get(() => WorkspaceRoot); + /// All the subdeps will be hoisted into the root node_modules. + [Argument(Format = "--shamefully-hoist")] public bool? ShamefullyHoist => Get(() => ShamefullyHoist); + /// Controls the number of child processes run parallelly to build node modules. + [Argument(Format = "--child-concurrency {value}")] public int? ChildConcurrency => Get(() => ChildConcurrency); + /// Maximum number of concurrent network requests. + [Argument(Format = "--network-concurrency {value}")] public int? NetworkConcurrency => Get(() => NetworkConcurrency); + /// Fail on missing or invalid peer dependencies. + [Argument(Format = "--strict-peer-dependencies")] public bool? StrictPeerDependencies => Get(() => StrictPeerDependencies); + /// Method used to clone, hardlink, or copy packages from the store. + [Argument(Format = "--package-import-method {value}")] public PnpmPackageImportMethod PackageImportMethod => Get(() => PackageImportMethod); + /// Controls how output is reported. + [Argument(Format = "--reporter {value}")] public PnpmReporter Reporter => Get(() => Reporter); + /// What level of logs to report. + [Argument(Format = "--loglevel {value}")] public PnpmLogLevel LogLevel => Get(() => LogLevel); + /// No output is logged to the console, not even fatal errors. + [Argument(Format = "--silent")] public bool? Silent => Get(() => Silent); + /// Aggregate output from child processes that are run in parallel. + [Argument(Format = "--aggregate-output")] public bool? AggregateOutput => Get(() => AggregateOutput); +} +#endregion +#region PnpmRunSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmRun), Arguments = "run")] +public partial class PnpmRunSettings : ToolOptions +{ + /// The command to be executed. + [Argument(Format = "{value}", Position = 1)] public string Command => Get(() => Command); + /// Arguments passed to the script. + [Argument(Format = "-- {value}", Position = -1, Separator = " ")] public IReadOnlyList Arguments => Get>(() => Arguments); + /// Run the defined package script in every package found in subdirectories or workspace. + [Argument(Format = "--recursive")] public bool? Recursive => Get(() => Recursive); + /// Restricts the scope to package names matching the given pattern. + [Argument(Format = "--filter {value}")] public IReadOnlyList Filters => Get>(() => Filters); + /// Completely disregard concurrency and topological sorting, running a given script immediately in all matching packages. + [Argument(Format = "--parallel")] public bool? Parallel => Get(() => Parallel); + /// Run the specified scripts one by one. + [Argument(Format = "--sequential")] public bool? Sequential => Get(() => Sequential); + /// Avoid exiting with a non-zero exit code when the script is undefined. + [Argument(Format = "--if-present")] public bool? IfPresent => Get(() => IfPresent); + /// The command will exit with a 0 exit code even if the script fails. + [Argument(Format = "--no-bail")] public bool? NoBail => Get(() => NoBail); + /// Stream output from child processes immediately, prefixed with the originating package directory. + [Argument(Format = "--stream")] public bool? Stream => Get(() => Stream); + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); + /// Run the command on the root workspace project. + [Argument(Format = "--workspace-root")] public bool? WorkspaceRoot => Get(() => WorkspaceRoot); + /// Controls how output is reported. + [Argument(Format = "--reporter {value}")] public PnpmReporter Reporter => Get(() => Reporter); + /// What level of logs to report. + [Argument(Format = "--loglevel {value}")] public PnpmLogLevel LogLevel => Get(() => LogLevel); + /// No output is logged to the console, not even fatal errors. + [Argument(Format = "--silent")] public bool? Silent => Get(() => Silent); +} +#endregion +#region PnpmExecSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmExec), Arguments = "exec")] +public partial class PnpmExecSettings : ToolOptions +{ + /// The command to be executed. + [Argument(Format = "{value}", Position = 1)] public string Command => Get(() => Command); + /// Arguments passed to the command. + [Argument(Format = "{value}", Position = -1, Separator = " ")] public IReadOnlyList Arguments => Get>(() => Arguments); + /// Run the shell command in every package found in subdirectories or workspace. + [Argument(Format = "--recursive")] public bool? Recursive => Get(() => Recursive); + /// Restricts the scope to package names matching the given pattern. + [Argument(Format = "--filter {value}")] public IReadOnlyList Filters => Get>(() => Filters); + /// Completely disregard concurrency and topological sorting, running a given command immediately in all matching packages. + [Argument(Format = "--parallel")] public bool? Parallel => Get(() => Parallel); + /// Runs command inside of a shell (/bin/sh on UNIX and cmd.exe on Windows). + [Argument(Format = "--shell-mode")] public bool? ShellMode => Get(() => ShellMode); + /// Stream output from child processes immediately, prefixed with the originating package directory. + [Argument(Format = "--stream")] public bool? Stream => Get(() => Stream); + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); + /// Run the command on the root workspace project. + [Argument(Format = "--workspace-root")] public bool? WorkspaceRoot => Get(() => WorkspaceRoot); + /// What level of logs to report. + [Argument(Format = "--loglevel {value}")] public PnpmLogLevel LogLevel => Get(() => LogLevel); + /// No output is logged to the console, not even fatal errors. + [Argument(Format = "--silent")] public bool? Silent => Get(() => Silent); +} +#endregion +#region PnpmDlxSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmDlx), Arguments = "dlx")] +public partial class PnpmDlxSettings : ToolOptions +{ + /// The package binary to execute. + [Argument(Format = "{value}", Position = 1)] public string Package => Get(() => Package); + /// Arguments passed to the package binary. + [Argument(Format = "{value}", Position = -1, Separator = " ")] public IReadOnlyList Arguments => Get>(() => Arguments); + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); + /// No output is logged to the console, not even fatal errors. + [Argument(Format = "--silent")] public bool? Silent => Get(() => Silent); +} +#endregion +#region PnpmPublishSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmPublish), Arguments = "publish")] +public partial class PnpmPublishSettings : ToolOptions +{ + /// A tarball or directory to publish. + [Argument(Format = "{value}", Position = 1)] public string Target => Get(() => Target); + /// Registers the published package with the given tag. + [Argument(Format = "--tag {value}")] public string Tag => Get(() => Tag); + /// Tells the registry whether this package should be published as public or restricted. + [Argument(Format = "--access {value}")] public PnpmPublishAccess Access => Get(() => Access); + /// Packages are proceeded to be published even if their current version is already in the registry. + [Argument(Format = "--force")] public bool? Force => Get(() => Force); + /// Does everything a publish would do except actually publishing to the registry. + [Argument(Format = "--dry-run")] public bool? DryRun => Get(() => DryRun); + /// Show information in JSON format. + [Argument(Format = "--json")] public bool? Json => Get(() => Json); + /// Don't check if current branch is your publish branch, clean, and up to date. + [Argument(Format = "--no-git-checks")] public bool? NoGitChecks => Get(() => NoGitChecks); + /// When publishing packages that require two-factor authentication, this option can specify a one-time password. + [Argument(Format = "--otp {value}", Secret = true)] public string Otp => Get(() => Otp); + /// Sets branch name to publish. + [Argument(Format = "--publish-branch {value}")] public string PublishBranch => Get(() => PublishBranch); + /// Publish all packages from the workspace. + [Argument(Format = "--recursive")] public bool? Recursive => Get(() => Recursive); + /// Save the list of the newly published packages to pnpm-publish-summary.json. + [Argument(Format = "--report-summary")] public bool? ReportSummary => Get(() => ReportSummary); + /// Ignores any publish related lifecycle scripts. + [Argument(Format = "--ignore-scripts")] public bool? IgnoreScripts => Get(() => IgnoreScripts); + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); +} +#endregion +#region PnpmPackSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmPack), Arguments = "pack")] +public partial class PnpmPackSettings : ToolOptions +{ + /// Customizes the output path for the tarball. + [Argument(Format = "--out {value}")] public string Out => Get(() => Out); + /// Directory in which pnpm pack will save tarballs. + [Argument(Format = "--pack-destination {value}")] public string PackDestination => Get(() => PackDestination); + /// Does everything pnpm pack would do except actually writing the tarball to disk. + [Argument(Format = "--dry-run")] public bool? DryRun => Get(() => DryRun); + /// Prints the packed tarball and contents in JSON format. + [Argument(Format = "--json")] public bool? Json => Get(() => Json); + /// Pack all packages from the workspace. + [Argument(Format = "--recursive")] public bool? Recursive => Get(() => Recursive); + /// Restricts the scope to package names matching the given pattern. + [Argument(Format = "--filter {value}")] public IReadOnlyList Filters => Get>(() => Filters); + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); +} +#endregion +#region PnpmAuditSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(PnpmTasks), Command = nameof(PnpmTasks.PnpmAudit), Arguments = "audit")] +public partial class PnpmAuditSettings : ToolOptions +{ + /// Only print advisories with severity greater than or equal to the given level. + [Argument(Format = "--audit-level {value}")] public PnpmAuditLevel AuditLevel => Get(() => AuditLevel); + /// Only audit devDependencies. + [Argument(Format = "--dev")] public bool? Dev => Get(() => Dev); + /// Only audit dependencies and optionalDependencies. + [Argument(Format = "--prod")] public bool? Prod => Get(() => Prod); + /// Don't audit optionalDependencies. + [Argument(Format = "--no-optional")] public bool? NoOptional => Get(() => NoOptional); + /// Fix the audited vulnerabilities using the specified method: override or update. + [Argument(Format = "--fix {value}")] public PnpmAuditFix Fix => Get(() => Fix); + /// Use exit code 0 if the registry responds with an error. Useful in CI. + [Argument(Format = "--ignore-registry-errors")] public bool? IgnoreRegistryErrors => Get(() => IgnoreRegistryErrors); + /// Ignore all vulnerabilities for which no fix exists. + [Argument(Format = "--ignore-unfixable")] public bool? IgnoreUnfixable => Get(() => IgnoreUnfixable); + /// Output audit report in JSON format. + [Argument(Format = "--json")] public bool? Json => Get(() => Json); + /// Change to directory <dir>. + [Argument(Format = "--dir {value}")] public string Dir => Get(() => Dir); +} +#endregion +#region PnpmCiSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmCiSettingsExtensions +{ + #region Dir + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmCiSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmCiSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion + #region Reporter + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Reporter))] + public static T SetReporter(this T o, PnpmReporter v) where T : PnpmCiSettings => o.Modify(b => b.Set(() => o.Reporter, v)); + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Reporter))] + public static T ResetReporter(this T o) where T : PnpmCiSettings => o.Modify(b => b.Remove(() => o.Reporter)); + #endregion + #region LogLevel + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.LogLevel))] + public static T SetLogLevel(this T o, PnpmLogLevel v) where T : PnpmCiSettings => o.Modify(b => b.Set(() => o.LogLevel, v)); + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.LogLevel))] + public static T ResetLogLevel(this T o) where T : PnpmCiSettings => o.Modify(b => b.Remove(() => o.LogLevel)); + #endregion + #region Silent + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Silent))] + public static T SetSilent(this T o, bool? v) where T : PnpmCiSettings => o.Modify(b => b.Set(() => o.Silent, v)); + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Silent))] + public static T ResetSilent(this T o) where T : PnpmCiSettings => o.Modify(b => b.Remove(() => o.Silent)); + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Silent))] + public static T EnableSilent(this T o) where T : PnpmCiSettings => o.Modify(b => b.Set(() => o.Silent, true)); + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Silent))] + public static T DisableSilent(this T o) where T : PnpmCiSettings => o.Modify(b => b.Set(() => o.Silent, false)); + /// + [Builder(Type = typeof(PnpmCiSettings), Property = nameof(PnpmCiSettings.Silent))] + public static T ToggleSilent(this T o) where T : PnpmCiSettings => o.Modify(b => b.Set(() => o.Silent, !o.Silent)); + #endregion +} +#endregion +#region PnpmInstallSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmInstallSettingsExtensions +{ + #region Packages + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Packages))] + public static T SetPackages(this T o, params string[] v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Packages, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Packages))] + public static T SetPackages(this T o, IEnumerable v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Packages, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Packages))] + public static T AddPackages(this T o, params string[] v) where T : PnpmInstallSettings => o.Modify(b => b.AddCollection(() => o.Packages, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Packages))] + public static T AddPackages(this T o, IEnumerable v) where T : PnpmInstallSettings => o.Modify(b => b.AddCollection(() => o.Packages, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Packages))] + public static T RemovePackages(this T o, params string[] v) where T : PnpmInstallSettings => o.Modify(b => b.RemoveCollection(() => o.Packages, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Packages))] + public static T RemovePackages(this T o, IEnumerable v) where T : PnpmInstallSettings => o.Modify(b => b.RemoveCollection(() => o.Packages, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Packages))] + public static T ClearPackages(this T o) where T : PnpmInstallSettings => o.Modify(b => b.ClearCollection(() => o.Packages)); + #endregion + #region Production + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Production))] + public static T SetProduction(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Production, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Production))] + public static T ResetProduction(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Production)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Production))] + public static T EnableProduction(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Production, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Production))] + public static T DisableProduction(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Production, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Production))] + public static T ToggleProduction(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Production, !o.Production)); + #endregion + #region Dev + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Dev))] + public static T SetDev(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Dev, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Dev))] + public static T ResetDev(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Dev)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Dev))] + public static T EnableDev(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Dev, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Dev))] + public static T DisableDev(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Dev, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Dev))] + public static T ToggleDev(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Dev, !o.Dev)); + #endregion + #region NoOptional + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoOptional))] + public static T SetNoOptional(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoOptional, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoOptional))] + public static T ResetNoOptional(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.NoOptional)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoOptional))] + public static T EnableNoOptional(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoOptional, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoOptional))] + public static T DisableNoOptional(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoOptional, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoOptional))] + public static T ToggleNoOptional(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoOptional, !o.NoOptional)); + #endregion + #region FrozenLockfile + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FrozenLockfile))] + public static T SetFrozenLockfile(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FrozenLockfile, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FrozenLockfile))] + public static T ResetFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.FrozenLockfile)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FrozenLockfile))] + public static T EnableFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FrozenLockfile, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FrozenLockfile))] + public static T DisableFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FrozenLockfile, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FrozenLockfile))] + public static T ToggleFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FrozenLockfile, !o.FrozenLockfile)); + #endregion + #region NoFrozenLockfile + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoFrozenLockfile))] + public static T SetNoFrozenLockfile(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoFrozenLockfile, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoFrozenLockfile))] + public static T ResetNoFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.NoFrozenLockfile)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoFrozenLockfile))] + public static T EnableNoFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoFrozenLockfile, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoFrozenLockfile))] + public static T DisableNoFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoFrozenLockfile, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoFrozenLockfile))] + public static T ToggleNoFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoFrozenLockfile, !o.NoFrozenLockfile)); + #endregion + #region PreferFrozenLockfile + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferFrozenLockfile))] + public static T SetPreferFrozenLockfile(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferFrozenLockfile, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferFrozenLockfile))] + public static T ResetPreferFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.PreferFrozenLockfile)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferFrozenLockfile))] + public static T EnablePreferFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferFrozenLockfile, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferFrozenLockfile))] + public static T DisablePreferFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferFrozenLockfile, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferFrozenLockfile))] + public static T TogglePreferFrozenLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferFrozenLockfile, !o.PreferFrozenLockfile)); + #endregion + #region LockfileOnly + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LockfileOnly))] + public static T SetLockfileOnly(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.LockfileOnly, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LockfileOnly))] + public static T ResetLockfileOnly(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.LockfileOnly)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LockfileOnly))] + public static T EnableLockfileOnly(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.LockfileOnly, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LockfileOnly))] + public static T DisableLockfileOnly(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.LockfileOnly, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LockfileOnly))] + public static T ToggleLockfileOnly(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.LockfileOnly, !o.LockfileOnly)); + #endregion + #region NoLockfile + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoLockfile))] + public static T SetNoLockfile(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoLockfile, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoLockfile))] + public static T ResetNoLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.NoLockfile)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoLockfile))] + public static T EnableNoLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoLockfile, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoLockfile))] + public static T DisableNoLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoLockfile, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NoLockfile))] + public static T ToggleNoLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NoLockfile, !o.NoLockfile)); + #endregion + #region FixLockfile + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FixLockfile))] + public static T SetFixLockfile(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FixLockfile, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FixLockfile))] + public static T ResetFixLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.FixLockfile)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FixLockfile))] + public static T EnableFixLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FixLockfile, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FixLockfile))] + public static T DisableFixLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FixLockfile, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.FixLockfile))] + public static T ToggleFixLockfile(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.FixLockfile, !o.FixLockfile)); + #endregion + #region Force + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Force))] + public static T SetForce(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Force, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Force))] + public static T ResetForce(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Force)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Force))] + public static T EnableForce(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Force, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Force))] + public static T DisableForce(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Force, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Force))] + public static T ToggleForce(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Force, !o.Force)); + #endregion + #region Global + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Global))] + public static T SetGlobal(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Global, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Global))] + public static T ResetGlobal(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Global)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Global))] + public static T EnableGlobal(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Global, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Global))] + public static T DisableGlobal(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Global, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Global))] + public static T ToggleGlobal(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Global, !o.Global)); + #endregion + #region IgnoreScripts + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.IgnoreScripts))] + public static T SetIgnoreScripts(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.IgnoreScripts))] + public static T ResetIgnoreScripts(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.IgnoreScripts)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.IgnoreScripts))] + public static T EnableIgnoreScripts(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.IgnoreScripts))] + public static T DisableIgnoreScripts(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.IgnoreScripts))] + public static T ToggleIgnoreScripts(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, !o.IgnoreScripts)); + #endregion + #region Offline + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Offline))] + public static T SetOffline(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Offline, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Offline))] + public static T ResetOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Offline)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Offline))] + public static T EnableOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Offline, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Offline))] + public static T DisableOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Offline, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Offline))] + public static T ToggleOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Offline, !o.Offline)); + #endregion + #region PreferOffline + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferOffline))] + public static T SetPreferOffline(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferOffline, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferOffline))] + public static T ResetPreferOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.PreferOffline)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferOffline))] + public static T EnablePreferOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferOffline, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferOffline))] + public static T DisablePreferOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferOffline, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PreferOffline))] + public static T TogglePreferOffline(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PreferOffline, !o.PreferOffline)); + #endregion + #region StoreDir + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.StoreDir))] + public static T SetStoreDir(this T o, string v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.StoreDir, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.StoreDir))] + public static T ResetStoreDir(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.StoreDir)); + #endregion + #region VirtualStoreDir + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.VirtualStoreDir))] + public static T SetVirtualStoreDir(this T o, string v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.VirtualStoreDir, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.VirtualStoreDir))] + public static T ResetVirtualStoreDir(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.VirtualStoreDir)); + #endregion + #region ModulesDir + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ModulesDir))] + public static T SetModulesDir(this T o, string v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.ModulesDir, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ModulesDir))] + public static T ResetModulesDir(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.ModulesDir)); + #endregion + #region LockfileDir + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LockfileDir))] + public static T SetLockfileDir(this T o, string v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.LockfileDir, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LockfileDir))] + public static T ResetLockfileDir(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.LockfileDir)); + #endregion + #region Dir + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion + #region Recursive + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Recursive))] + public static T SetRecursive(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Recursive, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Recursive))] + public static T ResetRecursive(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Recursive)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Recursive))] + public static T EnableRecursive(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Recursive, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Recursive))] + public static T DisableRecursive(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Recursive, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Recursive))] + public static T ToggleRecursive(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Recursive, !o.Recursive)); + #endregion + #region Filters + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Filters))] + public static T SetFilters(this T o, params string[] v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Filters))] + public static T SetFilters(this T o, IEnumerable v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Filters))] + public static T AddFilters(this T o, params string[] v) where T : PnpmInstallSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Filters))] + public static T AddFilters(this T o, IEnumerable v) where T : PnpmInstallSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Filters))] + public static T RemoveFilters(this T o, params string[] v) where T : PnpmInstallSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Filters))] + public static T RemoveFilters(this T o, IEnumerable v) where T : PnpmInstallSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Filters))] + public static T ClearFilters(this T o) where T : PnpmInstallSettings => o.Modify(b => b.ClearCollection(() => o.Filters)); + #endregion + #region WorkspaceRoot + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.WorkspaceRoot))] + public static T SetWorkspaceRoot(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.WorkspaceRoot))] + public static T ResetWorkspaceRoot(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.WorkspaceRoot)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.WorkspaceRoot))] + public static T EnableWorkspaceRoot(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.WorkspaceRoot))] + public static T DisableWorkspaceRoot(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.WorkspaceRoot))] + public static T ToggleWorkspaceRoot(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, !o.WorkspaceRoot)); + #endregion + #region ShamefullyHoist + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ShamefullyHoist))] + public static T SetShamefullyHoist(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.ShamefullyHoist, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ShamefullyHoist))] + public static T ResetShamefullyHoist(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.ShamefullyHoist)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ShamefullyHoist))] + public static T EnableShamefullyHoist(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.ShamefullyHoist, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ShamefullyHoist))] + public static T DisableShamefullyHoist(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.ShamefullyHoist, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ShamefullyHoist))] + public static T ToggleShamefullyHoist(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.ShamefullyHoist, !o.ShamefullyHoist)); + #endregion + #region ChildConcurrency + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ChildConcurrency))] + public static T SetChildConcurrency(this T o, int? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.ChildConcurrency, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.ChildConcurrency))] + public static T ResetChildConcurrency(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.ChildConcurrency)); + #endregion + #region NetworkConcurrency + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NetworkConcurrency))] + public static T SetNetworkConcurrency(this T o, int? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.NetworkConcurrency, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.NetworkConcurrency))] + public static T ResetNetworkConcurrency(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.NetworkConcurrency)); + #endregion + #region StrictPeerDependencies + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.StrictPeerDependencies))] + public static T SetStrictPeerDependencies(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.StrictPeerDependencies, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.StrictPeerDependencies))] + public static T ResetStrictPeerDependencies(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.StrictPeerDependencies)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.StrictPeerDependencies))] + public static T EnableStrictPeerDependencies(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.StrictPeerDependencies, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.StrictPeerDependencies))] + public static T DisableStrictPeerDependencies(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.StrictPeerDependencies, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.StrictPeerDependencies))] + public static T ToggleStrictPeerDependencies(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.StrictPeerDependencies, !o.StrictPeerDependencies)); + #endregion + #region PackageImportMethod + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PackageImportMethod))] + public static T SetPackageImportMethod(this T o, PnpmPackageImportMethod v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.PackageImportMethod, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.PackageImportMethod))] + public static T ResetPackageImportMethod(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.PackageImportMethod)); + #endregion + #region Reporter + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Reporter))] + public static T SetReporter(this T o, PnpmReporter v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Reporter, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Reporter))] + public static T ResetReporter(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Reporter)); + #endregion + #region LogLevel + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LogLevel))] + public static T SetLogLevel(this T o, PnpmLogLevel v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.LogLevel, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.LogLevel))] + public static T ResetLogLevel(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.LogLevel)); + #endregion + #region Silent + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Silent))] + public static T SetSilent(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Silent, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Silent))] + public static T ResetSilent(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.Silent)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Silent))] + public static T EnableSilent(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Silent, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Silent))] + public static T DisableSilent(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Silent, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.Silent))] + public static T ToggleSilent(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.Silent, !o.Silent)); + #endregion + #region AggregateOutput + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.AggregateOutput))] + public static T SetAggregateOutput(this T o, bool? v) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.AggregateOutput, v)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.AggregateOutput))] + public static T ResetAggregateOutput(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Remove(() => o.AggregateOutput)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.AggregateOutput))] + public static T EnableAggregateOutput(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.AggregateOutput, true)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.AggregateOutput))] + public static T DisableAggregateOutput(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.AggregateOutput, false)); + /// + [Builder(Type = typeof(PnpmInstallSettings), Property = nameof(PnpmInstallSettings.AggregateOutput))] + public static T ToggleAggregateOutput(this T o) where T : PnpmInstallSettings => o.Modify(b => b.Set(() => o.AggregateOutput, !o.AggregateOutput)); + #endregion +} +#endregion +#region PnpmRunSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmRunSettingsExtensions +{ + #region Command + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Command))] + public static T SetCommand(this T o, string v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Command, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Command))] + public static T ResetCommand(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Command)); + #endregion + #region Arguments + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Arguments))] + public static T SetArguments(this T o, params string[] v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Arguments))] + public static T SetArguments(this T o, IEnumerable v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Arguments))] + public static T AddArguments(this T o, params string[] v) where T : PnpmRunSettings => o.Modify(b => b.AddCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Arguments))] + public static T AddArguments(this T o, IEnumerable v) where T : PnpmRunSettings => o.Modify(b => b.AddCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Arguments))] + public static T RemoveArguments(this T o, params string[] v) where T : PnpmRunSettings => o.Modify(b => b.RemoveCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Arguments))] + public static T RemoveArguments(this T o, IEnumerable v) where T : PnpmRunSettings => o.Modify(b => b.RemoveCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Arguments))] + public static T ClearArguments(this T o) where T : PnpmRunSettings => o.Modify(b => b.ClearCollection(() => o.Arguments)); + #endregion + #region Recursive + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Recursive))] + public static T SetRecursive(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Recursive, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Recursive))] + public static T ResetRecursive(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Recursive)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Recursive))] + public static T EnableRecursive(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Recursive, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Recursive))] + public static T DisableRecursive(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Recursive, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Recursive))] + public static T ToggleRecursive(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Recursive, !o.Recursive)); + #endregion + #region Filters + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Filters))] + public static T SetFilters(this T o, params string[] v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Filters))] + public static T SetFilters(this T o, IEnumerable v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Filters))] + public static T AddFilters(this T o, params string[] v) where T : PnpmRunSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Filters))] + public static T AddFilters(this T o, IEnumerable v) where T : PnpmRunSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Filters))] + public static T RemoveFilters(this T o, params string[] v) where T : PnpmRunSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Filters))] + public static T RemoveFilters(this T o, IEnumerable v) where T : PnpmRunSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Filters))] + public static T ClearFilters(this T o) where T : PnpmRunSettings => o.Modify(b => b.ClearCollection(() => o.Filters)); + #endregion + #region Parallel + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Parallel))] + public static T SetParallel(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Parallel, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Parallel))] + public static T ResetParallel(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Parallel)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Parallel))] + public static T EnableParallel(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Parallel, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Parallel))] + public static T DisableParallel(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Parallel, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Parallel))] + public static T ToggleParallel(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Parallel, !o.Parallel)); + #endregion + #region Sequential + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Sequential))] + public static T SetSequential(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Sequential, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Sequential))] + public static T ResetSequential(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Sequential)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Sequential))] + public static T EnableSequential(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Sequential, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Sequential))] + public static T DisableSequential(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Sequential, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Sequential))] + public static T ToggleSequential(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Sequential, !o.Sequential)); + #endregion + #region IfPresent + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.IfPresent))] + public static T SetIfPresent(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.IfPresent, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.IfPresent))] + public static T ResetIfPresent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.IfPresent)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.IfPresent))] + public static T EnableIfPresent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.IfPresent, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.IfPresent))] + public static T DisableIfPresent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.IfPresent, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.IfPresent))] + public static T ToggleIfPresent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.IfPresent, !o.IfPresent)); + #endregion + #region NoBail + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.NoBail))] + public static T SetNoBail(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.NoBail, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.NoBail))] + public static T ResetNoBail(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.NoBail)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.NoBail))] + public static T EnableNoBail(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.NoBail, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.NoBail))] + public static T DisableNoBail(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.NoBail, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.NoBail))] + public static T ToggleNoBail(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.NoBail, !o.NoBail)); + #endregion + #region Stream + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Stream))] + public static T SetStream(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Stream, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Stream))] + public static T ResetStream(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Stream)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Stream))] + public static T EnableStream(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Stream, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Stream))] + public static T DisableStream(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Stream, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Stream))] + public static T ToggleStream(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Stream, !o.Stream)); + #endregion + #region Dir + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion + #region WorkspaceRoot + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.WorkspaceRoot))] + public static T SetWorkspaceRoot(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.WorkspaceRoot))] + public static T ResetWorkspaceRoot(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.WorkspaceRoot)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.WorkspaceRoot))] + public static T EnableWorkspaceRoot(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.WorkspaceRoot))] + public static T DisableWorkspaceRoot(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.WorkspaceRoot))] + public static T ToggleWorkspaceRoot(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, !o.WorkspaceRoot)); + #endregion + #region Reporter + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Reporter))] + public static T SetReporter(this T o, PnpmReporter v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Reporter, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Reporter))] + public static T ResetReporter(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Reporter)); + #endregion + #region LogLevel + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.LogLevel))] + public static T SetLogLevel(this T o, PnpmLogLevel v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.LogLevel, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.LogLevel))] + public static T ResetLogLevel(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.LogLevel)); + #endregion + #region Silent + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Silent))] + public static T SetSilent(this T o, bool? v) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Silent, v)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Silent))] + public static T ResetSilent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Remove(() => o.Silent)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Silent))] + public static T EnableSilent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Silent, true)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Silent))] + public static T DisableSilent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Silent, false)); + /// + [Builder(Type = typeof(PnpmRunSettings), Property = nameof(PnpmRunSettings.Silent))] + public static T ToggleSilent(this T o) where T : PnpmRunSettings => o.Modify(b => b.Set(() => o.Silent, !o.Silent)); + #endregion +} +#endregion +#region PnpmExecSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmExecSettingsExtensions +{ + #region Command + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Command))] + public static T SetCommand(this T o, string v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Command, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Command))] + public static T ResetCommand(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.Command)); + #endregion + #region Arguments + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Arguments))] + public static T SetArguments(this T o, params string[] v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Arguments))] + public static T SetArguments(this T o, IEnumerable v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Arguments))] + public static T AddArguments(this T o, params string[] v) where T : PnpmExecSettings => o.Modify(b => b.AddCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Arguments))] + public static T AddArguments(this T o, IEnumerable v) where T : PnpmExecSettings => o.Modify(b => b.AddCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Arguments))] + public static T RemoveArguments(this T o, params string[] v) where T : PnpmExecSettings => o.Modify(b => b.RemoveCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Arguments))] + public static T RemoveArguments(this T o, IEnumerable v) where T : PnpmExecSettings => o.Modify(b => b.RemoveCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Arguments))] + public static T ClearArguments(this T o) where T : PnpmExecSettings => o.Modify(b => b.ClearCollection(() => o.Arguments)); + #endregion + #region Recursive + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Recursive))] + public static T SetRecursive(this T o, bool? v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Recursive, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Recursive))] + public static T ResetRecursive(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.Recursive)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Recursive))] + public static T EnableRecursive(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Recursive, true)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Recursive))] + public static T DisableRecursive(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Recursive, false)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Recursive))] + public static T ToggleRecursive(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Recursive, !o.Recursive)); + #endregion + #region Filters + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Filters))] + public static T SetFilters(this T o, params string[] v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Filters))] + public static T SetFilters(this T o, IEnumerable v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Filters))] + public static T AddFilters(this T o, params string[] v) where T : PnpmExecSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Filters))] + public static T AddFilters(this T o, IEnumerable v) where T : PnpmExecSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Filters))] + public static T RemoveFilters(this T o, params string[] v) where T : PnpmExecSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Filters))] + public static T RemoveFilters(this T o, IEnumerable v) where T : PnpmExecSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Filters))] + public static T ClearFilters(this T o) where T : PnpmExecSettings => o.Modify(b => b.ClearCollection(() => o.Filters)); + #endregion + #region Parallel + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Parallel))] + public static T SetParallel(this T o, bool? v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Parallel, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Parallel))] + public static T ResetParallel(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.Parallel)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Parallel))] + public static T EnableParallel(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Parallel, true)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Parallel))] + public static T DisableParallel(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Parallel, false)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Parallel))] + public static T ToggleParallel(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Parallel, !o.Parallel)); + #endregion + #region ShellMode + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.ShellMode))] + public static T SetShellMode(this T o, bool? v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.ShellMode, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.ShellMode))] + public static T ResetShellMode(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.ShellMode)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.ShellMode))] + public static T EnableShellMode(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.ShellMode, true)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.ShellMode))] + public static T DisableShellMode(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.ShellMode, false)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.ShellMode))] + public static T ToggleShellMode(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.ShellMode, !o.ShellMode)); + #endregion + #region Stream + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Stream))] + public static T SetStream(this T o, bool? v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Stream, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Stream))] + public static T ResetStream(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.Stream)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Stream))] + public static T EnableStream(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Stream, true)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Stream))] + public static T DisableStream(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Stream, false)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Stream))] + public static T ToggleStream(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Stream, !o.Stream)); + #endregion + #region Dir + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion + #region WorkspaceRoot + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.WorkspaceRoot))] + public static T SetWorkspaceRoot(this T o, bool? v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.WorkspaceRoot))] + public static T ResetWorkspaceRoot(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.WorkspaceRoot)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.WorkspaceRoot))] + public static T EnableWorkspaceRoot(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, true)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.WorkspaceRoot))] + public static T DisableWorkspaceRoot(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, false)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.WorkspaceRoot))] + public static T ToggleWorkspaceRoot(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.WorkspaceRoot, !o.WorkspaceRoot)); + #endregion + #region LogLevel + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.LogLevel))] + public static T SetLogLevel(this T o, PnpmLogLevel v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.LogLevel, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.LogLevel))] + public static T ResetLogLevel(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.LogLevel)); + #endregion + #region Silent + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Silent))] + public static T SetSilent(this T o, bool? v) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Silent, v)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Silent))] + public static T ResetSilent(this T o) where T : PnpmExecSettings => o.Modify(b => b.Remove(() => o.Silent)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Silent))] + public static T EnableSilent(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Silent, true)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Silent))] + public static T DisableSilent(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Silent, false)); + /// + [Builder(Type = typeof(PnpmExecSettings), Property = nameof(PnpmExecSettings.Silent))] + public static T ToggleSilent(this T o) where T : PnpmExecSettings => o.Modify(b => b.Set(() => o.Silent, !o.Silent)); + #endregion +} +#endregion +#region PnpmDlxSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmDlxSettingsExtensions +{ + #region Package + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Package))] + public static T SetPackage(this T o, string v) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Package, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Package))] + public static T ResetPackage(this T o) where T : PnpmDlxSettings => o.Modify(b => b.Remove(() => o.Package)); + #endregion + #region Arguments + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Arguments))] + public static T SetArguments(this T o, params string[] v) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Arguments))] + public static T SetArguments(this T o, IEnumerable v) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Arguments))] + public static T AddArguments(this T o, params string[] v) where T : PnpmDlxSettings => o.Modify(b => b.AddCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Arguments))] + public static T AddArguments(this T o, IEnumerable v) where T : PnpmDlxSettings => o.Modify(b => b.AddCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Arguments))] + public static T RemoveArguments(this T o, params string[] v) where T : PnpmDlxSettings => o.Modify(b => b.RemoveCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Arguments))] + public static T RemoveArguments(this T o, IEnumerable v) where T : PnpmDlxSettings => o.Modify(b => b.RemoveCollection(() => o.Arguments, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Arguments))] + public static T ClearArguments(this T o) where T : PnpmDlxSettings => o.Modify(b => b.ClearCollection(() => o.Arguments)); + #endregion + #region Dir + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmDlxSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion + #region Silent + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Silent))] + public static T SetSilent(this T o, bool? v) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Silent, v)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Silent))] + public static T ResetSilent(this T o) where T : PnpmDlxSettings => o.Modify(b => b.Remove(() => o.Silent)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Silent))] + public static T EnableSilent(this T o) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Silent, true)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Silent))] + public static T DisableSilent(this T o) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Silent, false)); + /// + [Builder(Type = typeof(PnpmDlxSettings), Property = nameof(PnpmDlxSettings.Silent))] + public static T ToggleSilent(this T o) where T : PnpmDlxSettings => o.Modify(b => b.Set(() => o.Silent, !o.Silent)); + #endregion +} +#endregion +#region PnpmPublishSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmPublishSettingsExtensions +{ + #region Target + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Target))] + public static T SetTarget(this T o, string v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Target, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Target))] + public static T ResetTarget(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Target)); + #endregion + #region Tag + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Tag))] + public static T SetTag(this T o, string v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Tag, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Tag))] + public static T ResetTag(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Tag)); + #endregion + #region Access + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Access))] + public static T SetAccess(this T o, PnpmPublishAccess v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Access, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Access))] + public static T ResetAccess(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Access)); + #endregion + #region Force + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Force))] + public static T SetForce(this T o, bool? v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Force, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Force))] + public static T ResetForce(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Force)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Force))] + public static T EnableForce(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Force, true)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Force))] + public static T DisableForce(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Force, false)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Force))] + public static T ToggleForce(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Force, !o.Force)); + #endregion + #region DryRun + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.DryRun))] + public static T SetDryRun(this T o, bool? v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.DryRun, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.DryRun))] + public static T ResetDryRun(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.DryRun)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.DryRun))] + public static T EnableDryRun(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.DryRun, true)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.DryRun))] + public static T DisableDryRun(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.DryRun, false)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.DryRun))] + public static T ToggleDryRun(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.DryRun, !o.DryRun)); + #endregion + #region Json + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Json))] + public static T SetJson(this T o, bool? v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Json, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Json))] + public static T ResetJson(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Json)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Json))] + public static T EnableJson(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Json, true)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Json))] + public static T DisableJson(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Json, false)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Json))] + public static T ToggleJson(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Json, !o.Json)); + #endregion + #region NoGitChecks + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.NoGitChecks))] + public static T SetNoGitChecks(this T o, bool? v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.NoGitChecks, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.NoGitChecks))] + public static T ResetNoGitChecks(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.NoGitChecks)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.NoGitChecks))] + public static T EnableNoGitChecks(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.NoGitChecks, true)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.NoGitChecks))] + public static T DisableNoGitChecks(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.NoGitChecks, false)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.NoGitChecks))] + public static T ToggleNoGitChecks(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.NoGitChecks, !o.NoGitChecks)); + #endregion + #region Otp + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Otp))] + public static T SetOtp(this T o, [Secret] string v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Otp, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Otp))] + public static T ResetOtp(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Otp)); + #endregion + #region PublishBranch + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.PublishBranch))] + public static T SetPublishBranch(this T o, string v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.PublishBranch, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.PublishBranch))] + public static T ResetPublishBranch(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.PublishBranch)); + #endregion + #region Recursive + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Recursive))] + public static T SetRecursive(this T o, bool? v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Recursive, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Recursive))] + public static T ResetRecursive(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Recursive)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Recursive))] + public static T EnableRecursive(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Recursive, true)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Recursive))] + public static T DisableRecursive(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Recursive, false)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Recursive))] + public static T ToggleRecursive(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Recursive, !o.Recursive)); + #endregion + #region ReportSummary + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.ReportSummary))] + public static T SetReportSummary(this T o, bool? v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.ReportSummary, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.ReportSummary))] + public static T ResetReportSummary(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.ReportSummary)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.ReportSummary))] + public static T EnableReportSummary(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.ReportSummary, true)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.ReportSummary))] + public static T DisableReportSummary(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.ReportSummary, false)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.ReportSummary))] + public static T ToggleReportSummary(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.ReportSummary, !o.ReportSummary)); + #endregion + #region IgnoreScripts + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.IgnoreScripts))] + public static T SetIgnoreScripts(this T o, bool? v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.IgnoreScripts))] + public static T ResetIgnoreScripts(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.IgnoreScripts)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.IgnoreScripts))] + public static T EnableIgnoreScripts(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, true)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.IgnoreScripts))] + public static T DisableIgnoreScripts(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, false)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.IgnoreScripts))] + public static T ToggleIgnoreScripts(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.IgnoreScripts, !o.IgnoreScripts)); + #endregion + #region Dir + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmPublishSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmPublishSettings), Property = nameof(PnpmPublishSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmPublishSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion +} +#endregion +#region PnpmPackSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmPackSettingsExtensions +{ + #region Out + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Out))] + public static T SetOut(this T o, string v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Out, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Out))] + public static T ResetOut(this T o) where T : PnpmPackSettings => o.Modify(b => b.Remove(() => o.Out)); + #endregion + #region PackDestination + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.PackDestination))] + public static T SetPackDestination(this T o, string v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.PackDestination, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.PackDestination))] + public static T ResetPackDestination(this T o) where T : PnpmPackSettings => o.Modify(b => b.Remove(() => o.PackDestination)); + #endregion + #region DryRun + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.DryRun))] + public static T SetDryRun(this T o, bool? v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.DryRun, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.DryRun))] + public static T ResetDryRun(this T o) where T : PnpmPackSettings => o.Modify(b => b.Remove(() => o.DryRun)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.DryRun))] + public static T EnableDryRun(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.DryRun, true)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.DryRun))] + public static T DisableDryRun(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.DryRun, false)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.DryRun))] + public static T ToggleDryRun(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.DryRun, !o.DryRun)); + #endregion + #region Json + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Json))] + public static T SetJson(this T o, bool? v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Json, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Json))] + public static T ResetJson(this T o) where T : PnpmPackSettings => o.Modify(b => b.Remove(() => o.Json)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Json))] + public static T EnableJson(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Json, true)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Json))] + public static T DisableJson(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Json, false)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Json))] + public static T ToggleJson(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Json, !o.Json)); + #endregion + #region Recursive + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Recursive))] + public static T SetRecursive(this T o, bool? v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Recursive, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Recursive))] + public static T ResetRecursive(this T o) where T : PnpmPackSettings => o.Modify(b => b.Remove(() => o.Recursive)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Recursive))] + public static T EnableRecursive(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Recursive, true)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Recursive))] + public static T DisableRecursive(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Recursive, false)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Recursive))] + public static T ToggleRecursive(this T o) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Recursive, !o.Recursive)); + #endregion + #region Filters + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Filters))] + public static T SetFilters(this T o, params string[] v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Filters))] + public static T SetFilters(this T o, IEnumerable v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Filters))] + public static T AddFilters(this T o, params string[] v) where T : PnpmPackSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Filters))] + public static T AddFilters(this T o, IEnumerable v) where T : PnpmPackSettings => o.Modify(b => b.AddCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Filters))] + public static T RemoveFilters(this T o, params string[] v) where T : PnpmPackSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Filters))] + public static T RemoveFilters(this T o, IEnumerable v) where T : PnpmPackSettings => o.Modify(b => b.RemoveCollection(() => o.Filters, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Filters))] + public static T ClearFilters(this T o) where T : PnpmPackSettings => o.Modify(b => b.ClearCollection(() => o.Filters)); + #endregion + #region Dir + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmPackSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmPackSettings), Property = nameof(PnpmPackSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmPackSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion +} +#endregion +#region PnpmAuditSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class PnpmAuditSettingsExtensions +{ + #region AuditLevel + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.AuditLevel))] + public static T SetAuditLevel(this T o, PnpmAuditLevel v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.AuditLevel, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.AuditLevel))] + public static T ResetAuditLevel(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.AuditLevel)); + #endregion + #region Dev + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Dev))] + public static T SetDev(this T o, bool? v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Dev, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Dev))] + public static T ResetDev(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.Dev)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Dev))] + public static T EnableDev(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Dev, true)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Dev))] + public static T DisableDev(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Dev, false)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Dev))] + public static T ToggleDev(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Dev, !o.Dev)); + #endregion + #region Prod + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Prod))] + public static T SetProd(this T o, bool? v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Prod, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Prod))] + public static T ResetProd(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.Prod)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Prod))] + public static T EnableProd(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Prod, true)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Prod))] + public static T DisableProd(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Prod, false)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Prod))] + public static T ToggleProd(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Prod, !o.Prod)); + #endregion + #region NoOptional + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.NoOptional))] + public static T SetNoOptional(this T o, bool? v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.NoOptional, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.NoOptional))] + public static T ResetNoOptional(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.NoOptional)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.NoOptional))] + public static T EnableNoOptional(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.NoOptional, true)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.NoOptional))] + public static T DisableNoOptional(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.NoOptional, false)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.NoOptional))] + public static T ToggleNoOptional(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.NoOptional, !o.NoOptional)); + #endregion + #region Fix + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Fix))] + public static T SetFix(this T o, PnpmAuditFix v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Fix, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Fix))] + public static T ResetFix(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.Fix)); + #endregion + #region IgnoreRegistryErrors + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreRegistryErrors))] + public static T SetIgnoreRegistryErrors(this T o, bool? v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreRegistryErrors, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreRegistryErrors))] + public static T ResetIgnoreRegistryErrors(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.IgnoreRegistryErrors)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreRegistryErrors))] + public static T EnableIgnoreRegistryErrors(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreRegistryErrors, true)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreRegistryErrors))] + public static T DisableIgnoreRegistryErrors(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreRegistryErrors, false)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreRegistryErrors))] + public static T ToggleIgnoreRegistryErrors(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreRegistryErrors, !o.IgnoreRegistryErrors)); + #endregion + #region IgnoreUnfixable + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreUnfixable))] + public static T SetIgnoreUnfixable(this T o, bool? v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreUnfixable, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreUnfixable))] + public static T ResetIgnoreUnfixable(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.IgnoreUnfixable)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreUnfixable))] + public static T EnableIgnoreUnfixable(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreUnfixable, true)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreUnfixable))] + public static T DisableIgnoreUnfixable(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreUnfixable, false)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.IgnoreUnfixable))] + public static T ToggleIgnoreUnfixable(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.IgnoreUnfixable, !o.IgnoreUnfixable)); + #endregion + #region Json + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Json))] + public static T SetJson(this T o, bool? v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Json, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Json))] + public static T ResetJson(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.Json)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Json))] + public static T EnableJson(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Json, true)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Json))] + public static T DisableJson(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Json, false)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Json))] + public static T ToggleJson(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Json, !o.Json)); + #endregion + #region Dir + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Dir))] + public static T SetDir(this T o, string v) where T : PnpmAuditSettings => o.Modify(b => b.Set(() => o.Dir, v)); + /// + [Builder(Type = typeof(PnpmAuditSettings), Property = nameof(PnpmAuditSettings.Dir))] + public static T ResetDir(this T o) where T : PnpmAuditSettings => o.Modify(b => b.Remove(() => o.Dir)); + #endregion +} +#endregion +#region PnpmLogLevel +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class PnpmLogLevel : Enumeration +{ + public static PnpmLogLevel debug = (PnpmLogLevel) "debug"; + public static PnpmLogLevel info = (PnpmLogLevel) "info"; + public static PnpmLogLevel warn = (PnpmLogLevel) "warn"; + public static PnpmLogLevel error = (PnpmLogLevel) "error"; + public static implicit operator PnpmLogLevel(string value) + { + return new PnpmLogLevel { Value = value }; + } +} +#endregion +#region PnpmReporter +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class PnpmReporter : Enumeration +{ + public static PnpmReporter append_only = (PnpmReporter) "append-only"; + public static PnpmReporter default_ = (PnpmReporter) "default"; + public static PnpmReporter ndjson = (PnpmReporter) "ndjson"; + public static PnpmReporter silent = (PnpmReporter) "silent"; + public static implicit operator PnpmReporter(string value) + { + return new PnpmReporter { Value = value }; + } +} +#endregion +#region PnpmPackageImportMethod +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class PnpmPackageImportMethod : Enumeration +{ + public static PnpmPackageImportMethod auto = (PnpmPackageImportMethod) "auto"; + public static PnpmPackageImportMethod clone = (PnpmPackageImportMethod) "clone"; + public static PnpmPackageImportMethod copy = (PnpmPackageImportMethod) "copy"; + public static PnpmPackageImportMethod hardlink = (PnpmPackageImportMethod) "hardlink"; + public static implicit operator PnpmPackageImportMethod(string value) + { + return new PnpmPackageImportMethod { Value = value }; + } +} +#endregion +#region PnpmPublishAccess +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class PnpmPublishAccess : Enumeration +{ + public static PnpmPublishAccess public_ = (PnpmPublishAccess) "public"; + public static PnpmPublishAccess restricted = (PnpmPublishAccess) "restricted"; + public static implicit operator PnpmPublishAccess(string value) + { + return new PnpmPublishAccess { Value = value }; + } +} +#endregion +#region PnpmAuditLevel +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class PnpmAuditLevel : Enumeration +{ + public static PnpmAuditLevel info = (PnpmAuditLevel) "info"; + public static PnpmAuditLevel low = (PnpmAuditLevel) "low"; + public static PnpmAuditLevel moderate = (PnpmAuditLevel) "moderate"; + public static PnpmAuditLevel high = (PnpmAuditLevel) "high"; + public static PnpmAuditLevel critical = (PnpmAuditLevel) "critical"; + public static implicit operator PnpmAuditLevel(string value) + { + return new PnpmAuditLevel { Value = value }; + } +} +#endregion +#region PnpmAuditFix +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class PnpmAuditFix : Enumeration +{ + public static PnpmAuditFix override_ = (PnpmAuditFix) "override"; + public static PnpmAuditFix update = (PnpmAuditFix) "update"; + public static implicit operator PnpmAuditFix(string value) + { + return new PnpmAuditFix { Value = value }; + } +} +#endregion diff --git a/src/Fallout.Common/Tools/Pnpm/Pnpm.json b/src/Fallout.Common/Tools/Pnpm/Pnpm.json new file mode 100644 index 000000000..fc2490ff6 --- /dev/null +++ b/src/Fallout.Common/Tools/Pnpm/Pnpm.json @@ -0,0 +1,721 @@ +{ + "$schema": "https://raw.githubusercontent.com/Fallout-build/Fallout/main/src/Fallout.Tooling.Generator/schema.json", + "references": [ + "https://pnpm.io/cli/install", + "https://pnpm.io/cli/run", + "https://pnpm.io/cli/exec", + "https://pnpm.io/cli/ci", + "https://pnpm.io/cli/dlx", + "https://pnpm.io/cli/audit", + "https://pnpm.io/cli/pack", + "https://pnpm.io/cli/publish" + ], + "name": "Pnpm", + "officialUrl": "https://pnpm.io/", + "help": "pnpm is a fast, disk space efficient package manager for the Node JavaScript platform.Files inside node_modules are hard linked or cloned from a single content-addressable storage on disk, saving disk space and speeding up installations.", + "pathExecutable": "pnpm", + "customLogger": true, + "tasks": [ + { + "help": "Runs pnpm clean followed by pnpm install --frozen-lockfile. Designed for CI/CD environments.", + "postfix": "Ci", + "definiteArgument": "ci", + "settingsClass": { + "properties": [ + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + }, + { + "name": "Reporter", + "type": "PnpmReporter", + "format": "--reporter {value}", + "help": "Controls how output is reported." + }, + { + "name": "LogLevel", + "type": "PnpmLogLevel", + "format": "--loglevel {value}", + "help": "What level of logs to report." + }, + { + "name": "Silent", + "type": "bool", + "format": "--silent", + "help": "No output is logged to the console, not even fatal errors." + } + ] + } + }, + { + "help": "Installs all dependencies of the project in the current working directory. When executed inside a workspace, installs all dependencies of all projects.", + "postfix": "Install", + "definiteArgument": "install", + "settingsClass": { + "properties": [ + { + "name": "Packages", + "type": "List", + "format": "{value}", + "position": 1, + "help": "List of packages to be installed." + }, + { + "name": "Production", + "type": "bool", + "format": "--prod", + "help": "Packages in devDependencies will not be installed." + }, + { + "name": "Dev", + "type": "bool", + "format": "--dev", + "help": "Only devDependencies will be installed." + }, + { + "name": "NoOptional", + "type": "bool", + "format": "--no-optional", + "help": "Prevents optionalDependencies from being installed." + }, + { + "name": "FrozenLockfile", + "type": "bool", + "format": "--frozen-lockfile", + "help": "Don't generate a lockfile and fail if an update is needed. This setting is on by default in CI environments." + }, + { + "name": "NoFrozenLockfile", + "type": "bool", + "format": "--no-frozen-lockfile", + "help": "Forces generating or updating a lockfile even in CI environments." + }, + { + "name": "PreferFrozenLockfile", + "type": "bool", + "format": "--prefer-frozen-lockfile", + "help": "If the available pnpm-lock.yaml satisfies the package.json then perform a headless installation." + }, + { + "name": "LockfileOnly", + "type": "bool", + "format": "--lockfile-only", + "help": "Dependencies are not downloaded. Only pnpm-lock.yaml is updated." + }, + { + "name": "NoLockfile", + "type": "bool", + "format": "--no-lockfile", + "help": "Don't read or generate a pnpm-lock.yaml file." + }, + { + "name": "FixLockfile", + "type": "bool", + "format": "--fix-lockfile", + "help": "Fix broken lockfile entries automatically." + }, + { + "name": "Force", + "type": "bool", + "format": "--force", + "help": "Forces reinstalling dependencies: refetch packages modified in store, recreate a lockfile and/or modules directory created by a non-compatible version of pnpm." + }, + { + "name": "Global", + "type": "bool", + "format": "--global", + "help": "Install package globally." + }, + { + "name": "IgnoreScripts", + "type": "bool", + "format": "--ignore-scripts", + "help": "Causes pnpm to not execute any scripts defined in the package.json." + }, + { + "name": "Offline", + "type": "bool", + "format": "--offline", + "help": "Trigger an error if any required dependencies are not available in local store." + }, + { + "name": "PreferOffline", + "type": "bool", + "format": "--prefer-offline", + "help": "Skip staleness checks for cached data, but request missing data from the server." + }, + { + "name": "StoreDir", + "type": "string", + "format": "--store-dir {value}", + "help": "The directory in which all the packages are saved on disk." + }, + { + "name": "VirtualStoreDir", + "type": "string", + "format": "--virtual-store-dir {value}", + "help": "The directory with links to the store (default is node_modules/.pnpm)." + }, + { + "name": "ModulesDir", + "type": "string", + "format": "--modules-dir {value}", + "help": "The directory in which dependencies will be installed (instead of node_modules)." + }, + { + "name": "LockfileDir", + "type": "string", + "format": "--lockfile-dir {value}", + "help": "The directory in which the pnpm-lock.yaml will be created." + }, + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + }, + { + "name": "Recursive", + "type": "bool", + "format": "--recursive", + "help": "Run installation recursively in every package found in subdirectories." + }, + { + "name": "Filters", + "type": "List", + "format": "--filter {value}", + "help": "Restricts the scope to package names matching the given pattern." + }, + { + "name": "WorkspaceRoot", + "type": "bool", + "format": "--workspace-root", + "help": "Run the command on the root workspace project." + }, + { + "name": "ShamefullyHoist", + "type": "bool", + "format": "--shamefully-hoist", + "help": "All the subdeps will be hoisted into the root node_modules." + }, + { + "name": "ChildConcurrency", + "type": "int", + "format": "--child-concurrency {value}", + "help": "Controls the number of child processes run parallelly to build node modules." + }, + { + "name": "NetworkConcurrency", + "type": "int", + "format": "--network-concurrency {value}", + "help": "Maximum number of concurrent network requests." + }, + { + "name": "StrictPeerDependencies", + "type": "bool", + "format": "--strict-peer-dependencies", + "help": "Fail on missing or invalid peer dependencies." + }, + { + "name": "PackageImportMethod", + "type": "PnpmPackageImportMethod", + "format": "--package-import-method {value}", + "help": "Method used to clone, hardlink, or copy packages from the store." + }, + { + "name": "Reporter", + "type": "PnpmReporter", + "format": "--reporter {value}", + "help": "Controls how output is reported." + }, + { + "name": "LogLevel", + "type": "PnpmLogLevel", + "format": "--loglevel {value}", + "help": "What level of logs to report." + }, + { + "name": "Silent", + "type": "bool", + "format": "--silent", + "help": "No output is logged to the console, not even fatal errors." + }, + { + "name": "AggregateOutput", + "type": "bool", + "format": "--aggregate-output", + "help": "Aggregate output from child processes that are run in parallel." + } + ] + } + }, + { + "help": "Runs an arbitrary command from a package's \"scripts\" object.", + "postfix": "Run", + "definiteArgument": "run", + "settingsClass": { + "properties": [ + { + "name": "Command", + "type": "string", + "format": "{value}", + "position": 1, + "help": "The command to be executed." + }, + { + "name": "Arguments", + "type": "List", + "format": "-- {value}", + "separator": " ", + "position": -1, + "help": "Arguments passed to the script." + }, + { + "name": "Recursive", + "type": "bool", + "format": "--recursive", + "help": "Run the defined package script in every package found in subdirectories or workspace." + }, + { + "name": "Filters", + "type": "List", + "format": "--filter {value}", + "help": "Restricts the scope to package names matching the given pattern." + }, + { + "name": "Parallel", + "type": "bool", + "format": "--parallel", + "help": "Completely disregard concurrency and topological sorting, running a given script immediately in all matching packages." + }, + { + "name": "Sequential", + "type": "bool", + "format": "--sequential", + "help": "Run the specified scripts one by one." + }, + { + "name": "IfPresent", + "type": "bool", + "format": "--if-present", + "help": "Avoid exiting with a non-zero exit code when the script is undefined." + }, + { + "name": "NoBail", + "type": "bool", + "format": "--no-bail", + "help": "The command will exit with a 0 exit code even if the script fails." + }, + { + "name": "Stream", + "type": "bool", + "format": "--stream", + "help": "Stream output from child processes immediately, prefixed with the originating package directory." + }, + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + }, + { + "name": "WorkspaceRoot", + "type": "bool", + "format": "--workspace-root", + "help": "Run the command on the root workspace project." + }, + { + "name": "Reporter", + "type": "PnpmReporter", + "format": "--reporter {value}", + "help": "Controls how output is reported." + }, + { + "name": "LogLevel", + "type": "PnpmLogLevel", + "format": "--loglevel {value}", + "help": "What level of logs to report." + }, + { + "name": "Silent", + "type": "bool", + "format": "--silent", + "help": "No output is logged to the console, not even fatal errors." + } + ] + } + }, + { + "help": "Executes a shell command in scope of a project.", + "postfix": "Exec", + "definiteArgument": "exec", + "settingsClass": { + "properties": [ + { + "name": "Command", + "type": "string", + "format": "{value}", + "position": 1, + "help": "The command to be executed." + }, + { + "name": "Arguments", + "type": "List", + "format": "{value}", + "separator": " ", + "position": -1, + "help": "Arguments passed to the command." + }, + { + "name": "Recursive", + "type": "bool", + "format": "--recursive", + "help": "Run the shell command in every package found in subdirectories or workspace." + }, + { + "name": "Filters", + "type": "List", + "format": "--filter {value}", + "help": "Restricts the scope to package names matching the given pattern." + }, + { + "name": "Parallel", + "type": "bool", + "format": "--parallel", + "help": "Completely disregard concurrency and topological sorting, running a given command immediately in all matching packages." + }, + { + "name": "ShellMode", + "type": "bool", + "format": "--shell-mode", + "help": "Runs command inside of a shell (/bin/sh on UNIX and cmd.exe on Windows)." + }, + { + "name": "Stream", + "type": "bool", + "format": "--stream", + "help": "Stream output from child processes immediately, prefixed with the originating package directory." + }, + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + }, + { + "name": "WorkspaceRoot", + "type": "bool", + "format": "--workspace-root", + "help": "Run the command on the root workspace project." + }, + { + "name": "LogLevel", + "type": "PnpmLogLevel", + "format": "--loglevel {value}", + "help": "What level of logs to report." + }, + { + "name": "Silent", + "type": "bool", + "format": "--silent", + "help": "No output is logged to the console, not even fatal errors." + } + ] + } + }, + { + "help": "Fetches a package from the registry without installing it as a dependency, hot loads it, and runs whatever default command binary it exposes.", + "postfix": "Dlx", + "definiteArgument": "dlx", + "settingsClass": { + "properties": [ + { + "name": "Package", + "type": "string", + "format": "{value}", + "position": 1, + "help": "The package binary to execute." + }, + { + "name": "Arguments", + "type": "List", + "format": "{value}", + "separator": " ", + "position": -1, + "help": "Arguments passed to the package binary." + }, + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + }, + { + "name": "Silent", + "type": "bool", + "format": "--silent", + "help": "No output is logged to the console, not even fatal errors." + } + ] + } + }, + { + "help": "Publishes a package to the npm registry.", + "postfix": "Publish", + "definiteArgument": "publish", + "settingsClass": { + "properties": [ + { + "name": "Target", + "type": "string", + "format": "{value}", + "position": 1, + "help": "A tarball or directory to publish." + }, + { + "name": "Tag", + "type": "string", + "format": "--tag {value}", + "help": "Registers the published package with the given tag." + }, + { + "name": "Access", + "type": "PnpmPublishAccess", + "format": "--access {value}", + "help": "Tells the registry whether this package should be published as public or restricted." + }, + { + "name": "Force", + "type": "bool", + "format": "--force", + "help": "Packages are proceeded to be published even if their current version is already in the registry." + }, + { + "name": "DryRun", + "type": "bool", + "format": "--dry-run", + "help": "Does everything a publish would do except actually publishing to the registry." + }, + { + "name": "Json", + "type": "bool", + "format": "--json", + "help": "Show information in JSON format." + }, + { + "name": "NoGitChecks", + "type": "bool", + "format": "--no-git-checks", + "help": "Don't check if current branch is your publish branch, clean, and up to date." + }, + { + "name": "Otp", + "type": "string", + "format": "--otp {value}", + "secret": true, + "help": "When publishing packages that require two-factor authentication, this option can specify a one-time password." + }, + { + "name": "PublishBranch", + "type": "string", + "format": "--publish-branch {value}", + "help": "Sets branch name to publish." + }, + { + "name": "Recursive", + "type": "bool", + "format": "--recursive", + "help": "Publish all packages from the workspace." + }, + { + "name": "ReportSummary", + "type": "bool", + "format": "--report-summary", + "help": "Save the list of the newly published packages to pnpm-publish-summary.json." + }, + { + "name": "IgnoreScripts", + "type": "bool", + "format": "--ignore-scripts", + "help": "Ignores any publish related lifecycle scripts." + }, + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + } + ] + } + }, + { + "help": "Creates a tarball from a package.", + "postfix": "Pack", + "definiteArgument": "pack", + "settingsClass": { + "properties": [ + { + "name": "Out", + "type": "string", + "format": "--out {value}", + "help": "Customizes the output path for the tarball." + }, + { + "name": "PackDestination", + "type": "string", + "format": "--pack-destination {value}", + "help": "Directory in which pnpm pack will save tarballs." + }, + { + "name": "DryRun", + "type": "bool", + "format": "--dry-run", + "help": "Does everything pnpm pack would do except actually writing the tarball to disk." + }, + { + "name": "Json", + "type": "bool", + "format": "--json", + "help": "Prints the packed tarball and contents in JSON format." + }, + { + "name": "Recursive", + "type": "bool", + "format": "--recursive", + "help": "Pack all packages from the workspace." + }, + { + "name": "Filters", + "type": "List", + "format": "--filter {value}", + "help": "Restricts the scope to package names matching the given pattern." + }, + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + } + ] + } + }, + { + "help": "Checks for known security issues with the installed packages.", + "postfix": "Audit", + "definiteArgument": "audit", + "settingsClass": { + "properties": [ + { + "name": "AuditLevel", + "type": "PnpmAuditLevel", + "format": "--audit-level {value}", + "help": "Only print advisories with severity greater than or equal to the given level." + }, + { + "name": "Dev", + "type": "bool", + "format": "--dev", + "help": "Only audit devDependencies." + }, + { + "name": "Prod", + "type": "bool", + "format": "--prod", + "help": "Only audit dependencies and optionalDependencies." + }, + { + "name": "NoOptional", + "type": "bool", + "format": "--no-optional", + "help": "Don't audit optionalDependencies." + }, + { + "name": "Fix", + "type": "PnpmAuditFix", + "format": "--fix {value}", + "help": "Fix the audited vulnerabilities using the specified method: override or update." + }, + { + "name": "IgnoreRegistryErrors", + "type": "bool", + "format": "--ignore-registry-errors", + "help": "Use exit code 0 if the registry responds with an error. Useful in CI." + }, + { + "name": "IgnoreUnfixable", + "type": "bool", + "format": "--ignore-unfixable", + "help": "Ignore all vulnerabilities for which no fix exists." + }, + { + "name": "Json", + "type": "bool", + "format": "--json", + "help": "Output audit report in JSON format." + }, + { + "name": "Dir", + "type": "string", + "format": "--dir {value}", + "help": "Change to directory <dir>." + } + ] + } + } + ], + "enumerations": [ + { + "name": "PnpmLogLevel", + "values": [ + "debug", + "info", + "warn", + "error" + ] + }, + { + "name": "PnpmReporter", + "values": [ + "append-only", + "default", + "ndjson", + "silent" + ] + }, + { + "name": "PnpmPackageImportMethod", + "values": [ + "auto", + "clone", + "copy", + "hardlink" + ] + }, + { + "name": "PnpmPublishAccess", + "values": [ + "public", + "restricted" + ] + }, + { + "name": "PnpmAuditLevel", + "values": [ + "info", + "low", + "moderate", + "high", + "critical" + ] + }, + { + "name": "PnpmAuditFix", + "values": [ + "override", + "update" + ] + } + ] +} diff --git a/src/Fallout.Common/Tools/Pnpm/PnpmTasks.cs b/src/Fallout.Common/Tools/Pnpm/PnpmTasks.cs new file mode 100644 index 000000000..d5ceb0c1e --- /dev/null +++ b/src/Fallout.Common/Tools/Pnpm/PnpmTasks.cs @@ -0,0 +1,8 @@ +using Fallout.Common.Tooling; +using Serilog.Events; + +namespace Fallout.Common.Tools.Pnpm; + +[LogLevelPattern(LogEventLevel.Warning, "^(WARN|pnpm WARN)")] +[LogLevelPattern(LogEventLevel.Debug, "^(pnpm notice)")] +partial class PnpmTasks; diff --git a/tests/Fallout.Common.Specs/SettingsSpecs.cs b/tests/Fallout.Common.Specs/SettingsSpecs.cs index e656766dc..4e1b8d1e5 100644 --- a/tests/Fallout.Common.Specs/SettingsSpecs.cs +++ b/tests/Fallout.Common.Specs/SettingsSpecs.cs @@ -11,6 +11,7 @@ using Fallout.Common.Tools.Kubernetes; using Fallout.Common.Tools.MSBuild; using Fallout.Common.Tools.OpenCover; +using Fallout.Common.Tools.Pnpm; using Fallout.Common.Tools.Xunit; using Fallout.Common.Utilities; using FluentAssertions; @@ -192,6 +193,32 @@ public void TestKubernetes() "exec --container=container --cluster=cluster -- command arg1 arg2"); } + [Fact] + public void TestPnpm() + { + // Assert + Assert(new PnpmInstallSettings() + .EnableFrozenLockfile() + .EnableProduction() + .AddFilters("frontend", "backend"), + "install --frozen-lockfile --prod --filter frontend --filter backend"); + + Assert(new PnpmRunSettings() + .SetCommand("build") + .EnableRecursive() + .AddArguments("--watch"), + "run build --recursive -- --watch"); + + Assert(new PnpmCiSettings() + .SetDir("packages/app"), + "ci --dir packages/app"); + + Assert(new PnpmExecSettings() + .SetCommand("rimraf") + .AddArguments("dist"), + "exec rimraf dist"); + } + private static void Assert(T options, string expected) where T : ToolOptions, new() {