string FileName { get; }
Source
Gets the Tailwind executable or shell launcher that failed to start.
Describes the executable and ordered argument list used to launch Tailwind.
FileNameThe executable or launcher to start.ArgumentsThe complete ordered argument list passed to FileName.Maps build hosts to Tailwind runtime identifiers and binary names.
string GetCurrentRid(Func<OSPlatform, bool>? isOsPlatform = null, Func<Architecture>? processArchitecture = null)
Source
Resolves the Tailwind runtime identifier for the current build host.
isOsPlatformOptional platform predicate for tests; defaults to RuntimeInformation.IsOSPlatform.processArchitectureOptional architecture provider for tests; defaults to RuntimeInformation.ProcessArchitecture.A supported Tailwind RID such as win-x64, linux-arm64, or osx-arm64; otherwise unknown when the platform or architecture is not mapped. This method does not throw for unsupported hosts.
string ResolveRid(OSPlatform osPlatform, Architecture architecture)
Source
Maps an operating system and processor architecture pair to the Tailwind runtime package RID.
osPlatformThe detected or test-supplied operating system platform.architectureThe detected or test-supplied process architecture.A supported Tailwind RID such as win-x64, linux-x64, linux-arm64, osx-x64, or osx-arm64; otherwise unknown for unsupported combinations.
Windows Arm64 intentionally maps to win-x64 because Tailwind does not publish a Windows Arm64 standalone binary for the pinned version. That relies on Windows x64 emulation; callers that cannot use emulation should provide an explicit CLI path instead of a packaged runtime.
string? GetRuntimeBinaryName(string rid)
Source
Gets the packaged Tailwind binary file name for a supported runtime identifier.
ridThe Tailwind runtime identifier, such as win-x64, osx-arm64, osx-x64, linux-arm64, or linux-x64.The runtime package binary file name for rid, or null when no mapping exists. Unknown RIDs do not throw so callers can emit stable diagnostics.
string GetLocalBinaryName(Func<OSPlatform, bool>? isOsPlatform = null)
Source
Gets the conventional project-local Tailwind executable name for the current platform.
isOsPlatformOptional platform predicate for tests; defaults to RuntimeInformation.IsOSPlatform.tailwindcss.exe on Windows and tailwindcss on non-Windows hosts.
This helper is used only for project-local fallback probing. Package runtime probing should use GetRuntimeBinaryName because packaged binaries include platform-specific suffixes.
Builds process invocations for Tailwind CLI binaries and Windows shell shims.
npm-installed Tailwind commands on Windows may be .cmd, .bat, or .ps1 wrapper scripts instead of native executables. Use this builder after resolving a concrete Tailwind path so callers get the platform-specific launcher and argument order without duplicating shell rules. Pass unquoted paths and arguments; CliWrap performs process argument escaping when the invocation is executed.
TailwindProcessInvocation Build(string tailwindPath, IReadOnlyList<string> tailwindArgs, Func<OSPlatform, bool>? isOsPlatform = null)
Source
Creates the process filename and argument list needed to launch Tailwind on the current platform.
tailwindPathThe resolved Tailwind executable or known Windows shim path. The value must be non-empty and should not be quoted.tailwindArgsThe ordered Tailwind arguments to append after any shell-wrapper arguments.isOsPlatformOptional platform predicate used by tests; defaults to RuntimeInformation.IsOSPlatform.A TailwindProcessInvocation that invokes binaries directly on Unix-like platforms and wraps .cmd/.bat/.ps1 scripts on Windows.
ArgumentExceptionThrown when tailwindPath is blank.ArgumentNullExceptionThrown when tailwindPath or tailwindArgs is null.Classifies Tailwind standard-error output for host-specific logging.
Defines stable Tailwind build diagnostic codes and help text.
string Format(string code, string problem, string cause, string fix)
Source
Formats a stable Tailwind diagnostic message.
codeThe ASTW### diagnostic code.problemA short description of what failed.causeThe likely cause to show after the Cause: label.fixThe recommended action to show after the Fix: label.A single-line diagnostic containing the code, problem, cause, fix, and HelpUrl reference. Inputs are expected to be non-empty caller-supplied message fragments.
Represents the completed result of a Tailwind CLI process.
ExitCodeThe process exit code returned by the Tailwind CLI.StdoutThe captured standard-output tail, bounded by the caller's capture limit.StderrThe captured standard-error tail, bounded by the caller's capture limit.Represents a Tailwind process startup failure.
string FileName { get; }
Source
Gets the Tailwind executable or shell launcher that failed to start.
Executes Tailwind CLI processes with bounded output capture.
Task<TailwindCommandResult> ExecuteAsync(string fileName, IReadOnlyList<string> args, string workingDirectory, Action<string>? stdoutLine, Action<string, TailwindOutputLevel>? stderrLine, int captureLimit, CancellationToken cancellationToken)
Source
Executes a Tailwind process, streams complete stdout and stderr lines, and captures bounded output tails.
fileNameThe executable or shell launcher to start.argsThe ordered process arguments. Values should be unquoted; CliWrap handles escaping.workingDirectoryThe process working directory used for relative Tailwind paths.stdoutLineOptional callback invoked for each complete stdout line.stderrLineOptional callback invoked for each complete stderr line with its classified severity.captureLimitMaximum characters retained from stdout and stderr independently; 0 disables capture.cancellationTokenCancellation token that terminates the child process when canceled.The process exit code plus captured stdout and stderr tails. Callbacks may receive more output than is retained in the result when the process writes more than captureLimit characters.
OperationCanceledExceptionThrown when cancellationToken is canceled.TailwindProcessStartExceptionThrown when the operating system or CliWrap cannot start the process.Represents the host-neutral severity used for Tailwind CLI output.
Resolves the shared Tailwind standalone CLI download cache used by source-tree runtime builds.
string? GetDefaultRoot(Func<string, string?>? getEnvironmentVariable = null)
Source
Gets the default shared cache root for the current user.
getEnvironmentVariableOptional environment lookup used by tests.A user-level cache directory when one can be derived from the environment; otherwise null.
Source-tree runtime projects download Tailwind executables before they are packed into runtime packages. Keeping that cache under a user-level location avoids one full copy per Git worktree while still allowing callers to override the root through MSBuild's TailwindDownloadCacheRoot property.
string GetRuntimeBinaryPath(string cacheRoot, string tailwindVersion, string rid, string runtimeBinaryName)
Source
Gets the cached runtime binary path for a Tailwind version and host runtime identifier.
cacheRootThe configured or default cache root.tailwindVersionThe Tailwind standalone CLI version.ridThe Tailwind runtime identifier.runtimeBinaryNameThe RID-specific standalone binary file name.The expected cache path for the binary.