![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@clouden-cdk/aws-lambda-typescript
Advanced tools
Copyright (C) Clouden Oy 2019, author Kenneth Falck kennu@clouden.net.
Released under the MIT license.
This is a drop-in wrapper replacement for the AWS CDK Lambda Code asset object to add TypeScript support for Lambda Functions
When using this wrapper, the source asset path is first compiled as TypeScript and the results are saved in new deploy directory (.deploy), which is then deployed using the standard AWS CDK Lambda Code object.
npm install @clouden-cdk/aws-lambda-typescript
Use TypeScriptCode.asset('path/to/lambda-source-code') when creating a Lambda Function.
The path that you provide should include at least a package.json file and a tsconfig.json file.
import { Function } from '@aws-cdk/aws-lambda'
import { TypeScriptCode } from '@clouden-cdk/aws-lambda-typescript'
const lambdaFunction = new Function(this, 'TestFunction', {
functionName: 'test-function',
code: TypeScriptCode.asset('path/to/lambda-source-code')),
handler: 'handler.default',
runtime: lambda.Runtime.NODEJS_10_X,
})
Here is an example tsconfig.json file that we use in Clouden projects like webcat.fi:
{
"compilerOptions": {
"target":"ES2017",
"module": "commonjs",
"lib": ["es2016", "es2017.object", "es2017.string", "esnext.asynciterable"],
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"rootDir": "."
}
}
The TypeScript build involves two steps:
The end result of these steps is that the deploy path contains everything needed to deploy the Lambda function.
The TypeScriptCode object keeps track of build paths and only builds each path once per CDK invocation. It also keeps track of package.json and package-lock.json files and only runs npm install when they have changed, or when npm install has not yet been run.
FAQs
TypeScript Build Step for AWS CDK Lambda Functions
The npm package @clouden-cdk/aws-lambda-typescript receives a total of 2 weekly downloads. As such, @clouden-cdk/aws-lambda-typescript popularity was classified as not popular.
We found that @clouden-cdk/aws-lambda-typescript 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.