@mrgrain/cdk-esbuild 3.1.0 → 3.4.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 +290 -88
- package/.projenrc.ts +4 -6
- package/API.md +220 -42
- package/CHANGELOG.md +2 -8
- package/README.md +27 -25
- package/lib/asset.d.ts +1 -6
- package/lib/asset.js +3 -3
- package/lib/bundler.d.ts +32 -19
- package/lib/bundler.js +49 -13
- package/lib/code.d.ts +1 -35
- package/lib/code.js +4 -23
- package/lib/esbuild-types.d.ts +73 -275
- package/lib/esbuild-types.js +1 -1
- package/lib/inline-code.d.ts +14 -37
- package/lib/inline-code.js +13 -33
- package/lib/source.d.ts +0 -35
- package/lib/source.js +3 -26
- package/package.json +15 -15
- 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.57.0 (build f614666)",
|
|
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.0.0\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.0.0 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": 74
|
|
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": 126
|
|
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": 104
|
|
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": 116
|
|
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": 120
|
|
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": 76
|
|
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": 114
|
|
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": 100
|
|
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,
|
|
@@ -3092,12 +3092,13 @@
|
|
|
3092
3092
|
{
|
|
3093
3093
|
"abstract": true,
|
|
3094
3094
|
"docs": {
|
|
3095
|
-
"stability": "stable"
|
|
3095
|
+
"stability": "stable",
|
|
3096
|
+
"summary": "Documentation: https://esbuild.github.io/api/#drop."
|
|
3096
3097
|
},
|
|
3097
3098
|
"immutable": true,
|
|
3098
3099
|
"locationInModule": {
|
|
3099
3100
|
"filename": "src/esbuild-types.ts",
|
|
3100
|
-
"line":
|
|
3101
|
+
"line": 36
|
|
3101
3102
|
},
|
|
3102
3103
|
"name": "drop",
|
|
3103
3104
|
"optional": true,
|
|
@@ -3119,7 +3120,7 @@
|
|
|
3119
3120
|
"immutable": true,
|
|
3120
3121
|
"locationInModule": {
|
|
3121
3122
|
"filename": "src/esbuild-types.ts",
|
|
3122
|
-
"line":
|
|
3123
|
+
"line": 112
|
|
3123
3124
|
},
|
|
3124
3125
|
"name": "entryNames",
|
|
3125
3126
|
"optional": true,
|
|
@@ -3136,7 +3137,7 @@
|
|
|
3136
3137
|
"immutable": true,
|
|
3137
3138
|
"locationInModule": {
|
|
3138
3139
|
"filename": "src/esbuild-types.ts",
|
|
3139
|
-
"line":
|
|
3140
|
+
"line": 92
|
|
3140
3141
|
},
|
|
3141
3142
|
"name": "external",
|
|
3142
3143
|
"optional": true,
|
|
@@ -3158,7 +3159,7 @@
|
|
|
3158
3159
|
"immutable": true,
|
|
3159
3160
|
"locationInModule": {
|
|
3160
3161
|
"filename": "src/esbuild-types.ts",
|
|
3161
|
-
"line":
|
|
3162
|
+
"line": 122
|
|
3162
3163
|
},
|
|
3163
3164
|
"name": "footer",
|
|
3164
3165
|
"optional": true,
|
|
@@ -3214,7 +3215,7 @@
|
|
|
3214
3215
|
"immutable": true,
|
|
3215
3216
|
"locationInModule": {
|
|
3216
3217
|
"filename": "src/esbuild-types.ts",
|
|
3217
|
-
"line":
|
|
3218
|
+
"line": 50
|
|
3218
3219
|
},
|
|
3219
3220
|
"name": "ignoreAnnotations",
|
|
3220
3221
|
"optional": true,
|
|
@@ -3231,7 +3232,7 @@
|
|
|
3231
3232
|
"immutable": true,
|
|
3232
3233
|
"locationInModule": {
|
|
3233
3234
|
"filename": "src/esbuild-types.ts",
|
|
3234
|
-
"line":
|
|
3235
|
+
"line": 124
|
|
3235
3236
|
},
|
|
3236
3237
|
"name": "incremental",
|
|
3237
3238
|
"optional": true,
|
|
@@ -3248,7 +3249,7 @@
|
|
|
3248
3249
|
"immutable": true,
|
|
3249
3250
|
"locationInModule": {
|
|
3250
3251
|
"filename": "src/esbuild-types.ts",
|
|
3251
|
-
"line":
|
|
3252
|
+
"line": 118
|
|
3252
3253
|
},
|
|
3253
3254
|
"name": "inject",
|
|
3254
3255
|
"optional": true,
|
|
@@ -3270,7 +3271,7 @@
|
|
|
3270
3271
|
"immutable": true,
|
|
3271
3272
|
"locationInModule": {
|
|
3272
3273
|
"filename": "src/esbuild-types.ts",
|
|
3273
|
-
"line":
|
|
3274
|
+
"line": 53
|
|
3274
3275
|
},
|
|
3275
3276
|
"name": "jsx",
|
|
3276
3277
|
"optional": true,
|
|
@@ -3287,7 +3288,7 @@
|
|
|
3287
3288
|
"immutable": true,
|
|
3288
3289
|
"locationInModule": {
|
|
3289
3290
|
"filename": "src/esbuild-types.ts",
|
|
3290
|
-
"line":
|
|
3291
|
+
"line": 55
|
|
3291
3292
|
},
|
|
3292
3293
|
"name": "jsxFactory",
|
|
3293
3294
|
"optional": true,
|
|
@@ -3304,7 +3305,7 @@
|
|
|
3304
3305
|
"immutable": true,
|
|
3305
3306
|
"locationInModule": {
|
|
3306
3307
|
"filename": "src/esbuild-types.ts",
|
|
3307
|
-
"line":
|
|
3308
|
+
"line": 57
|
|
3308
3309
|
},
|
|
3309
3310
|
"name": "jsxFragment",
|
|
3310
3311
|
"optional": true,
|
|
@@ -3321,7 +3322,7 @@
|
|
|
3321
3322
|
"immutable": true,
|
|
3322
3323
|
"locationInModule": {
|
|
3323
3324
|
"filename": "src/esbuild-types.ts",
|
|
3324
|
-
"line":
|
|
3325
|
+
"line": 64
|
|
3325
3326
|
},
|
|
3326
3327
|
"name": "keepNames",
|
|
3327
3328
|
"optional": true,
|
|
@@ -3355,7 +3356,7 @@
|
|
|
3355
3356
|
"immutable": true,
|
|
3356
3357
|
"locationInModule": {
|
|
3357
3358
|
"filename": "src/esbuild-types.ts",
|
|
3358
|
-
"line":
|
|
3359
|
+
"line": 94
|
|
3359
3360
|
},
|
|
3360
3361
|
"name": "loader",
|
|
3361
3362
|
"optional": true,
|
|
@@ -3377,7 +3378,7 @@
|
|
|
3377
3378
|
"immutable": true,
|
|
3378
3379
|
"locationInModule": {
|
|
3379
3380
|
"filename": "src/esbuild-types.ts",
|
|
3380
|
-
"line":
|
|
3381
|
+
"line": 69
|
|
3381
3382
|
},
|
|
3382
3383
|
"name": "logLevel",
|
|
3383
3384
|
"optional": true,
|
|
@@ -3394,7 +3395,7 @@
|
|
|
3394
3395
|
"immutable": true,
|
|
3395
3396
|
"locationInModule": {
|
|
3396
3397
|
"filename": "src/esbuild-types.ts",
|
|
3397
|
-
"line":
|
|
3398
|
+
"line": 71
|
|
3398
3399
|
},
|
|
3399
3400
|
"name": "logLimit",
|
|
3400
3401
|
"optional": true,
|
|
@@ -3411,7 +3412,7 @@
|
|
|
3411
3412
|
"immutable": true,
|
|
3412
3413
|
"locationInModule": {
|
|
3413
3414
|
"filename": "src/esbuild-types.ts",
|
|
3414
|
-
"line":
|
|
3415
|
+
"line": 98
|
|
3415
3416
|
},
|
|
3416
3417
|
"name": "mainFields",
|
|
3417
3418
|
"optional": true,
|
|
@@ -3424,6 +3425,71 @@
|
|
|
3424
3425
|
}
|
|
3425
3426
|
}
|
|
3426
3427
|
},
|
|
3428
|
+
{
|
|
3429
|
+
"abstract": true,
|
|
3430
|
+
"docs": {
|
|
3431
|
+
"stability": "stable",
|
|
3432
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
3433
|
+
},
|
|
3434
|
+
"immutable": true,
|
|
3435
|
+
"locationInModule": {
|
|
3436
|
+
"filename": "src/esbuild-types.ts",
|
|
3437
|
+
"line": 34
|
|
3438
|
+
},
|
|
3439
|
+
"name": "mangleCache",
|
|
3440
|
+
"optional": true,
|
|
3441
|
+
"type": {
|
|
3442
|
+
"collection": {
|
|
3443
|
+
"elementtype": {
|
|
3444
|
+
"union": {
|
|
3445
|
+
"types": [
|
|
3446
|
+
{
|
|
3447
|
+
"primitive": "string"
|
|
3448
|
+
},
|
|
3449
|
+
{
|
|
3450
|
+
"primitive": "boolean"
|
|
3451
|
+
}
|
|
3452
|
+
]
|
|
3453
|
+
}
|
|
3454
|
+
},
|
|
3455
|
+
"kind": "map"
|
|
3456
|
+
}
|
|
3457
|
+
}
|
|
3458
|
+
},
|
|
3459
|
+
{
|
|
3460
|
+
"abstract": true,
|
|
3461
|
+
"docs": {
|
|
3462
|
+
"stability": "stable",
|
|
3463
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
3464
|
+
},
|
|
3465
|
+
"immutable": true,
|
|
3466
|
+
"locationInModule": {
|
|
3467
|
+
"filename": "src/esbuild-types.ts",
|
|
3468
|
+
"line": 28
|
|
3469
|
+
},
|
|
3470
|
+
"name": "mangleProps",
|
|
3471
|
+
"optional": true,
|
|
3472
|
+
"type": {
|
|
3473
|
+
"primitive": "any"
|
|
3474
|
+
}
|
|
3475
|
+
},
|
|
3476
|
+
{
|
|
3477
|
+
"abstract": true,
|
|
3478
|
+
"docs": {
|
|
3479
|
+
"stability": "stable",
|
|
3480
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
3481
|
+
},
|
|
3482
|
+
"immutable": true,
|
|
3483
|
+
"locationInModule": {
|
|
3484
|
+
"filename": "src/esbuild-types.ts",
|
|
3485
|
+
"line": 32
|
|
3486
|
+
},
|
|
3487
|
+
"name": "mangleQuoted",
|
|
3488
|
+
"optional": true,
|
|
3489
|
+
"type": {
|
|
3490
|
+
"primitive": "boolean"
|
|
3491
|
+
}
|
|
3492
|
+
},
|
|
3427
3493
|
{
|
|
3428
3494
|
"abstract": true,
|
|
3429
3495
|
"docs": {
|
|
@@ -3433,7 +3499,7 @@
|
|
|
3433
3499
|
"immutable": true,
|
|
3434
3500
|
"locationInModule": {
|
|
3435
3501
|
"filename": "src/esbuild-types.ts",
|
|
3436
|
-
"line":
|
|
3502
|
+
"line": 84
|
|
3437
3503
|
},
|
|
3438
3504
|
"name": "metafile",
|
|
3439
3505
|
"optional": true,
|
|
@@ -3450,7 +3516,7 @@
|
|
|
3450
3516
|
"immutable": true,
|
|
3451
3517
|
"locationInModule": {
|
|
3452
3518
|
"filename": "src/esbuild-types.ts",
|
|
3453
|
-
"line":
|
|
3519
|
+
"line": 38
|
|
3454
3520
|
},
|
|
3455
3521
|
"name": "minify",
|
|
3456
3522
|
"optional": true,
|
|
@@ -3467,7 +3533,7 @@
|
|
|
3467
3533
|
"immutable": true,
|
|
3468
3534
|
"locationInModule": {
|
|
3469
3535
|
"filename": "src/esbuild-types.ts",
|
|
3470
|
-
"line":
|
|
3536
|
+
"line": 42
|
|
3471
3537
|
},
|
|
3472
3538
|
"name": "minifyIdentifiers",
|
|
3473
3539
|
"optional": true,
|
|
@@ -3484,7 +3550,7 @@
|
|
|
3484
3550
|
"immutable": true,
|
|
3485
3551
|
"locationInModule": {
|
|
3486
3552
|
"filename": "src/esbuild-types.ts",
|
|
3487
|
-
"line":
|
|
3553
|
+
"line": 44
|
|
3488
3554
|
},
|
|
3489
3555
|
"name": "minifySyntax",
|
|
3490
3556
|
"optional": true,
|
|
@@ -3501,7 +3567,7 @@
|
|
|
3501
3567
|
"immutable": true,
|
|
3502
3568
|
"locationInModule": {
|
|
3503
3569
|
"filename": "src/esbuild-types.ts",
|
|
3504
|
-
"line":
|
|
3570
|
+
"line": 40
|
|
3505
3571
|
},
|
|
3506
3572
|
"name": "minifyWhitespace",
|
|
3507
3573
|
"optional": true,
|
|
@@ -3518,7 +3584,7 @@
|
|
|
3518
3584
|
"immutable": true,
|
|
3519
3585
|
"locationInModule": {
|
|
3520
3586
|
"filename": "src/esbuild-types.ts",
|
|
3521
|
-
"line":
|
|
3587
|
+
"line": 128
|
|
3522
3588
|
},
|
|
3523
3589
|
"name": "nodePaths",
|
|
3524
3590
|
"optional": true,
|
|
@@ -3540,7 +3606,7 @@
|
|
|
3540
3606
|
"immutable": true,
|
|
3541
3607
|
"locationInModule": {
|
|
3542
3608
|
"filename": "src/esbuild-types.ts",
|
|
3543
|
-
"line":
|
|
3609
|
+
"line": 88
|
|
3544
3610
|
},
|
|
3545
3611
|
"name": "outbase",
|
|
3546
3612
|
"optional": true,
|
|
@@ -3557,7 +3623,7 @@
|
|
|
3557
3623
|
"immutable": true,
|
|
3558
3624
|
"locationInModule": {
|
|
3559
3625
|
"filename": "src/esbuild-types.ts",
|
|
3560
|
-
"line":
|
|
3626
|
+
"line": 86
|
|
3561
3627
|
},
|
|
3562
3628
|
"name": "outdir",
|
|
3563
3629
|
"optional": true,
|
|
@@ -3574,7 +3640,7 @@
|
|
|
3574
3640
|
"immutable": true,
|
|
3575
3641
|
"locationInModule": {
|
|
3576
3642
|
"filename": "src/esbuild-types.ts",
|
|
3577
|
-
"line":
|
|
3643
|
+
"line": 108
|
|
3578
3644
|
},
|
|
3579
3645
|
"name": "outExtension",
|
|
3580
3646
|
"optional": true,
|
|
@@ -3596,7 +3662,7 @@
|
|
|
3596
3662
|
"immutable": true,
|
|
3597
3663
|
"locationInModule": {
|
|
3598
3664
|
"filename": "src/esbuild-types.ts",
|
|
3599
|
-
"line":
|
|
3665
|
+
"line": 82
|
|
3600
3666
|
},
|
|
3601
3667
|
"name": "outfile",
|
|
3602
3668
|
"optional": true,
|
|
@@ -3613,7 +3679,7 @@
|
|
|
3613
3679
|
"immutable": true,
|
|
3614
3680
|
"locationInModule": {
|
|
3615
3681
|
"filename": "src/esbuild-types.ts",
|
|
3616
|
-
"line":
|
|
3682
|
+
"line": 90
|
|
3617
3683
|
},
|
|
3618
3684
|
"name": "platform",
|
|
3619
3685
|
"optional": true,
|
|
@@ -3630,7 +3696,7 @@
|
|
|
3630
3696
|
"immutable": true,
|
|
3631
3697
|
"locationInModule": {
|
|
3632
3698
|
"filename": "src/esbuild-types.ts",
|
|
3633
|
-
"line":
|
|
3699
|
+
"line": 80
|
|
3634
3700
|
},
|
|
3635
3701
|
"name": "preserveSymlinks",
|
|
3636
3702
|
"optional": true,
|
|
@@ -3647,7 +3713,7 @@
|
|
|
3647
3713
|
"immutable": true,
|
|
3648
3714
|
"locationInModule": {
|
|
3649
3715
|
"filename": "src/esbuild-types.ts",
|
|
3650
|
-
"line":
|
|
3716
|
+
"line": 110
|
|
3651
3717
|
},
|
|
3652
3718
|
"name": "publicPath",
|
|
3653
3719
|
"optional": true,
|
|
@@ -3664,7 +3730,7 @@
|
|
|
3664
3730
|
"immutable": true,
|
|
3665
3731
|
"locationInModule": {
|
|
3666
3732
|
"filename": "src/esbuild-types.ts",
|
|
3667
|
-
"line":
|
|
3733
|
+
"line": 62
|
|
3668
3734
|
},
|
|
3669
3735
|
"name": "pure",
|
|
3670
3736
|
"optional": true,
|
|
@@ -3677,6 +3743,23 @@
|
|
|
3677
3743
|
}
|
|
3678
3744
|
}
|
|
3679
3745
|
},
|
|
3746
|
+
{
|
|
3747
|
+
"abstract": true,
|
|
3748
|
+
"docs": {
|
|
3749
|
+
"stability": "stable",
|
|
3750
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
3751
|
+
},
|
|
3752
|
+
"immutable": true,
|
|
3753
|
+
"locationInModule": {
|
|
3754
|
+
"filename": "src/esbuild-types.ts",
|
|
3755
|
+
"line": 30
|
|
3756
|
+
},
|
|
3757
|
+
"name": "reserveProps",
|
|
3758
|
+
"optional": true,
|
|
3759
|
+
"type": {
|
|
3760
|
+
"primitive": "any"
|
|
3761
|
+
}
|
|
3762
|
+
},
|
|
3680
3763
|
{
|
|
3681
3764
|
"abstract": true,
|
|
3682
3765
|
"docs": {
|
|
@@ -3686,7 +3769,7 @@
|
|
|
3686
3769
|
"immutable": true,
|
|
3687
3770
|
"locationInModule": {
|
|
3688
3771
|
"filename": "src/esbuild-types.ts",
|
|
3689
|
-
"line":
|
|
3772
|
+
"line": 96
|
|
3690
3773
|
},
|
|
3691
3774
|
"name": "resolveExtensions",
|
|
3692
3775
|
"optional": true,
|
|
@@ -3768,7 +3851,7 @@
|
|
|
3768
3851
|
"immutable": true,
|
|
3769
3852
|
"locationInModule": {
|
|
3770
3853
|
"filename": "src/esbuild-types.ts",
|
|
3771
|
-
"line":
|
|
3854
|
+
"line": 78
|
|
3772
3855
|
},
|
|
3773
3856
|
"name": "splitting",
|
|
3774
3857
|
"optional": true,
|
|
@@ -3816,7 +3899,7 @@
|
|
|
3816
3899
|
"immutable": true,
|
|
3817
3900
|
"locationInModule": {
|
|
3818
3901
|
"filename": "src/esbuild-types.ts",
|
|
3819
|
-
"line":
|
|
3902
|
+
"line": 48
|
|
3820
3903
|
},
|
|
3821
3904
|
"name": "treeShaking",
|
|
3822
3905
|
"optional": true,
|
|
@@ -3833,7 +3916,7 @@
|
|
|
3833
3916
|
"immutable": true,
|
|
3834
3917
|
"locationInModule": {
|
|
3835
3918
|
"filename": "src/esbuild-types.ts",
|
|
3836
|
-
"line":
|
|
3919
|
+
"line": 106
|
|
3837
3920
|
},
|
|
3838
3921
|
"name": "tsconfig",
|
|
3839
3922
|
"optional": true,
|
|
@@ -3850,7 +3933,7 @@
|
|
|
3850
3933
|
"immutable": true,
|
|
3851
3934
|
"locationInModule": {
|
|
3852
3935
|
"filename": "src/esbuild-types.ts",
|
|
3853
|
-
"line":
|
|
3936
|
+
"line": 102
|
|
3854
3937
|
},
|
|
3855
3938
|
"name": "write",
|
|
3856
3939
|
"optional": true,
|
|
@@ -3871,7 +3954,7 @@
|
|
|
3871
3954
|
"kind": "interface",
|
|
3872
3955
|
"locationInModule": {
|
|
3873
3956
|
"filename": "src/bundler.ts",
|
|
3874
|
-
"line":
|
|
3957
|
+
"line": 23
|
|
3875
3958
|
},
|
|
3876
3959
|
"name": "BundlerProps",
|
|
3877
3960
|
"properties": [
|
|
@@ -3891,7 +3974,7 @@
|
|
|
3891
3974
|
"immutable": true,
|
|
3892
3975
|
"locationInModule": {
|
|
3893
3976
|
"filename": "src/bundler.ts",
|
|
3894
|
-
"line":
|
|
3977
|
+
"line": 79
|
|
3895
3978
|
},
|
|
3896
3979
|
"name": "buildFn",
|
|
3897
3980
|
"optional": true,
|
|
@@ -3902,7 +3985,7 @@
|
|
|
3902
3985
|
{
|
|
3903
3986
|
"abstract": true,
|
|
3904
3987
|
"docs": {
|
|
3905
|
-
"remarks": "
|
|
3988
|
+
"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).",
|
|
3906
3989
|
"see": "https://esbuild.github.io/api/#build-api",
|
|
3907
3990
|
"stability": "stable",
|
|
3908
3991
|
"summary": "Build options passed on to esbuild. Please refer to the esbuild Build API docs for details."
|
|
@@ -3910,7 +3993,7 @@
|
|
|
3910
3993
|
"immutable": true,
|
|
3911
3994
|
"locationInModule": {
|
|
3912
3995
|
"filename": "src/bundler.ts",
|
|
3913
|
-
"line":
|
|
3996
|
+
"line": 42
|
|
3914
3997
|
},
|
|
3915
3998
|
"name": "buildOptions",
|
|
3916
3999
|
"optional": true,
|
|
@@ -3921,19 +4004,55 @@
|
|
|
3921
4004
|
{
|
|
3922
4005
|
"abstract": true,
|
|
3923
4006
|
"docs": {
|
|
3924
|
-
"remarks": "
|
|
4007
|
+
"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 `..`.",
|
|
3925
4008
|
"stability": "stable",
|
|
3926
|
-
"summary": "Copy additional files to the
|
|
4009
|
+
"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."
|
|
3927
4010
|
},
|
|
3928
4011
|
"immutable": true,
|
|
3929
4012
|
"locationInModule": {
|
|
3930
4013
|
"filename": "src/bundler.ts",
|
|
3931
|
-
"line":
|
|
4014
|
+
"line": 65
|
|
3932
4015
|
},
|
|
3933
4016
|
"name": "copyDir",
|
|
3934
4017
|
"optional": true,
|
|
3935
4018
|
"type": {
|
|
3936
|
-
"
|
|
4019
|
+
"union": {
|
|
4020
|
+
"types": [
|
|
4021
|
+
{
|
|
4022
|
+
"primitive": "string"
|
|
4023
|
+
},
|
|
4024
|
+
{
|
|
4025
|
+
"collection": {
|
|
4026
|
+
"elementtype": {
|
|
4027
|
+
"primitive": "string"
|
|
4028
|
+
},
|
|
4029
|
+
"kind": "array"
|
|
4030
|
+
}
|
|
4031
|
+
},
|
|
4032
|
+
{
|
|
4033
|
+
"collection": {
|
|
4034
|
+
"elementtype": {
|
|
4035
|
+
"union": {
|
|
4036
|
+
"types": [
|
|
4037
|
+
{
|
|
4038
|
+
"primitive": "string"
|
|
4039
|
+
},
|
|
4040
|
+
{
|
|
4041
|
+
"collection": {
|
|
4042
|
+
"elementtype": {
|
|
4043
|
+
"primitive": "string"
|
|
4044
|
+
},
|
|
4045
|
+
"kind": "array"
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
]
|
|
4049
|
+
}
|
|
4050
|
+
},
|
|
4051
|
+
"kind": "map"
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
]
|
|
4055
|
+
}
|
|
3937
4056
|
}
|
|
3938
4057
|
}
|
|
3939
4058
|
],
|
|
@@ -3986,7 +4105,7 @@
|
|
|
3986
4105
|
},
|
|
3987
4106
|
"locationInModule": {
|
|
3988
4107
|
"filename": "src/bundler.ts",
|
|
3989
|
-
"line":
|
|
4108
|
+
"line": 106
|
|
3990
4109
|
},
|
|
3991
4110
|
"parameters": [
|
|
3992
4111
|
{
|
|
@@ -4037,7 +4156,7 @@
|
|
|
4037
4156
|
"kind": "class",
|
|
4038
4157
|
"locationInModule": {
|
|
4039
4158
|
"filename": "src/bundler.ts",
|
|
4040
|
-
"line":
|
|
4159
|
+
"line": 88
|
|
4041
4160
|
},
|
|
4042
4161
|
"name": "EsbuildBundler",
|
|
4043
4162
|
"properties": [
|
|
@@ -4050,7 +4169,7 @@
|
|
|
4050
4169
|
"immutable": true,
|
|
4051
4170
|
"locationInModule": {
|
|
4052
4171
|
"filename": "src/bundler.ts",
|
|
4053
|
-
"line":
|
|
4172
|
+
"line": 113
|
|
4054
4173
|
},
|
|
4055
4174
|
"name": "entryPoints",
|
|
4056
4175
|
"type": {
|
|
@@ -4087,7 +4206,7 @@
|
|
|
4087
4206
|
"immutable": true,
|
|
4088
4207
|
"locationInModule": {
|
|
4089
4208
|
"filename": "src/bundler.ts",
|
|
4090
|
-
"line":
|
|
4209
|
+
"line": 101
|
|
4091
4210
|
},
|
|
4092
4211
|
"name": "image",
|
|
4093
4212
|
"type": {
|
|
@@ -4102,7 +4221,7 @@
|
|
|
4102
4221
|
"immutable": true,
|
|
4103
4222
|
"locationInModule": {
|
|
4104
4223
|
"filename": "src/bundler.ts",
|
|
4105
|
-
"line":
|
|
4224
|
+
"line": 94
|
|
4106
4225
|
},
|
|
4107
4226
|
"name": "local",
|
|
4108
4227
|
"type": {
|
|
@@ -4117,7 +4236,7 @@
|
|
|
4117
4236
|
"immutable": true,
|
|
4118
4237
|
"locationInModule": {
|
|
4119
4238
|
"filename": "src/bundler.ts",
|
|
4120
|
-
"line":
|
|
4239
|
+
"line": 120
|
|
4121
4240
|
},
|
|
4122
4241
|
"name": "props",
|
|
4123
4242
|
"type": {
|
|
@@ -4835,7 +4954,7 @@
|
|
|
4835
4954
|
"kind": "interface",
|
|
4836
4955
|
"locationInModule": {
|
|
4837
4956
|
"filename": "src/esbuild-types.ts",
|
|
4838
|
-
"line":
|
|
4957
|
+
"line": 235
|
|
4839
4958
|
},
|
|
4840
4959
|
"name": "TransformOptions",
|
|
4841
4960
|
"properties": [
|
|
@@ -4847,7 +4966,7 @@
|
|
|
4847
4966
|
"immutable": true,
|
|
4848
4967
|
"locationInModule": {
|
|
4849
4968
|
"filename": "src/esbuild-types.ts",
|
|
4850
|
-
"line":
|
|
4969
|
+
"line": 240
|
|
4851
4970
|
},
|
|
4852
4971
|
"name": "banner",
|
|
4853
4972
|
"optional": true,
|
|
@@ -4864,7 +4983,7 @@
|
|
|
4864
4983
|
"immutable": true,
|
|
4865
4984
|
"locationInModule": {
|
|
4866
4985
|
"filename": "src/esbuild-types.ts",
|
|
4867
|
-
"line":
|
|
4986
|
+
"line": 46
|
|
4868
4987
|
},
|
|
4869
4988
|
"name": "charset",
|
|
4870
4989
|
"optional": true,
|
|
@@ -4881,7 +5000,7 @@
|
|
|
4881
5000
|
"immutable": true,
|
|
4882
5001
|
"locationInModule": {
|
|
4883
5002
|
"filename": "src/esbuild-types.ts",
|
|
4884
|
-
"line":
|
|
5003
|
+
"line": 67
|
|
4885
5004
|
},
|
|
4886
5005
|
"name": "color",
|
|
4887
5006
|
"optional": true,
|
|
@@ -4898,7 +5017,7 @@
|
|
|
4898
5017
|
"immutable": true,
|
|
4899
5018
|
"locationInModule": {
|
|
4900
5019
|
"filename": "src/esbuild-types.ts",
|
|
4901
|
-
"line":
|
|
5020
|
+
"line": 60
|
|
4902
5021
|
},
|
|
4903
5022
|
"name": "define",
|
|
4904
5023
|
"optional": true,
|
|
@@ -4914,12 +5033,13 @@
|
|
|
4914
5033
|
{
|
|
4915
5034
|
"abstract": true,
|
|
4916
5035
|
"docs": {
|
|
4917
|
-
"stability": "stable"
|
|
5036
|
+
"stability": "stable",
|
|
5037
|
+
"summary": "Documentation: https://esbuild.github.io/api/#drop."
|
|
4918
5038
|
},
|
|
4919
5039
|
"immutable": true,
|
|
4920
5040
|
"locationInModule": {
|
|
4921
5041
|
"filename": "src/esbuild-types.ts",
|
|
4922
|
-
"line":
|
|
5042
|
+
"line": 36
|
|
4923
5043
|
},
|
|
4924
5044
|
"name": "drop",
|
|
4925
5045
|
"optional": true,
|
|
@@ -4940,7 +5060,7 @@
|
|
|
4940
5060
|
"immutable": true,
|
|
4941
5061
|
"locationInModule": {
|
|
4942
5062
|
"filename": "src/esbuild-types.ts",
|
|
4943
|
-
"line":
|
|
5063
|
+
"line": 241
|
|
4944
5064
|
},
|
|
4945
5065
|
"name": "footer",
|
|
4946
5066
|
"optional": true,
|
|
@@ -4991,7 +5111,7 @@
|
|
|
4991
5111
|
"immutable": true,
|
|
4992
5112
|
"locationInModule": {
|
|
4993
5113
|
"filename": "src/esbuild-types.ts",
|
|
4994
|
-
"line":
|
|
5114
|
+
"line": 50
|
|
4995
5115
|
},
|
|
4996
5116
|
"name": "ignoreAnnotations",
|
|
4997
5117
|
"optional": true,
|
|
@@ -5008,7 +5128,7 @@
|
|
|
5008
5128
|
"immutable": true,
|
|
5009
5129
|
"locationInModule": {
|
|
5010
5130
|
"filename": "src/esbuild-types.ts",
|
|
5011
|
-
"line":
|
|
5131
|
+
"line": 53
|
|
5012
5132
|
},
|
|
5013
5133
|
"name": "jsx",
|
|
5014
5134
|
"optional": true,
|
|
@@ -5025,7 +5145,7 @@
|
|
|
5025
5145
|
"immutable": true,
|
|
5026
5146
|
"locationInModule": {
|
|
5027
5147
|
"filename": "src/esbuild-types.ts",
|
|
5028
|
-
"line":
|
|
5148
|
+
"line": 55
|
|
5029
5149
|
},
|
|
5030
5150
|
"name": "jsxFactory",
|
|
5031
5151
|
"optional": true,
|
|
@@ -5042,7 +5162,7 @@
|
|
|
5042
5162
|
"immutable": true,
|
|
5043
5163
|
"locationInModule": {
|
|
5044
5164
|
"filename": "src/esbuild-types.ts",
|
|
5045
|
-
"line":
|
|
5165
|
+
"line": 57
|
|
5046
5166
|
},
|
|
5047
5167
|
"name": "jsxFragment",
|
|
5048
5168
|
"optional": true,
|
|
@@ -5059,7 +5179,7 @@
|
|
|
5059
5179
|
"immutable": true,
|
|
5060
5180
|
"locationInModule": {
|
|
5061
5181
|
"filename": "src/esbuild-types.ts",
|
|
5062
|
-
"line":
|
|
5182
|
+
"line": 64
|
|
5063
5183
|
},
|
|
5064
5184
|
"name": "keepNames",
|
|
5065
5185
|
"optional": true,
|
|
@@ -5092,7 +5212,7 @@
|
|
|
5092
5212
|
"immutable": true,
|
|
5093
5213
|
"locationInModule": {
|
|
5094
5214
|
"filename": "src/esbuild-types.ts",
|
|
5095
|
-
"line":
|
|
5215
|
+
"line": 239
|
|
5096
5216
|
},
|
|
5097
5217
|
"name": "loader",
|
|
5098
5218
|
"optional": true,
|
|
@@ -5109,7 +5229,7 @@
|
|
|
5109
5229
|
"immutable": true,
|
|
5110
5230
|
"locationInModule": {
|
|
5111
5231
|
"filename": "src/esbuild-types.ts",
|
|
5112
|
-
"line":
|
|
5232
|
+
"line": 69
|
|
5113
5233
|
},
|
|
5114
5234
|
"name": "logLevel",
|
|
5115
5235
|
"optional": true,
|
|
@@ -5126,7 +5246,7 @@
|
|
|
5126
5246
|
"immutable": true,
|
|
5127
5247
|
"locationInModule": {
|
|
5128
5248
|
"filename": "src/esbuild-types.ts",
|
|
5129
|
-
"line":
|
|
5249
|
+
"line": 71
|
|
5130
5250
|
},
|
|
5131
5251
|
"name": "logLimit",
|
|
5132
5252
|
"optional": true,
|
|
@@ -5134,6 +5254,71 @@
|
|
|
5134
5254
|
"primitive": "number"
|
|
5135
5255
|
}
|
|
5136
5256
|
},
|
|
5257
|
+
{
|
|
5258
|
+
"abstract": true,
|
|
5259
|
+
"docs": {
|
|
5260
|
+
"stability": "stable",
|
|
5261
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
5262
|
+
},
|
|
5263
|
+
"immutable": true,
|
|
5264
|
+
"locationInModule": {
|
|
5265
|
+
"filename": "src/esbuild-types.ts",
|
|
5266
|
+
"line": 34
|
|
5267
|
+
},
|
|
5268
|
+
"name": "mangleCache",
|
|
5269
|
+
"optional": true,
|
|
5270
|
+
"type": {
|
|
5271
|
+
"collection": {
|
|
5272
|
+
"elementtype": {
|
|
5273
|
+
"union": {
|
|
5274
|
+
"types": [
|
|
5275
|
+
{
|
|
5276
|
+
"primitive": "string"
|
|
5277
|
+
},
|
|
5278
|
+
{
|
|
5279
|
+
"primitive": "boolean"
|
|
5280
|
+
}
|
|
5281
|
+
]
|
|
5282
|
+
}
|
|
5283
|
+
},
|
|
5284
|
+
"kind": "map"
|
|
5285
|
+
}
|
|
5286
|
+
}
|
|
5287
|
+
},
|
|
5288
|
+
{
|
|
5289
|
+
"abstract": true,
|
|
5290
|
+
"docs": {
|
|
5291
|
+
"stability": "stable",
|
|
5292
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
5293
|
+
},
|
|
5294
|
+
"immutable": true,
|
|
5295
|
+
"locationInModule": {
|
|
5296
|
+
"filename": "src/esbuild-types.ts",
|
|
5297
|
+
"line": 28
|
|
5298
|
+
},
|
|
5299
|
+
"name": "mangleProps",
|
|
5300
|
+
"optional": true,
|
|
5301
|
+
"type": {
|
|
5302
|
+
"primitive": "any"
|
|
5303
|
+
}
|
|
5304
|
+
},
|
|
5305
|
+
{
|
|
5306
|
+
"abstract": true,
|
|
5307
|
+
"docs": {
|
|
5308
|
+
"stability": "stable",
|
|
5309
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
5310
|
+
},
|
|
5311
|
+
"immutable": true,
|
|
5312
|
+
"locationInModule": {
|
|
5313
|
+
"filename": "src/esbuild-types.ts",
|
|
5314
|
+
"line": 32
|
|
5315
|
+
},
|
|
5316
|
+
"name": "mangleQuoted",
|
|
5317
|
+
"optional": true,
|
|
5318
|
+
"type": {
|
|
5319
|
+
"primitive": "boolean"
|
|
5320
|
+
}
|
|
5321
|
+
},
|
|
5137
5322
|
{
|
|
5138
5323
|
"abstract": true,
|
|
5139
5324
|
"docs": {
|
|
@@ -5143,7 +5328,7 @@
|
|
|
5143
5328
|
"immutable": true,
|
|
5144
5329
|
"locationInModule": {
|
|
5145
5330
|
"filename": "src/esbuild-types.ts",
|
|
5146
|
-
"line":
|
|
5331
|
+
"line": 38
|
|
5147
5332
|
},
|
|
5148
5333
|
"name": "minify",
|
|
5149
5334
|
"optional": true,
|
|
@@ -5160,7 +5345,7 @@
|
|
|
5160
5345
|
"immutable": true,
|
|
5161
5346
|
"locationInModule": {
|
|
5162
5347
|
"filename": "src/esbuild-types.ts",
|
|
5163
|
-
"line":
|
|
5348
|
+
"line": 42
|
|
5164
5349
|
},
|
|
5165
5350
|
"name": "minifyIdentifiers",
|
|
5166
5351
|
"optional": true,
|
|
@@ -5177,7 +5362,7 @@
|
|
|
5177
5362
|
"immutable": true,
|
|
5178
5363
|
"locationInModule": {
|
|
5179
5364
|
"filename": "src/esbuild-types.ts",
|
|
5180
|
-
"line":
|
|
5365
|
+
"line": 44
|
|
5181
5366
|
},
|
|
5182
5367
|
"name": "minifySyntax",
|
|
5183
5368
|
"optional": true,
|
|
@@ -5194,7 +5379,7 @@
|
|
|
5194
5379
|
"immutable": true,
|
|
5195
5380
|
"locationInModule": {
|
|
5196
5381
|
"filename": "src/esbuild-types.ts",
|
|
5197
|
-
"line":
|
|
5382
|
+
"line": 40
|
|
5198
5383
|
},
|
|
5199
5384
|
"name": "minifyWhitespace",
|
|
5200
5385
|
"optional": true,
|
|
@@ -5211,7 +5396,7 @@
|
|
|
5211
5396
|
"immutable": true,
|
|
5212
5397
|
"locationInModule": {
|
|
5213
5398
|
"filename": "src/esbuild-types.ts",
|
|
5214
|
-
"line":
|
|
5399
|
+
"line": 62
|
|
5215
5400
|
},
|
|
5216
5401
|
"name": "pure",
|
|
5217
5402
|
"optional": true,
|
|
@@ -5224,6 +5409,23 @@
|
|
|
5224
5409
|
}
|
|
5225
5410
|
}
|
|
5226
5411
|
},
|
|
5412
|
+
{
|
|
5413
|
+
"abstract": true,
|
|
5414
|
+
"docs": {
|
|
5415
|
+
"stability": "stable",
|
|
5416
|
+
"summary": "Documentation: https://esbuild.github.io/api/#mangle-props."
|
|
5417
|
+
},
|
|
5418
|
+
"immutable": true,
|
|
5419
|
+
"locationInModule": {
|
|
5420
|
+
"filename": "src/esbuild-types.ts",
|
|
5421
|
+
"line": 30
|
|
5422
|
+
},
|
|
5423
|
+
"name": "reserveProps",
|
|
5424
|
+
"optional": true,
|
|
5425
|
+
"type": {
|
|
5426
|
+
"primitive": "any"
|
|
5427
|
+
}
|
|
5428
|
+
},
|
|
5227
5429
|
{
|
|
5228
5430
|
"abstract": true,
|
|
5229
5431
|
"docs": {
|
|
@@ -5232,7 +5434,7 @@
|
|
|
5232
5434
|
"immutable": true,
|
|
5233
5435
|
"locationInModule": {
|
|
5234
5436
|
"filename": "src/esbuild-types.ts",
|
|
5235
|
-
"line":
|
|
5437
|
+
"line": 238
|
|
5236
5438
|
},
|
|
5237
5439
|
"name": "sourcefile",
|
|
5238
5440
|
"optional": true,
|
|
@@ -5340,7 +5542,7 @@
|
|
|
5340
5542
|
"immutable": true,
|
|
5341
5543
|
"locationInModule": {
|
|
5342
5544
|
"filename": "src/esbuild-types.ts",
|
|
5343
|
-
"line":
|
|
5545
|
+
"line": 48
|
|
5344
5546
|
},
|
|
5345
5547
|
"name": "treeShaking",
|
|
5346
5548
|
"optional": true,
|
|
@@ -5356,7 +5558,7 @@
|
|
|
5356
5558
|
"immutable": true,
|
|
5357
5559
|
"locationInModule": {
|
|
5358
5560
|
"filename": "src/esbuild-types.ts",
|
|
5359
|
-
"line":
|
|
5561
|
+
"line": 236
|
|
5360
5562
|
},
|
|
5361
5563
|
"name": "tsconfigRaw",
|
|
5362
5564
|
"optional": true,
|
|
@@ -5890,6 +6092,6 @@
|
|
|
5890
6092
|
"symbolId": "src/source:TypeScriptSourceProps"
|
|
5891
6093
|
}
|
|
5892
6094
|
},
|
|
5893
|
-
"version": "3.
|
|
5894
|
-
"fingerprint": "
|
|
6095
|
+
"version": "3.4.0",
|
|
6096
|
+
"fingerprint": "KLIX/Vq9D/NBEka2gtCgAIO/3cBKSHQNOCxdNGupRg4="
|
|
5895
6097
|
}
|