@mrgrain/cdk-esbuild 3.8.1 → 3.11.0
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 +391 -29
- package/CHANGELOG.md +23 -0
- package/README.md +3 -3
- package/lib/asset.js +3 -3
- package/lib/bundler.d.ts +19 -1
- package/lib/bundler.js +12 -6
- package/lib/code.js +3 -3
- package/lib/dynamic-package.d.ts +41 -0
- package/lib/dynamic-package.js +108 -0
- package/lib/esbuild-provider.d.ts +28 -0
- package/lib/esbuild-provider.js +60 -0
- package/lib/esbuild-source.d.ts +41 -0
- package/lib/esbuild-source.js +70 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/inline-code.d.ts +24 -2
- package/lib/inline-code.js +39 -17
- package/lib/source.js +2 -2
- package/lib/utils.d.ts +5 -0
- package/lib/utils.js +12 -0
- package/package.json +20 -8
- package/lib/esbuild-wrapper.d.ts +0 -3
- package/lib/esbuild-wrapper.js +0 -32
package/.jsii
CHANGED
|
@@ -2777,7 +2777,7 @@
|
|
|
2777
2777
|
"stability": "stable"
|
|
2778
2778
|
},
|
|
2779
2779
|
"homepage": "https://github.com/mrgrain/cdk-esbuild",
|
|
2780
|
-
"jsiiVersion": "1.
|
|
2780
|
+
"jsiiVersion": "1.65.0 (build 7a02b7f)",
|
|
2781
2781
|
"keywords": [
|
|
2782
2782
|
"aws-cdk",
|
|
2783
2783
|
"bundler",
|
|
@@ -2800,7 +2800,7 @@
|
|
|
2800
2800
|
},
|
|
2801
2801
|
"name": "@mrgrain/cdk-esbuild",
|
|
2802
2802
|
"readme": {
|
|
2803
|
-
"markdown": "<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"./images/wordmark-dark.svg\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"./images/wordmark-light.svg\">\n <img src=\"./images/wordmark.svg\" alt=\"cdk-esbuild\">\n</picture>\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) | [Upgrading from AWS CDK v1](#upgrading-from-aws-cdk-v1)\n\n[](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"
|
|
2803
|
+
"markdown": "<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/mrgrain/cdk-esbuild/main/images/wordmark-dark.svg\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/mrgrain/cdk-esbuild/main/images/wordmark-light.svg\">\n <img src=\"https://raw.githubusercontent.com/mrgrain/cdk-esbuild/main/images/wordmark.svg\" alt=\"cdk-esbuild\">\n</picture>\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) | [Upgrading from AWS CDK v1](#upgrading-from-aws-cdk-v1)\n\n[](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"
|
|
2804
2804
|
},
|
|
2805
2805
|
"repository": {
|
|
2806
2806
|
"type": "git",
|
|
@@ -2808,8 +2808,17 @@
|
|
|
2808
2808
|
},
|
|
2809
2809
|
"schema": "jsii/0.10.0",
|
|
2810
2810
|
"targets": {
|
|
2811
|
+
"dotnet": {
|
|
2812
|
+
"iconUrl": "https://raw.githubusercontent.com/mrgrain/cdk-esbuild/main/images/logo.png",
|
|
2813
|
+
"namespace": "Mrgrain.CdkEsbuild",
|
|
2814
|
+
"packageId": "Mrgrain.CdkEsbuild"
|
|
2815
|
+
},
|
|
2811
2816
|
"js": {
|
|
2812
2817
|
"npm": "@mrgrain/cdk-esbuild"
|
|
2818
|
+
},
|
|
2819
|
+
"python": {
|
|
2820
|
+
"distName": "mrgrain.cdk-esbuild",
|
|
2821
|
+
"module": "mrgrain.cdk_esbuild"
|
|
2813
2822
|
}
|
|
2814
2823
|
},
|
|
2815
2824
|
"types": {
|
|
@@ -4032,7 +4041,7 @@
|
|
|
4032
4041
|
"kind": "interface",
|
|
4033
4042
|
"locationInModule": {
|
|
4034
4043
|
"filename": "src/bundler.ts",
|
|
4035
|
-
"line":
|
|
4044
|
+
"line": 34
|
|
4036
4045
|
},
|
|
4037
4046
|
"name": "BundlerProps",
|
|
4038
4047
|
"properties": [
|
|
@@ -4043,7 +4052,7 @@
|
|
|
4043
4052
|
"throws": "esbuild.BuildFailure",
|
|
4044
4053
|
"type": "esbuild.buildSync"
|
|
4045
4054
|
},
|
|
4046
|
-
"default": "esbuild.buildSync",
|
|
4055
|
+
"default": "`esbuild.buildSync`",
|
|
4047
4056
|
"remarks": "The function will receive the computed options from the bundler. It can use with these options as it wishes, however `outdir`/`outfile` must be respected to integrate with CDK.\nMust throw a `BuildFailure` on failure to correctly inform the bundler.",
|
|
4048
4057
|
"returns": "esbuild.BuildResult",
|
|
4049
4058
|
"stability": "experimental",
|
|
@@ -4052,7 +4061,7 @@
|
|
|
4052
4061
|
"immutable": true,
|
|
4053
4062
|
"locationInModule": {
|
|
4054
4063
|
"filename": "src/bundler.ts",
|
|
4055
|
-
"line":
|
|
4064
|
+
"line": 90
|
|
4056
4065
|
},
|
|
4057
4066
|
"name": "buildFn",
|
|
4058
4067
|
"optional": true,
|
|
@@ -4071,7 +4080,7 @@
|
|
|
4071
4080
|
"immutable": true,
|
|
4072
4081
|
"locationInModule": {
|
|
4073
4082
|
"filename": "src/bundler.ts",
|
|
4074
|
-
"line":
|
|
4083
|
+
"line": 53
|
|
4075
4084
|
},
|
|
4076
4085
|
"name": "buildOptions",
|
|
4077
4086
|
"optional": true,
|
|
@@ -4089,7 +4098,7 @@
|
|
|
4089
4098
|
"immutable": true,
|
|
4090
4099
|
"locationInModule": {
|
|
4091
4100
|
"filename": "src/bundler.ts",
|
|
4092
|
-
"line":
|
|
4101
|
+
"line": 76
|
|
4093
4102
|
},
|
|
4094
4103
|
"name": "copyDir",
|
|
4095
4104
|
"optional": true,
|
|
@@ -4143,13 +4152,32 @@
|
|
|
4143
4152
|
"immutable": true,
|
|
4144
4153
|
"locationInModule": {
|
|
4145
4154
|
"filename": "src/bundler.ts",
|
|
4146
|
-
"line":
|
|
4155
|
+
"line": 99
|
|
4147
4156
|
},
|
|
4148
4157
|
"name": "esbuildBinaryPath",
|
|
4149
4158
|
"optional": true,
|
|
4150
4159
|
"type": {
|
|
4151
4160
|
"primitive": "string"
|
|
4152
4161
|
}
|
|
4162
|
+
},
|
|
4163
|
+
{
|
|
4164
|
+
"abstract": true,
|
|
4165
|
+
"docs": {
|
|
4166
|
+
"default": "- `CDK_ESBUILD_MODULE_PATH` or package resolution (see above)",
|
|
4167
|
+
"remarks": "E.g. \"/home/user/.npm/node_modules/esbuild/lib/main.js\"\n\nIf not set, the module path will be determined in the following order:\n\n- Use a path from the `CDK_ESBUILD_MODULE_PATH` environment variable\n- In TypeScript, fallback to the default Node.js package resolution mechanism\n- All other languages (Python, Go, .NET, Java) use an automatic \"best effort\" resolution mechanism. \\\n The exact algorithm of this mechanism is considered an implementation detail and should not be relied on.\n If `esbuild` cannot be found, it might be installed dynamically to a temporary location.\n To opt-out of this behavior, set either `esbuildModulePath` or `CDK_ESBUILD_MODULE_PATH` env variable.",
|
|
4168
|
+
"stability": "experimental",
|
|
4169
|
+
"summary": "Absolute path to the esbuild module JS file."
|
|
4170
|
+
},
|
|
4171
|
+
"immutable": true,
|
|
4172
|
+
"locationInModule": {
|
|
4173
|
+
"filename": "src/bundler.ts",
|
|
4174
|
+
"line": 118
|
|
4175
|
+
},
|
|
4176
|
+
"name": "esbuildModulePath",
|
|
4177
|
+
"optional": true,
|
|
4178
|
+
"type": {
|
|
4179
|
+
"primitive": "string"
|
|
4180
|
+
}
|
|
4153
4181
|
}
|
|
4154
4182
|
],
|
|
4155
4183
|
"symbolId": "src/bundler:BundlerProps"
|
|
@@ -4286,7 +4314,7 @@
|
|
|
4286
4314
|
},
|
|
4287
4315
|
"locationInModule": {
|
|
4288
4316
|
"filename": "src/bundler.ts",
|
|
4289
|
-
"line":
|
|
4317
|
+
"line": 145
|
|
4290
4318
|
},
|
|
4291
4319
|
"parameters": [
|
|
4292
4320
|
{
|
|
@@ -4337,7 +4365,7 @@
|
|
|
4337
4365
|
"kind": "class",
|
|
4338
4366
|
"locationInModule": {
|
|
4339
4367
|
"filename": "src/bundler.ts",
|
|
4340
|
-
"line":
|
|
4368
|
+
"line": 127
|
|
4341
4369
|
},
|
|
4342
4370
|
"name": "EsbuildBundler",
|
|
4343
4371
|
"properties": [
|
|
@@ -4350,7 +4378,7 @@
|
|
|
4350
4378
|
"immutable": true,
|
|
4351
4379
|
"locationInModule": {
|
|
4352
4380
|
"filename": "src/bundler.ts",
|
|
4353
|
-
"line":
|
|
4381
|
+
"line": 162
|
|
4354
4382
|
},
|
|
4355
4383
|
"name": "entryPoints",
|
|
4356
4384
|
"type": {
|
|
@@ -4387,7 +4415,7 @@
|
|
|
4387
4415
|
"immutable": true,
|
|
4388
4416
|
"locationInModule": {
|
|
4389
4417
|
"filename": "src/bundler.ts",
|
|
4390
|
-
"line":
|
|
4418
|
+
"line": 140
|
|
4391
4419
|
},
|
|
4392
4420
|
"name": "image",
|
|
4393
4421
|
"type": {
|
|
@@ -4402,7 +4430,7 @@
|
|
|
4402
4430
|
"immutable": true,
|
|
4403
4431
|
"locationInModule": {
|
|
4404
4432
|
"filename": "src/bundler.ts",
|
|
4405
|
-
"line":
|
|
4433
|
+
"line": 133
|
|
4406
4434
|
},
|
|
4407
4435
|
"name": "local",
|
|
4408
4436
|
"type": {
|
|
@@ -4417,7 +4445,7 @@
|
|
|
4417
4445
|
"immutable": true,
|
|
4418
4446
|
"locationInModule": {
|
|
4419
4447
|
"filename": "src/bundler.ts",
|
|
4420
|
-
"line":
|
|
4448
|
+
"line": 169
|
|
4421
4449
|
},
|
|
4422
4450
|
"name": "props",
|
|
4423
4451
|
"type": {
|
|
@@ -4670,6 +4698,141 @@
|
|
|
4670
4698
|
],
|
|
4671
4699
|
"symbolId": "src/code:EsbuildCode"
|
|
4672
4700
|
},
|
|
4701
|
+
"@mrgrain/cdk-esbuild.EsbuildSource": {
|
|
4702
|
+
"assembly": "@mrgrain/cdk-esbuild",
|
|
4703
|
+
"docs": {
|
|
4704
|
+
"stability": "stable"
|
|
4705
|
+
},
|
|
4706
|
+
"fqn": "@mrgrain/cdk-esbuild.EsbuildSource",
|
|
4707
|
+
"initializer": {
|
|
4708
|
+
"docs": {
|
|
4709
|
+
"stability": "stable"
|
|
4710
|
+
}
|
|
4711
|
+
},
|
|
4712
|
+
"kind": "class",
|
|
4713
|
+
"locationInModule": {
|
|
4714
|
+
"filename": "src/esbuild-source.ts",
|
|
4715
|
+
"line": 11
|
|
4716
|
+
},
|
|
4717
|
+
"name": "EsbuildSource",
|
|
4718
|
+
"properties": [
|
|
4719
|
+
{
|
|
4720
|
+
"docs": {
|
|
4721
|
+
"stability": "stable",
|
|
4722
|
+
"summary": "First try to find to module, then install it to a temporary location."
|
|
4723
|
+
},
|
|
4724
|
+
"immutable": true,
|
|
4725
|
+
"locationInModule": {
|
|
4726
|
+
"filename": "src/esbuild-source.ts",
|
|
4727
|
+
"line": 71
|
|
4728
|
+
},
|
|
4729
|
+
"name": "auto",
|
|
4730
|
+
"static": true,
|
|
4731
|
+
"type": {
|
|
4732
|
+
"primitive": "string"
|
|
4733
|
+
}
|
|
4734
|
+
},
|
|
4735
|
+
{
|
|
4736
|
+
"docs": {
|
|
4737
|
+
"stability": "stable",
|
|
4738
|
+
"summary": "Install the module to a temporary location."
|
|
4739
|
+
},
|
|
4740
|
+
"immutable": true,
|
|
4741
|
+
"locationInModule": {
|
|
4742
|
+
"filename": "src/esbuild-source.ts",
|
|
4743
|
+
"line": 64
|
|
4744
|
+
},
|
|
4745
|
+
"name": "install",
|
|
4746
|
+
"static": true,
|
|
4747
|
+
"type": {
|
|
4748
|
+
"primitive": "string"
|
|
4749
|
+
}
|
|
4750
|
+
},
|
|
4751
|
+
{
|
|
4752
|
+
"docs": {
|
|
4753
|
+
"stability": "stable",
|
|
4754
|
+
"summary": "Require module by name, do not attempt to find it anywhere else."
|
|
4755
|
+
},
|
|
4756
|
+
"immutable": true,
|
|
4757
|
+
"locationInModule": {
|
|
4758
|
+
"filename": "src/esbuild-source.ts",
|
|
4759
|
+
"line": 57
|
|
4760
|
+
},
|
|
4761
|
+
"name": "nodeJs",
|
|
4762
|
+
"static": true,
|
|
4763
|
+
"type": {
|
|
4764
|
+
"primitive": "string"
|
|
4765
|
+
}
|
|
4766
|
+
},
|
|
4767
|
+
{
|
|
4768
|
+
"docs": {
|
|
4769
|
+
"stability": "stable",
|
|
4770
|
+
"summary": "`EsbuildSource.nodeJs` for NodeJs, `EsbuildSource.auto` for all other languages."
|
|
4771
|
+
},
|
|
4772
|
+
"immutable": true,
|
|
4773
|
+
"locationInModule": {
|
|
4774
|
+
"filename": "src/esbuild-source.ts",
|
|
4775
|
+
"line": 32
|
|
4776
|
+
},
|
|
4777
|
+
"name": "platformDefault",
|
|
4778
|
+
"static": true,
|
|
4779
|
+
"type": {
|
|
4780
|
+
"primitive": "string"
|
|
4781
|
+
}
|
|
4782
|
+
},
|
|
4783
|
+
{
|
|
4784
|
+
"docs": {
|
|
4785
|
+
"stability": "stable",
|
|
4786
|
+
"summary": "Try to find the module in most common paths."
|
|
4787
|
+
},
|
|
4788
|
+
"immutable": true,
|
|
4789
|
+
"locationInModule": {
|
|
4790
|
+
"filename": "src/esbuild-source.ts",
|
|
4791
|
+
"line": 43
|
|
4792
|
+
},
|
|
4793
|
+
"name": "anywhere",
|
|
4794
|
+
"optional": true,
|
|
4795
|
+
"static": true,
|
|
4796
|
+
"type": {
|
|
4797
|
+
"primitive": "string"
|
|
4798
|
+
}
|
|
4799
|
+
},
|
|
4800
|
+
{
|
|
4801
|
+
"docs": {
|
|
4802
|
+
"stability": "stable",
|
|
4803
|
+
"summary": "Try to find the module in common global installation paths."
|
|
4804
|
+
},
|
|
4805
|
+
"immutable": true,
|
|
4806
|
+
"locationInModule": {
|
|
4807
|
+
"filename": "src/esbuild-source.ts",
|
|
4808
|
+
"line": 50
|
|
4809
|
+
},
|
|
4810
|
+
"name": "globalPaths",
|
|
4811
|
+
"optional": true,
|
|
4812
|
+
"static": true,
|
|
4813
|
+
"type": {
|
|
4814
|
+
"primitive": "string"
|
|
4815
|
+
}
|
|
4816
|
+
},
|
|
4817
|
+
{
|
|
4818
|
+
"docs": {
|
|
4819
|
+
"stability": "stable",
|
|
4820
|
+
"summary": "Set the default mechanism to find the module The current default to find the module."
|
|
4821
|
+
},
|
|
4822
|
+
"locationInModule": {
|
|
4823
|
+
"filename": "src/esbuild-source.ts",
|
|
4824
|
+
"line": 18
|
|
4825
|
+
},
|
|
4826
|
+
"name": "default",
|
|
4827
|
+
"optional": true,
|
|
4828
|
+
"static": true,
|
|
4829
|
+
"type": {
|
|
4830
|
+
"primitive": "string"
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4833
|
+
],
|
|
4834
|
+
"symbolId": "src/esbuild-source:EsbuildSource"
|
|
4835
|
+
},
|
|
4673
4836
|
"@mrgrain/cdk-esbuild.InlineJavaScriptCode": {
|
|
4674
4837
|
"assembly": "@mrgrain/cdk-esbuild",
|
|
4675
4838
|
"base": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
@@ -4684,7 +4847,7 @@
|
|
|
4684
4847
|
},
|
|
4685
4848
|
"locationInModule": {
|
|
4686
4849
|
"filename": "src/inline-code.ts",
|
|
4687
|
-
"line":
|
|
4850
|
+
"line": 143
|
|
4688
4851
|
},
|
|
4689
4852
|
"parameters": [
|
|
4690
4853
|
{
|
|
@@ -4724,9 +4887,54 @@
|
|
|
4724
4887
|
"kind": "class",
|
|
4725
4888
|
"locationInModule": {
|
|
4726
4889
|
"filename": "src/inline-code.ts",
|
|
4727
|
-
"line":
|
|
4890
|
+
"line": 142
|
|
4728
4891
|
},
|
|
4892
|
+
"methods": [
|
|
4893
|
+
{
|
|
4894
|
+
"docs": {
|
|
4895
|
+
"stability": "experimental",
|
|
4896
|
+
"summary": "Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun."
|
|
4897
|
+
},
|
|
4898
|
+
"locationInModule": {
|
|
4899
|
+
"filename": "src/inline-code.ts",
|
|
4900
|
+
"line": 95
|
|
4901
|
+
},
|
|
4902
|
+
"name": "bind",
|
|
4903
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
4904
|
+
"parameters": [
|
|
4905
|
+
{
|
|
4906
|
+
"name": "scope",
|
|
4907
|
+
"type": {
|
|
4908
|
+
"fqn": "constructs.Construct"
|
|
4909
|
+
}
|
|
4910
|
+
}
|
|
4911
|
+
],
|
|
4912
|
+
"returns": {
|
|
4913
|
+
"type": {
|
|
4914
|
+
"fqn": "aws-cdk-lib.aws_lambda.CodeConfig"
|
|
4915
|
+
}
|
|
4916
|
+
}
|
|
4917
|
+
}
|
|
4918
|
+
],
|
|
4729
4919
|
"name": "InlineJavaScriptCode",
|
|
4920
|
+
"properties": [
|
|
4921
|
+
{
|
|
4922
|
+
"docs": {
|
|
4923
|
+
"stability": "experimental",
|
|
4924
|
+
"summary": "Determines whether this Code is inline code or not."
|
|
4925
|
+
},
|
|
4926
|
+
"immutable": true,
|
|
4927
|
+
"locationInModule": {
|
|
4928
|
+
"filename": "src/inline-code.ts",
|
|
4929
|
+
"line": 63
|
|
4930
|
+
},
|
|
4931
|
+
"name": "isInline",
|
|
4932
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
4933
|
+
"type": {
|
|
4934
|
+
"primitive": "boolean"
|
|
4935
|
+
}
|
|
4936
|
+
}
|
|
4937
|
+
],
|
|
4730
4938
|
"symbolId": "src/inline-code:InlineJavaScriptCode"
|
|
4731
4939
|
},
|
|
4732
4940
|
"@mrgrain/cdk-esbuild.InlineJsxCode": {
|
|
@@ -4743,7 +4951,7 @@
|
|
|
4743
4951
|
},
|
|
4744
4952
|
"locationInModule": {
|
|
4745
4953
|
"filename": "src/inline-code.ts",
|
|
4746
|
-
"line":
|
|
4954
|
+
"line": 174
|
|
4747
4955
|
},
|
|
4748
4956
|
"parameters": [
|
|
4749
4957
|
{
|
|
@@ -4783,9 +4991,54 @@
|
|
|
4783
4991
|
"kind": "class",
|
|
4784
4992
|
"locationInModule": {
|
|
4785
4993
|
"filename": "src/inline-code.ts",
|
|
4786
|
-
"line":
|
|
4994
|
+
"line": 173
|
|
4787
4995
|
},
|
|
4996
|
+
"methods": [
|
|
4997
|
+
{
|
|
4998
|
+
"docs": {
|
|
4999
|
+
"stability": "experimental",
|
|
5000
|
+
"summary": "Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun."
|
|
5001
|
+
},
|
|
5002
|
+
"locationInModule": {
|
|
5003
|
+
"filename": "src/inline-code.ts",
|
|
5004
|
+
"line": 95
|
|
5005
|
+
},
|
|
5006
|
+
"name": "bind",
|
|
5007
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
5008
|
+
"parameters": [
|
|
5009
|
+
{
|
|
5010
|
+
"name": "scope",
|
|
5011
|
+
"type": {
|
|
5012
|
+
"fqn": "constructs.Construct"
|
|
5013
|
+
}
|
|
5014
|
+
}
|
|
5015
|
+
],
|
|
5016
|
+
"returns": {
|
|
5017
|
+
"type": {
|
|
5018
|
+
"fqn": "aws-cdk-lib.aws_lambda.CodeConfig"
|
|
5019
|
+
}
|
|
5020
|
+
}
|
|
5021
|
+
}
|
|
5022
|
+
],
|
|
4788
5023
|
"name": "InlineJsxCode",
|
|
5024
|
+
"properties": [
|
|
5025
|
+
{
|
|
5026
|
+
"docs": {
|
|
5027
|
+
"stability": "experimental",
|
|
5028
|
+
"summary": "Determines whether this Code is inline code or not."
|
|
5029
|
+
},
|
|
5030
|
+
"immutable": true,
|
|
5031
|
+
"locationInModule": {
|
|
5032
|
+
"filename": "src/inline-code.ts",
|
|
5033
|
+
"line": 63
|
|
5034
|
+
},
|
|
5035
|
+
"name": "isInline",
|
|
5036
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
5037
|
+
"type": {
|
|
5038
|
+
"primitive": "boolean"
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
5041
|
+
],
|
|
4789
5042
|
"symbolId": "src/inline-code:InlineJsxCode"
|
|
4790
5043
|
},
|
|
4791
5044
|
"@mrgrain/cdk-esbuild.InlineTsxCode": {
|
|
@@ -4802,7 +5055,7 @@
|
|
|
4802
5055
|
},
|
|
4803
5056
|
"locationInModule": {
|
|
4804
5057
|
"filename": "src/inline-code.ts",
|
|
4805
|
-
"line":
|
|
5058
|
+
"line": 234
|
|
4806
5059
|
},
|
|
4807
5060
|
"parameters": [
|
|
4808
5061
|
{
|
|
@@ -4842,9 +5095,54 @@
|
|
|
4842
5095
|
"kind": "class",
|
|
4843
5096
|
"locationInModule": {
|
|
4844
5097
|
"filename": "src/inline-code.ts",
|
|
4845
|
-
"line":
|
|
5098
|
+
"line": 233
|
|
4846
5099
|
},
|
|
5100
|
+
"methods": [
|
|
5101
|
+
{
|
|
5102
|
+
"docs": {
|
|
5103
|
+
"stability": "experimental",
|
|
5104
|
+
"summary": "Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun."
|
|
5105
|
+
},
|
|
5106
|
+
"locationInModule": {
|
|
5107
|
+
"filename": "src/inline-code.ts",
|
|
5108
|
+
"line": 95
|
|
5109
|
+
},
|
|
5110
|
+
"name": "bind",
|
|
5111
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
5112
|
+
"parameters": [
|
|
5113
|
+
{
|
|
5114
|
+
"name": "scope",
|
|
5115
|
+
"type": {
|
|
5116
|
+
"fqn": "constructs.Construct"
|
|
5117
|
+
}
|
|
5118
|
+
}
|
|
5119
|
+
],
|
|
5120
|
+
"returns": {
|
|
5121
|
+
"type": {
|
|
5122
|
+
"fqn": "aws-cdk-lib.aws_lambda.CodeConfig"
|
|
5123
|
+
}
|
|
5124
|
+
}
|
|
5125
|
+
}
|
|
5126
|
+
],
|
|
4847
5127
|
"name": "InlineTsxCode",
|
|
5128
|
+
"properties": [
|
|
5129
|
+
{
|
|
5130
|
+
"docs": {
|
|
5131
|
+
"stability": "experimental",
|
|
5132
|
+
"summary": "Determines whether this Code is inline code or not."
|
|
5133
|
+
},
|
|
5134
|
+
"immutable": true,
|
|
5135
|
+
"locationInModule": {
|
|
5136
|
+
"filename": "src/inline-code.ts",
|
|
5137
|
+
"line": 63
|
|
5138
|
+
},
|
|
5139
|
+
"name": "isInline",
|
|
5140
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
5141
|
+
"type": {
|
|
5142
|
+
"primitive": "boolean"
|
|
5143
|
+
}
|
|
5144
|
+
}
|
|
5145
|
+
],
|
|
4848
5146
|
"symbolId": "src/inline-code:InlineTsxCode"
|
|
4849
5147
|
},
|
|
4850
5148
|
"@mrgrain/cdk-esbuild.InlineTypeScriptCode": {
|
|
@@ -4861,7 +5159,7 @@
|
|
|
4861
5159
|
},
|
|
4862
5160
|
"locationInModule": {
|
|
4863
5161
|
"filename": "src/inline-code.ts",
|
|
4864
|
-
"line":
|
|
5162
|
+
"line": 204
|
|
4865
5163
|
},
|
|
4866
5164
|
"parameters": [
|
|
4867
5165
|
{
|
|
@@ -4901,9 +5199,54 @@
|
|
|
4901
5199
|
"kind": "class",
|
|
4902
5200
|
"locationInModule": {
|
|
4903
5201
|
"filename": "src/inline-code.ts",
|
|
4904
|
-
"line":
|
|
5202
|
+
"line": 203
|
|
4905
5203
|
},
|
|
5204
|
+
"methods": [
|
|
5205
|
+
{
|
|
5206
|
+
"docs": {
|
|
5207
|
+
"stability": "experimental",
|
|
5208
|
+
"summary": "Called when the lambda or layer is initialized to allow this object to bind to the stack, add resources and have fun."
|
|
5209
|
+
},
|
|
5210
|
+
"locationInModule": {
|
|
5211
|
+
"filename": "src/inline-code.ts",
|
|
5212
|
+
"line": 95
|
|
5213
|
+
},
|
|
5214
|
+
"name": "bind",
|
|
5215
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
5216
|
+
"parameters": [
|
|
5217
|
+
{
|
|
5218
|
+
"name": "scope",
|
|
5219
|
+
"type": {
|
|
5220
|
+
"fqn": "constructs.Construct"
|
|
5221
|
+
}
|
|
5222
|
+
}
|
|
5223
|
+
],
|
|
5224
|
+
"returns": {
|
|
5225
|
+
"type": {
|
|
5226
|
+
"fqn": "aws-cdk-lib.aws_lambda.CodeConfig"
|
|
5227
|
+
}
|
|
5228
|
+
}
|
|
5229
|
+
}
|
|
5230
|
+
],
|
|
4906
5231
|
"name": "InlineTypeScriptCode",
|
|
5232
|
+
"properties": [
|
|
5233
|
+
{
|
|
5234
|
+
"docs": {
|
|
5235
|
+
"stability": "experimental",
|
|
5236
|
+
"summary": "Determines whether this Code is inline code or not."
|
|
5237
|
+
},
|
|
5238
|
+
"immutable": true,
|
|
5239
|
+
"locationInModule": {
|
|
5240
|
+
"filename": "src/inline-code.ts",
|
|
5241
|
+
"line": 63
|
|
5242
|
+
},
|
|
5243
|
+
"name": "isInline",
|
|
5244
|
+
"overrides": "aws-cdk-lib.aws_lambda.InlineCode",
|
|
5245
|
+
"type": {
|
|
5246
|
+
"primitive": "boolean"
|
|
5247
|
+
}
|
|
5248
|
+
}
|
|
5249
|
+
],
|
|
4907
5250
|
"symbolId": "src/inline-code:InlineTypeScriptCode"
|
|
4908
5251
|
},
|
|
4909
5252
|
"@mrgrain/cdk-esbuild.JavaScriptAsset": {
|
|
@@ -6016,7 +6359,7 @@
|
|
|
6016
6359
|
"kind": "interface",
|
|
6017
6360
|
"locationInModule": {
|
|
6018
6361
|
"filename": "src/inline-code.ts",
|
|
6019
|
-
"line":
|
|
6362
|
+
"line": 11
|
|
6020
6363
|
},
|
|
6021
6364
|
"name": "TransformerProps",
|
|
6022
6365
|
"properties": [
|
|
@@ -6030,7 +6373,7 @@
|
|
|
6030
6373
|
"immutable": true,
|
|
6031
6374
|
"locationInModule": {
|
|
6032
6375
|
"filename": "src/inline-code.ts",
|
|
6033
|
-
"line":
|
|
6376
|
+
"line": 40
|
|
6034
6377
|
},
|
|
6035
6378
|
"name": "esbuildBinaryPath",
|
|
6036
6379
|
"optional": true,
|
|
@@ -6038,6 +6381,25 @@
|
|
|
6038
6381
|
"primitive": "string"
|
|
6039
6382
|
}
|
|
6040
6383
|
},
|
|
6384
|
+
{
|
|
6385
|
+
"abstract": true,
|
|
6386
|
+
"docs": {
|
|
6387
|
+
"default": "- `CDK_ESBUILD_MODULE_PATH` or package resolution (see above)",
|
|
6388
|
+
"remarks": "E.g. \"/home/user/.npm/node_modules/esbuild/lib/main.js\"\n\nIf not set, the module path will be determined in the following order:\n\n- Use a path from the `CDK_ESBUILD_MODULE_PATH` environment variable\n- In TypeScript, fallback to the default Node.js package resolution mechanism\n- All other languages (Python, Go, .NET, Java) use an automatic \"best effort\" resolution mechanism. \\\n The exact algorithm of this mechanism is considered an implementation detail and should not be relied on.\n If `esbuild` cannot be found, it might be installed dynamically to a temporary location.\n To opt-out of this behavior, set either `esbuildModulePath` or `CDK_ESBUILD_MODULE_PATH` env variable.",
|
|
6389
|
+
"stability": "experimental",
|
|
6390
|
+
"summary": "Absolute path to the esbuild module JS file."
|
|
6391
|
+
},
|
|
6392
|
+
"immutable": true,
|
|
6393
|
+
"locationInModule": {
|
|
6394
|
+
"filename": "src/inline-code.ts",
|
|
6395
|
+
"line": 59
|
|
6396
|
+
},
|
|
6397
|
+
"name": "esbuildModulePath",
|
|
6398
|
+
"optional": true,
|
|
6399
|
+
"type": {
|
|
6400
|
+
"primitive": "string"
|
|
6401
|
+
}
|
|
6402
|
+
},
|
|
6041
6403
|
{
|
|
6042
6404
|
"abstract": true,
|
|
6043
6405
|
"docs": {
|
|
@@ -6045,7 +6407,7 @@
|
|
|
6045
6407
|
"throws": "esbuild.TransformFailure",
|
|
6046
6408
|
"type": "esbuild.transformSync"
|
|
6047
6409
|
},
|
|
6048
|
-
"default": "esbuild.transformSync",
|
|
6410
|
+
"default": "`esbuild.transformSync`",
|
|
6049
6411
|
"remarks": "The function will receive the computed options from the bundler. It can use with these options as it wishes, however a TransformResult must be returned to integrate with CDK.\nMust throw a `TransformFailure` on failure to correctly inform the bundler.",
|
|
6050
6412
|
"returns": "esbuild.TransformResult",
|
|
6051
6413
|
"stability": "experimental",
|
|
@@ -6054,7 +6416,7 @@
|
|
|
6054
6416
|
"immutable": true,
|
|
6055
6417
|
"locationInModule": {
|
|
6056
6418
|
"filename": "src/inline-code.ts",
|
|
6057
|
-
"line":
|
|
6419
|
+
"line": 31
|
|
6058
6420
|
},
|
|
6059
6421
|
"name": "transformFn",
|
|
6060
6422
|
"optional": true,
|
|
@@ -6073,7 +6435,7 @@
|
|
|
6073
6435
|
"immutable": true,
|
|
6074
6436
|
"locationInModule": {
|
|
6075
6437
|
"filename": "src/inline-code.ts",
|
|
6076
|
-
"line":
|
|
6438
|
+
"line": 18
|
|
6077
6439
|
},
|
|
6078
6440
|
"name": "transformOptions",
|
|
6079
6441
|
"optional": true,
|
|
@@ -6465,6 +6827,6 @@
|
|
|
6465
6827
|
"symbolId": "src/source:TypeScriptSourceProps"
|
|
6466
6828
|
}
|
|
6467
6829
|
},
|
|
6468
|
-
"version": "3.
|
|
6469
|
-
"fingerprint": "
|
|
6830
|
+
"version": "3.11.0",
|
|
6831
|
+
"fingerprint": "/opppFqzoRcQ/Vwq95UalujPhPycMhwKu8fUrCLDpNw="
|
|
6470
6832
|
}
|