@halospv3/hce.shared-config
Version:
Automate commit message quality, changelogs, and CI/CD releases. Its `main` entry point is a Semantic Release config. Functions and classes are exposed for customization. An ESLint config, a Commitlint config, and addl. resources for .NET projects are als
64 lines • 3.35 kB
text/typescript
import { NugetProjectProperties } from "./NugetProjectProperties.mjs";
import { MSBuildEvaluationOutput, MSBuildProject } from "./MSBuildProject.mjs";
import { NugetRegistryInfo } from "./NugetRegistryInfo.mjs";
import { Out, Type } from "arktype";
import { Default } from "arktype/internal/attributes.ts";
//#region src/dotnet/GitlabNugetRegistryInfo.d.ts
declare class GitlabNugetRegistryInfo extends NugetRegistryInfo {
static readonly DefaultGitlabTokenEnvVars: readonly ["GL_TOKEN", "GITLAB_TOKEN", "CI_JOB_TOKEN"];
/**
* The GitLab API v4 root URL.
* @returns The value of the environment variable `CI_API_V4_URL`.
* If that's `undefined`, 'https://gitlab.com/api/v4' is returned, instead.
*/
static get CI_API_V4_URL(): string;
/**
* CI_PROJECT_ID - If you want to publish to your GitLab server, this needs to be set to the Id of the project you want to publish to. When running in GitLab CI this is already set to the project the pipeline runs in by GitLab.
* This method checks the contents of your `.env` file, if present.
* @returns The value of the environment variable `CI_PROJECT_ID` or `undefined`.
* @todo add URI encoded project pathname as alternative e.g. 'halospv3%2FHCE.Shared' in 'https://gitlab.com/api/v4/projects/halospv3%2FHCE.Shared'
*/
static get projectId(): string | undefined;
/**
* CI_PROJECT_NAMESPACE_ID
* This method checks the contents of your `.env` file, if present.
* @returns The value of the environment variable 'CI_PROJECT_NAMESPACE_ID' or `undefined`.
*/
static get ownerId(): string | undefined;
/**
* Get the GitLab Nuget API for your project url as seen in https://docs.gitlab.com/ee/user/packages/nuget_repository/index.html#publish-a-nuget-package-by-using-cicd
* ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json
* @returns If {@link this.projectId} is a string, a string formatted like
* `${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json`.
* Else, {@link Error}.
*/
static get projectUrl(): string | Error;
/**
* ${CI_API_V4_URL}/groups/${CI_PROJECT_NAMESPACE_ID}/-/packages/nuget/index.json
* @returns If {@link ownerId} is a string, then a string formatted like
* `${CI_API_V4_URL}/groups/${CI_PROJECT_NAMESPACE_ID}/-/packages/nuget/index.json`.
* Else, {@link Error}.
*/
static get groupUrl(): string | Error;
/**
* Creates an instance of GitlabNugetRegistryInfo.
* @param opts The input type of {@link GLNRIOpts.from}
*/
constructor(opts: typeof GLNRIOpts.inferIn);
}
/**
* The Arktype definition for {@link GitlabNugetRegistryInfo}'s constructor parameter. Construct an object of this type by calling {@link GLNRIOpts.from}
*/
declare const GLNRIOpts: Type<{
project: MSBuildProject | {
readonly Items: Readonly<Required<MSBuildEvaluationOutput>["Items"]>;
readonly Properties: Readonly<NugetProjectProperties>;
readonly Targets: readonly string[];
readonly TargetResults: Required<MSBuildEvaluationOutput>["TargetResults"][];
};
tokenEnvVars: Default<readonly string[], readonly ["GL_TOKEN", "GITLAB_TOKEN", "CI_JOB_TOKEN"]>;
source: (In: Default<string | Error, string | Error>) => Out<string | Error>;
}>;
//#endregion
export { GLNRIOpts, GitlabNugetRegistryInfo };
//# sourceMappingURL=GitlabNugetRegistryInfo.d.mts.map