@halospv3/hce.shared-config
Version:
Automate commit message quality, changelogs, and CI/CD releases. Exports a semantic-release shareable configuration deserialized from this package's '.releaserc.yml'. Shared resources for .NET projects are also distributed with this package.
170 lines • 8.2 kB
TypeScript
import { CaseInsensitiveMap } from '../CaseInsensitiveMap.js';
import type { BaseClass, ClassLike } from '../utils/reflection.js';
/**
* Known properties. Additional properties may be added upon request.
*
* todo: add Reserved properties, Well-Known properties, Common properties, and more. Maybe as sub classes.
* See:
* - {@link https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-reserved-and-well-known-properties?view=vs-2022 MSBuild Reserved and Well-known Properties}
* - {@link https://learn.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-properties?view=vs-2022 Common MSBuild project properties}
* - {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props Microsoft.NET.Sdk}
* - {@link https://learn.microsoft.com/en-us/aspnet/core/razor-pages/web-sdk?view=aspnetcore-8.0&toc=%2Fdotnet%2Fnavigate%2Ftools-diagnostics%2Ftoc.json&bc=%2Fdotnet%2Fbreadcrumb%2Ftoc.json#properties Microsoft.NET.Sdk.Web}
* - {@link https://learn.microsoft.com/en-us/aspnet/core/razor-pages/sdk?view=aspnetcore-8.0&toc=%2Fdotnet%2Fnavigate%2Ftools-diagnostics%2Ftoc.json&bc=%2Fdotnet%2Fbreadcrumb%2Ftoc.json Microsoft.NET.Sdk.Razor}
* - {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props-desktop Microsoft.NET.Sdk.Desktop}
*/
export declare class MSBuildProjectProperties {
/**
* Resolve the given path if it is not absolute. If the path exists, it is returned. Else, an Error is thrown.
* @param path The full file path of an MSBuild project.
* @returns The absolute path to the MSBuild project file.
* @throws {Error} if the path cannot be resolved to an existing file.
*/
static GetFullPath(path: string): string;
/**
* Note: This method may remove elements from {@link properties}.\
* Try to get an element from {@link properties} by its {@link key}.
* If an element is found, it is removed and the value of the element is returned.
* Otherwise, `undefined` is returned.
* @param properties The CaseInsensitiveMap of properties passed to the constructor.
* @param key The key of the property to get from {@link properties}
* @returns If found, the value of the `[string, string]` tuple found in {@link properties}. Else, `undefined`.
*/
protected static getAndForget(properties: CaseInsensitiveMap<string, string>, key: string): string | undefined;
private _msbuildProjectFullPath;
private _assemblyName;
private _baseIntermediateOutputPath;
private _baseOutputPath;
private _description;
private _intermediateOutputPath;
private _outDir;
private _outputPath;
private _runtimeIdentifier;
private _runtimeIdentifiers;
private _targetFramework;
private _targetFrameworks;
private _version;
private _versionPrefix;
private _versionSuffix;
constructor(msbuildProjectFullPath: string, properties: CaseInsensitiveMap<string, string>);
get MSBuildProjectFullPath(): string;
/**
* @returns The name of the assembly.
*
* Default: {@link https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-reserved-and-well-known-properties#:~:text=MSBuildProjectDirectory,-Reserved MSBuildProjectDirectory}
*/
get AssemblyName(): string;
/**
* @returns The top-level folder where all configuration-specific intermediate output
* folders are created. The default value is `obj\`.
* @example
* ```xml
* <BaseIntermediateOutputPath>c:\xyz\obj\</BaseIntermediateOutputPath>
* ```
*/
get BaseIntermediateOutputPath(): string;
/**
* @returns The base path for the output file.
* If it's set, MSBuild uses `OutputPath = $(BaseOutputPath)\$(Configuration)\`.
* @example ```xml
* <BaseOutputPath>c:\xyz\bin\</BaseOutputPath>
* ```
*/
get BaseOutputPath(): string;
/**
* A long description for the assembly.
* If {@link NugetProperties.PackageDescription} is not specified, then this property is also used as the description of the package.
* @returns The value of the `Description` property.
*/
get Description(): string;
/**
* @returns The full intermediate output path as derived from
* {@link BaseIntermediateOutputPath}, if no path is specified.
* @example "obj\\debug\\"
*/
get IntermediateOutput(): string;
/**
* @returns The final output location for the project or solution.
* When you build a solution, OutDir can be used to gather multiple project outputs in one location.
* In addition, OutDir is included in AssemblySearchPaths used for resolving references.
* @example
* `bin/Debug`
*/
get OutDir(): string;
/**
* @returns The path to the output directory, relative to the project
* directory.
* @example
* `bin/Debug`
* /// non-AnyCPU builds
* `bin/Debug/${Platform}`
*/
get OutputPath(): string;
/**
* Set Version -OR- VersionPrefix.
* @returns The value of the `Version` property.
*
* Default: `"1.0.0"`
*/
get Version(): string;
/**
* Set Version -OR- VersionPrefix.\
* Setting {@link NugetProperties.PackageVersion} overwrites {@link VersionPrefix}
* @returns The MAJOR.MINOR.PATCH string of the version.
* @see {@link VersionSuffix}
*/
get VersionPrefix(): string;
/**
* The effect of this property on the package version depends on the values of the Version and VersionPrefix properties, as shown in the following table:
* | Properties with values | Package version |
* | ---------------------- | --------------- |
* | None | 1.0.0 |
* | Version | $(Version) |
* | VersionPrefix only | $(VersionPrefix) |
* | VersionSuffix only | 1.0.0-$(VersionSuffix) |
* | VersionPrefix and VersionSuffix | $(VersionPrefix)-$(VersionSuffix) |
* \
* Setting {@link PackageVersion} overwrites {@link VersionSuffix}
* @returns The string appended to the end of the MAJOR.MINOR.PATCH semver string (i.e. {@link VersionPrefix})
*/
get VersionSuffix(): string;
/**
* @returns The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#targetframework Target Framework}
* @see
* https://learn.microsoft.com/en-us/nuget/reference/target-frameworks#supported-frameworks
* https://learn.microsoft.com/en-us/dotnet/standard/frameworks
*/
get TargetFramework(): string;
/**
* @returns The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#targetframeworks Target Frameworks} (plural)
* @see
* https://learn.microsoft.com/en-us/nuget/reference/target-frameworks#supported-frameworks
* https://learn.microsoft.com/en-us/dotnet/standard/frameworks
*/
get TargetFrameworks(): string;
/**
* @returns
* > The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#runtimeidentifier `Runtime Identifier`} property lets you specify a single runtime
* > identifier (RID) for the project. The RID enables publishing a
* > self-contained deployment.
* @see
* https://learn.microsoft.com/en-us/dotnet/core/rid-catalog
*/
get RuntimeIdentifier(): string;
/**
* @returns
* > The {@link https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#runtimeidentifiers `RuntimeIdentifiers`} property lets you specify a
* > semicolon-delimited list of runtime identifiers (RIDs) for the project.
* > Use this property if you need to publish for multiple runtimes.
* > `RuntimeIdentifiers` is used at restore time to ensure the right assets
* > are in the graph.
* @see
* https://learn.microsoft.com/en-us/dotnet/core/rid-catalog
*/
get RuntimeIdentifiers(): string;
}
export type Class_MSBPP = ClassLike<BaseClass<typeof MSBuildProjectProperties & {
getAndForget: ProtectedMember<typeof MSBuildProjectProperties.getAndForget>;
}>>;
type ProtectedMember<T> = T;
export {};
//# sourceMappingURL=MSBuildProjectProperties.d.ts.map