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

@almamedia-open-source/cdk-project-target

v0.0.10

Published

![CDK Version](https://img.shields.io/badge/CDK-v2-informational "CDK v2") ![Stability](https://img.shields.io/badge/Stability-Experimental-yellow "Stability: Experimental")

Downloads

1,734

Readme

Alma CDK Project Target

CDK Version Stability

Opinionated set of AWS Account & Application Environment configuration combinations and utilities to manage them for CDK Projects.

Important

🚧 This tool is work-in-progress and experimental!

All @almamedia-open-source/cdk- prefixed constructs/utilities are based on existing CDK constructs/utilities we've developed & used (in production) internally at Alma Media since 2019.

Breaking changes may occur at any given time without prior warning before first v1 major is released, as we rewrite them for CDK v2 and use this opportunity to also redesign & refactor.

Feedback is most welcome, but do note that we intend to implement these new constructs/utilities and their APIs in such manner that our existing CDK v1 production workloads can easily migrate into these new @almamedia-open-source/cdk- constructs/utilities.

Overview

TODO

Installation

  1. Ensure you meet following requirements:

  2. Install peer dependency @almamedia-open-source/cdk-project-context:

    npm i -D @almamedia-open-source/cdk-project-context
  3. Install this tool:

    npm i -D @almamedia-open-source/cdk-project-target

Usage

  1. Initialize your CDK App with Project construct as documented in @almamedia-open-source/cdk-project-context but also use one of the following methods of Accounts class:

    • Accounts.one
    • Accounts.two
    • Accounts.three
    // bin/app.ts
    import { Project } from '@almamedia-open-source/cdk-project-context';
    import { Accounts } from '@almamedia-open-source/cdk-project-target';
    
    // new Project instead of new App
    const project = new Project({
      name: 'my-cool-project',
      author: {
        organization: 'Acme Corp',
        name: 'Mad Scientists',
        email: '[email protected]',
      },
      defaultRegion: 'eu-west-1', // defaults to one of: $CDK_DEFAULT_REGION, $AWS_REGION or us-east-1
      accounts: Accounts.two({
        dev: {
          id: '111111111111',
          config: {
            baseDomain: 'example.net',
          },
        },
        prod: {
          id: '222222222222',
          config: {
            baseDomain: 'example.com',
          },
        },
      }),
    })
  2. TODO

Migration

This section only applies if you're an Alma Media employee who is migrating from our internal CDK v1 compatible constructs.

Account Context

Match ProjectContext (PC) casing:

-Ac
+AC

Methods follow the format used in ProjectContext (where there is overlap):

Account ID

-Ac.getId
+AC.getAccountId

Account Description

-Ac.getDescription

Account Base Domain

-Ac.getDomain

Account Type

-Ac.getType
+AC.getAccountType

Is Prod account type

-Ac.isProd
+AC.isProd

Is Dev account type

-Ac.isDev
+AC.isDev

Is PreProd account type

-Ac.isPreprod
+AC.isPreprod

not used

Is Shared account type

-Ac.isShared
+AC.isShared

Is Mock account type

TODO

Get Configuration

-Ac.getConfig(ths, 'path', defaultValue)
+AC.getAccountConfig(this, 'path', defaultValue) # TODO: Implement the lodash path in ProjectContext

Environment Context

Environment Name

-Ec.getName
+EC.getName

Environment URL/DNS compatible name

-Ec.getSubdomain   # foo-bar.feature
+EC.getUrlName     # feature-foo-bar

Environment Label (New)

+Ec.getLabel

Environment Type (Category)

-Ec.getType
+EC.getCategory

Return values:

mock
development
-preview
+feature
verification
stable

Environment Description

-Ec.getDescription

Environment Domain

Implemented in separate construct.

-Ec.getDomain

Preview (Feature) Environment Info

-Ec.getPreviewInfo
+EC.getFeatureInfo

Is Mock Environment

-Ec.isMock
+EC.isMock

Is Development Environment

-Ec.isDevelopment
+EC.isDevelopment

Is Preview (Feature) Environment

-Ec.isPreview
+EC.isFeature

Is Pre Environment

-Ec.isPre
+EC.isVerification

Is Stable Environment

-Ec.isStable
+EC.isStable

Stack Context

Removed completely: Use @almamedia-open-source/cdk-project-stack instead.