![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
aws-cdk-web
Advanced tools
:muscle: AWS CDK compiled for web (and Node!)
cdk-web and aws-cdk-web are functionally identical packages on
npm
. read about the differences below.
usage | docs | building | testing | types | docs |
---|
npm
npm install --save cdk-web aws-sdk
unpkg
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1000.0.min.js"></script>
<script src="https://unpkg.com/cdk-web"></script>
jsdelivr
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1000.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/cdk-web@latest/dist/cdk-web.min.js"></script>
const CDK = require("cdk-web");
const cdk = CDK.require("aws-cdk-lib");
const ec2 = CDK.require("aws-cdk-lib/aws-ec2");
const sqs = CDK.require("aws-cdk-lib/aws-sqs");
const sns = CDK.require("aws-cdk-lib/aws-sns");
const s3 = CDK.require("aws-cdk-lib/aws-s3");
const app = new cdk.App();
const stack = new cdk.Stack(app, "BrowserStack");
const vpc = new ec2.Vpc(stack, "VPC");
const queue = new sqs.Queue(stack, "Queue");
const topic = new sns.Topic(stack, "Topic");
const bucket = new s3.Bucket(stack, "Bucket");
const assembly = await app.synth();
console.log(assembly);
cdk-web
vs cdk
cdk-web
runs much faster than CDK thanks to it being entirely in-memory (better performance:)cdk-web
is a symmetrical package that works both in Node and browsers (source code reuse + portability)cdk-web
is arguably securer than CDK, again thanks to it being entirely in-memory (no artifacts left on disk)cdk-web
weighs a whopping 200MB less than CDK (ideal for AWS Lambda like environments where size is a of essence)cdk-web
does not have a dependency on any NPM packages (faster installs for enterprise users behind Artifactory, etc.)cdk-web
allows you to Bring Your Own AWS SDK bundle (customized AWS SDK bundles compatibility - org governance)npm run build
builds cdk-web. everything is bundled in dist/cdk-web.js
.
you may open up dist/index.html
in your browser if you want to just play with the compiled bundle.
you can build a dev bundle verbosely with DEBUG='CdkWeb*'
and CDK_WEB_DEBUG=1
environment variables set.
testing is done by Puppeteer. the actual generated bundle is loaded into Puppeteer and tests are executed against it.
run npm test
to execute them. tests are executed twice: once in Puppeteer vs. native CDK as ground truth, and once in
NodeJS to make sure the final bundle is also usable and sane in NodeJS-like environments. Coverage is also collected in
NodeJS mode solely due to the fact that currently the toolchain does not have sufficient support to collect coverage in
Puppeteer (which would be ideal). Although, NodeJS coverage is a good estimate of where everything is at.
cdk-web
ships with a single .d.ts
file that gives you the same typings as the native cdk. to get it to work, check
out docs/types.md. typings for aws-cdk-lib
and constructs
are bundled as well.
cdk-web
vs aws-cdk-web
The two packages are identical, mirrored, and released to at the same time.
You may use the other mirror if you are behind a corporate proxy and your
NPM packages go through a third-party repository such as Artifactory. The mirror does not list any packages as
devDependencies in its package.json. This prevents cdk-web
to be incorrectly flagged as vulnerable due to its outdated
devDependencies. cdk-web
is a compiled project. Its compiler and toolchain being outdated does not impact its runtime.
It's all client side JavaScript anyway. The mirror is only provided for your convenience.
FAQs
AWS CDK compiled for web (and Node!)
The npm package aws-cdk-web receives a total of 9 weekly downloads. As such, aws-cdk-web popularity was classified as not popular.
We found that aws-cdk-web demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.