Skip to content

Repository

Source: src/AWS/CodeArtifact/Repository.ts

An AWS CodeArtifact repository — a package store inside a Domain. Repositories host packages (npm, PyPI, Maven, NuGet, etc.) and can chain to upstream repositories and a single external connection to a public registry.

Basic Repository

const domain = yield* CodeArtifact.Domain("packages", {});
const repo = yield* CodeArtifact.Repository("npm-store", {
domain: domain.domainName,
});

Repository with an external connection to npmjs

const repo = yield* CodeArtifact.Repository("npm-store", {
domain: domain.domainName,
description: "Proxy of the public npm registry",
externalConnection: "public:npmjs",
});

Repository with an upstream

const shared = yield* CodeArtifact.Repository("shared", {
domain: domain.domainName,
});
const app = yield* CodeArtifact.Repository("app", {
domain: domain.domainName,
upstreams: [shared.repositoryName],
});