npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cdk-codeartifact

v1.0.4

Published

This is an AWS CDK Construct to create a new AWS Codeartifact Domain and one or more Repositories

Downloads

1,833

Readme

cdk-codeartifact

CDK Construct to create an AWS Codeartifact repository. Construct combines creating both Domain and one or more Repositories into one construct and also provides an enumerated type for public external connections.

There are some additional validations built-in to ensure the construct will deploy correctly:

  • Naming convention checks for Codeartifact Domain Name.
  • Naming convention checks for Codeartifact Repository Name.
  • Passing in more than 1 external repository will throw an error - only 1 external repository is supported by Codeartifact.

Breaking Changes - Migrating to V1.0.0

Release 1.0.0 introduces breaking changes so any project you have created using pre-1.0.0 of cdk-codeartifact should not be upgraded to this version.

Migrating to Version 1.0.0 will require any existing stacks to be removed before upgrading. The Cloudformation composition synthesized in V1.0.0 has a different composition, which means that Cloudformation will detect a change in how the stack is constructed and will try to delete the existing CodeArtifact domain and/or repositories. This will not be possible if any artifacts have been pushed into the repositories.

The original CodeArtifact construct class has been deprecated and is replaced by the Domain class which better reflects what this code construct is doing. For convenience, a Repository class has been added so that a stand-alone repository can also be created using this library. The Repository class is a simple extension of the CfnRepository class at this stage without any additional functionality.

All Interface Property structures have been renamed to start with a capital "I" to conform to the usual dotnet convention for interface naming, this will assist when cross-compilation is enabled for this construct.

External Connection Type

When adding an External Connection to your CodeArtifact repository ensure to make use of the ExternalRepository type to define the public external repository comnnection.

export enum ExternalRepository {
  NPM = 'public:npmjs',
  PYPI = 'public:pypi',
  MAVEN_CENTRAL = 'public:msven-central',
  MAVEN_GOOGLE_ANDROID = 'public:maven-googleandroid',
  MAVEN_GRADLE_PLUGINS = 'public:maven-gradleplugins',
  MAVEN_COMMONSWARE = 'public:maven-commonsware',
  NUGET = 'public:nuget-org'
}

Currently this construct has been published as an NPM package.

Installation and Usage

Typescript

Installation

$ npm install --save cdk-codeartifact

Usage for CDK V2

import { App, Stack, StackProps } from 'aws-cdk-lib';
import { Domain, ExternalRepository } from 'cdk-codeartifact';
import { Construct } from 'constructs';

export class MyStack extends Stack {
  constructor(scope: Construct, id: string, props: StackProps = {}) {
    super(scope, id, props);

    new Domain(this, id, {
      domainName: 'test-domain',
      repositories: [{
        repositoryName: 'test-repo',
        externalConnections: [ExternalRepository.NPM],
      },
      {
        repositoryName: 'test-repo2',
        externalConnections: [ExternalRepository.PYPI],
      }],
    });
  }
}