jsii-release
Version:
Release jsii modules to multiple package managers
70 lines (69 loc) • 2.33 kB
TypeScript
import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
export interface CodeArtifactRepoOptions {
readonly credentials?: AwsCredentialIdentityProvider;
}
/**
* A CodeArtifact repository
*/
export declare class CodeArtifactRepo {
readonly repositoryName: string;
static readonly DEFAULT_DOMAIN = "publib-ca";
/**
* Create a CodeArtifact repo with a random name
*/
static createRandom(options?: CodeArtifactRepoOptions): Promise<CodeArtifactRepo>;
/**
* Create a CodeArtifact repository with a given name
*/
static createWithName(name: string, options?: CodeArtifactRepoOptions): Promise<CodeArtifactRepo>;
/**
* Reference an existing CodeArtifact repository
*/
static existing(repositoryName: string, options?: CodeArtifactRepoOptions): CodeArtifactRepo;
/**
* Garbage collect repositories
*/
static gc(options?: CodeArtifactRepoOptions): Promise<void>;
readonly npmUpstream = "npm-upstream";
readonly pypiUpstream = "pypi-upstream";
readonly nugetUpstream = "nuget-upstream";
readonly mavenUpstream = "maven-upstream";
readonly domain = "publib-ca";
private readonly codeArtifact;
private _loginInformation;
private readonly send;
private constructor();
/**
* Create the repository
*/
create(): Promise<void>;
/**
* Absorb old login information
*/
setLoginInformation(loginInfo: LoginInformation): void;
login(): Promise<LoginInformation>;
delete(): Promise<void>;
/**
* List all packages and mark them as "allow upstream versions".
*
* If we don't do this and we publish `foo@2.3.4-rc.0`, then we can't
* download `foo@2.3.0` anymore because by default CodeArtifact will
* block different versions from the same package.
*/
markAllUpstreamAllow(): Promise<void>;
private ensureDomain;
private ensureUpstreams;
private ensureRepository;
private domainExists;
private repositoryExists;
private listPackages;
}
export interface LoginInformation {
readonly authToken: string;
readonly expirationTimeMs: number;
readonly repositoryName: string;
readonly npmEndpoint: string;
readonly mavenEndpoint: string;
readonly nugetEndpoint: string;
readonly pypiEndpoint: string;
}