@mrgrain/cdk-esbuild 4.0.0-alpha.7 → 4.0.0-alpha.8

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
@@ -7,9 +7,6 @@
7
7
  ],
8
8
  "url": "https://moritzkornher.de"
9
9
  },
10
- "bundled": {
11
- "which": "^2.0.2"
12
- },
13
10
  "dependencies": {
14
11
  "aws-cdk-lib": "^2.0.0",
15
12
  "constructs": "^10.0.5"
@@ -2780,7 +2777,7 @@
2780
2777
  "stability": "stable"
2781
2778
  },
2782
2779
  "homepage": "https://github.com/mrgrain/cdk-esbuild",
2783
- "jsiiVersion": "1.60.1 (build 2799dc8)",
2780
+ "jsiiVersion": "1.61.0 (build abf4039)",
2784
2781
  "keywords": [
2785
2782
  "aws-cdk",
2786
2783
  "bundler",
@@ -2803,7 +2800,7 @@
2803
2800
  },
2804
2801
  "name": "@mrgrain/cdk-esbuild",
2805
2802
  "readme": {
2806
- "markdown": "# cdk-esbuild\n\n_CDK constructs for [esbuild](https://github.com/evanw/esbuild), an extremely fast JavaScript bundler_\n\n[Getting started](#getting-started) | [Migrating to v3](#migrating-to-v3) |\n[Documentation](#documentation) | [API Reference](#api-reference) | [Versioning](#versioning)\n\n> This version is compatible with AWS CDK v2. For the previous, AWS CDK v1 compatible release, see [cdk-esbuild@v2](https://github.com/mrgrain/cdk-esbuild/tree/v2).\n\n## Why?\n\n_esbuild_ is an extremely fast bundler and minifier for Typescript and JavaScript.\nThis package makes _esbuild_ available to deploy lambda functions, static websites or to publish build artefacts (assets) for further use.\n\nAWS CDK [supports _esbuild_ with Lambda Functions](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-nodejs-readme.html). However the implementation cannot be used with any other Constructs and doesn't expose all of _esbuild_'s build interface.\n\nThis package is running _esbuild_ directly in Node.js and bypasses Docker which the AWS CDK implementation uses. The approach is quicker and easier to use for Node.js users, but incompatible with other languages.\n\n**Production readiness**\n\nThis package is stable and ready to be used in production, as many do. However _esbuild_ has not yet released a version 1.0.0 and its API is still in active development. Please read the guide on [esbuild's production readiness](https://esbuild.github.io/faq/#production-readiness).\n\nNotably upgrades of the _esbuild_ minimum version requirement will be introduced in **minor versions** of this package and will inherit breaking changes from _esbuild_.\n\n## Getting started\n\nInstall `cdk-esbuild`:\n\n```\nnpm install @mrgrain/cdk-esbuild@3\n```\n\nIf _peer_ or _optional dependencies_ are not installed automatically (e.g. when using npm v4-6), please use this command to install all of them:\n\n```\nnpm install @mrgrain/cdk-esbuild@3 esbuild\n```\n\n### AWS Lambda: Serverless function\n\n> 💡 See [Lambda Function](examples/lambda) for a complete working example of a how to deploy a lambda function.\n\nUse `TypeScriptCode` as the `code` of a [lambda function](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#code):\n\n```ts\nimport * as lambda from \"aws-cdk-lib/aws-lambda\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\");\n\nconst fn = new lambda.Function(stack, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_16_X,\n handler: \"index.handler\",\n code: bundledCode,\n});\n```\n\n### AWS S3: Static Website\n\n> 💡 See [Static Website with React](examples/website) for a complete working example of a how to deploy a React app to S3.\n\nUse `TypeScriptSource` as one of the `sources` of a [static website deployment](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html#roadmap):\n\n```ts\nimport * as s3 from \"aws-cdk-lib/aws-s3\";\nimport * as s3deploy from \"aws-cdk-lib/aws-s3-deployment\";\nimport { TypeScriptSource } from \"@mrgrain/cdk-esbuild\";\n\nconst websiteBundle = new TypeScriptSource(\"src/index.tsx\");\n\nconst websiteBucket = new s3.Bucket(stack, \"WebsiteBucket\", {\n autoDeleteObjects: true,\n publicReadAccess: true,\n removalPolicy: RemovalPolicy.DESTROY,\n websiteIndexDocument: \"index.html\",\n});\n\nnew s3deploy.BucketDeployment(stack, \"DeployWebsite\", {\n destinationBucket: websiteBucket,\n sources: [websiteBundle],\n});\n```\n\n### Amazon CloudWatch Synthetics: Canary monitoring\n\n> 💡 See [Monitored Website](examples/website) for a complete working example of a deployed and monitored website.\n\nSynthetics runs a canary to produce traffic to an application for monitoring purposes. Use `TypeScriptCode` as the `code` of a Canary test:\n\n> ℹ️ This feature depends on the `@aws-cdk/aws-synthetics-alpha` package which is a developer preview. You may need to update your source code when upgrading to a newer version of this package.\n>\n> ```\n> npm i @aws-cdk/aws-synthetics-alpha\n> ```\n\n```ts\nimport * as synthetics from \"@aws-cdk/aws-synthetics-alpha\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\", {\n buildOptions: {\n outdir: \"nodejs/node_modules\", // This is required by Synthetics\n },\n});\n\nconst canary = new synthetics.Canary(stack, \"MyCanary\", {\n runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_2,\n test: synthetics.Test.custom({\n code: bundledCode,\n handler: \"index.handler\",\n });\n});\n```\n\n## Documentation\n\nThe package exports various different constructs for use with existing CDK features. A major guiding design principal for this package is to _extend, don't replace_. Expect constructs that you can provide as props, not complete replacements.\n\nFor use in **Lambda Functions** and **Synthetic Canaries**, the following classes implement `lambda.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Code.html)) and `synthetics.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-synthetics-alpha.Code.html)):\n\n- `TypeScriptCode` & `JavaScriptCode`\n\nInline code is only supported by **Lambda**:\n\n- `InlineTypeScriptCode` & `InlineJavaScriptCode`\n- `InlineTsxCode` & `InlineJsxCode`\n\nFor use with **S3 bucket deployments**, classes implementing `s3deploy.ISource` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html)):\n\n- `TypeScriptSource` & `JavaScriptSource`\n\n> _Code and Source constructs seamlessly plug-in to other high-level CDK constructs. They share the same set of parameters, props and build options._\n\nThe following classes power the other features. You normally won't have to use them, but they are there if you need them:\n\n- `TypeScriptAsset` & `JavaScriptAsset` implements `s3.Asset` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html)) \\\n creates an asset uploaded to S3 which can be referenced by other constructs\n\n- `EsbuildBundler` implements `core.BundlingOptions` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.BundlingOptions.html)) \\\n provides an interface for a _esbuild_ bundler wherever needed\n\n### [API Reference](API.md)\n\nAuto-generated reference for classes and structs. This information is also available as part of your IDE's code completion.\n\n### Escape hatches\n\nIt's possible that you want to use an implementation of esbuild that's different to the default one. Common reasons are:\n\n- The current version constraints for esbuild are not suitable\n- To use a version of esbuild that is installed by any other means than `npm`, including Docker\n- Plugin support is needed for building\n\nFor these situations, this package offers an escape hatch to bypass regular the implementation and provide a custom build and transform function.\n\n#### Esbuild binary path\n\nIt is possible to override the binary used by esbuild. The usual way to do this is to set the `ESBUILD_BINARY_PATH` environment variable. For convenience this package allows to set the binary path as a prop:\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n esbuildBinaryPath: \"path/to/esbuild/binary\"\n});\n```\n\n#### Custom build function\n\n> 💡 See [Using esbuild with plugins](examples/esbuild-with-plugins) for a complete working example of a custom build function using this escape hatch.\n\nConstructs that result in starting a build, take a `buildFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `buildSync` function.\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n buildFn: (options: BuildOptions): BuildResult => {\n try {\n // custom implementation returning BuildResult\n } catch (error) {\n // throw BuildFailure exception here\n }\n },\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated build options. The custom build function can amend, change or discard any of these. However integration with CDK relies heavily on the values `outdir`/`outfile` are set to and it's usually required to use them unchanged.\n\nFailures have to cause a `BuildFailure` exception in order to be fully handled.\n\n#### Custom transform function\n\nConstructs that result in starting a transformation, take a `transformFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `transformSync` function.\n\n```ts\nnew InlineTypeScriptCode(\"let x: number = 1\", {\n transformFn: (options: TransformOptions): TransformResult => {\n try {\n // custom implementation returning TransformResult\n } catch (error) {\n // throw TransformFailure exception here\n }\n },,\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated transform options. The custom transform function can amend, change or discard any of these.\n\nFailures have to cause a `TransformFailure` exception in order to be fully handled.\n\n### Migrating to v3\n\nThe release of cdk-esbuild v3 brings compatibility with AWS CDK v2. Furthermore all deprecated properties and classes have been removed. In particular `InlineCode` classes now take `TransformerProps` as second parameter instead of transform options.\n\n#### Upgrading\n\n- This version requires AWS CDK v2. Follow the [official migration guide](https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-v2.html) to upgrade.\n- Update the package dependency to v3: `npm install --save @mrgrain/cdk-esbuild@^3.0.0`\n- `esbuild` is installed as an optional dependency. If your setup does not automatically install optional dependencies, make sure to add it as an explicit dependency.\n- Any use of `InlineCode` variations has to be updated. Previously the second parameter was either of type `TransformerProps` or `TransformOptions`. Now it must be `TransformerProps`.\\\n If the passed value is of type `TransformOptions`, turn it into the correct type like this:\n\n ```ts\n const oldOptions: TransformOptions = {...}\n\n new InlineTypeScriptCode('// inline code', {\n transformOptions: oldOptions\n });\n ```\n\n## Versioning\n\nThis package follows [Semantic Versioning](https://semver.org/), with the exception of upgrades to `esbuild`. These will be released as **minor versions** and often include breaking changes from `esbuild`.\n\n### Npm Tags\n\nSome users prefer to use tags over version ranges. The following stable tags are available for use:\n\n- `cdk-v1`, `cdk-v2` are provided for the latest release compatible with each version of the AWS CDK.\n\n- `latest` is the most recent stable release.\n\nThese tags also exist, but usage is strongly not recommended:\n\n- `unstable`, `next` are used for pre-release of the current and next major version respectively.\n\n- ~~`cdk-1.x.x`~~ tags have been deprecated in favour of `cdk-v1`. Use that one instead.\n\n## Roadmap & Contributions\n\n[The project's roadmap is available on GitHub.](https://github.com/mrgrain/cdk-esbuild/projects/1) Please submit any feature requests as issues to the repository.\n\nAll contributions are welcome, no matter if they are for already planned or completely new features.\n\n## Library authors\n\nBuilding a library consumed by other packages that relies on `cdk-esbuild` might require you to set `buildOptions.absWorkingDir`. The easiest way to do this, is to resolve based on the directory name of the calling file, and traverse the tree upwards to the root of your library package (that's where `package.json` and `tsconfig.json` are):\n\n```ts\n// file: project/src/index.ts\nconst props = {\n buildOptions: {\n absWorkingDir: path.resolve(__dirname, \"..\"), // now: /user/project\n },\n};\n```\n\nThis will dynamically resolve to the correct path, wherever the package is installed.\n\nPlease open an issue if you encounter any difficulties.\n"
2803
+ "markdown": "# cdk-esbuild\n\n_CDK constructs for [esbuild](https://github.com/evanw/esbuild), an extremely fast JavaScript bundler_\n\n[Getting started](#getting-started)\n[Documentation](#documentation) | [API Reference](#api-reference) | [Versioning](#versioning) | [Upgrading from AWS CDK v1](#upgrading-from-aws-cdk-v1)\n\n[![View on Construct Hub](https://constructs.dev/badge?package=%40mrgrain%2Fcdk-esbuild)](https://constructs.dev/packages/@mrgrain/cdk-esbuild)\n\n## Why?\n\n_esbuild_ is an extremely fast bundler and minifier for Typescript and JavaScript.\nThis package makes _esbuild_ available to deploy lambda functions, static websites or to publish build artefacts (assets) for further use.\n\nAWS CDK [supports _esbuild_ with Lambda Functions](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-nodejs-readme.html). However the implementation cannot be used with any other Constructs and doesn't expose all of _esbuild_'s build interface.\n\nThis package is running _esbuild_ directly in Node.js and bypasses Docker which the AWS CDK implementation uses. The approach is quicker and easier to use for Node.js users, but incompatible with other languages.\n\n**Production readiness**\n\nThis package is stable and ready to be used in production, as many do. However _esbuild_ has not yet released a version 1.0.0 and its API is still in active development. Please read the guide on [esbuild's production readiness](https://esbuild.github.io/faq/#production-readiness).\n\nNotably upgrades of the _esbuild_ minimum version requirement will be introduced in **minor versions** of this package and will inherit breaking changes from _esbuild_.\n\n## Getting started\n\nInstall `cdk-esbuild`:\n\n```\nnpm install @mrgrain/cdk-esbuild@3\n```\n\nIf _peer_ or _optional dependencies_ are not installed automatically (e.g. when using npm v4-6), please use this command to install all of them:\n\n```\nnpm install @mrgrain/cdk-esbuild@3 esbuild\n```\n\n### AWS Lambda: Serverless function\n\n> 💡 See [Lambda Function](examples/lambda) for a complete working example of a how to deploy a lambda function.\n\nUse `TypeScriptCode` as the `code` of a [lambda function](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#code):\n\n```ts\nimport * as lambda from \"aws-cdk-lib/aws-lambda\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\");\n\nconst fn = new lambda.Function(stack, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_16_X,\n handler: \"index.handler\",\n code: bundledCode,\n});\n```\n\n### AWS S3: Static Website\n\n> 💡 See [Static Website with React](examples/website) for a complete working example of a how to deploy a React app to S3.\n\nUse `TypeScriptSource` as one of the `sources` of a [static website deployment](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html#roadmap):\n\n```ts\nimport * as s3 from \"aws-cdk-lib/aws-s3\";\nimport * as s3deploy from \"aws-cdk-lib/aws-s3-deployment\";\nimport { TypeScriptSource } from \"@mrgrain/cdk-esbuild\";\n\nconst websiteBundle = new TypeScriptSource(\"src/index.tsx\");\n\nconst websiteBucket = new s3.Bucket(stack, \"WebsiteBucket\", {\n autoDeleteObjects: true,\n publicReadAccess: true,\n removalPolicy: RemovalPolicy.DESTROY,\n websiteIndexDocument: \"index.html\",\n});\n\nnew s3deploy.BucketDeployment(stack, \"DeployWebsite\", {\n destinationBucket: websiteBucket,\n sources: [websiteBundle],\n});\n```\n\n### Amazon CloudWatch Synthetics: Canary monitoring\n\n> 💡 See [Monitored Website](examples/website) for a complete working example of a deployed and monitored website.\n\nSynthetics runs a canary to produce traffic to an application for monitoring purposes. Use `TypeScriptCode` as the `code` of a Canary test:\n\n> ℹ️ This feature depends on the `@aws-cdk/aws-synthetics-alpha` package which is a developer preview. You may need to update your source code when upgrading to a newer version of this package.\n>\n> ```\n> npm i @aws-cdk/aws-synthetics-alpha\n> ```\n\n```ts\nimport * as synthetics from \"@aws-cdk/aws-synthetics-alpha\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\", {\n buildOptions: {\n outdir: \"nodejs/node_modules\", // This is required by Synthetics\n },\n});\n\nconst canary = new synthetics.Canary(stack, \"MyCanary\", {\n runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_2,\n test: synthetics.Test.custom({\n code: bundledCode,\n handler: \"index.handler\",\n });\n});\n```\n\n## Documentation\n\nThe package exports various different constructs for use with existing CDK features. A major guiding design principal for this package is to _extend, don't replace_. Expect constructs that you can provide as props, not complete replacements.\n\nFor use in **Lambda Functions** and **Synthetic Canaries**, the following classes implement `lambda.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Code.html)) and `synthetics.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-synthetics-alpha.Code.html)):\n\n- `TypeScriptCode` & `JavaScriptCode`\n\nInline code is only supported by **Lambda**:\n\n- `InlineTypeScriptCode` & `InlineJavaScriptCode`\n- `InlineTsxCode` & `InlineJsxCode`\n\nFor use with **S3 bucket deployments**, classes implementing `s3deploy.ISource` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html)):\n\n- `TypeScriptSource` & `JavaScriptSource`\n\n> _Code and Source constructs seamlessly plug-in to other high-level CDK constructs. They share the same set of parameters, props and build options._\n\nThe following classes power the other features. You normally won't have to use them, but they are there if you need them:\n\n- `TypeScriptAsset` & `JavaScriptAsset` implements `s3.Asset` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html)) \\\n creates an asset uploaded to S3 which can be referenced by other constructs\n\n- `EsbuildBundler` implements `core.BundlingOptions` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.BundlingOptions.html)) \\\n provides an interface for a _esbuild_ bundler wherever needed\n\n### [API Reference](API.md)\n\nAuto-generated reference for classes and structs. This information is also available as part of your IDE's code completion.\n\n### Escape hatches\n\nIt's possible that you want to use an implementation of esbuild that's different to the default one. Common reasons are:\n\n- The current version constraints for esbuild are not suitable\n- To use a version of esbuild that is installed by any other means than `npm`, including Docker\n- Plugin support is needed for building\n\nFor these situations, this package offers an escape hatch to bypass regular the implementation and provide a custom build and transform function.\n\n#### Esbuild binary path\n\nIt is possible to override the binary used by esbuild. The usual way to do this is to set the `ESBUILD_BINARY_PATH` environment variable. For convenience this package allows to set the binary path as a prop:\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n esbuildBinaryPath: \"path/to/esbuild/binary\"\n});\n```\n\n#### Custom build function\n\n> 💡 See [Using esbuild with plugins](examples/esbuild-with-plugins) for a complete working example of a custom build function using this escape hatch.\n\nConstructs that result in starting a build, take a `buildFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `buildSync` function.\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n buildFn: (options: BuildOptions): BuildResult => {\n try {\n // custom implementation returning BuildResult\n } catch (error) {\n // throw BuildFailure exception here\n }\n },\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated build options. The custom build function can amend, change or discard any of these. However integration with CDK relies heavily on the values `outdir`/`outfile` are set to and it's usually required to use them unchanged.\n\nFailures have to cause a `BuildFailure` exception in order to be fully handled.\n\n#### Custom transform function\n\nConstructs that result in starting a transformation, take a `transformFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `transformSync` function.\n\n```ts\nnew InlineTypeScriptCode(\"let x: number = 1\", {\n transformFn: (options: TransformOptions): TransformResult => {\n try {\n // custom implementation returning TransformResult\n } catch (error) {\n // throw TransformFailure exception here\n }\n },,\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated transform options. The custom transform function can amend, change or discard any of these.\n\nFailures have to cause a `TransformFailure` exception in order to be fully handled.\n\n### Upgrading from AWS CDK v1\n\nThis version is compatible with AWS CDK v2. For the previous, AWS CDK v1 compatible release, see [cdk-esbuild@v2](https://github.com/mrgrain/cdk-esbuild/tree/v2).\n\nTo upgrade from AWS CDK v1 and cdk-esbuild@v2, please follow these steps:\n\n- This version requires AWS CDK v2. Follow the [official migration guide](https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-v2.html) to upgrade.\n- Update the package dependency to v3: `npm install --save @mrgrain/cdk-esbuild@^3.0.0`\n- `esbuild` is installed as an optional dependency. If your setup does not automatically install optional dependencies, make sure to add it as an explicit dependency.\n- Any use of `InlineCode` variations has to be updated. Previously the second parameter was either of type `TransformerProps` or `TransformOptions`. Now it must be `TransformerProps`.\\\n If the passed value is of type `TransformOptions`, turn it into the correct type like this:\n\n ```ts\n const oldOptions: TransformOptions = {...}\n\n new InlineTypeScriptCode('// inline code', {\n transformOptions: oldOptions\n });\n ```\n\n## Versioning\n\nThis package follows [Semantic Versioning](https://semver.org/), with the exception of upgrades to `esbuild`. These will be released as **minor versions** and often include breaking changes from `esbuild`.\n\n### Npm Tags\n\nSome users prefer to use tags over version ranges. The following stable tags are available for use:\n\n- `cdk-v1`, `cdk-v2` are provided for the latest release compatible with each version of the AWS CDK.\n\n- `latest` is the most recent stable release.\n\nThese tags also exist, but usage is strongly not recommended:\n\n- `unstable`, `next` are used for pre-release of the current and next major version respectively.\n\n- ~~`cdk-1.x.x`~~ tags have been deprecated in favour of `cdk-v1`. Use that one instead.\n\n## Roadmap & Contributions\n\n[The project's roadmap is available on GitHub.](https://github.com/mrgrain/cdk-esbuild/projects/1) Please submit any feature requests as issues to the repository.\n\nAll contributions are welcome, no matter if they are for already planned or completely new features.\n\n## Library authors\n\nBuilding a library consumed by other packages that relies on `cdk-esbuild` might require you to set `buildOptions.absWorkingDir`. The easiest way to do this, is to resolve based on the directory name of the calling file, and traverse the tree upwards to the root of your library package (that's where `package.json` and `tsconfig.json` are):\n\n```ts\n// file: project/src/index.ts\nconst props = {\n buildOptions: {\n absWorkingDir: path.resolve(__dirname, \"..\"), // now: /user/project\n },\n};\n```\n\nThis will dynamically resolve to the correct path, wherever the package is installed.\n\nPlease open an issue if you encounter any difficulties.\n"
2807
2804
  },
2808
2805
  "repository": {
2809
2806
  "type": "git",
@@ -2820,51 +2817,6 @@
2820
2817
  }
2821
2818
  },
2822
2819
  "types": {
2823
- "@mrgrain/cdk-esbuild.Asset": {
2824
- "abstract": true,
2825
- "assembly": "@mrgrain/cdk-esbuild",
2826
- "base": "aws-cdk-lib.aws_s3_assets.Asset",
2827
- "docs": {
2828
- "stability": "stable"
2829
- },
2830
- "fqn": "@mrgrain/cdk-esbuild.Asset",
2831
- "initializer": {
2832
- "docs": {
2833
- "stability": "stable"
2834
- },
2835
- "locationInModule": {
2836
- "filename": "src/asset.ts",
2837
- "line": 42
2838
- },
2839
- "parameters": [
2840
- {
2841
- "name": "scope",
2842
- "type": {
2843
- "fqn": "constructs.Construct"
2844
- }
2845
- },
2846
- {
2847
- "name": "id",
2848
- "type": {
2849
- "primitive": "string"
2850
- }
2851
- },
2852
- {
2853
- "name": "props",
2854
- "type": {
2855
- "fqn": "@mrgrain/cdk-esbuild.AssetProps"
2856
- }
2857
- }
2858
- ]
2859
- },
2860
- "kind": "class",
2861
- "locationInModule": {
2862
- "filename": "src/asset.ts",
2863
- "line": 38
2864
- },
2865
- "name": "Asset",
2866
- "symbolId": "src/asset:Asset"
2867
- },
2868
2820
  "@mrgrain/cdk-esbuild.AssetProps": {
2869
2821
  "assembly": "@mrgrain/cdk-esbuild",
2870
2822
  "datatype": true,
@@ -2952,7 +2904,7 @@
2952
2904
  "kind": "interface",
2953
2905
  "locationInModule": {
2954
2906
  "filename": "src/esbuild-types.ts",
2955
- "line": 76
2907
+ "line": 78
2956
2908
  },
2957
2909
  "name": "BuildOptions",
2958
2910
  "properties": [
@@ -2965,7 +2917,7 @@
2965
2917
  "immutable": true,
2966
2918
  "locationInModule": {
2967
2919
  "filename": "src/esbuild-types.ts",
2968
- "line": 128
2920
+ "line": 130
2969
2921
  },
2970
2922
  "name": "absWorkingDir",
2971
2923
  "optional": true,
@@ -2982,7 +2934,7 @@
2982
2934
  "immutable": true,
2983
2935
  "locationInModule": {
2984
2936
  "filename": "src/esbuild-types.ts",
2985
- "line": 106
2937
+ "line": 108
2986
2938
  },
2987
2939
  "name": "allowOverwrite",
2988
2940
  "optional": true,
@@ -2999,7 +2951,7 @@
2999
2951
  "immutable": true,
3000
2952
  "locationInModule": {
3001
2953
  "filename": "src/esbuild-types.ts",
3002
- "line": 118
2954
+ "line": 120
3003
2955
  },
3004
2956
  "name": "assetNames",
3005
2957
  "optional": true,
@@ -3016,7 +2968,7 @@
3016
2968
  "immutable": true,
3017
2969
  "locationInModule": {
3018
2970
  "filename": "src/esbuild-types.ts",
3019
- "line": 122
2971
+ "line": 124
3020
2972
  },
3021
2973
  "name": "banner",
3022
2974
  "optional": true,
@@ -3038,7 +2990,7 @@
3038
2990
  "immutable": true,
3039
2991
  "locationInModule": {
3040
2992
  "filename": "src/esbuild-types.ts",
3041
- "line": 78
2993
+ "line": 80
3042
2994
  },
3043
2995
  "name": "bundle",
3044
2996
  "optional": true,
@@ -3055,7 +3007,7 @@
3055
3007
  "immutable": true,
3056
3008
  "locationInModule": {
3057
3009
  "filename": "src/esbuild-types.ts",
3058
- "line": 46
3010
+ "line": 48
3059
3011
  },
3060
3012
  "name": "charset",
3061
3013
  "optional": true,
@@ -3072,7 +3024,7 @@
3072
3024
  "immutable": true,
3073
3025
  "locationInModule": {
3074
3026
  "filename": "src/esbuild-types.ts",
3075
- "line": 116
3027
+ "line": 118
3076
3028
  },
3077
3029
  "name": "chunkNames",
3078
3030
  "optional": true,
@@ -3089,7 +3041,7 @@
3089
3041
  "immutable": true,
3090
3042
  "locationInModule": {
3091
3043
  "filename": "src/esbuild-types.ts",
3092
- "line": 67
3044
+ "line": 69
3093
3045
  },
3094
3046
  "name": "color",
3095
3047
  "optional": true,
@@ -3106,7 +3058,7 @@
3106
3058
  "immutable": true,
3107
3059
  "locationInModule": {
3108
3060
  "filename": "src/esbuild-types.ts",
3109
- "line": 102
3061
+ "line": 104
3110
3062
  },
3111
3063
  "name": "conditions",
3112
3064
  "optional": true,
@@ -3128,7 +3080,7 @@
3128
3080
  "immutable": true,
3129
3081
  "locationInModule": {
3130
3082
  "filename": "src/esbuild-types.ts",
3131
- "line": 60
3083
+ "line": 62
3132
3084
  },
3133
3085
  "name": "define",
3134
3086
  "optional": true,
@@ -3150,7 +3102,7 @@
3150
3102
  "immutable": true,
3151
3103
  "locationInModule": {
3152
3104
  "filename": "src/esbuild-types.ts",
3153
- "line": 36
3105
+ "line": 38
3154
3106
  },
3155
3107
  "name": "drop",
3156
3108
  "optional": true,
@@ -3172,7 +3124,7 @@
3172
3124
  "immutable": true,
3173
3125
  "locationInModule": {
3174
3126
  "filename": "src/esbuild-types.ts",
3175
- "line": 114
3127
+ "line": 116
3176
3128
  },
3177
3129
  "name": "entryNames",
3178
3130
  "optional": true,
@@ -3189,7 +3141,7 @@
3189
3141
  "immutable": true,
3190
3142
  "locationInModule": {
3191
3143
  "filename": "src/esbuild-types.ts",
3192
- "line": 94
3144
+ "line": 96
3193
3145
  },
3194
3146
  "name": "external",
3195
3147
  "optional": true,
@@ -3211,7 +3163,7 @@
3211
3163
  "immutable": true,
3212
3164
  "locationInModule": {
3213
3165
  "filename": "src/esbuild-types.ts",
3214
- "line": 124
3166
+ "line": 126
3215
3167
  },
3216
3168
  "name": "footer",
3217
3169
  "optional": true,
@@ -3267,7 +3219,7 @@
3267
3219
  "immutable": true,
3268
3220
  "locationInModule": {
3269
3221
  "filename": "src/esbuild-types.ts",
3270
- "line": 50
3222
+ "line": 52
3271
3223
  },
3272
3224
  "name": "ignoreAnnotations",
3273
3225
  "optional": true,
@@ -3284,7 +3236,7 @@
3284
3236
  "immutable": true,
3285
3237
  "locationInModule": {
3286
3238
  "filename": "src/esbuild-types.ts",
3287
- "line": 126
3239
+ "line": 128
3288
3240
  },
3289
3241
  "name": "incremental",
3290
3242
  "optional": true,
@@ -3301,7 +3253,7 @@
3301
3253
  "immutable": true,
3302
3254
  "locationInModule": {
3303
3255
  "filename": "src/esbuild-types.ts",
3304
- "line": 120
3256
+ "line": 122
3305
3257
  },
3306
3258
  "name": "inject",
3307
3259
  "optional": true,
@@ -3323,7 +3275,7 @@
3323
3275
  "immutable": true,
3324
3276
  "locationInModule": {
3325
3277
  "filename": "src/esbuild-types.ts",
3326
- "line": 53
3278
+ "line": 55
3327
3279
  },
3328
3280
  "name": "jsx",
3329
3281
  "optional": true,
@@ -3340,7 +3292,7 @@
3340
3292
  "immutable": true,
3341
3293
  "locationInModule": {
3342
3294
  "filename": "src/esbuild-types.ts",
3343
- "line": 55
3295
+ "line": 57
3344
3296
  },
3345
3297
  "name": "jsxFactory",
3346
3298
  "optional": true,
@@ -3357,7 +3309,7 @@
3357
3309
  "immutable": true,
3358
3310
  "locationInModule": {
3359
3311
  "filename": "src/esbuild-types.ts",
3360
- "line": 57
3312
+ "line": 59
3361
3313
  },
3362
3314
  "name": "jsxFragment",
3363
3315
  "optional": true,
@@ -3374,7 +3326,7 @@
3374
3326
  "immutable": true,
3375
3327
  "locationInModule": {
3376
3328
  "filename": "src/esbuild-types.ts",
3377
- "line": 64
3329
+ "line": 66
3378
3330
  },
3379
3331
  "name": "keepNames",
3380
3332
  "optional": true,
@@ -3408,7 +3360,7 @@
3408
3360
  "immutable": true,
3409
3361
  "locationInModule": {
3410
3362
  "filename": "src/esbuild-types.ts",
3411
- "line": 96
3363
+ "line": 98
3412
3364
  },
3413
3365
  "name": "loader",
3414
3366
  "optional": true,
@@ -3430,7 +3382,7 @@
3430
3382
  "immutable": true,
3431
3383
  "locationInModule": {
3432
3384
  "filename": "src/esbuild-types.ts",
3433
- "line": 69
3385
+ "line": 71
3434
3386
  },
3435
3387
  "name": "logLevel",
3436
3388
  "optional": true,
@@ -3447,7 +3399,7 @@
3447
3399
  "immutable": true,
3448
3400
  "locationInModule": {
3449
3401
  "filename": "src/esbuild-types.ts",
3450
- "line": 71
3402
+ "line": 73
3451
3403
  },
3452
3404
  "name": "logLimit",
3453
3405
  "optional": true,
@@ -3464,7 +3416,7 @@
3464
3416
  "immutable": true,
3465
3417
  "locationInModule": {
3466
3418
  "filename": "src/esbuild-types.ts",
3467
- "line": 73
3419
+ "line": 75
3468
3420
  },
3469
3421
  "name": "logOverride",
3470
3422
  "optional": true,
@@ -3486,7 +3438,7 @@
3486
3438
  "immutable": true,
3487
3439
  "locationInModule": {
3488
3440
  "filename": "src/esbuild-types.ts",
3489
- "line": 100
3441
+ "line": 102
3490
3442
  },
3491
3443
  "name": "mainFields",
3492
3444
  "optional": true,
@@ -3508,7 +3460,7 @@
3508
3460
  "immutable": true,
3509
3461
  "locationInModule": {
3510
3462
  "filename": "src/esbuild-types.ts",
3511
- "line": 34
3463
+ "line": 36
3512
3464
  },
3513
3465
  "name": "mangleCache",
3514
3466
  "optional": true,
@@ -3539,7 +3491,7 @@
3539
3491
  "immutable": true,
3540
3492
  "locationInModule": {
3541
3493
  "filename": "src/esbuild-types.ts",
3542
- "line": 28
3494
+ "line": 30
3543
3495
  },
3544
3496
  "name": "mangleProps",
3545
3497
  "optional": true,
@@ -3556,7 +3508,7 @@
3556
3508
  "immutable": true,
3557
3509
  "locationInModule": {
3558
3510
  "filename": "src/esbuild-types.ts",
3559
- "line": 32
3511
+ "line": 34
3560
3512
  },
3561
3513
  "name": "mangleQuoted",
3562
3514
  "optional": true,
@@ -3573,7 +3525,7 @@
3573
3525
  "immutable": true,
3574
3526
  "locationInModule": {
3575
3527
  "filename": "src/esbuild-types.ts",
3576
- "line": 86
3528
+ "line": 88
3577
3529
  },
3578
3530
  "name": "metafile",
3579
3531
  "optional": true,
@@ -3590,7 +3542,7 @@
3590
3542
  "immutable": true,
3591
3543
  "locationInModule": {
3592
3544
  "filename": "src/esbuild-types.ts",
3593
- "line": 38
3545
+ "line": 40
3594
3546
  },
3595
3547
  "name": "minify",
3596
3548
  "optional": true,
@@ -3607,7 +3559,7 @@
3607
3559
  "immutable": true,
3608
3560
  "locationInModule": {
3609
3561
  "filename": "src/esbuild-types.ts",
3610
- "line": 42
3562
+ "line": 44
3611
3563
  },
3612
3564
  "name": "minifyIdentifiers",
3613
3565
  "optional": true,
@@ -3624,7 +3576,7 @@
3624
3576
  "immutable": true,
3625
3577
  "locationInModule": {
3626
3578
  "filename": "src/esbuild-types.ts",
3627
- "line": 44
3579
+ "line": 46
3628
3580
  },
3629
3581
  "name": "minifySyntax",
3630
3582
  "optional": true,
@@ -3641,7 +3593,7 @@
3641
3593
  "immutable": true,
3642
3594
  "locationInModule": {
3643
3595
  "filename": "src/esbuild-types.ts",
3644
- "line": 40
3596
+ "line": 42
3645
3597
  },
3646
3598
  "name": "minifyWhitespace",
3647
3599
  "optional": true,
@@ -3658,7 +3610,7 @@
3658
3610
  "immutable": true,
3659
3611
  "locationInModule": {
3660
3612
  "filename": "src/esbuild-types.ts",
3661
- "line": 130
3613
+ "line": 132
3662
3614
  },
3663
3615
  "name": "nodePaths",
3664
3616
  "optional": true,
@@ -3680,7 +3632,7 @@
3680
3632
  "immutable": true,
3681
3633
  "locationInModule": {
3682
3634
  "filename": "src/esbuild-types.ts",
3683
- "line": 90
3635
+ "line": 92
3684
3636
  },
3685
3637
  "name": "outbase",
3686
3638
  "optional": true,
@@ -3697,7 +3649,7 @@
3697
3649
  "immutable": true,
3698
3650
  "locationInModule": {
3699
3651
  "filename": "src/esbuild-types.ts",
3700
- "line": 88
3652
+ "line": 90
3701
3653
  },
3702
3654
  "name": "outdir",
3703
3655
  "optional": true,
@@ -3714,7 +3666,7 @@
3714
3666
  "immutable": true,
3715
3667
  "locationInModule": {
3716
3668
  "filename": "src/esbuild-types.ts",
3717
- "line": 110
3669
+ "line": 112
3718
3670
  },
3719
3671
  "name": "outExtension",
3720
3672
  "optional": true,
@@ -3736,7 +3688,7 @@
3736
3688
  "immutable": true,
3737
3689
  "locationInModule": {
3738
3690
  "filename": "src/esbuild-types.ts",
3739
- "line": 84
3691
+ "line": 86
3740
3692
  },
3741
3693
  "name": "outfile",
3742
3694
  "optional": true,
@@ -3753,7 +3705,7 @@
3753
3705
  "immutable": true,
3754
3706
  "locationInModule": {
3755
3707
  "filename": "src/esbuild-types.ts",
3756
- "line": 92
3708
+ "line": 94
3757
3709
  },
3758
3710
  "name": "platform",
3759
3711
  "optional": true,
@@ -3770,7 +3722,7 @@
3770
3722
  "immutable": true,
3771
3723
  "locationInModule": {
3772
3724
  "filename": "src/esbuild-types.ts",
3773
- "line": 82
3725
+ "line": 84
3774
3726
  },
3775
3727
  "name": "preserveSymlinks",
3776
3728
  "optional": true,
@@ -3787,7 +3739,7 @@
3787
3739
  "immutable": true,
3788
3740
  "locationInModule": {
3789
3741
  "filename": "src/esbuild-types.ts",
3790
- "line": 112
3742
+ "line": 114
3791
3743
  },
3792
3744
  "name": "publicPath",
3793
3745
  "optional": true,
@@ -3804,7 +3756,7 @@
3804
3756
  "immutable": true,
3805
3757
  "locationInModule": {
3806
3758
  "filename": "src/esbuild-types.ts",
3807
- "line": 62
3759
+ "line": 64
3808
3760
  },
3809
3761
  "name": "pure",
3810
3762
  "optional": true,
@@ -3826,7 +3778,7 @@
3826
3778
  "immutable": true,
3827
3779
  "locationInModule": {
3828
3780
  "filename": "src/esbuild-types.ts",
3829
- "line": 30
3781
+ "line": 32
3830
3782
  },
3831
3783
  "name": "reserveProps",
3832
3784
  "optional": true,
@@ -3843,7 +3795,7 @@
3843
3795
  "immutable": true,
3844
3796
  "locationInModule": {
3845
3797
  "filename": "src/esbuild-types.ts",
3846
- "line": 98
3798
+ "line": 100
3847
3799
  },
3848
3800
  "name": "resolveExtensions",
3849
3801
  "optional": true,
@@ -3925,7 +3877,7 @@
3925
3877
  "immutable": true,
3926
3878
  "locationInModule": {
3927
3879
  "filename": "src/esbuild-types.ts",
3928
- "line": 80
3880
+ "line": 82
3929
3881
  },
3930
3882
  "name": "splitting",
3931
3883
  "optional": true,
@@ -3933,6 +3885,28 @@
3933
3885
  "primitive": "boolean"
3934
3886
  }
3935
3887
  },
3888
+ {
3889
+ "abstract": true,
3890
+ "docs": {
3891
+ "stability": "stable",
3892
+ "summary": "Documentation: https://esbuild.github.io/api/#supported."
3893
+ },
3894
+ "immutable": true,
3895
+ "locationInModule": {
3896
+ "filename": "src/esbuild-types.ts",
3897
+ "line": 27
3898
+ },
3899
+ "name": "supported",
3900
+ "optional": true,
3901
+ "type": {
3902
+ "collection": {
3903
+ "elementtype": {
3904
+ "primitive": "boolean"
3905
+ },
3906
+ "kind": "map"
3907
+ }
3908
+ }
3909
+ },
3936
3910
  {
3937
3911
  "abstract": true,
3938
3912
  "docs": {
@@ -3973,7 +3947,7 @@
3973
3947
  "immutable": true,
3974
3948
  "locationInModule": {
3975
3949
  "filename": "src/esbuild-types.ts",
3976
- "line": 48
3950
+ "line": 50
3977
3951
  },
3978
3952
  "name": "treeShaking",
3979
3953
  "optional": true,
@@ -3990,7 +3964,7 @@
3990
3964
  "immutable": true,
3991
3965
  "locationInModule": {
3992
3966
  "filename": "src/esbuild-types.ts",
3993
- "line": 108
3967
+ "line": 110
3994
3968
  },
3995
3969
  "name": "tsconfig",
3996
3970
  "optional": true,
@@ -4007,7 +3981,7 @@
4007
3981
  "immutable": true,
4008
3982
  "locationInModule": {
4009
3983
  "filename": "src/esbuild-types.ts",
4010
- "line": 104
3984
+ "line": 106
4011
3985
  },
4012
3986
  "name": "write",
4013
3987
  "optional": true,
@@ -4150,172 +4124,203 @@
4150
4124
  ],
4151
4125
  "symbolId": "src/bundler:BundlerProps"
4152
4126
  },
4153
- "@mrgrain/cdk-esbuild.Code": {
4154
- "abstract": true,
4127
+ "@mrgrain/cdk-esbuild.CodeConfig": {
4155
4128
  "assembly": "@mrgrain/cdk-esbuild",
4156
- "base": "aws-cdk-lib.aws_lambda.Code",
4129
+ "datatype": true,
4157
4130
  "docs": {
4158
- "stability": "stable"
4159
- },
4160
- "fqn": "@mrgrain/cdk-esbuild.Code",
4161
- "initializer": {
4162
- "docs": {
4163
- "stability": "stable"
4164
- },
4165
- "locationInModule": {
4166
- "filename": "src/code.ts",
4167
- "line": 43
4168
- },
4169
- "parameters": [
4170
- {
4171
- "docs": {
4172
- "remarks": "Use `props.buildOptions.absWorkingDir` if an absolute path is required.",
4173
- "summary": "- Relative path to the asset code."
4174
- },
4175
- "name": "entryPoints",
4176
- "type": {
4177
- "union": {
4178
- "types": [
4179
- {
4180
- "primitive": "string"
4181
- },
4182
- {
4183
- "collection": {
4184
- "elementtype": {
4185
- "primitive": "string"
4186
- },
4187
- "kind": "array"
4188
- }
4189
- },
4190
- {
4191
- "collection": {
4192
- "elementtype": {
4193
- "primitive": "string"
4194
- },
4195
- "kind": "map"
4196
- }
4197
- }
4198
- ]
4199
- }
4200
- }
4201
- },
4202
- {
4203
- "docs": {
4204
- "summary": "- Asset properties."
4205
- },
4206
- "name": "props",
4207
- "type": {
4208
- "union": {
4209
- "types": [
4210
- {
4211
- "fqn": "@mrgrain/cdk-esbuild.JavaScriptCodeProps"
4212
- },
4213
- {
4214
- "fqn": "@mrgrain/cdk-esbuild.TypeScriptCodeProps"
4215
- }
4216
- ]
4217
- }
4218
- }
4219
- }
4220
- ]
4131
+ "stability": "stable",
4132
+ "summary": "Result of binding `Code` into a `Function`."
4221
4133
  },
4222
- "kind": "class",
4134
+ "fqn": "@mrgrain/cdk-esbuild.CodeConfig",
4135
+ "kind": "interface",
4223
4136
  "locationInModule": {
4224
- "filename": "src/code.ts",
4225
- "line": 22
4137
+ "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4138
+ "line": 94
4226
4139
  },
4227
- "methods": [
4140
+ "name": "CodeConfig",
4141
+ "properties": [
4228
4142
  {
4143
+ "abstract": true,
4229
4144
  "docs": {
4145
+ "default": "- code is not an ECR container image",
4230
4146
  "stability": "stable",
4231
- "summary": "Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun."
4147
+ "summary": "Docker image configuration (mutually exclusive with `s3Location` and `inlineCode`)."
4232
4148
  },
4149
+ "immutable": true,
4233
4150
  "locationInModule": {
4234
- "filename": "src/code.ts",
4235
- "line": 62
4151
+ "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4152
+ "line": 115
4236
4153
  },
4237
- "name": "bind",
4238
- "overrides": "aws-cdk-lib.aws_lambda.Code",
4239
- "parameters": [
4240
- {
4241
- "name": "scope",
4242
- "type": {
4243
- "fqn": "constructs.Construct"
4244
- }
4245
- }
4246
- ],
4247
- "returns": {
4248
- "type": {
4249
- "fqn": "aws-cdk-lib.aws_lambda.CodeConfig"
4250
- }
4154
+ "name": "image",
4155
+ "optional": true,
4156
+ "type": {
4157
+ "fqn": "aws-cdk-lib.aws_lambda.CodeImageConfig"
4251
4158
  }
4252
4159
  },
4253
4160
  {
4161
+ "abstract": true,
4254
4162
  "docs": {
4255
- "remarks": "Specifically it's required to allow assets to add\nmetadata for tooling like SAM CLI to be able to find their origins.",
4163
+ "default": "- code is not inline code",
4256
4164
  "stability": "stable",
4257
- "summary": "Called after the CFN function resource has been created to allow the code class to bind to it."
4165
+ "summary": "Inline code (mutually exclusive with `s3Location` and `image`)."
4258
4166
  },
4167
+ "immutable": true,
4259
4168
  "locationInModule": {
4260
- "filename": "src/code.ts",
4261
- "line": 90
4169
+ "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4170
+ "line": 108
4262
4171
  },
4263
- "name": "bindToResource",
4264
- "overrides": "aws-cdk-lib.aws_lambda.Code",
4265
- "parameters": [
4266
- {
4267
- "name": "resource",
4268
- "type": {
4269
- "fqn": "aws-cdk-lib.CfnResource"
4270
- }
4271
- },
4272
- {
4273
- "name": "options",
4274
- "optional": true,
4275
- "type": {
4276
- "fqn": "aws-cdk-lib.aws_lambda.ResourceBindOptions"
4277
- }
4278
- }
4279
- ]
4172
+ "name": "inlineCode",
4173
+ "optional": true,
4174
+ "type": {
4175
+ "primitive": "string"
4176
+ }
4280
4177
  },
4281
4178
  {
4282
4179
  "abstract": true,
4283
4180
  "docs": {
4284
- "stability": "stable"
4181
+ "default": "- code is not an s3 location",
4182
+ "stability": "stable",
4183
+ "summary": "The location of the code in S3 (mutually exclusive with `inlineCode` and `image`)."
4285
4184
  },
4185
+ "immutable": true,
4286
4186
  "locationInModule": {
4287
- "filename": "src/code.ts",
4288
- "line": 25
4187
+ "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4188
+ "line": 101
4289
4189
  },
4290
- "name": "getAsset",
4291
- "parameters": [
4292
- {
4293
- "name": "scope",
4294
- "type": {
4295
- "fqn": "constructs.Construct"
4190
+ "name": "s3Location",
4191
+ "optional": true,
4192
+ "type": {
4193
+ "fqn": "aws-cdk-lib.aws_s3.Location"
4194
+ }
4195
+ }
4196
+ ],
4197
+ "symbolId": "aws-lambda/lib/code:CodeConfig"
4198
+ },
4199
+ "@mrgrain/cdk-esbuild.EsbuildAsset": {
4200
+ "assembly": "@mrgrain/cdk-esbuild",
4201
+ "base": "aws-cdk-lib.aws_s3_assets.Asset",
4202
+ "docs": {
4203
+ "remarks": "You should always use `TypeScriptAsset` or `JavaScriptAsset`.",
4204
+ "stability": "experimental",
4205
+ "summary": "Represents a generic esbuild asset."
4206
+ },
4207
+ "fqn": "@mrgrain/cdk-esbuild.EsbuildAsset",
4208
+ "initializer": {
4209
+ "docs": {
4210
+ "stability": "stable"
4211
+ },
4212
+ "locationInModule": {
4213
+ "filename": "src/asset.ts",
4214
+ "line": 46
4215
+ },
4216
+ "parameters": [
4217
+ {
4218
+ "name": "scope",
4219
+ "type": {
4220
+ "fqn": "constructs.Construct"
4221
+ }
4222
+ },
4223
+ {
4224
+ "name": "id",
4225
+ "type": {
4226
+ "primitive": "string"
4227
+ }
4228
+ },
4229
+ {
4230
+ "name": "props",
4231
+ "type": {
4232
+ "fqn": "@mrgrain/cdk-esbuild.AssetProps"
4233
+ }
4234
+ }
4235
+ ]
4236
+ },
4237
+ "kind": "class",
4238
+ "locationInModule": {
4239
+ "filename": "src/asset.ts",
4240
+ "line": 42
4241
+ },
4242
+ "name": "EsbuildAsset",
4243
+ "symbolId": "src/asset:EsbuildAsset"
4244
+ },
4245
+ "@mrgrain/cdk-esbuild.EsbuildBundler": {
4246
+ "assembly": "@mrgrain/cdk-esbuild",
4247
+ "docs": {
4248
+ "remarks": "This class directly interfaces with esbuild and provides almost no configuration safeguards.",
4249
+ "stability": "experimental",
4250
+ "summary": "Low-level construct that can be used where `BundlingOptions` are required."
4251
+ },
4252
+ "fqn": "@mrgrain/cdk-esbuild.EsbuildBundler",
4253
+ "initializer": {
4254
+ "docs": {
4255
+ "stability": "experimental"
4256
+ },
4257
+ "locationInModule": {
4258
+ "filename": "src/bundler.ts",
4259
+ "line": 115
4260
+ },
4261
+ "parameters": [
4262
+ {
4263
+ "docs": {
4264
+ "remarks": "E.g. `src/index.ts`.",
4265
+ "stability": "experimental",
4266
+ "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
4267
+ },
4268
+ "name": "entryPoints",
4269
+ "type": {
4270
+ "union": {
4271
+ "types": [
4272
+ {
4273
+ "primitive": "string"
4274
+ },
4275
+ {
4276
+ "collection": {
4277
+ "elementtype": {
4278
+ "primitive": "string"
4279
+ },
4280
+ "kind": "array"
4281
+ }
4282
+ },
4283
+ {
4284
+ "collection": {
4285
+ "elementtype": {
4286
+ "primitive": "string"
4287
+ },
4288
+ "kind": "map"
4289
+ }
4290
+ }
4291
+ ]
4296
4292
  }
4297
4293
  }
4298
- ],
4299
- "protected": true,
4300
- "returns": {
4294
+ },
4295
+ {
4296
+ "docs": {
4297
+ "stability": "experimental",
4298
+ "summary": "Props to change the behaviour of the bundler."
4299
+ },
4300
+ "name": "props",
4301
4301
  "type": {
4302
- "fqn": "@mrgrain/cdk-esbuild.Asset"
4302
+ "fqn": "@mrgrain/cdk-esbuild.BundlerProps"
4303
4303
  }
4304
4304
  }
4305
- }
4306
- ],
4307
- "name": "Code",
4305
+ ]
4306
+ },
4307
+ "kind": "class",
4308
+ "locationInModule": {
4309
+ "filename": "src/bundler.ts",
4310
+ "line": 97
4311
+ },
4312
+ "name": "EsbuildBundler",
4308
4313
  "properties": [
4309
4314
  {
4310
4315
  "docs": {
4311
- "remarks": "Use `props.buildOptions.absWorkingDir` if an absolute path is required.",
4312
- "stability": "stable",
4313
- "summary": "- Relative path to the asset code."
4316
+ "remarks": "E.g. `src/index.ts`.",
4317
+ "stability": "experimental",
4318
+ "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
4314
4319
  },
4315
4320
  "immutable": true,
4316
4321
  "locationInModule": {
4317
- "filename": "src/code.ts",
4318
- "line": 43
4322
+ "filename": "src/bundler.ts",
4323
+ "line": 122
4319
4324
  },
4320
4325
  "name": "entryPoints",
4321
4326
  "type": {
@@ -4346,143 +4351,74 @@
4346
4351
  },
4347
4352
  {
4348
4353
  "docs": {
4349
- "stability": "stable"
4350
- },
4351
- "locationInModule": {
4352
- "filename": "src/code.ts",
4353
- "line": 29
4354
- },
4355
- "name": "asset",
4356
- "protected": true,
4357
- "type": {
4358
- "fqn": "@mrgrain/cdk-esbuild.Asset"
4359
- }
4360
- },
4361
- {
4362
- "docs": {
4363
- "deprecated": "this value is ignored since inline is now determined based on the the inlineCode field of CodeConfig returned from bind().",
4364
- "stability": "deprecated",
4365
- "summary": "Determines whether this Code is inline code or not."
4366
- },
4367
- "locationInModule": {
4368
- "filename": "src/code.ts",
4369
- "line": 36
4370
- },
4371
- "name": "isInline",
4372
- "type": {
4373
- "primitive": "boolean"
4374
- }
4375
- },
4376
- {
4377
- "docs": {
4378
- "stability": "stable"
4379
- },
4380
- "locationInModule": {
4381
- "filename": "src/code.ts",
4382
- "line": 27
4383
- },
4384
- "name": "props",
4385
- "protected": true,
4386
- "type": {
4387
- "fqn": "@mrgrain/cdk-esbuild.AssetProps"
4388
- }
4389
- }
4390
- ],
4391
- "symbolId": "src/code:Code"
4392
- },
4393
- "@mrgrain/cdk-esbuild.CodeConfig": {
4394
- "assembly": "@mrgrain/cdk-esbuild",
4395
- "datatype": true,
4396
- "docs": {
4397
- "stability": "stable",
4398
- "summary": "Result of binding `Code` into a `Function`."
4399
- },
4400
- "fqn": "@mrgrain/cdk-esbuild.CodeConfig",
4401
- "kind": "interface",
4402
- "locationInModule": {
4403
- "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4404
- "line": 94
4405
- },
4406
- "name": "CodeConfig",
4407
- "properties": [
4408
- {
4409
- "abstract": true,
4410
- "docs": {
4411
- "default": "- code is not an ECR container image",
4412
- "stability": "stable",
4413
- "summary": "Docker image configuration (mutually exclusive with `s3Location` and `inlineCode`)."
4354
+ "deprecated": "This value is ignored since the bundler is always using a locally installed version of esbuild. However the property is required to comply with the `BundlingOptions` interface.",
4355
+ "stability": "deprecated"
4414
4356
  },
4415
4357
  "immutable": true,
4416
4358
  "locationInModule": {
4417
- "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4418
- "line": 115
4359
+ "filename": "src/bundler.ts",
4360
+ "line": 110
4419
4361
  },
4420
4362
  "name": "image",
4421
- "optional": true,
4422
4363
  "type": {
4423
- "fqn": "aws-cdk-lib.aws_lambda.CodeImageConfig"
4364
+ "fqn": "aws-cdk-lib.DockerImage"
4424
4365
  }
4425
4366
  },
4426
4367
  {
4427
- "abstract": true,
4428
4368
  "docs": {
4429
- "default": "- code is not inline code",
4430
- "stability": "stable",
4431
- "summary": "Inline code (mutually exclusive with `s3Location` and `image`)."
4369
+ "stability": "experimental",
4370
+ "summary": "Implementation of `ILocalBundling` interface, responsible for calling esbuild functions."
4432
4371
  },
4433
4372
  "immutable": true,
4434
4373
  "locationInModule": {
4435
- "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4436
- "line": 108
4374
+ "filename": "src/bundler.ts",
4375
+ "line": 103
4437
4376
  },
4438
- "name": "inlineCode",
4439
- "optional": true,
4377
+ "name": "local",
4440
4378
  "type": {
4441
- "primitive": "string"
4379
+ "fqn": "aws-cdk-lib.ILocalBundling"
4442
4380
  }
4443
4381
  },
4444
4382
  {
4445
- "abstract": true,
4446
4383
  "docs": {
4447
- "default": "- code is not an s3 location",
4448
- "stability": "stable",
4449
- "summary": "The location of the code in S3 (mutually exclusive with `inlineCode` and `image`)."
4384
+ "stability": "experimental",
4385
+ "summary": "Props to change the behaviour of the bundler."
4450
4386
  },
4451
4387
  "immutable": true,
4452
4388
  "locationInModule": {
4453
- "filename": "node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts",
4454
- "line": 101
4389
+ "filename": "src/bundler.ts",
4390
+ "line": 129
4455
4391
  },
4456
- "name": "s3Location",
4457
- "optional": true,
4392
+ "name": "props",
4458
4393
  "type": {
4459
- "fqn": "aws-cdk-lib.aws_s3.Location"
4394
+ "fqn": "@mrgrain/cdk-esbuild.BundlerProps"
4460
4395
  }
4461
4396
  }
4462
4397
  ],
4463
- "symbolId": "aws-lambda/lib/code:CodeConfig"
4398
+ "symbolId": "src/bundler:EsbuildBundler"
4464
4399
  },
4465
- "@mrgrain/cdk-esbuild.EsbuildBundler": {
4400
+ "@mrgrain/cdk-esbuild.EsbuildCode": {
4466
4401
  "assembly": "@mrgrain/cdk-esbuild",
4402
+ "base": "aws-cdk-lib.aws_lambda.Code",
4467
4403
  "docs": {
4468
- "remarks": "This class directly interfaces with esbuild and provides almost no configuration safeguards.",
4404
+ "remarks": "You should always use `TypeScriptCode` or `JavaScriptCode`.",
4469
4405
  "stability": "experimental",
4470
- "summary": "Low-level construct that can be used where `BundlingOptions` are required."
4406
+ "summary": "Represents a generic esbuild code bundle."
4471
4407
  },
4472
- "fqn": "@mrgrain/cdk-esbuild.EsbuildBundler",
4408
+ "fqn": "@mrgrain/cdk-esbuild.EsbuildCode",
4473
4409
  "initializer": {
4474
4410
  "docs": {
4475
4411
  "stability": "experimental"
4476
4412
  },
4477
4413
  "locationInModule": {
4478
- "filename": "src/bundler.ts",
4479
- "line": 115
4414
+ "filename": "src/code.ts",
4415
+ "line": 51
4480
4416
  },
4481
4417
  "parameters": [
4482
4418
  {
4483
4419
  "docs": {
4484
4420
  "remarks": "E.g. `src/index.ts`.",
4485
- "stability": "experimental",
4421
+ "stability": "stable",
4486
4422
  "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
4487
4423
  },
4488
4424
  "name": "entryPoints",
@@ -4514,33 +4450,122 @@
4514
4450
  },
4515
4451
  {
4516
4452
  "docs": {
4517
- "stability": "experimental",
4518
- "summary": "Props to change the behaviour of the bundler."
4453
+ "remarks": "Default values for `props.buildOptions`:\n- `bundle=true`\n- `platform=node`\n- `target=nodeX` with X being the major node version running locally",
4454
+ "stability": "stable",
4455
+ "summary": "Props to change the behavior of the bundler."
4519
4456
  },
4520
4457
  "name": "props",
4521
4458
  "type": {
4522
- "fqn": "@mrgrain/cdk-esbuild.BundlerProps"
4459
+ "union": {
4460
+ "types": [
4461
+ {
4462
+ "fqn": "@mrgrain/cdk-esbuild.JavaScriptCodeProps"
4463
+ },
4464
+ {
4465
+ "fqn": "@mrgrain/cdk-esbuild.TypeScriptCodeProps"
4466
+ }
4467
+ ]
4468
+ }
4523
4469
  }
4524
4470
  }
4525
4471
  ]
4526
4472
  },
4527
4473
  "kind": "class",
4528
4474
  "locationInModule": {
4529
- "filename": "src/bundler.ts",
4530
- "line": 97
4475
+ "filename": "src/code.ts",
4476
+ "line": 29
4531
4477
  },
4532
- "name": "EsbuildBundler",
4478
+ "methods": [
4479
+ {
4480
+ "docs": {
4481
+ "stability": "experimental",
4482
+ "summary": "Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun."
4483
+ },
4484
+ "locationInModule": {
4485
+ "filename": "src/code.ts",
4486
+ "line": 91
4487
+ },
4488
+ "name": "bind",
4489
+ "overrides": "aws-cdk-lib.aws_lambda.Code",
4490
+ "parameters": [
4491
+ {
4492
+ "name": "scope",
4493
+ "type": {
4494
+ "fqn": "constructs.Construct"
4495
+ }
4496
+ }
4497
+ ],
4498
+ "returns": {
4499
+ "type": {
4500
+ "fqn": "aws-cdk-lib.aws_lambda.CodeConfig"
4501
+ }
4502
+ }
4503
+ },
4504
+ {
4505
+ "docs": {
4506
+ "remarks": "Specifically it's required to allow assets to add\nmetadata for tooling like SAM CLI to be able to find their origins.",
4507
+ "stability": "stable",
4508
+ "summary": "Called after the CFN function resource has been created to allow the code class to bind to it."
4509
+ },
4510
+ "locationInModule": {
4511
+ "filename": "src/code.ts",
4512
+ "line": 119
4513
+ },
4514
+ "name": "bindToResource",
4515
+ "overrides": "aws-cdk-lib.aws_lambda.Code",
4516
+ "parameters": [
4517
+ {
4518
+ "name": "resource",
4519
+ "type": {
4520
+ "fqn": "aws-cdk-lib.CfnResource"
4521
+ }
4522
+ },
4523
+ {
4524
+ "name": "options",
4525
+ "optional": true,
4526
+ "type": {
4527
+ "fqn": "aws-cdk-lib.aws_lambda.ResourceBindOptions"
4528
+ }
4529
+ }
4530
+ ]
4531
+ },
4532
+ {
4533
+ "docs": {
4534
+ "stability": "experimental"
4535
+ },
4536
+ "locationInModule": {
4537
+ "filename": "src/code.ts",
4538
+ "line": 32
4539
+ },
4540
+ "name": "getAsset",
4541
+ "parameters": [
4542
+ {
4543
+ "name": "scope",
4544
+ "type": {
4545
+ "fqn": "constructs.Construct"
4546
+ }
4547
+ }
4548
+ ],
4549
+ "protected": true,
4550
+ "returns": {
4551
+ "type": {
4552
+ "fqn": "@mrgrain/cdk-esbuild.EsbuildAsset"
4553
+ }
4554
+ }
4555
+ }
4556
+ ],
4557
+ "name": "EsbuildCode",
4533
4558
  "properties": [
4534
4559
  {
4535
4560
  "docs": {
4536
4561
  "remarks": "E.g. `src/index.ts`.",
4537
- "stability": "experimental",
4562
+ "stability": "stable",
4538
4563
  "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
4539
4564
  },
4540
4565
  "immutable": true,
4541
4566
  "locationInModule": {
4542
- "filename": "src/bundler.ts",
4543
- "line": 122
4567
+ "filename": "src/code.ts",
4568
+ "line": 58
4544
4569
  },
4545
4570
  "name": "entryPoints",
4546
4571
  "type": {
@@ -4571,51 +4596,49 @@
4571
4596
  },
4572
4597
  {
4573
4598
  "docs": {
4574
- "deprecated": "This value is ignored since the bundler is always using a locally installed version of esbuild. However the property is required to comply with the `BundlingOptions` interface.",
4575
- "stability": "deprecated"
4599
+ "stability": "experimental"
4576
4600
  },
4577
- "immutable": true,
4578
4601
  "locationInModule": {
4579
- "filename": "src/bundler.ts",
4580
- "line": 110
4602
+ "filename": "src/code.ts",
4603
+ "line": 42
4581
4604
  },
4582
- "name": "image",
4605
+ "name": "asset",
4606
+ "protected": true,
4583
4607
  "type": {
4584
- "fqn": "aws-cdk-lib.DockerImage"
4608
+ "fqn": "@mrgrain/cdk-esbuild.EsbuildAsset"
4585
4609
  }
4586
4610
  },
4587
4611
  {
4588
4612
  "docs": {
4589
- "stability": "experimental",
4590
- "summary": "Implementation of `ILocalBundling` interface, responsible for calling esbuild functions."
4613
+ "deprecated": "this value is ignored since inline is now determined based on the the inlineCode field of CodeConfig returned from bind().",
4614
+ "stability": "deprecated",
4615
+ "summary": "Determines whether this Code is inline code or not."
4591
4616
  },
4592
- "immutable": true,
4593
4617
  "locationInModule": {
4594
- "filename": "src/bundler.ts",
4595
- "line": 103
4618
+ "filename": "src/code.ts",
4619
+ "line": 49
4596
4620
  },
4597
- "name": "local",
4621
+ "name": "isInline",
4598
4622
  "type": {
4599
- "fqn": "aws-cdk-lib.ILocalBundling"
4623
+ "primitive": "boolean"
4600
4624
  }
4601
4625
  },
4602
4626
  {
4603
4627
  "docs": {
4604
- "stability": "experimental",
4605
- "summary": "Props to change the behaviour of the bundler."
4628
+ "stability": "experimental"
4606
4629
  },
4607
- "immutable": true,
4608
4630
  "locationInModule": {
4609
- "filename": "src/bundler.ts",
4610
- "line": 129
4631
+ "filename": "src/code.ts",
4632
+ "line": 40
4611
4633
  },
4612
4634
  "name": "props",
4635
+ "protected": true,
4613
4636
  "type": {
4614
- "fqn": "@mrgrain/cdk-esbuild.BundlerProps"
4637
+ "fqn": "@mrgrain/cdk-esbuild.AssetProps"
4615
4638
  }
4616
4639
  }
4617
4640
  ],
4618
- "symbolId": "src/bundler:EsbuildBundler"
4641
+ "symbolId": "src/code:EsbuildCode"
4619
4642
  },
4620
4643
  "@mrgrain/cdk-esbuild.InlineJavaScriptCode": {
4621
4644
  "assembly": "@mrgrain/cdk-esbuild",
@@ -4855,7 +4878,7 @@
4855
4878
  },
4856
4879
  "@mrgrain/cdk-esbuild.JavaScriptAsset": {
4857
4880
  "assembly": "@mrgrain/cdk-esbuild",
4858
- "base": "@mrgrain/cdk-esbuild.Asset",
4881
+ "base": "@mrgrain/cdk-esbuild.EsbuildAsset",
4859
4882
  "docs": {
4860
4883
  "remarks": "The asset can be used by other constructs.",
4861
4884
  "stability": "stable",
@@ -4868,7 +4891,7 @@
4868
4891
  },
4869
4892
  "locationInModule": {
4870
4893
  "filename": "src/asset.ts",
4871
- "line": 42
4894
+ "line": 46
4872
4895
  },
4873
4896
  "parameters": [
4874
4897
  {
@@ -4894,14 +4917,14 @@
4894
4917
  "kind": "class",
4895
4918
  "locationInModule": {
4896
4919
  "filename": "src/asset.ts",
4897
- "line": 97
4920
+ "line": 101
4898
4921
  },
4899
4922
  "name": "JavaScriptAsset",
4900
4923
  "symbolId": "src/asset:JavaScriptAsset"
4901
4924
  },
4902
4925
  "@mrgrain/cdk-esbuild.JavaScriptCode": {
4903
4926
  "assembly": "@mrgrain/cdk-esbuild",
4904
- "base": "@mrgrain/cdk-esbuild.Code",
4927
+ "base": "@mrgrain/cdk-esbuild.EsbuildCode",
4905
4928
  "docs": {
4906
4929
  "stability": "stable",
4907
4930
  "summary": "Represents the deployed JavaScript Code."
@@ -4913,7 +4936,7 @@
4913
4936
  },
4914
4937
  "locationInModule": {
4915
4938
  "filename": "src/code.ts",
4916
- "line": 114
4939
+ "line": 143
4917
4940
  },
4918
4941
  "parameters": [
4919
4942
  {
@@ -4966,7 +4989,7 @@
4966
4989
  "kind": "class",
4967
4990
  "locationInModule": {
4968
4991
  "filename": "src/code.ts",
4969
- "line": 105
4992
+ "line": 134
4970
4993
  },
4971
4994
  "methods": [
4972
4995
  {
@@ -4975,10 +4998,10 @@
4975
4998
  },
4976
4999
  "locationInModule": {
4977
5000
  "filename": "src/code.ts",
4978
- "line": 106
5001
+ "line": 135
4979
5002
  },
4980
5003
  "name": "getAsset",
4981
- "overrides": "@mrgrain/cdk-esbuild.Code",
5004
+ "overrides": "@mrgrain/cdk-esbuild.EsbuildCode",
4982
5005
  "parameters": [
4983
5006
  {
4984
5007
  "name": "scope",
@@ -4990,7 +5013,7 @@
4990
5013
  "protected": true,
4991
5014
  "returns": {
4992
5015
  "type": {
4993
- "fqn": "@mrgrain/cdk-esbuild.Asset"
5016
+ "fqn": "@mrgrain/cdk-esbuild.EsbuildAsset"
4994
5017
  }
4995
5018
  }
4996
5019
  }
@@ -5233,7 +5256,7 @@
5233
5256
  "kind": "interface",
5234
5257
  "locationInModule": {
5235
5258
  "filename": "src/esbuild-types.ts",
5236
- "line": 237
5259
+ "line": 240
5237
5260
  },
5238
5261
  "name": "TransformOptions",
5239
5262
  "properties": [
@@ -5245,7 +5268,7 @@
5245
5268
  "immutable": true,
5246
5269
  "locationInModule": {
5247
5270
  "filename": "src/esbuild-types.ts",
5248
- "line": 242
5271
+ "line": 245
5249
5272
  },
5250
5273
  "name": "banner",
5251
5274
  "optional": true,
@@ -5262,7 +5285,7 @@
5262
5285
  "immutable": true,
5263
5286
  "locationInModule": {
5264
5287
  "filename": "src/esbuild-types.ts",
5265
- "line": 46
5288
+ "line": 48
5266
5289
  },
5267
5290
  "name": "charset",
5268
5291
  "optional": true,
@@ -5279,7 +5302,7 @@
5279
5302
  "immutable": true,
5280
5303
  "locationInModule": {
5281
5304
  "filename": "src/esbuild-types.ts",
5282
- "line": 67
5305
+ "line": 69
5283
5306
  },
5284
5307
  "name": "color",
5285
5308
  "optional": true,
@@ -5296,7 +5319,7 @@
5296
5319
  "immutable": true,
5297
5320
  "locationInModule": {
5298
5321
  "filename": "src/esbuild-types.ts",
5299
- "line": 60
5322
+ "line": 62
5300
5323
  },
5301
5324
  "name": "define",
5302
5325
  "optional": true,
@@ -5318,7 +5341,7 @@
5318
5341
  "immutable": true,
5319
5342
  "locationInModule": {
5320
5343
  "filename": "src/esbuild-types.ts",
5321
- "line": 36
5344
+ "line": 38
5322
5345
  },
5323
5346
  "name": "drop",
5324
5347
  "optional": true,
@@ -5339,7 +5362,7 @@
5339
5362
  "immutable": true,
5340
5363
  "locationInModule": {
5341
5364
  "filename": "src/esbuild-types.ts",
5342
- "line": 243
5365
+ "line": 246
5343
5366
  },
5344
5367
  "name": "footer",
5345
5368
  "optional": true,
@@ -5390,7 +5413,7 @@
5390
5413
  "immutable": true,
5391
5414
  "locationInModule": {
5392
5415
  "filename": "src/esbuild-types.ts",
5393
- "line": 50
5416
+ "line": 52
5394
5417
  },
5395
5418
  "name": "ignoreAnnotations",
5396
5419
  "optional": true,
@@ -5407,7 +5430,7 @@
5407
5430
  "immutable": true,
5408
5431
  "locationInModule": {
5409
5432
  "filename": "src/esbuild-types.ts",
5410
- "line": 53
5433
+ "line": 55
5411
5434
  },
5412
5435
  "name": "jsx",
5413
5436
  "optional": true,
@@ -5424,7 +5447,7 @@
5424
5447
  "immutable": true,
5425
5448
  "locationInModule": {
5426
5449
  "filename": "src/esbuild-types.ts",
5427
- "line": 55
5450
+ "line": 57
5428
5451
  },
5429
5452
  "name": "jsxFactory",
5430
5453
  "optional": true,
@@ -5441,7 +5464,7 @@
5441
5464
  "immutable": true,
5442
5465
  "locationInModule": {
5443
5466
  "filename": "src/esbuild-types.ts",
5444
- "line": 57
5467
+ "line": 59
5445
5468
  },
5446
5469
  "name": "jsxFragment",
5447
5470
  "optional": true,
@@ -5458,7 +5481,7 @@
5458
5481
  "immutable": true,
5459
5482
  "locationInModule": {
5460
5483
  "filename": "src/esbuild-types.ts",
5461
- "line": 64
5484
+ "line": 66
5462
5485
  },
5463
5486
  "name": "keepNames",
5464
5487
  "optional": true,
@@ -5491,7 +5514,7 @@
5491
5514
  "immutable": true,
5492
5515
  "locationInModule": {
5493
5516
  "filename": "src/esbuild-types.ts",
5494
- "line": 241
5517
+ "line": 244
5495
5518
  },
5496
5519
  "name": "loader",
5497
5520
  "optional": true,
@@ -5508,7 +5531,7 @@
5508
5531
  "immutable": true,
5509
5532
  "locationInModule": {
5510
5533
  "filename": "src/esbuild-types.ts",
5511
- "line": 69
5534
+ "line": 71
5512
5535
  },
5513
5536
  "name": "logLevel",
5514
5537
  "optional": true,
@@ -5525,7 +5548,7 @@
5525
5548
  "immutable": true,
5526
5549
  "locationInModule": {
5527
5550
  "filename": "src/esbuild-types.ts",
5528
- "line": 71
5551
+ "line": 73
5529
5552
  },
5530
5553
  "name": "logLimit",
5531
5554
  "optional": true,
@@ -5542,7 +5565,7 @@
5542
5565
  "immutable": true,
5543
5566
  "locationInModule": {
5544
5567
  "filename": "src/esbuild-types.ts",
5545
- "line": 73
5568
+ "line": 75
5546
5569
  },
5547
5570
  "name": "logOverride",
5548
5571
  "optional": true,
@@ -5564,7 +5587,7 @@
5564
5587
  "immutable": true,
5565
5588
  "locationInModule": {
5566
5589
  "filename": "src/esbuild-types.ts",
5567
- "line": 34
5590
+ "line": 36
5568
5591
  },
5569
5592
  "name": "mangleCache",
5570
5593
  "optional": true,
@@ -5595,7 +5618,7 @@
5595
5618
  "immutable": true,
5596
5619
  "locationInModule": {
5597
5620
  "filename": "src/esbuild-types.ts",
5598
- "line": 28
5621
+ "line": 30
5599
5622
  },
5600
5623
  "name": "mangleProps",
5601
5624
  "optional": true,
@@ -5612,7 +5635,7 @@
5612
5635
  "immutable": true,
5613
5636
  "locationInModule": {
5614
5637
  "filename": "src/esbuild-types.ts",
5615
- "line": 32
5638
+ "line": 34
5616
5639
  },
5617
5640
  "name": "mangleQuoted",
5618
5641
  "optional": true,
@@ -5629,7 +5652,7 @@
5629
5652
  "immutable": true,
5630
5653
  "locationInModule": {
5631
5654
  "filename": "src/esbuild-types.ts",
5632
- "line": 38
5655
+ "line": 40
5633
5656
  },
5634
5657
  "name": "minify",
5635
5658
  "optional": true,
@@ -5646,7 +5669,7 @@
5646
5669
  "immutable": true,
5647
5670
  "locationInModule": {
5648
5671
  "filename": "src/esbuild-types.ts",
5649
- "line": 42
5672
+ "line": 44
5650
5673
  },
5651
5674
  "name": "minifyIdentifiers",
5652
5675
  "optional": true,
@@ -5663,7 +5686,7 @@
5663
5686
  "immutable": true,
5664
5687
  "locationInModule": {
5665
5688
  "filename": "src/esbuild-types.ts",
5666
- "line": 44
5689
+ "line": 46
5667
5690
  },
5668
5691
  "name": "minifySyntax",
5669
5692
  "optional": true,
@@ -5680,7 +5703,7 @@
5680
5703
  "immutable": true,
5681
5704
  "locationInModule": {
5682
5705
  "filename": "src/esbuild-types.ts",
5683
- "line": 40
5706
+ "line": 42
5684
5707
  },
5685
5708
  "name": "minifyWhitespace",
5686
5709
  "optional": true,
@@ -5697,7 +5720,7 @@
5697
5720
  "immutable": true,
5698
5721
  "locationInModule": {
5699
5722
  "filename": "src/esbuild-types.ts",
5700
- "line": 62
5723
+ "line": 64
5701
5724
  },
5702
5725
  "name": "pure",
5703
5726
  "optional": true,
@@ -5719,7 +5742,7 @@
5719
5742
  "immutable": true,
5720
5743
  "locationInModule": {
5721
5744
  "filename": "src/esbuild-types.ts",
5722
- "line": 30
5745
+ "line": 32
5723
5746
  },
5724
5747
  "name": "reserveProps",
5725
5748
  "optional": true,
@@ -5735,7 +5758,7 @@
5735
5758
  "immutable": true,
5736
5759
  "locationInModule": {
5737
5760
  "filename": "src/esbuild-types.ts",
5738
- "line": 240
5761
+ "line": 243
5739
5762
  },
5740
5763
  "name": "sourcefile",
5741
5764
  "optional": true,
@@ -5803,6 +5826,28 @@
5803
5826
  "primitive": "boolean"
5804
5827
  }
5805
5828
  },
5829
+ {
5830
+ "abstract": true,
5831
+ "docs": {
5832
+ "stability": "stable",
5833
+ "summary": "Documentation: https://esbuild.github.io/api/#supported."
5834
+ },
5835
+ "immutable": true,
5836
+ "locationInModule": {
5837
+ "filename": "src/esbuild-types.ts",
5838
+ "line": 27
5839
+ },
5840
+ "name": "supported",
5841
+ "optional": true,
5842
+ "type": {
5843
+ "collection": {
5844
+ "elementtype": {
5845
+ "primitive": "boolean"
5846
+ },
5847
+ "kind": "map"
5848
+ }
5849
+ }
5850
+ },
5806
5851
  {
5807
5852
  "abstract": true,
5808
5853
  "docs": {
@@ -5843,7 +5888,7 @@
5843
5888
  "immutable": true,
5844
5889
  "locationInModule": {
5845
5890
  "filename": "src/esbuild-types.ts",
5846
- "line": 48
5891
+ "line": 50
5847
5892
  },
5848
5893
  "name": "treeShaking",
5849
5894
  "optional": true,
@@ -5859,7 +5904,7 @@
5859
5904
  "immutable": true,
5860
5905
  "locationInModule": {
5861
5906
  "filename": "src/esbuild-types.ts",
5862
- "line": 238
5907
+ "line": 241
5863
5908
  },
5864
5909
  "name": "tsconfigRaw",
5865
5910
  "optional": true,
@@ -5932,7 +5977,7 @@
5932
5977
  },
5933
5978
  "@mrgrain/cdk-esbuild.TypeScriptAsset": {
5934
5979
  "assembly": "@mrgrain/cdk-esbuild",
5935
- "base": "@mrgrain/cdk-esbuild.Asset",
5980
+ "base": "@mrgrain/cdk-esbuild.EsbuildAsset",
5936
5981
  "docs": {
5937
5982
  "remarks": "The asset can be used by other constructs.",
5938
5983
  "stability": "stable",
@@ -5945,7 +5990,7 @@
5945
5990
  },
5946
5991
  "locationInModule": {
5947
5992
  "filename": "src/asset.ts",
5948
- "line": 42
5993
+ "line": 46
5949
5994
  },
5950
5995
  "parameters": [
5951
5996
  {
@@ -5971,14 +6016,14 @@
5971
6016
  "kind": "class",
5972
6017
  "locationInModule": {
5973
6018
  "filename": "src/asset.ts",
5974
- "line": 106
6019
+ "line": 110
5975
6020
  },
5976
6021
  "name": "TypeScriptAsset",
5977
6022
  "symbolId": "src/asset:TypeScriptAsset"
5978
6023
  },
5979
6024
  "@mrgrain/cdk-esbuild.TypeScriptCode": {
5980
6025
  "assembly": "@mrgrain/cdk-esbuild",
5981
- "base": "@mrgrain/cdk-esbuild.Code",
6026
+ "base": "@mrgrain/cdk-esbuild.EsbuildCode",
5982
6027
  "docs": {
5983
6028
  "stability": "stable",
5984
6029
  "summary": "Represents the deployed TypeScript Code."
@@ -5990,7 +6035,7 @@
5990
6035
  },
5991
6036
  "locationInModule": {
5992
6037
  "filename": "src/code.ts",
5993
- "line": 152
6038
+ "line": 181
5994
6039
  },
5995
6040
  "parameters": [
5996
6041
  {
@@ -6043,7 +6088,7 @@
6043
6088
  "kind": "class",
6044
6089
  "locationInModule": {
6045
6090
  "filename": "src/code.ts",
6046
- "line": 143
6091
+ "line": 172
6047
6092
  },
6048
6093
  "methods": [
6049
6094
  {
@@ -6052,10 +6097,10 @@
6052
6097
  },
6053
6098
  "locationInModule": {
6054
6099
  "filename": "src/code.ts",
6055
- "line": 144
6100
+ "line": 173
6056
6101
  },
6057
6102
  "name": "getAsset",
6058
- "overrides": "@mrgrain/cdk-esbuild.Code",
6103
+ "overrides": "@mrgrain/cdk-esbuild.EsbuildCode",
6059
6104
  "parameters": [
6060
6105
  {
6061
6106
  "name": "scope",
@@ -6067,7 +6112,7 @@
6067
6112
  "protected": true,
6068
6113
  "returns": {
6069
6114
  "type": {
6070
- "fqn": "@mrgrain/cdk-esbuild.Asset"
6115
+ "fqn": "@mrgrain/cdk-esbuild.EsbuildAsset"
6071
6116
  }
6072
6117
  }
6073
6118
  }
@@ -6301,6 +6346,6 @@
6301
6346
  "symbolId": "src/source:TypeScriptSourceProps"
6302
6347
  }
6303
6348
  },
6304
- "version": "4.0.0-alpha.7",
6305
- "fingerprint": "Xl4tA+wEh22dovogBHbnmpRxV5IYdQURyfWyXBLufDU="
6349
+ "version": "4.0.0-alpha.8",
6350
+ "fingerprint": "8MURwY4BSmgsy1As8iitI7E981KW259pIKcdAY9BDuE="
6306
6351
  }