@mrgrain/cdk-esbuild 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +82 -60
- package/.projenrc.ts +16 -0
- package/API.md +121 -16
- package/CHANGELOG.md +12 -0
- package/README.md +6 -6
- package/lib/asset.d.ts +15 -2
- package/lib/asset.js +22 -11
- package/lib/bundler.d.ts +36 -5
- package/lib/bundler.js +14 -4
- package/lib/code.d.ts +51 -9
- package/lib/code.js +43 -11
- package/lib/inline-code.js +4 -4
- package/lib/source.d.ts +81 -5
- package/lib/source.js +84 -8
- package/package.json +2 -1
package/.jsii
CHANGED
|
@@ -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[Getting started](#getting-started) | [Migrating to v3](#migrating-to-v3) |\n[Documentation](#documentation) | [API Reference](#api-reference) | [Versioning](#versioning)\n\n> This version is compatible with AWS CDK v2. For the previous, AWS CDK v1 compatible release, see [cdk-esbuild@v2](https://github.com/mrgrain/cdk-esbuild/tree/v2).\n\n## Why?\n\n_esbuild_ is an extremely fast bundler and minifier for Typescript and JavaScript.\nThis package makes _esbuild_ available to deploy lambda functions, static websites or to publish build artefacts (assets) for further use.\n\nAWS CDK [supports _esbuild_ with Lambda Functions](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-nodejs-readme.html). However the implementation cannot be used with any other Constructs and doesn't expose all of _esbuild_'s build interface.\n\nThis package is running _esbuild_ directly in Node.js and bypasses Docker which the AWS CDK implementation uses. The approach is quicker and easier to use for Node.js users, but incompatible with other languages.\n\n**Production readiness**\n\nThis package is stable and ready to be used in production, as many do. However _esbuild_ has not yet released a version 1.0.0 and its API is still in active development. Please read the guide on [esbuild's production readiness](https://esbuild.github.io/faq/#production-readiness).\n\nNotably upgrades of the _esbuild_ minimum version requirement will be introduced in **minor versions** of this package and will inherit breaking changes from _esbuild_.\n\n## Getting started\n\nInstall `cdk-esbuild`:\n\n```\nnpm install @mrgrain/cdk-esbuild@3\n```\n\nIf _peer_ or _optional dependencies_ are not installed automatically (e.g. when using npm v4-6), please use this command to install all of them:\n\n```\nnpm install @mrgrain/cdk-esbuild@3 esbuild\n```\n\n### AWS Lambda: Serverless function\n\n> 💡 See [Lambda Function](examples/lambda) for a complete working example of a how to deploy a lambda function.\n\nUse `TypeScriptCode` as the `code` of a [lambda function](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#code):\n\n```ts\nimport * as lambda from \"aws-cdk-lib/aws-lambda\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\");\n\nconst fn = new lambda.Function(stack, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_16_X,\n handler: \"index.handler\",\n code: bundledCode,\n});\n```\n\n### AWS S3: Static Website\n\n> 💡 See [Static Website with React](examples/website) for a complete working example of a how to deploy a React app to S3.\n\nUse `TypeScriptSource` as one of the `sources` of a [static website deployment](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html#roadmap):\n\n```ts\nimport * as s3 from \"aws-cdk-lib/aws-s3\";\nimport * as s3deploy from \"aws-cdk-lib/aws-s3-deployment\";\nimport { TypeScriptSource } from \"@mrgrain/cdk-esbuild\";\n\nconst websiteBundle = new TypeScriptSource(\"src/index.tsx\");\n\nconst websiteBucket = new s3.Bucket(stack, \"WebsiteBucket\", {\n autoDeleteObjects: true,\n publicReadAccess: true,\n removalPolicy: RemovalPolicy.DESTROY,\n websiteIndexDocument: \"index.html\",\n});\n\nnew s3deploy.BucketDeployment(stack, \"DeployWebsite\", {\n destinationBucket: websiteBucket,\n sources: [websiteBundle],\n});\n```\n\n### Amazon CloudWatch Synthetics: Canary monitoring\n\n> 💡 See [Monitored Website](examples/website) for a complete working example of a deployed and monitored website.\n\nSynthetics runs a canary to produce traffic to an application for monitoring purposes. Use `TypeScriptCode` as the `code` of a Canary test:\n\n> ℹ️ This feature depends on the `@aws-cdk/aws-synthetics-alpha` package which is a developer preview. You may need to update your source code when upgrading to a newer version of this package.\n>\n> ```\n> npm i @aws-cdk/aws-synthetics-alpha\n> ```\n\n```ts\nimport * as synthetics from \"@aws-cdk/aws-synthetics-alpha\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\", {\n buildOptions: {\n outdir: \"nodejs/node_modules\", // This is required by Synthetics\n },\n});\n\nconst canary = new synthetics.Canary(stack, \"MyCanary\", {\n runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_2,\n test: synthetics.Test.custom({\n code: bundledCode,\n handler: \"index.handler\",\n });\n});\n```\n\n## Documentation\n\nThe package exports various different constructs for use with existing CDK features. A major guiding design principal for this package is to _extend, don't replace_. Expect constructs that you can provide as props, not complete replacements.\n\nFor use in **Lambda Functions** and **Synthetic Canaries**, the following classes implement `lambda.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Code.html)) and `synthetics.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-synthetics-alpha.Code.html)):\n\n- `TypeScriptCode` & `JavaScriptCode`\n\nInline code is only supported by **Lambda**:\n\n- `InlineTypeScriptCode` & `InlineJavaScriptCode`\n- `InlineTsxCode` & `InlineJsxCode`\n\nFor use with **S3 bucket deployments**, classes implementing `s3deploy.ISource` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html)):\n\n- `TypeScriptSource` & `JavaScriptSource`\n\n> _Code and Source constructs seamlessly plug-in to other high-level CDK constructs. They share the same set of parameters, props and build options._\n\nThe following classes power the other features. You normally won't have to use them, but they are there if you need them:\n\n- `TypeScriptAsset` & `JavaScriptAsset` implements `s3.Asset` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html)) \\\n creates an asset uploaded to S3 which can be referenced by other constructs\n\n- `EsbuildBundler` implements `core.BundlingOptions` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.BundlingOptions.html)) \\\n provides an interface for a _esbuild_ bundler wherever needed\n\n### [API Reference](API.md)\n\nAuto-generated reference for classes and structs. This information is also available as part of your IDE's code completion.\n\n### Escape hatches\n\nIt's possible that you want to use an implementation of esbuild that's different to the default one. Common reasons are:\n\n- The current version constraints for esbuild are not suitable\n- To use a version of esbuild that is installed by any other means than `npm`, including Docker\n- Plugin support is needed for building\n\nFor these situations, this package offers an escape hatch to bypass regular the implementation and provide a custom build and transform function.\n\n#### Esbuild binary path\n\nIt is possible to override the binary used by esbuild. The usual way to do this is to set the `ESBUILD_BINARY_PATH` environment variable. For convenience this package allows to set the binary path as a prop:\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n esbuildBinaryPath: \"path/to/esbuild/binary\"\n});\n```\n\n#### Custom build function\n\n> 💡 See [Using esbuild with plugins](examples/esbuild-with-plugins) for a complete working example of a custom build function using this escape hatch.\n\nConstructs that result in starting a build, take a `buildFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `buildSync` function.\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n buildFn: (options: BuildOptions): BuildResult => {\n try {\n // custom implementation returning BuildResult\n } catch (error) {\n // throw BuildFailure exception here\n }\n },\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated build options. The custom build function can amend, change or discard any of these. However integration with CDK relies heavily on the values `outdir`/`outfile` are set to and it's usually required to use them unchanged.\n\nFailures have to cause a `BuildFailure` exception in order to be fully handled.\n\n#### Custom transform function\n\nConstructs that result in starting a transformation, take a `transformFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `transformSync` function.\n\n```ts\nnew InlineTypeScriptCode(\"let x: number = 1\", {\n transformFn: (options: TransformOptions): TransformResult => {\n try {\n // custom implementation returning TransformResult\n } catch (error) {\n // throw TransformFailure exception here\n }\n },,\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated transform options. The custom transform function can amend, change or discard any of these.\n\nFailures have to cause a `TransformFailure` exception in order to be fully handled.\n\n### Migrating to v3\n\nThe release of cdk-esbuild v3 brings compatibility with AWS CDK v2. Furthermore all deprecated properties and classes have been removed. In particular `InlineCode` classes now take `TransformerProps` as second parameter instead of transform options.\n\n#### Upgrading\n\n- This version requires AWS CDK v2. Follow the [official migration guide](https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-v2.html) to upgrade.\n- Update the package dependency to v3: `npm install --save @mrgrain/cdk-esbuild@^3.0.0`\n- `esbuild` is installed as an optional dependency. If your setup does not automatically install optional dependencies, make sure to add it as an explicit dependency.\n- Any use of `InlineCode` variations has to be updated. Previously the second parameter was either of type `TransformerProps` or `TransformOptions`. Now it must be `TransformerProps`.\\\n If the passed value is of type `TransformOptions`, turn it into the correct type like this:\n\n ```ts\n const oldOptions: TransformOptions = {...}\n\n new InlineTypeScriptCode('// inline code', {\n transformOptions: oldOptions\n });\n ```\n\n## Versioning\n\nThis package follows [Semantic Versioning](https://semver.org/), with the exception of upgrades to `esbuild`. These will be released as **minor versions** and often include breaking changes from `esbuild`.\n\n### Npm Tags\n\nSome users prefer to use tags over version ranges. The following stable tags are available for use:\n\n- `cdk-v1`, `cdk-v2` are provided for the latest release compatible with each version of the AWS CDK.\n\n- `latest` is the most recent stable release.\n\nThese tags also exist, but usage is strongly not recommended:\n\n- `unstable`, `next` are used for pre-release of the current and next major version respectively.\n\n- ~~`cdk-1.x.x`~~ tags have been deprecated in favour of `cdk-v1`. Use that one instead.\n\n## Roadmap & Contributions\n\n[The project's roadmap is available on GitHub.](https://github.com/mrgrain/cdk-esbuild/projects/1) Please submit any feature requests as issues to the repository.\n\nAll contributions are welcome, no matter if they are for already planned or completely new features.\n\n## Library authors\n\nBuilding a library consumed by other packages that relies on `cdk-esbuild` might require you to set `buildOptions.absWorkingDir`. The easiest way to do this, is to resolve based on the directory name of the calling file, and traverse the tree upwards to the root of your library package (that's where `package.json` and `tsconfig.json` are):\n\n```ts\n// file: project/src/index.ts\nconst props = {\n buildOptions: {\n absWorkingDir: path.resolve(__dirname, \"..\"), // now: /user/project\n },\n};\n```\n\nThis will dynamically resolve to the correct path, wherever the package is installed.\n\nPlease open an issue if you encounter any difficulties.\n"
|
|
2803
|
+
"markdown": "# cdk-esbuild\n\n_CDK constructs for [esbuild](https://github.com/evanw/esbuild), an extremely fast JavaScript bundler_\n\n[Getting started](#getting-started)\n[Documentation](#documentation) | [API Reference](#api-reference) | [Versioning](#versioning) | [Upgrading from AWS CDK v1](#upgrading-from-aws-cdk-v1)\n\n[](https://constructs.dev/packages/@mrgrain/cdk-esbuild)\n\n## Why?\n\n_esbuild_ is an extremely fast bundler and minifier for Typescript and JavaScript.\nThis package makes _esbuild_ available to deploy lambda functions, static websites or to publish build artefacts (assets) for further use.\n\nAWS CDK [supports _esbuild_ with Lambda Functions](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-nodejs-readme.html). However the implementation cannot be used with any other Constructs and doesn't expose all of _esbuild_'s build interface.\n\nThis package is running _esbuild_ directly in Node.js and bypasses Docker which the AWS CDK implementation uses. The approach is quicker and easier to use for Node.js users, but incompatible with other languages.\n\n**Production readiness**\n\nThis package is stable and ready to be used in production, as many do. However _esbuild_ has not yet released a version 1.0.0 and its API is still in active development. Please read the guide on [esbuild's production readiness](https://esbuild.github.io/faq/#production-readiness).\n\nNotably upgrades of the _esbuild_ minimum version requirement will be introduced in **minor versions** of this package and will inherit breaking changes from _esbuild_.\n\n## Getting started\n\nInstall `cdk-esbuild`:\n\n```\nnpm install @mrgrain/cdk-esbuild@3\n```\n\nIf _peer_ or _optional dependencies_ are not installed automatically (e.g. when using npm v4-6), please use this command to install all of them:\n\n```\nnpm install @mrgrain/cdk-esbuild@3 esbuild\n```\n\n### AWS Lambda: Serverless function\n\n> 💡 See [Lambda Function](examples/lambda) for a complete working example of a how to deploy a lambda function.\n\nUse `TypeScriptCode` as the `code` of a [lambda function](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#code):\n\n```ts\nimport * as lambda from \"aws-cdk-lib/aws-lambda\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\");\n\nconst fn = new lambda.Function(stack, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_16_X,\n handler: \"index.handler\",\n code: bundledCode,\n});\n```\n\n### AWS S3: Static Website\n\n> 💡 See [Static Website with React](examples/website) for a complete working example of a how to deploy a React app to S3.\n\nUse `TypeScriptSource` as one of the `sources` of a [static website deployment](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html#roadmap):\n\n```ts\nimport * as s3 from \"aws-cdk-lib/aws-s3\";\nimport * as s3deploy from \"aws-cdk-lib/aws-s3-deployment\";\nimport { TypeScriptSource } from \"@mrgrain/cdk-esbuild\";\n\nconst websiteBundle = new TypeScriptSource(\"src/index.tsx\");\n\nconst websiteBucket = new s3.Bucket(stack, \"WebsiteBucket\", {\n autoDeleteObjects: true,\n publicReadAccess: true,\n removalPolicy: RemovalPolicy.DESTROY,\n websiteIndexDocument: \"index.html\",\n});\n\nnew s3deploy.BucketDeployment(stack, \"DeployWebsite\", {\n destinationBucket: websiteBucket,\n sources: [websiteBundle],\n});\n```\n\n### Amazon CloudWatch Synthetics: Canary monitoring\n\n> 💡 See [Monitored Website](examples/website) for a complete working example of a deployed and monitored website.\n\nSynthetics runs a canary to produce traffic to an application for monitoring purposes. Use `TypeScriptCode` as the `code` of a Canary test:\n\n> ℹ️ This feature depends on the `@aws-cdk/aws-synthetics-alpha` package which is a developer preview. You may need to update your source code when upgrading to a newer version of this package.\n>\n> ```\n> npm i @aws-cdk/aws-synthetics-alpha\n> ```\n\n```ts\nimport * as synthetics from \"@aws-cdk/aws-synthetics-alpha\";\nimport { TypeScriptCode } from \"@mrgrain/cdk-esbuild\";\n\nconst bundledCode = new TypeScriptCode(\"src/index.ts\", {\n buildOptions: {\n outdir: \"nodejs/node_modules\", // This is required by Synthetics\n },\n});\n\nconst canary = new synthetics.Canary(stack, \"MyCanary\", {\n runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_2,\n test: synthetics.Test.custom({\n code: bundledCode,\n handler: \"index.handler\",\n });\n});\n```\n\n## Documentation\n\nThe package exports various different constructs for use with existing CDK features. A major guiding design principal for this package is to _extend, don't replace_. Expect constructs that you can provide as props, not complete replacements.\n\nFor use in **Lambda Functions** and **Synthetic Canaries**, the following classes implement `lambda.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Code.html)) and `synthetics.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-synthetics-alpha.Code.html)):\n\n- `TypeScriptCode` & `JavaScriptCode`\n\nInline code is only supported by **Lambda**:\n\n- `InlineTypeScriptCode` & `InlineJavaScriptCode`\n- `InlineTsxCode` & `InlineJsxCode`\n\nFor use with **S3 bucket deployments**, classes implementing `s3deploy.ISource` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html)):\n\n- `TypeScriptSource` & `JavaScriptSource`\n\n> _Code and Source constructs seamlessly plug-in to other high-level CDK constructs. They share the same set of parameters, props and build options._\n\nThe following classes power the other features. You normally won't have to use them, but they are there if you need them:\n\n- `TypeScriptAsset` & `JavaScriptAsset` implements `s3.Asset` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html)) \\\n creates an asset uploaded to S3 which can be referenced by other constructs\n\n- `EsbuildBundler` implements `core.BundlingOptions` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.BundlingOptions.html)) \\\n provides an interface for a _esbuild_ bundler wherever needed\n\n### [API Reference](API.md)\n\nAuto-generated reference for classes and structs. This information is also available as part of your IDE's code completion.\n\n### Escape hatches\n\nIt's possible that you want to use an implementation of esbuild that's different to the default one. Common reasons are:\n\n- The current version constraints for esbuild are not suitable\n- To use a version of esbuild that is installed by any other means than `npm`, including Docker\n- Plugin support is needed for building\n\nFor these situations, this package offers an escape hatch to bypass regular the implementation and provide a custom build and transform function.\n\n#### Esbuild binary path\n\nIt is possible to override the binary used by esbuild. The usual way to do this is to set the `ESBUILD_BINARY_PATH` environment variable. For convenience this package allows to set the binary path as a prop:\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n esbuildBinaryPath: \"path/to/esbuild/binary\"\n});\n```\n\n#### Custom build function\n\n> 💡 See [Using esbuild with plugins](examples/esbuild-with-plugins) for a complete working example of a custom build function using this escape hatch.\n\nConstructs that result in starting a build, take a `buildFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `buildSync` function.\n\n```ts\nnew TypeScriptCode(\"fixtures/handlers/ts-handler.ts\", {\n buildFn: (options: BuildOptions): BuildResult => {\n try {\n // custom implementation returning BuildResult\n } catch (error) {\n // throw BuildFailure exception here\n }\n },\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated build options. The custom build function can amend, change or discard any of these. However integration with CDK relies heavily on the values `outdir`/`outfile` are set to and it's usually required to use them unchanged.\n\nFailures have to cause a `BuildFailure` exception in order to be fully handled.\n\n#### Custom transform function\n\nConstructs that result in starting a transformation, take a `transformFn` as optional prop. While the defined type for this function is `any`, it must implement the same signature as esbuild's `transformSync` function.\n\n```ts\nnew InlineTypeScriptCode(\"let x: number = 1\", {\n transformFn: (options: TransformOptions): TransformResult => {\n try {\n // custom implementation returning TransformResult\n } catch (error) {\n // throw TransformFailure exception here\n }\n },,\n});\n```\n\nInstead of esbuild, the provided function will be invoked with the calculated transform options. The custom transform function can amend, change or discard any of these.\n\nFailures have to cause a `TransformFailure` exception in order to be fully handled.\n\n### Upgrading from AWS CDK v1\n\nThis version is compatible with AWS CDK v2. For the previous, AWS CDK v1 compatible release, see [cdk-esbuild@v2](https://github.com/mrgrain/cdk-esbuild/tree/v2).\n\nTo upgrade from AWS CDK v1 and cdk-esbuild@v2, please follow these steps:\n\n- This version requires AWS CDK v2. Follow the [official migration guide](https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-v2.html) to upgrade.\n- Update the package dependency to v3: `npm install --save @mrgrain/cdk-esbuild@^3.0.0`\n- `esbuild` is installed as an optional dependency. If your setup does not automatically install optional dependencies, make sure to add it as an explicit dependency.\n- Any use of `InlineCode` variations has to be updated. Previously the second parameter was either of type `TransformerProps` or `TransformOptions`. Now it must be `TransformerProps`.\\\n If the passed value is of type `TransformOptions`, turn it into the correct type like this:\n\n ```ts\n const oldOptions: TransformOptions = {...}\n\n new InlineTypeScriptCode('// inline code', {\n transformOptions: oldOptions\n });\n ```\n\n## Versioning\n\nThis package follows [Semantic Versioning](https://semver.org/), with the exception of upgrades to `esbuild`. These will be released as **minor versions** and often include breaking changes from `esbuild`.\n\n### Npm Tags\n\nSome users prefer to use tags over version ranges. The following stable tags are available for use:\n\n- `cdk-v1`, `cdk-v2` are provided for the latest release compatible with each version of the AWS CDK.\n\n- `latest` is the most recent stable release.\n\nThese tags also exist, but usage is strongly not recommended:\n\n- `unstable`, `next` are used for pre-release of the current and next major version respectively.\n\n- ~~`cdk-1.x.x`~~ tags have been deprecated in favour of `cdk-v1`. Use that one instead.\n\n## Roadmap & Contributions\n\n[The project's roadmap is available on GitHub.](https://github.com/mrgrain/cdk-esbuild/projects/1) Please submit any feature requests as issues to the repository.\n\nAll contributions are welcome, no matter if they are for already planned or completely new features.\n\n## Library authors\n\nBuilding a library consumed by other packages that relies on `cdk-esbuild` might require you to set `buildOptions.absWorkingDir`. The easiest way to do this, is to resolve based on the directory name of the calling file, and traverse the tree upwards to the root of your library package (that's where `package.json` and `tsconfig.json` are):\n\n```ts\n// file: project/src/index.ts\nconst props = {\n buildOptions: {\n absWorkingDir: path.resolve(__dirname, \"..\"), // now: /user/project\n },\n};\n```\n\nThis will dynamically resolve to the correct path, wherever the package is installed.\n\nPlease open an issue if you encounter any difficulties.\n"
|
|
2804
2804
|
},
|
|
2805
2805
|
"repository": {
|
|
2806
2806
|
"type": "git",
|
|
@@ -2833,14 +2833,14 @@
|
|
|
2833
2833
|
{
|
|
2834
2834
|
"abstract": true,
|
|
2835
2835
|
"docs": {
|
|
2836
|
-
"remarks": "
|
|
2836
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
2837
2837
|
"stability": "stable",
|
|
2838
|
-
"summary": "A
|
|
2838
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
2839
2839
|
},
|
|
2840
2840
|
"immutable": true,
|
|
2841
2841
|
"locationInModule": {
|
|
2842
2842
|
"filename": "src/asset.ts",
|
|
2843
|
-
"line":
|
|
2843
|
+
"line": 40
|
|
2844
2844
|
},
|
|
2845
2845
|
"name": "entryPoints",
|
|
2846
2846
|
"type": {
|
|
@@ -3998,7 +3998,7 @@
|
|
|
3998
3998
|
"kind": "interface",
|
|
3999
3999
|
"locationInModule": {
|
|
4000
4000
|
"filename": "src/bundler.ts",
|
|
4001
|
-
"line":
|
|
4001
|
+
"line": 34
|
|
4002
4002
|
},
|
|
4003
4003
|
"name": "BundlerProps",
|
|
4004
4004
|
"properties": [
|
|
@@ -4018,7 +4018,7 @@
|
|
|
4018
4018
|
"immutable": true,
|
|
4019
4019
|
"locationInModule": {
|
|
4020
4020
|
"filename": "src/bundler.ts",
|
|
4021
|
-
"line":
|
|
4021
|
+
"line": 90
|
|
4022
4022
|
},
|
|
4023
4023
|
"name": "buildFn",
|
|
4024
4024
|
"optional": true,
|
|
@@ -4037,7 +4037,7 @@
|
|
|
4037
4037
|
"immutable": true,
|
|
4038
4038
|
"locationInModule": {
|
|
4039
4039
|
"filename": "src/bundler.ts",
|
|
4040
|
-
"line":
|
|
4040
|
+
"line": 53
|
|
4041
4041
|
},
|
|
4042
4042
|
"name": "buildOptions",
|
|
4043
4043
|
"optional": true,
|
|
@@ -4055,7 +4055,7 @@
|
|
|
4055
4055
|
"immutable": true,
|
|
4056
4056
|
"locationInModule": {
|
|
4057
4057
|
"filename": "src/bundler.ts",
|
|
4058
|
-
"line":
|
|
4058
|
+
"line": 76
|
|
4059
4059
|
},
|
|
4060
4060
|
"name": "copyDir",
|
|
4061
4061
|
"optional": true,
|
|
@@ -4109,7 +4109,7 @@
|
|
|
4109
4109
|
"immutable": true,
|
|
4110
4110
|
"locationInModule": {
|
|
4111
4111
|
"filename": "src/bundler.ts",
|
|
4112
|
-
"line":
|
|
4112
|
+
"line": 99
|
|
4113
4113
|
},
|
|
4114
4114
|
"name": "esbuildBinaryPath",
|
|
4115
4115
|
"optional": true,
|
|
@@ -4196,8 +4196,9 @@
|
|
|
4196
4196
|
"assembly": "@mrgrain/cdk-esbuild",
|
|
4197
4197
|
"base": "aws-cdk-lib.aws_s3_assets.Asset",
|
|
4198
4198
|
"docs": {
|
|
4199
|
+
"remarks": "You should always use `TypeScriptAsset` or `JavaScriptAsset`.",
|
|
4199
4200
|
"stability": "experimental",
|
|
4200
|
-
"summary": "Represents
|
|
4201
|
+
"summary": "Represents a generic esbuild asset."
|
|
4201
4202
|
},
|
|
4202
4203
|
"fqn": "@mrgrain/cdk-esbuild.EsbuildAsset",
|
|
4203
4204
|
"initializer": {
|
|
@@ -4206,7 +4207,7 @@
|
|
|
4206
4207
|
},
|
|
4207
4208
|
"locationInModule": {
|
|
4208
4209
|
"filename": "src/asset.ts",
|
|
4209
|
-
"line":
|
|
4210
|
+
"line": 57
|
|
4210
4211
|
},
|
|
4211
4212
|
"parameters": [
|
|
4212
4213
|
{
|
|
@@ -4232,7 +4233,7 @@
|
|
|
4232
4233
|
"kind": "class",
|
|
4233
4234
|
"locationInModule": {
|
|
4234
4235
|
"filename": "src/asset.ts",
|
|
4235
|
-
"line":
|
|
4236
|
+
"line": 53
|
|
4236
4237
|
},
|
|
4237
4238
|
"name": "EsbuildAsset",
|
|
4238
4239
|
"symbolId": "src/asset:EsbuildAsset"
|
|
@@ -4251,14 +4252,14 @@
|
|
|
4251
4252
|
},
|
|
4252
4253
|
"locationInModule": {
|
|
4253
4254
|
"filename": "src/bundler.ts",
|
|
4254
|
-
"line":
|
|
4255
|
+
"line": 126
|
|
4255
4256
|
},
|
|
4256
4257
|
"parameters": [
|
|
4257
4258
|
{
|
|
4258
4259
|
"docs": {
|
|
4259
|
-
"remarks": "
|
|
4260
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
4260
4261
|
"stability": "experimental",
|
|
4261
|
-
"summary": "A
|
|
4262
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
4262
4263
|
},
|
|
4263
4264
|
"name": "entryPoints",
|
|
4264
4265
|
"type": {
|
|
@@ -4302,20 +4303,20 @@
|
|
|
4302
4303
|
"kind": "class",
|
|
4303
4304
|
"locationInModule": {
|
|
4304
4305
|
"filename": "src/bundler.ts",
|
|
4305
|
-
"line":
|
|
4306
|
+
"line": 108
|
|
4306
4307
|
},
|
|
4307
4308
|
"name": "EsbuildBundler",
|
|
4308
4309
|
"properties": [
|
|
4309
4310
|
{
|
|
4310
4311
|
"docs": {
|
|
4311
|
-
"remarks": "
|
|
4312
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
4312
4313
|
"stability": "experimental",
|
|
4313
|
-
"summary": "A
|
|
4314
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
4314
4315
|
},
|
|
4315
4316
|
"immutable": true,
|
|
4316
4317
|
"locationInModule": {
|
|
4317
4318
|
"filename": "src/bundler.ts",
|
|
4318
|
-
"line":
|
|
4319
|
+
"line": 143
|
|
4319
4320
|
},
|
|
4320
4321
|
"name": "entryPoints",
|
|
4321
4322
|
"type": {
|
|
@@ -4352,7 +4353,7 @@
|
|
|
4352
4353
|
"immutable": true,
|
|
4353
4354
|
"locationInModule": {
|
|
4354
4355
|
"filename": "src/bundler.ts",
|
|
4355
|
-
"line":
|
|
4356
|
+
"line": 121
|
|
4356
4357
|
},
|
|
4357
4358
|
"name": "image",
|
|
4358
4359
|
"type": {
|
|
@@ -4367,7 +4368,7 @@
|
|
|
4367
4368
|
"immutable": true,
|
|
4368
4369
|
"locationInModule": {
|
|
4369
4370
|
"filename": "src/bundler.ts",
|
|
4370
|
-
"line":
|
|
4371
|
+
"line": 114
|
|
4371
4372
|
},
|
|
4372
4373
|
"name": "local",
|
|
4373
4374
|
"type": {
|
|
@@ -4382,7 +4383,7 @@
|
|
|
4382
4383
|
"immutable": true,
|
|
4383
4384
|
"locationInModule": {
|
|
4384
4385
|
"filename": "src/bundler.ts",
|
|
4385
|
-
"line":
|
|
4386
|
+
"line": 150
|
|
4386
4387
|
},
|
|
4387
4388
|
"name": "props",
|
|
4388
4389
|
"type": {
|
|
@@ -4396,8 +4397,9 @@
|
|
|
4396
4397
|
"assembly": "@mrgrain/cdk-esbuild",
|
|
4397
4398
|
"base": "aws-cdk-lib.aws_lambda.Code",
|
|
4398
4399
|
"docs": {
|
|
4400
|
+
"remarks": "You should always use `TypeScriptCode` or `JavaScriptCode`.",
|
|
4399
4401
|
"stability": "experimental",
|
|
4400
|
-
"summary": "Represents
|
|
4402
|
+
"summary": "Represents a generic esbuild code bundle."
|
|
4401
4403
|
},
|
|
4402
4404
|
"fqn": "@mrgrain/cdk-esbuild.EsbuildCode",
|
|
4403
4405
|
"initializer": {
|
|
@@ -4406,14 +4408,14 @@
|
|
|
4406
4408
|
},
|
|
4407
4409
|
"locationInModule": {
|
|
4408
4410
|
"filename": "src/code.ts",
|
|
4409
|
-
"line":
|
|
4411
|
+
"line": 51
|
|
4410
4412
|
},
|
|
4411
4413
|
"parameters": [
|
|
4412
4414
|
{
|
|
4413
4415
|
"docs": {
|
|
4414
|
-
"remarks": "
|
|
4416
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
4415
4417
|
"stability": "stable",
|
|
4416
|
-
"summary": "A
|
|
4418
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
4417
4419
|
},
|
|
4418
4420
|
"name": "entryPoints",
|
|
4419
4421
|
"type": {
|
|
@@ -4467,7 +4469,7 @@
|
|
|
4467
4469
|
"kind": "class",
|
|
4468
4470
|
"locationInModule": {
|
|
4469
4471
|
"filename": "src/code.ts",
|
|
4470
|
-
"line":
|
|
4472
|
+
"line": 29
|
|
4471
4473
|
},
|
|
4472
4474
|
"methods": [
|
|
4473
4475
|
{
|
|
@@ -4477,7 +4479,7 @@
|
|
|
4477
4479
|
},
|
|
4478
4480
|
"locationInModule": {
|
|
4479
4481
|
"filename": "src/code.ts",
|
|
4480
|
-
"line":
|
|
4482
|
+
"line": 101
|
|
4481
4483
|
},
|
|
4482
4484
|
"name": "bind",
|
|
4483
4485
|
"overrides": "aws-cdk-lib.aws_lambda.Code",
|
|
@@ -4503,7 +4505,7 @@
|
|
|
4503
4505
|
},
|
|
4504
4506
|
"locationInModule": {
|
|
4505
4507
|
"filename": "src/code.ts",
|
|
4506
|
-
"line":
|
|
4508
|
+
"line": 129
|
|
4507
4509
|
},
|
|
4508
4510
|
"name": "bindToResource",
|
|
4509
4511
|
"overrides": "aws-cdk-lib.aws_lambda.Code",
|
|
@@ -4529,7 +4531,7 @@
|
|
|
4529
4531
|
},
|
|
4530
4532
|
"locationInModule": {
|
|
4531
4533
|
"filename": "src/code.ts",
|
|
4532
|
-
"line":
|
|
4534
|
+
"line": 32
|
|
4533
4535
|
},
|
|
4534
4536
|
"name": "getAsset",
|
|
4535
4537
|
"parameters": [
|
|
@@ -4552,14 +4554,14 @@
|
|
|
4552
4554
|
"properties": [
|
|
4553
4555
|
{
|
|
4554
4556
|
"docs": {
|
|
4555
|
-
"remarks": "
|
|
4557
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
4556
4558
|
"stability": "stable",
|
|
4557
|
-
"summary": "A
|
|
4559
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
4558
4560
|
},
|
|
4559
4561
|
"immutable": true,
|
|
4560
4562
|
"locationInModule": {
|
|
4561
4563
|
"filename": "src/code.ts",
|
|
4562
|
-
"line":
|
|
4564
|
+
"line": 68
|
|
4563
4565
|
},
|
|
4564
4566
|
"name": "entryPoints",
|
|
4565
4567
|
"type": {
|
|
@@ -4594,7 +4596,7 @@
|
|
|
4594
4596
|
},
|
|
4595
4597
|
"locationInModule": {
|
|
4596
4598
|
"filename": "src/code.ts",
|
|
4597
|
-
"line":
|
|
4599
|
+
"line": 42
|
|
4598
4600
|
},
|
|
4599
4601
|
"name": "asset",
|
|
4600
4602
|
"protected": true,
|
|
@@ -4610,7 +4612,7 @@
|
|
|
4610
4612
|
},
|
|
4611
4613
|
"locationInModule": {
|
|
4612
4614
|
"filename": "src/code.ts",
|
|
4613
|
-
"line":
|
|
4615
|
+
"line": 49
|
|
4614
4616
|
},
|
|
4615
4617
|
"name": "isInline",
|
|
4616
4618
|
"type": {
|
|
@@ -4623,7 +4625,7 @@
|
|
|
4623
4625
|
},
|
|
4624
4626
|
"locationInModule": {
|
|
4625
4627
|
"filename": "src/code.ts",
|
|
4626
|
-
"line":
|
|
4628
|
+
"line": 40
|
|
4627
4629
|
},
|
|
4628
4630
|
"name": "props",
|
|
4629
4631
|
"protected": true,
|
|
@@ -4885,7 +4887,7 @@
|
|
|
4885
4887
|
},
|
|
4886
4888
|
"locationInModule": {
|
|
4887
4889
|
"filename": "src/asset.ts",
|
|
4888
|
-
"line":
|
|
4890
|
+
"line": 57
|
|
4889
4891
|
},
|
|
4890
4892
|
"parameters": [
|
|
4891
4893
|
{
|
|
@@ -4911,7 +4913,7 @@
|
|
|
4911
4913
|
"kind": "class",
|
|
4912
4914
|
"locationInModule": {
|
|
4913
4915
|
"filename": "src/asset.ts",
|
|
4914
|
-
"line":
|
|
4916
|
+
"line": 129
|
|
4915
4917
|
},
|
|
4916
4918
|
"name": "JavaScriptAsset",
|
|
4917
4919
|
"symbolId": "src/asset:JavaScriptAsset"
|
|
@@ -4930,14 +4932,14 @@
|
|
|
4930
4932
|
},
|
|
4931
4933
|
"locationInModule": {
|
|
4932
4934
|
"filename": "src/code.ts",
|
|
4933
|
-
"line":
|
|
4935
|
+
"line": 153
|
|
4934
4936
|
},
|
|
4935
4937
|
"parameters": [
|
|
4936
4938
|
{
|
|
4937
4939
|
"docs": {
|
|
4938
|
-
"remarks": "
|
|
4940
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
4939
4941
|
"stability": "stable",
|
|
4940
|
-
"summary": "A
|
|
4942
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
4941
4943
|
},
|
|
4942
4944
|
"name": "entryPoints",
|
|
4943
4945
|
"type": {
|
|
@@ -4983,7 +4985,7 @@
|
|
|
4983
4985
|
"kind": "class",
|
|
4984
4986
|
"locationInModule": {
|
|
4985
4987
|
"filename": "src/code.ts",
|
|
4986
|
-
"line":
|
|
4988
|
+
"line": 144
|
|
4987
4989
|
},
|
|
4988
4990
|
"methods": [
|
|
4989
4991
|
{
|
|
@@ -4992,7 +4994,7 @@
|
|
|
4992
4994
|
},
|
|
4993
4995
|
"locationInModule": {
|
|
4994
4996
|
"filename": "src/code.ts",
|
|
4995
|
-
"line":
|
|
4997
|
+
"line": 145
|
|
4996
4998
|
},
|
|
4997
4999
|
"name": "getAsset",
|
|
4998
5000
|
"overrides": "@mrgrain/cdk-esbuild.EsbuildCode",
|
|
@@ -5065,10 +5067,15 @@
|
|
|
5065
5067
|
},
|
|
5066
5068
|
"locationInModule": {
|
|
5067
5069
|
"filename": "src/source.ts",
|
|
5068
|
-
"line":
|
|
5070
|
+
"line": 113
|
|
5069
5071
|
},
|
|
5070
5072
|
"parameters": [
|
|
5071
5073
|
{
|
|
5074
|
+
"docs": {
|
|
5075
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
5076
|
+
"stability": "stable",
|
|
5077
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
5078
|
+
},
|
|
5072
5079
|
"name": "entryPoints",
|
|
5073
5080
|
"type": {
|
|
5074
5081
|
"union": {
|
|
@@ -5097,6 +5104,11 @@
|
|
|
5097
5104
|
}
|
|
5098
5105
|
},
|
|
5099
5106
|
{
|
|
5107
|
+
"docs": {
|
|
5108
|
+
"remarks": "Default values for `props.buildOptions`:\n- `bundle=true`\n- `platform=browser`",
|
|
5109
|
+
"stability": "stable",
|
|
5110
|
+
"summary": "Props to change the behavior of the bundler."
|
|
5111
|
+
},
|
|
5100
5112
|
"name": "props",
|
|
5101
5113
|
"optional": true,
|
|
5102
5114
|
"type": {
|
|
@@ -5111,7 +5123,7 @@
|
|
|
5111
5123
|
"kind": "class",
|
|
5112
5124
|
"locationInModule": {
|
|
5113
5125
|
"filename": "src/source.ts",
|
|
5114
|
-
"line":
|
|
5126
|
+
"line": 107
|
|
5115
5127
|
},
|
|
5116
5128
|
"methods": [
|
|
5117
5129
|
{
|
|
@@ -5121,7 +5133,7 @@
|
|
|
5121
5133
|
},
|
|
5122
5134
|
"locationInModule": {
|
|
5123
5135
|
"filename": "src/source.ts",
|
|
5124
|
-
"line":
|
|
5136
|
+
"line": 73
|
|
5125
5137
|
},
|
|
5126
5138
|
"name": "bind",
|
|
5127
5139
|
"overrides": "aws-cdk-lib.aws_s3_deployment.ISource",
|
|
@@ -5178,7 +5190,7 @@
|
|
|
5178
5190
|
},
|
|
5179
5191
|
"locationInModule": {
|
|
5180
5192
|
"filename": "src/source.ts",
|
|
5181
|
-
"line":
|
|
5193
|
+
"line": 111
|
|
5182
5194
|
},
|
|
5183
5195
|
"name": "assetClass",
|
|
5184
5196
|
"type": {
|
|
@@ -5984,7 +5996,7 @@
|
|
|
5984
5996
|
},
|
|
5985
5997
|
"locationInModule": {
|
|
5986
5998
|
"filename": "src/asset.ts",
|
|
5987
|
-
"line":
|
|
5999
|
+
"line": 57
|
|
5988
6000
|
},
|
|
5989
6001
|
"parameters": [
|
|
5990
6002
|
{
|
|
@@ -6010,7 +6022,7 @@
|
|
|
6010
6022
|
"kind": "class",
|
|
6011
6023
|
"locationInModule": {
|
|
6012
6024
|
"filename": "src/asset.ts",
|
|
6013
|
-
"line":
|
|
6025
|
+
"line": 138
|
|
6014
6026
|
},
|
|
6015
6027
|
"name": "TypeScriptAsset",
|
|
6016
6028
|
"symbolId": "src/asset:TypeScriptAsset"
|
|
@@ -6029,14 +6041,14 @@
|
|
|
6029
6041
|
},
|
|
6030
6042
|
"locationInModule": {
|
|
6031
6043
|
"filename": "src/code.ts",
|
|
6032
|
-
"line":
|
|
6044
|
+
"line": 202
|
|
6033
6045
|
},
|
|
6034
6046
|
"parameters": [
|
|
6035
6047
|
{
|
|
6036
6048
|
"docs": {
|
|
6037
|
-
"remarks": "
|
|
6049
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
6038
6050
|
"stability": "stable",
|
|
6039
|
-
"summary": "A
|
|
6051
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
6040
6052
|
},
|
|
6041
6053
|
"name": "entryPoints",
|
|
6042
6054
|
"type": {
|
|
@@ -6082,7 +6094,7 @@
|
|
|
6082
6094
|
"kind": "class",
|
|
6083
6095
|
"locationInModule": {
|
|
6084
6096
|
"filename": "src/code.ts",
|
|
6085
|
-
"line":
|
|
6097
|
+
"line": 193
|
|
6086
6098
|
},
|
|
6087
6099
|
"methods": [
|
|
6088
6100
|
{
|
|
@@ -6091,7 +6103,7 @@
|
|
|
6091
6103
|
},
|
|
6092
6104
|
"locationInModule": {
|
|
6093
6105
|
"filename": "src/code.ts",
|
|
6094
|
-
"line":
|
|
6106
|
+
"line": 194
|
|
6095
6107
|
},
|
|
6096
6108
|
"name": "getAsset",
|
|
6097
6109
|
"overrides": "@mrgrain/cdk-esbuild.EsbuildCode",
|
|
@@ -6164,10 +6176,15 @@
|
|
|
6164
6176
|
},
|
|
6165
6177
|
"locationInModule": {
|
|
6166
6178
|
"filename": "src/source.ts",
|
|
6167
|
-
"line":
|
|
6179
|
+
"line": 154
|
|
6168
6180
|
},
|
|
6169
6181
|
"parameters": [
|
|
6170
6182
|
{
|
|
6183
|
+
"docs": {
|
|
6184
|
+
"remarks": "Relative paths are by default resolved from the current working directory.\nTo change the working directory, see `buildOptions.absWorkingDir`.\n\nAbsolute paths can be used if files are part of the working directory.\n\nExamples:\n - `'src/index.ts'`\n - `require.resolve('./lambda')`\n - `['src/index.ts', 'src/util.ts']`\n - `{one: 'src/two.ts', two: 'src/one.ts'}`",
|
|
6185
|
+
"stability": "stable",
|
|
6186
|
+
"summary": "A path or list or map of paths to the entry points of your code."
|
|
6187
|
+
},
|
|
6171
6188
|
"name": "entryPoints",
|
|
6172
6189
|
"type": {
|
|
6173
6190
|
"union": {
|
|
@@ -6196,6 +6213,11 @@
|
|
|
6196
6213
|
}
|
|
6197
6214
|
},
|
|
6198
6215
|
{
|
|
6216
|
+
"docs": {
|
|
6217
|
+
"remarks": "Default values for `props.buildOptions`:\n- `bundle=true`\n- `platform=browser`",
|
|
6218
|
+
"stability": "stable",
|
|
6219
|
+
"summary": "Props to change the behavior of the bundler."
|
|
6220
|
+
},
|
|
6199
6221
|
"name": "props",
|
|
6200
6222
|
"optional": true,
|
|
6201
6223
|
"type": {
|
|
@@ -6210,7 +6232,7 @@
|
|
|
6210
6232
|
"kind": "class",
|
|
6211
6233
|
"locationInModule": {
|
|
6212
6234
|
"filename": "src/source.ts",
|
|
6213
|
-
"line":
|
|
6235
|
+
"line": 148
|
|
6214
6236
|
},
|
|
6215
6237
|
"methods": [
|
|
6216
6238
|
{
|
|
@@ -6220,7 +6242,7 @@
|
|
|
6220
6242
|
},
|
|
6221
6243
|
"locationInModule": {
|
|
6222
6244
|
"filename": "src/source.ts",
|
|
6223
|
-
"line":
|
|
6245
|
+
"line": 73
|
|
6224
6246
|
},
|
|
6225
6247
|
"name": "bind",
|
|
6226
6248
|
"overrides": "aws-cdk-lib.aws_s3_deployment.ISource",
|
|
@@ -6277,7 +6299,7 @@
|
|
|
6277
6299
|
},
|
|
6278
6300
|
"locationInModule": {
|
|
6279
6301
|
"filename": "src/source.ts",
|
|
6280
|
-
"line":
|
|
6302
|
+
"line": 152
|
|
6281
6303
|
},
|
|
6282
6304
|
"name": "assetClass",
|
|
6283
6305
|
"type": {
|
|
@@ -6340,6 +6362,6 @@
|
|
|
6340
6362
|
"symbolId": "src/source:TypeScriptSourceProps"
|
|
6341
6363
|
}
|
|
6342
6364
|
},
|
|
6343
|
-
"version": "3.
|
|
6344
|
-
"fingerprint": "
|
|
6365
|
+
"version": "3.7.0",
|
|
6366
|
+
"fingerprint": "ueoh5zvfDjmtYia2303pLrEDhzdxb/gouLZBYlY14CE="
|
|
6345
6367
|
}
|
package/.projenrc.ts
CHANGED
|
@@ -111,6 +111,22 @@ const project = new awscdk.AwsCdkConstructLibrary({
|
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
// release only via manual trigger
|
|
114
|
+
project.release?.publisher?.publishToGit({
|
|
115
|
+
changelogFile: 'dist/dist/changelog.md',
|
|
116
|
+
versionFile: 'dist/dist/version.txt',
|
|
117
|
+
releaseTagFile: 'dist/dist/releasetag.txt',
|
|
118
|
+
projectChangelogFile: 'CHANGELOG.md',
|
|
119
|
+
gitBranch: 'main',
|
|
120
|
+
});
|
|
121
|
+
project.tryFindObjectFile('.github/workflows/release.yml')?.addToArray(
|
|
122
|
+
'jobs.release.steps',
|
|
123
|
+
{
|
|
124
|
+
name: 'Publish tag',
|
|
125
|
+
run: 'npx projen publish:git',
|
|
126
|
+
},
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
// add additional tags on npm
|
|
114
130
|
project.tryFindObjectFile('.github/workflows/release.yml')?.addToArray(
|
|
115
131
|
'jobs.release_npm.steps',
|
|
116
132
|
tagOnNpm(project.package.packageName, ['cdk-v2', 'unstable', 'next']),
|