@ashishpandeyone/cdk-lambda-web-function 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.jsii CHANGED
@@ -9745,7 +9745,7 @@
9745
9745
  },
9746
9746
  "name": "@ashishpandeyone/cdk-lambda-web-function",
9747
9747
  "readme": {
9748
- "markdown": "# CDK constructs for AWS Lambda Web Functions\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n[AWS Lambda Web Functions](https://aws.amazon.com/lambda/) run an ordinary Node.js HTTP server (Express, Fastify, Hono, `node:http`) on Lambda and give it an HTTPS endpoint, optionally served from several regions. `WebFunction` deploys one, following the conventions of `aws-cdk-lib/aws-lambda` where the two services overlap.\n\n```ts fixture=bare\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\nimport { WebFunction, WebFunctionAuthType, WebFunctionEndpointType } from '@ashishpandeyone/cdk-lambda-web-function';\n\nconst fn = new WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('dist'),\n authType: WebFunctionAuthType.AWS_IAM,\n endpoint: {\n endpointType: WebFunctionEndpointType.MULTI_REGION,\n regions: ['us-east-1', 'eu-west-1'],\n },\n});\n\nnew CfnOutput(this, 'Url', { value: fn.endpoint.url }); // https://<id>.lambda-web.global.on.aws\n```\n\nThe stack's region is the function's **home region**. Multi-region endpoints need a stack with an explicit `env.region`.\n\n## Writing the server\n\n1. Listen on the host and port in **`AWS_LAMBDA_HTTP_ENDPOINT`** (`0.0.0.0:3000` today). `PORT` is not set.\n2. Start listening within **about 9 seconds**, or initialisation fails with `Application.TimeoutListenError`.\n3. Put the entry file at the root of your bundle as **`index.js`**, or set `entrypoint`.\n4. The runtime has **no AWS SDK**: bundle the clients you import.\n5. Code runs on **arm64**.\n\n```js\nconst express = require('express');\n\nconst app = express();\napp.get('/', (req, res) => res.json({ hello: 'world', region: process.env.AWS_REGION }));\n\nconst [host, port] = process.env.AWS_LAMBDA_HTTP_ENDPOINT.split(':');\napp.listen(Number(port), host);\n```\n\nRequests carry `lambda-web-request-id` and `lambda-web-endpoint-name` headers.\n\n## Regions and endpoints\n\nEach `WebFunction` has one endpoint, `fn.endpoint`:\n\n| `endpointType` | URL | Routing |\n|---|---|---|\n| `HOME_REGION` (default) | `https://<id>.<cell>.lambda-web.<home>.on.aws` | home region only |\n| `MULTI_REGION` | one global `https://<id>.lambda-web.global.on.aws` | nearest region |\n| `PER_REGION` | one URL per region, from `fn.endpoint.regionalUrl(region)` | the region in the hostname |\n\n```ts\nconst perRegion = new WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('dist'),\n authType: WebFunctionAuthType.AWS_IAM,\n endpoint: {\n endpointType: WebFunctionEndpointType.PER_REGION,\n regions: ['us-east-1', 'eu-west-1'],\n },\n});\n\nnew CfnOutput(this, 'UsEast1Url', { value: perRegion.endpoint.regionalUrl('us-east-1') });\n// perRegion.endpoint.regions is ['<home region>', 'eu-west-1', 'us-east-1']\n```\n\n- `MULTI_REGION` and `PER_REGION` need at least one region besides the home region; `HOME_REGION` takes none.\n- A MultiRegion endpoint takes about a minute to create.\n\n### Changing regions or the endpoint type\n\nAn endpoint's type and regions can't change in place: a change creates a **new endpoint with a new URL**, and the old one is deleted once the new one is live. Two endpoints of one function can't share a name, so:\n\n| `endpointName` | Physical name | Changing `regions` or `endpointType` |\n|---|---|---|\n| omitted (recommended) | `default-<hash of type and regions>` | works: new endpoint, new URL |\n| set, e.g. `'live'` | `live` | also change the name in the same deployment, or it fails with *The endpoint live already exists* (the stack rolls back and the old endpoint keeps serving) |\n\nThe construct warns at synth time when `endpointName` is set.\n\n## Authentication and invoking\n\n| `authType` | Meaning |\n|---|---|\n| `AWS_IAM` | Callers sign requests (SigV4 or SigV4a, signing name `lambda`) and need `lambda:InvokeWebFunctionEndpoint` |\n| `NONE` | **Public**: Lambda does no authentication; your application does (JWT, sessions). The `Authorization` header reaches your application untouched. The construct warns at synth time |\n\n```ts\nfn.grants.invoke(consumerRole); // or fn.grantInvoke(consumerRole), as on lambda.Function\n```\n\nThe grant is on the endpoint's home-region ARN, which IAM evaluates in every region the endpoint serves from, including the global URL.\n\n| Endpoint | How to sign |\n|---|---|\n| `HOME_REGION` | SigV4 for the home region |\n| `PER_REGION` | SigV4 for the hostname's region, or SigV4a |\n| `MULTI_REGION` | **SigV4a with region set `*`**: you can't know which region will serve the request |\n\n```js\nimport { SignatureV4a } from '@smithy/signature-v4a';\nimport { Sha256 } from '@aws-crypto/sha256-js';\nimport { fromNodeProviderChain } from '@aws-sdk/credential-providers';\n\nconst signer = new SignatureV4a({ service: 'lambda', region: '*', sha256: Sha256, credentials: fromNodeProviderChain() });\nconst signed = await signer.sign(\n { method: 'GET', protocol: 'https:', hostname: host, path: '/', headers: { host } },\n { signingRegion: '*' },\n);\nconst response = await fetch(`https://${host}/`, { headers: signed.headers });\n```\n\n## Configuration\n\n```ts\nconst api = new WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('build'),\n authType: WebFunctionAuthType.AWS_IAM,\n entrypoint: 'server.js', // default index.js\n webFunctionName: 'orders-api', // default: generated from the construct path\n description: 'Orders HTTP API',\n environment: { TABLE_NAME: table.tableName },\n timeout: Duration.seconds(60), // per request: 3 seconds to 15 minutes, default 30 seconds\n maxConcurrencyPerEnvironment: 32, // requests per environment at once: 1-128, default 64\n});\n\napi.addEnvironment('FEATURE_FLAG', 'on');\ntable.grantReadWriteData(api); // the default role trusts lambda.amazonaws.com\n```\n\n- Requests handled by one environment share module-level state, so keep handlers concurrency-safe.\n- Environment variable names starting with `AWS_` are reserved.\n- **Renaming the function replaces it and changes its URL.** A generated name depends on the construct path, so moving the construct renames it too.\n\n### Code\n\n`code` takes any `lambda.Code` that produces a zip in S3: `fromAsset`, `fromBucket`/`fromBucketV2`, `fromCustomCommand`, `fromDockerBuild`. Inline code and container images fail at synth time.\n\nLambda Web Functions download code as the `lambda.amazonaws.com` service principal, from a **versioned** bucket, and the CDK bootstrap bucket allows neither. So each stack gets a small code bucket, and the code is copied into it on deploy.\n\n### Updates\n\nAny change to code or configuration creates a new **revision**. The endpoint switches to it once it's ready, and the old revision is deleted after the deployment succeeds; a failed deployment rolls back to it. If nothing changed, nothing is deployed.\n\n## Logs in every region\n\nWeb Functions log in two tiers:\n\n```text\n every serving region home region\n ┌──────────────────┐ ┌──────────────────────────────────────────┐\n │ <group>.local │── copied ───►│ <group> every region's logs │\n │ (that region's │ (seconds) │ streams …[rev]<instance>-<acct>-<region> │\n │ environments) │ │ <group>.local (home-region traffic) │\n └──────────────────┘ └──────────────────────────────────────────┘\n```\n\n**Query `fn.logGroup`**, the home-region group that receives every region's logs. The service would create missing groups without retention and never delete them, so the construct creates and owns all of them: both home-region groups, and `<group>.local` in every other region of the endpoint.\n\n```ts\nnew WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('dist'),\n authType: WebFunctionAuthType.AWS_IAM,\n logRetention: logs.RetentionDays.THREE_MONTHS, // default ONE_MONTH, every group in every region\n logRemovalPolicy: RemovalPolicy.DESTROY, // default RETAIN\n applicationLogLevelV2: lambda.ApplicationLogLevel.WARN,\n systemLogLevelV2: lambda.SystemLogLevel.INFO, // DEBUG, INFO or WARN\n});\n```\n\n- The default group is `/aws/lambda/web/<function name>`. Log lines are JSON; application lines carry `requestId`, `endpointName` and `region`.\n- Every event is stored twice (`.local` plus the home-region copy), so expect about double log ingestion, plus cross-region transfer.\n- With `DESTROY`, deletion waits about a minute after the function is gone, because environments flush their last lines late.\n- Subscribe only to `fn.logGroup`: subscribing to the `.local` groups as well delivers every event twice.\n\n## Limitations\n\n- One endpoint per function; no traffic splitting between revisions.\n- Not yet supported: importing existing functions, VPC access (network connectors), resource-policy permissions, KMS encryption, metrics helpers, tracing, and a CloudFront origin.\n- `cdk deploy --hotswap` and `cdk watch` don't support Web Functions.\n- Quotas per account and region: 50 revisions and 10 endpoints per function, 200 Arm vCPUs, 10,000 requests per second.\n- The stack's custom resource provider Lambda keeps its own log group after the stack is deleted, as with other CDK custom resources.\n\n## Development\n\nTooling is pinned in `mise.toml` (Node 24, AWS CDK CLI). Personal settings, such as the AWS profile for the live end-to-end tests, go in a git-ignored `mise.local.toml`.\n\n```bash\nmise install\nnpx projen build # compile, unit tests, lint, API docs\nnpx projen e2e # deploy, verify and destroy real stacks in three regions (needs AWS credentials)\n```\n"
9748
+ "markdown": "# CDK constructs for AWS Lambda Web Functions\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n[AWS Lambda Web Functions](https://aws.amazon.com/lambda/) run an ordinary Node.js HTTP server (Express, Fastify, Hono, `node:http`) on Lambda and give it an HTTPS endpoint, optionally served from several regions. `WebFunction` deploys one, following the conventions of `aws-cdk-lib/aws-lambda` where the two services overlap.\n\n```ts fixture=bare\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\nimport { WebFunction, WebFunctionAuthType, WebFunctionEndpointType } from '@ashishpandeyone/cdk-lambda-web-function';\n\nconst fn = new WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('dist'),\n authType: WebFunctionAuthType.AWS_IAM,\n endpoint: {\n endpointType: WebFunctionEndpointType.MULTI_REGION,\n regions: ['us-east-1', 'eu-west-1'],\n },\n});\n\nnew CfnOutput(this, 'Url', { value: fn.endpoint.url }); // https://<id>.lambda-web.global.on.aws\n```\n\nThe stack's region is the function's **home region**. Multi-region endpoints need a stack with an explicit `env.region`.\n\n## Writing the server\n\n1. Listen on the host and port in **`AWS_LAMBDA_HTTP_ENDPOINT`** (`0.0.0.0:3000` today). `PORT` is not set.\n2. Start listening within **about 9 seconds**, or initialisation fails with `Application.TimeoutListenError`.\n3. Put the entry file at the root of your bundle as **`index.js`**, or set `entrypoint`.\n4. The runtime has **no AWS SDK**: bundle the clients you import.\n5. Code runs on **arm64**.\n\n```js\nconst express = require('express');\n\nconst app = express();\napp.get('/', (req, res) => res.json({ hello: 'world', region: process.env.AWS_REGION }));\n\nconst [host, port] = process.env.AWS_LAMBDA_HTTP_ENDPOINT.split(':');\napp.listen(Number(port), host);\n```\n\nRequests carry `lambda-web-request-id` and `lambda-web-endpoint-name` headers.\n\n## Regions and endpoints\n\nEach `WebFunction` has one endpoint, `fn.endpoint`:\n\n| `endpointType` | URL | Routing |\n|---|---|---|\n| `HOME_REGION` (default) | `https://<id>.<cell>.lambda-web.<home>.on.aws` | home region only |\n| `MULTI_REGION` | one global `https://<id>.lambda-web.global.on.aws` | nearest region |\n| `PER_REGION` | one URL per region, from `fn.endpoint.regionalUrl(region)` | the region in the hostname |\n\n```ts\nconst perRegion = new WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('dist'),\n authType: WebFunctionAuthType.AWS_IAM,\n endpoint: {\n endpointType: WebFunctionEndpointType.PER_REGION,\n regions: ['us-east-1', 'eu-west-1'],\n },\n});\n\nnew CfnOutput(this, 'UsEast1Url', { value: perRegion.endpoint.regionalUrl('us-east-1') });\n// perRegion.endpoint.regions is ['<home region>', 'eu-west-1', 'us-east-1']\n```\n\n- `MULTI_REGION` and `PER_REGION` need at least one region besides the home region; `HOME_REGION` takes none.\n- A MultiRegion endpoint takes about a minute to create.\n\n### Changing regions or the endpoint type\n\nAn endpoint's type and regions can't change in place: a change creates a **new endpoint with a new URL**, and the old one is deleted once the new one is live. Two endpoints of one function can't share a name, so:\n\n| `endpointName` | Physical name | Changing `regions` or `endpointType` |\n|---|---|---|\n| omitted (recommended) | `default-<hash of type and regions>` | works: new endpoint, new URL |\n| set, e.g. `'live'` | `live` | also change the name in the same deployment, or it fails with *The endpoint live already exists* (the stack rolls back and the old endpoint keeps serving) |\n\nThe construct warns at synth time when `endpointName` is set.\n\n## Authentication and invoking\n\n| `authType` | Meaning |\n|---|---|\n| `AWS_IAM` | Callers sign requests (SigV4 or SigV4a, signing name `lambda`) and need `lambda:InvokeWebFunctionEndpoint` |\n| `NONE` | **Public**: Lambda does no authentication; your application does (JWT, sessions). The `Authorization` header reaches your application untouched. The construct warns at synth time |\n\n```ts\nfn.grants.invoke(consumerRole); // or fn.grantInvoke(consumerRole), as on lambda.Function\n```\n\nThe grant is on the endpoint's home-region ARN, which IAM evaluates in every region the endpoint serves from, including the global URL.\n\n| Endpoint | How to sign |\n|---|---|\n| `HOME_REGION` | SigV4 for the home region |\n| `PER_REGION` | SigV4 for the hostname's region, or SigV4a |\n| `MULTI_REGION` | **SigV4a with region set `*`**: you can't know which region will serve the request |\n\n```js\nimport { SignatureV4a } from '@smithy/signature-v4a';\nimport { Sha256 } from '@aws-crypto/sha256-js';\nimport { fromNodeProviderChain } from '@aws-sdk/credential-providers';\n\nconst signer = new SignatureV4a({ service: 'lambda', region: '*', sha256: Sha256, credentials: fromNodeProviderChain() });\nconst signed = await signer.sign(\n { method: 'GET', protocol: 'https:', hostname: host, path: '/', headers: { host } },\n { signingRegion: '*' },\n);\nconst response = await fetch(`https://${host}/`, { headers: signed.headers });\n```\n\n## Configuration\n\n```ts\nconst api = new WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('build'),\n authType: WebFunctionAuthType.AWS_IAM,\n entrypoint: 'server.js', // default index.js\n webFunctionName: 'orders-api', // default: generated from the construct path\n description: 'Orders HTTP API',\n environment: { TABLE_NAME: table.tableName },\n timeout: Duration.seconds(60), // per request: 3 seconds to 15 minutes, default 30 seconds\n maxConcurrencyPerEnvironment: 32, // requests per environment at once: 1-128, default 64\n});\n\napi.addEnvironment('FEATURE_FLAG', 'on');\ntable.grantReadWriteData(api); // the default role trusts lambda.amazonaws.com\n```\n\n- Requests handled by one environment share module-level state, so keep handlers concurrency-safe.\n- Environment variable names starting with `AWS_` are reserved.\n- **Renaming the function replaces it and changes its URL.** A generated name depends on the construct path, so moving the construct renames it too.\n\n### Bundling TypeScript with `NodejsWebFunction`\n\n`NodejsWebFunction` is a `WebFunction` that bundles your server from a TypeScript or JavaScript entry file with esbuild, like `NodejsFunction` does for Lambda functions:\n\n```ts\nnew NodejsWebFunction(this, 'Api', {\n entry: 'src/server.ts',\n authType: WebFunctionAuthType.AWS_IAM,\n bundling: {\n minify: true, // default true\n sourceMap: true, // default true\n format: lambdaNodejs.OutputFormat.ESM, // default ESM (index.mjs); CJS gives index.js\n externalModules: [], // default: bundle everything you import\n },\n});\n```\n\n- **Defaults:** `runtime` is `NODEJS_24_X`, and the esbuild target follows the runtime (`node24`). The project root is the directory of the nearest lock file above `entry` (override it with `depsLockFilePath` or `projectRoot`).\n- **It also sets what a `lambda.Code` can't:** the entry point that matches the bundle, and `NODE_OPTIONS=--enable-source-maps` when source maps are on, appended to any `NODE_OPTIONS` you set, so stack traces point at your `.ts` files (e.g. `/var/task/src/server.ts:22:12`). Source map paths are relative to the project root, so no build-machine paths are deployed.\n- **ESM bundles include a `require` shim**, so CommonJS dependencies that load Node.js built-ins (Express, for example) work.\n- **The AWS SDK is bundled like any other dependency**, since the runtime has none. Only the clients you import are included.\n- **Bundling runs locally** when esbuild is installed in your project, and otherwise in Docker (an arm64 AWS SAM build image; set `forceDockerBundling` to always use Docker).\n- **Not yet supported:** installing native modules next to the bundle (`nodeModules`) and command hooks. For native dependencies, use `WebFunction` with `Code.fromAsset(..., { bundling: { image, command } })`.\n\n### Code\n\n`code` takes any `lambda.Code` that produces a zip in S3: `fromAsset`, `fromBucket`/`fromBucketV2`, `fromCustomCommand`, `fromDockerBuild`. Inline code and container images fail at synth time.\n\nLambda Web Functions download code as the `lambda.amazonaws.com` service principal, from a **versioned** bucket, and the CDK bootstrap bucket allows neither. So each stack gets a small code bucket, and the code is copied into it on deploy.\n\n### Updates\n\nAny change to code or configuration creates a new **revision**. The endpoint switches to it once it's ready, and the old revision is deleted after the deployment succeeds; a failed deployment rolls back to it. If nothing changed, nothing is deployed.\n\n## Logs in every region\n\nWeb Functions log in two tiers:\n\n```text\n every serving region home region\n ┌──────────────────┐ ┌──────────────────────────────────────────┐\n │ <group>.local │── copied ───►│ <group> every region's logs │\n │ (that region's │ (seconds) │ streams …[rev]<instance>-<acct>-<region> │\n │ environments) │ │ <group>.local (home-region traffic) │\n └──────────────────┘ └──────────────────────────────────────────┘\n```\n\n**Query `fn.logGroup`**, the home-region group that receives every region's logs. The service would create missing groups without retention and never delete them, so the construct creates and owns all of them: both home-region groups, and `<group>.local` in every other region of the endpoint.\n\n```ts\nnew WebFunction(this, 'Api', {\n runtime: lambda.Runtime.NODEJS_24_X,\n code: lambda.Code.fromAsset('dist'),\n authType: WebFunctionAuthType.AWS_IAM,\n logRetention: logs.RetentionDays.THREE_MONTHS, // default ONE_MONTH, every group in every region\n logRemovalPolicy: RemovalPolicy.DESTROY, // default RETAIN\n applicationLogLevelV2: lambda.ApplicationLogLevel.WARN,\n systemLogLevelV2: lambda.SystemLogLevel.INFO, // DEBUG, INFO or WARN\n});\n```\n\n- The default group is `/aws/lambda/web/<function name>`. Log lines are JSON; application lines carry `requestId`, `endpointName` and `region`.\n- Every event is stored twice (`.local` plus the home-region copy), so expect about double log ingestion, plus cross-region transfer.\n- With `DESTROY`, deletion waits about a minute after the function is gone, because environments flush their last lines late.\n- Subscribe only to `fn.logGroup`: subscribing to the `.local` groups as well delivers every event twice.\n\n## Limitations\n\n- One endpoint per function; no traffic splitting between revisions.\n- Not yet supported: importing existing functions, VPC access (network connectors), resource-policy permissions, KMS encryption, metrics helpers, tracing, and a CloudFront origin.\n- `cdk deploy --hotswap` and `cdk watch` don't support Web Functions.\n- Quotas per account and region: 50 revisions and 10 endpoints per function, 200 Arm vCPUs, 10,000 requests per second.\n- The stack's custom resource provider Lambda keeps its own log group after the stack is deleted, as with other CDK custom resources.\n\n## Development\n\nTooling is pinned in `mise.toml` (Node 24, AWS CDK CLI). Personal settings, such as the AWS profile for the live end-to-end tests, go in a git-ignored `mise.local.toml`.\n\n```bash\nmise install\nnpx projen build # compile, unit tests, lint, API docs\nnpx projen e2e # deploy, verify and destroy real stacks in three regions (needs AWS credentials)\n```\n"
9749
9749
  },
9750
9750
  "repository": {
9751
9751
  "type": "git",
@@ -9772,7 +9772,7 @@
9772
9772
  "kind": "interface",
9773
9773
  "locationInModule": {
9774
9774
  "filename": "src/web-function.ts",
9775
- "line": 128
9775
+ "line": 134
9776
9776
  },
9777
9777
  "name": "IWebFunction",
9778
9778
  "properties": [
@@ -9788,7 +9788,7 @@
9788
9788
  "immutable": true,
9789
9789
  "locationInModule": {
9790
9790
  "filename": "src/web-function.ts",
9791
- "line": 141
9791
+ "line": 147
9792
9792
  },
9793
9793
  "name": "webFunctionArn",
9794
9794
  "type": {
@@ -9807,7 +9807,7 @@
9807
9807
  "immutable": true,
9808
9808
  "locationInModule": {
9809
9809
  "filename": "src/web-function.ts",
9810
- "line": 134
9810
+ "line": 140
9811
9811
  },
9812
9812
  "name": "webFunctionName",
9813
9813
  "type": {
@@ -9817,6 +9817,487 @@
9817
9817
  ],
9818
9818
  "symbolId": "src/web-function:IWebFunction"
9819
9819
  },
9820
+ "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunction": {
9821
+ "assembly": "@ashishpandeyone/cdk-lambda-web-function",
9822
+ "base": "@ashishpandeyone/cdk-lambda-web-function.WebFunction",
9823
+ "docs": {
9824
+ "remarks": "Besides bundling, it sets what a `lambda.Code` alone can't: the entry point that matches the\nbundle, and `NODE_OPTIONS=--enable-source-maps` when source maps are on.",
9825
+ "stability": "experimental",
9826
+ "summary": "A `WebFunction` whose code is bundled from a TypeScript or JavaScript entry file with esbuild, like `NodejsFunction` for Lambda functions."
9827
+ },
9828
+ "fqn": "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunction",
9829
+ "initializer": {
9830
+ "docs": {
9831
+ "stability": "experimental"
9832
+ },
9833
+ "locationInModule": {
9834
+ "filename": "src/nodejs-web-function.ts",
9835
+ "line": 167
9836
+ },
9837
+ "parameters": [
9838
+ {
9839
+ "name": "scope",
9840
+ "type": {
9841
+ "fqn": "constructs.Construct"
9842
+ }
9843
+ },
9844
+ {
9845
+ "name": "id",
9846
+ "type": {
9847
+ "primitive": "string"
9848
+ }
9849
+ },
9850
+ {
9851
+ "name": "props",
9852
+ "type": {
9853
+ "fqn": "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunctionProps"
9854
+ }
9855
+ }
9856
+ ]
9857
+ },
9858
+ "kind": "class",
9859
+ "locationInModule": {
9860
+ "filename": "src/nodejs-web-function.ts",
9861
+ "line": 166
9862
+ },
9863
+ "name": "NodejsWebFunction",
9864
+ "symbolId": "src/nodejs-web-function:NodejsWebFunction"
9865
+ },
9866
+ "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunctionBundlingOptions": {
9867
+ "assembly": "@ashishpandeyone/cdk-lambda-web-function",
9868
+ "datatype": true,
9869
+ "docs": {
9870
+ "stability": "experimental",
9871
+ "summary": "How `NodejsWebFunction` bundles the server with esbuild."
9872
+ },
9873
+ "fqn": "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunctionBundlingOptions",
9874
+ "kind": "interface",
9875
+ "locationInModule": {
9876
+ "filename": "src/nodejs-web-function.ts",
9877
+ "line": 12
9878
+ },
9879
+ "name": "NodejsWebFunctionBundlingOptions",
9880
+ "properties": [
9881
+ {
9882
+ "abstract": true,
9883
+ "docs": {
9884
+ "default": "- none",
9885
+ "stability": "experimental",
9886
+ "summary": "Text to prepend to the bundle."
9887
+ },
9888
+ "immutable": true,
9889
+ "locationInModule": {
9890
+ "filename": "src/nodejs-web-function.ts",
9891
+ "line": 69
9892
+ },
9893
+ "name": "banner",
9894
+ "optional": true,
9895
+ "type": {
9896
+ "primitive": "string"
9897
+ }
9898
+ },
9899
+ {
9900
+ "abstract": true,
9901
+ "docs": {
9902
+ "default": "- none",
9903
+ "stability": "experimental",
9904
+ "summary": "Replace global identifiers with constant expressions (esbuild `--define`)."
9905
+ },
9906
+ "immutable": true,
9907
+ "locationInModule": {
9908
+ "filename": "src/nodejs-web-function.ts",
9909
+ "line": 55
9910
+ },
9911
+ "name": "define",
9912
+ "optional": true,
9913
+ "type": {
9914
+ "collection": {
9915
+ "elementtype": {
9916
+ "primitive": "string"
9917
+ },
9918
+ "kind": "map"
9919
+ }
9920
+ }
9921
+ },
9922
+ {
9923
+ "abstract": true,
9924
+ "docs": {
9925
+ "default": "- the arm64 AWS SAM build image for the runtime, e.g. `public.ecr.aws/sam/build-nodejs24.x:latest-arm64`",
9926
+ "stability": "experimental",
9927
+ "summary": "Docker image for bundling when esbuild isn't installed locally."
9928
+ },
9929
+ "immutable": true,
9930
+ "locationInModule": {
9931
+ "filename": "src/nodejs-web-function.ts",
9932
+ "line": 118
9933
+ },
9934
+ "name": "dockerImage",
9935
+ "optional": true,
9936
+ "type": {
9937
+ "fqn": "aws-cdk-lib.DockerImage"
9938
+ }
9939
+ },
9940
+ {
9941
+ "abstract": true,
9942
+ "docs": {
9943
+ "default": "- none",
9944
+ "stability": "experimental",
9945
+ "summary": "Environment variables while bundling (not at runtime)."
9946
+ },
9947
+ "immutable": true,
9948
+ "locationInModule": {
9949
+ "filename": "src/nodejs-web-function.ts",
9950
+ "line": 104
9951
+ },
9952
+ "name": "environment",
9953
+ "optional": true,
9954
+ "type": {
9955
+ "collection": {
9956
+ "elementtype": {
9957
+ "primitive": "string"
9958
+ },
9959
+ "kind": "map"
9960
+ }
9961
+ }
9962
+ },
9963
+ {
9964
+ "abstract": true,
9965
+ "docs": {
9966
+ "default": "- none",
9967
+ "stability": "experimental",
9968
+ "summary": "Extra esbuild arguments, e.g. `{ '--log-limit': '0', '--tree-shaking': true }`."
9969
+ },
9970
+ "immutable": true,
9971
+ "locationInModule": {
9972
+ "filename": "src/nodejs-web-function.ts",
9973
+ "line": 97
9974
+ },
9975
+ "name": "esbuildArgs",
9976
+ "optional": true,
9977
+ "type": {
9978
+ "collection": {
9979
+ "elementtype": {
9980
+ "union": {
9981
+ "types": [
9982
+ {
9983
+ "primitive": "string"
9984
+ },
9985
+ {
9986
+ "primitive": "boolean"
9987
+ }
9988
+ ]
9989
+ }
9990
+ },
9991
+ "kind": "map"
9992
+ }
9993
+ }
9994
+ },
9995
+ {
9996
+ "abstract": true,
9997
+ "docs": {
9998
+ "default": "- none",
9999
+ "remarks": "The runtime has no AWS SDK, so `@aws-sdk/*` is bundled like\nany other dependency; only exclude modules you provide another way.",
10000
+ "stability": "experimental",
10001
+ "summary": "Modules to leave out of the bundle."
10002
+ },
10003
+ "immutable": true,
10004
+ "locationInModule": {
10005
+ "filename": "src/nodejs-web-function.ts",
10006
+ "line": 48
10007
+ },
10008
+ "name": "externalModules",
10009
+ "optional": true,
10010
+ "type": {
10011
+ "collection": {
10012
+ "elementtype": {
10013
+ "primitive": "string"
10014
+ },
10015
+ "kind": "array"
10016
+ }
10017
+ }
10018
+ },
10019
+ {
10020
+ "abstract": true,
10021
+ "docs": {
10022
+ "default": "- none",
10023
+ "stability": "experimental",
10024
+ "summary": "Text to append to the bundle."
10025
+ },
10026
+ "immutable": true,
10027
+ "locationInModule": {
10028
+ "filename": "src/nodejs-web-function.ts",
10029
+ "line": 76
10030
+ },
10031
+ "name": "footer",
10032
+ "optional": true,
10033
+ "type": {
10034
+ "primitive": "string"
10035
+ }
10036
+ },
10037
+ {
10038
+ "abstract": true,
10039
+ "docs": {
10040
+ "default": "false",
10041
+ "stability": "experimental",
10042
+ "summary": "Always bundle in Docker, even if esbuild is installed locally."
10043
+ },
10044
+ "immutable": true,
10045
+ "locationInModule": {
10046
+ "filename": "src/nodejs-web-function.ts",
10047
+ "line": 111
10048
+ },
10049
+ "name": "forceDockerBundling",
10050
+ "optional": true,
10051
+ "type": {
10052
+ "primitive": "boolean"
10053
+ }
10054
+ },
10055
+ {
10056
+ "abstract": true,
10057
+ "docs": {
10058
+ "default": "OutputFormat.ESM",
10059
+ "remarks": "ESM is written to `index.mjs` (with a `require` shim, so CommonJS dependencies\nsuch as Express work); CommonJS to `index.js`.",
10060
+ "stability": "experimental",
10061
+ "summary": "Output format."
10062
+ },
10063
+ "immutable": true,
10064
+ "locationInModule": {
10065
+ "filename": "src/nodejs-web-function.ts",
10066
+ "line": 33
10067
+ },
10068
+ "name": "format",
10069
+ "optional": true,
10070
+ "type": {
10071
+ "fqn": "aws-cdk-lib.aws_lambda_nodejs.OutputFormat"
10072
+ }
10073
+ },
10074
+ {
10075
+ "abstract": true,
10076
+ "docs": {
10077
+ "default": "false",
10078
+ "stability": "experimental",
10079
+ "summary": "Keep function and class names (`--keep-names`)."
10080
+ },
10081
+ "immutable": true,
10082
+ "locationInModule": {
10083
+ "filename": "src/nodejs-web-function.ts",
10084
+ "line": 90
10085
+ },
10086
+ "name": "keepNames",
10087
+ "optional": true,
10088
+ "type": {
10089
+ "primitive": "boolean"
10090
+ }
10091
+ },
10092
+ {
10093
+ "abstract": true,
10094
+ "docs": {
10095
+ "default": "- esbuild's defaults",
10096
+ "stability": "experimental",
10097
+ "summary": "esbuild loaders by file extension, e.g. `{ '.png': 'dataurl' }`."
10098
+ },
10099
+ "immutable": true,
10100
+ "locationInModule": {
10101
+ "filename": "src/nodejs-web-function.ts",
10102
+ "line": 62
10103
+ },
10104
+ "name": "loader",
10105
+ "optional": true,
10106
+ "type": {
10107
+ "collection": {
10108
+ "elementtype": {
10109
+ "primitive": "string"
10110
+ },
10111
+ "kind": "map"
10112
+ }
10113
+ }
10114
+ },
10115
+ {
10116
+ "abstract": true,
10117
+ "docs": {
10118
+ "default": "true",
10119
+ "stability": "experimental",
10120
+ "summary": "Minify the bundle."
10121
+ },
10122
+ "immutable": true,
10123
+ "locationInModule": {
10124
+ "filename": "src/nodejs-web-function.ts",
10125
+ "line": 18
10126
+ },
10127
+ "name": "minify",
10128
+ "optional": true,
10129
+ "type": {
10130
+ "primitive": "boolean"
10131
+ }
10132
+ },
10133
+ {
10134
+ "abstract": true,
10135
+ "docs": {
10136
+ "default": "true",
10137
+ "stability": "experimental",
10138
+ "summary": "Generate a source map, and set `NODE_OPTIONS=--enable-source-maps` so stack traces point at your sources."
10139
+ },
10140
+ "immutable": true,
10141
+ "locationInModule": {
10142
+ "filename": "src/nodejs-web-function.ts",
10143
+ "line": 25
10144
+ },
10145
+ "name": "sourceMap",
10146
+ "optional": true,
10147
+ "type": {
10148
+ "primitive": "boolean"
10149
+ }
10150
+ },
10151
+ {
10152
+ "abstract": true,
10153
+ "docs": {
10154
+ "default": "- the runtime's Node.js version, e.g. `node24`",
10155
+ "stability": "experimental",
10156
+ "summary": "esbuild target."
10157
+ },
10158
+ "immutable": true,
10159
+ "locationInModule": {
10160
+ "filename": "src/nodejs-web-function.ts",
10161
+ "line": 40
10162
+ },
10163
+ "name": "target",
10164
+ "optional": true,
10165
+ "type": {
10166
+ "primitive": "string"
10167
+ }
10168
+ },
10169
+ {
10170
+ "abstract": true,
10171
+ "docs": {
10172
+ "default": "- esbuild's lookup from the entry file",
10173
+ "stability": "experimental",
10174
+ "summary": "Path of the tsconfig.json to use, relative to the project root or absolute (inside the project root)."
10175
+ },
10176
+ "immutable": true,
10177
+ "locationInModule": {
10178
+ "filename": "src/nodejs-web-function.ts",
10179
+ "line": 83
10180
+ },
10181
+ "name": "tsconfig",
10182
+ "optional": true,
10183
+ "type": {
10184
+ "primitive": "string"
10185
+ }
10186
+ }
10187
+ ],
10188
+ "symbolId": "src/nodejs-web-function:NodejsWebFunctionBundlingOptions"
10189
+ },
10190
+ "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunctionProps": {
10191
+ "assembly": "@ashishpandeyone/cdk-lambda-web-function",
10192
+ "datatype": true,
10193
+ "docs": {
10194
+ "stability": "experimental",
10195
+ "summary": "Properties for a `NodejsWebFunction`."
10196
+ },
10197
+ "fqn": "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunctionProps",
10198
+ "interfaces": [
10199
+ "@ashishpandeyone/cdk-lambda-web-function.WebFunctionOptions"
10200
+ ],
10201
+ "kind": "interface",
10202
+ "locationInModule": {
10203
+ "filename": "src/nodejs-web-function.ts",
10204
+ "line": 124
10205
+ },
10206
+ "name": "NodejsWebFunctionProps",
10207
+ "properties": [
10208
+ {
10209
+ "abstract": true,
10210
+ "docs": {
10211
+ "remarks": "It's bundled with its dependencies.",
10212
+ "stability": "experimental",
10213
+ "summary": "The file that starts your server (TypeScript or JavaScript)."
10214
+ },
10215
+ "immutable": true,
10216
+ "locationInModule": {
10217
+ "filename": "src/nodejs-web-function.ts",
10218
+ "line": 128
10219
+ },
10220
+ "name": "entry",
10221
+ "type": {
10222
+ "primitive": "string"
10223
+ }
10224
+ },
10225
+ {
10226
+ "abstract": true,
10227
+ "docs": {
10228
+ "default": "- minified ESM with a source map, targeting the runtime's Node.js version",
10229
+ "stability": "experimental",
10230
+ "summary": "How the server is bundled."
10231
+ },
10232
+ "immutable": true,
10233
+ "locationInModule": {
10234
+ "filename": "src/nodejs-web-function.ts",
10235
+ "line": 156
10236
+ },
10237
+ "name": "bundling",
10238
+ "optional": true,
10239
+ "type": {
10240
+ "fqn": "@ashishpandeyone/cdk-lambda-web-function.NodejsWebFunctionBundlingOptions"
10241
+ }
10242
+ },
10243
+ {
10244
+ "abstract": true,
10245
+ "docs": {
10246
+ "default": "- the nearest `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml` or `bun.lock(b)` above the entry",
10247
+ "stability": "experimental",
10248
+ "summary": "The lock file that marks the project root (where esbuild resolves `node_modules`)."
10249
+ },
10250
+ "immutable": true,
10251
+ "locationInModule": {
10252
+ "filename": "src/nodejs-web-function.ts",
10253
+ "line": 142
10254
+ },
10255
+ "name": "depsLockFilePath",
10256
+ "optional": true,
10257
+ "type": {
10258
+ "primitive": "string"
10259
+ }
10260
+ },
10261
+ {
10262
+ "abstract": true,
10263
+ "docs": {
10264
+ "default": "- the directory of the lock file",
10265
+ "remarks": "Must contain the entry file.",
10266
+ "stability": "experimental",
10267
+ "summary": "The project root."
10268
+ },
10269
+ "immutable": true,
10270
+ "locationInModule": {
10271
+ "filename": "src/nodejs-web-function.ts",
10272
+ "line": 149
10273
+ },
10274
+ "name": "projectRoot",
10275
+ "optional": true,
10276
+ "type": {
10277
+ "primitive": "string"
10278
+ }
10279
+ },
10280
+ {
10281
+ "abstract": true,
10282
+ "docs": {
10283
+ "default": "lambda.Runtime.NODEJS_24_X",
10284
+ "stability": "experimental",
10285
+ "summary": "The Node.js runtime."
10286
+ },
10287
+ "immutable": true,
10288
+ "locationInModule": {
10289
+ "filename": "src/nodejs-web-function.ts",
10290
+ "line": 135
10291
+ },
10292
+ "name": "runtime",
10293
+ "optional": true,
10294
+ "type": {
10295
+ "fqn": "aws-cdk-lib.aws_lambda.Runtime"
10296
+ }
10297
+ }
10298
+ ],
10299
+ "symbolId": "src/nodejs-web-function:NodejsWebFunctionProps"
10300
+ },
9820
10301
  "@ashishpandeyone/cdk-lambda-web-function.WebFunction": {
9821
10302
  "assembly": "@ashishpandeyone/cdk-lambda-web-function",
9822
10303
  "base": "aws-cdk-lib.Resource",
@@ -9835,7 +10316,7 @@
9835
10316
  },
9836
10317
  "locationInModule": {
9837
10318
  "filename": "src/web-function.ts",
9838
- "line": 186
10319
+ "line": 192
9839
10320
  },
9840
10321
  "parameters": [
9841
10322
  {
@@ -9865,7 +10346,7 @@
9865
10346
  "kind": "class",
9866
10347
  "locationInModule": {
9867
10348
  "filename": "src/web-function.ts",
9868
- "line": 154
10349
+ "line": 160
9869
10350
  },
9870
10351
  "methods": [
9871
10352
  {
@@ -9876,7 +10357,7 @@
9876
10357
  },
9877
10358
  "locationInModule": {
9878
10359
  "filename": "src/web-function.ts",
9879
- "line": 278
10360
+ "line": 284
9880
10361
  },
9881
10362
  "name": "addEnvironment",
9882
10363
  "parameters": [
@@ -9906,7 +10387,7 @@
9906
10387
  },
9907
10388
  "locationInModule": {
9908
10389
  "filename": "src/web-function.ts",
9909
- "line": 289
10390
+ "line": 295
9910
10391
  },
9911
10392
  "name": "addToRolePolicy",
9912
10393
  "parameters": [
@@ -9926,7 +10407,7 @@
9926
10407
  },
9927
10408
  "locationInModule": {
9928
10409
  "filename": "src/web-function.ts",
9929
- "line": 297
10410
+ "line": 303
9930
10411
  },
9931
10412
  "name": "grantInvoke",
9932
10413
  "parameters": [
@@ -9954,7 +10435,7 @@
9954
10435
  "immutable": true,
9955
10436
  "locationInModule": {
9956
10437
  "filename": "src/web-function.ts",
9957
- "line": 162
10438
+ "line": 168
9958
10439
  },
9959
10440
  "name": "endpoint",
9960
10441
  "type": {
@@ -9969,7 +10450,7 @@
9969
10450
  "immutable": true,
9970
10451
  "locationInModule": {
9971
10452
  "filename": "src/web-function.ts",
9972
- "line": 171
10453
+ "line": 177
9973
10454
  },
9974
10455
  "name": "grantPrincipal",
9975
10456
  "overrides": "aws-cdk-lib.aws_iam.IGrantable",
@@ -9985,7 +10466,7 @@
9985
10466
  "immutable": true,
9986
10467
  "locationInModule": {
9987
10468
  "filename": "src/web-function.ts",
9988
- "line": 165
10469
+ "line": 171
9989
10470
  },
9990
10471
  "name": "grants",
9991
10472
  "type": {
@@ -10001,7 +10482,7 @@
10001
10482
  "immutable": true,
10002
10483
  "locationInModule": {
10003
10484
  "filename": "src/web-function.ts",
10004
- "line": 177
10485
+ "line": 183
10005
10486
  },
10006
10487
  "name": "logGroup",
10007
10488
  "type": {
@@ -10016,7 +10497,7 @@
10016
10497
  "immutable": true,
10017
10498
  "locationInModule": {
10018
10499
  "filename": "src/web-function.ts",
10019
- "line": 159
10500
+ "line": 165
10020
10501
  },
10021
10502
  "name": "revisionId",
10022
10503
  "type": {
@@ -10031,7 +10512,7 @@
10031
10512
  "immutable": true,
10032
10513
  "locationInModule": {
10033
10514
  "filename": "src/web-function.ts",
10034
- "line": 168
10515
+ "line": 174
10035
10516
  },
10036
10517
  "name": "role",
10037
10518
  "type": {
@@ -10046,7 +10527,7 @@
10046
10527
  "immutable": true,
10047
10528
  "locationInModule": {
10048
10529
  "filename": "src/web-function.ts",
10049
- "line": 156
10530
+ "line": 162
10050
10531
  },
10051
10532
  "name": "webFunctionArn",
10052
10533
  "overrides": "@ashishpandeyone/cdk-lambda-web-function.IWebFunction",
@@ -10062,7 +10543,7 @@
10062
10543
  "immutable": true,
10063
10544
  "locationInModule": {
10064
10545
  "filename": "src/web-function.ts",
10065
- "line": 155
10546
+ "line": 161
10066
10547
  },
10067
10548
  "name": "webFunctionName",
10068
10549
  "overrides": "@ashishpandeyone/cdk-lambda-web-function.IWebFunction",
@@ -10078,7 +10559,7 @@
10078
10559
  "immutable": true,
10079
10560
  "locationInModule": {
10080
10561
  "filename": "src/web-function.ts",
10081
- "line": 182
10562
+ "line": 188
10082
10563
  },
10083
10564
  "name": "webFunctionRef",
10084
10565
  "overrides": "aws-cdk-lib.interfaces.aws_lambda.IWebFunctionRef",
@@ -10425,20 +10906,20 @@
10425
10906
  "name": "WebFunctionGrants",
10426
10907
  "symbolId": "src/web-function-grants:WebFunctionGrants"
10427
10908
  },
10428
- "@ashishpandeyone/cdk-lambda-web-function.WebFunctionProps": {
10909
+ "@ashishpandeyone/cdk-lambda-web-function.WebFunctionOptions": {
10429
10910
  "assembly": "@ashishpandeyone/cdk-lambda-web-function",
10430
10911
  "datatype": true,
10431
10912
  "docs": {
10432
10913
  "stability": "experimental",
10433
- "summary": "Properties for a `WebFunction`."
10914
+ "summary": "Options shared by `WebFunction` and `NodejsWebFunction`: everything except how the code is supplied."
10434
10915
  },
10435
- "fqn": "@ashishpandeyone/cdk-lambda-web-function.WebFunctionProps",
10916
+ "fqn": "@ashishpandeyone/cdk-lambda-web-function.WebFunctionOptions",
10436
10917
  "kind": "interface",
10437
10918
  "locationInModule": {
10438
10919
  "filename": "src/web-function.ts",
10439
10920
  "line": 16
10440
10921
  },
10441
- "name": "WebFunctionProps",
10922
+ "name": "WebFunctionOptions",
10442
10923
  "properties": [
10443
10924
  {
10444
10925
  "abstract": true,
@@ -10449,46 +10930,13 @@
10449
10930
  "immutable": true,
10450
10931
  "locationInModule": {
10451
10932
  "filename": "src/web-function.ts",
10452
- "line": 33
10933
+ "line": 20
10453
10934
  },
10454
10935
  "name": "authType",
10455
10936
  "type": {
10456
10937
  "fqn": "@ashishpandeyone/cdk-lambda-web-function.WebFunctionAuthType"
10457
10938
  }
10458
10939
  },
10459
- {
10460
- "abstract": true,
10461
- "docs": {
10462
- "remarks": "The code is copied into the stack's code bucket, which Lambda Web Functions can read.",
10463
- "stability": "experimental",
10464
- "summary": "The code: a zip in S3 (`Code.fromAsset`, `Code.fromBucket`, `Code.fromCustomCommand`, `Code.fromDockerBuild`). Inline code and container images aren't supported."
10465
- },
10466
- "immutable": true,
10467
- "locationInModule": {
10468
- "filename": "src/web-function.ts",
10469
- "line": 28
10470
- },
10471
- "name": "code",
10472
- "type": {
10473
- "fqn": "aws-cdk-lib.aws_lambda.Code"
10474
- }
10475
- },
10476
- {
10477
- "abstract": true,
10478
- "docs": {
10479
- "stability": "experimental",
10480
- "summary": "The Node.js runtime, e.g. `lambda.Runtime.NODEJS_24_X`."
10481
- },
10482
- "immutable": true,
10483
- "locationInModule": {
10484
- "filename": "src/web-function.ts",
10485
- "line": 20
10486
- },
10487
- "name": "runtime",
10488
- "type": {
10489
- "fqn": "aws-cdk-lib.aws_lambda.Runtime"
10490
- }
10491
- },
10492
10940
  {
10493
10941
  "abstract": true,
10494
10942
  "docs": {
@@ -10499,7 +10947,7 @@
10499
10947
  "immutable": true,
10500
10948
  "locationInModule": {
10501
10949
  "filename": "src/web-function.ts",
10502
- "line": 115
10950
+ "line": 95
10503
10951
  },
10504
10952
  "name": "applicationLogLevelV2",
10505
10953
  "optional": true,
@@ -10517,7 +10965,7 @@
10517
10965
  "immutable": true,
10518
10966
  "locationInModule": {
10519
10967
  "filename": "src/web-function.ts",
10520
- "line": 61
10968
+ "line": 41
10521
10969
  },
10522
10970
  "name": "description",
10523
10971
  "optional": true,
@@ -10535,7 +10983,7 @@
10535
10983
  "immutable": true,
10536
10984
  "locationInModule": {
10537
10985
  "filename": "src/web-function.ts",
10538
- "line": 40
10986
+ "line": 27
10539
10987
  },
10540
10988
  "name": "endpoint",
10541
10989
  "optional": true,
@@ -10543,24 +10991,6 @@
10543
10991
  "fqn": "@ashishpandeyone/cdk-lambda-web-function.WebFunctionEndpointOptions"
10544
10992
  }
10545
10993
  },
10546
- {
10547
- "abstract": true,
10548
- "docs": {
10549
- "default": "'index.js'",
10550
- "stability": "experimental",
10551
- "summary": "The file that starts your server, relative to the root of the code."
10552
- },
10553
- "immutable": true,
10554
- "locationInModule": {
10555
- "filename": "src/web-function.ts",
10556
- "line": 47
10557
- },
10558
- "name": "entrypoint",
10559
- "optional": true,
10560
- "type": {
10561
- "primitive": "string"
10562
- }
10563
- },
10564
10994
  {
10565
10995
  "abstract": true,
10566
10996
  "docs": {
@@ -10572,7 +11002,7 @@
10572
11002
  "immutable": true,
10573
11003
  "locationInModule": {
10574
11004
  "filename": "src/web-function.ts",
10575
- "line": 78
11005
+ "line": 58
10576
11006
  },
10577
11007
  "name": "environment",
10578
11008
  "optional": true,
@@ -10596,7 +11026,7 @@
10596
11026
  "immutable": true,
10597
11027
  "locationInModule": {
10598
11028
  "filename": "src/web-function.ts",
10599
- "line": 108
11029
+ "line": 88
10600
11030
  },
10601
11031
  "name": "logRemovalPolicy",
10602
11032
  "optional": true,
@@ -10614,7 +11044,7 @@
10614
11044
  "immutable": true,
10615
11045
  "locationInModule": {
10616
11046
  "filename": "src/web-function.ts",
10617
- "line": 100
11047
+ "line": 80
10618
11048
  },
10619
11049
  "name": "logRetention",
10620
11050
  "optional": true,
@@ -10633,7 +11063,7 @@
10633
11063
  "immutable": true,
10634
11064
  "locationInModule": {
10635
11065
  "filename": "src/web-function.ts",
10636
- "line": 93
11066
+ "line": 73
10637
11067
  },
10638
11068
  "name": "maxConcurrencyPerEnvironment",
10639
11069
  "optional": true,
@@ -10652,7 +11082,7 @@
10652
11082
  "immutable": true,
10653
11083
  "locationInModule": {
10654
11084
  "filename": "src/web-function.ts",
10655
- "line": 71
11085
+ "line": 51
10656
11086
  },
10657
11087
  "name": "role",
10658
11088
  "optional": true,
@@ -10670,7 +11100,7 @@
10670
11100
  "immutable": true,
10671
11101
  "locationInModule": {
10672
11102
  "filename": "src/web-function.ts",
10673
- "line": 122
11103
+ "line": 102
10674
11104
  },
10675
11105
  "name": "systemLogLevelV2",
10676
11106
  "optional": true,
@@ -10688,7 +11118,7 @@
10688
11118
  "immutable": true,
10689
11119
  "locationInModule": {
10690
11120
  "filename": "src/web-function.ts",
10691
- "line": 85
11121
+ "line": 65
10692
11122
  },
10693
11123
  "name": "timeout",
10694
11124
  "optional": true,
@@ -10707,7 +11137,7 @@
10707
11137
  "immutable": true,
10708
11138
  "locationInModule": {
10709
11139
  "filename": "src/web-function.ts",
10710
- "line": 54
11140
+ "line": 34
10711
11141
  },
10712
11142
  "name": "webFunctionName",
10713
11143
  "optional": true,
@@ -10716,9 +11146,81 @@
10716
11146
  }
10717
11147
  }
10718
11148
  ],
11149
+ "symbolId": "src/web-function:WebFunctionOptions"
11150
+ },
11151
+ "@ashishpandeyone/cdk-lambda-web-function.WebFunctionProps": {
11152
+ "assembly": "@ashishpandeyone/cdk-lambda-web-function",
11153
+ "datatype": true,
11154
+ "docs": {
11155
+ "stability": "experimental",
11156
+ "summary": "Properties for a `WebFunction`."
11157
+ },
11158
+ "fqn": "@ashishpandeyone/cdk-lambda-web-function.WebFunctionProps",
11159
+ "interfaces": [
11160
+ "@ashishpandeyone/cdk-lambda-web-function.WebFunctionOptions"
11161
+ ],
11162
+ "kind": "interface",
11163
+ "locationInModule": {
11164
+ "filename": "src/web-function.ts",
11165
+ "line": 108
11166
+ },
11167
+ "name": "WebFunctionProps",
11168
+ "properties": [
11169
+ {
11170
+ "abstract": true,
11171
+ "docs": {
11172
+ "remarks": "The code is copied into the stack's code bucket, which Lambda Web Functions can read.",
11173
+ "stability": "experimental",
11174
+ "summary": "The code: a zip in S3 (`Code.fromAsset`, `Code.fromBucket`, `Code.fromCustomCommand`, `Code.fromDockerBuild`). Inline code and container images aren't supported."
11175
+ },
11176
+ "immutable": true,
11177
+ "locationInModule": {
11178
+ "filename": "src/web-function.ts",
11179
+ "line": 120
11180
+ },
11181
+ "name": "code",
11182
+ "type": {
11183
+ "fqn": "aws-cdk-lib.aws_lambda.Code"
11184
+ }
11185
+ },
11186
+ {
11187
+ "abstract": true,
11188
+ "docs": {
11189
+ "stability": "experimental",
11190
+ "summary": "The Node.js runtime, e.g. `lambda.Runtime.NODEJS_24_X`."
11191
+ },
11192
+ "immutable": true,
11193
+ "locationInModule": {
11194
+ "filename": "src/web-function.ts",
11195
+ "line": 112
11196
+ },
11197
+ "name": "runtime",
11198
+ "type": {
11199
+ "fqn": "aws-cdk-lib.aws_lambda.Runtime"
11200
+ }
11201
+ },
11202
+ {
11203
+ "abstract": true,
11204
+ "docs": {
11205
+ "default": "'index.js'",
11206
+ "stability": "experimental",
11207
+ "summary": "The file that starts your server, relative to the root of the code."
11208
+ },
11209
+ "immutable": true,
11210
+ "locationInModule": {
11211
+ "filename": "src/web-function.ts",
11212
+ "line": 127
11213
+ },
11214
+ "name": "entrypoint",
11215
+ "optional": true,
11216
+ "type": {
11217
+ "primitive": "string"
11218
+ }
11219
+ }
11220
+ ],
10719
11221
  "symbolId": "src/web-function:WebFunctionProps"
10720
11222
  }
10721
11223
  },
10722
- "version": "0.1.0",
10723
- "fingerprint": "u0Hmq0zAMAyCc6Dk05vjUCG6qd3zEXZ0NaQJhOSdkfA="
11224
+ "version": "0.1.1",
11225
+ "fingerprint": "ft/zQrWlxxNtDAXuxZWYBBawuxOtM3nKh3Fy62u1HaY="
10724
11226
  }