@mrgrain/cdk-esbuild 3.2.0 → 3.5.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/.gitattributes +0 -1
- package/.jsii +202 -88
- package/.projenrc.ts +14 -14
- package/API.md +168 -42
- package/CHANGELOG.md +2 -2
- package/README.md +25 -23
- package/lib/asset.d.ts +2 -6
- package/lib/asset.d.ts.map +1 -0
- package/lib/asset.js +3 -3
- package/lib/bundler.d.ts +33 -19
- package/lib/bundler.d.ts.map +1 -0
- package/lib/bundler.js +49 -13
- package/lib/code.d.ts +2 -35
- package/lib/code.d.ts.map +1 -0
- package/lib/code.js +4 -23
- package/lib/esbuild-types.d.ts +69 -292
- package/lib/esbuild-types.d.ts.map +1 -0
- package/lib/esbuild-types.js +1 -1
- package/lib/esbuild-wrapper.d.ts +1 -0
- package/lib/esbuild-wrapper.d.ts.map +1 -0
- package/lib/formatMessages.d.ts +1 -0
- package/lib/formatMessages.d.ts.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/inline-code.d.ts +15 -37
- package/lib/inline-code.d.ts.map +1 -0
- package/lib/inline-code.js +13 -33
- package/lib/source.d.ts +1 -35
- package/lib/source.d.ts.map +1 -0
- package/lib/source.js +3 -26
- package/package.json +23 -17
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
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.59.0 (build eb02c92)",
|
|
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": "# cdk-esbuild\n\n_CDK constructs for [esbuild](https://github.com/evanw/esbuild), an extremely fast JavaScript bundler_\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[Getting started](#getting-started) | [Migrating to v3](#migrating-to-v3) |\n[Documentation](#documentation) | [API Reference](#api-reference) | [Versioning](#versioning)\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 generally stable and ready to be used in production, as many do. However _esbuild_ not yet released a version 1.0.0 yet and its API is still in active development. Please check their guide on [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_ and _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_14_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 plugin to high-level CDK features. They share the same set of parameters, props and build options._\n\nUnderlying 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 within the code completion of your IDE.\n\n## Escape hatches\n\nIt's possible that you want to use a 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 version of esbuild that is installed by any other means than `npm`, including Docker\n- Plugin support is needed for the 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### 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 _mostly_ 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## Future releases\n\n### Stable esbuild\n\nOnce `esbuild` has reached a stable version 1.0, a new major version will be released for _all_ breaking changes, including updates to minimum (peer) dependencies.\n\n## Library authors\n\nWhen developing a library consumed by other packages, you'll most likely have to set `buildOptions.absWorkingDir`. The easiest way to do this, is to resolve based on the directory name of the 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"
|
|
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) | [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#### 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"
|
|
2804
2804
|
},
|
|
2805
2805
|
"repository": {
|
|
2806
2806
|
"type": "git",
|
|
@@ -2900,7 +2900,7 @@
|
|
|
2900
2900
|
"kind": "interface",
|
|
2901
2901
|
"locationInModule": {
|
|
2902
2902
|
"filename": "src/esbuild-types.ts",
|
|
2903
|
-
"line":
|
|
2903
|
+
"line": 76
|
|
2904
2904
|
},
|
|
2905
2905
|
"name": "BuildOptions",
|
|
2906
2906
|
"properties": [
|
|
@@ -2913,7 +2913,7 @@
|
|
|
2913
2913
|
"immutable": true,
|
|
2914
2914
|
"locationInModule": {
|
|
2915
2915
|
"filename": "src/esbuild-types.ts",
|
|
2916
|
-
"line":
|
|
2916
|
+
"line": 128
|
|
2917
2917
|
},
|
|
2918
2918
|
"name": "absWorkingDir",
|
|
2919
2919
|
"optional": true,
|
|
@@ -2930,7 +2930,7 @@
|
|
|
2930
2930
|
"immutable": true,
|
|
2931
2931
|
"locationInModule": {
|
|
2932
2932
|
"filename": "src/esbuild-types.ts",
|
|
2933
|
-
"line":
|
|
2933
|
+
"line": 106
|
|
2934
2934
|
},
|
|
2935
2935
|
"name": "allowOverwrite",
|
|
2936
2936
|
"optional": true,
|
|
@@ -2947,7 +2947,7 @@
|
|
|
2947
2947
|
"immutable": true,
|
|
2948
2948
|
"locationInModule": {
|
|
2949
2949
|
"filename": "src/esbuild-types.ts",
|
|
2950
|
-
"line":
|
|
2950
|
+
"line": 118
|
|
2951
2951
|
},
|
|
2952
2952
|
"name": "assetNames",
|
|
2953
2953
|
"optional": true,
|
|
@@ -2964,7 +2964,7 @@
|
|
|
2964
2964
|
"immutable": true,
|
|
2965
2965
|
"locationInModule": {
|
|
2966
2966
|
"filename": "src/esbuild-types.ts",
|
|
2967
|
-
"line":
|
|
2967
|
+
"line": 122
|
|
2968
2968
|
},
|
|
2969
2969
|
"name": "banner",
|
|
2970
2970
|
"optional": true,
|
|
@@ -2986,7 +2986,7 @@
|
|
|
2986
2986
|
"immutable": true,
|
|
2987
2987
|
"locationInModule": {
|
|
2988
2988
|
"filename": "src/esbuild-types.ts",
|
|
2989
|
-
"line":
|
|
2989
|
+
"line": 78
|
|
2990
2990
|
},
|
|
2991
2991
|
"name": "bundle",
|
|
2992
2992
|
"optional": true,
|
|
@@ -3003,7 +3003,7 @@
|
|
|
3003
3003
|
"immutable": true,
|
|
3004
3004
|
"locationInModule": {
|
|
3005
3005
|
"filename": "src/esbuild-types.ts",
|
|
3006
|
-
"line":
|
|
3006
|
+
"line": 46
|
|
3007
3007
|
},
|
|
3008
3008
|
"name": "charset",
|
|
3009
3009
|
"optional": true,
|
|
@@ -3020,7 +3020,7 @@
|
|
|
3020
3020
|
"immutable": true,
|
|
3021
3021
|
"locationInModule": {
|
|
3022
3022
|
"filename": "src/esbuild-types.ts",
|
|
3023
|
-
"line":
|
|
3023
|
+
"line": 116
|
|
3024
3024
|
},
|
|
3025
3025
|
"name": "chunkNames",
|
|
3026
3026
|
"optional": true,
|
|
@@ -3037,7 +3037,7 @@
|
|
|
3037
3037
|
"immutable": true,
|
|
3038
3038
|
"locationInModule": {
|
|
3039
3039
|
"filename": "src/esbuild-types.ts",
|
|
3040
|
-
"line":
|
|
3040
|
+
"line": 67
|
|
3041
3041
|
},
|
|
3042
3042
|
"name": "color",
|
|
3043
3043
|
"optional": true,
|
|
@@ -3054,7 +3054,7 @@
|
|
|
3054
3054
|
"immutable": true,
|
|
3055
3055
|
"locationInModule": {
|
|
3056
3056
|
"filename": "src/esbuild-types.ts",
|
|
3057
|
-
"line":
|
|
3057
|
+
"line": 102
|
|
3058
3058
|
},
|
|
3059
3059
|
"name": "conditions",
|
|
3060
3060
|
"optional": true,
|
|
@@ -3076,7 +3076,7 @@
|
|
|
3076
3076
|
"immutable": true,
|
|
3077
3077
|
"locationInModule": {
|
|
3078
3078
|
"filename": "src/esbuild-types.ts",
|
|
3079
|
-
"line":
|
|
3079
|
+
"line": 60
|
|
3080
3080
|
},
|
|
3081
3081
|
"name": "define",
|
|
3082
3082
|
"optional": true,
|
|
@@ -3098,7 +3098,7 @@
|
|
|
3098
3098
|
"immutable": true,
|
|
3099
3099
|
"locationInModule": {
|
|
3100
3100
|
"filename": "src/esbuild-types.ts",
|
|
3101
|
-
"line":
|
|
3101
|
+
"line": 36
|
|
3102
3102
|
},
|
|
3103
3103
|
"name": "drop",
|
|
3104
3104
|
"optional": true,
|
|
@@ -3120,7 +3120,7 @@
|
|
|
3120
3120
|
"immutable": true,
|
|
3121
3121
|
"locationInModule": {
|
|
3122
3122
|
"filename": "src/esbuild-types.ts",
|
|
3123
|
-
"line":
|
|
3123
|
+
"line": 114
|
|
3124
3124
|
},
|
|
3125
3125
|
"name": "entryNames",
|
|
3126
3126
|
"optional": true,
|
|
@@ -3137,7 +3137,7 @@
|
|
|
3137
3137
|
"immutable": true,
|
|
3138
3138
|
"locationInModule": {
|
|
3139
3139
|
"filename": "src/esbuild-types.ts",
|
|
3140
|
-
"line":
|
|
3140
|
+
"line": 94
|
|
3141
3141
|
},
|
|
3142
3142
|
"name": "external",
|
|
3143
3143
|
"optional": true,
|
|
@@ -3159,7 +3159,7 @@
|
|
|
3159
3159
|
"immutable": true,
|
|
3160
3160
|
"locationInModule": {
|
|
3161
3161
|
"filename": "src/esbuild-types.ts",
|
|
3162
|
-
"line":
|
|
3162
|
+
"line": 124
|
|
3163
3163
|
},
|
|
3164
3164
|
"name": "footer",
|
|
3165
3165
|
"optional": true,
|
|
@@ -3215,7 +3215,7 @@
|
|
|
3215
3215
|
"immutable": true,
|
|
3216
3216
|
"locationInModule": {
|
|
3217
3217
|
"filename": "src/esbuild-types.ts",
|
|
3218
|
-
"line":
|
|
3218
|
+
"line": 50
|
|
3219
3219
|
},
|
|
3220
3220
|
"name": "ignoreAnnotations",
|
|
3221
3221
|
"optional": true,
|
|
@@ -3232,7 +3232,7 @@
|
|
|
3232
3232
|
"immutable": true,
|
|
3233
3233
|
"locationInModule": {
|
|
3234
3234
|
"filename": "src/esbuild-types.ts",
|
|
3235
|
-
"line":
|
|
3235
|
+
"line": 126
|
|
3236
3236
|
},
|
|
3237
3237
|
"name": "incremental",
|
|
3238
3238
|
"optional": true,
|
|
@@ -3249,7 +3249,7 @@
|
|
|
3249
3249
|
"immutable": true,
|
|
3250
3250
|
"locationInModule": {
|
|
3251
3251
|
"filename": "src/esbuild-types.ts",
|
|
3252
|
-
"line":
|
|
3252
|
+
"line": 120
|
|
3253
3253
|
},
|
|
3254
3254
|
"name": "inject",
|
|
3255
3255
|
"optional": true,
|
|
@@ -3271,7 +3271,7 @@
|
|
|
3271
3271
|
"immutable": true,
|
|
3272
3272
|
"locationInModule": {
|
|
3273
3273
|
"filename": "src/esbuild-types.ts",
|
|
3274
|
-
"line":
|
|
3274
|
+
"line": 53
|
|
3275
3275
|
},
|
|
3276
3276
|
"name": "jsx",
|
|
3277
3277
|
"optional": true,
|
|
@@ -3288,7 +3288,7 @@
|
|
|
3288
3288
|
"immutable": true,
|
|
3289
3289
|
"locationInModule": {
|
|
3290
3290
|
"filename": "src/esbuild-types.ts",
|
|
3291
|
-
"line":
|
|
3291
|
+
"line": 55
|
|
3292
3292
|
},
|
|
3293
3293
|
"name": "jsxFactory",
|
|
3294
3294
|
"optional": true,
|
|
@@ -3305,7 +3305,7 @@
|
|
|
3305
3305
|
"immutable": true,
|
|
3306
3306
|
"locationInModule": {
|
|
3307
3307
|
"filename": "src/esbuild-types.ts",
|
|
3308
|
-
"line":
|
|
3308
|
+
"line": 57
|
|
3309
3309
|
},
|
|
3310
3310
|
"name": "jsxFragment",
|
|
3311
3311
|
"optional": true,
|
|
@@ -3322,7 +3322,7 @@
|
|
|
3322
3322
|
"immutable": true,
|
|
3323
3323
|
"locationInModule": {
|
|
3324
3324
|
"filename": "src/esbuild-types.ts",
|
|
3325
|
-
"line":
|
|
3325
|
+
"line": 64
|
|
3326
3326
|
},
|
|
3327
3327
|
"name": "keepNames",
|
|
3328
3328
|
"optional": true,
|
|
@@ -3356,7 +3356,7 @@
|
|
|
3356
3356
|
"immutable": true,
|
|
3357
3357
|
"locationInModule": {
|
|
3358
3358
|
"filename": "src/esbuild-types.ts",
|
|
3359
|
-
"line":
|
|
3359
|
+
"line": 96
|
|
3360
3360
|
},
|
|
3361
3361
|
"name": "loader",
|
|
3362
3362
|
"optional": true,
|
|
@@ -3378,7 +3378,7 @@
|
|
|
3378
3378
|
"immutable": true,
|
|
3379
3379
|
"locationInModule": {
|
|
3380
3380
|
"filename": "src/esbuild-types.ts",
|
|
3381
|
-
"line":
|
|
3381
|
+
"line": 69
|
|
3382
3382
|
},
|
|
3383
3383
|
"name": "logLevel",
|
|
3384
3384
|
"optional": true,
|
|
@@ -3395,7 +3395,7 @@
|
|
|
3395
3395
|
"immutable": true,
|
|
3396
3396
|
"locationInModule": {
|
|
3397
3397
|
"filename": "src/esbuild-types.ts",
|
|
3398
|
-
"line":
|
|
3398
|
+
"line": 71
|
|
3399
3399
|
},
|
|
3400
3400
|
"name": "logLimit",
|
|
3401
3401
|
"optional": true,
|
|
@@ -3403,6 +3403,28 @@
|
|
|
3403
3403
|
"primitive": "number"
|
|
3404
3404
|
}
|
|
3405
3405
|
},
|
|
3406
|
+
{
|
|
3407
|
+
"abstract": true,
|
|
3408
|
+
"docs": {
|
|
3409
|
+
"stability": "stable",
|
|
3410
|
+
"summary": "Documentation: https://esbuild.github.io/api/#log-override."
|
|
3411
|
+
},
|
|
3412
|
+
"immutable": true,
|
|
3413
|
+
"locationInModule": {
|
|
3414
|
+
"filename": "src/esbuild-types.ts",
|
|
3415
|
+
"line": 73
|
|
3416
|
+
},
|
|
3417
|
+
"name": "logOverride",
|
|
3418
|
+
"optional": true,
|
|
3419
|
+
"type": {
|
|
3420
|
+
"collection": {
|
|
3421
|
+
"elementtype": {
|
|
3422
|
+
"primitive": "string"
|
|
3423
|
+
},
|
|
3424
|
+
"kind": "map"
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
},
|
|
3406
3428
|
{
|
|
3407
3429
|
"abstract": true,
|
|
3408
3430
|
"docs": {
|
|
@@ -3412,7 +3434,7 @@
|
|
|
3412
3434
|
"immutable": true,
|
|
3413
3435
|
"locationInModule": {
|
|
3414
3436
|
"filename": "src/esbuild-types.ts",
|
|
3415
|
-
"line":
|
|
3437
|
+
"line": 100
|
|
3416
3438
|
},
|
|
3417
3439
|
"name": "mainFields",
|
|
3418
3440
|
"optional": true,
|
|
@@ -3434,7 +3456,7 @@
|
|
|
3434
3456
|
"immutable": true,
|
|
3435
3457
|
"locationInModule": {
|
|
3436
3458
|
"filename": "src/esbuild-types.ts",
|
|
3437
|
-
"line":
|
|
3459
|
+
"line": 34
|
|
3438
3460
|
},
|
|
3439
3461
|
"name": "mangleCache",
|
|
3440
3462
|
"optional": true,
|
|
@@ -3473,6 +3495,23 @@
|
|
|
3473
3495
|
"primitive": "any"
|
|
3474
3496
|
}
|
|
3475
3497
|
},
|
|
3498
|
+
{
|
|
3499
|
+
"abstract": true,
|
|
3500
|
+
"docs": {
|
|
3501
|
+
"stability": "stable",
|
|
3502
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
3503
|
+
},
|
|
3504
|
+
"immutable": true,
|
|
3505
|
+
"locationInModule": {
|
|
3506
|
+
"filename": "src/esbuild-types.ts",
|
|
3507
|
+
"line": 32
|
|
3508
|
+
},
|
|
3509
|
+
"name": "mangleQuoted",
|
|
3510
|
+
"optional": true,
|
|
3511
|
+
"type": {
|
|
3512
|
+
"primitive": "boolean"
|
|
3513
|
+
}
|
|
3514
|
+
},
|
|
3476
3515
|
{
|
|
3477
3516
|
"abstract": true,
|
|
3478
3517
|
"docs": {
|
|
@@ -3482,7 +3521,7 @@
|
|
|
3482
3521
|
"immutable": true,
|
|
3483
3522
|
"locationInModule": {
|
|
3484
3523
|
"filename": "src/esbuild-types.ts",
|
|
3485
|
-
"line":
|
|
3524
|
+
"line": 86
|
|
3486
3525
|
},
|
|
3487
3526
|
"name": "metafile",
|
|
3488
3527
|
"optional": true,
|
|
@@ -3499,7 +3538,7 @@
|
|
|
3499
3538
|
"immutable": true,
|
|
3500
3539
|
"locationInModule": {
|
|
3501
3540
|
"filename": "src/esbuild-types.ts",
|
|
3502
|
-
"line":
|
|
3541
|
+
"line": 38
|
|
3503
3542
|
},
|
|
3504
3543
|
"name": "minify",
|
|
3505
3544
|
"optional": true,
|
|
@@ -3516,7 +3555,7 @@
|
|
|
3516
3555
|
"immutable": true,
|
|
3517
3556
|
"locationInModule": {
|
|
3518
3557
|
"filename": "src/esbuild-types.ts",
|
|
3519
|
-
"line":
|
|
3558
|
+
"line": 42
|
|
3520
3559
|
},
|
|
3521
3560
|
"name": "minifyIdentifiers",
|
|
3522
3561
|
"optional": true,
|
|
@@ -3533,7 +3572,7 @@
|
|
|
3533
3572
|
"immutable": true,
|
|
3534
3573
|
"locationInModule": {
|
|
3535
3574
|
"filename": "src/esbuild-types.ts",
|
|
3536
|
-
"line":
|
|
3575
|
+
"line": 44
|
|
3537
3576
|
},
|
|
3538
3577
|
"name": "minifySyntax",
|
|
3539
3578
|
"optional": true,
|
|
@@ -3550,7 +3589,7 @@
|
|
|
3550
3589
|
"immutable": true,
|
|
3551
3590
|
"locationInModule": {
|
|
3552
3591
|
"filename": "src/esbuild-types.ts",
|
|
3553
|
-
"line":
|
|
3592
|
+
"line": 40
|
|
3554
3593
|
},
|
|
3555
3594
|
"name": "minifyWhitespace",
|
|
3556
3595
|
"optional": true,
|
|
@@ -3567,7 +3606,7 @@
|
|
|
3567
3606
|
"immutable": true,
|
|
3568
3607
|
"locationInModule": {
|
|
3569
3608
|
"filename": "src/esbuild-types.ts",
|
|
3570
|
-
"line":
|
|
3609
|
+
"line": 130
|
|
3571
3610
|
},
|
|
3572
3611
|
"name": "nodePaths",
|
|
3573
3612
|
"optional": true,
|
|
@@ -3589,7 +3628,7 @@
|
|
|
3589
3628
|
"immutable": true,
|
|
3590
3629
|
"locationInModule": {
|
|
3591
3630
|
"filename": "src/esbuild-types.ts",
|
|
3592
|
-
"line":
|
|
3631
|
+
"line": 90
|
|
3593
3632
|
},
|
|
3594
3633
|
"name": "outbase",
|
|
3595
3634
|
"optional": true,
|
|
@@ -3606,7 +3645,7 @@
|
|
|
3606
3645
|
"immutable": true,
|
|
3607
3646
|
"locationInModule": {
|
|
3608
3647
|
"filename": "src/esbuild-types.ts",
|
|
3609
|
-
"line":
|
|
3648
|
+
"line": 88
|
|
3610
3649
|
},
|
|
3611
3650
|
"name": "outdir",
|
|
3612
3651
|
"optional": true,
|
|
@@ -3623,7 +3662,7 @@
|
|
|
3623
3662
|
"immutable": true,
|
|
3624
3663
|
"locationInModule": {
|
|
3625
3664
|
"filename": "src/esbuild-types.ts",
|
|
3626
|
-
"line":
|
|
3665
|
+
"line": 110
|
|
3627
3666
|
},
|
|
3628
3667
|
"name": "outExtension",
|
|
3629
3668
|
"optional": true,
|
|
@@ -3645,7 +3684,7 @@
|
|
|
3645
3684
|
"immutable": true,
|
|
3646
3685
|
"locationInModule": {
|
|
3647
3686
|
"filename": "src/esbuild-types.ts",
|
|
3648
|
-
"line":
|
|
3687
|
+
"line": 84
|
|
3649
3688
|
},
|
|
3650
3689
|
"name": "outfile",
|
|
3651
3690
|
"optional": true,
|
|
@@ -3662,7 +3701,7 @@
|
|
|
3662
3701
|
"immutable": true,
|
|
3663
3702
|
"locationInModule": {
|
|
3664
3703
|
"filename": "src/esbuild-types.ts",
|
|
3665
|
-
"line":
|
|
3704
|
+
"line": 92
|
|
3666
3705
|
},
|
|
3667
3706
|
"name": "platform",
|
|
3668
3707
|
"optional": true,
|
|
@@ -3679,7 +3718,7 @@
|
|
|
3679
3718
|
"immutable": true,
|
|
3680
3719
|
"locationInModule": {
|
|
3681
3720
|
"filename": "src/esbuild-types.ts",
|
|
3682
|
-
"line":
|
|
3721
|
+
"line": 82
|
|
3683
3722
|
},
|
|
3684
3723
|
"name": "preserveSymlinks",
|
|
3685
3724
|
"optional": true,
|
|
@@ -3696,7 +3735,7 @@
|
|
|
3696
3735
|
"immutable": true,
|
|
3697
3736
|
"locationInModule": {
|
|
3698
3737
|
"filename": "src/esbuild-types.ts",
|
|
3699
|
-
"line":
|
|
3738
|
+
"line": 112
|
|
3700
3739
|
},
|
|
3701
3740
|
"name": "publicPath",
|
|
3702
3741
|
"optional": true,
|
|
@@ -3713,7 +3752,7 @@
|
|
|
3713
3752
|
"immutable": true,
|
|
3714
3753
|
"locationInModule": {
|
|
3715
3754
|
"filename": "src/esbuild-types.ts",
|
|
3716
|
-
"line":
|
|
3755
|
+
"line": 62
|
|
3717
3756
|
},
|
|
3718
3757
|
"name": "pure",
|
|
3719
3758
|
"optional": true,
|
|
@@ -3752,7 +3791,7 @@
|
|
|
3752
3791
|
"immutable": true,
|
|
3753
3792
|
"locationInModule": {
|
|
3754
3793
|
"filename": "src/esbuild-types.ts",
|
|
3755
|
-
"line":
|
|
3794
|
+
"line": 98
|
|
3756
3795
|
},
|
|
3757
3796
|
"name": "resolveExtensions",
|
|
3758
3797
|
"optional": true,
|
|
@@ -3834,7 +3873,7 @@
|
|
|
3834
3873
|
"immutable": true,
|
|
3835
3874
|
"locationInModule": {
|
|
3836
3875
|
"filename": "src/esbuild-types.ts",
|
|
3837
|
-
"line":
|
|
3876
|
+
"line": 80
|
|
3838
3877
|
},
|
|
3839
3878
|
"name": "splitting",
|
|
3840
3879
|
"optional": true,
|
|
@@ -3882,7 +3921,7 @@
|
|
|
3882
3921
|
"immutable": true,
|
|
3883
3922
|
"locationInModule": {
|
|
3884
3923
|
"filename": "src/esbuild-types.ts",
|
|
3885
|
-
"line":
|
|
3924
|
+
"line": 48
|
|
3886
3925
|
},
|
|
3887
3926
|
"name": "treeShaking",
|
|
3888
3927
|
"optional": true,
|
|
@@ -3899,7 +3938,7 @@
|
|
|
3899
3938
|
"immutable": true,
|
|
3900
3939
|
"locationInModule": {
|
|
3901
3940
|
"filename": "src/esbuild-types.ts",
|
|
3902
|
-
"line":
|
|
3941
|
+
"line": 108
|
|
3903
3942
|
},
|
|
3904
3943
|
"name": "tsconfig",
|
|
3905
3944
|
"optional": true,
|
|
@@ -3916,7 +3955,7 @@
|
|
|
3916
3955
|
"immutable": true,
|
|
3917
3956
|
"locationInModule": {
|
|
3918
3957
|
"filename": "src/esbuild-types.ts",
|
|
3919
|
-
"line":
|
|
3958
|
+
"line": 104
|
|
3920
3959
|
},
|
|
3921
3960
|
"name": "write",
|
|
3922
3961
|
"optional": true,
|
|
@@ -3937,7 +3976,7 @@
|
|
|
3937
3976
|
"kind": "interface",
|
|
3938
3977
|
"locationInModule": {
|
|
3939
3978
|
"filename": "src/bundler.ts",
|
|
3940
|
-
"line":
|
|
3979
|
+
"line": 23
|
|
3941
3980
|
},
|
|
3942
3981
|
"name": "BundlerProps",
|
|
3943
3982
|
"properties": [
|
|
@@ -3957,7 +3996,7 @@
|
|
|
3957
3996
|
"immutable": true,
|
|
3958
3997
|
"locationInModule": {
|
|
3959
3998
|
"filename": "src/bundler.ts",
|
|
3960
|
-
"line":
|
|
3999
|
+
"line": 79
|
|
3961
4000
|
},
|
|
3962
4001
|
"name": "buildFn",
|
|
3963
4002
|
"optional": true,
|
|
@@ -3968,7 +4007,7 @@
|
|
|
3968
4007
|
{
|
|
3969
4008
|
"abstract": true,
|
|
3970
4009
|
"docs": {
|
|
3971
|
-
"remarks": "
|
|
4010
|
+
"remarks": "* `buildOptions.outdir: string`\nThe actual path for the output directory is defined by CDK. However setting this option allows to write files into a subdirectory. \\\nFor example `{ outdir: 'js' }` will create an asset with a single directory called `js`, which contains all built files. This approach can be useful for static website deployments, where JavaScript code should be placed into a subdirectory. \\\n*Cannot be used together with `outfile`*.\n* `buildOptions.outfile: string`\nRelative path to a file inside the CDK asset output directory.\nFor example `{ outfile: 'js/index.js' }` will create an asset with a single directory called `js`, which contains a single file `index.js`. This can be useful to rename the entry point. \\\n*Cannot be used with multiple entryPoints or together with `outdir`.*\n* `buildOptions.absWorkingDir: string`\nAbsolute path to the [esbuild working directory](https://esbuild.github.io/api/#working-directory) and defaults to the [current working directory](https://en.wikipedia.org/wiki/Working_directory). \\\nIf paths cannot be found, a good starting point is to look at the concatenation of `absWorkingDir + entryPoint`. It must always be a valid absolute path pointing to the entry point. When needed, the probably easiest way to set absWorkingDir is to use a combination of `resolve` and `__dirname` (see \"Library authors\" section in the documentation).",
|
|
3972
4011
|
"see": "https://esbuild.github.io/api/#build-api",
|
|
3973
4012
|
"stability": "stable",
|
|
3974
4013
|
"summary": "Build options passed on to esbuild. Please refer to the esbuild Build API docs for details."
|
|
@@ -3976,7 +4015,7 @@
|
|
|
3976
4015
|
"immutable": true,
|
|
3977
4016
|
"locationInModule": {
|
|
3978
4017
|
"filename": "src/bundler.ts",
|
|
3979
|
-
"line":
|
|
4018
|
+
"line": 42
|
|
3980
4019
|
},
|
|
3981
4020
|
"name": "buildOptions",
|
|
3982
4021
|
"optional": true,
|
|
@@ -3987,19 +4026,55 @@
|
|
|
3987
4026
|
{
|
|
3988
4027
|
"abstract": true,
|
|
3989
4028
|
"docs": {
|
|
3990
|
-
"remarks": "
|
|
4029
|
+
"remarks": "* When provided with a `string` or `array`, all files are copied to the root of asset staging directory.\n* When given a `map`, the key indicates the destination relative to the asset staging directory and the value is a list of all sources to be copied.\n\nTherefore the following values for `copyDir` are all equivalent:\n```ts\n{ copyDir: \"path/to/source\" }\n{ copyDir: [\"path/to/source\"] }\n{ copyDir: { \".\": \"path/to/source\" } }\n{ copyDir: { \".\": [\"path/to/source\"] } }\n```\nThe destination cannot be outside of the asset staging directory.\nIf you are receiving the error \"Cannot copy files to outside of the asset staging directory.\"\nyou are likely using `..` or an absolute path as key on the `copyDir` map.\nInstead use only relative paths and avoid `..`.",
|
|
3991
4030
|
"stability": "stable",
|
|
3992
|
-
"summary": "Copy additional files to the
|
|
4031
|
+
"summary": "Copy additional files to the code [asset staging directory](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.AssetStaging.html#absolutestagedpath), before the build runs. Files copied like this will be overwritten by esbuild if they share the same name as any of the outputs."
|
|
3993
4032
|
},
|
|
3994
4033
|
"immutable": true,
|
|
3995
4034
|
"locationInModule": {
|
|
3996
4035
|
"filename": "src/bundler.ts",
|
|
3997
|
-
"line":
|
|
4036
|
+
"line": 65
|
|
3998
4037
|
},
|
|
3999
4038
|
"name": "copyDir",
|
|
4000
4039
|
"optional": true,
|
|
4001
4040
|
"type": {
|
|
4002
|
-
"
|
|
4041
|
+
"union": {
|
|
4042
|
+
"types": [
|
|
4043
|
+
{
|
|
4044
|
+
"primitive": "string"
|
|
4045
|
+
},
|
|
4046
|
+
{
|
|
4047
|
+
"collection": {
|
|
4048
|
+
"elementtype": {
|
|
4049
|
+
"primitive": "string"
|
|
4050
|
+
},
|
|
4051
|
+
"kind": "array"
|
|
4052
|
+
}
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
"collection": {
|
|
4056
|
+
"elementtype": {
|
|
4057
|
+
"union": {
|
|
4058
|
+
"types": [
|
|
4059
|
+
{
|
|
4060
|
+
"primitive": "string"
|
|
4061
|
+
},
|
|
4062
|
+
{
|
|
4063
|
+
"collection": {
|
|
4064
|
+
"elementtype": {
|
|
4065
|
+
"primitive": "string"
|
|
4066
|
+
},
|
|
4067
|
+
"kind": "array"
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
4070
|
+
]
|
|
4071
|
+
}
|
|
4072
|
+
},
|
|
4073
|
+
"kind": "map"
|
|
4074
|
+
}
|
|
4075
|
+
}
|
|
4076
|
+
]
|
|
4077
|
+
}
|
|
4003
4078
|
}
|
|
4004
4079
|
}
|
|
4005
4080
|
],
|
|
@@ -4052,7 +4127,7 @@
|
|
|
4052
4127
|
},
|
|
4053
4128
|
"locationInModule": {
|
|
4054
4129
|
"filename": "src/bundler.ts",
|
|
4055
|
-
"line":
|
|
4130
|
+
"line": 106
|
|
4056
4131
|
},
|
|
4057
4132
|
"parameters": [
|
|
4058
4133
|
{
|
|
@@ -4103,7 +4178,7 @@
|
|
|
4103
4178
|
"kind": "class",
|
|
4104
4179
|
"locationInModule": {
|
|
4105
4180
|
"filename": "src/bundler.ts",
|
|
4106
|
-
"line":
|
|
4181
|
+
"line": 88
|
|
4107
4182
|
},
|
|
4108
4183
|
"name": "EsbuildBundler",
|
|
4109
4184
|
"properties": [
|
|
@@ -4116,7 +4191,7 @@
|
|
|
4116
4191
|
"immutable": true,
|
|
4117
4192
|
"locationInModule": {
|
|
4118
4193
|
"filename": "src/bundler.ts",
|
|
4119
|
-
"line":
|
|
4194
|
+
"line": 113
|
|
4120
4195
|
},
|
|
4121
4196
|
"name": "entryPoints",
|
|
4122
4197
|
"type": {
|
|
@@ -4153,7 +4228,7 @@
|
|
|
4153
4228
|
"immutable": true,
|
|
4154
4229
|
"locationInModule": {
|
|
4155
4230
|
"filename": "src/bundler.ts",
|
|
4156
|
-
"line":
|
|
4231
|
+
"line": 101
|
|
4157
4232
|
},
|
|
4158
4233
|
"name": "image",
|
|
4159
4234
|
"type": {
|
|
@@ -4168,7 +4243,7 @@
|
|
|
4168
4243
|
"immutable": true,
|
|
4169
4244
|
"locationInModule": {
|
|
4170
4245
|
"filename": "src/bundler.ts",
|
|
4171
|
-
"line":
|
|
4246
|
+
"line": 94
|
|
4172
4247
|
},
|
|
4173
4248
|
"name": "local",
|
|
4174
4249
|
"type": {
|
|
@@ -4183,7 +4258,7 @@
|
|
|
4183
4258
|
"immutable": true,
|
|
4184
4259
|
"locationInModule": {
|
|
4185
4260
|
"filename": "src/bundler.ts",
|
|
4186
|
-
"line":
|
|
4261
|
+
"line": 120
|
|
4187
4262
|
},
|
|
4188
4263
|
"name": "props",
|
|
4189
4264
|
"type": {
|
|
@@ -4901,7 +4976,7 @@
|
|
|
4901
4976
|
"kind": "interface",
|
|
4902
4977
|
"locationInModule": {
|
|
4903
4978
|
"filename": "src/esbuild-types.ts",
|
|
4904
|
-
"line":
|
|
4979
|
+
"line": 237
|
|
4905
4980
|
},
|
|
4906
4981
|
"name": "TransformOptions",
|
|
4907
4982
|
"properties": [
|
|
@@ -4913,7 +4988,7 @@
|
|
|
4913
4988
|
"immutable": true,
|
|
4914
4989
|
"locationInModule": {
|
|
4915
4990
|
"filename": "src/esbuild-types.ts",
|
|
4916
|
-
"line":
|
|
4991
|
+
"line": 242
|
|
4917
4992
|
},
|
|
4918
4993
|
"name": "banner",
|
|
4919
4994
|
"optional": true,
|
|
@@ -4930,7 +5005,7 @@
|
|
|
4930
5005
|
"immutable": true,
|
|
4931
5006
|
"locationInModule": {
|
|
4932
5007
|
"filename": "src/esbuild-types.ts",
|
|
4933
|
-
"line":
|
|
5008
|
+
"line": 46
|
|
4934
5009
|
},
|
|
4935
5010
|
"name": "charset",
|
|
4936
5011
|
"optional": true,
|
|
@@ -4947,7 +5022,7 @@
|
|
|
4947
5022
|
"immutable": true,
|
|
4948
5023
|
"locationInModule": {
|
|
4949
5024
|
"filename": "src/esbuild-types.ts",
|
|
4950
|
-
"line":
|
|
5025
|
+
"line": 67
|
|
4951
5026
|
},
|
|
4952
5027
|
"name": "color",
|
|
4953
5028
|
"optional": true,
|
|
@@ -4964,7 +5039,7 @@
|
|
|
4964
5039
|
"immutable": true,
|
|
4965
5040
|
"locationInModule": {
|
|
4966
5041
|
"filename": "src/esbuild-types.ts",
|
|
4967
|
-
"line":
|
|
5042
|
+
"line": 60
|
|
4968
5043
|
},
|
|
4969
5044
|
"name": "define",
|
|
4970
5045
|
"optional": true,
|
|
@@ -4986,7 +5061,7 @@
|
|
|
4986
5061
|
"immutable": true,
|
|
4987
5062
|
"locationInModule": {
|
|
4988
5063
|
"filename": "src/esbuild-types.ts",
|
|
4989
|
-
"line":
|
|
5064
|
+
"line": 36
|
|
4990
5065
|
},
|
|
4991
5066
|
"name": "drop",
|
|
4992
5067
|
"optional": true,
|
|
@@ -5007,7 +5082,7 @@
|
|
|
5007
5082
|
"immutable": true,
|
|
5008
5083
|
"locationInModule": {
|
|
5009
5084
|
"filename": "src/esbuild-types.ts",
|
|
5010
|
-
"line":
|
|
5085
|
+
"line": 243
|
|
5011
5086
|
},
|
|
5012
5087
|
"name": "footer",
|
|
5013
5088
|
"optional": true,
|
|
@@ -5058,7 +5133,7 @@
|
|
|
5058
5133
|
"immutable": true,
|
|
5059
5134
|
"locationInModule": {
|
|
5060
5135
|
"filename": "src/esbuild-types.ts",
|
|
5061
|
-
"line":
|
|
5136
|
+
"line": 50
|
|
5062
5137
|
},
|
|
5063
5138
|
"name": "ignoreAnnotations",
|
|
5064
5139
|
"optional": true,
|
|
@@ -5075,7 +5150,7 @@
|
|
|
5075
5150
|
"immutable": true,
|
|
5076
5151
|
"locationInModule": {
|
|
5077
5152
|
"filename": "src/esbuild-types.ts",
|
|
5078
|
-
"line":
|
|
5153
|
+
"line": 53
|
|
5079
5154
|
},
|
|
5080
5155
|
"name": "jsx",
|
|
5081
5156
|
"optional": true,
|
|
@@ -5092,7 +5167,7 @@
|
|
|
5092
5167
|
"immutable": true,
|
|
5093
5168
|
"locationInModule": {
|
|
5094
5169
|
"filename": "src/esbuild-types.ts",
|
|
5095
|
-
"line":
|
|
5170
|
+
"line": 55
|
|
5096
5171
|
},
|
|
5097
5172
|
"name": "jsxFactory",
|
|
5098
5173
|
"optional": true,
|
|
@@ -5109,7 +5184,7 @@
|
|
|
5109
5184
|
"immutable": true,
|
|
5110
5185
|
"locationInModule": {
|
|
5111
5186
|
"filename": "src/esbuild-types.ts",
|
|
5112
|
-
"line":
|
|
5187
|
+
"line": 57
|
|
5113
5188
|
},
|
|
5114
5189
|
"name": "jsxFragment",
|
|
5115
5190
|
"optional": true,
|
|
@@ -5126,7 +5201,7 @@
|
|
|
5126
5201
|
"immutable": true,
|
|
5127
5202
|
"locationInModule": {
|
|
5128
5203
|
"filename": "src/esbuild-types.ts",
|
|
5129
|
-
"line":
|
|
5204
|
+
"line": 64
|
|
5130
5205
|
},
|
|
5131
5206
|
"name": "keepNames",
|
|
5132
5207
|
"optional": true,
|
|
@@ -5159,7 +5234,7 @@
|
|
|
5159
5234
|
"immutable": true,
|
|
5160
5235
|
"locationInModule": {
|
|
5161
5236
|
"filename": "src/esbuild-types.ts",
|
|
5162
|
-
"line":
|
|
5237
|
+
"line": 241
|
|
5163
5238
|
},
|
|
5164
5239
|
"name": "loader",
|
|
5165
5240
|
"optional": true,
|
|
@@ -5176,7 +5251,7 @@
|
|
|
5176
5251
|
"immutable": true,
|
|
5177
5252
|
"locationInModule": {
|
|
5178
5253
|
"filename": "src/esbuild-types.ts",
|
|
5179
|
-
"line":
|
|
5254
|
+
"line": 69
|
|
5180
5255
|
},
|
|
5181
5256
|
"name": "logLevel",
|
|
5182
5257
|
"optional": true,
|
|
@@ -5193,7 +5268,7 @@
|
|
|
5193
5268
|
"immutable": true,
|
|
5194
5269
|
"locationInModule": {
|
|
5195
5270
|
"filename": "src/esbuild-types.ts",
|
|
5196
|
-
"line":
|
|
5271
|
+
"line": 71
|
|
5197
5272
|
},
|
|
5198
5273
|
"name": "logLimit",
|
|
5199
5274
|
"optional": true,
|
|
@@ -5201,6 +5276,28 @@
|
|
|
5201
5276
|
"primitive": "number"
|
|
5202
5277
|
}
|
|
5203
5278
|
},
|
|
5279
|
+
{
|
|
5280
|
+
"abstract": true,
|
|
5281
|
+
"docs": {
|
|
5282
|
+
"stability": "stable",
|
|
5283
|
+
"summary": "Documentation: https://esbuild.github.io/api/#log-override."
|
|
5284
|
+
},
|
|
5285
|
+
"immutable": true,
|
|
5286
|
+
"locationInModule": {
|
|
5287
|
+
"filename": "src/esbuild-types.ts",
|
|
5288
|
+
"line": 73
|
|
5289
|
+
},
|
|
5290
|
+
"name": "logOverride",
|
|
5291
|
+
"optional": true,
|
|
5292
|
+
"type": {
|
|
5293
|
+
"collection": {
|
|
5294
|
+
"elementtype": {
|
|
5295
|
+
"primitive": "string"
|
|
5296
|
+
},
|
|
5297
|
+
"kind": "map"
|
|
5298
|
+
}
|
|
5299
|
+
}
|
|
5300
|
+
},
|
|
5204
5301
|
{
|
|
5205
5302
|
"abstract": true,
|
|
5206
5303
|
"docs": {
|
|
@@ -5210,7 +5307,7 @@
|
|
|
5210
5307
|
"immutable": true,
|
|
5211
5308
|
"locationInModule": {
|
|
5212
5309
|
"filename": "src/esbuild-types.ts",
|
|
5213
|
-
"line":
|
|
5310
|
+
"line": 34
|
|
5214
5311
|
},
|
|
5215
5312
|
"name": "mangleCache",
|
|
5216
5313
|
"optional": true,
|
|
@@ -5249,6 +5346,23 @@
|
|
|
5249
5346
|
"primitive": "any"
|
|
5250
5347
|
}
|
|
5251
5348
|
},
|
|
5349
|
+
{
|
|
5350
|
+
"abstract": true,
|
|
5351
|
+
"docs": {
|
|
5352
|
+
"stability": "stable",
|
|
5353
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
5354
|
+
},
|
|
5355
|
+
"immutable": true,
|
|
5356
|
+
"locationInModule": {
|
|
5357
|
+
"filename": "src/esbuild-types.ts",
|
|
5358
|
+
"line": 32
|
|
5359
|
+
},
|
|
5360
|
+
"name": "mangleQuoted",
|
|
5361
|
+
"optional": true,
|
|
5362
|
+
"type": {
|
|
5363
|
+
"primitive": "boolean"
|
|
5364
|
+
}
|
|
5365
|
+
},
|
|
5252
5366
|
{
|
|
5253
5367
|
"abstract": true,
|
|
5254
5368
|
"docs": {
|
|
@@ -5258,7 +5372,7 @@
|
|
|
5258
5372
|
"immutable": true,
|
|
5259
5373
|
"locationInModule": {
|
|
5260
5374
|
"filename": "src/esbuild-types.ts",
|
|
5261
|
-
"line":
|
|
5375
|
+
"line": 38
|
|
5262
5376
|
},
|
|
5263
5377
|
"name": "minify",
|
|
5264
5378
|
"optional": true,
|
|
@@ -5275,7 +5389,7 @@
|
|
|
5275
5389
|
"immutable": true,
|
|
5276
5390
|
"locationInModule": {
|
|
5277
5391
|
"filename": "src/esbuild-types.ts",
|
|
5278
|
-
"line":
|
|
5392
|
+
"line": 42
|
|
5279
5393
|
},
|
|
5280
5394
|
"name": "minifyIdentifiers",
|
|
5281
5395
|
"optional": true,
|
|
@@ -5292,7 +5406,7 @@
|
|
|
5292
5406
|
"immutable": true,
|
|
5293
5407
|
"locationInModule": {
|
|
5294
5408
|
"filename": "src/esbuild-types.ts",
|
|
5295
|
-
"line":
|
|
5409
|
+
"line": 44
|
|
5296
5410
|
},
|
|
5297
5411
|
"name": "minifySyntax",
|
|
5298
5412
|
"optional": true,
|
|
@@ -5309,7 +5423,7 @@
|
|
|
5309
5423
|
"immutable": true,
|
|
5310
5424
|
"locationInModule": {
|
|
5311
5425
|
"filename": "src/esbuild-types.ts",
|
|
5312
|
-
"line":
|
|
5426
|
+
"line": 40
|
|
5313
5427
|
},
|
|
5314
5428
|
"name": "minifyWhitespace",
|
|
5315
5429
|
"optional": true,
|
|
@@ -5326,7 +5440,7 @@
|
|
|
5326
5440
|
"immutable": true,
|
|
5327
5441
|
"locationInModule": {
|
|
5328
5442
|
"filename": "src/esbuild-types.ts",
|
|
5329
|
-
"line":
|
|
5443
|
+
"line": 62
|
|
5330
5444
|
},
|
|
5331
5445
|
"name": "pure",
|
|
5332
5446
|
"optional": true,
|
|
@@ -5364,7 +5478,7 @@
|
|
|
5364
5478
|
"immutable": true,
|
|
5365
5479
|
"locationInModule": {
|
|
5366
5480
|
"filename": "src/esbuild-types.ts",
|
|
5367
|
-
"line":
|
|
5481
|
+
"line": 240
|
|
5368
5482
|
},
|
|
5369
5483
|
"name": "sourcefile",
|
|
5370
5484
|
"optional": true,
|
|
@@ -5472,7 +5586,7 @@
|
|
|
5472
5586
|
"immutable": true,
|
|
5473
5587
|
"locationInModule": {
|
|
5474
5588
|
"filename": "src/esbuild-types.ts",
|
|
5475
|
-
"line":
|
|
5589
|
+
"line": 48
|
|
5476
5590
|
},
|
|
5477
5591
|
"name": "treeShaking",
|
|
5478
5592
|
"optional": true,
|
|
@@ -5488,7 +5602,7 @@
|
|
|
5488
5602
|
"immutable": true,
|
|
5489
5603
|
"locationInModule": {
|
|
5490
5604
|
"filename": "src/esbuild-types.ts",
|
|
5491
|
-
"line":
|
|
5605
|
+
"line": 238
|
|
5492
5606
|
},
|
|
5493
5607
|
"name": "tsconfigRaw",
|
|
5494
5608
|
"optional": true,
|
|
@@ -6022,6 +6136,6 @@
|
|
|
6022
6136
|
"symbolId": "src/source:TypeScriptSourceProps"
|
|
6023
6137
|
}
|
|
6024
6138
|
},
|
|
6025
|
-
"version": "3.
|
|
6026
|
-
"fingerprint": "/
|
|
6139
|
+
"version": "3.5.0",
|
|
6140
|
+
"fingerprint": "RydXcEc9flJ4yxfw9d3jJz1tWYK/mRTXcAsFkaZW9NE="
|
|
6027
6141
|
}
|