Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@almamedia-open-source/cdk-project-target
Advanced tools
![CDK Version](https://img.shields.io/badge/CDK-v2-informational "CDK v2") ![Stability](https://img.shields.io/badge/Stability-Experimental-yellow "Stability: Experimental")
Opinionated set of AWS Account & Application Environment configuration combinations and utilities to manage them for CDK Projects.
🚧 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.
TODO
Ensure you meet following requirements:
v14.17.6
or newerv2.0.0
or newerInstall peer dependency @almamedia-open-source/cdk-project-context
:
npm i -D @almamedia-open-source/cdk-project-context
Install this tool:
npm i -D @almamedia-open-source/cdk-project-target
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: 'mad.scientists@acme.example.com',
},
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',
},
},
}),
})
TODO
This section only applies if you're an Alma Media employee who is migrating from our internal CDK v1 compatible constructs.
Match ProjectContext
(PC
) casing:
-Ac
+AC
Methods follow the format used in ProjectContext
(where there is overlap):
-Ac.getId
+AC.getAccountId
-Ac.getDescription
-Ac.getDomain
-Ac.getType
+AC.getAccountType
-Ac.isProd
+AC.isProd
-Ac.isDev
+AC.isDev
-Ac.isPreprod
+AC.isPreprod
not used
-Ac.isShared
+AC.isShared
TODO
-Ac.getConfig(ths, 'path', defaultValue)
+AC.getAccountConfig(this, 'path', defaultValue) # TODO: Implement the lodash path in ProjectContext
-Ec.getName
+EC.getName
-Ec.getSubdomain # foo-bar.feature
+EC.getUrlName # feature-foo-bar
+Ec.getLabel
-Ec.getType
+EC.getCategory
Return values:
mock
development
-preview
+feature
verification
stable
-Ec.getDescription
Implemented in separate construct.
-Ec.getDomain
-Ec.getPreviewInfo
+EC.getFeatureInfo
-Ec.isMock
+EC.isMock
-Ec.isDevelopment
+EC.isDevelopment
-Ec.isPreview
+EC.isFeature
-Ec.isPre
+EC.isVerification
-Ec.isStable
+EC.isStable
Removed completely: Use @almamedia-open-source/cdk-project-stack
instead.
FAQs
![CDK Version](https://img.shields.io/badge/CDK-v2-informational "CDK v2") ![Stability](https://img.shields.io/badge/Stability-Experimental-yellow "Stability: Experimental")
The npm package @almamedia-open-source/cdk-project-target receives a total of 292 weekly downloads. As such, @almamedia-open-source/cdk-project-target popularity was classified as not popular.
We found that @almamedia-open-source/cdk-project-target demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.